diff options
author | Leon Scroggins <scroggo@google.com> | 2009-10-01 15:20:13 -0400 |
---|---|---|
committer | Leon Scroggins <scroggo@google.com> | 2009-10-01 15:20:13 -0400 |
commit | 2097884b9e1630c3855a8580f84a308163e085e7 (patch) | |
tree | f84a9c0fa1d9674ce9c55d4dc0e243ae7708b1bf /WebKit | |
parent | 8b101d480f638c14f332d4be73a74925bfed1d82 (diff) | |
download | external_webkit-2097884b9e1630c3855a8580f84a308163e085e7.zip external_webkit-2097884b9e1630c3855a8580f84a308163e085e7.tar.gz external_webkit-2097884b9e1630c3855a8580f84a308163e085e7.tar.bz2 |
Revert "Don't extend the arrow asset of the combo box over the text, so that the real background"
This reverts commit 02b5ebb30fc88967b843818cbc61987f9dc9685d.
Diffstat (limited to 'WebKit')
-rw-r--r-- | WebKit/android/RenderSkinCombo.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/WebKit/android/RenderSkinCombo.cpp b/WebKit/android/RenderSkinCombo.cpp index fd6f1f2..870c13e 100644 --- a/WebKit/android/RenderSkinCombo.cpp +++ b/WebKit/android/RenderSkinCombo.cpp @@ -36,9 +36,9 @@ namespace WebCore { static SkBitmap s_bitmap[2]; // Collection of assets for a combo box static bool s_decoded; // True if all assets were decoded -static const int s_margin = 0; +static const int s_margin = 2; static const SkIRect s_mar = { s_margin, s_margin, - RenderSkinCombo::extraWidth() - 2, s_margin }; + RenderSkinCombo::extraWidth(), s_margin }; RenderSkinCombo::RenderSkinCombo() { @@ -61,8 +61,11 @@ bool RenderSkinCombo::Draw(SkCanvas* canvas, Node* element, int x, int y, int wi return true; State state = (element->isElementNode() && static_cast<Element*>(element)->isEnabledFormControl()) ? kNormal : kDisabled; + if (height < (s_margin<<1) + 1) { + height = (s_margin<<1) + 1; + } SkRect bounds; - bounds.set(SkIntToScalar(x + width), SkIntToScalar(y), SkIntToScalar(x + width), SkIntToScalar(y + height)); + bounds.set(SkIntToScalar(x), SkIntToScalar(y), SkIntToScalar(x + width), SkIntToScalar(y + height)); SkNinePatch::DrawNine(canvas, bounds, s_bitmap[state], s_mar); return false; } |