Index: content/child/webthemeengine_impl_android.cc |
diff --git a/content/child/webthemeengine_impl_android.cc b/content/child/webthemeengine_impl_android.cc |
index fa693b3cf9cb828de50d999ba530dc43c3a85629..d659241610153438bf17cbc3dbe73d0a3699d3de 100644 |
--- a/content/child/webthemeengine_impl_android.cc |
+++ b/content/child/webthemeengine_impl_android.cc |
@@ -39,13 +39,15 @@ static ui::NativeTheme::Part NativeThemePart(WebThemeEngine::Part part) { |
case WebThemeEngine::PartScrollbarUpArrow: |
return ui::NativeTheme::kScrollbarUpArrow; |
case WebThemeEngine::PartScrollbarHorizontalThumb: |
+ return ui::NativeTheme::kScrollbarHorizontalThumb; |
case WebThemeEngine::PartScrollbarVerticalThumb: |
+ return ui::NativeTheme::kScrollbarVerticalThumb; |
case WebThemeEngine::PartScrollbarHorizontalTrack: |
+ return ui::NativeTheme::kScrollbarHorizontalTrack; |
case WebThemeEngine::PartScrollbarVerticalTrack: |
+ return ui::NativeTheme::kScrollbarVerticalTrack; |
case WebThemeEngine::PartScrollbarCorner: |
- // Android doesn't draw scrollbars. |
- NOTREACHED(); |
- return static_cast<ui::NativeTheme::Part>(0); |
+ return ui::NativeTheme::kScrollbarCorner; |
case WebThemeEngine::PartCheckbox: |
return ui::NativeTheme::kCheckbox; |
case WebThemeEngine::PartRadio: |
@@ -167,9 +169,21 @@ static void GetNativeThemeExtraParams( |
} |
blink::WebSize WebThemeEngineImpl::getSize(WebThemeEngine::Part part) { |
- ui::NativeTheme::ExtraParams extra; |
- return ui::NativeTheme::GetInstanceForWeb()->GetPartSize( |
- NativeThemePart(part), ui::NativeTheme::kNormal, extra); |
+ switch (part) { |
+ case ui::NativeTheme::kScrollbarHorizontalThumb: |
+ case ui::NativeTheme::kScrollbarVerticalThumb: { |
+ // Minimum length for scrollbar thumb is the scrollbar thickness. |
+ ScrollbarStyle style; |
+ getOverlayScrollbarStyle(&style); |
+ int scrollbarThickness = style.thumbThickness + style.scrollbarMargin; |
+ return gfx::Size(scrollbarThickness, scrollbarThickness); |
+ } |
+ default: { |
+ ui::NativeTheme::ExtraParams extra; |
+ return ui::NativeTheme::GetInstanceForWeb()->GetPartSize( |
+ NativeThemePart(part), ui::NativeTheme::kNormal, extra); |
+ } |
+ } |
} |
void WebThemeEngineImpl::getOverlayScrollbarStyle(ScrollbarStyle* style) { |