982 Commits

Author SHA1 Message Date
kaie%netscape.com
c217443fac b=202166 Edit actions place caret on invalid position
r=jfrancis sr=kin


git-svn-id: svn://10.0.0.236/trunk@143582 18797224-902f-48f8-a5cc-f745e15eee43
2003-06-11 11:50:36 +00:00
brade%netscape.com
596c8b1e49 remove some useless local variables, fix whitespace, add param to insertion hook (sourceDoc), r=rogermw, sr=kin, bug=208539
git-svn-id: svn://10.0.0.236/trunk@143517 18797224-902f-48f8-a5cc-f745e15eee43
2003-06-10 18:53:11 +00:00
brade%netscape.com
601b8b9d42 add param to insertion hook (sourceDoc), r=rogermw, sr=kin, bug=208539
git-svn-id: svn://10.0.0.236/trunk@143515 18797224-902f-48f8-a5cc-f745e15eee43
2003-06-10 18:52:31 +00:00
jfrancis%netscape.com
bf700200ef bug 140357: (html editor) deletion should preserve style state. r=brade; sr=kin
git-svn-id: svn://10.0.0.236/trunk@143203 18797224-902f-48f8-a5cc-f745e15eee43
2003-06-02 22:21:06 +00:00
timeless%mozdev.org
d5bcd46d89 Bug 205347 warning: `PRBool IsInlineNode(class nsIDOMNode *)' defined but not used
r=brade,jfrancis sr=sfraser


git-svn-id: svn://10.0.0.236/trunk@142850 18797224-902f-48f8-a5cc-f745e15eee43
2003-05-23 22:10:06 +00:00
timeless%mozdev.org
3031c88dab Bug 204076 Remove unused variable `PRBool sameNode' from nsHTMLEditorStyle.cpp:524
r=brade sr=tor


git-svn-id: svn://10.0.0.236/trunk@142840 18797224-902f-48f8-a5cc-f745e15eee43
2003-05-23 21:55:17 +00:00
timeless%mozdev.org
0e56e202cb Bug 199989 Remove gNoisy code from libeditor.
r=brade sr=alecf


git-svn-id: svn://10.0.0.236/trunk@142832 18797224-902f-48f8-a5cc-f745e15eee43
2003-05-23 21:43:10 +00:00
dwitte%stanford.edu
dc7e857400 bug 100649: Length() being used where IsEmpty() is meant
treewide changes to convert incorrect usages of string.Length() to string.IsEmpty().

thanks to afatecha@idea.com.py (Ariel Fatecha) for the patch. r=dwitte, sr=jst.

got the ok from Asa to land into a closed tree.


git-svn-id: svn://10.0.0.236/trunk@142828 18797224-902f-48f8-a5cc-f745e15eee43
2003-05-23 21:34:47 +00:00
glazman%netscape.com
0e36fded62 crash when doing multiple redo commands in Composer; r=brade, sr=peterv, a=sspitzer
git-svn-id: svn://10.0.0.236/trunk@142543 18797224-902f-48f8-a5cc-f745e15eee43
2003-05-16 09:08:03 +00:00
kaie%netscape.com
6ac32319ca b=169213 hitting backspace deletes HR above, fix confusing caret placement around <hr> lines
r=jfrancis sr=sfraser a=sspitzer


git-svn-id: svn://10.0.0.236/trunk@142433 18797224-902f-48f8-a5cc-f745e15eee43
2003-05-14 13:20:09 +00:00
kaie%netscape.com
321982814e b=200417 backspace, enter keys have no visible impact
r=jfrancis sr=sfraser a=sspitzer


git-svn-id: svn://10.0.0.236/trunk@142432 18797224-902f-48f8-a5cc-f745e15eee43
2003-05-14 13:17:32 +00:00
brade%netscape.com
7863d97a97 api change to insertion filter to add flag for delete selection; r=timeless; sr=kin; a=asa; bug=204066
git-svn-id: svn://10.0.0.236/trunk@142277 18797224-902f-48f8-a5cc-f745e15eee43
2003-05-09 18:33:14 +00:00
brade%netscape.com
df5fbef10f api change to insertion filter to add flag for delete selection; r=timeless; sr= kin; a=asa; bug=204066
git-svn-id: svn://10.0.0.236/trunk@142276 18797224-902f-48f8-a5cc-f745e15eee43
2003-05-09 18:32:50 +00:00
brade%netscape.com
9c8c9c525c cleanup transferable hooks in editor; defer selection manipulation in plain text; ensure hooks are properly positioned (bug 203062) r=kaie, kin; sr=smfr
git-svn-id: svn://10.0.0.236/trunk@141821 18797224-902f-48f8-a5cc-f745e15eee43
2003-04-25 21:05:32 +00:00
brade%netscape.com
431f30b30a missing hook from bug 192171 (r=brian johnson, sr=sfraser)
git-svn-id: svn://10.0.0.236/trunk@141617 18797224-902f-48f8-a5cc-f745e15eee43
2003-04-22 20:32:59 +00:00
brade%netscape.com
672b3839a4 editor changes for drag/drop/copy/paste hooks (bug 197121) r=jfrancis, sr=smfr
git-svn-id: svn://10.0.0.236/trunk@141304 18797224-902f-48f8-a5cc-f745e15eee43
2003-04-17 13:18:51 +00:00
jaggernaut%netscape.com
797cb9f849 Bug 198546: Format -> Font submenu doesn't deal with "unknown" font. r=glazou, r=Neil, sr=bryner, moa=brade.
git-svn-id: svn://10.0.0.236/trunk@141297 18797224-902f-48f8-a5cc-f745e15eee43
2003-04-17 07:35:55 +00:00
alecf%netscape.com
272139fbdf fix for bug 201982 - r=brade, sr=smfr
nsIEditProperty was an interface with no methods and only static members - moved it to an entirely static class.


git-svn-id: svn://10.0.0.236/trunk@141290 18797224-902f-48f8-a5cc-f745e15eee43
2003-04-17 05:42:33 +00:00
kaie%netscape.com
1306f85f65 b=201974 Caret partially/completely visible with initial <p> </p>
r=jfrancis sr=sfraser


git-svn-id: svn://10.0.0.236/trunk@141255 18797224-902f-48f8-a5cc-f745e15eee43
2003-04-16 20:18:41 +00:00
kaie%netscape.com
7f3ff56e4b b=68767 extra blank space added when block level element (hr, table) is inserted at the end of a line, between two lines
r=jfrancis sr=kin


git-svn-id: svn://10.0.0.236/trunk@141196 18797224-902f-48f8-a5cc-f745e15eee43
2003-04-15 20:53:15 +00:00
brade%netscape.com
7c86a6fce4 add insertion listener; bug 192567 (r=jfrancis, sr=kin)
git-svn-id: svn://10.0.0.236/trunk@141181 18797224-902f-48f8-a5cc-f745e15eee43
2003-04-15 14:07:30 +00:00
bzbarsky%mit.edu
99037d7097 Make CreateContextualFragment know what document the fragment is destined for.
Fixes some issues with images and innerHTML.  Bugs 198486, 198989, 201865.
r=jfrancis, sr=jst


git-svn-id: svn://10.0.0.236/trunk@141144 18797224-902f-48f8-a5cc-f745e15eee43
2003-04-15 01:09:09 +00:00
bzbarsky%mit.edu
ad025b22c0 MakeList is redundant with AppendList. Bug 179810, r=jfrancis, sr=kin
git-svn-id: svn://10.0.0.236/trunk@141084 18797224-902f-48f8-a5cc-f745e15eee43
2003-04-13 04:30:16 +00:00
alecf%netscape.com
2795f737e2 fix for bug 199170 - convert editor over to using nsStaticAtoms
r=brade, sr=sfraser


git-svn-id: svn://10.0.0.236/trunk@141003 18797224-902f-48f8-a5cc-f745e15eee43
2003-04-10 21:04:07 +00:00
kin%netscape.com
dcb54fbdfe Fix for bug 199490: A crash occurs after clicking in (HTML tags )document - Trunk [@
nsHTMLEditor::SetFinalSize]

  - A one line fix in HideResizers() which prevents the
    reported crash by setting mIsResizing to false. I assume
    we can't be resizing if the resize handles are being hidden.
    The assertion and null check in SetFinalSize() are just because
    I'm paranoid, but they should never be triggered if HideResizers()
    is called first.

  - The changes in StartResizing() makes it so that we don't create
    a new mouse motion listener if we already have one. We were
    creating a new listener each time we clicked on the handles, and
    never unregistering the old one ... this meant that the old
    listeners could be triggered if the editor were ever destroyed
    and the document left in tact ... allowing us to crash because the
    listeners keep an un-addref'd pointer to the HTMLEditor. Note that
    this crash is not likely to be hit in Mozilla since we always
    destroy the document and editor in Composer and MailCompose, but
    it can happen in an embedding context.

r=glazman@netscape.com  sr=sfraser@netscape.com


git-svn-id: svn://10.0.0.236/trunk@140921 18797224-902f-48f8-a5cc-f745e15eee43
2003-04-09 21:10:58 +00:00
kin%netscape.com
85050dbdbe Fix for bug 200549:Double click selects just the image in a -moz-user-select:all
subtree


mozilla/editor/libeditor/html/nsHTMLEditor.cpp
    - jfrancis' fix for netscape bug 615240 (applying mozilla patch
      on branch. Fixing problems of improper handling of del and
      backspace keys with file attachments.) which was originally
      landed in revision 1.445.6.3. This patch is necessary to make
      the fix for bug 200549 work properly.

r=sfraser@netscape.com  sr=kin@netscape.com


mozilla/editor/libeditor/html/nsHTMLEditorMouseListener.cpp
mozilla/editor/libeditor/html/nsHTMLEditorMouseListener.h

    - Modified nsHTMLEditorMouseListener::MouseDown() to
      call FindUserSelectAllNode() so that the root of a
      -moz-user-select:all subtree gets selected during
      a double or context click.

    - Modified nsHTMLEditorMouseListener so that it stores an nsHTMLEditor*
      instead of an nsIEditor* so we could have access to FindUserSelectAllNode().

r=brade@netscape.com  sr=sfraser@netscape.com


git-svn-id: svn://10.0.0.236/trunk@140807 18797224-902f-48f8-a5cc-f745e15eee43
2003-04-07 14:32:23 +00:00
kin%netscape.com
811daa38c7 Fix for bug 42046: One click select and drag for images, hrs, and -moz-user-select:all
subtrees


mozilla/layout/html/base/src/nsFrame.cpp

  - Added utility method ContentContainsPoint()
  - Modified HandlePress() to allow selection of images, hrs and
    -moz-user-select:all subtrees, and then disable selection
    processing of drag events.


mozilla/editor/libeditor/html/nsHTMLDataTransfer.cpp

    - Modified InsertFromDrop() so that it prevents a drop from
      happening in a -moz-user-select:all subtree. (Temporary
      workaround to avoid bug 195957 and bug 195959)

r=mjudge@netscape.com  sr=sfraser@netscape.com


git-svn-id: svn://10.0.0.236/trunk@140805 18797224-902f-48f8-a5cc-f745e15eee43
2003-04-07 14:28:51 +00:00
kin%netscape.com
fd1509505d Fix for bug # :Hiding resize handles triggers assertion in ~nsGenericHTMLElement()
Modfied DeleteRefToAnonymousNode() so that it set the content node's document and parent to nsnull.

r=brade@netscape.com  sr=sfraser@netscape.com


git-svn-id: svn://10.0.0.236/trunk@140710 18797224-902f-48f8-a5cc-f745e15eee43
2003-04-04 20:51:36 +00:00
kin%netscape.com
d43528516f Fixes for bug 192569 (allow foreign transactions to be added to the queue)
mozilla/editor/idl/nsIEditor.idl
mozilla/editor/libeditor/base/nsEditor.cpp
mozilla/editor/libeditor/base/PlaceholderTxn.cpp
mozilla/editor/libeditor/html/nsHTMLCSSUtils.cpp
mozilla/editor/libeditor/html/nsHTMLEditor.cpp
mozilla/editor/libeditor/text/nsTextEditRules.cpp

  - Renamed nsIEditor::Do() to nsIEditor::DoTransaction() so that it
    can be called from JavaScript.

  - Cleaned up nsEditor::Begin/EndUpdateViewBatch() so that
    nothing happens outside the check of mUpdateCount.

  - Modified PlaceholderTxn.cpp so that it checks to see
    if a merged transaction implements nsPIEditorTransaction
    before attempting to cast it to (EditorTxn*).

mozilla/editor/ui/composer/content/EditorCommandsDebug.js
mozilla/editor/ui/composer/content/editorOverlay.xul
mozilla/editor/ui/composer/locale/en-US/editorOverlay.dtd

  - Added debug menu items to test execution of foreign transactions
    via the txnmgr and editor.

r=jfrancis@netscape.com  sr=sfraser@netscape.com


