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

Unified Diff: Source/web/WebFrameWidgetImpl.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/WebDevToolsAgentImpl.cpp ('k') | Source/web/WebInputEventConversion.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebFrameWidgetImpl.cpp
diff --git a/Source/web/WebFrameWidgetImpl.cpp b/Source/web/WebFrameWidgetImpl.cpp
index 9ba0190a87ecba8b7ab4049b21fe9a2347a9300c..a4273bbf59fe6a2c7699237f7ff4fe3f36669a2e 100644
--- a/Source/web/WebFrameWidgetImpl.cpp
+++ b/Source/web/WebFrameWidgetImpl.cpp
@@ -570,8 +570,9 @@ bool WebFrameWidgetImpl::selectionBounds(WebRect& anchor, WebRect& focus) const
focus = localFrame->editor().firstRectForRange(range.get());
}
- IntRect scaledAnchor(localFrame->view()->contentsToWindow(anchor));
- IntRect scaledFocus(localFrame->view()->contentsToWindow(focus));
+ // FIXME: This doesn't apply page scale. This should probably be contents to viewport. crbug.com/459293.
+ IntRect scaledAnchor(localFrame->view()->contentsToRootFrame(anchor));
+ IntRect scaledFocus(localFrame->view()->contentsToRootFrame(focus));
anchor = scaledAnchor;
focus = scaledFocus;
@@ -689,7 +690,7 @@ void WebFrameWidgetImpl::handleMouseDown(LocalFrame& mainFrame, const WebMouseEv
// capture because it will interfere with the scrollbar receiving events.
IntPoint point(event.x, event.y);
if (event.button == WebMouseEvent::ButtonLeft) {
- point = m_localRoot->frameView()->windowToContents(point);
+ point = m_localRoot->frameView()->rootFrameToContents(point);
HitTestResult result(m_localRoot->frame()->eventHandler().hitTestResultAtPoint(point));
result.setToShadowHostIfInClosedShadowRoot();
Node* hitNode = result.innerNonSharedNode();
« no previous file with comments | « Source/web/WebDevToolsAgentImpl.cpp ('k') | Source/web/WebInputEventConversion.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698