66 Commits

Author SHA1 Message Date
buster%netscape.com
6c46de52f8 very simple extension of a fix already in place for bug 11804
git-svn-id: svn://10.0.0.236/trunk@48787 18797224-902f-48f8-a5cc-f745e15eee43
1999-09-22 05:00:58 +00:00
brade%netscape.com
a42cc57b3f warning cleanup
git-svn-id: svn://10.0.0.236/trunk@48659 18797224-902f-48f8-a5cc-f745e15eee43
1999-09-21 22:32:39 +00:00
buster%netscape.com
28bdfeef11 most of the fix for bug 11804, type-in state wasn't properly removing
inline attributes from the next character entered (you're in a bold word
and user clicks bold button, should make next character not bold.)
all done except for font properties.


git-svn-id: svn://10.0.0.236/trunk@48316 18797224-902f-48f8-a5cc-f745e15eee43
1999-09-20 04:20:18 +00:00
jfrancis%netscape.com
381ca4cab7 fixing a heap-o-undo problems and some mBogusNode problems
git-svn-id: svn://10.0.0.236/trunk@48297 18797224-902f-48f8-a5cc-f745e15eee43
1999-09-20 01:31:44 +00:00
jfrancis%netscape.com
5df01a19dc fix for 13677
git-svn-id: svn://10.0.0.236/trunk@48051 18797224-902f-48f8-a5cc-f745e15eee43
1999-09-17 23:15:12 +00:00
buster%netscape.com
f5e00214bc fixed a warning
git-svn-id: svn://10.0.0.236/trunk@48004 18797224-902f-48f8-a5cc-f745e15eee43
1999-09-17 20:17:22 +00:00
buster%netscape.com
c3c148ab7b fixed bug 13810 by removing an extraneous check for empty string. empty strings are perfectly legal
in WillInsertText


git-svn-id: svn://10.0.0.236/trunk@47623 18797224-902f-48f8-a5cc-f745e15eee43
1999-09-15 19:43:19 +00:00
buster%netscape.com
f15796dc95 fixed bug 13669, wrong password when user typed with 1 or more characters selected
git-svn-id: svn://10.0.0.236/trunk@47230 18797224-902f-48f8-a5cc-f745e15eee43
1999-09-14 00:11:22 +00:00
buster%netscape.com
d7d624a6ed fixed password editors, while maintaining output of empty HTML documents
fixes bug 13404, a blocker for enabling gfx text controls


git-svn-id: svn://10.0.0.236/trunk@46602 18797224-902f-48f8-a5cc-f745e15eee43
1999-09-09 19:39:36 +00:00
sfraser%netscape.com
8a797c14a4 Add DocumentIsEmpty to EditorShell.idl and nsIEditor, and modify length and content getters to do the right thing with an empty document (which contains the bogus text node).
git-svn-id: svn://10.0.0.236/trunk@46444 18797224-902f-48f8-a5cc-f745e15eee43
1999-09-08 23:32:04 +00:00
jfrancis%netscape.com
fc7ebc0ae1 restoring 1.54 checkin: no longer clearing selection when we detect empty document - selection is a perfectly valid concept in an empty document.
fix for bug 13251 is now in layout/src/base/nsRange.cpp


git-svn-id: svn://10.0.0.236/trunk@46308 18797224-902f-48f8-a5cc-f745e15eee43
1999-09-08 05:30:48 +00:00
kin%netscape.com
3f07e6a437 Fix for bug #13251: gfx text fields are not accepting input
Reenabled call to ClearSelection() in nsTextEditRules::WillInsert().


git-svn-id: svn://10.0.0.236/trunk@46234 18797224-902f-48f8-a5cc-f745e15eee43
1999-09-07 22:47:50 +00:00
jfrancis%netscape.com
33cc588b93 no longer clearing selection when we detect empty document - selection is a perfectly valid concept in an empty document.
git-svn-id: svn://10.0.0.236/trunk@46124 18797224-902f-48f8-a5cc-f745e15eee43
1999-09-06 19:45:26 +00:00
bruce%cybersight.com
bf0dde26b0 Use nsCRT::free() instead of delete[] for char* data.
git-svn-id: svn://10.0.0.236/trunk@46092 18797224-902f-48f8-a5cc-f745e15eee43
1999-09-06 06:22:51 +00:00
sspitzer%netscape.com
5059b5c5de it really scares me to see my password get sent to the console when I type it. it's scaring others, see #13061. wrapping this code with #ifdef DEBUG_<author>. I'll send them mail directly.
git-svn-id: svn://10.0.0.236/trunk@45858 18797224-902f-48f8-a5cc-f745e15eee43
1999-09-03 08:31:33 +00:00
buster%netscape.com
8860c971f8 fixed bug 12680 (password fields broken)
fixed bug 12489 (static contructors must be removed)


git-svn-id: svn://10.0.0.236/trunk@45186 18797224-902f-48f8-a5cc-f745e15eee43
1999-08-30 22:11:09 +00:00
buster%netscape.com
d2cf706ddc added a special case to the output text rules for an empty document
(one that contains the bogus node)


git-svn-id: svn://10.0.0.236/trunk@44286 18797224-902f-48f8-a5cc-f745e15eee43
1999-08-24 13:48:08 +00:00
jfrancis%netscape.com
99de773e68 refactoring text insertion code; indent/outdent now work with lists and list items.
git-svn-id: svn://10.0.0.236/trunk@44276 18797224-902f-48f8-a5cc-f745e15eee43
1999-08-24 08:56:51 +00:00
akkana%netscape.com
1a9e06b69b Handle plaintext wrapping in style, rather than a pre tag in the body. Also fix a couple of warnings.
git-svn-id: svn://10.0.0.236/trunk@43844 18797224-902f-48f8-a5cc-f745e15eee43
1999-08-20 22:39:48 +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
buster%netscape.com
645dd7a8ea moved handling of flags from rules constructor to rules init, so
rules code can call SetFlags with mEditor initialized and do real
processing if it wants to.


git-svn-id: svn://10.0.0.236/trunk@42775 18797224-902f-48f8-a5cc-f745e15eee43
1999-08-09 18:39:49 +00:00
sfraser%netscape.com
eabb55e416 Fix the nsTextEditRules init so that setting the flags works.
git-svn-id: svn://10.0.0.236/trunk@42769 18797224-902f-48f8-a5cc-f745e15eee43
1999-08-09 18:22:13 +00:00
buster%netscape.com
54308be938 backed out my last change, it didn't fix the problem I thought it would.
git-svn-id: svn://10.0.0.236/trunk@42765 18797224-902f-48f8-a5cc-f745e15eee43
1999-08-09 18:01:08 +00:00
buster%netscape.com
736e084433 call SetFlags from Init, so plaintext logic gets executed.
git-svn-id: svn://10.0.0.236/trunk@42762 18797224-902f-48f8-a5cc-f745e15eee43
1999-08-09 17:44:14 +00:00
sfraser%netscape.com
4dd92661ce Landing editor API changes. Removed nsITextEditor and nsTextEditor, split interfaces into more, non-overlapping interfaces, and other general cleanup.
git-svn-id: svn://10.0.0.236/trunk@42725 18797224-902f-48f8-a5cc-f745e15eee43
1999-08-09 01:37:50 +00:00
buster%netscape.com
a2574a2239 fixed handling of text controls with a max length set
git-svn-id: svn://10.0.0.236/trunk@42641 18797224-902f-48f8-a5cc-f745e15eee43
1999-08-07 05:29:41 +00:00
buster%netscape.com
af08daa88b Clean-up
1) fixed unit tests
2) fixed a bunch of leaks having to do with using enumerators.  Thanks for noticing these, Simon.
3) fixed a tiny problem in nsTextEditRules::WillDoAction().
This method was overly aggressive in checking input args, sel can be null for some operations.


git-svn-id: svn://10.0.0.236/trunk@41056 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-25 18:14:44 +00:00
jfrancis%netscape.com
121b1074a2 making plaintext flag force a "white-space: pre" style on the body. this is a fix for bug 9153
git-svn-id: svn://10.0.0.236/trunk@41044 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-25 05:34:02 +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
buster%netscape.com
6382cd2eea replaced IID's with CID's where they were appropriate, and removed lots of
NS_DEFINE_IID macros in favor of GetCID() wherever I could.
plus some minor bug fixes.


git-svn-id: svn://10.0.0.236/trunk@39546 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-15 19:13:46 +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
jfrancis%netscape.com
117edd04eb turning off ill fated coercion of selection for plaintext editing. I'll turn this back on when I know how to correctly detect when it's needed.
git-svn-id: svn://10.0.0.236/trunk@38247 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-03 05:13:30 +00:00
jfrancis%netscape.com
30aa13a1d0 making the plain text selection pinning savvy to the other flavors of text editors, the ones that DONT have <pre> tags wrapping all the text
git-svn-id: svn://10.0.0.236/trunk@38021 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-02 07:53:08 +00:00
buster%netscape.com
0513dccdf4 0. possible fix for Sun build bustage.
1. IsEditable is much less hacky.  It basically says:
  1. if the node is a special bogus text node, it's not editable
  2. if the node is a text node with only newlines, then it's not editable
  3. if the node has no frame associated with it, then it is not editable
  4. otherwise, it is editable.
As part of this, I had to make IsEditable non-static.  This had some cascading effects on static methods that called
IsEditable, which likewise had to be made non-static.

2. SetTextProperties now works when the endpoints are leaf nodes (like images), not just text.  Charlie, you should
put this through some stress cases.


git-svn-id: svn://10.0.0.236/trunk@37741 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-01 18:42:28 +00:00
jfrancis%netscape.com
aaaa87a18c some cleanup and also selection enforcement for plaintext documents: selection is pinned to within the PRE tag on any edit action
git-svn-id: svn://10.0.0.236/trunk@37698 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-01 13:42:03 +00:00
buster%netscape.com
a0e007d087 Moved GetTextSelectionOffsets and GetDocumentLength from nsTextEditRules to
nsTextEditor.  Added GetDocumentLength to nsITextEditor public interface.


git-svn-id: svn://10.0.0.236/trunk@37177 18797224-902f-48f8-a5cc-f745e15eee43
1999-06-28 13:36:38 +00:00
buster%netscape.com
7391f40410 implemented most of max length handling
git-svn-id: svn://10.0.0.236/trunk@36964 18797224-902f-48f8-a5cc-f745e15eee43
1999-06-25 22:57:26 +00:00
buster%netscape.com
e1f56f54b7 added rules for password behavior
git-svn-id: svn://10.0.0.236/trunk@36767 18797224-902f-48f8-a5cc-f745e15eee43
1999-06-24 23:36:56 +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
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
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
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
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
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
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
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
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