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

Unified Diff: third_party/WebKit/Source/core/dom/Element.cpp

Issue 1921503008: Blink CompositorWorker: Use CompositorElementId and CompositorIdToElementMap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@elementid
Patch Set: Vend ids via local blink nextCompositorElementId. Created 4 years, 7 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/Element.cpp
diff --git a/third_party/WebKit/Source/core/dom/Element.cpp b/third_party/WebKit/Source/core/dom/Element.cpp
index 116b3efc50a51a949ba47e66ccfe63669e163a35..e081c820395fe0fbe5793f16feb7705508555666 100644
--- a/third_party/WebKit/Source/core/dom/Element.cpp
+++ b/third_party/WebKit/Source/core/dom/Element.cpp
@@ -350,6 +350,19 @@ bool Element::hasAnimations() const
return elementAnimations && !elementAnimations->isEmpty();
}
+CompositorElementId Element::compositorElementId() const
+{
+ ElementAnimations* animations = elementAnimations();
+ return animations ? animations->compositorElementId() : CompositorElementId();
+}
+
+CompositorElementId Element::assignCompositorElementId()
+{
+ CompositorElementId elementId = ensureElementAnimations().compositorElementId();
+ DCHECK(elementId);
+ return elementId;
+}
+
Node::NodeType Element::getNodeType() const
{
return ELEMENT_NODE;

Powered by Google App Engine
This is Rietveld 408576698