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

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

Issue 1738243002: Removed main-thread one dimensional scrolling paths. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@removeStepFromUserScroll
Patch Set: Removed TODO that was already fixed Created 4 years, 10 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 53f79f17c4adc0595dfb52e20d5efb9f1b326e54..017bdc96897aaee6b250ed95487e5220383ab812 100644
--- a/third_party/WebKit/Source/core/dom/Element.cpp
+++ b/third_party/WebKit/Source/core/dom/Element.cpp
@@ -569,12 +569,13 @@ void Element::nativeApplyScroll(ScrollState& scrollState)
LayoutBoxItem curBox = LayoutBoxItem(toLayoutBox(layoutObject())).enclosingBox();
// FIXME: Native scrollers should only consume the scroll they
// apply. See crbug.com/457765.
- if (deltaX && curBox.scroll(ScrollLeft, ScrollByPrecisePixel, deltaX).didScroll) {
+ // TODO(bokan): I think the scroll deltas here are backwards.
skobes 2016/02/29 18:52:47 Can you clarify this TODO? Why are they backwards
bokan 2016/03/01 05:56:24 Done. (I have a follow up patch which fixes the TO
+ if (deltaX && curBox.scroll(ScrollByPrecisePixel, FloatSize(-deltaX, 0)).didScrollX) {
scrollState.consumeDeltaNative(scrollState.deltaX(), 0);
scrolled = true;
}
- if (deltaY && curBox.scroll(ScrollUp, ScrollByPrecisePixel, deltaY).didScroll) {
+ if (deltaY && curBox.scroll(ScrollByPrecisePixel, FloatSize(0, -deltaY)).didScrollY) {
scrollState.consumeDeltaNative(0, scrollState.deltaY());
scrolled = true;
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/LocalFrame.h » ('j') | third_party/WebKit/Source/core/frame/LocalFrame.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698