[css3-text] text-decoration-line now accepts "blink" as valid value
https://bugs.webkit.org/show_bug.cgi?id=116104

Reviewed by Andreas Kling.

Source/WebCore:

As of November 13th 2012, the W3C specification has been updated to
accept "blink" as a valid property value in text-decoration-line. Though
accepting the value as valid, it is ignored as CSS Level 1
text-decoration property currently does.

Updated related layout tests to reflect changes in specification.

* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseTextDecoration):

LayoutTests:

Updated layout test results to reflect changes in specification.

* fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-line-expected.txt:
* fast/css3-text/css3-text-decoration/getComputedStyle/script-tests/getComputedStyle-text-decoration-line.js:
* fast/css3-text/css3-text-decoration/text-decoration-line-expected.html:
* fast/css3-text/css3-text-decoration/text-decoration-line.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150136 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 8260bf4..675f919 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,17 @@
+2013-05-15  Bruno de Oliveira Abinader  <bruno.abinader@basyskom.com>
+
+        [css3-text] text-decoration-line now accepts "blink" as valid value
+        https://bugs.webkit.org/show_bug.cgi?id=116104
+
+        Reviewed by Andreas Kling.
+
+        Updated layout test results to reflect changes in specification.
+
+        * fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-line-expected.txt:
+        * fast/css3-text/css3-text-decoration/getComputedStyle/script-tests/getComputedStyle-text-decoration-line.js:
+        * fast/css3-text/css3-text-decoration/text-decoration-line-expected.html:
+        * fast/css3-text/css3-text-decoration/text-decoration-line.html:
+
 2013-05-15  Peter Gal  <galpeter@inf.u-szeged.hu>
 
         Allow http tests on Arch Linux
diff --git a/LayoutTests/fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-line-expected.txt b/LayoutTests/fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-line-expected.txt
index 84b9e37..ca63a1d 100644
--- a/LayoutTests/fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-line-expected.txt
+++ b/LayoutTests/fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-line-expected.txt
@@ -49,18 +49,18 @@
 PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-line').toString() is '[object CSSValueList]'
 PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-line').cssText is 'line-through'
 
-Value 'underline overline line-through':
-PASS e.style.webkitTextDecorationLine is 'underline overline line-through'
+Value 'blink' (valid but ignored):
+PASS e.style.webkitTextDecorationLine is 'blink'
 PASS e.style.getPropertyCSSValue('-webkit-text-decoration-line').toString() is '[object CSSValueList]'
-PASS e.style.getPropertyCSSValue('-webkit-text-decoration-line').cssText is 'underline overline line-through'
-PASS computedStyle.webkitTextDecorationLine is 'underline overline line-through'
-PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-line').toString() is '[object CSSValueList]'
-PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-line').cssText is 'underline overline line-through'
+PASS e.style.getPropertyCSSValue('-webkit-text-decoration-line').cssText is 'blink'
+PASS computedStyle.webkitTextDecorationLine is 'none'
+PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-line').toString() is '[object CSSPrimitiveValue]'
+PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-line').cssText is 'none'
 
-Value 'blink' (invalid, last valid value is used):
-PASS e.style.webkitTextDecorationLine is 'underline overline line-through'
+Value 'underline overline line-through blink':
+PASS e.style.webkitTextDecorationLine is 'underline overline line-through blink'
 PASS e.style.getPropertyCSSValue('-webkit-text-decoration-line').toString() is '[object CSSValueList]'
-PASS e.style.getPropertyCSSValue('-webkit-text-decoration-line').cssText is 'underline overline line-through'
+PASS e.style.getPropertyCSSValue('-webkit-text-decoration-line').cssText is 'underline overline line-through blink'
 PASS computedStyle.webkitTextDecorationLine is 'underline overline line-through'
 PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-line').toString() is '[object CSSValueList]'
 PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-line').cssText is 'underline overline line-through'
diff --git a/LayoutTests/fast/css3-text/css3-text-decoration/getComputedStyle/script-tests/getComputedStyle-text-decoration-line.js b/LayoutTests/fast/css3-text/css3-text-decoration/getComputedStyle/script-tests/getComputedStyle-text-decoration-line.js
index 8f0d4ba..b12263f 100644
--- a/LayoutTests/fast/css3-text/css3-text-decoration/getComputedStyle/script-tests/getComputedStyle-text-decoration-line.js
+++ b/LayoutTests/fast/css3-text/css3-text-decoration/getComputedStyle/script-tests/getComputedStyle-text-decoration-line.js
@@ -59,15 +59,15 @@
 testComputedStyle("webkitTextDecorationLine", "-webkit-text-decoration-line", "[object CSSValueList]", "line-through");
 debug('');
 
-debug("Value 'underline overline line-through':");
-e.style.webkitTextDecorationLine = 'underline overline line-through';
-testElementStyle("webkitTextDecorationLine", "-webkit-text-decoration-line", "[object CSSValueList]", "underline overline line-through");
-testComputedStyle("webkitTextDecorationLine", "-webkit-text-decoration-line", "[object CSSValueList]", "underline overline line-through");
+debug("Value 'blink' (valid but ignored):");
+e.style.webkitTextDecorationLine = 'blink';
+testElementStyle("webkitTextDecorationLine", "-webkit-text-decoration-line", "[object CSSValueList]", "blink");
+testComputedStyle("webkitTextDecorationLine", "-webkit-text-decoration-line", "[object CSSPrimitiveValue]", "none");
 debug('');
 
