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 2048 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2059 dispatchScopedEventDispatchMediator(EventDispatchMediator::create(event)); | 2059 dispatchScopedEventDispatchMediator(EventDispatchMediator::create(event)); |
2060 } | 2060 } |
2061 | 2061 |
2062 void Node::dispatchScopedEventDispatchMediator(PassRefPtrWillBeRawPtr<EventDispa
tchMediator> eventDispatchMediator) | 2062 void Node::dispatchScopedEventDispatchMediator(PassRefPtrWillBeRawPtr<EventDispa
tchMediator> eventDispatchMediator) |
2063 { | 2063 { |
2064 EventDispatcher::dispatchScopedEvent(*this, eventDispatchMediator); | 2064 EventDispatcher::dispatchScopedEvent(*this, eventDispatchMediator); |
2065 } | 2065 } |
2066 | 2066 |
2067 bool Node::dispatchEvent(PassRefPtrWillBeRawPtr<Event> event) | 2067 bool Node::dispatchEvent(PassRefPtrWillBeRawPtr<Event> event) |
2068 { | 2068 { |
2069 if (event->isMouseEvent()) { | 2069 if (event->isMouseEvent()) |
2070 toMouseEvent(*event).setFromScript(); | 2070 return EventDispatcher::dispatchEvent(*this, MouseEventDispatchMediator:
:create(static_pointer_cast<MouseEvent>(event), MouseEventDispatchMediator::Synt
heticMouseEvent)); |
2071 return dispatchMouseEvent(static_pointer_cast<MouseEvent>(event)); | |
2072 } | |
2073 if (event->isTouchEvent()) | 2071 if (event->isTouchEvent()) |
2074 return dispatchTouchEvent(static_pointer_cast<TouchEvent>(event)); | 2072 return dispatchTouchEvent(static_pointer_cast<TouchEvent>(event)); |
2075 return EventDispatcher::dispatchEvent(*this, EventDispatchMediator::create(e
vent)); | 2073 return EventDispatcher::dispatchEvent(*this, EventDispatchMediator::create(e
vent)); |
2076 } | 2074 } |
2077 | 2075 |
2078 void Node::dispatchSubtreeModifiedEvent() | 2076 void Node::dispatchSubtreeModifiedEvent() |
2079 { | 2077 { |
2080 if (isInShadowTree()) | 2078 if (isInShadowTree()) |
2081 return; | 2079 return; |
2082 | 2080 |
(...skipping 18 matching lines...) Expand all Loading... |
2101 { | 2099 { |
2102 return EventDispatcher::dispatchEvent(*this, KeyboardEventDispatchMediator::
create(KeyboardEvent::create(event, document().domWindow()))); | 2100 return EventDispatcher::dispatchEvent(*this, KeyboardEventDispatchMediator::
create(KeyboardEvent::create(event, document().domWindow()))); |
2103 } | 2101 } |
2104 | 2102 |
2105 bool Node::dispatchMouseEvent(const PlatformMouseEvent& event, const AtomicStrin
g& eventType, | 2103 bool Node::dispatchMouseEvent(const PlatformMouseEvent& event, const AtomicStrin
g& eventType, |
2106 int detail, Node* relatedTarget) | 2104 int detail, Node* relatedTarget) |
2107 { | 2105 { |
2108 return EventDispatcher::dispatchEvent(*this, MouseEventDispatchMediator::cre
ate(MouseEvent::create(eventType, document().domWindow(), event, detail, related
Target))); | 2106 return EventDispatcher::dispatchEvent(*this, MouseEventDispatchMediator::cre
ate(MouseEvent::create(eventType, document().domWindow(), event, detail, related
Target))); |
2109 } | 2107 } |
2110 | 2108 |
2111 bool Node::dispatchMouseEvent(PassRefPtrWillBeRawPtr<MouseEvent> event) | |
2112 { | |
2113 return EventDispatcher::dispatchEvent(*this, MouseEventDispatchMediator::cre
ate(event)); | |
2114 } | |
2115 | |
2116 bool Node::dispatchGestureEvent(const PlatformGestureEvent& event) | 2109 bool Node::dispatchGestureEvent(const PlatformGestureEvent& event) |
2117 { | 2110 { |
2118 RefPtrWillBeRawPtr<GestureEvent> gestureEvent = GestureEvent::create(documen
t().domWindow(), event); | 2111 RefPtrWillBeRawPtr<GestureEvent> gestureEvent = GestureEvent::create(documen
t().domWindow(), event); |
2119 if (!gestureEvent.get()) | 2112 if (!gestureEvent.get()) |
2120 return false; | 2113 return false; |
2121 return EventDispatcher::dispatchEvent(*this, GestureEventDispatchMediator::c
reate(gestureEvent)); | 2114 return EventDispatcher::dispatchEvent(*this, GestureEventDispatchMediator::c
reate(gestureEvent)); |
2122 } | 2115 } |
2123 | 2116 |
2124 bool Node::dispatchTouchEvent(PassRefPtrWillBeRawPtr<TouchEvent> event) | 2117 bool Node::dispatchTouchEvent(PassRefPtrWillBeRawPtr<TouchEvent> event) |
2125 { | 2118 { |
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2467 | 2460 |
2468 void showNodePath(const blink::Node* node) | 2461 void showNodePath(const blink::Node* node) |
2469 { | 2462 { |
2470 if (node) | 2463 if (node) |
2471 node->showNodePathForThis(); | 2464 node->showNodePathForThis(); |
2472 else | 2465 else |
2473 fprintf(stderr, "Cannot showNodePath for (nil)\n"); | 2466 fprintf(stderr, "Cannot showNodePath for (nil)\n"); |
2474 } | 2467 } |
2475 | 2468 |
2476 #endif | 2469 #endif |
OLD | NEW |