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

Unified Diff: third_party/WebKit/Source/core/page/scrolling/ScrollState.cpp

Issue 1973083002: Use element id's for animations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: get element id's from scroll node data directly. 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/page/scrolling/ScrollState.cpp
diff --git a/third_party/WebKit/Source/core/page/scrolling/ScrollState.cpp b/third_party/WebKit/Source/core/page/scrolling/ScrollState.cpp
index e8caadad48460e23328ed495ca5682b3e4b073f5..42d808ac85090b5d470e10b56a711f76272bc541 100644
--- a/third_party/WebKit/Source/core/page/scrolling/ScrollState.cpp
+++ b/third_party/WebKit/Source/core/page/scrolling/ScrollState.cpp
@@ -7,6 +7,7 @@
#include "core/dom/DOMNodeIds.h"
#include "core/dom/Element.h"
#include "core/dom/ExceptionCode.h"
+#include "platform/graphics/CompositorElementId.h"
namespace blink {
@@ -92,7 +93,7 @@ void ScrollState::consumeDeltaNative(double x, double y)
Element* ScrollState::currentNativeScrollingElement() const
{
- uint64_t elementId = m_data->current_native_scrolling_element();
+ uint64_t elementId = m_data->current_native_scrolling_element().value;
if (elementId == 0)
return nullptr;
return elementForId(elementId);
@@ -100,12 +101,12 @@ Element* ScrollState::currentNativeScrollingElement() const
void ScrollState::setCurrentNativeScrollingElement(Element* element)
{
- m_data->set_current_native_scrolling_element(DOMNodeIds::idForNode(element));
+ m_data->set_current_native_scrolling_element(CompositorElementId(DOMNodeIds::idForNode(element)));
}
void ScrollState::setCurrentNativeScrollingElementById(int elementId)
{
- m_data->set_current_native_scrolling_element(elementId);
+ m_data->set_current_native_scrolling_element(CompositorElementId(elementId));
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698