Commit b7c570bc authored by Koji Ishii's avatar Koji Ishii Committed by Commit Bot

Fix SelectionController for NG multicol

Following up r824533 <crrev.com/c/2515399> which traverses
fragments for |PositionForPoint|, this patch fixes
|SelectionController| to traverse fragments without going
through |LayoutObject|.

It looks like the code in |SelectionController| has slight
difference from |HitTestResult::GetPosition()| but it does not
look intentional.

The fix is needed to support block fragmentation in
<crrev.com/c/2514048>.

Bug: 829028
Change-Id: I35060e5e2030e3282c60cb11b590105c11f69ca3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2522799Reviewed-by: default avatarYoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#824887}
parent dfed6d16
...@@ -125,9 +125,7 @@ bool CanMouseDownStartSelect(Node* node) { ...@@ -125,9 +125,7 @@ bool CanMouseDownStartSelect(Node* node) {
PositionInFlatTreeWithAffinity PositionWithAffinityOfHitTestResult( PositionInFlatTreeWithAffinity PositionWithAffinityOfHitTestResult(
const HitTestResult& hit_test_result) { const HitTestResult& hit_test_result) {
return FromPositionInDOMTree<EditingInFlatTreeStrategy>( return FromPositionInDOMTree<EditingInFlatTreeStrategy>(
hit_test_result.InnerPossiblyPseudoNode() hit_test_result.GetPosition());
->GetLayoutObject()
->PositionForPoint(hit_test_result.LocalPoint()));
} }
DocumentMarker* SpellCheckMarkerAtPosition( DocumentMarker* SpellCheckMarkerAtPosition(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment