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

Unified Diff: Source/web/WebInputEventConversion.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/WebFrameWidgetImpl.cpp ('k') | Source/web/WebLocalFrameImpl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebInputEventConversion.cpp
diff --git a/Source/web/WebInputEventConversion.cpp b/Source/web/WebInputEventConversion.cpp
index 20b0fc759bae4afa6d5ce6acfeb7dd1ec0086273..f127637fb8d20078640402e0bbf934516eab19e3 100644
--- a/Source/web/WebInputEventConversion.cpp
+++ b/Source/web/WebInputEventConversion.cpp
@@ -487,13 +487,14 @@ static void updateWebMouseEventFromCoreMouseEvent(const MouseRelatedEvent& event
webEvent.modifiers = getWebInputModifiers(event);
FrameView* view = widget ? toFrameView(widget->parent()) : 0;
- IntPoint windowPoint = IntPoint(event.absoluteLocation().x(), event.absoluteLocation().y());
+ // FIXME: If view == nullptr, pointInRootFrame will really be pointInRootContent.
+ IntPoint pointInRootFrame = IntPoint(event.absoluteLocation().x(), event.absoluteLocation().y());
if (view)
- windowPoint = view->contentsToWindow(windowPoint);
+ pointInRootFrame = view->contentsToRootFrame(pointInRootFrame);
webEvent.globalX = event.screenX();
webEvent.globalY = event.screenY();
- webEvent.windowX = windowPoint.x();
- webEvent.windowY = windowPoint.y();
+ webEvent.windowX = pointInRootFrame.x();
+ webEvent.windowY = pointInRootFrame.y();
IntPoint localPoint = convertAbsoluteLocationForLayoutObject(event.absoluteLocation(), layoutObject);
webEvent.x = localPoint.x();
webEvent.y = localPoint.y();
@@ -577,14 +578,15 @@ WebMouseEventBuilder::WebMouseEventBuilder(const Widget* widget, const LayoutObj
// The mouse event co-ordinates should be generated from the co-ordinates of the touch point.
FrameView* view = toFrameView(widget->parent());
- IntPoint windowPoint = roundedIntPoint(touch->absoluteLocation());
+ // FIXME: if view == nullptr, pointInRootFrame will really be pointInRootContent.
+ IntPoint pointInRootFrame = roundedIntPoint(touch->absoluteLocation());
if (view)
- windowPoint = view->contentsToWindow(windowPoint);
+ pointInRootFrame = view->contentsToRootFrame(pointInRootFrame);
IntPoint screenPoint = roundedIntPoint(touch->screenLocation());
globalX = screenPoint.x();
globalY = screenPoint.y();
- windowX = windowPoint.x();
- windowY = windowPoint.y();
+ windowX = pointInRootFrame.x();
+ windowY = pointInRootFrame.y();
button = WebMouseEvent::ButtonLeft;
modifiers |= WebInputEvent::LeftButtonDown;
« no previous file with comments | « Source/web/WebFrameWidgetImpl.cpp ('k') | Source/web/WebLocalFrameImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698