Title: [117103] branches/safari-536-branch

Diff

Modified: branches/safari-536-branch/LayoutTests/ChangeLog (117102 => 117103)


--- branches/safari-536-branch/LayoutTests/ChangeLog	2012-05-15 18:15:42 UTC (rev 117102)
+++ branches/safari-536-branch/LayoutTests/ChangeLog	2012-05-15 18:16:00 UTC (rev 117103)
@@ -1,5 +1,22 @@
 2012-05-15  Lucas Forschler  <[email protected]>
 
+    Merge 116395
+
+    2012-05-07  Simon Fraser  <[email protected]>
+
+            Compositing layers with transformed children not large enough to show contents
+            https://bugs.webkit.org/show_bug.cgi?id=85855
+
+            Reviewed by Dan Bernstein.
+
+            Test having composited element with clipped, transformed children.
+
+            * compositing/geometry/bounds-clipped-composited-child-expected.png: Added.
+            * compositing/geometry/bounds-clipped-composited-child-expected.txt: Added.
+            * compositing/geometry/bounds-clipped-composited-child.html: Added.
+
+2012-05-15  Lucas Forschler  <[email protected]>
+
     Merge 116361
 
     2012-05-07  Oliver Hunt  <[email protected]>

Copied: branches/safari-536-branch/LayoutTests/compositing/geometry/bounds-clipped-composited-child-expected.png (from rev 116395, trunk/LayoutTests/compositing/geometry/bounds-clipped-composited-child-expected.png)


(Binary files differ)

Copied: branches/safari-536-branch/LayoutTests/compositing/geometry/bounds-clipped-composited-child-expected.txt (from rev 116395, trunk/LayoutTests/compositing/geometry/bounds-clipped-composited-child-expected.txt) (0 => 117103)


--- branches/safari-536-branch/LayoutTests/compositing/geometry/bounds-clipped-composited-child-expected.txt	                        (rev 0)
+++ branches/safari-536-branch/LayoutTests/compositing/geometry/bounds-clipped-composited-child-expected.txt	2012-05-15 18:16:00 UTC (rev 117103)
@@ -0,0 +1,18 @@
+(GraphicsLayer
+  (bounds 800.00 600.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 800.00 600.00)
+      (children 1
+        (GraphicsLayer
+          (position 58.00 8.00)
+          (anchor 0.25 0.50)
+          (bounds 200.00 100.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] [-50.00 0.00 0.00 1.00])
+        )
+      )
+    )
+  )
+)
+

Copied: branches/safari-536-branch/LayoutTests/compositing/geometry/bounds-clipped-composited-child.html (from rev 116395, trunk/LayoutTests/compositing/geometry/bounds-clipped-composited-child.html) (0 => 117103)


--- branches/safari-536-branch/LayoutTests/compositing/geometry/bounds-clipped-composited-child.html	                        (rev 0)
+++ branches/safari-536-branch/LayoutTests/compositing/geometry/bounds-clipped-composited-child.html	2012-05-15 18:16:00 UTC (rev 117103)
@@ -0,0 +1,60 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+  <style>
+    body {
+      overflow: hidden;
+    }
+    .container {
+      margin-left: 50px;
+      height: 100px;
+      width: 100px;
+      -webkit-transform: translate3d(-50%, 0, 0);
+    }
+    
+    .box {
+      position: absolute;
+      top: 0;
+      height: 100px;
+      width: 100px;
+      overflow: hidden;
+      background-color: green;
+    }
+    
+    #indicator {
+      position: absolute;
+      top: 8px;
+      left: 8px;
+      width: 200px;
+      height: 100px;
+      background-color: red;
+    }
+    
+    #layers {
+      opacity: 0; /* hide from pixel result */
+    }
+  </style>
+  <script>
+    if (window.layoutTestController)
+      layoutTestController.dumpAsText(true);
+
+    function dumpLayers()
+    {
+      if (window.layoutTestController)
+        document.getElementById('layers').innerText = layoutTestController.layerTreeAsText();
+    }
+
+    window.addEventListener('load', dumpLayers, false);
+  </script>
+</head>
+<body>
+  <!-- You should see a green rectangle, and no red. -->
+  <div id="indicator"></div>
+  <div class="container">
+    <div class="box" style="-webkit-transform: translateX(0)"></div>
+    <div class="box" style="-webkit-transform: translateX(100%)"></div>
+  </div>
+<pre id="layers">Layer tree goes here in DRT</pre>
+</body>
+</html>

Modified: branches/safari-536-branch/Source/WebCore/ChangeLog (117102 => 117103)


--- branches/safari-536-branch/Source/WebCore/ChangeLog	2012-05-15 18:15:42 UTC (rev 117102)
+++ branches/safari-536-branch/Source/WebCore/ChangeLog	2012-05-15 18:16:00 UTC (rev 117103)
@@ -1,5 +1,27 @@
 2012-05-15  Lucas Forschler  <[email protected]>
 
+    Merge 116395
+
+    2012-05-07  Simon Fraser  <[email protected]>
+
+            Compositing layers with transformed children not large enough to show contents
+            https://bugs.webkit.org/show_bug.cgi?id=85855
+
+            Reviewed by Dan Bernstein.
+
+            r114518 added a code path to RenderLayer::calculateLayerBounds() which
+            does an early return if the layer has clipping. However, this code
+            path omitted to take local transforms into account.
+
+            Fix is to handle transforms as we do in the non-clipped case.
+
+            Test: compositing/geometry/bounds-clipped-composited-child.html
+
+            * rendering/RenderLayer.cpp:
+            (WebCore::RenderLayer::calculateLayerBounds):
+
+2012-05-15  Lucas Forschler  <[email protected]>
+
     Merge 116368
 
     2012-05-07  Enrica Casucci  <[email protected]>

Modified: branches/safari-536-branch/Source/WebCore/rendering/RenderLayer.cpp (117102 => 117103)


--- branches/safari-536-branch/Source/WebCore/rendering/RenderLayer.cpp	2012-05-15 18:15:42 UTC (rev 117102)
+++ branches/safari-536-branch/Source/WebCore/rendering/RenderLayer.cpp	2012-05-15 18:16:00 UTC (rev 117103)
@@ -4159,6 +4159,9 @@
     if (flags & UseLocalClipRectIfPossible) {
         LayoutRect localClipRect = layer->localClipRect();
         if (localClipRect != PaintInfo::infiniteRect()) {
+            if ((flags & IncludeSelfTransform) && layer->paintsWithTransform(PaintBehaviorNormal))
+                localClipRect = layer->transform()->mapRect(localClipRect);
+
             LayoutPoint ancestorRelOffset;
             layer->convertToLayerCoords(ancestorLayer, ancestorRelOffset);
             localClipRect.moveBy(ancestorRelOffset);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to