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

Unified Diff: Source/web/PopupContainer.cpp

Issue 967213004: Removed FrameView's windowToContents and contentsToWindow methods. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 9 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
« no previous file with comments | « Source/web/LinkHighlight.cpp ('k') | Source/web/PopupListBox.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/PopupContainer.cpp
diff --git a/Source/web/PopupContainer.cpp b/Source/web/PopupContainer.cpp
index e337b2a94b3424d7d7240f0b32852e04e9b3282d..95aea4fceb96e94c212d3e86d96815eaf42d0ba9 100644
--- a/Source/web/PopupContainer.cpp
+++ b/Source/web/PopupContainer.cpp
@@ -406,13 +406,13 @@ void PopupContainer::showInRect(const FloatQuad& controlPosition, const IntSize&
// Save and convert the controlPosition to main window coords. Each point is converted separately
// to window coordinates because the control could be in a transformed webview and then each point
// would be transformed by a different delta.
- m_controlPosition.setP1(v->contentsToWindow(IntPoint(controlPosition.p1().x(), controlPosition.p1().y())));
- m_controlPosition.setP2(v->contentsToWindow(IntPoint(controlPosition.p2().x(), controlPosition.p2().y())));
- m_controlPosition.setP3(v->contentsToWindow(IntPoint(controlPosition.p3().x(), controlPosition.p3().y())));
- m_controlPosition.setP4(v->contentsToWindow(IntPoint(controlPosition.p4().x(), controlPosition.p4().y())));
+ m_controlPosition.setP1(v->contentsToRootFrame(IntPoint(controlPosition.p1().x(), controlPosition.p1().y())));
+ m_controlPosition.setP2(v->contentsToRootFrame(IntPoint(controlPosition.p2().x(), controlPosition.p2().y())));
+ m_controlPosition.setP3(v->contentsToRootFrame(IntPoint(controlPosition.p3().x(), controlPosition.p3().y())));
+ m_controlPosition.setP4(v->contentsToRootFrame(IntPoint(controlPosition.p4().x(), controlPosition.p4().y())));
FloatRect controlBounds = m_controlPosition.boundingBox();
- controlBounds.moveBy(-v->page()->frameHost().pinchViewport().location());
+ controlBounds = v->page()->frameHost().pinchViewport().mainViewToViewportCSSPixels(controlBounds);
m_controlPosition = controlBounds;
m_controlSize = controlSize;
« no previous file with comments | « Source/web/LinkHighlight.cpp ('k') | Source/web/PopupListBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698