No subject


Fri Mar 7 15:32:22 PST 2014


7620">r157620</a> by &lt;jchaffraix at chromium.org&gt; and <a href=3D"http:=
//trac.webkit.org/projects/webkit/changeset/172402">r172402</a> by
&lt;wangxianzhu at chromium.org&gt;.

Source/WebCore:
The specification says that grid should match flexbox and force
grid items to be stacking context if z-index is set, regardless
of 'position'. After this change, this is what happens.

Previously z-index changes of static positioned objects were ignored.
However, z-index is applicable for some static positioned objects,
such as grid items. Ignoring them makes the object not to be properly
painted on z-index change.

As StyleResolver has ensured that z-index is non-auto only if
applicable, RenderStyle::changeRequiresLayerRepaint() should not check
again (with inconsistent conditions).

Tests: fast/css-grid-layout/grid-item-z-index-change-repaint.html
       fast/css-grid-layout/grid-item-z-index-stacking-context.html
       fast/css-grid-layout/grid-item-z-index-support.html

* css/StyleResolver.cpp:
(WebCore::isDisplayFlexibleOrGridBox): Add new method to check if parent
display is flexbox or grid.
(WebCore::StyleResolver::adjustRenderStyle): Use new method in z-index
condition.
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresLayerRepaint): Move z-index checks
out of non-static positioned objects if.

LayoutTests:
* css3/blending/repaint/blend-mode-turn-off-isolation-expected.txt: Test =
rebaseline.
* fast/css-grid-layout/grid-item-z-index-change-repaint-expected.html: Ad=
ded.
* fast/css-grid-layout/grid-item-z-index-change-repaint.html: Added.
* fast/css-grid-layout/grid-item-z-index-stacking-context-expected.html: =
Added.
* fast/css-grid-layout/grid-item-z-index-stacking-context.html: Added.
* fast/css-grid-layout/grid-item-z-index-support-expected.txt: Added.
* fast/css-grid-layout/grid-item-z-index-support.html: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href=3D"#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a=
></li>
<li><a href=3D"#trunkLayoutTestscss3blendingrepaintblendmodeturnoffisolat=
ionexpectedtxt">trunk/LayoutTests/css3/blending/repaint/blend-mode-turn-o=
ff-isolation-expected.txt</a></li>
<li><a href=3D"#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeL=
og</a></li>
<li><a href=3D"#trunkSourceWebCorecssStyleResolvercpp">trunk/Source/WebCo=
re/css/StyleResolver.cpp</a></li>
<li><a href=3D"#trunkSourceWebCorerenderingstyleRenderStylecpp">trunk/Sou=
rce/WebCore/rendering/style/RenderStyle.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href=3D"#trunkLayoutTestsfastcssgridlayoutgriditemzindexchangerepa=
intexpectedhtml">trunk/LayoutTests/fast/css-grid-layout/grid-item-z-index=
-change-repaint-expected.html</a></li>
<li><a href=3D"#trunkLayoutTestsfastcssgridlayoutgriditemzindexchangerepa=
inthtml">trunk/LayoutTests/fast/css-grid-layout/grid-item-z-index-change-=
repaint.html</a></li>
<li><a href=3D"#trunkLayoutTestsfastcssgridlayoutgriditemzindexstackingco=
ntextexpectedhtml">trunk/LayoutTests/fast/css-grid-layout/grid-item-z-ind=
ex-stacking-context-expected.html</a></li>
<li><a href=3D"#trunkLayoutTestsfastcssgridlayoutgriditemzindexstackingco=
ntexthtml">trunk/LayoutTests/fast/css-grid-layout/grid-item-z-index-stack=
ing-context.html</a></li>
<li><a href=3D"#trunkLayoutTestsfastcssgridlayoutgriditemzindexsupportexp=
ectedtxt">trunk/LayoutTests/fast/css-grid-layout/grid-item-z-index-suppor=
t-expected.txt</a></li>
<li><a href=3D"#trunkLayoutTestsfastcssgridlayoutgriditemzindexsupporthtm=
l">trunk/LayoutTests/fast/css-grid-layout/grid-item-z-index-support.html<=
/a></li>
</ul>

