Index: Source/WebKit/chromium/src/WebInputEventConversion.cpp |
=================================================================== |
--- Source/WebKit/chromium/src/WebInputEventConversion.cpp (revision 147365) |
+++ Source/WebKit/chromium/src/WebInputEventConversion.cpp (working copy) |
@@ -430,8 +430,10 @@ |
webEvent.timeStampSeconds = event.timeStamp() / millisPerSecond; |
webEvent.modifiers = getWebInputModifiers(event); |
- ScrollView* view = widget.root(); |
- IntPoint windowPoint = view->contentsToWindow(IntPoint(event.absoluteLocation().x(), event.absoluteLocation().y())); |
+ ScrollView* view = widget.parent(); |
+ IntPoint windowPoint = IntPoint(event.absoluteLocation().x(), event.absoluteLocation().y()); |
+ if (view) |
+ windowPoint = view->contentsToWindow(windowPoint); |
webEvent.globalX = event.screenX(); |
webEvent.globalY = event.screenY(); |
webEvent.windowX = windowPoint.x(); |