<!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>[165587] 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/165587">165587</a></dd>
<dt>Author</dt> <dd>dbates@webkit.org</dd>
<dt>Date</dt> <dd>2014-03-13 18:41:31 -0700 (Thu, 13 Mar 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>REGRESSION (<a href="http://trac.webkit.org/projects/webkit/changeset/160806">r160806</a>): Incorrect cascade order of prefixed and non-prefixed variants of
CSS properties box-shadow and background-{clip, origin, size}
https://bugs.webkit.org/show_bug.cgi?id=130102
<rdar://problem/16187037>
Reviewed by Andreas Kling.
Source/WebCore:
Fixes an issues in the computation of the final value for the CSS properties
box-shadow and background-{clip, origin, size} when the definition of a selector
uses both the prefixed and non-prefixed variants (in order) of these properties.
Tests: fast/css/cascade/background-clip-and-webkit-background-clip-cascade-order.html
fast/css/cascade/background-origin-and-webkit-background-origin-cascade-order.html
fast/css/cascade/background-size-and-webkit-background-size-cascade-order.html
fast/css/cascade/box-shadow-and-webkit-box-shadow-cascade-order.html
* css/CSSPropertyNames.in: Add a comment to explain the difference between property
-webkit-box-shadow and property box-shadow.
* css/StyleResolver.cpp:
(WebCore::shouldApplyPropertyInParseOrder): Add prefixed and non-prefixed variants
of box-shadow and background-{clip, origin, size} to the list of properties that need
to be applied in the same order as they were parsed from the stylesheet.
LayoutTests:
Add tests to ensure that we correctly cascade the prefixed and non-prefixed variants
of the CSS properties box-shadow and background-{clip, origin, size}.
* fast/css/cascade/background-clip-and-webkit-background-clip-cascade-order-expected.html: Added.
* fast/css/cascade/background-clip-and-webkit-background-clip-cascade-order.html: Added.
* fast/css/cascade/background-origin-and-webkit-background-origin-cascade-order-expected.html: Added.
* fast/css/cascade/background-origin-and-webkit-background-origin-cascade-order.html: Added.
* fast/css/cascade/background-size-and-webkit-background-size-cascade-order-expected.html: Added.
* fast/css/cascade/background-size-and-webkit-background-size-cascade-order.html: Added.
* fast/css/cascade/box-shadow-and-webkit-box-shadow-cascade-order-expected.html: Added.
* fast/css/cascade/box-shadow-and-webkit-box-shadow-cascade-order.html: Added.
* fast/css/resources/green-128x128.png: Added.
* fast/css/resources/green-square-above-red-square.png: Added.
* fast/css/resources/red-square-above-green-square.png: Added.
* fast/css/resources/red-square-in-green-square.png: Added.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecssCSSPropertyNamesin">trunk/Source/WebCore/css/CSSPropertyNames.in</a></li>
<li><a href="#trunkSourceWebCorecssStyleResolvercpp">trunk/Source/WebCore/css/StyleResolver.cpp</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li>trunk/LayoutTests/fast/css/cascade/</li>
<li><a href="#trunkLayoutTestsfastcsscascadebackgroundclipandwebkitbackgroundclipcascadeorderexpectedhtml">trunk/LayoutTests/fast/css/cascade/background-clip-and-webkit-background-clip-cascade-order-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastcsscascadebackgroundclipandwebkitbackgroundclipcascadeorderhtml">trunk/LayoutTests/fast/css/cascade/background-clip-and-webkit-background-clip-cascade-order.html</a></li>
<li><a href="#trunkLayoutTestsfastcsscascadebackgroundoriginandwebkitbackgroundorigincascadeorderexpectedhtml">trunk/LayoutTests/fast/css/cascade/background-origin-and-webkit-background-origin-cascade-order-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastcsscascadebackgroundoriginandwebkitbackgroundorigincascadeorderhtml">trunk/LayoutTests/fast/css/cascade/background-origin-and-webkit-background-origin-cascade-order.html</a></li>
<li><a href="#trunkLayoutTestsfastcsscascadebackgroundsizeandwebkitbackgroundsizecascadeorderexpectedhtml">trunk/LayoutTests/fast/css/cascade/background-size-and-webkit-background-size-cascade-order-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastcsscascadebackgroundsizeandwebkitbackgroundsizecascadeorderhtml">trunk/LayoutTests/fast/css/cascade/background-size-and-webkit-background-size-cascade-order.html</a></li>
<li><a href="#trunkLayoutTestsfastcsscascadeboxshadowandwebkitboxshadowcascadeorderexpectedhtml">trunk/LayoutTests/fast/css/cascade/box-shadow-and-webkit-box-shadow-cascade-order-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastcsscascadeboxshadowandwebkitboxshadowcascadeorderhtml">trunk/LayoutTests/fast/css/cascade/box-shadow-and-webkit-box-shadow-cascade-order.html</a></li>
<li><a href="#trunkLayoutTestsfastcssresourcesgreen128x128png">trunk/LayoutTests/fast/css/resources/green-128x128.png</a></li>
<li><a href="#trunkLayoutTestsfastcssresourcesgreensquareaboveredsquarepng">trunk/LayoutTests/fast/css/resources/green-square-above-red-square.png</a></li>
<li><a href="#trunkLayoutTestsfastcssresourcesredsquareabovegreensquarepng">trunk/LayoutTests/fast/css/resources/red-square-above-green-square.png</a></li>
<li><a href="#trunkLayoutTestsfastcssresourcesredsquareingreensquarepng">trunk/LayoutTests/fast/css/resources/red-square-in-green-square.png</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (165586 => 165587)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-03-14 01:36:00 UTC (rev 165586)
+++ trunk/LayoutTests/ChangeLog        2014-03-14 01:41:31 UTC (rev 165587)
</span><span class="lines">@@ -1,3 +1,28 @@
</span><ins>+2014-03-13 Daniel Bates <dabates@apple.com>
+
+ REGRESSION (r160806): Incorrect cascade order of prefixed and non-prefixed variants of
+ CSS properties box-shadow and background-{clip, origin, size}
+ https://bugs.webkit.org/show_bug.cgi?id=130102
+ <rdar://problem/16187037>
+
+ Reviewed by Andreas Kling.
+
+ Add tests to ensure that we correctly cascade the prefixed and non-prefixed variants
+ of the CSS properties box-shadow and background-{clip, origin, size}.
+
+ * fast/css/cascade/background-clip-and-webkit-background-clip-cascade-order-expected.html: Added.
+ * fast/css/cascade/background-clip-and-webkit-background-clip-cascade-order.html: Added.
+ * fast/css/cascade/background-origin-and-webkit-background-origin-cascade-order-expected.html: Added.
+ * fast/css/cascade/background-origin-and-webkit-background-origin-cascade-order.html: Added.
+ * fast/css/cascade/background-size-and-webkit-background-size-cascade-order-expected.html: Added.
+ * fast/css/cascade/background-size-and-webkit-background-size-cascade-order.html: Added.
+ * fast/css/cascade/box-shadow-and-webkit-box-shadow-cascade-order-expected.html: Added.
+ * fast/css/cascade/box-shadow-and-webkit-box-shadow-cascade-order.html: Added.
+ * fast/css/resources/green-128x128.png: Added.
+ * fast/css/resources/green-square-above-red-square.png: Added.
+ * fast/css/resources/red-square-above-green-square.png: Added.
+ * fast/css/resources/red-square-in-green-square.png: Added.
+
</ins><span class="cx"> 2014-03-13 Commit Queue <commit-queue@webkit.org>
</span><span class="cx">
</span><span class="cx"> Unreviewed, rolling out r165540.
</span></span></pre></div>
<a id="trunkLayoutTestsfastcsscascadebackgroundclipandwebkitbackgroundclipcascadeorderexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css/cascade/background-clip-and-webkit-background-clip-cascade-order-expected.html (0 => 165587)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/cascade/background-clip-and-webkit-background-clip-cascade-order-expected.html         (rev 0)
+++ trunk/LayoutTests/fast/css/cascade/background-clip-and-webkit-background-clip-cascade-order-expected.html        2014-03-14 01:41:31 UTC (rev 165587)
</span><span class="lines">@@ -0,0 +1,27 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<style>
+@font-face {
+ font-family: "Ahem";
+ src: url("../../../resources/Ahem.ttf");
+}
+
+body {
+ background-color: white;
+ font-family: "Ahem";
+ font-size: 20px; /* For some reason this needs to be multiple of 10 for the test to pass (why?). */
+}
+
+#background-clip-before-webkit-background-clip-expected-result {
+ color: #00FF00;
+}
+</style>
+</head>
+<body>
+ <!-- Test: -webkit-background-clip before background-clip -->
+ <img src="../resources/green-128x128.png" width="128" height="128">
+ <!-- Test: background-clip before -webkit-background-clip -->
+ <span id="background-clip-before-webkit-background-clip-expected-result">X</span>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcsscascadebackgroundclipandwebkitbackgroundclipcascadeorderhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css/cascade/background-clip-and-webkit-background-clip-cascade-order.html (0 => 165587)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/cascade/background-clip-and-webkit-background-clip-cascade-order.html         (rev 0)
+++ trunk/LayoutTests/fast/css/cascade/background-clip-and-webkit-background-clip-cascade-order.html        2014-03-14 01:41:31 UTC (rev 165587)
</span><span class="lines">@@ -0,0 +1,42 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<style>
+@font-face {
+ font-family: "Ahem";
+ src: url("../../../resources/Ahem.ttf");
+}
+
+body {
+ background-color: white;
+ font-family: "Ahem";
+ font-size: 20px; /* For some reason this needs to be multiple of 10 for the test to pass (why?). */
+}
+
+.square {
+ display: inline-block;
+ height: 128px;
+ width: 128px;
+ background-repeat: no-repeat;
+ color: transparent;
+}
+
+#webkit-background-clip-before-background-clip {
+ background-image: url("../resources/green-128x128.png");
+ -webkit-background-clip: text, border;
+ background-clip: border-box; /* Should override -webkit-background-clip */
+}
+
+#background-clip-before-webkit-background-clip {
+ background-color: #00FF00;
+ background-clip: border-box;
+ -webkit-background-clip: text, border; /* Should override background-clip */
+}
+</style>
+</head>
+<body>
+ <!-- Tests that we apply background-clip and -webkit-background-clip in the order they are parsed. -->
+ <div class="square" id="webkit-background-clip-before-background-clip"></div>
+ <div class="square" id="background-clip-before-webkit-background-clip">X</div>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcsscascadebackgroundoriginandwebkitbackgroundorigincascadeorderexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css/cascade/background-origin-and-webkit-background-origin-cascade-order-expected.html (0 => 165587)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/cascade/background-origin-and-webkit-background-origin-cascade-order-expected.html         (rev 0)
+++ trunk/LayoutTests/fast/css/cascade/background-origin-and-webkit-background-origin-cascade-order-expected.html        2014-03-14 01:41:31 UTC (rev 165587)
</span><span class="lines">@@ -0,0 +1,25 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<style>
+.faux-left-border {
+ display: inline-block;
+ background-color: #00FF00;
+ width: 32px;
+ height: 128px;
+}
+</style>
+</head>
+<body>
+ <!--
+ The green in the image green-128x128.png may not match CSS color #00FF00 because of color reproduction
+ issues (why?). Therefore we use a combination of a <div> with CSS background color #00FF00 and
+ green-128x128.png instead of using only green-128x128.png so as to ensure that the reference image
+ (generated from this file) matches the actual image.
+ -->
+ <!-- Test: -webkit-background-origin before background-origin -->
+ <div class="faux-left-border"></div><img src="../resources/green-128x128.png" width="96" height="128">
+ <!-- Test: background-origin before -webkit-background-origin -->
+ <div class="faux-left-border" style="margin-left: 32px"></div><img src="../resources/green-128x128.png" width="96" height="128" valign="top">
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcsscascadebackgroundoriginandwebkitbackgroundorigincascadeorderhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css/cascade/background-origin-and-webkit-background-origin-cascade-order.html (0 => 165587)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/cascade/background-origin-and-webkit-background-origin-cascade-order.html         (rev 0)
+++ trunk/LayoutTests/fast/css/cascade/background-origin-and-webkit-background-origin-cascade-order.html        2014-03-14 01:41:31 UTC (rev 165587)
</span><span class="lines">@@ -0,0 +1,31 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<style>
+.square {
+ display: inline-block;
+ height: 128px;
+ width: 128px;
+ background-repeat: no-repeat;
+ border-left: 32px solid #00FF00;
+}
+
+#webkit-background-origin-before-background-origin {
+ background-image: url("../resources/red-square-in-green-square.png");
+ -webkit-background-origin: padding;
+ background-origin: border-box; /* Should override -webkit-background-origin */
+}
+
+#background-origin-before-webkit-background-origin {
+ background-image: url("../resources/red-square-in-green-square.png");
+ background-origin: padding-box;
+ -webkit-background-origin: border; /* Should override background-origin */
+}
+</style>
+</head>
+<body>
+ <!-- Tests that we apply background-origin and -webkit-background-origin in the order they are parsed. -->
+ <div class="square" id="webkit-background-origin-before-background-origin"></div>
+ <div class="square" id="background-origin-before-webkit-background-origin"></div>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcsscascadebackgroundsizeandwebkitbackgroundsizecascadeorderexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css/cascade/background-size-and-webkit-background-size-cascade-order-expected.html (0 => 165587)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/cascade/background-size-and-webkit-background-size-cascade-order-expected.html         (rev 0)
+++ trunk/LayoutTests/fast/css/cascade/background-size-and-webkit-background-size-cascade-order-expected.html        2014-03-14 01:41:31 UTC (rev 165587)
</span><span class="lines">@@ -0,0 +1,9 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<body>
+ <!-- Test: -webkit-background-size before background-size -->
+ <img src="../resources/green-128x128.png" width="128" height="128">
+ <!-- Test: background-size before -webkit-background-size -->
+ <img src="../resources/green-128x128.png" width="128" height="64" valign="top">
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcsscascadebackgroundsizeandwebkitbackgroundsizecascadeorderhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css/cascade/background-size-and-webkit-background-size-cascade-order.html (0 => 165587)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/cascade/background-size-and-webkit-background-size-cascade-order.html         (rev 0)
+++ trunk/LayoutTests/fast/css/cascade/background-size-and-webkit-background-size-cascade-order.html        2014-03-14 01:41:31 UTC (rev 165587)
</span><span class="lines">@@ -0,0 +1,31 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<style>
+.square {
+ display: inline-block;
+ height: 128px;
+ width: 128px;
+ background-repeat: no-repeat;
+}
+
+#webkit-background-size-before-background-size {
+ background-image: url("../resources/green-square-above-red-square.png");
+ -webkit-background-size: 128px;
+ background-size: 128px; /* Should override -webkit-background-size */
+}
+
+#background-size-before-webkit-background-size {
+ background-image: url("../resources/red-square-above-green-square.png");
+ background-position-y: -64px;
+ background-size: 128px;
+ -webkit-background-size: 128px; /* Should override background-size */
+}
+</style>
+</head>
+<body>
+ <!-- Test that we apply background-size and -webkit-background-size in the order they are parsed. -->
+ <div class="square" id="webkit-background-size-before-background-size"></div>
+ <div class="square" id="background-size-before-webkit-background-size"></div>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcsscascadeboxshadowandwebkitboxshadowcascadeorderexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css/cascade/box-shadow-and-webkit-box-shadow-cascade-order-expected.html (0 => 165587)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/cascade/box-shadow-and-webkit-box-shadow-cascade-order-expected.html         (rev 0)
+++ trunk/LayoutTests/fast/css/cascade/box-shadow-and-webkit-box-shadow-cascade-order-expected.html        2014-03-14 01:41:31 UTC (rev 165587)
</span><span class="lines">@@ -0,0 +1,21 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<style>
+.square {
+ display: inline-block;
+ height: 128px;
+ width: 128px;
+ margin: 20px;
+ background-color: yellow;
+ box-shadow: 0 0 12px 1px green;
+}
+</style>
+</head>
+<body>
+ <!-- Test: -webkit-box-shadow before box-shadow -->
+ <div class="square"></div>
+ <!-- Test: box-shadow before -webkit-box-shadow -->
+ <div class="square"></div>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcsscascadeboxshadowandwebkitboxshadowcascadeorderhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css/cascade/box-shadow-and-webkit-box-shadow-cascade-order.html (0 => 165587)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/cascade/box-shadow-and-webkit-box-shadow-cascade-order.html         (rev 0)
+++ trunk/LayoutTests/fast/css/cascade/box-shadow-and-webkit-box-shadow-cascade-order.html        2014-03-14 01:41:31 UTC (rev 165587)
</span><span class="lines">@@ -0,0 +1,29 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<style>
+.square {
+ display: inline-block;
+ height: 128px;
+ width: 128px;
+ margin: 20px;
+ background-color: yellow;
+}
+
+#webkit-box-shadow-before-box-shadow {
+ -webkit-box-shadow: 0 0 10px 1px red;
+ box-shadow: 0 0 12px 1px green; /* Should override -webkit-box-shadow */
+}
+
+#box-shadow-before-webkit-box-shadow {
+ box-shadow: 0 0 12px 1px red;
+ -webkit-box-shadow: 0 0 10px 1px green; /* Should override box-shadow */
+}
+</style>
+</head>
+<body>
+ <!-- Test that we apply box-shadow and -webkit-box-shadow in the order they are parsed. -->
+ <div class="square" id="webkit-box-shadow-before-box-shadow"></div>
+ <div class="square" id="box-shadow-before-webkit-box-shadow"></div>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcssresourcesgreen128x128png"></a>
<div class="binary"><h4>Added: trunk/LayoutTests/fast/css/resources/green-128x128.png</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<span class="cx">Property changes on: trunk/LayoutTests/fast/css/resources/green-128x128.png
</span><span class="cx">___________________________________________________________________
</span><a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="trunkLayoutTestsfastcssresourcesgreensquareaboveredsquarepng"></a>
<div class="binary"><h4>Added: trunk/LayoutTests/fast/css/resources/green-square-above-red-square.png</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<span class="cx">Property changes on: trunk/LayoutTests/fast/css/resources/green-square-above-red-square.png
</span><span class="cx">___________________________________________________________________
</span><a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="trunkLayoutTestsfastcssresourcesredsquareabovegreensquarepng"></a>
<div class="binary"><h4>Added: trunk/LayoutTests/fast/css/resources/red-square-above-green-square.png</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<span class="cx">Property changes on: trunk/LayoutTests/fast/css/resources/red-square-above-green-square.png
</span><span class="cx">___________________________________________________________________
</span><a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="trunkLayoutTestsfastcssresourcesredsquareingreensquarepng"></a>
<div class="binary"><h4>Added: trunk/LayoutTests/fast/css/resources/red-square-in-green-square.png</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<span class="cx">Property changes on: trunk/LayoutTests/fast/css/resources/red-square-in-green-square.png
</span><span class="cx">___________________________________________________________________
</span><a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (165586 => 165587)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-03-14 01:36:00 UTC (rev 165586)
+++ trunk/Source/WebCore/ChangeLog        2014-03-14 01:41:31 UTC (rev 165587)
</span><span class="lines">@@ -1,3 +1,28 @@
</span><ins>+2014-03-13 Daniel Bates <dabates@apple.com>
+
+ REGRESSION (r160806): Incorrect cascade order of prefixed and non-prefixed variants of
+ CSS properties box-shadow and background-{clip, origin, size}
+ https://bugs.webkit.org/show_bug.cgi?id=130102
+ <rdar://problem/16187037>
+
+ Reviewed by Andreas Kling.
+
+ Fixes an issues in the computation of the final value for the CSS properties
+ box-shadow and background-{clip, origin, size} when the definition of a selector
+ uses both the prefixed and non-prefixed variants (in order) of these properties.
+
+ Tests: fast/css/cascade/background-clip-and-webkit-background-clip-cascade-order.html
+ fast/css/cascade/background-origin-and-webkit-background-origin-cascade-order.html
+ fast/css/cascade/background-size-and-webkit-background-size-cascade-order.html
+ fast/css/cascade/box-shadow-and-webkit-box-shadow-cascade-order.html
+
+ * css/CSSPropertyNames.in: Add a comment to explain the difference between property
+ -webkit-box-shadow and property box-shadow.
+ * css/StyleResolver.cpp:
+ (WebCore::shouldApplyPropertyInParseOrder): Add prefixed and non-prefixed variants
+ of box-shadow and background-{clip, origin, size} to the list of properties that need
+ to be applied in the same order as they were parsed from the stylesheet.
+
</ins><span class="cx"> 2014-03-13 Joseph Pecoraro <pecoraro@apple.com>
</span><span class="cx">
</span><span class="cx"> Web Inspector: Remove InspectorFrontendHost.loadResourceSynchronously
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSPropertyNamesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSPropertyNames.in (165586 => 165587)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSPropertyNames.in        2014-03-14 01:36:00 UTC (rev 165586)
+++ trunk/Source/WebCore/css/CSSPropertyNames.in        2014-03-14 01:41:31 UTC (rev 165587)
</span><span class="lines">@@ -261,6 +261,9 @@
</span><span class="cx"> -webkit-box-orient
</span><span class="cx"> -webkit-box-pack
</span><span class="cx"> -webkit-box-reflect
</span><ins>+// -webkit-box-shadow differs from box-shadow in its treatement of blur radii > 8px.
+// Let -webkit-box-shadow blur radius be w_r and box-shadow blur radius be b_r. For
+// w_r > 8px, b_r = 8 + 4 * sqrt((w_r - 8) / 2).
</ins><span class="cx"> -webkit-box-shadow
</span><span class="cx"> -webkit-color-correction [Inherited]
</span><span class="cx"> -webkit-column-axis
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleResolvercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleResolver.cpp (165586 => 165587)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleResolver.cpp        2014-03-14 01:36:00 UTC (rev 165586)
+++ trunk/Source/WebCore/css/StyleResolver.cpp        2014-03-14 01:41:31 UTC (rev 165587)
</span><span class="lines">@@ -1595,6 +1595,12 @@
</span><span class="cx"> static bool shouldApplyPropertyInParseOrder(CSSPropertyID propertyID)
</span><span class="cx"> {
</span><span class="cx"> switch (propertyID) {
</span><ins>+ case CSSPropertyWebkitBackgroundClip:
+ case CSSPropertyBackgroundClip:
+ case CSSPropertyWebkitBackgroundOrigin:
+ case CSSPropertyBackgroundOrigin:
+ case CSSPropertyWebkitBackgroundSize:
+ case CSSPropertyBackgroundSize:
</ins><span class="cx"> case CSSPropertyWebkitBorderImage:
</span><span class="cx"> case CSSPropertyBorderImage:
</span><span class="cx"> case CSSPropertyBorderImageSlice:
</span><span class="lines">@@ -1602,6 +1608,8 @@
</span><span class="cx"> case CSSPropertyBorderImageOutset:
</span><span class="cx"> case CSSPropertyBorderImageRepeat:
</span><span class="cx"> case CSSPropertyBorderImageWidth:
</span><ins>+ case CSSPropertyWebkitBoxShadow:
+ case CSSPropertyBoxShadow:
</ins><span class="cx"> case CSSPropertyWebkitTextDecoration:
</span><span class="cx"> case CSSPropertyWebkitTextDecorationLine:
</span><span class="cx"> case CSSPropertyWebkitTextDecorationStyle:
</span></span></pre>
</div>
</div>
</body>
</html>