</div>
<div id=3D"patch">
<h3>Diff</h3>
<a id=3D"trunkLayoutTestsChangeLog"></a>
<div class=3D"modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (170473 =
=3D> 170474)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/LayoutTests/ChangeLog	2014-06-26 07:25:58 =
UTC (rev 170473)
+++ trunk/LayoutTests/ChangeLog	2014-06-26 07:30:01 UTC (rev 170474)
</span><span class=3D"lines">@@ -1,3 +1,21 @@
</span><ins>+2014-06-26  Manuel Rego Casasnovas  &lt;rego at igalia.com&gt;
+
+        [CSS Grid Layout] Properly support for z-index on grid items
+        https://bugs.webkit.org/show_bug.cgi?id=3D103329
+
+        Reviewed by Benjamin Poulain.
+
+        From Blink r157620 by &lt;jchaffraix at chromium.org&gt; and r17240=
2 by
+        &lt;wangxianzhu at chromium.org&gt;.
+
+        * css3/blending/repaint/blend-mode-turn-off-isolation-expected.t=
xt: Test rebaseline.
+        * fast/css-grid-layout/grid-item-z-index-change-repaint-expected=
.html: Added.
+        * fast/css-grid-layout/grid-item-z-index-change-repaint.html: Ad=
ded.
+        * fast/css-grid-layout/grid-item-z-index-stacking-context-expect=
ed.html: Added.
+        * fast/css-grid-layout/grid-item-z-index-stacking-context.html: =
Added.
+        * fast/css-grid-layout/grid-item-z-index-support-expected.txt: A=
dded.
+        * fast/css-grid-layout/grid-item-z-index-support.html: Added.
+
</ins><span class=3D"cx"> 2014-06-25  Myles C. Maxfield  &lt;mmaxfield at ap=
ple.com&gt;
</span><span class=3D"cx">=20
</span><span class=3D"cx">         compositing/visible-rect/iframe-no-lay=
ers.html is broken and confusing
</span></span></pre></div>
<a id=3D"trunkLayoutTestscss3blendingrepaintblendmodeturnoffisolationexpe=
ctedtxt"></a>
<div class=3D"modfile"><h4>Modified: trunk/LayoutTests/css3/blending/repa=
int/blend-mode-turn-off-isolation-expected.txt (170473 =3D> 170474)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/LayoutTests/css3/blending/repaint/blend-mo=
de-turn-off-isolation-expected.txt	2014-06-26 07:25:58 UTC (rev 170473)
+++ trunk/LayoutTests/css3/blending/repaint/blend-mode-turn-off-isolation=
-expected.txt	2014-06-26 07:30:01 UTC (rev 170474)
</span><span class=3D"lines">@@ -1,6 +1,9 @@
</span><span class=3D"cx"> This test checks that removing isolation from =
an element not being stacking context for other reasons will repaint the =
blending div.
</span><span class=3D"cx">=20
</span><span class=3D"cx"> (repaint rects
</span><ins>+  (rect 8 68 100 100)
</ins><span class=3D"cx">   (rect 58 68 100 100)
</span><ins>+  (rect 58 68 100 100)
+  (rect 8 68 100 100)
</ins><span class=3D"cx"> )
</span><span class=3D"cx">=20
</span></span></pre></div>
<a id=3D"trunkLayoutTestsfastcssgridlayoutgriditemzindexchangerepaintexpe=
ctedhtml"></a>
<div class=3D"addfile"><h4>Added: trunk/LayoutTests/fast/css-grid-layout/=
grid-item-z-index-change-repaint-expected.html (0 =3D> 170474)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/LayoutTests/fast/css-grid-layout/grid-item=
-z-index-change-repaint-expected.html	                        (rev 0)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-item-z-index-change-repai=
nt-expected.html	2014-06-26 07:30:01 UTC (rev 170474)
</span><span class=3D"lines">@@ -0,0 +1,35 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;link href=3D&quot;resources/grid.css&quot; rel=3D&quot;stylesheet&qu=
ot;&gt;
+&lt;style&gt;
+.grid {
+    -webkit-grid-template-rows: 100px;
+    -webkit-grid-template-columns: 200px;
+    margin-top: 10px;
+}
+.green {
+    background-color: green;
+}
+&lt;/style&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;div&gt;
+    &lt;p&gt;This test checks that grid items correctly repaint when 'z-=
index' changes.&lt;/p&gt;
+    &lt;p&gt;For this test to pass, there should be no red below.&lt;/p&=
gt;
+&lt;/div&gt;
+
+&lt;div class=3D&quot;grid&quot;&gt;
+    &lt;div class=3D&quot;sizedToGridArea green&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=3D&quot;grid&quot;&gt;
+    &lt;div class=3D&quot;sizedToGridArea green&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=3D&quot;grid&quot;&gt;
+    &lt;div class=3D&quot;sizedToGridArea green&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
+
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id=3D"trunkLayoutTestsfastcssgridlayoutgriditemzindexchangerepainthtml=
"></a>
<div class=3D"addfile"><h4>Added: trunk/LayoutTests/fast/css-grid-layout/=
grid-item-z-index-change-repaint.html (0 =3D> 170474)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/LayoutTests/fast/css-grid-layout/grid-item=
-z-index-change-repaint.html	                        (rev 0)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-item-z-index-change-repai=
nt.html	2014-06-26 07:30:01 UTC (rev 170474)
</span><span class=3D"lines">@@ -0,0 +1,59 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;link href=3D&quot;resources/grid.css&quot; rel=3D&quot;stylesheet&qu=
ot;&gt;
+&lt;style&gt;
+.grid {
+    -webkit-grid-template-rows: 100px;
+    -webkit-grid-template-columns: 200px;
+    margin-top: 10px;
+}
+.red {
+    background-color: red;
+}
+.green {
+    background-color: green;
+}
+.negativeZIndex {
+    z-index: -1;
+}
+#item3 {
+    width: 200px;
+    height: 100px;
+}
+&lt;/style&gt;
+&lt;script&gt;
+function modifyZIndexAndDisplay()
+{
+    document.getElementById('item1').style.zIndex =3D 1;
+    document.getElementById('item2').style.zIndex =3D 1;
+
+    document.getElementById('grid3').className =3D &quot;grid&quot;;
+}
+
+window.onload =3D modifyZIndexAndDisplay;
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;div&gt;
+    &lt;p&gt;This test checks that grid items correctly repaint when 'z-=
index' changes.&lt;/p&gt;
+    &lt;p&gt;For this test to pass, there should be no red below.&lt;/p&=
gt;
+&lt;/div&gt;
+
+&lt;div class=3D&quot;grid&quot;&gt;
+    &lt;div id=3D&quot;item1&quot; class=3D&quot;sizedToGridArea green n=
egativeZIndex&quot;&gt;&lt;/div&gt;
+    &lt;div class=3D&quot;sizedToGridArea red&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=3D&quot;grid&quot;&gt;
+    &lt;div id=3D&quot;item2&quot; class=3D&quot;sizedToGridArea green&q=
uot;&gt;&lt;/div&gt;
+    &lt;div class=3D&quot;sizedToGridArea red&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div id=3D&quot;grid3&quot;&gt;
+    &lt;div class=3D&quot;sizedToGridArea green&quot;&gt;&lt;/div&gt;
+    &lt;div id=3D&quot;item3&quot; class=3D&quot;red negativeZIndex&quot=
;&gt;&lt;/div&gt;
+&lt;/div&gt;
+
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id=3D"trunkLayoutTestsfastcssgridlayoutgriditemzindexstackingcontextex=
pectedhtml"></a>
<div class=3D"addfile"><h4>Added: trunk/LayoutTests/fast/css-grid-layout/=
grid-item-z-index-stacking-context-expected.html (0 =3D> 170474)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/LayoutTests/fast/css-grid-layout/grid-item=
-z-index-stacking-context-expected.html	                        (rev 0)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-item-z-index-stacking-con=
text-expected.html	2014-06-26 07:30:01 UTC (rev 170474)
</span><span class=3D"lines">@@ -0,0 +1,33 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;link href=3D&quot;resources/grid.css&quot; rel=3D&quot;stylesheet&qu=
ot;&gt;
+&lt;style&gt;
+.grid {
+    -webkit-grid-template-rows: 100px;
+    -webkit-grid-template-columns: 200px 200px;
+    margin-top: 10px;
+}
+.green {
+    background-color: green;
+}
+&lt;/style&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;p&gt;This test checks that grid items with 'z-index' do produce a st=
acking context and that we honor the property.&lt;/p&gt;
+&lt;p&gt;For this test to pass, there should be no red below.&lt;/p&gt;
+
+&lt;div class=3D&quot;grid&quot;&gt;
+    &lt;div class=3D&quot;sizedToGridArea green&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=3D&quot;grid&quot;&gt;
+    &lt;div class=3D&quot;sizedToGridArea green&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=3D&quot;grid&quot;&gt;
+    &lt;div class=3D&quot;sizedToGridArea green firstRowBothColumn&quot;=
&gt;&lt;/div&gt;
+&lt;/div&gt;
+
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id=3D"trunkLayoutTestsfastcssgridlayoutgriditemzindexstackingcontextht=
ml"></a>
<div class=3D"addfile"><h4>Added: trunk/LayoutTests/fast/css-grid-layout/=
grid-item-z-index-stacking-context.html (0 =3D> 170474)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/LayoutTests/fast/css-grid-layout/grid-item=
-z-index-stacking-context.html	                        (rev 0)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-item-z-index-stacking-con=
text.html	2014-06-26 07:30:01 UTC (rev 170474)
</span><span class=3D"lines">@@ -0,0 +1,46 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;link href=3D&quot;resources/grid.css&quot; rel=3D&quot;stylesheet&qu=
ot;&gt;
+&lt;style&gt;
+.grid {
+    -webkit-grid-template-rows: 100px;
+    -webkit-grid-template-columns: 200px 200px;
+    margin-top: 10px;
+}
+.red {
+    background-color: red;
+}
+.green {
+    background-color: green;
+}
+.positiveZIndex {
+    z-index: 10;
+}
+.negativeZIndex {
+    z-index: -5;
+}
+&lt;/style&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;p&gt;This test checks that grid items with 'z-index' do produce a st=
acking context and that we honor the property.&lt;/p&gt;
+&lt;p&gt;For this test to pass, there should be no red below.&lt;/p&gt;
+
+&lt;div class=3D&quot;grid&quot;&gt;
+    &lt;div class=3D&quot;sizedToGridArea green positiveZIndex&quot;&gt;=
&lt;/div&gt;
+    &lt;div class=3D&quot;sizedToGridArea red&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=3D&quot;grid&quot;&gt;
+    &lt;div class=3D&quot;sizedToGridArea green&quot;&gt;&lt;/div&gt;
+    &lt;div class=3D&quot;sizedToGridArea red negativeZIndex&quot;&gt;&l=
t;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=3D&quot;grid&quot;&gt;
+    &lt;div class=3D&quot;sizedToGridArea green firstRowBothColumn&quot;=
&gt;&lt;/div&gt;
+    &lt;div class=3D&quot;sizedToGridArea red negativeZIndex firstRowFir=
stColumn&quot;&gt;&lt;/div&gt;
+    &lt;div class=3D&quot;sizedToGridArea red negativeZIndex firstRowSec=
ondColumn&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
+
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id=3D"trunkLayoutTestsfastcssgridlayoutgriditemzindexsupportexpectedtx=
t"></a>
<div class=3D"addfile"><h4>Added: trunk/LayoutTests/fast/css-grid-layout/=
grid-item-z-index-support-expected.txt (0 =3D> 170474)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/LayoutTests/fast/css-grid-layout/grid-item=
-z-index-support-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-item-z-index-support-expe=
cted.txt	2014-06-26 07:30:01 UTC (rev 170474)
</span><span class=3D"lines">@@ -0,0 +1,15 @@
</span><ins>+Test that an element supports z-index once it is a grid item=
 and it is repainted properly.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed=
 by &quot;TEST COMPLETE&quot;.
+
+
+Test z-index property for a regular element
+PASS getComputedStyle(item, '').getPropertyValue('z-index') is 'auto'
+PASS getComputedStyle(item, '').getPropertyValue('z-index') is 'auto'
+Test z-index property once the element becomes a grid item
+PASS getComputedStyle(item, '').getPropertyValue('z-index') is '-10'
+PASS getComputedStyle(item, '').getPropertyValue('z-index') is '10'
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id=3D"trunkLayoutTestsfastcssgridlayoutgriditemzindexsupporthtml"></a>
<div class=3D"addfile"><h4>Added: trunk/LayoutTests/fast/css-grid-layout/=
grid-item-z-index-support.html (0 =3D> 170474)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/LayoutTests/fast/css-grid-layout/grid-item=
-z-index-support.html	                        (rev 0)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-item-z-index-support.html=
	2014-06-26 07:30:01 UTC (rev 170474)
</span><span class=3D"lines">@@ -0,0 +1,29 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=3D&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/scri=
pt&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;div id=3D&quot;grid&quot;&gt;
+    &lt;div id=3D&quot;item&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;script&gt;
+description('Test that an element supports z-index once it is a grid ite=
m and it is repainted properly.');
+
+debug('Test z-index property for a regular element');
+var item =3D document.getElementById(&quot;item&quot;);
+shouldBe(&quot;getComputedStyle(item, '').getPropertyValue('z-index')&qu=
ot;, &quot;'auto'&quot;);
+item.style.zIndex =3D &quot;-10&quot;;
+shouldBe(&quot;getComputedStyle(item, '').getPropertyValue('z-index')&qu=
ot;, &quot;'auto'&quot;);
+
+debug('Test z-index property once the element becomes a grid item');
+var grid =3D document.getElementById(&quot;grid&quot;);
+grid.style.display =3D &quot;-webkit-grid&quot;;
+shouldBe(&quot;getComputedStyle(item, '').getPropertyValue('z-index')&qu=
ot;, &quot;'-10'&quot;);
+item.style.zIndex =3D &quot;10&quot;;
+shouldBe(&quot;getComputedStyle(item, '').getPropertyValue('z-index')&qu=
ot;, &quot;'10'&quot;);
+
+&lt;/script&gt;
+&lt;script src=3D&quot;../../resources/js-test-post.js&quot;&gt;&lt;/scr=
ipt&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id=3D"trunkSourceWebCoreChangeLog"></a>
<div class=3D"modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (1704=
73 =3D> 170474)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/Source/WebCore/ChangeLog	2014-06-26 07:25:=
58 UTC (rev 170473)
+++ trunk/Source/WebCore/ChangeLog	2014-06-26 07:30:01 UTC (rev 170474)
</span><span class=3D"lines">@@ -1,3 +1,39 @@
</span><ins>+2014-06-26  Manuel Rego Casasnovas  &lt;rego at igalia.com&gt;
+
+        [CSS Grid Layout] Properly support for z-index on grid items
+        https://bugs.webkit.org/show_bug.cgi?id=3D103329
+
+        Reviewed by Benjamin Poulain.
+
+        From Blink r157620 by &lt;jchaffraix at chromium.org&gt; and r17240=
2 by
+        &lt;wangxianzhu at chromium.org&gt;.
+
+        The specification says that grid should match flexbox and force
+        grid items to be stacking context if z-index is set, regardless
+        of 'position'. After this change, this is what happens.
+
+        Previously z-index changes of static positioned objects were ign=
ored.
+        However, z-index is applicable for some static positioned object=
s,
+        such as grid items. Ignoring them makes the object not to be pro=
perly
+        painted on z-index change.
+
+        As StyleResolver has ensured that z-index is non-auto only if
+        applicable, RenderStyle::changeRequiresLayerRepaint() should not=
 check
