146 Commits

Author SHA1 Message Date
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
a5341f92a7 implementing RemoveList() - ie, list button now works as a toggle
git-svn-id: svn://10.0.0.236/trunk@46125 18797224-902f-48f8-a5cc-f745e15eee43
1999-09-06 19:47:25 +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
tague%netscape.com
6bbc6c0935 Added support for a reply from the StartComposition message. Necessary for XIM support on UNIX.
git-svn-id: svn://10.0.0.236/trunk@45252 18797224-902f-48f8-a5cc-f745e15eee43
1999-08-31 01:20:32 +00:00
sfraser%netscape.com
ba6f86bc52 Back out cmanske's changes to these files, which he checked by by mistake.
git-svn-id: svn://10.0.0.236/trunk@45250 18797224-902f-48f8-a5cc-f745e15eee43
1999-08-31 01:14:40 +00:00
cmanske%netscape.com
f9cc1c05e3 Added checking if we need to save file before allowing close window or exit (bug 7615). Added support for Confirm and Alert message dialogs
git-svn-id: svn://10.0.0.236/trunk@45247 18797224-902f-48f8-a5cc-f745e15eee43
1999-08-31 00:51:23 +00:00
pinkerton%netscape.com
003e325792 clean up small mem leak.
git-svn-id: svn://10.0.0.236/trunk@45205 18797224-902f-48f8-a5cc-f745e15eee43
1999-08-30 22:18:23 +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
kin%netscape.com
ea9db112f9 Fix for bugs #7153, #10673, #12066, #12067, and #12793.
editor/base/nsEditorEventListeners.cpp
editor/base/nsEditorEventListeners.h

  - Added code to scroll the selection into view
    after processing key events.
  - Commented out the hack that redraws the entire
    view when the focus is gained and lost. Replaced
    the hack code with calls to RepaintSelection().

layout/base/public/nsIFrameSelection.h
layout/base/public/nsIPresShell.h
layout/html/base/src/nsPresShell.cpp
   - Added ScrollSelectionIntoView() and RepaintSelection() methods.

layout/base/src/nsRangeList.cpp
   - Added implementation for ScrollSelectionIntoView() and
     RepaintSelection().
   - Check for NULL primary frame in GetFocusNodeRect()
     to fix bug #12793.


