Commit Graph
126 Commits
Author SHA1 Message Date
dougt@netscape.com c316095ded xpild-ing nsIAtom. Now nsIAtom is xpcom compliant. 1999-08-21 07:07:00 +00:00
buster@netscape.com 725f13ce9d Fixed a ton of errors where we were not handling error results correctly.
Added some comments of the form "// XXX: ERROR_HANDLING <explanation>"
wherever I saw a potential error but wasn't 100% sure of the intention of the code.
Fixed a few bugs along the way.
1999-08-19 13:30:48 +00:00
akkana@netscape.com f25129b5c4 11552: don't hardcode the character set for saving 1999-08-10 21:22:32 +00:00
tague@netscape.com 802dcb7d84 Added support for replies from private DOM text events. See bug #4826 1999-08-06 02:32:13 +00:00
akkana@netscape.com 0730df91bb 10684: Fix plaintext paste as quotation crash 1999-08-05 19:48:11 +00:00
buster@netscape.com 1b8517efb5 just fixed warnings 1999-08-03 05:56:55 +00:00
buster@netscape.com 64a3728fea minor bustage, hopefully before tinderbox even catches it... 1999-08-02 14:13:08 +00:00
buster@netscape.com 204966c6f8 fixed some set and remove text propery bugs 1999-08-02 13:55:45 +00:00
buster@netscape.com 5092412068 Clean-up
1) fixed unit tests
2) fixed a bunch of leaks having to do with using enumerators.  Thanks for noticing these, Simon.
3) fixed a tiny problem in nsTextEditRules::WillDoAction().
This method was overly aggressive in checking input args, sel can be null for some operations.
1999-07-25 18:14:44 +00:00
mjudge@netscape.com 8e4c13fcd1 massive checkin for selection. adjusting nsIDOMSelection api and nsIFrameSelection. many "small" changes. this is not as bad as it looks. layout will not be affected other than "getter" calls for selection. and all consumers of selection should be in good shape. 1999-07-18 02:27:19 +00:00
mjudge@netscape.com a8748298ee checkin for carpool for multiple seleciton/ime selection and api changes 1999-07-15 18:19:20 +00:00
sfraser@netscape.com 9fe91504c4 Call a post-save method, and remove bogus nil check. 1999-07-14 22:31:19 +00:00
waterson@netscape.com 7c13e044dc Use allocated buffer instead of trying to allocate dynamic array on stack. 1999-07-14 19:41:05 +00:00
akkana@netscape.com 3fd1dc7c68 Restructure the editor output routines to allow passing in
a mime type and a flag argument.  Also fix the following bugs:
9746: get rid of bogus empty <style> in head.
8143: save wrap column in editor shell in case it's set before the
      editor is created.
9470, 9488: allow explicit specification of formatted output.
1999-07-14 18:54:29 +00:00
brade@netscape.com e9f8c34604 add GetTextLength() 1999-07-14 18:06:13 +00:00
cmanske@netscape.com 88e132f05e Generic message dialog, fix insert element-related bugs, initial personal dictionary dialog, other editor bugs 1999-07-14 15:24:33 +00:00
buster@netscape.com a5bffdb6e3 added code to manage setting/unsetting attribute-value pairs in complex selections.
cases like: <font color=blue>abc</font>some more text<font color=red>def</font>
with the selection from 'b' to 'e' and operations like "set font to green", and "remove font color"
1999-07-06 23:41:37 +00:00
akkana@netscape.com ea44445873 Fix formatted plaintext output -- it wasn't following prettyprint or wrap length 1999-07-06 23:13:15 +00:00
buster@netscape.com 93b263094f minor bug fixes 1999-07-01 20:46:59 +00:00
kin@netscape.com 55ce07b8a7 Added ApplyStyleSheet() method to the various editor interfaces. 1999-07-01 19:32:35 +00:00
akkana@netscape.com c69f0f141f Oops, making wrapcolumn unsigned was a mistake. (Thanks to slamm's
warnings page for showing me that!)  Change it back to signed.
1999-07-01 19:01:04 +00:00
buster@netscape.com ac9871a79f 0. possible fix for Sun build bustage.
1. IsEditable is much less hacky.  It basically says:
  1. if the node is a special bogus text node, it's not editable
  2. if the node is a text node with only newlines, then it's not editable
  3. if the node has no frame associated with it, then it is not editable
  4. otherwise, it is editable.
