Граф коммитов

208 Коммитов

Автор SHA1 Сообщение Дата
jfrancis%netscape.com 4b6812ec3c re-enable password field code 2000-03-29 14:04:26 +00:00
jfrancis%netscape.com 480a5dc8c6 turning back on password field handling in editor 2000-03-29 13:45:08 +00:00
jfrancis%netscape.com af4644e7c8 making editor hip to inline style changes on collapsed selections. plus lots of removal of unused code. 2000-03-29 12:53:23 +00:00
scc%netscape.com fd8de8008f small changes to clients of string converting APIs 2000-03-26 11:39:08 +00:00
jfrancis%netscape.com 0b23120401 improved paste performance in editor (WIP) (bug 28783) set/remove inline stlye rewrite (lots of bug #s) 2000-03-24 00:26:47 +00:00
jfrancis%netscape.com 6d57ee0984 fixes for the following bugs: 27914, 27305, 28690, 14608, 27306, 28757 These fixes reviewed by cmanske, apprvd rickg; also fix for 28724 (caret positioning problems) reviewed by mjudge, apprvd by jar. 2000-02-25 04:39:30 +00:00
jfrancis%netscape.com 8f20e69369 fixes for: 27959 - delete broken in editor 24694 - cant get out of link insertion r=sfraser; a=phil 2000-02-17 19:40:18 +00:00
akkana%netscape.com 447ae26d32 24694: Create the bogus node after newly inserted non-text nodes. r=sfraser. 2000-02-16 02:11:39 +00:00
jfrancis%netscape.com 7a0f4cf2e1 fix for 27699: ime text insert screwed up for single line edit fields 2000-02-16 00:53:31 +00:00
jfrancis%netscape.com c9505c0fa5 implementing font increase/decrease size for html editor (bug 18774) r=floppy moose 2000-02-08 12:53:34 +00:00
jfrancis%netscape.com 28fd752530 fix for 24051: modifying password field corrupts pw text; checked in on behalf of buster; r=jfrancis 2000-02-07 02:48:36 +00:00
jfrancis%netscape.com ebc0651bbf fix for 25452 (plain text widgets break IME escape key). checked in on behalf of katakai@japan.sun.com; r=jfrancis Thanks Katakai! 2000-02-07 01:42:14 +00:00
akkana%netscape.com 784eafea80 22505 workaround: force plaintext editors to use font-family: monospace to make wrapping work. r=jfrancis 2000-02-04 23:39:31 +00:00
akkana%netscape.com a3dbe39403 22662, 16720: greatly improve formatting of html source for inserted html tags. r=jfrancis 2000-01-26 00:57:37 +00:00
kin%netscape.com 9ef6758595 Fix for bug #24253: [REGRESSION] Redo adds newlines instead of redoing.
mozilla/editor/base/nsEditor.cpp
    mozilla/editor/base/nsEditor.h
      - Added IsMozEditorBogusNode() method.

    mozilla/editor/base/nsTextEditRules.cpp
      - Modified CreateBogusNodeIfNeeded() to check if bodyChild is a
        MozEditorBogusNode so that it doesn't create more than one.
      - Modified DidUndo() and DidRedo() to use IsMozEditorBogusNode().

r=sfraser@netscape.com
2000-01-18 23:45:35 +00:00
buster%netscape.com d0f1bda271 removed hard-coded white background now that background colors work for lazily-instantiated
text controls.
completes the fix for bug 9074
r=rods
2000-01-18 01:51:36 +00:00
jfrancis%netscape.com c8e28aa7ac fix for 21412 - backspace wouldn't remove list items in html editor. In addition some improvements were made to the adjustment of selection after an edit action (example: backspacing through a list item now pops you up to the previous item) 2000-01-17 12:41:34 +00:00
jfrancis%netscape.com 462fd8aa29 fixed 24114 - password fields showing the real text 2000-01-17 10:24:25 +00:00
jfrancis%netscape.com 634a777322 * fixed 19596; * fixed 23597; * fixed deletion bug that could cause to breaks to be deleted instead of one, when backspacing once. (no #) * partial fix for current paragraph style not being properly reported in the composer toolbar. (no #) 2000-01-15 14:29:29 +00:00
jfrancis%netscape.com a5fc421d20 fixed bug 20613 & 21121: both invloved newlines in preformatted text. Layout gives no frames for blanklines caused by newlines, so you cant click or arrow to them. I replace such newlines with breaks now. fixed 21196: select all no longer selects the special break we use in empty documents (this would cause an invisible selection). fixed 21430: choosing a new alignment in an empty doc used to do nothing. Now it works but I've exposed a selection bug inthe process... fixed 22225: a little unintended re-entrancy caused multiple breaks to be inserted in empty table cells when doc read in. 2000-01-13 10:17:35 +00:00
rods%netscape.com bd90662588 removed the hard-coded font for text editor controls
b 17303 r=buster
2000-01-12 15:37:39 +00:00
jfrancis%netscape.com e171985f93 fix for 23551: plaintext mail quoting broken. editor rules code was unaware that we were utting html elements into plaintext (namely pre, used to contain the quote). fixed. 2000-01-12 02:58:57 +00:00
jfrancis%netscape.com e72a2924a8 added in some rules code for mail quoting. This fixes bug: 19979 (extra blank line showing up in mail that has quotes) partial progress on block transformation work: unlisting a list now works mostly correctly again, instead of merging all the former list items into one run of text (no bug number). Moz-br's are now added in one more circumstance: when you have a br at the end of some inline content that is followed by a new block (like a list, table, etc.). This is needed for the same reason that the other moz-br's are: to generate a blank line that the user expects after hitting return. (no bug number) DTD-related work to enable the editor to check if you should be able to type given the current selection. fixed bug 22944: inserting an <A> in a table splits the table. Made some progress on text paste performance, but it's still too slow. That's 19273, which I'm leaving open fixed bug 15258: selection capable of getting out of the body element. fixed a bug where code that merged adjacent text nodes would merge the non-editable "formatting" textnodes, (no bug number). Added code to prevent selection from ending up inside a non-editable text node. fix for 11994, an IME bug. 2000-01-10 10:13:58 +00:00
jfrancis%netscape.com 6229129616 continuing the war on the Case Of The Happy Caret 2000-01-05 12:24:10 +00:00
jfrancis%netscape.com d6e95890c8 Fix for bug 21346. This is actually a major reworking of how the low level editor txns perturb selection. There is a mode now for telling the txns not to disturb the selection. There is also a fix for unlisting lists (sometimes list items got merged unintentionally when unlisting). 2000-01-04 03:09:41 +00:00
buster%netscape.com 03ce06ed8d fixed bug 21032 ([regression] can paste multiple lines of text into a single-line text control)
when we were using <BR>'s in plaintext, this wasn't an issue.
when we switched to using \n, we needed to put in an extra check to transform CRLF to space.

partial fix bug 20387 (scroll bars appearing in single line text control)
part of the problem is we were leaving an empty text node lying around after inserting the bogus <br>
this induced layout to add a line after the <BR>, making the document in an empty text control too tall
Kin still has the task of hiding the scroll bar in certain situations, but this was the right thing to do
anyway.

r=kin
1999-12-24 15:48:48 +00:00
rods%netscape.com a45b5daae1 backing out change and reopening bugs 17303, 19426, the default case where input isn't specified
causes a lot of problems becuase of the style it needs.
r=self
1999-12-23 20:13:46 +00:00
rods%netscape.com f06bddeda0 removed the hard coded font-family in the PlaintextInitalStyle for the set flags
r=buster bugs 17303,19426
1999-12-22 19:41:11 +00:00
jfrancis%netscape.com 167f9c0b74 fix for 20457: deletion in editor pretty darn screwy. Lots of changes to improve this. Document modifying entry points in editor now go thru a standard sandwich, which allows tracking of what changed in the doc, which allows proper post-processing of what changed. Also, all deletions now go thru the rules code, if applicable. Also some bugs in tracking the changed document portion have been fixed. Finally selection setting after a delete is improved. 1999-12-07 08:30:19 +00:00
jfrancis%netscape.com c7b0e3bedd fix for bug 19130 - hitting escape during ime entry can leave editor without a caret. r=kin 1999-12-05 00:29:34 +00:00
jfrancis%netscape.com d4edc684b8 * ported the html editor work for the "caret doesn't move when i hit return" bug (16715) back to the plaintext editor. * fixed a paste/rules interaction problem (19367) * introduced an init time pass over html documents to populate empty list items and table cells with special breaks so that the user can click in them and actually get a caret * fixed some warnings r = floppy moose 1999-11-29 08:28:46 +00:00
jfrancis%netscape.com 3513eb0058 some fixes for deletion and also selection movement, contributed by Steve Clark. fixes bug 18537 (backspace can delete entire line); r = buster 1999-11-17 11:30:39 +00:00
akkana%netscape.com 1a67e1996b 18576: Enclose plaintext replies in a <pre> so they don't get wrapped,
and add appropriate edit rules to split pre tags when editing plaintext.
r=sfraser
1999-11-13 00:26:45 +00:00
dmose%mozilla.org 142ac52eaf updated xPL license boilerplate to v1.1, a=chofmann@netscape.com,r=endico@mozilla.org 1999-11-06 03:43:54 +00:00
jfrancis%netscape.com 1e84beb217 fix for 17673;r=sfraser 1999-11-03 00:07:37 +00:00
jfrancis%netscape.com b92307002b changed bogus node type to br to get rid of annoying space in empty editors; r=kin 1999-11-02 21:35:21 +00:00
ftang%netscape.com c4deb92eb0 add debugging code. fix remove last uncomited IMEText. r=jfrancis 1999-10-27 22:56:36 +00:00
cmanske%netscape.com e7457117e4 Fixed bugs 12515, 16493,16494,16495,16692,16794,most of 9758. Replaced old 'target' icon with interim 'anchor' icon. r=sfraser 1999-10-20 14:15:25 +00:00
buster%netscape.com 1a165ddf9b fixed my part of bug 15814 (Cleanup build warnings)
so trivial, no reviewer needed
fixed my part of bug  5403 (Services improperly released: Use NS_WITH_SERVICE)
a handful of subtle error handling bugs were fixed as a side effect
r=Akkana
1999-10-08 14:39:20 +00:00
buster%netscape.com 7a638a9c93 fixed some space leaks reported by kipp. no bug #, r=tague
added some assertions and error checking to nsEditor::Do, no bug #, r=kin
fixed bug 14898 (implemented type-in state for any context), r=jfrancis
1999-10-06 20:27:41 +00:00
jfrancis%netscape.com c412022f4a revised rules system api to include "handled" parameter and ceased to overload the meaning of the "cancel" parameter; added TypedText() method to editor, editorshell, and logging, so that logging will work properly with typing; coallesce deletions for undo purposes r=buster@netscape.com 1999-10-06 19:34:09 +00:00
jfrancis%netscape.com 9a79219861 revised UNDO; introduced first cut at the "mozdiv" typing rules 1999-09-29 20:08:15 +00:00
buster%netscape.com 49af0dba87 very simple extension of a fix already in place for bug 11804 1999-09-22 05:00:58 +00:00
brade%netscape.com c7afb94dcc warning cleanup 1999-09-21 22:32:39 +00:00
buster%netscape.com a8d68e70d4 most of the fix for bug 11804, type-in state wasn't properly removing
inline attributes from the next character entered (you're in a bold word
and user clicks bold button, should make next character not bold.)
all done except for font properties.
1999-09-20 04:20:18 +00:00
jfrancis%netscape.com 54d647b458 fixing a heap-o-undo problems and some mBogusNode problems 1999-09-20 01:31:44 +00:00
jfrancis%netscape.com a7f35e4051 fix for 13677 1999-09-17 23:15:12 +00:00
buster%netscape.com 1b1462e1dc fixed a warning 1999-09-17 20:17:22 +00:00
buster%netscape.com e52e18ffbf fixed bug 13810 by removing an extraneous check for empty string. empty strings are perfectly legal
in WillInsertText
1999-09-15 19:43:19 +00:00
buster%netscape.com 4195b67417 fixed bug 13669, wrong password when user typed with 1 or more characters selected 1999-09-14 00:11:22 +00:00
buster%netscape.com ffb3894fd2 fixed password editors, while maintaining output of empty HTML documents
fixes bug 13404, a blocker for enabling gfx text controls
1999-09-09 19:39:36 +00:00
sfraser%netscape.com 58b73017cb Add DocumentIsEmpty to EditorShell.idl and nsIEditor, and modify length and content getters to do the right thing with an empty document (which contains the bogus text node). 1999-09-08 23:32:04 +00:00
jfrancis%netscape.com 9c28b6ac69 restoring 1.54 checkin: no longer clearing selection when we detect empty document - selection is a perfectly valid concept in an empty document. fix for bug 13251 is now in layout/src/base/nsRange.cpp 1999-09-08 05:30:48 +00:00
kin%netscape.com 7602564deb Fix for bug #13251: gfx text fields are not accepting input
Reenabled call to ClearSelection() in nsTextEditRules::WillInsert().
1999-09-07 22:47:50 +00:00
jfrancis%netscape.com 7f0b5337ce no longer clearing selection when we detect empty document - selection is a perfectly valid concept in an empty document. 1999-09-06 19:45:26 +00:00
bruce%cybersight.com 7c0a2d27b9 Use nsCRT::free() instead of delete[] for char* data. 1999-09-06 06:22:51 +00:00
sspitzer%netscape.com 338479c025 it really scares me to see my password get sent to the console when I type it. it's scaring others, see #13061. wrapping this code with #ifdef DEBUG_<author>. I'll send them mail directly. 1999-09-03 08:31:33 +00:00
buster%netscape.com 8b33ec3088 fixed bug 12680 (password fields broken)
fixed bug 12489 (static contructors must be removed)
1999-08-30 22:11:09 +00:00
buster%netscape.com 796446129f added a special case to the output text rules for an empty document
(one that contains the bogus node)
1999-08-24 13:48:08 +00:00
jfrancis%netscape.com 34f6986b50 refactoring text insertion code; indent/outdent now work with lists and list items. 1999-08-24 08:56:51 +00:00
akkana%netscape.com de0fab64a7 Handle plaintext wrapping in style, rather than a pre tag in the body. Also fix a couple of warnings. 1999-08-20 22:39:48 +00:00
buster%netscape.com 3bc5912284 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
buster%netscape.com 5b65a4e45f moved handling of flags from rules constructor to rules init, so
rules code can call SetFlags with mEditor initialized and do real
processing if it wants to.
1999-08-09 18:39:49 +00:00
sfraser%netscape.com ac5099a587 Fix the nsTextEditRules init so that setting the flags works. 1999-08-09 18:22:13 +00:00
buster%netscape.com 503defd7f0 backed out my last change, it didn't fix the problem I thought it would. 1999-08-09 18:01:08 +00:00
buster%netscape.com 151ee02b62 call SetFlags from Init, so plaintext logic gets executed. 1999-08-09 17:44:14 +00:00
sfraser%netscape.com d73dfd8ddb Landing editor API changes. Removed nsITextEditor and nsTextEditor, split interfaces into more, non-overlapping interfaces, and other general cleanup. 1999-08-09 01:37:50 +00:00
buster%netscape.com fd79be28bb fixed handling of text controls with a max length set 1999-08-07 05:29:41 +00:00
buster%netscape.com cc49e3182a 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
jfrancis%netscape.com 491557ab29 making plaintext flag force a "white-space: pre" style on the body. this is a fix for bug 9153 1999-07-25 05:34:02 +00:00
mjudge%netscape.com c0b1525970 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
buster%netscape.com dca6c49edd replaced IID's with CID's where they were appropriate, and removed lots of
NS_DEFINE_IID macros in favor of GetCID() wherever I could.
plus some minor bug fixes.
1999-07-15 19:13:46 +00:00
mjudge%netscape.com 21700e5d88 checkin for carpool for multiple seleciton/ime selection and api changes 1999-07-15 18:19:20 +00:00
jfrancis%netscape.com dcb4b5045a turning off ill fated coercion of selection for plaintext editing. I'll turn this back on when I know how to correctly detect when it's needed. 1999-07-03 05:13:30 +00:00
jfrancis%netscape.com 5020b85ebb making the plain text selection pinning savvy to the other flavors of text editors, the ones that DONT have <pre> tags wrapping all the text 1999-07-02 07:53:08 +00:00
buster%netscape.com 7bc9bfc2b0 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 7904f484a3 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
buster%netscape.com 52fea2d39d Moved GetTextSelectionOffsets and GetDocumentLength from nsTextEditRules to
nsTextEditor.  Added GetDocumentLength to nsITextEditor public interface.
1999-06-28 13:36:38 +00:00
buster%netscape.com 96d97515ac implemented most of max length handling 1999-06-25 22:57:26 +00:00
buster%netscape.com 4707ee0cc9 added rules for password behavior 1999-06-24 23:36:56 +00:00
buster%netscape.com 6a3429ddc2 * 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
buster%netscape.com 6b09e8c917 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
akkana%netscape.com 1f3151a20d - Rename iDirection enum to ECollapsedSelectionAction
- Initial implementation of Insert HTML
1999-05-05 23:27:17 +00:00
buster%netscape.com 99a96a39ec 1. block transformation infrastructure is now in place. We can go ahead and implement interesting
features like set paragraph style, set list type, indent, etc.  I'm sure there's holes in my
implementation that these high level features will make obvious.

2. I've factored a lot of utility methods from several modules into nsEditor as public static methods.
This makes them easily accessable to all, and will help Joe and I remove redundant methods.

3. I changed the HTML tags to lower case, and made all string compares case-insensitive.  No, this
isn't quite the right thing to do, but we don't have atoms from layout yet.  The Right Thing is for us
to reuse those atoms.
1999-05-05 04:05:19 +00:00
rickg%netscape.com f822b17f07 sync with nsString2 1999-04-24 01:39:50 +00:00
buster%netscape.com 0423fb36df vastly improved type-in state handling. smaller and faster 1999-04-22 14:46:53 +00:00
buster%netscape.com 7f1d6dfe95 factoring of text property code for reuse.
extended APIs to handle fonts -- the trick here is to allow attributes and values
to effectively describe independent properties.
1999-04-20 17:49:34 +00:00
rickg%netscape.com e1012f40b9 sync with nsString2 API 1999-04-20 07:20:21 +00:00
buster%netscape.com 3c2f906370 factored out re-parenting of content into MoveContentIntoNewParent
WIP on font handling.
1999-04-16 18:29:12 +00:00
sfraser%netscape.com a497442a45 Adapt to fixed selection interface 1999-04-15 20:20:12 +00:00
jfrancis%netscape.com e816efb197 merging in rules work with Simon's selection changes 1999-04-13 13:35:08 +00:00
sfraser%netscape.com f0acea2009 Updated to conform to new IDL-ized selection interfaces. 1999-04-13 01:33:32 +00:00
jfrancis%netscape.com 0b0035a95c checkpointing html typing rules 1999-04-12 12:01:32 +00:00
buster%netscape.com 8b2ac0cbbc fixed bug 4517
WIP on remove text attributes
1999-04-05 20:52:29 +00:00
jfrancis%netscape.com fffd5158c3 redoing rules architecture 1999-04-05 17:21:59 +00:00
buster%netscape.com 73f3b2da71 Improved setting text property for next type-in (that is, setting text properties with a collapsed selection.) Bold, italic, and underline
all work.  Better error checking, and factored out some common code.
1999-04-04 20:10:39 +00:00
buster%netscape.com 52bb18a74f As a reminder, we decided to do this based strictly content. Some support for style-based text properties is written, but not used
anywhere any more.

* Cleaned up split and join undo/redo.
* Added TypeInState, a data struct that remembers things about text properties for collapsed selections, so you can type
* Ctrl-B with an insertion point and the next character will be bold.
* Added all the logic to handle inline vs. block elements when setting text properties.
* Added some support for italic and underline as well.  Adding these things is pretty easy now.  Ctrl-B, Ctrl-I, Ctrl-U for testing bold, italic, underline.
* Added all the logic to make sure we only add style tags where they're needed, so you should never get the same style tag nested within itself, except as needed for block elements.
* Added methods for testing a node to see if a particular style is set.  This isn't 100% done yet, but with very little work we could have toolbar buttons that respond to selection changed notification that show the state of bold, italic, underline, etc. in real time.  Supports tri-state:  whole selection is bold, some of selection is bold, none of selection is bold, ...
* Fully undoable and redoable.
* Added some debug printfs to transactions and editors.  all controlled by a gNoisy static in each module.  helps me track down undo/redo problems.  if the output bugs people enough, I'll shut it off and re-enable it in my local tree.

Noticably missing:  make un-bold, make un-italic, etc.  This is coming soon.
1999-04-01 17:58:07 +00:00
akkana%netscape.com cf7607381c Editor: Add Insert Link and Image 1999-03-29 22:01:26 +00:00
jfrancis%netscape.com 0db3d1ee04 seperating out html edit rules from text edit rules 1999-03-29 08:02:05 +00:00
jfrancis%netscape.com 1d6d98a5e5 bug 4057: fix is in layout; here I'm removing the old workaround code 1999-03-22 09:04:06 +00:00
buster%netscape.com 53b3380a59 fixed join.
made a special case for typing with BR as the selection (as after an InsertBreak.)
made DEL and BACKSPACE at the beginning and end of a text node
fixes bugs 3742 and 3756 (with permission from choff and gkostello)
1999-03-16 16:38:09 +00:00
buster%netscape.com 6ce58013c8 added WillUndo, DidUndo, WillRedo, DidRedo and some supporting code so
the text edit rule object can maintain it's own state more efficiently and correctly.
1999-03-15 05:08:30 +00:00
buster%netscape.com d5932338f7 added PlaceholderTxn. This is an aggregate transaction that sits on the undo stack
and merges in subsequent transactions indiscriminately until it's told to stop.
It also gives the last transaction in its child list a chance to merge the
next transaction.
All this is in support of complex transactions that result in text insertion
being able to collapse into a single undoable event.
Also improved tracking of bogus content node used when document is empty.
1999-03-15 00:57:32 +00:00
buster%netscape.com 458de90002 InsertBreak now works at the beginning of a line. Plus a trivial bug fix. 1999-03-13 05:31:22 +00:00
buster%netscape.com bd6cb52f35 added delegate code for InsertText (WillInsertText, DidInsertText)
which calls generic WillInsert, DidInsert to test for magic bogus
content and does the right thing.
You now can't delete magic content with user gestures, and when you
insert anything the magic kludgy &nbsp; is deleted first.
1999-03-13 04:53:21 +00:00
buster%netscape.com b615bb95b3 deleting the last editable object in a document now causes a bogus placeholder <P>&nbsp;</P> to be added to the document. This node has the
attribute MOZ_EDITOR_BOGUS_NODE set to TRUE.  this solves the problem of when you do a SelectAll then a DEL, you don't have a cursor
or any way to set selection in the document. You do still have the problem that the nbsp is pretty narrow and the frame containing it is hard to hit
with the mouse.  We really need the "set selection to frame nearest the mouse down point" operation.

the intent is for all inserts to look for this node, and if found delete it before the insert.  likewise, all deletes will be no-ops if this node is found.
1999-03-12 02:28:24 +00:00
sfraser%netscape.com 339921715b Add static to remove warning 1999-03-10 21:26:33 +00:00
buster%netscape.com 80388f4d9e first cut at rules delegate for text editor, will change drastically in the next week or two 1999-03-10 19:53:26 +00:00