summaryrefslogtreecommitdiffstats
path: root/WebKit/android
diff options
context:
space:
mode:
authorLeon Clarke <leonclarke@google.com>2009-10-01 10:30:38 +0100
committerLeon Clarke <leonclarke@google.com>2009-10-01 10:30:38 +0100
commit02b5ebb30fc88967b843818cbc61987f9dc9685d (patch)
tree30f9046fbc85cb07768fe22db5cb03fbb42f3b56 /WebKit/android
parent14e3d9bdf2270d399bae78946e3efe62a6c6c373 (diff)
downloadexternal_webkit-02b5ebb30fc88967b843818cbc61987f9dc9685d.zip
external_webkit-02b5ebb30fc88967b843818cbc61987f9dc9685d.tar.gz
external_webkit-02b5ebb30fc88967b843818cbc61987f9dc9685d.tar.bz2
Don't extend the arrow asset of the combo box over the text, so that the real background
color is used. Re-instate using the correct color for the text.
Diffstat (limited to 'WebKit/android')
-rw-r--r--WebKit/android/RenderSkinCombo.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/WebKit/android/RenderSkinCombo.cpp b/WebKit/android/RenderSkinCombo.cpp
index 870c13e..fd6f1f2 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 = 2;
+static const int s_margin = 0;
static const SkIRect s_mar = { s_margin, s_margin,
- RenderSkinCombo::extraWidth(), s_margin };
+ RenderSkinCombo::extraWidth() - 2, s_margin };
RenderSkinCombo::RenderSkinCombo()
{
@@ -61,11 +61,8 @@ 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), SkIntToScalar(y), SkIntToScalar(x + width), SkIntToScalar(y + height));
+ bounds.set(SkIntToScalar(x + width), SkIntToScalar(y), SkIntToScalar(x + width), SkIntToScalar(y + height));
SkNinePatch::DrawNine(canvas, bounds, s_bitmap[state], s_mar);
return false;
}