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 2019 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2104 { | 2105 { |
2105 EventDispatcher::dispatchScopedEvent(*this, eventDispatchMediator); | 2106 EventDispatcher::dispatchScopedEvent(*this, eventDispatchMediator); |
2106 } | 2107 } |
2107 | 2108 |
2108 bool Node::dispatchEvent(PassRefPtrWillBeRawPtr<Event> event) | 2109 bool Node::dispatchEvent(PassRefPtrWillBeRawPtr<Event> event) |
2109 { | 2110 { |
2110 if (event->isMouseEvent()) | 2111 if (event->isMouseEvent()) |
2111 return EventDispatcher::dispatchEvent(*this, MouseEventDispatchMediator:
:create(static_pointer_cast<MouseEvent>(event), MouseEventDispatchMediator::Synt
heticMouseEvent)); | 2112 return EventDispatcher::dispatchEvent(*this, MouseEventDispatchMediator:
:create(static_pointer_cast<MouseEvent>(event), MouseEventDispatchMediator::Synt
heticMouseEvent)); |
2112 if (event->isTouchEvent()) | 2113 if (event->isTouchEvent()) |
2113 return dispatchTouchEvent(static_pointer_cast<TouchEvent>(event)); | 2114 return dispatchTouchEvent(static_pointer_cast<TouchEvent>(event)); |
| 2115 if (event->isPointerEvent()) |
| 2116 return dispatchPointerEvent(static_pointer_cast<PointerEvent>(event)); |
| 2117 |
2114 return EventDispatcher::dispatchEvent(*this, EventDispatchMediator::create(e
vent)); | 2118 return EventDispatcher::dispatchEvent(*this, EventDispatchMediator::create(e
vent)); |
2115 } | 2119 } |
2116 | 2120 |
2117 void Node::dispatchSubtreeModifiedEvent() | 2121 void Node::dispatchSubtreeModifiedEvent() |
2118 { | 2122 { |
2119 if (isInShadowTree()) | 2123 if (isInShadowTree()) |
2120 return; | 2124 return; |
2121 | 2125 |
2122 ASSERT(!EventDispatchForbiddenScope::isEventDispatchForbidden()); | 2126 ASSERT(!EventDispatchForbiddenScope::isEventDispatchForbidden()); |
2123 | 2127 |
(...skipping 29 matching lines...) Expand all Loading... |
2153 if (!gestureEvent.get()) | 2157 if (!gestureEvent.get()) |
2154 return false; | 2158 return false; |
2155 return EventDispatcher::dispatchEvent(*this, GestureEventDispatchMediator::c
reate(gestureEvent)); | 2159 return EventDispatcher::dispatchEvent(*this, GestureEventDispatchMediator::c
reate(gestureEvent)); |
2156 } | 2160 } |
2157 | 2161 |
2158 bool Node::dispatchTouchEvent(PassRefPtrWillBeRawPtr<TouchEvent> event) | 2162 bool Node::dispatchTouchEvent(PassRefPtrWillBeRawPtr<TouchEvent> event) |
2159 { | 2163 { |
2160 return EventDispatcher::dispatchEvent(*this, TouchEventDispatchMediator::cre
ate(event)); | 2164 return EventDispatcher::dispatchEvent(*this, TouchEventDispatchMediator::cre
ate(event)); |
2161 } | 2165 } |
2162 | 2166 |
| 2167 bool Node::dispatchPointerEvent(PassRefPtrWillBeRawPtr<PointerEvent> event) |
| 2168 { |
| 2169 return EventDispatcher::dispatchEvent(*this, PointerEventDispatchMediator::c
reate(event)); |
| 2170 } |
| 2171 |
2163 void Node::dispatchSimulatedClick(Event* underlyingEvent, SimulatedClickMouseEve
ntOptions eventOptions) | 2172 void Node::dispatchSimulatedClick(Event* underlyingEvent, SimulatedClickMouseEve
ntOptions eventOptions) |
2164 { | 2173 { |
2165 EventDispatcher::dispatchSimulatedClick(*this, underlyingEvent, eventOptions
); | 2174 EventDispatcher::dispatchSimulatedClick(*this, underlyingEvent, eventOptions
); |
2166 } | 2175 } |
2167 | 2176 |
2168 bool Node::dispatchWheelEvent(const PlatformWheelEvent& event) | 2177 bool Node::dispatchWheelEvent(const PlatformWheelEvent& event) |
2169 { | 2178 { |
2170 return EventDispatcher::dispatchEvent(*this, WheelEventDispatchMediator::cre
ate(event, document().domWindow())); | 2179 return EventDispatcher::dispatchEvent(*this, WheelEventDispatchMediator::cre
ate(event, document().domWindow())); |
2171 } | 2180 } |
2172 | 2181 |
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2501 | 2510 |
2502 void showNodePath(const blink::Node* node) | 2511 void showNodePath(const blink::Node* node) |
2503 { | 2512 { |
2504 if (node) | 2513 if (node) |
2505 node->showNodePathForThis(); | 2514 node->showNodePathForThis(); |
2506 else | 2515 else |
2507 fprintf(stderr, "Cannot showNodePath for (nil)\n"); | 2516 fprintf(stderr, "Cannot showNodePath for (nil)\n"); |
2508 } | 2517 } |
2509 | 2518 |
2510 #endif | 2519 #endif |
OLD | NEW |