Bug 42474 - Spatial navigation: do not consider outline for focusable element boundaries
Summary: Spatial navigation: do not consider outline for focusable element boundaries
Status: CLOSED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC All
: P2 Normal
Assignee: Antonio Gomes
URL:
Keywords:
Depends on:
Blocks: 18662
  Show dependency treegraph
 
Reported: 2010-07-16 11:35 PDT by Antonio Gomes
Modified: 2011-04-19 05:15 PDT (History)
2 users (show)

See Also:


Attachments
patch - use getRect instead of absoluteClippedOverflowRect (2.92 KB, patch)
2010-07-16 11:45 PDT, Antonio Gomes
no flags Details | Formatted Diff | Diff
(r63572, r=smfr) patch v2 - right patch (7.33 KB, patch)
2010-07-16 11:50 PDT, Antonio Gomes
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antonio Gomes 2010-07-16 11:35:50 PDT
Currently in WebCore::renderRectRelativeToRootDocument function , we are calling RenderObject::absoluteClippedOverflowRect to obtain the rect boundary of a given renderer/element. This method deals with outline, which is out of elements boundary.

// Returns the rect that should be repainted whenever this object changes.  The rect is in the view's
// coordinate space.  This method deals with outlines and overflow.
IntRect absoluteClippedOverflowRect()
{
  ...
}

It makes spatial navigation to fail on common sites like google.gom: "Web, Images, Map, etc" are inaccessible.

Patch with a test coming ...
Comment 1 Antonio Gomes 2010-07-16 11:45:33 PDT
Created attachment 61832 [details]
patch - use getRect instead of absoluteClippedOverflowRect

It fixes problem of zero-margin content (see layout test in the patch).
Comment 2 Antonio Gomes 2010-07-16 11:50:34 PDT
Created attachment 61834 [details]
(r63572, r=smfr) patch v2 - right patch

Right patch this time.

See comment #1 for description.
Comment 3 Simon Fraser (smfr) 2010-07-16 11:52:27 PDT
Comment on attachment 61834 [details]
(r63572, r=smfr) patch v2 - right patch

r=me, but note that getRect() respects CSS transforms now, where absoluteClippedOverflowRect() did not, iirc.
Comment 4 Antonio Gomes 2010-07-16 11:58:39 PDT
(In reply to comment #3)
> (From update of attachment 61834 [details])
> r=me, 

Thank you!

> but note that getRect() respects CSS transforms now, where absoluteClippedOverflowRect() did not, iirc.

getRect is not currently transform-aware, although it could be. It calls RenderObject::absoluteBoundingBoxRect (which is transform-aware), but look at the call site and method signature.

IntRect Node::getRect() const
{
    // FIXME: broken with transforms
    if (renderer())
        return renderer()->absoluteBoundingBoxRect();
..

// FIXME: useTransforms should go away eventually
IntRect absoluteBoundingBoxRect(bool useTransforms = false);

The caller 'd have to be absoluteBoundingBoxRect(true);

Should I fix that in another bug?
Comment 5 Simon Fraser (smfr) 2010-07-16 12:11:58 PDT
The patch in bug 41259 changes getRect().
Comment 6 Antonio Gomes 2010-07-16 12:50:09 PDT
Comment on attachment 61834 [details]
(r63572, r=smfr) patch v2 - right patch

Clearing flags on attachment: 61834

Committed r63572: <http://trac.webkit.org/changeset/63572>
Comment 7 Simon Hausmann 2010-07-26 04:15:16 PDT
Revision r63572 cherry-picked into qtwebkit-2.0 with commit e70ca4c61a9dfc24875482c3184faaa34c08fb96