| 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 2147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2158 LayoutObject* layoutObject = this->layoutObject(); | 2158 LayoutObject* layoutObject = this->layoutObject(); |
| 2159 while (layoutObject && (!layoutObject->isBox() || !toLayoutBox(layou
tObject)->canBeScrolledAndHasScrollableArea())) | 2159 while (layoutObject && (!layoutObject->isBox() || !toLayoutBox(layou
tObject)->canBeScrolledAndHasScrollableArea())) |
| 2160 layoutObject = layoutObject->parent(); | 2160 layoutObject = layoutObject->parent(); |
| 2161 | 2161 |
| 2162 if (layoutObject) { | 2162 if (layoutObject) { |
| 2163 if (LocalFrame* frame = document().frame()) | 2163 if (LocalFrame* frame = document().frame()) |
| 2164 frame->eventHandler().startPanScrolling(layoutObject); | 2164 frame->eventHandler().startPanScrolling(layoutObject); |
| 2165 } | 2165 } |
| 2166 } | 2166 } |
| 2167 #endif | 2167 #endif |
| 2168 } else if ((eventType == EventTypeNames::wheel || eventType == EventTypeName
s::mousewheel) && event->hasInterface(EventNames::WheelEvent)) { | |
| 2169 WheelEvent* wheelEvent = toWheelEvent(event); | |
| 2170 | |
| 2171 // If we don't have a layoutObject, send the wheel event to the first no
de we find with a layoutObject. | |
| 2172 // This is needed for <option> and <optgroup> elements so that <select>s
get a wheel scroll. | |
| 2173 Node* startNode = this; | |
| 2174 while (startNode && !startNode->layoutObject()) | |
| 2175 startNode = startNode->parentOrShadowHostNode(); | |
| 2176 | |
| 2177 if (startNode && startNode->layoutObject()) { | |
| 2178 if (LocalFrame* frame = document().frame()) | |
| 2179 frame->eventHandler().defaultWheelEventHandler(startNode, wheelE
vent); | |
| 2180 } | |
| 2181 } else if (event->type() == EventTypeNames::webkitEditableContentChanged) { | 2168 } else if (event->type() == EventTypeNames::webkitEditableContentChanged) { |
| 2182 dispatchInputEvent(); | 2169 dispatchInputEvent(); |
| 2183 } | 2170 } |
| 2184 } | 2171 } |
| 2185 | 2172 |
| 2186 void Node::willCallDefaultEventHandler(const Event&) | 2173 void Node::willCallDefaultEventHandler(const Event&) |
| 2187 { | 2174 { |
| 2188 } | 2175 } |
| 2189 | 2176 |
| 2190 bool Node::willRespondToMouseMoveEvents() | 2177 bool Node::willRespondToMouseMoveEvents() |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2497 | 2484 |
| 2498 void showNodePath(const blink::Node* node) | 2485 void showNodePath(const blink::Node* node) |
| 2499 { | 2486 { |
| 2500 if (node) | 2487 if (node) |
| 2501 node->showNodePathForThis(); | 2488 node->showNodePathForThis(); |
| 2502 else | 2489 else |
| 2503 fprintf(stderr, "Cannot showNodePath for (nil)\n"); | 2490 fprintf(stderr, "Cannot showNodePath for (nil)\n"); |
| 2504 } | 2491 } |
| 2505 | 2492 |
| 2506 #endif | 2493 #endif |
| OLD | NEW |