From 3f8d33af18ba4a204ff2ae9b394aeb7db06d13be Mon Sep 17 00:00:00 2001 From: "buster%netscape.com" Date: Thu, 23 Sep 1999 00:10:51 +0000 Subject: [PATCH] 14602: IsEditable is broken. removed optimization where we searched text strings and made our own guess about whether it was editable or not. Now we just trust layout, if there's a frame, it's editable. git-svn-id: svn://10.0.0.236/trunk@48881 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/editor/base/nsEditor.cpp | 11 ++++++++++- mozilla/editor/libeditor/base/nsEditor.cpp | 11 ++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/mozilla/editor/base/nsEditor.cpp b/mozilla/editor/base/nsEditor.cpp index 4d130e51afc..0d3f719a333 100644 --- a/mozilla/editor/base/nsEditor.cpp +++ b/mozilla/editor/base/nsEditor.cpp @@ -2826,6 +2826,13 @@ nsEditor::IsEditable(nsIDOMNode *aNode) return PR_FALSE; } } + + // 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)) { @@ -2844,13 +2851,15 @@ nsEditor::IsEditable(nsIDOMNode *aNode) PRUint32 i; for (i=0; i