diff options
author | tkent@chromium.org <tkent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-16 04:46:36 +0000 |
---|---|---|
committer | tkent@chromium.org <tkent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-16 04:46:36 +0000 |
commit | e94ece093bbc9cb8e3020c9b623a29c9e66b0ea9 (patch) | |
tree | 4c179b657b9c01eed97777cb7c27ec7901b2e65f /gfx | |
parent | 8cf33ba363a6bc4977808f641d34b6a4a6754fb0 (diff) | |
download | chromium_src-e94ece093bbc9cb8e3020c9b623a29c9e66b0ea9.zip chromium_src-e94ece093bbc9cb8e3020c9b623a29c9e66b0ea9.tar.gz chromium_src-e94ece093bbc9cb8e3020c9b623a29c9e66b0ea9.tar.bz2 |
Implement spin buttons for <input type=number>
BUG=42179
TEST=None; will covered by layout tests.
Review URL: http://codereview.chromium.org/2813050
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52611 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gfx')
-rw-r--r-- | gfx/native_theme_win.cc | 15 | ||||
-rw-r--r-- | gfx/native_theme_win.h | 7 |
2 files changed, 22 insertions, 0 deletions
diff --git a/gfx/native_theme_win.cc b/gfx/native_theme_win.cc index cd64cb8..6b4a545 100644 --- a/gfx/native_theme_win.cc +++ b/gfx/native_theme_win.cc @@ -368,6 +368,18 @@ HRESULT NativeTheme::PaintScrollbarThumb(HDC hdc, return S_OK; } +HRESULT NativeTheme::PaintSpinButton(HDC hdc, + int part_id, + int state_id, + int classic_state, + RECT* rect) const { + HANDLE handle = GetThemeHandle(SPIN); + if (handle && draw_theme_) + return draw_theme_(handle, hdc, part_id, state_id, rect, NULL); + DrawFrameControl(hdc, rect, DFC_SCROLL, classic_state); + return S_OK; +} + HRESULT NativeTheme::PaintStatusGripper(HDC hdc, int part_id, int state_id, @@ -847,6 +859,9 @@ HANDLE NativeTheme::GetThemeHandle(ThemeName theme_name) const case PROGRESS: handle = open_theme_(NULL, L"Progress"); break; + case SPIN: + handle = open_theme_(NULL, L"Spin"); + break; default: NOTREACHED(); } diff --git a/gfx/native_theme_win.h b/gfx/native_theme_win.h index 687bb65..81d61c5 100644 --- a/gfx/native_theme_win.h +++ b/gfx/native_theme_win.h @@ -44,6 +44,7 @@ class NativeTheme { TRACKBAR, WINDOW, PROGRESS, + SPIN, LAST }; @@ -190,6 +191,12 @@ class NativeTheme { int classic_state, RECT* rect) const; + HRESULT PaintSpinButton(HDC hdc, + int part_id, + int state_id, + int classic_state, + RECT* rect) const; + HRESULT PaintStatusGripper(HDC hdc, int part_id, int state_id, |