Title: [87541] branches/safari-534-branch/Source/WebCore
- Revision
- 87541
- Author
- mr...@apple.com
- Date
- 2011-05-27 13:10:55 -0700 (Fri, 27 May 2011)
Log Message
Merge r87244.
Modified Paths
Diff
Modified: branches/safari-534-branch/Source/WebCore/ChangeLog (87540 => 87541)
--- branches/safari-534-branch/Source/WebCore/ChangeLog 2011-05-27 20:10:49 UTC (rev 87540)
+++ branches/safari-534-branch/Source/WebCore/ChangeLog 2011-05-27 20:10:55 UTC (rev 87541)
@@ -1,3 +1,31 @@
+2011-05-27 Mark Rowe <mr...@apple.com>
+
+ Merge r87244.
+
+ 2011-05-24 Andy Estes <aes...@apple.com>
+
+ Reviewed by Geoffrey Garen.
+
+ REGRESSION (r70748): WebKit cannot play QuickTime movies on Mac OS X Wiki Server pages
+ https://bugs.webkit.org/show_bug.cgi?id=61229
+
+ This site-specific hack maintains compatibility with Mac OS X Wiki Server,
+ which embeds QuickTime movies using an object tag containing QuickTime's
+ ActiveX classid. Treat this classid as valid only if OS X Server's unique
+ 'generator' meta tag is present. Only apply this quirk if there is no
+ fallback content, which ensures the quirk will disable itself if Wiki
+ Server is updated to generate an alternate embed tag as fallback content.
+
+ * html/HTMLObjectElement.cpp:
+ (WebCore::HTMLObjectElement::shouldAllowQuickTimeClassIdQuirk): Return
+ true if site-specific quirks are enabled, the object element has no
+ fallback content, the classid attribute matches QuickTime's classid and
+ the document has a 'generator' meta tag matching Mac OS X Web Services
+ Server's unique generator string.
+ (WebCore::HTMLObjectElement::hasValidClassId): Call
+ shouldAllowQuickTimeClassIdQuirk()
+ * html/HTMLObjectElement.h:
+
2011-05-24 Sam Weinig <s...@webkit.org>
Reviewed by Beth Dakin.
Modified: branches/safari-534-branch/Source/WebCore/html/HTMLObjectElement.cpp (87540 => 87541)
--- branches/safari-534-branch/Source/WebCore/html/HTMLObjectElement.cpp 2011-05-27 20:10:49 UTC (rev 87540)
+++ branches/safari-534-branch/Source/WebCore/html/HTMLObjectElement.cpp 2011-05-27 20:10:55 UTC (rev 87541)
@@ -32,14 +32,18 @@
#include "HTMLDocument.h"
#include "HTMLFormElement.h"
#include "HTMLImageLoader.h"
+#include "HTMLMetaElement.h"
#include "HTMLNames.h"
#include "HTMLParamElement.h"
#include "HTMLParserIdioms.h"
#include "MIMETypeRegistry.h"
+#include "NodeList.h"
+#include "Page.h"
#include "RenderEmbeddedObject.h"
#include "RenderImage.h"
#include "RenderWidget.h"
#include "ScriptEventListener.h"
+#include "Settings.h"
#include "Text.h"
namespace WebCore {
@@ -235,6 +239,32 @@
return false;
}
+bool HTMLObjectElement::shouldAllowQuickTimeClassIdQuirk()
+{
+ // This site-specific hack maintains compatibility with Mac OS X Wiki Server,
+ // which embeds QuickTime movies using an object tag containing QuickTime's
+ // ActiveX classid. Treat this classid as valid only if OS X Server's unique
+ // 'generator' meta tag is present. Only apply this quirk if there is no
+ // fallback content, which ensures the quirk will disable itself if Wiki
+ // Server is updated to generate an alternate embed tag as fallback content.
+ if (!document()->page()
+ || !document()->page()->settings()->needsSiteSpecificQuirks()
+ || hasFallbackContent()
+ || !equalIgnoringCase(classId(), "clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"))
+ return false;
+
+ RefPtr<NodeList> metaElements = document()->getElementsByTagName(HTMLNames::metaTag.localName());
+ unsigned length = metaElements->length();
+ for (unsigned i = 0; i < length; ++i) {
+ ASSERT(metaElements->item(i)->isHTMLElement());
+ HTMLMetaElement* metaElement = static_cast<HTMLMetaElement*>(metaElements->item(i));
+ if (equalIgnoringCase(metaElement->name(), "generator") && metaElement->content().startsWith("Mac OS X Server Web Services Server", false))
+ return true;
+ }
+
+ return false;
+}
+
bool HTMLObjectElement::hasValidClassId()
{
#if PLATFORM(QT)
@@ -244,6 +274,9 @@
if (MIMETypeRegistry::isJavaAppletMIMEType(serviceType()) && classId().startsWith("java:", false))
return true;
+
+ if (shouldAllowQuickTimeClassIdQuirk())
+ return true;
// 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.
Modified: branches/safari-534-branch/Source/WebCore/html/HTMLObjectElement.h (87540 => 87541)
--- branches/safari-534-branch/Source/WebCore/html/HTMLObjectElement.h 2011-05-27 20:10:49 UTC (rev 87540)
+++ branches/safari-534-branch/Source/WebCore/html/HTMLObjectElement.h 2011-05-27 20:10:55 UTC (rev 87541)
@@ -95,6 +95,7 @@
// so that we can better share code between <object> and <embed>.
void parametersForPlugin(Vector<String>& paramNames, Vector<String>& paramValues, String& url, String& serviceType);
+ bool shouldAllowQuickTimeClassIdQuirk();
bool hasValidClassId();
virtual void refFormAssociatedElement() { ref(); }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes