<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[175055] trunk/Source</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/175055">175055</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2014-10-22 10:43:07 -0700 (Wed, 22 Oct 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>[Mac][WK2] Fix applicationIsSafari() detection
https://bugs.webkit.org/show_bug.cgi?id=137893

Reviewed by Alexey Proskuryakov.

Source/WebCore:

I noticed when profiling Safari on Mac that we were exercising a code
path we shouldn't because it is meant for other applications that
Safari.

The detection relies on the applicationIsSafari() function in
RuntimeApplicationChecks.cpp. This was in some cases returning false on
my machine even though I was running Safari so I investigated a bit and
noticed that the check relies on the main bundle identifier string and
is doing:
isSafari = mainBundleIsEqualTo(&quot;com.apple.Safari&quot;)
    || mainBundleIsEqualTo(&quot;com.apple.WebProcess&quot;);

This WebProcess detection is very unreliable because:
- It matches other apps than Safari's WebProcesses
- The bundle name for the WebProcess is sometimes
&quot;com.apple.WebKit.WebContent&quot; or
&quot;com.apple.WebKit.WebContent.Development&quot;.

The solution used in this patch is to move the applicationIsSafari()
check to the UIProcess so that the check actually succeeds reliably.
The call site for applicationIsSafari() was in
ResourceRequest::useQuickLookResourceCachingQuirks(). This match
removes that logic from ResourceRequest and move it to
FrameLoaderClient as only the FrameLoader is interested in this
information. The logic to determine if we should use QuickLook
resource caching quirks is moved to a new QuickLook class under
platform/ as the code needs to be shared between WebKit and WebKit2.
On WebKit2, we make use that code on the UIProcess side and pass
the flag as a parameter when constructing the WebProcess. The flag
is then stored on the WebProcess and queried by WebFrameLoaderClient.

Previously, we would spend ~1% of the WebProcess cpu time (when loading
apple.com) trying to detect if we should use QuickLook resource caching
quirks even though that check was supposed to be disabled and return
early when running Safari.

No new tests, not easily testable.

* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* loader/EmptyClients.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::subresourceCachePolicy):
* loader/FrameLoaderClient.h:
* platform/RuntimeApplicationChecks.cpp:
(WebCore::applicationIsSafari):
Remove &quot;com.apple.WebProcess&quot; bundle name matching as this causes false
positives (matches other applications than Safari's WebProcesses) and
it is no longer needed now that applicationIsSafari() is always called
from the UIProcess.

* platform/mac/QuickLookMac.h: Added.
* platform/mac/QuickLookMac.mm: Copied from Source/WebCore/platform/network/mac/ResourceRequestMac.mm.
(WebCore::QuickLookMac::computeNeedsQuickLookResourceCachingQuirks):
* platform/network/cf/ResourceRequest.h:
* platform/network/ios/ResourceRequestIOS.mm:
(WebCore::ResourceRequest::useQuickLookResourceCachingQuirks): Deleted.
* platform/network/mac/ResourceRequestMac.mm:
(WebCore::initQuickLookResourceCachingQuirks): Deleted.
(WebCore::ResourceRequest::useQuickLookResourceCachingQuirks): Deleted.

Source/WebKit/mac:

Provide an implementation for FrameLoaderClient's new
needsQuickLookResourceCachingQuirks() that returns
a static flag initialized using
QuickLookMac::computeNeedsQuickLookResourceCachingQuirks().

* WebCoreSupport/WebFrameLoaderClient.h:
* WebCoreSupport/WebFrameLoaderClient.mm:

Source/WebKit2:

Provide an implementation for FrameLoaderClient's new
needsQuickLookResourceCachingQuirks(), which accesses the flag stored
on the WebProcess, which is initialized upon WebProcess creation.

QuickLookMac::computeNeedsQuickLookResourceCachingQuirks() is called
on UIProcess side so that it works reliably and the flag is passed as
parameter when constructing the WebProcess.

* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::platformInitializeWebProcess):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::needsQuickLookResourceCachingQuirks):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess):
* WebProcess/WebProcess.h:
(WebKit::WebProcess::needsQuickLookResourceCachingQuirks):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCoreexpin">trunk/Source/WebCore/WebCore.exp.in</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCoreloaderEmptyClientsh">trunk/Source/WebCore/loader/EmptyClients.h</a></li>
<li><a href="#trunkSourceWebCoreloaderFrameLoadercpp">trunk/Source/WebCore/loader/FrameLoader.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderFrameLoaderClienth">trunk/Source/WebCore/loader/FrameLoaderClient.h</a></li>
<li><a href="#trunkSourceWebCoreplatformRuntimeApplicationCheckscpp">trunk/Source/WebCore/platform/RuntimeApplicationChecks.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcfResourceRequesth">trunk/Source/WebCore/platform/network/cf/ResourceRequest.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkiosResourceRequestIOSmm">trunk/Source/WebCore/platform/network/ios/ResourceRequestIOS.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkmacResourceRequestMacmm">trunk/Source/WebCore/platform/network/mac/ResourceRequestMac.mm</a></li>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacWebCoreSupportWebFrameLoaderClienth">trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h</a></li>
<li><a href="#trunkSourceWebKitmacWebCoreSupportWebFrameLoaderClientmm">trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2SharedWebProcessCreationParameterscpp">trunk/Source/WebKit2/Shared/WebProcessCreationParameters.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedWebProcessCreationParametersh">trunk/Source/WebKit2/Shared/WebProcessCreationParameters.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacWebContextMacmm">trunk/Source/WebKit2/UIProcess/mac/WebContextMac.mm</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportWebFrameLoaderClientcpp">trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportWebFrameLoaderClienth">trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebProcesscpp">trunk/Source/WebKit2/WebProcess/WebProcess.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebProcessh">trunk/Source/WebKit2/WebProcess/WebProcess.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcesscocoaWebProcessCocoamm">trunk/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreplatformmacQuickLookMach">trunk/Source/WebCore/platform/mac/QuickLookMac.h</a></li>
<li><a href="#trunkSourceWebCoreplatformmacQuickLookMacmm">trunk/Source/WebCore/platform/mac/QuickLookMac.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (175054 => 175055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-10-22 17:41:57 UTC (rev 175054)
+++ trunk/Source/WebCore/ChangeLog        2014-10-22 17:43:07 UTC (rev 175055)
</span><span class="lines">@@ -1,3 +1,71 @@
</span><ins>+2014-10-22  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        [Mac][WK2] Fix applicationIsSafari() detection
+        https://bugs.webkit.org/show_bug.cgi?id=137893
+
+        Reviewed by Alexey Proskuryakov.
+
+        I noticed when profiling Safari on Mac that we were exercising a code
+        path we shouldn't because it is meant for other applications that
+        Safari.
+
+        The detection relies on the applicationIsSafari() function in
+        RuntimeApplicationChecks.cpp. This was in some cases returning false on
+        my machine even though I was running Safari so I investigated a bit and
+        noticed that the check relies on the main bundle identifier string and
+        is doing:
+        isSafari = mainBundleIsEqualTo(&quot;com.apple.Safari&quot;)
+            || mainBundleIsEqualTo(&quot;com.apple.WebProcess&quot;);
+
+        This WebProcess detection is very unreliable because:
+        - It matches other apps than Safari's WebProcesses
+        - The bundle name for the WebProcess is sometimes
+        &quot;com.apple.WebKit.WebContent&quot; or
+        &quot;com.apple.WebKit.WebContent.Development&quot;.
+
+        The solution used in this patch is to move the applicationIsSafari()
+        check to the UIProcess so that the check actually succeeds reliably.
+        The call site for applicationIsSafari() was in
+        ResourceRequest::useQuickLookResourceCachingQuirks(). This match
+        removes that logic from ResourceRequest and move it to
+        FrameLoaderClient as only the FrameLoader is interested in this
+        information. The logic to determine if we should use QuickLook
+        resource caching quirks is moved to a new QuickLook class under
+        platform/ as the code needs to be shared between WebKit and WebKit2.
+        On WebKit2, we make use that code on the UIProcess side and pass
+        the flag as a parameter when constructing the WebProcess. The flag
+        is then stored on the WebProcess and queried by WebFrameLoaderClient.
+
+        Previously, we would spend ~1% of the WebProcess cpu time (when loading
+        apple.com) trying to detect if we should use QuickLook resource caching
+        quirks even though that check was supposed to be disabled and return
+        early when running Safari.
+
+        No new tests, not easily testable.
+
+        * WebCore.exp.in:
+        * WebCore.xcodeproj/project.pbxproj:
+        * loader/EmptyClients.h:
+        * loader/FrameLoader.cpp:
+        (WebCore::FrameLoader::subresourceCachePolicy):
+        * loader/FrameLoaderClient.h:
+        * platform/RuntimeApplicationChecks.cpp:
+        (WebCore::applicationIsSafari):
+        Remove &quot;com.apple.WebProcess&quot; bundle name matching as this causes false
+        positives (matches other applications than Safari's WebProcesses) and
+        it is no longer needed now that applicationIsSafari() is always called
+        from the UIProcess.
+
+        * platform/mac/QuickLookMac.h: Added.
+        * platform/mac/QuickLookMac.mm: Copied from Source/WebCore/platform/network/mac/ResourceRequestMac.mm.
+        (WebCore::QuickLookMac::computeNeedsQuickLookResourceCachingQuirks):
+        * platform/network/cf/ResourceRequest.h:
+        * platform/network/ios/ResourceRequestIOS.mm:
+        (WebCore::ResourceRequest::useQuickLookResourceCachingQuirks): Deleted.
+        * platform/network/mac/ResourceRequestMac.mm:
+        (WebCore::initQuickLookResourceCachingQuirks): Deleted.
+        (WebCore::ResourceRequest::useQuickLookResourceCachingQuirks): Deleted.
+
</ins><span class="cx"> 2014-10-22  Shivakumar JM  &lt;shiva.jm@samsung.com&gt;
</span><span class="cx"> 
</span><span class="cx">         XMLHttpRequest should support attribute responseURL as per latest XHR spec.
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCoreexpin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.exp.in (175054 => 175055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.exp.in        2014-10-22 17:41:57 UTC (rev 175054)
+++ trunk/Source/WebCore/WebCore.exp.in        2014-10-22 17:43:07 UTC (rev 175055)
</span><span class="lines">@@ -240,6 +240,7 @@
</span><span class="cx"> __ZN7WebCore12PrintContext9spoolRectERNS_15GraphicsContextERKNS_7IntRectE
</span><span class="cx"> __ZN7WebCore12PrintContextC1EPNS_5FrameE
</span><span class="cx"> __ZN7WebCore12PrintContextD1Ev
</span><ins>+__ZN7WebCore12QuickLookMac42computeNeedsQuickLookResourceCachingQuirksEv
</ins><span class="cx"> __ZN7WebCore12RenderObject16paintingRootRectERNS_10LayoutRectE
</span><span class="cx"> __ZN7WebCore12RenderObject19scrollRectToVisibleERKNS_10LayoutRectERKNS_15ScrollAlignmentES6_
</span><span class="cx"> __ZN7WebCore12RenderWidget9setWidgetEN3WTF10PassRefPtrINS_6WidgetEEE
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (175054 => 175055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-10-22 17:41:57 UTC (rev 175054)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-10-22 17:43:07 UTC (rev 175055)
</span><span class="lines">@@ -1582,6 +1582,8 @@
</span><span class="cx">                 45BAC2B01360BBAB005DA258 /* IconURL.h in Headers */ = {isa = PBXBuildFile; fileRef = 45BAC2AF1360BBAB005DA258 /* IconURL.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 45FEA5CF156DDE8C00654101 /* Decimal.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 45FEA5CD156DDE8C00654101 /* Decimal.cpp */; };
</span><span class="cx">                 45FEA5D0156DDE8C00654101 /* Decimal.h in Headers */ = {isa = PBXBuildFile; fileRef = 45FEA5CE156DDE8C00654101 /* Decimal.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><ins>+                4643783119F720EF001E38B3 /* QuickLookMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 4643782F19F720EF001E38B3 /* QuickLookMac.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                4643783219F720EF001E38B3 /* QuickLookMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4643783019F720EF001E38B3 /* QuickLookMac.mm */; };
</ins><span class="cx">                 4689F1AF1267BAE100E8D380 /* FileMetadata.h in Headers */ = {isa = PBXBuildFile; fileRef = 4689F1AE1267BAE100E8D380 /* FileMetadata.h */; };
</span><span class="cx">                 46BD16E30B279473001F0839 /* noneCursor.png in Resources */ = {isa = PBXBuildFile; fileRef = 46BD16E20B279473001F0839 /* noneCursor.png */; };
</span><span class="cx">                 46D4F2490AF97E810035385A /* cellCursor.png in Resources */ = {isa = PBXBuildFile; fileRef = 46D4F2460AF97E810035385A /* cellCursor.png */; };
</span><span class="lines">@@ -8642,6 +8644,8 @@
</span><span class="cx">                 45BAC2AF1360BBAB005DA258 /* IconURL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IconURL.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 45FEA5CD156DDE8C00654101 /* Decimal.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Decimal.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 45FEA5CE156DDE8C00654101 /* Decimal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Decimal.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                4643782F19F720EF001E38B3 /* QuickLookMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QuickLookMac.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                4643783019F720EF001E38B3 /* QuickLookMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = QuickLookMac.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 4689F1AE1267BAE100E8D380 /* FileMetadata.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileMetadata.h; path = platform/FileMetadata.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 46BD16E20B279473001F0839 /* noneCursor.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = noneCursor.png; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 46D4F2460AF97E810035385A /* cellCursor.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = cellCursor.png; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -16428,6 +16432,8 @@
</span><span class="cx">                                 BC94D1070C274F88006BC617 /* PlatformScreenMac.mm */,
</span><span class="cx">                                 29E4D8E016B0959800C84704 /* PlatformSpeechSynthesizerMac.mm */,
</span><span class="cx">                                 0081FEFE16B0A2B6008AAA7A /* PublicSuffixMac.mm */,
</span><ins>+                                4643782F19F720EF001E38B3 /* QuickLookMac.h */,
+                                4643783019F720EF001E38B3 /* QuickLookMac.mm */,
</ins><span class="cx">                                 BCAE1FA512939DB7004CB026 /* ScrollAnimatorMac.h */,
</span><span class="cx">                                 BC51156D12B1749C00C96754 /* ScrollAnimatorMac.mm */,
</span><span class="cx">                                 BC8B853C0E7C7F1100AB6984 /* ScrollbarThemeMac.h */,
</span><span class="lines">@@ -26496,6 +26502,7 @@
</span><span class="cx">                                 26F9A83918A046AC00AEB88A /* ViewportConfiguration.h in Headers */,
</span><span class="cx">                                 3FFFF9AE159D9B060020BBD5 /* ViewportStyleResolver.h in Headers */,
</span><span class="cx">                                 8678D0BB1878E891003ABDE6 /* ViewState.h in Headers */,
</span><ins>+                                4643783119F720EF001E38B3 /* QuickLookMac.h in Headers */,
</ins><span class="cx">                                 93309E20099E64920056E581 /* VisiblePosition.h in Headers */,
</span><span class="cx">                                 07AB996918DA3C010018771E /* RTCConfiguration.h in Headers */,
</span><span class="cx">                                 A883DF280F3D045D00F19BF6 /* VisibleSelection.h in Headers */,
</span><span class="lines">@@ -29736,6 +29743,7 @@
</span><span class="cx">                                 E424A3A01330DF1E00CF6DC9 /* LegacyTileGridTile.mm in Sources */,
</span><span class="cx">                                 E4B65A5E132FADB60070E7BE /* LegacyTileLayer.mm in Sources */,
</span><span class="cx">                                 E4E39AFD1330EFC6003AB274 /* LegacyTileLayerPool.mm in Sources */,
</span><ins>+                                4643783219F720EF001E38B3 /* QuickLookMac.mm in Sources */,
</ins><span class="cx">                                 498770F21242C535002226BA /* TilingData.cpp in Sources */,
</span><span class="cx">                                 F55B3DDB1251F12D003EF269 /* TimeInputType.cpp in Sources */,
</span><span class="cx">                                 7553CFE9108F473F00EA281E /* TimelineRecordFactory.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderEmptyClientsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/EmptyClients.h (175054 => 175055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/EmptyClients.h        2014-10-22 17:41:57 UTC (rev 175054)
+++ trunk/Source/WebCore/loader/EmptyClients.h        2014-10-22 17:43:07 UTC (rev 175055)
</span><span class="lines">@@ -401,6 +401,10 @@
</span><span class="cx">     virtual void didRequestAutocomplete(PassRefPtr&lt;FormState&gt;) override { }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if PLATFORM(MAC)
+    virtual bool needsQuickLookResourceCachingQuirks() const override { return false; }
+#endif
+
</ins><span class="cx">     virtual bool isEmptyFrameLoaderClient() override { return true; }
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderFrameLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/FrameLoader.cpp (175054 => 175055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/FrameLoader.cpp        2014-10-22 17:41:57 UTC (rev 175054)
+++ trunk/Source/WebCore/loader/FrameLoader.cpp        2014-10-22 17:43:07 UTC (rev 175055)
</span><span class="lines">@@ -2152,8 +2152,8 @@
</span><span class="cx">         return CachePolicyRevalidate;
</span><span class="cx"> 
</span><span class="cx">     const ResourceRequest&amp; request(documentLoader()-&gt;request());
</span><del>-#if PLATFORM(COCOA)
-    if (request.cachePolicy() == ReloadIgnoringCacheData &amp;&amp; !equalIgnoringCase(request.httpMethod(), &quot;post&quot;) &amp;&amp; ResourceRequest::useQuickLookResourceCachingQuirks())
</del><ins>+#if PLATFORM(MAC)
+    if (request.cachePolicy() == ReloadIgnoringCacheData &amp;&amp; !equalIgnoringCase(request.httpMethod(), &quot;post&quot;) &amp;&amp; m_client.needsQuickLookResourceCachingQuirks())
</ins><span class="cx">         return CachePolicyRevalidate;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderFrameLoaderClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/FrameLoaderClient.h (175054 => 175055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/FrameLoaderClient.h        2014-10-22 17:41:57 UTC (rev 175054)
+++ trunk/Source/WebCore/loader/FrameLoaderClient.h        2014-10-22 17:43:07 UTC (rev 175055)
</span><span class="lines">@@ -285,6 +285,10 @@
</span><span class="cx"> 
</span><span class="cx">         virtual void registerForIconNotification(bool listen = true) = 0;
</span><span class="cx"> 
</span><ins>+#if PLATFORM(MAC)
+        virtual bool needsQuickLookResourceCachingQuirks() const = 0;
+#endif
+
</ins><span class="cx"> #if PLATFORM(COCOA)
</span><span class="cx">         // Allow an accessibility object to retrieve a Frame parent if there's no PlatformWidget.
</span><span class="cx">         virtual RemoteAXObjectRef accessibilityRemoteObject() = 0;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformRuntimeApplicationCheckscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/RuntimeApplicationChecks.cpp (175054 => 175055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/RuntimeApplicationChecks.cpp        2014-10-22 17:41:57 UTC (rev 175054)
+++ trunk/Source/WebCore/platform/RuntimeApplicationChecks.cpp        2014-10-22 17:43:07 UTC (rev 175055)
</span><span class="lines">@@ -57,8 +57,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool applicationIsSafari()
</span><span class="cx"> {
</span><del>-    // FIXME: For the WebProcess case, ensure that this is Safari's WebProcess.
-    static bool isSafari = mainBundleIsEqualTo(&quot;com.apple.Safari&quot;) || mainBundleIsEqualTo(&quot;com.apple.WebProcess&quot;);
</del><ins>+    static bool isSafari = mainBundleIsEqualTo(&quot;com.apple.Safari&quot;);
</ins><span class="cx">     return isSafari;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmacQuickLookMach"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/platform/mac/QuickLookMac.h (0 => 175055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/QuickLookMac.h                                (rev 0)
+++ trunk/Source/WebCore/platform/mac/QuickLookMac.h        2014-10-22 17:43:07 UTC (rev 175055)
</span><span class="lines">@@ -0,0 +1,38 @@
</span><ins>+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef QuickLookMac_h
+#define QuickLookMac_h
+
+namespace WebCore {
+
+class QuickLookMac {
+public:
+    WEBCORE_EXPORT static bool computeNeedsQuickLookResourceCachingQuirks();
+};
+
+} // namespace WebCore
+
+#endif // QuickLookMac_h
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformmacQuickLookMacmmfromrev175054trunkSourceWebCoreplatformnetworkmacResourceRequestMacmm"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/platform/mac/QuickLookMac.mm (from rev 175054, trunk/Source/WebCore/platform/network/mac/ResourceRequestMac.mm) (0 => 175055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/QuickLookMac.mm                                (rev 0)
+++ trunk/Source/WebCore/platform/mac/QuickLookMac.mm        2014-10-22 17:43:07 UTC (rev 175055)
</span><span class="lines">@@ -0,0 +1,51 @@
</span><ins>+/*
+ * Copyright (C) 2006, 2007, 2008, 2014 Apple, Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import &quot;config.h&quot;
+#import &quot;QuickLookMac.h&quot;
+
+#import &quot;RuntimeApplicationChecks.h&quot;
+
+namespace WebCore {
+
+bool QuickLookMac::computeNeedsQuickLookResourceCachingQuirks()
+{
+    if (applicationIsSafari())
+        return false;
+
+    NSArray *frameworks = [NSBundle allFrameworks];
+
+    if (!frameworks)
+        return false;
+
+    for (NSBundle *bundle in frameworks) {
+        const char* bundleID = [[bundle bundleIdentifier] UTF8String];
+        if (bundleID &amp;&amp; !strcasecmp(bundleID, &quot;com.apple.QuickLookUIFramework&quot;))
+            return true;
+    }
+    return false;
+}
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcfResourceRequesth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/cf/ResourceRequest.h (175054 => 175055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/cf/ResourceRequest.h        2014-10-22 17:41:57 UTC (rev 175054)
+++ trunk/Source/WebCore/platform/network/cf/ResourceRequest.h        2014-10-22 17:43:07 UTC (rev 175055)
</span><span class="lines">@@ -117,10 +117,6 @@
</span><span class="cx"> 
</span><span class="cx">         static bool resourcePrioritiesEnabled();
</span><span class="cx"> 
</span><del>-#if PLATFORM(COCOA)
-        static bool useQuickLookResourceCachingQuirks();
-#endif
-
</del><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx">         // FIXME: deprecatedIsMainResourceRequest() does not return the correct value if the ResourceRequest has been
</span><span class="cx">         // deserialized from an IPC message. As a result this function can only be relied on when networking is not in a
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkiosResourceRequestIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/ios/ResourceRequestIOS.mm (175054 => 175055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/ios/ResourceRequestIOS.mm        2014-10-22 17:41:57 UTC (rev 175054)
+++ trunk/Source/WebCore/platform/network/ios/ResourceRequestIOS.mm        2014-10-22 17:43:07 UTC (rev 175055)
</span><span class="lines">@@ -35,11 +35,6 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-bool ResourceRequest::useQuickLookResourceCachingQuirks()
-{
-    return false;
-}
-
</del><span class="cx"> #if USE(CFNETWORK)
</span><span class="cx"> 
</span><span class="cx"> ResourceRequest::ResourceRequest(NSURLRequest *nsRequest)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkmacResourceRequestMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/mac/ResourceRequestMac.mm (175054 => 175055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/mac/ResourceRequestMac.mm        2014-10-22 17:41:57 UTC (rev 175054)
+++ trunk/Source/WebCore/platform/network/mac/ResourceRequestMac.mm        2014-10-22 17:43:07 UTC (rev 175055)
</span><span class="lines">@@ -28,8 +28,6 @@
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx"> 
</span><del>-#import &quot;RuntimeApplicationChecks.h&quot;
-
</del><span class="cx"> #import &lt;Foundation/Foundation.h&gt;
</span><span class="cx"> 
</span><span class="cx"> @interface NSURLRequest (WebNSURLRequestDetails)
</span><span class="lines">@@ -39,31 +37,6 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-static bool initQuickLookResourceCachingQuirks()
-{
-    if (applicationIsSafari())
-        return false;
-    
-    NSArray* frameworks = [NSBundle allFrameworks];
-    
-    if (!frameworks)
-        return false;
-    
-    for (unsigned int i = 0; i &lt; [frameworks count]; i++) {
-        NSBundle* bundle = [frameworks objectAtIndex: i];
-        const char* bundleID = [[bundle bundleIdentifier] UTF8String];
-        if (bundleID &amp;&amp; !strcasecmp(bundleID, &quot;com.apple.QuickLookUIFramework&quot;))
-            return true;
-    }
-    return false;
-}
-
-bool ResourceRequest::useQuickLookResourceCachingQuirks()
-{
-    static bool flag = initQuickLookResourceCachingQuirks();
-    return flag;
-}
-
</del><span class="cx"> #if USE(CFNETWORK)
</span><span class="cx"> 
</span><span class="cx"> ResourceRequest::ResourceRequest(NSURLRequest *nsRequest)
</span></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (175054 => 175055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2014-10-22 17:41:57 UTC (rev 175054)
+++ trunk/Source/WebKit/mac/ChangeLog        2014-10-22 17:43:07 UTC (rev 175055)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2014-10-22  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        [Mac][WK2] Fix applicationIsSafari() detection
+        https://bugs.webkit.org/show_bug.cgi?id=137893
+
+        Reviewed by Alexey Proskuryakov.
+
+        Provide an implementation for FrameLoaderClient's new
+        needsQuickLookResourceCachingQuirks() that returns
+        a static flag initialized using
+        QuickLookMac::computeNeedsQuickLookResourceCachingQuirks().
+
+        * WebCoreSupport/WebFrameLoaderClient.h:
+        * WebCoreSupport/WebFrameLoaderClient.mm:
+
</ins><span class="cx"> 2014-10-20  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         ResourceRequest deserialization unnecessarily calls partitionName() on encoded cache partition
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebCoreSupportWebFrameLoaderClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h (175054 => 175055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h        2014-10-22 17:41:57 UTC (rev 175054)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h        2014-10-22 17:43:07 UTC (rev 175055)
</span><span class="lines">@@ -239,6 +239,10 @@
</span><span class="cx">     virtual void didCreateQuickLookHandle(WebCore::QuickLookHandle&amp;) override;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if PLATFORM(MAC)
+    virtual bool needsQuickLookResourceCachingQuirks() const override;
+#endif
+
</ins><span class="cx">     virtual void contentFilterDidBlockLoad(std::unique_ptr&lt;WebCore::ContentFilter&gt;) override;
</span><span class="cx"> 
</span><span class="cx">     RetainPtr&lt;WebFrame&gt; m_webFrame;
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebCoreSupportWebFrameLoaderClientmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm (175054 => 175055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm        2014-10-22 17:41:57 UTC (rev 175054)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm        2014-10-22 17:43:07 UTC (rev 175055)
</span><span class="lines">@@ -146,6 +146,8 @@
</span><span class="cx"> #import &quot;WebKitVersionChecks.h&quot;
</span><span class="cx"> #import &quot;WebMailDelegate.h&quot;
</span><span class="cx"> #import &quot;WebUIKitDelegate.h&quot;
</span><ins>+#else
+#import &lt;WebCore/QuickLookMac.h&gt;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if USE(QUICK_LOOK)
</span><span class="lines">@@ -2247,6 +2249,14 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if PLATFORM(MAC)
+bool WebFrameLoaderClient::needsQuickLookResourceCachingQuirks() const
+{
+    static const bool shouldUseQuickLookResourceCachingQuirks = QuickLookMac::computeNeedsQuickLookResourceCachingQuirks();
+    return shouldUseQuickLookResourceCachingQuirks;
+}
+#endif
+
</ins><span class="cx"> void WebFrameLoaderClient::contentFilterDidBlockLoad(std::unique_ptr&lt;WebCore::ContentFilter&gt; contentFilter)
</span><span class="cx"> {
</span><span class="cx">     m_webFrame-&gt;_private-&gt;contentFilterForBlockedLoad = WTF::move(contentFilter);
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (175054 => 175055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-10-22 17:41:57 UTC (rev 175054)
+++ trunk/Source/WebKit2/ChangeLog        2014-10-22 17:43:07 UTC (rev 175055)
</span><span class="lines">@@ -1,3 +1,34 @@
</span><ins>+2014-10-22  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        [Mac][WK2] Fix applicationIsSafari() detection
+        https://bugs.webkit.org/show_bug.cgi?id=137893
+
+        Reviewed by Alexey Proskuryakov.
+
+        Provide an implementation for FrameLoaderClient's new
+        needsQuickLookResourceCachingQuirks(), which accesses the flag stored
+        on the WebProcess, which is initialized upon WebProcess creation.
+
+        QuickLookMac::computeNeedsQuickLookResourceCachingQuirks() is called
+        on UIProcess side so that it works reliably and the flag is passed as
+        parameter when constructing the WebProcess.
+
+        * Shared/WebProcessCreationParameters.cpp:
+        (WebKit::WebProcessCreationParameters::encode):
+        (WebKit::WebProcessCreationParameters::decode):
+        * Shared/WebProcessCreationParameters.h:
+        * UIProcess/mac/WebContextMac.mm:
+        (WebKit::WebContext::platformInitializeWebProcess):
+        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+        (WebKit::WebFrameLoaderClient::needsQuickLookResourceCachingQuirks):
+        * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
+        * WebProcess/WebProcess.cpp:
+        (WebKit::WebProcess::WebProcess):
+        * WebProcess/WebProcess.h:
+        (WebKit::WebProcess::needsQuickLookResourceCachingQuirks):
+        * WebProcess/cocoa/WebProcessCocoa.mm:
+        (WebKit::WebProcess::platformInitializeWebProcess):
+
</ins><span class="cx"> 2014-10-22  Carlos Garcia Campos  &lt;cgarcia@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed. Fix GTK+ debug build after r175046.
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebProcessCreationParameterscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebProcessCreationParameters.cpp (175054 => 175055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebProcessCreationParameters.cpp        2014-10-22 17:41:57 UTC (rev 175054)
+++ trunk/Source/WebKit2/Shared/WebProcessCreationParameters.cpp        2014-10-22 17:43:07 UTC (rev 175055)
</span><span class="lines">@@ -106,6 +106,7 @@
</span><span class="cx"> #if PLATFORM(COCOA)
</span><span class="cx">     encoder &lt;&lt; presenterApplicationPid;
</span><span class="cx">     encoder &lt;&lt; accessibilityEnhancedUserInterfaceEnabled;
</span><ins>+    encoder &lt;&lt; needsQuickLookResourceCachingQuirks;
</ins><span class="cx">     encoder &lt;&lt; nsURLCacheMemoryCapacity;
</span><span class="cx">     encoder &lt;&lt; nsURLCacheDiskCapacity;
</span><span class="cx">     encoder &lt;&lt; acceleratedCompositingPort;
</span><span class="lines">@@ -230,6 +231,8 @@
</span><span class="cx">         return false;
</span><span class="cx">     if (!decoder.decode(parameters.accessibilityEnhancedUserInterfaceEnabled))
</span><span class="cx">         return false;
</span><ins>+    if (!decoder.decode(parameters.needsQuickLookResourceCachingQuirks))
+        return false;
</ins><span class="cx">     if (!decoder.decode(parameters.nsURLCacheMemoryCapacity))
</span><span class="cx">         return false;
</span><span class="cx">     if (!decoder.decode(parameters.nsURLCacheDiskCapacity))
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebProcessCreationParametersh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebProcessCreationParameters.h (175054 => 175055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebProcessCreationParameters.h        2014-10-22 17:41:57 UTC (rev 175054)
+++ trunk/Source/WebKit2/Shared/WebProcessCreationParameters.h        2014-10-22 17:43:07 UTC (rev 175055)
</span><span class="lines">@@ -124,6 +124,7 @@
</span><span class="cx">     pid_t presenterApplicationPid;
</span><span class="cx"> 
</span><span class="cx">     bool accessibilityEnhancedUserInterfaceEnabled;
</span><ins>+    bool needsQuickLookResourceCachingQuirks;
</ins><span class="cx"> 
</span><span class="cx">     uint64_t nsURLCacheMemoryCapacity;
</span><span class="cx">     uint64_t nsURLCacheDiskCapacity;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacWebContextMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/WebContextMac.mm (175054 => 175055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/WebContextMac.mm        2014-10-22 17:41:57 UTC (rev 175054)
+++ trunk/Source/WebKit2/UIProcess/mac/WebContextMac.mm        2014-10-22 17:43:07 UTC (rev 175055)
</span><span class="lines">@@ -54,6 +54,7 @@
</span><span class="cx"> #import &lt;WebCore/RuntimeApplicationChecksIOS.h&gt;
</span><span class="cx"> #else
</span><span class="cx"> #import &lt;QuartzCore/CARemoteLayerServer.h&gt;
</span><ins>+#import &lt;WebCore/QuickLookMac.h&gt;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</span><span class="lines">@@ -175,8 +176,11 @@
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx">     parameters.accessibilityEnhancedUserInterfaceEnabled = [[NSApp accessibilityAttributeValue:@&quot;AXEnhancedUserInterface&quot;] boolValue];
</span><ins>+    static const bool shouldUseQuickLookResourceCachingQuirks = QuickLookMac::computeNeedsQuickLookResourceCachingQuirks();
+    parameters.needsQuickLookResourceCachingQuirks = shouldUseQuickLookResourceCachingQuirks;
</ins><span class="cx"> #else
</span><span class="cx">     parameters.accessibilityEnhancedUserInterfaceEnabled = false;
</span><ins>+    parameters.needsQuickLookResourceCachingQuirks = false;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     NSURLCache *urlCache = [NSURLCache sharedURLCache];
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebFrameLoaderClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp (175054 => 175055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp        2014-10-22 17:41:57 UTC (rev 175054)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp        2014-10-22 17:43:07 UTC (rev 175055)
</span><span class="lines">@@ -1656,4 +1656,11 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if PLATFORM(MAC)
+bool WebFrameLoaderClient::needsQuickLookResourceCachingQuirks() const
+{
+    return WebProcess::shared().needsQuickLookResourceCachingQuirks();
+}
+#endif
+
</ins><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebFrameLoaderClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h (175054 => 175055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h        2014-10-22 17:41:57 UTC (rev 175054)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h        2014-10-22 17:43:07 UTC (rev 175055)
</span><span class="lines">@@ -232,6 +232,10 @@
</span><span class="cx">     virtual void didCreateQuickLookHandle(WebCore::QuickLookHandle&amp;) override;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if PLATFORM(MAC)
+    virtual bool needsQuickLookResourceCachingQuirks() const override;
+#endif
+
</ins><span class="cx"> #if ENABLE(CONTENT_FILTERING)
</span><span class="cx">     virtual void contentFilterDidBlockLoad(std::unique_ptr&lt;WebCore::ContentFilter&gt;) override;
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebProcesscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebProcess.cpp (175054 => 175055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebProcess.cpp        2014-10-22 17:41:57 UTC (rev 175054)
+++ trunk/Source/WebKit2/WebProcess/WebProcess.cpp        2014-10-22 17:43:07 UTC (rev 175055)
</span><span class="lines">@@ -155,6 +155,9 @@
</span><span class="cx">     , m_compositingRenderServerPort(MACH_PORT_NULL)
</span><span class="cx">     , m_clearResourceCachesDispatchGroup(0)
</span><span class="cx"> #endif
</span><ins>+#if PLATFORM(MAC)
+    , m_needsQuickLookResourceCachingQuirks(false)
+#endif
</ins><span class="cx">     , m_fullKeyboardAccessEnabled(false)
</span><span class="cx">     , m_textCheckerState()
</span><span class="cx">     , m_iconDatabaseProxy(new WebIconDatabaseProxy(this))
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebProcessh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebProcess.h (175054 => 175055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebProcess.h        2014-10-22 17:41:57 UTC (rev 175054)
+++ trunk/Source/WebKit2/WebProcess/WebProcess.h        2014-10-22 17:43:07 UTC (rev 175055)
</span><span class="lines">@@ -116,6 +116,10 @@
</span><span class="cx">     mach_port_t compositingRenderServerPort() const { return m_compositingRenderServerPort; }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if PLATFORM(MAC)
+    bool needsQuickLookResourceCachingQuirks() const { return m_needsQuickLookResourceCachingQuirks; }
+#endif
+
</ins><span class="cx">     bool shouldPlugInAutoStartFromOrigin(const WebPage*, const String&amp; pageOrigin, const String&amp; pluginOrigin, const String&amp; mimeType);
</span><span class="cx">     void plugInDidStartFromOrigin(const String&amp; pageOrigin, const String&amp; pluginOrigin, const String&amp; mimeType, WebCore::SessionID);
</span><span class="cx">     void plugInDidReceiveUserInteraction(const String&amp; pageOrigin, const String&amp; pluginOrigin, const String&amp; mimeType, WebCore::SessionID);
</span><span class="lines">@@ -310,6 +314,9 @@
</span><span class="cx">     dispatch_group_t m_clearResourceCachesDispatchGroup;
</span><span class="cx">     bool m_shouldForceScreenFontSubstitution;
</span><span class="cx"> #endif
</span><ins>+#if PLATFORM(MAC)
+    bool m_needsQuickLookResourceCachingQuirks;
+#endif
</ins><span class="cx"> 
</span><span class="cx">     bool m_fullKeyboardAccessEnabled;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcesscocoaWebProcessCocoamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm (175054 => 175055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm        2014-10-22 17:41:57 UTC (rev 175054)
+++ trunk/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm        2014-10-22 17:43:07 UTC (rev 175055)
</span><span class="lines">@@ -191,6 +191,9 @@
</span><span class="cx">     MemoryPressureHandler::ReliefLogger::setLoggingEnabled(parameters.shouldEnableMemoryPressureReliefLogging);
</span><span class="cx"> 
</span><span class="cx">     setEnhancedAccessibility(parameters.accessibilityEnhancedUserInterfaceEnabled);
</span><ins>+#if PLATFORM(MAC)
+    m_needsQuickLookResourceCachingQuirks = parameters.needsQuickLookResourceCachingQuirks;
+#endif
</ins><span class="cx"> 
</span><span class="cx"> #if USE(APPKIT)
</span><span class="cx">     [[NSUserDefaults standardUserDefaults] registerDefaults:@{ @&quot;NSApplicationCrashOnExceptions&quot; : @YES }];
</span></span></pre>
</div>
</div>

</body>
</html>