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

Unified Diff: third_party/WebKit/Source/core/input/EventHandler.cpp

Issue 2387883002: Use float for scroll offset. (Closed)
Patch Set: tweaks and docs Created 4 years, 2 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/input/EventHandler.cpp
diff --git a/third_party/WebKit/Source/core/input/EventHandler.cpp b/third_party/WebKit/Source/core/input/EventHandler.cpp
index f32b2e5c1447fe18039179e4804d493656f8d1c6..092f6b2709689a946ca4b110b0e87430e59e9bbc 100644
--- a/third_party/WebKit/Source/core/input/EventHandler.cpp
+++ b/third_party/WebKit/Source/core/input/EventHandler.cpp
@@ -1741,9 +1741,10 @@ WebInputEventResult EventHandler::sendContextMenuEventForKey(
visualViewport.viewportToRootFrame(clippedRect.center());
} else {
locationInRootFrame = IntPoint(
- rightAligned ? visualViewport.visibleRect().maxX() - kContextMenuMargin
- : visualViewport.location().x() + kContextMenuMargin,
- visualViewport.location().y() + kContextMenuMargin);
+ rightAligned
+ ? visualViewport.visibleRect().maxX() - kContextMenuMargin
+ : visualViewport.scrollOffset().width() + kContextMenuMargin,
+ visualViewport.scrollOffset().height() + kContextMenuMargin);
}
m_frame->view()->setCursor(pointerCursor());

Powered by Google App Engine
This is Rietveld 408576698