[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
eric.carlson at apple.com
eric.carlson at apple.com
Wed Dec 22 12:24:37 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 9d1e8b1e5210af58468bfcec9583fcfaff2474c4
Author: eric.carlson at apple.com <eric.carlson at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Sat Aug 21 18:40:01 2010 +0000
2010-08-21 Eric Carlson <eric.carlson at apple.com>
Reviewed by Dan Bernstein.
Media engine should not be asked to open all urls
https://bugs.webkit.org/show_bug.cgi?id=44370
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::load): Do nothing with urls with a type attribute that would be
rejected by canPlayType().
2010-08-21 Eric Carlson <eric.carlson at apple.com>
Reviewed by Dan Bernstein.
Media engine should not be asked to open all urls
https://bugs.webkit.org/show_bug.cgi?id=44370
* media/video-source-none-supported-expected.txt:
* media/video-source-none-supported.html:
* media/video-source-type.html:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65779 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index d57f5ef..6f0e146 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,14 @@
+2010-08-21 Eric Carlson <eric.carlson at apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Media engine should not be asked to open all urls
+ https://bugs.webkit.org/show_bug.cgi?id=44370
+
+ * media/video-source-none-supported-expected.txt:
+ * media/video-source-none-supported.html:
+ * media/video-source-type.html:
+
2010-08-21 Ademar de Souza Reis Jr <ademar.reis at openbossa.org>
Reviewed by Ariya Hidayat.
diff --git a/LayoutTests/media/video-source-none-supported-expected.txt b/LayoutTests/media/video-source-none-supported-expected.txt
index 6f3aa28..9ba009c 100644
--- a/LayoutTests/media/video-source-none-supported-expected.txt
+++ b/LayoutTests/media/video-source-none-supported-expected.txt
@@ -1,7 +1,16 @@
1. Test that no usable <source> element leaves the media element with networkState == NETWORK_NO_SOURCE
-EVENT(error)
+++ ERROR, src = test.mp4, type = "audio/x-chicken-face"
EXPECTED (event.target.tagName == 'SOURCE') OK
-EXPECTED (video.networkState == '3') OK
+EXPECTED (event.target.parentNode.networkState > '1') OK
+
+++ ERROR, src = test.ogv, type = "video/x-higglety-pigglety"
+EXPECTED (event.target.tagName == 'SOURCE') OK
+EXPECTED (event.target.parentNode.networkState > '1') OK
+
+++ ERROR, src = doesnotexist.mp4, type = ""
+EXPECTED (event.target.tagName == 'SOURCE') OK
+EXPECTED (event.target.parentNode.networkState == '3') OK
+
END OF TEST
diff --git a/LayoutTests/media/video-source-none-supported.html b/LayoutTests/media/video-source-none-supported.html
index 044dead..a3f3b9e 100644
--- a/LayoutTests/media/video-source-none-supported.html
+++ b/LayoutTests/media/video-source-none-supported.html
@@ -4,26 +4,47 @@
<title>no usable <source> test</title>
<script src=video-test.js></script>
<script>
+
function setup()
{
+ findMediaElement();
document.addEventListener("error", errorEvent, true);
}
function errorEvent(evt)
{
- consoleWrite("EVENT(error)");
-
+ consoleWrite("++ ERROR, src = " + relativeURL(event.target.src) + ", type = \"" + event.target.type + "\"");
testExpected("event.target.tagName", "SOURCE", "==");
+
+ // Any more source elements pending?
+ var nextSource = event.target.nextSibling;
+ while (video.hasChildNodes()) {
+ if (!nextSource || nextSource.tagName == "SOURCE")
+ break;
+ nextSource = nextSource.nextSibling;
+ }
- findMediaElement();
- testExpected("video.networkState", HTMLMediaElement.prototype.NETWORK_NO_SOURCE, "==");
- endTest();
- }
+ if (!nextSource) {
+ testExpected("event.target.parentNode.networkState", HTMLMediaElement.NETWORK_NO_SOURCE, "==");
+ consoleWrite("");
+ endTest();
+ } else {
+ // Because the error event is fired asynchronously the network state can be either
+ // NETWORK_LOADING or NETWORK_NO_SOURCE, depending on whether or not
+ testExpected("event.target.parentNode.networkState", HTMLMediaElement.NETWORK_IDLE, ">");
+ }
+ consoleWrite("");
+ }
</script>
+
</head>
<body>
- <video controls><source src="doesnotexist.mp4"></video>
+ <video controls>
+ <source src="test.mp4" type="audio/x-chicken-face">
+ <source src="test.ogv" type="video/x-higglety-pigglety">
+ <source src="doesnotexist.mp4">
+ </video>
<p>1. Test that no usable <source> element leaves the media element with
networkState == NETWORK_NO_SOURCE</p>
diff --git a/LayoutTests/media/video-source-type.html b/LayoutTests/media/video-source-type.html
index 2f0e2a5..04bf10f 100644
--- a/LayoutTests/media/video-source-type.html
+++ b/LayoutTests/media/video-source-type.html
@@ -1,17 +1,31 @@
-<body>
-<script src=media-file.js></script>
-<script src=video-test.js></script>
-<video controls>
- <source src=content/error.mpeg type=video/blahblah>
- <source src=content/test.mp4 type=video/mpeg>
- <source src=content/test.ogv type=video/ogg>
- <source src=content/error2.mpeg type=video/mpeg>
-</video>
-<script>
- video = mediaElement = document.getElementsByTagName('video')[0];
+<!DOCTYPE html>
+<html>
+<head>
+ <title> <source> @type attribute</title>
- waitForEvent("loadstart", function () {
- testExpected("relativeURL(video.currentSrc) ", findMediaFile("video", "content/test"));
- endTest();
- });
-</script>
+ <script src=media-file.js></script>
+ <script src=video-test.js></script>
+ <script>
+ function setup()
+ {
+ video = mediaElement = document.getElementsByTagName('video')[0];
+
+ waitForEvent("loadstart", function () {
+ testExpected("relativeURL(video.currentSrc) ", findMediaFile("video", "content/test"));
+ endTest();
+ });
+ }
+ </script>
+</head>
+<body>
+ <video controls>
+ <source src=content/error.mpeg type=video/blahblah>
+ <source src=test.mp4 type=video/x-chicken-face>
+ <source src=test.ogv type=audio/x-higglety-pigglety>
+ <source src=content/test.mp4 type=video/mpeg>
+ <source src=content/test.ogv type=video/ogg>
+ <source src=content/error2.mpeg type=video/mpeg>
+ </video>
+ <script>setup();</script>
+</body>
+</html>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index d716f27..e28ad87 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,14 @@
+2010-08-21 Eric Carlson <eric.carlson at apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Media engine should not be asked to open all urls
+ https://bugs.webkit.org/show_bug.cgi?id=44370
+
+ * platform/graphics/MediaPlayer.cpp:
+ (WebCore::MediaPlayer::load): Do nothing with urls with a type attribute that would be
+ rejected by canPlayType().
+
2010-08-21 Ariya Hidayat <ariya at sencha.com>
Reviewed by Kenneth Rohde Christiansen.
diff --git a/WebCore/platform/graphics/MediaPlayer.cpp b/WebCore/platform/graphics/MediaPlayer.cpp
index 6f350ac..4a7b70b 100644
--- a/WebCore/platform/graphics/MediaPlayer.cpp
+++ b/WebCore/platform/graphics/MediaPlayer.cpp
@@ -291,12 +291,15 @@ void MediaPlayer::load(const String& url, const ContentType& contentType)
if (!type.isEmpty())
engine = chooseBestEngineForTypeAndCodecs(type, typeCodecs);
- // if we didn't find an engine that claims the MIME type, just use the first engine
- if (!engine && !installedMediaEngines().isEmpty())
+ // If we didn't find an engine and no MIME type is specified, just use the first engine.
+ if (!engine && type.isEmpty() && !installedMediaEngines().isEmpty())
engine = installedMediaEngines()[0];
- // don't delete and recreate the player unless it comes from a different engine
- if (engine && m_currentMediaEngine != engine) {
+ // Don't delete and recreate the player unless it comes from a different engine
+ if (!engine) {
+ m_currentMediaEngine = engine;
+ m_private.clear();
+ } else if (m_currentMediaEngine != engine) {
m_currentMediaEngine = engine;
m_private.clear();
m_private.set(engine->constructor(this));
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list