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: third_party/WebKit/Source/core/style/ComputedStyle.h

Issue 2366313006: CSS Properties and Values API: Support non-inherited custom properties (Closed)
Patch Set: use de morgan's law 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
Index: third_party/WebKit/Source/core/style/ComputedStyle.h
diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.h b/third_party/WebKit/Source/core/style/ComputedStyle.h
index d70c43f78d2d162af1cc868f6750a8fcc26fb140..ba23e0171966fbbc844711cd824374a3771ea8dc 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.h
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.h
@@ -1767,16 +1767,25 @@ public:
void clearResetDirectives();
// Variables.
- static StyleVariableData* initialVariables() { return nullptr; }
- StyleVariableData* variables() const;
- void setVariable(const AtomicString&, PassRefPtr<CSSVariableData>);
- void removeVariable(const AtomicString&);
+ static StyleInheritedVariables* initialInheritedVariables() { return nullptr; }
+ static StyleNonInheritedVariables* initialNonInheritedVariables() { return nullptr; }
+
+ StyleInheritedVariables* inheritedVariables() const;
+ StyleNonInheritedVariables* nonInheritedVariables() const;
+
+ void setUnresolvedInheritedVariable(const AtomicString&, PassRefPtr<CSSVariableData>);
+ void setUnresolvedNonInheritedVariable(const AtomicString&, PassRefPtr<CSSVariableData>);
+
+ void setResolvedUnregisteredVariable(const AtomicString&, PassRefPtr<CSSVariableData>);
+ void setResolvedInheritedVariable(const AtomicString&, PassRefPtr<CSSVariableData>, const CSSValue*);
+ void setResolvedNonInheritedVariable(const AtomicString&, PassRefPtr<CSSVariableData>, const CSSValue*);
+
+ void removeInheritedVariable(const AtomicString&);
+ void removeNonInheritedVariable(const AtomicString&);
+
void setHasVariableReferenceFromNonInheritedProperty() { m_nonInheritedData.m_variableReference = true; }
bool hasVariableReferenceFromNonInheritedProperty() const { return m_nonInheritedData.m_variableReference; }
- // Call these after setting the CSSVariableData
- void setRegisteredInheritedProperty(const AtomicString&, const CSSValue*);
-
// Animations.
CSSAnimationData& accessAnimations();
const CSSAnimationData* animations() const { return m_rareNonInheritedData->m_animations.get(); }
@@ -2533,6 +2542,9 @@ private:
bool requireTransformOrigin(ApplyTransformOrigin applyOrigin, ApplyMotionPath) const;
static bool shadowListHasCurrentColor(const ShadowList*);
+
+ StyleInheritedVariables& mutableInheritedVariables();
+ StyleNonInheritedVariables& mutableNonInheritedVariables();
};
// FIXME: Reduce/remove the dependency on zoom adjusted int values.
« no previous file with comments | « third_party/WebKit/Source/core/style/BUILD.gn ('k') | third_party/WebKit/Source/core/style/ComputedStyle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698