<!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>[189646] 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/189646">189646</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2015-09-11 18:51:56 -0700 (Fri, 11 Sep 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>SVGColor custom text format is different from the CSS color custom text format
https://bugs.webkit.org/show_bug.cgi?id=148879
Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2015-09-11
Reviewed by Daniel Bates.
Source/WebCore:
Implement the serialization of a CSS color value as it is described in
<https://drafts.csswg.org/cssom/#serializing-css-values>. Add the new
function Color::cssText() which is refactored from the existing function
Color::serialized(). Use the new function for serializing the SVGColor
always and also for Color but only when the alpha component is not 1.
Test: svg/css/computed-style-rgb-color.html
* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText): Move the code
for serializing the color from this function to Color::cssText().
* platform/graphics/Color.cpp:
(WebCore::Color::serialized): Call Color::cssText() if the alpha component
is not 1 and delete the repeated code.
(WebCore::Color::cssText):
* platform/graphics/Color.h: Add the new function to the header file.
* svg/SVGColor.cpp:
(WebCore::SVGColor::customCSSText): Call Color::cssText() always instead
of calling Color::serialized() for serializing the SVGColor.
LayoutTests:
* fast/css/getComputedStyle/computed-style-expected.txt:
* fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* fast/css/parse-color-int-or-percent-crash.html:
* platform/mac/svg/webarchive/svg-script-subresouces-expected.txt:
* svg/css/case-sensitive-tags-expected.txt:
* svg/css/case-sensitive-tags.html:
* svg/css/getComputedStyle-basic-expected.txt:
* svg/css/script-tests/svg-attribute-parser-mode.js:
* svg/css/svg-attribute-parser-mode-expected.txt:
* svg/dom/SVGColor-expected.txt:
* svg/dom/SVGPaint-expected.txt:
* svg/dom/SVGStyleElement/disable-svg-style-element-expected.txt:
* svg/dom/SVGStyleElement/script-tests/disable-svg-style-element.js:
* svg/dom/script-tests/SVGColor.js:
* svg/dom/script-tests/SVGPaint.js:
* svg/webarchive/svg-script-subresouces-expected.webarchive:
* transitions/svg-transitions-expected.txt:
Fix expected results for existing tests
* svg/css/computed-style-rgb-color-expected.txt: Added.
* svg/css/computed-style-rgb-color.html: Added.
Ensure that the correct format is returned when getComputedStyle() is
called for an SVG color.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfastcssgetComputedStylecomputedstyleexpectedtxt">trunk/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcssgetComputedStylecomputedstylewithoutrendererexpectedtxt">trunk/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcssparsecolorintorpercentcrashhtml">trunk/LayoutTests/fast/css/parse-color-int-or-percent-crash.html</a></li>
<li><a href="#trunkLayoutTestsplatformmacsvgwebarchivesvgscriptsubresoucesexpectedtxt">trunk/LayoutTests/platform/mac/svg/webarchive/svg-script-subresouces-expected.txt</a></li>
<li><a href="#trunkLayoutTestssvgcsscasesensitivetagsexpectedtxt">trunk/LayoutTests/svg/css/case-sensitive-tags-expected.txt</a></li>
<li><a href="#trunkLayoutTestssvgcsscasesensitivetagshtml">trunk/LayoutTests/svg/css/case-sensitive-tags.html</a></li>
<li><a href="#trunkLayoutTestssvgcssgetComputedStylebasicexpectedtxt">trunk/LayoutTests/svg/css/getComputedStyle-basic-expected.txt</a></li>
<li><a href="#trunkLayoutTestssvgcssscripttestssvgattributeparsermodejs">trunk/LayoutTests/svg/css/script-tests/svg-attribute-parser-mode.js</a></li>
<li><a href="#trunkLayoutTestssvgcsssvgattributeparsermodeexpectedtxt">trunk/LayoutTests/svg/css/svg-attribute-parser-mode-expected.txt</a></li>
<li><a href="#trunkLayoutTestssvgdomSVGColorexpectedtxt">trunk/LayoutTests/svg/dom/SVGColor-expected.txt</a></li>
<li><a href="#trunkLayoutTestssvgdomSVGPaintexpectedtxt">trunk/LayoutTests/svg/dom/SVGPaint-expected.txt</a></li>
<li><a href="#trunkLayoutTestssvgdomSVGStyleElementdisablesvgstyleelementexpectedtxt">trunk/LayoutTests/svg/dom/SVGStyleElement/disable-svg-style-element-expected.txt</a></li>
<li><a href="#trunkLayoutTestssvgdomSVGStyleElementscripttestsdisablesvgstyleelementjs">trunk/LayoutTests/svg/dom/SVGStyleElement/script-tests/disable-svg-style-element.js</a></li>
<li><a href="#trunkLayoutTestssvgdomscripttestsSVGColorjs">trunk/LayoutTests/svg/dom/script-tests/SVGColor.js</a></li>
<li><a href="#trunkLayoutTestssvgdomscripttestsSVGPaintjs">trunk/LayoutTests/svg/dom/script-tests/SVGPaint.js</a></li>
<li><a href="#trunkLayoutTestssvgwebarchivesvgscriptsubresoucesexpectedwebarchive">trunk/LayoutTests/svg/webarchive/svg-script-subresouces-expected.webarchive</a></li>
<li><a href="#trunkLayoutTeststransitionssvgtransitionsexpectedtxt">trunk/LayoutTests/transitions/svg-transitions-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecssCSSPrimitiveValuecpp">trunk/Source/WebCore/css/CSSPrimitiveValue.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsColorcpp">trunk/Source/WebCore/platform/graphics/Color.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsColorh">trunk/Source/WebCore/platform/graphics/Color.h</a></li>
<li><a href="#trunkSourceWebCoresvgSVGColorcpp">trunk/Source/WebCore/svg/SVGColor.cpp</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestssvgcsscomputedstylergbcolorexpectedtxt">trunk/LayoutTests/svg/css/computed-style-rgb-color-expected.txt</a></li>
<li><a href="#trunkLayoutTestssvgcsscomputedstylergbcolorhtml">trunk/LayoutTests/svg/css/computed-style-rgb-color.html</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (189645 => 189646)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-09-12 00:57:43 UTC (rev 189645)
+++ trunk/LayoutTests/ChangeLog        2015-09-12 01:51:56 UTC (rev 189646)
</span><span class="lines">@@ -1,3 +1,34 @@
</span><ins>+2015-09-11 Said Abou-Hallawa <sabouhallawa@apple.com>
+
+ SVGColor custom text format is different from the CSS color custom text format
+ https://bugs.webkit.org/show_bug.cgi?id=148879
+
+ Reviewed by Daniel Bates.
+
+ * fast/css/getComputedStyle/computed-style-expected.txt:
+ * fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
+ * fast/css/parse-color-int-or-percent-crash.html:
+ * platform/mac/svg/webarchive/svg-script-subresouces-expected.txt:
+ * svg/css/case-sensitive-tags-expected.txt:
+ * svg/css/case-sensitive-tags.html:
+ * svg/css/getComputedStyle-basic-expected.txt:
+ * svg/css/script-tests/svg-attribute-parser-mode.js:
+ * svg/css/svg-attribute-parser-mode-expected.txt:
+ * svg/dom/SVGColor-expected.txt:
+ * svg/dom/SVGPaint-expected.txt:
+ * svg/dom/SVGStyleElement/disable-svg-style-element-expected.txt:
+ * svg/dom/SVGStyleElement/script-tests/disable-svg-style-element.js:
+ * svg/dom/script-tests/SVGColor.js:
+ * svg/dom/script-tests/SVGPaint.js:
+ * svg/webarchive/svg-script-subresouces-expected.webarchive:
+ * transitions/svg-transitions-expected.txt:
+ Fix expected results for existing tests
+
+ * svg/css/computed-style-rgb-color-expected.txt: Added.
+ * svg/css/computed-style-rgb-color.html: Added.
+ Ensure that the correct format is returned when getComputedStyle() is
+ called for an SVG color.
+
</ins><span class="cx"> 2015-09-11 Nan Wang <n_wang@apple.com>
</span><span class="cx">
</span><span class="cx"> AX: ARIA 1.1 @aria-current
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssgetComputedStylecomputedstyleexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt (189645 => 189646)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt        2015-09-12 00:57:43 UTC (rev 189645)
+++ trunk/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt        2015-09-12 01:51:56 UTC (rev 189646)
</span><span class="lines">@@ -237,7 +237,7 @@
</span><span class="cx"> color-interpolation: srgb;
</span><span class="cx"> color-interpolation-filters: linearrgb;
</span><span class="cx"> color-rendering: auto;
</span><del>-fill: #000000;
</del><ins>+fill: rgb(0, 0, 0);
</ins><span class="cx"> fill-opacity: 1;
</span><span class="cx"> fill-rule: nonzero;
</span><span class="cx"> marker-end: none;
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssgetComputedStylecomputedstylewithoutrendererexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt (189645 => 189646)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt        2015-09-12 00:57:43 UTC (rev 189645)
+++ trunk/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt        2015-09-12 01:51:56 UTC (rev 189646)
</span><span class="lines">@@ -236,7 +236,7 @@
</span><span class="cx"> color-interpolation: srgb
</span><span class="cx"> color-interpolation-filters: linearrgb
</span><span class="cx"> color-rendering: auto
</span><del>-fill: #000000
</del><ins>+fill: rgb(0, 0, 0)
</ins><span class="cx"> fill-opacity: 1
</span><span class="cx"> fill-rule: nonzero
</span><span class="cx"> marker-end: none
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssparsecolorintorpercentcrashhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css/parse-color-int-or-percent-crash.html (189645 => 189646)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/parse-color-int-or-percent-crash.html        2015-09-12 00:57:43 UTC (rev 189645)
+++ trunk/LayoutTests/fast/css/parse-color-int-or-percent-crash.html        2015-09-12 01:51:56 UTC (rev 189646)
</span><span class="lines">@@ -9,7 +9,7 @@
</span><span class="cx">
</span><span class="cx"> var colorString = "rgb(00000000000000000000";
</span><span class="cx"> stopElement.style.setProperty("stop-color", colorString);
</span><del>- document.body.innerHTML = stopElement.style.stopColor == "#0000ff" ? "PASS" : "FAIL";
</del><ins>+ document.body.innerHTML = stopElement.style.stopColor == "rgb(0, 0, 255)" ? "PASS" : "FAIL";
</ins><span class="cx"> </script>
</span><span class="cx"> </body>
</span><span class="cx"> </html>
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacsvgwebarchivesvgscriptsubresoucesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/svg/webarchive/svg-script-subresouces-expected.txt (189645 => 189646)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/svg/webarchive/svg-script-subresouces-expected.txt        2015-09-12 00:57:43 UTC (rev 189645)
+++ trunk/LayoutTests/platform/mac/svg/webarchive/svg-script-subresouces-expected.txt        2015-09-12 01:51:56 UTC (rev 189646)
</span><span class="lines">@@ -10,7 +10,7 @@
</span><span class="cx"> if (window.testRunner)
</span><span class="cx"> testRunner.dumpDOMAsWebArchive();
</span><span class="cx"> &lt;/script&gt;
</span><del>- &lt;rect id="rect" width="100" height="100" fill="red" style="fill: #008000;"/&gt;
</del><ins>+ &lt;rect id="rect" width="100" height="100" fill="red" style="fill: rgb(0, 128, 0);"/&gt;
</ins><span class="cx"> &lt;script xlink:href="resources/svg-script-subresources.js" type="text/ecmascript"/&gt;
</span><span class="cx"> &lt;/svg&gt;</string>
</span><span class="cx">                 <key>WebResourceFrameName</key>
</span></span></pre></div>
<a id="trunkLayoutTestssvgcsscasesensitivetagsexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/svg/css/case-sensitive-tags-expected.txt (189645 => 189646)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/css/case-sensitive-tags-expected.txt        2015-09-12 00:57:43 UTC (rev 189645)
+++ trunk/LayoutTests/svg/css/case-sensitive-tags-expected.txt        2015-09-12 01:51:56 UTC (rev 189646)
</span><span class="lines">@@ -5,9 +5,9 @@
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById("fo2")).color is "rgb(0, 128, 0)"
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById("fo3")).color is "rgb(0, 128, 0)"
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById("fo4")).color is "rgb(0, 128, 0)"
</span><del>-PASS window.getComputedStyle(document.getElementById("circle1")).fill is "#008000"
-PASS window.getComputedStyle(document.getElementById("circle2")).fill is "#008000"
-PASS window.getComputedStyle(document.getElementById("circle3")).fill is "#008000"
</del><ins>+PASS window.getComputedStyle(document.getElementById("circle1")).fill is "rgb(0, 128, 0)"
+PASS window.getComputedStyle(document.getElementById("circle2")).fill is "rgb(0, 128, 0)"
+PASS window.getComputedStyle(document.getElementById("circle3")).fill is "rgb(0, 128, 0)"
</ins><span class="cx"> PASS window.getComputedStyle(document.getElementById("stop1")).stopColor is "rgb(0, 128, 0)"
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById("stop2")).stopColor is "rgb(0, 128, 0)"
</span><span class="cx"> PASS window.getComputedStyle(document.getElementById("stop3")).stopColor is "rgb(0, 128, 0)"
</span></span></pre></div>
<a id="trunkLayoutTestssvgcsscasesensitivetagshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/svg/css/case-sensitive-tags.html (189645 => 189646)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/css/case-sensitive-tags.html        2015-09-12 00:57:43 UTC (rev 189645)
+++ trunk/LayoutTests/svg/css/case-sensitive-tags.html        2015-09-12 01:51:56 UTC (rev 189646)
</span><span class="lines">@@ -181,7 +181,7 @@
</span><span class="cx"> }
</span><span class="cx"> checkStyle("div", 3, "color", "rgb(0, 128, 0)");
</span><span class="cx"> checkStyle("fo", 4, "color", "rgb(0, 128, 0)");
</span><del>- checkStyle("circle", 3, "fill", "#008000");
</del><ins>+ checkStyle("circle", 3, "fill", "rgb(0, 128, 0)");
</ins><span class="cx"> checkStyle("stop", 8, "stopColor", "rgb(0, 128, 0)");
</span><span class="cx">
</span><span class="cx"> document.getElementById("container").style.display = "none";
</span></span></pre></div>
<a id="trunkLayoutTestssvgcsscomputedstylergbcolorexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/svg/css/computed-style-rgb-color-expected.txt (0 => 189646)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/css/computed-style-rgb-color-expected.txt         (rev 0)
+++ trunk/LayoutTests/svg/css/computed-style-rgb-color-expected.txt        2015-09-12 01:51:56 UTC (rev 189646)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+PASS getComputedStyle(document.querySelector('div.fully-opaque')).backgroundColor is "rgb(0, 128, 0)"
+PASS getComputedStyle(document.querySelector('div.fully-transparent')).backgroundColor is "rgba(0, 0, 0, 0)"
+PASS getComputedStyle(document.querySelector('div.half-transparent')).backgroundColor is "rgba(0, 128, 0, 0.4)"
+PASS getComputedStyle(document.querySelector('svg>rect#fully-opaque')).fill is "rgb(0, 128, 0)"
+PASS getComputedStyle(document.querySelector('svg>rect#fully-transparent')).fill is "none"
+PASS getComputedStyle(document.querySelector('svg>rect#half-transparent')).fill is "rgba(0, 128, 0, 0.4)"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
+
</ins></span></pre></div>
<a id="trunkLayoutTestssvgcsscomputedstylergbcolorhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/svg/css/computed-style-rgb-color.html (0 => 189646)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/css/computed-style-rgb-color.html         (rev 0)
+++ trunk/LayoutTests/svg/css/computed-style-rgb-color.html        2015-09-12 01:51:56 UTC (rev 189646)
</span><span class="lines">@@ -0,0 +1,42 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+ <style>
+ div {
+ width: 100px;
+ height: 100px;
+ display: inline-block;
+ }
+ .fully-opaque {
+ background-color: green;
+ }
+ .fully-transparent {
+ background-color: transparent;
+ }
+ .half-transparent {
+ background-color: rgba(0, 128, 0, 0.4);
+ }
+ </style>
+ <script src="../../resources/js-test-pre.js"></script>
+</head>
+<body>
+ <div class="fully-opaque"></div>
+ <div class="fully-transparent"></div>
+ <div class="half-transparent"></div>
+ <br>
+ <svg width="400">
+ <rect id="fully-opaque" width="100" height="100" fill="green"/>
+ <rect id="fully-transparent" x="104" width="100" height="100" fill="none"/>
+ <rect id="half-transparent" x="208" width="100" height="100" fill="rgba(0, 128, 0, 0.4)"/>
+ </svg>
+ <script>
+ shouldBeEqualToString("getComputedStyle(document.querySelector('div.fully-opaque')).backgroundColor", "rgb(0, 128, 0)");
+ shouldBeEqualToString("getComputedStyle(document.querySelector('div.fully-transparent')).backgroundColor", "rgba(0, 0, 0, 0)");
+ shouldBeEqualToString("getComputedStyle(document.querySelector('div.half-transparent')).backgroundColor", "rgba(0, 128, 0, 0.4)");
+ shouldBeEqualToString("getComputedStyle(document.querySelector('svg>rect#fully-opaque')).fill", "rgb(0, 128, 0)");
+ shouldBeEqualToString("getComputedStyle(document.querySelector('svg>rect#fully-transparent')).fill", "none");
+ shouldBeEqualToString("getComputedStyle(document.querySelector('svg>rect#half-transparent')).fill", "rgba(0, 128, 0, 0.4)");
+ </script>
+ <script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestssvgcssgetComputedStylebasicexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/svg/css/getComputedStyle-basic-expected.txt (189645 => 189646)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/css/getComputedStyle-basic-expected.txt        2015-09-12 00:57:43 UTC (rev 189645)
+++ trunk/LayoutTests/svg/css/getComputedStyle-basic-expected.txt        2015-09-12 01:51:56 UTC (rev 189646)
</span><span class="lines">@@ -472,7 +472,7 @@
</span><span class="cx"> rect: style.getPropertyCSSValue(color-interpolation-filters) : [object CSSPrimitiveValue]
</span><span class="cx"> rect: style.getPropertyValue(color-rendering) : auto
</span><span class="cx"> rect: style.getPropertyCSSValue(color-rendering) : [object CSSPrimitiveValue]
</span><del>-rect: style.getPropertyValue(fill) : #0000ff
</del><ins>+rect: style.getPropertyValue(fill) : rgb(0, 0, 255)
</ins><span class="cx"> rect: style.getPropertyCSSValue(fill) : [object SVGPaint]
</span><span class="cx"> rect: style.getPropertyValue(fill-opacity) : 1
</span><span class="cx"> rect: style.getPropertyCSSValue(fill-opacity) : [object CSSPrimitiveValue]
</span><span class="lines">@@ -486,7 +486,7 @@
</span><span class="cx"> rect: style.getPropertyCSSValue(marker-start) : [object CSSPrimitiveValue]
</span><span class="cx"> rect: style.getPropertyValue(shape-rendering) : auto
</span><span class="cx"> rect: style.getPropertyCSSValue(shape-rendering) : [object CSSPrimitiveValue]
</span><del>-rect: style.getPropertyValue(stroke) : #ffa500
</del><ins>+rect: style.getPropertyValue(stroke) : rgb(255, 165, 0)
</ins><span class="cx"> rect: style.getPropertyCSSValue(stroke) : [object SVGPaint]
</span><span class="cx"> rect: style.getPropertyValue(stroke-dasharray) : none
</span><span class="cx"> rect: style.getPropertyCSSValue(stroke-dasharray) : [object CSSPrimitiveValue]
</span><span class="lines">@@ -996,7 +996,7 @@
</span><span class="cx"> g: style.getPropertyCSSValue(color-interpolation-filters) : [object CSSPrimitiveValue]
</span><span class="cx"> g: style.getPropertyValue(color-rendering) : auto
</span><span class="cx"> g: style.getPropertyCSSValue(color-rendering) : [object CSSPrimitiveValue]
</span><del>-g: style.getPropertyValue(fill) : #000000
</del><ins>+g: style.getPropertyValue(fill) : rgb(0, 0, 0)
</ins><span class="cx"> g: style.getPropertyCSSValue(fill) : [object SVGPaint]
</span><span class="cx"> g: style.getPropertyValue(fill-opacity) : 1
</span><span class="cx"> g: style.getPropertyCSSValue(fill-opacity) : [object CSSPrimitiveValue]
</span><span class="lines">@@ -1010,7 +1010,7 @@
</span><span class="cx"> g: style.getPropertyCSSValue(marker-start) : [object CSSPrimitiveValue]
</span><span class="cx"> g: style.getPropertyValue(shape-rendering) : auto
</span><span class="cx"> g: style.getPropertyCSSValue(shape-rendering) : [object CSSPrimitiveValue]
</span><del>-g: style.getPropertyValue(stroke) : #ffa500
</del><ins>+g: style.getPropertyValue(stroke) : rgb(255, 165, 0)
</ins><span class="cx"> g: style.getPropertyCSSValue(stroke) : [object SVGPaint]
</span><span class="cx"> g: style.getPropertyValue(stroke-dasharray) : none
</span><span class="cx"> g: style.getPropertyCSSValue(stroke-dasharray) : [object CSSPrimitiveValue]
</span></span></pre></div>
<a id="trunkLayoutTestssvgcssscripttestssvgattributeparsermodejs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/svg/css/script-tests/svg-attribute-parser-mode.js (189645 => 189646)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/css/script-tests/svg-attribute-parser-mode.js        2015-09-12 00:57:43 UTC (rev 189645)
+++ trunk/LayoutTests/svg/css/script-tests/svg-attribute-parser-mode.js        2015-09-12 01:51:56 UTC (rev 189646)
</span><span class="lines">@@ -12,55 +12,55 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx"> // Testing 'fill'
</span><del>-// The default for fill is #000000.
-shouldBeEqualToString("document.defaultView.getComputedStyle(rect, null).fill", "#000000");
</del><ins>+// The default for fill is black.
+shouldBeEqualToString("document.defaultView.getComputedStyle(rect, null).fill", "rgb(0, 0, 0)");
</ins><span class="cx">
</span><span class="cx"> // Set the fill color to green.
</span><span class="cx"> rect.setAttribute("fill", "green");
</span><del>-shouldBeEqualToString("document.defaultView.getComputedStyle(rect, null).fill", "#008000");
</del><ins>+shouldBeEqualToString("document.defaultView.getComputedStyle(rect, null).fill", "rgb(0, 128, 0)");
</ins><span class="cx">
</span><span class="cx"> // Set following colors should be invalid.
</span><span class="cx"> rect.setAttribute("fill", "f00");
</span><span class="cx"> shouldBeNull("document.defaultView.getComputedStyle(rect, null).fill");
</span><span class="cx"> // Reset to green.
</span><span class="cx"> rect.setAttribute("fill", "green");
</span><del>-shouldBeEqualToString("document.defaultView.getComputedStyle(rect, null).fill", "#008000");
</del><ins>+shouldBeEqualToString("document.defaultView.getComputedStyle(rect, null).fill", "rgb(0, 128, 0)");
</ins><span class="cx">
</span><span class="cx"> rect.setAttribute("fill", "ff00");
</span><span class="cx"> shouldBeNull("document.defaultView.getComputedStyle(rect, null).fill");
</span><span class="cx"> // Reset to green.
</span><span class="cx"> rect.setAttribute("fill", "green");
</span><del>-shouldBeEqualToString("document.defaultView.getComputedStyle(rect, null).fill", "#008000");
</del><ins>+shouldBeEqualToString("document.defaultView.getComputedStyle(rect, null).fill", "rgb(0, 128, 0)");
</ins><span class="cx">
</span><span class="cx"> rect.setAttribute("fill", "ff0000");
</span><span class="cx"> shouldBeNull("document.defaultView.getComputedStyle(rect, null).fill");
</span><span class="cx"> // Reset to green.
</span><span class="cx"> rect.setAttribute("fill", "green");
</span><del>-shouldBeEqualToString("document.defaultView.getComputedStyle(rect, null).fill", "#008000");
</del><ins>+shouldBeEqualToString("document.defaultView.getComputedStyle(rect, null).fill", "rgb(0, 128, 0)");
</ins><span class="cx">
</span><span class="cx"> rect.setAttribute("fill", "ff00");
</span><span class="cx"> shouldBeNull("document.defaultView.getComputedStyle(rect, null).fill");
</span><span class="cx"> // Reset to green.
</span><span class="cx"> rect.setAttribute("fill", "green");
</span><del>-shouldBeEqualToString("document.defaultView.getComputedStyle(rect, null).fill", "#008000");
</del><ins>+shouldBeEqualToString("document.defaultView.getComputedStyle(rect, null).fill", "rgb(0, 128, 0)");
</ins><span class="cx">
</span><span class="cx"> rect.setAttribute("fill", "");
</span><del>-shouldBeEqualToString("document.defaultView.getComputedStyle(rect, null).fill", "#000000");
</del><ins>+shouldBeEqualToString("document.defaultView.getComputedStyle(rect, null).fill", "rgb(0, 0, 0)");
</ins><span class="cx"> // Reset to green.
</span><span class="cx"> rect.setAttribute("fill", "green");
</span><del>-shouldBeEqualToString("document.defaultView.getComputedStyle(rect, null).fill", "#008000");
</del><ins>+shouldBeEqualToString("document.defaultView.getComputedStyle(rect, null).fill", "rgb(0, 128, 0)");
</ins><span class="cx">
</span><span class="cx"> rect.setAttribute("fill", "url(#reference)");
</span><span class="cx"> shouldBeEqualToString("document.defaultView.getComputedStyle(rect, null).fill", "url(#reference)");
</span><span class="cx"> // Reset to green.
</span><span class="cx"> rect.setAttribute("fill", "green");
</span><del>-shouldBeEqualToString("document.defaultView.getComputedStyle(rect, null).fill", "#008000");
</del><ins>+shouldBeEqualToString("document.defaultView.getComputedStyle(rect, null).fill", "rgb(0, 128, 0)");
</ins><span class="cx">
</span><span class="cx"> rect.setAttribute("fill", "url(#reference) green");
</span><del>-shouldBeEqualToString("document.defaultView.getComputedStyle(rect, null).fill", "url(#reference) #008000");
</del><ins>+shouldBeEqualToString("document.defaultView.getComputedStyle(rect, null).fill", "url(#reference) rgb(0, 128, 0)");
</ins><span class="cx"> // Reset to green.
</span><span class="cx"> rect.setAttribute("fill", "green");
</span><del>-shouldBeEqualToString("document.defaultView.getComputedStyle(rect, null).fill", "#008000");
</del><ins>+shouldBeEqualToString("document.defaultView.getComputedStyle(rect, null).fill", "rgb(0, 128, 0)");
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx"> // Testing 'stroke'
</span><span class="lines">@@ -69,50 +69,50 @@
</span><span class="cx">
</span><span class="cx"> // Set the stroke color to green.
</span><span class="cx"> rect.setAttribute("stroke", "green");
</span><del>-shouldBeEqualToString("document.defaultView.getComputedStyle(rect, null).stroke", "#008000");
</del><ins>+shouldBeEqualToString("document.defaultView.getComputedStyle(rect, null).stroke", "rgb(0, 128, 0)");
</ins><span class="cx">
</span><span class="cx"> // Set following colors should be invalid.
</span><span class="cx"> rect.setAttribute("stroke", "f00");
</span><span class="cx"> shouldBeNull("document.defaultView.getComputedStyle(rect, null).stroke");
</span><span class="cx"> // Reset to green.
</span><span class="cx"> rect.setAttribute("stroke", "green");
</span><del>-shouldBeEqualToString("document.defaultView.getComputedStyle(rect, null).stroke", "#008000");
</del><ins>+shouldBeEqualToString("document.defaultView.getComputedStyle(rect, null).stroke", "rgb(0, 128, 0)");
</ins><span class="cx">
</span><span class="cx"> rect.setAttribute("stroke", "ff00");
</span><span class="cx"> shouldBeNull("document.defaultView.getComputedStyle(rect, null).stroke");
</span><span class="cx"> // Reset to green.
</span><span class="cx"> rect.setAttribute("stroke", "green");
</span><del>-shouldBeEqualToString("document.defaultView.getComputedStyle(rect, null).stroke", "#008000");
</del><ins>+shouldBeEqualToString("document.defaultView.getComputedStyle(rect, null).stroke", "rgb(0, 128, 0)");
</ins><span class="cx">
</span><span class="cx"> rect.setAttribute("stroke", "ff0000");
</span><span class="cx"> shouldBeNull("document.defaultView.getComputedStyle(rect, null).stroke");
</span><span class="cx"> // Reset to green.
</span><span class="cx"> rect.setAttribute("stroke", "green");
</span><del>-shouldBeEqualToString("document.defaultView.getComputedStyle(rect, null).stroke", "#008000");
</del><ins>+shouldBeEqualToString("document.defaultView.getComputedStyle(rect, null).stroke", "rgb(0, 128, 0)");
</ins><span class="cx">
</span><span class="cx"> rect.setAttribute("stroke", "ff00");
</span><span class="cx"> shouldBeNull("document.defaultView.getComputedStyle(rect, null).stroke");
</span><span class="cx"> // Reset to green.
</span><span class="cx"> rect.setAttribute("stroke", "green");
</span><del>-shouldBeEqualToString("document.defaultView.getComputedStyle(rect, null).stroke", "#008000");
</del><ins>+shouldBeEqualToString("document.defaultView.getComputedStyle(rect, null).stroke", "rgb(0, 128, 0)");
</ins><span class="cx">
</span><span class="cx"> rect.setAttribute("stroke", "");
</span><span class="cx"> shouldBeEqualToString("document.defaultView.getComputedStyle(rect, null).stroke", "none");
</span><span class="cx"> // Reset to green.
</span><span class="cx"> rect.setAttribute("stroke", "green");
</span><del>-shouldBeEqualToString("document.defaultView.getComputedStyle(rect, null).stroke", "#008000");
</del><ins>+shouldBeEqualToString("document.defaultView.getComputedStyle(rect, null).stroke", "rgb(0, 128, 0)");
</ins><span class="cx">
</span><span class="cx"> rect.setAttribute("stroke", "url(#reference)");
</span><span class="cx"> shouldBeEqualToString("document.defaultView.getComputedStyle(rect, null).stroke", "url(#reference)");
</span><span class="cx"> // Reset to green.
</span><span class="cx"> rect.setAttribute("stroke", "green");
</span><del>-shouldBeEqualToString("document.defaultView.getComputedStyle(rect, null).stroke", "#008000");
</del><ins>+shouldBeEqualToString("document.defaultView.getComputedStyle(rect, null).stroke", "rgb(0, 128, 0)");
</ins><span class="cx">
</span><span class="cx"> rect.setAttribute("stroke", "url(#reference) green");
</span><del>-shouldBeEqualToString("document.defaultView.getComputedStyle(rect, null).stroke", "url(#reference) #008000");
</del><ins>+shouldBeEqualToString("document.defaultView.getComputedStyle(rect, null).stroke", "url(#reference) rgb(0, 128, 0)");
</ins><span class="cx"> // Reset to green.
</span><span class="cx"> rect.setAttribute("stroke", "green");
</span><del>-shouldBeEqualToString("document.defaultView.getComputedStyle(rect, null).stroke", "#008000");
</del><ins>+shouldBeEqualToString("document.defaultView.getComputedStyle(rect, null).stroke", "rgb(0, 128, 0)");
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx"> // Testing 'color'
</span></span></pre></div>
<a id="trunkLayoutTestssvgcsssvgattributeparsermodeexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/svg/css/svg-attribute-parser-mode-expected.txt (189645 => 189646)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/css/svg-attribute-parser-mode-expected.txt        2015-09-12 00:57:43 UTC (rev 189645)
+++ trunk/LayoutTests/svg/css/svg-attribute-parser-mode-expected.txt        2015-09-12 01:51:56 UTC (rev 189646)
</span><span class="lines">@@ -3,38 +3,38 @@
</span><span class="cx"> On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
</span><span class="cx">
</span><span class="cx">
</span><del>-PASS document.defaultView.getComputedStyle(rect, null).fill is "#000000"
-PASS document.defaultView.getComputedStyle(rect, null).fill is "#008000"
</del><ins>+PASS document.defaultView.getComputedStyle(rect, null).fill is "rgb(0, 0, 0)"
+PASS document.defaultView.getComputedStyle(rect, null).fill is "rgb(0, 128, 0)"
</ins><span class="cx"> PASS document.defaultView.getComputedStyle(rect, null).fill is null
</span><del>-PASS document.defaultView.getComputedStyle(rect, null).fill is "#008000"
</del><ins>+PASS document.defaultView.getComputedStyle(rect, null).fill is "rgb(0, 128, 0)"
</ins><span class="cx"> PASS document.defaultView.getComputedStyle(rect, null).fill is null
</span><del>-PASS document.defaultView.getComputedStyle(rect, null).fill is "#008000"
</del><ins>+PASS document.defaultView.getComputedStyle(rect, null).fill is "rgb(0, 128, 0)"
</ins><span class="cx"> PASS document.defaultView.getComputedStyle(rect, null).fill is null
</span><del>-PASS document.defaultView.getComputedStyle(rect, null).fill is "#008000"
</del><ins>+PASS document.defaultView.getComputedStyle(rect, null).fill is "rgb(0, 128, 0)"
</ins><span class="cx"> PASS document.defaultView.getComputedStyle(rect, null).fill is null
</span><del>-PASS document.defaultView.getComputedStyle(rect, null).fill is "#008000"
-PASS document.defaultView.getComputedStyle(rect, null).fill is "#000000"
-PASS document.defaultView.getComputedStyle(rect, null).fill is "#008000"
</del><ins>+PASS document.defaultView.getComputedStyle(rect, null).fill is "rgb(0, 128, 0)"
+PASS document.defaultView.getComputedStyle(rect, null).fill is "rgb(0, 0, 0)"
+PASS document.defaultView.getComputedStyle(rect, null).fill is "rgb(0, 128, 0)"
</ins><span class="cx"> PASS document.defaultView.getComputedStyle(rect, null).fill is "url(#reference)"
</span><del>-PASS document.defaultView.getComputedStyle(rect, null).fill is "#008000"
-PASS document.defaultView.getComputedStyle(rect, null).fill is "url(#reference) #008000"
-PASS document.defaultView.getComputedStyle(rect, null).fill is "#008000"
</del><ins>+PASS document.defaultView.getComputedStyle(rect, null).fill is "rgb(0, 128, 0)"
+PASS document.defaultView.getComputedStyle(rect, null).fill is "url(#reference) rgb(0, 128, 0)"
+PASS document.defaultView.getComputedStyle(rect, null).fill is "rgb(0, 128, 0)"
</ins><span class="cx"> PASS document.defaultView.getComputedStyle(rect, null).stroke is "none"
</span><del>-PASS document.defaultView.getComputedStyle(rect, null).stroke is "#008000"
</del><ins>+PASS document.defaultView.getComputedStyle(rect, null).stroke is "rgb(0, 128, 0)"
</ins><span class="cx"> PASS document.defaultView.getComputedStyle(rect, null).stroke is null
</span><del>-PASS document.defaultView.getComputedStyle(rect, null).stroke is "#008000"
</del><ins>+PASS document.defaultView.getComputedStyle(rect, null).stroke is "rgb(0, 128, 0)"
</ins><span class="cx"> PASS document.defaultView.getComputedStyle(rect, null).stroke is null
</span><del>-PASS document.defaultView.getComputedStyle(rect, null).stroke is "#008000"
</del><ins>+PASS document.defaultView.getComputedStyle(rect, null).stroke is "rgb(0, 128, 0)"
</ins><span class="cx"> PASS document.defaultView.getComputedStyle(rect, null).stroke is null
</span><del>-PASS document.defaultView.getComputedStyle(rect, null).stroke is "#008000"
</del><ins>+PASS document.defaultView.getComputedStyle(rect, null).stroke is "rgb(0, 128, 0)"
</ins><span class="cx"> PASS document.defaultView.getComputedStyle(rect, null).stroke is null
</span><del>-PASS document.defaultView.getComputedStyle(rect, null).stroke is "#008000"
</del><ins>+PASS document.defaultView.getComputedStyle(rect, null).stroke is "rgb(0, 128, 0)"
</ins><span class="cx"> PASS document.defaultView.getComputedStyle(rect, null).stroke is "none"
</span><del>-PASS document.defaultView.getComputedStyle(rect, null).stroke is "#008000"
</del><ins>+PASS document.defaultView.getComputedStyle(rect, null).stroke is "rgb(0, 128, 0)"
</ins><span class="cx"> PASS document.defaultView.getComputedStyle(rect, null).stroke is "url(#reference)"
</span><del>-PASS document.defaultView.getComputedStyle(rect, null).stroke is "#008000"
-PASS document.defaultView.getComputedStyle(rect, null).stroke is "url(#reference) #008000"
-PASS document.defaultView.getComputedStyle(rect, null).stroke is "#008000"
</del><ins>+PASS document.defaultView.getComputedStyle(rect, null).stroke is "rgb(0, 128, 0)"
+PASS document.defaultView.getComputedStyle(rect, null).stroke is "url(#reference) rgb(0, 128, 0)"
+PASS document.defaultView.getComputedStyle(rect, null).stroke is "rgb(0, 128, 0)"
</ins><span class="cx"> PASS document.defaultView.getComputedStyle(rect, null).color is "rgb(0, 0, 0)"
</span><span class="cx"> PASS document.defaultView.getComputedStyle(rect, null).color is "rgb(0, 128, 0)"
</span><span class="cx"> PASS document.defaultView.getComputedStyle(rect, null).color is "rgb(0, 0, 0)"
</span></span></pre></div>
<a id="trunkLayoutTestssvgdomSVGColorexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/svg/dom/SVGColor-expected.txt (189645 => 189646)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/dom/SVGColor-expected.txt        2015-09-12 00:57:43 UTC (rev 189645)
+++ trunk/LayoutTests/svg/dom/SVGColor-expected.txt        2015-09-12 01:51:56 UTC (rev 189646)
</span><span class="lines">@@ -11,7 +11,7 @@
</span><span class="cx"> PASS rgbColor.red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 255
</span><span class="cx"> PASS rgbColor.green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
</span><span class="cx"> PASS rgbColor.blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
</span><del>-PASS stopElement.style.stopColor is "#ff0000"
</del><ins>+PASS stopElement.style.stopColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS document.defaultView.getComputedStyle(stopElement).stopColor is "rgb(255, 0, 0)"
</span><span class="cx">
</span><span class="cx"> Try invalid arguments for setColor()
</span><span class="lines">@@ -25,7 +25,7 @@
</span><span class="cx"> Try assigning to the readonly colorType property, which silently fails
</span><span class="cx"> PASS stopColor.colorType = SVGColor.SVG_COLORTYPE_UNKKNOWN; is undefined.
</span><span class="cx"> PASS stopColor.colorType is SVGColor.SVG_COLORTYPE_RGBCOLOR
</span><del>-PASS stopElement.style.stopColor is "#ff0000"
</del><ins>+PASS stopElement.style.stopColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS document.defaultView.getComputedStyle(stopElement).stopColor is "rgb(255, 0, 0)"
</span><span class="cx">
</span><span class="cx"> Test using setColor() and SVG_COLORTYPE_UNKNOWN
</span><span class="lines">@@ -42,7 +42,7 @@
</span><span class="cx"> PASS rgbColor.red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 255
</span><span class="cx"> PASS rgbColor.green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
</span><span class="cx"> PASS rgbColor.blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
</span><del>-PASS stopElement.style.stopColor is "#ff0000"
</del><ins>+PASS stopElement.style.stopColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS document.defaultView.getComputedStyle(stopElement).stopColor is "rgb(255, 0, 0)"
</span><span class="cx">
</span><span class="cx"> Test using setColor() and SVG_COLORTYPE_CURRENTCOLOR
</span><span class="lines">@@ -53,7 +53,7 @@
</span><span class="cx"> PASS rgbColor.red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 255
</span><span class="cx"> PASS rgbColor.green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
</span><span class="cx"> PASS rgbColor.blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
</span><del>-PASS stopElement.style.stopColor is "#ff0000"
</del><ins>+PASS stopElement.style.stopColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS document.defaultView.getComputedStyle(stopElement).stopColor is "rgb(255, 0, 0)"
</span><span class="cx">
</span><span class="cx"> Test using setColor() and SVG_COLORTYPE_RGBCOLOR
</span></span></pre></div>
<a id="trunkLayoutTestssvgdomSVGPaintexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/svg/dom/SVGPaint-expected.txt (189645 => 189646)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/dom/SVGPaint-expected.txt        2015-09-12 00:57:43 UTC (rev 189645)
+++ trunk/LayoutTests/svg/dom/SVGPaint-expected.txt        2015-09-12 01:51:56 UTC (rev 189646)
</span><span class="lines">@@ -13,8 +13,8 @@
</span><span class="cx"> PASS fillColor.red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
</span><span class="cx"> PASS fillColor.green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 128
</span><span class="cx"> PASS fillColor.blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
</span><del>-PASS rectElement.style.fill is "#008000"
-PASS document.defaultView.getComputedStyle(rectElement).fill is "#008000"
</del><ins>+PASS rectElement.style.fill is "rgb(0, 128, 0)"
+PASS document.defaultView.getComputedStyle(rectElement).fill is "rgb(0, 128, 0)"
</ins><span class="cx">
</span><span class="cx"> Try invalid arguments for setPaint()
</span><span class="cx"> PASS fillPaint.setPaint(null, null, null, null) threw exception Error: NoModificationAllowedError: DOM Exception 7.
</span><span class="lines">@@ -32,8 +32,8 @@
</span><span class="cx"> Try assigning to the readonly paintType property, which silently fails
</span><span class="cx"> PASS fillPaint.paintType = SVGPaint.SVG_PAINTTYPE_UNKKNOWN; is undefined.
</span><span class="cx"> PASS fillPaint.paintType is SVGPaint.SVG_PAINTTYPE_RGBCOLOR
</span><del>-PASS rectElement.style.fill is "#008000"
-PASS document.defaultView.getComputedStyle(rectElement).fill is "#008000"
</del><ins>+PASS rectElement.style.fill is "rgb(0, 128, 0)"
+PASS document.defaultView.getComputedStyle(rectElement).fill is "rgb(0, 128, 0)"
</ins><span class="cx">
</span><span class="cx"> Test using setPaint() and SVG_PAINTTYPE_UNKNOWN
</span><span class="cx"> PASS fillPaint.setPaint(SVGPaint.SVG_PAINTTYPE_UNKKNOWN, '', '', '') threw exception Error: NoModificationAllowedError: DOM Exception 7.
</span><span class="lines">@@ -45,73 +45,73 @@
</span><span class="cx"> Test using setPaint() and SVG_PAINTTYPE_NONE - a
</span><span class="cx"> PASS fillPaint.setPaint(SVGPaint.SVG_PAINTTYPE_NONE, '', '', '') threw exception Error: NoModificationAllowedError: DOM Exception 7.
</span><span class="cx"> PASS fillPaint.paintType is SVGPaint.SVG_PAINTTYPE_RGBCOLOR
</span><del>-PASS rectElement.style.fill is "#008000"
-PASS document.defaultView.getComputedStyle(rectElement).fill is "#008000"
</del><ins>+PASS rectElement.style.fill is "rgb(0, 128, 0)"
+PASS document.defaultView.getComputedStyle(rectElement).fill is "rgb(0, 128, 0)"
</ins><span class="cx">
</span><span class="cx"> Reset style to initial value
</span><span class="cx"> PASS (fillPaint = rectElement.style.getPropertyCSSValue('fill')).toString() is "[object SVGPaint]"
</span><span class="cx"> PASS fillPaint.paintType is SVGPaint.SVG_PAINTTYPE_RGBCOLOR
</span><del>-PASS rectElement.style.fill is "#008000"
-PASS document.defaultView.getComputedStyle(rectElement).fill is "#008000"
</del><ins>+PASS rectElement.style.fill is "rgb(0, 128, 0)"
+PASS document.defaultView.getComputedStyle(rectElement).fill is "rgb(0, 128, 0)"
</ins><span class="cx">
</span><span class="cx"> Test using setPaint() and SVG_PAINTTYPE_NONE - b
</span><span class="cx"> PASS fillPaint.setPaint(SVGPaint.SVG_PAINTTYPE_NONE, 'url(#foo)', '', '') threw exception Error: NoModificationAllowedError: DOM Exception 7.
</span><span class="cx"> PASS fillPaint.paintType is SVGPaint.SVG_PAINTTYPE_RGBCOLOR
</span><del>-PASS rectElement.style.fill is "#008000"
-PASS document.defaultView.getComputedStyle(rectElement).fill is "#008000"
</del><ins>+PASS rectElement.style.fill is "rgb(0, 128, 0)"
+PASS document.defaultView.getComputedStyle(rectElement).fill is "rgb(0, 128, 0)"
</ins><span class="cx">
</span><span class="cx"> Reset style to initial value
</span><span class="cx"> PASS (fillPaint = rectElement.style.getPropertyCSSValue('fill')).toString() is "[object SVGPaint]"
</span><span class="cx"> PASS fillPaint.paintType is SVGPaint.SVG_PAINTTYPE_RGBCOLOR
</span><del>-PASS rectElement.style.fill is "#008000"
-PASS document.defaultView.getComputedStyle(rectElement).fill is "#008000"
</del><ins>+PASS rectElement.style.fill is "rgb(0, 128, 0)"
+PASS document.defaultView.getComputedStyle(rectElement).fill is "rgb(0, 128, 0)"
</ins><span class="cx">
</span><span class="cx"> Test using setPaint() and SVG_PAINTTYPE_NONE - c
</span><span class="cx"> PASS fillPaint.setPaint(SVGPaint.SVG_PAINTTYPE_NONE, '', 'rgb(0,128,128)', '') threw exception Error: NoModificationAllowedError: DOM Exception 7.
</span><span class="cx"> PASS fillPaint.paintType is SVGPaint.SVG_PAINTTYPE_RGBCOLOR
</span><del>-PASS rectElement.style.fill is "#008000"
-PASS document.defaultView.getComputedStyle(rectElement).fill is "#008000"
</del><ins>+PASS rectElement.style.fill is "rgb(0, 128, 0)"
+PASS document.defaultView.getComputedStyle(rectElement).fill is "rgb(0, 128, 0)"
</ins><span class="cx">
</span><span class="cx"> Reset style to initial value
</span><span class="cx"> PASS (fillPaint = rectElement.style.getPropertyCSSValue('fill')).toString() is "[object SVGPaint]"
</span><span class="cx"> PASS fillPaint.paintType is SVGPaint.SVG_PAINTTYPE_RGBCOLOR
</span><del>-PASS rectElement.style.fill is "#008000"
-PASS document.defaultView.getComputedStyle(rectElement).fill is "#008000"
</del><ins>+PASS rectElement.style.fill is "rgb(0, 128, 0)"
+PASS document.defaultView.getComputedStyle(rectElement).fill is "rgb(0, 128, 0)"
</ins><span class="cx">
</span><span class="cx"> Test using setPaint() and SVG_PAINTTYPE_NONE - d
</span><span class="cx"> PASS fillPaint.setPaint(SVGPaint.SVG_PAINTTYPE_NONE, '', '', 'icc-color(myRGB, 0, 1, 2)') threw exception Error: NoModificationAllowedError: DOM Exception 7.
</span><span class="cx"> PASS fillPaint.paintType is SVGPaint.SVG_PAINTTYPE_RGBCOLOR
</span><del>-PASS rectElement.style.fill is "#008000"
-PASS document.defaultView.getComputedStyle(rectElement).fill is "#008000"
</del><ins>+PASS rectElement.style.fill is "rgb(0, 128, 0)"
+PASS document.defaultView.getComputedStyle(rectElement).fill is "rgb(0, 128, 0)"
</ins><span class="cx">
</span><span class="cx"> Reset style to initial value
</span><span class="cx"> PASS (fillPaint = rectElement.style.getPropertyCSSValue('fill')).toString() is "[object SVGPaint]"
</span><span class="cx"> PASS fillPaint.paintType is SVGPaint.SVG_PAINTTYPE_RGBCOLOR
</span><del>-PASS rectElement.style.fill is "#008000"
-PASS document.defaultView.getComputedStyle(rectElement).fill is "#008000"
</del><ins>+PASS rectElement.style.fill is "rgb(0, 128, 0)"
+PASS document.defaultView.getComputedStyle(rectElement).fill is "rgb(0, 128, 0)"
</ins><span class="cx">
</span><span class="cx"> Test using setPaint() and SVG_PAINTTYPE_NONE - e
</span><span class="cx"> PASS fillPaint.setPaint(SVGPaint.SVG_PAINTTYPE_NONE, 'url(#foo)', 'rgb(0,0,0)', 'icc-color(myRGB, 0, 1, 2)') threw exception Error: NoModificationAllowedError: DOM Exception 7.
</span><del>-PASS rectElement.style.fill is "#008000"
-PASS document.defaultView.getComputedStyle(rectElement).fill is "#008000"
</del><ins>+PASS rectElement.style.fill is "rgb(0, 128, 0)"
+PASS document.defaultView.getComputedStyle(rectElement).fill is "rgb(0, 128, 0)"
</ins><span class="cx">
</span><span class="cx"> Test using setPaint() and SVG_PAINTTYPE_URI - a
</span><span class="cx"> PASS fillPaint.setPaint(SVGPaint.SVG_PAINTTYPE_URI, '', '', '') threw exception Error: NoModificationAllowedError: DOM Exception 7.
</span><span class="cx"> PASS fillPaint.paintType is SVGPaint.SVG_PAINTTYPE_RGBCOLOR
</span><del>-PASS rectElement.style.fill is "#008000"
-PASS document.defaultView.getComputedStyle(rectElement).fill is "#008000"
</del><ins>+PASS rectElement.style.fill is "rgb(0, 128, 0)"
+PASS document.defaultView.getComputedStyle(rectElement).fill is "rgb(0, 128, 0)"
</ins><span class="cx">
</span><span class="cx"> Test using setPaint() and SVG_PAINTTYPE_URI - b
</span><span class="cx"> PASS fillPaint.setPaint(SVGPaint.SVG_PAINTTYPE_URI, '', 'rgb(0,128,128)', '') threw exception Error: NoModificationAllowedError: DOM Exception 7.
</span><span class="cx"> PASS fillPaint.paintType is SVGPaint.SVG_PAINTTYPE_RGBCOLOR
</span><del>-PASS rectElement.style.fill is "#008000"
-PASS document.defaultView.getComputedStyle(rectElement).fill is "#008000"
</del><ins>+PASS rectElement.style.fill is "rgb(0, 128, 0)"
+PASS document.defaultView.getComputedStyle(rectElement).fill is "rgb(0, 128, 0)"
</ins><span class="cx">
</span><span class="cx"> Test using setPaint() and SVG_PAINTTYPE_URI - c
</span><span class="cx"> PASS fillPaint.setPaint(SVGPaint.SVG_PAINTTYPE_URI, '', '', 'icc-color(myRGB, 0, 1, 2)') threw exception Error: NoModificationAllowedError: DOM Exception 7.
</span><span class="cx"> PASS fillPaint.paintType is SVGPaint.SVG_PAINTTYPE_RGBCOLOR
</span><del>-PASS rectElement.style.fill is "#008000"
-PASS document.defaultView.getComputedStyle(rectElement).fill is "#008000"
</del><ins>+PASS rectElement.style.fill is "rgb(0, 128, 0)"
+PASS document.defaultView.getComputedStyle(rectElement).fill is "rgb(0, 128, 0)"
</ins><span class="cx">
</span><span class="cx"> Test using setPaint() and SVG_PAINTTYPE_URI - d
</span><span class="cx"> PASS fillPaint.setPaint(SVGPaint.SVG_PAINTTYPE_URI, 'url(#test)', '', '') threw exception Error: NoModificationAllowedError: DOM Exception 7.
</span><span class="lines">@@ -122,14 +122,14 @@
</span><span class="cx"> PASS fillColor.red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
</span><span class="cx"> PASS fillColor.green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 128
</span><span class="cx"> PASS fillColor.blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
</span><del>-PASS rectElement.style.fill is "#008000"
-PASS document.defaultView.getComputedStyle(rectElement).fill is "#008000"
</del><ins>+PASS rectElement.style.fill is "rgb(0, 128, 0)"
+PASS document.defaultView.getComputedStyle(rectElement).fill is "rgb(0, 128, 0)"
</ins><span class="cx">
</span><span class="cx"> Reset style to initial value
</span><span class="cx"> PASS (fillPaint = rectElement.style.getPropertyCSSValue('fill')).toString() is "[object SVGPaint]"
</span><span class="cx"> PASS fillPaint.paintType is SVGPaint.SVG_PAINTTYPE_RGBCOLOR
</span><del>-PASS rectElement.style.fill is "#008000"
-PASS document.defaultView.getComputedStyle(rectElement).fill is "#008000"
</del><ins>+PASS rectElement.style.fill is "rgb(0, 128, 0)"
+PASS document.defaultView.getComputedStyle(rectElement).fill is "rgb(0, 128, 0)"
</ins><span class="cx">
</span><span class="cx"> Test using setPaint() and SVG_PAINTTYPE_URI - e
</span><span class="cx"> PASS fillPaint.setPaint(SVGPaint.SVG_PAINTTYPE_URI, 'url(#foo)', 'rgb(0,0,0)', 'icc-color(myRGB, 0, 1, 2)') threw exception Error: NoModificationAllowedError: DOM Exception 7.
</span><span class="lines">@@ -140,8 +140,8 @@
</span><span class="cx"> PASS fillColor.red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
</span><span class="cx"> PASS fillColor.green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 128
</span><span class="cx"> PASS fillColor.blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
</span><del>-PASS rectElement.style.fill is "#008000"
-PASS document.defaultView.getComputedStyle(rectElement).fill is "#008000"
</del><ins>+PASS rectElement.style.fill is "rgb(0, 128, 0)"
+PASS document.defaultView.getComputedStyle(rectElement).fill is "rgb(0, 128, 0)"
</ins><span class="cx">
</span><span class="cx"> Test using setPaint() and SVG_PAINTTYPE_URI_NONE
</span><span class="cx"> PASS fillPaint.setPaint(SVGPaint.SVG_PAINTTYPE_URI_NONE, 'url(#test)', 'rgb(0,0,0)', 'icc-color(myRGB, 0, 1, 2)') threw exception Error: NoModificationAllowedError: DOM Exception 7.
</span><span class="lines">@@ -152,8 +152,8 @@
</span><span class="cx"> PASS fillColor.red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
</span><span class="cx"> PASS fillColor.green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 128
</span><span class="cx"> PASS fillColor.blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
</span><del>-PASS rectElement.style.fill is "#008000"
-PASS document.defaultView.getComputedStyle(rectElement).fill is "#008000"
</del><ins>+PASS rectElement.style.fill is "rgb(0, 128, 0)"
+PASS document.defaultView.getComputedStyle(rectElement).fill is "rgb(0, 128, 0)"
</ins><span class="cx">
</span><span class="cx"> Test using setPaint() and SVG_PAINTTYPE_URI_CURRENTCOLOR
</span><span class="cx"> PASS fillPaint.setPaint(SVGPaint.SVG_PAINTTYPE_URI_CURRENTCOLOR, 'url(#foo)', 'rgb(0,0,0)', 'icc-color(myRGB, 0, 1, 2)') threw exception Error: NoModificationAllowedError: DOM Exception 7.
</span><span class="lines">@@ -164,8 +164,8 @@
</span><span class="cx"> PASS fillColor.red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
</span><span class="cx"> PASS fillColor.green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 128
</span><span class="cx"> PASS fillColor.blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
</span><del>-PASS rectElement.style.fill is "#008000"
-PASS document.defaultView.getComputedStyle(rectElement).fill is "#008000"
</del><ins>+PASS rectElement.style.fill is "rgb(0, 128, 0)"
+PASS document.defaultView.getComputedStyle(rectElement).fill is "rgb(0, 128, 0)"
</ins><span class="cx">
</span><span class="cx"> Test using setPaint() and SVG_PAINTTYPE_URI_RGBCOLOR
</span><span class="cx"> PASS fillPaint.setPaint(SVGPaint.SVG_PAINTTYPE_URI_RGBCOLOR, 'url(#test)', 'rgb(77,0,77)', 'icc-color(myRGB, 0, 1, 2)') threw exception Error: NoModificationAllowedError: DOM Exception 7.
</span><span class="lines">@@ -176,8 +176,8 @@
</span><span class="cx"> PASS fillColor.red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
</span><span class="cx"> PASS fillColor.green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 128
</span><span class="cx"> PASS fillColor.blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
</span><del>-PASS rectElement.style.fill is "#008000"
-PASS document.defaultView.getComputedStyle(rectElement).fill is "#008000"
</del><ins>+PASS rectElement.style.fill is "rgb(0, 128, 0)"
+PASS document.defaultView.getComputedStyle(rectElement).fill is "rgb(0, 128, 0)"
</ins><span class="cx">
</span><span class="cx"> Test using setPaint() and SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR
</span><span class="cx"> PASS fillPaint.setPaint(SVGPaint.SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR, 'url(#foo)', 'rgb(77,0,77)', 'icc-color(myRGB, 0, 1, 2)') threw exception Error: NoModificationAllowedError: DOM Exception 7.
</span><span class="lines">@@ -188,8 +188,8 @@
</span><span class="cx"> PASS fillColor.red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
</span><span class="cx"> PASS fillColor.green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 128
</span><span class="cx"> PASS fillColor.blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
</span><del>-PASS rectElement.style.fill is "#008000"
-PASS document.defaultView.getComputedStyle(rectElement).fill is "#008000"
</del><ins>+PASS rectElement.style.fill is "rgb(0, 128, 0)"
+PASS document.defaultView.getComputedStyle(rectElement).fill is "rgb(0, 128, 0)"
</ins><span class="cx">
</span><span class="cx"> Test using setPaint() and SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR
</span><span class="cx"> PASS fillPaint.setPaint(SVGPaint.SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR, 'url(#test)', 'rgb(77,0,77)', 'icc-color(myRGB, 0, 1, 2)') threw exception Error: NoModificationAllowedError: DOM Exception 7.
</span><span class="lines">@@ -200,8 +200,8 @@
</span><span class="cx"> PASS fillColor.red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
</span><span class="cx"> PASS fillColor.green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 128
</span><span class="cx"> PASS fillColor.blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
</span><del>-PASS rectElement.style.fill is "#008000"
-PASS document.defaultView.getComputedStyle(rectElement).fill is "#008000"
</del><ins>+PASS rectElement.style.fill is "rgb(0, 128, 0)"
+PASS document.defaultView.getComputedStyle(rectElement).fill is "rgb(0, 128, 0)"
</ins><span class="cx">
</span><span class="cx"> Test using setPaint() and SVG_PAINTTYPE_CURRENTCOLOR
</span><span class="cx"> PASS fillPaint.setPaint(SVGPaint.SVG_PAINTTYPE_CURRENTCOLOR, 'url(#foo)', 'rgb(77,0,77)', 'icc-color(myRGB, 0, 1, 2)') threw exception Error: NoModificationAllowedError: DOM Exception 7.
</span><span class="lines">@@ -212,8 +212,8 @@
</span><span class="cx"> PASS fillColor.red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
</span><span class="cx"> PASS fillColor.green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 128
</span><span class="cx"> PASS fillColor.blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
</span><del>-PASS rectElement.style.fill is "#008000"
-PASS document.defaultView.getComputedStyle(rectElement).fill is "#008000"
</del><ins>+PASS rectElement.style.fill is "rgb(0, 128, 0)"
+PASS document.defaultView.getComputedStyle(rectElement).fill is "rgb(0, 128, 0)"
</ins><span class="cx">
</span><span class="cx"> Test using setPaint() and SVG_PAINTTYPE_RGBCOLOR
</span><span class="cx"> PASS fillPaint.setPaint(SVGPaint.SVG_PAINTTYPE_RGBCOLOR, 'url(#test)', 'rgb(0,77,0)', 'icc-color(myRGB, 0, 1, 2)') threw exception Error: NoModificationAllowedError: DOM Exception 7.
</span><span class="lines">@@ -224,8 +224,8 @@
</span><span class="cx"> PASS fillColor.red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
</span><span class="cx"> PASS fillColor.green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 128
</span><span class="cx"> PASS fillColor.blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
</span><del>-PASS rectElement.style.fill is "#008000"
-PASS document.defaultView.getComputedStyle(rectElement).fill is "#008000"
</del><ins>+PASS rectElement.style.fill is "rgb(0, 128, 0)"
+PASS document.defaultView.getComputedStyle(rectElement).fill is "rgb(0, 128, 0)"
</ins><span class="cx">
</span><span class="cx"> Test using setUri()
</span><span class="cx"> PASS fillPaint.setUri('url(#foobar)'); is undefined.
</span><span class="lines">@@ -236,8 +236,8 @@
</span><span class="cx"> PASS fillColor.red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
</span><span class="cx"> PASS fillColor.green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 128
</span><span class="cx"> PASS fillColor.blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0
</span><del>-PASS rectElement.style.fill is "#008000"
-PASS document.defaultView.getComputedStyle(rectElement).fill is "#008000"
</del><ins>+PASS rectElement.style.fill is "rgb(0, 128, 0)"
+PASS document.defaultView.getComputedStyle(rectElement).fill is "rgb(0, 128, 0)"
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx">
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestssvgdomSVGStyleElementdisablesvgstyleelementexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/svg/dom/SVGStyleElement/disable-svg-style-element-expected.txt (189645 => 189646)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/dom/SVGStyleElement/disable-svg-style-element-expected.txt        2015-09-12 00:57:43 UTC (rev 189645)
+++ trunk/LayoutTests/svg/dom/SVGStyleElement/disable-svg-style-element-expected.txt        2015-09-12 01:51:56 UTC (rev 189646)
</span><span class="lines">@@ -4,9 +4,9 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx"> PASS styleElement.disabled is false
</span><del>-PASS window.getComputedStyle(rect).fill is "#0000ff"
</del><ins>+PASS window.getComputedStyle(rect).fill is "rgb(0, 0, 255)"
</ins><span class="cx"> PASS styleElement.disabled is true
</span><del>-PASS window.getComputedStyle(rect).fill is "#ff0000"
</del><ins>+PASS window.getComputedStyle(rect).fill is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS newStyleElement.disabled is false
</span><span class="cx"> PASS newStyleElement.disabled is false
</span><span class="cx"> PASS otherStyleElement.disabled is false
</span></span></pre></div>
<a id="trunkLayoutTestssvgdomSVGStyleElementscripttestsdisablesvgstyleelementjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/svg/dom/SVGStyleElement/script-tests/disable-svg-style-element.js (189645 => 189646)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/dom/SVGStyleElement/script-tests/disable-svg-style-element.js        2015-09-12 00:57:43 UTC (rev 189645)
+++ trunk/LayoutTests/svg/dom/SVGStyleElement/script-tests/disable-svg-style-element.js        2015-09-12 01:51:56 UTC (rev 189646)
</span><span class="lines">@@ -31,11 +31,11 @@
</span><span class="cx">
</span><span class="cx"> // Simple case
</span><span class="cx"> shouldBeFalse('styleElement.disabled');
</span><del>-shouldBe('window.getComputedStyle(rect).fill', '"#0000ff"');
</del><ins>+shouldBe('window.getComputedStyle(rect).fill', '"rgb(0, 0, 255)"');
</ins><span class="cx">
</span><span class="cx"> styleElement.disabled = true
</span><span class="cx"> shouldBeTrue('styleElement.disabled');
</span><del>-shouldBe('window.getComputedStyle(rect).fill', '"#ff0000"');
</del><ins>+shouldBe('window.getComputedStyle(rect).fill', '"rgb(255, 0, 0)"');
</ins><span class="cx">
</span><span class="cx"> // Test disconnected element
</span><span class="cx"> var newStyleElement = document.createElementNS(xmlns, 'style');
</span></span></pre></div>
<a id="trunkLayoutTestssvgdomscripttestsSVGColorjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/svg/dom/script-tests/SVGColor.js (189645 => 189646)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/dom/script-tests/SVGColor.js        2015-09-12 00:57:43 UTC (rev 189645)
+++ trunk/LayoutTests/svg/dom/script-tests/SVGColor.js        2015-09-12 01:51:56 UTC (rev 189646)
</span><span class="lines">@@ -22,7 +22,7 @@
</span><span class="cx"> debug("Check initial color values");
</span><span class="cx"> shouldBeEqualToString("(stopColor = stopElement.style.getPropertyCSSValue('stop-color')).toString()", "[object SVGColor]");
</span><span class="cx"> checkStopColor("SVGColor.SVG_COLORTYPE_RGBCOLOR", 255, 0, 0);
</span><del>-shouldBeEqualToString("stopElement.style.stopColor", "#ff0000");
</del><ins>+shouldBeEqualToString("stopElement.style.stopColor", "rgb(255, 0, 0)");
</ins><span class="cx"> shouldBeEqualToString("document.defaultView.getComputedStyle(stopElement).stopColor", "rgb(255, 0, 0)");
</span><span class="cx">
</span><span class="cx"> debug("");
</span><span class="lines">@@ -38,7 +38,7 @@
</span><span class="cx"> debug("Try assigning to the readonly colorType property, which silently fails");
</span><span class="cx"> shouldBeUndefined("stopColor.colorType = SVGColor.SVG_COLORTYPE_UNKKNOWN;");
</span><span class="cx"> shouldBe("stopColor.colorType", "SVGColor.SVG_COLORTYPE_RGBCOLOR");
</span><del>-shouldBeEqualToString("stopElement.style.stopColor", "#ff0000");
</del><ins>+shouldBeEqualToString("stopElement.style.stopColor", "rgb(255, 0, 0)");
</ins><span class="cx"> shouldBeEqualToString("document.defaultView.getComputedStyle(stopElement).stopColor", "rgb(255, 0, 0)");
</span><span class="cx">
</span><span class="cx"> debug("");
</span><span class="lines">@@ -54,7 +54,7 @@
</span><span class="cx"> shouldBe("stopColor.colorType", "SVGColor.SVG_COLORTYPE_RGBCOLOR");
</span><span class="cx"> // FIXME: No support for ICC colors.
</span><span class="cx"> checkStopColor("SVGColor.SVG_COLORTYPE_RGBCOLOR", 255, 0, 0);
</span><del>-shouldBeEqualToString("stopElement.style.stopColor", "#ff0000");
</del><ins>+shouldBeEqualToString("stopElement.style.stopColor", "rgb(255, 0, 0)");
</ins><span class="cx"> shouldBeEqualToString("document.defaultView.getComputedStyle(stopElement).stopColor", "rgb(255, 0, 0)");
</span><span class="cx">
</span><span class="cx"> debug("");
</span><span class="lines">@@ -62,7 +62,7 @@
</span><span class="cx"> shouldThrow("stopColor.setColor(SVGColor.SVG_COLORTYPE_CURRENTCOLOR, 'rgb(77,0,77)', 'icc-color(myRGB, 0, 1, 2)')");
</span><span class="cx"> shouldBe("stopColor.colorType", "SVGColor.SVG_COLORTYPE_RGBCOLOR");
</span><span class="cx"> checkStopColor("SVGColor.SVG_COLORTYPE_RGBCOLOR", 255, 0, 0);
</span><del>-shouldBeEqualToString("stopElement.style.stopColor", "#ff0000");
</del><ins>+shouldBeEqualToString("stopElement.style.stopColor", "rgb(255, 0, 0)");
</ins><span class="cx"> shouldBeEqualToString("document.defaultView.getComputedStyle(stopElement).stopColor", "rgb(255, 0, 0)");
</span><span class="cx">
</span><span class="cx"> debug("");
</span></span></pre></div>
<a id="trunkLayoutTestssvgdomscripttestsSVGPaintjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/svg/dom/script-tests/SVGPaint.js (189645 => 189646)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/dom/script-tests/SVGPaint.js        2015-09-12 00:57:43 UTC (rev 189645)
+++ trunk/LayoutTests/svg/dom/script-tests/SVGPaint.js        2015-09-12 01:51:56 UTC (rev 189646)
</span><span class="lines">@@ -23,8 +23,8 @@
</span><span class="cx"> rectElement.setAttribute("style", "color: lime; fill: green");
</span><span class="cx"> shouldBeEqualToString("(fillPaint = rectElement.style.getPropertyCSSValue('fill')).toString()", "[object SVGPaint]");
</span><span class="cx"> shouldBe("fillPaint.paintType", "SVGPaint.SVG_PAINTTYPE_RGBCOLOR");
</span><del>- shouldBeEqualToString("rectElement.style.fill", "#008000");
- shouldBeEqualToString("document.defaultView.getComputedStyle(rectElement).fill", "#008000");
</del><ins>+ shouldBeEqualToString("rectElement.style.fill", "rgb(0, 128, 0)");
+ shouldBeEqualToString("document.defaultView.getComputedStyle(rectElement).fill", "rgb(0, 128, 0)");
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function checkFillColor(type, red, green, blue) {
</span><span class="lines">@@ -41,8 +41,8 @@
</span><span class="cx"> shouldBe("fillPaint.paintType", "SVGPaint.SVG_PAINTTYPE_RGBCOLOR");
</span><span class="cx"> shouldBeEqualToString("fillPaint.uri", "");
</span><span class="cx"> checkFillColor("SVGColor.SVG_COLORTYPE_RGBCOLOR", 0, 128, 0);
</span><del>-shouldBeEqualToString("rectElement.style.fill", "#008000");
-shouldBeEqualToString("document.defaultView.getComputedStyle(rectElement).fill", "#008000");
</del><ins>+shouldBeEqualToString("rectElement.style.fill", "rgb(0, 128, 0)");
+shouldBeEqualToString("document.defaultView.getComputedStyle(rectElement).fill", "rgb(0, 128, 0)");
</ins><span class="cx">
</span><span class="cx"> debug("");
</span><span class="cx"> debug("Try invalid arguments for setPaint()");
</span><span class="lines">@@ -63,8 +63,8 @@
</span><span class="cx"> debug("Try assigning to the readonly paintType property, which silently fails");
</span><span class="cx"> shouldBeUndefined("fillPaint.paintType = SVGPaint.SVG_PAINTTYPE_UNKKNOWN;");
</span><span class="cx"> shouldBe("fillPaint.paintType", "SVGPaint.SVG_PAINTTYPE_RGBCOLOR");
</span><del>-shouldBeEqualToString("rectElement.style.fill", "#008000");
-shouldBeEqualToString("document.defaultView.getComputedStyle(rectElement).fill", "#008000");
</del><ins>+shouldBeEqualToString("rectElement.style.fill", "rgb(0, 128, 0)");
+shouldBeEqualToString("document.defaultView.getComputedStyle(rectElement).fill", "rgb(0, 128, 0)");
</ins><span class="cx">
</span><span class="cx"> debug("");
</span><span class="cx"> debug("Test using setPaint() and SVG_PAINTTYPE_UNKNOWN");
</span><span class="lines">@@ -78,60 +78,60 @@
</span><span class="cx"> debug("Test using setPaint() and SVG_PAINTTYPE_NONE - a");
</span><span class="cx"> shouldThrow("fillPaint.setPaint(SVGPaint.SVG_PAINTTYPE_NONE, '', '', '')");
</span><span class="cx"> shouldBe("fillPaint.paintType", "SVGPaint.SVG_PAINTTYPE_RGBCOLOR");
</span><del>-shouldBeEqualToString("rectElement.style.fill", "#008000");
-shouldBeEqualToString("document.defaultView.getComputedStyle(rectElement).fill", "#008000");
</del><ins>+shouldBeEqualToString("rectElement.style.fill", "rgb(0, 128, 0)");
+shouldBeEqualToString("document.defaultView.getComputedStyle(rectElement).fill", "rgb(0, 128, 0)");
</ins><span class="cx"> resetStyle();
</span><span class="cx">
</span><span class="cx"> debug("");
</span><span class="cx"> debug("Test using setPaint() and SVG_PAINTTYPE_NONE - b");
</span><span class="cx"> shouldThrow("fillPaint.setPaint(SVGPaint.SVG_PAINTTYPE_NONE, 'url(#foo)', '', '')");
</span><span class="cx"> shouldBe("fillPaint.paintType", "SVGPaint.SVG_PAINTTYPE_RGBCOLOR");
</span><del>-shouldBeEqualToString("rectElement.style.fill", "#008000");
-shouldBeEqualToString("document.defaultView.getComputedStyle(rectElement).fill", "#008000");
</del><ins>+shouldBeEqualToString("rectElement.style.fill", "rgb(0, 128, 0)");
+shouldBeEqualToString("document.defaultView.getComputedStyle(rectElement).fill", "rgb(0, 128, 0)");
</ins><span class="cx"> resetStyle();
</span><span class="cx">
</span><span class="cx"> debug("");
</span><span class="cx"> debug("Test using setPaint() and SVG_PAINTTYPE_NONE - c");
</span><span class="cx"> shouldThrow("fillPaint.setPaint(SVGPaint.SVG_PAINTTYPE_NONE, '', 'rgb(0,128,128)', '')");
</span><span class="cx"> shouldBe("fillPaint.paintType", "SVGPaint.SVG_PAINTTYPE_RGBCOLOR");
</span><del>-shouldBeEqualToString("rectElement.style.fill", "#008000");
-shouldBeEqualToString("document.defaultView.getComputedStyle(rectElement).fill", "#008000");
</del><ins>+shouldBeEqualToString("rectElement.style.fill", "rgb(0, 128, 0)");
+shouldBeEqualToString("document.defaultView.getComputedStyle(rectElement).fill", "rgb(0, 128, 0)");
</ins><span class="cx"> resetStyle();
</span><span class="cx">
</span><span class="cx"> debug("");
</span><span class="cx"> debug("Test using setPaint() and SVG_PAINTTYPE_NONE - d");
</span><span class="cx"> shouldThrow("fillPaint.setPaint(SVGPaint.SVG_PAINTTYPE_NONE, '', '', 'icc-color(myRGB, 0, 1, 2)')");
</span><span class="cx"> shouldBe("fillPaint.paintType", "SVGPaint.SVG_PAINTTYPE_RGBCOLOR");
</span><del>-shouldBeEqualToString("rectElement.style.fill", "#008000");
-shouldBeEqualToString("document.defaultView.getComputedStyle(rectElement).fill", "#008000");
</del><ins>+shouldBeEqualToString("rectElement.style.fill", "rgb(0, 128, 0)");
+shouldBeEqualToString("document.defaultView.getComputedStyle(rectElement).fill", "rgb(0, 128, 0)");
</ins><span class="cx"> resetStyle();
</span><span class="cx">
</span><span class="cx"> debug("");
</span><span class="cx"> debug("Test using setPaint() and SVG_PAINTTYPE_NONE - e");
</span><span class="cx"> shouldThrow("fillPaint.setPaint(SVGPaint.SVG_PAINTTYPE_NONE, 'url(#foo)', 'rgb(0,0,0)', 'icc-color(myRGB, 0, 1, 2)')");
</span><del>-shouldBeEqualToString("rectElement.style.fill", "#008000");
-shouldBeEqualToString("document.defaultView.getComputedStyle(rectElement).fill", "#008000");
</del><ins>+shouldBeEqualToString("rectElement.style.fill", "rgb(0, 128, 0)");
+shouldBeEqualToString("document.defaultView.getComputedStyle(rectElement).fill", "rgb(0, 128, 0)");
</ins><span class="cx">
</span><span class="cx"> debug("");
</span><span class="cx"> debug("Test using setPaint() and SVG_PAINTTYPE_URI - a");
</span><span class="cx"> shouldThrow("fillPaint.setPaint(SVGPaint.SVG_PAINTTYPE_URI, '', '', '')");
</span><span class="cx"> shouldBe("fillPaint.paintType", "SVGPaint.SVG_PAINTTYPE_RGBCOLOR");
</span><del>-shouldBeEqualToString("rectElement.style.fill", "#008000");
-shouldBeEqualToString("document.defaultView.getComputedStyle(rectElement).fill", "#008000");
</del><ins>+shouldBeEqualToString("rectElement.style.fill", "rgb(0, 128, 0)");
+shouldBeEqualToString("document.defaultView.getComputedStyle(rectElement).fill", "rgb(0, 128, 0)");
</ins><span class="cx">
</span><span class="cx"> debug("");
</span><span class="cx"> debug("Test using setPaint() and SVG_PAINTTYPE_URI - b");
</span><span class="cx"> shouldThrow("fillPaint.setPaint(SVGPaint.SVG_PAINTTYPE_URI, '', 'rgb(0,128,128)', '')");
</span><span class="cx"> shouldBe("fillPaint.paintType", "SVGPaint.SVG_PAINTTYPE_RGBCOLOR");
</span><del>-shouldBeEqualToString("rectElement.style.fill", "#008000");
-shouldBeEqualToString("document.defaultView.getComputedStyle(rectElement).fill", "#008000");
</del><ins>+shouldBeEqualToString("rectElement.style.fill", "rgb(0, 128, 0)");
+shouldBeEqualToString("document.defaultView.getComputedStyle(rectElement).fill", "rgb(0, 128, 0)");
</ins><span class="cx">
</span><span class="cx"> debug("");
</span><span class="cx"> debug("Test using setPaint() and SVG_PAINTTYPE_URI - c");
</span><span class="cx"> shouldThrow("fillPaint.setPaint(SVGPaint.SVG_PAINTTYPE_URI, '', '', 'icc-color(myRGB, 0, 1, 2)')");
</span><span class="cx"> shouldBe("fillPaint.paintType", "SVGPaint.SVG_PAINTTYPE_RGBCOLOR");
</span><del>-shouldBeEqualToString("rectElement.style.fill", "#008000");
-shouldBeEqualToString("document.defaultView.getComputedStyle(rectElement).fill", "#008000");
</del><ins>+shouldBeEqualToString("rectElement.style.fill", "rgb(0, 128, 0)");
+shouldBeEqualToString("document.defaultView.getComputedStyle(rectElement).fill", "rgb(0, 128, 0)");
</ins><span class="cx">
</span><span class="cx"> debug("");
</span><span class="cx"> debug("Test using setPaint() and SVG_PAINTTYPE_URI - d");
</span><span class="lines">@@ -139,8 +139,8 @@
</span><span class="cx"> shouldBe("fillPaint.paintType", "SVGPaint.SVG_PAINTTYPE_RGBCOLOR");
</span><span class="cx"> shouldBeEqualToString("fillPaint.uri", "");
</span><span class="cx"> checkFillColor("SVGColor.SVG_COLORTYPE_RGBCOLOR", 0, 128, 0);
</span><del>-shouldBeEqualToString("rectElement.style.fill", "#008000");
-shouldBeEqualToString("document.defaultView.getComputedStyle(rectElement).fill", "#008000");
</del><ins>+shouldBeEqualToString("rectElement.style.fill", "rgb(0, 128, 0)");
+shouldBeEqualToString("document.defaultView.getComputedStyle(rectElement).fill", "rgb(0, 128, 0)");
</ins><span class="cx"> resetStyle();
</span><span class="cx">
</span><span class="cx"> debug("");
</span><span class="lines">@@ -149,8 +149,8 @@
</span><span class="cx"> shouldBe("fillPaint.paintType", "SVGPaint.SVG_PAINTTYPE_RGBCOLOR");
</span><span class="cx"> shouldBeEqualToString("fillPaint.uri", "");
</span><span class="cx"> checkFillColor("SVGColor.SVG_COLORTYPE_RGBCOLOR", 0, 128, 0);
</span><del>-shouldBeEqualToString("rectElement.style.fill", "#008000");
-shouldBeEqualToString("document.defaultView.getComputedStyle(rectElement).fill", "#008000");
</del><ins>+shouldBeEqualToString("rectElement.style.fill", "rgb(0, 128, 0)");
+shouldBeEqualToString("document.defaultView.getComputedStyle(rectElement).fill", "rgb(0, 128, 0)");
</ins><span class="cx">
</span><span class="cx"> debug("");
</span><span class="cx"> debug("Test using setPaint() and SVG_PAINTTYPE_URI_NONE");
</span><span class="lines">@@ -158,8 +158,8 @@
</span><span class="cx"> shouldBe("fillPaint.paintType", "SVGPaint.SVG_PAINTTYPE_RGBCOLOR");
</span><span class="cx"> shouldBeEqualToString("fillPaint.uri", "");
</span><span class="cx"> checkFillColor("SVGColor.SVG_COLORTYPE_RGBCOLOR", 0, 128, 0);
</span><del>-shouldBeEqualToString("rectElement.style.fill", "#008000");
-shouldBeEqualToString("document.defaultView.getComputedStyle(rectElement).fill", "#008000");
</del><ins>+shouldBeEqualToString("rectElement.style.fill", "rgb(0, 128, 0)");
+shouldBeEqualToString("document.defaultView.getComputedStyle(rectElement).fill", "rgb(0, 128, 0)");
</ins><span class="cx">
</span><span class="cx"> debug("");
</span><span class="cx"> debug("Test using setPaint() and SVG_PAINTTYPE_URI_CURRENTCOLOR");
</span><span class="lines">@@ -167,8 +167,8 @@
</span><span class="cx"> shouldBe("fillPaint.paintType", "SVGPaint.SVG_PAINTTYPE_RGBCOLOR");
</span><span class="cx"> shouldBeEqualToString("fillPaint.uri", "");
</span><span class="cx"> checkFillColor("SVGColor.SVG_COLORTYPE_RGBCOLOR", 0, 128, 0);
</span><del>-shouldBeEqualToString("rectElement.style.fill", "#008000");
-shouldBeEqualToString("document.defaultView.getComputedStyle(rectElement).fill", "#008000");
</del><ins>+shouldBeEqualToString("rectElement.style.fill", "rgb(0, 128, 0)");
+shouldBeEqualToString("document.defaultView.getComputedStyle(rectElement).fill", "rgb(0, 128, 0)");
</ins><span class="cx">
</span><span class="cx"> debug("");
</span><span class="cx"> debug("Test using setPaint() and SVG_PAINTTYPE_URI_RGBCOLOR");
</span><span class="lines">@@ -176,8 +176,8 @@
</span><span class="cx"> shouldBe("fillPaint.paintType", "SVGPaint.SVG_PAINTTYPE_RGBCOLOR");
</span><span class="cx"> shouldBeEqualToString("fillPaint.uri", "");
</span><span class="cx"> checkFillColor("SVGColor.SVG_COLORTYPE_RGBCOLOR", 0, 128, 0);
</span><del>-shouldBeEqualToString("rectElement.style.fill", "#008000");
-shouldBeEqualToString("document.defaultView.getComputedStyle(rectElement).fill", "#008000");
</del><ins>+shouldBeEqualToString("rectElement.style.fill", "rgb(0, 128, 0)");
+shouldBeEqualToString("document.defaultView.getComputedStyle(rectElement).fill", "rgb(0, 128, 0)");
</ins><span class="cx">
</span><span class="cx"> debug("");
</span><span class="cx"> debug("Test using setPaint() and SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR");
</span><span class="lines">@@ -185,8 +185,8 @@
</span><span class="cx"> shouldBe("fillPaint.paintType", "SVGPaint.SVG_PAINTTYPE_RGBCOLOR");
</span><span class="cx"> shouldBeEqualToString("fillPaint.uri", "");
</span><span class="cx"> checkFillColor("SVGColor.SVG_COLORTYPE_RGBCOLOR", 0, 128, 0);
</span><del>-shouldBeEqualToString("rectElement.style.fill", "#008000");
-shouldBeEqualToString("document.defaultView.getComputedStyle(rectElement).fill", "#008000");
</del><ins>+shouldBeEqualToString("rectElement.style.fill", "rgb(0, 128, 0)");
+shouldBeEqualToString("document.defaultView.getComputedStyle(rectElement).fill", "rgb(0, 128, 0)");
</ins><span class="cx">
</span><span class="cx"> debug("");
</span><span class="cx"> debug("Test using setPaint() and SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR");
</span><span class="lines">@@ -194,8 +194,8 @@
</span><span class="cx"> shouldBe("fillPaint.paintType", "SVGPaint.SVG_PAINTTYPE_RGBCOLOR");
</span><span class="cx"> shouldBeEqualToString("fillPaint.uri", "");
</span><span class="cx"> checkFillColor("SVGColor.SVG_COLORTYPE_RGBCOLOR", 0, 128, 0);
</span><del>-shouldBeEqualToString("rectElement.style.fill", "#008000");
-shouldBeEqualToString("document.defaultView.getComputedStyle(rectElement).fill", "#008000");
</del><ins>+shouldBeEqualToString("rectElement.style.fill", "rgb(0, 128, 0)");
+shouldBeEqualToString("document.defaultView.getComputedStyle(rectElement).fill", "rgb(0, 128, 0)");
</ins><span class="cx">
</span><span class="cx"> debug("");
</span><span class="cx"> debug("Test using setPaint() and SVG_PAINTTYPE_CURRENTCOLOR");
</span><span class="lines">@@ -203,8 +203,8 @@
</span><span class="cx"> shouldBe("fillPaint.paintType", "SVGPaint.SVG_PAINTTYPE_RGBCOLOR");
</span><span class="cx"> shouldBeEqualToString("fillPaint.uri", "");
</span><span class="cx"> checkFillColor("SVGColor.SVG_COLORTYPE_RGBCOLOR", 0, 128, 0);
</span><del>-shouldBeEqualToString("rectElement.style.fill", "#008000");
-shouldBeEqualToString("document.defaultView.getComputedStyle(rectElement).fill", "#008000");
</del><ins>+shouldBeEqualToString("rectElement.style.fill", "rgb(0, 128, 0)");
+shouldBeEqualToString("document.defaultView.getComputedStyle(rectElement).fill", "rgb(0, 128, 0)");
</ins><span class="cx">
</span><span class="cx"> debug("");
</span><span class="cx"> debug("Test using setPaint() and SVG_PAINTTYPE_RGBCOLOR");
</span><span class="lines">@@ -212,8 +212,8 @@
</span><span class="cx"> shouldBe("fillPaint.paintType", "SVGPaint.SVG_PAINTTYPE_RGBCOLOR");
</span><span class="cx"> shouldBeEqualToString("fillPaint.uri", "");
</span><span class="cx"> checkFillColor("SVGColor.SVG_COLORTYPE_RGBCOLOR", 0, 128, 0);
</span><del>-shouldBeEqualToString("rectElement.style.fill", "#008000");
-shouldBeEqualToString("document.defaultView.getComputedStyle(rectElement).fill", "#008000");
</del><ins>+shouldBeEqualToString("rectElement.style.fill", "rgb(0, 128, 0)");
+shouldBeEqualToString("document.defaultView.getComputedStyle(rectElement).fill", "rgb(0, 128, 0)");
</ins><span class="cx">
</span><span class="cx"> debug("");
</span><span class="cx"> debug("Test using setUri()");
</span><span class="lines">@@ -221,7 +221,7 @@
</span><span class="cx"> shouldBe("fillPaint.paintType", "SVGPaint.SVG_PAINTTYPE_RGBCOLOR");
</span><span class="cx"> shouldBeEqualToString("fillPaint.uri", "");
</span><span class="cx"> checkFillColor("SVGColor.SVG_COLORTYPE_RGBCOLOR", 0, 128, 0);
</span><del>-shouldBeEqualToString("rectElement.style.fill", "#008000");
-shouldBeEqualToString("document.defaultView.getComputedStyle(rectElement).fill", "#008000");
</del><ins>+shouldBeEqualToString("rectElement.style.fill", "rgb(0, 128, 0)");
+shouldBeEqualToString("document.defaultView.getComputedStyle(rectElement).fill", "rgb(0, 128, 0)");
</ins><span class="cx">
</span><span class="cx"> successfullyParsed = true;
</span></span></pre></div>
<a id="trunkLayoutTestssvgwebarchivesvgscriptsubresoucesexpectedwebarchive"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/svg/webarchive/svg-script-subresouces-expected.webarchive (189645 => 189646)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/webarchive/svg-script-subresouces-expected.webarchive        2015-09-12 00:57:43 UTC (rev 189645)
+++ trunk/LayoutTests/svg/webarchive/svg-script-subresouces-expected.webarchive        2015-09-12 01:51:56 UTC (rev 189646)
</span><span class="lines">@@ -10,7 +10,7 @@
</span><span class="cx"> if (window.testRunner)
</span><span class="cx"> testRunner.dumpDOMAsWebArchive();
</span><span class="cx"> &lt;/script&gt;
</span><del>- &lt;rect id="rect" width="100" height="100" fill="red" style="fill: #008000;"/&gt;
</del><ins>+ &lt;rect id="rect" width="100" height="100" fill="red" style="fill: rgb(0, 128, 0);"/&gt;
</ins><span class="cx"> &lt;script xlink:href="resources/svg-script-subresources.js" type="text/ecmascript"/&gt;
</span><span class="cx"> &lt;/svg&gt;</string>
</span><span class="cx">                 <key>WebResourceFrameName</key>
</span></span></pre></div>
<a id="trunkLayoutTeststransitionssvgtransitionsexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/transitions/svg-transitions-expected.txt (189645 => 189646)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/transitions/svg-transitions-expected.txt        2015-09-12 00:57:43 UTC (rev 189645)
+++ trunk/LayoutTests/transitions/svg-transitions-expected.txt        2015-09-12 01:51:56 UTC (rev 189646)
</span><span class="lines">@@ -13,7 +13,7 @@
</span><span class="cx"> PASS - "stroke-dasharray" property for "rect5" element at 1s saw something close to: 20
</span><span class="cx"> PASS - "stroke-width" property for "rect6" element at 1s saw something close to: 15
</span><span class="cx"> PASS - "stroke-dasharray" property for "rect6" element at 1s saw something close to: 15,15,20,12.5,17.5,17.5
</span><del>-FAIL - "fill" property for "rect7" element at 1s expected: 0,0,127 but saw: url(#invalid) #0000ff
</del><ins>+FAIL - "fill" property for "rect7" element at 1s expected: 0,0,127 but saw: url(#invalid) rgb(0, 0, 255)
</ins><span class="cx"> PASS - "stroke-dasharray" property for "rect7" element at 1s saw something close to: none
</span><span class="cx"> PASS - "stop-color" property for "stop1" element at 1s saw something close to: 127,127,0
</span><span class="cx"> PASS - "stop-opacity" property for "stop1" element at 1s saw something close to: 0.75
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (189645 => 189646)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-09-12 00:57:43 UTC (rev 189645)
+++ trunk/Source/WebCore/ChangeLog        2015-09-12 01:51:56 UTC (rev 189646)
</span><span class="lines">@@ -1,3 +1,33 @@
</span><ins>+2015-09-11 Said Abou-Hallawa <sabouhallawa@apple.com>
+
+ SVGColor custom text format is different from the CSS color custom text format
+ https://bugs.webkit.org/show_bug.cgi?id=148879
+
+ Reviewed by Daniel Bates.
+
+ Implement the serialization of a CSS color value as it is described in
+ <https://drafts.csswg.org/cssom/#serializing-css-values>. Add the new
+ function Color::cssText() which is refactored from the existing function
+ Color::serialized(). Use the new function for serializing the SVGColor
+ always and also for Color but only when the alpha component is not 1.
+
+ Test: svg/css/computed-style-rgb-color.html
+
+ * css/CSSPrimitiveValue.cpp:
+ (WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText): Move the code
+ for serializing the color from this function to Color::cssText().
+
+ * platform/graphics/Color.cpp:
+ (WebCore::Color::serialized): Call Color::cssText() if the alpha component
+ is not 1 and delete the repeated code.
+
+ (WebCore::Color::cssText):
+ * platform/graphics/Color.h: Add the new function to the header file.
+
+ * svg/SVGColor.cpp:
+ (WebCore::SVGColor::customCSSText): Call Color::cssText() always instead
+ of calling Color::serialized() for serializing the SVGColor.
+
</ins><span class="cx"> 2015-09-11 Nan Wang <n_wang@apple.com>
</span><span class="cx">
</span><span class="cx"> AX: ARIA 1.1 @aria-current
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSPrimitiveValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSPrimitiveValue.cpp (189645 => 189646)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSPrimitiveValue.cpp        2015-09-12 00:57:43 UTC (rev 189645)
+++ trunk/Source/WebCore/css/CSSPrimitiveValue.cpp        2015-09-12 01:51:56 UTC (rev 189646)
</span><span class="lines">@@ -1098,33 +1098,7 @@
</span><span class="cx"> RGBA32 rgbColor = m_value.rgbcolor;
</span><span class="cx"> if (m_primitiveUnitType == CSS_PARSER_HEXCOLOR)
</span><span class="cx"> Color::parseHexColor(m_value.string, rgbColor);
</span><del>- Color color(rgbColor);
-
- Vector<LChar> result;
- result.reserveInitialCapacity(32);
- bool colorHasAlpha = color.hasAlpha();
- if (colorHasAlpha)
- result.append("rgba(", 5);
- else
- result.append("rgb(", 4);
-
- appendNumber(result, static_cast<unsigned char>(color.red()));
- result.append(", ", 2);
-
- appendNumber(result, static_cast<unsigned char>(color.green()));
- result.append(", ", 2);
-
- appendNumber(result, static_cast<unsigned char>(color.blue()));
- if (colorHasAlpha) {
- result.append(", ", 2);
-
- NumberToStringBuffer buffer;
- const char* alphaString = numberToFixedPrecisionString(color.alpha() / 255.0f, 6, buffer, true);
- result.append(alphaString, strlen(alphaString));
- }
-
- result.append(')');
- return String::adopt(result);
</del><ins>+ return Color(rgbColor).cssText();
</ins><span class="cx"> }
</span><span class="cx"> case CSS_PAIR:
</span><span class="cx"> return getPairValue()->cssText();
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsColorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/Color.cpp (189645 => 189646)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/Color.cpp        2015-09-12 00:57:43 UTC (rev 189645)
+++ trunk/Source/WebCore/platform/graphics/Color.cpp        2015-09-12 01:51:56 UTC (rev 189646)
</span><span class="lines">@@ -211,29 +211,37 @@
</span><span class="cx"> return builder.toString();
</span><span class="cx"> }
</span><span class="cx">
</span><del>- Vector<LChar> result;
- result.reserveInitialCapacity(28);
- const char commaSpace[] = ", ";
- const char rgbaParen[] = "rgba(";
</del><ins>+ return cssText();
+}
</ins><span class="cx">
</span><del>- result.append(rgbaParen, 5);
- appendNumber(result, red());
- result.append(commaSpace, 2);
- appendNumber(result, green());
- result.append(commaSpace, 2);
- appendNumber(result, blue());
- result.append(commaSpace, 2);
</del><ins>+String Color::cssText() const
+{
+ StringBuilder builder;
+ builder.reserveCapacity(28);
+ bool colorHasAlpha = hasAlpha();
+ if (colorHasAlpha)
+ builder.appendLiteral("rgba(");
+ else
+ builder.appendLiteral("rgb(");
</ins><span class="cx">
</span><del>- if (!alpha())
- result.append('0');
- else {
- NumberToLStringBuffer buffer;
- unsigned length = DecimalNumber(alpha() / 255.0).toStringDecimal(buffer, WTF::NumberToStringBufferLength);
- result.append(buffer, length);
</del><ins>+ builder.appendNumber(static_cast<unsigned char>(red()));
+ builder.appendLiteral(", ");
+
+ builder.appendNumber(static_cast<unsigned char>(green()));
+ builder.appendLiteral(", ");
+
+
+ builder.appendNumber(static_cast<unsigned char>(blue()));
+ if (colorHasAlpha) {
+ builder.appendLiteral(", ");
+
+ NumberToStringBuffer buffer;
+ bool shouldTruncateTrailingZeros = true;
+ builder.append(numberToFixedPrecisionString(alpha() / 255.0f, 6, buffer, shouldTruncateTrailingZeros));
</ins><span class="cx"> }
</span><del>-
- result.append(')');
- return String::adopt(result);
</del><ins>+
+ builder.append(')');
+ return builder.toString();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> String Color::nameForRenderTreeAsText() const
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsColorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/Color.h (189645 => 189646)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/Color.h        2015-09-12 00:57:43 UTC (rev 189645)
+++ trunk/Source/WebCore/platform/graphics/Color.h        2015-09-12 01:51:56 UTC (rev 189646)
</span><span class="lines">@@ -93,9 +93,11 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Returns the color serialized according to HTML5
</span><del>- // - http://www.whatwg.org/specs/web-apps/current-work/#serialization-of-a-color
</del><ins>+ // <https://html.spec.whatwg.org/multipage/scripting.html#fill-and-stroke-styles> (10 September 2015)
</ins><span class="cx"> WEBCORE_EXPORT String serialized() const;
</span><span class="cx">
</span><ins>+ String cssText() const;
+
</ins><span class="cx"> // Returns the color serialized as either #RRGGBB or #RRGGBBAA
</span><span class="cx"> // The latter format is not a valid CSS color, and should only be seen in DRT dumps.
</span><span class="cx"> String nameForRenderTreeAsText() const;
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGColorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGColor.cpp (189645 => 189646)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGColor.cpp        2015-09-12 00:57:43 UTC (rev 189645)
+++ trunk/Source/WebCore/svg/SVGColor.cpp        2015-09-12 01:51:56 UTC (rev 189646)
</span><span class="lines">@@ -79,10 +79,10 @@
</span><span class="cx"> case SVG_COLORTYPE_RGBCOLOR_ICCCOLOR:
</span><span class="cx"> case SVG_COLORTYPE_RGBCOLOR:
</span><span class="cx"> // FIXME: No ICC color support.
</span><del>- return m_color.serialized();
</del><ins>+ return m_color.cssText();
</ins><span class="cx"> case SVG_COLORTYPE_CURRENTCOLOR:
</span><span class="cx"> if (m_color.isValid())
</span><del>- return m_color.serialized();
</del><ins>+ return m_color.cssText();
</ins><span class="cx"> return "currentColor";
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>