diff options
author | Nicolas Roard <nicolasroard@google.com> | 2011-03-11 16:00:46 -0800 |
---|---|---|
committer | Nicolas Roard <nicolasroard@google.com> | 2011-03-11 16:00:46 -0800 |
commit | c7eaa372f2a1bece832b0efe7ffed793c8c742c4 (patch) | |
tree | 6ba6436432b2391d650cad1165d696dffc7fe1a3 /WebKit/android/RenderSkinMediaButton.cpp | |
parent | cc2679391d89b57997f78365d54d99c9ae062db3 (diff) | |
download | external_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.cpp | 9 |
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) { |