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

Issue 2910153002: Remove views::Label::SetDisabledColor(). Replace with typography colors. (Closed)

Created:
3 years, 6 months ago by tapted
Modified:
3 years, 6 months ago
Reviewers:
Peter Kasting, sky
CC:
chromium-reviews, sadrul, ios-reviews_chromium.org, tfarina, shuchen+watch_chromium.org, nona+watch_chromium.org, oshima+watch_chromium.org, kalyank, davemoore+watch_chromium.org, yusukes+watch_chromium.org, chrome-apps-syd-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove views::Label::SetDisabledColor(). Replace with typography colors. Everything calling Label::SetDisabledColor() is just using it as a roundabout way to make the text grey instead of black. This is bad because "disabled" is a property that is fed through to a11y clients. Alternatively, a consumer calls SetDisabledColor(), but the Label is never actually disabled. In Harmony, the typography spec distinguishes between "secondary" grey and "hint" grey which is what consumers should actually use to describe their text (once there's a mock which says which should be used). Bootstrap views::style::GetColor() to support consumers that want a grey Label to specify style::STYLE_DISABLED, or STYLE_HINT when creating a Label. Only LabelButton was using SetDisabledColor() properly. It sometimes gets a disabled color from the NativeTheme and sometimes overrides it. Nothing else needs this, so move disabled-label functionality to a Label subclass in a follow-up: crrev.com/2913933002 BUG=691891 Review-Url: https://codereview.chromium.org/2910153002 Cr-Commit-Position: refs/heads/master@{#476897} Committed: https://chromium.googlesource.com/chromium/src/+/30fe63c7bb9623a59ca6346ae956f5290f0864be

Patch Set 1 #

Patch Set 2 : CreateHintLabel #

Patch Set 3 : Yes, things disable views::Link. Allow it. #

Patch Set 4 : Rebase for r475715 #

Patch Set 5 : Use STYLE_HINT more. Fix SadTab #

Total comments: 29

Patch Set 6 : respond to comments #

Total comments: 2

Patch Set 7 : TODO for genericity #

Patch Set 8 : NativeTheme theme naming consistency #

Patch Set 9 : rebase for r476345 #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+214 lines, -140 lines) Patch
M ash/accelerators/exit_warning_handler.cc View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -1 line 0 comments Download
M ash/sticky_keys/sticky_keys_overlay.cc View 3 chunks +2 lines, -3 lines 0 comments Download
M ash/system/toast/toast_overlay.cc View 1 2 3 4 5 6 7 8 3 chunks +2 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/display/touch_calibrator/touch_calibrator_view.cc View 1 chunk +0 lines, -1 line 2 comments Download
M chrome/browser/chromeos/ui/idle_app_name_notification_view.cc View 1 chunk +0 lines, -1 line 2 comments Download
M chrome/browser/chromeos/ui/kiosk_external_update_notification.cc View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/ui/views/harmony/chrome_typography.h View 1 2 3 4 5 6 7 1 chunk +4 lines, -1 line 0 comments Download
M chrome/browser/ui/views/harmony/chrome_typography.cc View 1 2 3 4 5 3 chunks +16 lines, -6 lines 0 comments Download
M chrome/browser/ui/views/harmony/harmony_typography_provider.h View 1 2 3 4 5 6 7 1 chunk +4 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/harmony/harmony_typography_provider.cc View 1 2 3 4 5 6 4 chunks +57 lines, -12 lines 0 comments Download
M chrome/browser/ui/views/payments/credit_card_editor_view_controller.cc View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -7 lines 0 comments Download
M chrome/browser/ui/views/payments/editor_view_controller.cc View 1 2 3 4 5 6 7 8 1 chunk +5 lines, -9 lines 0 comments Download
M chrome/browser/ui/views/payments/order_summary_view_controller.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -5 lines 0 comments Download
M chrome/browser/ui/views/payments/payment_request_views_util.h View 1 2 chunks +6 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/payments/payment_request_views_util.cc View 1 2 3 4 1 chunk +9 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/payments/payment_sheet_view_controller.cc View 1 2 3 4 5 6 7 8 7 chunks +20 lines, -35 lines 0 comments Download
M chrome/browser/ui/views/profiles/profile_chooser_view.cc View 1 2 3 4 5 3 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/sad_tab_view.cc View 1 2 3 4 5 2 chunks +3 lines, -2 lines 0 comments Download
M ui/chromeos/ime/candidate_view.cc View 1 2 3 chunks +5 lines, -5 lines 0 comments Download
M ui/views/controls/button/label_button.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M ui/views/controls/label.h View 1 2 3 4 5 2 chunks +5 lines, -2 lines 1 comment Download
M ui/views/controls/label.cc View 1 2 3 4 3 chunks +14 lines, -7 lines 0 comments Download
M ui/views/controls/link.h View 1 2 2 chunks +1 line, -6 lines 0 comments Download
M ui/views/controls/link.cc View 1 2 4 chunks +13 lines, -14 lines 0 comments Download
M ui/views/style/typography.h View 1 2 3 4 5 6 7 2 chunks +10 lines, -4 lines 0 comments Download
M ui/views/style/typography.cc View 1 2 3 4 5 6 7 2 chunks +7 lines, -3 lines 0 comments Download
M ui/views/style/typography_provider.h View 1 2 3 4 5 6 7 3 chunks +12 lines, -4 lines 0 comments Download
M ui/views/style/typography_provider.cc View 1 2 3 4 5 2 chunks +9 lines, -2 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 55 (46 generated)
tapted
Color \o/ Getting it bootstrapped turned into a bit of chicken-and-egg because of this disabled ...
3 years, 6 months ago (2017-05-31 06:50:23 UTC) #28
Peter Kasting
https://codereview.chromium.org/2910153002/diff/100001/chrome/browser/ui/views/harmony/harmony_typography_provider.cc File chrome/browser/ui/views/harmony/harmony_typography_provider.cc (right): https://codereview.chromium.org/2910153002/diff/100001/chrome/browser/ui/views/harmony/harmony_typography_provider.cc#newcode72 chrome/browser/ui/views/harmony/harmony_typography_provider.cc:72: switch (text_style) { Seems like it might be OK ...
3 years, 6 months ago (2017-06-01 04:55:58 UTC) #31
tapted
https://codereview.chromium.org/2910153002/diff/100001/chrome/browser/ui/views/harmony/harmony_typography_provider.cc File chrome/browser/ui/views/harmony/harmony_typography_provider.cc (right): https://codereview.chromium.org/2910153002/diff/100001/chrome/browser/ui/views/harmony/harmony_typography_provider.cc#newcode72 chrome/browser/ui/views/harmony/harmony_typography_provider.cc:72: switch (text_style) { On 2017/06/01 04:55:58, Peter Kasting wrote: ...
3 years, 6 months ago (2017-06-01 11:22:19 UTC) #36
Peter Kasting
LGTM https://codereview.chromium.org/2910153002/diff/100001/chrome/browser/ui/views/harmony/harmony_typography_provider.cc File chrome/browser/ui/views/harmony/harmony_typography_provider.cc (right): https://codereview.chromium.org/2910153002/diff/100001/chrome/browser/ui/views/harmony/harmony_typography_provider.cc#newcode84 chrome/browser/ui/views/harmony/harmony_typography_provider.cc:84: switch (text_style) { On 2017/06/01 11:22:18, tapted wrote: ...
3 years, 6 months ago (2017-06-01 19:08:01 UTC) #37
tapted
+sky for owners (ash/*, c/b/chromeos, and ui/chromeos), or any other thoughts about this. Thanks! https://codereview.chromium.org/2910153002/diff/100001/ui/views/style/typography.cc ...
3 years, 6 months ago (2017-06-02 01:29:15 UTC) #45
sky
I'm assuming none of the calls to set disabled colors here actually mattered, so LGTM ...
3 years, 6 months ago (2017-06-02 14:14:23 UTC) #48
tapted
https://codereview.chromium.org/2910153002/diff/180001/chrome/browser/chromeos/display/touch_calibrator/touch_calibrator_view.cc File chrome/browser/chromeos/display/touch_calibrator/touch_calibrator_view.cc (left): https://codereview.chromium.org/2910153002/diff/180001/chrome/browser/chromeos/display/touch_calibrator/touch_calibrator_view.cc#oldcode544 chrome/browser/chromeos/display/touch_calibrator/touch_calibrator_view.cc:544: tap_label_->SetDisabledColor(kTapHereLabelColor); On 2017/06/02 14:14:22, sky wrote: > Was this ...
3 years, 6 months ago (2017-06-03 09:46:55 UTC) #49
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/2910153002/180001
3 years, 6 months ago (2017-06-03 09:47:19 UTC) #52
commit-bot: I haz the power
3 years, 6 months ago (2017-06-03 12:04:20 UTC) #55
Message was sent while issue was closed.
Committed patchset #9 (id:180001) as
https://chromium.googlesource.com/chromium/src/+/30fe63c7bb9623a59ca6346ae956...

Powered by Google App Engine
This is Rietveld 408576698