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

Unified Diff: third_party/WebKit/Source/core/css/CSSCustomPropertyDeclaration.h

Issue 2382663002: Change CSSCustomPropertyDeclaration::id() to isInherit() and isInitial() (Closed)
Patch Set: moo Created 4 years, 3 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/CSSCustomPropertyDeclaration.h
diff --git a/third_party/WebKit/Source/core/css/CSSCustomPropertyDeclaration.h b/third_party/WebKit/Source/core/css/CSSCustomPropertyDeclaration.h
index 1b1aaf2dadbdac58834ca9884c40c73cb6c60b20..8692cbbf20b364aa6ae50e460b900ba711cdfa68 100644
--- a/third_party/WebKit/Source/core/css/CSSCustomPropertyDeclaration.h
+++ b/third_party/WebKit/Source/core/css/CSSCustomPropertyDeclaration.h
@@ -26,7 +26,10 @@ public:
const AtomicString& name() const { return m_name; }
CSSVariableData* value() const { return m_value.get(); }
- CSSValueID id() const { return m_valueId; }
+
+ bool isInherit(bool isInheritedProperty) const { return m_valueId == CSSValueInherit || (isInheritedProperty && m_valueId == CSSValueUnset); }
+ bool isInitial(bool isInheritedProperty) const { return m_valueId == CSSValueInitial || (!isInheritedProperty && m_valueId == CSSValueUnset); }
+
String customCSSText() const;
bool equals(const CSSCustomPropertyDeclaration& other) const { return this == &other; }
@@ -46,7 +49,7 @@ private:
: CSSValue(CustomPropertyDeclarationClass)
, m_name(name)
, m_value(value)
- , m_valueId(CSSValueInternalVariableValue)
+ , m_valueId(CSSValueInvalid)
{
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698