Commit Graph

109 Commits

Author SHA1 Message Date
buster%netscape.com
af5243998a split and join now properly remember which content gets deleted, and which content remains in the tree
split and join now properly set selection to the remaining node, at the proper offset.
fixes bugs 3910 3881, with approval from chofmann
1999-03-17 20:56:10 +00:00
buster%netscape.com
a6b14ae03b I fixed the content twiddling part of bug 3778. Mike has a fix for the display part of it in his tree, but determined the risk didn't
justify the benefit.  This is partly true because he and I would have had to integrate tonight before checking in, which we thought
presented some additional risk.  In any event, this bug is fixed for all cases except when the user hits enter at the end of the
document.  That is the only case in text editing when the selection will not render correctly.

Some related problems got fixed as a side benefit of my code changes.  I filed bug 3896.
1999-03-17 06:13:46 +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
rods%netscape.com
61cfe9a3d0 Added DragListener for Drag & Drop (it's not turned on) 1999-03-14 04:45:00 +00:00
buster%netscape.com
4f91976666 added checks for DOM Key event returning 0x0 key code. If we get 0, we bail. 1999-03-14 04:12:21 +00:00
kostello%netscape.com
ce8451f01d Add HACKForceRedraw() to force a redraw until the drawing
problems are solved in Gecko
1999-03-14 00:31:35 +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   is deleted first.
1999-03-13 04:53:21 +00:00
sfraser%netscape.com
895b199ee2 Throw the switch so we now pay attention to the charCode in the key event. 1999-03-12 05:28:22 +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
buster%netscape.com
9450d290ae fixed a small bug. mRefNode may be nsnull. 1999-03-12 02:27:48 +00:00
sfraser%netscape.com
452e7019bf Fix the key handling, and fix my macro for the charCode stuff 1999-03-11 19:34:28 +00:00
sfraser%netscape.com
0ca9df8689 Add SelectAll() 1999-03-11 19:33:37 +00:00
sfraser%netscape.com
beb4a09d21 Adapted key listener to get char code directly from event, rather than trying to do a key code conversion (#ifdeffed out until char code is there on all platforms). 1999-03-11 06:42:09 +00:00
akkana%netscape.com
a293292ac6 Change the reference to the global selection mgr to fix windows build 1999-03-11 00:08:10 +00:00
akkana%netscape.com
174aeed3d2 Comment out debug prints 1999-03-10 22:50:51 +00:00
akkana%netscape.com
57638ea34c Implement editor cut/copy/paste 1999-03-10 22:46:15 +00:00
akkana%netscape.com
cac34c12b2 Fix Solaris build problems -- thanks to braddr & bruce @ puremagic.com 1999-03-10 22:41:18 +00:00
sfraser%netscape.com
697f88d422 Add Cut, Copy and Paste to editor interfaces and classes, with a stub implemenatioon in nsEditor. 1999-03-10 21:29:41 +00:00
kin%netscape.com
806301a0b5 Changed all occurences of NS_TRANSACTION_MANAGER_FACTORY_CID
and kCTransactionManagerFactoryCID to NS_TRANSACTIONMANAGER_CID
and kCTransactionManagerCID.
1999-03-10 21:27:02 +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
buster%netscape.com
7ddbcd287f creation of text nodes now supported 1999-03-10 19:51:55 +00:00
buster%netscape.com
cfcffb6aff mNewNode is a DOM Node, not a DOM Element 1999-03-10 19:51:07 +00:00
buster%netscape.com
70eb4bfeed small fix of an off-by-one error in an assertion 1999-03-10 19:50:17 +00:00
buster%netscape.com
efe5fd63d6 SelectAll wired to Ctrl-A. 1999-03-10 19:49:43 +00:00
buster%netscape.com
8aba8ecce7 small interface change to InsertBreak 1999-03-10 19:49:18 +00:00
buster%netscape.com
7b37b68fb8 Implemented SelectAll.
Added nsEditor::DoInitialInsert() for doing first insert into an empty document.  Try typing into <html><body></body></html>
Added some smarts to DeleteSelectionAndCreateNode() so it only splits the selected node when appropriate (when the selection is not at offset 0 or max)

CreateElementTxn now creates text nodes as well as DOM elements
1999-03-10 19:48:13 +00:00
cmanske%netscape.com
714238a1d4 2nd try to get it right in get editor factory method 1999-03-09 23:06:16 +00:00
cmanske%netscape.com
a4506026a7 Fixed editor registration and startup problems 1999-03-09 22:52:24 +00:00
jfrancis%netscape.com
56e205b725 catching up with nsComponentManager and getting rid of cout usage 1999-03-09 20:11:27 +00:00
jfrancis%netscape.com
1436944874 including header 1999-03-09 20:04:59 +00:00
jfrancis%netscape.com
22623a9d12 integrated with content iterator 1999-03-09 19:22:48 +00:00
warren%netscape.com
44568143d6 Backed out the nsService template stuff. 1999-03-09 11:49:41 +00:00
warren%netscape.com
4b2d56fbaa nsRepository -> nsIComponentManager changes. 1999-03-09 09:44:27 +00:00
cmanske%netscape.com
f2098f2965 Fixed editor classes to do autoregistration correctly and moved target directory to bin/components 1999-03-08 22:46:33 +00:00
sfraser%netscape.com
9922f25147 Modified OutputText and OutputHTML methods to pass out nsStrings instead of nsIOutputStreams. Also fixed return values, and commented out line termination conversion in Mac outoutput. 1999-03-06 20:32:48 +00:00
cmanske%netscape.com
072ec2c507 Changed editor classes to inherited model. Fixed lots of destructor warnings. 1999-03-05 21:05:35 +00:00
scc%netscape.com
2ec0a397ea rename |IID()| --> |GetIID()| 1999-03-03 19:48:57 +00:00
mjudge%netscape.com
6497120c24 fixes for selection code, batching at correct point 1999-03-03 01:51:59 +00:00
scc%netscape.com
b81fb21272 fixed for nsCOMPtr: no construction or assignment from raw COM interface pointers 1999-03-02 22:27:46 +00:00
buster%netscape.com
5333e448a3 implemented GetTextProperty -- only works for bold and italic now,
trivial to add more properties
finished first cut at SetTextProperty.  This triggers lots of crashes in
range/selection code where we're holding onto a stale frame pointer (at
least, that's my best guess.)
synched with Charlie's change-o-rama
added an assert in DeleteTextTxn::Init() checking aNumCharsToDelete vs.
0
  NS_ASSERTION(0!=aNumCharsToDelete, "bad arg, numCharsToDelete");
if the number of chars to delete is 0, we shouldn't be creating a
transaction at all.  I had never seen this condition arise before
Charlie's checkin, I don't know if he introduced it or if it was a
latent bug I just never tripped over before.
1999-03-02 07:52:41 +00:00
cmanske%netscape.com
e415eb79b4 Implemented nsHTMLEditor. Changed prototypes to be use NS_IMETHOD and NS_IMETHODIMP. Started table editing transactions 1999-03-02 05:30:53 +00:00
cmanske%netscape.com
e8f419ec92 New files for nsHTMLEditor and table editing transactions (not working yet) 1999-03-01 19:54:47 +00:00
ebina%netscape.com
1b377a9c65 Changing RegisterFactory to use the new API. 1999-02-26 15:59:52 +00:00
warren%netscape.com
44cae3cd3f Changes for RDF component registration using nsRepository. Also changed args to NSGetFactory and friends. 1999-02-26 10:17:14 +00:00
mcafee%netscape.com
a35c96fc59 readding my fix that buster whomped. 1999-02-26 03:46:08 +00:00
buster%netscape.com
a5569c07c6 minor bug fixes 1999-02-25 16:09:18 +00:00