Changeset 60159 in webkit
- Timestamp:
- May 25, 2010 6:14:33 AM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r60157 r60159 1 2010-05-17 Antonio Gomes <tonikitoo@webkit.org> 2 3 Reviewed by Darin Adler. 4 5 Add an optional "starting node' parameter to scrollRecursively and scrollOverflow of EventHandler 6 https://bugs.webkit.org/show_bug.cgi?id=39217 7 8 It would be usefull if scrollOverflow and scrollRecursively methods of EventHandler 9 could receive a parameter to specify where to start scrolling from. Currently they 10 start scrolling from either the current focused node or the node where mouse last 11 pressed on. Patch proposes an aditional starting point as an optional parameter. 12 Since it is optional, all call sites can remain as are, and if a Null node is passed 13 in, both methods work as previously. 14 15 * page/EventHandler.cpp: 16 (WebCore::EventHandler::scrollOverflow): 17 (WebCore::EventHandler::scrollRecursively): 18 * page/EventHandler.h: 19 1 20 2010-05-25 Adam Barth <abarth@webkit.org> 2 21 -
trunk/WebCore/page/EventHandler.cpp
r60111 r60159 972 972 } 973 973 974 bool EventHandler::scrollOverflow(ScrollDirection direction, ScrollGranularity granularity) 975 { 976 Node* node = m_frame->document()->focusedNode(); 974 bool EventHandler::scrollOverflow(ScrollDirection direction, ScrollGranularity granularity, Node* startingNode) 975 { 976 Node* node = startingNode; 977 978 if (!node) 979 node = m_frame->document()->focusedNode(); 980 977 981 if (!node) 978 982 node = m_mousePressNode.get(); … … 989 993 } 990 994 991 bool EventHandler::scrollRecursively(ScrollDirection direction, ScrollGranularity granularity )992 { 993 bool handled = scrollOverflow(direction, granularity );995 bool EventHandler::scrollRecursively(ScrollDirection direction, ScrollGranularity granularity, Node* startingNode) 996 { 997 bool handled = scrollOverflow(direction, granularity, startingNode); 994 998 if (!handled) { 995 999 Frame* frame = m_frame; -
trunk/WebCore/page/EventHandler.h
r58625 r60159 131 131 static Frame* subframeForTargetNode(Node*); 132 132 133 bool scrollOverflow(ScrollDirection, ScrollGranularity );134 135 bool scrollRecursively(ScrollDirection, ScrollGranularity );133 bool scrollOverflow(ScrollDirection, ScrollGranularity, Node* startingNode = 0); 134 135 bool scrollRecursively(ScrollDirection, ScrollGranularity, Node* startingNode = 0); 136 136 137 137 #if ENABLE(DRAG_SUPPORT)
Note: See TracChangeset
for help on using the changeset viewer.