git-svn-id: svn://10.0.0.236/trunk@140707 18797224-902f-48f8-a5cc-f745e15eee43
2003-04-04 20:50:25 +00:00
kin%netscape.com
a2cc97e02b Fix for bug #195959: Drop causes image in -moz-user-select:all subtree to be duplicated
Prevent nsHTMLEditRules::CreateStyleForInsertText() from trying to split non-container nodes.


r=jfrancis@netscape.com  sr=sfraser@netscape.com


git-svn-id: svn://10.0.0.236/trunk@140698 18797224-902f-48f8-a5cc-f745e15eee43
2003-04-04 15:29:59 +00:00
jaggernaut%netscape.com
1d7b08a381 Bug 200638: fix drag copy modifier key on Mac OS X. r=Neil, sr=peterv
git-svn-id: svn://10.0.0.236/trunk@140691 18797224-902f-48f8-a5cc-f745e15eee43
2003-04-04 12:48:23 +00:00
sfraser%netscape.com
3bb2704dcc Remove nsIIndpendentSelection, moving its one method onto nsISelectionPrivate. Bug 192827. r/sr=kin.
git-svn-id: svn://10.0.0.236/trunk@140665 18797224-902f-48f8-a5cc-f745e15eee43
2003-04-04 01:45:06 +00:00
brade%netscape.com
0c8c6bf3da require all users of htmleditor to have EditorOverride.css so resizing will work
; bug 196075; r=jfrancis, sr=bryner


git-svn-id: svn://10.0.0.236/trunk@140634 18797224-902f-48f8-a5cc-f745e15eee43
2003-04-03 08:05:23 +00:00
henry.jia%sun.com
365360b6e3 Patch for bug 35296: SetCaretEnabled() takes too long
Patch by Leon.Zhang@sun.com
r=sfraser, sr=kin


git-svn-id: svn://10.0.0.236/trunk@140561 18797224-902f-48f8-a5cc-f745e15eee43
2003-04-02 05:48:09 +00:00
bryner%netscape.com
cf55de1ca0 Fix ctrl+enter in the mail compose window by getting rid of editor's key listeners in the client event pass entirely (everything now happens in the system event pass). r=brade, sr=sfraser.
git-svn-id: svn://10.0.0.236/trunk@140541 18797224-902f-48f8-a5cc-f745e15eee43
2003-04-02 03:31:18 +00:00
glazman%netscape.com
f981e4719a meta-fix for image and table resizing bugs in html editor
solves bugs 195412, 196624, 196122, 195849, 197158, 195141, 195126, 199013
r=brade, sr=kin


git-svn-id: svn://10.0.0.236/trunk@140251 18797224-902f-48f8-a5cc-f745e15eee43
2003-03-25 15:24:08 +00:00
timeless%mozdev.org
0e5f07166f Bug 106386 rid source of misspellings
patch by nb@ipnode.info r=biesi sr=dmose


git-svn-id: svn://10.0.0.236/trunk@140130 18797224-902f-48f8-a5cc-f745e15eee43
2003-03-24 04:15:34 +00:00
jfrancis%netscape.com
e5a7368fa9 fix for 189225: deleting text at beginning of line adds extra space.
r=brade; sr=kin


git-svn-id: svn://10.0.0.236/trunk@140109 18797224-902f-48f8-a5cc-f745e15eee43
2003-03-23 20:49:49 +00:00
jfrancis%netscape.com
0965f05259 fix for 187955: improvements to html fragment sink and paste code. Fixes problems seen with "Create table From Selection" and also with CF_HTML paste.
r=brade; sr=kin


git-svn-id: svn://10.0.0.236/trunk@140108 18797224-902f-48f8-a5cc-f745e15eee43
2003-03-23 20:45:47 +00:00
jfrancis%netscape.com
c5753a38cc fixes for:
178304 - deleting only char in text node places caret in previous block
174867 - caret in wrong place after delete-to-end in list
181898 - select into mailcite, type: inserted text is in cite
r=brade; sr=kin


git-svn-id: svn://10.0.0.236/trunk@140106 18797224-902f-48f8-a5cc-f745e15eee43
2003-03-23 20:22:15 +00:00
jfrancis%netscape.com
c9986861f1 fix for 161969: remove empty mailcites when editting
r=brade; sr=kin


git-svn-id: svn://10.0.0.236/trunk@140104 18797224-902f-48f8-a5cc-f745e15eee43
2003-03-23 19:51:03 +00:00
sspitzer%netscape.com
1e56cf3515 fix for bug #198624
bulletproof for crasher in nsHTMLEditor::HideResizers()
r=brade,sr=kin


git-svn-id: svn://10.0.0.236/trunk@140073 18797224-902f-48f8-a5cc-f745e15eee43
2003-03-22 17:22:22 +00:00
dougt%netscape.com
fed2927b2c Create a new xpcom obsolete library (and component library).
Moved nsFileSpec and related classes into this obsolete library.
  Moved nsRegistry and related libreg functionality into the obsolete library.

Updated many callers using the obsolete nsFile spec to use nsIFile and Necko to do file IO.

Combined the following DLLs (source -> dest)
  uriloader -> docshell
  shistory -> docshell
  jsurl -> jsdom
  gkview -> gklayout

Moved nsAdapterEnumerator out of xpcom/ds and into mailnews, since they're the only consumer

Modifed the xpt_link tool so that you can specify a “only include” cid list that can mask CID’s that you are not interested in.

Added build options:
Prevent the building of xpinstall (--disable-xpinstall)
Prevent the building js component loader (--disable-jsloader)
A build option to only build a single profile (--enable-single-profile)
A build flag to only built the required xpfe components (--disable-xpfe-components).

Removal or hiding of unused functions and classes including nsEscape*, nsDequeIterator, nsRecyclingAllocatorImpl, nsDiscriminatedUnion, nsOpaqueKey, nsCRT::strlen, NS_NewCommandLineService

Bug 194240, r/sr = darin, alec.


git-svn-id: svn://10.0.0.236/trunk@139480 18797224-902f-48f8-a5cc-f745e15eee43
2003-03-15 01:04:32 +00:00
glazman%netscape.com
3e99b94dc6 remove a few lines of code that landed by mistake and cause trouble with embedded editor; b=195800, r=brade; sr=dbaron
git-svn-id: svn://10.0.0.236/trunk@138831 18797224-902f-48f8-a5cc-f745e15eee43
2003-03-04 02:14:19 +00:00
sfraser%netscape.com
2636d9a8d0 Fix bug 74404: show caret drag feedback. r=brade, sr=kin
git-svn-id: svn://10.0.0.236/trunk@138640 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-27 23:09:51 +00:00
kin%netscape.com
f00ce92bef Fix for bug 191762 (dragged image doesn't land where it's dropped)
editor/libeditor/base/nsSelectionState.cpp

  - Reworked the logic in SelAdjJoinNodes() to avoid adding aOldLeftNodeLength twice to the calculated offset when the start/end node is the parent.

editor/libeditor/html/nsHTMLDataTransfer.cpp
editor/libeditor/text/nsPlaintextDataTransfer.cpp

  - Modified the InsertFromDrop() to use an nsAutoTrackDOMPoint, instead of relying on range gravity, to calculate the correct insert position after deleting the current selection.

r=jfrancis@netscape.com  sr=sfraser@netscape.com


git-svn-id: svn://10.0.0.236/trunk@138611 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-27 14:53:03 +00:00
glazman%netscape.com
aa100a61e3 missing files for b=47066, r=brade,cmanske, sr=kin
git-svn-id: svn://10.0.0.236/trunk@138322 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-24 10:18:18 +00:00
glazman%netscape.com
20124c5607 Allow mouse-driven resizing of images and tables in all instances of editor.
For the default Mozilla build, this includes Composer and Mail Composition.
Embeddors willing to disable this feature should look at |nsHTMLEditor::SetIsImageResizingEnabled()|
Displays eight resizing handles plus an info box. Images are resized real-time.
Uses HTML attributes in pure HTML mode (mail composition for instance) and CSS properties when available.
Undoable and Redoable. Does not grind coffe and make a good expresso yet.
Thanks if you really read to that line.

b=47066, r=brade, r=cmanske (for the algo part inheriting from the XBL patch), sr=kin


git-svn-id: svn://10.0.0.236/trunk@138320 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-24 09:37:18 +00:00
jkeiser%netscape.com
67e45eafda Make double-click on text in composer select word again (bug 193689), r=bryner@netscape.com, sr=jst@netscape.com, a=asa@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@138161 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-22 08:12:11 +00:00
jkeiser%netscape.com
e7babfc916 Make text drag work again (bug 193568), r=bryner@netscape.com, sr=jst@netscape.com, a=asa@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@138160 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-22 08:10:46 +00:00