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

Unified Diff: Source/web/WebInputEventConversion.cpp

Issue 819953002: Mac: Update scrollbar size and input position during impl-overscroll (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Peure virtual Created 6 years 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
« no previous file with comments | « Source/platform/scroll/ScrollbarThemeClient.h ('k') | Source/web/WebPluginScrollbarImpl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebInputEventConversion.cpp
diff --git a/Source/web/WebInputEventConversion.cpp b/Source/web/WebInputEventConversion.cpp
index 05362ad51cead37f99e912c696d5e67a2e63c626..afe7abfce22041ba349fd2e6aff2930b55794b35 100644
--- a/Source/web/WebInputEventConversion.cpp
+++ b/Source/web/WebInputEventConversion.cpp
@@ -71,17 +71,19 @@ static FloatPoint convertHitPointToWindow(const Widget* widget, FloatPoint point
float scale = 1;
IntSize offset;
IntPoint pinchViewport;
+ FloatSize overscrollOffset;
if (widget) {
FrameView* rootView = toFrameView(widget->root());
if (rootView) {
scale = rootView->inputEventsScaleFactor();
offset = rootView->inputEventsOffsetForEmulation();
pinchViewport = flooredIntPoint(rootView->page()->frameHost().pinchViewport().visibleRect().location());
+ overscrollOffset = rootView->elasticOverscroll();
}
}
return FloatPoint(
- (point.x() - offset.width()) / scale + pinchViewport.x(),
- (point.y() - offset.height()) / scale + pinchViewport.y());
+ (point.x() - offset.width()) / scale + pinchViewport.x() + overscrollOffset.width(),
+ (point.y() - offset.height()) / scale + pinchViewport.y() + overscrollOffset.height());
}
static int toWebEventModifiers(unsigned platformModifiers)
« no previous file with comments | « Source/platform/scroll/ScrollbarThemeClient.h ('k') | Source/web/WebPluginScrollbarImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698