Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(209)

Issue 2639493002: MacViews: Enable word lookup for selectable views::Labels and multi-line text. (Closed)

Created:
3 years, 11 months ago by karandeepb
Modified:
3 years, 11 months ago
Reviewers:
tapted, msw
CC:
chromium-reviews, tfarina, derat+watch_chromium.org, chrome-apps-syd-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

MacViews: Enable word lookup for selectable views::Labels and multi-line text. r423419 added support for word lookups to textfields on MacViews and r441290 added support for multi-line text selection to RenderTextHarfBuzz. This CL enables word lookup for selectable views::Labels. Changes: - Made views::Label inherit from WordLookupClient. - Moved GetLineContainingYCoord and GetLineSegmentContainingXCoord from RenderTextHarfBuzz to the base RenderText class. - Added multi-line support to RenderText::GetDecoratedWordAtPoint. BUG=640502, 671055 TEST=Run out/Default/views_examples_with_content_exe with the flag --enable- harfbuzz-rendertext. Go to the Label section. Ensure word lookup works correctly on pressing Ctrl+Command+D for selectable labels. Review-Url: https://codereview.chromium.org/2639493002 Cr-Commit-Position: refs/heads/master@{#445313} Committed: https://chromium.googlesource.com/chromium/src/+/666e4f0298298427d2026c2896466951f199f5bf

Patch Set 1 #

Total comments: 1

Patch Set 2 : Nit. #

Total comments: 6

Patch Set 3 : Correct baseline point logic. Add test. #

Total comments: 1

Patch Set 4 : Nit. #

Total comments: 4

Patch Set 5 : Address review #

Total comments: 6

Patch Set 6 : Address nits. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+161 lines, -58 lines) Patch
M ui/gfx/render_text.h View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
M ui/gfx/render_text.cc View 1 2 3 4 3 chunks +23 lines, -5 lines 0 comments Download
M ui/gfx/render_text_harfbuzz.h View 1 chunk +0 lines, -14 lines 0 comments Download
M ui/gfx/render_text_harfbuzz.cc View 1 2 3 4 2 chunks +26 lines, -37 lines 0 comments Download
M ui/gfx/render_text_unittest.cc View 1 2 3 4 5 2 chunks +85 lines, -2 lines 0 comments Download
M ui/views/controls/label.h View 4 chunks +8 lines, -0 lines 0 comments Download
M ui/views/controls/label.cc View 2 chunks +14 lines, -0 lines 0 comments Download

Messages

Total messages: 26 (15 generated)
karandeepb
PTAL Trent. I am assuming we want this eventually? Also, I think it makes sense ...
3 years, 11 months ago (2017-01-17 04:20:13 UTC) #6
tapted
Looks pretty good - do you think there's good test coverage of this already? I ...
3 years, 11 months ago (2017-01-17 20:49:00 UTC) #7
karandeepb
PTAL Trent. https://codereview.chromium.org/2639493002/diff/20001/ui/gfx/render_text.cc File ui/gfx/render_text.cc (right): https://codereview.chromium.org/2639493002/diff/20001/ui/gfx/render_text.cc#newcode1031 ui/gfx/render_text.cc:1031: bool RenderText::GetDecoratedWordAtPoint(const Point& point, On 2017/01/17 20:48:59, ...
3 years, 11 months ago (2017-01-19 04:38:36 UTC) #12
tapted
I'll probably be in transit, so don't wait for me again to loop in owners ...
3 years, 11 months ago (2017-01-20 06:24:50 UTC) #13
karandeepb
https://codereview.chromium.org/2639493002/diff/20001/ui/gfx/render_text.cc File ui/gfx/render_text.cc (right): https://codereview.chromium.org/2639493002/diff/20001/ui/gfx/render_text.cc#newcode1407 ui/gfx/render_text.cc:1407: int RenderText::GetLineSegmentContainingXCoord(const internal::Line& line, On 2017/01/20 06:24:50, tapted wrote: ...
3 years, 11 months ago (2017-01-20 07:29:11 UTC) #15
karandeepb
PTAL msw@. Thanks.
3 years, 11 months ago (2017-01-20 07:31:06 UTC) #17
msw
lgtm with nits https://codereview.chromium.org/2639493002/diff/100001/ui/gfx/render_text_unittest.cc File ui/gfx/render_text_unittest.cc (right): https://codereview.chromium.org/2639493002/diff/100001/ui/gfx/render_text_unittest.cc#newcode476 ui/gfx/render_text_unittest.cc:476: Rect GetSubstringBoundsUnionForRange(const Range& range) { optional ...
3 years, 11 months ago (2017-01-20 16:45:33 UTC) #18
tapted
lgtm - thanks!
3 years, 11 months ago (2017-01-20 20:19:17 UTC) #19
karandeepb
https://codereview.chromium.org/2639493002/diff/100001/ui/gfx/render_text_unittest.cc File ui/gfx/render_text_unittest.cc (right): https://codereview.chromium.org/2639493002/diff/100001/ui/gfx/render_text_unittest.cc#newcode476 ui/gfx/render_text_unittest.cc:476: Rect GetSubstringBoundsUnionForRange(const Range& range) { On 2017/01/20 16:45:32, msw ...
3 years, 11 months ago (2017-01-23 00:20:25 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2639493002/120001
3 years, 11 months ago (2017-01-23 00:20:59 UTC) #23
commit-bot: I haz the power
3 years, 11 months ago (2017-01-23 01:58:26 UTC) #26
Message was sent while issue was closed.
Committed patchset #6 (id:120001) as
https://chromium.googlesource.com/chromium/src/+/666e4f0298298427d2026c289646...

Powered by Google App Engine
This is Rietveld 408576698