<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[168462] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/168462">168462</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2014-05-07 22:42:21 -0700 (Wed, 07 May 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>[CSS Blending] Blending doesn't work if the parent stacking context is not a self painting layer
https://bugs.webkit.org/show_bug.cgi?id=130891

Patch by Ion Rosca &lt;rosca@adobe.com&gt; on 2014-05-07
Reviewed by Dean Jackson.

Source/WebCore:
The stacking context layers having unisolated blending descendants should be able
to create transparency layers or to become composited in order to restrict blending
content to accessing the information outside the current stacking context.
Some layers are not self painting layers and these layers cannot crate transparency
layers and cannot be composited, thus they are not able to isolate blending descendants
when it's required.

The solution in this patch is to make a layer isSelfPaintingLayer when
it needs to isolate blending descendants (hasUnisolatedBlendingDescendants).

Tests: css3/blending/blend-mode-isolation-accelerated-overflow-hidden.html
       css3/blending/blend-mode-isolation-overflow-hidden.html
       css3/blending/blend-mode-isolation-turn-off-self-painting-layer.html
       css3/blending/blend-mode-isolation-turn-off-self-painting-layer1.html
       css3/blending/blend-mode-isolation-turn-off-self-painting-layer2.html
       css3/blending/blend-mode-isolation-turn-on-self-painting-layer.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateAncestorChainHasBlendingDescendants):
When hasUnisolatedBlendingDescendants is set we make sure that isSelfPaintingLayer flag is set too.
(WebCore::RenderLayer::updateDescendantDependentFlags):
The flags might be read or changed while walking the descendants, so we don't want to reset
them before traversing the tree.
(WebCore::RenderLayer::shouldBeSelfPaintingLayer):
Adding isolatesBlending() condition for a layer to be self painting.
* rendering/RenderLayer.h:
Removing ASSERT from hasUnisolatedBlendingDescendants(). It crashes in minibrowser
and in layout tests when painting contents. Similar bugs on other flags: #71044, #71277.
* rendering/RenderLayerModelObject.cpp:
(WebCore::RenderLayerModelObject::styleDidChange):
Telling ancestors that blend mode property has been removed from CSS when the layer for
this element is going to be removed; styleChanged will not be called anymore.

LayoutTests:
Removed position:relative which forced tests to avoid this bug.
* css3/blending/blend-mode-accelerated-parent-overflow-hidden.html:
* css3/blending/blend-mode-clip-accelerated-blending-canvas.html:
* css3/blending/blend-mode-clip-accelerated-blending-child.html:
* css3/blending/blend-mode-clip-accelerated-blending-with-siblings.html:
* css3/blending/blend-mode-clip-accelerated-transformed-blending.html:

