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

Issue 2602903002: Factor iOS native image loading into a utility function. (Closed)

Created:
3 years, 11 months ago by marq (ping after 24h)
Modified:
3 years, 11 months ago
CC:
chromium-reviews, rouslan+autofill_chromium.org, tfarina, sebsg+autofillwatch_chromium.org, pkl (ping after 24h if needed), mathp+autofillwatch_chromium.org, noyau+watch_chromium.org, vabr+watchlistautofill_chromium.org, estade+watch_chromium.org, sdefresne+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Factor iOS native image loading into a utility function. This CL packages the fairly common code path where a gfx image is extracted from the shared bundle and converted into a UIImage into a single utility function. All of the applicable call sites in ios/chrome/browser/ui/ are updated to use the function, and includes that were only present to support this code are removed. BUG= Committed: https://crrev.com/120110630f924c00c1eddb141d61f9da87d01bbf Cr-Commit-Position: refs/heads/master@{#440875}

Patch Set 1 #

Patch Set 2 : Fixed BUILD files. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+90 lines, -163 lines) Patch
M ios/chrome/browser/ui/autofill/cells/BUILD.gn View 1 1 chunk +1 line, -0 lines 0 comments Download
M ios/chrome/browser/ui/autofill/cells/cvc_item.mm View 2 chunks +2 lines, -4 lines 0 comments Download
M ios/chrome/browser/ui/autofill/cells/status_item.mm View 2 chunks +5 lines, -7 lines 0 comments Download
M ios/chrome/browser/ui/autofill/cells/storage_switch_item.mm View 2 chunks +5 lines, -8 lines 0 comments Download
M ios/chrome/browser/ui/bookmarks/bookmark_collection_cells.mm View 2 chunks +2 lines, -5 lines 0 comments Download
M ios/chrome/browser/ui/infobars/infobar_view.mm View 1 chunk +1 line, -2 lines 0 comments Download
M ios/chrome/browser/ui/ntp/new_tab_page_header_view.mm View 2 chunks +2 lines, -4 lines 0 comments Download
M ios/chrome/browser/ui/ntp/recent_tabs/recent_tabs_panel_view_controller.mm View 2 chunks +1 line, -4 lines 0 comments Download
M ios/chrome/browser/ui/omnibox/location_bar_view_ios.mm View 3 chunks +6 lines, -15 lines 0 comments Download
M ios/chrome/browser/ui/omnibox/omnibox_popup_material_row.h View 1 chunk +1 line, -1 line 0 comments Download
M ios/chrome/browser/ui/omnibox/omnibox_popup_material_row.mm View 5 chunks +5 lines, -24 lines 0 comments Download
M ios/chrome/browser/ui/omnibox/omnibox_popup_view_ios.mm View 2 chunks +3 lines, -7 lines 0 comments Download
M ios/chrome/browser/ui/omnibox/omnibox_text_field_ios.mm View 2 chunks +1 line, -4 lines 0 comments Download
M ios/chrome/browser/ui/overscroll_actions/BUILD.gn View 1 chunk +0 lines, -1 line 0 comments Download
M ios/chrome/browser/ui/overscroll_actions/overscroll_actions_view.mm View 2 chunks +3 lines, -5 lines 0 comments Download
M ios/chrome/browser/ui/sad_tab/sad_tab_view.mm View 3 chunks +3 lines, -7 lines 0 comments Download
M ios/chrome/browser/ui/side_swipe/card_side_swipe_view.mm View 2 chunks +1 line, -4 lines 0 comments Download
M ios/chrome/browser/ui/tab_switcher/BUILD.gn View 1 1 chunk +1 line, -0 lines 0 comments Download
M ios/chrome/browser/ui/tab_switcher/tab_switcher_controller.mm View 3 chunks +2 lines, -4 lines 0 comments Download
M ios/chrome/browser/ui/tab_switcher/tab_switcher_panel_cell.mm View 3 chunks +2 lines, -8 lines 0 comments Download
M ios/chrome/browser/ui/tab_switcher/tab_switcher_utils.mm View 1 chunk +2 lines, -3 lines 0 comments Download
M ios/chrome/browser/ui/toolbar/toolbar_controller.mm View 7 chunks +14 lines, -25 lines 0 comments Download
M ios/chrome/browser/ui/toolbar/web_toolbar_controller.mm View 1 chunk +0 lines, -1 line 0 comments Download
M ios/chrome/browser/ui/tools_menu/tools_menu_view_controller.mm View 4 chunks +3 lines, -20 lines 0 comments Download
M ios/chrome/browser/ui/uikit_ui_util.h View 1 chunk +9 lines, -0 lines 0 comments Download
M ios/chrome/browser/ui/uikit_ui_util.mm View 2 chunks +15 lines, -0 lines 2 comments Download

Messages

Total messages: 19 (11 generated)
marq (ping after 24h)
3 years, 11 months ago (2016-12-28 17:05:30 UTC) #2
Olivier
lgtm
3 years, 11 months ago (2016-12-28 17:45:30 UTC) #7
marq (ping after 24h)
Fixed BUILD files.
3 years, 11 months ago (2016-12-28 18:03:48 UTC) #8
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/2602903002/20001
3 years, 11 months ago (2016-12-28 18:03:54 UTC) #11
commit-bot: I haz the power
Committed patchset #2 (id:20001)
3 years, 11 months ago (2016-12-28 18:59:58 UTC) #14
noyau (Ping after 24h)
https://codereview.chromium.org/2602903002/diff/20001/ios/chrome/browser/ui/uikit_ui_util.mm File ios/chrome/browser/ui/uikit_ui_util.mm (right): https://codereview.chromium.org/2602903002/diff/20001/ios/chrome/browser/ui/uikit_ui_util.mm#newcode240 ios/chrome/browser/ui/uikit_ui_util.mm:240: return NativeReversableImage(imageID, NO); Late driveby: Will this now reverse ...
3 years, 11 months ago (2017-01-02 10:11:32 UTC) #16
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/120110630f924c00c1eddb141d61f9da87d01bbf Cr-Commit-Position: refs/heads/master@{#440875}
3 years, 11 months ago (2017-01-02 15:49:48 UTC) #18
marq (ping after 24h)
3 years, 11 months ago (2017-01-09 09:46:14 UTC) #19
Message was sent while issue was closed.
https://codereview.chromium.org/2602903002/diff/20001/ios/chrome/browser/ui/u...
File ios/chrome/browser/ui/uikit_ui_util.mm (right):

https://codereview.chromium.org/2602903002/diff/20001/ios/chrome/browser/ui/u...
ios/chrome/browser/ui/uikit_ui_util.mm:240: return
NativeReversableImage(imageID, NO);
On 2017/01/02 10:11:32, noyau wrote:
> Late driveby: Will this now reverse all images if UseRTLLayout() is true,
> whereas before only the ones explicitely reversable were reversed?

NativeImage(image_id) will never reverse the image.

NativeReversableImage(image_id, YES) will reverse the image if RTLLayout() is
true; this (passing in YES) is how images are marked as explicitly reversible.

(I should fix the spelling of 'Reversable', however).

Powered by Google App Engine
This is Rietveld 408576698