Title: [167796] trunk
Revision
167796
Author
commit-qu...@webkit.org
Date
2014-04-25 01:04:28 -0700 (Fri, 25 Apr 2014)

Log Message

Incomplete body painting when using blend modes
https://bugs.webkit.org/show_bug.cgi?id=131889

Source/WebCore:
The incomplete painting was caused by the transparency layer created for
the root renderer. We can safely skip creating this transparency layer at
the root level, as there is nothing else being painted behind this layer that
could be used erroneously as a backdrop.

Patch by Ion Rosca <ro...@adobe.com> on 2014-04-25
Reviewed by Simon Fraser.

Test: css3/compositing/blend-mode-with-body.html

* rendering/RenderLayer.h:
Changing RenderLayer::paintsWithTransparency so that it will not
return true when the root renderer needs to isolate blending.

LayoutTests:
Patch by Ion Rosca <ro...@adobe.com> on 2014-04-25
Reviewed by Simon Fraser.

* css3/compositing/blend-mode-with-body-expected.html: Added.
* css3/compositing/blend-mode-with-body.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (167795 => 167796)


--- trunk/LayoutTests/ChangeLog	2014-04-25 07:58:31 UTC (rev 167795)
+++ trunk/LayoutTests/ChangeLog	2014-04-25 08:04:28 UTC (rev 167796)
@@ -1,3 +1,13 @@
+2014-04-25  Ion Rosca  <ro...@adobe.com>
+
+        Incomplete body painting when using blend modes
+        https://bugs.webkit.org/show_bug.cgi?id=131889
+
+        Reviewed by Simon Fraser.
+
+        * css3/compositing/blend-mode-with-body-expected.html: Added.
+        * css3/compositing/blend-mode-with-body.html: Added.
+
 2014-04-24  Commit Queue  <commit-qu...@webkit.org>
 
         Unreviewed, rolling out r167441.

Added: trunk/LayoutTests/css3/compositing/blend-mode-with-body-expected.html (0 => 167796)


--- trunk/LayoutTests/css3/compositing/blend-mode-with-body-expected.html	                        (rev 0)
+++ trunk/LayoutTests/css3/compositing/blend-mode-with-body-expected.html	2014-04-25 08:04:28 UTC (rev 167796)
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML>
+<head>
+    <style>
+    	body {
+            background-color: #0000ff;
+        }
+        div {
+            width: 100px;
+            height: 100px;
+        }
+    </style>
+</head>
+<body>
+	<p>This test passes if background-color fills the entire view port.</p>
+    <div></div>
+</body>

Added: trunk/LayoutTests/css3/compositing/blend-mode-with-body.html (0 => 167796)


--- trunk/LayoutTests/css3/compositing/blend-mode-with-body.html	                        (rev 0)
+++ trunk/LayoutTests/css3/compositing/blend-mode-with-body.html	2014-04-25 08:04:28 UTC (rev 167796)
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML>
+<head>
+    <style>
+        body {
+            background-color: #0000ff;
+        }
+        div {
+            width: 100px;
+            height: 100px;
+            mix-blend-mode: difference;
+        }
+    </style>
+</head>
+<body>
+    <p>This test passes if background-color fills the entire view port.</p>
+    <div></div>
+</body>

Modified: trunk/Source/WebCore/ChangeLog (167795 => 167796)


--- trunk/Source/WebCore/ChangeLog	2014-04-25 07:58:31 UTC (rev 167795)
+++ trunk/Source/WebCore/ChangeLog	2014-04-25 08:04:28 UTC (rev 167796)
@@ -1,3 +1,21 @@
+2014-04-25  Ion Rosca  <ro...@adobe.com>
+
+        Incomplete body painting when using blend modes
+        https://bugs.webkit.org/show_bug.cgi?id=131889
+
+        The incomplete painting was caused by the transparency layer created for
+        the root renderer. We can safely skip creating this transparency layer at
+        the root level, as there is nothing else being painted behind this layer that
+        could be used erroneously as a backdrop.
+
+        Reviewed by Simon Fraser.
+
+        Test: css3/compositing/blend-mode-with-body.html
+
+        * rendering/RenderLayer.h:
+        Changing RenderLayer::paintsWithTransparency so that it will not
+        return true when the root renderer needs to isolate blending.
+
 2014-04-25  Darin Adler  <da...@apple.com>
 
         ASSERTION FAILED: "!m_isolatedWorld->isNormal() || m_wrapper || !m_jsFunction" in svg/custom/use-instanceRoot-event-listeners.xhtml

Modified: trunk/Source/WebCore/rendering/RenderLayer.h (167795 => 167796)


--- trunk/Source/WebCore/rendering/RenderLayer.h	2014-04-25 07:58:31 UTC (rev 167795)
+++ trunk/Source/WebCore/rendering/RenderLayer.h	2014-04-25 08:04:28 UTC (rev 167796)
@@ -833,7 +833,7 @@
 
     bool paintsWithTransparency(PaintBehavior paintBehavior) const
     {
-        return (isTransparent() || hasBlendMode() || isolatesBlending()) && ((paintBehavior & PaintBehaviorFlattenCompositingLayers) || !isComposited());
+        return (isTransparent() || hasBlendMode() || (isolatesBlending() && !renderer().isRoot())) && ((paintBehavior & PaintBehaviorFlattenCompositingLayers) || !isComposited());
     }
 
     bool paintsWithTransform(PaintBehavior) const;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to