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

Unified Diff: third_party/WebKit/Source/web/WebPluginContainerImpl.cpp

Issue 2586133003: Remove PlatformWheelEvent and use WebMouseWheelEvent instead (Closed)
Patch Set: Rebase Created 4 years 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: third_party/WebKit/Source/web/WebPluginContainerImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebPluginContainerImpl.cpp b/third_party/WebKit/Source/web/WebPluginContainerImpl.cpp
index 5660cd411fec17f6ec962b8651a913f25bc58e62..e490cddcc555bd20995f6fd4fe331fd1e4aed752 100644
--- a/third_party/WebKit/Source/web/WebPluginContainerImpl.cpp
+++ b/third_party/WebKit/Source/web/WebPluginContainerImpl.cpp
@@ -759,13 +759,18 @@ void WebPluginContainerImpl::handleDragEvent(MouseEvent* event) {
}
void WebPluginContainerImpl::handleWheelEvent(WheelEvent* event) {
- WebMouseWheelEventBuilder webEvent(
- this, LayoutItem(m_element->layoutObject()), *event);
- if (webEvent.type == WebInputEvent::Undefined)
- return;
+ WebMouseWheelEvent translatedEvent = event->nativeEvent();
+ WebFloatPoint absoluteRootFrameLocation =
+ event->nativeEvent().positionInRootFrame();
+ IntPoint localPoint =
+ roundedIntPoint(m_element->layoutObject()->absoluteToLocal(
majidvp 2016/12/20 17:30:15 can |m_element->layoutObject()| be nil? Should we
dtapuska 2017/01/03 20:19:14 Other places use it unconditionally. I can add a D
+ absoluteRootFrameLocation, UseTransforms));
+ translatedEvent.flattenTransform();
+ translatedEvent.x = localPoint.x();
+ translatedEvent.y = localPoint.y();
majidvp 2016/12/20 17:30:15 he fact that we are doing a flatten but then overr
dtapuska 2017/01/03 20:19:14 Ya I don't know what the best answer here is. But
majidvp 2017/01/04 17:32:46 Fair enough. I filed https://crbug.com/678291 to t
WebCursorInfo cursorInfo;
- if (m_webPlugin->handleInputEvent(webEvent, cursorInfo) !=
+ if (m_webPlugin->handleInputEvent(translatedEvent, cursorInfo) !=
WebInputEventResult::NotHandled)
event->setDefaultHandled();
}

Powered by Google App Engine
This is Rietveld 408576698