Closed Bug 169231 Opened 22 years ago Closed 22 years ago

remove editorshell from nsHTMLEditorLog.cpp

Categories

(Core :: DOM: Editor, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: Brade, Assigned: Brade)

References

Details

Attachments

(1 file, 1 obsolete file)

nsHTMLEditorLog.cpp needs to remove its references to editorShell
Blocks: editorshell
Status: NEW → ASSIGNED
Comment on attachment 99543 [details] [diff] [review] patch to not use editorshell and to fix some commands which were missing params > - Write("window.editorShell.DeleteSelection("); > + Write("window.editor.deleteSelection("); I didn't think we had a window.editor -- don't we need to make a getEditor() routine, or something like that, like Charley has been doing in his dialog code? Charley?
Yes, we are using GetCurrentEditor() everywhere instead of "window.gEditor" or any other assumed editor global. This will all for whatever multiple editor or frameset mechanisms we later implement.
Attachment #99543 - Attachment is obsolete: true
Comment on attachment 99552 [details] [diff] [review] updated patch that uses GetCurrentEditor() >@@ -331,5 +339,5 @@ > { > PrintSelection(); >- Write("window.editorShell.Paste();\n"); >+ Write("GetCurrentEditor().paste();\n"); > Flush(); > } I believe Paste and all the PasteAs*Quotation variants all (selectionType). That's the only problem I noticed, though; fix those, and r=akkana.
Attachment #99552 - Flags: review+
Actually, only Paste was missing the selectionType (not a regression from this patch either). PasteAsQuotation, PasteAsPlaintextQuotation and PasteAsCitedQuotation already write out aSelectionType.
Comment on attachment 99552 [details] [diff] [review] updated patch that uses GetCurrentEditor() sr=kin@netscape.com ==== Do we want to avoid using "var"? My concern is you will get a JS error if this gets written more than once to the same file. There are a couple of methods which use "var": + Write("var atomService = Components.classes[\"@mozilla.org/atom-service;1\"].getService(Components.inter faces.nsIAtomService);\n"); + Write("var propAtom = atomService.getAtom(\""); ==== In all the pasteAsQuotation() and pasteAsCitedQuotation() calls, do we want to write out the selection type as a constant instead of an int? Components.interfaces.nsIClipboard.kGlobalClipboard;
Attachment #99552 - Flags: superreview+
patch checked in with changes as suggested by Akkana and Kin
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

Created:
Updated:
Size: