summaryrefslogtreecommitdiffstats
path: root/WebKit
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
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')
-rw-r--r--WebKit/android/RenderSkinMediaButton.cpp9
-rw-r--r--WebKit/android/RenderSkinMediaButton.h2
-rw-r--r--WebKit/android/WebCoreSupport/MediaPlayerPrivateAndroid.cpp2
3 files changed, 10 insertions, 3 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) {
diff --git a/WebKit/android/RenderSkinMediaButton.h b/WebKit/android/RenderSkinMediaButton.h
index 27a4e41..124db32 100644
--- a/WebKit/android/RenderSkinMediaButton.h
+++ b/WebKit/android/RenderSkinMediaButton.h
@@ -44,7 +44,7 @@ public:
* Draw the skin to the canvas, using the rectangle for its bounds and the
* State to determine which skin to use, i.e. focused or not focused.
*/
- static void Draw(SkCanvas* , const IntRect& , int buttonType);
+ static void Draw(SkCanvas* , const IntRect& , int buttonType, bool translucent = false);
/**
* Button types
*/
diff --git a/WebKit/android/WebCoreSupport/MediaPlayerPrivateAndroid.cpp b/WebKit/android/WebCoreSupport/MediaPlayerPrivateAndroid.cpp
index 2203ae2..ed9f655 100644
--- a/WebKit/android/WebCoreSupport/MediaPlayerPrivateAndroid.cpp
+++ b/WebKit/android/WebCoreSupport/MediaPlayerPrivateAndroid.cpp
@@ -396,6 +396,8 @@ public:
}
bool hasAudio() { return true; }
+ bool hasVideo() { return false; }
+ bool suppportsFullscreen() { return false; }
float maxTimeSeekable() const
{