Diff
Modified: branches/safari-603-branch/LayoutTests/ChangeLog (212495 => 212496)
--- branches/safari-603-branch/LayoutTests/ChangeLog 2017-02-17 00:56:17 UTC (rev 212495)
+++ branches/safari-603-branch/LayoutTests/ChangeLog 2017-02-17 00:56:24 UTC (rev 212496)
@@ -1,5 +1,28 @@
2017-02-16 Matthew Hanson <matthew_han...@apple.com>
+ Merge r212153. rdar://problem/30467120
+
+ 2017-02-10 Simon Fraser <simon.fra...@apple.com>
+
+ Make sure the "inwindow" flag propagates to TiledBackings for masks and reflections
+ https://bugs.webkit.org/show_bug.cgi?id=168127
+ rdar://problem/30467120
+
+ Reviewed by Tim Horton.
+
+ * compositing/tiling/tiled-mask-inwindow-expected.txt: Added.
+ * compositing/tiling/tiled-mask-inwindow.html: Added.
+ * compositing/tiling/tiled-reflection-inwindow-expected.txt: Added.
+ * compositing/tiling/tiled-reflection-inwindow.html: Added.
+ * platform/ios-simulator-wk1/compositing/tiling/tiled-mask-inwindow-expected.txt: Added.
+ * platform/ios-simulator-wk1/compositing/tiling/tiled-reflection-inwindow-expected.txt: Added.
+ * platform/ios-simulator-wk2/compositing/tiling/tiled-mask-inwindow-expected.txt: Added.
+ * platform/ios-simulator-wk2/compositing/tiling/tiled-reflection-inwindow-expected.txt: Added.
+ * platform/mac-wk1/compositing/tiling/tiled-mask-inwindow-expected.txt: Added.
+ * platform/mac-wk1/compositing/tiling/tiled-reflection-inwindow-expected.txt: Added.
+
+2017-02-16 Matthew Hanson <matthew_han...@apple.com>
+
Merge r212152. rdar://problem/30459055
2017-02-09 Simon Fraser <simon.fra...@apple.com>
Added: branches/safari-603-branch/LayoutTests/compositing/tiling/tiled-mask-inwindow-expected.txt (0 => 212496)
--- branches/safari-603-branch/LayoutTests/compositing/tiling/tiled-mask-inwindow-expected.txt (rev 0)
+++ branches/safari-603-branch/LayoutTests/compositing/tiling/tiled-mask-inwindow-expected.txt 2017-02-17 00:56:24 UTC (rev 212496)
@@ -0,0 +1,99 @@
+(GraphicsLayer
+ (anchor 0.00 0.00)
+ (bounds 800.00 600.00)
+ (children 1
+ (GraphicsLayer
+ (bounds 800.00 600.00)
+ (contentsOpaque 1)
+ (tile cache coverage 0, 0 800 x 600)
+ (tile size 800 x 600)
+ (top left tile 0, 0 tiles grid 1 x 1)
+ (in window 1)
+ (children 1
+ (GraphicsLayer
+ (position 8.00 8.00)
+ (bounds 404.00 304.00)
+ (drawsContent 1)
+ (children 1
+ (GraphicsLayer
+ (position 2.00 2.00)
+ (bounds 400.00 300.00)
+ (children 1
+ (GraphicsLayer
+ (bounds 2802.00 302.00)
+ (usingTiledLayer 1)
+ (contentsOpaque 1)
+ (drawsContent 1)
+ (mask layer)
+ (GraphicsLayer
+ (bounds 2802.00 302.00)
+ (usingTiledLayer 1)
+ (drawsContent 1)
+ (tile cache coverage 0, 0 512 x 302)
+ (tile size 512 x 512)
+ (top left tile 0, 0 tiles grid 1 x 1)
+ (in window 1)
+ )
+ (tile cache coverage 0, 0 512 x 302)
+ (tile size 512 x 512)
+ (top left tile 0, 0 tiles grid 1 x 1)
+ (in window 1)
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+)
+(GraphicsLayer
+ (anchor 0.00 0.00)
+ (bounds 785.00 1101.00)
+ (children 1
+ (GraphicsLayer
+ (bounds 785.00 1101.00)
+ (contentsOpaque 1)
+ (tile cache coverage 0, 0 785 x 600)
+ (tile size 800 x 600)
+ (top left tile 0, 0 tiles grid 1 x 1)
+ (in window 0)
+ (children 1
+ (GraphicsLayer
+ (position 8.00 8.00)
+ (bounds 404.00 304.00)
+ (drawsContent 1)
+ (children 1
+ (GraphicsLayer
+ (position 2.00 2.00)
+ (bounds 400.00 300.00)
+ (children 1
+ (GraphicsLayer
+ (bounds 2802.00 302.00)
+ (usingTiledLayer 1)
+ (contentsOpaque 1)
+ (drawsContent 1)
+ (mask layer)
+ (GraphicsLayer
+ (bounds 2802.00 302.00)
+ (usingTiledLayer 1)
+ (drawsContent 1)
+ (tile cache coverage 0, 0 512 x 302)
+ (tile size 512 x 512)
+ (top left tile 0, 0 tiles grid 1 x 1)
+ (in window 0)
+ )
+ (tile cache coverage 0, 0 512 x 302)
+ (tile size 512 x 512)
+ (top left tile 0, 0 tiles grid 1 x 1)
+ (in window 0)
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+)
+
Added: branches/safari-603-branch/LayoutTests/compositing/tiling/tiled-mask-inwindow.html (0 => 212496)
--- branches/safari-603-branch/LayoutTests/compositing/tiling/tiled-mask-inwindow.html (rev 0)
+++ branches/safari-603-branch/LayoutTests/compositing/tiling/tiled-mask-inwindow.html 2017-02-17 00:56:24 UTC (rev 212496)
@@ -0,0 +1,74 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+ <style>
+ .container {
+ height: 300px;
+ width: 400px;
+ border: 2px solid black;
+ overflow: hidden;
+ }
+
+ .box {
+ height: 300px;
+ width: 2800px;
+ border: 1px solid black;
+ background-color: gray;
+ }
+
+ .composited {
+ transform: translateZ(0);
+ }
+
+ .masked {
+ -webkit-mask-image: url(../resources/alpha-gradient.png);
+ -webkit-mask-repeat: repeat-x;
+ }
+ </style>
+ <script>
+ if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+ }
+
+ function getUIScript()
+ {
+ return `
+ (function() {
+ uiController.removeViewFromWindow(function() {
+ uiController.uiScriptComplete('');
+ });
+ })();`
+ }
+
+ function dumpTiles(outputId)
+ {
+ if (window.internals)
+ document.getElementById(outputId).innerText = internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_TILE_CACHES);
+ }
+ function doTest()
+ {
+ if (!testRunner.runUIScript)
+ return;
+
+ dumpTiles('before-layers');
+
+ testRunner.runUIScript(getUIScript(), function(result) {
+ dumpTiles('after-layers');
+ if (window.testRunner)
+ testRunner.notifyDone();
+ });
+ }
+ window.addEventListener('load', doTest, false);
+ </script>
+</head>
+<body>
+ <div class="composited container">
+ <div class="composited masked box"></div>
+ </div>
+
+<pre id="before-layers">Layer tree goes here</pre>
+<pre id="after-layers">Layer tree goes here</pre>
+</body>
+</html>
Added: branches/safari-603-branch/LayoutTests/compositing/tiling/tiled-reflection-inwindow-expected.txt (0 => 212496)
--- branches/safari-603-branch/LayoutTests/compositing/tiling/tiled-reflection-inwindow-expected.txt (rev 0)
+++ branches/safari-603-branch/LayoutTests/compositing/tiling/tiled-reflection-inwindow-expected.txt 2017-02-17 00:56:24 UTC (rev 212496)
@@ -0,0 +1,113 @@
+(GraphicsLayer
+ (anchor 0.00 0.00)
+ (bounds 800.00 600.00)
+ (children 1
+ (GraphicsLayer
+ (bounds 800.00 600.00)
+ (contentsOpaque 1)
+ (tile cache coverage 0, 0 800 x 600)
+ (tile size 800 x 600)
+ (top left tile 0, 0 tiles grid 1 x 1)
+ (in window 1)
+ (children 1
+ (GraphicsLayer
+ (position 8.00 8.00)
+ (bounds 404.00 304.00)
+ (drawsContent 1)
+ (replica layer)
+ (GraphicsLayer
+ (position -2.00 -2.00)
+ (bounds 404.00 304.00)
+ (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 314.00 0.00 1.00])
+ (replicated layer)
+ )
+ (children 1
+ (GraphicsLayer
+ (position 2.00 2.00)
+ (bounds 400.00 300.00)
+ (children 1
+ (GraphicsLayer
+ (bounds 2802.00 302.00)
+ (usingTiledLayer 1)
+ (contentsOpaque 1)
+ (drawsContent 1)
+ (mask layer)
+ (GraphicsLayer
+ (bounds 2802.00 302.00)
+ (usingTiledLayer 1)
+ (drawsContent 1)
+ (tile cache coverage 0, 0 512 x 302)
+ (tile size 512 x 512)
+ (top left tile 0, 0 tiles grid 1 x 1)
+ (in window 1)
+ )
+ (tile cache coverage 0, 0 512 x 302)
+ (tile size 512 x 512)
+ (top left tile 0, 0 tiles grid 1 x 1)
+ (in window 1)
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+)
+(GraphicsLayer
+ (anchor 0.00 0.00)
+ (bounds 913.00 1206.00)
+ (children 1
+ (GraphicsLayer
+ (bounds 913.00 1206.00)
+ (contentsOpaque 1)
+ (tile cache coverage 0, 0 800 x 600)
+ (tile size 800 x 600)
+ (top left tile 0, 0 tiles grid 1 x 1)
+ (in window 0)
+ (children 1
+ (GraphicsLayer
+ (position 8.00 8.00)
+ (bounds 404.00 304.00)
+ (drawsContent 1)
+ (replica layer)
+ (GraphicsLayer
+ (position -2.00 -2.00)
+ (bounds 404.00 304.00)
+ (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 314.00 0.00 1.00])
+ (replicated layer)
+ )
+ (children 1
+ (GraphicsLayer
+ (position 2.00 2.00)
+ (bounds 400.00 300.00)
+ (children 1
+ (GraphicsLayer
+ (bounds 2802.00 302.00)
+ (usingTiledLayer 1)
+ (contentsOpaque 1)
+ (drawsContent 1)
+ (mask layer)
+ (GraphicsLayer
+ (bounds 2802.00 302.00)
+ (usingTiledLayer 1)
+ (drawsContent 1)
+ (tile cache coverage 0, 0 512 x 302)
+ (tile size 512 x 512)
+ (top left tile 0, 0 tiles grid 1 x 1)
+ (in window 0)
+ )
+ (tile cache coverage 0, 0 512 x 302)
+ (tile size 512 x 512)
+ (top left tile 0, 0 tiles grid 1 x 1)
+ (in window 0)
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+)
+
Added: branches/safari-603-branch/LayoutTests/compositing/tiling/tiled-reflection-inwindow.html (0 => 212496)
--- branches/safari-603-branch/LayoutTests/compositing/tiling/tiled-reflection-inwindow.html (rev 0)
+++ branches/safari-603-branch/LayoutTests/compositing/tiling/tiled-reflection-inwindow.html 2017-02-17 00:56:24 UTC (rev 212496)
@@ -0,0 +1,75 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+ <style>
+ .container {
+ height: 300px;
+ width: 400px;
+ border: 2px solid black;
+ overflow: hidden;
+ -webkit-box-reflect: below 10px;
+ }
+
+ .box {
+ height: 300px;
+ width: 2800px;
+ border: 1px solid black;
+ background-color: gray;
+ }
+
+ .composited {
+ transform: translateZ(0);
+ }
+
+ .masked {
+ -webkit-mask-image: url(../resources/alpha-gradient.png);
+ -webkit-mask-repeat: repeat-x;
+ }
+ </style>
+ <script>
+ if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+ }
+
+ function getUIScript()
+ {
+ return `
+ (function() {
+ uiController.removeViewFromWindow(function() {
+ uiController.uiScriptComplete('');
+ });
+ })();`
+ }
+
+ function dumpTiles(outputId)
+ {
+ if (window.internals)
+ document.getElementById(outputId).innerText = internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_TILE_CACHES);
+ }
+ function doTest()
+ {
+ if (!testRunner.runUIScript)
+ return;
+
+ dumpTiles('before-layers');
+
+ testRunner.runUIScript(getUIScript(), function(result) {
+ dumpTiles('after-layers');
+ if (window.testRunner)
+ testRunner.notifyDone();
+ });
+ }
+ window.addEventListener('load', doTest, false);
+ </script>
+</head>
+<body>
+ <div class="composited container">
+ <div class="composited masked box"></div>
+ </div>
+
+<pre id="before-layers">Layer tree goes here</pre>
+<pre id="after-layers">Layer tree goes here</pre>
+</body>
+</html>
Added: branches/safari-603-branch/LayoutTests/platform/ios-simulator-wk1/compositing/tiling/tiled-mask-inwindow-expected.txt (0 => 212496)
--- branches/safari-603-branch/LayoutTests/platform/ios-simulator-wk1/compositing/tiling/tiled-mask-inwindow-expected.txt (rev 0)
+++ branches/safari-603-branch/LayoutTests/platform/ios-simulator-wk1/compositing/tiling/tiled-mask-inwindow-expected.txt 2017-02-17 00:56:24 UTC (rev 212496)
@@ -0,0 +1,91 @@
+(GraphicsLayer
+ (anchor 0.00 0.00)
+ (bounds 800.00 600.00)
+ (children 1
+ (GraphicsLayer
+ (bounds 800.00 600.00)
+ (contentsOpaque 1)
+ (children 1
+ (GraphicsLayer
+ (position 8.00 8.00)
+ (bounds 404.00 304.00)
+ (drawsContent 1)
+ (children 1
+ (GraphicsLayer
+ (position 2.00 2.00)
+ (bounds 400.00 300.00)
+ (children 1
+ (GraphicsLayer
+ (bounds 2802.00 302.00)
+ (usingTiledLayer 1)
+ (contentsOpaque 1)
+ (drawsContent 1)
+ (mask layer)
+ (GraphicsLayer
+ (bounds 2802.00 302.00)
+ (usingTiledLayer 1)
+ (drawsContent 1)
+ (tile cache coverage 0, 0 512 x 302)
+ (tile size 512 x 512)
+ (top left tile 0, 0 tiles grid 1 x 1)
+ (in window 1)
+ )
+ (tile cache coverage 0, 0 512 x 302)
+ (tile size 512 x 512)
+ (top left tile 0, 0 tiles grid 1 x 1)
+ (in window 1)
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+)
+(GraphicsLayer
+ (anchor 0.00 0.00)
+ (bounds 800.00 995.00)
+ (children 1
+ (GraphicsLayer
+ (bounds 800.00 995.00)
+ (contentsOpaque 1)
+ (children 1
+ (GraphicsLayer
+ (position 8.00 8.00)
+ (bounds 404.00 304.00)
+ (drawsContent 1)
+ (children 1
+ (GraphicsLayer
+ (position 2.00 2.00)
+ (bounds 400.00 300.00)
+ (children 1
+ (GraphicsLayer
+ (bounds 2802.00 302.00)
+ (usingTiledLayer 1)
+ (contentsOpaque 1)
+ (drawsContent 1)
+ (mask layer)
+ (GraphicsLayer
+ (bounds 2802.00 302.00)
+ (usingTiledLayer 1)
+ (drawsContent 1)
+ (tile cache coverage 0, 0 512 x 302)
+ (tile size 512 x 512)
+ (top left tile 0, 0 tiles grid 1 x 1)
+ (in window 1)
+ )
+ (tile cache coverage 0, 0 512 x 302)
+ (tile size 512 x 512)
+ (top left tile 0, 0 tiles grid 1 x 1)
+ (in window 1)
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+)
+
Added: branches/safari-603-branch/LayoutTests/platform/ios-simulator-wk1/compositing/tiling/tiled-reflection-inwindow-expected.txt (0 => 212496)
--- branches/safari-603-branch/LayoutTests/platform/ios-simulator-wk1/compositing/tiling/tiled-reflection-inwindow-expected.txt (rev 0)
+++ branches/safari-603-branch/LayoutTests/platform/ios-simulator-wk1/compositing/tiling/tiled-reflection-inwindow-expected.txt 2017-02-17 00:56:24 UTC (rev 212496)
@@ -0,0 +1,105 @@
+(GraphicsLayer
+ (anchor 0.00 0.00)
+ (bounds 800.00 600.00)
+ (children 1
+ (GraphicsLayer
+ (bounds 800.00 600.00)
+ (contentsOpaque 1)
+ (children 1
+ (GraphicsLayer
+ (position 8.00 8.00)
+ (bounds 404.00 304.00)
+ (drawsContent 1)
+ (replica layer)
+ (GraphicsLayer
+ (position -2.00 -2.00)
+ (bounds 404.00 304.00)
+ (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 314.00 0.00 1.00])
+ (replicated layer)
+ )
+ (children 1
+ (GraphicsLayer
+ (position 2.00 2.00)
+ (bounds 400.00 300.00)
+ (children 1
+ (GraphicsLayer
+ (bounds 2802.00 302.00)
+ (usingTiledLayer 1)
+ (contentsOpaque 1)
+ (drawsContent 1)
+ (mask layer)
+ (GraphicsLayer
+ (bounds 2802.00 302.00)
+ (usingTiledLayer 1)
+ (drawsContent 1)
+ (tile cache coverage 0, 0 512 x 302)
+ (tile size 512 x 512)
+ (top left tile 0, 0 tiles grid 1 x 1)
+ (in window 1)
+ )
+ (tile cache coverage 0, 0 512 x 302)
+ (tile size 512 x 512)
+ (top left tile 0, 0 tiles grid 1 x 1)
+ (in window 1)
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+)
+(GraphicsLayer
+ (anchor 0.00 0.00)
+ (bounds 913.00 1093.00)
+ (children 1
+ (GraphicsLayer
+ (bounds 913.00 1093.00)
+ (contentsOpaque 1)
+ (children 1
+ (GraphicsLayer
+ (position 8.00 8.00)
+ (bounds 404.00 304.00)
+ (drawsContent 1)
+ (replica layer)
+ (GraphicsLayer
+ (position -2.00 -2.00)
+ (bounds 404.00 304.00)
+ (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 314.00 0.00 1.00])
+ (replicated layer)
+ )
+ (children 1
+ (GraphicsLayer
+ (position 2.00 2.00)
+ (bounds 400.00 300.00)
+ (children 1
+ (GraphicsLayer
+ (bounds 2802.00 302.00)
+ (usingTiledLayer 1)
+ (contentsOpaque 1)
+ (drawsContent 1)
+ (mask layer)
+ (GraphicsLayer
+ (bounds 2802.00 302.00)
+ (usingTiledLayer 1)
+ (drawsContent 1)
+ (tile cache coverage 0, 0 512 x 302)
+ (tile size 512 x 512)
+ (top left tile 0, 0 tiles grid 1 x 1)
+ (in window 1)
+ )
+ (tile cache coverage 0, 0 512 x 302)
+ (tile size 512 x 512)
+ (top left tile 0, 0 tiles grid 1 x 1)
+ (in window 1)
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+)
+
Added: branches/safari-603-branch/LayoutTests/platform/ios-simulator-wk2/compositing/tiling/tiled-mask-inwindow-expected.txt (0 => 212496)
--- branches/safari-603-branch/LayoutTests/platform/ios-simulator-wk2/compositing/tiling/tiled-mask-inwindow-expected.txt (rev 0)
+++ branches/safari-603-branch/LayoutTests/platform/ios-simulator-wk2/compositing/tiling/tiled-mask-inwindow-expected.txt 2017-02-17 00:56:24 UTC (rev 212496)
@@ -0,0 +1,99 @@
+(GraphicsLayer
+ (anchor 0.00 0.00)
+ (bounds 800.00 600.00)
+ (children 1
+ (GraphicsLayer
+ (bounds 800.00 600.00)
+ (contentsOpaque 1)
+ (tile cache coverage 0, 0 800 x 600)
+ (tile size 800 x 600)
+ (top left tile 0, 0 tiles grid 1 x 1)
+ (in window 1)
+ (children 1
+ (GraphicsLayer
+ (position 8.00 8.00)
+ (bounds 404.00 304.00)
+ (drawsContent 1)
+ (children 1
+ (GraphicsLayer
+ (position 2.00 2.00)
+ (bounds 400.00 300.00)
+ (children 1
+ (GraphicsLayer
+ (bounds 2802.00 302.00)
+ (usingTiledLayer 1)
+ (contentsOpaque 1)
+ (drawsContent 1)
+ (mask layer)
+ (GraphicsLayer
+ (bounds 2802.00 302.00)
+ (usingTiledLayer 1)
+ (drawsContent 1)
+ (tile cache coverage 0, 0 512 x 302)
+ (tile size 512 x 512)
+ (top left tile 0, 0 tiles grid 1 x 1)
+ (in window 1)
+ )
+ (tile cache coverage 0, 0 512 x 302)
+ (tile size 512 x 512)
+ (top left tile 0, 0 tiles grid 1 x 1)
+ (in window 1)
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+)
+(GraphicsLayer
+ (anchor 0.00 0.00)
+ (bounds 800.00 1051.00)
+ (children 1
+ (GraphicsLayer
+ (bounds 800.00 1051.00)
+ (contentsOpaque 1)
+ (tile cache coverage 0, 0 800 x 600)
+ (tile size 800 x 600)
+ (top left tile 0, 0 tiles grid 1 x 1)
+ (in window 1)
+ (children 1
+ (GraphicsLayer
+ (position 8.00 8.00)
+ (bounds 404.00 304.00)
+ (drawsContent 1)
+ (children 1
+ (GraphicsLayer
+ (position 2.00 2.00)
+ (bounds 400.00 300.00)
+ (children 1
+ (GraphicsLayer
+ (bounds 2802.00 302.00)
+ (usingTiledLayer 1)
+ (contentsOpaque 1)
+ (drawsContent 1)
+ (mask layer)
+ (GraphicsLayer
+ (bounds 2802.00 302.00)
+ (usingTiledLayer 1)
+ (drawsContent 1)
+ (tile cache coverage 0, 0 512 x 302)
+ (tile size 512 x 512)
+ (top left tile 0, 0 tiles grid 1 x 1)
+ (in window 1)
+ )
+ (tile cache coverage 0, 0 512 x 302)
+ (tile size 512 x 512)
+ (top left tile 0, 0 tiles grid 1 x 1)
+ (in window 1)
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+)
+
Added: branches/safari-603-branch/LayoutTests/platform/ios-simulator-wk2/compositing/tiling/tiled-reflection-inwindow-expected.txt (0 => 212496)
--- branches/safari-603-branch/LayoutTests/platform/ios-simulator-wk2/compositing/tiling/tiled-reflection-inwindow-expected.txt (rev 0)
+++ branches/safari-603-branch/LayoutTests/platform/ios-simulator-wk2/compositing/tiling/tiled-reflection-inwindow-expected.txt 2017-02-17 00:56:24 UTC (rev 212496)
@@ -0,0 +1,113 @@
+(GraphicsLayer
+ (anchor 0.00 0.00)
+ (bounds 800.00 600.00)
+ (children 1
+ (GraphicsLayer
+ (bounds 800.00 600.00)
+ (contentsOpaque 1)
+ (tile cache coverage 0, 0 800 x 600)
+ (tile size 800 x 600)
+ (top left tile 0, 0 tiles grid 1 x 1)
+ (in window 1)
+ (children 1
+ (GraphicsLayer
+ (position 8.00 8.00)
+ (bounds 404.00 304.00)
+ (drawsContent 1)
+ (replica layer)
+ (GraphicsLayer
+ (position -2.00 -2.00)
+ (bounds 404.00 304.00)
+ (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 314.00 0.00 1.00])
+ (replicated layer)
+ )
+ (children 1
+ (GraphicsLayer
+ (position 2.00 2.00)
+ (bounds 400.00 300.00)
+ (children 1
+ (GraphicsLayer
+ (bounds 2802.00 302.00)
+ (usingTiledLayer 1)
+ (contentsOpaque 1)
+ (drawsContent 1)
+ (mask layer)
+ (GraphicsLayer
+ (bounds 2802.00 302.00)
+ (usingTiledLayer 1)
+ (drawsContent 1)
+ (tile cache coverage 0, 0 512 x 302)
+ (tile size 512 x 512)
+ (top left tile 0, 0 tiles grid 1 x 1)
+ (in window 1)
+ )
+ (tile cache coverage 0, 0 512 x 302)
+ (tile size 512 x 512)
+ (top left tile 0, 0 tiles grid 1 x 1)
+ (in window 1)
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+)
+(GraphicsLayer
+ (anchor 0.00 0.00)
+ (bounds 913.00 1149.00)
+ (children 1
+ (GraphicsLayer
+ (bounds 913.00 1149.00)
+ (contentsOpaque 1)
+ (tile cache coverage 0, 0 800 x 600)
+ (tile size 800 x 600)
+ (top left tile 0, 0 tiles grid 1 x 1)
+ (in window 1)
+ (children 1
+ (GraphicsLayer
+ (position 8.00 8.00)
+ (bounds 404.00 304.00)
+ (drawsContent 1)
+ (replica layer)
+ (GraphicsLayer
+ (position -2.00 -2.00)
+ (bounds 404.00 304.00)
+ (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 314.00 0.00 1.00])
+ (replicated layer)
+ )
+ (children 1
+ (GraphicsLayer
+ (position 2.00 2.00)
+ (bounds 400.00 300.00)
+ (children 1
+ (GraphicsLayer
+ (bounds 2802.00 302.00)
+ (usingTiledLayer 1)
+ (contentsOpaque 1)
+ (drawsContent 1)
+ (mask layer)
+ (GraphicsLayer
+ (bounds 2802.00 302.00)
+ (usingTiledLayer 1)
+ (drawsContent 1)
+ (tile cache coverage 0, 0 512 x 302)
+ (tile size 512 x 512)
+ (top left tile 0, 0 tiles grid 1 x 1)
+ (in window 1)
+ )
+ (tile cache coverage 0, 0 512 x 302)
+ (tile size 512 x 512)
+ (top left tile 0, 0 tiles grid 1 x 1)
+ (in window 1)
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+)
+
Added: branches/safari-603-branch/LayoutTests/platform/mac-wk1/compositing/tiling/tiled-mask-inwindow-expected.txt (0 => 212496)
--- branches/safari-603-branch/LayoutTests/platform/mac-wk1/compositing/tiling/tiled-mask-inwindow-expected.txt (rev 0)
+++ branches/safari-603-branch/LayoutTests/platform/mac-wk1/compositing/tiling/tiled-mask-inwindow-expected.txt 2017-02-17 00:56:24 UTC (rev 212496)
@@ -0,0 +1,91 @@
+(GraphicsLayer
+ (anchor 0.00 0.00)
+ (bounds 800.00 600.00)
+ (children 1
+ (GraphicsLayer
+ (bounds 800.00 600.00)
+ (contentsOpaque 1)
+ (children 1
+ (GraphicsLayer
+ (position 8.00 8.00)
+ (bounds 404.00 304.00)
+ (drawsContent 1)
+ (children 1
+ (GraphicsLayer
+ (position 2.00 2.00)
+ (bounds 400.00 300.00)
+ (children 1
+ (GraphicsLayer
+ (bounds 2802.00 302.00)
+ (usingTiledLayer 1)
+ (contentsOpaque 1)
+ (drawsContent 1)
+ (mask layer)
+ (GraphicsLayer
+ (bounds 2802.00 302.00)
+ (usingTiledLayer 1)
+ (drawsContent 1)
+ (tile cache coverage 0, 0 512 x 302)
+ (tile size 512 x 512)
+ (top left tile 0, 0 tiles grid 1 x 1)
+ (in window 1)
+ )
+ (tile cache coverage 0, 0 512 x 302)
+ (tile size 512 x 512)
+ (top left tile 0, 0 tiles grid 1 x 1)
+ (in window 1)
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+)
+(GraphicsLayer
+ (anchor 0.00 0.00)
+ (bounds 785.00 1041.00)
+ (children 1
+ (GraphicsLayer
+ (bounds 785.00 1041.00)
+ (contentsOpaque 1)
+ (children 1
+ (GraphicsLayer
+ (position 8.00 8.00)
+ (bounds 404.00 304.00)
+ (drawsContent 1)
+ (children 1
+ (GraphicsLayer
+ (position 2.00 2.00)
+ (bounds 400.00 300.00)
+ (children 1
+ (GraphicsLayer
+ (bounds 2802.00 302.00)
+ (usingTiledLayer 1)
+ (contentsOpaque 1)
+ (drawsContent 1)
+ (mask layer)
+ (GraphicsLayer
+ (bounds 2802.00 302.00)
+ (usingTiledLayer 1)
+ (drawsContent 1)
+ (tile cache coverage 0, 0 512 x 302)
+ (tile size 512 x 512)
+ (top left tile 0, 0 tiles grid 1 x 1)
+ (in window 0)
+ )
+ (tile cache coverage 0, 0 512 x 302)
+ (tile size 512 x 512)
+ (top left tile 0, 0 tiles grid 1 x 1)
+ (in window 0)
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+)
+
Added: branches/safari-603-branch/LayoutTests/platform/mac-wk1/compositing/tiling/tiled-reflection-inwindow-expected.txt (0 => 212496)
--- branches/safari-603-branch/LayoutTests/platform/mac-wk1/compositing/tiling/tiled-reflection-inwindow-expected.txt (rev 0)
+++ branches/safari-603-branch/LayoutTests/platform/mac-wk1/compositing/tiling/tiled-reflection-inwindow-expected.txt 2017-02-17 00:56:24 UTC (rev 212496)
@@ -0,0 +1,105 @@
+(GraphicsLayer
+ (anchor 0.00 0.00)
+ (bounds 800.00 600.00)
+ (children 1
+ (GraphicsLayer
+ (bounds 800.00 600.00)
+ (contentsOpaque 1)
+ (children 1
+ (GraphicsLayer
+ (position 8.00 8.00)
+ (bounds 404.00 304.00)
+ (drawsContent 1)
+ (replica layer)
+ (GraphicsLayer
+ (position -2.00 -2.00)
+ (bounds 404.00 304.00)
+ (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 314.00 0.00 1.00])
+ (replicated layer)
+ )
+ (children 1
+ (GraphicsLayer
+ (position 2.00 2.00)
+ (bounds 400.00 300.00)
+ (children 1
+ (GraphicsLayer
+ (bounds 2802.00 302.00)
+ (usingTiledLayer 1)
+ (contentsOpaque 1)
+ (drawsContent 1)
+ (mask layer)
+ (GraphicsLayer
+ (bounds 2802.00 302.00)
+ (usingTiledLayer 1)
+ (drawsContent 1)
+ (tile cache coverage 0, 0 512 x 302)
+ (tile size 512 x 512)
+ (top left tile 0, 0 tiles grid 1 x 1)
+ (in window 1)
+ )
+ (tile cache coverage 0, 0 512 x 302)
+ (tile size 512 x 512)
+ (top left tile 0, 0 tiles grid 1 x 1)
+ (in window 1)
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+)
+(GraphicsLayer
+ (anchor 0.00 0.00)
+ (bounds 913.00 1146.00)
+ (children 1
+ (GraphicsLayer
+ (bounds 913.00 1146.00)
+ (contentsOpaque 1)
+ (children 1
+ (GraphicsLayer
+ (position 8.00 8.00)
+ (bounds 404.00 304.00)
+ (drawsContent 1)
+ (replica layer)
+ (GraphicsLayer
+ (position -2.00 -2.00)
+ (bounds 404.00 304.00)
+ (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 314.00 0.00 1.00])
+ (replicated layer)
+ )
+ (children 1
+ (GraphicsLayer
+ (position 2.00 2.00)
+ (bounds 400.00 300.00)
+ (children 1
+ (GraphicsLayer
+ (bounds 2802.00 302.00)
+ (usingTiledLayer 1)
+ (contentsOpaque 1)
+ (drawsContent 1)
+ (mask layer)
+ (GraphicsLayer
+ (bounds 2802.00 302.00)
+ (usingTiledLayer 1)
+ (drawsContent 1)
+ (tile cache coverage 0, 0 512 x 302)
+ (tile size 512 x 512)
+ (top left tile 0, 0 tiles grid 1 x 1)
+ (in window 0)
+ )
+ (tile cache coverage 0, 0 512 x 302)
+ (tile size 512 x 512)
+ (top left tile 0, 0 tiles grid 1 x 1)
+ (in window 0)
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+)
+
Modified: branches/safari-603-branch/Source/WebCore/ChangeLog (212495 => 212496)
--- branches/safari-603-branch/Source/WebCore/ChangeLog 2017-02-17 00:56:17 UTC (rev 212495)
+++ branches/safari-603-branch/Source/WebCore/ChangeLog 2017-02-17 00:56:24 UTC (rev 212496)
@@ -1,5 +1,38 @@
2017-02-16 Matthew Hanson <matthew_han...@apple.com>
+ Merge r212153. rdar://problem/30467120
+
+ 2017-02-10 Simon Fraser <simon.fra...@apple.com>
+
+ Make sure the "inwindow" flag propagates to TiledBackings for masks and reflections
+ https://bugs.webkit.org/show_bug.cgi?id=168127
+ rdar://problem/30467120
+
+ Reviewed by Tim Horton.
+
+ Replace the special-case, but wrong, GraphicsLayer traversal in setIsInWindowIncludingDescendants()
+ which forgot to hit masks and replica layers with a generic traverse() function, which
+ is then used for setting 'inWindow' as well as resetting tracked repaints.
+
+ Tests: compositing/tiling/tiled-mask-inwindow.html
+ compositing/tiling/tiled-reflection-inwindow.html
+
+ * page/PageOverlayController.cpp:
+ (WebCore::PageOverlayController::layerWithDocumentOverlays):
+ (WebCore::PageOverlayController::layerWithViewOverlays):
+ * platform/graphics/GraphicsLayer.cpp:
+ (WebCore::GraphicsLayer::setIsInWindow):
+ (WebCore::GraphicsLayer::setReplicatedByLayer):
+ (WebCore::GraphicsLayer::traverse):
+ (WebCore::GraphicsLayer::setIsInWindowIncludingDescendants): Deleted.
+ * platform/graphics/GraphicsLayer.h:
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::setIsInWindow):
+ (WebCore::RenderLayerCompositor::resetTrackedRepaintRects):
+ (WebCore::resetTrackedRepaintRectsRecursive): Deleted.
+
+2017-02-16 Matthew Hanson <matthew_han...@apple.com>
+
Merge r212152. rdar://problem/30459055
2017-02-09 Simon Fraser <simon.fra...@apple.com>
Modified: branches/safari-603-branch/Source/WebCore/page/PageOverlayController.cpp (212495 => 212496)
--- branches/safari-603-branch/Source/WebCore/page/PageOverlayController.cpp 2017-02-17 00:56:17 UTC (rev 212495)
+++ branches/safari-603-branch/Source/WebCore/page/PageOverlayController.cpp 2017-02-17 00:56:24 UTC (rev 212496)
@@ -105,7 +105,9 @@
continue;
GraphicsLayer& layer = *overlayAndLayer.value;
- layer.setIsInWindowIncludingDescendants(inWindow);
+ GraphicsLayer::traverse(layer, [inWindow](GraphicsLayer& layer) {
+ layer.setIsInWindow(inWindow);
+ });
updateOverlayGeometry(overlay, layer);
if (!layer.parent())
@@ -127,7 +129,9 @@
continue;
GraphicsLayer& layer = *overlayAndLayer.value;
- layer.setIsInWindowIncludingDescendants(inWindow);
+ GraphicsLayer::traverse(layer, [inWindow](GraphicsLayer& layer) {
+ layer.setIsInWindow(inWindow);
+ });
updateOverlayGeometry(overlay, layer);
if (!layer.parent())
Modified: branches/safari-603-branch/Source/WebCore/platform/graphics/GraphicsLayer.cpp (212495 => 212496)
--- branches/safari-603-branch/Source/WebCore/platform/graphics/GraphicsLayer.cpp 2017-02-17 00:56:17 UTC (rev 212495)
+++ branches/safari-603-branch/Source/WebCore/platform/graphics/GraphicsLayer.cpp 2017-02-17 00:56:24 UTC (rev 212496)
@@ -364,13 +364,10 @@
childLayers[i]->noteDeviceOrPageScaleFactorChangedIncludingDescendants();
}
-void GraphicsLayer::setIsInWindowIncludingDescendants(bool inWindow)
+void GraphicsLayer::setIsInWindow(bool inWindow)
{
if (usingTiledBacking())
tiledBacking()->setIsInWindow(inWindow);
-
- for (auto* childLayer : children())
- childLayer->setIsInWindowIncludingDescendants(inWindow);
}
void GraphicsLayer::setReplicatedByLayer(GraphicsLayer* layer)
@@ -379,7 +376,7 @@
return;
if (m_replicaLayer)
- m_replicaLayer->setReplicatedLayer(0);
+ m_replicaLayer->setReplicatedLayer(nullptr);
if (layer)
layer->setReplicatedLayer(this);
@@ -669,6 +666,20 @@
}
}
+void GraphicsLayer::traverse(GraphicsLayer& layer, std::function<void (GraphicsLayer&)> traversalFunc)
+{
+ traversalFunc(layer);
+
+ for (auto* childLayer : layer.children())
+ traverse(*childLayer, traversalFunc);
+
+ if (auto* replicaLayer = layer.replicaLayer())
+ traverse(*replicaLayer, traversalFunc);
+
+ if (auto* maskLayer = layer.maskLayer())
+ traverse(*maskLayer, traversalFunc);
+}
+
void GraphicsLayer::dumpLayer(TextStream& ts, int indent, LayerTreeAsTextBehavior behavior) const
{
writeIndent(ts, indent);
Modified: branches/safari-603-branch/Source/WebCore/platform/graphics/GraphicsLayer.h (212495 => 212496)
--- branches/safari-603-branch/Source/WebCore/platform/graphics/GraphicsLayer.h 2017-02-17 00:56:17 UTC (rev 212495)
+++ branches/safari-603-branch/Source/WebCore/platform/graphics/GraphicsLayer.h 2017-02-17 00:56:24 UTC (rev 212496)
@@ -514,7 +514,7 @@
virtual void deviceOrPageScaleFactorChanged() { }
WEBCORE_EXPORT void noteDeviceOrPageScaleFactorChangedIncludingDescendants();
- void setIsInWindowIncludingDescendants(bool);
+ void setIsInWindow(bool);
// Some compositing systems may do internal batching to synchronize compositing updates
// with updates drawn into the window. These methods flush internal batched state on this layer
@@ -559,6 +559,8 @@
virtual bool isGraphicsLayerTextureMapper() const { return false; }
virtual bool isCoordinatedGraphicsLayer() const { return false; }
+ static void traverse(GraphicsLayer&, std::function<void (GraphicsLayer&)>);
+
protected:
WEBCORE_EXPORT explicit GraphicsLayer(Type, GraphicsLayerClient&);
Modified: branches/safari-603-branch/Source/WebCore/rendering/RenderLayerCompositor.cpp (212495 => 212496)
--- branches/safari-603-branch/Source/WebCore/rendering/RenderLayerCompositor.cpp 2017-02-17 00:56:17 UTC (rev 212495)
+++ branches/safari-603-branch/Source/WebCore/rendering/RenderLayerCompositor.cpp 2017-02-17 00:56:24 UTC (rev 212496)
@@ -2063,8 +2063,11 @@
if (!inCompositingMode())
return;
- if (GraphicsLayer* rootLayer = rootGraphicsLayer())
- rootLayer->setIsInWindowIncludingDescendants(isInWindow);
+ if (GraphicsLayer* rootLayer = rootGraphicsLayer()) {
+ GraphicsLayer::traverse(*rootLayer, [isInWindow](GraphicsLayer& layer) {
+ layer.setIsInWindow(isInWindow);
+ });
+ }
if (isInWindow) {
if (m_rootLayerAttachment != RootLayerUnattached)
@@ -2892,24 +2895,13 @@
return nullptr;
}
-static void resetTrackedRepaintRectsRecursive(GraphicsLayer& graphicsLayer)
-{
- graphicsLayer.resetTrackedRepaints();
-
- for (auto* childLayer : graphicsLayer.children())
- resetTrackedRepaintRectsRecursive(*childLayer);
-
- if (GraphicsLayer* replicaLayer = graphicsLayer.replicaLayer())
- resetTrackedRepaintRectsRecursive(*replicaLayer);
-
- if (GraphicsLayer* maskLayer = graphicsLayer.maskLayer())
- resetTrackedRepaintRectsRecursive(*maskLayer);
-}
-
void RenderLayerCompositor::resetTrackedRepaintRects()
{
- if (GraphicsLayer* rootLayer = rootGraphicsLayer())
- resetTrackedRepaintRectsRecursive(*rootLayer);
+ if (GraphicsLayer* rootLayer = rootGraphicsLayer()) {
+ GraphicsLayer::traverse(*rootLayer, [](GraphicsLayer& layer) {
+ layer.resetTrackedRepaints();
+ });
+ }
}
void RenderLayerCompositor::setTracksRepaints(bool tracksRepaints)
Modified: branches/safari-603-branch/Tools/ChangeLog (212495 => 212496)
--- branches/safari-603-branch/Tools/ChangeLog 2017-02-17 00:56:17 UTC (rev 212495)
+++ branches/safari-603-branch/Tools/ChangeLog 2017-02-17 00:56:24 UTC (rev 212496)
@@ -1,5 +1,25 @@
2017-02-16 Matthew Hanson <matthew_han...@apple.com>
+ Merge r212153. rdar://problem/30467120
+
+ 2017-02-10 Simon Fraser <simon.fra...@apple.com>
+
+ Make sure the "inwindow" flag propagates to TiledBackings for masks and reflections
+ https://bugs.webkit.org/show_bug.cgi?id=168127
+ rdar://problem/30467120
+
+ Reviewed by Tim Horton.
+
+ Reparent the web view before we try to fetch it via:
+ [[[window contentView] subviews] objectAtIndex:0];
+ which would throw an exception if the test unparented it.
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (resetWebViewToConsistentStateBeforeTesting):
+ (runTest):
+
+2017-02-16 Matthew Hanson <matthew_han...@apple.com>
+
Merge r211683. rdar://problem/30467272
2017-02-04 Simon Fraser <simon.fra...@apple.com>
Modified: branches/safari-603-branch/Tools/DumpRenderTree/mac/DumpRenderTree.mm (212495 => 212496)
--- branches/safari-603-branch/Tools/DumpRenderTree/mac/DumpRenderTree.mm 2017-02-17 00:56:17 UTC (rev 212495)
+++ branches/safari-603-branch/Tools/DumpRenderTree/mac/DumpRenderTree.mm 2017-02-17 00:56:24 UTC (rev 212496)
@@ -1830,11 +1830,6 @@
{
WebView *webView = [mainFrame webView];
-#if PLATFORM(MAC)
- if (![webView superview])
- [[mainWindow contentView] addSubview:webView];
-#endif
-
#if PLATFORM(IOS)
adjustWebDocumentForStandardViewport(gWebBrowserView, gWebScrollView);
[webView _setAllowsMessaging:YES];
@@ -2092,6 +2087,13 @@
gTestRunner->setDeveloperExtrasEnabled(false);
}
+#if PLATFORM(MAC)
+ // Make sure the WebView is parented, since the test may have unparented it.
+ WebView *webView = [mainFrame webView];
+ if (![webView superview])
+ [[mainWindow contentView] addSubview:webView];
+#endif
+
if (gTestRunner->closeRemainingWindowsWhenComplete()) {
NSArray* array = [DumpRenderTreeWindow openWindows];