[SpatNav] Search to and from inline links' line box(es)
Background (from the CSS2 spec): "Although margins, borders, and padding of non-replaced elements do not enter into the line box calculation, they are still rendered around inline boxes. This means that if the height specified by line-height is less than the content height of contained boxes, backgrounds and colors of padding and borders may "bleed" into adjoining line boxes". [1] Background about SpatNav: a. SpatNav's distance formula's input is only the origin's (current focus') rect and a candidate's rect. b. If two rectangles intersect, they are considered to be at zero (or negative) distance. Problem: When a link's inline box "bleeds" onto links below, then links on the same line (to the left or right) could get unreachable when SpatNav's distance formula favors the intersecting rects below, see snav-line-height_less_font-size.html. Solution: Shrink these bleeding inline boxes to their line box's [2] height. If a link is line broken over 2 lines, use 2x the line box height, and so on. [1] https://drafts.csswg.org/css2/#leading [2] https://drafts.csswg.org/css2/#line-box Bug: None Change-Id: I002da7af30721de45105f5ba1330f4679a5457af Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2410039 Commit-Queue: Hugo Holgersson <hholgersson@fb.com> Reviewed-by:Fredrik Söderquist <fs@opera.com> Cr-Commit-Position: refs/heads/master@{#810252}
Showing
This diff is collapsed.
Please register or sign in to comment