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

Issue 112063003: Implement eliding/truncating at end in RenderText (Closed)

Created:
7 years ago by Anuj
Modified:
7 years ago
CC:
chromium-reviews, tfarina, James Su, erikwright+watch_chromium.org, jshin+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Implement eliding/truncating at end in RenderText The eliding is determined using binary search similar to the ElideText in ui/gfx/text_elider.cc. The mixed LTR-RTL handling for ellipsis is done using LTR/RTL markers. There is no other way of rendering the ellipsis with the directionality of preceding strong-directional characters. Previous scheme worked because it rendered LTR and RTL sub-strings as different RenderText instances. Added helper method to be able to determine directionality of the trailing text. Made StringSlicer used by text_elider.cc public to be shared by RenderText. BUG=327833 TEST=ui_unittests,base_unittests R=msw@chromium.org TBR=jshin@chromium.org,pkasting@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=240572

Patch Set 1 #

Total comments: 76

Patch Set 2 : Addressed comments and added unit tests #

Total comments: 38

Patch Set 3 : Addresss comments, update bugs #

Total comments: 2

Patch Set 4 : Addressed comments (Patch Set 4) #

Total comments: 1

Patch Set 5 : Synced #

Unified diffs Side-by-side diffs Delta from patch set Stats (+416 lines, -295 lines) Patch
M base/i18n/rtl.h View 1 2 2 chunks +3 lines, -1 line 0 comments Download
M base/i18n/rtl.cc View 1 chunk +15 lines, -0 lines 0 comments Download
M base/i18n/rtl_unittest.cc View 1 2 chunks +64 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/omnibox/omnibox_result_view.h View 1 2 3 4 1 chunk +0 lines, -16 lines 0 comments Download
M chrome/browser/ui/views/omnibox/omnibox_result_view.cc View 1 2 3 4 1 chunk +45 lines, -200 lines 0 comments Download
M ui/gfx/render_text.h View 1 2 5 chunks +16 lines, -0 lines 0 comments Download
M ui/gfx/render_text.cc View 1 2 7 chunks +112 lines, -4 lines 0 comments Download
M ui/gfx/render_text_unittest.cc View 1 2 3 4 1 chunk +71 lines, -0 lines 0 comments Download
M ui/gfx/text_elider.h View 1 2 2 chunks +35 lines, -1 line 0 comments Download
M ui/gfx/text_elider.cc View 1 2 4 chunks +55 lines, -73 lines 0 comments Download

Messages

Total messages: 20 (0 generated)
Anuj
PTAL. And soon please!
7 years ago (2013-12-10 22:49:28 UTC) #1
msw
Please add a BUG=, TEST=, and R= to the CL description. Please add unit tests. ...
7 years ago (2013-12-11 08:10:14 UTC) #2
Anuj
Responding with some comments for clarification. I will address the rest of the comments shortly. ...
7 years ago (2013-12-11 18:41:32 UTC) #3
msw
https://codereview.chromium.org/112063003/diff/1/chrome/browser/ui/views/omnibox/omnibox_result_view.cc File chrome/browser/ui/views/omnibox/omnibox_result_view.cc (right): https://codereview.chromium.org/112063003/diff/1/chrome/browser/ui/views/omnibox/omnibox_result_view.cc#newcode367 chrome/browser/ui/views/omnibox/omnibox_result_view.cc:367: render_text->SetDirectionalityMode(gfx::DIRECTIONALITY_FORCE_LTR); On 2013/12/11 18:41:32, Anuj wrote: > Are you ...
7 years ago (2013-12-11 19:39:57 UTC) #4
Anuj
RenderText deserves more tests. But I think I deserve a break from this CL, so ...
7 years ago (2013-12-12 08:08:41 UTC) #5
Anuj
Added jshin@ for base/i18n/rtl*
7 years ago (2013-12-12 08:09:24 UTC) #6
msw
Looking pretty good. The tests you've added (with my suggested changes) are probably sufficient for ...
7 years ago (2013-12-12 19:28:28 UTC) #7
Anuj
I have added TODOs as well as updated bugs about more work/tests needed. PTAL. https://codereview.chromium.org/112063003/diff/1/ui/gfx/render_text.cc ...
7 years ago (2013-12-13 01:23:49 UTC) #8
msw
LGTM with a Q, thanks for working on this, please do help with consolidating the ...
7 years ago (2013-12-13 01:56:08 UTC) #9
Anuj
This was a fun CL. If it were not for M33 cut date, I would ...
7 years ago (2013-12-13 02:23:44 UTC) #10
msw
Still LGTM. It should be trivial enough to clear any style/color breaks in the logical ...
7 years ago (2013-12-13 03:20:05 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skanuj@chromium.org/112063003/60001
7 years ago (2013-12-13 03:20:44 UTC) #12
commit-bot: I haz the power
Failed to apply patch for chrome/browser/ui/views/omnibox/omnibox_result_view.cc: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
7 years ago (2013-12-13 03:20:49 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skanuj@chromium.org/112063003/60001
7 years ago (2013-12-13 03:44:55 UTC) #14
commit-bot: I haz the power
Failed to apply patch for chrome/browser/ui/views/omnibox/omnibox_result_view.cc: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
7 years ago (2013-12-13 03:45:02 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skanuj@chromium.org/112063003/70001
7 years ago (2013-12-13 03:53:10 UTC) #16
commit-bot: I haz the power
Change committed as 240572
7 years ago (2013-12-13 09:34:24 UTC) #17
szym
On 2013/12/13 09:34:24, I haz the power (commit-bot) wrote: > Change committed as 240572 RenderTextTest.ElidedText ...
7 years ago (2013-12-13 17:27:59 UTC) #18
szym
A revert of this CL has been created in https://codereview.chromium.org/103493003/ by szym@chromium.org. The reason for ...
7 years ago (2013-12-13 17:59:11 UTC) #19
Peter Kasting
7 years ago (2013-12-18 00:15:00 UTC) #20
Message was sent while issue was closed.
FYI, I left comments on the version of this patch that appears on
https://codereview.chromium.org/107513011/ .

Powered by Google App Engine
This is Rietveld 408576698