Diff
Modified: trunk/LayoutTests/ChangeLog (131245 => 131246)
--- trunk/LayoutTests/ChangeLog 2012-10-13 01:11:04 UTC (rev 131245)
+++ trunk/LayoutTests/ChangeLog 2012-10-13 01:16:04 UTC (rev 131246)
@@ -1,3 +1,30 @@
+2012-10-12 Simon Fraser <simon.fra...@apple.com>
+
+ Add some initial visible rect tests and tweak the visible wash layer
+ https://bugs.webkit.org/show_bug.cgi?id=99095
+
+ Reviewed by Tim Horton.
+
+ Add some tests of the GraphicsLayerCA visibleRect for simple cases.
+
+ Skip these tests on platforms that don't log layer visible rects
+ (all non-Mac).
+
+ * compositing/visible-rect/2d-transformed-expected.txt: Added.
+ * compositing/visible-rect/2d-transformed.html: Added.
+ * compositing/visible-rect/clipped-by-viewport-expected.txt: Added.
+ * compositing/visible-rect/clipped-by-viewport.html: Added.
+ * compositing/visible-rect/clipped-visible-rect-expected.txt: Added.
+ * compositing/visible-rect/clipped-visible-rect.html: Added.
+ * platform/chromium-android/TestExpectations:
+ * platform/chromium/TestExpectations:
+ * platform/chromium/virtual/softwarecompositing/TestExpectations: Added.
+ * platform/efl/TestExpectations:
+ * platform/gtk/TestExpectations:
+ * platform/qt/TestExpectations:
+ * platform/win/TestExpectations:
+ * platform/wincairo/TestExpectations:
+
2012-10-12 Roger Fong <roger_f...@apple.com>
Unreviewed. Windows rebaseline afer r130411.
Added: trunk/LayoutTests/compositing/visible-rect/2d-transformed-expected.txt (0 => 131246)
--- trunk/LayoutTests/compositing/visible-rect/2d-transformed-expected.txt (rev 0)
+++ trunk/LayoutTests/compositing/visible-rect/2d-transformed-expected.txt 2012-10-13 01:16:04 UTC (rev 131246)
@@ -0,0 +1,45 @@
+(GraphicsLayer
+ (bounds 800.00 600.00)
+ (visible rect 0.00, 0.00 800.00 x 600.00)
+ (children 1
+ (GraphicsLayer
+ (bounds 800.00 600.00)
+ (visible rect 0.00, 0.00 800.00 x 600.00)
+ (children 1
+ (GraphicsLayer
+ (position 8.00 8.00)
+ (bounds 502.00 202.00)
+ (visible rect 0.00, 0.00 502.00 x 202.00)
+ (children 1
+ (GraphicsLayer
+ (position 1.00 1.00)
+ (bounds 500.00 200.00)
+ (visible rect 0.00, 0.00 500.00 x 200.00)
+ (children 3
+ (GraphicsLayer
+ (bounds 200.00 200.00)
+ (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] [-100.00 0.00 0.00 1.00])
+ (visible rect 100.00, 0.00 100.00 x 200.00)
+ )
+ (GraphicsLayer
+ (bounds 200.00 200.00)
+ (drawsContent 1)
+ (transform [0.71 0.71 0.00 0.00] [-0.71 0.71 0.00 0.00] [0.00 0.00 1.00 0.00] [150.00 0.00 0.00 1.00])
+ (visible rect 0.00, 0.00 200.00 x 200.00)
+ )
+ (GraphicsLayer
+ (bounds 200.00 200.00)
+ (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] [400.00 0.00 0.00 1.00])
+ (visible rect 0.00, 0.00 100.00 x 200.00)
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+)
+
Property changes on: trunk/LayoutTests/compositing/visible-rect/2d-transformed-expected.txt
___________________________________________________________________
Added: svn:mime-type
Added: svn:keywords
Added: svn:eol-style
Added: trunk/LayoutTests/compositing/visible-rect/2d-transformed.html (0 => 131246)
--- trunk/LayoutTests/compositing/visible-rect/2d-transformed.html (rev 0)
+++ trunk/LayoutTests/compositing/visible-rect/2d-transformed.html 2012-10-13 01:16:04 UTC (rev 131246)
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+ <style>
+ .container {
+ position: relative;
+ height: 200px;
+ width: 500px;
+ border: 1px solid black;
+ overflow: hidden;
+ z-index: 0;
+ }
+
+ .box {
+ position: absolute;
+ width: 200px;
+ height: 200px;
+ background-color: blue;
+ }
+ </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>
+
+ <div class="container">
+ <div class="box" style="-webkit-transform: translate3d(-100px, 0, 0)"></div>
+ <div class="box" style="-webkit-transform: translate3d(150px, 0, 0) rotate(45deg)"></div>
+ <div class="box" style="-webkit-transform: translate3d(400px, 0, 0)"></div>
+ </div>
+
+<pre id="layers">Layer tree goes here when testing</pre>
+</body>
+</html>
Property changes on: trunk/LayoutTests/compositing/visible-rect/2d-transformed.html
___________________________________________________________________
Added: svn:mime-type
Added: svn:keywords
Added: svn:eol-style
Added: trunk/LayoutTests/compositing/visible-rect/clipped-by-viewport-expected.txt (0 => 131246)
--- trunk/LayoutTests/compositing/visible-rect/clipped-by-viewport-expected.txt (rev 0)
+++ trunk/LayoutTests/compositing/visible-rect/clipped-by-viewport-expected.txt 2012-10-13 01:16:04 UTC (rev 131246)
@@ -0,0 +1,27 @@
+(GraphicsLayer
+ (bounds 800.00 600.00)
+ (visible rect 0.00, 0.00 800.00 x 600.00)
+ (children 1
+ (GraphicsLayer
+ (bounds 800.00 600.00)
+ (visible rect 0.00, 0.00 800.00 x 600.00)
+ (children 2
+ (GraphicsLayer
+ (position -100.00 -120.00)
+ (bounds 200.00 200.00)
+ (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 100.00, 120.00 100.00 x 80.00)
+ )
+ (GraphicsLayer
+ (position -100.00 200.00)
+ (bounds 200.00 200.00)
+ (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 100.00, 0.00 100.00 x 200.00)
+ )
+ )
+ )
+ )
+)
+
Property changes on: trunk/LayoutTests/compositing/visible-rect/clipped-by-viewport-expected.txt
___________________________________________________________________
Added: svn:mime-type
Added: svn:keywords
Added: svn:eol-style
Added: trunk/LayoutTests/compositing/visible-rect/clipped-by-viewport.html (0 => 131246)
--- trunk/LayoutTests/compositing/visible-rect/clipped-by-viewport.html (rev 0)
+++ trunk/LayoutTests/compositing/visible-rect/clipped-by-viewport.html 2012-10-13 01:16:04 UTC (rev 131246)
@@ -0,0 +1,49 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+ <style>
+ .container {
+ position: relative;
+ height: 200px;
+ width: 500px;
+ border: 1px solid black;
+ overflow: hidden;
+ z-index: 0;
+ }
+
+ .box {
+ position: absolute;
+ width: 200px;
+ height: 200px;
+ background-color: blue;
+ }
+
+ .composited {
+ -webkit-transform: translateZ(1px);
+ }
+
+ pre {
+ margin-top: 450px;
+ }
+ </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>
+
+<div class="composited box" style="top: -120px; left: -100px"></div>
+<div class="composited box" style="top: 200px; left: -100px"></div>
+
+<pre id="layers">Layer tree goes here when testing</pre>
+</body>
+</html>
Property changes on: trunk/LayoutTests/compositing/visible-rect/clipped-by-viewport.html
___________________________________________________________________
Added: svn:mime-type
Added: svn:keywords
Added: svn:eol-style
Added: trunk/LayoutTests/compositing/visible-rect/clipped-visible-rect-expected.txt (0 => 131246)
--- trunk/LayoutTests/compositing/visible-rect/clipped-visible-rect-expected.txt (rev 0)
+++ trunk/LayoutTests/compositing/visible-rect/clipped-visible-rect-expected.txt 2012-10-13 01:16:04 UTC (rev 131246)
@@ -0,0 +1,48 @@
+(GraphicsLayer
+ (bounds 800.00 600.00)
+ (visible rect 0.00, 0.00 800.00 x 600.00)
+ (children 1
+ (GraphicsLayer
+ (bounds 800.00 600.00)
+ (visible rect 0.00, 0.00 800.00 x 600.00)
+ (children 1
+ (GraphicsLayer
+ (position 8.00 8.00)
+ (bounds 502.00 202.00)
+ (visible rect 0.00, 0.00 502.00 x 202.00)
+ (children 1
+ (GraphicsLayer
+ (position 1.00 1.00)
+ (bounds 500.00 200.00)
+ (visible rect 0.00, 0.00 500.00 x 200.00)
+ (children 3
+ (GraphicsLayer
+ (position -100.00 0.00)
+ (bounds 200.00 200.00)
+ (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 100.00, 0.00 100.00 x 200.00)
+ )
+ (GraphicsLayer
+ (position 150.00 0.00)
+ (bounds 200.00 200.00)
+ (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 200.00 x 200.00)
+ )
+ (GraphicsLayer
+ (position 400.00 0.00)
+ (bounds 200.00 200.00)
+ (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 100.00 x 200.00)
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+)
+
Property changes on: trunk/LayoutTests/compositing/visible-rect/clipped-visible-rect-expected.txt
___________________________________________________________________
Added: svn:mime-type
Added: svn:keywords
Added: svn:eol-style
Added: trunk/LayoutTests/compositing/visible-rect/clipped-visible-rect.html (0 => 131246)
--- trunk/LayoutTests/compositing/visible-rect/clipped-visible-rect.html (rev 0)
+++ trunk/LayoutTests/compositing/visible-rect/clipped-visible-rect.html 2012-10-13 01:16:04 UTC (rev 131246)
@@ -0,0 +1,48 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+ <style>
+ .container {
+ position: relative;
+ height: 200px;
+ width: 500px;
+ border: 1px solid black;
+ overflow: hidden;
+ z-index: 0;
+ }
+
+ .box {
+ position: absolute;
+ width: 200px;
+ height: 200px;
+ background-color: blue;
+ }
+
+ .composited {
+ -webkit-transform: translateZ(1px);
+ }
+ </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>
+
+ <div class="container">
+ <div class="composited box" style="left: -100px"></div>
+ <div class="composited box" style="left: 150px"></div>
+ <div class="composited box" style="left: 400px"></div>
+ </div>
+
+<pre id="layers">Layer tree goes here when testing</pre>
+</body>
+</html>
Property changes on: trunk/LayoutTests/compositing/visible-rect/clipped-visible-rect.html
___________________________________________________________________
Added: svn:mime-type
Added: svn:keywords
Added: svn:eol-style
Modified: trunk/LayoutTests/platform/chromium/TestExpectations (131245 => 131246)
--- trunk/LayoutTests/platform/chromium/TestExpectations 2012-10-13 01:11:04 UTC (rev 131245)
+++ trunk/LayoutTests/platform/chromium/TestExpectations 2012-10-13 01:16:04 UTC (rev 131246)
@@ -671,6 +671,10 @@
printing/media-queries-print.html [ WontFix ]
printing/page-rule-in-media-query.html [ WontFix ]
+# LAYER_TREE_INCLUDES_VISIBLE_RECTS option to layerTreeAsText is only applicable to Mac.
+compositing/visible-rect [ Skip ]
+platform/chromium/virtual/softwarecompositing/visible-rect [ Skip ]
+
# Chrome doesn't call the willCacheResponse callback (a method
# of ResourceHandleClient). That function is Mac-specific.
http/tests/misc/willCacheResponse-delegate-callback.html [ WontFix ]
Modified: trunk/LayoutTests/platform/chromium-android/TestExpectations (131245 => 131246)
--- trunk/LayoutTests/platform/chromium-android/TestExpectations 2012-10-13 01:11:04 UTC (rev 131245)
+++ trunk/LayoutTests/platform/chromium-android/TestExpectations 2012-10-13 01:16:04 UTC (rev 131246)
@@ -68,6 +68,9 @@
crbug.com/135877 platform/chromium/virtual/gpu/fast/canvas/webgl
crbug.com/135877 platform/chromium/virtual/threaded/compositing/webgl
+# LAYER_TREE_INCLUDES_VISIBLE_RECTS option to layerTreeAsText is only applicable to Mac.
+compositing/visible-rect [ Skip ]
+
# Causes server error. Not feasible to fix because this is a behavior of Apache server.
webkit.org/b/95378 fast/encoding/percent-escaping.html [ WontFix ]
Modified: trunk/LayoutTests/platform/efl/TestExpectations (131245 => 131246)
--- trunk/LayoutTests/platform/efl/TestExpectations 2012-10-13 01:11:04 UTC (rev 131245)
+++ trunk/LayoutTests/platform/efl/TestExpectations 2012-10-13 01:16:04 UTC (rev 131246)
@@ -1077,6 +1077,9 @@
webkit.org/b/79766 compositing/geometry/bounds-ignores-hidden-dynamic.html [ Failure ]
webkit.org/b/79766 compositing/geometry/bounds-ignores-hidden.html [ Failure ]
+# LAYER_TREE_INCLUDES_VISIBLE_RECTS option to layerTreeAsText is only applicable to Mac.
+compositing/visible-rect [ Skip ]
+
# EFL's LayoutTestController does not implement displayInvalidatedRegion
webkit.org/b/86727 compositing/plugins/invalidate_rect.html [ Failure ]
Modified: trunk/LayoutTests/platform/gtk/TestExpectations (131245 => 131246)
--- trunk/LayoutTests/platform/gtk/TestExpectations 2012-10-13 01:11:04 UTC (rev 131245)
+++ trunk/LayoutTests/platform/gtk/TestExpectations 2012-10-13 01:16:04 UTC (rev 131246)
@@ -313,6 +313,9 @@
webkit.org/b/71849 http/tests/security/webgl-remote-read-remote-image-blocked-no-crossorigin.html [ Skip ]
webkit.org/b/71849 transforms/3d [ Skip ]
+# LAYER_TREE_INCLUDES_VISIBLE_RECTS option to layerTreeAsText is only applicable to Mac.
+compositing/visible-rect [ Skip ]
+
# Vibration API support not yet.
webkit.org/b/99029 fast/dom/navigator-vibration.html [ Failure ]
Modified: trunk/LayoutTests/platform/qt/TestExpectations (131245 => 131246)
--- trunk/LayoutTests/platform/qt/TestExpectations 2012-10-13 01:11:04 UTC (rev 131245)
+++ trunk/LayoutTests/platform/qt/TestExpectations 2012-10-13 01:16:04 UTC (rev 131246)
@@ -182,6 +182,10 @@
# Accelerated compositing is disabled for elements in a RenderFlowThread webkit.org/b/84900
compositing/regions/webkit-flow-renderer-layer-compositing.html
+# LAYER_TREE_INCLUDES_VISIBLE_RECTS option to layerTreeAsText is only applicable to Mac.
+compositing/visible-rect [ Skip ]
+
+
# ENABLE(SHADOW_DOM) is disabled.
editing/shadow
fast/dom/shadow/access-key.html
Modified: trunk/LayoutTests/platform/win/TestExpectations (131245 => 131246)
--- trunk/LayoutTests/platform/win/TestExpectations 2012-10-13 01:11:04 UTC (rev 131245)
+++ trunk/LayoutTests/platform/win/TestExpectations 2012-10-13 01:16:04 UTC (rev 131246)
@@ -1856,6 +1856,9 @@
compositing/rtl/rtl-fixed-overflow.html
compositing/rtl/rtl-fixed.html
+# LAYER_TREE_INCLUDES_VISIBLE_RECTS option to layerTreeAsText is only applicable to Mac.
+compositing/visible-rect [ Skip ]
+
# Asserts in RenderLayerBacking::paintIntoLayer
# https://bugs.webkit.org/show_bug.cgi?id=88149
compositing/backing/no-backing-foreground-layer.html
Modified: trunk/LayoutTests/platform/wincairo/TestExpectations (131245 => 131246)
--- trunk/LayoutTests/platform/wincairo/TestExpectations 2012-10-13 01:11:04 UTC (rev 131245)
+++ trunk/LayoutTests/platform/wincairo/TestExpectations 2012-10-13 01:16:04 UTC (rev 131246)
@@ -2386,6 +2386,9 @@
# https://bugs.webkit.org/show_bug.cgi?id=88150
compositing/geometry/clipping-foreground.html
+# LAYER_TREE_INCLUDES_VISIBLE_RECTS option to layerTreeAsText is only applicable to Mac.
+compositing/visible-rect [ Skip ]
+
# Require rebaseline after bug 88171
# https://bugs.webkit.org/show_bug.cgi?id=88171
fast/block/float/independent-align-positioning.html
Modified: trunk/Source/WebCore/ChangeLog (131245 => 131246)
--- trunk/Source/WebCore/ChangeLog 2012-10-13 01:11:04 UTC (rev 131245)
+++ trunk/Source/WebCore/ChangeLog 2012-10-13 01:16:04 UTC (rev 131246)
@@ -1,3 +1,25 @@
+2012-10-12 Simon Fraser <simon.fra...@apple.com>
+
+ Add some initial visible rect tests and tweak the visible wash layer
+ https://bugs.webkit.org/show_bug.cgi?id=99095
+
+ Reviewed by Tim Horton.
+
+ Make the m_visibleTileWashLayer more useful by showing it for all
+ layers with transforms, not just tiled layers. This is a debugging
+ layer normally disabled, but enabled by #defining VISIBLE_TILE_WASH.
+
+ Tests: compositing/visible-rect/2d-transformed.html
+ compositing/visible-rect/3d-transformed.html
+ compositing/visible-rect/clipped-by-viewport copy.html
+ compositing/visible-rect/clipped-by-viewport.html
+ compositing/visible-rect/clipped-visible-rect.html
+
+ * platform/graphics/ca/GraphicsLayerCA.cpp:
+ (WebCore::GraphicsLayerCA::recursiveCommitChanges):
+ (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
+ * platform/graphics/ca/GraphicsLayerCA.h:
+
2012-10-12 Pablo Flouret <pab...@motorola.com>
Teach GeneratorGObject about [ImplementedAs] extended attribute in functions
Modified: trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp (131245 => 131246)
--- trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp 2012-10-13 01:11:04 UTC (rev 131245)
+++ trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp 2012-10-13 01:16:04 UTC (rev 131246)
@@ -945,6 +945,22 @@
m_visibleRect = clipRectForSelf;
#ifdef VISIBLE_TILE_WASH
+ // Use having a transform as a key to making the tile wash layer. If every layer gets a wash,
+ // they start to obscure useful information.
+ if (!m_transform.isIdentity() && !m_visibleTileWashLayer) {
+ static Color washFillColor(255, 0, 0, 50);
+ static Color washBorderColor(255, 0, 0, 100);
+
+ m_visibleTileWashLayer = PlatformCALayer::create(PlatformCALayer::LayerTypeLayer, this);
+ String name = String::format("Visible Tile Wash Layer %p", m_visibleTileWashLayer->platformLayer());
+ m_visibleTileWashLayer->setName(name);
+ m_visibleTileWashLayer->setAnchorPoint(FloatPoint3D(0, 0, 0));
+ m_visibleTileWashLayer->setBorderColor(washBorderColor);
+ m_visibleTileWashLayer->setBorderWidth(8);
+ m_visibleTileWashLayer->setBackgroundColor(washFillColor);
+ noteSublayersChanged();
+ }
+
if (m_visibleTileWashLayer)
m_visibleTileWashLayer->setFrame(clipRectForSelf);
#endif
@@ -2470,27 +2486,6 @@
m_layer = PlatformCALayer::create(useTiledLayer ? PlatformCALayer::LayerTypeWebTiledLayer : PlatformCALayer::LayerTypeWebLayer, this);
m_usingTiledLayer = useTiledLayer;
-#ifdef VISIBLE_TILE_WASH
- if (useTiledLayer) {
- if (!m_visibleTileWashLayer) {
- static Color washFillColor(255, 0, 0, 50);
- static Color washBorderColor(255, 0, 0, 100);
-
- m_visibleTileWashLayer = PlatformCALayer::create(PlatformCALayer::LayerTypeLayer, this);
- String name = String::format("Visible Tile Wash Layer %p", m_visibleTileWashLayer->platformLayer());
- m_visibleTileWashLayer->setName(name);
- m_visibleTileWashLayer->setAnchorPoint(FloatPoint3D(0, 0, 0));
- m_visibleTileWashLayer->setBorderColor(washBorderColor);
- m_visibleTileWashLayer->setBorderWidth(8);
- m_visibleTileWashLayer->setBackgroundColor(washFillColor);
- }
- } else {
- if (m_visibleTileWashLayer)
- m_visibleTileWashLayer->removeFromSuperlayer();
- m_visibleTileWashLayer = 0;
- }
-#endif
-
m_layer->adoptSublayers(oldLayer.get());
#ifdef VISIBLE_TILE_WASH