Title: [236424] trunk
Revision
236424
Author
[email protected]
Date
2018-09-24 13:19:46 -0700 (Mon, 24 Sep 2018)

Log Message

Remove the old "AcceleratedCompositingForOverflowScroll" code
https://bugs.webkit.org/show_bug.cgi?id=189870

Reviewed by Zalan Bujtas.

The "AcceleratedCompositingForOverflowScroll" code was added to allow overflow:scroll to use
composited scrolling if an overflow:scroll could be made a stacking context without affecting
z-order. We need overflow:scroll to be accelerated always, so a different approach is needed.
Remove this old code (unused by any platform?) to make working on new code easier.
Source/WebCore:

* page/Settings.yaml:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::RenderLayer):
(WebCore::RenderLayer::setHasVisibleContent):
(WebCore::RenderLayer::updateDescendantDependentFlags):
(WebCore::RenderLayer::dirty3DTransformedDescendantStatus):
(WebCore::RenderLayer::stackingContext const):
(WebCore::compositingContainer):
(WebCore::RenderLayer::addChild):
(WebCore::RenderLayer::removeChild):
(WebCore::RenderLayer::hasAcceleratedTouchScrolling const):
(WebCore::RenderLayer::usesAcceleratedScrolling const):
(WebCore::adjustedScrollDelta):
(WebCore::RenderLayer::updateCompositingLayersAfterScroll):
(WebCore::RenderLayer::updateScrollInfoAfterLayout):
(WebCore::RenderLayer::enclosingFragmentedFlowAncestor const):
(WebCore::RenderLayer::calculateClipRects const):
(WebCore::RenderLayer::acceleratedCompositingForOverflowScrollEnabled const): Deleted.
(WebCore::RenderLayer::updateDescendantsAreContiguousInStackingOrder): Deleted.
(WebCore::RenderLayer::updateDescendantsAreContiguousInStackingOrderRecursive): Deleted.
(WebCore::RenderLayer::positionNewlyCreatedOverflowControls): Deleted.
(WebCore::RenderLayer::canBeStackingContainer const): Deleted.
(WebCore::RenderLayer::stackingContainer const): Deleted.
(WebCore::RenderLayer::needsCompositedScrolling const): Deleted.
(WebCore::RenderLayer::updateNeedsCompositedScrolling): Deleted.
* rendering/RenderLayer.h:
(WebCore::RenderLayer::clearZOrderLists):
(WebCore::RenderLayer::updateZOrderLists):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateAfterLayout):
(WebCore::RenderLayerBacking::computeParentGraphicsLayerRect const):
(WebCore::RenderLayerBacking::updateGeometry):
(WebCore::RenderLayerBacking::requiresHorizontalScrollbarLayer const):
(WebCore::RenderLayerBacking::requiresVerticalScrollbarLayer const):
(WebCore::RenderLayerBacking::requiresScrollCornerLayer const):
(WebCore::RenderLayerBacking::compositingOpacity const):
(WebCore::traverseVisibleNonCompositedDescendantLayers):
(WebCore::RenderLayerBacking::hasUnpositionedOverflowControlsLayers const): Deleted.
* rendering/RenderLayerBacking.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateScrollCoordinatedLayersAfterFlush):
(WebCore::RenderLayerCompositor::updateCustomLayersAfterFlush):
(WebCore::styleChangeRequiresLayerRebuild):
(WebCore::RenderLayerCompositor::enclosingNonStackingClippingLayer const):
(WebCore::RenderLayerCompositor::computeCompositingRequirements):
(WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
(WebCore::RenderLayerCompositor::requiresCompositingLayer const):
(WebCore::RenderLayerCompositor::requiresOwnBackingStore const):
(WebCore::RenderLayerCompositor::reasonsForCompositing const):
(WebCore::RenderLayerCompositor::requiresCompositingForBackfaceVisibility const):
(WebCore::RenderLayerCompositor::isViewportConstrainedFixedOrStickyLayer const):
(WebCore::RenderLayerCompositor::requiresCompositingForPosition const):
(WebCore::RenderLayerCompositor::requiresCompositingForOverflowScrolling const):
(WebCore::RenderLayerCompositor::requiresCompositingForScrolling const): Deleted.
* rendering/RenderLayerCompositor.h:

Source/WebKit:

* Shared/WebPreferences.yaml:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetAcceleratedCompositingForOverflowScrollEnabled): Deleted.
(WKPreferencesGetAcceleratedCompositingForOverflowScrollEnabled): Deleted.
* UIProcess/API/C/WKPreferencesRefPrivate.h:

LayoutTests:

Keep some of the tests; they will be useful later.

* compositing/overflow/automatically-opt-into-composited-scrolling-expected.txt: Removed.
* compositing/overflow/automatically-opt-into-composited-scrolling.html: Removed.
* compositing/overflow/clipping-ancestor-with-accelerated-scrolling-ancestor.html:
* compositing/overflow/composited-scrolling-creates-a-stacking-container.html: Removed.
* compositing/overflow/composited-scrolling-paint-phases.html:
* compositing/overflow/do-not-paint-outline-into-composited-scrolling-contents.html:
* compositing/overflow/dynamic-composited-scrolling-status.html:
* compositing/overflow/iframe-inside-overflow-clipping.html:
* compositing/overflow/nested-scrolling.html:
* compositing/overflow/overflow-clip-with-accelerated-scrolling-ancestor.html:
* compositing/overflow/paint-neg-z-order-descendants-into-scrolling-contents-layer.html:
* compositing/overflow/scrolling-content-clip-to-viewport.html:
* compositing/overflow/scrolling-without-painting.html:
* compositing/overflow/textarea-scroll-touch.html:
* compositing/overflow/updating-scrolling-content.html:
* compositing/rtl/rtl-overflow-scrolling.html:
* platform/gtk/compositing/overflow/composited-scrolling-creates-a-stacking-container-expected.txt: Removed.
* platform/ios-simulator-wk2/TestExpectations:
* platform/ios-wk1/TestExpectations:
* platform/ios/compositing/overflow/automatically-opt-into-composited-scrolling-expected.txt: Removed.
* platform/ios/compositing/overflow/composited-scrolling-creates-a-stacking-container-expected.txt: Removed.
* platform/mac/compositing/overflow/composited-scrolling-creates-a-stacking-container-expected.txt: Removed.

Modified Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (236423 => 236424)


--- trunk/LayoutTests/ChangeLog	2018-09-24 20:15:17 UTC (rev 236423)
+++ trunk/LayoutTests/ChangeLog	2018-09-24 20:19:46 UTC (rev 236424)
@@ -1,3 +1,40 @@
+2018-09-21  Simon Fraser  <[email protected]>
+
+        Remove the old "AcceleratedCompositingForOverflowScroll" code
+        https://bugs.webkit.org/show_bug.cgi?id=189870
+
+        Reviewed by Zalan Bujtas.
+
+        The "AcceleratedCompositingForOverflowScroll" code was added to allow overflow:scroll to use
+        composited scrolling if an overflow:scroll could be made a stacking context without affecting
+        z-order. We need overflow:scroll to be accelerated always, so a different approach is needed.
+        Remove this old code (unused by any platform?) to make working on new code easier.
+        
+        Keep some of the tests; they will be useful later.
+
+        * compositing/overflow/automatically-opt-into-composited-scrolling-expected.txt: Removed.
+        * compositing/overflow/automatically-opt-into-composited-scrolling.html: Removed.
+        * compositing/overflow/clipping-ancestor-with-accelerated-scrolling-ancestor.html:
+        * compositing/overflow/composited-scrolling-creates-a-stacking-container.html: Removed.
+        * compositing/overflow/composited-scrolling-paint-phases.html:
+        * compositing/overflow/do-not-paint-outline-into-composited-scrolling-contents.html:
+        * compositing/overflow/dynamic-composited-scrolling-status.html:
+        * compositing/overflow/iframe-inside-overflow-clipping.html:
+        * compositing/overflow/nested-scrolling.html:
+        * compositing/overflow/overflow-clip-with-accelerated-scrolling-ancestor.html:
+        * compositing/overflow/paint-neg-z-order-descendants-into-scrolling-contents-layer.html:
+        * compositing/overflow/scrolling-content-clip-to-viewport.html:
+        * compositing/overflow/scrolling-without-painting.html:
+        * compositing/overflow/textarea-scroll-touch.html:
+        * compositing/overflow/updating-scrolling-content.html:
+        * compositing/rtl/rtl-overflow-scrolling.html:
+        * platform/gtk/compositing/overflow/composited-scrolling-creates-a-stacking-container-expected.txt: Removed.
+        * platform/ios-simulator-wk2/TestExpectations:
+        * platform/ios-wk1/TestExpectations:
+        * platform/ios/compositing/overflow/automatically-opt-into-composited-scrolling-expected.txt: Removed.
+        * platform/ios/compositing/overflow/composited-scrolling-creates-a-stacking-container-expected.txt: Removed.
+        * platform/mac/compositing/overflow/composited-scrolling-creates-a-stacking-container-expected.txt: Removed.
+
 2018-09-24  Chris Dumez  <[email protected]>
 
         Do not do early processing of incoming sync IPC unless we're waiting for a sync IPC reply

Deleted: trunk/LayoutTests/compositing/overflow/automatically-opt-into-composited-scrolling-expected.txt (236423 => 236424)


--- trunk/LayoutTests/compositing/overflow/automatically-opt-into-composited-scrolling-expected.txt	2018-09-24 20:15:17 UTC (rev 236423)
+++ trunk/LayoutTests/compositing/overflow/automatically-opt-into-composited-scrolling-expected.txt	2018-09-24 20:19:46 UTC (rev 236424)
@@ -1,127 +0,0 @@
-Iteration 0: Passed
-Iteration 0, layer tree
-Iteration 1: Passed
-Iteration 1, layer tree
-Iteration 2: Passed
-Iteration 2, layer tree
-Iteration 3: Passed
-Iteration 3, layer tree
-Iteration 4: Passed
-Iteration 4, layer tree
-Iteration 5: Passed
-Iteration 5, layer tree
-Iteration 6: Passed
-Iteration 6, layer tree
-Iteration 7: Passed
-Iteration 7, layer tree
-Iteration 8: Passed
-Iteration 8, no layer tree
-Iteration 9: Passed
-Iteration 9, no layer tree
-Iteration 10: Passed
-Iteration 10, layer tree
-Iteration 11: Passed
-Iteration 11, layer tree
-Iteration 12: Passed
-Iteration 12, no layer tree
-Iteration 13: Passed
-Iteration 13, no layer tree
-Iteration 14: Passed
-Iteration 14, no layer tree
-Iteration 15: Passed
-Iteration 15, no layer tree
-Iteration 16: Passed
-Iteration 16, no layer tree
-Iteration 17: Passed
-Iteration 17, no layer tree
-Iteration 18: Passed
-Iteration 18, no layer tree
-Iteration 19: Passed
-Iteration 19, no layer tree
-Iteration 20: Passed
-Iteration 20, layer tree
-Iteration 21: Passed
-Iteration 21, layer tree
-Iteration 22: Passed
-Iteration 22, layer tree
-Iteration 23: Passed
-Iteration 23, layer tree
-Iteration 24: Passed
-Iteration 24, layer tree
-Iteration 25: Passed
-Iteration 25, layer tree
-Iteration 26: Passed
-Iteration 26, layer tree
-Iteration 27: Passed
-Iteration 27, layer tree
-Iteration 28: Passed
-Iteration 28, layer tree
-Iteration 29: Passed
-Iteration 29, layer tree
-Iteration 30: Passed
-Iteration 30, layer tree
-Iteration 31: Passed
-Iteration 31, layer tree
-Iteration 32: Passed
-Iteration 32, layer tree
-Iteration 33: Passed
-Iteration 33, layer tree
-Iteration 34: Passed
-Iteration 34, no layer tree
-Iteration 35: Passed
-Iteration 35, no layer tree
-Iteration 36: Passed
-Iteration 36, layer tree
-Iteration 37: Passed
-Iteration 37, layer tree
-Iteration 38: Passed
-Iteration 38, no layer tree
-Iteration 39: Passed
-Iteration 39, no layer tree
-Iteration 40: Passed
-Iteration 40, layer tree
-Iteration 41: Passed
-Iteration 41, layer tree
-Iteration 42: Passed
-Iteration 42, layer tree
-Iteration 43: Passed
-Iteration 43, layer tree
-Iteration 44: Passed
-Iteration 44, layer tree
-Iteration 45: Passed
-Iteration 45, layer tree
-Iteration 46: Passed
-Iteration 46, layer tree
-Iteration 47: Passed
-Iteration 47, layer tree
-Iteration 48: Passed
-Iteration 48, no layer tree
-Iteration 49: Passed
-Iteration 49, no layer tree
-Iteration 50: Passed
-Iteration 50, layer tree
-Iteration 51: Passed
-Iteration 51, layer tree
-Iteration 52: Passed
-Iteration 52, layer tree
-Iteration 53: Passed
-Iteration 53, layer tree
-Iteration 54: Passed
-Iteration 54, no layer tree
-Iteration 55: Passed
-Iteration 55, no layer tree
-Iteration 56: Passed
-Iteration 56, no layer tree
-Iteration 57: Passed
-Iteration 57, no layer tree
-Iteration 58: Passed
-Iteration 58, no layer tree
-Iteration 59: Passed
-Iteration 59, no layer tree
-Iteration 60: Passed
-Iteration 60, layer tree
-Iteration 61: Passed
-Iteration 61, no layer tree
-Iteration 62: Passed
-Iteration 62, layer tree
-

Deleted: trunk/LayoutTests/compositing/overflow/automatically-opt-into-composited-scrolling.html (236423 => 236424)


