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

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: address reviewer feedback Created 4 years, 6 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..03a39b5042171471be6a733bd8ae6add63523cf1 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().primaryId;
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(createCompositorElementId(DOMNodeIds::idForNode(element), CompositorSubElementId::Scroll));
}
void ScrollState::setCurrentNativeScrollingElementById(int elementId)
{
- m_data->set_current_native_scrolling_element(elementId);
+ m_data->set_current_native_scrolling_element(createCompositorElementId(elementId, CompositorSubElementId::Scroll));
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698