52 Commits

Author SHA1 Message Date
buster%netscape.com
a907540332 factored out re-parenting of content into MoveContentIntoNewParent
WIP on font handling.


git-svn-id: svn://10.0.0.236/trunk@27862 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-16 18:29:12 +00:00
sfraser%netscape.com
e6296a153a Adapt to fixed selection interface
git-svn-id: svn://10.0.0.236/trunk@27662 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-15 20:20:12 +00:00
buster%netscape.com
d7cdf20fb8 * beginnings of font handling. WIP, I did a big merge today and I'm checking in to synch up, not to announce new functionality here.
* added TextEditorTest.cpp, a unit test module for nsTextEditor.  It's use is actually commented out since my checkin is happening so late due
to all-day build bustage, and I don't have a Mac handy to verify.  With someone's Mac help tomorrow, I can turn it on.
* some minor bug fixes to property handling


git-svn-id: svn://10.0.0.236/trunk@27556 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-15 06:06:33 +00:00
jfrancis%netscape.com
427a56fc02 merging in rules work with Simon's selection changes
git-svn-id: svn://10.0.0.236/trunk@27324 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-13 13:35:08 +00:00
sfraser%netscape.com
bbda90e2b0 Updated to conform to new IDL-ized selection interfaces.
git-svn-id: svn://10.0.0.236/trunk@27289 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-13 01:33:32 +00:00
jfrancis%netscape.com
c6d12c638f checkpointing html typing rules
git-svn-id: svn://10.0.0.236/trunk@27152 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-12 12:01:32 +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
mjudge%netscape.com
af245251eb fixed selection results after bold/italics. 4593 bug. simply collapsed range and extended it to take up the whole new range
git-svn-id: svn://10.0.0.236/trunk@26771 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-08 01:30:05 +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
a29a790970 fixed bug 4517
WIP on remove text attributes


git-svn-id: svn://10.0.0.236/trunk@26317 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-05 20:52:29 +00:00
jfrancis%netscape.com
48b2757fd1 bug fix: typing didn't work
git-svn-id: svn://10.0.0.236/trunk@26307 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-05 19:21:22 +00:00
jfrancis%netscape.com
f104246088 redoing rules architecture
git-svn-id: svn://10.0.0.236/trunk@26297 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-05 17:21:59 +00:00
buster%netscape.com
937b6ed03a 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.


git-svn-id: svn://10.0.0.236/trunk@26223 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-04 20:10:39 +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
7f4e37a3db GetTextProperty is now content-based, not style-based
git-svn-id: svn://10.0.0.236/trunk@25892 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-01 19:28:48 +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
ramiro%netscape.com
52ef5e02cd delete vs. delete[] vs. free fixes.
Thanks to "Bruce Mitchener, Jr." <bruce@cybersight.com for finding all these
and making patches.


git-svn-id: svn://10.0.0.236/trunk@25592 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-30 05:26:59 +00:00
akkana%netscape.com
dd6ab917f7 Editor: Add Insert Link and Image
git-svn-id: svn://10.0.0.236/trunk@25455 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-29 22:01:26 +00:00
jfrancis%netscape.com
46bf828d41 seperating out html edit rules from text edit rules
git-svn-id: svn://10.0.0.236/trunk@25439 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-29 08:02:05 +00:00
joki%netscape.com
e92adc111d Changing api uses in editor, rdf, and xpfe to match DOM2 api name/param changes.
git-svn-id: svn://10.0.0.236/trunk@25420 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-28 22:27:38 +00:00
tague%netscape.com
b473550518 Added support for basic Japanese input on Win32
git-svn-id: svn://10.0.0.236/trunk@24498 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-19 23:36:20 +00:00
buster%netscape.com
6e1117a873 small change to match change in semantics in nsIDOMRange::GetCommonParent
git-svn-id: svn://10.0.0.236/trunk@24345 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-18 21:55:23 +00:00
buster%netscape.com
041f73c845 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.


git-svn-id: svn://10.0.0.236/trunk@24254 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-17 06:13:46 +00:00
buster%netscape.com
506d9a9565 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.


git-svn-id: svn://10.0.0.236/trunk@24160 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-15 05:08:30 +00:00
buster%netscape.com
ef5f3265cc 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.


git-svn-id: svn://10.0.0.236/trunk@24151 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-15 00:57:32 +00:00
rods%netscape.com
59be444747 Added DragListener for Drag & Drop (it's not turned on)
git-svn-id: svn://10.0.0.236/trunk@24102 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 04:45:00 +00:00
kostello%netscape.com
7ba2fb1536 Added HACKForceRedraw() when deleting a range or inserting text
git-svn-id: svn://10.0.0.236/trunk@24090 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 01:02:53 +00:00
buster%netscape.com
3900dace67 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.


git-svn-id: svn://10.0.0.236/trunk@24055 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 04:53:21 +00:00
kostello%netscape.com
5d9eb5bd73 Force Redraw on Enter: this is a workaround for bug#3356 & bug#3639
git-svn-id: svn://10.0.0.236/trunk@23946 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 15:40:29 +00:00
buster%netscape.com
b6be8ea31d 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.


git-svn-id: svn://10.0.0.236/trunk@23836 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 02:28:24 +00:00
sfraser%netscape.com
6a3d01cd40 Fix for 3630 -- terminate text and HTML strings returned from the editor.
git-svn-id: svn://10.0.0.236/trunk@23766 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 21:31:03 +00:00
akkana%netscape.com
109aad3dea Fix Solaris build problems -- thanks to braddr & bruce @ puremagic.com
git-svn-id: svn://10.0.0.236/trunk@23591 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 22:41:18 +00:00
sfraser%netscape.com
0a1636794b Add Cut, Copy and Paste to editor interfaces and classes, with a stub implemenatioon in nsEditor.
git-svn-id: svn://10.0.0.236/trunk@23571 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 21:29:41 +00:00
buster%netscape.com
0b0989c61c improvements to InsertBreak, and first crack at adding support for rules delegate
git-svn-id: svn://10.0.0.236/trunk@23541 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 19:48:46 +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
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
mcmullen%netscape.com
f90ec6e3ba Adapt to new Write()
git-svn-id: svn://10.0.0.236/trunk@22992 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 00:27:37 +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
kostello%netscape.com
575a96dca1 Added Implementations for OutputHTML and OutputTXT
git-svn-id: svn://10.0.0.236/trunk@22785 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-04 21:53:42 +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
mcafee%netscape.com
43188f40b8 Adding do_QueryInterface() to fix Solaris/nxCOMPtr ambiguity.
git-svn-id: svn://10.0.0.236/trunk@22046 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-26 03:50:37 +00:00
buster%netscape.com
b18e41adc0 edge conditions now supported for SetTextProperty. You now get correct behavior when you select the beginning of a text block, or the end.
You now get correct behavior if the selection spans multiple text blocks, as long as the blocks have the same grandparent.


git-svn-id: svn://10.0.0.236/trunk@21895 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-25 16:05:43 +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
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
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
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
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
buster%netscape.com
8f155a860a fix mac build for new nsCOMPtr code
git-svn-id: svn://10.0.0.236/trunk@21020 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 20:44:44 +00:00