mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 989560 patch 3 - Add one more ExpectEndProperty() call that is needed for variables. r=heycam
This adds a check that is currently present in most but not all codepaths leading to this point, but which patch 4 will remove from many of those codepaths.
This commit is contained in:
parent
e176d7070c
commit
b0693d58f1
@ -8866,6 +8866,24 @@ CSSParserImpl::ParseProperty(nsCSSProperty aPropID)
|
||||
}
|
||||
}
|
||||
|
||||
if (result) {
|
||||
// We need to call ExpectEndProperty() to decide whether to reparse
|
||||
// with variables. This is needed because the property parsing may
|
||||
// have stopped upon finding a variable (e.g., 'margin: 1px var(a)')
|
||||
// in a way that future variable substitutions will be valid, or
|
||||
// because it parsed everything that's possible but we still want to
|
||||
// act as though the property contains variables even though we know
|
||||
// the substitution will never work (e.g., for 'margin: 1px 2px 3px
|
||||
// 4px 5px var(a)').
|
||||
//
|
||||
// It would be nice to find a better solution here
|
||||
// (and for the SkipUntilOneOf below), though, that doesn't depend
|
||||
// on using what we don't accept for doing parsing correctly.
|
||||
if (!ExpectEndProperty()) {
|
||||
result = false;
|
||||
}
|
||||
}
|
||||
|
||||
bool seenVariable = mScanner->SeenVariableReference() ||
|
||||
(stateBeforeProperty.mHavePushBack &&
|
||||
stateBeforeProperty.mToken.mType == eCSSToken_Function &&
|
||||
|
Loading…
Reference in New Issue
Block a user