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

Unified Diff: Source/web/WebInputEventConversion.cpp

Issue 26936002: Remove Widget's dependency upon its own inheritor aka ScrollView. This was nasty from an OO design… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: Created 7 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
Index: Source/web/WebInputEventConversion.cpp
diff --git a/Source/web/WebInputEventConversion.cpp b/Source/web/WebInputEventConversion.cpp
index 6eb9f29c35483277ae4803ddfd5ccbc2b19187ae..5a823b96a9f9a0da8f91fdaec2c66c807b6319c1 100644
--- a/Source/web/WebInputEventConversion.cpp
+++ b/Source/web/WebInputEventConversion.cpp
@@ -59,7 +59,7 @@ static float widgetInputEventsScaleFactor(const Widget* widget)
if (!widget)
return 1;
- ScrollView* rootView = widget->root();
+ ScrollView* rootView = toScrollView(widget->root());
if (!rootView)
return 1;
@@ -438,7 +438,7 @@ static void updateWebMouseEventFromWebCoreMouseEvent(const MouseRelatedEvent& ev
webEvent.timeStampSeconds = event.timeStamp() / millisPerSecond;
webEvent.modifiers = getWebInputModifiers(event);
- ScrollView* view = widget.parent();
+ ScrollView* view = toScrollView(widget.parent());
IntPoint windowPoint = IntPoint(event.absoluteLocation().x(), event.absoluteLocation().y());
if (view)
windowPoint = view->contentsToWindow(windowPoint);

Powered by Google App Engine
This is Rietveld 408576698