[CSS Parser] Fix font-family parsing inside @font-face
authorhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 28 Oct 2016 22:19:11 +0000 (22:19 +0000)
committerhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 28 Oct 2016 22:19:11 +0000 (22:19 +0000)
https://bugs.webkit.org/show_bug.cgi?id=164155

Reviewed by Simon Fraser.

* css/parser/CSSPropertyParser.cpp:
(WebCore::CSSPropertyParser::parseFontFaceDescriptor):
Use the full font-family parsing that returns a CSSValueList,
since we can handle multiple families.

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

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

index 5fe93af..6ad032b 100644 (file)
@@ -1,3 +1,15 @@
+2016-10-28  Dave Hyatt  <hyatt@apple.com>
+
+        [CSS Parser] Fix font-family parsing inside @font-face
+        https://bugs.webkit.org/show_bug.cgi?id=164155
+
+        Reviewed by Simon Fraser.
+
+        * css/parser/CSSPropertyParser.cpp:
+        (WebCore::CSSPropertyParser::parseFontFaceDescriptor):
+        Use the full font-family parsing that returns a CSSValueList,
+        since we can handle multiple families.
+
 2016-10-28  Per Arne Vollan  <pvollan@apple.com>
 
         [Win][Direct2D] Implement ImageBufferData::putData.
index 3a86db8..71d471e 100644 (file)
@@ -3679,9 +3679,7 @@ bool CSSPropertyParser::parseFontFaceDescriptor(CSSPropertyID propId)
     RefPtr<CSSValue> parsedValue;
     switch (propId) {
     case CSSPropertyFontFamily:
-        if (consumeGenericFamily(m_range))
-            return false;
-        parsedValue = consumeFamilyName(m_range);
+        parsedValue = consumeFontFamily(m_range);
         break;
     case CSSPropertySrc: // This is a list of urls or local references.
         parsedValue = consumeFontFaceSrc(m_range, m_context);