mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-14 02:31:59 +00:00
Restoring one of Joe's fixes, apparently lost in a CVS merge in the last checkin
This commit is contained in:
parent
ef6b9970bc
commit
19c96db73d
@ -4687,7 +4687,13 @@ nsHTMLEditor::InsertAsPlaintextQuotation(const nsString& aQuotedText,
|
|||||||
// Do this after the insertion, so that
|
// Do this after the insertion, so that
|
||||||
nsCOMPtr<nsIDOMElement> preElement (do_QueryInterface(preNode));
|
nsCOMPtr<nsIDOMElement> preElement (do_QueryInterface(preNode));
|
||||||
if (preElement)
|
if (preElement)
|
||||||
preElement->SetAttribute(NS_ConvertASCIItoUCS2("_moz_quote"), NS_ConvertASCIItoUCS2("true"));
|
{
|
||||||
|
preElement->SetAttribute(NS_ConvertASCIItoUCS2("_moz_quote"),
|
||||||
|
NS_ConvertASCIItoUCS2("true"));
|
||||||
|
// set style to not have unwanted vertical margins
|
||||||
|
preElement->SetAttribute(NS_ConvertASCIItoUCS2("style"),
|
||||||
|
NS_ConvertASCIItoUCS2("margin: 0 0 0 0px;"));
|
||||||
|
}
|
||||||
|
|
||||||
// and set the selection inside it:
|
// and set the selection inside it:
|
||||||
selection->Collapse(preNode, 0);
|
selection->Collapse(preNode, 0);
|
||||||
|
@ -4687,7 +4687,13 @@ nsHTMLEditor::InsertAsPlaintextQuotation(const nsString& aQuotedText,
|
|||||||
// Do this after the insertion, so that
|
// Do this after the insertion, so that
|
||||||
nsCOMPtr<nsIDOMElement> preElement (do_QueryInterface(preNode));
|
nsCOMPtr<nsIDOMElement> preElement (do_QueryInterface(preNode));
|
||||||
if (preElement)
|
if (preElement)
|
||||||
preElement->SetAttribute(NS_ConvertASCIItoUCS2("_moz_quote"), NS_ConvertASCIItoUCS2("true"));
|
{
|
||||||
|
preElement->SetAttribute(NS_ConvertASCIItoUCS2("_moz_quote"),
|
||||||
|
NS_ConvertASCIItoUCS2("true"));
|
||||||
|
// set style to not have unwanted vertical margins
|
||||||
|
preElement->SetAttribute(NS_ConvertASCIItoUCS2("style"),
|
||||||
|
NS_ConvertASCIItoUCS2("margin: 0 0 0 0px;"));
|
||||||
|
}
|
||||||
|
|
||||||
// and set the selection inside it:
|
// and set the selection inside it:
|
||||||
selection->Collapse(preNode, 0);
|
selection->Collapse(preNode, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user