| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights |
| 3 * reserved. | 3 * reserved. |
| 4 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 4 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
| 5 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) | 5 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) |
| 6 * | 6 * |
| 7 * Redistribution and use in source and binary forms, with or without | 7 * Redistribution and use in source and binary forms, with or without |
| 8 * modification, are permitted provided that the following conditions | 8 * modification, are permitted provided that the following conditions |
| 9 * are met: | 9 * are met: |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | 21 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
| 22 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | 22 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
| 23 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | 23 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY |
| 24 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 */ | 27 */ |
| 28 | 28 |
| 29 #include "core/input/EventHandler.h" | 29 #include "core/input/EventHandler.h" |
| 30 | 30 |
| 31 #include <memory> |
| 31 #include "bindings/core/v8/ExceptionState.h" | 32 #include "bindings/core/v8/ExceptionState.h" |
| 32 #include "core/HTMLNames.h" | 33 #include "core/HTMLNames.h" |
| 33 #include "core/InputTypeNames.h" | 34 #include "core/InputTypeNames.h" |
| 34 #include "core/clipboard/DataTransfer.h" | 35 #include "core/clipboard/DataTransfer.h" |
| 35 #include "core/dom/DOMNodeIds.h" | 36 #include "core/dom/DOMNodeIds.h" |
| 36 #include "core/dom/Document.h" | 37 #include "core/dom/Document.h" |
| 37 #include "core/dom/DocumentUserGestureToken.h" | 38 #include "core/dom/DocumentUserGestureToken.h" |
| 38 #include "core/dom/TaskRunnerHelper.h" | 39 #include "core/dom/TaskRunnerHelper.h" |
| 39 #include "core/dom/TouchList.h" | 40 #include "core/dom/TouchList.h" |
| 40 #include "core/dom/shadow/FlatTreeTraversal.h" | 41 #include "core/dom/shadow/FlatTreeTraversal.h" |
| 41 #include "core/dom/shadow/ShadowRoot.h" | 42 #include "core/dom/shadow/ShadowRoot.h" |
| 42 #include "core/editing/EditingUtilities.h" | 43 #include "core/editing/EditingUtilities.h" |
| 43 #include "core/editing/Editor.h" | 44 #include "core/editing/Editor.h" |
| 44 #include "core/editing/FrameSelection.h" | 45 #include "core/editing/FrameSelection.h" |
| 45 #include "core/editing/SelectionController.h" | 46 #include "core/editing/SelectionController.h" |
| 46 #include "core/events/EventPath.h" | 47 #include "core/events/EventPath.h" |
| 47 #include "core/events/GestureEvent.h" | 48 #include "core/events/GestureEvent.h" |
| 48 #include "core/events/KeyboardEvent.h" | 49 #include "core/events/KeyboardEvent.h" |
| 49 #include "core/events/MouseEvent.h" | 50 #include "core/events/MouseEvent.h" |
| 50 #include "core/events/PointerEvent.h" | 51 #include "core/events/PointerEvent.h" |
| 51 #include "core/events/TextEvent.h" | 52 #include "core/events/TextEvent.h" |
| 52 #include "core/events/TouchEvent.h" | 53 #include "core/events/TouchEvent.h" |
| 53 #include "core/events/WheelEvent.h" | 54 #include "core/events/WheelEvent.h" |
| 54 #include "core/frame/Deprecation.h" | 55 #include "core/frame/Deprecation.h" |
| 55 #include "core/frame/EventHandlerRegistry.h" | 56 #include "core/frame/EventHandlerRegistry.h" |
| 56 #include "core/frame/FrameHost.h" | 57 #include "core/frame/FrameHost.h" |
| 57 #include "core/frame/FrameView.h" | 58 #include "core/frame/FrameView.h" |
| 58 #include "core/frame/LocalFrame.h" | 59 #include "core/frame/LocalFrame.h" |
| 60 #include "core/frame/LocalFrameClient.h" |
| 59 #include "core/frame/Settings.h" | 61 #include "core/frame/Settings.h" |
| 60 #include "core/frame/UseCounter.h" | 62 #include "core/frame/UseCounter.h" |
| 61 #include "core/frame/VisualViewport.h" | 63 #include "core/frame/VisualViewport.h" |
| 62 #include "core/html/HTMLDialogElement.h" | 64 #include "core/html/HTMLDialogElement.h" |
| 63 #include "core/html/HTMLFrameElementBase.h" | 65 #include "core/html/HTMLFrameElementBase.h" |
| 64 #include "core/html/HTMLFrameSetElement.h" | 66 #include "core/html/HTMLFrameSetElement.h" |
| 65 #include "core/html/HTMLInputElement.h" | 67 #include "core/html/HTMLInputElement.h" |
| 66 #include "core/input/EventHandlingUtil.h" | 68 #include "core/input/EventHandlingUtil.h" |
| 67 #include "core/input/InputDeviceCapabilities.h" | 69 #include "core/input/InputDeviceCapabilities.h" |
| 68 #include "core/input/TouchActionUtil.h" | 70 #include "core/input/TouchActionUtil.h" |
| 69 #include "core/layout/HitTestRequest.h" | 71 #include "core/layout/HitTestRequest.h" |
| 70 #include "core/layout/HitTestResult.h" | 72 #include "core/layout/HitTestResult.h" |
| 71 #include "core/layout/LayoutPart.h" | 73 #include "core/layout/LayoutPart.h" |
| 72 #include "core/layout/LayoutView.h" | 74 #include "core/layout/LayoutView.h" |
| 73 #include "core/layout/api/LayoutViewItem.h" | 75 #include "core/layout/api/LayoutViewItem.h" |
| 74 #include "core/loader/DocumentLoader.h" | 76 #include "core/loader/DocumentLoader.h" |
| 75 #include "core/loader/FrameLoader.h" | 77 #include "core/loader/FrameLoader.h" |
| 76 #include "core/loader/FrameLoaderClient.h" | |
| 77 #include "core/loader/resource/ImageResourceContent.h" | 78 #include "core/loader/resource/ImageResourceContent.h" |
| 78 #include "core/page/AutoscrollController.h" | 79 #include "core/page/AutoscrollController.h" |
| 79 #include "core/page/ChromeClient.h" | 80 #include "core/page/ChromeClient.h" |
| 80 #include "core/page/DragState.h" | 81 #include "core/page/DragState.h" |
| 81 #include "core/page/FocusController.h" | 82 #include "core/page/FocusController.h" |
| 82 #include "core/page/FrameTree.h" | 83 #include "core/page/FrameTree.h" |
| 83 #include "core/page/Page.h" | 84 #include "core/page/Page.h" |
| 84 #include "core/page/TouchAdjustment.h" | 85 #include "core/page/TouchAdjustment.h" |
| 85 #include "core/page/scrolling/ScrollState.h" | 86 #include "core/page/scrolling/ScrollState.h" |
| 86 #include "core/paint/PaintLayer.h" | 87 #include "core/paint/PaintLayer.h" |
| 87 #include "core/style/ComputedStyle.h" | 88 #include "core/style/ComputedStyle.h" |
| 88 #include "core/style/CursorData.h" | 89 #include "core/style/CursorData.h" |
| 89 #include "platform/RuntimeEnabledFeatures.h" | 90 #include "platform/RuntimeEnabledFeatures.h" |
| 90 #include "platform/WindowsKeyboardCodes.h" | 91 #include "platform/WindowsKeyboardCodes.h" |
| 91 #include "platform/geometry/FloatPoint.h" | 92 #include "platform/geometry/FloatPoint.h" |
| 92 #include "platform/graphics/Image.h" | 93 #include "platform/graphics/Image.h" |
| 93 #include "platform/heap/Handle.h" | 94 #include "platform/heap/Handle.h" |
| 94 #include "platform/instrumentation/tracing/TraceEvent.h" | 95 #include "platform/instrumentation/tracing/TraceEvent.h" |
| 95 #include "platform/scroll/ScrollAnimatorBase.h" | 96 #include "platform/scroll/ScrollAnimatorBase.h" |
| 96 #include "platform/scroll/Scrollbar.h" | 97 #include "platform/scroll/Scrollbar.h" |
| 97 #include "public/platform/WebInputEvent.h" | 98 #include "public/platform/WebInputEvent.h" |
| 98 #include "public/platform/WebMouseWheelEvent.h" | 99 #include "public/platform/WebMouseWheelEvent.h" |
| 99 #include "wtf/Assertions.h" | 100 #include "wtf/Assertions.h" |
| 100 #include "wtf/CurrentTime.h" | 101 #include "wtf/CurrentTime.h" |
| 101 #include "wtf/PtrUtil.h" | 102 #include "wtf/PtrUtil.h" |
| 102 #include "wtf/StdLibExtras.h" | 103 #include "wtf/StdLibExtras.h" |
| 103 #include <memory> | |
| 104 | 104 |
| 105 namespace blink { | 105 namespace blink { |
| 106 | 106 |
| 107 namespace { | 107 namespace { |
| 108 | 108 |
| 109 // Refetch the event target node if it is removed or currently is the shadow | 109 // Refetch the event target node if it is removed or currently is the shadow |
| 110 // node inside an <input> element. If a mouse event handler changes the input | 110 // node inside an <input> element. If a mouse event handler changes the input |
| 111 // element type to one that has a widget associated, we'd like to | 111 // element type to one that has a widget associated, we'd like to |
| 112 // EventHandler::handleMousePressEvent to pass the event to the widget and thus | 112 // EventHandler::handleMousePressEvent to pass the event to the widget and thus |
| 113 // the event target node can't still be the shadow node. | 113 // the event target node can't still be the shadow node. |
| (...skipping 2028 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2142 } | 2142 } |
| 2143 | 2143 |
| 2144 FrameHost* EventHandler::frameHost() const { | 2144 FrameHost* EventHandler::frameHost() const { |
| 2145 if (!m_frame->page()) | 2145 if (!m_frame->page()) |
| 2146 return nullptr; | 2146 return nullptr; |
| 2147 | 2147 |
| 2148 return &m_frame->page()->frameHost(); | 2148 return &m_frame->page()->frameHost(); |
| 2149 } | 2149 } |
| 2150 | 2150 |
| 2151 } // namespace blink | 2151 } // namespace blink |
| OLD | NEW |