[LayoutNG] Store NGPhysicalBoxFragment in HitTestResult.
It would be tricky to locate the right fragment in PositionForPoint(), in cases where a node generates more than one fragment. A much easier solution is to remember which fragment we hit. Move fragment item specific code out of LayoutNGBlockFlowMixin's PositionForPoint() into the new NGPhysicalBoxFragment method PositionForPoint(). Also call this method from HitTestResult::GetPosition() if we stored a fragment during hit testing. For now we'll only do that for inline formatting contexts, since NGPhysicalBoxFragment's PositionForPoint() doesn't support block children yeyet. Bug: 829028, 1043787 Change-Id: Ifc9f3245f832bdebd2a20dbd6ebe73ca3289d80b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2485219Reviewed-by:Koji Ishii <kojii@chromium.org> Reviewed-by:
Yoshifumi Inoue <yosin@chromium.org> Commit-Queue: Morten Stenshorne <mstensho@chromium.org> Cr-Commit-Position: refs/heads/master@{#819253}
Showing
Please register or sign in to comment