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

Issue 11421204: Use native theme colors for textfields; etc. (Closed)

Created:
8 years ago by msw
Modified:
8 years ago
Reviewers:
samarth, sky, varunjain, marja
CC:
chromium-reviews, tfarina, James Su, penghuang+watch_chromium.org, yusukes+watch_chromium.org, samarth, Mathieu
Visibility:
Public.

Description

Use native theme colors for textfields; etc. Make LocationBarView::GetColor use NativeTheme colors. (except the CrOS transparent Omnibox background color) Add NativeTheme read-only textfield color/background IDs. Cache a set of Windows system colors in NativeThemeWin. Update cached colors via gfx::SysColorChangeListener impl. Init colors in NativeTextfieldViews, not TextfieldViewsModel. Refactor Textfield and NativeTextfieldViews color code. Nix frivolous AutocompleteTextfield::PaintChildren OVERRIDE. Nix Textfield cursor color settings and visibility kludge. (replace with proper cursor enabled accessors for views) TODO(followup): Fix related existing issues (not affected here): (existing textfields don't update with system color changes) (bubbles seem to cache the system colors at startup...) BUG=134766 TEST=Views textfields are created with the current system colors. R=sky@chromium.org,varunjain@chromium.org,samarth@chromium.org TBR=marja@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=172142

Patch Set 1 #

Patch Set 2 : Cleanup, etc. #

Patch Set 3 : Nix cursor color; adjust textfield functions; add read-only theme colors. #

Total comments: 11

Patch Set 4 : Address comments. #

Patch Set 5 : Add Omnibox background color. #

Patch Set 6 : Remove omnibox color from ui/native_theme. #

Patch Set 7 : Add Textfield cursor visibility accessors for better NativeTextfieldViews impl. #

Total comments: 2

Patch Set 8 : Remove unused OmniboxViewViews::visible_caret_color_. #

Patch Set 9 : [En|Dis]able the RenderText cursor instead of setting transient visibility. #

Total comments: 10

Patch Set 10 : Sync and rebase, add a blank line between includes. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+176 lines, -189 lines) Patch
M chrome/browser/ui/views/frame/browser_view.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/location_bar/location_bar_view.cc View 1 2 3 4 5 6 2 chunks +17 lines, -25 lines 0 comments Download
M chrome/browser/ui/views/omnibox/omnibox_view_views.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -4 lines 0 comments Download
M chrome/browser/ui/views/omnibox/omnibox_view_views.cc View 1 2 3 4 5 6 7 8 3 chunks +2 lines, -14 lines 0 comments Download
M ui/gfx/sys_color_change_listener.h View 1 1 chunk +1 line, -1 line 0 comments Download
M ui/native_theme/native_theme.h View 1 2 3 5 2 chunks +3 lines, -1 line 0 comments Download
M ui/native_theme/native_theme.cc View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M ui/native_theme/native_theme_aura.cc View 1 2 3 4 5 6 7 8 9 2 chunks +6 lines, -0 lines 0 comments Download
M ui/native_theme/native_theme_win.h View 1 2 3 4 5 6 7 8 9 6 chunks +16 lines, -2 lines 0 comments Download
M ui/native_theme/native_theme_win.cc View 1 2 3 4 5 6 8 chunks +43 lines, -28 lines 0 comments Download
M ui/views/controls/textfield/native_textfield_views.h View 1 2 3 4 5 6 7 8 3 chunks +5 lines, -1 line 0 comments Download
M ui/views/controls/textfield/native_textfield_views.cc View 1 2 3 4 5 6 7 8 7 chunks +30 lines, -39 lines 0 comments Download
M ui/views/controls/textfield/native_textfield_win.h View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -1 line 0 comments Download
M ui/views/controls/textfield/native_textfield_win.cc View 1 2 3 4 5 6 7 8 2 chunks +14 lines, -15 lines 0 comments Download
M ui/views/controls/textfield/native_textfield_wrapper.h View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -3 lines 0 comments Download
M ui/views/controls/textfield/textfield.h View 1 2 3 4 5 6 7 8 2 chunks +7 lines, -29 lines 0 comments Download
M ui/views/controls/textfield/textfield.cc View 1 2 3 4 5 6 7 8 8 chunks +23 lines, -14 lines 0 comments Download
M ui/views/controls/textfield/textfield_views_model.cc View 1 2 2 chunks +0 lines, -11 lines 0 comments Download

