Bug 784185 - object/embed tags without a type shouldn't display plugin error frames. r=josh
authorJohn Schoenick <jschoenick@mozilla.com>
Mon, 20 Aug 2012 16:28:19 -0700
changeset 105743 e25785cfd8ad507dbd2dcced1031c3a1d187934d
parent 105742 30c7ffa7bd97ca5709edeb0567ba9868714233dd
child 105744 e3adff2d69d789fe1fdd39615bda88a13810f370
push id55
push usershu@rfrn.org
push dateThu, 30 Aug 2012 01:33:09 +0000
reviewersjosh
bugs784185
milestone18.0a1
Bug 784185 - object/embed tags without a type shouldn't display plugin error frames. r=josh
content/base/src/nsObjectLoadingContent.cpp
--- a/content/base/src/nsObjectLoadingContent.cpp
+++ b/content/base/src/nsObjectLoadingContent.cpp
@@ -2268,19 +2268,19 @@ nsObjectLoadingContent::LoadFallback(Fal
 
   //
   // Fixup mFallbackType
   //
   nsCOMPtr<nsIContent> thisContent =
   do_QueryInterface(static_cast<nsIImageLoadingContent*>(this));
   NS_ASSERTION(thisContent, "must be a content");
 
-  if (!thisContent->IsHTML()) {
-    // Don't let custom fallback handlers run outside HTML
-    LOG(("OBJLC [%p]: Non-HTML content, forcing eFallbackAlternate", this));
+  if (!thisContent->IsHTML() || mContentType.IsEmpty()) {
+    // Don't let custom fallback handlers run outside HTML, tags without a
+    // determined type should always just be alternate content
     aType = eFallbackAlternate;
   }
 
   /// XXX(johns): This block is just mimicing legacy behavior, not any spec
   // Check if we have any significant content (excluding param tags) OR a
   // param named 'pluginUrl'
   bool hasAlternateContent = false;
   bool hasPluginUrl = false;