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

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: 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/WebFrameWidgetImpl.cpp
diff --git a/Source/web/WebFrameWidgetImpl.cpp b/Source/web/WebFrameWidgetImpl.cpp
index 9d524dd5aee20154200f6ed06270a4cb1e3f80a1..e663ae430a3ac26151b43cae0f9889193a79f744 100644
--- a/Source/web/WebFrameWidgetImpl.cpp
+++ b/Source/web/WebFrameWidgetImpl.cpp
@@ -559,8 +559,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;
@@ -678,7 +679,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();

Powered by Google App Engine
This is Rietveld 408576698