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

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

Issue 1755773002: Pass the physical scroll delta through the scroll customization path. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@removeOneDimensionalScrolls
Patch Set: Updated LayoutTest 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 2641196365dc0a6bc82318e49ddac52a4689f373..a772a9ef0806018933e2058167f19fdabffb5156 100644
--- a/third_party/WebKit/Source/core/dom/Element.cpp
+++ b/third_party/WebKit/Source/core/dom/Element.cpp
@@ -569,14 +569,12 @@ 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.
- // TODO(bokan): The deltas here are the screen-space touchpoint deltas
- // which are inverted relative to scrolling deltas.
- if (deltaX && curBox.scroll(ScrollByPrecisePixel, FloatSize(-deltaX, 0)).didScrollX) {
+ if (deltaX && curBox.scroll(ScrollByPrecisePixel, FloatSize(deltaX, 0)).didScrollX) {
scrollState.consumeDeltaNative(scrollState.deltaX(), 0);
scrolled = true;
}
- if (deltaY && curBox.scroll(ScrollByPrecisePixel, FloatSize(0, -deltaY)).didScrollY) {
+ if (deltaY && curBox.scroll(ScrollByPrecisePixel, FloatSize(0, deltaY)).didScrollY) {
scrollState.consumeDeltaNative(0, scrollState.deltaY());
scrolled = true;
}

Powered by Google App Engine
This is Rietveld 408576698