| 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 2092 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2103 return dispatchEvent(event); | 2103 return dispatchEvent(event); |
| 2104 } | 2104 } |
| 2105 | 2105 |
| 2106 void Node::dispatchSimulatedClick(Event* underlyingEvent, SimulatedClickMouseEve
ntOptions eventOptions, SimulatedClickCreationScope scope) | 2106 void Node::dispatchSimulatedClick(Event* underlyingEvent, SimulatedClickMouseEve
ntOptions eventOptions, SimulatedClickCreationScope scope) |
| 2107 { | 2107 { |
| 2108 EventDispatcher::dispatchSimulatedClick(*this, underlyingEvent, eventOptions
, scope); | 2108 EventDispatcher::dispatchSimulatedClick(*this, underlyingEvent, eventOptions
, scope); |
| 2109 } | 2109 } |
| 2110 | 2110 |
| 2111 void Node::dispatchInputEvent() | 2111 void Node::dispatchInputEvent() |
| 2112 { | 2112 { |
| 2113 if (RuntimeEnabledFeatures::inputEventEnabled()) { | 2113 // Legacy 'input' event for forms set value and checked. |
| 2114 InputEventInit eventInitDict; | 2114 dispatchScopedEvent(Event::createBubble(EventTypeNames::input)); |
| 2115 eventInitDict.setBubbles(true); | |
| 2116 dispatchScopedEvent(InputEvent::create(EventTypeNames::input, eventInitD
ict)); | |
| 2117 } else { | |
| 2118 dispatchScopedEvent(Event::createBubble(EventTypeNames::input)); | |
| 2119 } | |
| 2120 } | 2115 } |
| 2121 | 2116 |
| 2122 void Node::defaultEventHandler(Event* event) | 2117 void Node::defaultEventHandler(Event* event) |
| 2123 { | 2118 { |
| 2124 if (event->target() != this) | 2119 if (event->target() != this) |
| 2125 return; | 2120 return; |
| 2126 const AtomicString& eventType = event->type(); | 2121 const AtomicString& eventType = event->type(); |
| 2127 if (eventType == EventTypeNames::keydown || eventType == EventTypeNames::key
press) { | 2122 if (eventType == EventTypeNames::keydown || eventType == EventTypeNames::key
press) { |
| 2128 if (event->isKeyboardEvent()) { | 2123 if (event->isKeyboardEvent()) { |
| 2129 if (LocalFrame* frame = document().frame()) | 2124 if (LocalFrame* frame = document().frame()) |
| (...skipping 28 matching lines...) Expand all Loading... |
| 2158 while (layoutObject && (!layoutObject->isBox() || !toLayoutBox(layou
tObject)->canBeScrolledAndHasScrollableArea())) | 2153 while (layoutObject && (!layoutObject->isBox() || !toLayoutBox(layou
tObject)->canBeScrolledAndHasScrollableArea())) |
| 2159 layoutObject = layoutObject->parent(); | 2154 layoutObject = layoutObject->parent(); |
| 2160 | 2155 |
| 2161 if (layoutObject) { | 2156 if (layoutObject) { |
| 2162 if (LocalFrame* frame = document().frame()) | 2157 if (LocalFrame* frame = document().frame()) |
| 2163 frame->eventHandler().startPanScrolling(layoutObject); | 2158 frame->eventHandler().startPanScrolling(layoutObject); |
| 2164 } | 2159 } |
| 2165 } | 2160 } |
| 2166 #endif | 2161 #endif |
| 2167 } else if (event->type() == EventTypeNames::webkitEditableContentChanged) { | 2162 } else if (event->type() == EventTypeNames::webkitEditableContentChanged) { |
| 2168 dispatchInputEvent(); | 2163 // TODO(chongz): Remove after shipped. |
| 2164 // New InputEvent are dispatched in Editor::appliedEditing, etc. |
| 2165 if (!RuntimeEnabledFeatures::inputEventEnabled()) |
| 2166 dispatchInputEvent(); |
| 2169 } | 2167 } |
| 2170 } | 2168 } |
| 2171 | 2169 |
| 2172 void Node::willCallDefaultEventHandler(const Event&) | 2170 void Node::willCallDefaultEventHandler(const Event&) |
| 2173 { | 2171 { |
| 2174 } | 2172 } |
| 2175 | 2173 |
| 2176 bool Node::willRespondToMouseMoveEvents() | 2174 bool Node::willRespondToMouseMoveEvents() |
| 2177 { | 2175 { |
| 2178 if (isDisabledFormControl(this)) | 2176 if (isDisabledFormControl(this)) |
| (...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2483 | 2481 |
| 2484 void showNodePath(const blink::Node* node) | 2482 void showNodePath(const blink::Node* node) |
| 2485 { | 2483 { |
| 2486 if (node) | 2484 if (node) |
| 2487 node->showNodePathForThis(); | 2485 node->showNodePathForThis(); |
| 2488 else | 2486 else |
| 2489 fprintf(stderr, "Cannot showNodePath for (nil)\n"); | 2487 fprintf(stderr, "Cannot showNodePath for (nil)\n"); |
| 2490 } | 2488 } |
| 2491 | 2489 |
| 2492 #endif | 2490 #endif |
| OLD | NEW |