Changeset 61298 in webkit
- Timestamp:
- Jun 16, 2010 5:57:15 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r61295 r61298 1 2010-06-16 Antonio Gomes <tonikitoo@webkit.org> 2 3 Reviewed by Simon Fraser. 4 5 Spatial Navigation: refactor scrollInDirection to work with scrollable content 6 https://bugs.webkit.org/show_bug.cgi?id=39195 7 8 * fast/events/spatial-navigation/snav-only-clipped-overflow-content-expected.txt: Added. 9 * fast/events/spatial-navigation/snav-only-clipped-overflow-content.html: Added. 10 1 11 2010-06-16 Dimitri Glazkov <dglazkov@chromium.org> 2 12 -
trunk/WebCore/ChangeLog
r61296 r61298 1 2010-06-16 Antonio Gomes <tonikitoo@webkit.org> 2 3 Reviewed by Simon Fraser. 4 5 Spatial Navigation: refactor scrollInDirection to work with scrollable content 6 https://bugs.webkit.org/show_bug.cgi?id=39195 7 8 scrollInDirection now receives as parameter the node that the Spatial Navigation 9 found as the more appropriated to move focus to. If it is in a scrollable container 10 (e.g. <div> with clipped overflow content), it scrolls recursively starting from 11 the container, not the current focused node. 12 13 Test: fast/events/spatial-navigation/snav-only-clipped-overflow-content.html 14 15 * page/FocusController.cpp: 16 (WebCore::FocusController::advanceFocusDirectionally): 17 * page/SpatialNavigation.cpp: 18 (WebCore::scrollInDirection): 19 * page/SpatialNavigation.h: 20 1 21 2010-06-16 Brady Eidson <beidson@apple.com> 2 22 -
trunk/WebCore/page/FocusController.cpp
r61135 r61298 320 320 if (hasOffscreenRect(node)) { 321 321 Frame* frame = node->document()->view()->frame(); 322 scrollInDirection(frame, direction );322 scrollInDirection(frame, direction, focusCandidate); 323 323 return true; 324 324 } -
trunk/WebCore/page/SpatialNavigation.cpp
r61250 r61298 449 449 // In a bottom-up way, this method tries to scroll |frame| in a given direction 450 450 // |direction|, going up in the frame tree hierarchy in case it does not succeed. 451 bool scrollInDirection(Frame* frame, FocusDirection direction )451 bool scrollInDirection(Frame* frame, FocusDirection direction, const FocusCandidate& candidate) 452 452 { 453 453 if (!frame) … … 472 472 return false; 473 473 } 474 475 if (!candidate.isNull() && isScrollableContainerNode(candidate.enclosingScrollableBox)) 476 return frame->eventHandler()->scrollRecursively(scrollDirection, ScrollByLine, candidate.enclosingScrollableBox); 474 477 475 478 return frame->eventHandler()->scrollRecursively(scrollDirection, ScrollByLine); -
trunk/WebCore/page/SpatialNavigation.h
r61134 r61298 129 129 130 130 void distanceDataForNode(FocusDirection direction, Node* start, FocusCandidate& candidate); 131 bool scrollInDirection(Frame*, FocusDirection );131 bool scrollInDirection(Frame*, FocusDirection, const FocusCandidate& candidate = FocusCandidate()); 132 132 void scrollIntoView(Element*); 133 133 bool hasOffscreenRect(Node*);
Note: See TracChangeset
for help on using the changeset viewer.