-debug("Value 'blink' (invalid, last valid value is used):");
-e.style.webkitTextDecorationLine = 'blink';
-testElementStyle("webkitTextDecorationLine", "-webkit-text-decoration-line", "[object CSSValueList]", "underline overline line-through");
+debug("Value 'underline overline line-through blink':");
+e.style.webkitTextDecorationLine = 'underline overline line-through blink';
+testElementStyle("webkitTextDecorationLine", "-webkit-text-decoration-line", "[object CSSValueList]", "underline overline line-through blink");
 testComputedStyle("webkitTextDecorationLine", "-webkit-text-decoration-line", "[object CSSValueList]", "underline overline line-through");
 debug('');
 
diff --git a/LayoutTests/fast/css3-text/css3-text-decoration/text-decoration-line-expected.html b/LayoutTests/fast/css3-text/css3-text-decoration/text-decoration-line-expected.html
index b65539e..0dae327 100644
--- a/LayoutTests/fast/css3-text/css3-text-decoration/text-decoration-line-expected.html
+++ b/LayoutTests/fast/css3-text/css3-text-decoration/text-decoration-line-expected.html
@@ -5,7 +5,7 @@
             .underline { text-decoration: underline; }
             .overline { text-decoration: overline; }
             .line-through { text-decoration: line-through; }
-            .all-decorations { text-decoration: underline overline line-through; }
+            .all-decorations { text-decoration: underline overline line-through blink; }
     </style>
 </head>
 <body>
diff --git a/LayoutTests/fast/css3-text/css3-text-decoration/text-decoration-line.html b/LayoutTests/fast/css3-text/css3-text-decoration/text-decoration-line.html
index 4d44b17..5ca7c00 100644
--- a/LayoutTests/fast/css3-text/css3-text-decoration/text-decoration-line.html
+++ b/LayoutTests/fast/css3-text/css3-text-decoration/text-decoration-line.html
@@ -5,7 +5,7 @@
             .underline { text-decoration: underline; }
             .overline { text-decoration: overline; }
             .line-through { text-decoration: line-through; }
-            .all-decorations { text-decoration: underline overline line-through; }
+            .all-decorations { text-decoration: underline overline line-through blink; }
     </style>
 </head>
 <body>
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 02490ba..5e7344a 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,21 @@
+2013-05-15  Bruno de Oliveira Abinader  <bruno.abinader@basyskom.com>
+
+        [css3-text] text-decoration-line now accepts "blink" as valid value
+        https://bugs.webkit.org/show_bug.cgi?id=116104
+
+        Reviewed by Andreas Kling.
+
+        As of November 13th 2012, the W3C specification has been updated to
+        accept "blink" as a valid property value in text-decoration-line. Though
+        accepting the value as valid, it is ignored as CSS Level 1
+        text-decoration property currently does.
+
+        Updated related layout tests to reflect changes in specification.
+
+        * css/CSSParser.cpp:
+        (WebCore::CSSParser::parseValue):
+        (WebCore::CSSParser::parseTextDecoration):
+
 2013-05-14  Simon Fraser  <simon.fraser@apple.com>
 
         Revert http://trac.webkit.org/changeset/150047
diff --git a/Source/WebCore/css/CSSParser.cpp b/Source/WebCore/css/CSSParser.cpp
index fb8f926..a8fa252 100644
--- a/Source/WebCore/css/CSSParser.cpp
+++ b/Source/WebCore/css/CSSParser.cpp
@@ -2318,14 +2318,13 @@
 
     case CSSPropertyTextDecoration:
     case CSSPropertyWebkitTextDecorationsInEffect:
+#if ENABLE(CSS3_TEXT)
+    case CSSPropertyWebkitTextDecorationLine:
+#endif // CSS3_TEXT
         // none | [ underline || overline || line-through || blink ] | inherit
         return parseTextDecoration(propId, important);
 
 #if ENABLE(CSS3_TEXT)
-    case CSSPropertyWebkitTextDecorationLine:
-        // none | [ underline || overline || line-through ] | inherit
-        return parseTextDecoration(propId, important);
-
     case CSSPropertyWebkitTextDecorationStyle:
         // solid | double | dotted | dashed | wavy
         if (id == CSSValueSolid || id == CSSValueDouble || id == CSSValueDotted || id == CSSValueDashed || id == CSSValueWavy)
@@ -9359,16 +9358,9 @@
     while (isValid && value) {
         switch (value->id) {
         case CSSValueBlink:
-#if ENABLE(CSS3_TEXT)
-            // Blink value is not accepted by -webkit-text-decoration-line.
-            isValid = propId != CSSPropertyWebkitTextDecorationLine;
-            if (isValid)
-                list->append(cssValuePool().createIdentifierValue(value->id));
-            break;
-#endif // CSS3_TEXT
-        case CSSValueUnderline:
-        case CSSValueOverline:
         case CSSValueLineThrough:
+        case CSSValueOverline:
+        case CSSValueUnderline:
             list->append(cssValuePool().createIdentifierValue(value->id));
             break;
         default: