<!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>[174315] trunk</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/174315">174315</a></dd>
<dt>Author</dt> <dd>timothy_horton@apple.com</dd>
<dt>Date</dt> <dd>2014-10-04 01:47:04 -0700 (Sat, 04 Oct 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Make it possible to test page overlays
https://bugs.webkit.org/show_bug.cgi?id=137339

Reviewed by Dan Bernstein.

Tests: pageoverlay/overlay-installation.html
       pageoverlay/overlay-large-document-scrolled.html
       pageoverlay/overlay-large-document.html

Do some initial work to make page overlays testable.
There are many more tests to be written, but this lays the groundwork.

* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* WebCore.vcxproj/WebCoreTestSupport.vcxproj:
* WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters:
* CMakeLists.txt:
Add MockPageOverlayClient.

* platform/graphics/GraphicsLayer.h:
* page/PageOverlayController.h:
* page/PageOverlayController.cpp:
(WebCore::PageOverlayController::shouldSkipLayerInDump):
Don't skip PageOverlayController-owned layers in the layer tree dump if the
layerTreeAsText behavior says that we should include them.

* platform/graphics/GraphicsLayer.cpp:
(WebCore::dumpChildren):

* platform/graphics/GraphicsLayerClient.h:
(WebCore::GraphicsLayerClient::shouldSkipLayerInDump):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::shouldSkipLayerInDump):
* rendering/RenderLayerBacking.h:
Pass the LayerTreeAsTextBehavior through shouldSkipLayerInDump.

* testing/Internals.cpp:
(WebCore::Internals::resetToConsistentState):
Uninstall all page overlays when resetting to a consistent state.

(WebCore::Internals::installMockPageOverlay):
(WebCore::Internals::pageOverlayLayerTreeAsText):
Expose two new internals functions.
installMockPageOverlay takes &quot;view&quot; or &quot;document&quot;, allowing script
to choose the appropriate overlay type.
pageOverlayLayerTreeAsText dumps both view and document-relative
overlays, from each overlay container layer.

* testing/Internals.h:
* testing/Internals.idl:
Fix some typos.

* testing/MockPageOverlayClient.cpp: Added.
(WebCore::MockPageOverlayClient::shared):
(WebCore::MockPageOverlayClient::MockPageOverlayClient):
(WebCore::MockPageOverlayClient::installOverlay):
(WebCore::MockPageOverlayClient::uninstallAllOverlays):
(WebCore::MockPageOverlayClient::layerTreeAsText):
(WebCore::MockPageOverlayClient::pageOverlayDestroyed):
(WebCore::MockPageOverlayClient::willMoveToPage):
(WebCore::MockPageOverlayClient::didMoveToPage):
When the overlay is parented, mark it as needing repaint.
Future tests might want to test overlays without content,
but for now this is a reasonable default behavior.

(WebCore::MockPageOverlayClient::drawRect):
Paint the overlay rects as described in the LayoutTests ChangeLog.

(WebCore::MockPageOverlayClient::mouseEvent):
(WebCore::MockPageOverlayClient::didScrollFrame):
(WebCore::MockPageOverlayClient::copyAccessibilityAttributeStringValueForPoint):
(WebCore::MockPageOverlayClient::copyAccessibilityAttributeBoolValueForPoint):
(WebCore::MockPageOverlayClient::copyAccessibilityAttributeNames):

* testing/MockPageOverlayClient.h: Added.

* pageoverlay/overlay-installation.html: Added.
Add a test which just installs one view-relative and one document-relative
overlay, and dumps the layer tree and pixel results. The mock overlay
strokes a blue rectangle (inset a little from the overlay bounds) for
view-relative overlays, and a green rectangle (inset a bit more) for
document-relative overlays.

* pageoverlay/overlay-large-document.html: Added.
* pageoverlay/overlay-large-document-scrolled.html: Added.
Tests that do the same as the -installation test, but with a larger document;
the view-relative overlay should be the same size (or slightly smaller,
because we have scrollbars now), but the document-relative overlay should
be the size of the document. The second test scrolls to maxX, maxY, and
the document-relative overlay should scroll along with it, while the
view-relative overlay should remain fixed.

* pageoverlay/overlay-installation-expected.txt: Added.
* pageoverlay/overlay-large-document-expected.txt: Added.
* pageoverlay/overlay-large-document-scrolled-expected.txt: Added.
&quot;Normal&quot; layer tree expectations.

* platform/mac-wk1/pageoverlay/overlay-installation-expected.png: Added.
* platform/mac-wk1/pageoverlay/overlay-installation-expected.txt: Added.
* platform/mac-wk1/pageoverlay/overlay-large-document-expected.png: Added.
* platform/mac-wk1/pageoverlay/overlay-large-document-expected.txt: Added.
* platform/mac-wk1/pageoverlay/overlay-large-document-scrolled-expected.png: Added.
* platform/mac-wk1/pageoverlay/overlay-large-document-scrolled-expected.txt: Added.
Expected results for WebKit1 differ for view-relative overlays, because
we don't currently hook up view-relative overlays for WebKit1.