git-svn-id: svn://10.0.0.236/trunk@45163 18797224-902f-48f8-a5cc-f745e15eee43
1999-08-30 21:54:40 +00:00
akkana%netscape.com
2879c01e5b Handle lower-case alt-x as well as upper case
git-svn-id: svn://10.0.0.236/trunk@44953 18797224-902f-48f8-a5cc-f745e15eee43
1999-08-28 00:31:06 +00:00
jfrancis%netscape.com
2a60fccebc making nsPresShell and nsDocument support weak references; using weak references to docs and pres shells within the editor
git-svn-id: svn://10.0.0.236/trunk@44483 18797224-902f-48f8-a5cc-f745e15eee43
1999-08-25 10:51:55 +00:00
pinkerton%netscape.com
2d43935d4d toString -> ToString idl change.
git-svn-id: svn://10.0.0.236/trunk@44477 18797224-902f-48f8-a5cc-f745e15eee43
1999-08-25 09:15:18 +00:00
pinkerton%netscape.com
6eb3a21da9 IDL-ifying nsITransferable, nsIDragService, nsIDragSession, nsIFormatConverter.
git-svn-id: svn://10.0.0.236/trunk@44476 18797224-902f-48f8-a5cc-f745e15eee43
1999-08-25 08:35:06 +00:00
akkana%netscape.com
131d318ad4 Revise the doc encoder and content sink APIs yet again to make it easier
to add new flags (pass a flag in the constructor, rather than specific
booleans.  This in order to fix:
11249: Add flag to write only the body in html output.


git-svn-id: svn://10.0.0.236/trunk@44308 18797224-902f-48f8-a5cc-f745e15eee43
1999-08-24 18:30:19 +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
buster%netscape.com
d25319c9c2 Split out installing the editor's own event handler as a separate step.
The owner of the editor can now initialize the editor,
set up its own listeners if it wants to, then the editor will set up it's own
backstop listeners as part of PostCreate().
The backstop key listener now ignores ENTER for single line text controls.
Ugly to have to do it here, it would be better if the owner could just swallow the key event.


git-svn-id: svn://10.0.0.236/trunk@44121 18797224-902f-48f8-a5cc-f745e15eee43
1999-08-23 06:42:04 +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
brade%netscape.com
f10a2dbac1 keyhandling for keybindings moved to keypress (was keydown)
git-svn-id: svn://10.0.0.236/trunk@43813 18797224-902f-48f8-a5cc-f745e15eee43
1999-08-20 13:14:03 +00:00
pinkerton%netscape.com
d7fdcb2e00 add DragGesture to drag listener.
git-svn-id: svn://10.0.0.236/trunk@43635 18797224-902f-48f8-a5cc-f745e15eee43
1999-08-19 19:48:33 +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
jfrancis%netscape.com
41485faa2c some reorg of block transformation code; implemented make-{header,preformatted,address,normal}; tweaked make list to honor <br> in some circumstances; rewrote "return in list item" to pop you out of list if item is empty; rewrote "return in header" to work with non-trivial headers.
git-svn-id: svn://10.0.0.236/trunk@43484 18797224-902f-48f8-a5cc-f745e15eee43
1999-08-18 08:13:06 +00:00
jfrancis%netscape.com
9b541be769 fixing bug 9366
git-svn-id: svn://10.0.0.236/trunk@42836 18797224-902f-48f8-a5cc-f745e15eee43
1999-08-09 22:51:40 +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
b2f791ecad fixed disabled and readonly handling
added redraw hack to blur (in addition to focus, already done)


git-svn-id: svn://10.0.0.236/trunk@42640 18797224-902f-48f8-a5cc-f745e15eee43
1999-08-07 05:28:57 +00:00
tague%netscape.com
5f2b704a17 Added support for replies from private DOM text events. See bug #4826
git-svn-id: svn://10.0.0.236/trunk@42391 18797224-902f-48f8-a5cc-f745e15eee43
1999-08-06 02:32:13 +00:00
buster%netscape.com
41a9e50cfc added the same hack for blur as for focus, to force a repaint
handle TAB in keyDown, not keyPress, so we can surpress focus manager
using TAB to swap focus from the editor.


git-svn-id: svn://10.0.0.236/trunk@41949 18797224-902f-48f8-a5cc-f745e15eee43
1999-08-03 06:07:29 +00:00
buster%netscape.com
b96149959a selection and caret are not displayed at Init time any more. This is done on Focus now.
checking in temp hack to repaint on focus


git-svn-id: svn://10.0.0.236/trunk@41819 18797224-902f-48f8-a5cc-f745e15eee43
1999-08-02 13:53:23 +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
joki%netscape.com
065c158182 Updating DOM event apis and changing behavior to properly respect capturing, bubbling, and cancellation methods.
git-svn-id: svn://10.0.0.236/trunk@40134 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-19 19:54:34 +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
sfraser%netscape.com
4dc3ba7bb6 Don't handle a key event as a keypress if the meta key is down.
git-svn-id: svn://10.0.0.236/trunk@39418 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-14 22:29:06 +00:00
akkana%netscape.com
a878369d02 Restructure the editor output routines to allow passing in
a mime type and a flag argument.  Also fix the following bugs:
9746: get rid of bogus empty <style> in head.
8143: save wrap column in editor shell in case it's set before the
      editor is created.
9470, 9488: allow explicit specification of formatted output.


git-svn-id: svn://10.0.0.236/trunk@39332 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-14 18:54:29 +00:00
buster%netscape.com
81c8ed2576 workaround for blocker bug 8123. approved by chofmann.
git-svn-id: svn://10.0.0.236/trunk@38807 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-08 19:52:44 +00:00
buster%netscape.com
7200addfac minor fix for returning when a key is handled or not. This is a tiny part
of the fix for 8123, joki is working on the rest with tague and rods.


git-svn-id: svn://10.0.0.236/trunk@38470 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-06 23:31:08 +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
akkana%netscape.com
49826cb224 Oops, making wrapcolumn unsigned was a mistake. (Thanks to slamm's
warnings page for showing me that!)  Change it back to signed.


git-svn-id: svn://10.0.0.236/trunk@37746 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-01 19:01:04 +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