Skip to content

Commit

Permalink
[BlackBerry] Only maintain the hole punch rect while html5 video is b…
Browse files Browse the repository at this point in the history
…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
webkit-commit-queue committed Jul 19, 2012
1 parent 805791a commit a1b6fac
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 7 deletions.
17 changes: 17 additions & 0 deletions Source/WebCore/ChangeLog
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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:
Expand All @@ -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();
}
Expand Down

0 comments on commit a1b6fac

Please sign in to comment.