| Index: third_party/WebKit/Source/core/dom/CompositorProxy.cpp
|
| diff --git a/third_party/WebKit/Source/core/dom/CompositorProxy.cpp b/third_party/WebKit/Source/core/dom/CompositorProxy.cpp
|
| index 7ab544c2acc8294d689d3837f93bbf50d7134abb..7dff364b14e1bfd6d39fd3327c94cafa2a5a0cbc 100644
|
| --- a/third_party/WebKit/Source/core/dom/CompositorProxy.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/CompositorProxy.cpp
|
| @@ -6,7 +6,7 @@
|
|
|
| #include "bindings/core/v8/ExceptionMessages.h"
|
| #include "bindings/core/v8/ExceptionState.h"
|
| -#include "core/dom/DOMNodeIds.h"
|
| +#include "core/dom/CompositorIdToElementMap.h"
|
| #include "core/dom/ExceptionCode.h"
|
| #include "core/dom/ExecutionContext.h"
|
| #include "platform/ThreadSafeFunctional.h"
|
| @@ -50,20 +50,18 @@ static bool isCallingCompositorFrameCallback()
|
| static void decrementCompositorProxiedPropertiesForElement(CompositorElementId elementId, uint32_t compositorMutableProperties)
|
| {
|
| DCHECK(isMainThread());
|
| - Node* node = DOMNodeIds::nodeForId(elementId);
|
| - if (!node)
|
| + Element* element = CompositorIdToElementMap::getById(elementId);
|
| + if (!element)
|
| return;
|
| - Element* element = toElement(node);
|
| element->decrementCompositorProxiedProperties(compositorMutableProperties);
|
| }
|
|
|
| static void incrementCompositorProxiedPropertiesForElement(CompositorElementId elementId, uint32_t compositorMutableProperties)
|
| {
|
| DCHECK(isMainThread());
|
| - Node* node = DOMNodeIds::nodeForId(elementId);
|
| - if (!node)
|
| + Element* element = CompositorIdToElementMap::getById(elementId);
|
| + if (!element)
|
| return;
|
| - Element* element = toElement(node);
|
| element->incrementCompositorProxiedProperties(compositorMutableProperties);
|
| }
|
|
|
| @@ -118,7 +116,7 @@ CompositorProxy* CompositorProxy::create(CompositorElementId elementId, uint32_t
|
| }
|
|
|
| CompositorProxy::CompositorProxy(Element& element, const Vector<String>& attributeArray)
|
| - : m_elementId(DOMNodeIds::idForNode(&element))
|
| + : m_elementId(element.assignCompositorElementId())
|
| , m_compositorMutableProperties(compositorMutablePropertiesFromNames(attributeArray))
|
| {
|
| DCHECK(isMainThread());
|
| @@ -126,6 +124,7 @@ CompositorProxy::CompositorProxy(Element& element, const Vector<String>& attribu
|
| #if DCHECK_IS_ON()
|
| DCHECK(sanityCheckMutableProperties(m_compositorMutableProperties));
|
| #endif
|
| + CompositorIdToElementMap::registerElement(element);
|
|
|
| incrementCompositorProxiedPropertiesForElement(m_elementId, m_compositorMutableProperties);
|
| }
|
|
|