As part of this, I had to make IsEditable non-static.  This had some cascading effects on static methods that called
IsEditable, which likewise had to be made non-static.

2. SetTextProperties now works when the endpoints are leaf nodes (like images), not just text.  Charlie, you should
put this through some stress cases.
1999-07-01 18:42:28 +00:00
jfrancis@netscape.com f981dcb4bf some cleanup and also selection enforcement for plaintext documents: selection is pinned to within the PRE tag on any edit action 1999-07-01 13:42:03 +00:00
akkana@netscape.com c88a4fee5a - New dialog and editor shell API for Insert HTML Source
- Add wrapcolumn setting to document encoders, and use it in the editor
- Fix numbered lists in the html to text sink stream.
1999-06-30 19:26:08 +00:00
scc@netscape.com 90f6a8560a |nsISupports::GetIID()| --> |nsCOMTypeInfo<nsISupports>::GetIID()| 1999-06-29 21:01:31 +00:00
tague@netscape.com 8269007861 Added clause and selection support for Input Methods. Fixes bug #8639, #8459, #6989, #7824 1999-06-29 20:31:22 +00:00
sfraser@netscape.com 65b7df4871 Add new aSelectionOnly param to Output routines 1999-06-29 20:14:24 +00:00
buster@netscape.com efa2524535 Moved GetTextSelectionOffsets and GetDocumentLength from nsTextEditRules to
nsTextEditor.  Added GetDocumentLength to nsITextEditor public interface.
1999-06-28 13:36:38 +00:00
akkana@netscape.com 76361e19a2 Oops, use prettyprinting for OutputTextToStream as well as ToString. 1999-06-26 00:59:12 +00:00
akkana@netscape.com 5fa969968e - Add a prettyprint flag to the html-to-text sink (false by default).
When prettyprinting is on, we will attempt to make the plaintext
  mimic the look of the html; when off (as for copy/paste), we just
  dump the text with no formatting information.
1999-06-26 00:01:11 +00:00
buster@netscape.com b02974058a implemented most of max length handling 1999-06-25 22:57:26 +00:00
buster@netscape.com 4b05a30ff0 fixed Unix bustage. compare nsCOMPtr xxx.get() rather than just xxx 1999-06-25 00:28:28 +00:00
buster@netscape.com e0a94897bf quiet debug now 1999-06-24 23:50:53 +00:00
buster@netscape.com 301233bf46 added behavior for password fields
fixed a bunch of selection bugs
1999-06-24 23:37:55 +00:00
akkana@netscape.com a9cd23b14d Use new document encoding service from nsTextEditor, and make nsHTMLEditor methods call nsTextEditor methods 1999-06-24 20:16:36 +00:00
mcafee@netscape.com e7d8de1574 Removing NEW_DRAG_AND_DROP ifdef, this is on by default now. 1999-06-16 05:18:53 +00:00
kin@netscape.com e381bbffbb * Added StartLogging() and StopLogging() methods to nsIEditor,
nsIHTMLEditor, nsITextEditor, and nsIEditorShell and enabled
  the "Start Log" and "End Log" menu items in the editor test bed.

* Modified makefiles for Unix and Win32 to turn on  Editor API Logging.

* Added action argument to the DeleteSelection() method in nsIEditorShell.

