Title: [116263] trunk
Revision
116263
Author
[email protected]
Date
2012-05-06 20:13:12 -0700 (Sun, 06 May 2012)

Log Message

Disallow unquoted -webkit-font-feature-settings tags
https://bugs.webkit.org/show_bug.cgi?id=85362

Reviewed by Kent Tamura.

Source/WebCore:

Disallow unquoted tags to follow the current draft.
http://dev.w3.org/csswg/css3-fonts/#font-feature-settings-prop

No new tests. css3/font-feature-settings-parsing.html was updated.

* css/CSSParser.cpp:
(WebCore::CSSParser::parseFontFeatureTag): Accepts only 4-characters string.

LayoutTests:

* css3/font-feature-settings-parsing-expected.txt: Updated to follow the current draft specification.
* css3/font-feature-settings-parsing.html: Ditto.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (116262 => 116263)


--- trunk/LayoutTests/ChangeLog	2012-05-07 02:53:33 UTC (rev 116262)
+++ trunk/LayoutTests/ChangeLog	2012-05-07 03:13:12 UTC (rev 116263)
@@ -1,3 +1,13 @@
+2012-05-06  Kenichi Ishibashi  <[email protected]>
+
+        Disallow unquoted -webkit-font-feature-settings tags
+        https://bugs.webkit.org/show_bug.cgi?id=85362
+
+        Reviewed by Kent Tamura.
+
+        * css3/font-feature-settings-parsing-expected.txt: Updated to follow the current draft specification.
+        * css3/font-feature-settings-parsing.html: Ditto.
+
 2012-05-06  Raphael Kubo da Costa  <[email protected]>
 
         [EFL] Gardening. Skip more failing tests.

Modified: trunk/LayoutTests/css3/font-feature-settings-parsing-expected.txt (116262 => 116263)


--- trunk/LayoutTests/css3/font-feature-settings-parsing-expected.txt	2012-05-07 02:53:33 UTC (rev 116262)
+++ trunk/LayoutTests/css3/font-feature-settings-parsing-expected.txt	2012-05-07 03:13:12 UTC (rev 116263)
@@ -12,12 +12,12 @@
 PASS parseResultOf("valid_value_omit") is "'c2sc' 1"
 PASS parseResultOf("valid_valuelist") is "'tnum' 1, 'hist' 1"
 PASS parseResultOf("valid_singlequote") is "'PKRN' 1"
-PASS parseResultOf("valid_ident") is "'dlig' 1"
 PASS parseResultOf("valid_unusual_tag") is "'!@#$' 1"
 PASS parseResultOf("valid_tag_space") is "'a bc' 1"
-PASS parseResultOf("valid_cases") is "'dlig' 1, 'DLIG' 1, 'DLig' 1"
-PASS parseResultOf("valid_composite") is "'dlig' 1, 'smcp' 1, 'liga' 0"
+PASS parseResultOf("valid_composite") is "'dlig' 1, 'smcp' 1, 'lig ' 0"
 - Tests invalid inputs.  Results should be "normal".
+PASS parseResultOf("invalid_ident") is "normal"
+PASS parseResultOf("invalid_cases") is "normal"
 PASS parseResultOf("invalid_1") is "normal"
 PASS parseResultOf("invalid_off") is "normal"
 PASS parseResultOf("invalid_normal_duplicate") is "normal"

Modified: trunk/LayoutTests/css3/font-feature-settings-parsing.html (116262 => 116263)


--- trunk/LayoutTests/css3/font-feature-settings-parsing.html	2012-05-07 02:53:33 UTC (rev 116262)
+++ trunk/LayoutTests/css3/font-feature-settings-parsing.html	2012-05-07 03:13:12 UTC (rev 116263)
@@ -33,26 +33,26 @@
     -webkit-font-feature-settings: 'PKRN';
 }
 
-#valid_ident {
-    -webkit-font-feature-settings: dlig;
-}
-
 #valid_unusual_tag {
     -webkit-font-feature-settings: "!@#$";
 }
 
-#valid_cases {
-    -webkit-font-feature-settings: dlig, DLIG, DLig;
-}
-
 #valid_tag_space {
     -webkit-font-feature-settings: "a bc";
 }
 
 #valid_composite {
-    -webkit-font-feature-settings: "dlig" 1, 'smcp' on, liga off;
+    -webkit-font-feature-settings: "dlig" 1, 'smcp' on, 'lig ' off;
 }
 
