Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: third_party/WebKit/Source/core/dom/Node.cpp

Issue 2049493002: Remove the default wheel event handler from blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove two tests, fix nit Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | third_party/WebKit/Source/core/frame/Settings.in » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | third_party/WebKit/Source/core/frame/Settings.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698