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

Unified Diff: Source/core/style/ComputedStyle.cpp

Issue 1192983003: CSS Custom Properties (Variables) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: with missing files Created 5 years, 6 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: Source/core/style/ComputedStyle.cpp
diff --git a/Source/core/style/ComputedStyle.cpp b/Source/core/style/ComputedStyle.cpp
index 594eea063e035cd2c3b09557c5e04716b0271589..c106eae6439ddf828f5bda1fd867d5691454a62b 100644
--- a/Source/core/style/ComputedStyle.cpp
+++ b/Source/core/style/ComputedStyle.cpp
@@ -1242,6 +1242,24 @@ const Vector<AppliedTextDecoration>& ComputedStyle::appliedTextDecorations() con
return rareInheritedData->appliedTextDecorations->vector();
}
+void ComputedStyle::createVariables()
+{
+ RefPtr<StyleVariableData>& variables = rareInheritedData.access()->variables;
+ if (!variables)
+ variables = StyleVariableData::create();
+}
+
+StyleVariableData* ComputedStyle::variables() const
+{
+ ASSERT(RuntimeEnabledFeatures::cssVariablesEnabled());
+ return rareInheritedData->variables.get();
+}
+
+void ComputedStyle::setVariables(PassRefPtr<StyleVariableData> variableData)
+{
+ rareInheritedData.access()->variables = variableData;
+}
+
float ComputedStyle::wordSpacing() const { return fontDescription().wordSpacing(); }
float ComputedStyle::letterSpacing() const { return fontDescription().letterSpacing(); }

Powered by Google App Engine
This is Rietveld 408576698