From d7cdc065d5c857259fe3ea285eaf2c15e929248e Mon Sep 17 00:00:00 2001 From: "scott%scott-macgregor.org" Date: Mon, 18 Aug 2003 05:18:05 +0000 Subject: [PATCH] Note: the editor portion of this change is to a routine only used by mailnews. Make mail news handle inline background url styles which is how editor now sets background urls instead of using the obsolete background attribute on the body: Bug #116867 --> convert background images from file urls to inline cid urls and attach the image as an inline part.This allows thunderbird and mozilla mail to support background images again. Bug #170504 --> Compose from template/draft containing "Inline Styles" and a background image loses the background image drops the inline style. r=bienvenu sr=sspitzer a=sspitzer git-svn-id: svn://10.0.0.236/trunk@146154 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/editor/libeditor/html/nsHTMLEditor.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/mozilla/editor/libeditor/html/nsHTMLEditor.cpp b/mozilla/editor/libeditor/html/nsHTMLEditor.cpp index 45a5e431856..0491fd4c300 100644 --- a/mozilla/editor/libeditor/html/nsHTMLEditor.cpp +++ b/mozilla/editor/libeditor/html/nsHTMLEditor.cpp @@ -3992,10 +3992,11 @@ nsHTMLEditor::GetEmbeddedObjects(nsISupportsArray** aNodeList) nsCOMPtr element = do_QueryInterface(node); if (element) { - PRBool hasBackground = PR_FALSE; - if (NS_SUCCEEDED(element->HasAttribute(NS_LITERAL_STRING("background"), &hasBackground))) - if (hasBackground) - (*aNodeList)->AppendElement(node); + nsAutoString bgImageStr; + + mHTMLCSSUtils->GetComputedProperty(element, nsEditProperty::cssBackgroundImage, bgImageStr); + if (!bgImageStr.Equals(NS_LITERAL_STRING("none"))) + (*aNodeList)->AppendElement(node); } } }