Title: [164232] trunk
Revision
164232
Author
[email protected]
Date
2014-02-17 11:13:08 -0800 (Mon, 17 Feb 2014)

Log Message

Graphics buffer issue with clip-path and fixed positioned element
https://bugs.webkit.org/show_bug.cgi?id=126262

Source/WebCore:

Reviewed by Tim Horton.

If an element has a clip-path, backgroundIsKnownToBeOpaqueInRect() needs
to return false so that we don't try to make opaque compositing layers.

Test: compositing/contents-opaque/opaque-with-clip-path.html

* rendering/RenderBox.cpp:
(WebCore::RenderBox::backgroundIsKnownToBeOpaqueInRect):

LayoutTests:

Reviewed by Tim Horton.

* compositing/contents-opaque/opaque-with-clip-path-expected.html: Added.
* compositing/contents-opaque/opaque-with-clip-path.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (164231 => 164232)


--- trunk/LayoutTests/ChangeLog	2014-02-17 19:10:42 UTC (rev 164231)
+++ trunk/LayoutTests/ChangeLog	2014-02-17 19:13:08 UTC (rev 164232)
@@ -1,3 +1,13 @@
+2014-02-17  Simon Fraser  <[email protected]>
+
+        Graphics buffer issue with clip-path and fixed positioned element
+        https://bugs.webkit.org/show_bug.cgi?id=126262
+
+        Reviewed by Tim Horton.
+
+        * compositing/contents-opaque/opaque-with-clip-path-expected.html: Added.
+        * compositing/contents-opaque/opaque-with-clip-path.html: Added.
+
 2014-02-17  Radu Stavila  <[email protected]>
 
         [CSS Regions] The box decorations of an element overflowing a region should be clipped at the border box, not the content box

Added: trunk/LayoutTests/compositing/contents-opaque/opaque-with-clip-path-expected.html (0 => 164232)


--- trunk/LayoutTests/compositing/contents-opaque/opaque-with-clip-path-expected.html	                        (rev 0)
+++ trunk/LayoutTests/compositing/contents-opaque/opaque-with-clip-path-expected.html	2014-02-17 19:13:08 UTC (rev 164232)
@@ -0,0 +1,15 @@
+<style>
+#parent {
+	height: 200px;
+	margin: 20px;
+	background: blue;
+	border: solid red 20px;
+	-webkit-clip-path: circle(50%, 50%, 50%);
+	outline: 1px solid transparent;
+}
+
+.composited {
+  -webkit-transform: translateZ(0);
+}
+</style>
+<div id="parent" class="composited"></div>
\ No newline at end of file

Added: trunk/LayoutTests/compositing/contents-opaque/opaque-with-clip-path.html (0 => 164232)


--- trunk/LayoutTests/compositing/contents-opaque/opaque-with-clip-path.html	                        (rev 0)
+++ trunk/LayoutTests/compositing/contents-opaque/opaque-with-clip-path.html	2014-02-17 19:13:08 UTC (rev 164232)
@@ -0,0 +1,14 @@
+<style>
+#parent {
+	height: 200px;
+	margin: 20px;
+	background: blue;
+	border: solid red 20px;
+	-webkit-clip-path: circle(50%, 50%, 50%);
+}
+
+.composited {
+  -webkit-transform: translateZ(0);
+}
+</style>
+<div id="parent" class="composited"></div>
\ No newline at end of file

Modified: trunk/Source/WebCore/ChangeLog (164231 => 164232)


--- trunk/Source/WebCore/ChangeLog	2014-02-17 19:10:42 UTC (rev 164231)
+++ trunk/Source/WebCore/ChangeLog	2014-02-17 19:13:08 UTC (rev 164232)
@@ -1,3 +1,18 @@
+2014-02-17  Simon Fraser  <[email protected]>
+
+        Graphics buffer issue with clip-path and fixed positioned element
+        https://bugs.webkit.org/show_bug.cgi?id=126262
+
+        Reviewed by Tim Horton.
+        
+        If an element has a clip-path, backgroundIsKnownToBeOpaqueInRect() needs
+        to return false so that we don't try to make opaque compositing layers.
+
+        Test: compositing/contents-opaque/opaque-with-clip-path.html
+
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::backgroundIsKnownToBeOpaqueInRect):
+
 2014-02-17  Radu Stavila  <[email protected]>
 
         [CSS Regions] The box decorations of an element overflowing a region should be clipped at the border box, not the content box

Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (164231 => 164232)


--- trunk/Source/WebCore/rendering/RenderBox.cpp	2014-02-17 19:10:42 UTC (rev 164231)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp	2014-02-17 19:13:08 UTC (rev 164232)
@@ -1289,9 +1289,13 @@
         return false;
     // FIXME: Check the opaqueness of background images.
 
+    if (hasClipPath())
+        return false;
+
     // FIXME: Use rounded rect if border radius is present.
     if (style().hasBorderRadius())
         return false;
+    
     // FIXME: The background color clip is defined by the last layer.
     if (style().backgroundLayers()->next())
         return false;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to