<!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>[192023] 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/192023">192023</a></dd>
<dt>Author</dt> <dd>dino@apple.com</dd>
<dt>Date</dt> <dd>2015-11-04 09:49:46 -0800 (Wed, 04 Nov 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Accept 8 and 4 value hex colors (#RRGGBBAA)
https://bugs.webkit.org/show_bug.cgi?id=150853
<rdar://problem/23380930>
Reviewed by Simon Fraser.
LayoutTests/imported/w3c:
Delete these tests. The have been updated in the original repository,
so we'll get the new versions soon. Meanwhile, they are covered by
other tests.
* canvas/2d.fillStyle.parse.invalid.hex4-expected.txt: Removed.
* canvas/2d.fillStyle.parse.invalid.hex4.html: Removed.
* canvas/2d.fillStyle.parse.invalid.hex8-expected.txt: Removed.
* canvas/2d.fillStyle.parse.invalid.hex8.html: Removed.
* css/css-color-3/t421-rgb-hex-parsing-f.xht:
Source/WebCore:
CSS Color Level 4 allows #RGBA and #RRGGBBAA values
for colors.
Test: fast/css/hex-colors.html
* platform/graphics/Color.cpp:
(WebCore::parseHexColorInternal): Update the color parsing for
the new syntax.
LayoutTests:
Add a new test for hex colors that covers 4 and 8 value forms.
Also update existing tests now that the syntax has changed.
For the deleted philip tests, they are now in the W3C web-latform-tests import.
* canvas/philip/tests/2d.fillStyle.parse.invalid.hex4-expected.txt: Removed.
* canvas/philip/tests/2d.fillStyle.parse.invalid.hex4.html: Removed.
* canvas/philip/tests/2d.fillStyle.parse.invalid.hex8-expected.txt: Removed.
* canvas/philip/tests/2d.fillStyle.parse.invalid.hex8.html: Removed.
* fast/css/hex-colors-expected.txt: Added.
* fast/css/hex-colors.html: Added.
* fast/css/invalid-hex-color-expected.txt:
* fast/css/invalid-hex-color.html:
* fast/css/invalid-predefined-color-expected.txt:
* fast/css/invalid-predefined-color.html:
* fast/css/script-tests/invalid-predefined-color.js:
* fast/dom/attribute-legacy-colors-expected.txt:
* fast/dom/script-tests/attribute-legacy-colors.js:
* svg/dom/rgb-color-parser-expected.txt:
* svg/dom/rgb-color-parser.html:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfastcssinvalidhexcolorexpectedtxt">trunk/LayoutTests/fast/css/invalid-hex-color-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcssinvalidhexcolorhtml">trunk/LayoutTests/fast/css/invalid-hex-color.html</a></li>
<li><a href="#trunkLayoutTestsfastcssinvalidpredefinedcolorexpectedtxt">trunk/LayoutTests/fast/css/invalid-predefined-color-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcssinvalidpredefinedcolorhtml">trunk/LayoutTests/fast/css/invalid-predefined-color.html</a></li>
<li><a href="#trunkLayoutTestsfastcssscripttestsinvalidpredefinedcolorjs">trunk/LayoutTests/fast/css/script-tests/invalid-predefined-color.js</a></li>
<li><a href="#trunkLayoutTestsfastdomattributelegacycolorsexpectedtxt">trunk/LayoutTests/fast/dom/attribute-legacy-colors-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastdomscripttestsattributelegacycolorsjs">trunk/LayoutTests/fast/dom/script-tests/attribute-legacy-colors.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cChangeLog">trunk/LayoutTests/imported/w3c/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsimportedw3ccsscsscolor3t421rgbhexparsingfxht">trunk/LayoutTests/imported/w3c/css/css-color-3/t421-rgb-hex-parsing-f.xht</a></li>
<li><a href="#trunkLayoutTestssvgdomrgbcolorparserexpectedtxt">trunk/LayoutTests/svg/dom/rgb-color-parser-expected.txt</a></li>
<li><a href="#trunkLayoutTestssvgdomrgbcolorparserhtml">trunk/LayoutTests/svg/dom/rgb-color-parser.html</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsColorcpp">trunk/Source/WebCore/platform/graphics/Color.cpp</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastcsshexcolorsexpectedtxt">trunk/LayoutTests/fast/css/hex-colors-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcsshexcolorshtml">trunk/LayoutTests/fast/css/hex-colors.html</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkLayoutTestscanvasphiliptests2dfillStyleparseinvalidhex4expectedtxt">trunk/LayoutTests/canvas/philip/tests/2d.fillStyle.parse.invalid.hex4-expected.txt</a></li>
<li><a href="#trunkLayoutTestscanvasphiliptests2dfillStyleparseinvalidhex4html">trunk/LayoutTests/canvas/philip/tests/2d.fillStyle.parse.invalid.hex4.html</a></li>
<li><a href="#trunkLayoutTestscanvasphiliptests2dfillStyleparseinvalidhex8expectedtxt">trunk/LayoutTests/canvas/philip/tests/2d.fillStyle.parse.invalid.hex8-expected.txt</a></li>
<li><a href="#trunkLayoutTestscanvasphiliptests2dfillStyleparseinvalidhex8html">trunk/LayoutTests/canvas/philip/tests/2d.fillStyle.parse.invalid.hex8.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3ccanvas2dfillStyleparseinvalidhex4expectedtxt">trunk/LayoutTests/imported/w3c/canvas/2d.fillStyle.parse.invalid.hex4-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3ccanvas2dfillStyleparseinvalidhex4html">trunk/LayoutTests/imported/w3c/canvas/2d.fillStyle.parse.invalid.hex4.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3ccanvas2dfillStyleparseinvalidhex8expectedtxt">trunk/LayoutTests/imported/w3c/canvas/2d.fillStyle.parse.invalid.hex8-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3ccanvas2dfillStyleparseinvalidhex8html">trunk/LayoutTests/imported/w3c/canvas/2d.fillStyle.parse.invalid.hex8.html</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (192022 => 192023)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-11-04 14:46:19 UTC (rev 192022)
+++ trunk/LayoutTests/ChangeLog        2015-11-04 17:49:46 UTC (rev 192023)
</span><span class="lines">@@ -1,3 +1,32 @@
</span><ins>+2015-11-03 Dean Jackson <dino@apple.com>
+
+ Accept 8 and 4 value hex colors (#RRGGBBAA)
+ https://bugs.webkit.org/show_bug.cgi?id=150853
+ <rdar://problem/23380930>
+
+ Reviewed by Simon Fraser.
+
+ Add a new test for hex colors that covers 4 and 8 value forms.
+ Also update existing tests now that the syntax has changed.
+
+ For the deleted philip tests, they are now in the W3C web-latform-tests import.
+
+ * canvas/philip/tests/2d.fillStyle.parse.invalid.hex4-expected.txt: Removed.
+ * canvas/philip/tests/2d.fillStyle.parse.invalid.hex4.html: Removed.
+ * canvas/philip/tests/2d.fillStyle.parse.invalid.hex8-expected.txt: Removed.
+ * canvas/philip/tests/2d.fillStyle.parse.invalid.hex8.html: Removed.
+ * fast/css/hex-colors-expected.txt: Added.
+ * fast/css/hex-colors.html: Added.
+ * fast/css/invalid-hex-color-expected.txt:
+ * fast/css/invalid-hex-color.html:
+ * fast/css/invalid-predefined-color-expected.txt:
+ * fast/css/invalid-predefined-color.html:
+ * fast/css/script-tests/invalid-predefined-color.js:
+ * fast/dom/attribute-legacy-colors-expected.txt:
+ * fast/dom/script-tests/attribute-legacy-colors.js:
+ * svg/dom/rgb-color-parser-expected.txt:
+ * svg/dom/rgb-color-parser.html:
+
</ins><span class="cx"> 2015-11-04 Joanmarie Diggs <jdiggs@igalia.com>
</span><span class="cx">
</span><span class="cx"> [AX] WebProcess from WebKitGtk+ 2.10.0 compiled in Debug mode hits ASSERT on textUnderElement
</span></span></pre></div>
<a id="trunkLayoutTestscanvasphiliptests2dfillStyleparseinvalidhex4expectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/canvas/philip/tests/2d.fillStyle.parse.invalid.hex4-expected.txt (192022 => 192023)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/canvas/philip/tests/2d.fillStyle.parse.invalid.hex4-expected.txt        2015-11-04 14:46:19 UTC (rev 192022)
+++ trunk/LayoutTests/canvas/philip/tests/2d.fillStyle.parse.invalid.hex4-expected.txt        2015-11-04 17:49:46 UTC (rev 192023)
</span><span class="lines">@@ -1 +0,0 @@
</span><del>-Passed
</del></span></pre></div>
<a id="trunkLayoutTestscanvasphiliptests2dfillStyleparseinvalidhex4html"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/canvas/philip/tests/2d.fillStyle.parse.invalid.hex4.html (192022 => 192023)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/canvas/philip/tests/2d.fillStyle.parse.invalid.hex4.html        2015-11-04 14:46:19 UTC (rev 192022)
+++ trunk/LayoutTests/canvas/philip/tests/2d.fillStyle.parse.invalid.hex4.html        2015-11-04 17:49:46 UTC (rev 192023)
</span><span class="lines">@@ -1,24 +0,0 @@
</span><del>-<!DOCTYPE html>
-<title>Canvas test: 2d.fillStyle.parse.invalid.hex4</title>
-<script src="../tests.js"></script>
-<link rel="stylesheet" href="../tests.css">
-<body>
-<p id="passtext">Pass</p>
-<p id="failtext">Fail</p>
-<p class="output">These images should be identical:</p>
-<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
-<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
-<ul id="d"></ul>
-<script>
-_addTest(function(canvas, ctx) {
-
-
-ctx.fillStyle = '#0f0';
-try { ctx.fillStyle = '#ff00'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does
-ctx.fillRect(0, 0, 100, 50);
-_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
-
-
-});
-</script>
-
</del></span></pre></div>
<a id="trunkLayoutTestscanvasphiliptests2dfillStyleparseinvalidhex8expectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/canvas/philip/tests/2d.fillStyle.parse.invalid.hex8-expected.txt (192022 => 192023)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/canvas/philip/tests/2d.fillStyle.parse.invalid.hex8-expected.txt        2015-11-04 14:46:19 UTC (rev 192022)
+++ trunk/LayoutTests/canvas/philip/tests/2d.fillStyle.parse.invalid.hex8-expected.txt        2015-11-04 17:49:46 UTC (rev 192023)
</span><span class="lines">@@ -1 +0,0 @@
</span><del>-Passed
</del></span></pre></div>
<a id="trunkLayoutTestscanvasphiliptests2dfillStyleparseinvalidhex8html"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/canvas/philip/tests/2d.fillStyle.parse.invalid.hex8.html (192022 => 192023)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/canvas/philip/tests/2d.fillStyle.parse.invalid.hex8.html        2015-11-04 14:46:19 UTC (rev 192022)
+++ trunk/LayoutTests/canvas/philip/tests/2d.fillStyle.parse.invalid.hex8.html        2015-11-04 17:49:46 UTC (rev 192023)
</span><span class="lines">@@ -1,24 +0,0 @@
</span><del>-<!DOCTYPE html>
-<title>Canvas test: 2d.fillStyle.parse.invalid.hex8</title>
-<script src="../tests.js"></script>
-<link rel="stylesheet" href="../tests.css">
-<body>
-<p id="passtext">Pass</p>
-<p id="failtext">Fail</p>
-<p class="output">These images should be identical:</p>
-<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
-<p class="output expectedtext">Expected output:<p><img src="green-100x50.png" class="output expected" id="expected" alt="">
-<ul id="d"></ul>
-<script>
-_addTest(function(canvas, ctx) {
-
-
-ctx.fillStyle = '#0f0';
-try { ctx.fillStyle = '#ff0000ff'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does
-ctx.fillRect(0, 0, 100, 50);
-_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
-
-
-});
-</script>
-
</del></span></pre></div>
<a id="trunkLayoutTestsfastcsshexcolorsexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css/hex-colors-expected.txt (0 => 192023)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/hex-colors-expected.txt         (rev 0)
+++ trunk/LayoutTests/fast/css/hex-colors-expected.txt        2015-11-04 17:49:46 UTC (rev 192023)
</span><span class="lines">@@ -0,0 +1,23 @@
</span><ins>+PASS #000 was red:0 green: 0 blue: 0
+PASS #001 was red:0 green: 0 blue: 17
+PASS #012 was red:0 green: 17 blue: 34
+PASS #123 was red:17 green: 34 blue: 51
+PASS #0001 was red:0 green: 0 blue: 0 alpha: 17
+PASS #0012 was red:0 green: 0 blue: 17 alpha: 34
+PASS #0123 was red:0 green: 17 blue: 34 alpha: 51
+PASS #1234 was red:17 green: 34 blue: 51 alpha: 68
+PASS #000000 was red:0 green: 0 blue: 0
+PASS #000012 was red:0 green: 0 blue: 18
+PASS #001234 was red:0 green: 18 blue: 52
+PASS #123456 was red:18 green: 52 blue: 86
+PASS #00000000 was red:0 green: 0 blue: 0 alpha: 0
+PASS #00000012 was red:0 green: 0 blue: 0 alpha: 18
+PASS #00001234 was red:0 green: 0 blue: 18 alpha: 52
+PASS #00123456 was red:0 green: 18 blue: 52 alpha: 86
+PASS #12345678 was red:18 green: 52 blue: 86 alpha: 120
+PASS #12x3 was red:255 green: 0 blue: 0
+PASS #123x was red:255 green: 0 blue: 0
+PASS #123x4567 was red:255 green: 0 blue: 0
+PASS #1234567r was red:255 green: 0 blue: 0
+PASS #123456x6 was red:255 green: 0 blue: 0
+
</ins><span class="cx">Property changes on: trunk/LayoutTests/fast/css/hex-colors-expected.txt
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="svnkeywords"></a>
<div class="addfile"><h4>Added: svn:keywords</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkLayoutTestsfastcsshexcolorshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css/hex-colors.html (0 => 192023)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/hex-colors.html         (rev 0)
+++ trunk/LayoutTests/fast/css/hex-colors.html        2015-11-04 17:49:46 UTC (rev 192023)
</span><span class="lines">@@ -0,0 +1,78 @@
</span><ins>+<script>
+if (window.testRunner)
+ testRunner.dumpAsText();
+
+var TESTS = [
+ ["#000", 0, 0, 0],
+ ["#001", 0, 0, 17],
+ ["#012", 0, 17, 34],
+ ["#123", 17, 34, 51],
+ ["#0001", 0, 0, 0, 17],
+ ["#0012", 0, 0, 17,34],
+ ["#0123", 0, 17, 34, 51],
+ ["#1234", 17, 34, 51, 68],
+ ["#000000", 0, 0, 0],
+ ["#000012", 0, 0, 18],
+ ["#001234", 0, 18, 52],
+ ["#123456", 18, 52, 86],
+ ["#00000000", 0, 0, 0, 0],
+ ["#00000012", 0, 0, 0, 18],
+ ["#00001234", 0, 0, 18, 52],
+ ["#00123456", 0, 18, 52, 86],
+ ["#12345678", 18, 52, 86, 120],
+ // Bad content from here on shows the red failure color.
+ ["#12x3", 255, 0, 0],
+ ["#123x", 255, 0, 0],
+ ["#123x4567", 255, 0, 0],
+ ["#1234567r", 255, 0, 0],
+ ["#123456x6", 255, 0, 0],
+];
+
+function extractComponents(rgbValue) {
+ var re = /rgba?\((\d+),\s(\d+),\s(\d+)(,\s([\d\.]+))?\)/;
+ var match = re.exec(rgbValue);
+ var results = [parseInt(match[1]), parseInt(match[2]), parseInt(match[3])];
+ if (match[5])
+ results.push(Math.round(parseFloat(match[5]) * 255));
+ return results;
+}
+
+function componentsMatch(components, expectedR, expectedG, expectedB, expectedA) {
+ if (components[0] == expectedR && components[1] == expectedG && components[2] == expectedB) {
+ if (components.length != 4)
+ return true;
+ return components[3] == expectedA;
+ }
+}
+
+function componentsAsRGBA(r, g, b, a) {
+ if (a !== undefined)
+ return "red:" + r + " green: " + g + " blue: " + b + " alpha: " + a;
+ return "red:" + r + " green: " + g + " blue: " + b;
+}
+
+function runTest() {
+ var element = document.querySelector("p");
+ var results = "";
+
+ for (var test of TESTS) {
+ element.style.color = test[0];
+ var components = extractComponents(window.getComputedStyle(element).color);
+ if (componentsMatch(components, test[1], test[2], test[3], test[4]))
+ results += "PASS " + test[0] + " was " + componentsAsRGBA(test[1], test[2], test[3], test[4]) + "<br>";
+ else
+ results += "FAIL " + test[0] + " should be " + componentsAsRGBA(test[1], test[2], test[3], test[4]) + " but was " + componentsAsRGBA(components[0], components[1], components[2], components[3]) + "<br>";
+
+ // Force a color reset and style recalc.
+ element.style.color = "red";
+ computedStyle = window.getComputedStyle(element).color;
+ }
+
+ document.querySelector("div").innerHTML = results;
+}
+
+window.addEventListener("load", runTest, false);
+</script>
+<div id="results"></div>
+<p></p>
+
</ins><span class="cx">Property changes on: trunk/LayoutTests/fast/css/hex-colors.html
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="svnkeywords"></a>
<div class="addfile"><h4>Added: svn:keywords</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkLayoutTestsfastcssinvalidhexcolorexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css/invalid-hex-color-expected.txt (192022 => 192023)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/invalid-hex-color-expected.txt        2015-11-04 14:46:19 UTC (rev 192022)
+++ trunk/LayoutTests/fast/css/invalid-hex-color-expected.txt        2015-11-04 17:49:46 UTC (rev 192023)
</span><span class="lines">@@ -2,15 +2,17 @@
</span><span class="cx"> Test 1 (Invalid: 1 hexadecimal digits) [EXPECTED] [ACTUAL] PASS
</span><span class="cx"> Test 2 (Invalid: 2 hexadecimal digits) [EXPECTED] [ACTUAL] PASS
</span><span class="cx"> Test 3 (Valid: 3 hexadecimal digits) [EXPECTED] [ACTUAL] PASS
</span><del>-Test 4 (Invalid: 4 hexadecimal digits) [EXPECTED] [ACTUAL] PASS
</del><ins>+Test 4 (Valid: 4 hexadecimal digits) [EXPECTED] [ACTUAL] PASS
</ins><span class="cx"> Test 5 (Invalid: 5 hexadecimal digits) [EXPECTED] [ACTUAL] PASS
</span><span class="cx"> Test 6 (Valid: 6 hexadecimal digits) [EXPECTED] [ACTUAL] PASS
</span><span class="cx"> Test 7 (Invalid: 7 hexadecimal digits) [EXPECTED] [ACTUAL] PASS
</span><del>-Test 8 (Invalid: 0 hexadecimal digits concatenated with 'px') [EXPECTED] [ACTUAL] PASS
-Test 9 (Invalid: 1 hexadecimal digits concatenated with 'px') [EXPECTED] [ACTUAL] PASS
-Test 10 (Invalid: 2 hexadecimal digits concatenated with 'px') [EXPECTED] [ACTUAL] PASS
-Test 11 (Invalid: 3 hexadecimal digits concatenated with 'px') [EXPECTED] [ACTUAL] PASS
-Test 12 (Invalid: 4 hexadecimal digits concatenated with 'px') [EXPECTED] [ACTUAL] PASS
-Test 13 (Invalid: 5 hexadecimal digits concatenated with 'px') [EXPECTED] [ACTUAL] PASS
-Test 14 (Invalid: 6 hexadecimal digits concatenated with 'px') [EXPECTED] [ACTUAL] PASS
-Test 15 (Invalid: 7 hexadecimal digits concatenated with 'px') [EXPECTED] [ACTUAL] PASS
</del><ins>+Test 8 (Valid: 8 hexadecimal digits) [EXPECTED] [ACTUAL] PASS
+Test 9 (Invalid: 0 hexadecimal digits concatenated with 'px') [EXPECTED] [ACTUAL] PASS
+Test 10 (Invalid: 1 hexadecimal digits concatenated with 'px') [EXPECTED] [ACTUAL] PASS
+Test 11 (Invalid: 2 hexadecimal digits concatenated with 'px') [EXPECTED] [ACTUAL] PASS
+Test 12 (Invalid: 3 hexadecimal digits concatenated with 'px') [EXPECTED] [ACTUAL] PASS
+Test 13 (Invalid: 4 hexadecimal digits concatenated with 'px') [EXPECTED] [ACTUAL] PASS
+Test 14 (Invalid: 5 hexadecimal digits concatenated with 'px') [EXPECTED] [ACTUAL] PASS
+Test 15 (Invalid: 6 hexadecimal digits concatenated with 'px') [EXPECTED] [ACTUAL] PASS
+Test 16 (Invalid: 7 hexadecimal digits concatenated with 'px') [EXPECTED] [ACTUAL] PASS
+Test 17 (Invalid: 8 hexadecimal digits concatenated with 'px') [EXPECTED] [ACTUAL] PASS
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcssinvalidhexcolorhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css/invalid-hex-color.html (192022 => 192023)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/invalid-hex-color.html        2015-11-04 14:46:19 UTC (rev 192022)
+++ trunk/LayoutTests/fast/css/invalid-hex-color.html        2015-11-04 17:49:46 UTC (rev 192023)
</span><span class="lines">@@ -19,10 +19,11 @@
</span><span class="cx"> ["Invalid: 1 hexadecimal digits", "", "border-bottom: solid #1"],
</span><span class="cx"> ["Invalid: 2 hexadecimal digits", "", "border-bottom: solid #11"],
</span><span class="cx"> ["Valid: 3 hexadecimal digits", "border-bottom: solid rgb(17,17,17)", "border-bottom: solid #111"],
</span><del>- ["Invalid: 4 hexadecimal digits", "", "border-bottom: solid #1111"],
</del><ins>+ ["Valid: 4 hexadecimal digits", "border-bottom: solid rgba(17,17,17,255)", "border-bottom: solid #111f"],
</ins><span class="cx"> ["Invalid: 5 hexadecimal digits", "", "border-bottom: solid #11111"],
</span><span class="cx"> ["Valid: 6 hexadecimal digits", "border-bottom: solid rgb(17,17,17)", "border-bottom: solid #111111"],
</span><span class="cx"> ["Invalid: 7 hexadecimal digits", "", "border-bottom: solid #1111111"],
</span><ins>+ ["Valid: 8 hexadecimal digits", "border-bottom: solid rgba(17,17,17,255)", "border-bottom: solid #111111ff"],
</ins><span class="cx"> ["Invalid: 0 hexadecimal digits concatenated with 'px'", "", "border-bottom: solid #px"],
</span><span class="cx"> ["Invalid: 1 hexadecimal digits concatenated with 'px'", "", "border-bottom: solid #1px"],
</span><span class="cx"> ["Invalid: 2 hexadecimal digits concatenated with 'px'", "", "border-bottom: solid #11px"],
</span><span class="lines">@@ -31,6 +32,7 @@
</span><span class="cx"> ["Invalid: 5 hexadecimal digits concatenated with 'px'", "", "border-bottom: solid #11111px"],
</span><span class="cx"> ["Invalid: 6 hexadecimal digits concatenated with 'px'", "", "border-bottom: solid #111111px"],
</span><span class="cx"> ["Invalid: 7 hexadecimal digits concatenated with 'px'", "", "border-bottom: solid #1111111px"],
</span><ins>+ ["Invalid: 8 hexadecimal digits concatenated with 'px'", "", "border-bottom: solid #11111111px"],
</ins><span class="cx"> ];
</span><span class="cx">
</span><span class="cx"> var testHtml = "";
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssinvalidpredefinedcolorexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css/invalid-predefined-color-expected.txt (192022 => 192023)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/invalid-predefined-color-expected.txt        2015-11-04 14:46:19 UTC (rev 192022)
+++ trunk/LayoutTests/fast/css/invalid-predefined-color-expected.txt        2015-11-04 17:49:46 UTC (rev 192023)
</span><span class="lines">@@ -12,7 +12,6 @@
</span><span class="cx"> PASS getComputedStyle(div, null).color is black
</span><span class="cx"> PASS getComputedStyle(div, null).color is black
</span><span class="cx"> PASS getComputedStyle(div, null).color is black
</span><del>-PASS getComputedStyle(div, null).color is black
</del><span class="cx"> PASS successfullyParsed is true
</span><span class="cx">
</span><span class="cx"> TEST COMPLETE
</span><span class="lines">@@ -25,4 +24,3 @@
</span><span class="cx"> This style is "color: #yellow"
</span><span class="cx"> This style is "color: #green"
</span><span class="cx"> This style is "color: #FFAALL"
</span><del>-This style is "color: #FF000000"
</del></span></pre></div>
<a id="trunkLayoutTestsfastcssinvalidpredefinedcolorhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css/invalid-predefined-color.html (192022 => 192023)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/invalid-predefined-color.html        2015-11-04 14:46:19 UTC (rev 192022)
+++ trunk/LayoutTests/fast/css/invalid-predefined-color.html        2015-11-04 17:49:46 UTC (rev 192023)
</span><span class="lines">@@ -14,7 +14,6 @@
</span><span class="cx"> <div id="invalid2" style="color: #yellow">This style is "color: #yellow"</div>
</span><span class="cx"> <div id="invalid3" style="color: #green">This style is "color: #green"</div>
</span><span class="cx"> <div id="invalid4" style="color: #FFAALL">This style is "color: #FFAALL"</div>
</span><del>-<div id="invalid5" style="color: #FF000000">This style is "color: #FF000000"</div>
</del><span class="cx">
</span><span class="cx"> <script src="script-tests/invalid-predefined-color.js"></script>
</span><span class="cx"> <script src="../../resources/js-test-post.js"></script>
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssscripttestsinvalidpredefinedcolorjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css/script-tests/invalid-predefined-color.js (192022 => 192023)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/script-tests/invalid-predefined-color.js        2015-11-04 14:46:19 UTC (rev 192022)
+++ trunk/LayoutTests/fast/css/script-tests/invalid-predefined-color.js        2015-11-04 17:49:46 UTC (rev 192023)
</span><span class="lines">@@ -11,7 +11,7 @@
</span><span class="cx"> shouldBe("getComputedStyle(div, null).color", "red");
</span><span class="cx"> }
</span><span class="cx">
</span><del>-for (var i=1;i<=5;i++)
</del><ins>+for (var i=1;i<=4;i++)
</ins><span class="cx"> {
</span><span class="cx"> var div = document.getElementById("invalid"+i);
</span><span class="cx"> shouldBe("getComputedStyle(div, null).color", "black");
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomattributelegacycolorsexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/attribute-legacy-colors-expected.txt (192022 => 192023)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/attribute-legacy-colors-expected.txt        2015-11-04 14:46:19 UTC (rev 192022)
+++ trunk/LayoutTests/fast/dom/attribute-legacy-colors-expected.txt        2015-11-04 17:49:46 UTC (rev 192023)
</span><span class="lines">@@ -16,7 +16,6 @@
</span><span class="cx"> PASS document.body.bgColor='#ffzzzz';getComputedStyle(document.body).backgroundColor; is 'rgb(255, 0, 0)'
</span><span class="cx"> PASS document.body.bgColor='f00';getComputedStyle(document.body).backgroundColor; is 'rgb(15, 0, 0)'
</span><span class="cx"> PASS document.body.bgColor='ff0000';getComputedStyle(document.body).backgroundColor; is 'rgb(255, 0, 0)'
</span><del>-PASS document.body.bgColor='#00000000';getComputedStyle(document.body).backgroundColor; is 'rgb(0, 0, 0)'
</del><span class="cx"> PASS document.body.bgColor='foo';getComputedStyle(document.body).backgroundColor; is 'rgb(15, 0, 0)'
</span><span class="cx"> PASS document.body.bgColor='cheese';getComputedStyle(document.body).backgroundColor; is 'rgb(192, 238, 14)'
</span><span class="cx"> PASS document.body.bgColor='ffff';getComputedStyle(document.body).backgroundColor; is 'rgb(255, 0, 255)'
</span><span class="lines">@@ -35,11 +34,9 @@
</span><span class="cx"> PASS document.body.bgColor='#5';getComputedStyle(document.body).backgroundColor; is 'rgb(5, 0, 0)'
</span><span class="cx"> PASS document.body.bgColor='#55';getComputedStyle(document.body).backgroundColor; is 'rgb(5, 5, 0)'
</span><span class="cx"> PASS document.body.bgColor='#555';getComputedStyle(document.body).backgroundColor; is 'rgb(85, 85, 85)'
</span><del>-PASS document.body.bgColor='#5555';getComputedStyle(document.body).backgroundColor; is 'rgb(85, 85, 0)'
</del><span class="cx"> PASS document.body.bgColor='#55555';getComputedStyle(document.body).backgroundColor; is 'rgb(85, 85, 80)'
</span><span class="cx"> PASS document.body.bgColor='#555555';getComputedStyle(document.body).backgroundColor; is 'rgb(85, 85, 85)'
</span><span class="cx"> PASS document.body.bgColor='#5555555';getComputedStyle(document.body).backgroundColor; is 'rgb(85, 85, 80)'
</span><del>-PASS document.body.bgColor='#55555555';getComputedStyle(document.body).backgroundColor; is 'rgb(85, 85, 85)'
</del><span class="cx"> PASS document.body.bgColor='5';getComputedStyle(document.body).backgroundColor; is 'rgb(5, 0, 0)'
</span><span class="cx"> PASS document.body.bgColor='55';getComputedStyle(document.body).backgroundColor; is 'rgb(5, 5, 0)'
</span><span class="cx"> PASS document.body.bgColor='555';getComputedStyle(document.body).backgroundColor; is 'rgb(5, 5, 5)'
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomscripttestsattributelegacycolorsjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/script-tests/attribute-legacy-colors.js (192022 => 192023)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/script-tests/attribute-legacy-colors.js        2015-11-04 14:46:19 UTC (rev 192022)
+++ trunk/LayoutTests/fast/dom/script-tests/attribute-legacy-colors.js        2015-11-04 17:49:46 UTC (rev 192023)
</span><span class="lines">@@ -15,7 +15,6 @@
</span><span class="cx">         {'test':'#ffzzzz', 'expected':[255, 0, 0]},
</span><span class="cx">         {'test':'f00', 'expected':[15, 0, 0]},
</span><span class="cx">         {'test':'ff0000', 'expected':[255, 0, 0]},
</span><del>-        {'test':'#00000000', 'expected':[0, 0, 0]},
</del><span class="cx">         {'test':'foo', 'expected':[15, 0, 0]},
</span><span class="cx">         {'test':'cheese', 'expected':[192, 238, 14]},
</span><span class="cx">         {'test':'ffff', 'expected':[255, 0, 255]},
</span><span class="lines">@@ -34,11 +33,9 @@
</span><span class="cx">         {'test':'#5', 'expected':[5, 0, 0]},
</span><span class="cx">         {'test':'#55', 'expected':[5, 5, 0]},
</span><span class="cx">         {'test':'#555', 'expected':[85, 85, 85]},
</span><del>-        {'test':'#5555', 'expected':[85, 85, 0]},
</del><span class="cx">         {'test':'#55555', 'expected':[85, 85, 80]},
</span><span class="cx">         {'test':'#555555', 'expected':[85, 85, 85]},
</span><span class="cx">         {'test':'#5555555', 'expected':[85, 85, 80]},
</span><del>-        {'test':'#55555555', 'expected':[85, 85, 85]},
</del><span class="cx">         {'test':'5', 'expected':[5, 0, 0]},
</span><span class="cx">         {'test':'55', 'expected':[5, 5, 0]},
</span><span class="cx">         {'test':'555', 'expected':[5, 5, 5]},
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/ChangeLog (192022 => 192023)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/ChangeLog        2015-11-04 14:46:19 UTC (rev 192022)
+++ trunk/LayoutTests/imported/w3c/ChangeLog        2015-11-04 17:49:46 UTC (rev 192023)
</span><span class="lines">@@ -1,3 +1,21 @@
</span><ins>+2015-11-03 Dean Jackson <dino@apple.com>
+
+ Accept 8 and 4 value hex colors (#RRGGBBAA)
+ https://bugs.webkit.org/show_bug.cgi?id=150853
+ <rdar://problem/23380930>
+
+ Reviewed by Simon Fraser.
+
+ Delete these tests. The have been updated in the original repository,
+ so we'll get the new versions soon. Meanwhile, they are covered by
+ other tests.
+
+ * canvas/2d.fillStyle.parse.invalid.hex4-expected.txt: Removed.
+ * canvas/2d.fillStyle.parse.invalid.hex4.html: Removed.
+ * canvas/2d.fillStyle.parse.invalid.hex8-expected.txt: Removed.
+ * canvas/2d.fillStyle.parse.invalid.hex8.html: Removed.
+ * css/css-color-3/t421-rgb-hex-parsing-f.xht:
+
</ins><span class="cx"> 2015-11-02 Jon Honeycutt <jhoneycutt@apple.com>
</span><span class="cx">
</span><span class="cx"> Implement support for the autocomplete attribute
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3ccanvas2dfillStyleparseinvalidhex4expectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/imported/w3c/canvas/2d.fillStyle.parse.invalid.hex4-expected.txt (192022 => 192023)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/canvas/2d.fillStyle.parse.invalid.hex4-expected.txt        2015-11-04 14:46:19 UTC (rev 192022)
+++ trunk/LayoutTests/imported/w3c/canvas/2d.fillStyle.parse.invalid.hex4-expected.txt        2015-11-04 17:49:46 UTC (rev 192023)
</span><span class="lines">@@ -1,6 +0,0 @@
</span><del>-2d.fillStyle.parse.invalid.hex4
-Spec references: 2d.colours.parse
-Actual output:
-Expected output:
-
-Passed
</del></span></pre></div>
<a id="trunkLayoutTestsimportedw3ccanvas2dfillStyleparseinvalidhex4html"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/imported/w3c/canvas/2d.fillStyle.parse.invalid.hex4.html (192022 => 192023)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/canvas/2d.fillStyle.parse.invalid.hex4.html        2015-11-04 14:46:19 UTC (rev 192022)
+++ trunk/LayoutTests/imported/w3c/canvas/2d.fillStyle.parse.invalid.hex4.html        2015-11-04 17:49:46 UTC (rev 192023)
</span><span class="lines">@@ -1,33 +0,0 @@
</span><del>-<!DOCTYPE html>
-<title>Canvas test: 2d.fillStyle.parse.invalid.hex4</title>
-<meta name="author" content="Philip Taylor">
-<script src="../common/canvas-tests.js"></script>
-<link rel="stylesheet" href="../common/canvas-tests.css">
-<body class="show_output">
-
-<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.<a href="index.2d.fillStyle.parse.invalid.html">invalid</a>.hex4</h1>
-<p class="desc"></p>
-
-<div class="refs">Spec references:
-<ul>
-<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
-</ul>
-</div>
-
-<p class="output">Actual output:</p>
-<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
-<p class="output expectedtext">Expected output:<p><img src="../resources/green-100x50.png" class="output expected" id="expected" alt="">
-<ul id="d"></ul>
-<script>
-_addTest(function(canvas, ctx) {
-
-
-ctx.fillStyle = '#0f0';
-try { ctx.fillStyle = '#ff00'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does
-ctx.fillRect(0, 0, 100, 50);
-_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
-
-
-});
-</script>
-
</del></span></pre></div>
<a id="trunkLayoutTestsimportedw3ccanvas2dfillStyleparseinvalidhex8expectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/imported/w3c/canvas/2d.fillStyle.parse.invalid.hex8-expected.txt (192022 => 192023)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/canvas/2d.fillStyle.parse.invalid.hex8-expected.txt        2015-11-04 14:46:19 UTC (rev 192022)
+++ trunk/LayoutTests/imported/w3c/canvas/2d.fillStyle.parse.invalid.hex8-expected.txt        2015-11-04 17:49:46 UTC (rev 192023)
</span><span class="lines">@@ -1,6 +0,0 @@
</span><del>-2d.fillStyle.parse.invalid.hex8
-Spec references: 2d.colours.parse
-Actual output:
-Expected output:
-
-Passed
</del></span></pre></div>
<a id="trunkLayoutTestsimportedw3ccanvas2dfillStyleparseinvalidhex8html"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/imported/w3c/canvas/2d.fillStyle.parse.invalid.hex8.html (192022 => 192023)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/canvas/2d.fillStyle.parse.invalid.hex8.html        2015-11-04 14:46:19 UTC (rev 192022)
+++ trunk/LayoutTests/imported/w3c/canvas/2d.fillStyle.parse.invalid.hex8.html        2015-11-04 17:49:46 UTC (rev 192023)
</span><span class="lines">@@ -1,33 +0,0 @@
</span><del>-<!DOCTYPE html>
-<title>Canvas test: 2d.fillStyle.parse.invalid.hex8</title>
-<meta name="author" content="Philip Taylor">
-<script src="../common/canvas-tests.js"></script>
-<link rel="stylesheet" href="../common/canvas-tests.css">
-<body class="show_output">
-
-<h1><a href="index.2d.html">2d</a>.<a href="index.2d.fillStyle.html">fillStyle</a>.<a href="index.2d.fillStyle.parse.html">parse</a>.<a href="index.2d.fillStyle.parse.invalid.html">invalid</a>.hex8</h1>
-<p class="desc"></p>
-
-<div class="refs">Spec references:
-<ul>
-<li><a href="../annotated-spec/canvas.html#testrefs.2d.colours.parse">2d.colours.parse</a>
-</ul>
-</div>
-
-<p class="output">Actual output:</p>
-<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
-<p class="output expectedtext">Expected output:<p><img src="../resources/green-100x50.png" class="output expected" id="expected" alt="">
-<ul id="d"></ul>
-<script>
-_addTest(function(canvas, ctx) {
-
-
-ctx.fillStyle = '#0f0';
-try { ctx.fillStyle = '#ff0000ff'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does
-ctx.fillRect(0, 0, 100, 50);
-_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
-
-
-});
-</script>
-
</del></span></pre></div>
<a id="trunkLayoutTestsimportedw3ccsscsscolor3t421rgbhexparsingfxht"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/css/css-color-3/t421-rgb-hex-parsing-f.xht (192022 => 192023)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/css/css-color-3/t421-rgb-hex-parsing-f.xht        2015-11-04 14:46:19 UTC (rev 192022)
+++ trunk/LayoutTests/imported/w3c/css/css-color-3/t421-rgb-hex-parsing-f.xht        2015-11-04 17:49:46 UTC (rev 192023)
</span><span class="lines">@@ -12,10 +12,8 @@
</span><span class="cx">                         p { color: green; }
</span><span class="cx">                         p { color: #f; }
</span><span class="cx">                         p { color: #ff; }
</span><del>-                        p { color: #ff00; }
</del><span class="cx">                         p { color: #ff000; }
</span><span class="cx">                         p { color: #ff00000; }
</span><del>-                        p { color: #ff000000; }
</del><span class="cx">                         p { color: #ff0000000; }
</span><span class="cx">                         p { color: #ff00000000; }
</span><span class="cx">                 ]]></style>
</span></span></pre></div>
<a id="trunkLayoutTestssvgdomrgbcolorparserexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/svg/dom/rgb-color-parser-expected.txt (192022 => 192023)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/dom/rgb-color-parser-expected.txt        2015-11-04 14:46:19 UTC (rev 192022)
+++ trunk/LayoutTests/svg/dom/rgb-color-parser-expected.txt        2015-11-04 17:49:46 UTC (rev 192023)
</span><span class="lines">@@ -163,7 +163,6 @@
</span><span class="cx"> Failed to parse: #
</span><span class="cx"> Failed to parse: #f
</span><span class="cx"> Failed to parse: #ff
</span><del>-Failed to parse: #ffff
</del><span class="cx"> Failed to parse: #fffff
</span><span class="cx"> Failed to parse: #fffffff
</span><span class="cx"> Failed to parse: green,
</span><span class="lines">@@ -177,7 +176,9 @@
</span><span class="cx"> Failed to parse: 'visual'
</span><span class="cx"> Parsed as rgb(0,10,20): rgb(0, 10, 20)
</span><span class="cx"> Parsed as rgb(255,255,255): #fff
</span><ins>+Parsed as rgb(255,255,255): #ffff
</ins><span class="cx"> Parsed as rgb(255,255,255): #ffffff
</span><ins>+Parsed as rgb(255,255,255): #ffffffff
</ins><span class="cx"> Parsed as rgb(255,255,255): #FFF
</span><span class="cx"> Parsed as rgb(255,255,255): #FFFFFF
</span><span class="cx"> Parsed as rgb(0,128,0): green
</span></span></pre></div>
<a id="trunkLayoutTestssvgdomrgbcolorparserhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/svg/dom/rgb-color-parser.html (192022 => 192023)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/dom/rgb-color-parser.html        2015-11-04 14:46:19 UTC (rev 192022)
+++ trunk/LayoutTests/svg/dom/rgb-color-parser.html        2015-11-04 17:49:46 UTC (rev 192023)
</span><span class="lines">@@ -226,7 +226,6 @@
</span><span class="cx"> parseRGBColor("#");
</span><span class="cx"> parseRGBColor("#f");
</span><span class="cx"> parseRGBColor("#ff");
</span><del>- parseRGBColor("#ffff");
</del><span class="cx"> parseRGBColor("#fffff");
</span><span class="cx"> parseRGBColor("#fffffff");
</span><span class="cx"> parseRGBColor("green,");
</span><span class="lines">@@ -242,7 +241,9 @@
</span><span class="cx"> // Some more valid ones.
</span><span class="cx"> parseRGBColor("rgb(0, 10, 20)");
</span><span class="cx"> parseRGBColor("#fff");
</span><ins>+ parseRGBColor("#ffff");
</ins><span class="cx"> parseRGBColor("#ffffff");
</span><ins>+ parseRGBColor("#ffffffff");
</ins><span class="cx"> parseRGBColor("#FFF");
</span><span class="cx"> parseRGBColor("#FFFFFF");
</span><span class="cx"> parseRGBColor(" green");
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (192022 => 192023)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-11-04 14:46:19 UTC (rev 192022)
+++ trunk/Source/WebCore/ChangeLog        2015-11-04 17:49:46 UTC (rev 192023)
</span><span class="lines">@@ -1,3 +1,20 @@
</span><ins>+2015-11-03 Dean Jackson <dino@apple.com>
+
+ Accept 8 and 4 value hex colors (#RRGGBBAA)
+ https://bugs.webkit.org/show_bug.cgi?id=150853
+ <rdar://problem/23380930>
+
+ Reviewed by Simon Fraser.
+
+ CSS Color Level 4 allows #RGBA and #RRGGBBAA values
+ for colors.
+
+ Test: fast/css/hex-colors.html
+
+ * platform/graphics/Color.cpp:
+ (WebCore::parseHexColorInternal): Update the color parsing for
+ the new syntax.
+
</ins><span class="cx"> 2015-11-04 Mario Sanchez Prada <mario@webkit.org>
</span><span class="cx">
</span><span class="cx"> [AX] WebProcess from WebKitGtk+ 2.10.0 compiled in Debug mode hits ASSERT on textUnderElement
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsColorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/Color.cpp (192022 => 192023)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/Color.cpp        2015-11-04 14:46:19 UTC (rev 192022)
+++ trunk/Source/WebCore/platform/graphics/Color.cpp        2015-11-04 17:49:46 UTC (rev 192023)
</span><span class="lines">@@ -128,7 +128,7 @@
</span><span class="cx"> template <typename CharacterType>
</span><span class="cx"> static inline bool parseHexColorInternal(const CharacterType* name, unsigned length, RGBA32& rgb)
</span><span class="cx"> {
</span><del>- if (length != 3 && length != 6)
</del><ins>+ if (length != 3 && length != 4 && length != 6 && length != 8)
</ins><span class="cx"> return false;
</span><span class="cx"> unsigned value = 0;
</span><span class="cx"> for (unsigned i = 0; i < length; ++i) {
</span><span class="lines">@@ -141,6 +141,20 @@
</span><span class="cx"> rgb = 0xFF000000 | value;
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><ins>+ if (length == 8) {
+ // We parsed the values into RGBA order, but the RGBA32 type
+ // expects them to be in ARGB order, so we right rotate eight bits.
+ rgb = value << 24 | value >> 8;
+ return true;
+ }
+ if (length == 4) {
+ // #abcd converts to ddaabbcc in RGBA32.
+ rgb = (value & 0xF) << 28 | (value & 0xF) << 24
+ | (value & 0xF000) << 8 | (value & 0xF000) << 4
+ | (value & 0xF00) << 4 | (value & 0xF00)
+ | (value & 0xF0) | (value & 0xF0) >> 4;
+ return true;
+ }
</ins><span class="cx"> // #abc converts to #aabbcc
</span><span class="cx"> rgb = 0xFF000000
</span><span class="cx"> | (value & 0xF00) << 12 | (value & 0xF00) << 8
</span></span></pre>
</div>
</div>
</body>
</html>