Title: [137690] trunk/Source/WebCore
- Revision
- 137690
- Author
- [email protected]
- Date
- 2012-12-13 17:44:16 -0800 (Thu, 13 Dec 2012)
Log Message
https://bugs.webkit.org/show_bug.cgi?id=102599
ASSERT loading Acid3 test in run-safari --debug (r135050)
Reviewed by Simon Fraser.
New flag IncludeCompositedDescendants will always calculate the layer bounds for
descendants, even when the are composited.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateLayerBounds):
* rendering/RenderLayer.h:
calculateCompositedBounds() should not include this new flag, so instead of
calling that, call calculateLayerBounds() directly with the
IncludeCompositedDescendants flag. This will get us the information we need
upfront and avoid the toggling later on.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresCompositingForPosition):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (137689 => 137690)
--- trunk/Source/WebCore/ChangeLog 2012-12-14 01:29:03 UTC (rev 137689)
+++ trunk/Source/WebCore/ChangeLog 2012-12-14 01:44:16 UTC (rev 137690)
@@ -1,3 +1,23 @@
+2012-12-13 Beth Dakin <[email protected]>
+
+ https://bugs.webkit.org/show_bug.cgi?id=102599
+ ASSERT loading Acid3 test in run-safari --debug (r135050)
+
+ Reviewed by Simon Fraser.
+
+ New flag IncludeCompositedDescendants will always calculate the layer bounds for
+ descendants, even when the are composited.
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::calculateLayerBounds):
+ * rendering/RenderLayer.h:
+
+ calculateCompositedBounds() should not include this new flag, so instead of
+ calling that, call calculateLayerBounds() directly with the
+ IncludeCompositedDescendants flag. This will get us the information we need
+ upfront and avoid the toggling later on.
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
+
2012-12-13 Tien-Ren Chen <[email protected]>
Don't consider container nodes of other disambiguated nodes
Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (137689 => 137690)
--- trunk/Source/WebCore/rendering/RenderLayer.cpp 2012-12-14 01:29:03 UTC (rev 137689)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp 2012-12-14 01:44:16 UTC (rev 137690)
@@ -4599,7 +4599,7 @@
}
// FIXME: should probably just pass 'flags' down to descendants.
- CalculateLayerBoundsFlags descendantFlags = DefaultCalculateLayerBoundsFlags | (flags & ExcludeHiddenDescendants);
+ CalculateLayerBoundsFlags descendantFlags = DefaultCalculateLayerBoundsFlags | (flags & ExcludeHiddenDescendants) | (flags & IncludeCompositedDescendants);
const_cast<RenderLayer*>(this)->updateLayerListsIfNeeded();
@@ -4620,7 +4620,7 @@
size_t listSize = negZOrderList->size();
for (size_t i = 0; i < listSize; ++i) {
RenderLayer* curLayer = negZOrderList->at(i);
- if (!curLayer->isComposited()) {
+ if (flags & IncludeCompositedDescendants || !curLayer->isComposited()) {
IntRect childUnionBounds = curLayer->calculateLayerBounds(this, 0, descendantFlags);
unionBounds.unite(childUnionBounds);
}
@@ -4631,7 +4631,7 @@
size_t listSize = posZOrderList->size();
for (size_t i = 0; i < listSize; ++i) {
RenderLayer* curLayer = posZOrderList->at(i);
- if (!curLayer->isComposited()) {
+ if (flags & IncludeCompositedDescendants || !curLayer->isComposited()) {
IntRect childUnionBounds = curLayer->calculateLayerBounds(this, 0, descendantFlags);
unionBounds.unite(childUnionBounds);
}
@@ -4642,7 +4642,7 @@
size_t listSize = normalFlowList->size();
for (size_t i = 0; i < listSize; ++i) {
RenderLayer* curLayer = normalFlowList->at(i);
- if (!curLayer->isComposited()) {
+ if (flags & IncludeCompositedDescendants || !curLayer->isComposited()) {
IntRect curAbsBounds = curLayer->calculateLayerBounds(this, 0, descendantFlags);
unionBounds.unite(curAbsBounds);
}
Modified: trunk/Source/WebCore/rendering/RenderLayer.h (137689 => 137690)
--- trunk/Source/WebCore/rendering/RenderLayer.h 2012-12-14 01:29:03 UTC (rev 137689)
+++ trunk/Source/WebCore/rendering/RenderLayer.h 2012-12-14 01:44:16 UTC (rev 137690)
@@ -579,6 +579,7 @@
IncludeLayerFilterOutsets = 1 << 2,
ExcludeHiddenDescendants = 1 << 3,
DontConstrainForMask = 1 << 4,
+ IncludeCompositedDescendants = 1 << 5,
DefaultCalculateLayerBoundsFlags = IncludeSelfTransform | UseLocalClipRectIfPossible | IncludeLayerFilterOutsets
};
typedef unsigned CalculateLayerBoundsFlags;
Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp (137689 => 137690)
--- trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp 2012-12-14 01:29:03 UTC (rev 137689)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp 2012-12-14 01:44:16 UTC (rev 137690)
@@ -1996,7 +1996,8 @@
// Fixed position elements that are invisible in the current view don't get their own layer.
if (FrameView* frameView = m_renderView->frameView()) {
IntRect viewBounds = frameView->visibleContentRect();
- LayoutRect layerBounds = calculateCompositedBounds(layer, rootRenderLayer());
+ LayoutRect layerBounds = layer->calculateLayerBounds(rootRenderLayer(), 0, RenderLayer::DefaultCalculateLayerBoundsFlags
+ | RenderLayer::ExcludeHiddenDescendants | RenderLayer::DontConstrainForMask | RenderLayer::IncludeCompositedDescendants);
layerBounds.scale(pageScaleFactor());
if (!viewBounds.intersects(enclosingIntRect(layerBounds))) {
if (fixedPositionLayerNotCompositedReason)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes