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

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

Issue 18311002: Partial implementation of CSSVariablesMap for CSS Variables CSSOM (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Minor optimisation to clearVariables Created 7 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/css/StylePropertySet.h
diff --git a/Source/core/css/StylePropertySet.h b/Source/core/css/StylePropertySet.h
index 3fed4302f2db09da3ccb9aca97bd3c3cb4db6ddb..ba4304b1190a89137d64a905a26d1daa8465e24b 100644
--- a/Source/core/css/StylePropertySet.h
+++ b/Source/core/css/StylePropertySet.h
@@ -85,9 +85,13 @@ public:
bool isEmpty() const;
PropertyReference propertyAt(unsigned index) const { return PropertyReference(*this, index); }
int findPropertyIndex(CSSPropertyID) const;
+ size_t findVariableIndex(const AtomicString& name) const;
PassRefPtr<CSSValue> getPropertyCSSValue(CSSPropertyID) const;
String getPropertyValue(CSSPropertyID) const;
+ unsigned variableCount() const;
+ String variableValue(const AtomicString& name) const;
+
bool propertyIsImportant(CSSPropertyID) const;
CSSPropertyID getPropertyShorthand(CSSPropertyID) const;
bool isPropertyImplicit(CSSPropertyID) const;
@@ -197,6 +201,7 @@ public:
void appendPrefixingVariantProperty(const CSSProperty&);
void setPrefixingVariantProperty(const CSSProperty&);
void setProperty(const CSSProperty&, CSSProperty* slot = 0);
+ bool setVariableValue(const AtomicString& name, const String& value, bool important = false);
bool removeProperty(CSSPropertyID, String* returnText = 0);
void removePrefixedOrUnprefixedProperty(CSSPropertyID);
@@ -204,6 +209,8 @@ public:
bool removePropertiesInSet(const CSSPropertyID* set, unsigned length);
void removeEquivalentProperties(const StylePropertySet*);
void removeEquivalentProperties(const CSSStyleDeclaration*);
+ bool removeVariable(const AtomicString& name);
+ bool clearVariables();
void mergeAndOverrideOnConflict(const StylePropertySet*);

Powered by Google App Engine
This is Rietveld 408576698