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

Unified Diff: third_party/WebKit/Source/core/style/StyleVariableData.cpp

Issue 2310823002: Skeleton implementation of CSS Properties and Values API (Closed)
Patch Set: custom properties :D 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/StyleVariableData.cpp
diff --git a/third_party/WebKit/Source/core/style/StyleVariableData.cpp b/third_party/WebKit/Source/core/style/StyleVariableData.cpp
index f9eae7096d7db3fe57f99ea65504fcdd73811a48..91b85514e97f43d3663590deaa27fc770676828a 100644
--- a/third_party/WebKit/Source/core/style/StyleVariableData.cpp
+++ b/third_party/WebKit/Source/core/style/StyleVariableData.cpp
@@ -50,6 +50,19 @@ CSSVariableData* StyleVariableData::getVariable(const AtomicString& name) const
return result->value.get();
}
+void StyleVariableData::setRegisteredInheritedProperty(const AtomicString& name, const CSSValue* parsedValue)
+{
+ m_registeredData.set(name, const_cast<CSSValue*>(parsedValue));
+}
+
+void StyleVariableData::removeVariable(const AtomicString& name)
+{
+ m_data.set(name, nullptr);
+ auto iterator = m_registeredData.find(name);
+ if (iterator != m_registeredData.end())
+ iterator->value = nullptr;
+}
+
std::unique_ptr<HashMap<AtomicString, RefPtr<CSSVariableData>>> StyleVariableData::getVariables() const
{
std::unique_ptr<HashMap<AtomicString, RefPtr<CSSVariableData>>> result;

Powered by Google App Engine
This is Rietveld 408576698