--- trunk/LayoutTests/compositing/overflow/automatically-opt-into-composited-scrolling.html	2018-09-24 20:15:17 UTC (rev 236423)
+++ trunk/LayoutTests/compositing/overflow/automatically-opt-into-composited-scrolling.html	2018-09-24 20:19:46 UTC (rev 236424)
@@ -1,231 +0,0 @@
-<!-- webkit-test-runner [ useThreadedScrolling=false ] -->
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-   "http://www.w3.org/TR/html4/loose.dtd">
-
-<html lang="en">
-<head>
-  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
-  <title>Opting into composited scrolling</title>
-  <style type="text/css" media="screen">
-    .container {
-      width: 200px;
-      height: 200px;
-      overflow: scroll;
-      margin: 20px;
-      border: 1px solid black;
-    }
-
-    .scrolled {
-      width: 180px;
-      height: 90px;
-      margin: 10px;
-      background-color: gray;
-      position: relative;
-    }
-
-    .positioned {
-      width: 120px;
-      height: 240px;
-      background-color: green;
-      position: absolute;
-    }
-
-    #predecessor {
-      left: 20px;
-      top: 20px;
-    }
-
-    #successor {
-      left: 160px;
-      top: 20px;
-    }
-
-    #descendant {
-      left: 90px;
-      top: 20px;
-      background-color: blue;
-      z-index: -20;
-    }
-  </style>
-  <script type="text/_javascript_" charset="utf-8">
-    var debugMode = false;
-
-    if (window.testRunner)
-      testRunner.dumpAsText();
-
-    if (window.internals)
-      window.internals.settings.setAcceleratedCompositingForOverflowScrollEnabled(true);
-
-    function write(str)
-    {
-      var pre = document.getElementById('console');
-      var text = document.createTextNode(str + '\n');
-      pre.appendChild(text);
-    }
-
-    var iteration = 0;
-    function printResult(expectedResult)
-    {
-      // Force a style recalc.
-      document.body.offsetTop;
-
-      if (window.internals) {
-        // Force a layout.
-        window.internals.boundingBox(container);
-        var layerTree = window.internals.layerTreeAsText(document);
-
-        if (!layerTree == !expectedResult)
-          write('Iteration ' + iteration.toString() + ': Passed')
-        else
-          write('Iteration ' + iteration.toString() + ': FAILED')
-
-        if (layerTree) {
-          write('Iteration ' + iteration.toString() + ', layer tree');
-          if (debugMode)
-              write(layerTree);
-        } else
-          write('Iteration ' + iteration.toString() + ', no layer tree');
-      }
-      iteration++;
-    }
-
-    function doTest()
-    {
-      var predecessor = document.getElementById('predecessor');
-      var successor = document.getElementById('successor');
-      var container = document.getElementById('container');
-      var firstChild = document.getElementById('firstChild');
-      var secondChild = document.getElementById('secondChild');
-      var descendant = document.getElementById('descendant');
-      var count = 0;
-
-      descendant.style.display = 'none';
-
-      // descendants in stacking order.
-      for (i = 0; i < 3; ++i) {
-        for (j = 0; j < 5; ++j) {
-          for (k = 0; k < 2; ++k) {
-            for (l = 0; l < 2; ++l) {
-              var minZIndex = 0;
-              var maxZIndex = 0;
-              if (i == 0) {
-                firstChild.style.zIndex = '1';
-                secondChild.style.zIndex = '3';
-                maxZIndex = 3;
-              } else if (i == 1) {
-                firstChild.style.zIndex = '-1';
-                secondChild.style.zIndex = '-3';
-                minZIndex = -3;
-              } else {
-                firstChild.style.zIndex = '-1';
-                secondChild.style.zIndex = '3';
-                minZIndex = -1;
-                maxZIndex = 3;
-              }
-
-              var sibling = predecessor;
-              var toHide = successor;
-              if (k == 1) {
-                sibling = successor;
-                toHide = predecessor;
-              }
-
-              // The result should be the same if the the element to hide is
-              // display:hidden or display:none.
-              if (l == 0)
-                toHide.style.display = 'none';
-              else
-                toHide.style.display = 'hidden';
-
-              sibling.style.display = '';
-
-              if (j == 0)
-                sibling.style.zIndex = (maxZIndex + 1).toString();
-              else if (j == 1)
-                sibling.style.zIndex = (minZIndex - 1).toString();
-              else if (j == 2)
-                sibling.style.zIndex = maxZIndex.toString();
-              else if (j == 3)
-                sibling.style.zIndex = minZIndex.toString();
-              else
-                sibling.style.zIndex = ((minZIndex + maxZIndex) / 2).toString();
-
-              var areContiguous = false;
-              if (sibling.style.zIndex > maxZIndex ||
-                  sibling.style.zIndex < minZIndex) {
-                  // sibling is outside the range of our descendants.
-                  areContiguous = true;
-              } else if (sibling.style.zIndex < maxZIndex &&
-                         sibling.style.zIndex > minZIndex) {
-                  // sibling is between our descendants.
-                  areContiguous = false;
-              } else if (sibling.style.zIndex == minZIndex) {
-                  if (minZIndex == 0) {
-                      // sibling lies between us (normal flow) and our pos
-                      // z-order descendants, so we are not contiguous.
-                      areContiguous = false;
-                  } else {
-                      // sibling's zIndex matches the min; we're only ok if it
-                      // appears first.
-                      areContiguous = k == 0;
-                  }
-              } else if (sibling.style.zIndex == maxZIndex) {
-                  if (maxZIndex < 0) {
-                      // sibling lies between us (normal flow) and neg z-order
-                      // descendants, so we are not contiguous.
-                      areContiguous = false;
-                  } else if (maxZIndex == 0) {
-                      // sibling is in the pos z-order list and does not affect
-                      // us since we're in the normal flow list and our
-                      // descandants are in the neg z-order list.
-                      areContiguous = true;
-                  } else {
-                      // sibling's zIndex matches the max; we're only ok if it
-                      // appears after.
-                      areContiguous = k == 1;
-                  }
-              }
-
-              printResult(areContiguous);
-            } // for l
-          } // for k
-        } // for j
-      } // for i
-
-      // Now check that we don't promote if we have an out of flow descendant.
-      // We need to hide the predecessor and successor so they don't interfere
-      // with this experiment.
-      predecessor.style.display = 'none';
-      successor.style.display = 'none';
-      for (i = 0; i < 3; ++i) {
-        if (i == 0)
-          descendant.style.display = 'hidden';
-        else if (i == 1)
-          descendant.style.display = '';
-        else
-          descendant.style.display = 'none';
-
-        // If the out of flow positioned descendant is visible, we cannot opt
-        // into composited scrolling.
-        printResult(i != 1);
-        count++;
-      } // for i
-
-    } // function doTest
-
-    window.addEventListener('load', doTest, false);
-  </script>
-</head>
-
-<body>
-  <div class="positioned" id="predecessor"></div>
-  <div class="container" id="container">
-    <div class="scrolled" id="firstChild"></div>
-    <div class="scrolled" id="secondChild"></div>
-    <div class="positioned" id="descendant"></div>
-  </div>
-  <div class="positioned" id="successor"></div>
-  <pre id="console"></pre>
-</body>
-</html>
-

Modified: trunk/LayoutTests/compositing/overflow/clipping-ancestor-with-accelerated-scrolling-ancestor.html (236423 => 236424)


--- trunk/LayoutTests/compositing/overflow/clipping-ancestor-with-accelerated-scrolling-ancestor.html	2018-09-24 20:15:17 UTC (rev 236423)
+++ trunk/LayoutTests/compositing/overflow/clipping-ancestor-with-accelerated-scrolling-ancestor.html	2018-09-24 20:19:46 UTC (rev 236424)
@@ -23,10 +23,6 @@
       height: 100px;
     }
   </style>
-  <script>
-    if (window.internals)
-      window.internals.settings.setAcceleratedCompositingForOverflowScrollEnabled(true);
-  </script>
 </head>
 
 <body>

Deleted: trunk/LayoutTests/compositing/overflow/composited-scrolling-creates-a-stacking-container.html (236423 => 236424)


--- trunk/LayoutTests/compositing/overflow/composited-scrolling-creates-a-stacking-container.html	2018-09-24 20:15:17 UTC (rev 236423)
+++ trunk/LayoutTests/compositing/overflow/composited-scrolling-creates-a-stacking-container.html	2018-09-24 20:19:46 UTC (rev 236424)
@@ -1,77 +0,0 @@
-<!-- webkit-test-runner [ useThreadedScrolling=false ] -->
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-   "http://www.w3.org/TR/html4/loose.dtd">
-
-<html lang="en">
-<head>
-  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
-  <title>Composited scrolling creates a stacking context.</title>
-  <style type="text/css" media="screen">
-    .container {
-      width: 200px;
-      height: 200px;
-      overflow: scroll;
-      margin: 20px;
-      border: 1px solid black;
-    }
-
-    .composited {
-      width: 200px;
-      height: 150px;
-      -webkit-transform: translateZ(0);
-      background-color: green;
-    }
-
-    .not-composited {
-      width: 200px;
-      height: 150px;
-      background-color: blue;
-    }
-
-    .in-flow-positioned {
-      position: relative;
-      display: block;
-    }
-
-    .fixed {
-      z-index: -1;
-      position: absolute;
-      width: 200px;
-      height: 300px;
-      background-color: red;
-    }
-  </style>
-  <script type="text/_javascript_" charset="utf-8">
-    if (window.testRunner)
-      testRunner.dumpAsText();
-
-    if (window.internals)
-      window.internals.settings.setAcceleratedCompositingForOverflowScrollEnabled(true);
-
-    function doTest()
-    {
-      document.body.offsetTop;
-
-      if (window.internals) {
-        var layerTree = window.internals.layerTreeAsText(document);
-        var pre = document.getElementById('console');
-        var text = document.createTextNode(layerTree + '\n');
-        pre.appendChild(text);
-      }
-    }
-
-    window.addEventListener('load', doTest, false);
-  </script>
-</head>
-<body>
-  <div class="container">
-    <div class="in-flow-positioned">
-      <div class="fixed"></div>
-    </div>
-    <div class="composited"></div>
-    <div class="not-composited"></div>
-  </div>
-  <pre id="console"></pre>
-</body>
-</html>
-

Modified: trunk/LayoutTests/compositing/overflow/composited-scrolling-paint-phases.html (236423 => 236424)


--- trunk/LayoutTests/compositing/overflow/composited-scrolling-paint-phases.html	2018-09-24 20:15:17 UTC (rev 236423)
+++ trunk/LayoutTests/compositing/overflow/composited-scrolling-paint-phases.html	2018-09-24 20:19:46 UTC (rev 236424)
@@ -34,9 +34,6 @@
     if (window.testRunner)
       window.testRunner.dumpAsText(false);
 
