diff --git a/mozilla/cmd/macfe/central/mforms.cp b/mozilla/cmd/macfe/central/mforms.cp index 01a5b842eed..b35c4967e53 100644 --- a/mozilla/cmd/macfe/central/mforms.cp +++ b/mozilla/cmd/macfe/central/mforms.cp @@ -758,6 +758,59 @@ void CFormHTMLArea::FinishCreateSelf() CHTMLView::FinishCreateSelf(); } +void CFormHTMLArea::FindCommandStatus( CommandT inCommand, Boolean& outEnabled, + Boolean& outUsesMark, Char16& outMark, Str255 outName ) +{ + outUsesMark = false; + outEnabled = false; + + // We don't want composer to control all the commands it would if it were + // not inside a form, so short circuit these and hand them off to the + // browser + switch ( inCommand ) + { + case cmd_AddToBookmarks: + case cmd_Print: + case cmd_ViewSource: + case cmd_Publish: + case cmd_Refresh: + case cmd_Reload: + case cmd_EditSource: + case cmd_BrowseDocument: + case cmd_Save: + case cmd_SaveAs: + case cmd_DocumentInfo: + LCommander::FindCommandStatus(inCommand, outEnabled, outUsesMark, outMark, outName); + break; + default: + CEditView::FindCommandStatus(inCommand, outEnabled, outUsesMark, outMark, outName); + } +} + +Boolean CFormHTMLArea::ObeyCommand( CommandT inCommand, void *ioParam ) +{ + // We don't want composer to control all the commands it would if it were + // not inside a form, so short circuit these and hand them off to the + // browser + switch ( inCommand ) + { + case cmd_AddToBookmarks: + case cmd_Print: + case cmd_ViewSource: + case cmd_Publish: + case cmd_Refresh: + case cmd_Reload: + case cmd_EditSource: + case cmd_BrowseDocument: + case cmd_Save: + case cmd_SaveAs: + case cmd_DocumentInfo: + return LCommander::ObeyCommand (inCommand, ioParam); + break; + default: + return CEditView::ObeyCommand (inCommand, ioParam); + } +} void CFormHTMLArea::BeTarget() { diff --git a/mozilla/cmd/macfe/central/mforms.h b/mozilla/cmd/macfe/central/mforms.h index bf3b63ad642..5aad90a78aa 100644 --- a/mozilla/cmd/macfe/central/mforms.h +++ b/mozilla/cmd/macfe/central/mforms.h @@ -331,8 +331,12 @@ public: void FinishCreateSelf(); // ее Misc - virtual void BeTarget(); - virtual void DontBeTarget(); + virtual void FindCommandStatus( CommandT inCommand, Boolean& outEnabled, + Boolean& outUsesMark, Char16& outMark, Str255 outName ); + + virtual Boolean ObeyCommand( CommandT inCommand, void *ioParam ); + virtual void BeTarget(); + virtual void DontBeTarget(); };