| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 2188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2199 node->dispatchMouseEvent( | 2199 node->dispatchMouseEvent( |
| 2200 PlatformMouseEventBuilder( | 2200 PlatformMouseEventBuilder( |
| 2201 mainFrameImpl()->frameView(), | 2201 mainFrameImpl()->frameView(), |
| 2202 static_cast<const WebMouseEvent&>(inputEvent)), | 2202 static_cast<const WebMouseEvent&>(inputEvent)), |
| 2203 eventType, static_cast<const WebMouseEvent&>(inputEvent).clickCount); | 2203 eventType, static_cast<const WebMouseEvent&>(inputEvent).clickCount); |
| 2204 return WebInputEventResult::HandledSystem; | 2204 return WebInputEventResult::HandledSystem; |
| 2205 } | 2205 } |
| 2206 | 2206 |
| 2207 // FIXME: This should take in the intended frame, not the local frame root. | 2207 // FIXME: This should take in the intended frame, not the local frame root. |
| 2208 WebInputEventResult result = PageWidgetDelegate::handleInputEvent( | 2208 WebInputEventResult result = PageWidgetDelegate::handleInputEvent( |
| 2209 *this, inputEvent, mainFrameImpl()->frame()); | 2209 *this, WebCoalescedInputEvent(inputEvent), mainFrameImpl()->frame()); |
| 2210 if (result != WebInputEventResult::NotHandled) | 2210 if (result != WebInputEventResult::NotHandled) |
| 2211 return result; | 2211 return result; |
| 2212 | 2212 |
| 2213 // Unhandled pinch events should adjust the scale. | 2213 // Unhandled pinch events should adjust the scale. |
| 2214 if (inputEvent.type == WebInputEvent::GesturePinchUpdate) { | 2214 if (inputEvent.type == WebInputEvent::GesturePinchUpdate) { |
| 2215 const WebGestureEvent& pinchEvent = | 2215 const WebGestureEvent& pinchEvent = |
| 2216 static_cast<const WebGestureEvent&>(inputEvent); | 2216 static_cast<const WebGestureEvent&>(inputEvent); |
| 2217 | 2217 |
| 2218 // For touchpad gestures synthesize a Windows-like wheel event | 2218 // For touchpad gestures synthesize a Windows-like wheel event |
| 2219 // to send to any handlers that may exist. Not necessary for touchscreen | 2219 // to send to any handlers that may exist. Not necessary for touchscreen |
| (...skipping 1980 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4200 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame()) | 4200 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame()) |
| 4201 return nullptr; | 4201 return nullptr; |
| 4202 return focusedFrame; | 4202 return focusedFrame; |
| 4203 } | 4203 } |
| 4204 | 4204 |
| 4205 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const { | 4205 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const { |
| 4206 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr; | 4206 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr; |
| 4207 } | 4207 } |
| 4208 | 4208 |
| 4209 } // namespace blink | 4209 } // namespace blink |
| OLD | NEW |