Title: [108007] trunk
Revision
108007
Author
commit-qu...@webkit.org
Date
2012-02-16 17:30:27 -0800 (Thu, 16 Feb 2012)

Log Message

[chromium] Empty divs not transforming overflow correctly
https://bugs.webkit.org/show_bug.cgi?id=78850

Patch by Dana Jansens <dan...@chromium.org> on 2012-02-16
Reviewed by James Robinson.

Source/WebCore:

Test: compositing/overflow/transform-in-empty-container.html

* platform/graphics/chromium/GraphicsLayerChromium.cpp:
(WebCore::GraphicsLayerChromium::setSize):

LayoutTests:

* compositing/overflow/transform-in-empty-container-expected.png: Added.
* compositing/overflow/transform-in-empty-container-expected.txt: Added.
* compositing/overflow/transform-in-empty-container.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (108006 => 108007)


--- trunk/LayoutTests/ChangeLog	2012-02-17 01:16:15 UTC (rev 108006)
+++ trunk/LayoutTests/ChangeLog	2012-02-17 01:30:27 UTC (rev 108007)
@@ -1,3 +1,14 @@
+2012-02-16  Dana Jansens  <dan...@chromium.org>
+
+        [chromium] Empty divs not transforming overflow correctly
+        https://bugs.webkit.org/show_bug.cgi?id=78850
+
+        Reviewed by James Robinson.
+
+        * compositing/overflow/transform-in-empty-container-expected.png: Added.
+        * compositing/overflow/transform-in-empty-container-expected.txt: Added.
+        * compositing/overflow/transform-in-empty-container.html: Added.
+
 2012-02-16  James Robinson  <jam...@chromium.org>
 
         [chromium] Unreviewed baseline update for compositing/scrollbar-painting.html

Added: trunk/LayoutTests/compositing/overflow/transform-in-empty-container-expected.png (0 => 108007)


--- trunk/LayoutTests/compositing/overflow/transform-in-empty-container-expected.png	                        (rev 0)
+++ trunk/LayoutTests/compositing/overflow/transform-in-empty-container-expected.png	2012-02-17 01:30:27 UTC (rev 108007)
@@ -0,0 +1,8 @@
+\x89PNG
+
+
+IHDR X')tEXtchecksum2da80715818a53943b36796806df9a9c\xFB\xA2!o
+\xC2IDATx\x9C\xED\xD81
+\xC3@A\x9D\xF0\xBF\x8D^\xBE~\x81\xB1\x83F\xA2*\xDDd\xC2f\xD7\xCCt\xCE\xDD\x9EF`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@\xEC\xF5\x{DC2E}u\xE7\x8E?\xCD{vO\xF8\xC1 &\xB0b &\xB0b &\xB0b &\xB0b &\xB0b &\xB0b &\xB0b &\xB0b &\xB0b &\xB0b &\xB0b &\xB0b &\xB0b &\xB0b &\xB0b &\xB0b &\xB0b &\xB0b &\xB0b &\xB0b &\xB0b &\xB0b &\xB0b &\xB0b \xB6ff\xF7\x80G\xF1\xC1\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88}\xDA?
+\xAB
+\xE5K\xA7IEND\xAEB`\x82
\ No newline at end of file

Added: trunk/LayoutTests/compositing/overflow/transform-in-empty-container-expected.txt (0 => 108007)


--- trunk/LayoutTests/compositing/overflow/transform-in-empty-container-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/compositing/overflow/transform-in-empty-container-expected.txt	2012-02-17 01:30:27 UTC (rev 108007)
@@ -0,0 +1 @@
+

Added: trunk/LayoutTests/compositing/overflow/transform-in-empty-container.html (0 => 108007)


--- trunk/LayoutTests/compositing/overflow/transform-in-empty-container.html	                        (rev 0)
+++ trunk/LayoutTests/compositing/overflow/transform-in-empty-container.html	2012-02-17 01:30:27 UTC (rev 108007)
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<html><head>
+<title>Transform in an empty container test.</title>
+<style type="text/css">
+  .composited {
+    -webkit-transform: translateZ(0);
+  }
+  .abs {
+    position: absolute;
+  }
+
+  .empty-transform {
+    -webkit-transform: matrix3d(1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
+    width: 0px;
+    height: 100px;
+  }
+
+  .green {
+    background-color: green;
+  }
+  .box {
+    width: 50px;
+    height: 50px;
+  }
+</style>
+<script type="text/_javascript_">
+  if (window.layoutTestController) {
+    layoutTestController.dumpAsText(true);
+  }
+</script>
+</head>
+
+<body>
+
+  <!--
+     This div has a height, and is transformed to flip things inside it along the Y axis.
+     While it does not have a width, overflow contents need to be transformed based on its height still.
+    -->
+  <div class="abs empty-transform">
+    <div class="composited green box"></div>
+  </div>
+
+</body>
+</html>

Modified: trunk/Source/WebCore/ChangeLog (108006 => 108007)


--- trunk/Source/WebCore/ChangeLog	2012-02-17 01:16:15 UTC (rev 108006)
+++ trunk/Source/WebCore/ChangeLog	2012-02-17 01:30:27 UTC (rev 108007)
@@ -1,3 +1,15 @@
+2012-02-16  Dana Jansens  <dan...@chromium.org>
+
+        [chromium] Empty divs not transforming overflow correctly
+        https://bugs.webkit.org/show_bug.cgi?id=78850
+
+        Reviewed by James Robinson.
+
+        Test: compositing/overflow/transform-in-empty-container.html
+
+        * platform/graphics/chromium/GraphicsLayerChromium.cpp:
+        (WebCore::GraphicsLayerChromium::setSize):
+
 2012-02-16  Emil A Eklund  <e...@chromium.org>
 
         Fix use of long long in FractionalLayoutUnit::setRawValue

Modified: trunk/Source/WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp (108006 => 108007)


--- trunk/Source/WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp	2012-02-17 01:16:15 UTC (rev 108006)
+++ trunk/Source/WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp	2012-02-17 01:30:27 UTC (rev 108007)
@@ -177,8 +177,9 @@
 {
     // We are receiving negative sizes here that cause assertions to fail in the compositor. Clamp them to 0 to
     // avoid those assertions.
+    // FIXME: This should be an ASSERT instead, as negative sizes should not exist in WebCore.
     FloatSize clampedSize = size;
-    if (clampedSize.isEmpty())
+    if (clampedSize.width() < 0 || clampedSize.height() < 0)
         clampedSize = FloatSize();
 
     if (clampedSize == m_size)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to