28 Commits

Author SHA1 Message Date
jfrancis%netscape.com
386e43e682 improved paste performance in editor (WIP) (bug 28783)
set/remove inline stlye rewrite (lots of bug #s)


git-svn-id: svn://10.0.0.236/trunk@63948 18797224-902f-48f8-a5cc-f745e15eee43
2000-03-24 00:26:47 +00:00
jfrancis%netscape.com
11faed23b2 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).


git-svn-id: svn://10.0.0.236/trunk@56714 18797224-902f-48f8-a5cc-f745e15eee43
2000-01-04 03:09:41 +00:00
dmose%mozilla.org
0efb7c174c updated xPL license boilerplate to v1.1, a=chofmann@netscape.com,r=endico@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@52910 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-06 03:43:54 +00:00
brade%netscape.com
7e0421e57c allow for txn to have id/string for get/set
git-svn-id: svn://10.0.0.236/trunk@48658 18797224-902f-48f8-a5cc-f745e15eee43
1999-09-21 22:31:27 +00:00
akkana%netscape.com
89f665e0c5 Turn on whitespace insertion
git-svn-id: svn://10.0.0.236/trunk@47596 18797224-902f-48f8-a5cc-f745e15eee43
1999-09-15 17:55:41 +00:00
akkana%netscape.com
c02f965115 490: infrastructure for inserting formatting whitespace. Not turned on yet except for DEBUG_akkana
git-svn-id: svn://10.0.0.236/trunk@46804 18797224-902f-48f8-a5cc-f745e15eee43
1999-09-10 18:54:13 +00:00
buster%netscape.com
d1193affa0 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.


git-svn-id: svn://10.0.0.236/trunk@43590 18797224-902f-48f8-a5cc-f745e15eee43
1999-08-19 13:30:48 +00:00
mjudge%netscape.com
329d39ba11 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.
git-svn-id: svn://10.0.0.236/trunk@39971 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-18 02:27:19 +00:00
mjudge%netscape.com
757f22388f checkin for carpool for multiple seleciton/ime selection and api changes
git-svn-id: svn://10.0.0.236/trunk@39542 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-15 18:19:20 +00:00
sfraser%netscape.com
64b0f22ee5 Change the transactions to have non-owning pointers to the editor.
git-svn-id: svn://10.0.0.236/trunk@33043 18797224-902f-48f8-a5cc-f745e15eee43
1999-05-28 00:16:55 +00:00
kin%netscape.com
ee983116d2 Changed all occurrences of GetUndoString() and GetRedoString() to accept nsString *.
git-svn-id: svn://10.0.0.236/trunk@32955 18797224-902f-48f8-a5cc-f745e15eee43
1999-05-27 20:50:52 +00:00
buster%netscape.com
9a004fa0f0 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.


git-svn-id: svn://10.0.0.236/trunk@30367 18797224-902f-48f8-a5cc-f745e15eee43
1999-05-05 04:05:19 +00:00
buster%netscape.com
64e11a9d2f vastly improved RemoveTextProperty
turned off debug output


git-svn-id: svn://10.0.0.236/trunk@27115 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-11 22:55:40 +00:00
buster%netscape.com
e124ff90ed RemoveTextPropery works in all cases now.
git-svn-id: svn://10.0.0.236/trunk@26481 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-06 18:21:43 +00:00
buster%netscape.com
baaca59f79 implemented simple cases of RemoveTextProperty. other cases are no-op'd now.
added aFirst out param to GetTextProperty, so the caller can know if the first character has the property in the case of aAny=true and aAll=false.
fixed a bunch of places where result was being used incorrectly as a return val from do_QueryInterface
some minor undo/redo fixes to split and join of interior nodes.


git-svn-id: svn://10.0.0.236/trunk@26218 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-04 18:01:35 +00:00
buster%netscape.com
0fe8e1324d 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.


git-svn-id: svn://10.0.0.236/trunk@25869 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-01 17:58:07 +00:00
buster%netscape.com
3ee55b4626 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


git-svn-id: svn://10.0.0.236/trunk@24272 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-17 20:56:10 +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
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
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
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
ea9a76f945 changed nsIEditor to enable undo separately from Init
work in progress API changes to nsIEditor and nsEditor


git-svn-id: svn://10.0.0.236/trunk@18914 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-28 06:02:53 +00:00
buster%netscape.com
f1bacd2e07 made GetIsTransient return false by default, so most transactions don't need to implement GetIsTransient
made delete and backspace do the right thing (testing hacks removed)


git-svn-id: svn://10.0.0.236/trunk@18304 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-22 15:40:31 +00:00
buster%netscape.com
b48e2caf7c * added TransactionFactory. Editor no longer allocates its own transactions. This gives us an oppurtunity for a recycler.
* added DeleteSelection to editor.  Doesn't work very well yet because selection is giving me random offsets into text content.
* lots of work in the various transactions.


git-svn-id: svn://10.0.0.236/trunk@18122 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 01:51:09 +00:00
buster%netscape.com
dceac9452d added DeleteElementTxn and DeleteRangeTxn, and added merging of text insertions.
added some better error checking on all transactions.


git-svn-id: svn://10.0.0.236/trunk@17740 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-14 18:02:45 +00:00
buster%netscape.com
8a19fb26be shuffled around the responsibilities of core editing objects.
The key listener is now mostly a mapper of key events to editor actions.  Soon, this should be 100% true.
The editor builds transactions that are themselves intelligent. The editor makes very few DOM calls itself.
It relies on the transactions to do most of the actual editing.


git-svn-id: svn://10.0.0.236/trunk@17518 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-11 22:47:23 +00:00
buster%netscape.com
be4b7d375b better code factoring, so split and join base methods can be reused
git-svn-id: svn://10.0.0.236/trunk@17428 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-09 00:24:48 +00:00
buster%netscape.com
62f2a08600 SplitElementTxn implementation. Do only.
test with Control-S.


git-svn-id: svn://10.0.0.236/trunk@17391 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-08 22:16:22 +00:00