[CSS Parser] Add font-variant-* keyword property support
authorhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 30 Oct 2016 03:53:10 +0000 (03:53 +0000)
committerhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 30 Oct 2016 03:53:10 +0000 (03:53 +0000)
https://bugs.webkit.org/show_bug.cgi?id=164195

Reviewed by Zalan Bujtas.

* css/parser/CSSParserFastPaths.cpp:
(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@208120 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/css/parser/CSSParserFastPaths.cpp

index fde6770..a16e66c 100644 (file)
@@ -1,5 +1,15 @@
 2016-10-29  Dave Hyatt  <hyatt@apple.com>
 
+        [CSS Parser] Add font-variant-* keyword property support
+        https://bugs.webkit.org/show_bug.cgi?id=164195
+
+        Reviewed by Zalan Bujtas.
+
+        * css/parser/CSSParserFastPaths.cpp:
+        (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
+
+2016-10-29  Dave Hyatt  <hyatt@apple.com>
+
         [CSS Parser] Fix text-emphasis-position parsing
         https://bugs.webkit.org/show_bug.cgi?id=164197
 
index 4cf1f5e..ff02800 100644 (file)
@@ -795,6 +795,12 @@ bool CSSParserFastPaths::isValidKeywordPropertyAndValue(CSSPropertyID propertyId
             || valueID == CSSValueUp || valueID == CSSValueAuto;
     case CSSPropertyWebkitMarqueeStyle:
         return valueID == CSSValueNone || valueID == CSSValueSlide || valueID == CSSValueScroll || valueID == CSSValueAlternate;
+    case CSSPropertyFontVariantPosition: // normal | sub | super
+        return valueID == CSSValueNormal || valueID == CSSValueSub || valueID == CSSValueSuper;
+    case CSSPropertyFontVariantCaps: // normal | small-caps | all-small-caps | petite-caps | all-petite-caps | unicase | titling-caps
+        return valueID == CSSValueNormal || valueID == CSSValueSmallCaps || valueID == CSSValueAllSmallCaps || valueID == CSSValuePetiteCaps || valueID == CSSValueAllPetiteCaps || valueID == CSSValueUnicase || valueID == CSSValueTitlingCaps;
+    case CSSPropertyFontVariantAlternates: // We only support the normal and historical-forms values.
+        return valueID == CSSValueNormal || valueID == CSSValueHistoricalForms;
     default:
         ASSERT_NOT_REACHED();
         return false;