diff options
author | Shimeng (Simon) Wang <swang@google.com> | 2010-07-14 17:28:39 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-07-14 17:28:39 -0700 |
commit | fd88d7ed6810e08b8d8c4512effc4da5e9c08265 (patch) | |
tree | 38022cd17c982619e4f710d14ec8712d04d6b587 | |
parent | cc96d626ee5ad60735162069e2529070548845d3 (diff) | |
parent | 92294a3b75e1c95eca24f138802e4afed6972517 (diff) | |
download | external_webkit-fd88d7ed6810e08b8d8c4512effc4da5e9c08265.zip external_webkit-fd88d7ed6810e08b8d8c4512effc4da5e9c08265.tar.gz external_webkit-fd88d7ed6810e08b8d8c4512effc4da5e9c08265.tar.bz2 |
Merge "Set smaller minHeight for button."
-rw-r--r-- | WebCore/platform/android/RenderThemeAndroid.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/WebCore/platform/android/RenderThemeAndroid.cpp b/WebCore/platform/android/RenderThemeAndroid.cpp index 8442465..87e7a6d 100644 --- a/WebCore/platform/android/RenderThemeAndroid.cpp +++ b/WebCore/platform/android/RenderThemeAndroid.cpp @@ -47,11 +47,6 @@ namespace WebCore { -// Add a constant amount of padding to the textsize to get the final height -// of buttons, so that our button images are large enough to properly fit -// the text. -const int buttonPadding = 18; - // Add padding to the fontSize of ListBoxes to get their maximum sizes. // Listboxes often have a specified size. Since we change them into // dropdowns, we want a much smaller height, which encompasses the text. @@ -201,12 +196,14 @@ bool RenderThemeAndroid::supportsFocus(ControlPart appearance) void RenderThemeAndroid::adjustButtonStyle(CSSStyleSelector*, RenderStyle* style, WebCore::Element*) const { - // Padding code is taken from RenderThemeSafari.cpp + // Code is taken from RenderThemeSafari.cpp // It makes sure we have enough space for the button text. const int padding = 8; style->setPaddingLeft(Length(padding, Fixed)); style->setPaddingRight(Length(padding, Fixed)); - style->setMinHeight(Length(style->fontSize() + buttonPadding, Fixed)); + + // Set a min-height so that we can't get smaller than the mini button. + style->setMinHeight(Length(15, Fixed)); } bool RenderThemeAndroid::paintCheckbox(RenderObject* obj, const PaintInfo& info, const IntRect& rect) |