Unreviewed, rolling out r137645, r137646, and r137667.
authorenne@google.com <enne@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Dec 2012 00:30:25 +0000 (00:30 +0000)
committerenne@google.com <enne@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Dec 2012 00:30:25 +0000 (00:30 +0000)
http://trac.webkit.org/changeset/137645
http://trac.webkit.org/changeset/137646
http://trac.webkit.org/changeset/137667
https://bugs.webkit.org/show_bug.cgi?id=104911

Breaks some overflow layout tests

Source/WebCore:

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::RenderLayer):
(WebCore::RenderLayer::updateDescendantDependentFlags):
(WebCore::RenderLayer::addChild):
(WebCore::RenderLayer::removeChild):
(WebCore::RenderLayer::usesCompositedScrolling):
(WebCore::RenderLayer::scrollTo):
(WebCore::RenderLayer::dirtyZOrderLists):
(WebCore::RenderLayer::dirtyNormalFlowList):
(WebCore::RenderLayer::updateLayerListsIfNeeded):
(WebCore::RenderLayer::shouldBeNormalFlowOnly):
(WebCore::RenderLayer::shouldBeSelfPaintingLayer):
(WebCore::RenderLayer::styleChanged):
* rendering/RenderLayer.h:
(RenderLayer):
* rendering/RenderLayerBacking.cpp:
(WebCore::layerOrAncestorIsTransformedOrUsingCompositedScrolling):
(WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
(WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
* rendering/RenderLayerBacking.h:
(RenderLayerBacking):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::computeCompositingRequirements):
(WebCore::RenderLayerCompositor::requiresCompositingForOverflowScrolling):
* rendering/RenderLayerCompositor.h:
(RenderLayerCompositor):
* testing/InternalSettings.cpp:
* testing/InternalSettings.h:
(InternalSettings):
* testing/InternalSettings.idl:

Tools:

* Scripts/webkitpy/layout_tests/port/chromium.py:
(ChromiumPort.virtual_test_suites):

LayoutTests:

* compositing/overflow/automatically-opt-into-composited-scrolling-expected.txt: Removed.
* compositing/overflow/automatically-opt-into-composited-scrolling.html: Removed.
* platform/chromium-mac-lion/platform/chromium/virtual/gpu/compositedscrolling/scrollbars/custom-scrollbar-with-incomplete-style-expected.png: Removed.
* platform/chromium-mac-snowleopard/platform/chromium/virtual/gpu/compositedscrolling/scrollbars/custom-scrollbar-with-incomplete-style-expected.png: Removed.
* platform/chromium-mac/platform/chromium/virtual/gpu/compositedscrolling/scrollbars/custom-scrollbar-with-incomplete-style-expected.png: Removed.
* platform/chromium/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@137682 268f45cc-cd09-0410-ab3c-d52691b4dbfc

19 files changed:
LayoutTests/ChangeLog
LayoutTests/compositing/overflow/automatically-opt-into-composited-scrolling-expected.txt [deleted file]
LayoutTests/compositing/overflow/automatically-opt-into-composited-scrolling.html [deleted file]
LayoutTests/platform/chromium-mac-lion/platform/chromium/virtual/gpu/compositedscrolling/scrollbars/custom-scrollbar-with-incomplete-style-expected.png [deleted file]
LayoutTests/platform/chromium-mac-snowleopard/platform/chromium/virtual/gpu/compositedscrolling/scrollbars/custom-scrollbar-with-incomplete-style-expected.png [deleted file]
LayoutTests/platform/chromium-mac/platform/chromium/virtual/gpu/compositedscrolling/scrollbars/custom-scrollbar-with-incomplete-style-expected.png [deleted file]
LayoutTests/platform/chromium/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderLayer.cpp
Source/WebCore/rendering/RenderLayer.h
Source/WebCore/rendering/RenderLayerBacking.cpp
Source/WebCore/rendering/RenderLayerBacking.h
Source/WebCore/rendering/RenderLayerCompositor.cpp
Source/WebCore/rendering/RenderLayerCompositor.h
Source/WebCore/testing/InternalSettings.cpp
Source/WebCore/testing/InternalSettings.h
Source/WebCore/testing/InternalSettings.idl
Tools/ChangeLog
Tools/Scripts/webkitpy/layout_tests/port/chromium.py

index 6738efb..03a6293 100644 (file)
@@ -1,3 +1,20 @@
+2012-12-13  Adrienne Walker  <enne@chromium.org>
+
+        Unreviewed, rolling out r137645, r137646, and r137667.
+        http://trac.webkit.org/changeset/137645
+        http://trac.webkit.org/changeset/137646
+        http://trac.webkit.org/changeset/137667
+        https://bugs.webkit.org/show_bug.cgi?id=104911
+
+        Breaks some overflow layout tests
+
+        * compositing/overflow/automatically-opt-into-composited-scrolling-expected.txt: Removed.
+        * compositing/overflow/automatically-opt-into-composited-scrolling.html: Removed.
+        * platform/chromium-mac-lion/platform/chromium/virtual/gpu/compositedscrolling/scrollbars/custom-scrollbar-with-incomplete-style-expected.png: Removed.
+        * platform/chromium-mac-snowleopard/platform/chromium/virtual/gpu/compositedscrolling/scrollbars/custom-scrollbar-with-incomplete-style-expected.png: Removed.
+        * platform/chromium-mac/platform/chromium/virtual/gpu/compositedscrolling/scrollbars/custom-scrollbar-with-incomplete-style-expected.png: Removed.
+        * platform/chromium/TestExpectations:
+
 2012-12-13  James Simonsen  <simonjam@chromium.org>
 
         [Resource Timing] Don't report resources with data: urls
diff --git a/LayoutTests/compositing/overflow/automatically-opt-into-composited-scrolling-expected.txt b/LayoutTests/compositing/overflow/automatically-opt-into-composited-scrolling-expected.txt
deleted file mode 100644 (file)
index deef515..0000000
+++ /dev/null
@@ -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
-
diff --git a/LayoutTests/compositing/overflow/automatically-opt-into-composited-scrolling.html b/LayoutTests/compositing/overflow/automatically-opt-into-composited-scrolling.html
deleted file mode 100644 (file)
index dc4d3e8..0000000
+++ /dev/null
@@ -1,230 +0,0 @@
-<!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.setEnableCompositingForOverflowScroll(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>
-
diff --git a/LayoutTests/platform/chromium-mac-lion/platform/chromium/virtual/gpu/compositedscrolling/scrollbars/custom-scrollbar-with-incomplete-style-expected.png b/LayoutTests/platform/chromium-mac-lion/platform/chromium/virtual/gpu/compositedscrolling/scrollbars/custom-scrollbar-with-incomplete-style-expected.png
deleted file mode 100644 (file)
index 09ea74c..0000000
Binary files a/LayoutTests/platform/chromium-mac-lion/platform/chromium/virtual/gpu/compositedscrolling/scrollbars/custom-scrollbar-with-incomplete-style-expected.png and /dev/null differ
diff --git a/LayoutTests/platform/chromium-mac-snowleopard/platform/chromium/virtual/gpu/compositedscrolling/scrollbars/custom-scrollbar-with-incomplete-style-expected.png b/LayoutTests/platform/chromium-mac-snowleopard/platform/chromium/virtual/gpu/compositedscrolling/scrollbars/custom-scrollbar-with-incomplete-style-expected.png
deleted file mode 100644 (file)
index d336c6f..0000000
Binary files a/LayoutTests/platform/chromium-mac-snowleopard/platform/chromium/virtual/gpu/compositedscrolling/scrollbars/custom-scrollbar-with-incomplete-style-expected.png and /dev/null differ
diff --git a/LayoutTests/platform/chromium-mac/platform/chromium/virtual/gpu/compositedscrolling/scrollbars/custom-scrollbar-with-incomplete-style-expected.png b/LayoutTests/platform/chromium-mac/platform/chromium/virtual/gpu/compositedscrolling/scrollbars/custom-scrollbar-with-incomplete-style-expected.png
deleted file mode 100644 (file)
index 4f33b55..0000000
Binary files a/LayoutTests/platform/chromium-mac/platform/chromium/virtual/gpu/compositedscrolling/scrollbars/custom-scrollbar-with-incomplete-style-expected.png and /dev/null differ
index 988ed7f..d85f8d7 100644 (file)
@@ -1450,9 +1450,6 @@ webkit.org/b/75276 [ Android ] fast/repaint/shadow-multiple-strict-vertical.html
 # Fails on webkit windows as well.
 crbug.com/24207 fast/events/attempt-scroll-with-no-scrollbars.html [ Failure ]
 
-# Fails when opting into composited scrolling.
-webkit.org/b/104965 [ Mac ] platform/chromium/virtual/gpu/compositedscrolling/scrollbars/scrollbar-drag-thumb-with-large-content.html [ Failure ]
-
 # No glyph for U+FFFD (Replacement Character : black diamond with
 # question mark) in them on Win XP.
 crbug.com/10315 [ XP ] fast/encoding/invalid-UTF-8.html [ Failure ]
@@ -3628,11 +3625,8 @@ webkit.org/b/85856 [ Win Mac Android ] fast/block/float/028.html [ ImageOnlyFail
 webkit.org/b/85856 [ Win Mac Android ] fast/block/float/026.html [ ImageOnlyFailure ]
 webkit.org/b/85856 [ Win Mac Android ] fast/overflow/unreachable-overflow-rtl-bug.html [ Failure ImageOnlyFailure ]
 webkit.org/b/85856 [ Linux Win SnowLeopard ] scrollbars/rtl/div-absolute.html [ Failure ]
-webkit.org/b/85856 [ Linux Win SnowLeopard ] platform/chromium/virtual/gpu/compositedscrolling/scrollbars/rtl/div-absolute.html [ Failure ]
 webkit.org/b/85856 [ Lion MountainLion ] scrollbars/rtl/div-absolute.html [ Failure Pass ]
-webkit.org/b/85856 [ Lion MountainLion ] platform/chromium/virtual/gpu/compositedscrolling/scrollbars/rtl/div-absolute.html [ Failure Pass ]
 webkit.org/b/85856 scrollbars/rtl/div-horizontal.html [ Failure ]
-webkit.org/b/85856 platform/chromium/virtual/gpu/compositedscrolling/scrollbars/rtl/div-horizontal.html [ Failure ]
 
 # Bug 93148 changed this to a testRunner test and it started timing out on Mac.
 webkit.org/b/93148 [ Mac ] fast/css/nested-layers-with-hover.html [ Timeout ]
@@ -3698,26 +3692,20 @@ webkit.org/b/99734 [ Mac ] http/tests/xmlhttprequest/request-encoding2.html [ Pa
 # ENABLE_ACCELERATED_OVERFLOW_SCROLLING is not currently enabled in Chromium.
 webkit.org/b/94353 compositing/overflow/scrolling-content-clip-to-viewport.html [ Failure ]
 webkit.org/b/94353 platform/chromium/virtual/softwarecompositing/overflow/scrolling-content-clip-to-viewport.html [ Failure ]
-webkit.org/b/94353 platform/chromium/virtual/gpu/compositedscrolling/overflow/scrolling-content-clip-to-viewport.html [ Failure ]
 webkit.org/b/94353 compositing/overflow/scrolling-without-painting.html [ Failure ]
 webkit.org/b/94353 platform/chromium/virtual/softwarecompositing/overflow/scrolling-without-painting.html [ Failure ]
-webkit.org/b/94353 platform/chromium/virtual/gpu/compositedscrolling/overflow/scrolling-without-painting.html [ Failure ]
 webkit.org/b/94353 compositing/overflow/updating-scrolling-content.html [ Failure ]
 webkit.org/b/94353 platform/chromium/virtual/softwarecompositing/overflow/updating-scrolling-content.html [ Failure ]
-webkit.org/b/94353 platform/chromium/virtual/gpu/compositedscrolling/overflow/updating-scrolling-content.html [ Failure ]
 webkit.org/b/94353 compositing/overflow/textarea-scroll-touch.html [ Failure ]
 webkit.org/b/94353 platform/chromium/virtual/softwarecompositing/overflow/textarea-scroll-touch.html [ Failure ]
-webkit.org/b/94353 platform/chromium/virtual/gpu/compositedscrolling/overflow/textarea-scroll-touch.html [ Failure ]
 
 # Failing on Linux (Content Shell) only now
 webkit.org/b/94353 [ Android Linux ] compositing/overflow/nested-scrolling.html [ Failure Pass ]
 webkit.org/b/94353 [ Android Linux ] platform/chromium/virtual/softwarecompositing/overflow/nested-scrolling.html [ Failure Pass ]
 webkit.org/b/94353 compositing/overflow/overflow-auto-with-touch.html [ Failure ]
 webkit.org/b/94353 platform/chromium/virtual/softwarecompositing/overflow/overflow-auto-with-touch.html [ Failure ]
-webkit.org/b/94353 platform/chromium/virtual/gpu/compositedscrolling/overflow/overflow-auto-with-touch.html [ Failure ]
 webkit.org/b/94353 compositing/overflow/overflow-overlay-with-touch.html [ Failure ]
 webkit.org/b/94353 platform/chromium/virtual/softwarecompositing/overflow/overflow-overlay-with-touch.html [ Failure ]
-webkit.org/b/94353 platform/chromium/virtual/gpu/compositedscrolling/overflow/overflow-overlay-with-touch.html [ Failure ]
 
 webkit.org/b/90488 [ Win ] http/tests/inspector/network-preflight-options.html [ Pass Slow ]
 
index 1924dfe..524a3c6 100644 (file)
@@ -1,3 +1,44 @@
+2012-12-13  Adrienne Walker  <enne@chromium.org>
+
+        Unreviewed, rolling out r137645, r137646, and r137667.
+        http://trac.webkit.org/changeset/137645
+        http://trac.webkit.org/changeset/137646
+        http://trac.webkit.org/changeset/137667
+        https://bugs.webkit.org/show_bug.cgi?id=104911
+
+        Breaks some overflow layout tests
+
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::RenderLayer):
+        (WebCore::RenderLayer::updateDescendantDependentFlags):
+        (WebCore::RenderLayer::addChild):
+        (WebCore::RenderLayer::removeChild):
+        (WebCore::RenderLayer::usesCompositedScrolling):
+        (WebCore::RenderLayer::scrollTo):
+        (WebCore::RenderLayer::dirtyZOrderLists):
+        (WebCore::RenderLayer::dirtyNormalFlowList):
+        (WebCore::RenderLayer::updateLayerListsIfNeeded):
+        (WebCore::RenderLayer::shouldBeNormalFlowOnly):
+        (WebCore::RenderLayer::shouldBeSelfPaintingLayer):
+        (WebCore::RenderLayer::styleChanged):
+        * rendering/RenderLayer.h:
+        (RenderLayer):
+        * rendering/RenderLayerBacking.cpp:
+        (WebCore::layerOrAncestorIsTransformedOrUsingCompositedScrolling):
+        (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
+        (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
+        * rendering/RenderLayerBacking.h:
+        (RenderLayerBacking):
+        * rendering/RenderLayerCompositor.cpp:
+        (WebCore::RenderLayerCompositor::computeCompositingRequirements):
+        (WebCore::RenderLayerCompositor::requiresCompositingForOverflowScrolling):
+        * rendering/RenderLayerCompositor.h:
+        (RenderLayerCompositor):
+        * testing/InternalSettings.cpp:
+        * testing/InternalSettings.h:
+        (InternalSettings):
+        * testing/InternalSettings.idl:
+
 2012-12-13  Andreas Kling  <akling@apple.com>
 
         Event dispatch: Avoid heap allocations in ensureEventAncestors() typical case.
index 9a4dc50..9cd1c04 100644 (file)
@@ -147,10 +147,6 @@ RenderLayer::RenderLayer(RenderLayerModelObject* renderer)
     , m_normalFlowListDirty(true)
     , m_hasSelfPaintingLayerDescendant(false)
     , m_hasSelfPaintingLayerDescendantDirty(false)
-    , m_hasOutOfFlowPositionedDescendant(false)
-    , m_hasOutOfFlowPositionedDescendantDirty(false)
-    , m_needsCompositedScrolling(false)
-    , m_descendantsAreContiguousInStackingOrder(false)
     , m_isRootLayer(renderer->isRenderView())
     , m_usedTransparency(false)
     , m_paintingInsideReflection(false)
@@ -474,166 +470,6 @@ void RenderLayer::dirtyAncestorChainHasSelfPaintingLayerDescendantStatus()
     }
 }
 
-bool RenderLayer::acceleratedCompositingForOverflowScrollEnabled() const
-{
-    return renderer()->frame()
-        && renderer()->frame()->page()
-        && renderer()->frame()->page()->settings()->acceleratedCompositingForOverflowScrollEnabled();
-}
-
-// If we are a stacking context, 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 context. It is safe
-// to become a stacking context 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
-// context descendants with their z indices, and us with 'this' (we're a
-// stacking context 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 context 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 context 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 context.
-//  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 context. 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);
-
-    // Create a reverse lookup.
-    HashMap<const RenderLayer*, int> lookup;
-
-    if (m_negZOrderList) {
-        int stackingOrderIndex = -1;
-        size_t listSize = m_negZOrderList->size();
-        for (size_t i = 0; i < listSize; ++i) {
-            RenderLayer* currentLayer = m_negZOrderList->at(listSize - i - 1);
-            if (!currentLayer->isStackingContext())
-                continue;
-            lookup.set(currentLayer, stackingOrderIndex--);
-        }
-    }
-
-    if (m_posZOrderList) {
-        size_t listSize = m_posZOrderList->size();
-        int stackingOrderIndex = 1;
-        for (size_t i = 0; i < listSize; ++i) {
-            RenderLayer* currentLayer = m_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;
-#if USE(ACCELERATED_COMPOSITING)
-        bool didUpdate = newValue != m_descendantsAreContiguousInStackingOrder;
-#endif
-        m_descendantsAreContiguousInStackingOrder = newValue;
-#if USE(ACCELERATED_COMPOSITING)
-        if (didUpdate)
-            updateNeedsCompositedScrolling();
-#endif
-    }
-}
-
 void RenderLayer::computeRepaintRects(const RenderLayerModelObject* repaintContainer, const RenderGeometryMap* geometryMap)
 {
     ASSERT(!m_visibleContentStatusDirty);
@@ -739,22 +575,6 @@ void RenderLayer::updateLayerPositionsAfterScroll(RenderGeometryMap* geometryMap
         geometryMap->popMappingsToAncestor(parent());
 }
 
-#if USE(ACCELERATED_COMPOSITING)
-void RenderLayer::positionOverflowControlsAfterPromotionToCompositedScrolling()
-{
-    if (!usesCompositedScrolling() || !backing()->hasUnpositionedOverflowControlsLayers())
-        return;
-
-    RenderGeometryMap geometryMap(UseTransforms);
-    RenderView* view = renderer()->view();
-    if (this != view->layer())
-        geometryMap.pushMappingsToAncestor(parent(), 0);
-
-    LayoutPoint offsetFromRoot = LayoutPoint(geometryMap.absolutePoint(FloatPoint()));
-    positionOverflowControls(toSize(roundedIntPoint(offsetFromRoot)));
-}
-#endif
-
 #if ENABLE(CSS_COMPOSITING)
 void RenderLayer::updateBlendMode()
 {
@@ -886,14 +706,6 @@ void RenderLayer::updatePagination()
     }
 }
 
-bool RenderLayer::canSafelyEstablishAStackingContext() const
-{
-    if (isStackingContext() || !stackingContext())
-        return true;
-
-    return m_descendantsAreContiguousInStackingOrder;
-}
-
 void RenderLayer::setHasVisibleContent()
 { 
     if (m_hasVisibleContent && !m_visibleContentStatusDirty) {
@@ -947,54 +759,25 @@ void RenderLayer::setAncestorChainHasVisibleDescendant()
     }
 }
 
-void RenderLayer::updateDescendantDependentFlags(HashSet<const RenderObject*>* outOfFlowDescendantContainingBlocks)
+void RenderLayer::updateDescendantDependentFlags()
 {
-    if (m_visibleDescendantStatusDirty || m_hasSelfPaintingLayerDescendantDirty || m_hasOutOfFlowPositionedDescendantDirty) {
-#if USE(ACCELERATED_COMPOSITING)
-        bool oldHasOutOfFlowPositionedDescendant = m_hasOutOfFlowPositionedDescendant;
-#endif
+    if (m_visibleDescendantStatusDirty || m_hasSelfPaintingLayerDescendantDirty) {
         m_hasVisibleDescendant = false;
         m_hasSelfPaintingLayerDescendant = false;
-        m_hasOutOfFlowPositionedDescendant = false;
-
-        HashSet<const RenderObject*> childOutOfFlowDescendantContainingBlocks;
         for (RenderLayer* child = firstChild(); child; child = child->nextSibling()) {
-            childOutOfFlowDescendantContainingBlocks.clear();
-            child->updateDescendantDependentFlags(&childOutOfFlowDescendantContainingBlocks);
-
-            bool childIsOutOfFlowPositioned = child->renderer() && child->renderer()->isOutOfFlowPositioned();
-            if (childIsOutOfFlowPositioned)
-                childOutOfFlowDescendantContainingBlocks.add(child->renderer()->containingBlock());
-
-            if (outOfFlowDescendantContainingBlocks) {
-                HashSet<const RenderObject*>::const_iterator it = childOutOfFlowDescendantContainingBlocks.begin();
-                for (; it != childOutOfFlowDescendantContainingBlocks.end(); ++it)
-                    outOfFlowDescendantContainingBlocks->add(*it);
-            }
+            child->updateDescendantDependentFlags();
 
             bool hasVisibleDescendant = child->m_hasVisibleContent || child->m_hasVisibleDescendant;
             bool hasSelfPaintingLayerDescendant = child->isSelfPaintingLayer() || child->hasSelfPaintingLayerDescendant();
-            bool hasOutOfFlowPositionedDescendant = !childOutOfFlowDescendantContainingBlocks.isEmpty();
 
             m_hasVisibleDescendant |= hasVisibleDescendant;
             m_hasSelfPaintingLayerDescendant |= hasSelfPaintingLayerDescendant;
-            m_hasOutOfFlowPositionedDescendant |= hasOutOfFlowPositionedDescendant;
 
-            if (m_hasVisibleDescendant && m_hasSelfPaintingLayerDescendant && m_hasOutOfFlowPositionedDescendant)
+            if (m_hasVisibleDescendant && m_hasSelfPaintingLayerDescendant)
                 break;
         }
-
-        if (outOfFlowDescendantContainingBlocks && renderer())
-            outOfFlowDescendantContainingBlocks->remove(renderer());
-
         m_visibleDescendantStatusDirty = false;
         m_hasSelfPaintingLayerDescendantDirty = false;
-        m_hasOutOfFlowPositionedDescendantDirty = false;
-
-#if USE(ACCELERATED_COMPOSITING)
-        if (oldHasOutOfFlowPositionedDescendant != m_hasOutOfFlowPositionedDescendant)
-            updateNeedsCompositedScrolling();
-#endif
     }
 
     if (m_visibleContentStatusDirty) {
@@ -1595,9 +1378,6 @@ void RenderLayer::addChild(RenderLayer* child, RenderLayer* beforeChild)
     if (child->isSelfPaintingLayer() || child->hasSelfPaintingLayerDescendant())
         setAncestorChainHasSelfPaintingLayerDescendant();
 
-    if ((child->renderer() && child->renderer()->isOutOfFlowPositioned()) || child->hasOutOfFlowPositionedDescendant())
-        setAncestorChainHasOutOfFlowPositionedDescendant(child->renderer()->containingBlock());
-
 #if USE(ACCELERATED_COMPOSITING)
     compositor()->layerWasAdded(this, child);
 #endif
@@ -1630,9 +1410,6 @@ RenderLayer* RenderLayer::removeChild(RenderLayer* oldChild)
         oldChild->dirtyStackingContextZOrderLists();
     }
 
-    if ((oldChild->renderer() && oldChild->renderer()->isOutOfFlowPositioned()) || oldChild->hasOutOfFlowPositionedDescendant())
-        dirtyAncestorChainHasOutOfFlowPositionedDescendantStatus();
-
     oldChild->setPreviousSibling(0);
     oldChild->setNextSibling(0);
     oldChild->setParent(0);
@@ -1845,34 +1622,14 @@ void RenderLayer::convertToLayerCoords(const RenderLayer* ancestorLayer, LayoutR
 #if USE(ACCELERATED_COMPOSITING)
 bool RenderLayer::usesCompositedScrolling() const
 {
-    return isComposited() && backing()->scrollingLayer();
-}
-
-bool RenderLayer::needsCompositedScrolling() const
-{
-    return m_needsCompositedScrolling;
-}
-
-void RenderLayer::updateNeedsCompositedScrolling()
-{
-    bool oldNeedsCompositedScrolling = m_needsCompositedScrolling;
-
     if (!scrollsOverflow() || !allowsScrolling())
-        m_needsCompositedScrolling = false;
-    else {
-        bool forceUseCompositedScrolling = acceleratedCompositingForOverflowScrollEnabled()
-            && canSafelyEstablishAStackingContext()
-            && !hasOutOfFlowPositionedDescendant();
+        return false;
 
 #if ENABLE(ACCELERATED_OVERFLOW_SCROLLING)
-        m_needsCompositedScrolling = forceUseCompositedScrolling || renderer()->style()->useTouchOverflowScrolling();
+    return renderer()->style()->useTouchOverflowScrolling();
 #else
-        m_needsCompositedScrolling = forceUseCompositedScrolling;
+    return false;
 #endif
-    }
-
-    if (oldNeedsCompositedScrolling != m_needsCompositedScrolling)
-        updateSelfPaintingLayer();
 }
 #endif
 
@@ -2036,15 +1793,8 @@ void RenderLayer::scrollTo(int x, int y)
         frame->eventHandler()->dispatchFakeMouseMoveEventSoonInQuad(quadForFakeMouseMoveEvent);
     }
 
-    bool requiresRepaint = true;
-
-#if USE(ACCELERATED_COMPOSITING)
-    if (compositor()->inCompositingMode() && usesCompositedScrolling())
-        requiresRepaint = false;
-#endif
-
     // Just schedule a full repaint of our object.
-    if (view && requiresRepaint)
+    if (view && !usesCompositedScrolling())
         renderer()->repaintUsingContainer(repaintContainer, pixelSnappedIntRect(m_repaintRect));
 
     // Schedule the scroll DOM event.
@@ -5050,11 +4800,8 @@ void RenderLayer::dirtyZOrderLists()
     m_zOrderListsDirty = true;
 
 #if USE(ACCELERATED_COMPOSITING)
-    if (!renderer()->documentBeingDestroyed()) {
+    if (!renderer()->documentBeingDestroyed())
         compositor()->setCompositingLayersNeedRebuild();
-        if (acceleratedCompositingForOverflowScrollEnabled())
-            compositor()->setShouldReevaluateCompositingAfterLayout();
-    }
 #endif
 }
 
@@ -5074,11 +4821,8 @@ void RenderLayer::dirtyNormalFlowList()
     m_normalFlowListDirty = true;
 
 #if USE(ACCELERATED_COMPOSITING)
-    if (!renderer()->documentBeingDestroyed()) {
+    if (!renderer()->documentBeingDestroyed())
         compositor()->setCompositingLayersNeedRebuild();
-        if (acceleratedCompositingForOverflowScrollEnabled())
-            compositor()->setShouldReevaluateCompositingAfterLayout();
-    }
 #endif
 }
 
@@ -5176,8 +4920,6 @@ void RenderLayer::collectLayers(bool includeHiddenLayers, OwnPtr<Vector<RenderLa
 
 void RenderLayer::updateLayerListsIfNeeded()
 {
-    bool shouldUpdateDescendantsAreContiguousInStackingOrder = isStackingContext() && (m_zOrderListsDirty || m_normalFlowListDirty);
-
     updateZOrderLists();
     updateNormalFlowList();
 
@@ -5185,9 +4927,6 @@ void RenderLayer::updateLayerListsIfNeeded()
         reflectionLayer->updateZOrderLists();
         reflectionLayer->updateNormalFlowList();
     }
-
-    if (shouldUpdateDescendantsAreContiguousInStackingOrder)
-        updateDescendantsAreContiguousInStackingOrder();
 }
 
 void RenderLayer::updateCompositingAndLayerListsIfNeeded()
@@ -5275,14 +5014,14 @@ bool RenderLayer::shouldBeNormalFlowOnly() const
             && !renderer()->hasBlendMode()
 #endif
             && !isTransparent()
-            && !needsCompositedScrolling();
+            && !usesCompositedScrolling();
 }
 
 bool RenderLayer::shouldBeSelfPaintingLayer() const
 {
     return !isNormalFlowOnly()
         || hasOverlayScrollbars()
-        || needsCompositedScrolling()
+        || usesCompositedScrolling()
         || renderer()->hasReflection()
         || renderer()->hasMask()
         || renderer()->isTableRow()
@@ -5378,42 +5117,6 @@ void RenderLayer::updateScrollbarsAfterStyleChange(const RenderStyle* oldStyle)
         updateScrollableAreaSet(hasScrollableHorizontalOverflow() || hasScrollableVerticalOverflow());
 }
 
-void RenderLayer::setAncestorChainHasOutOfFlowPositionedDescendant(RenderObject* containingBlock)
-{
-    for (RenderLayer* layer = this; layer; layer = layer->parent()) {
-        if (!layer->m_hasOutOfFlowPositionedDescendantDirty && layer->hasOutOfFlowPositionedDescendant())
-            break;
-
-        layer->m_hasOutOfFlowPositionedDescendantDirty = false;
-        layer->m_hasOutOfFlowPositionedDescendant = true;
-#if USE(ACCELERATED_COMPOSITING)
-        layer->updateNeedsCompositedScrolling();
-#endif
-
-        if (layer->renderer() && 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() == AbsolutePosition || oldStyle->position() == FixedPosition);
-    if (parent() && ((renderer() && renderer()->isOutOfFlowPositioned()) != wasOutOfFlowPositioned)) {
-        parent()->dirtyAncestorChainHasOutOfFlowPositionedDescendantStatus();
-#if USE(ACCELERATED_COMPOSITING)
-        if (!renderer()->documentBeingDestroyed() && acceleratedCompositingForOverflowScrollEnabled())
-            compositor()->setShouldReevaluateCompositingAfterLayout();
-#endif
-    }
-}
-
 void RenderLayer::styleChanged(StyleDifference, const RenderStyle* oldStyle)
 {
     bool isNormalFlowOnly = shouldBeNormalFlowOnly();
@@ -5434,12 +5137,11 @@ void RenderLayer::styleChanged(StyleDifference, const RenderStyle* oldStyle)
         m_marquee.clear();
     }
 
-    updateScrollbarsAfterStyleChange(oldStyle);
     updateStackingContextsAfterStyleChange(oldStyle);
+    updateScrollbarsAfterStyleChange(oldStyle);
     // 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();
@@ -5468,7 +5170,6 @@ void RenderLayer::styleChanged(StyleDifference, const RenderStyle* oldStyle)
 #endif
 
 #if USE(ACCELERATED_COMPOSITING)
-    updateNeedsCompositedScrolling();
     if (compositor()->updateLayerCompositingState(this))
         compositor()->setCompositingLayersNeedRebuild();
     else if (oldStyle && (oldStyle->clip() != renderer()->style()->clip() || oldStyle->hasClip() != renderer()->style()->hasClip()))
index a6901da..cc6b98a 100644 (file)
@@ -403,10 +403,6 @@ public:
 
     void updateLayerPositionsAfterOverflowScroll();
     void updateLayerPositionsAfterDocumentScroll();
-
-#if USE(ACCELERATED_COMPOSITING)
-    void positionOverflowControlsAfterPromotionToCompositedScrolling();
-#endif
     
     bool isPaginated() const { return m_isPaginated; }
 
@@ -467,13 +463,6 @@ public:
     // 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.
-    bool hasOutOfFlowPositionedDescendant() const { return m_hasOutOfFlowPositionedDescendant; }
-
     // Gets the nearest enclosing positioned ancestor layer (also includes
     // the <html> layer and the root layer).
     RenderLayer* enclosingPositionedAncestor() const;
@@ -666,7 +655,6 @@ public:
     virtual GraphicsLayer* layerForVerticalScrollbar() const;
     virtual GraphicsLayer* layerForScrollCorner() const;
     virtual bool usesCompositedScrolling() const OVERRIDE;
-    bool needsCompositedScrolling() const;
 #else
     bool isComposited() const { return false; }
     bool hasCompositedMask() const { return false; }
@@ -736,10 +724,6 @@ private:
     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* = 0);
     void computeRepaintRectsIncludingDescendants();
     void clearRepaintRects();
@@ -756,12 +740,6 @@ private:
     void updateScrollbarsAfterStyleChange(const RenderStyle* oldStyle);
     void updateScrollbarsAfterLayout();
 
-    void setAncestorChainHasOutOfFlowPositionedDescendant(RenderObject* containingBlock);
-    void dirtyAncestorChainHasOutOfFlowPositionedDescendantStatus();
-    void updateOutOfFlowPositioned(const RenderStyle* oldStyle);
-
-    void updateNeedsCompositedScrolling();
-
     // Returns true if the position changed.
     bool updateLayerPosition();
 
@@ -897,7 +875,7 @@ private:
     void dirtyAncestorChainVisibleDescendantStatus();
     void setAncestorChainHasVisibleDescendant();
 
-    void updateDescendantDependentFlags(HashSet<const RenderObject*>* outOfFlowDescendantContainingBlocks = 0);
+    void updateDescendantDependentFlags();
 
     // This flag is computed by RenderLayerCompositor, which knows more about 3d hierarchies than we do.
     void setHas3DTransformedDescendant(bool b) { m_has3DTransformedDescendant = b; }
@@ -954,9 +932,6 @@ private:
     void setIndirectCompositingReason(IndirectCompositingReason reason) { m_indirectCompositingReason = reason; }
     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 to establish a stacking context.
-    bool canSafelyEstablishAStackingContext() const;
 #endif
 
     friend class RenderLayerBacking;
@@ -997,19 +972,6 @@ protected:
     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;
-
     const bool m_isRootLayer : 1;
 
     bool m_usedTransparency : 1; // Tracks whether we need to close a transparent layer, i.e., whether
index 8773cf4..6f307c0 100644 (file)
@@ -342,7 +342,7 @@ static bool hasNonZeroTransformOrigin(const RenderObject* renderer)
 static bool layerOrAncestorIsTransformedOrUsingCompositedScrolling(RenderLayer* layer)
 {
     for (RenderLayer* curr = layer; curr; curr = curr->parent()) {
-        if (curr->hasTransform() || curr->needsCompositedScrolling())
+        if (curr->hasTransform() || curr->usesCompositedScrolling())
             return true;
     }
     
@@ -451,7 +451,7 @@ bool RenderLayerBacking::updateGraphicsLayerConfiguration()
     bool needsDescendentsClippingLayer = compositor->clipsCompositingDescendants(m_owningLayer);
 
     // Our scrolling layer will clip.
-    if (m_owningLayer->needsCompositedScrolling())
+    if (m_owningLayer->usesCompositedScrolling())
         needsDescendentsClippingLayer = false;
 
     if (updateClippingLayers(compositor->clippedByAncestor(m_owningLayer), needsDescendentsClippingLayer))
@@ -460,7 +460,7 @@ bool RenderLayerBacking::updateGraphicsLayerConfiguration()
     if (updateOverflowControlsLayers(requiresHorizontalScrollbarLayer(), requiresVerticalScrollbarLayer(), requiresScrollCornerLayer()))
         layerConfigChanged = true;
 
-    if (updateScrollingLayers(m_owningLayer->needsCompositedScrolling()))
+    if (updateScrollingLayers(m_owningLayer->usesCompositedScrolling()))
         layerConfigChanged = true;
 
     if (layerConfigChanged)
@@ -604,7 +604,7 @@ void RenderLayerBacking::updateGraphicsLayerGeometry()
     else
         graphicsLayerParentLocation = renderer()->view()->documentRect().location();
 
-    if (compAncestor && compAncestor->needsCompositedScrolling()) {
+    if (compAncestor && compAncestor->usesCompositedScrolling()) {
         RenderBox* renderBox = toRenderBox(compAncestor->renderer());
         IntSize scrollOffset = compAncestor->scrolledContentOffset();
         IntPoint scrollOrigin(renderBox->borderLeft(), renderBox->borderTop());
@@ -963,23 +963,6 @@ void RenderLayerBacking::positionOverflowControlsLayers(const IntSize& offsetFro
     }
 }
 
-bool RenderLayerBacking::hasUnpositionedOverflowControlsLayers() const
-{
-    if (GraphicsLayer* layer = layerForHorizontalScrollbar())
-        if (!layer->drawsContent())
-            return true;
-
-    if (GraphicsLayer* layer = layerForVerticalScrollbar())
-        if (!layer->drawsContent())
-            return true;
-
-    if (GraphicsLayer* layer = layerForScrollCorner())
-        if (!layer->drawsContent())
-            return true;
-
-    return false;
-}
-
 bool RenderLayerBacking::updateForegroundLayer(bool needsForegroundLayer)
 {
     bool layerChanged = false;
index f0ecf57..bfde3b9 100644 (file)
@@ -137,7 +137,6 @@ public:
     
     void updateAfterWidgetResize();
     void positionOverflowControlsLayers(const IntSize& offsetFromRoot);
-    bool hasUnpositionedOverflowControlsLayers() const;
 
     bool usingTileCache() const { return m_usingTiledCacheLayer; }
     TiledBacking* tiledBacking() const;
index ab84ba9..1741fb0 100644 (file)
@@ -990,9 +990,6 @@ void RenderLayerCompositor::computeCompositingRequirements(RenderLayer* ancestor
 
     if (overlapMap)
         overlapMap->geometryMap().popMappingsToAncestor(ancestorLayer);
-
-    if (layer->usesCompositedScrolling())
-        layer->positionOverflowControlsAfterPromotionToCompositedScrolling();
 }
 
 void RenderLayerCompositor::setCompositingParent(RenderLayer* childLayer, RenderLayer* parentLayer)
@@ -2013,7 +2010,7 @@ bool RenderLayerCompositor::requiresCompositingForPosition(RenderObject* rendere
 
 bool RenderLayerCompositor::requiresCompositingForOverflowScrolling(const RenderLayer* layer) const
 {
-    return layer->needsCompositedScrolling();
+    return layer->usesCompositedScrolling();
 }
 
 bool RenderLayerCompositor::isRunningAcceleratedTransformAnimation(RenderObject* renderer) const
index a118983..77d2fed 100644 (file)
@@ -229,7 +229,6 @@ public:
     void setTracksRepaints(bool);
 
     void reportMemoryUsage(MemoryObjectInfo*) const;
-    void setShouldReevaluateCompositingAfterLayout() { m_reevaluateCompositingAfterLayout = true; }
 
     enum FixedPositionLayerNotCompositedReason {
         NoReason,
index e0b89df..c748eab 100644 (file)
@@ -211,12 +211,6 @@ void InternalSettings::setEnableCompositingForScrollableFrames(bool enabled, Exc
     settings()->setAcceleratedCompositingForScrollableFramesEnabled(enabled);
 }
 
-void InternalSettings::setEnableCompositingForOverflowScroll(bool enabled, ExceptionCode& ec)
-{
-    InternalSettingsGuardForSettings();
-    settings()->setAcceleratedCompositingForOverflowScrollEnabled(enabled);
-}
-
 void InternalSettings::setAcceleratedDrawingEnabled(bool enabled, ExceptionCode& ec)
 {
     InternalSettingsGuardForSettings();
index 1fc7f2d..f379f28 100644 (file)
@@ -103,7 +103,6 @@ public:
     void setForceCompositingMode(bool enabled, ExceptionCode&);
     void setEnableCompositingForFixedPosition(bool enabled, ExceptionCode&);
     void setEnableCompositingForScrollableFrames(bool enabled, ExceptionCode&);
-    void setEnableCompositingForOverflowScroll(bool enabled, ExceptionCode&);
     void setAcceleratedDrawingEnabled(bool enabled, ExceptionCode&);
     void setAcceleratedFiltersEnabled(bool enabled, ExceptionCode&);
     void setMockScrollbarsEnabled(bool enabled, ExceptionCode&);
index 7e571ca..d37b3f8 100644 (file)
@@ -29,7 +29,6 @@
     void setForceCompositingMode(in boolean enabled) raises(DOMException);
     void setEnableCompositingForFixedPosition(in boolean enabled) raises(DOMException);
     void setEnableCompositingForScrollableFrames(in boolean enabled) raises(DOMException);
-    void setEnableCompositingForOverflowScroll(in boolean enabled) raises(DOMException);
     void setAcceleratedDrawingEnabled(in boolean enabled) raises(DOMException);
     void setAcceleratedFiltersEnabled(in boolean enabled) raises(DOMException);
     void setMockScrollbarsEnabled(in boolean enabled) raises(DOMException);
index 3d03007..7b16b39 100644 (file)
@@ -1,3 +1,16 @@
+2012-12-13  Adrienne Walker  <enne@chromium.org>
+
+        Unreviewed, rolling out r137645, r137646, and r137667.
+        http://trac.webkit.org/changeset/137645
+        http://trac.webkit.org/changeset/137646
+        http://trac.webkit.org/changeset/137667
+        https://bugs.webkit.org/show_bug.cgi?id=104911
+
+        Breaks some overflow layout tests
+
+        * Scripts/webkitpy/layout_tests/port/chromium.py:
+        (ChromiumPort.virtual_test_suites):
+
 2012-12-13  Dirk Pranke  <dpranke@chromium.org>
 
         Unreviewed, rolling out r137661.
index 1e676e8..dc2205b 100644 (file)
@@ -391,12 +391,6 @@ class ChromiumPort(Port):
             VirtualTestSuite('platform/chromium/virtual/deferred/fast/images',
                              'fast/images',
                              ['--enable-deferred-image-decoding', '--enable-per-tile-painting', '--force-compositing-mode']),
-            VirtualTestSuite('platform/chromium/virtual/gpu/compositedscrolling/overflow',
-                             'compositing/overflow',
-                             ['--enable-accelerated-compositing-for-overflow-scroll']),
-            VirtualTestSuite('platform/chromium/virtual/gpu/compositedscrolling/scrollbars',
-                             'scrollbars',
-                             ['--enable-accelerated-compositing-for-overflow-scroll']),
         ]
 
     #