79 Commits

Author SHA1 Message Date
akkana%netscape.com
91f72d1f82 Implement InsertHTML.
Also, some minor fixes, like warning removal and addition of error checking
in files which needed it.


git-svn-id: svn://10.0.0.236/trunk@34645 18797224-902f-48f8-a5cc-f745e15eee43
1999-06-10 21:31:42 +00:00
akkana%netscape.com
cabff886d3 Add alt-X and alt-shift-x for debug output html and text
git-svn-id: svn://10.0.0.236/trunk@34439 18797224-902f-48f8-a5cc-f745e15eee43
1999-06-09 19:12:28 +00:00
tague%netscape.com
c14a08ca40 Conditional fix for #7629. Only builds with a conditional set in my environment
git-svn-id: svn://10.0.0.236/trunk@34359 18797224-902f-48f8-a5cc-f745e15eee43
1999-06-09 03:17:56 +00:00
akkana%netscape.com
d0bcfd4327 5380: middle-mouse paste to correct position in the editor
git-svn-id: svn://10.0.0.236/trunk@34287 18797224-902f-48f8-a5cc-f745e15eee43
1999-06-08 21:51:40 +00:00
buster%netscape.com
4bad1b96b8 * Added nsAutoSelectionReset, a tiny class that resets the selection to what it was before a block transformation.
* Added some code to restore selection after RemoveTextProperty.
* Made a tiny change to the way the editor holds onto the transaction manager, so client (like the ender text control) can
turn undo on and off effectively
* Fixed a bug in IsNodeInline that was causing GetBlockParent to return the wrong parent node (and who knows what
other mischief) where atom compares were being done on strings of different case, for <B>, "b" vs. "B".  The DOM
method nsIDOMElement::GetTagName forced the returned tag name to upper case.  I don't know how long that has
been true, but I assume it's a fairly recent change (or something on our side related to it changed recently) or this method
never would have worked.  I also found a few cases of nsString::Equals that I changed to EqualsIgnoreCase
* Made some general improvements to the interaction between editors and rules, so that the aCancel out param is always
intialized, and all rules with Will... are matched with a Did... call.  Added Will/DidSetTextProperty() and
Will/DidRemoveTextProperty().  This helps enable plain text mode.  Added a skeleton for max length support in text editor.
* fixed some warnings.


git-svn-id: svn://10.0.0.236/trunk@34183 18797224-902f-48f8-a5cc-f745e15eee43
1999-06-08 06:04:51 +00:00
pinkerton%netscape.com
2c58808b6f changes so that transferable no longer takes ownership of dataflavor string, but correctly copies it. fix some memory leaks as well.
git-svn-id: svn://10.0.0.236/trunk@34060 18797224-902f-48f8-a5cc-f745e15eee43
1999-06-07 20:43:23 +00:00
tague%netscape.com
a367379062 Fix for #6896: Windows editor interprests the '.' key as a forward delete. Not building by default -- will switch over once tested on Mac and Unix.
git-svn-id: svn://10.0.0.236/trunk@33724 18797224-902f-48f8-a5cc-f745e15eee43
1999-06-04 05:14:01 +00:00
jfrancis%netscape.com
61ea2c363e groundwork for block transformation functionality
git-svn-id: svn://10.0.0.236/trunk@33512 18797224-902f-48f8-a5cc-f745e15eee43
1999-06-03 06:01:08 +00:00
buster%netscape.com
9041cef161 Preparation for ender-based text control
* added focus listener.  Doesn't do much yet, but when focus notifications start appearing, we'll be ready for them.  The code is in
place to hide selection when we lose focus and paint selection when we get focus.  That's probably not quite right, but it's a start.
We will need to be able to determine the distinction between losing focus to another control within our app, and losing focus to
another app.
* added support for disabled and readonly states in the editor.  This is accomplished by having flags set by the client, and letting the
rules system deal with those flags.  The flags I added are:
     TEXT_EDITOR_FLAG_PLAINTEXT   0x01   // only plain text editing is allowed
     TEXT_EDITOR_FLAG_SINGLELINE  0x02   // enter key and CR-LF handled specially
     TEXT_EDITOR_FLAG_PASSWORD    0x04   // text is not entered into content, only a representative character
     TEXT_EDITOR_FLAG_READONLY    0x08   // editing events are disabled.  Editor may still accept focus.
     TEXT_EDITOR_FLAG_DISALBED    0x10   // all events are disabled (like scrolling).  Editor will not accept focus.
* added WillInsertBreak/DidInsertBreak into text rules, so flags could be checked.  This gets us readonly, disabled, and single line
behavior.
* cleaned up the code that allocates, registers, and destroys event listeners.  Thanks to Kin and Simon for cleaning up the
ownership model on the listeners, it was a big help.
* added support for a max text length.  You can now tell the text editor, be no bigger than n characters.


git-svn-id: svn://10.0.0.236/trunk@33153 18797224-902f-48f8-a5cc-f745e15eee43
1999-05-28 21:24:18 +00:00
sfraser%netscape.com
a3971dfdc8 Fix the event listeners to no longer hold owning pointer to the editor.
git-svn-id: svn://10.0.0.236/trunk@33046 18797224-902f-48f8-a5cc-f745e15eee43
1999-05-28 00:19:51 +00:00
rickg%netscape.com
0ca0dd52fd changed to align with nsString2
git-svn-id: svn://10.0.0.236/trunk@32924 18797224-902f-48f8-a5cc-f745e15eee43
1999-05-27 07:38:37 +00:00
sfraser%netscape.com
e35dabfe6c Remove the old key code function, and call the new unit test routine
git-svn-id: svn://10.0.0.236/trunk@32879 18797224-902f-48f8-a5cc-f745e15eee43
1999-05-27 04:08:59 +00:00
akkana%netscape.com
156d763247 Insert / Paste as Quotation.
git-svn-id: svn://10.0.0.236/trunk@32824 18797224-902f-48f8-a5cc-f745e15eee43
1999-05-27 00:08:15 +00:00
akkana%netscape.com
3ec15b44de Add Internet and AOL style citers
git-svn-id: svn://10.0.0.236/trunk@32778 18797224-902f-48f8-a5cc-f745e15eee43
1999-05-26 23:14:05 +00:00
pinkerton%netscape.com
651d8eb4ff new multiple-item drag and drop apis.
git-svn-id: svn://10.0.0.236/trunk@32705 18797224-902f-48f8-a5cc-f745e15eee43
1999-05-26 21:08:14 +00:00
joki%netscape.com
5ff7e26f51 Breaking nsIDOMEvent out into nsIDOMEvent and nsIDOMUIEvent.
git-svn-id: svn://10.0.0.236/trunk@32168 18797224-902f-48f8-a5cc-f745e15eee43
1999-05-18 23:51:04 +00:00
pinkerton%netscape.com
60ffd063f4 fix a d&d bug introduced in the transferable interface merging and add a SetCanDrop at the point of the drop for MacOS.
git-svn-id: svn://10.0.0.236/trunk@31611 18797224-902f-48f8-a5cc-f745e15eee43
1999-05-14 18:44:28 +00:00
akkana%netscape.com
ad2018ef65 Implementations for new fcn Get/SetBodyWrapWidth
git-svn-id: svn://10.0.0.236/trunk@31472 18797224-902f-48f8-a5cc-f745e15eee43
1999-05-13 22:11:05 +00:00
rods%netscape.com
089a8e7024 removed reference to nsIDataFlavor and merged nsITransferable and nsIGenericTransferable
git-svn-id: svn://10.0.0.236/trunk@31462 18797224-902f-48f8-a5cc-f745e15eee43
1999-05-13 21:53:57 +00:00
rods%netscape.com
3668cb6393 Changed code to use the new DragSession interface
git-svn-id: svn://10.0.0.236/trunk@30711 18797224-902f-48f8-a5cc-f745e15eee43
1999-05-07 19:42:27 +00:00
akkana%netscape.com
93cc772d77 Middle-mouse paste; also, fix a bunch of warnings
git-svn-id: svn://10.0.0.236/trunk@30696 18797224-902f-48f8-a5cc-f745e15eee43
1999-05-07 19:22:38 +00:00
akkana%netscape.com
392f2f0298 - Rename iDirection enum to ECollapsedSelectionAction
- Initial implementation of Insert HTML


