<!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>[200357] 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/200357">200357</a></dd>
<dt>Author</dt> <dd>dino@apple.com</dd>
<dt>Date</dt> <dd>2016-05-02 19:25:31 -0700 (Mon, 02 May 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Specifying a longhand property should not serialize to a shorthand property
https://bugs.webkit.org/show_bug.cgi?id=157180

Patch by Antoine Quint &lt;graouts@apple.com&gt; on 2016-05-02
Reviewed by Dean Jackson.

Source/WebCore:

Ensure that we don't serialize to a shorthand property when the required longhand components
are not specified, per http://www.w3.org/TR/cssom-1/#serialize-a-css-declaration-block.

Test: fast/css/no-shorthand-with-incomplete-longhands.html

* css/StyleProperties.cpp:
(WebCore::StyleProperties::getLayeredShorthandValue):
Returning an empty string here means that calling getPropertyValue() with
the shorthand property matching the currently processed longhand property
in asText() will return an empty string as well and the shorthand property
will be disregarded.

LayoutTests:

A fair few tests relied on reading from a shorthand value when it was incorrect
to produce one, so we fix those incorrect assertions. We also add a new test that
goes through all the longhand properties for a given shorthand property and checks
that none of the longhand properties will yield a shorthand value.

* cssom/cssvalue-comparison-expected.txt:
* cssom/cssvalue-comparison.html:
* fast/css/background-position-serialize-expected.txt:
* fast/css/background-position-serialize.html:
* fast/css/no-shorthand-with-incomplete-longhands-expected.txt: Added.
* fast/css/no-shorthand-with-incomplete-longhands.html: Added.
* fast/css/remove-shorthand-expected.txt:
* fast/css/script-tests/image-set-setting.js:
(testComputedStyle):
* fast/css/uri-token-parsing-expected.txt:
* fast/css/uri-token-parsing.html:
* fast/css/webkit-mask-crash-implicit-expected.txt:
* fast/css/webkit-mask-crash-implicit.html:
* fast/dom/Element/setAttributeNode-for-existing-attribute.html:
* fast/dom/background-shorthand-csstext-expected.txt:
* fast/dom/background-shorthand-csstext.html:
* http/tests/security/contentSecurityPolicy/inline-style-allowed-while-cloning-objects-expected.txt:
* http/tests/security/contentSecurityPolicy/inline-style-allowed-while-cloning-objects.html:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestscssomcssvaluecomparisonexpectedtxt">trunk/LayoutTests/cssom/cssvalue-comparison-expected.txt</a></li>
<li><a href="#trunkLayoutTestscssomcssvaluecomparisonhtml">trunk/LayoutTests/cssom/cssvalue-comparison.html</a></li>
<li><a href="#trunkLayoutTestsfastcssbackgroundpositionserializeexpectedtxt">trunk/LayoutTests/fast/css/background-position-serialize-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcssbackgroundpositionserializehtml">trunk/LayoutTests/fast/css/background-position-serialize.html</a></li>
<li><a href="#trunkLayoutTestsfastcssremoveshorthandexpectedtxt">trunk/LayoutTests/fast/css/remove-shorthand-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcssscripttestsimagesetsettingjs">trunk/LayoutTests/fast/css/script-tests/image-set-setting.js</a></li>
<li><a href="#trunkLayoutTestsfastcssuritokenparsingexpectedtxt">trunk/LayoutTests/fast/css/uri-token-parsing-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcssuritokenparsinghtml">trunk/LayoutTests/fast/css/uri-token-parsing.html</a></li>
<li><a href="#trunkLayoutTestsfastcsswebkitmaskcrashimplicitexpectedtxt">trunk/LayoutTests/fast/css/webkit-mask-crash-implicit-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcsswebkitmaskcrashimplicithtml">trunk/LayoutTests/fast/css/webkit-mask-crash-implicit.html</a></li>
<li><a href="#trunkLayoutTestsfastdomElementsetAttributeNodeforexistingattributehtml">trunk/LayoutTests/fast/dom/Element/setAttributeNode-for-existing-attribute.html</a></li>
<li><a href="#trunkLayoutTestsfastdombackgroundshorthandcsstextexpectedtxt">trunk/LayoutTests/fast/dom/background-shorthand-csstext-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastdombackgroundshorthandcsstexthtml">trunk/LayoutTests/fast/dom/background-shorthand-csstext.html</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritycontentSecurityPolicyinlinestyleallowedwhilecloningobjectsexpectedtxt">trunk/LayoutTests/http/tests/security/contentSecurityPolicy/inline-style-allowed-while-cloning-objects-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritycontentSecurityPolicyinlinestyleallowedwhilecloningobjectshtml">trunk/LayoutTests/http/tests/security/contentSecurityPolicy/inline-style-allowed-while-cloning-objects.html</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecssStylePropertiescpp">trunk/Source/WebCore/css/StyleProperties.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastcssnoshorthandwithincompletelonghandsexpectedtxt">trunk/LayoutTests/fast/css/no-shorthand-with-incomplete-longhands-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcssnoshorthandwithincompletelonghandshtml">trunk/LayoutTests/fast/css/no-shorthand-with-incomplete-longhands.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (200356 => 200357)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-05-03 02:17:36 UTC (rev 200356)
+++ trunk/LayoutTests/ChangeLog        2016-05-03 02:25:31 UTC (rev 200357)
</span><span class="lines">@@ -1,3 +1,34 @@
</span><ins>+2016-05-02  Antoine Quint  &lt;graouts@apple.com&gt;
+
+        Specifying a longhand property should not serialize to a shorthand property
+        https://bugs.webkit.org/show_bug.cgi?id=157180
+
+        Reviewed by Dean Jackson.
+
+        A fair few tests relied on reading from a shorthand value when it was incorrect
+        to produce one, so we fix those incorrect assertions. We also add a new test that
+        goes through all the longhand properties for a given shorthand property and checks
+        that none of the longhand properties will yield a shorthand value.
+
+        * cssom/cssvalue-comparison-expected.txt:
+        * cssom/cssvalue-comparison.html:
+        * fast/css/background-position-serialize-expected.txt:
+        * fast/css/background-position-serialize.html:
+        * fast/css/no-shorthand-with-incomplete-longhands-expected.txt: Added.
+        * fast/css/no-shorthand-with-incomplete-longhands.html: Added.
+        * fast/css/remove-shorthand-expected.txt:
+        * fast/css/script-tests/image-set-setting.js:
+        (testComputedStyle):
+        * fast/css/uri-token-parsing-expected.txt:
+        * fast/css/uri-token-parsing.html:
+        * fast/css/webkit-mask-crash-implicit-expected.txt:
+        * fast/css/webkit-mask-crash-implicit.html:
+        * fast/dom/Element/setAttributeNode-for-existing-attribute.html:
+        * fast/dom/background-shorthand-csstext-expected.txt:
+        * fast/dom/background-shorthand-csstext.html:
+        * http/tests/security/contentSecurityPolicy/inline-style-allowed-while-cloning-objects-expected.txt:
+        * http/tests/security/contentSecurityPolicy/inline-style-allowed-while-cloning-objects.html:
+
</ins><span class="cx"> 2016-05-02  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Make console a namespace object (like Math/JSON), allowing functions to be called unbound
</span></span></pre></div>
<a id="trunkLayoutTestscssomcssvaluecomparisonexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/cssom/cssvalue-comparison-expected.txt (200356 => 200357)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/cssom/cssvalue-comparison-expected.txt        2016-05-03 02:17:36 UTC (rev 200356)
+++ trunk/LayoutTests/cssom/cssvalue-comparison-expected.txt        2016-05-03 02:25:31 UTC (rev 200357)
</span><span class="lines">@@ -20,9 +20,9 @@
</span><span class="cx"> PASS Two CSSValues &quot;rotate(200grad)&quot; for property &quot;-webkit-transform&quot; are equal. 
</span><span class="cx"> PASS Two CSSValues &quot;rotate(0.5turn)&quot; for property &quot;-webkit-transform&quot; are equal. 
</span><span class="cx"> PASS Two CSSValues &quot;rotate(15deg)&quot; and &quot;rotate(1.55rad)&quot; for property &quot;-webkit-transform&quot; are not equal. 
</span><del>-PASS Two CSSValues &quot;url(dummy://test.png)&quot; for property &quot;background&quot; are equal. 
-PASS Two CSSValues &quot;url(dummy://green.png)&quot; for property &quot;background&quot; are equal. 
-PASS Two CSSValues &quot;url(dummy://test.png)&quot; and &quot;url(dummy://green.png)&quot; for property &quot;background&quot; are not equal. 
</del><ins>+PASS Two CSSValues &quot;url(dummy://test.png)&quot; for property &quot;background-image&quot; are equal. 
+PASS Two CSSValues &quot;url(dummy://green.png)&quot; for property &quot;background-image&quot; are equal. 
+PASS Two CSSValues &quot;url(dummy://test.png)&quot; and &quot;url(dummy://green.png)&quot; for property &quot;background-image&quot; are not equal. 
</ins><span class="cx"> PASS Two CSSValues &quot;bold&quot; for property &quot;font-weight&quot; are equal. 
</span><span class="cx"> PASS Two CSSValues &quot;inherit&quot; for property &quot;font-weight&quot; are equal. 
</span><span class="cx"> PASS Two CSSValues &quot;bold&quot; and &quot;inherit&quot; for property &quot;font-weight&quot; are not equal. 
</span><span class="lines">@@ -63,13 +63,13 @@
</span><span class="cx"> PASS Two CSSValues &quot;italic bold 12px/30px arial&quot; for property &quot;font&quot; are equal. 
</span><span class="cx"> PASS Two CSSValues &quot;italic bold 8px/16px helvetica&quot; for property &quot;font&quot; are equal. 
</span><span class="cx"> PASS Two CSSValues &quot;italic bold 12px/30px arial&quot; and &quot;italic bold 8px/16px helvetica&quot; for property &quot;font&quot; are not equal. 
</span><del>-PASS Two CSSValues &quot;-webkit-gradient(linear, left top, left bottom, from(#ccc), to(#000))&quot; for property &quot;background&quot; are equal. 
-PASS Two CSSValues &quot;-webkit-gradient(radial, 45 45, 0, 52 50, 0, from(#A7D30C), to(rgba(1,159,98,0)), color-stop(90%, #019F62))&quot; for property &quot;background&quot; are equal. 
-PASS Two CSSValues &quot;-webkit-gradient(linear, left top, left bottom, from(#ccc), to(#000))&quot; and &quot;-webkit-gradient(radial, 45 45, 0, 52 50, 0, from(#A7D30C), to(rgba(1,159,98,0)), color-stop(90%, #019F62))&quot; for property &quot;background&quot; are not equal. 
-PASS Two CSSValues &quot;radial-gradient(circle, #ccc, #000)&quot; for property &quot;background&quot; are equal. 
-PASS Two CSSValues &quot;linear-gradient(#000, #234)&quot; for property &quot;background&quot; are equal. 
-PASS Two CSSValues &quot;linear-gradient(to top, #000, #234)&quot; for property &quot;background&quot; are equal. 
-PASS Two CSSValues &quot;linear-gradient(#000, #234)&quot; and &quot;linear-gradient(to top, #000, #234)&quot; for property &quot;background&quot; are not equal. 
</del><ins>+PASS Two CSSValues &quot;-webkit-gradient(linear, left top, left bottom, from(#ccc), to(#000))&quot; for property &quot;background-image&quot; are equal. 
+PASS Two CSSValues &quot;-webkit-gradient(radial, 45 45, 0, 52 50, 0, from(#A7D30C), to(rgba(1,159,98,0)), color-stop(90%, #019F62))&quot; for property &quot;background-image&quot; are equal. 
+PASS Two CSSValues &quot;-webkit-gradient(linear, left top, left bottom, from(#ccc), to(#000))&quot; and &quot;-webkit-gradient(radial, 45 45, 0, 52 50, 0, from(#A7D30C), to(rgba(1,159,98,0)), color-stop(90%, #019F62))&quot; for property &quot;background-image&quot; are not equal. 
+PASS Two CSSValues &quot;radial-gradient(circle, #ccc, #000)&quot; for property &quot;background-image&quot; are equal. 
+PASS Two CSSValues &quot;linear-gradient(#000, #234)&quot; for property &quot;background-image&quot; are equal. 
+PASS Two CSSValues &quot;linear-gradient(to top, #000, #234)&quot; for property &quot;background-image&quot; are equal. 
+PASS Two CSSValues &quot;linear-gradient(#000, #234)&quot; and &quot;linear-gradient(to top, #000, #234)&quot; for property &quot;background-image&quot; are not equal. 
</ins><span class="cx"> PASS Two CSSValues &quot;-webkit-cross-fade(url(dummy://example.png), url(dummy://example.png), 50%)&quot; for property &quot;background-image&quot; are equal. 
</span><span class="cx"> PASS Two CSSValues &quot;-webkit-cross-fade(url(dummy://background.png), url(dummy://foreground.png), 80%)&quot; for property &quot;background-image&quot; are equal. 
</span><span class="cx"> PASS Two CSSValues &quot;-webkit-cross-fade(url(dummy://example.png), url(dummy://example.png), 50%)&quot; and &quot;-webkit-cross-fade(url(dummy://background.png), url(dummy://foreground.png), 80%)&quot; for property &quot;background-image&quot; are not equal. 
</span></span></pre></div>
<a id="trunkLayoutTestscssomcssvaluecomparisonhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/cssom/cssvalue-comparison.html (200356 => 200357)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/cssom/cssvalue-comparison.html        2016-05-03 02:17:36 UTC (rev 200356)
+++ trunk/LayoutTests/cssom/cssvalue-comparison.html        2016-05-03 02:25:31 UTC (rev 200357)
</span><span class="lines">@@ -35,7 +35,7 @@
</span><span class="cx"> 
</span><span class="cx">    var tests = [ {&quot;width&quot; : [&quot;20%&quot;, &quot;2em&quot;, &quot;2rem&quot;, &quot;20px&quot;, &quot;2cm&quot;, &quot;20mm&quot;, &quot;4in&quot;, &quot;20pt&quot;, &quot;10pc&quot;, &quot;6vw&quot;, &quot;6vh&quot;, &quot;4vmin&quot;, &quot;-webkit-calc(-100px + 100%)&quot;]}, // lengths, calc
</span><span class="cx">                   {&quot;-webkit-transform&quot; : [&quot;rotate(15deg)&quot;, &quot;rotate(1.55rad)&quot;, &quot;rotate(200grad)&quot;, &quot;rotate(0.5turn)&quot;]}, // angle
</span><del>-                  {&quot;background&quot; : [&quot;url(dummy://test.png)&quot;, &quot;url(dummy://green.png)&quot;]}, // uri
</del><ins>+                  {&quot;background-image&quot; : [&quot;url(dummy://test.png)&quot;, &quot;url(dummy://green.png)&quot;]}, // uri
</ins><span class="cx">                   {&quot;font-weight&quot; : [&quot;bold&quot;, &quot;inherit&quot;]}, // ident
</span><span class="cx">                   {&quot;content&quot; : [&quot;counter(a)&quot;, &quot;counters(a, '.')&quot;]}, // counter
</span><span class="cx">                   {&quot;content&quot; : [&quot;attr(a)&quot;, &quot;attr(p)&quot;]}, // attr
</span><span class="lines">@@ -49,9 +49,9 @@
</span><span class="cx">                   {&quot;border-image-slice&quot; : [&quot;1 2 3 4&quot;, &quot;2 3 4 5&quot;]}, // border image slice
</span><span class="cx">                   {&quot;cursor&quot; : [&quot;url(resources/greenbox.png) 0 0, pointer&quot;, &quot;url(resources/cursor.png) 1 1, wait&quot;]}, // cursor
</span><span class="cx">                   {&quot;font&quot; : [&quot;italic bold 12px/30px arial&quot;, &quot;italic bold 8px/16px helvetica&quot;]}, // font
</span><del>-                  {&quot;background&quot; : [&quot;-webkit-gradient(linear, left top, left bottom, from(#ccc), to(#000))&quot;, &quot;-webkit-gradient(radial, 45 45, 0, 52 50, 0, from(#A7D30C), to(rgba(1,159,98,0)), color-stop(90%, #019F62))&quot;]}, // gradients
-                  {&quot;background&quot; : [&quot;radial-gradient(circle, #ccc, #000)&quot;]}, // gradients
-                  {&quot;background&quot; : [&quot;linear-gradient(#000, #234)&quot;, &quot;linear-gradient(to top, #000, #234)&quot;]}, // gradients
</del><ins>+                  {&quot;background-image&quot; : [&quot;-webkit-gradient(linear, left top, left bottom, from(#ccc), to(#000))&quot;, &quot;-webkit-gradient(radial, 45 45, 0, 52 50, 0, from(#A7D30C), to(rgba(1,159,98,0)), color-stop(90%, #019F62))&quot;]}, // gradients
+                  {&quot;background-image&quot; : [&quot;radial-gradient(circle, #ccc, #000)&quot;]}, // gradients
+                  {&quot;background-image&quot; : [&quot;linear-gradient(#000, #234)&quot;, &quot;linear-gradient(to top, #000, #234)&quot;]}, // gradients
</ins><span class="cx">                   {&quot;background-image&quot; : [&quot;-webkit-cross-fade(url(dummy://example.png), url(dummy://example.png), 50%)&quot;, &quot;-webkit-cross-fade(url(dummy://background.png), url(dummy://foreground.png), 80%)&quot;]}, // crossfade
</span><span class="cx">                   {&quot;-webkit-box-reflect&quot; : [&quot;below 10px&quot;, &quot;below 0px -webkit-gradient(linear, left top, left bottom, from(transparent), to(rgba(10, 55, 234, 1)))&quot;]}, // reflect
</span><span class="cx">                   {&quot;-webkit-box-shadow&quot; : [&quot;0 -20px 10px red, 0 20px 10px blue&quot;, &quot;0 20px 10px blue&quot;, &quot;5px 5px 5px rgba(0, 0, 0, 0.3)&quot;]}, // shadow
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssbackgroundpositionserializeexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css/background-position-serialize-expected.txt (200356 => 200357)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/background-position-serialize-expected.txt        2016-05-03 02:17:36 UTC (rev 200356)
+++ trunk/LayoutTests/fast/css/background-position-serialize-expected.txt        2016-05-03 02:25:31 UTC (rev 200357)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> t.style.backgroundPositionX = '5%';
</span><del>-PASS: t.style.backgroundPosition should be 5% and is.
</del><ins>+PASS: t.style.backgroundPosition should be and is.
</ins><span class="cx"> PASS: t.style.backgroundPositionX should be 5% and is.
</span><span class="cx"> PASS: t.style.backgroundPositionY should be and is.
</span><span class="cx"> PASS: t.style.cssText should be background-position-x: 5%; and is.
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssbackgroundpositionserializehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css/background-position-serialize.html (200356 => 200357)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/background-position-serialize.html        2016-05-03 02:17:36 UTC (rev 200356)
+++ trunk/LayoutTests/fast/css/background-position-serialize.html        2016-05-03 02:25:31 UTC (rev 200357)
</span><span class="lines">@@ -44,7 +44,7 @@
</span><span class="cx"> var t = document.getElementById('t');
</span><span class="cx"> 
</span><span class="cx"> run(&quot;t.style.backgroundPositionX = '5%';&quot;);
</span><del>-shouldBe(&quot;t.style.backgroundPosition&quot;, &quot;5%&quot;);
</del><ins>+shouldBe(&quot;t.style.backgroundPosition&quot;, &quot;&quot;);
</ins><span class="cx"> shouldBe(&quot;t.style.backgroundPositionX&quot;, &quot;5%&quot;);
</span><span class="cx"> shouldBe(&quot;t.style.backgroundPositionY&quot;, &quot;&quot;);
</span><span class="cx"> shouldBe(&quot;t.style.cssText&quot;, &quot;background-position-x: 5%;&quot;);
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssnoshorthandwithincompletelonghandsexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css/no-shorthand-with-incomplete-longhands-expected.txt (0 => 200357)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/no-shorthand-with-incomplete-longhands-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/css/no-shorthand-with-incomplete-longhands-expected.txt        2016-05-03 02:25:31 UTC (rev 200357)
</span><span class="lines">@@ -0,0 +1,19 @@
</span><ins>+Tests that setting a longhand property does not produces a valid shorthand value.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS Setting style=&quot;background-image: url(foo.png)&quot; should not return a value for element.style.getPropertyValue(&quot;background&quot;).
+PASS Setting style=&quot;background-position-x: 10px&quot; should not return a value for element.style.getPropertyValue(&quot;background&quot;).
+PASS Setting style=&quot;background-position-y: 10px&quot; should not return a value for element.style.getPropertyValue(&quot;background&quot;).
+PASS Setting style=&quot;background-size: cover&quot; should not return a value for element.style.getPropertyValue(&quot;background&quot;).
+PASS Setting style=&quot;background-repeat-x: no-repeat&quot; should not return a value for element.style.getPropertyValue(&quot;background&quot;).
+PASS Setting style=&quot;background-repeat-y: no-repeat&quot; should not return a value for element.style.getPropertyValue(&quot;background&quot;).
+PASS Setting style=&quot;background-attachment: scroll&quot; should not return a value for element.style.getPropertyValue(&quot;background&quot;).
+PASS Setting style=&quot;background-origin: padding-box&quot; should not return a value for element.style.getPropertyValue(&quot;background&quot;).
+PASS Setting style=&quot;background-clip: padding-box&quot; should not return a value for element.style.getPropertyValue(&quot;background&quot;).
+PASS Setting style=&quot;background-color: green&quot; should not return a value for element.style.getPropertyValue(&quot;background&quot;).
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins><span class="cx">Property changes on: trunk/LayoutTests/fast/css/no-shorthand-with-incomplete-longhands-expected.txt
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="svnkeywords"></a>
<div class="addfile"><h4>Added: svn:keywords</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkLayoutTestsfastcssnoshorthandwithincompletelonghandshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css/no-shorthand-with-incomplete-longhands.html (0 => 200357)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/no-shorthand-with-incomplete-longhands.html                                (rev 0)
+++ trunk/LayoutTests/fast/css/no-shorthand-with-incomplete-longhands.html        2016-05-03 02:25:31 UTC (rev 200357)
</span><span class="lines">@@ -0,0 +1,28 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;body&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+
+description(&quot;Tests that setting a longhand property does not produces a valid shorthand value.&quot;);
+
+var shorthands = { &quot;background&quot;: [&quot;background-image: url(foo.png)&quot;, &quot;background-position-x: 10px&quot;, &quot;background-position-y: 10px&quot;, &quot;background-size: cover&quot;, &quot;background-repeat-x: no-repeat&quot;, &quot;background-repeat-y: no-repeat&quot;, &quot;background-attachment: scroll&quot;, &quot;background-origin: padding-box&quot;, &quot;background-clip: padding-box&quot;, &quot;background-color: green&quot;] }
+
+for (var shorthand in shorthands) {
+
+    // Test each longhand in isolation.
+    shorthands[shorthand].forEach(function(styleDeclaration) {
+        var description = `Setting style=&quot;${styleDeclaration}&quot; should not return a value for element.style.getPropertyValue(&quot;${shorthand}&quot;).`;
+        var element = document.createElement(&quot;div&quot;);
+        element.setAttribute(&quot;style&quot;, styleDeclaration);
+        if (element.style.getPropertyValue(shorthand) === &quot;&quot;)
+            testPassed(description);
+        else
+            testFailed(description);
+    });
+}
+
+&lt;/script&gt;
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">Property changes on: trunk/LayoutTests/fast/css/no-shorthand-with-incomplete-longhands.html
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="svnkeywords"></a>
<div class="addfile"><h4>Added: svn:keywords</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkLayoutTestsfastcssremoveshorthandexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css/remove-shorthand-expected.txt (200356 => 200357)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/remove-shorthand-expected.txt        2016-05-03 02:17:36 UTC (rev 200356)
+++ trunk/LayoutTests/fast/css/remove-shorthand-expected.txt        2016-05-03 02:25:31 UTC (rev 200357)
</span><span class="lines">@@ -64,7 +64,7 @@
</span><span class="cx"> and adds &quot;&quot;.
</span><span class="cx"> Removing -webkit-mask-position
</span><span class="cx"> removes &quot;-webkit-mask&quot;
</span><del>-and adds &quot;-webkit-mask&quot;.
</del><ins>+and adds &quot;-webkit-mask-image, -webkit-mask-repeat-x, -webkit-mask-repeat-y&quot;.
</ins><span class="cx"> Removing overflow
</span><span class="cx"> removes &quot;overflow&quot;
</span><span class="cx"> and adds &quot;&quot;.
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssscripttestsimagesetsettingjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css/script-tests/image-set-setting.js (200356 => 200357)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/script-tests/image-set-setting.js        2016-05-03 02:17:36 UTC (rev 200356)
+++ trunk/LayoutTests/fast/css/script-tests/image-set-setting.js        2016-05-03 02:25:31 UTC (rev 200357)
</span><span class="lines">@@ -5,7 +5,7 @@
</span><span class="cx">     var div = document.createElement(&quot;div&quot;);
</span><span class="cx">     document.body.appendChild(div);
</span><span class="cx">     div.setAttribute(&quot;style&quot;, property + &quot;: &quot; + fullRule);
</span><del>-    var computedValue = div.style.background;
</del><ins>+    var computedValue = div.style.backgroundImage;
</ins><span class="cx">     document.body.removeChild(div);
</span><span class="cx">     return computedValue;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssuritokenparsingexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css/uri-token-parsing-expected.txt (200356 => 200357)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/uri-token-parsing-expected.txt        2016-05-03 02:17:36 UTC (rev 200356)
+++ trunk/LayoutTests/fast/css/uri-token-parsing-expected.txt        2016-05-03 02:25:31 UTC (rev 200357)
</span><span class="lines">@@ -21,7 +21,7 @@
</span><span class="cx"> #q { cursor: url('url(q)'); }
</span><span class="cx"> #r { list-style-image: url('url(r)'); }
</span><span class="cx"> #s { background-image: url('url(s)'); }
</span><del>-#t { -webkit-mask: url('url(t)'); }
</del><ins>+#t { -webkit-mask-image: url('url(t)'); }
</ins><span class="cx"> #u { -webkit-border-image: url('url(u)') 1 2 3 4 fill stretch round; }
</span><span class="cx"> #v { -webkit-mask-box-image: url('url(v)') 1 2 3 4 fill stretch round; }
</span><span class="cx"> #w { content: url(ww); }
</span><span class="lines">@@ -46,7 +46,7 @@
</span><span class="cx"> #q { cursor: url('url(q)'); }
</span><span class="cx"> #r { list-style-image: url('url(r)'); }
</span><span class="cx"> #s { background-image: url('url(s)'); }
</span><del>-#t { -webkit-mask: url('url(t)'); }
</del><ins>+#t { -webkit-mask-image: url('url(t)'); }
</ins><span class="cx"> #u { -webkit-border-image: url('url(u)') 1 2 3 4 fill stretch round; }
</span><span class="cx"> #v { -webkit-mask-box-image: url('url(v)') 1 2 3 4 fill stretch round; }
</span><span class="cx"> #w { content: url(ww); }
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssuritokenparsinghtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css/uri-token-parsing.html (200356 => 200357)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/uri-token-parsing.html        2016-05-03 02:17:36 UTC (rev 200356)
+++ trunk/LayoutTests/fast/css/uri-token-parsing.html        2016-05-03 02:25:31 UTC (rev 200357)
</span><span class="lines">@@ -95,7 +95,7 @@
</span><span class="cx"> #q { cursor: url('url(q)'); }
</span><span class="cx"> #r { list-style-image: url('url(r)'); }
</span><span class="cx"> #s { background-image: url('url(s)'); }
</span><del>-#t { -webkit-mask: url('url(t)'); }
</del><ins>+#t { -webkit-mask-image: url('url(t)'); }
</ins><span class="cx"> #u { -webkit-border-image: url('url(u)') 1 2 3 4 fill stretch round; }
</span><span class="cx"> #v { -webkit-mask-box-image: url('url(v)') 1 2 3 4 fill stretch round; }
</span><span class="cx"> #w { content: url(ww); }
</span></span></pre></div>
<a id="trunkLayoutTestsfastcsswebkitmaskcrashimplicitexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css/webkit-mask-crash-implicit-expected.txt (200356 => 200357)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/webkit-mask-crash-implicit-expected.txt        2016-05-03 02:17:36 UTC (rev 200356)
+++ trunk/LayoutTests/fast/css/webkit-mask-crash-implicit-expected.txt        2016-05-03 02:25:31 UTC (rev 200357)
</span><span class="lines">@@ -1,4 +1,4 @@
</span><del>-FAIL document.styleSheets[1].rules[0].style.cssText should be -webkit-mask-repeat: repeat-x; -webkit-mask-repeat-y: inherit;. Was -webkit-mask: inherit;.
-FAIL document.styleSheets[1].rules[0].style.getPropertyValue('-webkit-mask') should be . Was inherit.
-FAIL document.styleSheets[1].rules[0].style.getPropertyValue('-webkit-mask-repeat') should be repeat inherit. Was inherit.
</del><ins>+PASS document.styleSheets[1].rules[0].style.cssText is &quot;-webkit-mask-repeat-x: repeat; -webkit-mask-repeat-y: inherit;&quot;
+PASS document.styleSheets[1].rules[0].style.getPropertyValue('-webkit-mask') is &quot;&quot;
+PASS document.styleSheets[1].rules[0].style.getPropertyValue('-webkit-mask-repeat') is &quot;inherit&quot;
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsfastcsswebkitmaskcrashimplicithtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css/webkit-mask-crash-implicit.html (200356 => 200357)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/webkit-mask-crash-implicit.html        2016-05-03 02:17:36 UTC (rev 200356)
+++ trunk/LayoutTests/fast/css/webkit-mask-crash-implicit.html        2016-05-03 02:25:31 UTC (rev 200357)
</span><span class="lines">@@ -9,9 +9,9 @@
</span><span class="cx"> &lt;script&gt;
</span><span class="cx"> if (window.internals)
</span><span class="cx">     testRunner.dumpAsText();
</span><del>-shouldBeEqualToString(&quot;document.styleSheets[1].rules[0].style.cssText&quot;, &quot;-webkit-mask-repeat: repeat-x; -webkit-mask-repeat-y: inherit;&quot;);
</del><ins>+shouldBeEqualToString(&quot;document.styleSheets[1].rules[0].style.cssText&quot;, &quot;-webkit-mask-repeat-x: repeat; -webkit-mask-repeat-y: inherit;&quot;);
</ins><span class="cx"> shouldBeEqualToString(&quot;document.styleSheets[1].rules[0].style.getPropertyValue('-webkit-mask')&quot;, &quot;&quot;);
</span><del>-shouldBeEqualToString(&quot;document.styleSheets[1].rules[0].style.getPropertyValue('-webkit-mask-repeat')&quot;, &quot;repeat inherit&quot;);
</del><ins>+shouldBeEqualToString(&quot;document.styleSheets[1].rules[0].style.getPropertyValue('-webkit-mask-repeat')&quot;, &quot;inherit&quot;);
</ins><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomElementsetAttributeNodeforexistingattributehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/Element/setAttributeNode-for-existing-attribute.html (200356 => 200357)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/Element/setAttributeNode-for-existing-attribute.html        2016-05-03 02:17:36 UTC (rev 200356)
+++ trunk/LayoutTests/fast/dom/Element/setAttributeNode-for-existing-attribute.html        2016-05-03 02:25:31 UTC (rev 200357)
</span><span class="lines">@@ -7,12 +7,12 @@
</span><span class="cx">         testRunner.dumpAsText();
</span><span class="cx">         
</span><span class="cx">     var testElement = document.getElementById('test');
</span><del>-    var testElementBgColor = testElement.style.background;
</del><ins>+    var testElementBgColor = testElement.style.backgroundColor;
</ins><span class="cx">     
</span><span class="cx">     var newAttr = document.createAttribute(&quot;STYLE&quot;);
</span><span class="cx">     newAttr.value = &quot;background-color: green&quot;;
</span><span class="cx">     testElement.setAttributeNode(newAttr);
</span><del>-    var testElementBgColorAfterReset = testElement.style.background;
</del><ins>+    var testElementBgColorAfterReset = testElement.style.backgroundColor;
</ins><span class="cx">     
</span><span class="cx">     document.getElementById('result').innerHTML = &quot;background-color specified with lowercase style attribute was: &quot;+testElementBgColor+&quot; and specified with uppercase style attribute is: &quot;+testElementBgColorAfterReset;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkLayoutTestsfastdombackgroundshorthandcsstextexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/background-shorthand-csstext-expected.txt (200356 => 200357)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/background-shorthand-csstext-expected.txt        2016-05-03 02:17:36 UTC (rev 200356)
+++ trunk/LayoutTests/fast/dom/background-shorthand-csstext-expected.txt        2016-05-03 02:25:31 UTC (rev 200357)
</span><span class="lines">@@ -1,6 +1,6 @@
</span><span class="cx"> This page tests whether or not the background shorthand properly omits initial values.
</span><span class="cx"> 
</span><span class="cx"> PASS: document.body.style.background == 'green' should be true and is.
</span><del>-PASS: document.getElementById('div1').style.background == 'repeat-x, repeat-y white' should be true and is.
</del><ins>+PASS: document.getElementById('div1').style.background == '' should be true and is.
</ins><span class="cx"> PASS: document.getElementById('div2').style.background == '50% 50% blue' should be true and is.
</span><span class="cx"> PASS: document.getElementById('div3').style.background == 'none repeat scroll rgb(255, 255, 255)' should be true and is.
</span></span></pre></div>
<a id="trunkLayoutTestsfastdombackgroundshorthandcsstexthtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/background-shorthand-csstext.html (200356 => 200357)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/background-shorthand-csstext.html        2016-05-03 02:17:36 UTC (rev 200356)
+++ trunk/LayoutTests/fast/dom/background-shorthand-csstext.html        2016-05-03 02:25:31 UTC (rev 200357)
</span><span class="lines">@@ -32,7 +32,7 @@
</span><span class="cx">         testRunner.dumpAsText();
</span><span class="cx">     
</span><span class="cx">     shouldBe(&quot;document.body.style.background == 'green'&quot;, true);
</span><del>-    shouldBe(&quot;document.getElementById('div1').style.background == 'repeat-x, repeat-y white'&quot;, true);
</del><ins>+    shouldBe(&quot;document.getElementById('div1').style.background == ''&quot;, true);
</ins><span class="cx">     shouldBe(&quot;document.getElementById('div2').style.background == '50% 50% blue'&quot;, true);
</span><span class="cx">     shouldBe(&quot;document.getElementById('div3').style.background == 'none repeat scroll rgb(255, 255, 255)'&quot;, true);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritycontentSecurityPolicyinlinestyleallowedwhilecloningobjectsexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/inline-style-allowed-while-cloning-objects-expected.txt (200356 => 200357)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/inline-style-allowed-while-cloning-objects-expected.txt        2016-05-03 02:17:36 UTC (rev 200356)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/inline-style-allowed-while-cloning-objects-expected.txt        2016-05-03 02:25:31 UTC (rev 200357)
</span><span class="lines">@@ -1,10 +1,10 @@
</span><span class="cx"> CONSOLE MESSAGE: line 1: Refused to apply a stylesheet because its hash, its nonce, or 'unsafe-inline' does not appear in the style-src directive of the Content Security Policy.
</span><span class="cx"> CONSOLE MESSAGE: line 79: Refused to apply a stylesheet because its hash, its nonce, or 'unsafe-inline' does not appear in the style-src directive of the Content Security Policy.
</span><span class="cx"> This test ensures that styles can be set by object.cloneNode()
</span><del>-PASS node1.style.background is &quot;yellow&quot;
-PASS node2.style.background is &quot;yellow&quot;
-PASS node3.style.background is &quot;blue&quot;
-PASS node4.style.background is &quot;blue&quot;
</del><ins>+PASS node1.style.backgroundColor is &quot;yellow&quot;
+PASS node2.style.backgroundColor is &quot;yellow&quot;
+PASS node3.style.backgroundColor is &quot;blue&quot;
+PASS node4.style.backgroundColor is &quot;blue&quot;
</ins><span class="cx"> PASS node1.style.color is &quot;red&quot;
</span><span class="cx"> PASS node2.style.color is &quot;red&quot;
</span><span class="cx"> PASS node3.style.color is &quot;green&quot;
</span></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritycontentSecurityPolicyinlinestyleallowedwhilecloningobjectshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/inline-style-allowed-while-cloning-objects.html (200356 => 200357)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/inline-style-allowed-while-cloning-objects.html        2016-05-03 02:17:36 UTC (rev 200356)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/inline-style-allowed-while-cloning-objects.html        2016-05-03 02:25:31 UTC (rev 200357)
</span><span class="lines">@@ -25,10 +25,10 @@
</span><span class="cx">             nodes.appendChild(node3);
</span><span class="cx">             nodes.appendChild(node4);
</span><span class="cx"> 
</span><del>-            shouldBeEqualToString(&quot;node1.style.background&quot;, &quot;yellow&quot;);
-            shouldBeEqualToString(&quot;node2.style.background&quot;, &quot;yellow&quot;);
-            shouldBeEqualToString(&quot;node3.style.background&quot;, &quot;blue&quot;);
-            shouldBeEqualToString(&quot;node4.style.background&quot;, &quot;blue&quot;);
</del><ins>+            shouldBeEqualToString(&quot;node1.style.backgroundColor&quot;, &quot;yellow&quot;);
+            shouldBeEqualToString(&quot;node2.style.backgroundColor&quot;, &quot;yellow&quot;);
+            shouldBeEqualToString(&quot;node3.style.backgroundColor&quot;, &quot;blue&quot;);
+            shouldBeEqualToString(&quot;node4.style.backgroundColor&quot;, &quot;blue&quot;);
</ins><span class="cx">   
</span><span class="cx">             shouldBeEqualToString(&quot;node1.style.color&quot;, &quot;red&quot;);
</span><span class="cx">             shouldBeEqualToString(&quot;node2.style.color&quot;, &quot;red&quot;);
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (200356 => 200357)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-05-03 02:17:36 UTC (rev 200356)
+++ trunk/Source/WebCore/ChangeLog        2016-05-03 02:25:31 UTC (rev 200357)
</span><span class="lines">@@ -1,3 +1,22 @@
</span><ins>+2016-05-02  Antoine Quint  &lt;graouts@apple.com&gt;
+
+        Specifying a longhand property should not serialize to a shorthand property
+        https://bugs.webkit.org/show_bug.cgi?id=157180
+
+        Reviewed by Dean Jackson.
+
+        Ensure that we don't serialize to a shorthand property when the required longhand components
+        are not specified, per http://www.w3.org/TR/cssom-1/#serialize-a-css-declaration-block.
+
+        Test: fast/css/no-shorthand-with-incomplete-longhands.html
+
+        * css/StyleProperties.cpp:
+        (WebCore::StyleProperties::getLayeredShorthandValue):
+        Returning an empty string here means that calling getPropertyValue() with
+        the shorthand property matching the currently processed longhand property
+        in asText() will return an empty string as well and the shorthand property
+        will be disregarded.
+
</ins><span class="cx"> 2016-05-02  Dean Jackson  &lt;dino@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         REGRESSION: Page layout of Manga/Picture books and all Fixed Layout ePubs corrupted
</span></span></pre></div>
<a id="trunkSourceWebCorecssStylePropertiescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleProperties.cpp (200356 => 200357)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleProperties.cpp        2016-05-03 02:17:36 UTC (rev 200356)
+++ trunk/Source/WebCore/css/StyleProperties.cpp        2016-05-03 02:25:31 UTC (rev 200357)
</span><span class="lines">@@ -382,14 +382,18 @@
</span><span class="cx"> 
</span><span class="cx">     for (unsigned i = 0; i &lt; size; ++i) {
</span><span class="cx">         values[i] = getPropertyCSSValueInternal(shorthand.properties()[i]);
</span><del>-        if (values[i]) {
-            if (values[i]-&gt;isVariableDependentValue())
-                return values[i]-&gt;cssText();
-            if (values[i]-&gt;isBaseValueList())
-                numLayers = std::max(downcast&lt;CSSValueList&gt;(*values[i]).length(), numLayers);
-            else
-                numLayers = std::max&lt;size_t&gt;(1U, numLayers);
</del><ins>+        if (!values[i]) {
+            // We don't have all longhand properties defined as required for the shorthand
+            // property and thus should not serialize to a shorthand value. See spec at
+            // http://www.w3.org/TR/cssom-1/#serialize-a-css-declaration-block.
+            return String();
</ins><span class="cx">         }
</span><ins>+        if (values[i]-&gt;isVariableDependentValue())
+            return values[i]-&gt;cssText();
+        if (values[i]-&gt;isBaseValueList())
+            numLayers = std::max(downcast&lt;CSSValueList&gt;(*values[i]).length(), numLayers);
+        else
+            numLayers = std::max&lt;size_t&gt;(1U, numLayers);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     String commonValue;
</span></span></pre>
</div>
</div>

</body>
</html>