2010-12-20 Antonio Gomes <agomes@rim.com>
authortonikitoo@webkit.org <tonikitoo@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 28 Dec 2010 21:57:11 +0000 (21:57 +0000)
committertonikitoo@webkit.org <tonikitoo@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 28 Dec 2010 21:57:11 +0000 (21:57 +0000)
commit3e4f99e284313bb525320361a343d34b047ca701
tree614bdc197a3f640ee8db643446dcc30813411c95
parent45d1a5d43310c5608ac42bb04f5d985635400115
2010-12-20  Antonio Gomes  <agomes@rim.com>

        Reviewed by Daniel Bates.

        Spatial Navigation: code clean up (Part VI)
        https://bugs.webkit.org/show_bug.cgi?id=50666

        No new tests needed.

        * page/FocusController.cpp:
        (WebCore::updatFocusCandidateIfNeeded): Assert renderer() and
        isElementNode() now that we are bailing out earlier in both the
        FocusCandidate constructor and FocusController::findFocusCandidateInContainer().
        * page/SpatialNavigation.h: Swapped the parameters order in canScrollInDirection
        and virtualRectForAreaElementAndDirection functions.
        (WebCore::FocusController::findFocusCandidateInContainer):
        (WebCore::FocusController::advanceFocusDirectionallyInContainer): Adjusted call sites
        of canScrollInDirection(), and added an early return if !isElementNode().
        (WebCore::FocusController::advanceFocusDirectionally): Adjusted call site of
        virtualRectForAreaElementAndDirection().
        * page/SpatialNavigation.cpp:
        (WebCore::FocusCandidate::FocusCandidate): Assert if node is not an Element node.
        (WebCore::isScrollableNode): Renamed from isScrollableContainerNode.
        (WebCore::scrollInDirection): Adjusted call site after function name change;
        (WebCore::scrollableEnclosingBoxOrParentFrameForNodeInDi:rection): Assert if node is
        a Document node.
        (WebCore::canScrollInDirection): Signature changed.
        (WebCore::canBeScrolledIntoView): Ditto.
        (WebCore::virtualRectForAreaElementAndDirection): Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@74723 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/page/FocusController.cpp
WebCore/page/SpatialNavigation.cpp
WebCore/page/SpatialNavigation.h