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

Unified Diff: Source/core/css/StylePropertySet.cpp

Issue 1192983003: CSS Custom Properties (Variables) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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/css/StylePropertySet.cpp
diff --git a/Source/core/css/StylePropertySet.cpp b/Source/core/css/StylePropertySet.cpp
index d0da61710b52cdd6d624c5a5fc789e20ce727e02..8a2bf7238045fbb7ad893fbaf7db79c7e68cf8cc 100644
--- a/Source/core/css/StylePropertySet.cpp
+++ b/Source/core/css/StylePropertySet.cpp
@@ -517,6 +517,17 @@ int MutableStylePropertySet::findPropertyIndex(CSSPropertyID propertyID) const
return -1;
}
+unsigned StylePropertySet::variableCount() const
+{
+ ASSERT(RuntimeEnabledFeatures::cssVariablesEnabled());
+ unsigned count = 0;
+ for (unsigned i = 0; i < propertyCount(); ++i) {
+ if (propertyAt(i).id() == CSSPropertyVariable)
+ count++;
+ }
+ return count;
+}
+
DEFINE_TRACE_AFTER_DISPATCH(MutableStylePropertySet)
{
#if ENABLE(OILPAN)

Powered by Google App Engine
This is Rietveld 408576698