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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
75 #include "core/events/UIEvent.h" | 75 #include "core/events/UIEvent.h" |
76 #include "core/events/WheelEvent.h" | 76 #include "core/events/WheelEvent.h" |
77 #include "core/frame/EventHandlerRegistry.h" | 77 #include "core/frame/EventHandlerRegistry.h" |
78 #include "core/frame/LocalFrame.h" | 78 #include "core/frame/LocalFrame.h" |
79 #include "core/html/HTMLAnchorElement.h" | 79 #include "core/html/HTMLAnchorElement.h" |
80 #include "core/html/HTMLDialogElement.h" | 80 #include "core/html/HTMLDialogElement.h" |
81 #include "core/html/HTMLFrameOwnerElement.h" | 81 #include "core/html/HTMLFrameOwnerElement.h" |
82 #include "core/html/HTMLStyleElement.h" | 82 #include "core/html/HTMLStyleElement.h" |
83 #include "core/page/ContextMenuController.h" | 83 #include "core/page/ContextMenuController.h" |
84 #include "core/page/EventHandler.h" | 84 #include "core/page/EventHandler.h" |
85 #include "core/page/FocusController.h" | |
85 #include "core/page/Page.h" | 86 #include "core/page/Page.h" |
86 #include "core/frame/Settings.h" | 87 #include "core/frame/Settings.h" |
87 #include "core/rendering/FlowThreadController.h" | 88 #include "core/rendering/FlowThreadController.h" |
88 #include "core/rendering/RenderBox.h" | 89 #include "core/rendering/RenderBox.h" |
89 #include "core/svg/graphics/SVGImage.h" | 90 #include "core/svg/graphics/SVGImage.h" |
90 #include "platform/Partitions.h" | 91 #include "platform/Partitions.h" |
91 #include "platform/TraceEvent.h" | 92 #include "platform/TraceEvent.h" |
92 #include "platform/TracedValue.h" | 93 #include "platform/TracedValue.h" |
93 #include "wtf/HashSet.h" | 94 #include "wtf/HashSet.h" |
94 #include "wtf/PassOwnPtr.h" | 95 #include "wtf/PassOwnPtr.h" |
(...skipping 2093 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2188 dispatchScopedEvent(Event::createBubble(EventTypeNames::input)); | 2189 dispatchScopedEvent(Event::createBubble(EventTypeNames::input)); |
2189 } | 2190 } |
2190 | 2191 |
2191 void Node::defaultEventHandler(Event* event) | 2192 void Node::defaultEventHandler(Event* event) |
2192 { | 2193 { |
2193 if (event->target() != this) | 2194 if (event->target() != this) |
2194 return; | 2195 return; |
2195 const AtomicString& eventType = event->type(); | 2196 const AtomicString& eventType = event->type(); |
2196 if (eventType == EventTypeNames::keydown || eventType == EventTypeNames::key press) { | 2197 if (eventType == EventTypeNames::keydown || eventType == EventTypeNames::key press) { |
2197 if (event->isKeyboardEvent()) { | 2198 if (event->isKeyboardEvent()) { |
2199 if (eventType == EventTypeNames::keydown) { | |
2200 if (Page* page = document().page()) { | |
2201 if (page->focusController().setWasFocusedByMouse(false) && r enderer()) | |
2202 renderer()->paintInvalidationForWholeRenderer(); | |
pdr.
2014/08/12 02:02:22
Is this paintInvalidationForWholeRenderer() actual
pdr.
2014/08/12 02:18:54
Ignore me--this is needed after all.
| |
2203 } | |
2204 } | |
2198 if (LocalFrame* frame = document().frame()) | 2205 if (LocalFrame* frame = document().frame()) |
2199 frame->eventHandler().defaultKeyboardEventHandler(toKeyboardEven t(event)); | 2206 frame->eventHandler().defaultKeyboardEventHandler(toKeyboardEven t(event)); |
2200 } | 2207 } |
2201 } else if (eventType == EventTypeNames::click) { | 2208 } else if (eventType == EventTypeNames::click) { |
2202 int detail = event->isUIEvent() ? static_cast<UIEvent*>(event)->detail() : 0; | 2209 int detail = event->isUIEvent() ? static_cast<UIEvent*>(event)->detail() : 0; |
2203 if (dispatchDOMActivateEvent(detail, event)) | 2210 if (dispatchDOMActivateEvent(detail, event)) |
2204 event->setDefaultHandled(); | 2211 event->setDefaultHandled(); |
2205 } else if (eventType == EventTypeNames::contextmenu) { | 2212 } else if (eventType == EventTypeNames::contextmenu) { |
2206 if (Page* page = document().page()) | 2213 if (Page* page = document().page()) |
2207 page->contextMenuController().handleContextMenuEvent(event); | 2214 page->contextMenuController().handleContextMenuEvent(event); |
(...skipping 30 matching lines...) Expand all Loading... | |
2238 | 2245 |
2239 if (startNode && startNode->renderer()) { | 2246 if (startNode && startNode->renderer()) { |
2240 if (LocalFrame* frame = document().frame()) | 2247 if (LocalFrame* frame = document().frame()) |
2241 frame->eventHandler().defaultWheelEventHandler(startNode, wheelE vent); | 2248 frame->eventHandler().defaultWheelEventHandler(startNode, wheelE vent); |
2242 } | 2249 } |
2243 } else if (event->type() == EventTypeNames::webkitEditableContentChanged) { | 2250 } else if (event->type() == EventTypeNames::webkitEditableContentChanged) { |
2244 dispatchInputEvent(); | 2251 dispatchInputEvent(); |
2245 } | 2252 } |
2246 } | 2253 } |
2247 | 2254 |
2248 void Node::willCallDefaultEventHandler(const Event&) | |
2249 { | |
2250 } | |
2251 | |
2252 bool Node::willRespondToMouseMoveEvents() | 2255 bool Node::willRespondToMouseMoveEvents() |
2253 { | 2256 { |
2254 if (isDisabledFormControl(this)) | 2257 if (isDisabledFormControl(this)) |
2255 return false; | 2258 return false; |
2256 return hasEventListeners(EventTypeNames::mousemove) || hasEventListeners(Eve ntTypeNames::mouseover) || hasEventListeners(EventTypeNames::mouseout); | 2259 return hasEventListeners(EventTypeNames::mousemove) || hasEventListeners(Eve ntTypeNames::mouseover) || hasEventListeners(EventTypeNames::mouseout); |
2257 } | 2260 } |
2258 | 2261 |
2259 bool Node::willRespondToMouseClickEvents() | 2262 bool Node::willRespondToMouseClickEvents() |
2260 { | 2263 { |
2261 if (isDisabledFormControl(this)) | 2264 if (isDisabledFormControl(this)) |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2486 node->showTreeForThis(); | 2489 node->showTreeForThis(); |
2487 } | 2490 } |
2488 | 2491 |
2489 void showNodePath(const blink::Node* node) | 2492 void showNodePath(const blink::Node* node) |
2490 { | 2493 { |
2491 if (node) | 2494 if (node) |
2492 node->showNodePathForThis(); | 2495 node->showNodePathForThis(); |
2493 } | 2496 } |
2494 | 2497 |
2495 #endif | 2498 #endif |
OLD | NEW |