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

Unified Diff: Source/web/ContextMenuClientImpl.cpp

Issue 967213004: Removed FrameView's windowToContents and contentsToWindow methods. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 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: Source/web/ContextMenuClientImpl.cpp
diff --git a/Source/web/ContextMenuClientImpl.cpp b/Source/web/ContextMenuClientImpl.cpp
index e902bbbc208038967e8f21851e8271037baca680..8253d1026e6926c9e9b8d0c97fc882b59f5686ce 100644
--- a/Source/web/ContextMenuClientImpl.cpp
+++ b/Source/web/ContextMenuClientImpl.cpp
@@ -195,14 +195,7 @@ void ContextMenuClientImpl::showContextMenu(const ContextMenu* defaultMenu)
LocalFrame* selectedFrame = r.innerNodeFrame();
WebContextMenuData data;
- IntPoint mousePoint = selectedFrame->view()->contentsToWindow(r.roundedPointInInnerNodeFrame());
-
- // FIXME(bokan): crbug.com/371902 - We shouldn't be making these scale
- // related coordinate transformatios in an ad hoc way.
- PinchViewport& pinchViewport = selectedFrame->host()->pinchViewport();
- mousePoint -= flooredIntSize(pinchViewport.visibleRect().location());
- mousePoint.scale(m_webView->pageScaleFactor(), m_webView->pageScaleFactor());
- data.mousePosition = mousePoint;
+ data.mousePosition = selectedFrame->view()->contentsToViewport(r.roundedPointInInnerNodeFrame());
// Compute edit flags.
data.editFlags = WebContextMenuData::CanDoNone;

Powered by Google App Engine
This is Rietveld 408576698