Bug 430424: Remove no longer needed code that munges "type" attributes in the DOM. r+sr=jst
authorBoris Zbarsky <bzbarsky@mit.edu>
Mon, 14 Jul 2008 19:35:23 -0400
changeset 15934 f7a0a6d4d496c60ef3125965c2d4122818581f0f
parent 15933 b084662e3b0fe5548118e0d3cebbe10883a654f4
child 15935 b87a131fa00847a354991159420e29d2dafd9474
push id616
push userbzbarsky@mozilla.com
push dateMon, 14 Jul 2008 23:35:37 +0000
treeherderautoland@f7a0a6d4d496 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs430424
milestone1.9.1a1pre
Bug 430424: Remove no longer needed code that munges "type" attributes in the DOM. r+sr=jst
modules/plugin/base/src/nsPluginHostImpl.cpp
--- a/modules/plugin/base/src/nsPluginHostImpl.cpp
+++ b/modules/plugin/base/src/nsPluginHostImpl.cpp
@@ -2023,44 +2023,25 @@ nsPluginStreamListenerPeer::OnStartReque
       // in ns4xPluginStreamListener::CleanUpStream
       // return error will cancel this request
       // ...and we also need to tell the plugin that
       mRequestFailed = PR_TRUE;
       return NS_ERROR_FAILURE;
     }
   }
 
-  nsCAutoString contentType;
-  rv = channel->GetContentType(contentType);
-  if (NS_FAILED(rv)) 
-    return rv;
-
   // do a little sanity check to make sure our frame isn't gone
   // by getting the tag type and checking for an error, we can determine if
   // the frame is gone
   if (mOwner) {
     nsCOMPtr<nsIPluginTagInfo2> pti2 = do_QueryInterface(mOwner);
     NS_ENSURE_TRUE(pti2, NS_ERROR_FAILURE);
     nsPluginTagType tagType;
     if (NS_FAILED(pti2->GetTagType(&tagType)))
       return NS_ERROR_FAILURE;  // something happened to our object frame, so bail!
-
-    // Now that we know the content type, tell the DOM element.
-    nsCOMPtr<nsIDOMElement> element;
-    pti2->GetDOMElement(getter_AddRefs(element));
-
-    nsCOMPtr<nsIDOMHTMLObjectElement> object(do_QueryInterface(element));
-    if (object) {
-      object->SetType(NS_ConvertASCIItoUTF16(contentType));
-    } else {
-      nsCOMPtr<nsIDOMHTMLEmbedElement> embed(do_QueryInterface(element));
-      if (embed) {
-        embed->SetType(NS_ConvertASCIItoUTF16(contentType));
-      }
-    }
   }
 
   // Get the notification callbacks from the channel and save it as
   // week ref we'll use it in nsPluginStreamInfo::RequestRead() when
   // we'll create channel for byte range request.
   nsCOMPtr<nsIInterfaceRequestor> callbacks;
   channel->GetNotificationCallbacks(getter_AddRefs(callbacks));
   if (callbacks)