* platform/mac/pageoverlay/overlay-installation-expected.png: Added.
* platform/mac/pageoverlay/overlay-large-document-expected.png: Added.
* platform/mac/pageoverlay/overlay-large-document-scrolled-expected.png: Added.
&quot;Normal&quot; pixel dump expectations.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<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="#trunkSourceWebCoreWebCorevcxprojWebCoreTestSupportvcxproj">trunk/Source/WebCore/WebCore.vcxproj/WebCoreTestSupport.vcxproj</a></li>
<li><a href="#trunkSourceWebCoreWebCorevcxprojWebCoreTestSupportvcxprojfilters">trunk/Source/WebCore/WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorepagePageOverlayControllercpp">trunk/Source/WebCore/page/PageOverlayController.cpp</a></li>
<li><a href="#trunkSourceWebCorepagePageOverlayControllerh">trunk/Source/WebCore/page/PageOverlayController.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsGraphicsLayercpp">trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsGraphicsLayerh">trunk/Source/WebCore/platform/graphics/GraphicsLayer.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsGraphicsLayerClienth">trunk/Source/WebCore/platform/graphics/GraphicsLayerClient.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLayerBackingcpp">trunk/Source/WebCore/rendering/RenderLayerBacking.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLayerBackingh">trunk/Source/WebCore/rendering/RenderLayerBacking.h</a></li>
<li><a href="#trunkSourceWebCoretestingInternalscpp">trunk/Source/WebCore/testing/Internals.cpp</a></li>
<li><a href="#trunkSourceWebCoretestingInternalsh">trunk/Source/WebCore/testing/Internals.h</a></li>
<li><a href="#trunkSourceWebCoretestingInternalsidl">trunk/Source/WebCore/testing/Internals.idl</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li>trunk/LayoutTests/pageoverlay/</li>
<li><a href="#trunkLayoutTestspageoverlayoverlayinstallationexpectedtxt">trunk/LayoutTests/pageoverlay/overlay-installation-expected.txt</a></li>
<li><a href="#trunkLayoutTestspageoverlayoverlayinstallationhtml">trunk/LayoutTests/pageoverlay/overlay-installation.html</a></li>
<li><a href="#trunkLayoutTestspageoverlayoverlaylargedocumentexpectedtxt">trunk/LayoutTests/pageoverlay/overlay-large-document-expected.txt</a></li>
<li><a href="#trunkLayoutTestspageoverlayoverlaylargedocumentscrolledexpectedtxt">trunk/LayoutTests/pageoverlay/overlay-large-document-scrolled-expected.txt</a></li>
<li><a href="#trunkLayoutTestspageoverlayoverlaylargedocumentscrolledhtml">trunk/LayoutTests/pageoverlay/overlay-large-document-scrolled.html</a></li>
<li><a href="#trunkLayoutTestspageoverlayoverlaylargedocumenthtml">trunk/LayoutTests/pageoverlay/overlay-large-document.html</a></li>
<li>trunk/LayoutTests/platform/mac/pageoverlay/</li>
<li><a href="#trunkLayoutTestsplatformmacpageoverlayoverlayinstallationexpectedpng">trunk/LayoutTests/platform/mac/pageoverlay/overlay-installation-expected.png</a></li>
<li><a href="#trunkLayoutTestsplatformmacpageoverlayoverlaylargedocumentexpectedpng">trunk/LayoutTests/platform/mac/pageoverlay/overlay-large-document-expected.png</a></li>
<li><a href="#trunkLayoutTestsplatformmacpageoverlayoverlaylargedocumentscrolledexpectedpng">trunk/LayoutTests/platform/mac/pageoverlay/overlay-large-document-scrolled-expected.png</a></li>
<li>trunk/LayoutTests/platform/mac-wk1/pageoverlay/</li>
<li><a href="#trunkLayoutTestsplatformmacwk1pageoverlayoverlayinstallationexpectedpng">trunk/LayoutTests/platform/mac-wk1/pageoverlay/overlay-installation-expected.png</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk1pageoverlayoverlayinstallationexpectedtxt">trunk/LayoutTests/platform/mac-wk1/pageoverlay/overlay-installation-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk1pageoverlayoverlaylargedocumentexpectedpng">trunk/LayoutTests/platform/mac-wk1/pageoverlay/overlay-large-document-expected.png</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk1pageoverlayoverlaylargedocumentexpectedtxt">trunk/LayoutTests/platform/mac-wk1/pageoverlay/overlay-large-document-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk1pageoverlayoverlaylargedocumentscrolledexpectedpng">trunk/LayoutTests/platform/mac-wk1/pageoverlay/overlay-large-document-scrolled-expected.png</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk1pageoverlayoverlaylargedocumentscrolledexpectedtxt">trunk/LayoutTests/platform/mac-wk1/pageoverlay/overlay-large-document-scrolled-expected.txt</a></li>
<li><a href="#trunkSourceWebCoretestingMockPageOverlayClientcpp">trunk/Source/WebCore/testing/MockPageOverlayClient.cpp</a></li>
<li><a href="#trunkSourceWebCoretestingMockPageOverlayClienth">trunk/Source/WebCore/testing/MockPageOverlayClient.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (174314 => 174315)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-10-04 08:37:57 UTC (rev 174314)
+++ trunk/LayoutTests/ChangeLog        2014-10-04 08:47:04 UTC (rev 174315)
</span><span class="lines">@@ -1,3 +1,45 @@
</span><ins>+2014-10-04  Tim Horton  &lt;timothy_horton@apple.com&gt;
+
+        Make it possible to test page overlays
+        https://bugs.webkit.org/show_bug.cgi?id=137339
+
+        Reviewed by Dan Bernstein.
+
+        * pageoverlay/overlay-installation.html: Added.
+        Add a test which just installs one view-relative and one document-relative
+        overlay, and dumps the layer tree and pixel results. The mock overlay
+        strokes a blue rectangle (inset a little from the overlay bounds) for
+        view-relative overlays, and a green rectangle (inset a bit more) for
+        document-relative overlays.
+        
+        * pageoverlay/overlay-large-document.html: Added.
+        * pageoverlay/overlay-large-document-scrolled.html: Added.
+        Tests that do the same as the -installation test, but with a larger document;
+        the view-relative overlay should be the same size (or slightly smaller,
+        because we have scrollbars now), but the document-relative overlay should
+        be the size of the document. The second test scrolls to maxX, maxY, and
+        the document-relative overlay should scroll along with it, while the
+        view-relative overlay should remain fixed.
+
+        * pageoverlay/overlay-installation-expected.txt: Added.
+        * pageoverlay/overlay-large-document-expected.txt: Added.
+        * pageoverlay/overlay-large-document-scrolled-expected.txt: Added.
+        &quot;Normal&quot; layer tree expectations.
+        
+        * platform/mac-wk1/pageoverlay/overlay-installation-expected.png: Added.
+        * platform/mac-wk1/pageoverlay/overlay-installation-expected.txt: Added.
+        * platform/mac-wk1/pageoverlay/overlay-large-document-expected.png: Added.
+        * platform/mac-wk1/pageoverlay/overlay-large-document-expected.txt: Added.
+        * platform/mac-wk1/pageoverlay/overlay-large-document-scrolled-expected.png: Added.
+        * platform/mac-wk1/pageoverlay/overlay-large-document-scrolled-expected.txt: Added.
+        Expected results for WebKit1 differ for view-relative overlays, because
+        we don't currently hook up view-relative overlays for WebKit1.
+
+        * platform/mac/pageoverlay/overlay-installation-expected.png: Added.
+        * platform/mac/pageoverlay/overlay-large-document-expected.png: Added.
+        * platform/mac/pageoverlay/overlay-large-document-scrolled-expected.png: Added.
+        &quot;Normal&quot; pixel dump expectations.
+
</ins><span class="cx"> 2014-10-04  Roger Fong  &lt;roger_fong@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Windows] Skip remaining failing media tests after adding audio devices to the bots.
</span></span></pre></div>
<a id="trunkLayoutTestspageoverlayoverlayinstallationexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/pageoverlay/overlay-installation-expected.txt (0 => 174315)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/pageoverlay/overlay-installation-expected.txt                                (rev 0)
+++ trunk/LayoutTests/pageoverlay/overlay-installation-expected.txt        2014-10-04 08:47:04 UTC (rev 174315)
</span><span class="lines">@@ -0,0 +1,25 @@
</span><ins>+View-relative:
+(GraphicsLayer
+  (children 1
+    (GraphicsLayer
+      (anchor 0.00 0.00)
+      (bounds 800.00 600.00)
+      (drawsContent 1)
+      (backgroundColor #00000000)
+    )
+  )
+)
+
+
+Document-relative:
+(GraphicsLayer
+  (children 1
+    (GraphicsLayer
+      (anchor 0.00 0.00)
+      (bounds 800.00 600.00)
+      (drawsContent 1)
+      (backgroundColor #00000000)
+    )
+  )
+)
+
</ins></span></pre></div>
<a id="trunkLayoutTestspageoverlayoverlayinstallationhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/pageoverlay/overlay-installation.html (0 => 174315)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/pageoverlay/overlay-installation.html                                (rev 0)
+++ trunk/LayoutTests/pageoverlay/overlay-installation.html        2014-10-04 08:47:04 UTC (rev 174315)
</span><span class="lines">@@ -0,0 +1,17 @@
</span><ins>+&lt;html&gt;
+&lt;script&gt;
+window.onload = function () {
+    if (window.testRunner &amp;&amp; window.internals) {
+        testRunner.dumpAsText(true);
+        internals.installMockPageOverlay(&quot;document&quot;);
+        internals.installMockPageOverlay(&quot;view&quot;);
+
+        var layersResult = document.getElementById('layers');
+        layersResult.innerText = window.internals.pageOverlayLayerTreeAsText();
+    }
+}
+&lt;/script&gt;
+&lt;body&gt;
+    &lt;pre id=&quot;layers&quot; style=&quot;position: absolute; height: 1px; width: 1px; overflow: hidden;&quot;&gt;&lt;/pre&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestspageoverlayoverlaylargedocumentexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/pageoverlay/overlay-large-document-expected.txt (0 => 174315)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/pageoverlay/overlay-large-document-expected.txt                                (rev 0)
+++ trunk/LayoutTests/pageoverlay/overlay-large-document-expected.txt        2014-10-04 08:47:04 UTC (rev 174315)
</span><span class="lines">@@ -0,0 +1,25 @@
</span><ins>+View-relative:
+(GraphicsLayer
+  (children 1
+    (GraphicsLayer
+      (anchor 0.00 0.00)
+      (bounds 785.00 585.00)
+      (drawsContent 1)
+      (backgroundColor #00000000)
+    )
+  )
+)
+
+
+Document-relative:
+(GraphicsLayer
+  (children 1
+    (GraphicsLayer
+      (anchor 0.00 0.00)
+      (bounds 5008.00 5016.00)
+      (drawsContent 1)
+      (backgroundColor #00000000)
+    )
+  )
+)
+
</ins></span></pre></div>
<a id="trunkLayoutTestspageoverlayoverlaylargedocumentscrolledexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/pageoverlay/overlay-large-document-scrolled-expected.txt (0 => 174315)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/pageoverlay/overlay-large-document-scrolled-expected.txt                                (rev 0)
+++ trunk/LayoutTests/pageoverlay/overlay-large-document-scrolled-expected.txt        2014-10-04 08:47:04 UTC (rev 174315)
</span><span class="lines">@@ -0,0 +1,25 @@
</span><ins>+View-relative:
+(GraphicsLayer
+  (children 1
+    (GraphicsLayer
+      (anchor 0.00 0.00)
+      (bounds 785.00 585.00)
+      (drawsContent 1)
+      (backgroundColor #00000000)
+    )
+  )
+)
+
+
+Document-relative:
+(GraphicsLayer
+  (children 1
+    (GraphicsLayer
+      (anchor 0.00 0.00)
+      (bounds 5008.00 5016.00)
+      (drawsContent 1)
+      (backgroundColor #00000000)
+    )
+  )
+)
+
</ins></span></pre></div>
<a id="trunkLayoutTestspageoverlayoverlaylargedocumentscrolledhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/pageoverlay/overlay-large-document-scrolled.html (0 => 174315)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/pageoverlay/overlay-large-document-scrolled.html                                (rev 0)
+++ trunk/LayoutTests/pageoverlay/overlay-large-document-scrolled.html        2014-10-04 08:47:04 UTC (rev 174315)
</span><span class="lines">@@ -0,0 +1,25 @@
</span><ins>+&lt;html&gt;
+&lt;style&gt;
+body {
+    height: 5000px;
+    width: 5000px;
+}
+&lt;/style&gt;
+&lt;script&gt;
+window.onload = function () {
+    if (window.testRunner &amp;&amp; window.internals) {
+        testRunner.dumpAsText(true);
+        internals.installMockPageOverlay(&quot;document&quot;);
+        internals.installMockPageOverlay(&quot;view&quot;);
+
+        window.scrollTo(10000, 10000);
+
+        var layersResult = document.getElementById('layers');
+        layersResult.innerText = window.internals.pageOverlayLayerTreeAsText();
+    }
+}
+&lt;/script&gt;
+&lt;body&gt;
+    &lt;pre id=&quot;layers&quot; style=&quot;position: absolute; height: 1px; width: 1px; overflow: hidden;&quot;&gt;&lt;/pre&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestspageoverlayoverlaylargedocumenthtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/pageoverlay/overlay-large-document.html (0 => 174315)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/pageoverlay/overlay-large-document.html                                (rev 0)
+++ trunk/LayoutTests/pageoverlay/overlay-large-document.html        2014-10-04 08:47:04 UTC (rev 174315)
</span><span class="lines">@@ -0,0 +1,23 @@
</span><ins>+&lt;html&gt;
+&lt;style&gt;
+body {
+    height: 5000px;
+    width: 5000px;
+}
+&lt;/style&gt;
+&lt;script&gt;
+window.onload = function () {
+    if (window.testRunner &amp;&amp; window.internals) {
+        testRunner.dumpAsText(true);
+        internals.installMockPageOverlay(&quot;document&quot;);
+        internals.installMockPageOverlay(&quot;view&quot;);
+
+        var layersResult = document.getElementById('layers');
+        layersResult.innerText = window.internals.pageOverlayLayerTreeAsText();
+    }
+}
+&lt;/script&gt;
+&lt;body&gt;
+    &lt;pre id=&quot;layers&quot; style=&quot;position: absolute; height: 1px; width: 1px; overflow: hidden;&quot;&gt;&lt;/pre&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacpageoverlayoverlayinstallationexpectedpng"></a>
<div class="binary"><h4>Added: trunk/LayoutTests/platform/mac/pageoverlay/overlay-installation-expected.png</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<span class="cx">Property changes on: trunk/LayoutTests/platform/mac/pageoverlay/overlay-installation-expected.png
</span><span class="cx">___________________________________________________________________
</span><a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="trunkLayoutTestsplatformmacpageoverlayoverlaylargedocumentexpectedpng"></a>
<div class="binary"><h4>Added: trunk/LayoutTests/platform/mac/pageoverlay/overlay-large-document-expected.png</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<span class="cx">Property changes on: trunk/LayoutTests/platform/mac/pageoverlay/overlay-large-document-expected.png
</span><span class="cx">___________________________________________________________________
</span><a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="trunkLayoutTestsplatformmacpageoverlayoverlaylargedocumentscrolledexpectedpng"></a>
<div class="binary"><h4>Added: trunk/LayoutTests/platform/mac/pageoverlay/overlay-large-document-scrolled-expected.png</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<span class="cx">Property changes on: trunk/LayoutTests/platform/mac/pageoverlay/overlay-large-document-scrolled-expected.png
</span><span class="cx">___________________________________________________________________
</span><a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="trunkLayoutTestsplatformmacwk1pageoverlayoverlayinstallationexpectedpng"></a>
<div class="binary"><h4>Added: trunk/LayoutTests/platform/mac-wk1/pageoverlay/overlay-installation-expected.png</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<span class="cx">Property changes on: trunk/LayoutTests/platform/mac-wk1/pageoverlay/overlay-installation-expected.png
</span><span class="cx">___________________________________________________________________
</span><a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="trunkLayoutTestsplatformmacwk1pageoverlayoverlayinstallationexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-wk1/pageoverlay/overlay-installation-expected.txt (0 => 174315)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk1/pageoverlay/overlay-installation-expected.txt                                (rev 0)
+++ trunk/LayoutTests/platform/mac-wk1/pageoverlay/overlay-installation-expected.txt        2014-10-04 08:47:04 UTC (rev 174315)
</span><span class="lines">@@ -0,0 +1,25 @@
</span><ins>+View-relative:
+(GraphicsLayer
+  (children 1
+    (GraphicsLayer
+      (anchor 0.00 0.00)
+      (bounds 800.00 600.00)
+      (drawsContent 1)
+      (backgroundColor #00000000)
+    )
+  )
+)
+
+
+Document-relative:
+(GraphicsLayer
+  (children 1
+    (GraphicsLayer
+      (anchor 0.00 0.00)
+      (bounds 800.00 600.00)
+      (drawsContent 1)
+      (backgroundColor #00000000)
+    )
+  )
+)
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk1pageoverlayoverlaylargedocumentexpectedpng"></a>
<div class="binary"><h4>Added: trunk/LayoutTests/platform/mac-wk1/pageoverlay/overlay-large-document-expected.png</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<span class="cx">Property changes on: trunk/LayoutTests/platform/mac-wk1/pageoverlay/overlay-large-document-expected.png
</span><span class="cx">___________________________________________________________________
</span><a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="trunkLayoutTestsplatformmacwk1pageoverlayoverlaylargedocumentexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-wk1/pageoverlay/overlay-large-document-expected.txt (0 => 174315)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk1/pageoverlay/overlay-large-document-expected.txt                                (rev 0)
+++ trunk/LayoutTests/platform/mac-wk1/pageoverlay/overlay-large-document-expected.txt        2014-10-04 08:47:04 UTC (rev 174315)
</span><span class="lines">@@ -0,0 +1,25 @@
</span><ins>+View-relative:
+(GraphicsLayer
+  (children 1
+    (GraphicsLayer
+      (anchor 0.00 0.00)
+      (bounds 800.00 600.00)
+      (drawsContent 1)
+      (backgroundColor #00000000)
+    )
+  )
+)
+
+
+Document-relative:
+(GraphicsLayer
+  (children 1
+    (GraphicsLayer
+      (anchor 0.00 0.00)
+      (bounds 5008.00 5016.00)
+      (drawsContent 1)
+      (backgroundColor #00000000)
+    )
+  )
+)
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk1pageoverlayoverlaylargedocumentscrolledexpectedpng"></a>
<div class="binary"><h4>Added: trunk/LayoutTests/platform/mac-wk1/pageoverlay/overlay-large-document-scrolled-expected.png</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<span class="cx">Property changes on: trunk/LayoutTests/platform/mac-wk1/pageoverlay/overlay-large-document-scrolled-expected.png
</span><span class="cx">___________________________________________________________________
</span><a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="trunkLayoutTestsplatformmacwk1pageoverlayoverlaylargedocumentscrolledexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-wk1/pageoverlay/overlay-large-document-scrolled-expected.txt (0 => 174315)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk1/pageoverlay/overlay-large-document-scrolled-expected.txt                                (rev 0)
+++ trunk/LayoutTests/platform/mac-wk1/pageoverlay/overlay-large-document-scrolled-expected.txt        2014-10-04 08:47:04 UTC (rev 174315)
</span><span class="lines">@@ -0,0 +1,25 @@
</span><ins>+View-relative:
+(GraphicsLayer
+  (children 1
+    (GraphicsLayer
+      (anchor 0.00 0.00)
+      (bounds 800.00 600.00)
+      (drawsContent 1)
+      (backgroundColor #00000000)
+    )
+  )
+)
+
+
+Document-relative:
+(GraphicsLayer
+  (children 1
+    (GraphicsLayer
+      (anchor 0.00 0.00)
+      (bounds 5008.00 5016.00)
+      (drawsContent 1)
+      (backgroundColor #00000000)
+    )
+  )
+)
+
</ins></span></pre></div>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (174314 => 174315)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2014-10-04 08:37:57 UTC (rev 174314)
+++ trunk/Source/WebCore/CMakeLists.txt        2014-10-04 08:47:04 UTC (rev 174315)
</span><span class="lines">@@ -3170,6 +3170,8 @@
</span><span class="cx">     testing/InternalSettings.cpp
</span><span class="cx">     testing/Internals.cpp
</span><span class="cx"> 
</span><ins>+    testing/MockPageOverlayClient.cpp
+
</ins><span class="cx">     testing/js/WebCoreTestSupport.cpp
</span><span class="cx"> )
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (174314 => 174315)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-10-04 08:37:57 UTC (rev 174314)
+++ trunk/Source/WebCore/ChangeLog        2014-10-04 08:47:04 UTC (rev 174315)
</span><span class="lines">@@ -1,3 +1,81 @@
</span><ins>+2014-10-04  Tim Horton  &lt;timothy_horton@apple.com&gt;
+
+        Make it possible to test page overlays
+        https://bugs.webkit.org/show_bug.cgi?id=137339
+
+        Reviewed by Dan Bernstein.
+
+        Tests: pageoverlay/overlay-installation.html
+               pageoverlay/overlay-large-document-scrolled.html
+               pageoverlay/overlay-large-document.html
+
+        Do some initial work to make page overlays testable.
+        There are many more tests to be written, but this lays the groundwork.
+
+        * WebCore.exp.in:
+        * WebCore.xcodeproj/project.pbxproj:
+        * WebCore.vcxproj/WebCoreTestSupport.vcxproj:
+        * WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters:
+        * CMakeLists.txt:
+        Add MockPageOverlayClient.
+
+        * platform/graphics/GraphicsLayer.h:
+        * page/PageOverlayController.h:
+        * page/PageOverlayController.cpp:
+        (WebCore::PageOverlayController::shouldSkipLayerInDump):
+        Don't skip PageOverlayController-owned layers in the layer tree dump if the
+        layerTreeAsText behavior says that we should include them.
+
+        * platform/graphics/GraphicsLayer.cpp:
+        (WebCore::dumpChildren):
+        
+        * platform/graphics/GraphicsLayerClient.h:
+        (WebCore::GraphicsLayerClient::shouldSkipLayerInDump):
+        * rendering/RenderLayerBacking.cpp:
+        (WebCore::RenderLayerBacking::shouldSkipLayerInDump):
+        * rendering/RenderLayerBacking.h:
+        Pass the LayerTreeAsTextBehavior through shouldSkipLayerInDump.
+
+        * testing/Internals.cpp:
+        (WebCore::Internals::resetToConsistentState):
+        Uninstall all page overlays when resetting to a consistent state.
+
+        (WebCore::Internals::installMockPageOverlay):
+        (WebCore::Internals::pageOverlayLayerTreeAsText):
+        Expose two new internals functions.
+        installMockPageOverlay takes &quot;view&quot; or &quot;document&quot;, allowing script
+        to choose the appropriate overlay type.
+        pageOverlayLayerTreeAsText dumps both view and document-relative
+        overlays, from each overlay container layer.
+
+        * testing/Internals.h:
+        * testing/Internals.idl:
+        Fix some typos.
+
+        * testing/MockPageOverlayClient.cpp: Added.
+        (WebCore::MockPageOverlayClient::shared):
+        (WebCore::MockPageOverlayClient::MockPageOverlayClient):
+        (WebCore::MockPageOverlayClient::installOverlay):
+        (WebCore::MockPageOverlayClient::uninstallAllOverlays):
+        (WebCore::MockPageOverlayClient::layerTreeAsText):
+        (WebCore::MockPageOverlayClient::pageOverlayDestroyed):
+        (WebCore::MockPageOverlayClient::willMoveToPage):
+        (WebCore::MockPageOverlayClient::didMoveToPage):
+        When the overlay is parented, mark it as needing repaint.
+        Future tests might want to test overlays without content,
+        but for now this is a reasonable default behavior.
+
+        (WebCore::MockPageOverlayClient::drawRect):
+        Paint the overlay rects as described in the LayoutTests ChangeLog.
+
+        (WebCore::MockPageOverlayClient::mouseEvent):
+        (WebCore::MockPageOverlayClient::didScrollFrame):
+        (WebCore::MockPageOverlayClient::copyAccessibilityAttributeStringValueForPoint):
+        (WebCore::MockPageOverlayClient::copyAccessibilityAttributeBoolValueForPoint):
+        (WebCore::MockPageOverlayClient::copyAccessibilityAttributeNames):
+
+        * testing/MockPageOverlayClient.h: Added.
+
</ins><span class="cx"> 2014-10-04  Carlos Garcia Campos  &lt;cgarcia@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Move DragController::createFragmentFromDragData implementation to the editor
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCoreexpin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.exp.in (174314 => 174315)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.exp.in        2014-10-04 08:37:57 UTC (rev 174314)
+++ trunk/Source/WebCore/WebCore.exp.in        2014-10-04 08:47:04 UTC (rev 174315)
</span><span class="lines">@@ -919,6 +919,7 @@
</span><span class="cx"> __ZN7WebCore21PageOverlayController18installPageOverlayEN3WTF10PassRefPtrINS_11PageOverlayEEENS3_8FadeModeE
</span><span class="cx"> __ZN7WebCore21PageOverlayController20uninstallPageOverlayEPNS_11PageOverlayENS1_8FadeModeE
</span><span class="cx"> __ZN7WebCore21PageOverlayController20viewOverlayRootLayerEv
</span><ins>+__ZN7WebCore21PageOverlayController24documentOverlayRootLayerEv
</ins><span class="cx"> __ZN7WebCore21PageOverlayController32copyAccessibilityAttributesNamesEb
</span><span class="cx"> __ZN7WebCore21PageOverlayController43copyAccessibilityAttributeBoolValueForPointEN3WTF6StringENS_10FloatPointERb
</span><span class="cx"> __ZN7WebCore21PageOverlayController45copyAccessibilityAttributeStringValueForPointEN3WTF6StringENS_10FloatPointERS2_
</span><span class="lines">@@ -1065,6 +1066,7 @@
</span><span class="cx"> __ZN7WebCore28UserMessageHandlerDescriptorD1Ev
</span><span class="cx"> __ZN7WebCore28encodeWithURLEscapeSequencesERKN3WTF6StringE
</span><span class="cx"> __ZN7WebCore28removeLanguageChangeObserverEPv
</span><ins>+__ZN7WebCore28throwArgumentMustBeEnumErrorERN3JSC9ExecStateEjPKcS4_S4_S4_
</ins><span class="cx"> __ZN7WebCore29cookieRequestHeaderFieldValueERKNS_21NetworkStorageSessionERKNS_3URLES5_
</span><span class="cx"> __ZN7WebCore29createDefaultParagraphElementERNS_8DocumentE
</span><span class="cx"> __ZN7WebCore29isCharacterSmartReplaceExemptEib
</span><span class="lines">@@ -1616,6 +1618,7 @@
</span><span class="cx"> __ZNK7WebCore11HistoryItem8referrerEv
</span><span class="cx"> __ZNK7WebCore11HistoryItem9urlStringEv
</span><span class="cx"> __ZNK7WebCore11HistoryItem9viewStateEv
</span><ins>+__ZNK7WebCore11PageOverlay10controllerEv
</ins><span class="cx"> __ZNK7WebCore11PageOverlay5frameEv
</span><span class="cx"> __ZNK7WebCore11PageOverlay6boundsEv
</span><span class="cx"> __ZNK7WebCore11RenderBlock25inlineElementContinuationEv
</span><span class="lines">@@ -1642,6 +1645,7 @@
</span><span class="cx"> __ZNK7WebCore12TextIterator4nodeEv
</span><span class="cx"> __ZNK7WebCore12TextIterator5rangeEv
</span><span class="cx"> __ZNK7WebCore13ContainerNode15countChildNodesEv
</span><ins>+__ZNK7WebCore13GraphicsLayer15layerTreeAsTextEj
</ins><span class="cx"> __ZNK7WebCore13GraphicsLayer18accumulatedOpacityEv
</span><span class="cx"> __ZNK7WebCore13GraphicsLayer18getDebugBorderInfoERNS_5ColorERf
</span><span class="cx"> __ZNK7WebCore13GraphicsLayer26backingStoreMemoryEstimateEv
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCoreTestSupportvcxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCoreTestSupport.vcxproj (174314 => 174315)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCoreTestSupport.vcxproj        2014-10-04 08:37:57 UTC (rev 174314)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCoreTestSupport.vcxproj        2014-10-04 08:47:04 UTC (rev 174315)
</span><span class="lines">@@ -706,6 +706,68 @@
</span><span class="cx">       &lt;ForcedIncludeFiles Condition=&quot;'$(Configuration)|$(Platform)'=='Production|x64'&quot;&gt;
</span><span class="cx">       &lt;/ForcedIncludeFiles&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><ins>+    &lt;ClCompile Include=&quot;..\testing\MockPageOverlayClient.cpp&quot;&gt;
+      &lt;PrecompiledHeader Condition=&quot;'$(Configuration)|$(Platform)'=='Debug|Win32'&quot;&gt;
+      &lt;/PrecompiledHeader&gt;
+      &lt;PrecompiledHeader Condition=&quot;'$(Configuration)|$(Platform)'=='Debug|x64'&quot;&gt;
+      &lt;/PrecompiledHeader&gt;
+      &lt;PrecompiledHeader Condition=&quot;'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'&quot;&gt;
+      &lt;/PrecompiledHeader&gt;
+      &lt;PrecompiledHeader Condition=&quot;'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'&quot;&gt;
+      &lt;/PrecompiledHeader&gt;
+      &lt;PrecompiledHeader Condition=&quot;'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'&quot;&gt;
+      &lt;/PrecompiledHeader&gt;
+      &lt;PrecompiledHeader Condition=&quot;'$(Configuration)|$(Platform)'=='DebugSuffix|x64'&quot;&gt;
+      &lt;/PrecompiledHeader&gt;
+      &lt;DisableSpecificWarnings Condition=&quot;'$(Configuration)|$(Platform)'=='Debug|Win32'&quot;&gt;4065;4273;4565;4701;4702;%(DisableSpecificWarnings)&lt;/DisableSpecificWarnings&gt;
+      &lt;DisableSpecificWarnings Condition=&quot;'$(Configuration)|$(Platform)'=='Debug|x64'&quot;&gt;4065;4273;4565;4701;4702;%(DisableSpecificWarnings)&lt;/DisableSpecificWarnings&gt;
+      &lt;DisableSpecificWarnings Condition=&quot;'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'&quot;&gt;4065;4273;4565;4701;4702;%(DisableSpecificWarnings)&lt;/DisableSpecificWarnings&gt;
+      &lt;DisableSpecificWarnings Condition=&quot;'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'&quot;&gt;4065;4273;4565;4701;4702;%(DisableSpecificWarnings)&lt;/DisableSpecificWarnings&gt;
+      &lt;DisableSpecificWarnings Condition=&quot;'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'&quot;&gt;4065;4273;4565;4701;4702;%(DisableSpecificWarnings)&lt;/DisableSpecificWarnings&gt;
+      &lt;DisableSpecificWarnings Condition=&quot;'$(Configuration)|$(Platform)'=='DebugSuffix|x64'&quot;&gt;4065;4273;4565;4701;4702;%(DisableSpecificWarnings)&lt;/DisableSpecificWarnings&gt;
+      &lt;ForcedIncludeFiles Condition=&quot;'$(Configuration)|$(Platform)'=='Debug|Win32'&quot;&gt;
+      &lt;/ForcedIncludeFiles&gt;
+      &lt;ForcedIncludeFiles Condition=&quot;'$(Configuration)|$(Platform)'=='Debug|x64'&quot;&gt;
+      &lt;/ForcedIncludeFiles&gt;
+      &lt;ForcedIncludeFiles Condition=&quot;'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'&quot;&gt;
+      &lt;/ForcedIncludeFiles&gt;
+      &lt;ForcedIncludeFiles Condition=&quot;'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'&quot;&gt;
+      &lt;/ForcedIncludeFiles&gt;
+      &lt;ForcedIncludeFiles Condition=&quot;'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'&quot;&gt;
+      &lt;/ForcedIncludeFiles&gt;
+      &lt;ForcedIncludeFiles Condition=&quot;'$(Configuration)|$(Platform)'=='DebugSuffix|x64'&quot;&gt;
+      &lt;/ForcedIncludeFiles&gt;
+      &lt;PrecompiledHeader Condition=&quot;'$(Configuration)|$(Platform)'=='Release|Win32'&quot;&gt;
+      &lt;/PrecompiledHeader&gt;
+      &lt;PrecompiledHeader Condition=&quot;'$(Configuration)|$(Platform)'=='Release|x64'&quot;&gt;
+      &lt;/PrecompiledHeader&gt;
+      &lt;PrecompiledHeader Condition=&quot;'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'&quot;&gt;
+      &lt;/PrecompiledHeader&gt;
+      &lt;PrecompiledHeader Condition=&quot;'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'&quot;&gt;
+      &lt;/PrecompiledHeader&gt;
+      &lt;PrecompiledHeader Condition=&quot;'$(Configuration)|$(Platform)'=='Production|Win32'&quot;&gt;
+      &lt;/PrecompiledHeader&gt;
+      &lt;PrecompiledHeader Condition=&quot;'$(Configuration)|$(Platform)'=='Production|x64'&quot;&gt;
+      &lt;/PrecompiledHeader&gt;
+      &lt;DisableSpecificWarnings Condition=&quot;'$(Configuration)|$(Platform)'=='Release|Win32'&quot;&gt;4065;4273;4565;4701;4702;%(DisableSpecificWarnings)&lt;/DisableSpecificWarnings&gt;
+      &lt;DisableSpecificWarnings Condition=&quot;'$(Configuration)|$(Platform)'=='Release|x64'&quot;&gt;4065;4273;4565;4701;4702;%(DisableSpecificWarnings)&lt;/DisableSpecificWarnings&gt;
+      &lt;DisableSpecificWarnings Condition=&quot;'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'&quot;&gt;4065;4273;4565;4701;4702;%(DisableSpecificWarnings)&lt;/DisableSpecificWarnings&gt;
+      &lt;DisableSpecificWarnings Condition=&quot;'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'&quot;&gt;4065;4273;4565;4701;4702;%(DisableSpecificWarnings)&lt;/DisableSpecificWarnings&gt;
+      &lt;DisableSpecificWarnings Condition=&quot;'$(Configuration)|$(Platform)'=='Production|Win32'&quot;&gt;4065;4273;4565;4701;4702;%(DisableSpecificWarnings)&lt;/DisableSpecificWarnings&gt;
+      &lt;DisableSpecificWarnings Condition=&quot;'$(Configuration)|$(Platform)'=='Production|x64'&quot;&gt;4065;4273;4565;4701;4702;%(DisableSpecificWarnings)&lt;/DisableSpecificWarnings&gt;
+      &lt;ForcedIncludeFiles Condition=&quot;'$(Configuration)|$(Platform)'=='Release|Win32'&quot;&gt;
+      &lt;/ForcedIncludeFiles&gt;
+      &lt;ForcedIncludeFiles Condition=&quot;'$(Configuration)|$(Platform)'=='Release|x64'&quot;&gt;
+      &lt;/ForcedIncludeFiles&gt;
+      &lt;ForcedIncludeFiles Condition=&quot;'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'&quot;&gt;
+      &lt;/ForcedIncludeFiles&gt;
+      &lt;ForcedIncludeFiles Condition=&quot;'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'&quot;&gt;
+      &lt;/ForcedIncludeFiles&gt;
+      &lt;ForcedIncludeFiles Condition=&quot;'$(Configuration)|$(Platform)'=='Production|Win32'&quot;&gt;
+      &lt;/ForcedIncludeFiles&gt;
+      &lt;ForcedIncludeFiles Condition=&quot;'$(Configuration)|$(Platform)'=='Production|x64'&quot;&gt;
+      &lt;/ForcedIncludeFiles&gt;
+    &lt;/ClCompile&gt;
</ins><span class="cx">     &lt;ClCompile Include=&quot;..\testing\InternalSettings.cpp&quot;&gt;
</span><span class="cx">       &lt;PrecompiledHeader Condition=&quot;'$(Configuration)|$(Platform)'=='Debug|Win32'&quot;&gt;
</span><span class="cx">       &lt;/PrecompiledHeader&gt;
</span><span class="lines">@@ -856,6 +918,7 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\testing\MallocStatistics.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\testing\MemoryInfo.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\testing\MockCDM.h&quot; /&gt;
</span><ins>+    &lt;ClInclude Include=&quot;..\testing\MockPageOverlayClient.h&quot; /&gt;
</ins><span class="cx">     &lt;ClInclude Include=&quot;..\testing\TypeConversions.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\testing\Internals.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\testing\InternalSettings.h&quot; /&gt;
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCoreTestSupportvcxprojfilters"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters (174314 => 174315)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters        2014-10-04 08:37:57 UTC (rev 174314)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters        2014-10-04 08:47:04 UTC (rev 174315)
</span><span class="lines">@@ -42,6 +42,9 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;..\testing\MockCDM.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;testing&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><ins>+    &lt;ClCompile Include=&quot;..\testing\MockPageOverlayClient.cpp&quot;&gt;
+      &lt;Filter&gt;testing&lt;/Filter&gt;
+    &lt;/ClCompile&gt;
</ins><span class="cx">   &lt;/ItemGroup&gt;
</span><span class="cx">   &lt;ItemGroup&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\InternalSettingsGenerated.h&quot;&gt;
</span><span class="lines">@@ -87,5 +90,8 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\testing\MockCDM.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;testing&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClInclude&gt;
</span><ins>+    &lt;ClInclude Include=&quot;..\testing\MockPageOverlayClient.h&quot;&gt;
+      &lt;Filter&gt;testing&lt;/Filter&gt;
+    &lt;/ClInclude&gt;
</ins><span class="cx">   &lt;/ItemGroup&gt;
</span><span class="cx"> &lt;/Project&gt;
</span><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (174314 => 174315)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-10-04 08:37:57 UTC (rev 174314)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-10-04 08:47:04 UTC (rev 174315)
</span><span class="lines">@@ -1106,6 +1106,8 @@
</span><span class="cx">                 2D8FEBDD143E3EF70072502B /* CSSCrossfadeValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D8FEBDB143E3EF70072502B /* CSSCrossfadeValue.h */; };
</span><span class="cx">                 2D9066060BE141D400956998 /* LayoutState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D9066040BE141D400956998 /* LayoutState.cpp */; };
</span><span class="cx">                 2D9066070BE141D400956998 /* LayoutState.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D9066050BE141D400956998 /* LayoutState.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><ins>+                2D97F04719DD413C001EE9C3 /* MockPageOverlayClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2DAAE32C19DCAF6000E002D2 /* MockPageOverlayClient.cpp */; };
+                2D97F04819DD4140001EE9C3 /* MockPageOverlayClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DAAE32D19DCAF6000E002D2 /* MockPageOverlayClient.h */; };
</ins><span class="cx">                 2D9A246E15B9BD0000D34527 /* DOMSecurityPolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D9A246B15B9BBDD00D34527 /* DOMSecurityPolicy.h */; };
</span><span class="cx">                 2D9A246F15B9BD2F00D34527 /* DOMSecurityPolicy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D9A246A15B9BBDD00D34527 /* DOMSecurityPolicy.cpp */; };
</span><span class="cx">                 2D9A247315B9C2D100D34527 /* DOMDOMSecurityPolicy.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2D9A247215B9C2C700D34527 /* DOMDOMSecurityPolicy.mm */; };
</span><span class="lines">@@ -8110,6 +8112,8 @@
</span><span class="cx">                 2D9A247115B9C29500D34527 /* DOMDOMSecurityPolicyInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMDOMSecurityPolicyInternal.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 2D9A247215B9C2C700D34527 /* DOMDOMSecurityPolicy.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMDOMSecurityPolicy.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 2D9F0E1214FF1CBF00BA0FF7 /* linearSRGB.icc */ = {isa = PBXFileReference; lastKnownFileType = file; path = linearSRGB.icc; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                2DAAE32C19DCAF6000E002D2 /* MockPageOverlayClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MockPageOverlayClient.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                2DAAE32D19DCAF6000E002D2 /* MockPageOverlayClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MockPageOverlayClient.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 2DE70022192FE82A00B0975C /* DisplayRefreshMonitorMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DisplayRefreshMonitorMac.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 2E0888C3114883A900AF4265 /* DOMFormData.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DOMFormData.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 2E0888D21148848A00AF4265 /* JSDOMFormData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMFormData.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -15591,6 +15595,8 @@
</span><span class="cx">                                 CD5393CC175DCCE600C07123 /* MemoryInfo.idl */,
</span><span class="cx">                                 CDC26B3C160A62B00026757B /* MockCDM.cpp */,
</span><span class="cx">                                 CDC26B3D160A62B00026757B /* MockCDM.h */,
</span><ins>+                                2DAAE32C19DCAF6000E002D2 /* MockPageOverlayClient.cpp */,
+                                2DAAE32D19DCAF6000E002D2 /* MockPageOverlayClient.h */,
</ins><span class="cx">                                 EB081CD81696084400553730 /* TypeConversions.h */,
</span><span class="cx">                                 EB081CD91696084400553730 /* TypeConversions.idl */,
</span><span class="cx">                                 E1BA67191742BEF400C20251 /* WebCoreTestShimLibrary.cpp */,
</span><span class="lines">@@ -23249,6 +23255,7 @@
</span><span class="cx">                                 EBF5121D1696496C0056BD25 /* JSTypeConversions.h in Headers */,
</span><span class="cx">                                 CDC26B41160A8CCE0026757B /* MockCDM.h in Headers */,
</span><span class="cx">                                 AA5F3B8D16CC33D100455EB0 /* PlatformSpeechSynthesizerMock.h in Headers */,
</span><ins>+                                2D97F04819DD4140001EE9C3 /* MockPageOverlayClient.h in Headers */,
</ins><span class="cx">                                 41815C1F138319830057AAA4 /* WebCoreTestSupport.h in Headers */,
</span><span class="cx">                         );
</span><span class="cx">                         runOnlyForDeploymentPostprocessing = 0;
</span><span class="lines">@@ -26998,6 +27005,7 @@
</span><span class="cx">                                 A740B5A714C935AF00A77FA4 /* JSInternalSettings.cpp in Sources */,
</span><span class="cx">                                 53ED3FDE167A88E7006762E6 /* JSInternalSettingsGenerated.cpp in Sources */,
</span><span class="cx">                                 A740B59714C935AF00A77FA4 /* JSMallocStatistics.cpp in Sources */,
</span><ins>+                                2D97F04719DD413C001EE9C3 /* MockPageOverlayClient.cpp in Sources */,
</ins><span class="cx">                                 CD5393D3175E018600C07123 /* JSMemoryInfo.cpp in Sources */,
</span><span class="cx">                                 EBF5121C1696496C0056BD25 /* JSTypeConversions.cpp in Sources */,
</span><span class="cx">                                 CDC26B40160A8CC60026757B /* MockCDM.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCorepagePageOverlayControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/PageOverlayController.cpp (174314 => 174315)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PageOverlayController.cpp        2014-10-04 08:37:57 UTC (rev 174314)
+++ trunk/Source/WebCore/page/PageOverlayController.cpp        2014-10-04 08:47:04 UTC (rev 174315)
</span><span class="lines">@@ -358,4 +358,9 @@
</span><span class="cx">     m_overlayGraphicsLayers.get(&amp;overlay)-&gt;setBackgroundColor(overlay.backgroundColor());
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool PageOverlayController::shouldSkipLayerInDump(const GraphicsLayer*, LayerTreeAsTextBehavior behavior) const
+{
+    return !(behavior &amp; LayerTreeAsTextIncludePageOverlayLayers);
+}
+
</ins><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebCorepagePageOverlayControllerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/PageOverlayController.h (174314 => 174315)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PageOverlayController.h        2014-10-04 08:37:57 UTC (rev 174314)
+++ trunk/Source/WebCore/page/PageOverlayController.h        2014-10-04 08:47:04 UTC (rev 174315)
</span><span class="lines">@@ -87,7 +87,7 @@
</span><span class="cx">     virtual void notifyFlushRequired(const GraphicsLayer*) override;
</span><span class="cx">     virtual void paintContents(const GraphicsLayer*, GraphicsContext&amp;, GraphicsLayerPaintingPhase, const FloatRect&amp; clipRect) override;
</span><span class="cx">     virtual float deviceScaleFactor() const override;
</span><del>-    virtual bool shouldSkipLayerInDump(const GraphicsLayer*) const override { return true; }
</del><ins>+    virtual bool shouldSkipLayerInDump(const GraphicsLayer*, LayerTreeAsTextBehavior) const override;
</ins><span class="cx"> 
</span><span class="cx">     std::unique_ptr&lt;GraphicsLayer&gt; m_documentOverlayRootLayer;
</span><span class="cx">     std::unique_ptr&lt;GraphicsLayer&gt; m_viewOverlayRootLayer;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsGraphicsLayercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp (174314 => 174315)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp        2014-10-04 08:37:57 UTC (rev 174314)
+++ trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp        2014-10-04 08:47:04 UTC (rev 174315)
</span><span class="lines">@@ -605,7 +605,7 @@
</span><span class="cx"> {
</span><span class="cx">     totalChildCount += children.size();
</span><span class="cx">     for (auto* child : children) {
</span><del>-        if (!child-&gt;client().shouldSkipLayerInDump(child)) {
</del><ins>+        if (!child-&gt;client().shouldSkipLayerInDump(child, behavior)) {
</ins><span class="cx">             child-&gt;dumpLayer(ts, indent + 2, behavior);
</span><span class="cx">             continue;
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsGraphicsLayerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/GraphicsLayer.h (174314 => 174315)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/GraphicsLayer.h        2014-10-04 08:37:57 UTC (rev 174314)
+++ trunk/Source/WebCore/platform/graphics/GraphicsLayer.h        2014-10-04 08:47:04 UTC (rev 174315)
</span><span class="lines">@@ -46,17 +46,6 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-enum LayerTreeAsTextBehaviorFlags {
-    LayerTreeAsTextBehaviorNormal = 0,
-    LayerTreeAsTextDebug = 1 &lt;&lt; 0, // Dump extra debugging info like layer addresses.
-    LayerTreeAsTextIncludeVisibleRects = 1 &lt;&lt; 1,
-    LayerTreeAsTextIncludeTileCaches = 1 &lt;&lt; 2,
-    LayerTreeAsTextIncludeRepaintRects = 1 &lt;&lt; 3,
-    LayerTreeAsTextIncludePaintingPhases = 1 &lt;&lt; 4,
-    LayerTreeAsTextIncludeContentLayers = 1 &lt;&lt; 5
-};
-typedef unsigned LayerTreeAsTextBehavior;
-
</del><span class="cx"> class GraphicsContext;
</span><span class="cx"> class GraphicsLayerFactory;
</span><span class="cx"> class Image;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsGraphicsLayerClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/GraphicsLayerClient.h (174314 => 174315)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/GraphicsLayerClient.h        2014-10-04 08:37:57 UTC (rev 174314)
+++ trunk/Source/WebCore/platform/graphics/GraphicsLayerClient.h        2014-10-04 08:47:04 UTC (rev 174315)
</span><span class="lines">@@ -56,6 +56,18 @@
</span><span class="cx">     AnimatedPropertyWebkitFilter
</span><span class="cx"> };
</span><span class="cx"> 
</span><ins>+enum LayerTreeAsTextBehaviorFlags {
+    LayerTreeAsTextBehaviorNormal = 0,
+    LayerTreeAsTextDebug = 1 &lt;&lt; 0, // Dump extra debugging info like layer addresses.
+    LayerTreeAsTextIncludeVisibleRects = 1 &lt;&lt; 1,
+    LayerTreeAsTextIncludeTileCaches = 1 &lt;&lt; 2,
+    LayerTreeAsTextIncludeRepaintRects = 1 &lt;&lt; 3,
+    LayerTreeAsTextIncludePaintingPhases = 1 &lt;&lt; 4,
+    LayerTreeAsTextIncludeContentLayers = 1 &lt;&lt; 5,
+    LayerTreeAsTextIncludePageOverlayLayers = 1 &lt;&lt; 6,
+};
+typedef unsigned LayerTreeAsTextBehavior;
+
</ins><span class="cx"> class GraphicsLayerClient {
</span><span class="cx"> public:
</span><span class="cx">     virtual ~GraphicsLayerClient() {}
</span><span class="lines">@@ -96,7 +108,7 @@
</span><span class="cx"> 
</span><span class="cx">     virtual bool isTrackingRepaints() const { return false; }
</span><span class="cx"> 
</span><del>-    virtual bool shouldSkipLayerInDump(const GraphicsLayer*) const { return false; }
</del><ins>+    virtual bool shouldSkipLayerInDump(const GraphicsLayer*, LayerTreeAsTextBehavior) const { return false; }
</ins><span class="cx">     virtual bool shouldDumpPropertyForLayer(const GraphicsLayer*, const char*) const { return true; }
</span><span class="cx"> 
</span><span class="cx">     virtual bool shouldAggressivelyRetainTiles(const GraphicsLayer*) const { return false; }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayerBackingcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (174314 => 174315)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp        2014-10-04 08:37:57 UTC (rev 174314)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.cpp        2014-10-04 08:47:04 UTC (rev 174315)
</span><span class="lines">@@ -2265,7 +2265,7 @@
</span><span class="cx">     return static_cast&lt;GraphicsLayerClient&amp;&gt;(compositor()).isTrackingRepaints();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool RenderLayerBacking::shouldSkipLayerInDump(const GraphicsLayer* layer) const
</del><ins>+bool RenderLayerBacking::shouldSkipLayerInDump(const GraphicsLayer* layer, LayerTreeAsTextBehavior) const
</ins><span class="cx"> {
</span><span class="cx">     // Skip the root tile cache's flattening layer.
</span><span class="cx">     return m_isMainFrameRenderViewLayer &amp;&amp; layer &amp;&amp; layer == m_childContainmentLayer.get();
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayerBackingh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.h (174314 => 174315)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayerBacking.h        2014-10-04 08:37:57 UTC (rev 174314)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.h        2014-10-04 08:47:04 UTC (rev 174315)
</span><span class="lines">@@ -211,7 +211,7 @@
</span><span class="cx">     virtual bool getCurrentTransform(const GraphicsLayer*, TransformationMatrix&amp;) const override;
</span><span class="cx"> 
</span><span class="cx">     virtual bool isTrackingRepaints() const override;
</span><del>-    virtual bool shouldSkipLayerInDump(const GraphicsLayer*) const override;
</del><ins>+    virtual bool shouldSkipLayerInDump(const GraphicsLayer*, LayerTreeAsTextBehavior) const override;
</ins><span class="cx">     virtual bool shouldDumpPropertyForLayer(const GraphicsLayer*, const char* propertyName) const override;
</span><span class="cx"> 
</span><span class="cx">     virtual bool shouldAggressivelyRetainTiles(const GraphicsLayer*) const override;
</span></span></pre></div>
<a id="trunkSourceWebCoretestingInternalscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/Internals.cpp (174314 => 174315)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/Internals.cpp        2014-10-04 08:37:57 UTC (rev 174314)
+++ trunk/Source/WebCore/testing/Internals.cpp        2014-10-04 08:47:04 UTC (rev 174315)
</span><span class="lines">@@ -75,7 +75,9 @@
</span><span class="cx"> #include &quot;MediaSessionManager.h&quot;
</span><span class="cx"> #include &quot;MemoryCache.h&quot;
</span><span class="cx"> #include &quot;MemoryInfo.h&quot;
</span><ins>+#include &quot;MockPageOverlayClient.h&quot;
</ins><span class="cx"> #include &quot;Page.h&quot;
</span><ins>+#include &quot;PageOverlay.h&quot;
</ins><span class="cx"> #include &quot;PrintContext.h&quot;
</span><span class="cx"> #include &quot;PseudoElement.h&quot;
</span><span class="cx"> #include &quot;Range.h&quot;
</span><span class="lines">@@ -300,6 +302,8 @@
</span><span class="cx">     AXObjectCache::setEnhancedUserInterfaceAccessibility(false);
</span><span class="cx">     AXObjectCache::disableAccessibility();
</span><span class="cx"> #endif
</span><ins>+
+    MockPageOverlayClient::shared().uninstallAllOverlays();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> Internals::Internals(Document* document)
</span><span class="lines">@@ -2356,4 +2360,28 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void Internals::installMockPageOverlay(const String&amp; overlayType, ExceptionCode&amp; ec)
+{
+    Document* document = contextDocument();
+    if (!document || !document-&gt;frame()) {
+        ec = INVALID_ACCESS_ERR;
+        return;
+    }
+
+    MockPageOverlayClient::shared().installOverlay(document-&gt;frame()-&gt;mainFrame(), overlayType == &quot;view&quot; ? PageOverlay::OverlayType::View : PageOverlay::OverlayType::Document);
</ins><span class="cx"> }
</span><ins>+
+String Internals::pageOverlayLayerTreeAsText(ExceptionCode&amp; ec) const
+{
+    Document* document = contextDocument();
+    if (!document || !document-&gt;frame()) {
+        ec = INVALID_ACCESS_ERR;
+        return String();
+    }
+
+    document-&gt;updateLayout();
+
+    return MockPageOverlayClient::shared().layerTreeAsText(document-&gt;frame()-&gt;mainFrame());
+}
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoretestingInternalsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/Internals.h (174314 => 174315)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/Internals.h        2014-10-04 08:37:57 UTC (rev 174314)
+++ trunk/Source/WebCore/testing/Internals.h        2014-10-04 08:47:04 UTC (rev 174315)
</span><span class="lines">@@ -342,6 +342,9 @@
</span><span class="cx">     void simulateSystemSleep() const;
</span><span class="cx">     void simulateSystemWake() const;
</span><span class="cx"> 
</span><ins>+    void installMockPageOverlay(const String&amp; overlayType, ExceptionCode&amp;);
+    String pageOverlayLayerTreeAsText(ExceptionCode&amp;) const;
+
</ins><span class="cx"> private:
</span><span class="cx">     explicit Internals(Document*);
</span><span class="cx">     Document* contextDocument() const;
</span></span></pre></div>
<a id="trunkSourceWebCoretestingInternalsidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/Internals.idl (174314 => 174315)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/Internals.idl        2014-10-04 08:37:57 UTC (rev 174314)
+++ trunk/Source/WebCore/testing/Internals.idl        2014-10-04 08:47:04 UTC (rev 174315)
</span><span class="lines">@@ -185,7 +185,7 @@
</span><span class="cx"> 
</span><span class="cx">     // As per spec: http://www.w3.org/TR/WebIDL/#idl-sequence
</span><span class="cx">     // &quot;Sequences must not be used as the type of an attribute, constant or exception field.&quot;
</span><del>-    // FIXME: this will lead to BUG interals.consoleProfiles !== interals.consoleProfiles as profile will always returns new array.
</del><ins>+    // FIXME: this will lead to BUG internals.consoleProfiles !== internals.consoleProfiles as profile will always returns new array.
</ins><span class="cx">     readonly attribute ScriptProfile[] consoleProfiles;
</span><span class="cx"> 
</span><span class="cx">     unsigned long numberOfLiveNodes();
</span><span class="lines">@@ -230,7 +230,7 @@
</span><span class="cx"> 
</span><span class="cx">     DOMString[] getReferencedFilePaths();
</span><span class="cx"> 
</span><del>-    // These functions both reset the tracked repaint rects. They are inteded to be used in the following order:
</del><ins>+    // These functions both reset the tracked repaint rects. They are intended to be used in the following order:
</ins><span class="cx">     //  startTrackingRepaints, repaintRectsAsText, stopTrackingRepaints.
</span><span class="cx">     [RaisesException] void startTrackingRepaints();
</span><span class="cx">     [RaisesException] void stopTrackingRepaints();
</span><span class="lines">@@ -292,4 +292,12 @@
</span><span class="cx">     
</span><span class="cx">     [Conditional=VIDEO] void simulateSystemSleep();
</span><span class="cx">     [Conditional=VIDEO] void simulateSystemWake();
</span><ins>+    
+    [RaisesException] void installMockPageOverlay(PageOverlayType type);
+    [RaisesException] DOMString pageOverlayLayerTreeAsText();
</ins><span class="cx"> };
</span><ins>+
+enum PageOverlayType {
+    &quot;view&quot;,
+    &quot;document&quot;
+};
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkSourceWebCoretestingMockPageOverlayClientcpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/testing/MockPageOverlayClient.cpp (0 => 174315)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/MockPageOverlayClient.cpp                                (rev 0)
+++ trunk/Source/WebCore/testing/MockPageOverlayClient.cpp        2014-10-04 08:47:04 UTC (rev 174315)
</span><span class="lines">@@ -0,0 +1,124 @@
</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.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;MockPageOverlayClient.h&quot;
+
+#include &quot;GraphicsContext.h&quot;
+#include &quot;GraphicsLayer.h&quot;
+#include &quot;MainFrame.h&quot;
+#include &quot;PageOverlayController.h&quot;
+#include &lt;wtf/NeverDestroyed.h&gt;
+
+namespace WebCore {
+
+MockPageOverlayClient&amp; MockPageOverlayClient::shared()
+{
+    static NeverDestroyed&lt;MockPageOverlayClient&gt; sharedClient;
+    return sharedClient.get();
+}
+
+MockPageOverlayClient::MockPageOverlayClient()
+{
+}
+
+void MockPageOverlayClient::installOverlay(MainFrame&amp; mainFrame, PageOverlay::OverlayType overlayType)
+{
+    RefPtr&lt;PageOverlay&gt; overlay = PageOverlay::create(*this, overlayType);
+    mainFrame.pageOverlayController().installPageOverlay(overlay, PageOverlay::FadeMode::DoNotFade);
+    m_overlays.add(overlay.get());
+}
+
+void MockPageOverlayClient::uninstallAllOverlays()
+{
+    while (!m_overlays.isEmpty()) {
+        PageOverlay* overlay = m_overlays.takeAny();
+        ASSERT(overlay-&gt;controller());
+        overlay-&gt;controller()-&gt;uninstallPageOverlay(overlay, PageOverlay::FadeMode::DoNotFade);
+    }
+}
+
+String MockPageOverlayClient::layerTreeAsText(MainFrame&amp; mainFrame)
+{
+    return &quot;View-relative:\n&quot; + mainFrame.pageOverlayController().viewOverlayRootLayer().layerTreeAsText(LayerTreeAsTextIncludePageOverlayLayers) + &quot;\n\nDocument-relative:\n&quot; + mainFrame.pageOverlayController().documentOverlayRootLayer().layerTreeAsText(LayerTreeAsTextIncludePageOverlayLayers);
+}
+
+void MockPageOverlayClient::pageOverlayDestroyed(PageOverlay&amp; overlay)
+{
+    m_overlays.remove(&amp;overlay);
+}
+
+void MockPageOverlayClient::willMoveToPage(PageOverlay&amp;, Page*)
+{
+}
+
+void MockPageOverlayClient::didMoveToPage(PageOverlay&amp; overlay, Page* page)
+{
+    if (page)
+        overlay.setNeedsDisplay();
+}
+
+void MockPageOverlayClient::drawRect(PageOverlay&amp; overlay, GraphicsContext&amp; context, const IntRect&amp;)
+{
+    GraphicsContextStateSaver stateSaver(context);
+
+    FloatRect insetRect = overlay.bounds();
+
+    if (overlay.overlayType() == PageOverlay::OverlayType::Document) {
+        context.setStrokeColor(Color(0, 255, 0), ColorSpaceDeviceRGB);
+        insetRect.inflate(-50);
+    } else {
+        context.setStrokeColor(Color(0, 0, 255), ColorSpaceDeviceRGB);
+        insetRect.inflate(-20);
+    }
+
+    context.strokeRect(insetRect, 20);
+}
+
+bool MockPageOverlayClient::mouseEvent(PageOverlay&amp;, const PlatformMouseEvent&amp;)
+{
+    return false;
+}
+
+void MockPageOverlayClient::didScrollFrame(PageOverlay&amp;, Frame&amp;)
+{
+}
+
+bool MockPageOverlayClient::copyAccessibilityAttributeStringValueForPoint(PageOverlay&amp;, String /* attribute */, FloatPoint, String&amp;)
+{
+    return false;
+}
+
+bool MockPageOverlayClient::copyAccessibilityAttributeBoolValueForPoint(PageOverlay&amp;, String /* attribute */, FloatPoint, bool&amp;)
+{
+    return false;
+}
+
+Vector&lt;String&gt; MockPageOverlayClient::copyAccessibilityAttributeNames(PageOverlay&amp;, bool /* parameterizedNames */)
+{
+    return Vector&lt;String&gt;();
+}
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoretestingMockPageOverlayClienth"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/testing/MockPageOverlayClient.h (0 => 174315)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/MockPageOverlayClient.h                                (rev 0)
+++ trunk/Source/WebCore/testing/MockPageOverlayClient.h        2014-10-04 08:47:04 UTC (rev 174315)
</span><span class="lines">@@ -0,0 +1,67 @@
</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 MockPageOverlayClient_h
+#define MockPageOverlayClient_h
+
+#include &quot;PageOverlay.h&quot;
+#include &lt;wtf/HashSet.h&gt;
+
+namespace WebCore {
+
+class MainFrame;
+
+class MockPageOverlayClient final : public PageOverlay::Client {
+    friend class NeverDestroyed&lt;MockPageOverlayClient&gt;;
+public:
+    static MockPageOverlayClient&amp; shared();
+
+    explicit MockPageOverlayClient();
+
+    void installOverlay(MainFrame&amp;, PageOverlay::OverlayType);
+    void uninstallAllOverlays();
+
+    String layerTreeAsText(MainFrame&amp;);
+
+    virtual ~MockPageOverlayClient() { }
+
+private:
+    virtual void pageOverlayDestroyed(PageOverlay&amp;) override;
+    virtual void willMoveToPage(PageOverlay&amp;, Page*) override;
+    virtual void didMoveToPage(PageOverlay&amp;, Page*) override;
+    virtual void drawRect(PageOverlay&amp;, GraphicsContext&amp;, const IntRect&amp; dirtyRect) override;
+    virtual bool mouseEvent(PageOverlay&amp;, const PlatformMouseEvent&amp;) override;
+    virtual void didScrollFrame(PageOverlay&amp;, Frame&amp;) override;
+
+    virtual bool copyAccessibilityAttributeStringValueForPoint(PageOverlay&amp;, String /* attribute */, FloatPoint, String&amp;) override;
+    virtual bool copyAccessibilityAttributeBoolValueForPoint(PageOverlay&amp;, String /* attribute */, FloatPoint, bool&amp;) override;
+    virtual Vector&lt;String&gt; copyAccessibilityAttributeNames(PageOverlay&amp;, bool /* parameterizedNames */) override;
+
+    HashSet&lt;PageOverlay*&gt; m_overlays;
+};
+
+}
+
+#endif // MockPageOverlayClient_h
</ins></span></pre>
</div>
</div>

</body>
</html>