Index: Source/core/css/parser/CSSParserImpl.cpp |
diff --git a/Source/core/css/parser/CSSParserImpl.cpp b/Source/core/css/parser/CSSParserImpl.cpp |
index 52b248d3fbc281ea58bc967f8aea583f1886de3e..b488d4936f8355d15f5c8e44147959cfb3f3c65d 100644 |
--- a/Source/core/css/parser/CSSParserImpl.cpp |
+++ b/Source/core/css/parser/CSSParserImpl.cpp |
@@ -465,18 +465,11 @@ PassRefPtrWillBeRawPtr<StyleRuleFontFace> CSSParserImpl::consumeFontFaceRule(CSS |
consumeDeclarationList(block, StyleRule::FontFace); |
- // FIXME: This logic should be in CSSPropertyParser |
- // FIXME: Shouldn't we fail if font-family or src aren't specified? |
- for (unsigned i = 0; i < m_parsedProperties.size(); ++i) { |
- CSSProperty& property = m_parsedProperties[i]; |
- if (property.id() == CSSPropertyFontFamily && (!property.value()->isValueList() || toCSSValueList(property.value())->length() != 1)) { |
- m_parsedProperties.clear(); |
- return nullptr; |
- } |
- } |
- |
RefPtrWillBeRawPtr<StyleRuleFontFace> rule = StyleRuleFontFace::create(); |
- rule->setProperties(createStylePropertySet(m_parsedProperties, m_context.mode())); |
+ if (!rule->setProperties(createStylePropertySet(m_parsedProperties, m_context.mode()))) { |
+ m_parsedProperties.clear(); |
+ return nullptr; |
+ } |
m_parsedProperties.clear(); |
if (m_styleSheet) |
m_styleSheet->setHasFontFaceRule(true); |