+        again (with inconsistent conditions).
+
+        Tests: fast/css-grid-layout/grid-item-z-index-change-repaint.htm=
l
+               fast/css-grid-layout/grid-item-z-index-stacking-context.h=
tml
+               fast/css-grid-layout/grid-item-z-index-support.html
+
+        * css/StyleResolver.cpp:
+        (WebCore::isDisplayFlexibleOrGridBox): Add new method to check i=
f parent
+        display is flexbox or grid.
+        (WebCore::StyleResolver::adjustRenderStyle): Use new method in z=
-index
+        condition.
+        * rendering/style/RenderStyle.cpp:
+        (WebCore::RenderStyle::changeRequiresLayerRepaint): Move z-index=
 checks
+        out of non-static positioned objects if.
+
</ins><span class=3D"cx"> 2014-06-25  Dean Jackson  &lt;dino at apple.com&gt=
;
</span><span class=3D"cx">=20
</span><span class=3D"cx">         HIDGamepad should use CFIndex when loo=
ping
</span></span></pre></div>
<a id=3D"trunkSourceWebCorecssStyleResolvercpp"></a>
<div class=3D"modfile"><h4>Modified: trunk/Source/WebCore/css/StyleResolv=
er.cpp (170473 =3D> 170474)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/Source/WebCore/css/StyleResolver.cpp	2014-=
06-26 07:25:58 UTC (rev 170473)
+++ trunk/Source/WebCore/css/StyleResolver.cpp	2014-06-26 07:30:01 UTC (r=
ev 170474)
</span><span class=3D"lines">@@ -1136,6 +1136,11 @@
</span><span class=3D"cx"> #endif
</span><span class=3D"cx"> }
</span><span class=3D"cx">=20
</span><ins>+static bool isDisplayFlexibleOrGridBox(EDisplay display)
+{
+    return isDisplayFlexibleBox(display) || isDisplayGridBox(display);
+}
+
</ins><span class=3D"cx"> #if ENABLE(ACCELERATED_OVERFLOW_SCROLLING)
</span><span class=3D"cx"> static bool isScrollableOverflow(EOverflow ove=
rflow)
</span><span class=3D"cx"> {
</span><span class=3D"lines">@@ -1228,14 +1233,14 @@
</span><span class=3D"cx">         if (style.writingMode() !=3D TopToBott=
omWritingMode &amp;&amp; (style.display() =3D=3D BOX || style.display() =3D=
=3D INLINE_BOX))
</span><span class=3D"cx">             style.setWritingMode(TopToBottomWr=
itingMode);
</span><span class=3D"cx">=20
</span><del>-        if (isDisplayFlexibleBox(parentStyle.display()) || i=
sDisplayGridBox(parentStyle.display())) {
</del><ins>+        if (isDisplayFlexibleOrGridBox(parentStyle.display())=
) {
</ins><span class=3D"cx">             style.setFloating(NoFloat);
</span><span class=3D"cx">             style.setDisplay(equivalentBlockDi=
splay(style.display(), style.isFloating(), !document().inQuirksMode()));
</span><span class=3D"cx">         }
</span><span class=3D"cx">     }
</span><span class=3D"cx">=20
</span><span class=3D"cx">     // Make sure our z-index value is only app=
lied if the object is positioned.
</span><del>-    if (style.position() =3D=3D StaticPosition &amp;&amp; !i=
sDisplayFlexibleBox(parentStyle.display()))
</del><ins>+    if (style.position() =3D=3D StaticPosition &amp;&amp; !is=
DisplayFlexibleOrGridBox(parentStyle.display()))
</ins><span class=3D"cx">         style.setHasAutoZIndex();
</span><span class=3D"cx">=20
</span><span class=3D"cx">     // Auto z-index becomes 0 for the root ele=
ment and transparent objects. This prevents
</span></span></pre></div>
<a id=3D"trunkSourceWebCorerenderingstyleRenderStylecpp"></a>
<div class=3D"modfile"><h4>Modified: trunk/Source/WebCore/rendering/style=
/RenderStyle.cpp (170473 =3D> 170474)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/Source/WebCore/rendering/style/RenderStyle=
.cpp	2014-06-26 07:25:58 UTC (rev 170473)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.cpp	2014-06-26 07:30=
:01 UTC (rev 170474)
</span><span class=3D"lines">@@ -673,10 +673,12 @@
</span><span class=3D"cx">=20
</span><span class=3D"cx"> bool RenderStyle::changeRequiresLayerRepaint(c=
onst RenderStyle* other, unsigned&amp; changedContextSensitiveProperties)=
 const
</span><span class=3D"cx"> {
</span><ins>+    // StyleResolver has ensured that zIndex is non-auto onl=
y if it's applicable.
+    if (m_box-&gt;zIndex() !=3D other-&gt;m_box-&gt;zIndex() || m_box-&g=
t;hasAutoZIndex() !=3D other-&gt;m_box-&gt;hasAutoZIndex())
+        return true;
+
</ins><span class=3D"cx">     if (position() !=3D StaticPosition) {
</span><del>-        if (m_box-&gt;zIndex() !=3D other-&gt;m_box-&gt;zInd=
ex()
-            || m_box-&gt;hasAutoZIndex() !=3D other-&gt;m_box-&gt;hasAut=
oZIndex()
-            || visual-&gt;clip !=3D other-&gt;visual-&gt;clip
</del><ins>+        if (visual-&gt;clip !=3D other-&gt;visual-&gt;clip
</ins><span class=3D"cx">             || visual-&gt;hasClip !=3D other-&g=
t;visual-&gt;hasClip)
</span><span class=3D"cx">             return true;
</span><span class=3D"cx">     }
</span></span></pre>
</div>
</div>

</body>
</html>


More information about the webkit-changes mailing list