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

Issue 2899653002: Remove uses of FontList::Derive*(..) in views payments dialogs. (Closed)

Created:
3 years, 7 months ago by tapted
Modified:
3 years, 7 months ago
CC:
chrome-apps-syd-reviews_chromium.org, chromium-reviews, tfarina
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove uses of FontList::Derive*(..) in views payments dialogs. FontList::Derive(..) is slow (typically requiring IPC with the font server), has unpredictable results with special UI fonts on Mac, and encourages use of magic numbers like "-1". Instead, use context and style constants from the Chrome typography spec, where available. When an equivalent font is not available, use ResourceBundle to avoid a behavior change in this CL. BUG=721834 Review-Url: https://codereview.chromium.org/2899653002 Cr-Original-Commit-Position: refs/heads/master@{#473764} Committed: https://chromium.googlesource.com/chromium/src/+/424d27cceaba0271bc21e9c9b48a39e4d5a2b21f Review-Url: https://codereview.chromium.org/2899653002 Cr-Commit-Position: refs/heads/master@{#473859} Committed: https://chromium.googlesource.com/chromium/src/+/17d6248cb822cf06ae06fccd65fbeebfa7b4af2a

Patch Set 1 #

Patch Set 2 : AlwaysCloseAsynchronously #

Patch Set 3 : self review #

Total comments: 2

Patch Set 4 : rebase #

Total comments: 1

Patch Set 5 : hate you gcc #

Unified diffs Side-by-side diffs Delta from patch set Stats (+111 lines, -52 lines) Patch
M chrome/browser/ui/test/test_browser_dialog.h View 1 1 chunk +7 lines, -0 lines 0 comments Download
M chrome/browser/ui/test/test_browser_dialog.cc View 1 3 chunks +32 lines, -9 lines 0 comments Download
M chrome/browser/ui/views/payments/editor_view_controller.cc View 1 2 3 2 chunks +2 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/payments/order_summary_view_controller.cc View 1 2 3 1 chunk +9 lines, -10 lines 0 comments Download
M chrome/browser/ui/views/payments/payment_method_view_controller.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/payments/payment_request_browsertest.cc View 1 2 chunks +27 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/payments/payment_request_views_util.h View 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/payments/payment_request_views_util.cc View 1 2 3 4 7 chunks +24 lines, -23 lines 0 comments Download
M chrome/browser/ui/views/payments/payment_sheet_view_controller.cc View 1 2 3 1 chunk +2 lines, -4 lines 0 comments Download

Messages

Total messages: 44 (32 generated)
tapted
Hi Anthony, please take a look
3 years, 7 months ago (2017-05-22 11:22:30 UTC) #13
anthonyvd
lgtm w/ a question. Thanks a ton :) https://codereview.chromium.org/2899653002/diff/40001/chrome/browser/ui/views/payments/payment_request_views_util.cc File chrome/browser/ui/views/payments/payment_request_views_util.cc (right): https://codereview.chromium.org/2899653002/diff/40001/chrome/browser/ui/views/payments/payment_request_views_util.cc#newcode361 chrome/browser/ui/views/payments/payment_request_views_util.cc:361: label->SetFontList(ResourceBundle::GetSharedInstance().GetFontListWithDelta( ...
3 years, 7 months ago (2017-05-22 13:10:33 UTC) #16
tapted
+pkasting for the test_browser_dialog.cc changes https://codereview.chromium.org/2899653002/diff/40001/chrome/browser/ui/views/payments/payment_request_views_util.cc File chrome/browser/ui/views/payments/payment_request_views_util.cc (right): https://codereview.chromium.org/2899653002/diff/40001/chrome/browser/ui/views/payments/payment_request_views_util.cc#newcode361 chrome/browser/ui/views/payments/payment_request_views_util.cc:361: label->SetFontList(ResourceBundle::GetSharedInstance().GetFontListWithDelta( On 2017/05/22 13:10:32, ...
3 years, 7 months ago (2017-05-22 21:09:26 UTC) #18
Peter Kasting
LGTM
3 years, 7 months ago (2017-05-22 21:22:35 UTC) #19
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/2899653002/40001
3 years, 7 months ago (2017-05-22 21:29:18 UTC) #21
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/444158)
3 years, 7 months ago (2017-05-22 21:39:04 UTC) #23
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/2899653002/60001
3 years, 7 months ago (2017-05-23 00:08:41 UTC) #29
commit-bot: I haz the power
Committed patchset #4 (id:60001) as https://chromium.googlesource.com/chromium/src/+/424d27cceaba0271bc21e9c9b48a39e4d5a2b21f
3 years, 7 months ago (2017-05-23 00:39:19 UTC) #32
cfroussios
A revert of this CL (patchset #4 id:60001) has been created in https://codereview.chromium.org/2901763002/ by cfroussios@chromium.org. ...
3 years, 7 months ago (2017-05-23 08:36:06 UTC) #33
tapted
gcc... https://codereview.chromium.org/2899653002/diff/60001/chrome/browser/ui/views/payments/payment_request_views_util.cc File chrome/browser/ui/views/payments/payment_request_views_util.cc (right): https://codereview.chromium.org/2899653002/diff/60001/chrome/browser/ui/views/payments/payment_request_views_util.cc#newcode86 chrome/browser/ui/views/payments/payment_request_views_util.cc:86: ? STYLE_EMPHASIZED /b/c/goma_client/gomacc i686-pc-linux-gnu-g++ ../../chrome/browser/ui/views/payments/payment_request_views_util.cc: In function 'std::unique_ptr<views::View> ...
3 years, 7 months ago (2017-05-23 11:31:22 UTC) #38
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/2899653002/80001
3 years, 7 months ago (2017-05-23 11:31:46 UTC) #41
commit-bot: I haz the power
3 years, 7 months ago (2017-05-23 11:36:12 UTC) #44
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/17d6248cb822cf06ae06fccd65fb...

Powered by Google App Engine
This is Rietveld 408576698