[webkit-reviews] review requested: [Bug 119468] [Spatial Navigation] : should prefer focusable elements with absolute positioning over other elements if both elements visible area completely intersects each other. : [Attachment 212699] Updated patch-3

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Sep 26 06:24:47 PDT 2013


Abhijeet Kandalkar <kandalkar.abhijeet58 at gmail.com> has asked  for review:
Bug 119468: [Spatial Navigation] : should prefer focusable elements with
absolute positioning over other elements if both elements visible area
completely intersects each other.
https://bugs.webkit.org/show_bug.cgi?id=119468

Attachment 212699: Updated patch-3
https://bugs.webkit.org/attachment.cgi?id=212699&action=review

------- Additional Comments from Abhijeet Kandalkar
<kandalkar.abhijeet58 at gmail.com>

> > Source/WebCore/page/FocusController.cpp:737
> > +	     if (candidate.rect.contains(closest.rect) ||
closest.rect.contains(candidate.rect)) {
> 
> could you explain this new 'if'?
 
    To check whether candidate and closest completely intersect each other.

> > Source/WebCore/page/SpatialNavigation.cpp:275
> > +	     return pariallyIntersects ? (targetRect.x() < curRect.x()):
(targetRect.maxX() <= curRect.x());
> 
> could you explain these new conditions?

      /* Determine if curRect and targetRect overlap each other */
      bool overlap = (curRect.intersects(targetRect) &&
!curRect.contains(targetRect) && !targetRect.contains(curRect)); 


     /* Previously node is considered as best candidate only if its bounding
rect is exactly below/up/left/right with respect to current node and that’s why
 overlapping nodes	    were neglected. Current logic checks for overlap
and returns proper candidate node .*/

     return overlap ? (targetRect.x() < curRect.x()): (targetRect.maxX() <=
curRect.x()


More information about the webkit-reviews mailing list