[Mac] Look Up Overlay Appears on First Line
Currently, when a user selects multiple lines of text, right clicks, and selects "Look Up", the yellow overlay appears on the last line of the selected text but with the text of the first line of the selected text. WebSubstringUtil::GetBaselinePoint() was modified to call FirstRectForRange() instead of ComputeTextRect(). FirstRectForRange() returns the IntRect for the first line of text which is needed to get the baseline point of the first line of text. WebViewTest.WebSubstringUtilBaselinePoint was added to test that the baseline point does not change when multiple lines of text are selected compared to a single line of text. Bug: 819864 Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng Change-Id: Iec0bac8d45baf2142ea5e826ebdfd7d997e7f584 Reviewed-on: https://chromium-review.googlesource.com/1103448 Commit-Queue: Tessa Nijssen <tnijssen@google.com> Reviewed-by:Emil A Eklund <eae@chromium.org> Reviewed-by:
Xiaocheng Hu <xiaochengh@chromium.org> Reviewed-by:
Sarah Chan <spqchan@chromium.org> Cr-Commit-Position: refs/heads/master@{#579094}
Showing
Please register or sign in to comment