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

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

Issue 1463723003: Return VisualViewport coords in boundsInViewportSpace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 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 | « third_party/WebKit/Source/core/dom/Element.cpp ('k') | third_party/WebKit/Source/core/testing/Internals.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 898e7d53aeac75f92ae1735d289de4cfb5aceade..cedc440a367de36c1e7b282579c832fb438fdc5d 100644
--- a/third_party/WebKit/Source/core/input/EventHandler.cpp
+++ b/third_party/WebKit/Source/core/input/EventHandler.cpp
@@ -2923,10 +2923,8 @@ bool EventHandler::sendContextMenuEventForKey(Element* overrideTargetElement)
int y = firstRect.maxY() ? firstRect.maxY() - 1 : 0;
locationInRootFrame = view->contentsToRootFrame(IntPoint(x, y));
} else if (focusedElement) {
- IntRect clippedRect = focusedElement->boundsInViewportSpace();
- // FIXME: boundsInViewportSpace is actually in the weird scaled but untranslated coordinate space of
- // the old-style visual viewport. crbug.com/459591.
- locationInRootFrame = flooredIntPoint(visualViewport.viewportCSSPixelsToRootFrame(clippedRect.center()));
+ IntRect clippedRect = focusedElement->boundsInViewport();
+ locationInRootFrame = visualViewport.viewportToRootFrame(clippedRect.center());
} else {
locationInRootFrame = IntPoint(
rightAligned
« no previous file with comments | « third_party/WebKit/Source/core/dom/Element.cpp ('k') | third_party/WebKit/Source/core/testing/Internals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698