OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. |
6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) | 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) |
8 * | 8 * |
9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
65 #include "core/editing/htmlediting.h" | 65 #include "core/editing/htmlediting.h" |
66 #include "core/editing/markup.h" | 66 #include "core/editing/markup.h" |
67 #include "core/events/Event.h" | 67 #include "core/events/Event.h" |
68 #include "core/events/EventDispatchMediator.h" | 68 #include "core/events/EventDispatchMediator.h" |
69 #include "core/events/EventDispatcher.h" | 69 #include "core/events/EventDispatcher.h" |
70 #include "core/events/EventListener.h" | 70 #include "core/events/EventListener.h" |
71 #include "core/events/GestureEvent.h" | 71 #include "core/events/GestureEvent.h" |
72 #include "core/events/KeyboardEvent.h" | 72 #include "core/events/KeyboardEvent.h" |
73 #include "core/events/MouseEvent.h" | 73 #include "core/events/MouseEvent.h" |
74 #include "core/events/MutationEvent.h" | 74 #include "core/events/MutationEvent.h" |
75 #include "core/events/PointerEvent.h" | |
75 #include "core/events/TextEvent.h" | 76 #include "core/events/TextEvent.h" |
76 #include "core/events/TouchEvent.h" | 77 #include "core/events/TouchEvent.h" |
77 #include "core/events/UIEvent.h" | 78 #include "core/events/UIEvent.h" |
78 #include "core/events/WheelEvent.h" | 79 #include "core/events/WheelEvent.h" |
79 #include "core/frame/EventHandlerRegistry.h" | 80 #include "core/frame/EventHandlerRegistry.h" |
80 #include "core/frame/LocalDOMWindow.h" | 81 #include "core/frame/LocalDOMWindow.h" |
81 #include "core/frame/LocalFrame.h" | 82 #include "core/frame/LocalFrame.h" |
82 #include "core/frame/Settings.h" | 83 #include "core/frame/Settings.h" |
83 #include "core/html/HTMLAnchorElement.h" | 84 #include "core/html/HTMLAnchorElement.h" |
84 #include "core/html/HTMLDialogElement.h" | 85 #include "core/html/HTMLDialogElement.h" |
(...skipping 2023 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2108 { | 2109 { |
2109 EventDispatcher::dispatchScopedEvent(*this, eventDispatchMediator); | 2110 EventDispatcher::dispatchScopedEvent(*this, eventDispatchMediator); |
2110 } | 2111 } |
2111 | 2112 |
2112 bool Node::dispatchEvent(PassRefPtrWillBeRawPtr<Event> event) | 2113 bool Node::dispatchEvent(PassRefPtrWillBeRawPtr<Event> event) |
2113 { | 2114 { |
2114 if (event->isMouseEvent()) | 2115 if (event->isMouseEvent()) |
2115 return EventDispatcher::dispatchEvent(*this, MouseEventDispatchMediator: :create(static_pointer_cast<MouseEvent>(event), MouseEventDispatchMediator::Synt heticMouseEvent)); | 2116 return EventDispatcher::dispatchEvent(*this, MouseEventDispatchMediator: :create(static_pointer_cast<MouseEvent>(event), MouseEventDispatchMediator::Synt heticMouseEvent)); |
2116 if (event->isTouchEvent()) | 2117 if (event->isTouchEvent()) |
2117 return dispatchTouchEvent(static_pointer_cast<TouchEvent>(event)); | 2118 return dispatchTouchEvent(static_pointer_cast<TouchEvent>(event)); |
2119 if (event->isPointerEvent()) | |
Rick Byers
2015/05/25 18:24:26
This code won't be reached. Your pointer events s
mustaq
2015/05/26 15:00:09
Done.
| |
2120 return dispatchPointerEvent(static_pointer_cast<PointerEvent>(event)); | |
Rick Byers
2015/05/25 18:24:26
Any idea why we need this special case at all? Pr
mustaq
2015/05/26 15:00:09
It seems none of the 57 callers to dispatchEvent()
| |
2118 return EventDispatcher::dispatchEvent(*this, EventDispatchMediator::create(e vent)); | 2121 return EventDispatcher::dispatchEvent(*this, EventDispatchMediator::create(e vent)); |
2119 } | 2122 } |
2120 | 2123 |
2121 void Node::dispatchSubtreeModifiedEvent() | 2124 void Node::dispatchSubtreeModifiedEvent() |
2122 { | 2125 { |
2123 if (isInShadowTree()) | 2126 if (isInShadowTree()) |
2124 return; | 2127 return; |
2125 | 2128 |
2126 ASSERT(!EventDispatchForbiddenScope::isEventDispatchForbidden()); | 2129 ASSERT(!EventDispatchForbiddenScope::isEventDispatchForbidden()); |
2127 | 2130 |
(...skipping 29 matching lines...) Expand all Loading... | |
2157 if (!gestureEvent.get()) | 2160 if (!gestureEvent.get()) |
2158 return false; | 2161 return false; |
2159 return EventDispatcher::dispatchEvent(*this, GestureEventDispatchMediator::c reate(gestureEvent)); | 2162 return EventDispatcher::dispatchEvent(*this, GestureEventDispatchMediator::c reate(gestureEvent)); |
2160 } | 2163 } |
2161 | 2164 |
2162 bool Node::dispatchTouchEvent(PassRefPtrWillBeRawPtr<TouchEvent> event) | 2165 bool Node::dispatchTouchEvent(PassRefPtrWillBeRawPtr<TouchEvent> event) |
2163 { | 2166 { |
2164 return EventDispatcher::dispatchEvent(*this, TouchEventDispatchMediator::cre ate(event)); | 2167 return EventDispatcher::dispatchEvent(*this, TouchEventDispatchMediator::cre ate(event)); |
2165 } | 2168 } |
2166 | 2169 |
2170 bool Node::dispatchPointerEvent(PassRefPtrWillBeRawPtr<PointerEvent> event) | |
2171 { | |
2172 return EventDispatcher::dispatchEvent(*this, PointerEventDispatchMediator::c reate(event)); | |
2173 } | |
2174 | |
2167 void Node::dispatchSimulatedClick(Event* underlyingEvent, SimulatedClickMouseEve ntOptions eventOptions) | 2175 void Node::dispatchSimulatedClick(Event* underlyingEvent, SimulatedClickMouseEve ntOptions eventOptions) |
2168 { | 2176 { |
2169 EventDispatcher::dispatchSimulatedClick(*this, underlyingEvent, eventOptions ); | 2177 EventDispatcher::dispatchSimulatedClick(*this, underlyingEvent, eventOptions ); |
2170 } | 2178 } |
2171 | 2179 |
2172 bool Node::dispatchWheelEvent(const PlatformWheelEvent& event) | 2180 bool Node::dispatchWheelEvent(const PlatformWheelEvent& event) |
2173 { | 2181 { |
2174 return EventDispatcher::dispatchEvent(*this, WheelEventDispatchMediator::cre ate(event, document().domWindow())); | 2182 return EventDispatcher::dispatchEvent(*this, WheelEventDispatchMediator::cre ate(event, document().domWindow())); |
2175 } | 2183 } |
2176 | 2184 |
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2505 | 2513 |
2506 void showNodePath(const blink::Node* node) | 2514 void showNodePath(const blink::Node* node) |
2507 { | 2515 { |
2508 if (node) | 2516 if (node) |
2509 node->showNodePathForThis(); | 2517 node->showNodePathForThis(); |
2510 else | 2518 else |
2511 fprintf(stderr, "Cannot showNodePath for (nil)\n"); | 2519 fprintf(stderr, "Cannot showNodePath for (nil)\n"); |
2512 } | 2520 } |
2513 | 2521 |
2514 #endif | 2522 #endif |
OLD | NEW |