summaryrefslogtreecommitdiffstats
path: root/WebKit/android/RenderSkinMediaButton.cpp
diff options
context:
space:
mode:
authorNicolas Roard <nicolasroard@google.com>2011-03-11 16:00:46 -0800
committerNicolas Roard <nicolasroard@google.com>2011-03-11 16:00:46 -0800
commitc7eaa372f2a1bece832b0efe7ffed793c8c742c4 (patch)
tree6ba6436432b2391d650cad1165d696dffc7fe1a3 /WebKit/android/RenderSkinMediaButton.cpp
parentcc2679391d89b57997f78365d54d99c9ae062db3 (diff)
downloadexternal_webkit-c7eaa372f2a1bece832b0efe7ffed793c8c742c4.zip
external_webkit-c7eaa372f2a1bece832b0efe7ffed793c8c742c4.tar.gz
external_webkit-c7eaa372f2a1bece832b0efe7ffed793c8c742c4.tar.bz2
Improve HTML5 audio/video controls
Only allow translucent controls for video... bug:2126902 Change-Id: I95fbf1fc736391a3adec3930119531684a1a9082
Diffstat (limited to 'WebKit/android/RenderSkinMediaButton.cpp')
-rw-r--r--WebKit/android/RenderSkinMediaButton.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/WebKit/android/RenderSkinMediaButton.cpp b/WebKit/android/RenderSkinMediaButton.cpp
index 34f2a1a..f9da7cf 100644
--- a/WebKit/android/RenderSkinMediaButton.cpp
+++ b/WebKit/android/RenderSkinMediaButton.cpp
@@ -81,7 +81,7 @@ void RenderSkinMediaButton::Init(android::AssetManager* am, String drawableDirec
}
}
-void RenderSkinMediaButton::Draw(SkCanvas* canvas, const IntRect& r, int buttonType)
+void RenderSkinMediaButton::Draw(SkCanvas* canvas, const IntRect& r, int buttonType, bool translucent)
{
// If we failed to decode, do nothing. This way the browser still works,
// and webkit will still draw the label and layout space for us.
@@ -99,7 +99,12 @@ void RenderSkinMediaButton::Draw(SkCanvas* canvas, const IntRect& r, int buttonT
SkRect bounds(r);
SkScalar imageMargin = 8;
SkPaint paint;
- SkColor backgroundColor = SkColorSetARGB(190, 34, 34, 34);
+
+ int alpha = 255;
+ if (translucent)
+ alpha = 190;
+
+ SkColor backgroundColor = SkColorSetARGB(alpha, 34, 34, 34);
paint.setColor(backgroundColor);
switch (buttonType) {