"Look Up" Broken with Multiline |
||||
Issue description1) Select multiple lines on a webpage 2) Right click and select the "Look Up" item Expected: - The first line to be highlighted by the look up dialog Actual - The final line to be highlighted
,
Jun 14 2018
,
Jun 14 2018
You might want to start by looking into this method: https://cs.chromium.org/chromium/src/content/browser/renderer_host/render_widget_host_view_mac.mm?rcl=0d6b1f56c51176f08cec49cb304389545909bc4f&l=1236
,
Jun 15 2018
,
Jun 26 2018
The Appkit method showDefinitionForAttributedString:atPoint: gets called with the selected string and the baseline point of the selection. In a multiline selection, the baseline point is at the bottom of the lowest line of text. This is why the dictionary overlay appears in the incorrect location when multiple lines of text are selected.
,
Jun 26 2018
Is there a way to introduce a new method that would calculate the basepoint for the first line of text?
,
Jul 30
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/da71e35a7c1f7afce21a17dcda49ce30d7890de4 commit da71e35a7c1f7afce21a17dcda49ce30d7890de4 Author: Tessa Nijssen <tnijssen@google.com> Date: Mon Jul 30 18:33:11 2018 [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} [modify] https://crrev.com/da71e35a7c1f7afce21a17dcda49ce30d7890de4/third_party/blink/renderer/core/editing/web_substring_util.mm [modify] https://crrev.com/da71e35a7c1f7afce21a17dcda49ce30d7890de4/third_party/blink/renderer/core/exported/web_view_test.cc [add] https://crrev.com/da71e35a7c1f7afce21a17dcda49ce30d7890de4/third_party/blink/renderer/core/testing/data/content_editable_multiline.html
,
Jul 30
|
||||
►
Sign in to add a comment |
||||
Comment 1 by msw@chromium.org
, Mar 8 2018286 KB
286 KB View Download