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

Issue 2695413003: Change OmniboxPopupTruncatingLabel to be based on UILabel. (Closed)

Created:
3 years, 10 months ago by Justin Donnelly
Modified:
3 years, 10 months ago
CC:
chromium-reviews, marq+watch_chromium.org, jdonnelly+watch_chromium.org, pkl (ping after 24h if needed), noyau+watch_chromium.org, sdefresne+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Change OmniboxPopupTruncatingLabel to be based on UILabel. When OmniboxPopupTruncatingLabel was created in 2012, UILabel did not support attributed strings. My assumption is that this is why it's based on CATextLayer. As of iOS 6, however, UILabel has the attributedString property which allows us to set the font characteristics we need. Consequently, OmniboxPopupMaterialViewController no longer needs to create and cache CTFontRefs. Tested on the following simulators: iPhone 6s/iOS 9.3, iPhone 7/iOS 10.2, and iPad Air/iOS 10.2. BUG= Review-Url: https://codereview.chromium.org/2695413003 Cr-Commit-Position: refs/heads/master@{#452638} Committed: https://chromium.googlesource.com/chromium/src/+/af40f7a6563089a73b4a18e1d9abac7cbff3b88f

Patch Set 1 #

Total comments: 10

Patch Set 2 : Remove handling of the unused self.text case. #

Patch Set 3 : Cache gradient, restore handling of text alignment. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+52 lines, -101 lines) Patch
M ios/chrome/browser/ui/omnibox/omnibox_popup_material_view_controller.mm View 8 chunks +24 lines, -53 lines 0 comments Download
M ios/chrome/browser/ui/omnibox/truncating_attributed_label.h View 1 2 chunks +5 lines, -20 lines 0 comments Download
M ios/chrome/browser/ui/omnibox/truncating_attributed_label.mm View 1 2 5 chunks +23 lines, -28 lines 0 comments Download

Messages

Total messages: 38 (23 generated)
Justin Donnelly
This change makes OmniboxPopupTruncatingLabel a much closer copy of GTMFadeTruncatingLabel. The only difference now is ...
3 years, 10 months ago (2017-02-16 18:28:19 UTC) #6
Justin Donnelly
Ah, hang on. GTM is managed on github. I'm a bit less confident about making ...
3 years, 10 months ago (2017-02-16 21:22:29 UTC) #11
justincohen
I didn't see a resolution on the email 'Ellipses in iOS' thread with pschaffner@. Does ...
3 years, 10 months ago (2017-02-20 19:56:28 UTC) #13
justincohen
https://codereview.chromium.org/2695413003/diff/1/ios/chrome/browser/ui/omnibox/truncating_attributed_label.mm File ios/chrome/browser/ui/omnibox/truncating_attributed_label.mm (right): https://codereview.chromium.org/2695413003/diff/1/ios/chrome/browser/ui/omnibox/truncating_attributed_label.mm#newcode60 ios/chrome/browser/ui/omnibox/truncating_attributed_label.mm:60: UIImage* image = [self getLinearGradient:requestedRect]; Does it matter this ...
3 years, 10 months ago (2017-02-20 20:07:25 UTC) #14
Justin Donnelly
On 2017/02/20 19:56:28, justincohen wrote: > I didn't see a resolution on the email 'Ellipses ...
3 years, 10 months ago (2017-02-21 17:25:14 UTC) #15
Justin Donnelly
https://codereview.chromium.org/2695413003/diff/1/ios/chrome/browser/ui/omnibox/truncating_attributed_label.mm File ios/chrome/browser/ui/omnibox/truncating_attributed_label.mm (right): https://codereview.chromium.org/2695413003/diff/1/ios/chrome/browser/ui/omnibox/truncating_attributed_label.mm#newcode60 ios/chrome/browser/ui/omnibox/truncating_attributed_label.mm:60: UIImage* image = [self getLinearGradient:requestedRect]; On 2017/02/20 20:07:24, justincohen ...
3 years, 10 months ago (2017-02-21 18:16:50 UTC) #18
justincohen
https://codereview.chromium.org/2695413003/diff/1/ios/chrome/browser/ui/omnibox/truncating_attributed_label.mm File ios/chrome/browser/ui/omnibox/truncating_attributed_label.mm (right): https://codereview.chromium.org/2695413003/diff/1/ios/chrome/browser/ui/omnibox/truncating_attributed_label.mm#newcode60 ios/chrome/browser/ui/omnibox/truncating_attributed_label.mm:60: UIImage* image = [self getLinearGradient:requestedRect]; On 2017/02/21 18:16:50, Justin ...
3 years, 10 months ago (2017-02-22 03:52:30 UTC) #21
Justin Donnelly
https://codereview.chromium.org/2695413003/diff/1/ios/chrome/browser/ui/omnibox/truncating_attributed_label.mm File ios/chrome/browser/ui/omnibox/truncating_attributed_label.mm (right): https://codereview.chromium.org/2695413003/diff/1/ios/chrome/browser/ui/omnibox/truncating_attributed_label.mm#newcode60 ios/chrome/browser/ui/omnibox/truncating_attributed_label.mm:60: UIImage* image = [self getLinearGradient:requestedRect]; On 2017/02/22 03:52:29, justincohen ...
3 years, 10 months ago (2017-02-22 17:17:42 UTC) #24
justincohen
lgtm!
3 years, 10 months ago (2017-02-22 19:10:22 UTC) #27
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/2695413003/40001
3 years, 10 months ago (2017-02-22 19:49:18 UTC) #29
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/370418)
3 years, 10 months ago (2017-02-22 19:59:27 UTC) #31
Justin Donnelly1
rohitrao: would you mind giving this an OWNERS review when you get a chance?
3 years, 10 months ago (2017-02-22 20:54:56 UTC) #32
rohitrao (ping after 24h)
lgtm
3 years, 10 months ago (2017-02-23 21:19:35 UTC) #33
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/2695413003/40001
3 years, 10 months ago (2017-02-23 21:25:25 UTC) #35
commit-bot: I haz the power
3 years, 10 months ago (2017-02-23 21:39:08 UTC) #38
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/af40f7a6563089a73b4a18e1d9ab...

Powered by Google App Engine
This is Rietveld 408576698