130 Commits

Author SHA1 Message Date
buster%netscape.com
d859f3e58c 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


git-svn-id: svn://10.0.0.236/trunk@23540 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 19:48:13 +00:00
cmanske%netscape.com
fc43b4f0d4 2nd try to get it right in get editor factory method
git-svn-id: svn://10.0.0.236/trunk@23400 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 23:06:16 +00:00
cmanske%netscape.com
70947d83ca Fixed editor registration and startup problems
git-svn-id: svn://10.0.0.236/trunk@23398 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 22:52:24 +00:00
jfrancis%netscape.com
8e01fb29f9 catching up with nsComponentManager and getting rid of cout usage
git-svn-id: svn://10.0.0.236/trunk@23357 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 20:11:27 +00:00
jfrancis%netscape.com
fc33b92b99 including header
git-svn-id: svn://10.0.0.236/trunk@23354 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 20:04:59 +00:00
jfrancis%netscape.com
772f3287c8 integrated with content iterator
git-svn-id: svn://10.0.0.236/trunk@23343 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 19:22:48 +00:00
warren%netscape.com
e082c74dc0 Backed out the nsService template stuff.
git-svn-id: svn://10.0.0.236/trunk@23320 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 11:49:41 +00:00
warren%netscape.com
0b33372d99 nsRepository -> nsIComponentManager changes.
git-svn-id: svn://10.0.0.236/trunk@23300 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 09:44:27 +00:00
cmanske%netscape.com
dea2088bcb Fixed editor classes to do autoregistration correctly and moved target directory to bin/components
git-svn-id: svn://10.0.0.236/trunk@23216 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-08 22:46:33 +00:00
sfraser%netscape.com
c5cf61dbdb 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.
git-svn-id: svn://10.0.0.236/trunk@23075 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 20:32:48 +00:00
cmanske%netscape.com
6987407539 Changed editor classes to inherited model. Fixed lots of destructor warnings.
git-svn-id: svn://10.0.0.236/trunk@22944 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-05 21:05:35 +00:00
scc%netscape.com
817f56596f rename |IID()| --> |GetIID()|
git-svn-id: svn://10.0.0.236/trunk@22744 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 19:48:57 +00:00
mjudge%netscape.com
86f2920385 fixes for selection code, batching at correct point
git-svn-id: svn://10.0.0.236/trunk@22674 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 01:51:59 +00:00
scc%netscape.com
84d4e393bc fixed for nsCOMPtr: no construction or assignment from raw COM interface pointers
git-svn-id: svn://10.0.0.236/trunk@22609 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 22:27:46 +00:00
buster%netscape.com
19e607046b 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.


git-svn-id: svn://10.0.0.236/trunk@22543 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 07:52:41 +00:00
cmanske%netscape.com
202c5b89dc Implemented nsHTMLEditor. Changed prototypes to be use NS_IMETHOD and NS_IMETHODIMP. Started table editing transactions
git-svn-id: svn://10.0.0.236/trunk@22534 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 05:30:53 +00:00
cmanske%netscape.com
e768f77e73 New files for nsHTMLEditor and table editing transactions (not working yet)
git-svn-id: svn://10.0.0.236/trunk@22463 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-01 19:54:47 +00:00
ebina%netscape.com
f3c0c2ca83 Changing RegisterFactory to use the new API.
git-svn-id: svn://10.0.0.236/trunk@22111 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 15:59:52 +00:00
warren%netscape.com
49ed8e046f Changes for RDF component registration using nsRepository. Also changed args to NSGetFactory and friends.
git-svn-id: svn://10.0.0.236/trunk@22094 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 10:17:14 +00:00
mcafee%netscape.com
42298d96aa readding my fix that buster whomped.
git-svn-id: svn://10.0.0.236/trunk@22045 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 03:46:08 +00:00
buster%netscape.com
8579381793 minor bug fixes
git-svn-id: svn://10.0.0.236/trunk@21898 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 16:09:18 +00:00
mcafee%netscape.com
1afcb664e6 Solaris needs newline at end of file
git-svn-id: svn://10.0.0.236/trunk@21844 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 03:34:39 +00:00
buster%netscape.com
7218a4a579 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.


git-svn-id: svn://10.0.0.236/trunk@21760 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-24 17:24:37 +00:00
warren%netscape.com
cb10d9f3a0 Cleaned up nsICollection and nsIEnumerator. Broke out nsIBidirectionalEnumerator. Added ISupportsArray enumerator. Cleaned nsISupportsArray.
git-svn-id: svn://10.0.0.236/trunk@21585 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-23 08:10:24 +00:00
buster%netscape.com
fb7ad5c58c 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.


git-svn-id: svn://10.0.0.236/trunk@21466 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-22 15:53:31 +00:00
mjudge%netscape.com
988ca9603d depricating the ScrollIntoView call. dont need it. the selection modification assures us of scrolling to view after batching.
git-svn-id: svn://10.0.0.236/trunk@21430 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-21 03:48:52 +00:00
buster%netscape.com
4df8a07f61 beginning work on ScrollToFrame
git-svn-id: svn://10.0.0.236/trunk@21408 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-20 21:29:27 +00:00
mjudge%netscape.com
25715df9ea adding batching for selection.
git-svn-id: svn://10.0.0.236/trunk@21355 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 23:41:49 +00:00
brade%netscape.com
3c77f58b02 move local variable into comment block to reduce warnings on Macintosh compiler
git-svn-id: svn://10.0.0.236/trunk@21308 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 16:11:23 +00:00
brade%netscape.com
1326f793c9 remove unused local variable to reduce warnings on Macintosh compiler
git-svn-id: svn://10.0.0.236/trunk@21307 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 16:09:37 +00:00
mcafee%netscape.com
92753a46b3 Solaris: adding do_QueryInterface() wrappers to finish scc's nsCOMPtr carpool. a=scc
git-svn-id: svn://10.0.0.236/trunk@21297 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 11:30:31 +00:00
mcafee%netscape.com
0434d32b61 Adding do_QueryInterface() wrapper for Solaris, this is the other part of scc's nsCOMPtr carpool
git-svn-id: svn://10.0.0.236/trunk@21232 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 23:18:56 +00:00
mcafee%netscape.com
7ecd89e7c3 Solaris needs newline at end of file.
git-svn-id: svn://10.0.0.236/trunk@21230 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 23:09:08 +00:00
buster%netscape.com
0a8d990683 work in progress
git-svn-id: svn://10.0.0.236/trunk@21229 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 23:01:06 +00:00
mcafee%netscape.com
0ca9f24e74 Adding newline at end of file for Solaris/CC
git-svn-id: svn://10.0.0.236/trunk@21141 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-18 12:14:59 +00:00
buster%netscape.com
f62022c72f 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


git-svn-id: svn://10.0.0.236/trunk@21009 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 19:42:29 +00:00
buster%netscape.com
2faefdcbe3 private interface for editor, used for common editing operations that
we don't want to expose publically.


git-svn-id: svn://10.0.0.236/trunk@20997 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 18:34:41 +00:00
danm%netscape.com
9d9fe04c5a fixing compilation problems with new nsCOMPtr. part of the carpool.
git-svn-id: svn://10.0.0.236/trunk@20899 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 06:18:11 +00:00
mjudge%netscape.com
935f3ddcd6 new modifications to nsCOMPtr to explicitly change to QueryInterface
git-svn-id: svn://10.0.0.236/trunk@20849 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 01:59:56 +00:00
buster%netscape.com
0bda0d910f minor fixes and lots of comments
git-svn-id: svn://10.0.0.236/trunk@20730 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-15 18:25:30 +00:00
buster%netscape.com
72d2391591 merges text insertions again, based on new aggregate insert txn
git-svn-id: svn://10.0.0.236/trunk@20729 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-15 18:24:58 +00:00
sfraser%netscape.com
971ead2abc Cause the caret to become visible in the presentation shell when instantiating an editor.
git-svn-id: svn://10.0.0.236/trunk@20658 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-13 04:48:09 +00:00
buster%netscape.com
bd7d899204 changed deleteSelection back to not use the range
git-svn-id: svn://10.0.0.236/trunk@20608 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-12 19:36:18 +00:00
buster%netscape.com
34595f93fb changed DeleteSelection back to using nsIDOMRange directly.
git-svn-id: svn://10.0.0.236/trunk@20572 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-12 18:09:38 +00:00
kipp%netscape.com
9b917419dc COMized nsIPresShell and nsIPresContext
git-svn-id: svn://10.0.0.236/trunk@20570 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-12 17:45:58 +00:00
buster%netscape.com
6d04acb923 * 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.


git-svn-id: svn://10.0.0.236/trunk@20562 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-12 17:18:58 +00:00
akkana%netscape.com
0ebe0a4652 Rename nsISelection to nsIFrameSelection
git-svn-id: svn://10.0.0.236/trunk@20457 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-11 23:12:28 +00:00
akkana%netscape.com
52b18e6064 Implement a new interface, nsIDOMSelection, intended to become the
external interface for selection (to be IDL-ified later).

Fix some editor bugs:
- Advance the cursor on text insert (so text is inserted in the right order)
- Make DeleteSelection in the editor call the actual selection
- Make DeleteSelection update the frames' notion of the selection


git-svn-id: svn://10.0.0.236/trunk@19029 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-29 18:57:56 +00:00
buster%netscape.com
9d27388bf5 fixed some UMR's due to mRefCnt being uninitialized. This fixes some memory leaks.
git-svn-id: svn://10.0.0.236/trunk@18934 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-28 19:45:23 +00:00
buster%netscape.com
956232ee80 put in crude support for aggregating type-ins across selection changes.
this needs to get beefed up to handle offsets within elements, which we'll
do as soon as selection is set properly following an insertion.


git-svn-id: svn://10.0.0.236/trunk@18931 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-28 19:00:14 +00:00