+#invalid_ident {
+    -webkit-font-feature-settings: dlig;
+}
+
+#invalid_cases {
+    -webkit-font-feature-settings: dlig, DLIG, DLig;
+}
+
 #invalid_1 {
     -webkit-font-feature-settings: 1;
 }
@@ -137,12 +137,12 @@
 <div id="valid_value_omit"></div>
 <div id="valid_valuelist"></div>
 <div id="valid_singlequote"></div>
-<div id="valid_ident"></div>
 <div id="valid_unusual_tag"></div>
 <div id="valid_tag_space"></div>
-<div id="valid_cases"></div>
 <div id="valid_composite"></div>
 
+<div id="invalid_ident"></div>
+<div id="invalid_cases"></div>
 <div id="invalid_1"></div>
 <div id="invalid_off"></div>
 <div id="invalid_normal_duplicate"></div>
@@ -159,7 +159,7 @@
 <div id="invalid_on"></div>
 <div id="invalid_0"></div>
 
-<div id="outer" style="-webkit-font-feature-settings: dlig;">
+<div id="outer" style="-webkit-font-feature-settings: 'dlig';">
   <div id="inner"></div>
 </div>
 
@@ -182,13 +182,13 @@
 shouldBeEqualToString('parseResultOf("valid_value_omit")', "'c2sc' 1");
 shouldBeEqualToString('parseResultOf("valid_valuelist")', "'tnum' 1, 'hist' 1");
 shouldBeEqualToString('parseResultOf("valid_singlequote")', "'PKRN' 1");
-shouldBeEqualToString('parseResultOf("valid_ident")', "'dlig' 1");
 shouldBeEqualToString('parseResultOf("valid_unusual_tag")', "'!@#$' 1");
 shouldBeEqualToString('parseResultOf("valid_tag_space")', "'a bc' 1");
-shouldBeEqualToString('parseResultOf("valid_cases")', "'dlig' 1, 'DLIG' 1, 'DLig' 1");
-shouldBeEqualToString('parseResultOf("valid_composite")', "'dlig' 1, 'smcp' 1, 'liga' 0");
+shouldBeEqualToString('parseResultOf("valid_composite")', "'dlig' 1, 'smcp' 1, 'lig ' 0");
 
 debug('- Tests invalid inputs.  Results should be "normal".');
+shouldBe('parseResultOf("invalid_ident")', '"normal"');
+shouldBe('parseResultOf("invalid_cases")', '"normal"');
 shouldBe('parseResultOf("invalid_1")', '"normal"');
 shouldBe('parseResultOf("invalid_off")', '"normal"');
 shouldBe('parseResultOf("invalid_normal_duplicate")', '"normal"');

Modified: trunk/Source/WebCore/ChangeLog (116262 => 116263)


--- trunk/Source/WebCore/ChangeLog	2012-05-07 02:53:33 UTC (rev 116262)
+++ trunk/Source/WebCore/ChangeLog	2012-05-07 03:13:12 UTC (rev 116263)
@@ -1,3 +1,18 @@
+2012-05-06  Kenichi Ishibashi  <[email protected]>
+
+        Disallow unquoted -webkit-font-feature-settings tags
+        https://bugs.webkit.org/show_bug.cgi?id=85362
+
+        Reviewed by Kent Tamura.
+
+        Disallow unquoted tags to follow the current draft.
+        http://dev.w3.org/csswg/css3-fonts/#font-feature-settings-prop
+
+        No new tests. css3/font-feature-settings-parsing.html was updated.
+
+        * css/CSSParser.cpp:
+        (WebCore::CSSParser::parseFontFeatureTag): Accepts only 4-characters string.
+
 2012-05-06  Raphael Kubo da Costa  <[email protected]>
 
         Unreviewed build fix for r116260.

Modified: trunk/Source/WebCore/css/CSSParser.cpp (116262 => 116263)


--- trunk/Source/WebCore/css/CSSParser.cpp	2012-05-07 02:53:33 UTC (rev 116262)
+++ trunk/Source/WebCore/css/CSSParser.cpp	2012-05-07 03:13:12 UTC (rev 116263)
@@ -7519,7 +7519,7 @@
 
     CSSParserValue* value = m_valueList->current();
     // Feature tag name comes first
-    if (value->unit != CSSPrimitiveValue::CSS_STRING && value->unit != CSSPrimitiveValue::CSS_IDENT)
+    if (value->unit != CSSPrimitiveValue::CSS_STRING)
         return false;
     if (value->string.length != tagNameLength)
         return false;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to