381 Commits

Author SHA1 Message Date
mcafee%netscape.com
b65f92a67b Initializing some variables, protecting a null reference.
git-svn-id: svn://10.0.0.236/trunk@25983 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-02 01:34:05 +00:00
sfraser%netscape.com
e51ed48fbd Call the new presshell->SetCaretEnabled() call to show the caret when
editing.


git-svn-id: svn://10.0.0.236/trunk@25956 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-02 00:01:31 +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
5b08ebbd5d needed to include "nsCoord.h" in mixed case, not "nscoord"
git-svn-id: svn://10.0.0.236/trunk@25890 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-01 19:26:27 +00:00
buster%netscape.com
726862e213 initial checkin.
git-svn-id: svn://10.0.0.236/trunk@25880 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-01 18:40: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
rods%netscape.com
3d9eafaa3c Fixed up new ifdef'ed clipboard support
git-svn-id: svn://10.0.0.236/trunk@25848 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-01 14:28:13 +00:00
kin%netscape.com
002a443fc3 Removed nsITextServicesDocumentInternal.h.
git-svn-id: svn://10.0.0.236/trunk@25750 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-31 22:10:42 +00:00
kin%netscape.com
d581e6208f Initial checkin of file.
git-svn-id: svn://10.0.0.236/trunk@25725 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-31 19:26:55 +00:00
kin%netscape.com
143641b144 Initial checkin of files.
git-svn-id: svn://10.0.0.236/trunk@25721 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-31 19:25:05 +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
add9ef7ae5 don't drop tab keys
git-svn-id: svn://10.0.0.236/trunk@25440 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-29 08:02:50 +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
jfrancis%netscape.com
bfe4edbf65 Adding nsHTMLEditRules.cpp
git-svn-id: svn://10.0.0.236/trunk@25438 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-29 08:01:21 +00:00
jfrancis%netscape.com
bdd8af18e1 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@25437 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-29 06:21:01 +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
rods%netscape.com
1e195c10d5 Minor changes to call to new clipboard
git-svn-id: svn://10.0.0.236/trunk@25220 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-26 15:49:28 +00:00
mcafee%netscape.com
78f453eef5 Renamed GetTransferable() to GetData()
git-svn-id: svn://10.0.0.236/trunk@25139 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-25 23:39:03 +00:00
mcafee%netscape.com
6a5c4e0f48 initializing a variable to zero.
git-svn-id: svn://10.0.0.236/trunk@24988 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-24 09:08:24 +00:00
mcafee%netscape.com
83d83ef5df Checking for null references on clipboard, trans (gtk/unix).
git-svn-id: svn://10.0.0.236/trunk@24940 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-24 01:43:46 +00:00
rods%netscape.com
f82195869f Added code for switching over Clipboard support to new classes
At the moment the are ifdef'ed out


git-svn-id: svn://10.0.0.236/trunk@24843 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-23 15:45:58 +00:00
akkana%netscape.com
8d57bb62e9 Add hard-coded alt-I for testing insert html
git-svn-id: svn://10.0.0.236/trunk@24708 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-22 22:10:29 +00:00
jfrancis%netscape.com
6a6a648796 bug 4057: fix is in layout; here I'm removing the old workaround code
git-svn-id: svn://10.0.0.236/trunk@24664 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-22 09:04:06 +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
leaf%mozilla.org
8fadf11677 Landing nspr library name change, and plevent function call change.
git-svn-id: svn://10.0.0.236/trunk@24276 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-17 21:32:03 +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
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
8851e742d6 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)


git-svn-id: svn://10.0.0.236/trunk@24209 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-16 16:38:09 +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
518e2bdc59 added files: mozilla/editor/base/PlaceholderTxn.cpp
git-svn-id: svn://10.0.0.236/trunk@24152 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-15 00:58:15 +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
buster%netscape.com
7cc6cda1c5 added checks for DOM Key event returning 0x0 key code. If we get 0, we bail.
git-svn-id: svn://10.0.0.236/trunk@24098 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 04:12:21 +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
kostello%netscape.com
200ff1e40c Add HACKForceRedraw() to force a redraw until the drawing
problems are solved in Gecko


git-svn-id: svn://10.0.0.236/trunk@24088 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-14 00:31:35 +00:00
buster%netscape.com
c40ea0b1ef InsertBreak now works at the beginning of a line. Plus a trivial bug fix.
git-svn-id: svn://10.0.0.236/trunk@24057 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-13 05:31:22 +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
sfraser%netscape.com
1c80fd42e0 Throw the switch so we now pay attention to the charCode in the key event.
git-svn-id: svn://10.0.0.236/trunk@23893 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 05:28:22 +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
buster%netscape.com
3475d199f3 fixed a small bug. mRefNode may be nsnull.
git-svn-id: svn://10.0.0.236/trunk@23835 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 02:27:48 +00:00
mjudge%netscape.com
e4c09191d6 reverting fix :(
git-svn-id: svn://10.0.0.236/trunk@23830 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 01:49:12 +00:00
mjudge%netscape.com
a1cd7388b4 fixed copy paste issue on windows, linking wrong.lib file
git-svn-id: svn://10.0.0.236/trunk@23797 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 00:01: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
sfraser%netscape.com
ab21987cd6 Fix the key handling, and fix my macro for the charCode stuff
git-svn-id: svn://10.0.0.236/trunk@23712 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 19:34:28 +00:00
sfraser%netscape.com
2af73d37f9 Add SelectAll()
git-svn-id: svn://10.0.0.236/trunk@23711 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 19:33:37 +00:00
sfraser%netscape.com
3e711b3574 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).
git-svn-id: svn://10.0.0.236/trunk@23676 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 06:42:09 +00:00
sfraser%netscape.com
a95ee16903 Add widget.shlb to fix link bustage
git-svn-id: svn://10.0.0.236/trunk@23630 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-11 01:26:19 +00:00