From ac6d0d1a0f6e1e5188716068a08d01faa640d449 Mon Sep 17 00:00:00 2001 From: "buster%netscape.com" Date: Thu, 23 Sep 1999 19:08:42 +0000 Subject: [PATCH] fixed IsEditable again, based on new info. Now, only \n are held in the content model, making the original implementation correct. a=chofmann, r=akkana --- editor/base/nsEditor.cpp | 11 ++--------- editor/libeditor/base/nsEditor.cpp | 11 ++--------- 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/editor/base/nsEditor.cpp b/editor/base/nsEditor.cpp index 0d3f719a3333..9110f56f1b74 100644 --- a/editor/base/nsEditor.cpp +++ b/editor/base/nsEditor.cpp @@ -939,7 +939,7 @@ nsEditor::InsertFormattingForNode(nsIDOMNode* aNode) // XXX just insert a newline before and after each newly inserted tag. // - nsAutoString str (NS_LINEBREAK); + nsAutoString str ("\n"); // After the close tag //res = InsertNoneditableTextNode(parent, offset+1, str); @@ -2827,12 +2827,6 @@ nsEditor::IsEditable(nsIDOMNode *aNode) } } - // this next block testing for char data is ifdef'd out - // because it's unclear what whitespace constitutes "not editable" - // it's just an optimization, which makes the assumption that - // scanning the text is faster than asking layout if the text has a frame - // the last block will do this for all content, including text -#ifdef BUSTER_PERFORMANCE // it's not the bogus node, so see if it is an irrelevant text node if (PR_TRUE==IsTextNode(aNode)) { @@ -2852,14 +2846,13 @@ nsEditor::IsEditable(nsIDOMNode *aNode) for (i=0; i