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
This commit is contained in:
scott%scott-macgregor.org 2003-08-18 05:18:05 +00:00
parent f8701a0b9f
commit 5375ac67e1

View File

@ -3992,10 +3992,11 @@ nsHTMLEditor::GetEmbeddedObjects(nsISupportsArray** aNodeList)
nsCOMPtr<nsIDOMElement> 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);
}
}
}