Permalink
Browse files

[BlackBerry] Only maintain the hole punch rect while html5 video is b…

…eing renderered


https://bugs.webkit.org/show_bug.cgi?id=91689

Patch by Max Feil <mfeil@rim.com> on 2012-07-19
Reviewed by Antonio Gomes.

The hole punch rectangle needs to be present if and only if html5
video content is being rendered. Otherwise unwanted content may
show through from behind the browser tab's window.

I am not adding any new tests because the difficulty of testing
for this case outweighs the benefit.

* platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
(WebCore::MediaPlayerPrivate::updateStates):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123138 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information...
1 parent 805791a commit a1b6fac5cc53fc2db892b9909c8cef2cc3b5e75d commit-queue committed Jul 19, 2012
View
@@ -1,3 +1,20 @@
+2012-07-19 Max Feil <mfeil@rim.com>
+
+ [BlackBerry] Only maintain the hole punch rect while html5 video is being renderered
+ https://bugs.webkit.org/show_bug.cgi?id=91689
+
+ Reviewed by Antonio Gomes.
+
+ The hole punch rectangle needs to be present if and only if html5
+ video content is being rendered. Otherwise unwanted content may
+ show through from behind the browser tab's window.
+
+ I am not adding any new tests because the difficulty of testing
+ for this case outweighs the benefit.
+
+ * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
+ (WebCore::MediaPlayerPrivate::updateStates):
+
2012-07-19 Bem Jones-Bey <bjonesbe@adobe.com>
[CSS Exclusions] - Code cleanup: make shape parsing use isComma() instead of manual checks
@@ -509,6 +509,11 @@ void MediaPlayerPrivate::updateStates()
#if USE(ACCELERATED_COMPOSITING)
setBuffering(false);
m_mediaIsBuffering = false;
+ // Remove media player from platform layer (remove hole punch rect).
+ if (m_platformLayer) {
+ static_cast<VideoLayerWebKitThread*>(m_platformLayer.get())->setMediaPlayer(0);
+ m_platformLayer.clear();
+ }
#endif
if (isFullscreen())
element->exitFullscreen();
@@ -517,6 +522,9 @@ void MediaPlayerPrivate::updateStates()
#if USE(ACCELERATED_COMPOSITING)
m_showBufferingImage = false;
m_mediaIsBuffering = false;
+ // Create platform layer for video (create hole punch rect).
+ if (!m_platformLayer)
+ m_platformLayer = VideoLayerWebKitThread::create(m_webCorePlayer);
#endif
break;
case MMRPlayer::MP_STATE_UNSUPPORTED:
@@ -529,14 +537,8 @@ void MediaPlayerPrivate::updateStates()
m_readyState = MediaPlayer::HaveEnoughData;
}
- if (m_readyState != oldReadyState) {
+ if (m_readyState != oldReadyState)
m_webCorePlayer->readyStateChanged();
-#if USE(ACCELERATED_COMPOSITING)
- // Create platform layer for video.
- if (!m_platformLayer)
- m_platformLayer = VideoLayerWebKitThread::create(m_webCorePlayer);
-#endif
- }
if (m_networkState != oldNetworkState)
m_webCorePlayer->networkStateChanged();
}

0 comments on commit a1b6fac

Please sign in to comment.