Index: ui/native_theme/native_theme_win.cc |
diff --git a/ui/native_theme/native_theme_win.cc b/ui/native_theme/native_theme_win.cc |
index bf21dcbd17808e7fb23f1280e119a3139e8c86e4..74b4f14a26163b5e27c5c8b1828c7f4500a674d6 100644 |
--- a/ui/native_theme/native_theme_win.cc |
+++ b/ui/native_theme/native_theme_win.cc |
@@ -233,6 +233,7 @@ |
// The GetThemePartSize call below returns the default size without |
// accounting for user customization (crbug/218291). |
+ SIZE size; |
switch (part) { |
case kScrollbarDownArrow: |
case kScrollbarLeftArrow: |
@@ -241,18 +242,14 @@ |
case kScrollbarHorizontalThumb: |
case kScrollbarVerticalThumb: |
case kScrollbarHorizontalTrack: |
- case kScrollbarVerticalTrack: { |
- int size = gfx::win::GetSystemMetricsInDIP(SM_CXVSCROLL); |
- if (size == 0) |
- size = 17; |
- return gfx::Size(size, size); |
- } |
+ case kScrollbarVerticalTrack: |
+ size.cx = size.cy = gfx::win::GetSystemMetricsInDIP(SM_CXVSCROLL); |
+ return gfx::Size(size.cx, size.cy); |
} |
int part_id = GetWindowsPart(part, state, extra); |
int state_id = GetWindowsState(part, state, extra); |
- SIZE size; |
HDC hdc = GetDC(NULL); |
HRESULT hr = GetThemePartSize(GetThemeName(part), hdc, part_id, state_id, |
NULL, TS_TRUE, &size); |