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

Unified Diff: Source/web/WebInputEventConversion.cpp

Issue 642203002: Make input event forwarding work in --site-per-process. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix merge conflict. Created 6 years, 2 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/ChromeClientImpl.cpp ('k') | Source/web/WebViewImpl.cpp » ('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 a8675776f56d935c1f4c178537301aeb26ed95e4..4702c74390999bfc52949a21bc972849ef98e1cc 100644
--- a/Source/web/WebInputEventConversion.cpp
+++ b/Source/web/WebInputEventConversion.cpp
@@ -483,12 +483,14 @@ static IntPoint convertAbsoluteLocationForRenderObject(const LayoutPoint& locati
return roundedIntPoint(convertAbsoluteLocationForRenderObjectFloat(location, renderObject));
}
-static void updateWebMouseEventFromCoreMouseEvent(const MouseRelatedEvent& event, const Widget& widget, const RenderObject& renderObject, WebMouseEvent& webEvent)
+// FIXME: Change |widget| to const Widget& after RemoteFrames get
+// RemoteFrameViews.
+static void updateWebMouseEventFromCoreMouseEvent(const MouseRelatedEvent& event, const Widget* widget, const RenderObject& renderObject, WebMouseEvent& webEvent)
{
webEvent.timeStampSeconds = event.timeStamp() / millisPerSecond;
webEvent.modifiers = getWebInputModifiers(event);
- FrameView* view = toFrameView(widget.parent());
+ FrameView* view = widget ? toFrameView(widget->parent()) : 0;
Charlie Reis 2014/10/10 21:51:44 Looks like this was updated recently to use FrameV
IntPoint windowPoint = IntPoint(event.absoluteLocation().x(), event.absoluteLocation().y());
if (view)
windowPoint = view->contentsToWindow(windowPoint);
@@ -518,7 +520,7 @@ WebMouseEventBuilder::WebMouseEventBuilder(const Widget* widget, const RenderObj
else
return; // Skip all other mouse events.
- updateWebMouseEventFromCoreMouseEvent(event, *widget, *renderObject, *this);
+ updateWebMouseEventFromCoreMouseEvent(event, widget, *renderObject, *this);
switch (event.button()) {
case LeftButton:
@@ -648,7 +650,7 @@ WebMouseWheelEventBuilder::WebMouseWheelEventBuilder(const Widget* widget, const
if (event.type() != EventTypeNames::wheel && event.type() != EventTypeNames::mousewheel)
return;
type = WebInputEvent::MouseWheel;
- updateWebMouseEventFromCoreMouseEvent(event, *widget, *renderObject, *this);
+ updateWebMouseEventFromCoreMouseEvent(event, widget, *renderObject, *this);
deltaX = -event.deltaX();
deltaY = -event.deltaY();
wheelTicksX = event.ticksX();
« no previous file with comments | « Source/web/ChromeClientImpl.cpp ('k') | Source/web/WebViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698