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

Issue 497503004: Add NSString category for providing iOS6-style string drawing APIs. (Closed)

Created:
6 years, 4 months ago by lliabraa
Modified:
6 years, 3 months ago
CC:
chromium-reviews, Ben Goodger (Google)
Project:
chromium
Visibility:
Public.

Description

Add NSString category for providing iOS6-style string drawing APIs. The iOS6-style APIs have been deprecated, but the replacements are more verbose and brittle so this category wraps the replacements in methods similar to the iOS6-style APIs. This category lives in a new target and directory: src/ui/ios, so this CL sets up all the gyp/DEPS stuff and only adds a single method. There will be more methods added in subsequent CLs. BUG=364419 Committed: https://crrev.com/c018ddc14ace7181edda4d4be225cf6e88e44d2c Cr-Commit-Position: refs/heads/master@{#293193}

Patch Set 1 #

Patch Set 2 : TIL export_dependent_settings #

Total comments: 5

Patch Set 3 : refactored gyp #

Patch Set 4 : use link_settings instead of all_dependent_settings #

Patch Set 5 : split into two methods #

Total comments: 6

Patch Set 6 : pixel-align size #

Total comments: 12

Patch Set 7 : updated unit tests; added todo for duplication #

Total comments: 3

Patch Set 8 : don't cache scale #

Unified diffs Side-by-side diffs Delta from patch set Stats (+206 lines, -23 lines) Patch
M build/all.gyp View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M ui/gfx/DEPS View 1 chunk +1 line, -0 lines 0 comments Download
M ui/gfx/gfx.gyp View 1 2 3 4 5 6 1 chunk +3 lines, -0 lines 0 comments Download
M ui/gfx/platform_font_ios.mm View 5 2 chunks +2 lines, -6 lines 0 comments Download
M ui/gfx/text_utils_ios.mm View 1 2 3 4 5 2 chunks +2 lines, -4 lines 0 comments Download
A ui/ios/NSString+CrStringDrawing.h View 1 2 3 4 5 1 chunk +35 lines, -0 lines 0 comments Download
A ui/ios/NSString+CrStringDrawing.mm View 1 2 3 4 5 6 7 1 chunk +37 lines, -0 lines 0 comments Download
A ui/ios/NSString+CrStringDrawing_unittest.mm View 1 2 3 4 5 6 1 chunk +107 lines, -0 lines 0 comments Download
A + ui/ios/ui_ios.gyp View 1 2 3 4 5 6 7 1 chunk +8 lines, -3 lines 0 comments Download
A + ui/ios/ui_ios_tests.gyp View 1 2 1 chunk +10 lines, -10 lines 0 comments Download

Messages

