Closed Bug 169001 Opened 22 years ago Closed 22 years ago

Remove editorshell from EditorCommandsDebug.js

Categories

(Core :: DOM: Editor, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.2beta

People

(Reporter: akkzilla, Assigned: akkzilla)

References

Details

Attachments

(1 file, 3 obsolete files)

Remove editorshell from EditorCommandsDebug.js as part of editorshell removal.
Blocks: editorshell
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.2beta
Blocks: 169029
Attached patch Patch: all but editor logging (obsolete) — Splinter Review
This patch does everything except the editor logging items. nsIEditorLogging isn't scriptable. I'll file a separate bug covering that (there's nothing there that's hard to script, I guess we just thought nobody was using it) but let's get the rest of this in without waiting for that. "TestTableLayout" doesn't work -- lots of errors that don't seem related to my change (complaints about not being able to get startParent). Did it work before? I'll have to try it on a tree without these patches and see.
Comment on attachment 99597 [details] [diff] [review] Patch: all but editor logging this doesn't seem correct (gEditor? or GetCurrentEditor()?): - editorShell.InsertText(textToInsert); + editor.insertText(textToInsert); what about using the function instead of "gEditor"?
Good catch on the insertText mistake. Here's a new patch with that corrected (otherwise identical). > what about using the function instead of "gEditor"? I thought it was okay to use gEditor in files in ui/composer/content? No? I'd be happy to use the function instead, if that's better.
Attachment #99597 - Attachment is obsolete: true
Yes! Please use "GetCurrentEditor()" instead of "gEditor".
also, this QI isn't needed: + var htmled = gEditor.QueryInterface(Components.interfaces.nsIHTMLEditor); r=brade with the above fix as well as Charley's string swap
This changes gEditor to GetCurrentEditor() and removes the extraneous QI that Kathy noticed.
Attachment #99765 - Attachment is obsolete: true
Comment on attachment 100448 [details] [diff] [review] Modifications as suggested by Kathy and Charley r=brade
Attachment #100448 - Flags: review+
Kathy pointed out that I didn't need the var htmled any more.
Attachment #100448 - Attachment is obsolete: true
Comment on attachment 100472 [details] [diff] [review] One more minor optimization suggested by Kathy Transferring Kathy's r= from the last patch. Kin, could you sr this?
Attachment #100472 - Flags: review+
Comment on attachment 100472 [details] [diff] [review] One more minor optimization suggested by Kathy sr=kin@netscape.com Should we be concerned with the possibility |GetCurrentEditor()| will return null? Or is that highly unlikely?
Attachment #100472 - Flags: superreview+
Its highly unlikely, but if it happens, given that these are all debug-menu items, letting the exception get thrown is probably the right thing to do anyway. Fix is in.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: