- Revision
- 184968
- Author
- akl...@apple.com
- Date
- 2015-05-28 16:48:29 -0700 (Thu, 28 May 2015)
Log Message
GraphicsLayerCA should start out with m_intersectsCoverageRect=false
<https://webkit.org/b/145443>
<rdar://problem/19685798>
Reviewed by Simon Fraser.
Source/WebCore:
Since the coverage rect of a newly-constructed GraphicsLayerCA is always empty,
there's no way that the layer's own bounding box can intersect with it.
Hence the m_intersectsCoverageRect flag should be false after construction.
This fixes an issue where compositing layers in subframes would be marked as
non-volatile, despite being far outside the viewport and coverage rect.
Test: compositing/visible-rect/iframe-with-layers-outside-viewport.html
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::GraphicsLayerCA):
LayoutTests:
Add a test (based on iframe-and-layers.html) that makes an iframe with compositing
layers inside it and places it far outside the visible viewport.
The layer dump should show that the "intersects coverage rect" flag is 0 for the
iframe and its sublayers.
* compositing/visible-rect/iframe-with-layers-outside-viewport-expected.txt: Added.
* compositing/visible-rect/iframe-with-layers-outside-viewport.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (184967 => 184968)
--- trunk/LayoutTests/ChangeLog 2015-05-28 23:20:51 UTC (rev 184967)
+++ trunk/LayoutTests/ChangeLog 2015-05-28 23:48:29 UTC (rev 184968)
@@ -1,3 +1,20 @@
+2015-05-28 Andreas Kling <akl...@apple.com>
+
+ GraphicsLayerCA should start out with m_intersectsCoverageRect=false
+ <https://webkit.org/b/145443>
+ <rdar://problem/19685798>
+
+ Reviewed by Simon Fraser.
+
+ Add a test (based on iframe-and-layers.html) that makes an iframe with compositing
+ layers inside it and places it far outside the visible viewport.
+
+ The layer dump should show that the "intersects coverage rect" flag is 0 for the
+ iframe and its sublayers.
+
+ * compositing/visible-rect/iframe-with-layers-outside-viewport-expected.txt: Added.
+ * compositing/visible-rect/iframe-with-layers-outside-viewport.html: Added.
+
2015-05-28 Xabier Rodriguez Calvar <calva...@igalia.com> and Youenn Fablet <youenn.fab...@crf.canon.fr>
[Streams API] ReadableStreamReader should not be exposed
Added: trunk/LayoutTests/compositing/visible-rect/iframe-with-layers-outside-viewport-expected.txt (0 => 184968)
--- trunk/LayoutTests/compositing/visible-rect/iframe-with-layers-outside-viewport-expected.txt (rev 0)
+++ trunk/LayoutTests/compositing/visible-rect/iframe-with-layers-outside-viewport-expected.txt 2015-05-28 23:48:29 UTC (rev 184968)
@@ -0,0 +1,91 @@
+
+(GraphicsLayer
+ (anchor 0.00 0.00)
+ (bounds 1508.00 3154.00)
+ (visible rect 0.00, 0.00 785.00 x 585.00)
+ (coverage rect 0.00, 0.00 785.00 x 585.00)
+ (intersects coverage rect 1)
+ (contentsScale 1.00)
+ (children 1
+ (GraphicsLayer
+ (bounds 1508.00 3154.00)
+ (contentsOpaque 1)
+ (visible rect 0.00, 0.00 785.00 x 585.00)
+ (coverage rect 0.00, 0.00 785.00 x 585.00)
+ (intersects coverage rect 1)
+ (contentsScale 1.00)
+ (children 1
+ (GraphicsLayer
+ (position 8.00 3000.00)
+ (bounds 304.00 154.00)
+ (drawsContent 1)
+ (visible rect 0.00, 0.00 0.00 x 0.00)
+ (coverage rect -8.00, -3000.00 785.00 x 585.00)
+ (intersects coverage rect 0)
+ (contentsScale 1.00)
+ (children 1
+ (GraphicsLayer
+ (position 2.00 2.00)
+ (visible rect 0.00, 0.00 0.00 x 0.00)
+ (coverage rect -10.00, -3002.00 785.00 x 585.00)
+ (intersects coverage rect 0)
+ (contentsScale 1.00)
+ (children 1
+ (GraphicsLayer
+ (anchor 0.00 0.00)
+ (bounds 285.00 135.00)
+ (visible rect 0.00, 0.00 0.00 x 0.00)
+ (coverage rect 0.00, 0.00 0.00 x 0.00)
+ (intersects coverage rect 0)
+ (contentsScale 1.00)
+ (children 1
+ (GraphicsLayer
+ (visible rect 0.00, 0.00 0.00 x 0.00)
+ (coverage rect 0.00, 0.00 0.00 x 0.00)
+ (intersects coverage rect 0)
+ (contentsScale 1.00)
+ (children 1
+ (GraphicsLayer
+ (anchor 0.00 0.00)
+ (bounds 1508.00 1516.00)
+ (visible rect 0.00, 0.00 0.00 x 0.00)
+ (coverage rect 0.00, 0.00 0.00 x 0.00)
+ (intersects coverage rect 0)
+ (contentsScale 1.00)
+ (children 1
+ (GraphicsLayer
+ (bounds 1508.00 1516.00)
+ (drawsContent 1)
+ (visible rect 0.00, 0.00 0.00 x 0.00)
+ (coverage rect 0.00, 0.00 0.00 x 0.00)
+ (intersects coverage rect 0)
+ (contentsScale 1.00)
+ (children 1
+ (GraphicsLayer
+ (position 8.00 8.00)
+ (bounds 100.00 300.00)
+ (contentsOpaque 1)
+ (drawsContent 1)
+ (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 1.00 1.00])
+ (visible rect 0.00, 0.00 0.00 x 0.00)
+ (coverage rect -8.00, -8.00 0.00 x 0.00)
+ (intersects coverage rect 0)
+ (contentsScale 1.00)
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+)
+
Added: trunk/LayoutTests/compositing/visible-rect/iframe-with-layers-outside-viewport.html (0 => 184968)
--- trunk/LayoutTests/compositing/visible-rect/iframe-with-layers-outside-viewport.html (rev 0)
+++ trunk/LayoutTests/compositing/visible-rect/iframe-with-layers-outside-viewport.html 2015-05-28 23:48:29 UTC (rev 184968)
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <style>
+ body {
+ height: 1500px;
+ width: 1500px;
+ }
+
+ iframe {
+ position: absolute;
+ top: 3000px;
+ }
+
+ </style>
+ <script>
+ if (window.testRunner)
+ testRunner.dumpAsText();
+
+ function dumpLayers()
+ {
+ if (window.internals)
+ document.getElementById('layers').innerText = internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_VISIBLE_RECTS)
+ }
+ window.addEventListener('load', dumpLayers, false);
+ </script>
+</head>
+<body>
+ <iframe src="" scrolling="nso"></iframe>
+ <pre id="layers">Layer tree goes here when testing</pre>
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (184967 => 184968)
--- trunk/Source/WebCore/ChangeLog 2015-05-28 23:20:51 UTC (rev 184967)
+++ trunk/Source/WebCore/ChangeLog 2015-05-28 23:48:29 UTC (rev 184968)
@@ -1,3 +1,23 @@
+2015-05-28 Andreas Kling <akl...@apple.com>
+
+ GraphicsLayerCA should start out with m_intersectsCoverageRect=false
+ <https://webkit.org/b/145443>
+ <rdar://problem/19685798>
+
+ Reviewed by Simon Fraser.
+
+ Since the coverage rect of a newly-constructed GraphicsLayerCA is always empty,
+ there's no way that the layer's own bounding box can intersect with it.
+ Hence the m_intersectsCoverageRect flag should be false after construction.
+
+ This fixes an issue where compositing layers in subframes would be marked as
+ non-volatile, despite being far outside the viewport and coverage rect.
+
+ Test: compositing/visible-rect/iframe-with-layers-outside-viewport.html
+
+ * platform/graphics/ca/GraphicsLayerCA.cpp:
+ (WebCore::GraphicsLayerCA::GraphicsLayerCA):
+
2015-05-28 Commit Queue <commit-qu...@webkit.org>
Unreviewed, rolling out r184796 and r184832.
Modified: trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp (184967 => 184968)
--- trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp 2015-05-28 23:20:51 UTC (rev 184967)
+++ trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp 2015-05-28 23:48:29 UTC (rev 184968)
@@ -358,7 +358,7 @@
, m_needsFullRepaint(false)
, m_usingBackdropLayerType(false)
, m_allowsBackingStoreDetachment(true)
- , m_intersectsCoverageRect(true)
+ , m_intersectsCoverageRect(false)
{
}