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

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

Issue 2622403006: Compute initial values for registered custom properties. (Closed)
Patch Set: 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 410ae2c900bf7b26544e15ce2d03ed907961020c..59ca5e39c53dd9d5d5bbeef09104556c19c39d30 100644
--- a/third_party/WebKit/Source/core/css/PropertyRegistration.cpp
+++ b/third_party/WebKit/Source/core/css/PropertyRegistration.cpp
@@ -12,6 +12,7 @@
#include "core/css/PropertyRegistry.h"
#include "core/css/parser/CSSTokenizer.h"
#include "core/css/parser/CSSVariableParser.h"
+#include "core/css/resolver/StyleBuilderConverter.h"
#include "core/dom/Document.h"
#include "core/dom/ExceptionCode.h"
#include "core/dom/StyleChangeReason.h"
@@ -121,6 +122,8 @@ void PropertyRegistration::registerProperty(
"The initial value provided is not computationally independent.");
return;
}
+ initial =
+ &StyleBuilderConverter::convertRegisteredPropertyInitialValue(*initial);
RefPtr<CSSVariableData> initialVariableData = CSSVariableData::create(
tokenizer.tokenRange(), isAnimationTainted, false);
registry.registerProperty(

Powered by Google App Engine
This is Rietveld 408576698