Chromium Code Reviews| Index: third_party/WebKit/Source/web/RemoteFrameClientImpl.cpp |
| diff --git a/third_party/WebKit/Source/web/RemoteFrameClientImpl.cpp b/third_party/WebKit/Source/web/RemoteFrameClientImpl.cpp |
| index ab45a4fd4c9b5b04746ba2da3f24ea5e1fb48295..d9c06491c0c117fc669331523ea7200698869a72 100644 |
| --- a/third_party/WebKit/Source/web/RemoteFrameClientImpl.cpp |
| +++ b/third_party/WebKit/Source/web/RemoteFrameClientImpl.cpp |
| @@ -155,14 +155,26 @@ void RemoteFrameClientImpl::forwardInputEvent(Event* event) { |
| // need to forward input events across processes. |
| // FIXME: Add a check for out-of-process iframes enabled. |
| std::unique_ptr<WebInputEvent> webEvent; |
| - if (event->isKeyboardEvent()) |
| + if (event->isKeyboardEvent()) { |
| webEvent = WTF::wrapUnique( |
| new WebKeyboardEventBuilder(*static_cast<KeyboardEvent*>(event))); |
| - else if (event->isMouseEvent()) |
| - webEvent = WTF::wrapUnique(new WebMouseEventBuilder( |
| - m_webFrame->frame()->view(), |
| - m_webFrame->toImplBase()->frame()->ownerLayoutItem(), |
| - *static_cast<MouseEvent*>(event))); |
| + } else if (event->isMouseEvent()) { |
| + MouseEvent* mouseEvent = static_cast<MouseEvent*>(event); |
| + if (mouseEvent->nativeEvent()) { |
|
bokan
2017/01/27 16:57:17
So we'll only forward non-synthetic events to remo
dtapuska
2017/01/27 21:00:00
Reverted back to original code.
|
| + WebMouseEvent transformedEvent = |
| + mouseEvent->nativeEvent()->flattenTransform(); |
| + WebFloatPoint absoluteRootFrameLocation = |
|
bokan
2017/01/27 16:57:17
You can just replace this with transformedEvent.po
dtapuska
2017/01/27 21:00:00
Removed.
|
| + mouseEvent->nativeEvent()->positionInRootFrame(); |
| + IntPoint localPoint = roundedIntPoint( |
| + m_webFrame->toImplBase()->frame()->ownerLayoutItem().absoluteToLocal( |
| + absoluteRootFrameLocation, UseTransforms)); |
| + transformedEvent.x = localPoint.x(); |
| + transformedEvent.y = localPoint.y(); |
| + |
| + webEvent = WTF::wrapUnique(new WebMouseEvent()); |
| + *webEvent = transformedEvent; |
| + } |
| + } |
| // Other or internal Blink events should not be forwarded. |
| if (!webEvent || webEvent->type() == WebInputEvent::Undefined) |