| Index: Source/core/css/StyleRule.cpp
|
| diff --git a/Source/core/css/StyleRule.cpp b/Source/core/css/StyleRule.cpp
|
| index dc810357ca37e3125b526763bc3498a1a480db4b..7eb6e6e85eef3b729d0f45619f9e0e078849e65f 100644
|
| --- a/Source/core/css/StyleRule.cpp
|
| +++ b/Source/core/css/StyleRule.cpp
|
| @@ -29,6 +29,7 @@
|
| #include "core/css/CSSPageRule.h"
|
| #include "core/css/CSSStyleRule.h"
|
| #include "core/css/CSSSupportsRule.h"
|
| +#include "core/css/CSSValueList.h"
|
| #include "core/css/CSSViewportRule.h"
|
| #include "core/css/StylePropertySet.h"
|
| #include "core/css/StyleRuleImport.h"
|
| @@ -347,9 +348,18 @@ MutableStylePropertySet& StyleRuleFontFace::mutableProperties()
|
| return *toMutableStylePropertySet(m_properties);
|
| }
|
|
|
| -void StyleRuleFontFace::setProperties(PassRefPtrWillBeRawPtr<StylePropertySet> properties)
|
| +bool StyleRuleFontFace::setProperties(PassRefPtrWillBeRawPtr<StylePropertySet> properties)
|
| {
|
| + // 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 < properties->propertyCount(); ++i) {
|
| + StylePropertySet::PropertyReference property = properties->propertyAt(i);
|
| + if (property.id() == CSSPropertyFontFamily && (!property.value()->isValueList() || toCSSValueList(property.value())->length() != 1))
|
| + return false;
|
| + }
|
| +
|
| m_properties = properties;
|
| + return true;
|
| }
|
|
|
| DEFINE_TRACE_AFTER_DISPATCH(StyleRuleFontFace)
|
|
|