Commit 73bd804a authored by commit-queue@webkit.org's avatar commit-queue@webkit.org
Browse files

[BlackBerry] Media player won't resize for the following source when first source fail to load

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

Patch by Jonathan Dong <jonathan.dong@torchmobile.com.cn> on 2012-09-21
Reviewed by Yong Li.

As platformPlayer will notify MediaPlayerPrivate for size change
when loading metadata failed (in this case hasVideo() is false),
we should prevent MediaPlayerPrivate to set width and height
attribute of media element, otherwise we won't get the correct
dimension for the following media sources.

Internally reviewed by Max Feil.

Test case: media/video-size.html

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129235 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent e6eca916
2012-09-21 Jonathan Dong <jonathan.dong@torchmobile.com.cn>
[BlackBerry] Media player won't resize for the following source when first source fail to load
https://bugs.webkit.org/show_bug.cgi?id=97342
Reviewed by Yong Li.
As platformPlayer will notify MediaPlayerPrivate for size change
when loading metadata failed (in this case hasVideo() is false),
we should prevent MediaPlayerPrivate to set width and height
attribute of media element, otherwise we won't get the correct
dimension for the following media sources.
Internally reviewed by Max Feil.
Test case: media/video-size.html
* platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
(WebCore::MediaPlayerPrivate::resizeSourceDimensions):
2012-09-21 Dan Bernstein <mitz@apple.com> 2012-09-21 Dan Bernstein <mitz@apple.com>
   
REGRESSION (r126763): Incorrect line breaking when both kerning and word spacing are enabled REGRESSION (r126763): Incorrect line breaking when both kerning and word spacing are enabled
...@@ -400,7 +400,7 @@ void MediaPlayerPrivate::resizeSourceDimensions() ...@@ -400,7 +400,7 @@ void MediaPlayerPrivate::resizeSourceDimensions()
return; return;
// If we have an HTMLVideoElement but the source has no video, then we need to resize the media element. // If we have an HTMLVideoElement but the source has no video, then we need to resize the media element.
if (!hasVideo()) { if (!hasVideo() && PlatformPlayer::MediaOK == m_platformPlayer->error()) {
LayoutRect rect = m_webCorePlayer->mediaPlayerClient()->mediaPlayerContentBoxRect(); LayoutRect rect = m_webCorePlayer->mediaPlayerClient()->mediaPlayerContentBoxRect();
static const int playbookMinAudioElementWidth = 300; static const int playbookMinAudioElementWidth = 300;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment