Title: [232180] trunk/Source/WebCore
- Revision
- 232180
- Author
- [email protected]
- Date
- 2018-05-24 18:58:33 -0700 (Thu, 24 May 2018)
Log Message
Avoid doing unnecessary work in Document::shouldEnforceContentDispositionAttachmentSandbox() when setting is disabled
https://bugs.webkit.org/show_bug.cgi?id=185964
Reviewed by Geoffrey Garen.
* dom/Document.cpp:
(WebCore::Document::shouldEnforceContentDispositionAttachmentSandbox const):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (232179 => 232180)
--- trunk/Source/WebCore/ChangeLog 2018-05-25 01:58:14 UTC (rev 232179)
+++ trunk/Source/WebCore/ChangeLog 2018-05-25 01:58:33 UTC (rev 232180)
@@ -1,5 +1,15 @@
2018-05-24 Chris Dumez <[email protected]>
+ Avoid doing unnecessary work in Document::shouldEnforceContentDispositionAttachmentSandbox() when setting is disabled
+ https://bugs.webkit.org/show_bug.cgi?id=185964
+
+ Reviewed by Geoffrey Garen.
+
+ * dom/Document.cpp:
+ (WebCore::Document::shouldEnforceContentDispositionAttachmentSandbox const):
+
+2018-05-24 Chris Dumez <[email protected]>
+
[iOS] Avoid dlopening QuickLooks in the common case where the main resource is HTML or plain text
https://bugs.webkit.org/show_bug.cgi?id=185966
Modified: trunk/Source/WebCore/dom/Document.cpp (232179 => 232180)
--- trunk/Source/WebCore/dom/Document.cpp 2018-05-25 01:58:14 UTC (rev 232179)
+++ trunk/Source/WebCore/dom/Document.cpp 2018-05-25 01:58:33 UTC (rev 232180)
@@ -7304,15 +7304,15 @@
bool Document::shouldEnforceContentDispositionAttachmentSandbox() const
{
+ if (!settings().contentDispositionAttachmentSandboxEnabled())
+ return false;
+
if (m_isSynthesized)
return false;
- bool contentDispositionAttachmentSandboxEnabled = settings().contentDispositionAttachmentSandboxEnabled();
- bool responseIsAttachment = false;
- if (DocumentLoader* documentLoader = m_frame ? m_frame->loader().activeDocumentLoader() : nullptr)
- responseIsAttachment = documentLoader->response().isAttachment();
-
- return contentDispositionAttachmentSandboxEnabled && responseIsAttachment;
+ if (auto* documentLoader = m_frame ? m_frame->loader().activeDocumentLoader() : nullptr)
+ return documentLoader->response().isAttachment();
+ return false;
}
void Document::applyContentDispositionAttachmentSandbox()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes