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

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

Issue 2586133003: Remove PlatformWheelEvent and use WebMouseWheelEvent instead (Closed)
Patch Set: Address comments Created 3 years, 12 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: 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 56be05ae5aa2c20ec6d60d0b4e865d0327abf4d2..5db66844c9529a9300ae875f4ef76265d7fe940f 100644
--- a/third_party/WebKit/Source/web/WebPluginContainerImpl.cpp
+++ b/third_party/WebKit/Source/web/WebPluginContainerImpl.cpp
@@ -758,13 +758,17 @@ void WebPluginContainerImpl::handleDragEvent(MouseEvent* event) {
}
void WebPluginContainerImpl::handleWheelEvent(WheelEvent* event) {
- WebMouseWheelEventBuilder webEvent(
- this, LayoutItem(m_element->layoutObject()), *event);
- if (webEvent.type == WebInputEvent::Undefined)
- return;
+ WebFloatPoint absoluteRootFrameLocation =
+ event->nativeEvent().positionInRootFrame();
+ IntPoint localPoint =
+ roundedIntPoint(m_element->layoutObject()->absoluteToLocal(
+ absoluteRootFrameLocation, UseTransforms));
+ WebMouseWheelEvent translatedEvent = event->nativeEvent().flattenTransform();
+ translatedEvent.x = localPoint.x();
+ translatedEvent.y = localPoint.y();
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