Changeset 209217 in webkit
- Timestamp:
- Dec 1, 2016 2:54:52 PM (7 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r209206 r209217 1 2016-12-01 Dave Hyatt <hyatt@apple.com> 2 3 [CSS Parser] Only allow a single font-family in @font-face 4 https://bugs.webkit.org/show_bug.cgi?id=165278 5 6 Reviewed by Zalan Bujtas. 7 8 * css/parser/CSSPropertyParser.cpp: 9 (WebCore::consumeFontFamilyDescriptor): 10 (WebCore::CSSPropertyParser::parseFontFaceDescriptor): 11 1 12 2016-12-01 Beth Dakin <bdakin@apple.com> 2 13 -
trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp
r209199 r209217 921 921 } 922 922 } while (consumeCommaIncludingWhitespace(range)); 923 return list; 924 } 925 926 static RefPtr<CSSValueList> consumeFontFamilyDescriptor(CSSParserTokenRange& range) 927 { 928 // FIXME-NEWPARSER: For compatibility with the old parser, we have to make 929 // a list here, even though the list always contains only a single family name. 930 // Once the old parser is gone, we can delete this function, make the caller 931 // use consumeFamilyName instead, and then patch the @font-face code to 932 // not expect a list with a single name in it. 933 RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated(); 934 RefPtr<CSSValue> parsedValue = consumeFamilyName(range); 935 if (parsedValue) 936 list->append(parsedValue.releaseNonNull()); 937 938 if (!range.atEnd() || !list->length()) 939 return nullptr; 940 923 941 return list; 924 942 } … … 4077 4095 switch (propId) { 4078 4096 case CSSPropertyFontFamily: 4079 parsedValue = consumeFontFamily (m_range);4097 parsedValue = consumeFontFamilyDescriptor(m_range); 4080 4098 break; 4081 4099 case CSSPropertySrc: // This is a list of urls or local references.
Note: See TracChangeset
for help on using the changeset viewer.