Total messages: 28 (6 generated)
lliabraa
@lpromero - can you please do a first-pass iOS review? Then I'll send to stuartmorgan ...
6 years, 4 months ago (2014-08-22 15:52:13 UTC) #1
lpromero
On 2014/08/22 15:52:13, lliabraa wrote: > @lpromero - can you please do a first-pass iOS ...
6 years, 4 months ago (2014-08-22 16:08:45 UTC) #2
lliabraa
+stuartmorgan for iOS review. n.b. I uploaded patchset 2 after lpromero's review because I got ...
6 years, 4 months ago (2014-08-22 18:37:49 UTC) #3
lliabraa
https://chromiumcodereview.appspot.com/497503004/diff/20001/ui/gfx/gfx.gyp File ui/gfx/gfx.gyp (right): https://chromiumcodereview.appspot.com/497503004/diff/20001/ui/gfx/gfx.gyp#newcode314 ui/gfx/gfx.gyp:314: 'export_dependent_settings': [ maybe this is not correct...I get the ...
6 years, 3 months ago (2014-08-25 19:41:53 UTC) #4
stuartmorgan
I'm hesitant here; usually we want to polyfill old APIs to look like new ones, ...
6 years, 3 months ago (2014-08-25 20:17:38 UTC) #5
lliabraa
lliabraa@chromium.org changed reviewers: + tfarina@chromium.org
6 years, 3 months ago (2014-08-27 22:03:10 UTC) #6
lliabraa
+tfarina - Can you please take a look a the gyp files in this CL? ...
6 years, 3 months ago (2014-08-27 22:03:10 UTC) #7
lliabraa
@stuartmorgan - what do you think of having two methods: one is a drop-in for ...
6 years, 3 months ago (2014-08-28 12:13:20 UTC) #8
tfarina
I will take a look later tonight. Please, do not land this without sending to ...
6 years, 3 months ago (2014-08-28 13:11:41 UTC) #9
stuartmorgan
LGTM with some nits. You can add the non-behavior-preserving version if you really want to, ...
6 years, 3 months ago (2014-08-28 15:18:14 UTC) #10
lliabraa
Thanks for the review https://chromiumcodereview.appspot.com/497503004/diff/80001/ui/ios/NSString+CrStringDrawing.h File ui/ios/NSString+CrStringDrawing.h (right): https://chromiumcodereview.appspot.com/497503004/diff/80001/ui/ios/NSString+CrStringDrawing.h#newcode27 ui/ios/NSString+CrStringDrawing.h:27: // returned are rounded up ...
6 years, 3 months ago (2014-08-28 19:25:06 UTC) #11
tfarina
gyp changes lgtm. You will have to ask Scott or Ben what they think about ...
6 years, 3 months ago (2014-08-29 03:27:35 UTC) #12
stuartmorgan
https://codereview.chromium.org/497503004/diff/100001/ui/ios/ui_ios_tests.gyp File ui/ios/ui_ios_tests.gyp (left): https://codereview.chromium.org/497503004/diff/100001/ui/ios/ui_ios_tests.gyp#oldcode11 ui/ios/ui_ios_tests.gyp:11: 'target_name': 'boringssl_unittests', On 2014/08/29 03:27:35, tfarina wrote: > if ...
6 years, 3 months ago (2014-08-29 14:35:52 UTC) #13
stuartmorgan
https://codereview.chromium.org/497503004/diff/100001/ui/gfx/gfx.gyp File ui/gfx/gfx.gyp (right): https://codereview.chromium.org/497503004/diff/100001/ui/gfx/gfx.gyp#newcode313 ui/gfx/gfx.gyp:313: "<(DEPTH)/ui/ios/ui_ios.gyp:ui_ios", s/"/'/g https://codereview.chromium.org/497503004/diff/100001/ui/ios/NSString+CrStringDrawing.mm File ui/ios/NSString+CrStringDrawing.mm (right): https://codereview.chromium.org/497503004/diff/100001/ui/ios/NSString+CrStringDrawing.mm#newcode12 ui/ios/NSString+CrStringDrawing.mm:12: CGFloat ...
6 years, 3 months ago (2014-08-29 14:48:32 UTC) #14
lliabraa
Thanks for the reviews! +sky for ui/OWNERS review +ben for ui/OWNERS FYI https://codereview.chromium.org/497503004/diff/100001/ui/gfx/gfx.gyp File ui/gfx/gfx.gyp ...
6 years, 3 months ago (2014-09-02 13:29:15 UTC) #16
sky
sky->thakis as he's a better reviewer for mac related stuff. https://codereview.chromium.org/497503004/diff/120001/build/all.gyp File build/all.gyp (right): https://codereview.chromium.org/497503004/diff/120001/build/all.gyp#newcode43 ...
6 years, 3 months ago (2014-09-02 18:01:05 UTC) #18
Nico
lgtm https://codereview.chromium.org/497503004/diff/120001/ui/ios/NSString+CrStringDrawing.mm File ui/ios/NSString+CrStringDrawing.mm (right): https://codereview.chromium.org/497503004/diff/120001/ui/ios/NSString+CrStringDrawing.mm#newcode14 ui/ios/NSString+CrStringDrawing.mm:14: static CGFloat scale = [[UIScreen mainScreen] scale]; Is ...
6 years, 3 months ago (2014-09-02 18:04:30 UTC) #20
lliabraa
thanks for the reviews https://codereview.chromium.org/497503004/diff/120001/ui/ios/NSString+CrStringDrawing.mm File ui/ios/NSString+CrStringDrawing.mm (right): https://codereview.chromium.org/497503004/diff/120001/ui/ios/NSString+CrStringDrawing.mm#newcode14 ui/ios/NSString+CrStringDrawing.mm:14: static CGFloat scale = [[UIScreen ...
6 years, 3 months ago (2014-09-03 18:02:33 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/lliabraa@chromium.org/497503004/140001
6 years, 3 months ago (2014-09-03 18:08:33 UTC) #25
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: mac_gpu_triggered_tests on tryserver.chromium.gpu ...
6 years, 3 months ago (2014-09-03 19:08:04 UTC) #26
commit-bot: I haz the power
Committed patchset #8 (id:140001) as f4daf2bd009952a06de8733880719d6e2c1fc2a3
6 years, 3 months ago (2014-09-03 20:37:55 UTC) #27
commit-bot: I haz the power
6 years, 3 months ago (2014-09-10 03:27:40 UTC) #28
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/c018ddc14ace7181edda4d4be225cf6e88e44d2c
Cr-Commit-Position: refs/heads/master@{#293193}

Powered by Google App Engine
This is Rietveld 408576698