diff options
Diffstat (limited to 'WebCore/platform')
-rw-r--r-- | WebCore/platform/android/RenderThemeAndroid.cpp | 10 | ||||
-rw-r--r-- | WebCore/platform/graphics/MediaPlayer.cpp | 6 | ||||
-rw-r--r-- | WebCore/platform/graphics/MediaPlayer.h | 1 | ||||
-rw-r--r-- | WebCore/platform/graphics/MediaPlayerPrivate.h | 1 | ||||
-rw-r--r-- | WebCore/platform/graphics/android/MediaPlayerPrivateAndroid.h | 17 |
5 files changed, 26 insertions, 9 deletions
diff --git a/WebCore/platform/android/RenderThemeAndroid.cpp b/WebCore/platform/android/RenderThemeAndroid.cpp index 0f419f5..51f404e 100644 --- a/WebCore/platform/android/RenderThemeAndroid.cpp +++ b/WebCore/platform/android/RenderThemeAndroid.cpp @@ -235,7 +235,7 @@ bool RenderThemeAndroid::paintTextArea(RenderObject* obj, const RenderObject::Pa { if (obj->isMenuList()) return paintCombo(obj, info, rect); - return true; + return true; } void RenderThemeAndroid::adjustSearchFieldStyle(CSSStyleSelector*, RenderStyle* style, Element*) const @@ -245,7 +245,7 @@ void RenderThemeAndroid::adjustSearchFieldStyle(CSSStyleSelector*, RenderStyle* bool RenderThemeAndroid::paintSearchField(RenderObject*, const RenderObject::PaintInfo&, const IntRect&) { - return true; + return true; } void RenderThemeAndroid::adjustListboxStyle(CSSStyleSelector*, RenderStyle* style, Element*) const @@ -259,12 +259,6 @@ static void adjustMenuListStyleCommon(RenderStyle* style, Element* e) { // Added to make room for our arrow. style->setPaddingRight(Length(RenderSkinCombo::extraWidth(), Fixed)); - // Code copied from RenderThemeMac.mm - // Makes sure that the text shows up on our treatment - bool isEnabled = true; - if (e) - isEnabled = e->isEnabledFormControl(); - style->setColor(isEnabled ? Color::black : Color::darkGray); } void RenderThemeAndroid::adjustMenuListStyle(CSSStyleSelector*, RenderStyle* style, Element* e) const diff --git a/WebCore/platform/graphics/MediaPlayer.cpp b/WebCore/platform/graphics/MediaPlayer.cpp index 15815dc..531c598 100644 --- a/WebCore/platform/graphics/MediaPlayer.cpp +++ b/WebCore/platform/graphics/MediaPlayer.cpp @@ -107,6 +107,7 @@ public: #if PLATFORM(ANDROID) virtual bool canLoadPoster() const { return false; } virtual void setPoster(const String&) { } + virtual void prepareToPlay() { } #endif #if ENABLE(PLUGIN_PROXY_FOR_VIDEO) @@ -263,6 +264,11 @@ bool MediaPlayer::canLoadPoster() const { return m_private->canLoadPoster(); } + +void MediaPlayer::prepareToPlay() +{ + m_private->prepareToPlay(); +} #endif #if ENABLE(PLUGIN_PROXY_FOR_VIDEO) || PLATFORM(ANDROID) diff --git a/WebCore/platform/graphics/MediaPlayer.h b/WebCore/platform/graphics/MediaPlayer.h index 1cb7625..8eade50 100644 --- a/WebCore/platform/graphics/MediaPlayer.h +++ b/WebCore/platform/graphics/MediaPlayer.h @@ -187,6 +187,7 @@ public: #if PLATFORM(ANDROID) bool canLoadPoster() const; void setPoster(const String&); + void prepareToPlay(); #endif #if ENABLE(PLUGIN_PROXY_FOR_VIDEO) diff --git a/WebCore/platform/graphics/MediaPlayerPrivate.h b/WebCore/platform/graphics/MediaPlayerPrivate.h index ba0f4b0..109ad10 100644 --- a/WebCore/platform/graphics/MediaPlayerPrivate.h +++ b/WebCore/platform/graphics/MediaPlayerPrivate.h @@ -95,6 +95,7 @@ public: #if PLATFORM(ANDROID) virtual bool canLoadPoster() const { return false; } virtual void setPoster(const String&) { } + virtual void prepareToPlay() { } #endif #if ENABLE(PLUGIN_PROXY_FOR_VIDEO) diff --git a/WebCore/platform/graphics/android/MediaPlayerPrivateAndroid.h b/WebCore/platform/graphics/android/MediaPlayerPrivateAndroid.h index 2d76ebb..812a337 100644 --- a/WebCore/platform/graphics/android/MediaPlayerPrivateAndroid.h +++ b/WebCore/platform/graphics/android/MediaPlayerPrivateAndroid.h @@ -28,6 +28,8 @@ #if ENABLE(VIDEO) +class SkBitmap; + #include "MediaPlayerPrivate.h" namespace WebCore { @@ -79,11 +81,13 @@ public: virtual bool canLoadPoster() const { return true; } virtual void setPoster(const String&); + virtual void prepareToPlay(); virtual void paint(GraphicsContext*, const IntRect&); void onPrepared(int duration, int width, int height); void onEnded(); + void onPosterFetched(SkBitmap*); private: // Android-specific methods and fields. static MediaPlayerPrivateInterface* create(MediaPlayer* player); @@ -97,10 +101,21 @@ private: String m_url; struct JavaGlue; JavaGlue* m_glue; + float m_duration; - IntSize m_size; float m_currentTime; + bool m_paused; + MediaPlayer::ReadyState m_readyState; + MediaPlayer::NetworkState m_networkState; + + SkBitmap* m_poster; // not owned + String m_posterUrl; + + IntSize m_naturalSize; + bool m_naturalSizeUnknown; + + bool m_isVisible; }; } // namespace WebCore |