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 ...
Created attachment 61832 [details] patch - use getRect instead of absoluteClippedOverflowRect It fixes problem of zero-margin content (see layout test in the patch).
Created attachment 61834 [details] (r63572, r=smfr) patch v2 - right patch Right patch this time. See comment #1 for description.
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.
(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?
The patch in bug 41259 changes getRect().
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>
Revision r63572 cherry-picked into qtwebkit-2.0 with commit e70ca4c61a9dfc24875482c3184faaa34c08fb96