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

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

Issue 1192983003: CSS Custom Properties (Variables) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: ToT-ed again... Created 5 years, 5 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 446a9aadc637be04c77317c6648ae7be156678eb..37975a1dacf07d3b9d8ef051750b027a6f4d7693 100644
--- a/Source/core/style/ComputedStyle.cpp
+++ b/Source/core/style/ComputedStyle.cpp
@@ -1245,6 +1245,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