-    if (window.internals)
-      window.internals.settings.setAcceleratedCompositingForOverflowScrollEnabled(true);
-
     function write(str)
     {
       var pre = document.getElementById('console');

Modified: trunk/LayoutTests/compositing/overflow/do-not-paint-outline-into-composited-scrolling-contents.html (236423 => 236424)


--- trunk/LayoutTests/compositing/overflow/do-not-paint-outline-into-composited-scrolling-contents.html	2018-09-24 20:15:17 UTC (rev 236423)
+++ trunk/LayoutTests/compositing/overflow/do-not-paint-outline-into-composited-scrolling-contents.html	2018-09-24 20:19:46 UTC (rev 236424)
@@ -12,9 +12,6 @@
     if (window.testRunner)
       window.testRunner.dumpAsText(true);
 
-    if (window.internals)
-      window.internals.settings.setAcceleratedCompositingForOverflowScrollEnabled(true);
-
     function endTest()
     {
       var textarea = document.getElementById('text');

Modified: trunk/LayoutTests/compositing/overflow/dynamic-composited-scrolling-status.html (236423 => 236424)


--- trunk/LayoutTests/compositing/overflow/dynamic-composited-scrolling-status.html	2018-09-24 20:15:17 UTC (rev 236423)
+++ trunk/LayoutTests/compositing/overflow/dynamic-composited-scrolling-status.html	2018-09-24 20:19:46 UTC (rev 236424)
@@ -20,9 +20,6 @@
     if (window.testRunner)
       testRunner.dumpAsText();
 
-    if (window.internals)
-      window.internals.settings.setAcceleratedCompositingForOverflowScrollEnabled(true);
-
     function doTest()
     {
       document.body.offsetHeight;

Modified: trunk/LayoutTests/compositing/overflow/iframe-inside-overflow-clipping.html (236423 => 236424)


--- trunk/LayoutTests/compositing/overflow/iframe-inside-overflow-clipping.html	2018-09-24 20:15:17 UTC (rev 236423)
+++ trunk/LayoutTests/compositing/overflow/iframe-inside-overflow-clipping.html	2018-09-24 20:19:46 UTC (rev 236424)
@@ -31,8 +31,6 @@
   <script>
     if (window.testRunner)
       testRunner.dumpAsText();
-    if (window.internals)
-      window.internals.settings.setAcceleratedCompositingForOverflowScrollEnabled(true);
   </script>
 </head>
 

Modified: trunk/LayoutTests/compositing/overflow/nested-scrolling.html (236423 => 236424)


--- trunk/LayoutTests/compositing/overflow/nested-scrolling.html	2018-09-24 20:15:17 UTC (rev 236423)
+++ trunk/LayoutTests/compositing/overflow/nested-scrolling.html	2018-09-24 20:19:46 UTC (rev 236424)
@@ -30,10 +30,6 @@
       margin-bottom: 3em;
     }
   </style>
-  <script>
-    if (window.internals)
-      window.internals.settings.setAcceleratedCompositingForOverflowScrollEnabled(true);
-  </script>
 </head>
 <body>
 

Modified: trunk/LayoutTests/compositing/overflow/overflow-clip-with-accelerated-scrolling-ancestor.html (236423 => 236424)


--- trunk/LayoutTests/compositing/overflow/overflow-clip-with-accelerated-scrolling-ancestor.html	2018-09-24 20:15:17 UTC (rev 236423)
+++ trunk/LayoutTests/compositing/overflow/overflow-clip-with-accelerated-scrolling-ancestor.html	2018-09-24 20:19:46 UTC (rev 236424)
@@ -22,10 +22,6 @@
       background-color: red;
     }
   </style>
-  <script>
-    if (window.internals)
-      window.internals.settings.setAcceleratedCompositingForOverflowScrollEnabled(true);
-  </script>
 </head>
 
 <body>

Modified: trunk/LayoutTests/compositing/overflow/paint-neg-z-order-descendants-into-scrolling-contents-layer.html (236423 => 236424)


--- trunk/LayoutTests/compositing/overflow/paint-neg-z-order-descendants-into-scrolling-contents-layer.html	2018-09-24 20:15:17 UTC (rev 236423)
+++ trunk/LayoutTests/compositing/overflow/paint-neg-z-order-descendants-into-scrolling-contents-layer.html	2018-09-24 20:19:46 UTC (rev 236424)
@@ -27,9 +27,6 @@
     if (window.testRunner)
       window.testRunner.dumpAsText(true);
 
-    if (window.internals)
-      window.internals.settings.setAcceleratedCompositingForOverflowScrollEnabled(true);
-
     function endTest()
     {
       var textarea = document.getElementById('container');

Modified: trunk/LayoutTests/compositing/overflow/scrolling-content-clip-to-viewport.html (236423 => 236424)


--- trunk/LayoutTests/compositing/overflow/scrolling-content-clip-to-viewport.html	2018-09-24 20:15:17 UTC (rev 236423)
+++ trunk/LayoutTests/compositing/overflow/scrolling-content-clip-to-viewport.html	2018-09-24 20:19:46 UTC (rev 236424)
@@ -29,8 +29,6 @@
   <script>
     if (window.testRunner)
       testRunner.dumpAsText();
-    if (window.internals)
-      window.internals.settings.setAcceleratedCompositingForOverflowScrollEnabled(true);
 
     window.addEventListener('load', function() {
       if (window.testRunner)

Modified: trunk/LayoutTests/compositing/overflow/scrolling-without-painting.html (236423 => 236424)


--- trunk/LayoutTests/compositing/overflow/scrolling-without-painting.html	2018-09-24 20:15:17 UTC (rev 236423)
+++ trunk/LayoutTests/compositing/overflow/scrolling-without-painting.html	2018-09-24 20:19:46 UTC (rev 236424)
@@ -23,9 +23,6 @@
     }
   </style>
   <script type="text/_javascript_">
-      if (window.internals)
-          window.internals.settings.setAcceleratedCompositingForOverflowScrollEnabled(true);
-
       window.addEventListener('load', function() {
           if (!window.testRunner || !window.internals) {
               alert('This test requires testRunner to run!');

Modified: trunk/LayoutTests/compositing/overflow/textarea-scroll-touch.html (236423 => 236424)


--- trunk/LayoutTests/compositing/overflow/textarea-scroll-touch.html	2018-09-24 20:15:17 UTC (rev 236423)
+++ trunk/LayoutTests/compositing/overflow/textarea-scroll-touch.html	2018-09-24 20:19:46 UTC (rev 236424)
@@ -20,9 +20,6 @@
     if (window.testRunner)
       testRunner.dumpAsText();
 
-    if (window.internals)
-      window.internals.settings.setAcceleratedCompositingForOverflowScrollEnabled(true);
-
     function testScrollability(element)
     {
       // This will cause scrollable element content layers to be offset by y=50 with respect to their scrolling container.

Modified: trunk/LayoutTests/compositing/overflow/updating-scrolling-content.html (236423 => 236424)


--- trunk/LayoutTests/compositing/overflow/updating-scrolling-content.html	2018-09-24 20:15:17 UTC (rev 236423)
+++ trunk/LayoutTests/compositing/overflow/updating-scrolling-content.html	2018-09-24 20:19:46 UTC (rev 236424)
@@ -27,9 +27,6 @@
     }
   </style>
   <script type="text/_javascript_">
-      if (window.internals)
-          window.internals.settings.setAcceleratedCompositingForOverflowScrollEnabled(true);
-
       window.addEventListener('load', function() {
           if (!window.testRunner || !window.internals) {
               alert('This test requires testRunner to run!');

Modified: trunk/LayoutTests/compositing/rtl/rtl-overflow-scrolling.html (236423 => 236424)


--- trunk/LayoutTests/compositing/rtl/rtl-overflow-scrolling.html	2018-09-24 20:15:17 UTC (rev 236423)
+++ trunk/LayoutTests/compositing/rtl/rtl-overflow-scrolling.html	2018-09-24 20:19:46 UTC (rev 236424)
@@ -2,9 +2,6 @@
 <html>
 <head>
 <script type="text/_javascript_">
-    if (window.internals)
-        window.internals.settings.setAcceleratedCompositingForOverflowScrollEnabled(true);
-
     function runTest() {
         document.getElementById("container").scrollLeft = -715;
     }

Deleted: trunk/LayoutTests/platform/gtk/compositing/overflow/composited-scrolling-creates-a-stacking-container-expected.txt (236423 => 236424)


--- trunk/LayoutTests/platform/gtk/compositing/overflow/composited-scrolling-creates-a-stacking-container-expected.txt	2018-09-24 20:15:17 UTC (rev 236423)
+++ trunk/LayoutTests/platform/gtk/compositing/overflow/composited-scrolling-creates-a-stacking-container-expected.txt	2018-09-24 20:19:46 UTC (rev 236424)
@@ -1,59 +0,0 @@
-(GraphicsLayer
-  (anchor 0.00 0.00)
-  (bounds 800.00 600.00)
-  (children 1
-    (GraphicsLayer
-      (bounds 800.00 600.00)
-      (contentsOpaque 1)
-      (children 1
-        (GraphicsLayer
-          (position 28.00 20.00)
-          (bounds 202.00 202.00)
-          (drawsContent 1)
-          (children 4
-            (GraphicsLayer
-              (offsetFromRenderer width=-1 height=-1)
-              (position 1.00 1.00)
-              (bounds 185.00 185.00)
-              (children 1
-                (GraphicsLayer
-                  (offsetFromRenderer width=1 height=1)
-                  (bounds 200.00 300.00)
-                  (drawsContent 1)
-                  (children 2
-                    (GraphicsLayer
-                      (offsetFromRenderer width=1 height=1)
-                      (bounds 200.00 300.00)
-                      (drawsContent 1)
-                    )
-                    (GraphicsLayer
-                      (bounds 200.00 150.00)
-                      (contentsOpaque 1)
-                    )
-                  )
-                )
-              )
-            )
-            (GraphicsLayer
-              (position 1.00 186.00)
-              (bounds 185.00 15.00)
-              (drawsContent 1)
-            )
-            (GraphicsLayer
-              (position 186.00 1.00)
-              (bounds 15.00 185.00)
-              (drawsContent 1)
-            )
-            (GraphicsLayer
-              (position 186.00 186.00)
-              (bounds 15.00 15.00)
-              (drawsContent 1)
-            )
-          )
-        )
-      )
-    )
-  )
-)
-
-

Deleted: trunk/LayoutTests/platform/ios/compositing/overflow/automatically-opt-into-composited-scrolling-expected.txt (236423 => 236424)


--- trunk/LayoutTests/platform/ios/compositing/overflow/automatically-opt-into-composited-scrolling-expected.txt	2018-09-24 20:15:17 UTC (rev 236423)
+++ trunk/LayoutTests/platform/ios/compositing/overflow/automatically-opt-into-composited-scrolling-expected.txt	2018-09-24 20:19:46 UTC (rev 236424)
@@ -1,127 +0,0 @@
-Iteration 0: Passed
-Iteration 0, layer tree
-Iteration 1: Passed
-Iteration 1, layer tree
-Iteration 2: Passed
-Iteration 2, layer tree
-Iteration 3: Passed
-Iteration 3, layer tree
-Iteration 4: Passed
-Iteration 4, layer tree
-Iteration 5: Passed
-Iteration 5, layer tree
-Iteration 6: Passed
-Iteration 6, layer tree
-Iteration 7: Passed
-Iteration 7, layer tree
-Iteration 8: Passed
-Iteration 8, no layer tree
-Iteration 9: Passed
-Iteration 9, no layer tree
-Iteration 10: Passed
-Iteration 10, layer tree
-Iteration 11: Passed
-Iteration 11, layer tree
-Iteration 12: Passed
-Iteration 12, no layer tree
-Iteration 13: Passed
-Iteration 13, no layer tree
-Iteration 14: Passed
-Iteration 14, no layer tree
-Iteration 15: Passed
-Iteration 15, no layer tree
-Iteration 16: Passed
-Iteration 16, no layer tree
-Iteration 17: Passed
-Iteration 17, no layer tree
-Iteration 18: Passed
-Iteration 18, no layer tree
-Iteration 19: Passed
-Iteration 19, no layer tree
-Iteration 20: Passed
-Iteration 20, layer tree
-Iteration 21: Passed
-Iteration 21, layer tree
-Iteration 22: Passed
-Iteration 22, layer tree
-Iteration 23: Passed
-Iteration 23, layer tree
-Iteration 24: Passed
-Iteration 24, layer tree
-Iteration 25: Passed
-Iteration 25, layer tree
-Iteration 26: Passed
-Iteration 26, layer tree
-Iteration 27: Passed
-Iteration 27, layer tree
-Iteration 28: Passed
-Iteration 28, layer tree
-Iteration 29: Passed
-Iteration 29, layer tree
-Iteration 30: Passed
-Iteration 30, layer tree
-Iteration 31: Passed
-Iteration 31, layer tree
-Iteration 32: Passed
-Iteration 32, layer tree
-Iteration 33: Passed
-Iteration 33, layer tree
-Iteration 34: Passed
-Iteration 34, no layer tree
-Iteration 35: Passed
-Iteration 35, no layer tree
-Iteration 36: Passed
-Iteration 36, layer tree
-Iteration 37: Passed
-Iteration 37, layer tree
-Iteration 38: Passed
-Iteration 38, no layer tree
-Iteration 39: Passed
-Iteration 39, no layer tree
-Iteration 40: Passed
-Iteration 40, layer tree
-Iteration 41: Passed
-Iteration 41, layer tree
-Iteration 42: Passed
-Iteration 42, layer tree
-Iteration 43: Passed
-Iteration 43, layer tree
-Iteration 44: Passed
-Iteration 44, layer tree
-Iteration 45: Passed
-Iteration 45, layer tree
-Iteration 46: Passed
-Iteration 46, layer tree
-Iteration 47: Passed
-Iteration 47, layer tree
-Iteration 48: Passed
-Iteration 48, no layer tree
-Iteration 49: Passed
-Iteration 49, no layer tree
-Iteration 50: Passed
-Iteration 50, layer tree
-Iteration 51: Passed
-Iteration 51, layer tree
-Iteration 52: Passed
-Iteration 52, layer tree
-Iteration 53: Passed
-Iteration 53, layer tree
-Iteration 54: Passed
-Iteration 54, no layer tree
-Iteration 55: Passed
-Iteration 55, no layer tree
-Iteration 56: Passed
-Iteration 56, no layer tree
-Iteration 57: Passed
-Iteration 57, no layer tree
-Iteration 58: Passed
-Iteration 58, no layer tree
-Iteration 59: Passed
-Iteration 59, no layer tree
-Iteration 60: Passed
-Iteration 60, layer tree
-Iteration 61: Passed
-Iteration 61, no layer tree
-Iteration 62: Passed
-Iteration 62, layer tree
-

Deleted: trunk/LayoutTests/platform/ios/compositing/overflow/composited-scrolling-creates-a-stacking-container-expected.txt (236423 => 236424)


--- trunk/LayoutTests/platform/ios/compositing/overflow/composited-scrolling-creates-a-stacking-container-expected.txt	2018-09-24 20:15:17 UTC (rev 236423)
+++ trunk/LayoutTests/platform/ios/compositing/overflow/composited-scrolling-creates-a-stacking-container-expected.txt	2018-09-24 20:19:46 UTC (rev 236424)
@@ -1,52 +0,0 @@
-(GraphicsLayer
-  (anchor 0.00 0.00)
-  (bounds 800.00 600.00)
-  (children 1
-    (GraphicsLayer
-      (bounds 800.00 600.00)
-      (contentsOpaque 1)
-      (children 1
-        (GraphicsLayer
-          (position 28.00 20.00)
-          (bounds 202.00 202.00)
-          (drawsContent 1)
-          (children 4
-            (GraphicsLayer
-              (offsetFromRenderer width=1 height=1)
-              (position 1.00 1.00)
-              (bounds 185.00 185.00)
-              (children 2
-                (GraphicsLayer
-                  (offsetFromRenderer width=1 height=1)
-                  (bounds 185.00 185.00)
-                  (drawsContent 1)
-                )
-                (GraphicsLayer
-                  (bounds 200.00 150.00)
-                  (contentsOpaque 1)
-                )
-              )
-            )
-            (GraphicsLayer
-              (position 1.00 186.00)
-              (bounds 185.00 15.00)
-              (drawsContent 1)
-            )
-            (GraphicsLayer
-              (position 186.00 1.00)
-              (bounds 15.00 185.00)
-              (drawsContent 1)
-            )
-            (GraphicsLayer
-              (position 186.00 186.00)
-              (bounds 15.00 15.00)
-              (drawsContent 1)
-            )
-          )
-        )
-      )
-    )
-  )
-)
-
-

Modified: trunk/LayoutTests/platform/ios-simulator-wk2/TestExpectations (236423 => 236424)


--- trunk/LayoutTests/platform/ios-simulator-wk2/TestExpectations	2018-09-24 20:15:17 UTC (rev 236423)
+++ trunk/LayoutTests/platform/ios-simulator-wk2/TestExpectations	2018-09-24 20:19:46 UTC (rev 236424)
@@ -14,7 +14,7 @@
 fast/events/scroll-to-anchor-vertical-writing-mode.html [ ImageOnlyFailure ]
 fast/sub-pixel/sub-pixel-composited-layers.html [ ImageOnlyFailure ]
 
-webkit.org/b/152439 compositing/overflow/dynamic-composited-scrolling-status.html [ Failure ]
+webkit.org/b/152439 compositing/overflow/dynamic-composited-scrolling-status.html [ Pass Failure ]
 
 webkit.org/b/173178 [ Release ] svg/animations/svglength-element-removed-crash.svg [ Skip ]
 

Modified: trunk/LayoutTests/platform/ios-wk1/TestExpectations (236423 => 236424)


--- trunk/LayoutTests/platform/ios-wk1/TestExpectations	2018-09-24 20:15:17 UTC (rev 236423)
+++ trunk/LayoutTests/platform/ios-wk1/TestExpectations	2018-09-24 20:19:46 UTC (rev 236424)
@@ -568,10 +568,8 @@
 compositing/layer-creation/no-compositing-for-preserve-3d.html [ Failure ]
 compositing/layer-creation/no-compositing-for-sticky.html [ Failure ]
 compositing/layer-creation/overflow-scroll-overlap.html [ Failure ]
-compositing/overflow/automatically-opt-into-composited-scrolling.html [ Failure ]
 compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants.html [ Failure ]
 compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants2.html [ Failure ]
-compositing/overflow/composited-scrolling-creates-a-stacking-container.html [ Failure ]
 compositing/overflow/composited-scrolling-paint-phases.html [ Failure ]
 compositing/overflow/content-gains-scrollbars.html [ Failure ]
 compositing/overflow/overflow-scroll.html [ Failure ]

Deleted: trunk/LayoutTests/platform/mac/compositing/overflow/composited-scrolling-creates-a-stacking-container-expected.txt (236423 => 236424)


--- trunk/LayoutTests/platform/mac/compositing/overflow/composited-scrolling-creates-a-stacking-container-expected.txt	2018-09-24 20:15:17 UTC (rev 236423)
+++ trunk/LayoutTests/platform/mac/compositing/overflow/composited-scrolling-creates-a-stacking-container-expected.txt	2018-09-24 20:19:46 UTC (rev 236424)
@@ -1,59 +0,0 @@
-(GraphicsLayer
-  (anchor 0.00 0.00)
-  (bounds 800.00 600.00)
-  (children 1
-    (GraphicsLayer
-      (bounds 800.00 600.00)
-      (contentsOpaque 1)
-      (children 1
-        (GraphicsLayer
-          (position 28.00 20.00)
-          (bounds 202.00 202.00)
-          (drawsContent 1)
-          (children 4
-            (GraphicsLayer
-              (offsetFromRenderer width=-1 height=-1)
-              (position 1.00 1.00)
-              (bounds 185.00 185.00)
-              (children 1
-                (GraphicsLayer
-                  (offsetFromRenderer width=1 height=1)
-                  (bounds 200.00 300.00)
-                  (drawsContent 1)
-                  (children 2
-                    (GraphicsLayer
-                      (offsetFromRenderer width=1 height=1)
-                      (bounds 200.00 300.00)
-                      (drawsContent 1)
-                    )
-                    (GraphicsLayer
-                      (bounds 200.00 150.00)
-                      (contentsOpaque 1)
-                    )
-                  )
-                )
-              )
-            )
-            (GraphicsLayer
-              (position 1.00 186.00)
-              (bounds 185.00 15.00)
-              (drawsContent 1)
-            )
-            (GraphicsLayer
-              (position 186.00 1.00)
-              (bounds 15.00 185.00)
-              (drawsContent 1)
-            )
-            (GraphicsLayer
-              (position 186.00 186.00)
-              (bounds 15.00 15.00)
-              (drawsContent 1)
-            )
-          )
-        )
-      )
-    )
-  )
-)
-
-

Modified: trunk/Source/WebCore/ChangeLog (236423 => 236424)


--- trunk/Source/WebCore/ChangeLog	2018-09-24 20:15:17 UTC (rev 236423)
+++ trunk/Source/WebCore/ChangeLog	2018-09-24 20:19:46 UTC (rev 236424)
@@ -1,3 +1,71 @@
+2018-09-21  Simon Fraser  <[email protected]>
+
+        Remove the old "AcceleratedCompositingForOverflowScroll" code
+        https://bugs.webkit.org/show_bug.cgi?id=189870
+
+        Reviewed by Zalan Bujtas.
+
+        The "AcceleratedCompositingForOverflowScroll" code was added to allow overflow:scroll to use
+        composited scrolling if an overflow:scroll could be made a stacking context without affecting
+        z-order. We need overflow:scroll to be accelerated always, so a different approach is needed.
+        Remove this old code (unused by any platform?) to make working on new code easier.
+
+        * page/Settings.yaml:
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::RenderLayer):
+        (WebCore::RenderLayer::setHasVisibleContent):
+        (WebCore::RenderLayer::updateDescendantDependentFlags):
+        (WebCore::RenderLayer::dirty3DTransformedDescendantStatus):
+        (WebCore::RenderLayer::stackingContext const):
+        (WebCore::compositingContainer):
+        (WebCore::RenderLayer::addChild):
+        (WebCore::RenderLayer::removeChild):
+        (WebCore::RenderLayer::hasAcceleratedTouchScrolling const):
+        (WebCore::RenderLayer::usesAcceleratedScrolling const):
+        (WebCore::adjustedScrollDelta):
+        (WebCore::RenderLayer::updateCompositingLayersAfterScroll):
+        (WebCore::RenderLayer::updateScrollInfoAfterLayout):
+        (WebCore::RenderLayer::enclosingFragmentedFlowAncestor const):
+        (WebCore::RenderLayer::calculateClipRects const):
+        (WebCore::RenderLayer::acceleratedCompositingForOverflowScrollEnabled const): Deleted.
+        (WebCore::RenderLayer::updateDescendantsAreContiguousInStackingOrder): Deleted.
+        (WebCore::RenderLayer::updateDescendantsAreContiguousInStackingOrderRecursive): Deleted.
+        (WebCore::RenderLayer::positionNewlyCreatedOverflowControls): Deleted.
+        (WebCore::RenderLayer::canBeStackingContainer const): Deleted.
+        (WebCore::RenderLayer::stackingContainer const): Deleted.
+        (WebCore::RenderLayer::needsCompositedScrolling const): Deleted.
+        (WebCore::RenderLayer::updateNeedsCompositedScrolling): Deleted.
+        * rendering/RenderLayer.h:
+        (WebCore::RenderLayer::clearZOrderLists):
+        (WebCore::RenderLayer::updateZOrderLists):
+        * rendering/RenderLayerBacking.cpp:
+        (WebCore::RenderLayerBacking::updateAfterLayout):
+        (WebCore::RenderLayerBacking::computeParentGraphicsLayerRect const):
+        (WebCore::RenderLayerBacking::updateGeometry):
+        (WebCore::RenderLayerBacking::requiresHorizontalScrollbarLayer const):
+        (WebCore::RenderLayerBacking::requiresVerticalScrollbarLayer const):
+        (WebCore::RenderLayerBacking::requiresScrollCornerLayer const):
+        (WebCore::RenderLayerBacking::compositingOpacity const):
+        (WebCore::traverseVisibleNonCompositedDescendantLayers):
+        (WebCore::RenderLayerBacking::hasUnpositionedOverflowControlsLayers const): Deleted.
+        * rendering/RenderLayerBacking.h:
+        * rendering/RenderLayerCompositor.cpp:
+        (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayersAfterFlush):
+        (WebCore::RenderLayerCompositor::updateCustomLayersAfterFlush):
+        (WebCore::styleChangeRequiresLayerRebuild):
+        (WebCore::RenderLayerCompositor::enclosingNonStackingClippingLayer const):
+        (WebCore::RenderLayerCompositor::computeCompositingRequirements):
+        (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
+        (WebCore::RenderLayerCompositor::requiresCompositingLayer const):
+        (WebCore::RenderLayerCompositor::requiresOwnBackingStore const):
+        (WebCore::RenderLayerCompositor::reasonsForCompositing const):
+        (WebCore::RenderLayerCompositor::requiresCompositingForBackfaceVisibility const):
+        (WebCore::RenderLayerCompositor::isViewportConstrainedFixedOrStickyLayer const):
+        (WebCore::RenderLayerCompositor::requiresCompositingForPosition const):
+        (WebCore::RenderLayerCompositor::requiresCompositingForOverflowScrolling const):
+        (WebCore::RenderLayerCompositor::requiresCompositingForScrolling const): Deleted.
+        * rendering/RenderLayerCompositor.h:
+
 2018-09-24  Youenn Fablet  <[email protected]>
 
         Enable conversion of libwebrtc internal frames as CVPixelBuffer

Modified: trunk/Source/WebCore/page/Settings.yaml (236423 => 236424)


--- trunk/Source/WebCore/page/Settings.yaml	2018-09-24 20:15:17 UTC (rev 236423)
+++ trunk/Source/WebCore/page/Settings.yaml	2018-09-24 20:19:46 UTC (rev 236424)
@@ -214,8 +214,6 @@
   initial: false
 acceleratedCompositingForFixedPositionEnabled:
   initial: defaultAcceleratedCompositingForFixedPositionEnabled
-acceleratedCompositingForOverflowScrollEnabled:
-  initial: false
 rubberBandingForSubScrollableRegionsEnabled:
   initial: true
   conditional: RUBBER_BANDING

Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (236423 => 236424)


--- trunk/Source/WebCore/rendering/RenderLayer.cpp	2018-09-24 20:15:17 UTC (rev 236423)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp	2018-09-24 20:19:46 UTC (rev 236424)
@@ -276,10 +276,6 @@
     , m_normalFlowListDirty(true)
     , m_hasSelfPaintingLayerDescendant(false)
     , m_hasSelfPaintingLayerDescendantDirty(false)
-    , m_hasOutOfFlowPositionedDescendant(false)
-    , m_hasOutOfFlowPositionedDescendantDirty(true)
-    , m_needsCompositedScrolling(false)
-    , m_descendantsAreContiguousInStackingOrder(false)
     , m_usedTransparency(false)
     , m_paintingInsideReflection(false)
     , m_inOverflowRelayout(false)
@@ -324,7 +320,7 @@
 
     // Non-stacking containers should have empty z-order lists. As this is already the case,
     // there is no need to dirty / recompute these lists.
-    m_zOrderListsDirty = isStackingContainer();
+    m_zOrderListsDirty = isStackingContext();
 
     if (!renderer().firstChild()) {
         m_visibleContentStatusDirty = false;
@@ -624,164 +620,6 @@
     }
 }
 
-bool RenderLayer::acceleratedCompositingForOverflowScrollEnabled() const
-{
-    return renderer().settings().acceleratedCompositingForOverflowScrollEnabled();
-}
-
-// If we are a stacking container, then this function will determine if our
-// descendants for a contiguous block in stacking order. This is required in
-// order for an element to be safely promoted to a stacking container. It is safe
-// to become a stacking container if this change would not alter the stacking
-// order of layers on the page. That can only happen if a non-descendant appear
-// between us and our descendants in stacking order. Here's an example:
-//
-//                                 this
-//                                /  |  \.
-//                               A   B   C
-//                              /\   |   /\.
-//                             0 -8  D  2  7
-//                                   |
-//                                   5
-//
-// I've labeled our normal flow descendants A, B, C, and D, our stacking
-// container descendants with their z indices, and us with 'this' (we're a
-// stacking container and our zIndex doesn't matter here). These nodes appear in
-// three lists: posZOrder, negZOrder, and normal flow (keep in mind that normal
-// flow layers don't overlap). So if we arrange these lists in order we get our
-// stacking order:
-//
-//                     [-8], [A-D], [0, 2, 5, 7]--> pos z-order.
-//                       |     |
-//        Neg z-order. <-+     +--> Normal flow descendants.
-//
-// We can then assign new, 'stacking' order indices to these elements as follows:
-//
-//                     [-8], [A-D], [0, 2, 5, 7]
-// 'Stacking' indices:  -1     0     1  2  3  4
-//
-// Note that the normal flow descendants can share an index because they don't
-// stack/overlap. Now our problem becomes very simple: a layer can safely become
-// a stacking container if the stacking-order indices of it and its descendants
-// appear in a contiguous block in the list of stacking indices. This problem
-// can be solved very efficiently by calculating the min/max stacking indices in
-// the subtree, and the number stacking container descendants. Once we have this
-// information, we know that the subtree's indices form a contiguous block if:
-//
-//           maxStackIndex - minStackIndex == numSCDescendants
-//
-// So for node A in the example above we would have:
-//   maxStackIndex = 1
-//   minStackIndex = -1
-//   numSCDecendants = 2
-//
-// and so,
-//       maxStackIndex - minStackIndex == numSCDescendants
-//  ===>                      1 - (-1) == 2
-//  ===>                             2 == 2
-//
-//  Since this is true, A can safely become a stacking container.
-//  Now, for node C we have:
-//
-//   maxStackIndex = 4
-//   minStackIndex = 0 <-- because C has stacking index 0.
-//   numSCDecendants = 2
-//
-// and so,
-//       maxStackIndex - minStackIndex == numSCDescendants
-//  ===>                         4 - 0 == 2
-//  ===>                             4 == 2
-//
-// Since this is false, C cannot be safely promoted to a stacking container. This
-// happened because of the elements with z-index 5 and 0. Now if 5 had been a
-// child of C rather than D, and A had no child with Z index 0, we would have had:
-//
-//   maxStackIndex = 3
-//   minStackIndex = 0 <-- because C has stacking index 0.
-//   numSCDecendants = 3
-//
-// and so,
-//       maxStackIndex - minStackIndex == numSCDescendants
-//  ===>                         3 - 0 == 3
-//  ===>                             3 == 3
-//
-//  And we would conclude that C could be promoted.
-void RenderLayer::updateDescendantsAreContiguousInStackingOrder()
-{
-    if (!isStackingContext() || !acceleratedCompositingForOverflowScrollEnabled())
-        return;
-
-    ASSERT(!m_normalFlowListDirty);
-    ASSERT(!m_zOrderListsDirty);
-
-    std::unique_ptr<Vector<RenderLayer*>> posZOrderList;
-    std::unique_ptr<Vector<RenderLayer*>> negZOrderList;
-    rebuildZOrderLists(StopAtStackingContexts, posZOrderList, negZOrderList);
-
-    // Create a reverse lookup.
-    HashMap<const RenderLayer*, int> lookup;
-
-    if (negZOrderList) {
-        int stackingOrderIndex = -1;
-        size_t listSize = negZOrderList->size();
-        for (size_t i = 0; i < listSize; ++i) {
-            RenderLayer* currentLayer = negZOrderList->at(listSize - i - 1);
-            if (!currentLayer->isStackingContext())
-                continue;
-            lookup.set(currentLayer, stackingOrderIndex--);
-        }
-    }
-
-    if (posZOrderList) {
-        size_t listSize = posZOrderList->size();
-        int stackingOrderIndex = 1;
-        for (size_t i = 0; i < listSize; ++i) {
-            RenderLayer* currentLayer = posZOrderList->at(i);
-            if (!currentLayer->isStackingContext())
-                continue;
-            lookup.set(currentLayer, stackingOrderIndex++);
-        }
-    }
-
-    int minIndex = 0;
-    int maxIndex = 0;
-    int count = 0;
-    bool firstIteration = true;
-    updateDescendantsAreContiguousInStackingOrderRecursive(lookup, minIndex, maxIndex, count, firstIteration);
-}
-
-void RenderLayer::updateDescendantsAreContiguousInStackingOrderRecursive(const HashMap<const RenderLayer*, int>& lookup, int& minIndex, int& maxIndex, int& count, bool firstIteration)
-{
-    if (isStackingContext() && !firstIteration) {
-        if (lookup.contains(this)) {
-            minIndex = std::min(minIndex, lookup.get(this));
-            maxIndex = std::max(maxIndex, lookup.get(this));
-            count++;
-        }
-        return;
-    }
-
-    for (RenderLayer* child = firstChild(); child; child = child->nextSibling()) {
-        int childMinIndex = 0;
-        int childMaxIndex = 0;
-        int childCount = 0;
-        child->updateDescendantsAreContiguousInStackingOrderRecursive(lookup, childMinIndex, childMaxIndex, childCount, false);
-        if (childCount) {
-            count += childCount;
-            minIndex = std::min(minIndex, childMinIndex);
-            maxIndex = std::max(maxIndex, childMaxIndex);
-        }
-    }
-
-    if (!isStackingContext()) {
-        bool newValue = maxIndex - minIndex == count;
-        bool didUpdate = newValue != m_descendantsAreContiguousInStackingOrder;
-        m_descendantsAreContiguousInStackingOrder = newValue;
-        if (didUpdate)
-            updateNeedsCompositedScrolling();
-    }
-}
-
 void RenderLayer::computeRepaintRects(const RenderLayerModelObject* repaintContainer, const RenderGeometryMap* geometryMap)
 {
     ASSERT(!m_visibleContentStatusDirty);
@@ -892,19 +730,6 @@
     renderer().document().markers().invalidateRectsForAllMarkers();
 }
 
-void RenderLayer::positionNewlyCreatedOverflowControls()
-{
-    if (!backing()->hasUnpositionedOverflowControlsLayers())
-        return;
-
-    RenderGeometryMap geometryMap(UseTransforms);
-    if (this != renderer().view().layer() && parent())
-        geometryMap.pushMappingsToAncestor(parent(), nullptr);
-
-    LayoutPoint offsetFromRoot = LayoutPoint(geometryMap.absolutePoint(FloatPoint()));
-    positionOverflowControls(toIntSize(roundedIntPoint(offsetFromRoot)));
-}
-
 #if ENABLE(CSS_COMPOSITING)
 
 void RenderLayer::updateBlendMode()
@@ -1126,14 +951,6 @@
     }
 }
 
-bool RenderLayer::canBeStackingContainer() const
-{
-    if (isStackingContext() || !stackingContainer())
-        return true;
-
-    return m_descendantsAreContiguousInStackingOrder;
-}
-
 void RenderLayer::setHasVisibleContent()
 { 
     if (m_hasVisibleContent && !m_visibleContentStatusDirty) {
@@ -1148,7 +965,7 @@
         // We don't collect invisible layers in z-order lists if we are not in compositing mode.
         // As we became visible, we need to dirty our stacking containers ancestors to be properly
         // collected. FIXME: When compositing, we could skip this dirtying phase.
-        for (RenderLayer* sc = stackingContainer(); sc; sc = sc->stackingContainer()) {
+        for (RenderLayer* sc = stackingContext(); sc; sc = sc->stackingContext()) {
             sc->dirtyZOrderLists();
             if (sc->hasVisibleContent())
                 break;
@@ -1189,10 +1006,9 @@
 
 void RenderLayer::updateDescendantDependentFlags(HashSet<const RenderObject*>* outOfFlowDescendantContainingBlocks)
 {
-    if (m_visibleDescendantStatusDirty || m_hasSelfPaintingLayerDescendantDirty || m_hasOutOfFlowPositionedDescendantDirty || hasNotIsolatedBlendingDescendantsStatusDirty()) {
+    if (m_visibleDescendantStatusDirty || m_hasSelfPaintingLayerDescendantDirty || hasNotIsolatedBlendingDescendantsStatusDirty()) {
         bool hasVisibleDescendant = false;
         bool hasSelfPaintingLayerDescendant = false;
-        bool hasOutOfFlowPositionedDescendant = false;
 #if ENABLE(CSS_COMPOSITING)
         bool hasNotIsolatedBlendingDescendants = false;
 #endif
@@ -1214,12 +1030,11 @@
 
             hasVisibleDescendant |= child->m_hasVisibleContent || child->m_hasVisibleDescendant;
             hasSelfPaintingLayerDescendant |= child->isSelfPaintingLayer() || child->hasSelfPaintingLayerDescendant();
-            hasOutOfFlowPositionedDescendant |= !childOutOfFlowDescendantContainingBlocks.isEmpty();
 #if ENABLE(CSS_COMPOSITING)
             hasNotIsolatedBlendingDescendants |= child->hasBlendMode() || (child->hasNotIsolatedBlendingDescendants() && !child->isolatesBlending());
 #endif
 
-            bool allFlagsSet = hasVisibleDescendant && hasSelfPaintingLayerDescendant && hasOutOfFlowPositionedDescendant;
+            bool allFlagsSet = hasVisibleDescendant && hasSelfPaintingLayerDescendant;
 #if ENABLE(CSS_COMPOSITING)
             allFlagsSet &= hasNotIsolatedBlendingDescendants;
 #endif
@@ -1235,11 +1050,6 @@
         m_hasSelfPaintingLayerDescendant = hasSelfPaintingLayerDescendant;
         m_hasSelfPaintingLayerDescendantDirty = false;
 
-        m_hasOutOfFlowPositionedDescendant = hasOutOfFlowPositionedDescendant;
-        if (m_hasOutOfFlowPositionedDescendantDirty)
-            updateNeedsCompositedScrolling();
-
-        m_hasOutOfFlowPositionedDescendantDirty = false;
 #if ENABLE(CSS_COMPOSITING)
         m_hasNotIsolatedBlendingDescendants = hasNotIsolatedBlendingDescendants;
         if (m_hasNotIsolatedBlendingDescendantsStatusDirty) {
@@ -1283,7 +1093,7 @@
 
 void RenderLayer::dirty3DTransformedDescendantStatus()
 {
-    RenderLayer* curr = stackingContainer();
+    RenderLayer* curr = stackingContext();
     if (curr)
         curr->m_3DTransformedDescendantStatusDirty = true;
         
@@ -1291,7 +1101,7 @@
     // Note that preserves3D() creates stacking context, so we can just run up the stacking containers.
     while (curr && curr->preserves3D()) {
         curr->m_3DTransformedDescendantStatusDirty = true;
-        curr = curr->stackingContainer();
+        curr = curr->stackingContext();
     }
 }
 
@@ -1438,13 +1248,13 @@
                       floatValueForLength(style.perspectiveOriginY(), borderBox.height()));
 }
 
-RenderLayer* RenderLayer::stackingContainer() const
+RenderLayer* RenderLayer::stackingContext() const
 {
     RenderLayer* layer = parent();
-    while (layer && !layer->isStackingContainer())
+    while (layer && !layer->isStackingContext())
         layer = layer->parent();
 
-    ASSERT(!layer || layer->isStackingContainer());
+    ASSERT(!layer || layer->isStackingContext());
     return layer;
 }
 
@@ -1532,7 +1342,7 @@
 
 static inline const RenderLayer* compositingContainer(const RenderLayer& layer)
 {
-    return layer.isNormalFlowOnly() ? layer.parent() : layer.stackingContainer();
+    return layer.isNormalFlowOnly() ? layer.parent() : layer.stackingContext();
 }
 
 inline bool RenderLayer::shouldRepaintAfterLayout() const
@@ -1863,10 +1673,10 @@
         dirtyNormalFlowList();
 
     if (!child->isNormalFlowOnly() || child->firstChild()) {
-        // Dirty the z-order list in which we are contained. The stackingContainer() can be null in the
+        // Dirty the z-order list in which we are contained. The stackingContext() can be null in the
         // case where we're building up generated content layers. This is ok, since the lists will start
         // off dirty in that case anyway.
-        child->dirtyStackingContainerZOrderLists();
+        child->dirtyStackingContextZOrderLists();
     }
 
     child->updateDescendantDependentFlags();
@@ -1876,9 +1686,6 @@
     if (child->isSelfPaintingLayer() || child->hasSelfPaintingLayerDescendant())
         setAncestorChainHasSelfPaintingLayerDescendant();
 
-    if (child->renderer().isOutOfFlowPositioned() || child->hasOutOfFlowPositionedDescendant())
-        setAncestorChainHasOutOfFlowPositionedDescendant(child->renderer().containingBlock());
-
 #if ENABLE(CSS_COMPOSITING)
     if (child->hasBlendMode() || (child->hasNotIsolatedBlendingDescendants() && !child->isolatesBlending()))
         updateAncestorChainHasBlendingDescendants();
@@ -1908,13 +1715,10 @@
     if (!oldChild->isNormalFlowOnly() || oldChild->firstChild()) { 
         // Dirty the z-order list in which we are contained.  When called via the
         // reattachment process in removeOnlyThisLayer, the layer may already be disconnected
-        // from the main layer tree, so we need to null-check the |stackingContainer| value.
-        oldChild->dirtyStackingContainerZOrderLists();
+        // from the main layer tree, so we need to null-check the |stackingContext| value.
+        oldChild->dirtyStackingContextZOrderLists();
     }
 
-    if (oldChild->renderer().isOutOfFlowPositioned() || oldChild->hasOutOfFlowPositionedDescendant())
-        dirtyAncestorChainHasOutOfFlowPositionedDescendantStatus();
-
     oldChild->setPreviousSibling(nullptr);
     oldChild->setNextSibling(nullptr);
     oldChild->setParent(nullptr);
@@ -2150,6 +1954,7 @@
 #if ENABLE(ACCELERATED_OVERFLOW_SCROLLING)
     if (!scrollsOverflow())
         return false;
+
     return renderer().style().useTouchOverflowScrolling() || renderer().settings().alwaysUseAcceleratedOverflowScroll();
 #else
     return false;
@@ -2178,7 +1983,7 @@
 #if PLATFORM(IOS)
     return hasTouchScrollableOverflow();
 #else
-    return needsCompositedScrolling();
+    return false;
 #endif
 }
 
@@ -2212,46 +2017,8 @@
     return hasAcceleratedTouchScrolling() && usesCompositedScrolling();
 }
 
-bool RenderLayer::needsCompositedScrolling() const
+static inline int adjustedScrollDelta(int beginningDelta)
 {
-    return m_needsCompositedScrolling;
-}
-
-void RenderLayer::updateNeedsCompositedScrolling()
-{
-    bool oldNeedsCompositedScrolling = m_needsCompositedScrolling;
-
-    if (!renderer().view().frameView().containsScrollableArea(this))
-        m_needsCompositedScrolling = false;
-    else {
-        bool forceUseCompositedScrolling = acceleratedCompositingForOverflowScrollEnabled()
-            && canBeStackingContainer()
-            && !hasOutOfFlowPositionedDescendant();
-
-#if !PLATFORM(IOS) && ENABLE(ACCELERATED_OVERFLOW_SCROLLING)
-        m_needsCompositedScrolling = forceUseCompositedScrolling || renderer().style().useTouchOverflowScrolling();
-#else
-        // On iOS we don't want to opt into accelerated composited scrolling, which creates scroll bar
-        // layers in WebCore, because we use UIKit to composite our scroll bars.
-        m_needsCompositedScrolling = forceUseCompositedScrolling;
-#endif
-    }
-
-    if (oldNeedsCompositedScrolling != m_needsCompositedScrolling) {
-        updateSelfPaintingLayer();
-        if (isStackingContainer())
-            dirtyZOrderLists();
-        else
-            clearZOrderLists();
-
-        dirtyStackingContainerZOrderLists();
-
-        compositor().setShouldReevaluateCompositingAfterLayout();
-        compositor().setCompositingLayersNeedRebuild();
-    }
-}
-
-static inline int adjustedScrollDelta(int beginningDelta) {
     // This implemention matches Firefox's.
     // http://mxr.mozilla.org/firefox/source/toolkit/content/widgets/browser.xml#856.
     const int speedReducer = 12;
@@ -2597,8 +2364,8 @@
     if (compositor().inCompositingMode()) {
         // Our stacking container is guaranteed to contain all of our descendants that may need
         // repositioning, so update compositing layers from there.
-        if (RenderLayer* compositingAncestor = stackingContainer()->enclosingCompositingLayer()) {
-            if (usesCompositedScrolling() && !hasOutOfFlowPositionedDescendant())
+        if (RenderLayer* compositingAncestor = stackingContext()->enclosingCompositingLayer()) {
+            if (usesCompositedScrolling())
                 compositor().updateCompositingLayers(CompositingUpdateType::OnCompositedScroll, compositingAncestor);
             else
                 compositor().updateCompositingLayers(CompositingUpdateType::OnScroll, compositingAncestor);
@@ -3549,6 +3316,7 @@
     updateScrollableAreaSet(hasScrollableHorizontalOverflow() || hasScrollableVerticalOverflow());
 }
 
+// This is called from layout code (before updateLayerPositions).
 void RenderLayer::updateScrollInfoAfterLayout()
 {
     RenderBox* box = renderBox();
@@ -3590,6 +3358,7 @@
         scrollToOffsetWithoutAnimation(IntPoint(scrollOffset()));
 
     // Composited scrolling may need to be enabled or disabled if the amount of overflow changed.
+    // FIXME: this should just dirty the layer and updateLayerPositions should do stuff.
     if (compositor().updateLayerCompositingState(*this))
         compositor().setCompositingLayersNeedRebuild();
 
@@ -4919,7 +4688,7 @@
 {
     RenderLayer* curr = parent();
     for (; curr && !curr->isRenderFragmentedFlow(); curr = curr->parent()) {
-        if (curr->isStackingContainer() && curr->isComposited()) {
+        if (curr->isStackingContext() && curr->isComposited()) {
             // We only adjust the position of the first level of layers.
             return nullptr;
         }
@@ -5860,7 +5629,7 @@
         }
     }
     
-    ASSERT(isStackingContainer() || (!posZOrderList() || !posZOrderList()->size()));
+    ASSERT(isStackingContext() || (!posZOrderList() || !posZOrderList()->size()));
 
 #if !ASSERT_DISABLED
     LayerListMutationDetector mutationChecker(const_cast<RenderLayer*>(this));
@@ -6099,7 +5868,7 @@
 void RenderLayer::dirtyZOrderLists()
 {
     ASSERT(m_layerListMutationAllowed);
-    ASSERT(isStackingContainer());
+    ASSERT(isStackingContext());
 
     if (m_posZOrderList)
         m_posZOrderList->clear();
@@ -6107,16 +5876,13 @@
         m_negZOrderList->clear();
     m_zOrderListsDirty = true;
 
-    if (!renderer().renderTreeBeingDestroyed()) {
+    if (!renderer().renderTreeBeingDestroyed())
         compositor().setCompositingLayersNeedRebuild();
-        if (acceleratedCompositingForOverflowScrollEnabled())
-            compositor().setShouldReevaluateCompositingAfterLayout();
-    }
 }
 
-void RenderLayer::dirtyStackingContainerZOrderLists()
+void RenderLayer::dirtyStackingContextZOrderLists()
 {
-    RenderLayer* sc = stackingContainer();
+    RenderLayer* sc = stackingContext();
     if (sc)
         sc->dirtyZOrderLists();
 }
@@ -6129,27 +5895,24 @@
         m_normalFlowList->clear();
     m_normalFlowListDirty = true;
 
-    if (!renderer().renderTreeBeingDestroyed()) {
+    if (!renderer().renderTreeBeingDestroyed())
         compositor().setCompositingLayersNeedRebuild();
-        if (acceleratedCompositingForOverflowScrollEnabled())
-            compositor().setShouldReevaluateCompositingAfterLayout();
-    }
 }
 
 void RenderLayer::rebuildZOrderLists()
 {
     ASSERT(m_layerListMutationAllowed);
-    ASSERT(isDirtyStackingContainer());
-    rebuildZOrderLists(StopAtStackingContainers, m_posZOrderList, m_negZOrderList);
+    ASSERT(isDirtyStackingContext());
+    rebuildZOrderLists(m_posZOrderList, m_negZOrderList);
     m_zOrderListsDirty = false;
 }
 
-void RenderLayer::rebuildZOrderLists(CollectLayersBehavior behavior, std::unique_ptr<Vector<RenderLayer*>>& posZOrderList, std::unique_ptr<Vector<RenderLayer*>>& negZOrderList)
+void RenderLayer::rebuildZOrderLists(std::unique_ptr<Vector<RenderLayer*>>& posZOrderList, std::unique_ptr<Vector<RenderLayer*>>& negZOrderList)
 {
     bool includeHiddenLayers = compositor().inCompositingMode();
     for (RenderLayer* child = firstChild(); child; child = child->nextSibling())
         if (!m_reflection || reflectionLayer() != child)
-            child->collectLayers(includeHiddenLayers, behavior, posZOrderList, negZOrderList);
+            child->collectLayers(includeHiddenLayers, posZOrderList, negZOrderList);
 
     // Sort the two lists.
     if (posZOrderList)
@@ -6178,11 +5941,11 @@
     m_normalFlowListDirty = false;
 }
 
-void RenderLayer::collectLayers(bool includeHiddenLayers, CollectLayersBehavior behavior, std::unique_ptr<Vector<RenderLayer*>>& posBuffer, std::unique_ptr<Vector<RenderLayer*>>& negBuffer)
+void RenderLayer::collectLayers(bool includeHiddenLayers, std::unique_ptr<Vector<RenderLayer*>>& posBuffer, std::unique_ptr<Vector<RenderLayer*>>& negBuffer)
 {
     updateDescendantDependentFlags();
 
-    bool isStacking = behavior == StopAtStackingContexts ? isStackingContext() : isStackingContainer();
+    bool isStacking = isStackingContext();
     // Overflow layers are just painted by their enclosing layers, so they don't get put in zorder lists.
     bool includeHiddenLayer = includeHiddenLayers || (m_hasVisibleContent || (m_hasVisibleDescendant && isStacking));
     if (includeHiddenLayer && !isNormalFlowOnly()) {
@@ -6203,7 +5966,7 @@
         for (RenderLayer* child = firstChild(); child; child = child->nextSibling()) {
             // Ignore reflections.
             if (!m_reflection || reflectionLayer() != child)
-                child->collectLayers(includeHiddenLayers, behavior, posBuffer, negBuffer);
+                child->collectLayers(includeHiddenLayers, posBuffer, negBuffer);
         }
     }
 }
@@ -6210,7 +5973,6 @@
 
 void RenderLayer::updateLayerListsIfNeeded()
 {
-    bool shouldUpdateDescendantsAreContiguousInStackingOrder = (m_zOrderListsDirty || m_normalFlowListDirty) && isStackingContext();
     updateZOrderLists();
     updateNormalFlowList();
 
@@ -6218,14 +5980,6 @@
         reflectionLayer->updateZOrderLists();
         reflectionLayer->updateNormalFlowList();
     }
-
-    if (shouldUpdateDescendantsAreContiguousInStackingOrder) {
-        updateDescendantsAreContiguousInStackingOrder();
-        // The above function can cause us to update m_needsCompositedScrolling
-        // and dirty our layer lists. Refresh them if necessary.
-        updateZOrderLists();
-        updateNormalFlowList();
-    }
 }
 
 void RenderLayer::updateDescendantsLayerListsIfNeeded(bool recursive)
@@ -6257,7 +6011,7 @@
 void RenderLayer::updateCompositingAndLayerListsIfNeeded()
 {
     if (compositor().inCompositingMode()) {
-        if (isDirtyStackingContainer() || m_normalFlowListDirty)
+        if (isDirtyStackingContext() || m_normalFlowListDirty)
             compositor().updateCompositingLayers(CompositingUpdateType::OnHitTest, this);
         return;
     }
@@ -6325,7 +6079,6 @@
         || renderer.isPositioned()
         || renderer.hasReflection()
         || renderer.style().hasIsolation()
-        || layer.needsCompositedScrolling()
 #if PLATFORM(IOS)
         || layer.hasAcceleratedTouchScrolling()
 #endif
@@ -6352,7 +6105,6 @@
         return true;
 
     return hasOverlayScrollbars()
-        || needsCompositedScrolling()
         || renderer().isTableRow()
         || renderer().isCanvas()
         || renderer().isVideo()
@@ -6510,7 +6262,7 @@
     bool wasStackingContext = isStackingContext(oldStyle);
     bool isStackingContext = this->isStackingContext();
     if (isStackingContext != wasStackingContext) {
-        dirtyStackingContainerZOrderLists();
+        dirtyStackingContextZOrderLists();
         if (isStackingContext)
             dirtyZOrderLists();
         else
@@ -6536,7 +6288,7 @@
     // FIXME: RenderLayer already handles visibility changes through our visiblity dirty bits. This logic could
     // likely be folded along with the rest.
     if (oldStyle->zIndex() != renderer().style().zIndex() || oldStyle->visibility() != renderer().style().visibility()) {
-        dirtyStackingContainerZOrderLists();
+        dirtyStackingContextZOrderLists();
         if (isStackingContext)
             dirtyZOrderLists();
     }
@@ -6574,38 +6326,6 @@
         updateScrollableAreaSet(hasScrollableHorizontalOverflow() || hasScrollableVerticalOverflow());
 }
 
-void RenderLayer::setAncestorChainHasOutOfFlowPositionedDescendant(RenderBlock* containingBlock)
-{
-    for (RenderLayer* layer = this; layer; layer = layer->parent()) {
-        if (!layer->m_hasOutOfFlowPositionedDescendantDirty && layer->hasOutOfFlowPositionedDescendant())
-            break;
-
-        layer->m_hasOutOfFlowPositionedDescendantDirty = false;
-        layer->m_hasOutOfFlowPositionedDescendant = true;
-        layer->updateNeedsCompositedScrolling();
-
-        if (&layer->renderer() == containingBlock)
-            break;
-    }
-}
-
-void RenderLayer::dirtyAncestorChainHasOutOfFlowPositionedDescendantStatus()
-{
-    m_hasOutOfFlowPositionedDescendantDirty = true;
-    if (parent())
-        parent()->dirtyAncestorChainHasOutOfFlowPositionedDescendantStatus();
-}
-
-void RenderLayer::updateOutOfFlowPositioned(const RenderStyle* oldStyle)
-{
-    bool wasOutOfFlowPositioned = oldStyle && (oldStyle->position() == PositionType::Absolute || oldStyle->position() == PositionType::Fixed);
-    if (parent() && (renderer().isOutOfFlowPositioned() != wasOutOfFlowPositioned)) {
-        parent()->dirtyAncestorChainHasOutOfFlowPositionedDescendantStatus();
-        if (!renderer().renderTreeBeingDestroyed() && acceleratedCompositingForOverflowScrollEnabled())
-            compositor().setShouldReevaluateCompositingAfterLayout();
-    }
-}
-
 void RenderLayer::styleChanged(StyleDifference diff, const RenderStyle* oldStyle)
 {
     bool isNormalFlowOnly = shouldBeNormalFlowOnly();
@@ -6614,7 +6334,7 @@
         RenderLayer* p = parent();
         if (p)
             p->dirtyNormalFlowList();
-        dirtyStackingContainerZOrderLists();
+        dirtyStackingContextZOrderLists();
     }
 
     if (renderer().isHTMLMarquee() && renderer().style().marqueeBehavior() != MarqueeBehavior::None && renderer().isBox()) {
@@ -6631,7 +6351,6 @@
     // Overlay scrollbars can make this layer self-painting so we need
     // to recompute the bit once scrollbars have been updated.
     updateSelfPaintingLayer();
-    updateOutOfFlowPositioned(oldStyle);
 
     if (!hasReflection() && m_reflection)
         removeReflection();
@@ -6657,9 +6376,7 @@
     updateBlendMode();
 #endif
     updateFiltersAfterStyleChange();
-
-    updateNeedsCompositedScrolling();
-
+    
     compositor().layerStyleChanged(diff, *this, oldStyle);
 
     updateFilterPaintingStrategy();
@@ -6694,9 +6411,6 @@
         addedOrRemoved = frameView.removeScrollableArea(this);
         m_registeredScrollableArea = false;
     }
-    
-    if (addedOrRemoved)
-        updateNeedsCompositedScrolling();
 
 #if ENABLE(IOS_TOUCH_EVENTS)
     if (addedOrRemoved) {

Modified: trunk/Source/WebCore/rendering/RenderLayer.h (236423 => 236424)


--- trunk/Source/WebCore/rendering/RenderLayer.h	2018-09-24 20:15:17 UTC (rev 236423)
+++ trunk/Source/WebCore/rendering/RenderLayer.h	2018-09-24 20:19:46 UTC (rev 236424)
@@ -323,8 +323,6 @@
     void updateLayerPositionsAfterOverflowScroll();
     void updateLayerPositionsAfterDocumentScroll();
 
-    void positionNewlyCreatedOverflowControls();
-
     bool hasCompositedLayerInEnclosingPaginationChain() const;
     enum PaginationInclusionMode { ExcludeCompositedPaginatedLayers, IncludeCompositedPaginatedLayers };
     RenderLayer* enclosingPaginationLayer(PaginationInclusionMode mode) const
@@ -352,27 +350,20 @@
     // A stacking context is a layer that has a non-auto z-index.
     bool isStackingContext() const { return isStackingContext(&renderer().style()); }
 
-    // A stacking container can have z-order lists. All stacking contexts are
-    // stacking containers, but the converse is not true. Layers that use
-    // composited scrolling are stacking containers, but they may not
-    // necessarily be stacking contexts.
-    bool isStackingContainer() const { return isStackingContext() || needsCompositedScrolling(); }
+    // Gets the enclosing stacking context for this layer, excluding this layer itself.
+    RenderLayer* stackingContext() const;
 
-    // Gets the enclosing stacking container for this layer, excluding this
-    // layer itself.
-    RenderLayer* stackingContainer() const;
-
     // Gets the enclosing stacking container for this layer, possibly the layer
     // itself, if it is a stacking container.
-    RenderLayer* enclosingStackingContainer() { return isStackingContainer() ? this : stackingContainer(); }
+    RenderLayer* enclosingStackingContext() { return isStackingContext() ? this : stackingContext(); }
 
     void dirtyZOrderLists();
-    void dirtyStackingContainerZOrderLists();
+    void dirtyStackingContextZOrderLists();
 
     Vector<RenderLayer*>* posZOrderList() const
     {
         ASSERT(!m_zOrderListsDirty);
-        ASSERT(isStackingContainer() || !m_posZOrderList);
+        ASSERT(isStackingContext() || !m_posZOrderList);
         return m_posZOrderList.get();
     }
 
@@ -381,7 +372,7 @@
     Vector<RenderLayer*>* negZOrderList() const
     {
         ASSERT(!m_zOrderListsDirty);
-        ASSERT(isStackingContainer() || !m_negZOrderList);
+        ASSERT(isStackingContext() || !m_negZOrderList);
         return m_negZOrderList.get();
     }
 
@@ -439,14 +430,6 @@
     // Part of the issue is with subtree relayout: we don't check if our ancestors have some descendant flags dirty, missing some updates.
     bool hasSelfPaintingLayerDescendant() const { return m_hasSelfPaintingLayerDescendant; }
 
-    // This returns true if we have an out of flow positioned descendant whose
-    // containing block is not a descendant of ours. If this is true, we cannot
-    // automatically opt into composited scrolling since this out of flow
-    // positioned descendant would become clipped by us, possibly altering the 
-    // rendering of the page.
-    // FIXME: We should ASSERT(!m_hasOutOfFlowPositionedDescendantDirty); here but we may hit the same bugs as visible content above.
-    bool hasOutOfFlowPositionedDescendant() const { return m_hasOutOfFlowPositionedDescendant; }
-
     // Gets the nearest enclosing positioned ancestor layer (also includes
     // the <html> layer and the root layer).
     RenderLayer* enclosingAncestorForPosition(PositionType) const;
@@ -655,16 +638,18 @@
     bool isComposited() const { return m_backing != nullptr; }
     bool hasCompositingDescendant() const { return m_hasCompositingDescendant; }
     bool hasCompositedMask() const;
+
     RenderLayerBacking* backing() const { return m_backing.get(); }
     RenderLayerBacking* ensureBacking();
     void clearBacking(bool layerBeingDestroyed = false);
+
     GraphicsLayer* layerForScrolling() const override;
     GraphicsLayer* layerForHorizontalScrollbar() const override;
     GraphicsLayer* layerForVerticalScrollbar() const override;
     GraphicsLayer* layerForScrollCorner() const override;
+
     bool usesCompositedScrolling() const override;
     bool usesAsyncScrolling() const override;
-    WEBCORE_EXPORT bool needsCompositedScrolling() const;
 
     bool paintsWithTransparency(OptionSet<PaintBehavior> paintBehavior) const
     {
@@ -721,8 +706,6 @@
     bool paintingFrequently() const { return m_paintFrequencyTracker.paintingFrequently(); }
 
 private:
-    enum CollectLayersBehavior { StopAtStackingContexts, StopAtStackingContainers };
-
     struct LayerPaintingInfo {
         LayerPaintingInfo(RenderLayer* inRootLayer, const LayoutRect& inDirtyRect, OptionSet<PaintBehavior> inPaintBehavior, const LayoutSize& inSubpixelOffset, RenderObject* inSubtreePaintRoot = nullptr, OverlapTestRequestMap* inOverlapTestRequests = nullptr, bool inRequireSecurityOriginAccessForWidgets = false)
             : rootLayer(inRootLayer)
@@ -753,7 +736,7 @@
 
     void updateZOrderLists();
     void rebuildZOrderLists();
-    void rebuildZOrderLists(CollectLayersBehavior, std::unique_ptr<Vector<RenderLayer*>>&, std::unique_ptr<Vector<RenderLayer*>>&);
+    void rebuildZOrderLists(std::unique_ptr<Vector<RenderLayer*>>&, std::unique_ptr<Vector<RenderLayer*>>&);
     void clearZOrderLists();
 
     void updateNormalFlowList();
@@ -762,15 +745,11 @@
     // based on positioning and other criteria.
     bool isStackingContext(const RenderStyle* style) const { return !style->hasAutoZIndex() || isRenderViewLayer() || m_forcedStackingContext; }
 
-    bool isDirtyStackingContainer() const { return m_zOrderListsDirty && isStackingContainer(); }
+    bool isDirtyStackingContext() const { return m_zOrderListsDirty && isStackingContext(); }
 
     void setAncestorChainHasSelfPaintingLayerDescendant();
     void dirtyAncestorChainHasSelfPaintingLayerDescendantStatus();
 
-    bool acceleratedCompositingForOverflowScrollEnabled() const;
-    void updateDescendantsAreContiguousInStackingOrder();
-    void updateDescendantsAreContiguousInStackingOrderRecursive(const HashMap<const RenderLayer*, int>&, int& minIndex, int& maxIndex, int& count, bool firstIteration);
-
     void computeRepaintRects(const RenderLayerModelObject* repaintContainer, const RenderGeometryMap* = nullptr);
     void computeRepaintRectsIncludingDescendants();
     void clearRepaintRects();
@@ -788,12 +767,6 @@
     void updateScrollbarsAfterStyleChange(const RenderStyle* oldStyle);
     void updateScrollbarsAfterLayout();
 
-    void setAncestorChainHasOutOfFlowPositionedDescendant(RenderBlock* containingBlock);
-    void dirtyAncestorChainHasOutOfFlowPositionedDescendantStatus();
-    void updateOutOfFlowPositioned(const RenderStyle* oldStyle);
-
-    void updateNeedsCompositedScrolling();
-
     // Returns true if the position changed.
     bool updateLayerPosition();
 
@@ -819,7 +792,7 @@
 
     LayoutPoint renderBoxLocation() const { return is<RenderBox>(renderer()) ? downcast<RenderBox>(renderer()).location() : LayoutPoint(); }
 
-    void collectLayers(bool includeHiddenLayers, CollectLayersBehavior, std::unique_ptr<Vector<RenderLayer*>>&, std::unique_ptr<Vector<RenderLayer*>>&);
+    void collectLayers(bool includeHiddenLayers, std::unique_ptr<Vector<RenderLayer*>>&, std::unique_ptr<Vector<RenderLayer*>>&);
 
     void updateCompositingAndLayerListsIfNeeded();
 
@@ -1006,9 +979,6 @@
     IndirectCompositingReason indirectCompositingReason() const { return static_cast<IndirectCompositingReason>(m_indirectCompositingReason); }
     bool mustCompositeForIndirectReasons() const { return m_indirectCompositingReason; }
 
-    // Returns true if z ordering would not change if this layer were a stacking container.
-    bool canBeStackingContainer() const;
-
     friend class RenderLayerBacking;
     friend class RenderLayerCompositor;
     friend class RenderLayerModelObject;
@@ -1046,19 +1016,6 @@
     bool m_hasSelfPaintingLayerDescendant : 1;
     bool m_hasSelfPaintingLayerDescendantDirty : 1;
 
-    // If we have no out of flow positioned descendants and no non-descendant
-    // appears between our descendants in stacking order, then we may become a
-    // stacking context.
-    bool m_hasOutOfFlowPositionedDescendant : 1;
-    bool m_hasOutOfFlowPositionedDescendantDirty : 1;
-
-    bool m_needsCompositedScrolling : 1;
-
-    // If this is true, then no non-descendant appears between any of our
-    // descendants in stacking order. This is one of the requirements of being
-    // able to safely become a stacking context.
-    bool m_descendantsAreContiguousInStackingOrder : 1;
-
     bool m_usedTransparency : 1; // Tracks whether we need to close a transparent layer, i.e., whether
                                  // we ended up painting this layer or any descendants (and therefore need to
                                  // blend).
@@ -1176,7 +1133,7 @@
 
 inline void RenderLayer::clearZOrderLists()
 {
-    ASSERT(!isStackingContainer());
+    ASSERT(!isStackingContext());
     ASSERT(m_layerListMutationAllowed);
 
     m_posZOrderList = nullptr;
@@ -1188,7 +1145,7 @@
     if (!m_zOrderListsDirty)
         return;
 
-    if (!isStackingContainer()) {
+    if (!isStackingContext()) {
         clearZOrderLists();
         m_zOrderListsDirty = false;
         return;

Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (236423 => 236424)


--- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp	2018-09-24 20:15:17 UTC (rev 236423)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.cpp	2018-09-24 20:19:46 UTC (rev 236424)
@@ -658,9 +658,9 @@
             updateGeometry();
             updateAfterDescendants();
             compositor().updateRootLayerPosition();
-            auto* stackingContainer = m_owningLayer.enclosingStackingContainer();
-            if (!compositor().compositingLayersNeedRebuild() && stackingContainer && (stackingContainer != &m_owningLayer))
-                compositor().updateCompositingDescendantGeometry(*stackingContainer, *stackingContainer);
+            auto* stackingContext = m_owningLayer.enclosingStackingContext();
+            if (!compositor().compositingLayersNeedRebuild() && stackingContext && (stackingContext != &m_owningLayer))
+                compositor().updateCompositingDescendantGeometry(*stackingContext, *stackingContext);
         }
     }
     
@@ -923,12 +923,6 @@
         ScrollOffset scrollOffset = compositedAncestor->scrollOffset();
         parentGraphicsLayerRect = LayoutRect((paddingBox.location() - toLayoutSize(ancestorCompositedBounds.location()) - toLayoutSize(scrollOffset)), paddingBox.size());
     }
-#else
-    if (compositedAncestor->needsCompositedScrolling()) {
-        auto& renderBox = downcast<RenderBox>(compositedAncestor->renderer());
-        LayoutPoint scrollOrigin(renderBox.borderLeft(), renderBox.borderTop());
-        parentGraphicsLayerRect = LayoutRect(scrollOrigin - toLayoutSize(compositedAncestor->scrollOffset()), renderBox.borderBoxRect().size());
-    }
 #endif
 
     if (m_ancestorClippingLayer) {
@@ -951,7 +945,7 @@
 void RenderLayerBacking::updateGeometry()
 {
     // If we haven't built z-order lists yet, wait until later.
-    if (m_owningLayer.isStackingContainer() && m_owningLayer.m_zOrderListsDirty)
+    if (m_owningLayer.isStackingContext() && m_owningLayer.m_zOrderListsDirty)
         return;
 
     const RenderStyle& style = renderer().style();
@@ -1452,7 +1446,7 @@
 
 bool RenderLayerBacking::requiresHorizontalScrollbarLayer() const
 {
-    if (!m_owningLayer.hasOverlayScrollbars() && !m_owningLayer.needsCompositedScrolling())
+    if (!m_owningLayer.hasOverlayScrollbars())
         return false;
     return m_owningLayer.horizontalScrollbar();
 }
@@ -1459,7 +1453,7 @@
 
 bool RenderLayerBacking::requiresVerticalScrollbarLayer() const
 {
-    if (!m_owningLayer.hasOverlayScrollbars() && !m_owningLayer.needsCompositedScrolling())
+    if (!m_owningLayer.hasOverlayScrollbars())
         return false;
     return m_owningLayer.verticalScrollbar();
 }
@@ -1466,7 +1460,7 @@
 
 bool RenderLayerBacking::requiresScrollCornerLayer() const
 {
-    if (!m_owningLayer.hasOverlayScrollbars() && !m_owningLayer.needsCompositedScrolling())
+    if (!m_owningLayer.hasOverlayScrollbars())
         return false;
     return !m_owningLayer.scrollCornerAndResizerRect().isEmpty();
 }
@@ -1562,26 +1556,6 @@
     }
 }
 
-bool RenderLayerBacking::hasUnpositionedOverflowControlsLayers() const
-{
-    if (auto* layer = layerForHorizontalScrollbar()) {
-        if (!layer->drawsContent())
-            return true;
-    }
-
-    if (auto* layer = layerForVerticalScrollbar()) {
-        if (!layer->drawsContent())
-            return true;
-    }
-
-    if (auto* layer = layerForScrollCorner()) {
-        if (!layer->drawsContent())
-            return true;
-    }
-
-    return false;
-}
-
 bool RenderLayerBacking::updateForegroundLayer(bool needsForegroundLayer)
 {
     bool layerChanged = false;
@@ -1813,7 +1787,7 @@
     for (auto* curr = m_owningLayer.parent(); curr; curr = curr->parent()) {
         // We only care about parents that are stacking contexts.
         // Recall that opacity creates stacking context.
-        if (!curr->isStackingContainer())
+        if (!curr->isStackingContext())
             continue;
         
         // If we found a compositing layer, we want to compute opacity
@@ -2122,7 +2096,7 @@
         }
     }
 
-    if (parent.isStackingContainer() && !parent.hasVisibleDescendant())
+    if (parent.isStackingContext() && !parent.hasVisibleDescendant())
         return LayerTraversal::Continue;
 
     // Use the m_hasCompositingDescendant bit to optimize?

Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.h (236423 => 236424)


--- trunk/Source/WebCore/rendering/RenderLayerBacking.h	2018-09-24 20:15:17 UTC (rev 236423)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.h	2018-09-24 20:19:46 UTC (rev 236424)
@@ -182,8 +182,7 @@
     
     void updateAfterWidgetResize();
     void positionOverflowControlsLayers();
-    bool hasUnpositionedOverflowControlsLayers() const;
-
+    
     bool isFrameLayerWithTiledBacking() const { return m_isFrameLayerWithTiledBacking; }
 
     WEBCORE_EXPORT TiledBacking* tiledBacking() const;

Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp (236423 => 236424)


--- trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp	2018-09-24 20:15:17 UTC (rev 236423)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp	2018-09-24 20:19:46 UTC (rev 236424)
@@ -521,9 +521,7 @@
 
 void RenderLayerCompositor::updateScrollCoordinatedLayersAfterFlush()
 {
-#if PLATFORM(IOS)
     updateCustomLayersAfterFlush();
-#endif
 
     HashSet<RenderLayer*> layersNeedingUpdate;
     std::swap(m_scrollCoordinatedLayersNeedingUpdate, layersNeedingUpdate);
@@ -553,9 +551,11 @@
     client.addOrUpdateScrollingLayer(layer.renderer().element(), backing->scrollingLayer()->platformLayer(), backing->scrollingContentsLayer()->platformLayer(),
         layer.scrollableContentsSize(), allowHorizontalScrollbar, allowVerticalScrollbar);
 }
+#endif
 
 void RenderLayerCompositor::updateCustomLayersAfterFlush()
 {
+#if PLATFORM(IOS)
     registerAllViewportConstrainedLayers();
 
     if (!m_scrollingLayersNeedingUpdate.isEmpty()) {
@@ -564,8 +564,8 @@
         m_scrollingLayersNeedingUpdate.clear();
     }
     m_scrollingLayersNeedingUpdate.clear();
+#endif
 }
-#endif
 
 void RenderLayerCompositor::didFlushChangesForLayer(RenderLayer& layer, const GraphicsLayer* graphicsLayer)
 {
@@ -928,7 +928,7 @@
     }
 
     // When overflow changes, composited layers may need to update their ancestorClipping layers.
-    if (!layer.isComposited() && (oldStyle.overflowX() != newStyle.overflowX() || oldStyle.overflowY() != newStyle.overflowY()) && layer.stackingContainer()->hasCompositingDescendant())
+    if (!layer.isComposited() && (oldStyle.overflowX() != newStyle.overflowX() || oldStyle.overflowY() != newStyle.overflowY()) && layer.stackingContext()->hasCompositingDescendant())
         return true;
     
 #if ENABLE(ACCELERATED_OVERFLOW_SCROLLING)
@@ -1197,7 +1197,7 @@
 RenderLayer* RenderLayerCompositor::enclosingNonStackingClippingLayer(const RenderLayer& layer) const
 {
     for (auto* parent = layer.parent(); parent; parent = parent->parent()) {
-        if (parent->isStackingContainer())
+        if (parent->isStackingContext())
             return nullptr;
         if (parent->renderer().hasClipOrOverflowClip())
             return parent;
@@ -1399,7 +1399,7 @@
     }
 
     if (auto* posZOrderList = layer.posZOrderList()) {
-        ASSERT(layer.isStackingContainer());
+        ASSERT(layer.isStackingContext());
         for (auto* renderLayer : *posZOrderList)
             computeCompositingRequirements(&layer, *renderLayer, overlapMap, childState, layersChanged, anyDescendantHas3DTransform);
     }
@@ -1567,8 +1567,6 @@
 #else
         UNUSED_PARAM(depth);
 #endif
-        if (layerBacking->hasUnpositionedOverflowControlsLayers())
-            layer.positionNewlyCreatedOverflowControls();
     }
 
     // If this layer has backing, then we are collecting its children, otherwise appending
@@ -2052,9 +2050,6 @@
         || requiresCompositingForVideo(renderer)
         || requiresCompositingForFrame(renderer)
         || requiresCompositingForPlugin(renderer)
-#if PLATFORM(IOS)
-        || requiresCompositingForScrolling(*renderer.layer())
-#endif
         || requiresCompositingForOverflowScrolling(*renderer.layer());
 }
 
@@ -2115,9 +2110,6 @@
         || requiresCompositingForFrame(renderer)
         || requiresCompositingForPlugin(renderer)
         || requiresCompositingForOverflowScrolling(layer)
-#if PLATFORM(IOS)
-        || requiresCompositingForScrolling(layer)
-#endif
         || renderer.isTransparent()
         || renderer.hasMask()
         || renderer.hasReflection()
@@ -2179,11 +2171,6 @@
     if (requiresCompositingForPosition(renderer, *renderer.layer()))
         reasons.add(renderer.isFixedPositioned() ? CompositingReason::PositionFixed : CompositingReason::PositionSticky);
 
-#if PLATFORM(IOS)
-    if (requiresCompositingForScrolling(*renderer.layer()))
-        reasons.add(CompositingReason::OverflowScrollingTouch);
-#endif
-
     if (requiresCompositingForOverflowScrolling(*renderer.layer()))
         reasons.add(CompositingReason::OverflowScrollingTouch);
 
@@ -2422,7 +2409,7 @@
         return true;
     
     // FIXME: workaround for webkit.org/b/132801
-    auto* stackingContext = renderer.layer()->stackingContainer();
+    auto* stackingContext = renderer.layer()->stackingContext();
     if (stackingContext && stackingContext->renderer().style().transformStyle3D() == TransformStyle3D::Preserve3D)
         return true;
 
@@ -2663,8 +2650,8 @@
         return false;
 
     // FIXME: Handle fixed inside of a transform, which should not behave as fixed.
-    for (auto* stackingContainer = layer.stackingContainer(); stackingContainer; stackingContainer = stackingContainer->stackingContainer()) {
-        if (stackingContainer->isComposited() && stackingContainer->renderer().isFixedPositioned())
+    for (auto* stackingContext = layer.stackingContext(); stackingContext; stackingContext = stackingContext->stackingContext()) {
+        if (stackingContext->isComposited() && stackingContext->renderer().isFixedPositioned())
             return false;
     }
 
@@ -2694,7 +2681,7 @@
 
     auto position = renderer.style().position();
     bool isFixed = renderer.isOutOfFlowPositioned() && position == PositionType::Fixed;
-    if (isFixed && !layer.isStackingContainer())
+    if (isFixed && !layer.isStackingContext())
         return false;
     
     bool isSticky = renderer.isInFlowPositioned() && position == PositionType::Sticky;
@@ -2760,12 +2747,7 @@
 
 bool RenderLayerCompositor::requiresCompositingForOverflowScrolling(const RenderLayer& layer) const
 {
-    return layer.needsCompositedScrolling();
-}
-
 #if PLATFORM(IOS)
-bool RenderLayerCompositor::requiresCompositingForScrolling(const RenderLayer& layer) const
-{
     if (!layer.hasAcceleratedTouchScrolling())
         return false;
 
@@ -2775,8 +2757,11 @@
     }
 
     return layer.hasTouchScrollableOverflow();
+#else
+    UNUSED_PARAM(layer);
+    return false;
+#endif
 }
-#endif
 
 bool RenderLayerCompositor::isRunningTransformAnimation(RenderLayerModelObject& renderer) const
 {

Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.h (236423 => 236424)


--- trunk/Source/WebCore/rendering/RenderLayerCompositor.h	2018-09-24 20:15:17 UTC (rev 236423)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.h	2018-09-24 20:19:46 UTC (rev 236424)
@@ -432,11 +432,7 @@
     bool requiresCompositingForIndirectReason(RenderLayerModelObject&, bool hasCompositedDescendants, bool has3DTransformedDescendants, RenderLayer::IndirectCompositingReason&) const;
     static bool styleChangeMayAffectIndirectCompositingReasons(const RenderLayerModelObject& renderer, const RenderStyle& oldStyle);
 
-#if PLATFORM(IOS)
-    bool requiresCompositingForScrolling(const RenderLayer&) const;
-
     void updateCustomLayersAfterFlush();
-#endif
 
     void updateScrollCoordinationForThisFrame(ScrollingNodeID);
     ScrollingNodeID attachScrollingNode(RenderLayer&, ScrollingNodeType, ScrollingNodeID parentNodeID);

Modified: trunk/Source/WebKit/ChangeLog (236423 => 236424)


--- trunk/Source/WebKit/ChangeLog	2018-09-24 20:15:17 UTC (rev 236423)
+++ trunk/Source/WebKit/ChangeLog	2018-09-24 20:19:46 UTC (rev 236424)
@@ -1,3 +1,21 @@
+2018-09-21  Simon Fraser  <[email protected]>
+
+        Remove the old "AcceleratedCompositingForOverflowScroll" code
+        https://bugs.webkit.org/show_bug.cgi?id=189870
+
+        Reviewed by Zalan Bujtas.
+
+        The "AcceleratedCompositingForOverflowScroll" code was added to allow overflow:scroll to use
+        composited scrolling if an overflow:scroll could be made a stacking context without affecting
+        z-order. We need overflow:scroll to be accelerated always, so a different approach is needed.
+        Remove this old code (unused by any platform?) to make working on new code easier.
+
+        * Shared/WebPreferences.yaml:
+        * UIProcess/API/C/WKPreferences.cpp:
+        (WKPreferencesSetAcceleratedCompositingForOverflowScrollEnabled): Deleted.
+        (WKPreferencesGetAcceleratedCompositingForOverflowScrollEnabled): Deleted.
+        * UIProcess/API/C/WKPreferencesRefPrivate.h:
+
 2018-09-24  Chris Dumez  <[email protected]>
 
         Do not do early processing of incoming sync IPC unless we're waiting for a sync IPC reply

Modified: trunk/Source/WebKit/Shared/WebPreferences.yaml (236423 => 236424)


--- trunk/Source/WebKit/Shared/WebPreferences.yaml	2018-09-24 20:15:17 UTC (rev 236423)
+++ trunk/Source/WebKit/Shared/WebPreferences.yaml	2018-09-24 20:19:46 UTC (rev 236424)
@@ -432,10 +432,6 @@
   defaultValue: false
   webcoreName: showsURLsInToolTips
 
-AcceleratedCompositingForOverflowScrollEnabled:
-  type: bool
-  defaultValue: false
-
 HiddenPageDOMTimerThrottlingEnabled:
   type: bool
   defaultValue: DEFAULT_HIDDEN_PAGE_DOM_TIMER_THROTTLING_ENABLED

Modified: trunk/Source/WebKit/UIProcess/API/C/WKPreferences.cpp (236423 => 236424)


--- trunk/Source/WebKit/UIProcess/API/C/WKPreferences.cpp	2018-09-24 20:15:17 UTC (rev 236423)
+++ trunk/Source/WebKit/UIProcess/API/C/WKPreferences.cpp	2018-09-24 20:19:46 UTC (rev 236424)
@@ -451,16 +451,6 @@
     return toImpl(preferencesRef)->acceleratedCompositingEnabled();
 }
 
-void WKPreferencesSetAcceleratedCompositingForOverflowScrollEnabled(WKPreferencesRef preferencesRef, bool flag)
-{
-    toImpl(preferencesRef)->setAcceleratedCompositingForOverflowScrollEnabled(flag);
-}
-
-bool WKPreferencesGetAcceleratedCompositingForOverflowScrollEnabled(WKPreferencesRef preferencesRef)
-{
-    return toImpl(preferencesRef)->acceleratedCompositingForOverflowScrollEnabled();
-}
-
 void WKPreferencesSetCompositingBordersVisible(WKPreferencesRef preferencesRef, bool flag)
 {
     toImpl(preferencesRef)->setCompositingBordersVisible(flag);

Modified: trunk/Source/WebKit/UIProcess/API/C/WKPreferencesRefPrivate.h (236423 => 236424)


--- trunk/Source/WebKit/UIProcess/API/C/WKPreferencesRefPrivate.h	2018-09-24 20:15:17 UTC (rev 236423)
+++ trunk/Source/WebKit/UIProcess/API/C/WKPreferencesRefPrivate.h	2018-09-24 20:19:46 UTC (rev 236424)
@@ -87,10 +87,6 @@
 WK_EXPORT bool WKPreferencesGetAcceleratedCompositingEnabled(WKPreferencesRef);
 
 // Defaults to false.
-WK_EXPORT void WKPreferencesSetAcceleratedCompositingForOverflowScrollEnabled(WKPreferencesRef, bool);
-WK_EXPORT bool WKPreferencesGetAcceleratedCompositingForOverflowScrollEnabled(WKPreferencesRef);
-
-// Defaults to false.
 WK_EXPORT void WKPreferencesSetCompositingBordersVisible(WKPreferencesRef, bool);
 WK_EXPORT bool WKPreferencesGetCompositingBordersVisible(WKPreferencesRef);
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to