diff options
author | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-22 22:25:59 +0000 |
---|---|---|
committer | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-22 22:25:59 +0000 |
commit | 70025d66df25c628c0e0bfc3c4d084f3f7195e59 (patch) | |
tree | 7364f487a2c4c77598e12c62b919144bbd1a482a | |
parent | e2e71e592a085de0d45b5ca41eecaa509068bcba (diff) | |
download | chromium_src-70025d66df25c628c0e0bfc3c4d084f3f7195e59.zip chromium_src-70025d66df25c628c0e0bfc3c4d084f3f7195e59.tar.gz chromium_src-70025d66df25c628c0e0bfc3c4d084f3f7195e59.tar.bz2 |
Use ETS_FOCUSED instead of TS_CHECKED to signify that a button
is focused. They both happen to have the same value, but this
is much clearer.
Review URL: http://codereview.chromium.org/7888
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3781 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | base/gfx/native_theme.cc | 2 | ||||
-rw-r--r-- | webkit/port/rendering/RenderThemeWin.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/base/gfx/native_theme.cc b/base/gfx/native_theme.cc index 65f1914..7fdc459e 100644 --- a/base/gfx/native_theme.cc +++ b/base/gfx/native_theme.cc @@ -82,7 +82,7 @@ HRESULT NativeTheme::PaintButton(HDC hdc, // Draw it manually. // All pressed states have both low bits set, and no other states do. - const bool focused = ((state_id & TS_CHECKED) == TS_CHECKED); + const bool focused = ((state_id & ETS_FOCUSED) == ETS_FOCUSED); const bool pressed = ((state_id & PBS_PRESSED) == PBS_PRESSED); if ((BP_PUSHBUTTON == part_id) && (pressed || focused)) { // BP_PUSHBUTTON has a focus rect drawn around the outer edge, and the diff --git a/webkit/port/rendering/RenderThemeWin.cpp b/webkit/port/rendering/RenderThemeWin.cpp index 375dde6..4319479 100644 --- a/webkit/port/rendering/RenderThemeWin.cpp +++ b/webkit/port/rendering/RenderThemeWin.cpp @@ -421,7 +421,7 @@ unsigned RenderThemeWin::determineState(RenderObject* o) else if (isPressed(o)) // Active overrides hover and focused. result = TS_PRESSED; else if (supportsFocus(o->style()->appearance()) && isFocused(o)) - result = TS_CHECKED; + result = ETS_FOCUSED; else if (isHovered(o)) result = TS_HOT; if (isChecked(o)) |