Title: [87007] trunk
- Revision
- 87007
- Author
- [email protected]
- Date
- 2011-05-20 18:07:16 -0700 (Fri, 20 May 2011)
Log Message
2011-05-20 Andy Estes <[email protected]>
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 <[email protected]>
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.
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (87006 => 87007)
--- trunk/LayoutTests/ChangeLog 2011-05-21 00:52:40 UTC (rev 87006)
+++ trunk/LayoutTests/ChangeLog 2011-05-21 01:07:16 UTC (rev 87007)
@@ -1,3 +1,16 @@
+2011-05-20 Andy Estes <[email protected]>
+
+ 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 <[email protected]>
Reviewed by Simon Fraser.
Modified: trunk/LayoutTests/fast/replaced/object-with-non-empty-classid-triggers-fallback-expected.txt (87006 => 87007)
--- trunk/LayoutTests/fast/replaced/object-with-non-empty-classid-triggers-fallback-expected.txt 2011-05-21 00:52:40 UTC (rev 87006)
+++ trunk/LayoutTests/fast/replaced/object-with-non-empty-classid-triggers-fallback-expected.txt 2011-05-21 01:07:16 UTC (rev 87007)
@@ -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
+
Modified: trunk/LayoutTests/fast/replaced/object-with-non-empty-classid-triggers-fallback.html (87006 => 87007)
--- trunk/LayoutTests/fast/replaced/object-with-non-empty-classid-triggers-fallback.html 2011-05-21 00:52:40 UTC (rev 87006)
+++ trunk/LayoutTests/fast/replaced/object-with-non-empty-classid-triggers-fallback.html 2011-05-21 01:07:16 UTC (rev 87007)
@@ -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=""
+<object id="obj1" classid=""
object with classid attribute but no type attribute renders fallback: PASS
</object>
<br>
-<object id="obj" classid="" type=application/x-webkit-test-netscape">
+<object id="obj2" classid="" 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="" type="application/x-webkit-test-netscape">
+</object>
Modified: trunk/Source/WebCore/ChangeLog (87006 => 87007)
--- trunk/Source/WebCore/ChangeLog 2011-05-21 00:52:40 UTC (rev 87006)
+++ trunk/Source/WebCore/ChangeLog 2011-05-21 01:07:16 UTC (rev 87007)
@@ -1,3 +1,26 @@
+2011-05-20 Andy Estes <[email protected]>
+
+ 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 <[email protected]>
Reviewed by Simon Fraser.
Modified: trunk/Source/WebCore/html/HTMLObjectElement.cpp (87006 => 87007)
--- trunk/Source/WebCore/html/HTMLObjectElement.cpp 2011-05-21 00:52:40 UTC (rev 87006)
+++ trunk/Source/WebCore/html/HTMLObjectElement.cpp 2011-05-21 01:07:16 UTC (rev 87007)
@@ -247,7 +247,11 @@
// 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
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes