[webkit-reviews] review requested: [Bug 49382] Spatial Navigation: issues with the node selection algorithm. : [Attachment 73612] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Nov 11 07:50:38 PST 2010


Yael <yael.aharon at nokia.com> has asked	for review:
Bug 49382: Spatial Navigation: issues with the node selection algorithm.
https://bugs.webkit.org/show_bug.cgi?id=49382

Attachment 73612: Patch
https://bugs.webkit.org/attachment.cgi?id=73612&action=review

------- Additional Comments from Yael <yael.aharon at nokia.com>
Modify the Spatial Navigation algorithm, to better handle initial focus and
navigation between frames. The new algorithm takes the rect of the focused node
as the startingRect, instead of the node itself. That allows us to construct a
virtual rect if there is no focused node, or if it is off the screen. The
virtual rect is the edge of the container in the direction of the navigation.

With this patch, scrollable containers and frames will scroll regardless of
weather they have focusable content. Users will be able to use arrow keys to
view all the content of such a container. The only exception is if the
container has style overflow:hidden. We will not scroll in that case.

With this patch, we handle z-index and positioning so that if there are 2
overlapping focusable nodes, we do a hit test and only the node on top can get
focus.

hasOffScreenRect() was modified so that it can check if a node will be
off-screen even after we scrolled its parent container.

For better readability of the patch, we only modified existing layout tests, to
ensure that they pass. We will add the new layout tests in future revisions of
the patch.
For better readability, we also we preferred creating new functions instead of
modifying existing, so that things can be reviewed in better context. A future
patch will clean-up code that is no longer used.


More information about the webkit-reviews mailing list