Title: [206100] trunk
Revision
206100
Author
za...@apple.com
Date
2016-09-19 10:36:58 -0700 (Mon, 19 Sep 2016)

Log Message

ASSERTION FAILED: clipRectsContext.rootLayer == m_clipRectsCache->m_clipRectsRoot[clipRectsType] while loading guardian.co.uk
https://bugs.webkit.org/show_bug.cgi?id=162129
<rdar://problem/28353350>

Reviewed by Antti Koivisto.

Source/WebCore:

Neither ::localClipRect() nor ::selfClipRect() accounts for paginated context while computing the cliprects (See FIXMEs).
This patch ensures that we don't end up caching these invalid cliprects.

Test: fast/multicol/assert-on-cliprect-caching-when-paginated.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects):

LayoutTests:

* fast/multicol/assert-on-cliprect-caching-when-paginated-expected.txt: Added.
* fast/multicol/assert-on-cliprect-caching-when-paginated.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (206099 => 206100)


--- trunk/LayoutTests/ChangeLog	2016-09-19 17:16:32 UTC (rev 206099)
+++ trunk/LayoutTests/ChangeLog	2016-09-19 17:36:58 UTC (rev 206100)
@@ -1,3 +1,14 @@
+2016-09-19  Zalan Bujtas  <za...@apple.com>
+
+        ASSERTION FAILED: clipRectsContext.rootLayer == m_clipRectsCache->m_clipRectsRoot[clipRectsType] while loading guardian.co.uk
+        https://bugs.webkit.org/show_bug.cgi?id=162129
+        <rdar://problem/28353350>
+
+        Reviewed by Antti Koivisto.
+
+        * fast/multicol/assert-on-cliprect-caching-when-paginated-expected.txt: Added.
+        * fast/multicol/assert-on-cliprect-caching-when-paginated.html: Added.
+
 2016-09-18  Matt Baker  <mattba...@apple.com>
 
         Web Inspector: Add test coverage for all array utility functions

Added: trunk/LayoutTests/fast/multicol/assert-on-cliprect-caching-when-paginated-expected.txt (0 => 206100)


--- trunk/LayoutTests/fast/multicol/assert-on-cliprect-caching-when-paginated-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/multicol/assert-on-cliprect-caching-when-paginated-expected.txt	2016-09-19 17:36:58 UTC (rev 206100)
@@ -0,0 +1 @@
+Pass if no assert in debug.

Added: trunk/LayoutTests/fast/multicol/assert-on-cliprect-caching-when-paginated.html (0 => 206100)


--- trunk/LayoutTests/fast/multicol/assert-on-cliprect-caching-when-paginated.html	                        (rev 0)
+++ trunk/LayoutTests/fast/multicol/assert-on-cliprect-caching-when-paginated.html	2016-09-19 17:36:58 UTC (rev 206100)
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>This tests that cliprect caching works with paginated content and composited ancestor.</title>
+<script>
+if (window.testRunner)
+    testRunner.dumpAsText();
+</script>
+</head>
+<body>
+<div style="transform: translateZ(0);">
+  <div style="column-count: 2;">
+    <div style="opacity: 0.9;">Pass if no assert in debug.</div>
+  </div>
+</div>
+</body>
+</html>

Modified: trunk/Source/WebCore/ChangeLog (206099 => 206100)


--- trunk/Source/WebCore/ChangeLog	2016-09-19 17:16:32 UTC (rev 206099)
+++ trunk/Source/WebCore/ChangeLog	2016-09-19 17:36:58 UTC (rev 206100)
@@ -1,3 +1,19 @@
+2016-09-19  Zalan Bujtas  <za...@apple.com>
+
+        ASSERTION FAILED: clipRectsContext.rootLayer == m_clipRectsCache->m_clipRectsRoot[clipRectsType] while loading guardian.co.uk
+        https://bugs.webkit.org/show_bug.cgi?id=162129
+        <rdar://problem/28353350>
+
+        Reviewed by Antti Koivisto.
+
+        Neither ::localClipRect() nor ::selfClipRect() accounts for paginated context while computing the cliprects (See FIXMEs).
+        This patch ensures that we don't end up caching these invalid cliprects.
+
+        Test: fast/multicol/assert-on-cliprect-caching-when-paginated.html
+
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::calculateClipRects):
+
 2016-09-19  Youenn Fablet  <you...@apple.com>
 
         Clean-up after r206014

Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (206099 => 206100)


--- trunk/Source/WebCore/rendering/RenderLayer.cpp	2016-09-19 17:16:32 UTC (rev 206099)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp	2016-09-19 17:36:58 UTC (rev 206100)
@@ -5726,7 +5726,8 @@
     LayoutRect layerBounds;
     ClipRect backgroundRect;
     ClipRect foregroundRect;
-    ClipRectsContext clipRectsContext(clippingRootLayer, PaintingClipRects);
+    auto clipRectType = !m_enclosingPaginationLayer || m_enclosingPaginationLayer == clippingRootLayer ? PaintingClipRects : TemporaryClipRects;
+    ClipRectsContext clipRectsContext(clippingRootLayer, clipRectType);
     calculateRects(clipRectsContext, renderer().view().documentRect(), layerBounds, backgroundRect, foregroundRect, offsetFromAncestor(clippingRootLayer));
     return clippingRootLayer->renderer().localToAbsoluteQuad(FloatQuad(backgroundRect.rect())).enclosingBoundingBox();
 }
@@ -5742,7 +5743,8 @@
     LayoutRect layerBounds;
     ClipRect backgroundRect;
     ClipRect foregroundRect;
-    ClipRectsContext clipRectsContext(clippingRootLayer, PaintingClipRects);
+    auto clipRectType = !m_enclosingPaginationLayer || m_enclosingPaginationLayer == clippingRootLayer ? PaintingClipRects : TemporaryClipRects;
+    ClipRectsContext clipRectsContext(clippingRootLayer, clipRectType);
     calculateRects(clipRectsContext, LayoutRect::infiniteRect(), layerBounds, backgroundRect, foregroundRect, offsetFromRoot);
 
     LayoutRect clipRect = backgroundRect.rect();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to