| Index: Source/core/css/CSSParser-in.cpp
|
| diff --git a/Source/core/css/CSSParser-in.cpp b/Source/core/css/CSSParser-in.cpp
|
| index 1ff2cfe8f1ab2355d990715a8dacce611992d08e..530d6b43f5cba7dd7b3d80c2e88a4724ed4bdedf 100644
|
| --- a/Source/core/css/CSSParser-in.cpp
|
| +++ b/Source/core/css/CSSParser-in.cpp
|
| @@ -543,7 +543,7 @@ static bool parseSimpleLengthValue(MutableStylePropertySet* declaration, CSSProp
|
| {
|
| ASSERT(!string.isEmpty());
|
| bool acceptsNegativeNumbers;
|
| - if (!isSimpleLengthPropertyID(propertyId, acceptsNegativeNumbers))
|
| + if (cssParserMode == ViewportMode || !isSimpleLengthPropertyID(propertyId, acceptsNegativeNumbers))
|
| return false;
|
|
|
| unsigned length = string.length();
|
| @@ -1219,7 +1219,10 @@ bool CSSParser::parseValue(MutableStylePropertySet* declaration, CSSPropertyID p
|
| m_id = propertyID;
|
| m_important = important;
|
|
|
| - cssyyparse(this);
|
| + {
|
| + StyleDeclarationScope scope(this, declaration);
|
| + cssyyparse(this);
|
| + }
|
|
|
| m_rule = 0;
|
| m_id = CSSPropertyInvalid;
|
| @@ -1334,7 +1337,12 @@ bool CSSParser::parseDeclaration(MutableStylePropertySet* declaration, const Str
|
| m_sourceDataHandler->endRuleHeader(1);
|
| m_sourceDataHandler->startRuleBody(0);
|
| }
|
| - cssyyparse(this);
|
| +
|
| + {
|
| + StyleDeclarationScope scope(this, declaration);
|
| + cssyyparse(this);
|
| + }
|
| +
|
| m_rule = 0;
|
|
|
| bool ok = false;
|
| @@ -1401,7 +1409,9 @@ PassRefPtr<ImmutableStylePropertySet> CSSParser::createStylePropertySet()
|
| if (unusedEntries)
|
| results.remove(0, unusedEntries);
|
|
|
| - return ImmutableStylePropertySet::create(results.data(), results.size(), m_context.mode);
|
| + CSSParserMode mode = inViewport() ? ViewportMode : m_context.mode;
|
| +
|
| + return ImmutableStylePropertySet::create(results.data(), results.size(), mode);
|
| }
|
|
|
| void CSSParser::addPropertyWithPrefixingVariant(CSSPropertyID propId, PassRefPtr<CSSValue> value, bool important, bool implicit)
|
|
|