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

Unified Diff: third_party/WebKit/Source/core/css/resolver/CSSVariableResolver.cpp

Issue 2873943002: Ensure original parser context is used when parsing resolved var() references (Closed)
Patch Set: g cl set-commit Created 3 years, 7 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
« no previous file with comments | « third_party/WebKit/Source/core/css/parser/CSSVariableParser.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/resolver/CSSVariableResolver.cpp
diff --git a/third_party/WebKit/Source/core/css/resolver/CSSVariableResolver.cpp b/third_party/WebKit/Source/core/css/resolver/CSSVariableResolver.cpp
index 941fd32572c73a73d0ffeb2c7eed245552cf8823..8b5e6824eddfb07be9af8585fee4ff737b1cc1ac 100644
--- a/third_party/WebKit/Source/core/css/resolver/CSSVariableResolver.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/CSSVariableResolver.cpp
@@ -229,7 +229,7 @@ const CSSValue* CSSVariableResolver::ResolveVariableReferences(
is_animation_tainted))
return CSSUnsetValue::Create();
const CSSValue* result =
- CSSPropertyParser::ParseSingleValue(id, tokens, StrictCSSParserContext());
+ CSSPropertyParser::ParseSingleValue(id, tokens, value.ParserContext());
if (!result)
return CSSUnsetValue::Create();
return result;
@@ -258,13 +258,13 @@ const CSSValue* CSSVariableResolver::ResolvePendingSubstitutions(
if (resolver.ResolveTokenRange(
shorthand_value->VariableDataValue()->Tokens(),
disallow_animation_tainted, tokens, is_animation_tainted)) {
- CSSParserContext* context = CSSParserContext::Create(kHTMLStandardMode);
HeapVector<CSSProperty, 256> parsed_properties;
if (CSSPropertyParser::ParseValue(
shorthand_property_id, false, CSSParserTokenRange(tokens),
- context, parsed_properties, StyleRule::RuleType::kStyle)) {
+ shorthand_value->ParserContext(), parsed_properties,
+ StyleRule::RuleType::kStyle)) {
unsigned parsed_properties_count = parsed_properties.size();
for (unsigned i = 0; i < parsed_properties_count; ++i) {
property_cache.Set(parsed_properties[i].Id(),
« no previous file with comments | « third_party/WebKit/Source/core/css/parser/CSSVariableParser.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698