Title: [148988] trunk
Revision
148988
Author
[email protected]
Date
2013-04-23 13:51:42 -0700 (Tue, 23 Apr 2013)

Log Message

Tiled layers clipped inside nested transform/preserve-3d hierarchies
https://bugs.webkit.org/show_bug.cgi?id=115044

Source/WebCore:

Reviewed by Dean Jackson.

The optimization added in r139479 to call move() for integral translation
transforms hit a bug in TransformState::move(). If m_accumulatedTransform is
not null, we have to apply it.

Test: compositing/visible-rect/flipped-preserve-3d.html

* platform/graphics/transforms/TransformState.cpp:
(WebCore::TransformState::move):

LayoutTests:

Reviewed by Dean Jackson.

Testcase that dumps visible rects for tiled layers inside nested
transformed/preserve-3d hierarchies.

* compositing/visible-rect/flipped-preserve-3d-expected.txt: Added.
* compositing/visible-rect/flipped-preserve-3d.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (148987 => 148988)


--- trunk/LayoutTests/ChangeLog	2013-04-23 20:39:28 UTC (rev 148987)
+++ trunk/LayoutTests/ChangeLog	2013-04-23 20:51:42 UTC (rev 148988)
@@ -1,3 +1,16 @@
+2013-04-23  Simon Fraser  <[email protected]>
+
+        Tiled layers clipped inside nested transform/preserve-3d hierarchies
+        https://bugs.webkit.org/show_bug.cgi?id=115044
+
+        Reviewed by Dean Jackson.
+        
+        Testcase that dumps visible rects for tiled layers inside nested
+        transformed/preserve-3d hierarchies.
+
+        * compositing/visible-rect/flipped-preserve-3d-expected.txt: Added.
+        * compositing/visible-rect/flipped-preserve-3d.html: Added.
+
 2013-04-23  Claudio Saavedra  <[email protected]>
 
         Ctrl+Shift+Right in Windows should select the spacing after the word

Added: trunk/LayoutTests/compositing/visible-rect/flipped-preserve-3d-expected.txt (0 => 148988)


--- trunk/LayoutTests/compositing/visible-rect/flipped-preserve-3d-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/compositing/visible-rect/flipped-preserve-3d-expected.txt	2013-04-23 20:51:42 UTC (rev 148988)
@@ -0,0 +1,90 @@
+Description
+Some text here.
+Description
+Some text here.
+Description
+Some text here.
+(GraphicsLayer
+  (bounds 785.00 615.00)
+  (visible rect 0.00, 0.00 785.00 x 600.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 785.00 615.00)
+      (contentsOpaque 1)
+      (visible rect 0.00, 0.00 785.00 x 600.00)
+      (children 1
+        (GraphicsLayer
+          (position 0.00 13.00)
+          (bounds 602.00 602.00)
+          (childrenTransform [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 0.00 1.00])
+          (visible rect 0.00, 0.00 602.00 x 587.00)
+          (children 1
+            (GraphicsLayer
+              (position 101.00 101.00)
+              (anchor 0.57 0.50)
+              (bounds 440.00 440.00)
+              (preserves3D 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 0.00 1.00])
+              (visible rect 0.00, 0.00 440.00 x 440.00)
+              (children 1
+                (GraphicsLayer
+                  (bounds 420.00 420.00)
+                  (contentsOpaque 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 0.00 1.00])
+                  (visible rect 0.00, 0.00 420.00 x 420.00)
+                  (children 1
+                    (GraphicsLayer
+                      (bounds 420.00 420.00)
+                      (visible rect 0.00, 0.00 420.00 x 420.00)
+                      (children 1
+                        (GraphicsLayer
+                          (position 0.00 -90.00)
+                          (bounds 418.00 510.00)
+                          (contentsOpaque 1)
+                          (visible rect 0.00, 90.00 418.00 x 420.00)
+                          (children 1
+                            (GraphicsLayer
+                              (bounds 418.00 510.00)
+                              (visible rect 0.00, 90.00 418.00 x 420.00)
+                              (children 3
+                                (GraphicsLayer
+                                  (position -3000.00 0.00)
+                                  (anchor 0.94 0.50)
+                                  (bounds 3418.00 120.00)
+                                  (usingTiledLayer 1)
+                                  (drawsContent 1)
+                                  (visible rect 3000.00, 90.00 418.00 x 30.00)
+                                )
+                                (GraphicsLayer
+                                  (position -3000.00 120.00)
+                                  (anchor 0.94 0.50)
+                                  (bounds 3418.00 120.00)
+                                  (usingTiledLayer 1)
+                                  (drawsContent 1)
+                                  (visible rect 3000.00, 0.00 418.00 x 120.00)
+                                )
+                                (GraphicsLayer
+                                  (position -3000.00 240.00)
+                                  (anchor 0.94 0.50)
+                                  (bounds 3418.00 120.00)
+                                  (usingTiledLayer 1)
+                                  (drawsContent 1)
+                                  (visible rect 3000.00, 0.00 418.00 x 120.00)
+                                )
+                              )
+                            )
+                          )
+                        )
+                      )
+                    )
+                  )
+                )
+              )
+            )
+          )
+        )
+      )
+    )
+  )
+)
+

