Title: [150685] trunk
- Revision
- 150685
- Author
- noam.rosent...@nokia.com
- Date
- 2013-05-25 02:51:25 -0700 (Sat, 25 May 2013)
Log Message
Direct pattern compositing breaks when no-repeat is set on a large layer
https://bugs.webkit.org/show_bug.cgi?id=116140
Source/WebCore:
Reviewed by Antti Koivisto.
In some cases the directly composited background color logic overrides the layer's
contentsRect, which results in wrong rendering of tiled images.
This patch makes sure that the background image is applied after the solid color,
which ensures the correct contentsRect.
Test: compositing/patterns/direct-pattern-compositing-contain-no-repeat.html
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateDirectlyCompositedContents):
LayoutTests:
Added a ref-test to make sure that direct pattern compositing works well with no-repeat
in a particular geometry.
Reviewed by Antti Koivisto.
* compositing/patterns/direct-pattern-compositing-contain-no-repeat-expected.html: Added.
* compositing/patterns/direct-pattern-compositing-contain-no-repeat.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (150684 => 150685)
--- trunk/LayoutTests/ChangeLog 2013-05-25 09:16:30 UTC (rev 150684)
+++ trunk/LayoutTests/ChangeLog 2013-05-25 09:51:25 UTC (rev 150685)
@@ -1,3 +1,16 @@
+2013-05-25 Noam Rosenthal <noam.rosent...@nokia.com>
+
+ Direct pattern compositing breaks when no-repeat is set on a large layer
+ https://bugs.webkit.org/show_bug.cgi?id=116140
+
+ Added a ref-test to make sure that direct pattern compositing works well with no-repeat
+ in a particular geometry.
+
+ Reviewed by Antti Koivisto.
+
+ * compositing/patterns/direct-pattern-compositing-contain-no-repeat-expected.html: Added.
+ * compositing/patterns/direct-pattern-compositing-contain-no-repeat.html: Added.
+
2013-05-24 Brent Fulgham <bfulg...@apple.com>
Unreviewed change to get Windows bots green. Disable a number
Added: trunk/LayoutTests/compositing/patterns/direct-pattern-compositing-contain-no-repeat-expected.html (0 => 150685)
--- trunk/LayoutTests/compositing/patterns/direct-pattern-compositing-contain-no-repeat-expected.html (rev 0)
+++ trunk/LayoutTests/compositing/patterns/direct-pattern-compositing-contain-no-repeat-expected.html 2013-05-25 09:51:25 UTC (rev 150685)
@@ -0,0 +1,16 @@
+<html lang="en">
+<head>
+ <style>
+ .test {
+ height: 200px;
+ width: 300px;
+ background-image: url(../resources/simple_image.png);
+ -webkit-background-size: contain;
+ background-repeat: no-repeat;
+ }
+ </style>
+</head>
+<body>
+ <div class="test"></div>
+</body>
+</html>
Added: trunk/LayoutTests/compositing/patterns/direct-pattern-compositing-contain-no-repeat.html (0 => 150685)
--- trunk/LayoutTests/compositing/patterns/direct-pattern-compositing-contain-no-repeat.html (rev 0)
+++ trunk/LayoutTests/compositing/patterns/direct-pattern-compositing-contain-no-repeat.html 2013-05-25 09:51:25 UTC (rev 150685)
@@ -0,0 +1,17 @@
+<html lang="en">
+<head>
+ <style>
+ .composited { -webkit-transform: translateZ(0); }
+ .test {
+ height: 200px;
+ width: 300px;
+ background-image: url(../resources/simple_image.png);
+ -webkit-background-size: contain;
+ background-repeat: no-repeat;
+ }
+ </style>
+</head>
+<body>
+ <div class="test composited"></div>
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (150684 => 150685)
--- trunk/Source/WebCore/ChangeLog 2013-05-25 09:16:30 UTC (rev 150684)
+++ trunk/Source/WebCore/ChangeLog 2013-05-25 09:51:25 UTC (rev 150685)
@@ -1,3 +1,20 @@
+2013-05-25 Noam Rosenthal <noam.rosent...@nokia.com>
+
+ Direct pattern compositing breaks when no-repeat is set on a large layer
+ https://bugs.webkit.org/show_bug.cgi?id=116140
+
+ Reviewed by Antti Koivisto.
+
+ In some cases the directly composited background color logic overrides the layer's
+ contentsRect, which results in wrong rendering of tiled images.
+ This patch makes sure that the background image is applied after the solid color,
+ which ensures the correct contentsRect.
+
+ Test: compositing/patterns/direct-pattern-compositing-contain-no-repeat.html
+
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::updateDirectlyCompositedContents):
+
2013-05-24 Andreas Kling <akl...@apple.com>
Move "hover" state logic from Node to Element.
Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (150684 => 150685)
--- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp 2013-05-25 09:16:30 UTC (rev 150684)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.cpp 2013-05-25 09:51:25 UTC (rev 150685)
@@ -875,8 +875,10 @@
if (!m_owningLayer->hasVisibleContent())
return;
+ // The order of operations here matters, since the last valid type of contents needs
+ // to also update the contentsRect.
+ updateDirectlyCompositedBackgroundColor(isSimpleContainer, didUpdateContentsRect);
updateDirectlyCompositedBackgroundImage(isSimpleContainer, didUpdateContentsRect);
- updateDirectlyCompositedBackgroundColor(isSimpleContainer, didUpdateContentsRect);
}
void RenderLayerBacking::registerScrollingLayers()
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes