diff --git a/mozilla/editor/base/nsEditorShell.cpp b/mozilla/editor/base/nsEditorShell.cpp index 1e166b8d21e..b01736aa0e8 100644 --- a/mozilla/editor/base/nsEditorShell.cpp +++ b/mozilla/editor/base/nsEditorShell.cpp @@ -620,29 +620,7 @@ nsresult nsEditorShell::GetDocumentEventReceiver(nsIDOMEventReceiver **aEventRec nsresult rv = editor->GetRootElement(getter_AddRefs(rootElement)); nsCOMPtr erP; - -//(Copied from nsHTMLEditor::InstallEventListeners) -//now hack to make sure we are not anonymous content if we are - // grabbing the parent of root element for our observer - nsCOMPtr content = do_QueryInterface(rootElement); - if (content) - { - nsCOMPtr parent; - if (NS_SUCCEEDED(content->GetParent(*getter_AddRefs(parent))) && parent) - { - PRInt32 index; - if (NS_FAILED(parent->IndexOf(content, index)) || index<0 ) - { - rootElement = do_QueryInterface(parent); - rv = rootElement->QueryInterface(NS_GET_IID(nsIDOMEventReceiver), getter_AddRefs(erP)); - } - else - rootElement = 0; - } - } - if (!rootElement && domDoc) - rv = domDoc->QueryInterface(NS_GET_IID(nsIDOMEventReceiver), getter_AddRefs(erP)); -//end hack + rv = rootElement->QueryInterface(NS_GET_IID(nsIDOMEventReceiver), getter_AddRefs(erP)); if (erP) { diff --git a/mozilla/editor/composer/src/nsEditorShell.cpp b/mozilla/editor/composer/src/nsEditorShell.cpp index 1e166b8d21e..b01736aa0e8 100644 --- a/mozilla/editor/composer/src/nsEditorShell.cpp +++ b/mozilla/editor/composer/src/nsEditorShell.cpp @@ -620,29 +620,7 @@ nsresult nsEditorShell::GetDocumentEventReceiver(nsIDOMEventReceiver **aEventRec nsresult rv = editor->GetRootElement(getter_AddRefs(rootElement)); nsCOMPtr erP; - -//(Copied from nsHTMLEditor::InstallEventListeners) -//now hack to make sure we are not anonymous content if we are - // grabbing the parent of root element for our observer - nsCOMPtr content = do_QueryInterface(rootElement); - if (content) - { - nsCOMPtr parent; - if (NS_SUCCEEDED(content->GetParent(*getter_AddRefs(parent))) && parent) - { - PRInt32 index; - if (NS_FAILED(parent->IndexOf(content, index)) || index<0 ) - { - rootElement = do_QueryInterface(parent); - rv = rootElement->QueryInterface(NS_GET_IID(nsIDOMEventReceiver), getter_AddRefs(erP)); - } - else - rootElement = 0; - } - } - if (!rootElement && domDoc) - rv = domDoc->QueryInterface(NS_GET_IID(nsIDOMEventReceiver), getter_AddRefs(erP)); -//end hack + rv = rootElement->QueryInterface(NS_GET_IID(nsIDOMEventReceiver), getter_AddRefs(erP)); if (erP) { diff --git a/mozilla/editor/ui/composer/content/EditorCommands.js b/mozilla/editor/ui/composer/content/EditorCommands.js index ac554d4f857..e54f471aa72 100644 --- a/mozilla/editor/ui/composer/content/EditorCommands.js +++ b/mozilla/editor/ui/composer/content/EditorCommands.js @@ -190,11 +190,6 @@ function _EditorNotImplemented() dump("Function not implemented\n"); } -function _EditorObsolete() -{ - dump("Function is obsolete\n"); -} - function EditorShutdown() { dump("In EditorShutdown..\n"); @@ -336,16 +331,6 @@ function FindAndSelectEditorWindowWithURL(urlToMatch) // --------------------------- File menu --------------------------- -function EditorOpen() -{ - return _EditorObsolete(); -} - -function EditorOpenRemote() -{ - return _EditorObsolete(); -} - // used by openLocation. see openLocation.js for additional notes. function delayedOpenWindow(chrome, flags, url) { @@ -371,36 +356,7 @@ function EditorSaveDocument(doSaveAs, doSaveCopy) editorShell.saveDocument(doSaveAs, doSaveCopy); } -function EditorSave() -{ - return _EditorObsolete(); -} - -function EditorSaveAs() -{ - return _EditorObsolete(); -} - -function EditorPrint() -{ - return _EditorObsolete(); -} - -function EditorPrintSetup() -{ - return _EditorObsolete(); -} - -function EditorPrintPreview() -{ - return _EditorObsolete(); -} - function EditorClose() -{ - return _EditorObsolete(); -} - // Check for changes to document and allow saving before closing // This is hooked up to the OS's window close widget (e.g., "X" for Windows) function EditorCanClose() @@ -411,50 +367,6 @@ function EditorCanClose() // --------------------------- Edit menu --------------------------- -function EditorUndo() -{ - return _EditorObsolete(); -} - -function EditorRedo() -{ - return _EditorObsolete(); -} - -function EditorCut() -{ - return _EditorObsolete(); -} - -function EditorCopy() -{ - return _EditorObsolete(); -} - -function EditorPaste() -{ - return _EditorObsolete(); -} - -function EditorPasteAsQuotation() -{ - return _EditorObsolete(); -} - -function EditorSelectAll() -{ - return _EditorObsolete(); -} - -function EditorFind() -{ - return _EditorObsolete(); -} - -function EditorFindNext() -{ - return _EditorObsolete(); -} // --------------------------- View menu --------------------------- @@ -662,16 +574,6 @@ function EditorSetFontSize(size) contentWindow.focus(); } -function EditorIncreaseFontSize() -{ - return _EditorObsolete(); -} - -function EditorDecreaseFontSize() -{ - return _EditorObsolete(); -} - function EditorSelectTextColor(ColorPickerID, ColorWellID) { var color = getColorAndSetColorWell(ColorPickerID, ColorWellID); @@ -761,16 +663,6 @@ function EditorApplyStyle(tagName) contentWindow.focus(); } -function EditorRemoveStyle(tagName) -{ - return _EditorObsolete(); -} - -function EditorToggleStyle(styleName) -{ - return _EditorObsolete(); -} - function EditorRemoveLinks() { editorShell.RemoveTextProperty("href", ""); @@ -829,63 +721,8 @@ function EditorObjectProperties() } } -function EditorListProperties() -{ - return _EditorObsolete(); -} - -function EditorPageProperties() -{ - return _EditorObsolete(); -} - -function EditorColorProperties() -{ - return _EditorObsolete(); -} - // --------------------------- Dialogs --------------------------- -function EditorInsertHTML() -{ - return _EditorObsolete(); -} - -function EditorInsertOrEditLink() -{ - return _EditorObsolete(); -} - -function EditorInsertOrEditImage() -{ - return _EditorObsolete(); -} - -function EditorInsertOrEditHLine() -{ - return _EditorObsolete(); -} - -function EditorInsertChars() -{ - return _EditorObsolete(); -} - -function EditorInsertOrEditNamedAnchor() -{ - return _EditorObsolete(); -} - -function EditorIndent(indent) -{ - return _EditorObsolete(); -} - -function EditorMakeOrChangeList(listType) -{ - return _EditorObsolete(); -} - function EditorAlign(commandID, alignType) { var commandNode = document.getElementById(commandID); @@ -1051,16 +888,6 @@ function EditorToggleParagraphMarks() } } -function EditorPreview() -{ - return _EditorObsolete(); -} - -function CheckSpelling() -{ - return _EditorObsolete(); -} - function SetBackColorString(xulElementID) { var xulElement = document.getElementById(xulElementID); @@ -1460,12 +1287,6 @@ function EditorSetSelectionFromOffsets(selRanges) } } -function EditorExit() -{ - return _EditorObsolete(); -} - - //-------------------------------------------------------------------- function initFontStyleMenu(menuPopup) { diff --git a/mozilla/editor/ui/composer/content/MANIFEST b/mozilla/editor/ui/composer/content/MANIFEST index dd8139c51cf..0f6bb151a3f 100644 --- a/mozilla/editor/ui/composer/content/MANIFEST +++ b/mozilla/editor/ui/composer/content/MANIFEST @@ -24,7 +24,7 @@ editor.xul TextEditorAppShell.xul -EditorCommands.js +editor.js ComposerCommands.js EditorCommandsDebug.js EditorCommandsOverlay.xul diff --git a/mozilla/editor/ui/composer/content/Makefile.in b/mozilla/editor/ui/composer/content/Makefile.in index 1e17dbd023d..9cbe48077f5 100644 --- a/mozilla/editor/ui/composer/content/Makefile.in +++ b/mozilla/editor/ui/composer/content/Makefile.in @@ -36,7 +36,7 @@ CHROME_TYPE=content CHROME_CONTENT = \ manifest.rdf \ editor.xul \ - EditorCommands.js \ + editor.js \ ComposerCommands.js \ EditorCommandsDebug.js \ EditorCommandsOverlay.xul \ diff --git a/mozilla/editor/ui/composer/content/TextEditorAppShell.xul b/mozilla/editor/ui/composer/content/TextEditorAppShell.xul index c46fa32666d..df2fbbb24be 100644 --- a/mozilla/editor/ui/composer/content/TextEditorAppShell.xul +++ b/mozilla/editor/ui/composer/content/TextEditorAppShell.xul @@ -45,7 +45,7 @@ persist="screenX screenY width height" > -