Title: [152986] trunk
Revision
152986
Author
[email protected]
Date
2013-07-22 12:38:03 -0700 (Mon, 22 Jul 2013)

Log Message

REGRESSION(r152227) Images with compositing layer don't show up unless the containing window is resized.
https://bugs.webkit.org/show_bug.cgi?id=118951

Patch by Zalan Bujtas <[email protected]> on 2013-07-22
Reviewed by Simon Fraser.

Ensure that the content rect is initialized when the image is set on the graphics layer.

RenderLayerBacking::updateGraphicsLayerGeometry() only updates the contents rect when
the associated graphics layer has a content layer. Since the image gets committed
on the graphics layer after the update calls, the contents rect is left uninitialized.

Source/WebCore:

Test: compositing/images/positioned-image-content-rect.html

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateImageContents):

LayoutTests:

* compositing/images/positioned-image-content-rect-expected.html: Added.
* compositing/images/positioned-image-content-rect.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (152985 => 152986)


--- trunk/LayoutTests/ChangeLog	2013-07-22 18:48:19 UTC (rev 152985)
+++ trunk/LayoutTests/ChangeLog	2013-07-22 19:38:03 UTC (rev 152986)
@@ -1,3 +1,19 @@
+2013-07-22  Zalan Bujtas  <[email protected]>
+
+        REGRESSION(r152227) Images with compositing layer don't show up unless the containing window is resized.
+        https://bugs.webkit.org/show_bug.cgi?id=118951
+
+        Reviewed by Simon Fraser.
+
+        Ensure that the content rect is initialized when the image is set on the graphics layer.
+
+        RenderLayerBacking::updateGraphicsLayerGeometry() only updates the contents rect when
+        the associated graphics layer has a content layer. Since the image gets committed 
+        on the graphics layer after the update calls, the contents rect is left uninitialized.
+
+        * compositing/images/positioned-image-content-rect-expected.html: Added.
+        * compositing/images/positioned-image-content-rect.html: Added.
+
 2013-07-22  Commit Queue  <[email protected]>
 
         Unreviewed, rolling out r152968.

Added: trunk/LayoutTests/compositing/images/positioned-image-content-rect-expected.html (0 => 152986)


--- trunk/LayoutTests/compositing/images/positioned-image-content-rect-expected.html	                        (rev 0)
+++ trunk/LayoutTests/compositing/images/positioned-image-content-rect-expected.html	2013-07-22 19:38:03 UTC (rev 152986)
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+<body>
+    <!--This tests if the image with compositing layer shows up without resizing the window.-->
+    <img width="214px" height="232px" src=""
+</body>
+</html>
\ No newline at end of file

Added: trunk/LayoutTests/compositing/images/positioned-image-content-rect.html (0 => 152986)


--- trunk/LayoutTests/compositing/images/positioned-image-content-rect.html	                        (rev 0)
+++ trunk/LayoutTests/compositing/images/positioned-image-content-rect.html	2013-07-22 19:38:03 UTC (rev 152986)
@@ -0,0 +1,6 @@
+<html>
+<body>
+    <!--This tests if the positioned image shows up without resizing the window.-->
+    <img style="-webkit-transform: translateZ(0)" width="214px" height="232px" src=""
+</body>
+</html>
\ No newline at end of file

Modified: trunk/Source/WebCore/ChangeLog (152985 => 152986)


--- trunk/Source/WebCore/ChangeLog	2013-07-22 18:48:19 UTC (rev 152985)
+++ trunk/Source/WebCore/ChangeLog	2013-07-22 19:38:03 UTC (rev 152986)
@@ -1,3 +1,21 @@
+2013-07-22  Zalan Bujtas  <[email protected]>
+
+        REGRESSION(r152227) Images with compositing layer don't show up unless the containing window is resized.
+        https://bugs.webkit.org/show_bug.cgi?id=118951
+
+        Reviewed by Simon Fraser.
+
+        Ensure that the content rect is initialized when the image is set on the graphics layer.
+
+        RenderLayerBacking::updateGraphicsLayerGeometry() only updates the contents rect when
+        the associated graphics layer has a content layer. Since the image gets committed 
+        on the graphics layer after the update calls, the contents rect is left uninitialized.
+
+        Test: compositing/images/positioned-image-content-rect.html
+
+        * rendering/RenderLayerBacking.cpp:
+        (WebCore::RenderLayerBacking::updateImageContents):
+
 2013-07-22  Diego Pino Garcia  <[email protected]>
 
         [Old Web Inspector] When right-clicking on a DataGrid column, show editing menu option as "Edit <columnName>" instead of just "Edit"

Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (152985 => 152986)


--- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp	2013-07-22 18:48:19 UTC (rev 152985)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.cpp	2013-07-22 19:38:03 UTC (rev 152986)
@@ -1742,6 +1742,7 @@
         return;
 
     // This is a no-op if the layer doesn't have an inner layer for the image.
+    m_graphicsLayer->setContentsRect(contentsBox());
     m_graphicsLayer->setContentsToImage(image);
     bool isSimpleContainer = false;
     updateDrawsContent(isSimpleContainer);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to