git-svn-id: svn://10.0.0.236/trunk@30432 18797224-902f-48f8-a5cc-f745e15eee43
1999-05-05 23:27:17 +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
tague%netscape.com
6b3b505007 Fixed bug #5527 (Editor is not able to accumulate successive Japanese input)
git-svn-id: svn://10.0.0.236/trunk@30002 18797224-902f-48f8-a5cc-f745e15eee43
1999-05-03 22:57:48 +00:00
buster%netscape.com
68a1ee7d46 with permission from chofmann:
1. fix for bug 5796, crash on exit.  This was a bad, bad memory smudge on my part, easily fixed by doing the right ref counting in the
right places.

2. some preliminary code for M6 block transformations has leaked into this checkin.  It's safer than trying to re-code the fix above into
a fresh tree.  Unless you're making calls to do block transformations, you won't see any difference.


git-svn-id: svn://10.0.0.236/trunk@29897 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-30 22:40:18 +00:00
joki%netscape.com
a158b164ef Adding scrolling fixes to fix bug #3999, A: chofmann
git-svn-id: svn://10.0.0.236/trunk@29867 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-30 19:38:39 +00:00
jfrancis%netscape.com
8591f5670e more html typing rules implementation
git-svn-id: svn://10.0.0.236/trunk@29166 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-26 14:08:52 +00:00
rickg%netscape.com
8832f32e49 sync with nsString2
git-svn-id: svn://10.0.0.236/trunk@29011 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-24 01:39:50 +00:00
rods%netscape.com
5b22bfbff7 Switch Drag&Drop over to nsCOMPtr and fixed service release
git-svn-id: svn://10.0.0.236/trunk@28841 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-23 14:43:30 +00:00
buster%netscape.com
1664ba068f vastly improved type-in state handling. smaller and faster
git-svn-id: svn://10.0.0.236/trunk@28704 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-22 14:46:53 +00:00
mcafee%netscape.com
9407a5b0b7 Removing NEW_CLIPBOARD_SUPPORT ifdef.
git-svn-id: svn://10.0.0.236/trunk@28668 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-22 05:41:51 +00:00
buster%netscape.com
a0c5370c5e added the notion of contain vs. replace for block transformations.
git-svn-id: svn://10.0.0.236/trunk@28519 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-21 21:01:59 +00:00
buster%netscape.com
0af3b54f63 factoring of text property code for reuse.
extended APIs to handle fonts -- the trick here is to allow attributes and values
to effectively describe independent properties.


git-svn-id: svn://10.0.0.236/trunk@28252 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-20 17:49:34 +00:00
buster%netscape.com
26494bf503 added tests for fonts and block transformations
git-svn-id: svn://10.0.0.236/trunk@28247 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-20 17:43:26 +00:00
rickg%netscape.com
2dd2265b49 sync with nsString2 API
git-svn-id: svn://10.0.0.236/trunk@28234 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-20 07:20:21 +00:00
rods%netscape.com
12e2328be7 Switched over nsIGenericTransferable
and added D&D Support


git-svn-id: svn://10.0.0.236/trunk@27985 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-17 13:52:28 +00:00
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
mcafee%netscape.com
b6293c712f Removing clipboard define comment.
git-svn-id: svn://10.0.0.236/trunk@26727 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-07 06:54:15 +00:00
rods%netscape.com
0cd1a45ea8 Commented out the NEW_CLIPBOARD_SUPPORT
git-svn-id: svn://10.0.0.236/trunk@26647 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-07 01:35:49 +00:00
rods%netscape.com
b60b9cf5ae Turning on new Clipboard support
git-svn-id: svn://10.0.0.236/trunk@26584 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-06 23:01:55 +00:00
rods%netscape.com
9748b9c0c4 Upgraded to implement new methods in D&D interface
git-svn-id: svn://10.0.0.236/trunk@26516 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-06 20:24:09 +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
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