Added: trunk/LayoutTests/compositing/visible-rect/flipped-preserve-3d.html (0 => 148988)


--- trunk/LayoutTests/compositing/visible-rect/flipped-preserve-3d.html	                        (rev 0)
+++ trunk/LayoutTests/compositing/visible-rect/flipped-preserve-3d.html	2013-04-23 20:51:42 UTC (rev 148988)
@@ -0,0 +1,97 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+    <style>
+        body {
+            margin: 0;
+        }
+        .contents {
+            position: absolute;
+            -webkit-perspective: 1000px;
+            width: 600px;
+            height: 600px;
+            border: 1px solid black;
+        }
+        
+        .card-container {
+            position: absolute;
+            top: 100px;
+            left: 100px;
+            width: 440px;
+            height: 440px;
+            -webkit-transform: rotateY(180deg);
+            -webkit-transform-origin-x: 250px;
+            -webkit-transform-style: preserve-3d;
+        }
+
+        .card-back {
+            position: absolute;
+            z-index: 1;
+            overflow: hidden;
+            width: 420px;
+            height: 420px;
+            -webkit-transform: rotateY(180deg);
+            background-color: silver;
+        }
+        
+        .bottom-section {
+            position: absolute;
+            z-index: 1;
+            width: 418px;
+            height: 510px;
+            bottom: 0;
+            overflow-x: hidden;
+            overflow-y: auto;
+            background-color: gray;
+        }
+        
+        .scrolled-content {
+            width: 100%;
+            height: 120px;
+            -webkit-transform: translateZ(0);
+        }
+        
+        h2 {
+            margin: 0;
+            text-indent: -3000px;
+        }
+    </style>
+    <script>
+        if (window.testRunner)
+            testRunner.dumpAsText();
+
+        function doTest()
+        {
+            if (window.internals)
+                document.getElementById('layers').textContent = internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_VISIBLE_RECTS);
+        }
+
+        window.addEventListener('load', doTest, false);
+    </script>
+</head>
+<body>
+
+    <div class="contents">
+        <div class="card-container">
+            <div class="card-back">
+                <div class="bottom-section">
+                    <div class="scrolled-content">
+                        <h2>Description</h2>
+                        Some text here.
+                    </div>
+                    <div class="scrolled-content">
+                        <h2>Description</h2>
+                        Some text here.
+                    </div>
+                    <div class="scrolled-content">
+                        <h2>Description</h2>
+                        Some text here.
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+<pre id="layers"></pre>
+</body>
+</html>

Modified: trunk/Source/WebCore/ChangeLog (148987 => 148988)


--- trunk/Source/WebCore/ChangeLog	2013-04-23 20:39:28 UTC (rev 148987)
+++ trunk/Source/WebCore/ChangeLog	2013-04-23 20:51:42 UTC (rev 148988)
@@ -1,3 +1,19 @@
+2013-04-23  Simon Fraser  <[email protected]>
+
+        Tiled layers clipped inside nested transform/preserve-3d hierarchies
+        https://bugs.webkit.org/show_bug.cgi?id=115044
+
+        Reviewed by Dean Jackson.
+        
+        The optimization added in r139479 to call move() for integral translation
+        transforms hit a bug in TransformState::move(). If m_accumulatedTransform is
+        not null, we have to apply it.
+
+        Test: compositing/visible-rect/flipped-preserve-3d.html
+
+        * platform/graphics/transforms/TransformState.cpp:
+        (WebCore::TransformState::move):
+
 2013-04-23  Claudio Saavedra  <[email protected]>
 
         Ctrl+Shift+Right in Windows should select the spacing after the word

Modified: trunk/Source/WebCore/platform/graphics/transforms/TransformState.cpp (148987 => 148988)


--- trunk/Source/WebCore/platform/graphics/transforms/TransformState.cpp	2013-04-23 20:39:28 UTC (rev 148987)
+++ trunk/Source/WebCore/platform/graphics/transforms/TransformState.cpp	2013-04-23 20:51:42 UTC (rev 148988)
@@ -69,7 +69,7 @@
 
 void TransformState::move(const LayoutSize& offset, TransformAccumulation accumulate)
 {
-    if (accumulate == FlattenTransform || !m_accumulatedTransform)
+    if (accumulate == FlattenTransform && !m_accumulatedTransform)
         m_accumulatedOffset += offset;
     else {
         applyAccumulatedOffset();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to