* Modified nsJSTxnLog to use nsJSEditorLog when writing it's output.
1999-06-14 20:02:46 +00:00
buster@netscape.com 815afeb053 changed the way nsEditProperty is used. Right now, it's our placeholder
for HTML and CSS atoms, since we can't get these from layout yet.  The old
use assumed one editor, but as we know many editors can exist simultaneously.
Now, the editors share a singleton which is fetched from a factory method,
saving memory and allocation overhead.
1999-06-12 21:15:14 +00:00
akkana@netscape.com e506043f6f Implement InsertHTML.
Also, some minor fixes, like warning removal and addition of error checking
in files which needed it.
1999-06-10 21:31:42 +00:00
kin@netscape.com 8bdcd74b95 First pass checkin of the JavaScript editor logging mechanism. All changes are
ifdef'd with ENABLE_JS_EDITOR_LOG.
1999-06-10 19:41:40 +00:00
buster@netscape.com 63d11cc3fd * Added nsAutoSelectionReset, a tiny class that resets the selection to what it was before a block transformation.
* Added some code to restore selection after RemoveTextProperty.
* Made a tiny change to the way the editor holds onto the transaction manager, so client (like the ender text control) can
turn undo on and off effectively
* Fixed a bug in IsNodeInline that was causing GetBlockParent to return the wrong parent node (and who knows what
other mischief) where atom compares were being done on strings of different case, for <B>, "b" vs. "B".  The DOM
method nsIDOMElement::GetTagName forced the returned tag name to upper case.  I don't know how long that has
been true, but I assume it's a fairly recent change (or something on our side related to it changed recently) or this method
never would have worked.  I also found a few cases of nsString::Equals that I changed to EqualsIgnoreCase
* Made some general improvements to the interaction between editors and rules, so that the aCancel out param is always
intialized, and all rules with Will... are matched with a Did... call.  Added Will/DidSetTextProperty() and
Will/DidRemoveTextProperty().  This helps enable plain text mode.  Added a skeleton for max length support in text editor.
* fixed some warnings.
1999-06-08 06:04:51 +00:00
akkana@netscape.com 398583aed8 Get rid of overloaded class names, to eliminate warnings 1999-06-07 21:12:01 +00:00
bruce@cybersight.com 5e87abd21d Correct typo, fix HP-UX bustage. 1999-05-29 02:15:07 +00:00
buster@netscape.com 868638b813 Preparation for ender-based text control
* added focus listener.  Doesn't do much yet, but when focus notifications start appearing, we'll be ready for them.  The code is in
place to hide selection when we lose focus and paint selection when we get focus.  That's probably not quite right, but it's a start.
We will need to be able to determine the distinction between losing focus to another control within our app, and losing focus to
another app.
* added support for disabled and readonly states in the editor.  This is accomplished by having flags set by the client, and letting the
rules system deal with those flags.  The flags I added are:
     TEXT_EDITOR_FLAG_PLAINTEXT   0x01   // only plain text editing is allowed
     TEXT_EDITOR_FLAG_SINGLELINE  0x02   // enter key and CR-LF handled specially
     TEXT_EDITOR_FLAG_PASSWORD    0x04   // text is not entered into content, only a representative character
     TEXT_EDITOR_FLAG_READONLY    0x08   // editing events are disabled.  Editor may still accept focus.
     TEXT_EDITOR_FLAG_DISALBED    0x10   // all events are disabled (like scrolling).  Editor will not accept focus.
* added WillInsertBreak/DidInsertBreak into text rules, so flags could be checked.  This gets us readonly, disabled, and single line
behavior.
* cleaned up the code that allocates, registers, and destroys event listeners.  Thanks to Kin and Simon for cleaning up the
ownership model on the listeners, it was a big help.
* added support for a max text length.  You can now tell the text editor, be no bigger than n characters.
1999-05-28 21:24:18 +00:00
alecf@netscape.com a61611567f GetCharPref() is going away for nsIPref scriptability. Use CopyCharPref instead 1999-05-28 00:50:29 +00:00
sfraser@netscape.com 10136f1252 Removed obsolete IID definitions, use GetIID() instead. 1999-05-28 00:20:41 +00:00
sfraser@netscape.com 860aefdcfc Add unit test call to nsIEditor, and implement it in nsText- and nsHTMLEditors. 1999-05-27 04:10:04 +00:00
akkana@netscape.com 2e8078e1f7 Insert / Paste as Quotation. 1999-05-27 00:08:15 +00:00
cmanske@netscape.com 6451cf0883 Continued UI work: Spell checker fixes, toolbar improvements, popup menus implemented for paragraph style, font face and color, setting font color test UI, etc. 1999-05-26 21:40:51 +00:00
kin@netscape.com f6a70c37d8 Commented out all calls to HACKForceRedraw(). We now call it from
nsEditor::EndTransaction().
1999-05-17 13:31:56 +00:00