Title: [122376] trunk
- Revision
- 122376
- Author
- [email protected]
- Date
- 2012-07-11 15:26:55 -0700 (Wed, 11 Jul 2012)
Log Message
Assertion ASSERTION FAILED: enclosingIntRect(rendererMappedResult) == enclosingIntRect(FloatQuad(result).boundingBox()) when compositing in paginated mode
https://bugs.webkit.org/show_bug.cgi?id=90919
Reviewed by Antti Koivisto.
Source/WebCore:
r121124 added a fast path for geometry mapping that goes via layers
when possible. However, this broke paginated pages, which put
the root (RenderView) layer into column mode, because it failed
to check for columns on the ancestor layer.
Rather than make a risky change to convertToLayerCoords(), add a local
function canMapViaLayer(), which is like RenderLayer::canUseConvertToLayerCoords(),
but doesn't check for compositing (compositing itself is not a reason
to avoid convertToLayerCoords). Call canMapViaLayer() with the ancestorLayer
to check whether the ancestor has columns, which fixes the bug.
Test: compositing/columns/geometry-map-paginated-assert.html
* rendering/RenderGeometryMap.cpp:
(WebCore::canMapViaLayer):
(WebCore::RenderGeometryMap::pushMappingsToAncestor):
LayoutTests:
Test with a composited element in a document which is put into paginated mode.
* compositing/columns/geometry-map-paginated-assert-expected.txt: Added.
* compositing/columns/geometry-map-paginated-assert.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (122375 => 122376)
--- trunk/LayoutTests/ChangeLog 2012-07-11 22:12:55 UTC (rev 122375)
+++ trunk/LayoutTests/ChangeLog 2012-07-11 22:26:55 UTC (rev 122376)
@@ -1,3 +1,15 @@
+2012-07-10 Simon Fraser <[email protected]>
+
+ Assertion ASSERTION FAILED: enclosingIntRect(rendererMappedResult) == enclosingIntRect(FloatQuad(result).boundingBox()) when compositing in paginated mode
+ https://bugs.webkit.org/show_bug.cgi?id=90919
+
+ Reviewed by Antti Koivisto.
+
+ Test with a composited element in a document which is put into paginated mode.
+
+ * compositing/columns/geometry-map-paginated-assert-expected.txt: Added.
+ * compositing/columns/geometry-map-paginated-assert.html: Added.
+
2012-07-11 Ojan Vafai <[email protected]>
Simplify css3/flexbox/repaint-rtl-column.html
Added: trunk/LayoutTests/compositing/columns/geometry-map-paginated-assert-expected.txt (0 => 122376)
--- trunk/LayoutTests/compositing/columns/geometry-map-paginated-assert-expected.txt (rev 0)
+++ trunk/LayoutTests/compositing/columns/geometry-map-paginated-assert-expected.txt 2012-07-11 22:26:55 UTC (rev 122376)
@@ -0,0 +1,3 @@
+This test should not assert.
+
+
Property changes on: trunk/LayoutTests/compositing/columns/geometry-map-paginated-assert-expected.txt
___________________________________________________________________
Added: svn:mime-type
Added: svn:keywords
Added: svn:eol-style
Added: trunk/LayoutTests/compositing/columns/geometry-map-paginated-assert.html (0 => 122376)
--- trunk/LayoutTests/compositing/columns/geometry-map-paginated-assert.html (rev 0)
+++ trunk/LayoutTests/compositing/columns/geometry-map-paginated-assert.html 2012-07-11 22:26:55 UTC (rev 122376)
@@ -0,0 +1,38 @@
+<html>
+<head>
+ <script>
+ if (window.testRunner)
+ testRunner.dumpAsText();
+
+ if (window.internals)
+ internals.setPagination(document, "LeftToRightPaginated", 0);
+ </script>
+ <style>
+ .spacer {
+ height: 350px;
+ width: 100%;
+ margin: 10px;
+ background-color: silver;
+ }
+
+ .box {
+ height: 100px;
+ width: 100px;
+ margin: 10px;
+ background-color: blue;
+ }
+ .composited {
+ -webkit-transform: translateZ(0);
+ }
+ </style>
+</head>
+<body>
+
+ <p>This test should not assert.</p>
+ <div class="spacer"></div>
+ <div class="spacer"></div>
+ <div class="composited box"></div>
+
+
+</body>
+</html>
Property changes on: trunk/LayoutTests/compositing/columns/geometry-map-paginated-assert.html
___________________________________________________________________
Added: svn:mime-type
Added: svn:keywords
Added: svn:eol-style
Modified: trunk/Source/WebCore/ChangeLog (122375 => 122376)
--- trunk/Source/WebCore/ChangeLog 2012-07-11 22:12:55 UTC (rev 122375)
+++ trunk/Source/WebCore/ChangeLog 2012-07-11 22:26:55 UTC (rev 122376)
@@ -1,3 +1,27 @@
+2012-07-10 Simon Fraser <[email protected]>
+
+ Assertion ASSERTION FAILED: enclosingIntRect(rendererMappedResult) == enclosingIntRect(FloatQuad(result).boundingBox()) when compositing in paginated mode
+ https://bugs.webkit.org/show_bug.cgi?id=90919
+
+ Reviewed by Antti Koivisto.
+
+ r121124 added a fast path for geometry mapping that goes via layers
+ when possible. However, this broke paginated pages, which put
+ the root (RenderView) layer into column mode, because it failed
+ to check for columns on the ancestor layer.
+
+ Rather than make a risky change to convertToLayerCoords(), add a local
+ function canMapViaLayer(), which is like RenderLayer::canUseConvertToLayerCoords(),
+ but doesn't check for compositing (compositing itself is not a reason
+ to avoid convertToLayerCoords). Call canMapViaLayer() with the ancestorLayer
+ to check whether the ancestor has columns, which fixes the bug.
+
+ Test: compositing/columns/geometry-map-paginated-assert.html
+
+ * rendering/RenderGeometryMap.cpp:
+ (WebCore::canMapViaLayer):
+ (WebCore::RenderGeometryMap::pushMappingsToAncestor):
+
2012-07-11 Dana Jansens <[email protected]>
[chromium] Rename layerRect to contentRect for rects that live in content space
Modified: trunk/Source/WebCore/rendering/RenderGeometryMap.cpp (122375 => 122376)
--- trunk/Source/WebCore/rendering/RenderGeometryMap.cpp 2012-07-11 22:12:55 UTC (rev 122375)
+++ trunk/Source/WebCore/rendering/RenderGeometryMap.cpp 2012-07-11 22:26:55 UTC (rev 122376)
@@ -138,14 +138,31 @@
} while (renderer && renderer != ancestorRenderer);
}
+static bool canMapViaLayer(const RenderLayer* layer)
+{
+ RenderStyle* style = layer->renderer()->style();
+ if (style->position() == FixedPosition || style->isFlippedBlocksWritingMode())
+ return false;
+
+ if (layer->renderer()->hasColumns() || layer->renderer()->hasTransform())
+ return false;
+
+#if ENABLE(SVG)
+ if (layer->renderer()->isSVGRoot())
+ return false;
+#endif
+
+ return true;
+}
+
void RenderGeometryMap::pushMappingsToAncestor(const RenderLayer* layer, const RenderLayer* ancestorLayer)
{
const RenderObject* renderer = layer->renderer();
// The simple case can be handled fast in the layer tree.
- bool canConvertInLayerTree = ancestorLayer && renderer->style()->position() != FixedPosition && !renderer->style()->isFlippedBlocksWritingMode();
+ bool canConvertInLayerTree = ancestorLayer ? canMapViaLayer(ancestorLayer) : false;
for (const RenderLayer* current = layer; current != ancestorLayer && canConvertInLayerTree; current = current->parent())
- canConvertInLayerTree = current->canUseConvertToLayerCoords();
+ canConvertInLayerTree = canMapViaLayer(current);
if (canConvertInLayerTree) {
TemporaryChange<size_t> positionChange(m_insertionPosition, m_mapping.size());
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes