Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(596)

Unified Diff: Source/core/css/parser/CSSParserImpl.cpp

Issue 1116593003: Move font-family check to CSSPropertyParser (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: move check into CSSPropertyParser and add test Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..96da29cb822c1b727f5b324e4ae282f6e0b6a15e 100644
--- a/Source/core/css/parser/CSSParserImpl.cpp
+++ b/Source/core/css/parser/CSSParserImpl.cpp
@@ -465,16 +465,6 @@ 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()));
m_parsedProperties.clear();
« no previous file with comments | « LayoutTests/fast/css/fontface-single-font-family-expected.txt ('k') | Source/core/css/parser/CSSPropertyParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698