New tests:
* css3/blending/blend-mode-isolation-accelerated-overflow-hidden-expected.txt: Added.
* css3/blending/blend-mode-isolation-accelerated-overflow-hidden.html: Added.
* css3/blending/blend-mode-isolation-overflow-hidden-expected.html: Added.
* css3/blending/blend-mode-isolation-overflow-hidden.html: Added.
* css3/blending/blend-mode-isolation-turn-off-self-painting-layer-expected.txt: Added.
* css3/blending/blend-mode-isolation-turn-off-self-painting-layer.html: Added.
* css3/blending/blend-mode-isolation-turn-off-self-painting-layer1-expected.txt: Added.
* css3/blending/blend-mode-isolation-turn-off-self-painting-layer1.html: Added.
* css3/blending/blend-mode-isolation-turn-off-self-painting-layer2-expected.txt: Added.
* css3/blending/blend-mode-isolation-turn-off-self-painting-layer2.html: Added.
* css3/blending/blend-mode-isolation-turn-on-self-painting-layer-expected.txt: Added.
* css3/blending/blend-mode-isolation-turn-on-self-painting-layer.html: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestscss3blendingblendmodeacceleratedparentoverflowhiddenhtml">trunk/LayoutTests/css3/blending/blend-mode-accelerated-parent-overflow-hidden.html</a></li>
<li><a href="#trunkLayoutTestscss3blendingblendmodeclipacceleratedblendingcanvashtml">trunk/LayoutTests/css3/blending/blend-mode-clip-accelerated-blending-canvas.html</a></li>
<li><a href="#trunkLayoutTestscss3blendingblendmodeclipacceleratedblendingchildhtml">trunk/LayoutTests/css3/blending/blend-mode-clip-accelerated-blending-child.html</a></li>
<li><a href="#trunkLayoutTestscss3blendingblendmodeclipacceleratedblendingwithsiblingshtml">trunk/LayoutTests/css3/blending/blend-mode-clip-accelerated-blending-with-siblings.html</a></li>
<li><a href="#trunkLayoutTestscss3blendingblendmodeclipacceleratedtransformedblendinghtml">trunk/LayoutTests/css3/blending/blend-mode-clip-accelerated-transformed-blending.html</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLayercpp">trunk/Source/WebCore/rendering/RenderLayer.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLayerh">trunk/Source/WebCore/rendering/RenderLayer.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLayerModelObjectcpp">trunk/Source/WebCore/rendering/RenderLayerModelObject.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestscss3blendingblendmodeisolationacceleratedoverflowhiddenexpectedtxt">trunk/LayoutTests/css3/blending/blend-mode-isolation-accelerated-overflow-hidden-expected.txt</a></li>
<li><a href="#trunkLayoutTestscss3blendingblendmodeisolationacceleratedoverflowhiddenhtml">trunk/LayoutTests/css3/blending/blend-mode-isolation-accelerated-overflow-hidden.html</a></li>
<li><a href="#trunkLayoutTestscss3blendingblendmodeisolationoverflowhiddenexpectedhtml">trunk/LayoutTests/css3/blending/blend-mode-isolation-overflow-hidden-expected.html</a></li>
<li><a href="#trunkLayoutTestscss3blendingblendmodeisolationoverflowhiddenhtml">trunk/LayoutTests/css3/blending/blend-mode-isolation-overflow-hidden.html</a></li>
<li><a href="#trunkLayoutTestscss3blendingblendmodeisolationturnoffselfpaintinglayerexpectedtxt">trunk/LayoutTests/css3/blending/blend-mode-isolation-turn-off-self-painting-layer-expected.txt</a></li>
<li><a href="#trunkLayoutTestscss3blendingblendmodeisolationturnoffselfpaintinglayerhtml">trunk/LayoutTests/css3/blending/blend-mode-isolation-turn-off-self-painting-layer.html</a></li>
<li><a href="#trunkLayoutTestscss3blendingblendmodeisolationturnoffselfpaintinglayer1expectedtxt">trunk/LayoutTests/css3/blending/blend-mode-isolation-turn-off-self-painting-layer1-expected.txt</a></li>
<li><a href="#trunkLayoutTestscss3blendingblendmodeisolationturnoffselfpaintinglayer1html">trunk/LayoutTests/css3/blending/blend-mode-isolation-turn-off-self-painting-layer1.html</a></li>
<li><a href="#trunkLayoutTestscss3blendingblendmodeisolationturnoffselfpaintinglayer2expectedtxt">trunk/LayoutTests/css3/blending/blend-mode-isolation-turn-off-self-painting-layer2-expected.txt</a></li>
<li><a href="#trunkLayoutTestscss3blendingblendmodeisolationturnoffselfpaintinglayer2html">trunk/LayoutTests/css3/blending/blend-mode-isolation-turn-off-self-painting-layer2.html</a></li>
<li><a href="#trunkLayoutTestscss3blendingblendmodeisolationturnonselfpaintinglayerexpectedtxt">trunk/LayoutTests/css3/blending/blend-mode-isolation-turn-on-self-painting-layer-expected.txt</a></li>
<li><a href="#trunkLayoutTestscss3blendingblendmodeisolationturnonselfpaintinglayerhtml">trunk/LayoutTests/css3/blending/blend-mode-isolation-turn-on-self-painting-layer.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (168461 => 168462)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-05-08 04:10:21 UTC (rev 168461)
+++ trunk/LayoutTests/ChangeLog        2014-05-08 05:42:21 UTC (rev 168462)
</span><span class="lines">@@ -1,3 +1,31 @@
</span><ins>+2014-05-07  Ion Rosca  &lt;rosca@adobe.com&gt;
+
+        [CSS Blending] Blending doesn't work if the parent stacking context is not a self painting layer
+        https://bugs.webkit.org/show_bug.cgi?id=130891
+
+        Reviewed by Dean Jackson.
+
+        Removed position:relative which forced tests to avoid this bug. 
+        * css3/blending/blend-mode-accelerated-parent-overflow-hidden.html:
+        * css3/blending/blend-mode-clip-accelerated-blending-canvas.html:
+        * css3/blending/blend-mode-clip-accelerated-blending-child.html:
+        * css3/blending/blend-mode-clip-accelerated-blending-with-siblings.html:
+        * css3/blending/blend-mode-clip-accelerated-transformed-blending.html:
+
+        New tests:
+        * css3/blending/blend-mode-isolation-accelerated-overflow-hidden-expected.txt: Added.
+        * css3/blending/blend-mode-isolation-accelerated-overflow-hidden.html: Added.
+        * css3/blending/blend-mode-isolation-overflow-hidden-expected.html: Added.
+        * css3/blending/blend-mode-isolation-overflow-hidden.html: Added.
+        * css3/blending/blend-mode-isolation-turn-off-self-painting-layer-expected.txt: Added.
+        * css3/blending/blend-mode-isolation-turn-off-self-painting-layer.html: Added.
+        * css3/blending/blend-mode-isolation-turn-off-self-painting-layer1-expected.txt: Added.
+        * css3/blending/blend-mode-isolation-turn-off-self-painting-layer1.html: Added.
+        * css3/blending/blend-mode-isolation-turn-off-self-painting-layer2-expected.txt: Added.
+        * css3/blending/blend-mode-isolation-turn-off-self-painting-layer2.html: Added.
+        * css3/blending/blend-mode-isolation-turn-on-self-painting-layer-expected.txt: Added.
+        * css3/blending/blend-mode-isolation-turn-on-self-painting-layer.html: Added.
+
</ins><span class="cx"> 2014-05-06  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Dragging text from one paragraph to another does not render as expected
</span></span></pre></div>
<a id="trunkLayoutTestscss3blendingblendmodeacceleratedparentoverflowhiddenhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/css3/blending/blend-mode-accelerated-parent-overflow-hidden.html (168461 => 168462)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/blending/blend-mode-accelerated-parent-overflow-hidden.html        2014-05-08 04:10:21 UTC (rev 168461)
+++ trunk/LayoutTests/css3/blending/blend-mode-accelerated-parent-overflow-hidden.html        2014-05-08 05:42:21 UTC (rev 168462)
</span><span class="lines">@@ -8,7 +8,6 @@
</span><span class="cx">                 background: rgb(0, 255, 0);
</span><span class="cx">                 isolation:isolate;
</span><span class="cx">                 -webkit-isolation:isolate;
</span><del>-                position: relative; /*avoid #130891 issue*/
</del><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         .blender {
</span></span></pre></div>
<a id="trunkLayoutTestscss3blendingblendmodeclipacceleratedblendingcanvashtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/css3/blending/blend-mode-clip-accelerated-blending-canvas.html (168461 => 168462)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/blending/blend-mode-clip-accelerated-blending-canvas.html        2014-05-08 04:10:21 UTC (rev 168461)
+++ trunk/LayoutTests/css3/blending/blend-mode-clip-accelerated-blending-canvas.html        2014-05-08 05:42:21 UTC (rev 168462)
</span><span class="lines">@@ -6,7 +6,6 @@
</span><span class="cx">        overflow:hidden;
</span><span class="cx">        background: rgb(0, 255, 0);
</span><span class="cx">        isolation: isolate;
</span><del>-       position: relative; /*avoid #130891 issue*/
</del><span class="cx">    }
</span><span class="cx">    .blending {
</span><span class="cx">         mix-blend-mode: difference;
</span></span></pre></div>
<a id="trunkLayoutTestscss3blendingblendmodeclipacceleratedblendingchildhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/css3/blending/blend-mode-clip-accelerated-blending-child.html (168461 => 168462)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/blending/blend-mode-clip-accelerated-blending-child.html        2014-05-08 04:10:21 UTC (rev 168461)
+++ trunk/LayoutTests/css3/blending/blend-mode-clip-accelerated-blending-child.html        2014-05-08 05:42:21 UTC (rev 168462)
</span><span class="lines">@@ -6,7 +6,6 @@
</span><span class="cx">        overflow:hidden;
</span><span class="cx">        background: rgb(0, 255, 0);
</span><span class="cx">        isolation: isolate;
</span><del>-       position: relative; /*avoid #130891 issue*/
</del><span class="cx">    }
</span><span class="cx"> 
</span><span class="cx">    .child {
</span></span></pre></div>
<a id="trunkLayoutTestscss3blendingblendmodeclipacceleratedblendingwithsiblingshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/css3/blending/blend-mode-clip-accelerated-blending-with-siblings.html (168461 => 168462)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/blending/blend-mode-clip-accelerated-blending-with-siblings.html        2014-05-08 04:10:21 UTC (rev 168461)
+++ trunk/LayoutTests/css3/blending/blend-mode-clip-accelerated-blending-with-siblings.html        2014-05-08 05:42:21 UTC (rev 168462)
</span><span class="lines">@@ -5,7 +5,6 @@
</span><span class="cx">        height: 100px;
</span><span class="cx">        overflow:hidden;
</span><span class="cx">        isolation: isolate;
</span><del>-       position: relative; /*avoid #130891 issue*/
</del><span class="cx">    }
</span><span class="cx"> 
</span><span class="cx">    .child {
</span></span></pre></div>
<a id="trunkLayoutTestscss3blendingblendmodeclipacceleratedtransformedblendinghtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/css3/blending/blend-mode-clip-accelerated-transformed-blending.html (168461 => 168462)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/blending/blend-mode-clip-accelerated-transformed-blending.html        2014-05-08 04:10:21 UTC (rev 168461)
+++ trunk/LayoutTests/css3/blending/blend-mode-clip-accelerated-transformed-blending.html        2014-05-08 05:42:21 UTC (rev 168462)
</span><span class="lines">@@ -6,7 +6,6 @@
</span><span class="cx">        overflow:hidden;
</span><span class="cx">        background: rgb(0, 255, 0);
</span><span class="cx">        isolation: isolate;
</span><del>-       position: relative; /*avoid #130891 issue*/
</del><span class="cx">    }
</span><span class="cx"> 
</span><span class="cx">    .child {
</span></span></pre></div>
<a id="trunkLayoutTestscss3blendingblendmodeisolationacceleratedoverflowhiddenexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/css3/blending/blend-mode-isolation-accelerated-overflow-hidden-expected.txt (0 => 168462)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/blending/blend-mode-isolation-accelerated-overflow-hidden-expected.txt                                (rev 0)
+++ trunk/LayoutTests/css3/blending/blend-mode-isolation-accelerated-overflow-hidden-expected.txt        2014-05-08 05:42:21 UTC (rev 168462)
</span><span class="lines">@@ -0,0 +1,29 @@
</span><ins>+(GraphicsLayer
+  (anchor 0.00 0.00)
+  (bounds 800.00 600.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 800.00 600.00)
+      (contentsOpaque 1)
+      (children 1
+        (GraphicsLayer
+          (position 8.00 8.00)
+          (bounds 100.00 100.00)
+          (children 1
+            (GraphicsLayer
+              (bounds 100.00 100.00)
+              (blendMode difference)
+              (children 1
+                (GraphicsLayer
+                  (bounds 400.00 20.00)
+                  (contentsOpaque 1)
+                )
+              )
+            )
+          )
+        )
+      )
+    )
+  )
+)
+
</ins></span></pre></div>
<a id="trunkLayoutTestscss3blendingblendmodeisolationacceleratedoverflowhiddenhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/css3/blending/blend-mode-isolation-accelerated-overflow-hidden.html (0 => 168462)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/blending/blend-mode-isolation-accelerated-overflow-hidden.html                                (rev 0)
+++ trunk/LayoutTests/css3/blending/blend-mode-isolation-accelerated-overflow-hidden.html        2014-05-08 05:42:21 UTC (rev 168462)
</span><span class="lines">@@ -0,0 +1,37 @@
</span><ins>+&lt;!DOCTYPE HTML&gt;
+&lt;style&gt;
+    .parent {
+        width: 100px;
+        height: 100px;
+        overflow:hidden;
+        isolation:isolate;
+        -webkit-isolation: isolate;
+    }
+
+    .blender {
+        width: 400px;
+        height: 20px;
+        background: rgb(0, 255, 0);
+        mix-blend-mode: difference;
+        -webkit-mix-blend-mode: difference;
+    }
+
+    .accelerated {
+        -webkit-transform: translateZ(0px);
+    }
+&lt;/style&gt;
+
+&lt;!-- This test checks that an element with overflow hidden, being normal flow only, can get accelerated in order to isolate blending descendants properly. --&gt;
+&lt;!-- Test passes if you see a green rectangle. --&gt;
+&lt;div class=&quot;parent&quot;&gt;
+    &lt;div class=&quot;blender accelerated&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
+
+&lt;pre id=&quot;layerTree&quot;&gt;&lt;/pre&gt;
+&lt;script&gt;
+    if (window.testRunner)
+        window.testRunner.dumpAsText();
+
+    var text = document.getElementById(&quot;layerTree&quot;);
+    text.innerHTML = window.internals.layerTreeAsText(document);
+&lt;/script&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestscss3blendingblendmodeisolationoverflowhiddenexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/css3/blending/blend-mode-isolation-overflow-hidden-expected.html (0 => 168462)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/blending/blend-mode-isolation-overflow-hidden-expected.html                                (rev 0)
+++ trunk/LayoutTests/css3/blending/blend-mode-isolation-overflow-hidden-expected.html        2014-05-08 05:42:21 UTC (rev 168462)
</span><span class="lines">@@ -0,0 +1,20 @@
</span><ins>+&lt;!DOCTYPE HTML&gt;
+&lt;style&gt;
+    .parent {
+        width: 100px;
+        height: 100px;
+        overflow:hidden;
+    }
+
+    .blender {
+        width: 400px;
+        height: 20px;
+        background: rgb(0, 255, 0);
+    }
+&lt;/style&gt;
+
+&lt;p&gt;This test checks that an element with overflow hidden, being normal flow only, isolates blending descendants properly.&lt;br/&gt;
+Test passes if you see a green rectangle.&lt;/p&gt;
+&lt;div class=&quot;parent&quot;&gt;
+    &lt;div class=&quot;blender&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestscss3blendingblendmodeisolationoverflowhiddenhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/css3/blending/blend-mode-isolation-overflow-hidden.html (0 => 168462)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/blending/blend-mode-isolation-overflow-hidden.html                                (rev 0)
+++ trunk/LayoutTests/css3/blending/blend-mode-isolation-overflow-hidden.html        2014-05-08 05:42:21 UTC (rev 168462)
</span><span class="lines">@@ -0,0 +1,24 @@
</span><ins>+&lt;!DOCTYPE HTML&gt;
+&lt;style&gt;
+    .parent {
+        width: 100px;
+        height: 100px;
+        overflow:hidden;
+        isolation:isolate;
+        -webkit-isolation: isolate;
+    }
+
+    .blender {
+        width: 400px;
+        height: 20px;
+        background: rgb(0, 255, 0);
+        mix-blend-mode: difference;
+        -webkit-mix-blend-mode: difference;
+    }
+&lt;/style&gt;
+
+&lt;p&gt;This test checks that an element with overflow hidden, being normal flow only, isolates blending descendants properly.&lt;br/&gt;
+Test passes if you see a green rectangle.&lt;/p&gt;
+&lt;div class=&quot;parent&quot;&gt;
+    &lt;div class=&quot;blender&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestscss3blendingblendmodeisolationturnoffselfpaintinglayerexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/css3/blending/blend-mode-isolation-turn-off-self-painting-layer-expected.txt (0 => 168462)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/blending/blend-mode-isolation-turn-off-self-painting-layer-expected.txt                                (rev 0)
+++ trunk/LayoutTests/css3/blending/blend-mode-isolation-turn-off-self-painting-layer-expected.txt        2014-05-08 05:42:21 UTC (rev 168462)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x158
+  RenderBlock {HTML} at (0,0) size 800x158
+    RenderBody {BODY} at (8,16) size 784x134
+      RenderBlock {P} at (0,0) size 784x18
+        RenderText {#text} at (0,0) size 251x18
+          text run at (0,0) width 251: &quot;Test passes if you see a green rectangle.&quot;
+layer at (8,50) size 100x100 scrollWidth 400
+  RenderBlock {DIV} at (0,34) size 100x100
+    RenderBlock {DIV} at (0,0) size 400x20 [bgcolor=#00FF00]
</ins></span></pre></div>
<a id="trunkLayoutTestscss3blendingblendmodeisolationturnoffselfpaintinglayerhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/css3/blending/blend-mode-isolation-turn-off-self-painting-layer.html (0 => 168462)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/blending/blend-mode-isolation-turn-off-self-painting-layer.html                                (rev 0)
+++ trunk/LayoutTests/css3/blending/blend-mode-isolation-turn-off-self-painting-layer.html        2014-05-08 05:42:21 UTC (rev 168462)
</span><span class="lines">@@ -0,0 +1,40 @@
</span><ins>+&lt;!DOCTYPE HTML&gt;
+&lt;style&gt;
+    .parent {
+        width: 100px;
+        height: 100px;
+        overflow:hidden;
+        isolation:isolate;
+        -webkit-isolation: isolate;
+    }
+
+    .child {
+        width: 400px;
+        height: 20px;
+        background: rgb(0, 255, 0);
+    }
+
+    .blending {
+        mix-blend-mode: difference;
+        -webkit-mix-blend-mode: difference;
+    }
+&lt;/style&gt;
+
+&lt;!-- This test checks that an element with overflow hidden will be able to stop isolating after dinamically removing mix-blend-mode on descendants. --&gt;
+&lt;p&gt;Test passes if you see a green rectangle.&lt;/p&gt;
+&lt;div class=&quot;parent&quot;&gt;
+    &lt;div id=&quot;target&quot; class=&quot;child blending&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
+
+&lt;script type=&quot;text/javascript&quot;&gt;
+    if (window.testRunner)
+        window.testRunner.waitUntilDone();
+
+    window.addEventListener('load', function() {
+       var target = document.getElementById(&quot;target&quot;);
+       target.className = &quot;child&quot;;
+
+        if (window.testRunner)
+            window.testRunner.notifyDone();
+    }, false);
+&lt;/script&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestscss3blendingblendmodeisolationturnoffselfpaintinglayer1expectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/css3/blending/blend-mode-isolation-turn-off-self-painting-layer1-expected.txt (0 => 168462)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/blending/blend-mode-isolation-turn-off-self-painting-layer1-expected.txt                                (rev 0)
+++ trunk/LayoutTests/css3/blending/blend-mode-isolation-turn-off-self-painting-layer1-expected.txt        2014-05-08 05:42:21 UTC (rev 168462)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x158
+  RenderBlock {HTML} at (0,0) size 800x158
+    RenderBody {BODY} at (8,16) size 784x134
+      RenderBlock {P} at (0,0) size 784x18
+        RenderText {#text} at (0,0) size 251x18
+          text run at (0,0) width 251: &quot;Test passes if you see a green rectangle.&quot;
+layer at (8,50) size 100x100 scrollWidth 400
+  RenderBlock {DIV} at (0,34) size 100x100
+    RenderBlock {DIV} at (0,0) size 400x20 [bgcolor=#00FF00]
</ins></span></pre></div>
<a id="trunkLayoutTestscss3blendingblendmodeisolationturnoffselfpaintinglayer1html"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/css3/blending/blend-mode-isolation-turn-off-self-painting-layer1.html (0 => 168462)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/blending/blend-mode-isolation-turn-off-self-painting-layer1.html                                (rev 0)
+++ trunk/LayoutTests/css3/blending/blend-mode-isolation-turn-off-self-painting-layer1.html        2014-05-08 05:42:21 UTC (rev 168462)
</span><span class="lines">@@ -0,0 +1,45 @@
</span><ins>+&lt;!DOCTYPE HTML&gt;
+&lt;style&gt;
+    .parent {
+        width: 100px;
+        height: 100px;
+        overflow:hidden;
+        isolation:isolate;
+        -webkit-isolation: isolate;
+    }
+
+    .child {
+        width: 400px;
+        height: 20px;
+        background: rgb(0, 255, 0);
+    }
+
+    .blending {
+        mix-blend-mode: difference;
+        -webkit-mix-blend-mode: difference;
+    }
+
+    html {
+        /*Force compositing.*/
+        -webkit-transform: translateZ(0px);
+    }
+&lt;/style&gt;
+
+&lt;!-- This test checks that an element with overflow hidden will be able to stop isolating after dinamically removing mix-blend-mode on descendants. --&gt;
+&lt;p&gt;Test passes if you see a green rectangle.&lt;/p&gt;
+&lt;div class=&quot;parent&quot;&gt;
+    &lt;div id=&quot;target&quot; class=&quot;child blending&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
+
+&lt;script type=&quot;text/javascript&quot;&gt;
+    if (window.testRunner)
+        window.testRunner.waitUntilDone();
+
+    window.addEventListener('load', function() {
+       var target = document.getElementById(&quot;target&quot;);
+       target.className = &quot;child&quot;;
+
+        if (window.testRunner)
+            window.testRunner.notifyDone();
+    }, false);
+&lt;/script&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestscss3blendingblendmodeisolationturnoffselfpaintinglayer2expectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/css3/blending/blend-mode-isolation-turn-off-self-painting-layer2-expected.txt (0 => 168462)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/blending/blend-mode-isolation-turn-off-self-painting-layer2-expected.txt                                (rev 0)
+++ trunk/LayoutTests/css3/blending/blend-mode-isolation-turn-off-self-painting-layer2-expected.txt        2014-05-08 05:42:21 UTC (rev 168462)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x158
+  RenderBlock {HTML} at (0,0) size 800x158
+    RenderBody {BODY} at (8,16) size 784x134
+      RenderBlock {P} at (0,0) size 784x18
+        RenderText {#text} at (0,0) size 251x18
+          text run at (0,0) width 251: &quot;Test passes if you see a green rectangle.&quot;
+layer at (8,50) size 100x100 scrollWidth 400
+  RenderBlock {DIV} at (0,34) size 100x100
+layer at (8,50) size 400x20 backgroundClip at (8,50) size 100x100 clip at (8,50) size 100x100 outlineClip at (8,50) size 100x100
+  RenderBlock (relative positioned) {DIV} at (0,0) size 400x20 [bgcolor=#00FF00]
</ins></span></pre></div>
<a id="trunkLayoutTestscss3blendingblendmodeisolationturnoffselfpaintinglayer2html"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/css3/blending/blend-mode-isolation-turn-off-self-painting-layer2.html (0 => 168462)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/blending/blend-mode-isolation-turn-off-self-painting-layer2.html                                (rev 0)
+++ trunk/LayoutTests/css3/blending/blend-mode-isolation-turn-off-self-painting-layer2.html        2014-05-08 05:42:21 UTC (rev 168462)
</span><span class="lines">@@ -0,0 +1,42 @@
</span><ins>+&lt;!DOCTYPE HTML&gt;
+&lt;style&gt;
+    .parent {
+        width: 100px;
+        height: 100px;
+        overflow:hidden;
+        isolation:isolate;
+        -webkit-isolation: isolate;
+    }
+
+    .child {
+        width: 400px;
+        height: 20px;
+        background: rgb(0, 255, 0);
+        /*Keep child RenderLayer after removing blending*/
+        position: relative;
+    }
+
+    .blending {
+        mix-blend-mode: difference;
+        -webkit-mix-blend-mode: difference;
+    }
+&lt;/style&gt;
+
+&lt;!-- This test checks that an element with overflow hidden will be able to stop isolating after dinamically removing mix-blend-mode on descendants. --&gt;
+&lt;p&gt;Test passes if you see a green rectangle.&lt;/p&gt;
+&lt;div class=&quot;parent&quot;&gt;
+    &lt;div id=&quot;target&quot; class=&quot;child blending&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
+
+&lt;script type=&quot;text/javascript&quot;&gt;
+    if (window.testRunner)
+        window.testRunner.waitUntilDone();
+
+    window.addEventListener('load', function() {
+       var target = document.getElementById(&quot;target&quot;);
+       target.className = &quot;child&quot;;
+
+        if (window.testRunner)
+            window.testRunner.notifyDone();
+    }, false);
+&lt;/script&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestscss3blendingblendmodeisolationturnonselfpaintinglayerexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/css3/blending/blend-mode-isolation-turn-on-self-painting-layer-expected.txt (0 => 168462)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/blending/blend-mode-isolation-turn-on-self-painting-layer-expected.txt                                (rev 0)
+++ trunk/LayoutTests/css3/blending/blend-mode-isolation-turn-on-self-painting-layer-expected.txt        2014-05-08 05:42:21 UTC (rev 168462)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x158
+  RenderBlock {HTML} at (0,0) size 800x158
+    RenderBody {BODY} at (8,16) size 784x134
+      RenderBlock {P} at (0,0) size 784x18
+        RenderText {#text} at (0,0) size 251x18
+          text run at (0,0) width 251: &quot;Test passes if you see a green rectangle.&quot;
+layer at (8,50) size 100x100 scrollWidth 400 isolatesBlending
+  RenderBlock {DIV} at (0,34) size 100x100
+layer at (8,50) size 400x20 backgroundClip at (8,50) size 100x100 clip at (8,50) size 100x100 outlineClip at (8,50) size 100x100 blendMode: difference
+  RenderBlock {DIV} at (0,0) size 400x20 [bgcolor=#00FF00]
</ins></span></pre></div>
<a id="trunkLayoutTestscss3blendingblendmodeisolationturnonselfpaintinglayerhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/css3/blending/blend-mode-isolation-turn-on-self-painting-layer.html (0 => 168462)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/blending/blend-mode-isolation-turn-on-self-painting-layer.html                                (rev 0)
+++ trunk/LayoutTests/css3/blending/blend-mode-isolation-turn-on-self-painting-layer.html        2014-05-08 05:42:21 UTC (rev 168462)
</span><span class="lines">@@ -0,0 +1,40 @@
</span><ins>+&lt;!DOCTYPE HTML&gt;
+&lt;style&gt;
+    .parent {
+        width: 100px;
+        height: 100px;
+        overflow:hidden;
+        isolation:isolate;
+        -webkit-isolation: isolate;
+    }
+
+    .child {
+        width: 400px;
+        height: 20px;
+        background: rgb(0, 255, 0);
+    }
+
+    .blending {
+        mix-blend-mode: difference;
+        -webkit-mix-blend-mode: difference;
+    }
+&lt;/style&gt;
+
+&lt;!-- This test checks that an element with overflow hidden, not being a self painting layer, will be able to dynamically isolate blending descendants. --&gt;
+&lt;p&gt;Test passes if you see a green rectangle.&lt;/p&gt;
+&lt;div class=&quot;parent&quot;&gt;
+    &lt;div id=&quot;target&quot; class=&quot;child&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
+
+&lt;script type=&quot;text/javascript&quot;&gt;
+    if (window.testRunner)
+        window.testRunner.waitUntilDone();
+
+    window.addEventListener('load', function() {
+       var target = document.getElementById(&quot;target&quot;);
+       target.className = &quot;blending child&quot;;
+
+        if (window.testRunner)
+            window.testRunner.notifyDone();
+    }, false);
+&lt;/script&gt;
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (168461 => 168462)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-05-08 04:10:21 UTC (rev 168461)
+++ trunk/Source/WebCore/ChangeLog        2014-05-08 05:42:21 UTC (rev 168462)
</span><span class="lines">@@ -1,3 +1,43 @@
</span><ins>+2014-05-07  Ion Rosca  &lt;rosca@adobe.com&gt;
+
+        [CSS Blending] Blending doesn't work if the parent stacking context is not a self painting layer
+        https://bugs.webkit.org/show_bug.cgi?id=130891
+
+        Reviewed by Dean Jackson.
+
+        The stacking context layers having unisolated blending descendants should be able
+        to create transparency layers or to become composited in order to restrict blending 
+        content to accessing the information outside the current stacking context.
+        Some layers are not self painting layers and these layers cannot crate transparency
+        layers and cannot be composited, thus they are not able to isolate blending descendants
+        when it's required.
+        
+        The solution in this patch is to make a layer isSelfPaintingLayer when
+        it needs to isolate blending descendants (hasUnisolatedBlendingDescendants).
+
+        Tests: css3/blending/blend-mode-isolation-accelerated-overflow-hidden.html
+               css3/blending/blend-mode-isolation-overflow-hidden.html
+               css3/blending/blend-mode-isolation-turn-off-self-painting-layer.html
+               css3/blending/blend-mode-isolation-turn-off-self-painting-layer1.html
+               css3/blending/blend-mode-isolation-turn-off-self-painting-layer2.html
+               css3/blending/blend-mode-isolation-turn-on-self-painting-layer.html
+
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::updateAncestorChainHasBlendingDescendants):
+        When hasUnisolatedBlendingDescendants is set we make sure that isSelfPaintingLayer flag is set too.
+        (WebCore::RenderLayer::updateDescendantDependentFlags):
+        The flags might be read or changed while walking the descendants, so we don't want to reset
+        them before traversing the tree.
+        (WebCore::RenderLayer::shouldBeSelfPaintingLayer):
+        Adding isolatesBlending() condition for a layer to be self painting.
+        * rendering/RenderLayer.h:
+        Removing ASSERT from hasUnisolatedBlendingDescendants(). It crashes in minibrowser
+        and in layout tests when painting contents. Similar bugs on other flags: #71044, #71277.
+        * rendering/RenderLayerModelObject.cpp:
+        (WebCore::RenderLayerModelObject::styleDidChange):
+        Telling ancestors that blend mode property has been removed from CSS when the layer for
+        this element is going to be removed; styleChanged will not be called anymore.
+
</ins><span class="cx"> 2014-05-06  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Dragging text from one paragraph to another does not render as expected
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (168461 => 168462)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayer.cpp        2014-05-08 04:10:21 UTC (rev 168461)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp        2014-05-08 05:42:21 UTC (rev 168462)
</span><span class="lines">@@ -831,6 +831,8 @@
</span><span class="cx">         layer-&gt;m_hasUnisolatedBlendingDescendants = true;
</span><span class="cx">         layer-&gt;m_hasUnisolatedBlendingDescendantsStatusDirty = false;
</span><span class="cx"> 
</span><ins>+        layer-&gt;updateSelfPaintingLayer();
+
</ins><span class="cx">         if (layer-&gt;isStackingContext())
</span><span class="cx">             break;
</span><span class="cx">     }
</span><span class="lines">@@ -1041,11 +1043,11 @@
</span><span class="cx"> void RenderLayer::updateDescendantDependentFlags(HashSet&lt;const RenderObject*&gt;* outOfFlowDescendantContainingBlocks)
</span><span class="cx"> {
</span><span class="cx">     if (m_visibleDescendantStatusDirty || m_hasSelfPaintingLayerDescendantDirty || m_hasOutOfFlowPositionedDescendantDirty || hasUnisolatedBlendingDescendantsStatusDirty()) {
</span><del>-        m_hasVisibleDescendant = false;
-        m_hasSelfPaintingLayerDescendant = false;
-        m_hasOutOfFlowPositionedDescendant = false;
</del><ins>+        bool hasVisibleDescendant = false;
+        bool hasSelfPaintingLayerDescendant = false;
+        bool hasOutOfFlowPositionedDescendant = false;
</ins><span class="cx"> #if ENABLE(CSS_COMPOSITING)
</span><del>-        m_hasUnisolatedBlendingDescendants = false;
</del><ins>+        bool hasUnisolatedBlendingDescendants = false;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">         HashSet&lt;const RenderObject*&gt; childOutOfFlowDescendantContainingBlocks;
</span><span class="lines">@@ -1063,21 +1065,16 @@
</span><span class="cx">                     outOfFlowDescendantContainingBlocks-&gt;add(*it);
</span><span class="cx">             }
</span><span class="cx"> 
</span><del>-            bool hasVisibleDescendant = child-&gt;m_hasVisibleContent || child-&gt;m_hasVisibleDescendant;
-            bool hasSelfPaintingLayerDescendant = child-&gt;isSelfPaintingLayer() || child-&gt;hasSelfPaintingLayerDescendant();
-            bool hasOutOfFlowPositionedDescendant = !childOutOfFlowDescendantContainingBlocks.isEmpty();
</del><ins>+            hasVisibleDescendant |= child-&gt;m_hasVisibleContent || child-&gt;m_hasVisibleDescendant;
+            hasSelfPaintingLayerDescendant |= child-&gt;isSelfPaintingLayer() || child-&gt;hasSelfPaintingLayerDescendant();
+            hasOutOfFlowPositionedDescendant |= !childOutOfFlowDescendantContainingBlocks.isEmpty();
</ins><span class="cx"> #if ENABLE(CSS_COMPOSITING)
</span><del>-            bool hasUnisolatedBlendingDescendants = child-&gt;hasBlendMode() || (child-&gt;hasUnisolatedBlendingDescendants() &amp;&amp; !child-&gt;isolatesBlending());
-
-            m_hasUnisolatedBlendingDescendants |= hasUnisolatedBlendingDescendants;
</del><ins>+            hasUnisolatedBlendingDescendants |= child-&gt;hasBlendMode() || (child-&gt;hasUnisolatedBlendingDescendants() &amp;&amp; !child-&gt;isolatesBlending());
</ins><span class="cx"> #endif
</span><del>-            m_hasVisibleDescendant |= hasVisibleDescendant;
-            m_hasSelfPaintingLayerDescendant |= hasSelfPaintingLayerDescendant;
-            m_hasOutOfFlowPositionedDescendant |= hasOutOfFlowPositionedDescendant;
</del><span class="cx"> 
</span><del>-            bool allFlagsSet = m_hasVisibleDescendant &amp;&amp; m_hasSelfPaintingLayerDescendant &amp;&amp; m_hasOutOfFlowPositionedDescendant;
</del><ins>+            bool allFlagsSet = hasVisibleDescendant &amp;&amp; hasSelfPaintingLayerDescendant &amp;&amp; hasOutOfFlowPositionedDescendant;
</ins><span class="cx"> #if ENABLE(CSS_COMPOSITING)
</span><del>-            allFlagsSet &amp;= m_hasUnisolatedBlendingDescendants;
</del><ins>+            allFlagsSet &amp;= hasUnisolatedBlendingDescendants;
</ins><span class="cx"> #endif
</span><span class="cx">             if (allFlagsSet)
</span><span class="cx">                 break;
</span><span class="lines">@@ -1086,15 +1083,22 @@
</span><span class="cx">         if (outOfFlowDescendantContainingBlocks)
</span><span class="cx">             outOfFlowDescendantContainingBlocks-&gt;remove(&amp;renderer());
</span><span class="cx"> 
</span><ins>+        m_hasVisibleDescendant = hasVisibleDescendant;
</ins><span class="cx">         m_visibleDescendantStatusDirty = false;
</span><ins>+        m_hasSelfPaintingLayerDescendant = hasSelfPaintingLayerDescendant;
</ins><span class="cx">         m_hasSelfPaintingLayerDescendantDirty = false;
</span><span class="cx"> 
</span><ins>+        m_hasOutOfFlowPositionedDescendant = hasOutOfFlowPositionedDescendant;
</ins><span class="cx">         if (m_hasOutOfFlowPositionedDescendantDirty)
</span><span class="cx">             updateNeedsCompositedScrolling();
</span><span class="cx"> 
</span><span class="cx">         m_hasOutOfFlowPositionedDescendantDirty = false;
</span><span class="cx"> #if ENABLE(CSS_COMPOSITING)
</span><del>-        m_hasUnisolatedBlendingDescendantsStatusDirty = false;
</del><ins>+        m_hasUnisolatedBlendingDescendants = hasUnisolatedBlendingDescendants;
+        if (m_hasUnisolatedBlendingDescendantsStatusDirty) {
+            m_hasUnisolatedBlendingDescendantsStatusDirty = false;
+            updateSelfPaintingLayer();
+        }
</ins><span class="cx"> #endif
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -6178,6 +6182,7 @@
</span><span class="cx">     return !isNormalFlowOnly()
</span><span class="cx">         || hasOverlayScrollbars()
</span><span class="cx">         || needsCompositedScrolling()
</span><ins>+        || isolatesBlending()
</ins><span class="cx">         || renderer().hasReflection()
</span><span class="cx">         || renderer().hasMask()
</span><span class="cx">         || renderer().isTableRow()
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayer.h (168461 => 168462)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayer.h        2014-05-08 04:10:21 UTC (rev 168461)
+++ trunk/Source/WebCore/rendering/RenderLayer.h        2014-05-08 05:42:21 UTC (rev 168462)
</span><span class="lines">@@ -806,11 +806,9 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     bool isolatesBlending() const { return hasUnisolatedBlendingDescendants() &amp;&amp; isStackingContext(); }
</span><del>-    bool hasUnisolatedBlendingDescendants() const
-    {
-        ASSERT(!m_hasUnisolatedBlendingDescendantsStatusDirty);
-        return m_hasUnisolatedBlendingDescendants;
-    }
</del><ins>+    
+    // FIXME: We should ASSERT(!m_hasUnisolatedBlendingDescendantsStatusDirty); here but we hit the same bugs as visible content above.
+    bool hasUnisolatedBlendingDescendants() const { return m_hasUnisolatedBlendingDescendants; }
</ins><span class="cx">     bool hasUnisolatedBlendingDescendantsStatusDirty() const { return m_hasUnisolatedBlendingDescendantsStatusDirty; }
</span><span class="cx"> #else
</span><span class="cx">     bool hasBlendMode() const { return false; }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayerModelObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayerModelObject.cpp (168461 => 168462)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayerModelObject.cpp        2014-05-08 04:10:21 UTC (rev 168461)
+++ trunk/Source/WebCore/rendering/RenderLayerModelObject.cpp        2014-05-08 05:42:21 UTC (rev 168462)
</span><span class="lines">@@ -151,6 +151,10 @@
</span><span class="cx">             }
</span><span class="cx">         }
</span><span class="cx">     } else if (layer() &amp;&amp; layer()-&gt;parent()) {
</span><ins>+#if ENABLE(CSS_COMPOSITING)
+        if (oldStyle-&gt;hasBlendMode())
+            layer()-&gt;parent()-&gt;dirtyAncestorChainHasBlendingDescendants();
+#endif
</ins><span class="cx">         setHasTransform(false); // Either a transform wasn't specified or the object doesn't support transforms, so just null out the bit.
</span><span class="cx">         setHasReflection(false);
</span><span class="cx">         layer()-&gt;removeOnlyThisLayer(); // calls destroyLayer() which clears m_layer
</span></span></pre>
</div>
</div>

</body>
</html>