Messages

Total messages: 25 (0 generated)
msw
Hey Scott, please take a look; thanks! Is formalizing read-only textfield colors good, or should ...
8 years ago (2012-12-04 18:40:07 UTC) #1
sky
https://chromiumcodereview.appspot.com/11421204/diff/7018/ui/native_theme/native_theme.h File ui/native_theme/native_theme.h (right): https://chromiumcodereview.appspot.com/11421204/diff/7018/ui/native_theme/native_theme.h#newcode40 ui/native_theme/native_theme.h:40: class NATIVE_THEME_EXPORT NativeTheme : public gfx::SysColorChangeListener { Since only ...
8 years ago (2012-12-04 22:38:14 UTC) #2
varunjain
https://chromiumcodereview.appspot.com/11421204/diff/7018/chrome/browser/ui/views/location_bar/location_bar_view.cc File chrome/browser/ui/views/location_bar/location_bar_view.cc (left): https://chromiumcodereview.appspot.com/11421204/diff/7018/chrome/browser/ui/views/location_bar/location_bar_view.cc#oldcode121 chrome/browser/ui/views/location_bar/location_bar_view.cc:121: #if defined(OS_CHROMEOS) On 2012/12/04 18:40:07, msw wrote: > Varun: ...
8 years ago (2012-12-04 23:05:30 UTC) #3
msw
Unfortunately, a transparent textfield background breaks ChromeOS Omnibox dropdown results (and likely more). Patch Set ...
8 years ago (2012-12-05 02:09:56 UTC) #4
msw
+cc samarth@ for conflicting http://crrev.com/171160 I've replaced that new (hacky) use of textfield cursor color ...
8 years ago (2012-12-05 22:23:25 UTC) #5
samarth
+mathp The code looks OK. Let patch in your change to test that it still ...
8 years ago (2012-12-05 23:38:21 UTC) #6
msw
Done, LMK if you have any problems testing the patch. https://codereview.chromium.org/11421204/diff/31001/chrome/browser/ui/views/omnibox/omnibox_view_views.cc File chrome/browser/ui/views/omnibox/omnibox_view_views.cc (left): https://codereview.chromium.org/11421204/diff/31001/chrome/browser/ui/views/omnibox/omnibox_view_views.cc#oldcode598 ...
8 years ago (2012-12-06 00:03:51 UTC) #7
samarth
Tested the latest patchset and it works. LGTM. Thanks! Samarth
8 years ago (2012-12-06 18:19:29 UTC) #8
varunjain
LGTM. As mentioned in the comment, I think the proper fix is to change the ...
8 years ago (2012-12-06 18:36:58 UTC) #9
msw
Scott, please take another look as you have time; thanks! https://codereview.chromium.org/11421204/diff/20006/chrome/browser/ui/views/location_bar/location_bar_view.cc File chrome/browser/ui/views/location_bar/location_bar_view.cc (right): https://codereview.chromium.org/11421204/diff/20006/chrome/browser/ui/views/location_bar/location_bar_view.cc#newcode333 ...
8 years ago (2012-12-06 18:54:46 UTC) #10
sky
https://codereview.chromium.org/11421204/diff/20006/chrome/browser/ui/views/location_bar/location_bar_view.cc File chrome/browser/ui/views/location_bar/location_bar_view.cc (right): https://codereview.chromium.org/11421204/diff/20006/chrome/browser/ui/views/location_bar/location_bar_view.cc#newcode333 chrome/browser/ui/views/location_bar/location_bar_view.cc:333: // Chrome OS requires a transparent omnibox background color. ...
8 years ago (2012-12-06 20:43:56 UTC) #11
msw
Responses inline, no code changes (yet); please take a look. https://codereview.chromium.org/11421204/diff/20006/chrome/browser/ui/views/location_bar/location_bar_view.cc File chrome/browser/ui/views/location_bar/location_bar_view.cc (right): https://codereview.chromium.org/11421204/diff/20006/chrome/browser/ui/views/location_bar/location_bar_view.cc#newcode333 ...
8 years ago (2012-12-07 02:04:01 UTC) #12
sky
https://codereview.chromium.org/11421204/diff/20006/chrome/browser/ui/views/location_bar/location_bar_view.cc File chrome/browser/ui/views/location_bar/location_bar_view.cc (right): https://codereview.chromium.org/11421204/diff/20006/chrome/browser/ui/views/location_bar/location_bar_view.cc#newcode333 chrome/browser/ui/views/location_bar/location_bar_view.cc:333: // Chrome OS requires a transparent omnibox background color. ...
8 years ago (2012-12-07 16:35:12 UTC) #13
msw
https://codereview.chromium.org/11421204/diff/20006/chrome/browser/ui/views/location_bar/location_bar_view.cc File chrome/browser/ui/views/location_bar/location_bar_view.cc (right): https://codereview.chromium.org/11421204/diff/20006/chrome/browser/ui/views/location_bar/location_bar_view.cc#newcode333 chrome/browser/ui/views/location_bar/location_bar_view.cc:333: // Chrome OS requires a transparent omnibox background color. ...
8 years ago (2012-12-07 18:22:28 UTC) #14
sky
LGTM https://codereview.chromium.org/11421204/diff/20006/chrome/browser/ui/views/location_bar/location_bar_view.cc File chrome/browser/ui/views/location_bar/location_bar_view.cc (right): https://codereview.chromium.org/11421204/diff/20006/chrome/browser/ui/views/location_bar/location_bar_view.cc#newcode333 chrome/browser/ui/views/location_bar/location_bar_view.cc:333: // Chrome OS requires a transparent omnibox background ...
8 years ago (2012-12-07 18:58:02 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/msw@chromium.org/11421204/20006
8 years ago (2012-12-07 19:04:54 UTC) #16
commit-bot: I haz the power
Presubmit check for 11421204-20006 failed and returned exit status 1. Running presubmit commit checks ...
8 years ago (2012-12-07 19:05:06 UTC) #17
msw - DO NOT USE
Hey Marja (or anyone on the review), can you help with the presubmit warning: Your ...
8 years ago (2012-12-07 19:10:37 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/msw@chromium.org/11421204/20006
8 years ago (2012-12-07 19:41:59 UTC) #19
commit-bot: I haz the power
Presubmit check for 11421204-20006 failed and returned exit status 1. Running presubmit commit checks ...
8 years ago (2012-12-07 19:42:12 UTC) #20
marja
Hmm, the #include check doesn't cover this special case, and I guess there's no way ...
8 years ago (2012-12-10 09:32:17 UTC) #21
marja
The #include check is now fixed so that it uses only a "notify" level when ...
8 years ago (2012-12-10 17:58:04 UTC) #22
msw
On 2012/12/10 17:58:04, marja wrote: > The #include check is now fixed so that it ...
8 years ago (2012-12-10 18:58:46 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/msw@chromium.org/11421204/43002
8 years ago (2012-12-10 18:59:48 UTC) #24
commit-bot: I haz the power
8 years ago (2012-12-10 22:04:19 UTC) #25
Message was sent while issue was closed.
Change committed as 172142

Powered by Google App Engine
This is Rietveld 408576698