1Spatial Navigation: Initial code simplification in FocusController.cpp and SpatialNavigation.cpp
2
3Reviewed by NOBODY (OOPS!).
4Patch by Antonio Gomes <tonikitoo@webkit.org>
5
6No behaviour change at this point. Mostly moving code around to the place
7where it should live in.
8
9WebCore::distanceInDirection method was handling much of the logic not strictly only
10related to the distance between nodes acquisition itself. This method was simplified and
11renamed to 'WebCore::distanceDataForNode'. It now is responsible for not only getting the
12distance, but also parent document distance, alignment and parent document alignment to the
13current focused node. All assignement logic previously there was moved to updateFocusCandidateIfCloser.
14
15findFocusableNodeInDirection and deepFindFocusableNodeInDirection method had their logic
16also simplified based on the changes above.
17
18No behaviour change at this point. Mostly moving code around to the place
19where it should live in.
20
21* page/FocusController.cpp:
22(WebCore::FocusController::advanceFocusDirectionally):
23(WebCore::updateFocusCandidateIfCloser):
24(WebCore::FocusController::findFocusableNodeInDirection):
25(WebCore::FocusController::deepFindFocusableNodeInDirection):
26* page/FocusController.h:
27* page/SpatialNavigation.cpp:
28(WebCore::distanceDataForNode):
29(WebCore::renderRectRelativeToRootDocument):
30* page/SpatialNavigation.h: