Commit Graph
48 Commits
Author SHA1 Message Date
rods@netscape.com c1e67c918e Minor changes to call to new clipboard 1999-03-26 15:49:28 +00:00
mcafee@netscape.com f274cb13d6 Renamed GetTransferable() to GetData() 1999-03-25 23:39:03 +00:00
mcafee@netscape.com 70239ac7bd initializing a variable to zero. 1999-03-24 09:08:24 +00:00
mcafee@netscape.com 19d015edb0 Checking for null references on clipboard, trans (gtk/unix). 1999-03-24 01:43:46 +00:00
rods@netscape.com 04df792b16 Added code for switching over Clipboard support to new classes
At the moment the are ifdef'ed out
1999-03-23 15:45:58 +00:00
buster@netscape.com b943f567aa 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 14f1c2a65b 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 5237fefb1a 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 27219045e2 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
kostello@netscape.com a66da877bf 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 2db3d69055 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 84c5e45ab7 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
akkana@netscape.com 988f2317e3 Change the reference to the global selection mgr to fix windows build 1999-03-11 00:08:10 +00:00
akkana@netscape.com 77c7789019 Comment out debug prints 1999-03-10 22:50:51 +00:00
akkana@netscape.com cca679515e Implement editor cut/copy/paste 1999-03-10 22:46:15 +00:00
sfraser@netscape.com d501eb13e2 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 946ebb3900 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
buster@netscape.com b3be43bd14 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 32cb12b906 2nd try to get it right in get editor factory method 1999-03-09 23:06:16 +00:00
cmanske@netscape.com aebbe30298 Fixed editor registration and startup problems 1999-03-09 22:52:24 +00:00
warren@netscape.com c9ba93fe9a Backed out the nsService template stuff. 1999-03-09 11:49:41 +00:00
warren@netscape.com 35d5e6e062 nsRepository -> nsIComponentManager changes. 1999-03-09 09:44:27 +00:00
cmanske@netscape.com 2f91fb14cb Fixed editor classes to do autoregistration correctly and moved target directory to bin/components 1999-03-08 22:46:33 +00:00
cmanske@netscape.com 1f37937813 Changed editor classes to inherited model. Fixed lots of destructor warnings. 1999-03-05 21:05:35 +00:00
scc@netscape.com 6bb3406b4d rename |IID()| --> |GetIID()| 1999-03-03 19:48:57 +00:00
mjudge@netscape.com 0113858a0a fixes for selection code, batching at correct point 1999-03-03 01:51:59 +00:00
scc@netscape.com 7ed0f71600 fixed for nsCOMPtr: no construction or assignment from raw COM interface pointers 1999-03-02 22:27:46 +00:00
buster@netscape.com 3976084fc3 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 786d067af5 Implemented nsHTMLEditor. Changed prototypes to be use NS_IMETHOD and NS_IMETHODIMP. Started table editing transactions 1999-03-02 05:30:53 +00:00
ebina@netscape.com 035c42cfa9 Changing RegisterFactory to use the new API. 1999-02-26 15:59:52 +00:00
warren@netscape.com c953eabbf9 Changes for RDF component registration using nsRepository. Also changed args to NSGetFactory and friends. 1999-02-26 10:17:14 +00:00
buster@netscape.com ec455b8b0d added InsertElementTxn
added nsEditProperty
beginning of implementation for SetTextProperties.  Currently, it only works if the selection is entirely within a single text node.  Currently only
supports bold and italic (mapped to ctrl-b and ctrl-i for testing purposes.)
changed a bunch of interfaces to make things easier, like CreateElement now returns (as an out-param) the element created.
1999-02-24 17:24:37 +00:00
warren@netscape.com 3fdebc0a44 Cleaned up nsICollection and nsIEnumerator. Broke out nsIBidirectionalEnumerator. Added ISupportsArray enumerator. Cleaned nsISupportsArray. 1999-02-23 08:10:24 +00:00
buster@netscape.com bf9f7fb961 caught up to new ScrollIntoView changes.
most transactions now properly set selection after modifying content, for Do, Undo, Redo.
lots of cleanup and minor bug fixes.
1999-02-22 15:53:31 +00:00
mjudge@netscape.com ebfc4d3795 depricating the ScrollIntoView call. dont need it. the selection modification assures us of scrolling to view after batching. 1999-02-21 03:48:52 +00:00
buster@netscape.com 482c184a50 beginning work on ScrollToFrame 1999-02-20 21:29:27 +00:00
mcafee@netscape.com 357e75196c Solaris: adding do_QueryInterface() wrappers to finish scc's nsCOMPtr carpool. a=scc 1999-02-19 11:30:31 +00:00
mcafee@netscape.com 02fbe1dc0c Adding do_QueryInterface() wrapper for Solaris, this is the other part of scc's nsCOMPtr carpool 1999-02-18 23:18:56 +00:00
buster@netscape.com 3c2f652691 work in progress 1999-02-18 23:01:06 +00:00
buster@netscape.com cbe2ff0303 Highlights:
updated to new nsCOMPtr usage
nsTextEditor::InsertBreak() implemented
  splits the text node at the caret (deletes any extended selection to force a collapsed selection.)
  inserts a <BR> which I assume we'll convert to a CR when we write to a text stream.
  undo and redo work, except for the bug noted below

More stuff:
interface cleanup
strategic debugging code added
delete selection txn sets the collapses the selection...this is just a placeholder, but I needed it for undo/redo of InsertBreak.
join and split now work for text nodes as well as interior nodes
1999-02-17 19:42:29 +00:00
danm@netscape.com 6d14faf748 fixing compilation problems with new nsCOMPtr. part of the carpool. 1999-02-17 06:18:11 +00:00
mjudge@netscape.com 9b21ccf92d new modifications to nsCOMPtr to explicitly change to QueryInterface 1999-02-17 01:59:56 +00:00
buster@netscape.com 38d0cdeca1 minor fixes and lots of comments 1999-02-15 18:25:30 +00:00
sfraser@netscape.com 6cdf7e87bd Cause the caret to become visible in the presentation shell when instantiating an editor. 1999-02-13 04:48:09 +00:00
buster@netscape.com 208d5ef30d changed deleteSelection back to not use the range 1999-02-12 19:36:18 +00:00
buster@netscape.com a07341197c changed DeleteSelection back to using nsIDOMRange directly. 1999-02-12 18:09:38 +00:00
kipp@netscape.com 74b2988510 COMized nsIPresShell and nsIPresContext 1999-02-12 17:45:58 +00:00
buster@netscape.com 29eddc6299 * the viewer test app now instantiates an nsITextEditor via nsRepository for "Editor mode"
* the TxnMgr is invoked by the editor via nsRepository
* editor.h|cpp have been renamed nsEditor.h|cpp for consistency
* editorInterfaces.h|cpp have been renamed nsEditorEventListeners.c|hpp
* added nsITextEditor.h, nsTextEditor.h|cpp.  The text editor is a placeholder for the rules unique to text
editing.  It invokes the nsIEditor to do core editing operations.
* reworked nsIEditor and related interfaces as per emerging design.
* nsEditor::BeginTransaction and EndTransaction call nsTransactionManager::BeginBatch and EndBatch.
1999-02-12 17:18:58 +00:00