summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShimeng (Simon) Wang <swang@google.com>2010-07-14 15:55:07 -0700
committerShimeng (Simon) Wang <swang@google.com>2010-07-14 15:55:07 -0700
commit92294a3b75e1c95eca24f138802e4afed6972517 (patch)
tree5683ad04d7e1fb5bfa0eda4a5133e1b5f21a17f6
parent552ce5e26f64b38c38262092c22f333a546be0ff (diff)
downloadexternal_webkit-92294a3b75e1c95eca24f138802e4afed6972517.zip
external_webkit-92294a3b75e1c95eca24f138802e4afed6972517.tar.gz
external_webkit-92294a3b75e1c95eca24f138802e4afed6972517.tar.bz2
Set smaller minHeight for button.
The logic is similar to safari. In ChromimumSkia, seems there's no setting for the minHeight. Other settings in safari are not copied, since after trying, it's not working well. Issue: 2732674 Change-Id: I5235f092f44d9e70e3aede7b7c50f425473db163
-rw-r--r--WebCore/platform/android/RenderThemeAndroid.cpp11
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)