<!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>[246612] 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/246612">246612</a></dd>
<dt>Author</dt> <dd>simon.fraser@apple.com</dd>
<dt>Date</dt> <dd>2019-06-19 14:47:07 -0700 (Wed, 19 Jun 2019)</dd>
</dl>

<h3>Log Message</h3>
<pre>Source/WebCore:
REGRESSION (246538): Newyorker.com header scrolls on page

Revert parts of <a href="http://trac.webkit.org/projects/webkit/changeset/246538">r246538</a> so that frame scrolling is reverted to using layer positions.
Overflow scroll will still scroll by changing boundsOrigin.

The bug was caused by confusion about insetClipLayer and scrollContainerLayer; macOS
positions the clip layer using FrameView::yPositionForInsetClipLayer(), so it's not just
a simple scroll container, and this change broke positioning for fixed position layers.

* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::reconcileScrollPosition):
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::insetClipLayerForFrameView):
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
(WebCore::ScrollingTreeFrameScrollingNodeMac::repositionScrollingLayers):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::~RenderLayerCompositor):
(WebCore::RenderLayerCompositor::frameViewDidChangeSize):
(WebCore::RenderLayerCompositor::updateScrollLayerPosition):
(WebCore::RenderLayerCompositor::updateScrollLayerClipping):
(WebCore::RenderLayerCompositor::frameViewDidScroll):
(WebCore::RenderLayerCompositor::updateRootLayerPosition):
(WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
(WebCore::RenderLayerCompositor::ensureRootLayer):
(WebCore::RenderLayerCompositor::destroyRootLayer):
(WebCore::RenderLayerCompositor::updateScrollingNodeLayers):
(WebCore::RenderLayerCompositor::updateLayersForScrollPosition): Deleted.
(WebCore::RenderLayerCompositor::updateScrollContainerGeometry): Deleted.
* rendering/RenderLayerCompositor.h:

LayoutTests:
Revert parts of <a href="http://trac.webkit.org/projects/webkit/changeset/246538">r246538</a> so that frame scrolling is reverted to using layer positions.
Overflow scroll will still scroll by changing boundsOrigin.

The bug was caused by confusion about insetClipLayer and scrollContainerLayer; macOS
positions the clip layer using FrameView::yPositionForInsetClipLayer(), so it's not just
a simple scroll container, and this change broke positioning for fixed position layers.

* compositing/iframes/scrolling-iframe-expected.txt:
* compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt:
* compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint-expected.txt:
* platform/ios-wk2/compositing/iframes/scrolling-iframe-expected.txt:
* platform/ios-wk2/scrollingcoordinator/scrolling-tree/fixed-inside-frame-expected.txt:
* platform/mac-highsierra-wk1/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt:
* platform/mac-highsierra-wk1/compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint-expected.txt:
* platform/mac-sierra-wk1/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt:
* platform/mac-wk1/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt:
* platform/mac-wk1/compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint-expected.txt:
* scrollingcoordinator/scrolling-tree/fixed-inside-frame-expected.txt:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestscompositingiframesscrollingiframeexpectedtxt">trunk/LayoutTests/compositing/iframes/scrolling-iframe-expected.txt</a></li>
<li><a href="#trunkLayoutTestscompositingrepaintiframescompositingiframescrollrepaintexpectedtxt">trunk/LayoutTests/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt</a></li>
<li><a href="#trunkLayoutTestscompositingrepaintiframescompositingiframewithfixedbackgrounddocrepaintexpectedtxt">trunk/LayoutTests/compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformioswk2compositingiframesscrollingiframeexpectedtxt">trunk/LayoutTests/platform/ios-wk2/compositing/iframes/scrolling-iframe-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformioswk2scrollingcoordinatorscrollingtreefixedinsideframeexpectedtxt">trunk/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/fixed-inside-frame-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmachighsierrawk1compositingrepaintiframescompositingiframescrollrepaintexpectedtxt">trunk/LayoutTests/platform/mac-highsierra-wk1/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmachighsierrawk1compositingrepaintiframescompositingiframewithfixedbackgrounddocrepaintexpectedtxt">trunk/LayoutTests/platform/mac-highsierra-wk1/compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacsierrawk1compositingrepaintiframescompositingiframescrollrepaintexpectedtxt">trunk/LayoutTests/platform/mac-sierra-wk1/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk1compositingrepaintiframescompositingiframescrollrepaintexpectedtxt">trunk/LayoutTests/platform/mac-wk1/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk1compositingrepaintiframescompositingiframewithfixedbackgrounddocrepaintexpectedtxt">trunk/LayoutTests/platform/mac-wk1/compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint-expected.txt</a></li>
<li><a href="#trunkLayoutTestsscrollingcoordinatorscrollingtreefixedinsideframeexpectedtxt">trunk/LayoutTests/scrollingcoordinator/scrolling-tree/fixed-inside-frame-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorepagescrollingAsyncScrollingCoordinatorcpp">trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp</a></li>
<li><a href="#trunkSourceWebCorepagescrollingScrollingCoordinatorcpp">trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp</a></li>
<li><a href="#trunkSourceWebCorepagescrollingmacScrollingTreeFrameScrollingNodeMacmm">trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLayerCompositorcpp">trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLayerCompositorh">trunk/Source/WebCore/rendering/RenderLayerCompositor.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (246611 => 246612)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog      2019-06-19 21:33:35 UTC (rev 246611)
+++ trunk/LayoutTests/ChangeLog 2019-06-19 21:47:07 UTC (rev 246612)
</span><span class="lines">@@ -20,6 +20,27 @@
</span><span class="cx"> 
</span><span class="cx">         * platform/gtk/TestExpectations:
</span><span class="cx"> 
</span><ins>+2019-06-19  Simon Fraser  <simon.fraser@apple.com>
+
+        Revert parts of r246538 so that frame scrolling is reverted to using layer positions.
+        Overflow scroll will still scroll by changing boundsOrigin.
+        
+        The bug was caused by confusion about insetClipLayer and scrollContainerLayer; macOS
+        positions the clip layer using FrameView::yPositionForInsetClipLayer(), so it's not just
+        a simple scroll container, and this change broke positioning for fixed position layers.
+
+        * compositing/iframes/scrolling-iframe-expected.txt:
+        * compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt:
+        * compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint-expected.txt:
+        * platform/ios-wk2/compositing/iframes/scrolling-iframe-expected.txt:
+        * platform/ios-wk2/scrollingcoordinator/scrolling-tree/fixed-inside-frame-expected.txt:
+        * platform/mac-highsierra-wk1/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt:
+        * platform/mac-highsierra-wk1/compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint-expected.txt:
+        * platform/mac-sierra-wk1/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt:
+        * platform/mac-wk1/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt:
+        * platform/mac-wk1/compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint-expected.txt:
+        * scrollingcoordinator/scrolling-tree/fixed-inside-frame-expected.txt:
+
</ins><span class="cx"> 2019-06-19  Russell Epstein  <russell_e@apple.com>
</span><span class="cx"> 
</span><span class="cx">         webgpu/blend-color-triangle-strip.html is a flakey failure since introduction.
</span></span></pre></div>
<a id="trunkLayoutTestscompositingiframesscrollingiframeexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/compositing/iframes/scrolling-iframe-expected.txt (246611 => 246612)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/compositing/iframes/scrolling-iframe-expected.txt      2019-06-19 21:33:35 UTC (rev 246611)
+++ trunk/LayoutTests/compositing/iframes/scrolling-iframe-expected.txt 2019-06-19 21:47:07 UTC (rev 246612)
</span><span class="lines">@@ -16,11 +16,11 @@
</span><span class="cx">               (position 43.00 43.00)
</span><span class="cx">               (children 1
</span><span class="cx">                 (GraphicsLayer
</span><del>-                  (bounds origin 80.00 80.00)
</del><span class="cx">                   (anchor 0.00 0.00)
</span><span class="cx">                   (bounds 285.00 135.00)
</span><span class="cx">                   (children 1
</span><span class="cx">                     (GraphicsLayer
</span><ins>+                      (position -80.00 -80.00)
</ins><span class="cx">                       (anchor 0.00 0.00)
</span><span class="cx">                       (children 1
</span><span class="cx">                         (GraphicsLayer
</span></span></pre></div>
<a id="trunkLayoutTestscompositingrepaintiframescompositingiframescrollrepaintexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt (246611 => 246612)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt     2019-06-19 21:33:35 UTC (rev 246611)
+++ trunk/LayoutTests/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt        2019-06-19 21:47:07 UTC (rev 246612)
</span><span class="lines">@@ -17,11 +17,11 @@
</span><span class="cx">               (position 16.00 16.00)
</span><span class="cx">               (children 1
</span><span class="cx">                 (GraphicsLayer
</span><del>-                  (bounds origin 0.00 100.00)
</del><span class="cx">                   (anchor 0.00 0.00)
</span><span class="cx">                   (bounds 400.00 300.00)
</span><span class="cx">                   (children 1
</span><span class="cx">                     (GraphicsLayer
</span><ins>+                      (position 0.00 -100.00)
</ins><span class="cx">                       (anchor 0.00 0.00)
</span><span class="cx">                       (children 1
</span><span class="cx">                         (GraphicsLayer
</span></span></pre></div>
<a id="trunkLayoutTestscompositingrepaintiframescompositingiframewithfixedbackgrounddocrepaintexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint-expected.txt (246611 => 246612)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint-expected.txt  2019-06-19 21:33:35 UTC (rev 246611)
+++ trunk/LayoutTests/compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint-expected.txt     2019-06-19 21:47:07 UTC (rev 246612)
</span><span class="lines">@@ -17,11 +17,11 @@
</span><span class="cx">               (position 16.00 16.00)
</span><span class="cx">               (children 1
</span><span class="cx">                 (GraphicsLayer
</span><del>-                  (bounds origin 0.00 100.00)
</del><span class="cx">                   (anchor 0.00 0.00)
</span><span class="cx">                   (bounds 400.00 300.00)
</span><span class="cx">                   (children 1
</span><span class="cx">                     (GraphicsLayer
</span><ins>+                      (position 0.00 -100.00)
</ins><span class="cx">                       (anchor 0.00 0.00)
</span><span class="cx">                       (children 1
</span><span class="cx">                         (GraphicsLayer
</span></span></pre></div>
<a id="trunkLayoutTestsplatformioswk2compositingiframesscrollingiframeexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/ios-wk2/compositing/iframes/scrolling-iframe-expected.txt (246611 => 246612)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-wk2/compositing/iframes/scrolling-iframe-expected.txt     2019-06-19 21:33:35 UTC (rev 246611)
+++ trunk/LayoutTests/platform/ios-wk2/compositing/iframes/scrolling-iframe-expected.txt        2019-06-19 21:47:07 UTC (rev 246612)
</span><span class="lines">@@ -16,7 +16,6 @@
</span><span class="cx">               (position 43.00 43.00)
</span><span class="cx">               (children 1
</span><span class="cx">                 (GraphicsLayer
</span><del>-                  (bounds origin 80.00 80.00)
</del><span class="cx">                   (anchor 0.00 0.00)
</span><span class="cx">                   (bounds 300.00 150.00)
</span><span class="cx">                   (children 1
</span></span></pre></div>
<a id="trunkLayoutTestsplatformioswk2scrollingcoordinatorscrollingtreefixedinsideframeexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/fixed-inside-frame-expected.txt (246611 => 246612)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/fixed-inside-frame-expected.txt   2019-06-19 21:33:35 UTC (rev 246611)
+++ trunk/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/fixed-inside-frame-expected.txt      2019-06-19 21:47:07 UTC (rev 246612)
</span><span class="lines">@@ -63,7 +63,6 @@
</span><span class="cx">               (position 12.00 12.00)
</span><span class="cx">               (children 1
</span><span class="cx">                 (GraphicsLayer
</span><del>-                  (bounds origin 0.00 120.00)
</del><span class="cx">                   (anchor 0.00 0.00)
</span><span class="cx">                   (bounds 480.00 400.00)
</span><span class="cx">                   (children 1
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmachighsierrawk1compositingrepaintiframescompositingiframescrollrepaintexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-highsierra-wk1/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt (246611 => 246612)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-highsierra-wk1/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt 2019-06-19 21:33:35 UTC (rev 246611)
+++ trunk/LayoutTests/platform/mac-highsierra-wk1/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt    2019-06-19 21:47:07 UTC (rev 246612)
</span><span class="lines">@@ -21,11 +21,11 @@
</span><span class="cx">               (position 16.00 16.00)
</span><span class="cx">               (children 1
</span><span class="cx">                 (GraphicsLayer
</span><del>-                  (bounds origin 0.00 100.00)
</del><span class="cx">                   (anchor 0.00 0.00)
</span><span class="cx">                   (bounds 400.00 300.00)
</span><span class="cx">                   (children 1
</span><span class="cx">                     (GraphicsLayer
</span><ins>+                      (position 0.00 -100.00)
</ins><span class="cx">                       (anchor 0.00 0.00)
</span><span class="cx">                       (children 1
</span><span class="cx">                         (GraphicsLayer
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmachighsierrawk1compositingrepaintiframescompositingiframewithfixedbackgrounddocrepaintexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-highsierra-wk1/compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint-expected.txt (246611 => 246612)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-highsierra-wk1/compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint-expected.txt      2019-06-19 21:33:35 UTC (rev 246611)
+++ trunk/LayoutTests/platform/mac-highsierra-wk1/compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint-expected.txt 2019-06-19 21:47:07 UTC (rev 246612)
</span><span class="lines">@@ -21,11 +21,11 @@
</span><span class="cx">               (position 16.00 16.00)
</span><span class="cx">               (children 1
</span><span class="cx">                 (GraphicsLayer
</span><del>-                  (bounds origin 0.00 100.00)
</del><span class="cx">                   (anchor 0.00 0.00)
</span><span class="cx">                   (bounds 400.00 300.00)
</span><span class="cx">                   (children 1
</span><span class="cx">                     (GraphicsLayer
</span><ins>+                      (position 0.00 -100.00)
</ins><span class="cx">                       (anchor 0.00 0.00)
</span><span class="cx">                       (children 1
</span><span class="cx">                         (GraphicsLayer
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacsierrawk1compositingrepaintiframescompositingiframescrollrepaintexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-sierra-wk1/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt (246611 => 246612)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-sierra-wk1/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt     2019-06-19 21:33:35 UTC (rev 246611)
+++ trunk/LayoutTests/platform/mac-sierra-wk1/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt        2019-06-19 21:47:07 UTC (rev 246612)
</span><span class="lines">@@ -20,11 +20,11 @@
</span><span class="cx">               (position 16.00 16.00)
</span><span class="cx">               (children 1
</span><span class="cx">                 (GraphicsLayer
</span><del>-                  (bounds origin 0.00 100.00)
</del><span class="cx">                   (anchor 0.00 0.00)
</span><span class="cx">                   (bounds 400.00 300.00)
</span><span class="cx">                   (children 1
</span><span class="cx">                     (GraphicsLayer
</span><ins>+                      (position 0.00 -100.00)
</ins><span class="cx">                       (children 1
</span><span class="cx">                         (GraphicsLayer
</span><span class="cx">                           (anchor 0.00 0.00)
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk1compositingrepaintiframescompositingiframescrollrepaintexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-wk1/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt (246611 => 246612)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk1/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt    2019-06-19 21:33:35 UTC (rev 246611)
+++ trunk/LayoutTests/platform/mac-wk1/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt       2019-06-19 21:47:07 UTC (rev 246612)
</span><span class="lines">@@ -20,11 +20,11 @@
</span><span class="cx">               (position 16.00 16.00)
</span><span class="cx">               (children 1
</span><span class="cx">                 (GraphicsLayer
</span><del>-                  (bounds origin 0.00 100.00)
</del><span class="cx">                   (anchor 0.00 0.00)
</span><span class="cx">                   (bounds 400.00 300.00)
</span><span class="cx">                   (children 1
</span><span class="cx">                     (GraphicsLayer
</span><ins>+                      (position 0.00 -100.00)
</ins><span class="cx">                       (anchor 0.00 0.00)
</span><span class="cx">                       (children 1
</span><span class="cx">                         (GraphicsLayer
</span><span class="lines">@@ -34,12 +34,6 @@
</span><span class="cx">                             (GraphicsLayer
</span><span class="cx">                               (bounds 400.00 1016.00)
</span><span class="cx">                               (drawsContent 1)
</span><del>-                              (repaint rects
-                                (rect 0.00 0.00 400.00 1016.00)
-                                (rect 0.00 0.00 400.00 1016.00)
-                                (rect 8.00 8.00 384.00 1000.00)
-                                (rect 0.00 0.00 400.00 1016.00)
-                              )
</del><span class="cx">                               (children 1
</span><span class="cx">                                 (GraphicsLayer
</span><span class="cx">                                   (position 8.00 8.00)
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk1compositingrepaintiframescompositingiframewithfixedbackgrounddocrepaintexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-wk1/compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint-expected.txt (246611 => 246612)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk1/compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint-expected.txt 2019-06-19 21:33:35 UTC (rev 246611)
+++ trunk/LayoutTests/platform/mac-wk1/compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint-expected.txt    2019-06-19 21:47:07 UTC (rev 246612)
</span><span class="lines">@@ -20,11 +20,11 @@
</span><span class="cx">               (position 16.00 16.00)
</span><span class="cx">               (children 1
</span><span class="cx">                 (GraphicsLayer
</span><del>-                  (bounds origin 0.00 100.00)
</del><span class="cx">                   (anchor 0.00 0.00)
</span><span class="cx">                   (bounds 400.00 300.00)
</span><span class="cx">                   (children 1
</span><span class="cx">                     (GraphicsLayer
</span><ins>+                      (position 0.00 -100.00)
</ins><span class="cx">                       (anchor 0.00 0.00)
</span><span class="cx">                       (children 1
</span><span class="cx">                         (GraphicsLayer
</span></span></pre></div>
<a id="trunkLayoutTestsscrollingcoordinatorscrollingtreefixedinsideframeexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/scrollingcoordinator/scrolling-tree/fixed-inside-frame-expected.txt (246611 => 246612)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/scrollingcoordinator/scrolling-tree/fixed-inside-frame-expected.txt    2019-06-19 21:33:35 UTC (rev 246611)
+++ trunk/LayoutTests/scrollingcoordinator/scrolling-tree/fixed-inside-frame-expected.txt       2019-06-19 21:47:07 UTC (rev 246612)
</span><span class="lines">@@ -65,11 +65,11 @@
</span><span class="cx">               (position 12.00 12.00)
</span><span class="cx">               (children 1
</span><span class="cx">                 (GraphicsLayer
</span><del>-                  (bounds origin 0.00 120.00)
</del><span class="cx">                   (anchor 0.00 0.00)
</span><span class="cx">                   (bounds 465.00 400.00)
</span><span class="cx">                   (children 1
</span><span class="cx">                     (GraphicsLayer
</span><ins>+                      (position 0.00 -120.00)
</ins><span class="cx">                       (anchor 0.00 0.00)
</span><span class="cx">                       (children 1
</span><span class="cx">                         (GraphicsLayer
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (246611 => 246612)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog   2019-06-19 21:33:35 UTC (rev 246611)
+++ trunk/Source/WebCore/ChangeLog      2019-06-19 21:47:07 UTC (rev 246612)
</span><span class="lines">@@ -41,6 +41,38 @@
</span><span class="cx">         (WebCore::RealtimeOutgoingVideoSourceCocoa::rotatePixelBuffer):
</span><span class="cx">         (WebCore::computeRotatedWidthAndHeight): Deleted.
</span><span class="cx"> 
</span><ins>+2019-06-19  Simon Fraser  <simon.fraser@apple.com>
+
+        REGRESSION (246538): Newyorker.com header scrolls on page
+        
+        Revert parts of r246538 so that frame scrolling is reverted to using layer positions.
+        Overflow scroll will still scroll by changing boundsOrigin.
+        
+        The bug was caused by confusion about insetClipLayer and scrollContainerLayer; macOS
+        positions the clip layer using FrameView::yPositionForInsetClipLayer(), so it's not just
+        a simple scroll container, and this change broke positioning for fixed position layers.
+
+        * page/scrolling/AsyncScrollingCoordinator.cpp:
+        (WebCore::AsyncScrollingCoordinator::reconcileScrollPosition):
+        * page/scrolling/ScrollingCoordinator.cpp:
+        (WebCore::ScrollingCoordinator::insetClipLayerForFrameView):
+        * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
+        (WebCore::ScrollingTreeFrameScrollingNodeMac::repositionScrollingLayers):
+        * rendering/RenderLayerCompositor.cpp:
+        (WebCore::RenderLayerCompositor::~RenderLayerCompositor):
+        (WebCore::RenderLayerCompositor::frameViewDidChangeSize):
+        (WebCore::RenderLayerCompositor::updateScrollLayerPosition):
+        (WebCore::RenderLayerCompositor::updateScrollLayerClipping):
+        (WebCore::RenderLayerCompositor::frameViewDidScroll):
+        (WebCore::RenderLayerCompositor::updateRootLayerPosition):
+        (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
+        (WebCore::RenderLayerCompositor::ensureRootLayer):
+        (WebCore::RenderLayerCompositor::destroyRootLayer):
+        (WebCore::RenderLayerCompositor::updateScrollingNodeLayers):
+        (WebCore::RenderLayerCompositor::updateLayersForScrollPosition): Deleted.
+        (WebCore::RenderLayerCompositor::updateScrollContainerGeometry): Deleted.
+        * rendering/RenderLayerCompositor.h:
+
</ins><span class="cx"> 2019-06-19  Adrian Perez de Castro  <aperez@igalia.com>
</span><span class="cx"> 
</span><span class="cx">         [WPE][GTK] Fix build with unified sources disabled
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingAsyncScrollingCoordinatorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp (246611 => 246612)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp        2019-06-19 21:33:35 UTC (rev 246611)
+++ trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp   2019-06-19 21:47:07 UTC (rev 246612)
</span><span class="lines">@@ -446,15 +446,25 @@
</span><span class="cx"> 
</span><span class="cx"> void AsyncScrollingCoordinator::reconcileScrollPosition(FrameView& frameView, ScrollingLayerPositionAction scrollingLayerPositionAction)
</span><span class="cx"> {
</span><ins>+#if PLATFORM(IOS_FAMILY)
+    // Doing all scrolling like this (UIScrollView style) would simplify code.
</ins><span class="cx">     auto* scrollContainerLayer = scrollContainerLayerForFrameView(frameView);
</span><span class="cx">     if (!scrollContainerLayer)
</span><span class="cx">         return;
</span><del>-
-    // This uses scrollPosition because the root content layer accounts for scrollOrigin (see FrameView::positionForRootContentLayer()).
</del><span class="cx">     if (scrollingLayerPositionAction == ScrollingLayerPositionAction::Set)
</span><span class="cx">         scrollContainerLayer->setBoundsOrigin(frameView.scrollPosition());
</span><span class="cx">     else
</span><span class="cx">         scrollContainerLayer->syncBoundsOrigin(frameView.scrollPosition());
</span><ins>+#else
+    // This uses scrollPosition because the root content layer accounts for scrollOrigin (see FrameView::positionForRootContentLayer()).
+    auto* scrolledContentsLayer = scrolledContentsLayerForFrameView(frameView);
+    if (!scrolledContentsLayer)
+        return;
+    if (scrollingLayerPositionAction == ScrollingLayerPositionAction::Set)
+        scrolledContentsLayer->setPosition(-frameView.scrollPosition());
+    else
+        scrolledContentsLayer->syncPosition(-frameView.scrollPosition());
+#endif
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void AsyncScrollingCoordinator::scrollableAreaScrollbarLayerDidChange(ScrollableArea& scrollableArea, ScrollbarOrientation orientation)
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingScrollingCoordinatorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp (246611 => 246612)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp     2019-06-19 21:33:35 UTC (rev 246611)
+++ trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp        2019-06-19 21:47:07 UTC (rev 246612)
</span><span class="lines">@@ -272,7 +272,7 @@
</span><span class="cx"> GraphicsLayer* ScrollingCoordinator::insetClipLayerForFrameView(FrameView& frameView)
</span><span class="cx"> {
</span><span class="cx">     if (auto* renderView = frameView.frame().contentRenderer())
</span><del>-        return renderView->compositor().scrollContainerLayer();
</del><ins>+        return renderView->compositor().clipLayer();
</ins><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingmacScrollingTreeFrameScrollingNodeMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm (246611 => 246612)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm    2019-06-19 21:33:35 UTC (rev 246611)
+++ trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm       2019-06-19 21:47:07 UTC (rev 246612)
</span><span class="lines">@@ -200,7 +200,7 @@
</span><span class="cx"> void ScrollingTreeFrameScrollingNodeMac::repositionScrollingLayers()
</span><span class="cx"> {
</span><span class="cx">     // We use scroll position here because the root content layer is offset to account for scrollOrigin (see FrameView::positionForRootContentLayer).
</span><del>-    [scrollContainerLayer() _web_setLayerBoundsOrigin:currentScrollPosition()];
</del><ins>+    scrolledContentsLayer().position = -currentScrollPosition();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void ScrollingTreeFrameScrollingNodeMac::repositionRelatedLayers()
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayerCompositorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp (246611 => 246612)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp 2019-06-19 21:33:35 UTC (rev 246611)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp    2019-06-19 21:47:07 UTC (rev 246612)
</span><span class="lines">@@ -301,6 +301,7 @@
</span><span class="cx">     // Take care that the owned GraphicsLayers are deleted first as their destructors may call back here.
</span><span class="cx">     GraphicsLayer::unparentAndClear(m_rootContentsLayer);
</span><span class="cx">     
</span><ins>+    GraphicsLayer::unparentAndClear(m_clipLayer);
</ins><span class="cx">     GraphicsLayer::unparentAndClear(m_scrollContainerLayer);
</span><span class="cx">     GraphicsLayer::unparentAndClear(m_scrolledContentsLayer);
</span><span class="cx"> 
</span><span class="lines">@@ -1968,7 +1969,7 @@
</span><span class="cx">         layer->setNeedsCompositingGeometryUpdate();
</span><span class="cx"> 
</span><span class="cx">     if (m_scrolledContentsLayer) {
</span><del>-        updateScrollContainerGeometry();
</del><ins>+        updateScrollLayerClipping();
</ins><span class="cx">         frameViewDidScroll();
</span><span class="cx">         updateOverflowControlsLayers();
</span><span class="cx"> 
</span><span class="lines">@@ -1988,26 +1989,29 @@
</span><span class="cx">     return scrollingCoordinator && scrollingCoordinator->coordinatesScrollingForFrameView(m_renderView.frameView());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RenderLayerCompositor::updateLayersForScrollPosition()
</del><ins>+void RenderLayerCompositor::updateScrollLayerPosition()
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(!hasCoordinatedScrolling());
</span><del>-    ASSERT(m_scrollContainerLayer);
</del><ins>+    ASSERT(m_scrolledContentsLayer);
</ins><span class="cx"> 
</span><span class="cx">     auto& frameView = m_renderView.frameView();
</span><del>-    // This uses scrollPosition because the root content layer accounts for scrollOrigin (see FrameView::positionForRootContentLayer()).
-    m_scrollContainerLayer->setBoundsOrigin(frameView.scrollPosition());
</del><ins>+    IntPoint scrollPosition = frameView.scrollPosition();
</ins><span class="cx"> 
</span><ins>+    // We use scroll position here because the root content layer is offset to account for scrollOrigin (see FrameView::positionForRootContentLayer).
+    m_scrolledContentsLayer->setPosition(FloatPoint(-scrollPosition.x(), -scrollPosition.y()));
+
</ins><span class="cx">     if (auto* fixedBackgroundLayer = fixedRootBackgroundLayer())
</span><span class="cx">         fixedBackgroundLayer->setPosition(frameView.scrollPositionForFixedPosition());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RenderLayerCompositor::updateScrollContainerGeometry()
</del><ins>+void RenderLayerCompositor::updateScrollLayerClipping()
</ins><span class="cx"> {
</span><del>-    if (!m_scrollContainerLayer)
</del><ins>+    auto* layerForClipping = this->layerForClipping();
+    if (!layerForClipping)
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    m_scrollContainerLayer->setSize(m_renderView.frameView().sizeForVisibleContent());
-    m_scrollContainerLayer->setPosition(positionForClipLayer());
</del><ins>+    layerForClipping->setSize(m_renderView.frameView().sizeForVisibleContent());
+    layerForClipping->setPosition(positionForClipLayer());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> FloatPoint RenderLayerCompositor::positionForClipLayer() const
</span><span class="lines">@@ -2032,7 +2036,7 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    updateLayersForScrollPosition();
</del><ins>+    updateScrollLayerPosition();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void RenderLayerCompositor::frameViewDidAddOrRemoveScrollbars()
</span><span class="lines">@@ -2249,10 +2253,10 @@
</span><span class="cx">     if (m_rootContentsLayer) {
</span><span class="cx">         m_rootContentsLayer->setSize(m_renderView.frameView().contentsSize());
</span><span class="cx">         m_rootContentsLayer->setPosition(m_renderView.frameView().positionForRootContentLayer());
</span><del>-        m_rootContentsLayer->setAnchorPoint({ });
</del><ins>+        m_rootContentsLayer->setAnchorPoint(FloatPoint3D());
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    updateScrollContainerGeometry();
</del><ins>+    updateScrollLayerClipping();
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(RUBBER_BANDING)
</span><span class="cx">     if (m_contentShadowLayer && m_rootContentsLayer) {
</span><span class="lines">@@ -3679,7 +3683,7 @@
</span><span class="cx"> 
</span><span class="cx">             // We want the overhang areas layer to be positioned below the frame contents,
</span><span class="cx">             // so insert it below the clip layer.
</span><del>-            m_overflowControlsHostLayer->addChildBelow(*m_layerForOverhangAreas, m_scrollContainerLayer.get());
</del><ins>+            m_overflowControlsHostLayer->addChildBelow(*m_layerForOverhangAreas, layerForClipping());
</ins><span class="cx">         }
</span><span class="cx">     } else
</span><span class="cx">         GraphicsLayer::unparentAndClear(m_layerForOverhangAreas);
</span><span class="lines">@@ -3769,7 +3773,7 @@
</span><span class="cx">         m_rootContentsLayer->setName("content root");
</span><span class="cx">         IntRect overflowRect = snappedIntRect(m_renderView.layoutOverflowRect());
</span><span class="cx">         m_rootContentsLayer->setSize(FloatSize(overflowRect.maxX(), overflowRect.maxY()));
</span><del>-        m_rootContentsLayer->setPosition({ });
</del><ins>+        m_rootContentsLayer->setPosition(FloatPoint());
</ins><span class="cx"> 
</span><span class="cx"> #if PLATFORM(IOS_FAMILY)
</span><span class="cx">         // Page scale is applied above this on iOS, so we'll just say that our root layer applies it.
</span><span class="lines">@@ -3785,35 +3789,54 @@
</span><span class="cx">     if (requiresScrollLayer(expectedAttachment)) {
</span><span class="cx">         if (!m_overflowControlsHostLayer) {
</span><span class="cx">             ASSERT(!m_scrolledContentsLayer);
</span><ins>+            ASSERT(!m_clipLayer);
</ins><span class="cx"> 
</span><span class="cx">             // Create a layer to host the clipping layer and the overflow controls layers.
</span><span class="cx">             m_overflowControlsHostLayer = GraphicsLayer::create(graphicsLayerFactory(), *this);
</span><span class="cx">             m_overflowControlsHostLayer->setName("overflow controls host");
</span><span class="cx"> 
</span><del>-            m_scrollContainerLayer = GraphicsLayer::create(graphicsLayerFactory(), *this, GraphicsLayer::Type::ScrollContainer);
-            m_scrollContainerLayer->setName("scroll container");
-            m_scrollContainerLayer->setMasksToBounds(true);
-            m_scrollContainerLayer->setAnchorPoint({ });
-
</del><span class="cx">             m_scrolledContentsLayer = GraphicsLayer::create(graphicsLayerFactory(), *this, GraphicsLayer::Type::ScrolledContents);
</span><span class="cx">             m_scrolledContentsLayer->setName("scrolled contents");
</span><span class="cx">             m_scrolledContentsLayer->setAnchorPoint({ });
</span><span class="cx"> 
</span><del>-            m_overflowControlsHostLayer->addChild(*m_scrollContainerLayer);
-            m_scrollContainerLayer->addChild(*m_scrolledContentsLayer);
</del><ins>+#if PLATFORM(IOS_FAMILY)
+            if (m_renderView.settings().asyncFrameScrollingEnabled()) {
+                m_scrollContainerLayer = GraphicsLayer::create(graphicsLayerFactory(), *this, GraphicsLayer::Type::ScrollContainer);
+
+                m_scrollContainerLayer->setName("scroll container");
+                m_scrollContainerLayer->setMasksToBounds(true);
+                m_scrollContainerLayer->setAnchorPoint({ });
+
+                m_scrollContainerLayer->addChild(*m_scrolledContentsLayer);
+                m_overflowControlsHostLayer->addChild(*m_scrollContainerLayer);
+            }
+#endif
+            // FIXME: m_scrollContainerLayer and m_clipLayer have similar roles here, but m_clipLayer has some special positioning to
+            // account for clipping and top content inset (see FrameView::yPositionForInsetClipLayer()).
+            if (!m_scrollContainerLayer) {
+                m_clipLayer = GraphicsLayer::create(graphicsLayerFactory(), *this);
+                m_clipLayer->setName("frame clipping");
+                m_clipLayer->setMasksToBounds(true);
+                m_clipLayer->setAnchorPoint({ });
+
+                m_clipLayer->addChild(*m_scrolledContentsLayer);
+                m_overflowControlsHostLayer->addChild(*m_clipLayer);
+            }
+
</ins><span class="cx">             m_scrolledContentsLayer->addChild(*m_rootContentsLayer);
</span><span class="cx"> 
</span><del>-            updateScrollContainerGeometry();
</del><ins>+            updateScrollLayerClipping();
</ins><span class="cx">             updateOverflowControlsLayers();
</span><span class="cx"> 
</span><span class="cx">             if (hasCoordinatedScrolling())
</span><span class="cx">                 scheduleLayerFlush(true);
</span><span class="cx">             else
</span><del>-                updateLayersForScrollPosition();
</del><ins>+                updateScrollLayerPosition();
</ins><span class="cx">         }
</span><span class="cx">     } else {
</span><span class="cx">         if (m_overflowControlsHostLayer) {
</span><span class="cx">             GraphicsLayer::unparentAndClear(m_overflowControlsHostLayer);
</span><ins>+            GraphicsLayer::unparentAndClear(m_clipLayer);
</ins><span class="cx">             GraphicsLayer::unparentAndClear(m_scrollContainerLayer);
</span><span class="cx">             GraphicsLayer::unparentAndClear(m_scrolledContentsLayer);
</span><span class="cx">         }
</span><span class="lines">@@ -3860,6 +3883,7 @@
</span><span class="cx"> 
</span><span class="cx">     if (m_overflowControlsHostLayer) {
</span><span class="cx">         GraphicsLayer::unparentAndClear(m_overflowControlsHostLayer);
</span><ins>+        GraphicsLayer::unparentAndClear(m_clipLayer);
</ins><span class="cx">         GraphicsLayer::unparentAndClear(m_scrollContainerLayer);
</span><span class="cx">         GraphicsLayer::unparentAndClear(m_scrolledContentsLayer);
</span><span class="cx">     }
</span><span class="lines">@@ -4299,7 +4323,7 @@
</span><span class="cx">         FrameView& frameView = m_renderView.frameView();
</span><span class="cx">         scrollingCoordinator.setNodeLayers(nodeID, { nullptr,
</span><span class="cx">             scrollContainerLayer(), scrolledContentsLayer(),
</span><del>-            fixedRootBackgroundLayer(), nullptr, rootContentsLayer(),
</del><ins>+            fixedRootBackgroundLayer(), clipLayer(), rootContentsLayer(),
</ins><span class="cx">             frameView.layerForHorizontalScrollbar(), frameView.layerForVerticalScrollbar() });
</span><span class="cx">     } else {
</span><span class="cx">         auto& backing = *layer.backing();
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayerCompositorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.h (246611 => 246612)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayerCompositor.h   2019-06-19 21:33:35 UTC (rev 246611)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.h      2019-06-19 21:47:07 UTC (rev 246612)
</span><span class="lines">@@ -246,8 +246,11 @@
</span><span class="cx"> 
</span><span class="cx">     GraphicsLayer* scrollContainerLayer() const { return m_scrollContainerLayer.get(); }
</span><span class="cx">     GraphicsLayer* scrolledContentsLayer() const { return m_scrolledContentsLayer.get(); }
</span><ins>+    GraphicsLayer* clipLayer() const { return m_clipLayer.get(); }
</ins><span class="cx">     GraphicsLayer* rootContentsLayer() const { return m_rootContentsLayer.get(); }
</span><span class="cx"> 
</span><ins>+    GraphicsLayer* layerForClipping() const {  return m_clipLayer ? m_clipLayer.get() : m_scrollContainerLayer.get();  }
+
</ins><span class="cx"> #if ENABLE(RUBBER_BANDING)
</span><span class="cx">     GraphicsLayer* headerLayer() const { return m_layerForHeader.get(); }
</span><span class="cx">     GraphicsLayer* footerLayer() const { return m_layerForFooter.get(); }
</span><span class="lines">@@ -437,8 +440,8 @@
</span><span class="cx"> 
</span><span class="cx">     void updateOverflowControlsLayers();
</span><span class="cx"> 
</span><del>-    void updateLayersForScrollPosition();
-    void updateScrollContainerGeometry();
</del><ins>+    void updateScrollLayerPosition();
+    void updateScrollLayerClipping();
</ins><span class="cx"> 
</span><span class="cx">     FloatPoint positionForClipLayer() const;
</span><span class="cx"> 
</span><span class="lines">@@ -571,6 +574,7 @@
</span><span class="cx">     RefPtr<GraphicsLayer> m_rootContentsLayer;
</span><span class="cx"> 
</span><span class="cx">     // Enclosing clipping layer for iframe content
</span><ins>+    RefPtr<GraphicsLayer> m_clipLayer;
</ins><span class="cx">     RefPtr<GraphicsLayer> m_scrollContainerLayer;
</span><span class="cx">     RefPtr<GraphicsLayer> m_scrolledContentsLayer;
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>