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

Unified Diff: third_party/WebKit/Source/core/dom/Document.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/dom/Document.cpp
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index 502fd0cbd0010d82635e6b5b7e45c3dfd430a453..6078825ee160fad4bdcf3062fcf7ac65417b48b3 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -53,6 +53,7 @@
#include "core/css/CSSStyleSheet.h"
#include "core/css/FontFaceSet.h"
#include "core/css/MediaQueryMatcher.h"
+#include "core/css/PropertyRegistry.h"
#include "core/css/StylePropertySet.h"
#include "core/css/StyleSheetContents.h"
#include "core/css/StyleSheetList.h"
@@ -5974,6 +5975,14 @@ LayoutViewItem Document::layoutViewItem() const
return LayoutViewItem(m_layoutView);
}
+PropertyRegistry* Document::propertyRegistry()
+{
+ // TODO(timloh): When the flag is removed, return a reference instead.
+ if (!m_propertyRegistry && RuntimeEnabledFeatures::cssVariables2Enabled())
+ m_propertyRegistry = PropertyRegistry::create();
+ return m_propertyRegistry;
+}
+
DEFINE_TRACE(Document)
{
visitor->trace(m_importsController);
@@ -6031,6 +6040,7 @@ DEFINE_TRACE(Document)
visitor->trace(m_intersectionObserverData);
visitor->trace(m_snapCoordinator);
visitor->trace(m_resizeObserverController);
+ visitor->trace(m_propertyRegistry);
Supplementable<Document>::trace(visitor);
TreeScope::trace(visitor);
ContainerNode::trace(visitor);
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.h ('k') | third_party/WebKit/Source/core/dom/StyleChangeReason.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698