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

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

Issue 2387883002: Use float for scroll offset. (Closed)
Patch Set: Fix README.md 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 d6a544c8f9d634b140d37c6ba31d32d387a0656a..c31464529b27022ca02f752885b7041c6351c5ed 100644
--- a/third_party/WebKit/Source/core/input/EventHandler.cpp
+++ b/third_party/WebKit/Source/core/input/EventHandler.cpp
@@ -1797,9 +1797,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