Reland "[LayoutNG] Snap bounds rect to pixel before hit testing inline boxes"

This is a reland of f2dd14b632881ebd7b2fb68747a1f16c8bd2ed96

The original patch snapped bounds for inline box, text run,
and line box. Snapping inlne box matches to legacy, but it
missed that legacy doesn't snap text run, and doing so
regressed following test on Mac:
  external/wpt/intersection-observer/v2/inline-occlusion.html

This patch limits the snapping only to inline box.

Original change's description:
> [LayoutNG] Snap bounds rect to pixel before hit testing inline boxes
>
> This patch fixes inline hit-testing by snapping bounds rect
> only for inline boxes. The behavior matches to legacy.
>
> Bug: 976606
> Change-Id: I2532fd3d3439ec5e0bc3f73408b9cdc9b5454a7d
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1676564
> Commit-Queue: Koji Ishii <kojii@chromium.org>
> Reviewed-by: Emil A Eklund <eae@chromium.org>
> Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#672419}

TBR=eae@chromium.org, wangxianzhu@chromium.org

Bug: 976606
Change-Id: I4fb6d08db01d736eb3e229f4e3054e401518448b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1677350
Reviewed-by: Koji Ishii <kojii@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#672469}
1 file changed