[Blink] Don't select placeholder text in <input> when long press below.
https://crbug.com/873999 shows that placeholder text in <input> could be selected by long press below it. This is because for this code path we passed a corrected click point. y-coordinate was adjusted to 0, which will lead |LayoutBlock::PositionForPointIfOutsideAtomicInlineLevel()| give a incorrect result, then in |SelectionController::SelectClosestWordFromHitTestResult()|, it gets the placeholder <div> in the <input> Shadow DOM as the hit test result position. We now pass the normal point so it could figure out the position is at <input>, which is more reasonable. Bug: 873999 Change-Id: I6d9ee4d03778ad65493eff8735d58cf271d07a57 Reviewed-on: https://chromium-review.googlesource.com/1174963 Commit-Queue: Shimi Zhang <ctzsm@chromium.org> Reviewed-by:Xiaocheng Hu <xiaochengh@chromium.org> Reviewed-by:
Emil A Eklund <eae@chromium.org> Cr-Commit-Position: refs/heads/master@{#585208}
Showing
Please register or sign in to comment