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

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

Issue 2881423004: Stop retrieving scrolling element id from the CompositorElementId. (Closed)
Patch Set: Merge branch 'master' into scrollstate Created 3 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 a4dfdf425f2be3b0049e0a4a6be8c678095f5022..e428017bd474baf1897d20bc9141cf97e81d9300 100644
--- a/third_party/WebKit/Source/core/page/scrolling/ScrollState.cpp
+++ b/third_party/WebKit/Source/core/page/scrolling/ScrollState.cpp
@@ -92,22 +92,18 @@ void ScrollState::ConsumeDeltaNative(double x, double y) {
data_->delta_consumed_for_scroll_sequence = true;
}
-Element* ScrollState::CurrentNativeScrollingElement() const {
- uint64_t dom_node_id =
- IdFromCompositorElementId(data_->current_native_scrolling_element());
- if (dom_node_id == kInvalidDOMNodeId)
+Element* ScrollState::CurrentNativeScrollingElement() {
+ if (data_->current_native_scrolling_element() == CompositorElementId()) {
+ element_.Clear();
return nullptr;
- return ElementForId(dom_node_id);
+ }
+ return element_;
}
void ScrollState::SetCurrentNativeScrollingElement(Element* element) {
+ element_ = element;
data_->set_current_native_scrolling_element(CompositorElementIdFromDOMNodeId(
DOMNodeIds::IdForNode(element), CompositorElementIdNamespace::kScroll));
}
-void ScrollState::SetCurrentNativeScrollingElementById(int element_id) {
- data_->set_current_native_scrolling_element(CompositorElementIdFromDOMNodeId(
- element_id, CompositorElementIdNamespace::kScroll));
-}
-
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698