diff --git a/mailnews/base/src/nsMsgContentPolicy.cpp b/mailnews/base/src/nsMsgContentPolicy.cpp index 47906ec66f..b81f6c97f0 100644 --- a/mailnews/base/src/nsMsgContentPolicy.cpp +++ b/mailnews/base/src/nsMsgContentPolicy.cpp @@ -19,12 +19,12 @@ #include "nsIDocShellTreeItem.h" #include "nsIWebNavigation.h" #include "nsContentPolicyUtils.h" -#include "nsIDOMHTMLImageElement.h" #include "nsIFrameLoader.h" #include "nsIWebProgress.h" #include "nsMsgUtils.h" #include "nsThreadUtils.h" #include "mozilla/mailnews/MimeHeaderParser.h" +#include "mozilla/dom/HTMLImageElement.h" #include "nsINntpUrl.h" static const char kBlockRemoteImages[] = "mailnews.message_display.disable_remote_image"; @@ -672,8 +672,10 @@ void nsMsgContentPolicy::ComposeShouldLoad(nsIMsgCompose *aMsgCompose, { bool insertingQuotedContent = true; aMsgCompose->GetInsertingQuotedContent(&insertingQuotedContent); - nsCOMPtr imageElement(do_QueryInterface(aRequestingContext)); - if (imageElement) + nsCOMPtr element = do_QueryInterface(aRequestingContext); + RefPtr image = + mozilla::dom::HTMLImageElement::FromContentOrNull(element); + if (image) { if (!insertingQuotedContent) { diff --git a/mailnews/compose/src/nsMsgCompose.cpp b/mailnews/compose/src/nsMsgCompose.cpp index be105b3622..b091bbb37f 100644 --- a/mailnews/compose/src/nsMsgCompose.cpp +++ b/mailnews/compose/src/nsMsgCompose.cpp @@ -8,7 +8,6 @@ #include "nsIDOMNode.h" #include "nsIDOMNodeList.h" #include "nsIDOMText.h" -#include "nsIDOMHTMLImageElement.h" #include "nsPIDOMWindow.h" #include "mozIDOMWindow.h" #include "nsISelectionController.h" diff --git a/mailnews/compose/src/nsMsgSend.cpp b/mailnews/compose/src/nsMsgSend.cpp index 8ffcf5f48a..dd5d7eee7b 100644 --- a/mailnews/compose/src/nsMsgSend.cpp +++ b/mailnews/compose/src/nsMsgSend.cpp @@ -27,7 +27,6 @@ #include "nsMsgCopy.h" #include "nsUnicharUtils.h" #include "nsMsgPrompts.h" -#include "nsIDOMHTMLImageElement.h" #include "nsCExternalHandlerService.h" #include "nsIMIMEService.h" #include "nsIDocument.h"