Unreviewed, rolling out r130396.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 4 Oct 2012 17:24:14 +0000 (17:24 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 4 Oct 2012 17:24:14 +0000 (17:24 +0000)
http://trac.webkit.org/changeset/130396
https://bugs.webkit.org/show_bug.cgi?id=98421

This patch is causing crashes on 4 tests on Lion Debug and
Mountain Lion Debug (Requested by jernoble on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-10-04

Source/WebCore:

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::calculateCompositedBounds):
(WebCore::RenderLayerCompositor::requiresCompositingForPosition):
* rendering/RenderLayerCompositor.h:
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
* testing/InternalSettings.h:
(Backup):

LayoutTests:

* compositing/layer-creation/fixed-position-absolute-descendant-expected.txt: Removed.
* compositing/layer-creation/fixed-position-absolute-descendant.html: Removed.

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

LayoutTests/ChangeLog
LayoutTests/compositing/layer-creation/fixed-position-absolute-descendant-expected.txt [deleted file]
LayoutTests/compositing/layer-creation/fixed-position-absolute-descendant.html [deleted file]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderLayerCompositor.cpp
Source/WebCore/rendering/RenderLayerCompositor.h
Source/WebCore/testing/InternalSettings.cpp
Source/WebCore/testing/InternalSettings.h

index 0986d18..43a7aa7 100644 (file)
@@ -1,3 +1,15 @@
+2012-10-04  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r130396.
+        http://trac.webkit.org/changeset/130396
+        https://bugs.webkit.org/show_bug.cgi?id=98421
+
+        This patch is causing crashes on 4 tests on Lion Debug and
+        Mountain Lion Debug (Requested by jernoble on #webkit).
+
+        * compositing/layer-creation/fixed-position-absolute-descendant-expected.txt: Removed.
+        * compositing/layer-creation/fixed-position-absolute-descendant.html: Removed.
+
 2012-10-04  Raphael Kubo da Costa  <raphael.kubo.da.costa@intel.com>
 
         [EFL] Fix r140403 by skipping the right test.
diff --git a/LayoutTests/compositing/layer-creation/fixed-position-absolute-descendant-expected.txt b/LayoutTests/compositing/layer-creation/fixed-position-absolute-descendant-expected.txt
deleted file mode 100644 (file)
index 53de1e6..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-(GraphicsLayer
-  (bounds 800.00 600.00)
-  (children 1
-    (GraphicsLayer
-      (bounds 800.00 600.00)
-      (children 2
-        (GraphicsLayer
-          (position 58.00 63.00)
-          (bounds 50.00 50.00)
-          (drawsContent 1)
-        )
-        (GraphicsLayer
-          (position 8.00 13.00)
-          (drawsContent 1)
-        )
-      )
-    )
-  )
-)
-
diff --git a/LayoutTests/compositing/layer-creation/fixed-position-absolute-descendant.html b/LayoutTests/compositing/layer-creation/fixed-position-absolute-descendant.html
deleted file mode 100644 (file)
index 2f48558..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-<!DOCTYPE html>
-
-<html>
-<head>
-  <style>
-    .fixed {
-      position: fixed;
-    }
-    .absolute {
-      position: absolute;
-    }
-    .in-view {
-      top: 50px;
-      left: 50px;
-    }
-    .out-of-view {
-      top: 50px;
-      left: -150px;
-    }
-    .box {
-      width: 50px;
-      height: 50px;
-      background: green;
-    }
-  </style>
-
-  <script type="text/javascript">
-    if (window.internals) {
-      window.internals.settings.setEnableCompositingForFixedPosition(true);
-      window.internals.settings.setFixedPositionCreatesStackingContext(true);
-    }
-
-    if (window.testRunner) {
-      testRunner.dumpAsText();
-
-      window.addEventListener("load", function() {
-        document.getElementById("layertree").innerText = testRunner.layerTreeAsText();
-      }, false);
-    }
-  </script>
-</head>
-
-<body>
-  <!-- This element gets its own layer even though its layout size is empty
-       because it has a descendant that intersects with the viewport. -->
-  <div class="fixed">
-    <div class="absolute in-view box"></div>
-  </div>
-
-  <!-- This element doesn't get a layer, because neither it or any of its
-       children intersect with the viewport. -->
-  <div class="fixed">
-    <div class="absolute out-of-view box"></div>
-  </div>
-
-  <pre id="layertree"></pre>
-</body>
-</html>
index c351a40..5d8492e 100644 (file)
@@ -1,3 +1,22 @@
+2012-10-04  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r130396.
+        http://trac.webkit.org/changeset/130396
+        https://bugs.webkit.org/show_bug.cgi?id=98421
+
+        This patch is causing crashes on 4 tests on Lion Debug and
+        Mountain Lion Debug (Requested by jernoble on #webkit).
+
+        * rendering/RenderLayerCompositor.cpp:
+        (WebCore::RenderLayerCompositor::calculateCompositedBounds):
+        (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
+        * rendering/RenderLayerCompositor.h:
+        * testing/InternalSettings.cpp:
+        (WebCore::InternalSettings::Backup::Backup):
+        (WebCore::InternalSettings::Backup::restoreTo):
+        * testing/InternalSettings.h:
+        (Backup):
+
 2012-10-04  Tony Chang  <tony@chromium.org>
 
         inline-flex baseline is sometimes wrong
index 7c83828..1332f43 100644 (file)
@@ -607,7 +607,7 @@ void RenderLayerCompositor::repaintInCompositedAncestor(RenderLayer* layer, cons
 
 // The bounds of the GraphicsLayer created for a compositing layer is the union of the bounds of all the descendant
 // RenderLayers that are rendered by the composited RenderLayer.
-IntRect RenderLayerCompositor::calculateCompositedBounds(const RenderLayer* layer, const RenderLayer* ancestorLayer) const
+IntRect RenderLayerCompositor::calculateCompositedBounds(const RenderLayer* layer, const RenderLayer* ancestorLayer)
 {
     if (!canBeComposited(layer))
         return IntRect();
@@ -1854,11 +1854,9 @@ bool RenderLayerCompositor::requiresCompositingForPosition(RenderObject* rendere
         return false;
 
     // Fixed position elements that are invisible in the current view don't get their own layer.
-    if (FrameView* frameView = m_renderView->frameView()) {
-        IntRect viewBounds = IntRect(IntPoint(frameView->scrollOffsetForFixedPosition()), frameView->layoutSize());
-        if (!layer->absoluteBoundingBox().intersects(viewBounds) && !calculateCompositedBounds(layer, rootRenderLayer()).intersects(viewBounds))
-            return false;
-    }
+    FrameView* frameView = m_renderView->frameView();
+    if (frameView && !layer->absoluteBoundingBox().intersects(IntRect(IntPoint(frameView->scrollOffsetForFixedPosition()), frameView->layoutSize())))
+        return false;
 
     return true;
 }
index 606e5b8..5d803a9 100644 (file)
@@ -124,7 +124,7 @@ public:
     bool needsContentsCompositingLayer(const RenderLayer*) const;
     // Return the bounding box required for compositing layer and its childern, relative to ancestorLayer.
     // If layerBoundingBox is not 0, on return it contains the bounding box of this layer only.
-    IntRect calculateCompositedBounds(const RenderLayer*, const RenderLayer* ancestorLayer) const;
+    IntRect calculateCompositedBounds(const RenderLayer*, const RenderLayer* ancestorLayer);
 
     // Repaint the appropriate layers when the given RenderLayer starts or stops being composited.
     void repaintOnCompositingChange(RenderLayer*);
index e14233b..bb9eed6 100755 (executable)
@@ -81,7 +81,6 @@ InternalSettings::Backup::Backup(Page* page, Settings* settings)
 #endif
     , m_originalEditingBehavior(settings->editingBehaviorType())
     , m_originalUnifiedSpellCheckerEnabled(settings->unifiedTextCheckerEnabled())
-    , m_originalAcceleratedCompositingForFixedPositionEnabled(settings->acceleratedCompositingForFixedPositionEnabled())
     , m_originalFixedPositionCreatesStackingContext(settings->fixedPositionCreatesStackingContext())
     , m_originalSyncXHRInDocumentsEnabled(settings->syncXHRInDocumentsEnabled())
 #if ENABLE(INSPECTOR) && ENABLE(JAVASCRIPT_DEBUGGER)
@@ -117,7 +116,6 @@ void InternalSettings::Backup::restoreTo(Page* page, Settings* settings)
 #endif
     settings->setEditingBehaviorType(m_originalEditingBehavior);
     settings->setUnifiedTextCheckerEnabled(m_originalUnifiedSpellCheckerEnabled);
-    settings->setAcceleratedCompositingForFixedPositionEnabled(m_originalAcceleratedCompositingForFixedPositionEnabled);
     settings->setFixedPositionCreatesStackingContext(m_originalFixedPositionCreatesStackingContext);
     settings->setSyncXHRInDocumentsEnabled(m_originalSyncXHRInDocumentsEnabled);
 #if ENABLE(INSPECTOR) && ENABLE(JAVASCRIPT_DEBUGGER)
index f26c95f..be8810d 100755 (executable)
@@ -63,7 +63,6 @@ public:
 #endif
         EditingBehaviorType m_originalEditingBehavior;
         bool m_originalUnifiedSpellCheckerEnabled;
-        bool m_originalAcceleratedCompositingForFixedPositionEnabled;
         bool m_originalFixedPositionCreatesStackingContext;
         bool m_originalSyncXHRInDocumentsEnabled;
 #if ENABLE(INSPECTOR) && ENABLE(JAVASCRIPT_DEBUGGER)