| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 #include "core/dom/TemplateContentDocumentFragment.h" | 53 #include "core/dom/TemplateContentDocumentFragment.h" |
| 54 #include "core/dom/Text.h" | 54 #include "core/dom/Text.h" |
| 55 #include "core/dom/TreeScopeAdopter.h" | 55 #include "core/dom/TreeScopeAdopter.h" |
| 56 #include "core/dom/UserActionElementSet.h" | 56 #include "core/dom/UserActionElementSet.h" |
| 57 #include "core/dom/WheelController.h" | 57 #include "core/dom/WheelController.h" |
| 58 #include "core/dom/shadow/ElementShadow.h" | 58 #include "core/dom/shadow/ElementShadow.h" |
| 59 #include "core/dom/shadow/InsertionPoint.h" | 59 #include "core/dom/shadow/InsertionPoint.h" |
| 60 #include "core/dom/shadow/ShadowRoot.h" | 60 #include "core/dom/shadow/ShadowRoot.h" |
| 61 #include "core/editing/htmlediting.h" | 61 #include "core/editing/htmlediting.h" |
| 62 #include "core/editing/markup.h" | 62 #include "core/editing/markup.h" |
| 63 #include "core/events/BeforeLoadEvent.h" | |
| 64 #include "core/events/Event.h" | 63 #include "core/events/Event.h" |
| 65 #include "core/events/EventDispatchMediator.h" | 64 #include "core/events/EventDispatchMediator.h" |
| 66 #include "core/events/EventDispatcher.h" | 65 #include "core/events/EventDispatcher.h" |
| 67 #include "core/events/EventListener.h" | 66 #include "core/events/EventListener.h" |
| 68 #include "core/events/GestureEvent.h" | 67 #include "core/events/GestureEvent.h" |
| 69 #include "core/events/KeyboardEvent.h" | 68 #include "core/events/KeyboardEvent.h" |
| 70 #include "core/events/MouseEvent.h" | 69 #include "core/events/MouseEvent.h" |
| 71 #include "core/events/MutationEvent.h" | 70 #include "core/events/MutationEvent.h" |
| 72 #include "core/events/TextEvent.h" | 71 #include "core/events/TextEvent.h" |
| 73 #include "core/events/TouchEvent.h" | 72 #include "core/events/TouchEvent.h" |
| (...skipping 2151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2225 bool Node::dispatchTouchEvent(PassRefPtr<TouchEvent> event) | 2224 bool Node::dispatchTouchEvent(PassRefPtr<TouchEvent> event) |
| 2226 { | 2225 { |
| 2227 return EventDispatcher::dispatchEvent(this, TouchEventDispatchMediator::crea
te(event)); | 2226 return EventDispatcher::dispatchEvent(this, TouchEventDispatchMediator::crea
te(event)); |
| 2228 } | 2227 } |
| 2229 | 2228 |
| 2230 void Node::dispatchSimulatedClick(Event* underlyingEvent, SimulatedClickMouseEve
ntOptions eventOptions) | 2229 void Node::dispatchSimulatedClick(Event* underlyingEvent, SimulatedClickMouseEve
ntOptions eventOptions) |
| 2231 { | 2230 { |
| 2232 EventDispatcher::dispatchSimulatedClick(this, underlyingEvent, eventOptions)
; | 2231 EventDispatcher::dispatchSimulatedClick(this, underlyingEvent, eventOptions)
; |
| 2233 } | 2232 } |
| 2234 | 2233 |
| 2235 bool Node::dispatchBeforeLoadEvent(const String& sourceURL) | |
| 2236 { | |
| 2237 if (!RuntimeEnabledFeatures::beforeLoadEnabled()) | |
| 2238 return true; | |
| 2239 | |
| 2240 if (!document().hasListenerType(Document::BEFORELOAD_LISTENER)) | |
| 2241 return true; | |
| 2242 | |
| 2243 RefPtr<Node> protector(this); | |
| 2244 RefPtr<BeforeLoadEvent> beforeLoadEvent = BeforeLoadEvent::create(sourceURL)
; | |
| 2245 dispatchEvent(beforeLoadEvent.get()); | |
| 2246 return !beforeLoadEvent->defaultPrevented(); | |
| 2247 } | |
| 2248 | |
| 2249 bool Node::dispatchWheelEvent(const PlatformWheelEvent& event) | 2234 bool Node::dispatchWheelEvent(const PlatformWheelEvent& event) |
| 2250 { | 2235 { |
| 2251 return EventDispatcher::dispatchEvent(this, WheelEventDispatchMediator::crea
te(event, document().domWindow())); | 2236 return EventDispatcher::dispatchEvent(this, WheelEventDispatchMediator::crea
te(event, document().domWindow())); |
| 2252 } | 2237 } |
| 2253 | 2238 |
| 2254 void Node::dispatchInputEvent() | 2239 void Node::dispatchInputEvent() |
| 2255 { | 2240 { |
| 2256 dispatchScopedEvent(Event::createBubble(EventTypeNames::input)); | 2241 dispatchScopedEvent(Event::createBubble(EventTypeNames::input)); |
| 2257 } | 2242 } |
| 2258 | 2243 |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2539 node->showTreeForThis(); | 2524 node->showTreeForThis(); |
| 2540 } | 2525 } |
| 2541 | 2526 |
| 2542 void showNodePath(const WebCore::Node* node) | 2527 void showNodePath(const WebCore::Node* node) |
| 2543 { | 2528 { |
| 2544 if (node) | 2529 if (node) |
| 2545 node->showNodePathForThis(); | 2530 node->showNodePathForThis(); |
| 2546 } | 2531 } |
| 2547 | 2532 |
| 2548 #endif | 2533 #endif |
| OLD | NEW |