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

Unified Diff: third_party/WebKit/Source/core/css/PropertyRegistration.cpp

Issue 2632083002: Provide a CSSParserContext to CSSSyntaxDescriptor (Closed)
Patch Set: Fix parser context in PropertyRegistration Created 3 years, 11 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: third_party/WebKit/Source/core/css/PropertyRegistration.cpp
diff --git a/third_party/WebKit/Source/core/css/PropertyRegistration.cpp b/third_party/WebKit/Source/core/css/PropertyRegistration.cpp
index 09683e1c9aeaa4f83c527fc7a5df85ad74e54dc3..71bbc5d70c958adfce787c813ccb91353f799d22 100644
--- a/third_party/WebKit/Source/core/css/PropertyRegistration.cpp
+++ b/third_party/WebKit/Source/core/css/PropertyRegistration.cpp
@@ -5,11 +5,14 @@
#include "core/css/PropertyRegistration.h"
#include "core/animation/CSSValueInterpolationType.h"
+#include "core/css/CSSStyleSheet.h"
#include "core/css/CSSSyntaxDescriptor.h"
#include "core/css/CSSValueList.h"
#include "core/css/CSSVariableReferenceValue.h"
#include "core/css/PropertyDescriptor.h"
#include "core/css/PropertyRegistry.h"
+#include "core/css/StyleSheetContents.h"
+#include "core/css/parser/CSSParserContext.h"
#include "core/css/parser/CSSTokenizer.h"
#include "core/css/parser/CSSVariableParser.h"
#include "core/css/resolver/StyleBuilderConverter.h"
@@ -108,8 +111,10 @@ void PropertyRegistration::registerProperty(
if (descriptor.hasInitialValue()) {
CSSTokenizer tokenizer(descriptor.initialValue());
bool isAnimationTainted = false;
- const CSSValue* initial =
- syntaxDescriptor.parse(tokenizer.tokenRange(), isAnimationTainted);
+ const CSSValue* initial = syntaxDescriptor.parse(
+ tokenizer.tokenRange(),
+ document->elementSheet().contents()->parserContext(),
+ isAnimationTainted);
if (!initial) {
exceptionState.throwDOMException(
SyntaxError,
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSVariableData.cpp ('k') | third_party/WebKit/Source/core/css/parser/CSSParserImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698