Skip to content
Permalink
Browse files
2011-05-20 Andy Estes <aestes@apple.com>
        Reviewed by Darin Adler.

        REGRESSION (r70748): WebKit cannot play videos created by Podcast Producer.
        https://bugs.webkit.org/show_bug.cgi?id=61229

        Test that an object element with a non-empty classid, a valid MIME
        type and no fallback content is allowed to load.

        * fast/replaced/object-with-non-empty-classid-triggers-fallback-expected.txt:
        * fast/replaced/object-with-non-empty-classid-triggers-fallback.html:
2011-05-20  Andy Estes  <aestes@apple.com>

        Reviewed by Darin Adler.

        REGRESSION (r70748): WebKit cannot play videos created by Podcast Producer.
        https://bugs.webkit.org/show_bug.cgi?id=61229

        Podcast Producer uses an object tag with a classid attribute to embed
        QuickTime Player into a page. In r70748, we changed our behavior to
        render the object's fallback content when a non-empty classid is
        encountered, per HTML5. Since Podcast Producer videos have no fallback
        content, this change in behavior causes the video to fail to load.

        Since the object tag has a valid type attribute, we would be able to
        load it if weren't for the non-empty classid. This patch changes our
        policy to allow objects with non-empty classids if there is no fallback
        content. We still continue to prefer fallback content if it exists,
        however.

        * html/HTMLObjectElement.cpp:
        (WebCore::HTMLObjectElement::hasValidClassId): Treat a non-empty
        classid as valid if the object has no fallback content.

Canonical link: https://commits.webkit.org/76606@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@87007 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
aestes committed May 21, 2011
1 parent 9f507fe commit 208e646fdfde953453d7c8c025c2b5e5bd1dd099
@@ -1,3 +1,16 @@
2011-05-20 Andy Estes <aestes@apple.com>

Reviewed by Darin Adler.

REGRESSION (r70748): WebKit cannot play videos created by Podcast Producer.
https://bugs.webkit.org/show_bug.cgi?id=61229

Test that an object element with a non-empty classid, a valid MIME
type and no fallback content is allowed to load.

* fast/replaced/object-with-non-empty-classid-triggers-fallback-expected.txt:
* fast/replaced/object-with-non-empty-classid-triggers-fallback.html:

2011-05-20 Kulanthaivel Palanichamy <kulanthaivel@codeaurora.org>

Reviewed by Simon Fraser.
@@ -1,4 +1,6 @@
This tests that fallback content is rendered for objects with non-empty classid attributes. The test passes if two lines are printed below containing the work 'PASS'.

object with classid attribute but no type attribute renders fallback: PASS
object with classid and type attributes renders fallback: PASS
object with classid and type attributes renders fallback: PASS
object with classid and type attribute loads when the object has no fallback content: PASS

@@ -1,13 +1,35 @@
<!DOCTYPE html>
<script>
if (window.layoutTestController)
if (window.layoutTestController) {
layoutTestController.dumpAsText();
layoutTestController.waitUntilDone();
}

function runTest()
{
var pluginObject = document.getElementById("obj3");
var consoleDiv = document.getElementById("console");

if (pluginObject && pluginObject.testCallback)
consoleDiv.innerHTML += "PASS";
else
consoleDiv.innerHTML += "FAIL";

if (window.layoutTestController)
layoutTestController.notifyDone();
}
</script>
<body onload="runTest()">
<p>This tests that fallback content is rendered for objects with non-empty classid attributes. The test passes if two lines are printed below containing the work 'PASS'.</p>
<object id="obj" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">
<object id="obj1" classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000">
object with classid attribute but no type attribute renders fallback: PASS
</object>
<br>
<object id="obj" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" type=application/x-webkit-test-netscape">
<object id="obj2" classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" type="application/x-webkit-test-netscape">
object with classid and type attributes renders fallback: PASS
</object>
<br>
<div id="console">object with classid and type attribute loads when the object has no fallback content: </div>
<object id="obj3" classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" type="application/x-webkit-test-netscape">
</object>

@@ -1,3 +1,26 @@
2011-05-20 Andy Estes <aestes@apple.com>

Reviewed by Darin Adler.

REGRESSION (r70748): WebKit cannot play videos created by Podcast Producer.
https://bugs.webkit.org/show_bug.cgi?id=61229

Podcast Producer uses an object tag with a classid attribute to embed
QuickTime Player into a page. In r70748, we changed our behavior to
render the object's fallback content when a non-empty classid is
encountered, per HTML5. Since Podcast Producer videos have no fallback
content, this change in behavior causes the video to fail to load.

Since the object tag has a valid type attribute, we would be able to
load it if weren't for the non-empty classid. This patch changes our
policy to allow objects with non-empty classids if there is no fallback
content. We still continue to prefer fallback content if it exists,
however.

* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::hasValidClassId): Treat a non-empty
classid as valid if the object has no fallback content.

2011-05-20 Kulanthaivel Palanichamy <kulanthaivel@codeaurora.org>

Reviewed by Simon Fraser.
@@ -247,7 +247,11 @@ bool HTMLObjectElement::hasValidClassId()

// HTML5 says that fallback content should be rendered if a non-empty
// classid is specified for which the UA can't find a suitable plug-in.
return classId().isEmpty();
// However, in the case where an object tag with a classid also has a valid
// MIME type and no fallback content is present, it makes sense to ignore
// the classid and attempt to load the object rather than fall back to
// nothing.
return classId().isEmpty() || !hasFallbackContent();
}

// FIXME: This should be unified with HTMLEmbedElement::updateWidget and

0 comments on commit 208e646

Please sign in to comment.