Title: [141121] trunk/Source/WebCore
- Revision
- 141121
- Author
- [email protected]
- Date
- 2013-01-29 09:04:20 -0800 (Tue, 29 Jan 2013)
Log Message
Don't overlap test for composited scroll DIVs after scroll
https://bugs.webkit.org/show_bug.cgi?id=107471
Patch by Glenn Hartmann <[email protected]> on 2013-01-29
Reviewed by Simon Fraser.
We don't need to test for overlap after scroll when both
usesCompositedScrolling and !hasOutOfFlowPositionedDescendant
because:
a) Since we're using composited-scrolling, the composited region
presented by the composited-scrolling element to other non-descendant
layers doesn't change during composited scrolling (it's always the
entire scroll layer), and
b) Since we have no out of flow positioned descendants, the scrolling
descendants all move together, so their overlap with respect to each
other cannot change.
So no descendants nor any non-descendants can have their overlap
affected, so it's safe to skip testing.
No new tests (no change in behaviour).
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateCompositingLayersAfterScroll):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateCompositingLayers):
* rendering/RenderLayerCompositor.h:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (141120 => 141121)
--- trunk/Source/WebCore/ChangeLog 2013-01-29 16:55:34 UTC (rev 141120)
+++ trunk/Source/WebCore/ChangeLog 2013-01-29 17:04:20 UTC (rev 141121)
@@ -1,3 +1,34 @@
+2013-01-29 Glenn Hartmann <[email protected]>
+
+ Don't overlap test for composited scroll DIVs after scroll
+ https://bugs.webkit.org/show_bug.cgi?id=107471
+
+ Reviewed by Simon Fraser.
+
+ We don't need to test for overlap after scroll when both
+ usesCompositedScrolling and !hasOutOfFlowPositionedDescendant
+ because:
+
+ a) Since we're using composited-scrolling, the composited region
+ presented by the composited-scrolling element to other non-descendant
+ layers doesn't change during composited scrolling (it's always the
+ entire scroll layer), and
+
+ b) Since we have no out of flow positioned descendants, the scrolling
+ descendants all move together, so their overlap with respect to each
+ other cannot change.
+
+ So no descendants nor any non-descendants can have their overlap
+ affected, so it's safe to skip testing.
+
+ No new tests (no change in behaviour).
+
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::updateCompositingLayersAfterScroll):
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::updateCompositingLayers):
+ * rendering/RenderLayerCompositor.h:
+
2013-01-29 Alexis Menard <[email protected]>
Implement pseudoElement attribute on transition DOM events.
Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (141120 => 141121)
--- trunk/Source/WebCore/rendering/RenderLayer.cpp 2013-01-29 16:55:34 UTC (rev 141120)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp 2013-01-29 17:04:20 UTC (rev 141121)
@@ -2244,9 +2244,12 @@
// 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 (compositor()->compositingConsultsOverlap())
- compositor()->updateCompositingLayers(CompositingUpdateOnScroll, compositingAncestor);
- else
+ if (compositor()->compositingConsultsOverlap()) {
+ if (usesCompositedScrolling() && !hasOutOfFlowPositionedDescendant())
+ compositor()->updateCompositingLayers(CompositingUpdateOnCompositedScroll, compositingAncestor);
+ else
+ compositor()->updateCompositingLayers(CompositingUpdateOnScroll, compositingAncestor);
+ } else
compositingAncestor->backing()->updateAfterLayout(RenderLayerBacking::IsUpdateRoot);
}
}
Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp (141120 => 141121)
--- trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp 2013-01-29 16:55:34 UTC (rev 141120)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp 2013-01-29 17:04:20 UTC (rev 141121)
@@ -433,6 +433,9 @@
needGeometryUpdate = true;
break;
+ case CompositingUpdateOnCompositedScroll:
+ needGeometryUpdate = true;
+ break;
}
if (!checkForHierarchyUpdate && !needGeometryUpdate)
Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.h (141120 => 141121)
--- trunk/Source/WebCore/rendering/RenderLayerCompositor.h 2013-01-29 16:55:34 UTC (rev 141120)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.h 2013-01-29 17:04:20 UTC (rev 141121)
@@ -51,7 +51,8 @@
CompositingUpdateAfterStyleChange,
CompositingUpdateAfterLayout,
CompositingUpdateOnHitTest,
- CompositingUpdateOnScroll
+ CompositingUpdateOnScroll,
+ CompositingUpdateOnCompositedScroll
};
// RenderLayerCompositor manages the hierarchy of
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes