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

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: Created 5 years, 1 month 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 1f84d71d57abbb8d51976a282498b6cb854f2930..f823f1bc05a4de49be8a02b10994c2d1765f8256 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

Powered by Google App Engine
This is Rietveld 408576698