summaryrefslogtreecommitdiffstats
path: root/WebKit/android/RenderSkinCombo.cpp
diff options
context:
space:
mode:
authorLeon Clarke <leonclarke@google.com>2010-06-28 05:36:49 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-06-28 05:36:49 -0700
commit5a22f5d5a894759137cbc73b987cc21fe3dbcb2e (patch)
treecc7181502e9c2dc249ae1a2e03bffcc7832e1cb9 /WebKit/android/RenderSkinCombo.cpp
parenta3054d2b31d3e00563e3865d398ef93d25b8b2e0 (diff)
parent98794f2c8bc5c69ead813669d61843a3d01c713a (diff)
downloadexternal_webkit-5a22f5d5a894759137cbc73b987cc21fe3dbcb2e.zip
external_webkit-5a22f5d5a894759137cbc73b987cc21fe3dbcb2e.tar.gz
external_webkit-5a22f5d5a894759137cbc73b987cc21fe3dbcb2e.tar.bz2
Merge "Don't use the validity of the border color to determine whether the border will be drawn, but instead use the appearance, which is effectively what webkit uses to decide whether to draw its border http://b/issue?id=2661748"
Diffstat (limited to 'WebKit/android/RenderSkinCombo.cpp')
-rw-r--r--WebKit/android/RenderSkinCombo.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/WebKit/android/RenderSkinCombo.cpp b/WebKit/android/RenderSkinCombo.cpp
index 00f2d3b..b30dc29 100644
--- a/WebKit/android/RenderSkinCombo.cpp
+++ b/WebKit/android/RenderSkinCombo.cpp
@@ -125,10 +125,14 @@ bool RenderSkinCombo::Draw(SkCanvas* canvas, Node* element, int x, int y, int wi
bounds.set(SkIntToScalar(x), SkIntToScalar(y), SkIntToScalar(x + width), SkIntToScalar(y + height));
- if (style->visitedDependentColor(CSSPropertyBorderLeftColor).isValid() ||
- style->visitedDependentColor(CSSPropertyBorderRightColor).isValid() ||
- style->visitedDependentColor(CSSPropertyBorderTopColor).isValid() ||
- style->visitedDependentColor(CSSPropertyBorderBottomColor).isValid()) {
+ // If this is an appearance where RenderTheme::paint returns true
+ // without doing anything, this means that
+ // RenderBox::PaintBoxDecorationWithSize will end up painting the
+ // border, so we shouldn't paint a border here.
+ if (style->appearance() == MenulistButtonPart ||
+ style->appearance() == ListboxPart ||
+ style->appearance() == TextFieldPart ||
+ style->appearance() == TextAreaPart) {
bounds.fLeft += SkIntToScalar(width - RenderSkinCombo::extraWidth());
bounds.fRight -= SkIntToScalar(style->borderRightWidth());
bounds.fTop += SkIntToScalar(style->borderTopWidth());