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 103703 e25785cfd8ad507dbd2dcced1031c3a1d187934d
parent 103702 30c7ffa7bd97ca5709edeb0567ba9868714233dd
child 103704 e3adff2d69d789fe1fdd39615bda88a13810f370
push id14123
push userjschoenick@mozilla.com
push dateTue, 28 Aug 2012 20:35:32 +0000
treeherdermozilla-inbound@e25785cfd8ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjosh
bugs784185
milestone18.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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;