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

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

Issue 2310823002: Skeleton implementation of CSS Properties and Values API (Closed)
Patch Set: fix stylevardata copy ctor 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..1a8128fc14a1cb8dc96bcce01da8fa503801b72c 100644
--- a/third_party/WebKit/Source/core/style/StyleVariableData.cpp
+++ b/third_party/WebKit/Source/core/style/StyleVariableData.cpp
@@ -36,6 +36,7 @@ StyleVariableData::StyleVariableData(StyleVariableData& other)
m_root = &other;
} else {
m_data = other.m_data;
+ m_registeredData = other.m_registeredData;
m_root = other.m_root;
}
}
@@ -50,6 +51,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;
« no previous file with comments | « third_party/WebKit/Source/core/style/StyleVariableData.h ('k') | third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698