fixes for bugs:
75618 CR line breaks not recognized when inserting data in a plain 76258 IsEditable() needs to be smarter 72968 browser crashes when doing REDO after doing some cut/paste i 55224 switching from HTML Source mode to Normal causes dataloss 71355 style buttons do not work from 2nd cell onwards inside table 71362 empty tables inside (otherwise) empty list item disappears w 74655 40% of reply time in mailcompose spent converting linefeeds r=fm; sr=kin git-svn-id: svn://10.0.0.236/trunk@92547 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -186,6 +186,8 @@ nsresult nsHTMLEditor::InsertHTMLWithCharsetAndContext(const nsAReadableString &
|
||||
{
|
||||
if (!mRules) return NS_ERROR_NOT_INITIALIZED;
|
||||
|
||||
/* all this is unneeded: parser handles this for us
|
||||
|
||||
// First, make sure there are no return chars in the document.
|
||||
// Bad things happen if you insert returns (instead of dom newlines, \n)
|
||||
// into an editor document.
|
||||
@@ -198,6 +200,7 @@ nsresult nsHTMLEditor::InsertHTMLWithCharsetAndContext(const nsAReadableString &
|
||||
// Mac linebreaks: Map any remaining CR to LF:
|
||||
inputString.ReplaceSubstring(NS_ConvertASCIItoUCS2("\r"),
|
||||
NS_ConvertASCIItoUCS2("\n"));
|
||||
*/
|
||||
|
||||
// force IME commit; set up rules sniffing and batching
|
||||
ForceCompositionEnd();
|
||||
@@ -223,7 +226,7 @@ nsresult nsHTMLEditor::InsertHTMLWithCharsetAndContext(const nsAReadableString &
|
||||
// create a dom document fragment that represents the structure to paste
|
||||
nsCOMPtr<nsIDOMNode> fragmentAsNode;
|
||||
PRInt32 rangeStartHint, rangeEndHint;
|
||||
res = CreateDOMFragmentFromPaste(nsrange, inputString, aContextStr, aInfoStr,
|
||||
res = CreateDOMFragmentFromPaste(nsrange, aInputString, aContextStr, aInfoStr,
|
||||
address_of(fragmentAsNode),
|
||||
&rangeStartHint, &rangeEndHint);
|
||||
NS_ENSURE_SUCCESS(res, res);
|
||||
|
||||
Reference in New Issue
Block a user