summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/android
diff options
context:
space:
mode:
authorGeorge Mount <mount@google.com>2012-04-25 07:16:49 -0700
committerGeorge Mount <mount@google.com>2012-04-25 10:55:16 -0700
commitab116239e825f4571a4665cee1f3cf92fd8d304c (patch)
treec3fd9fafa37cb607c7114111417f96e81d23f5b3 /Source/WebCore/platform/android
parent2ad54828a335c8e7337ab1f1077253689630a6d2 (diff)
downloadexternal_webkit-ab116239e825f4571a4665cee1f3cf92fd8d304c.zip
external_webkit-ab116239e825f4571a4665cee1f3cf92fd8d304c.tar.gz
external_webkit-ab116239e825f4571a4665cee1f3cf92fd8d304c.tar.bz2
Make input="range" visible and react to touch events.
Bug 6257532 Change-Id: I1d1ae457c50fe5b9627df7edb4f11d8245b5bdbf
Diffstat (limited to 'Source/WebCore/platform/android')
-rw-r--r--Source/WebCore/platform/android/RenderThemeAndroid.cpp30
-rw-r--r--Source/WebCore/platform/android/RenderThemeAndroid.h3
2 files changed, 29 insertions, 4 deletions
diff --git a/Source/WebCore/platform/android/RenderThemeAndroid.cpp b/Source/WebCore/platform/android/RenderThemeAndroid.cpp
index 173cfea..f8e1950 100644
--- a/Source/WebCore/platform/android/RenderThemeAndroid.cpp
+++ b/Source/WebCore/platform/android/RenderThemeAndroid.cpp
@@ -439,10 +439,8 @@ void RenderThemeAndroid::adjustSliderThumbSize(RenderObject* o) const
{
static const int sliderThumbWidth = RenderSkinMediaButton::sliderThumbWidth();
static const int sliderThumbHeight = RenderSkinMediaButton::sliderThumbHeight();
- if (o->style()->appearance() == MediaSliderThumbPart) {
- o->style()->setWidth(Length(sliderThumbWidth, Fixed));
- o->style()->setHeight(Length(sliderThumbHeight, Fixed));
- }
+ o->style()->setWidth(Length(sliderThumbHeight, Fixed));
+ o->style()->setHeight(Length(sliderThumbWidth, Fixed));
}
#endif
@@ -647,6 +645,30 @@ bool RenderThemeAndroid::paintMenuListButton(RenderObject* obj, const PaintInfo&
return paintCombo(obj, info, rect);
}
+bool RenderThemeAndroid::paintSliderTrack(RenderObject* o, const PaintInfo& i, const IntRect& r)
+{
+ SkCanvas* canvas = getCanvasFromInfo(i);
+ if (!canvas)
+ return true;
+ static const bool translucent = true;
+ RenderSkinMediaButton::Draw(canvas, r,
+ RenderSkinMediaButton::SLIDER_TRACK,
+ translucent, o, false);
+ return false;
+}
+
+bool RenderThemeAndroid::paintSliderThumb(RenderObject* o, const PaintInfo& i, const IntRect& r)
+{
+ SkCanvas* canvas = getCanvasFromInfo(i);
+ if (!canvas)
+ return true;
+ static const bool translucent = true;
+ RenderSkinMediaButton::Draw(canvas, r,
+ RenderSkinMediaButton::SLIDER_THUMB,
+ translucent, 0, false);
+ return false;
+}
+
Color RenderThemeAndroid::platformFocusRingColor() const
{
static Color focusRingColor(0x33, 0xB5, 0xE5, 0x66);
diff --git a/Source/WebCore/platform/android/RenderThemeAndroid.h b/Source/WebCore/platform/android/RenderThemeAndroid.h
index ed4d07f..06d272b 100644
--- a/Source/WebCore/platform/android/RenderThemeAndroid.h
+++ b/Source/WebCore/platform/android/RenderThemeAndroid.h
@@ -118,6 +118,9 @@ protected:
virtual void adjustSearchFieldStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
virtual bool paintSearchField(RenderObject*, const PaintInfo&, const IntRect&);
+ virtual bool paintSliderTrack(RenderObject*, const PaintInfo&, const IntRect&);
+ virtual bool paintSliderThumb(RenderObject*, const PaintInfo&, const IntRect&);
+
private:
RenderThemeAndroid();
void addIntrinsicMargins(RenderStyle*) const;