| 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/events/MouseEvent.h" | 65 #include "core/events/MouseEvent.h" |
| 66 #include "core/events/TextEvent.h" | 66 #include "core/events/TextEvent.h" |
| 67 #include "core/events/TouchEvent.h" | 67 #include "core/events/TouchEvent.h" |
| 68 #include "core/events/UIEvent.h" | 68 #include "core/events/UIEvent.h" |
| 69 #include "core/events/WheelEvent.h" | 69 #include "core/events/WheelEvent.h" |
| 70 #include "core/frame/EventHandlerRegistry.h" | 70 #include "core/frame/EventHandlerRegistry.h" |
| 71 #include "core/frame/LocalFrame.h" | 71 #include "core/frame/LocalFrame.h" |
| 72 #include "core/frame/Settings.h" | 72 #include "core/frame/Settings.h" |
| 73 #include "core/html/HTMLAnchorElement.h" | 73 #include "core/html/HTMLAnchorElement.h" |
| 74 #include "core/html/HTMLStyleElement.h" | 74 #include "core/html/HTMLStyleElement.h" |
| 75 #include "core/page/ContextMenuController.h" | |
| 76 #include "core/page/EventHandler.h" | 75 #include "core/page/EventHandler.h" |
| 77 #include "core/page/Page.h" | 76 #include "core/page/Page.h" |
| 78 #include "core/rendering/RenderBox.h" | 77 #include "core/rendering/RenderBox.h" |
| 79 #include "platform/EventDispatchForbiddenScope.h" | 78 #include "platform/EventDispatchForbiddenScope.h" |
| 80 #include "platform/Partitions.h" | 79 #include "platform/Partitions.h" |
| 81 #include "platform/TraceEvent.h" | 80 #include "platform/TraceEvent.h" |
| 82 #include "platform/TracedValue.h" | 81 #include "platform/TracedValue.h" |
| 83 #include "wtf/HashSet.h" | 82 #include "wtf/HashSet.h" |
| 84 #include "wtf/PassOwnPtr.h" | 83 #include "wtf/PassOwnPtr.h" |
| 85 #include "wtf/RefCountedLeakCounter.h" | 84 #include "wtf/RefCountedLeakCounter.h" |
| (...skipping 1730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1816 const AtomicString& eventType = event->type(); | 1815 const AtomicString& eventType = event->type(); |
| 1817 if (eventType == EventTypeNames::keydown || eventType == EventTypeNames::key
press) { | 1816 if (eventType == EventTypeNames::keydown || eventType == EventTypeNames::key
press) { |
| 1818 if (event->isKeyboardEvent()) { | 1817 if (event->isKeyboardEvent()) { |
| 1819 if (LocalFrame* frame = document().frame()) | 1818 if (LocalFrame* frame = document().frame()) |
| 1820 frame->eventHandler().defaultKeyboardEventHandler(toKeyboardEven
t(event)); | 1819 frame->eventHandler().defaultKeyboardEventHandler(toKeyboardEven
t(event)); |
| 1821 } | 1820 } |
| 1822 } else if (eventType == EventTypeNames::click) { | 1821 } else if (eventType == EventTypeNames::click) { |
| 1823 int detail = event->isUIEvent() ? static_cast<UIEvent*>(event)->detail()
: 0; | 1822 int detail = event->isUIEvent() ? static_cast<UIEvent*>(event)->detail()
: 0; |
| 1824 if (dispatchDOMActivateEvent(detail, event)) | 1823 if (dispatchDOMActivateEvent(detail, event)) |
| 1825 event->setDefaultHandled(); | 1824 event->setDefaultHandled(); |
| 1826 } else if (eventType == EventTypeNames::contextmenu) { | |
| 1827 if (Page* page = document().page()) | |
| 1828 page->contextMenuController().handleContextMenuEvent(event); | |
| 1829 } else if (eventType == EventTypeNames::textInput) { | 1825 } else if (eventType == EventTypeNames::textInput) { |
| 1830 if (event->hasInterface(EventNames::TextEvent)) { | 1826 if (event->hasInterface(EventNames::TextEvent)) { |
| 1831 if (LocalFrame* frame = document().frame()) | 1827 if (LocalFrame* frame = document().frame()) |
| 1832 frame->eventHandler().defaultTextInputEventHandler(toTextEvent(e
vent)); | 1828 frame->eventHandler().defaultTextInputEventHandler(toTextEvent(e
vent)); |
| 1833 } | 1829 } |
| 1834 } else if ((eventType == EventTypeNames::wheel || eventType == EventTypeName
s::mousewheel) && event->hasInterface(EventNames::WheelEvent)) { | 1830 } else if ((eventType == EventTypeNames::wheel || eventType == EventTypeName
s::mousewheel) && event->hasInterface(EventNames::WheelEvent)) { |
| 1835 WheelEvent* wheelEvent = toWheelEvent(event); | 1831 WheelEvent* wheelEvent = toWheelEvent(event); |
| 1836 | 1832 |
| 1837 // If we don't have a renderer, send the wheel event to the first node w
e find with a renderer. | 1833 // If we don't have a renderer, send the wheel event to the first node w
e find with a renderer. |
| 1838 // This is needed for <option> and <optgroup> elements so that <select>s
get a wheel scroll. | 1834 // This is needed for <option> and <optgroup> elements so that <select>s
get a wheel scroll. |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2062 node->showTreeForThis(); | 2058 node->showTreeForThis(); |
| 2063 } | 2059 } |
| 2064 | 2060 |
| 2065 void showNodePath(const blink::Node* node) | 2061 void showNodePath(const blink::Node* node) |
| 2066 { | 2062 { |
| 2067 if (node) | 2063 if (node) |
| 2068 node->showNodePathForThis(); | 2064 node->showNodePathForThis(); |
| 2069 } | 2065 } |
| 2070 | 2066 |
| 2071 #endif | 2067 #endif |
| OLD | NEW |