Bug 1117041 - Mark virtual overridden functions as MOZ_OVERRIDE in editor; r=roc

This patch also devirtualizes some of the methods that were not
overridden by any derived classes.
This commit is contained in:
Ehsan Akhgari 2015-01-02 01:14:13 -05:00
parent 3dbef5fefb
commit 834aa05784
23 changed files with 242 additions and 239 deletions

View File

@ -44,7 +44,7 @@ public:
NS_DECL_EDITTXN
NS_IMETHOD RedoTransaction();
NS_IMETHOD RedoTransaction() MOZ_OVERRIDE;
already_AddRefed<Element> GetNewNode();

View File

@ -36,7 +36,7 @@ public:
NS_DECL_EDITTXN
NS_IMETHOD RedoTransaction();
NS_IMETHOD RedoTransaction() MOZ_OVERRIDE;
protected:
virtual ~DeleteNodeTxn();

View File

@ -37,13 +37,13 @@ public:
DeleteRangeTxn();
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(DeleteRangeTxn, EditAggregateTxn)
NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr);
NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr) MOZ_OVERRIDE;
NS_DECL_EDITTXN
NS_IMETHOD RedoTransaction();
NS_IMETHOD RedoTransaction() MOZ_OVERRIDE;
virtual void LastRelease()
virtual void LastRelease() MOZ_OVERRIDE
{
mRange = nullptr;
EditAggregateTxn::LastRelease();

View File

@ -41,7 +41,7 @@ public:
nsresult Init();
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(DeleteTextTxn, EditTxn)
NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr);
NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr) MOZ_OVERRIDE;
NS_DECL_EDITTXN

View File

@ -31,8 +31,8 @@ public:
NS_DECL_EDITTXN
NS_IMETHOD RedoTransaction();
NS_IMETHOD Merge(nsITransaction *aTransaction, bool *aDidMerge);
NS_IMETHOD RedoTransaction() MOZ_OVERRIDE;
NS_IMETHOD Merge(nsITransaction *aTransaction, bool *aDidMerge) MOZ_OVERRIDE;
/** append a transaction to this aggregate */
NS_IMETHOD AppendChild(EditTxn *aTxn);

View File

@ -24,17 +24,17 @@ public:
virtual void LastRelease() {}
NS_IMETHOD RedoTransaction(void);
NS_IMETHOD GetIsTransient(bool *aIsTransient);
NS_IMETHOD Merge(nsITransaction *aTransaction, bool *aDidMerge);
NS_IMETHOD RedoTransaction(void) MOZ_OVERRIDE;
NS_IMETHOD GetIsTransient(bool *aIsTransient) MOZ_OVERRIDE;
NS_IMETHOD Merge(nsITransaction *aTransaction, bool *aDidMerge) MOZ_OVERRIDE;
protected:
virtual ~EditTxn();
};
#define NS_DECL_EDITTXN \
NS_IMETHOD DoTransaction(); \
NS_IMETHOD UndoTransaction(); \
NS_IMETHOD GetTxnDescription(nsAString& aTxnDescription);
NS_IMETHOD DoTransaction() MOZ_OVERRIDE; \
NS_IMETHOD UndoTransaction() MOZ_OVERRIDE; \
NS_IMETHOD GetTxnDescription(nsAString& aTxnDescription) MOZ_OVERRIDE;
#endif

View File

@ -37,7 +37,7 @@ public:
nsresult CheckValidity();
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(JoinNodeTxn, EditTxn)
NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr);
NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr) MOZ_OVERRIDE;
NS_DECL_EDITTXN

View File

@ -251,7 +251,7 @@ NS_IMETHODIMP PlaceholderTxn::Commit()
return NS_OK;
}
NS_IMETHODIMP PlaceholderTxn::RememberEndingSelection()
nsresult PlaceholderTxn::RememberEndingSelection()
{
nsRefPtr<Selection> selection = mEditor->GetSelection();
NS_ENSURE_TRUE(selection, NS_ERROR_NULL_POINTER);

View File

@ -44,25 +44,25 @@ public:
NS_DECL_EDITTXN
NS_IMETHOD RedoTransaction();
NS_IMETHOD Merge(nsITransaction *aTransaction, bool *aDidMerge);
NS_IMETHOD RedoTransaction() MOZ_OVERRIDE;
NS_IMETHOD Merge(nsITransaction *aTransaction, bool *aDidMerge) MOZ_OVERRIDE;
// ------------ nsIAbsorbingTransaction -----------------------
NS_IMETHOD Init(nsIAtom* aName, nsSelectionState* aSelState,
nsEditor* aEditor);
nsEditor* aEditor) MOZ_OVERRIDE;
NS_IMETHOD GetTxnName(nsIAtom **aName);
NS_IMETHOD GetTxnName(nsIAtom **aName) MOZ_OVERRIDE;
NS_IMETHOD StartSelectionEquals(nsSelectionState *aSelState, bool *aResult);
NS_IMETHOD StartSelectionEquals(nsSelectionState *aSelState, bool *aResult) MOZ_OVERRIDE;
NS_IMETHOD EndPlaceHolderBatch();
NS_IMETHOD EndPlaceHolderBatch() MOZ_OVERRIDE;
NS_IMETHOD ForwardEndBatchTo(nsIAbsorbingTransaction *aForwardingAddress);
NS_IMETHOD ForwardEndBatchTo(nsIAbsorbingTransaction *aForwardingAddress) MOZ_OVERRIDE;
NS_IMETHOD Commit();
NS_IMETHOD Commit() MOZ_OVERRIDE;
NS_IMETHOD RememberEndingSelection();
nsresult RememberEndingSelection();
protected:
virtual ~PlaceholderTxn();

View File

@ -33,8 +33,8 @@ private:
public:
NS_DECL_EDITTXN
NS_IMETHOD RedoTransaction();
NS_IMETHOD GetIsTransient(bool *aIsTransient);
NS_IMETHOD RedoTransaction() MOZ_OVERRIDE;
NS_IMETHOD GetIsTransient(bool *aIsTransient) MOZ_OVERRIDE;
protected:

View File

@ -39,7 +39,7 @@ public:
NS_DECL_EDITTXN
NS_IMETHOD RedoTransaction();
NS_IMETHOD RedoTransaction() MOZ_OVERRIDE;
nsIContent* GetNewNode();

View File

@ -23,8 +23,8 @@ public:
NS_DECL_ISUPPORTS
NS_IMETHOD IsCommandEnabled(const char * aCommandName, nsISupports *aCommandRefCon, bool *_retval) = 0;
NS_IMETHOD DoCommand(const char *aCommandName, nsISupports *aCommandRefCon) = 0;
NS_IMETHOD IsCommandEnabled(const char * aCommandName, nsISupports *aCommandRefCon, bool *_retval) MOZ_OVERRIDE = 0;
NS_IMETHOD DoCommand(const char *aCommandName, nsISupports *aCommandRefCon) MOZ_OVERRIDE = 0;
protected:
virtual ~nsBaseEditorCommand() {}
@ -35,10 +35,10 @@ protected:
class _cmd : public nsBaseEditorCommand \
{ \
public: \
NS_IMETHOD IsCommandEnabled(const char * aCommandName, nsISupports *aCommandRefCon, bool *_retval); \
NS_IMETHOD DoCommand(const char *aCommandName, nsISupports *aCommandRefCon); \
NS_IMETHOD DoCommandParams(const char *aCommandName,nsICommandParams *aParams, nsISupports *aCommandRefCon); \
NS_IMETHOD GetCommandStateParams(const char *aCommandName,nsICommandParams *aParams, nsISupports *aCommandRefCon); \
NS_IMETHOD IsCommandEnabled(const char * aCommandName, nsISupports *aCommandRefCon, bool *_retval) MOZ_OVERRIDE; \
NS_IMETHOD DoCommand(const char *aCommandName, nsISupports *aCommandRefCon) MOZ_OVERRIDE; \
NS_IMETHOD DoCommandParams(const char *aCommandName,nsICommandParams *aParams, nsISupports *aCommandRefCon) MOZ_OVERRIDE; \
NS_IMETHOD GetCommandStateParams(const char *aCommandName,nsICommandParams *aParams, nsISupports *aCommandRefCon) MOZ_OVERRIDE; \
};

View File

@ -135,7 +135,8 @@ static nsCOMPtr<nsIDOMNode> GetTableParent(nsIDOMNode* aNode)
}
NS_IMETHODIMP nsHTMLEditor::LoadHTML(const nsAString & aInputString)
nsresult
nsHTMLEditor::LoadHTML(const nsAString & aInputString)
{
NS_ENSURE_TRUE(mRules, NS_ERROR_NOT_INITIALIZED);
@ -836,8 +837,9 @@ NS_IMETHODIMP nsHTMLEditor::PrepareTransferable(nsITransferable **transferable)
return NS_OK;
}
NS_IMETHODIMP nsHTMLEditor::PrepareHTMLTransferable(nsITransferable **aTransferable,
bool aHavePrivFlavor)
nsresult
nsHTMLEditor::PrepareHTMLTransferable(nsITransferable **aTransferable,
bool aHavePrivFlavor)
{
// Create generic Transferable for getting the data
nsresult rv = CallCreateInstance("@mozilla.org/widget/transferable;1", aTransferable);
@ -1122,13 +1124,14 @@ nsresult nsHTMLEditor::InsertObject(const char* aType, nsISupports* aObject, boo
return NS_OK;
}
NS_IMETHODIMP nsHTMLEditor::InsertFromTransferable(nsITransferable *transferable,
nsIDOMDocument *aSourceDoc,
const nsAString & aContextStr,
const nsAString & aInfoStr,
nsIDOMNode *aDestinationNode,
int32_t aDestOffset,
bool aDoDeleteSelection)
nsresult
nsHTMLEditor::InsertFromTransferable(nsITransferable *transferable,
nsIDOMDocument *aSourceDoc,
const nsAString & aContextStr,
const nsAString & aInfoStr,
nsIDOMNode *aDestinationNode,
int32_t aDestOffset,
bool aDoDeleteSelection)
{
nsresult rv = NS_OK;
nsXPIDLCString bestFlavor;

View File

@ -69,17 +69,17 @@ public:
nsHTMLEditRules();
// nsIEditRules methods
NS_IMETHOD Init(nsPlaintextEditor *aEditor);
NS_IMETHOD DetachEditor();
NS_IMETHOD Init(nsPlaintextEditor *aEditor) MOZ_OVERRIDE;
NS_IMETHOD DetachEditor() MOZ_OVERRIDE;
NS_IMETHOD BeforeEdit(EditAction action,
nsIEditor::EDirection aDirection);
nsIEditor::EDirection aDirection) MOZ_OVERRIDE;
NS_IMETHOD AfterEdit(EditAction action,
nsIEditor::EDirection aDirection);
nsIEditor::EDirection aDirection) MOZ_OVERRIDE;
NS_IMETHOD WillDoAction(mozilla::dom::Selection* aSelection, nsRulesInfo* aInfo,
bool* aCancel, bool* aHandled);
bool* aCancel, bool* aHandled) MOZ_OVERRIDE;
NS_IMETHOD DidDoAction(mozilla::dom::Selection* aSelection,
nsRulesInfo* aInfo, nsresult aResult);
NS_IMETHOD DocumentModified();
nsRulesInfo* aInfo, nsresult aResult) MOZ_OVERRIDE;
NS_IMETHOD DocumentModified() MOZ_OVERRIDE;
nsresult GetListState(bool *aMixed, bool *aOL, bool *aUL, bool *aDL);
nsresult GetListItemState(bool *aMixed, bool *aLI, bool *aDT, bool *aDD);
@ -90,22 +90,22 @@ public:
// nsIEditActionListener methods
NS_IMETHOD WillCreateNode(const nsAString& aTag, nsIDOMNode *aParent, int32_t aPosition);
NS_IMETHOD DidCreateNode(const nsAString& aTag, nsIDOMNode *aNode, nsIDOMNode *aParent, int32_t aPosition, nsresult aResult);
NS_IMETHOD WillInsertNode(nsIDOMNode *aNode, nsIDOMNode *aParent, int32_t aPosition);
NS_IMETHOD DidInsertNode(nsIDOMNode *aNode, nsIDOMNode *aParent, int32_t aPosition, nsresult aResult);
NS_IMETHOD WillDeleteNode(nsIDOMNode *aChild);
NS_IMETHOD DidDeleteNode(nsIDOMNode *aChild, nsresult aResult);
NS_IMETHOD WillSplitNode(nsIDOMNode *aExistingRightNode, int32_t aOffset);
NS_IMETHOD DidSplitNode(nsIDOMNode *aExistingRightNode, int32_t aOffset, nsIDOMNode *aNewLeftNode, nsresult aResult);
NS_IMETHOD WillJoinNodes(nsIDOMNode *aLeftNode, nsIDOMNode *aRightNode, nsIDOMNode *aParent);
NS_IMETHOD DidJoinNodes(nsIDOMNode *aLeftNode, nsIDOMNode *aRightNode, nsIDOMNode *aParent, nsresult aResult);
NS_IMETHOD WillInsertText(nsIDOMCharacterData *aTextNode, int32_t aOffset, const nsAString &aString);
NS_IMETHOD DidInsertText(nsIDOMCharacterData *aTextNode, int32_t aOffset, const nsAString &aString, nsresult aResult);
NS_IMETHOD WillDeleteText(nsIDOMCharacterData *aTextNode, int32_t aOffset, int32_t aLength);
NS_IMETHOD DidDeleteText(nsIDOMCharacterData *aTextNode, int32_t aOffset, int32_t aLength, nsresult aResult);
NS_IMETHOD WillDeleteSelection(nsISelection *aSelection);
NS_IMETHOD DidDeleteSelection(nsISelection *aSelection);
NS_IMETHOD WillCreateNode(const nsAString& aTag, nsIDOMNode *aParent, int32_t aPosition) MOZ_OVERRIDE;
NS_IMETHOD DidCreateNode(const nsAString& aTag, nsIDOMNode *aNode, nsIDOMNode *aParent, int32_t aPosition, nsresult aResult) MOZ_OVERRIDE;
NS_IMETHOD WillInsertNode(nsIDOMNode *aNode, nsIDOMNode *aParent, int32_t aPosition) MOZ_OVERRIDE;
NS_IMETHOD DidInsertNode(nsIDOMNode *aNode, nsIDOMNode *aParent, int32_t aPosition, nsresult aResult) MOZ_OVERRIDE;
NS_IMETHOD WillDeleteNode(nsIDOMNode *aChild) MOZ_OVERRIDE;
NS_IMETHOD DidDeleteNode(nsIDOMNode *aChild, nsresult aResult) MOZ_OVERRIDE;
NS_IMETHOD WillSplitNode(nsIDOMNode *aExistingRightNode, int32_t aOffset) MOZ_OVERRIDE;
NS_IMETHOD DidSplitNode(nsIDOMNode *aExistingRightNode, int32_t aOffset, nsIDOMNode *aNewLeftNode, nsresult aResult) MOZ_OVERRIDE;
NS_IMETHOD WillJoinNodes(nsIDOMNode *aLeftNode, nsIDOMNode *aRightNode, nsIDOMNode *aParent) MOZ_OVERRIDE;
NS_IMETHOD DidJoinNodes(nsIDOMNode *aLeftNode, nsIDOMNode *aRightNode, nsIDOMNode *aParent, nsresult aResult) MOZ_OVERRIDE;
NS_IMETHOD WillInsertText(nsIDOMCharacterData *aTextNode, int32_t aOffset, const nsAString &aString) MOZ_OVERRIDE;
NS_IMETHOD DidInsertText(nsIDOMCharacterData *aTextNode, int32_t aOffset, const nsAString &aString, nsresult aResult) MOZ_OVERRIDE;
NS_IMETHOD WillDeleteText(nsIDOMCharacterData *aTextNode, int32_t aOffset, int32_t aLength) MOZ_OVERRIDE;
NS_IMETHOD DidDeleteText(nsIDOMCharacterData *aTextNode, int32_t aOffset, int32_t aLength, nsresult aResult) MOZ_OVERRIDE;
NS_IMETHOD WillDeleteSelection(nsISelection *aSelection) MOZ_OVERRIDE;
NS_IMETHOD DidDeleteSelection(nsISelection *aSelection) MOZ_OVERRIDE;
protected:
virtual ~nsHTMLEditRules();

View File

@ -2663,7 +2663,7 @@ nsHTMLEditor::InsertLinkAroundSelection(nsIDOMElement* aAnchorElement)
return NS_OK;
}
NS_IMETHODIMP
nsresult
nsHTMLEditor::SetHTMLBackgroundColor(const nsAString& aColor)
{
NS_PRECONDITION(mDocWeak, "Missing Editor DOM Document");
@ -4533,7 +4533,7 @@ nsHTMLEditor::SetIsCSSEnabled(bool aIsCSSPrefChecked)
}
// Set the block background color
NS_IMETHODIMP
nsresult
nsHTMLEditor::SetCSSBackgroundColor(const nsAString& aColor)
{
if (!mRules) { return NS_ERROR_NOT_INITIALIZED; }
@ -4768,7 +4768,7 @@ nsHTMLEditor::AreNodesSameType(nsIContent* aNode1, nsIContent* aNode2)
aNode2->AsDOMNode());
}
NS_IMETHODIMP
nsresult
nsHTMLEditor::CopyLastEditableChildStyles(nsIDOMNode * aPreviousBlock, nsIDOMNode * aNewBlock,
nsIDOMNode **aOutBrNode)
{

View File

@ -100,17 +100,17 @@ public:
bool GetReturnInParagraphCreatesNewParagraph();
/* ------------ nsPlaintextEditor overrides -------------- */
NS_IMETHOD GetIsDocumentEditable(bool *aIsDocumentEditable);
NS_IMETHOD BeginningOfDocument();
virtual nsresult HandleKeyPressEvent(nsIDOMKeyEvent* aKeyEvent);
virtual already_AddRefed<nsIContent> GetFocusedContent();
virtual already_AddRefed<nsIContent> GetFocusedContentForIME();
virtual bool IsActiveInDOMWindow();
virtual already_AddRefed<mozilla::dom::EventTarget> GetDOMEventTarget();
NS_IMETHOD GetIsDocumentEditable(bool *aIsDocumentEditable) MOZ_OVERRIDE;
NS_IMETHOD BeginningOfDocument() MOZ_OVERRIDE;
virtual nsresult HandleKeyPressEvent(nsIDOMKeyEvent* aKeyEvent) MOZ_OVERRIDE;
virtual already_AddRefed<nsIContent> GetFocusedContent() MOZ_OVERRIDE;
virtual already_AddRefed<nsIContent> GetFocusedContentForIME() MOZ_OVERRIDE;
virtual bool IsActiveInDOMWindow() MOZ_OVERRIDE;
virtual already_AddRefed<mozilla::dom::EventTarget> GetDOMEventTarget() MOZ_OVERRIDE;
virtual mozilla::dom::Element* GetEditorRoot() MOZ_OVERRIDE;
virtual already_AddRefed<nsIContent> FindSelectionRoot(nsINode *aNode);
virtual bool IsAcceptableInputEvent(nsIDOMEvent* aEvent);
virtual already_AddRefed<nsIContent> GetInputEventTargetContent();
virtual already_AddRefed<nsIContent> FindSelectionRoot(nsINode *aNode) MOZ_OVERRIDE;
virtual bool IsAcceptableInputEvent(nsIDOMEvent* aEvent) MOZ_OVERRIDE;
virtual already_AddRefed<nsIContent> GetInputEventTargetContent() MOZ_OVERRIDE;
virtual bool IsEditable(nsINode* aNode) MOZ_OVERRIDE;
using nsEditor::IsEditable;
@ -120,7 +120,7 @@ public:
NS_DECL_NSIMUTATIONOBSERVER_CONTENTREMOVED
/* ------------ nsIEditorIMESupport overrides ------------ */
NS_IMETHOD GetPreferredIMEState(mozilla::widget::IMEState *aState);
NS_IMETHOD GetPreferredIMEState(mozilla::widget::IMEState *aState) MOZ_OVERRIDE;
/* ------------ nsIHTMLEditor methods -------------- */
@ -139,10 +139,10 @@ public:
NS_DECL_NSIHTMLINLINETABLEEDITOR
/* ------------ nsIHTMLEditor methods -------------- */
NS_IMETHOD CopyLastEditableChildStyles(nsIDOMNode *aPreviousBlock, nsIDOMNode *aNewBlock,
nsresult CopyLastEditableChildStyles(nsIDOMNode *aPreviousBlock, nsIDOMNode *aNewBlock,
nsIDOMNode **aOutBrNode);
NS_IMETHOD LoadHTML(const nsAString &aInputString);
nsresult LoadHTML(const nsAString &aInputString);
nsresult GetCSSBackgroundColorState(bool *aMixed, nsAString &aOutColor,
bool aBlockLevel);
@ -150,15 +150,15 @@ public:
/* ------------ nsIEditorStyleSheets methods -------------- */
NS_IMETHOD AddStyleSheet(const nsAString & aURL);
NS_IMETHOD ReplaceStyleSheet(const nsAString& aURL);
NS_IMETHOD RemoveStyleSheet(const nsAString &aURL);
NS_IMETHOD AddStyleSheet(const nsAString & aURL) MOZ_OVERRIDE;
NS_IMETHOD ReplaceStyleSheet(const nsAString& aURL) MOZ_OVERRIDE;
NS_IMETHOD RemoveStyleSheet(const nsAString &aURL) MOZ_OVERRIDE;
NS_IMETHOD AddOverrideStyleSheet(const nsAString & aURL);
NS_IMETHOD ReplaceOverrideStyleSheet(const nsAString& aURL);
NS_IMETHOD RemoveOverrideStyleSheet(const nsAString &aURL);
NS_IMETHOD AddOverrideStyleSheet(const nsAString & aURL) MOZ_OVERRIDE;
NS_IMETHOD ReplaceOverrideStyleSheet(const nsAString& aURL) MOZ_OVERRIDE;
NS_IMETHOD RemoveOverrideStyleSheet(const nsAString &aURL) MOZ_OVERRIDE;
NS_IMETHOD EnableStyleSheet(const nsAString& aURL, bool aEnable);
NS_IMETHOD EnableStyleSheet(const nsAString& aURL, bool aEnable) MOZ_OVERRIDE;
/* ------------ nsIEditorMailSupport methods -------------- */
@ -166,46 +166,46 @@ public:
/* ------------ nsITableEditor methods -------------- */
NS_IMETHOD InsertTableCell(int32_t aNumber, bool aAfter);
NS_IMETHOD InsertTableColumn(int32_t aNumber, bool aAfter);
NS_IMETHOD InsertTableRow(int32_t aNumber, bool aAfter);
NS_IMETHOD DeleteTable();
NS_IMETHOD DeleteTableCell(int32_t aNumber);
NS_IMETHOD DeleteTableCellContents();
NS_IMETHOD DeleteTableColumn(int32_t aNumber);
NS_IMETHOD DeleteTableRow(int32_t aNumber);
NS_IMETHOD SelectTableCell();
NS_IMETHOD SelectBlockOfCells(nsIDOMElement *aStartCell, nsIDOMElement *aEndCell);
NS_IMETHOD SelectTableRow();
NS_IMETHOD SelectTableColumn();
NS_IMETHOD SelectTable();
NS_IMETHOD SelectAllTableCells();
NS_IMETHOD SwitchTableCellHeaderType(nsIDOMElement *aSourceCell, nsIDOMElement **aNewCell);
NS_IMETHOD JoinTableCells(bool aMergeNonContiguousContents);
NS_IMETHOD SplitTableCell();
NS_IMETHOD NormalizeTable(nsIDOMElement *aTable);
NS_IMETHOD InsertTableCell(int32_t aNumber, bool aAfter) MOZ_OVERRIDE;
NS_IMETHOD InsertTableColumn(int32_t aNumber, bool aAfter) MOZ_OVERRIDE;
NS_IMETHOD InsertTableRow(int32_t aNumber, bool aAfter) MOZ_OVERRIDE;
NS_IMETHOD DeleteTable() MOZ_OVERRIDE;
NS_IMETHOD DeleteTableCell(int32_t aNumber) MOZ_OVERRIDE;
NS_IMETHOD DeleteTableCellContents() MOZ_OVERRIDE;
NS_IMETHOD DeleteTableColumn(int32_t aNumber) MOZ_OVERRIDE;
NS_IMETHOD DeleteTableRow(int32_t aNumber) MOZ_OVERRIDE;
NS_IMETHOD SelectTableCell() MOZ_OVERRIDE;
NS_IMETHOD SelectBlockOfCells(nsIDOMElement *aStartCell, nsIDOMElement *aEndCell) MOZ_OVERRIDE;
NS_IMETHOD SelectTableRow() MOZ_OVERRIDE;
NS_IMETHOD SelectTableColumn() MOZ_OVERRIDE;
NS_IMETHOD SelectTable() MOZ_OVERRIDE;
NS_IMETHOD SelectAllTableCells() MOZ_OVERRIDE;
NS_IMETHOD SwitchTableCellHeaderType(nsIDOMElement *aSourceCell, nsIDOMElement **aNewCell) MOZ_OVERRIDE;
NS_IMETHOD JoinTableCells(bool aMergeNonContiguousContents) MOZ_OVERRIDE;
NS_IMETHOD SplitTableCell() MOZ_OVERRIDE;
NS_IMETHOD NormalizeTable(nsIDOMElement *aTable) MOZ_OVERRIDE;
NS_IMETHOD GetCellIndexes(nsIDOMElement *aCell,
int32_t* aRowIndex, int32_t* aColIndex);
int32_t* aRowIndex, int32_t* aColIndex) MOZ_OVERRIDE;
NS_IMETHOD GetTableSize(nsIDOMElement *aTable,
int32_t* aRowCount, int32_t* aColCount);
NS_IMETHOD GetCellAt(nsIDOMElement* aTable, int32_t aRowIndex, int32_t aColIndex, nsIDOMElement **aCell);
int32_t* aRowCount, int32_t* aColCount) MOZ_OVERRIDE;
NS_IMETHOD GetCellAt(nsIDOMElement* aTable, int32_t aRowIndex, int32_t aColIndex, nsIDOMElement **aCell) MOZ_OVERRIDE;
NS_IMETHOD GetCellDataAt(nsIDOMElement* aTable,
int32_t aRowIndex, int32_t aColIndex,
nsIDOMElement **aCell,
int32_t* aStartRowIndex, int32_t* aStartColIndex,
int32_t* aRowSpan, int32_t* aColSpan,
int32_t* aActualRowSpan, int32_t* aActualColSpan,
bool* aIsSelected);
NS_IMETHOD GetFirstRow(nsIDOMElement* aTableElement, nsIDOMNode** aRowNode);
NS_IMETHOD GetNextRow(nsIDOMNode* aCurrentRowNode, nsIDOMNode** aRowNode);
NS_IMETHOD GetLastCellInRow(nsIDOMNode* aRowNode, nsIDOMNode** aCellNode);
bool* aIsSelected) MOZ_OVERRIDE;
NS_IMETHOD GetFirstRow(nsIDOMElement* aTableElement, nsIDOMNode** aRowNode) MOZ_OVERRIDE;
NS_IMETHOD GetNextRow(nsIDOMNode* aCurrentRowNode, nsIDOMNode** aRowNode) MOZ_OVERRIDE;
nsresult GetLastCellInRow(nsIDOMNode* aRowNode, nsIDOMNode** aCellNode);
NS_IMETHOD SetSelectionAfterTableEdit(nsIDOMElement* aTable, int32_t aRow, int32_t aCol,
int32_t aDirection, bool aSelected);
int32_t aDirection, bool aSelected) MOZ_OVERRIDE;
NS_IMETHOD GetSelectedOrParentTableElement(nsAString& aTagName,
int32_t *aSelectedCount,
nsIDOMElement** aTableElement);
NS_IMETHOD GetSelectedCellsType(nsIDOMElement *aElement, uint32_t *aSelectionType);
nsIDOMElement** aTableElement) MOZ_OVERRIDE;
NS_IMETHOD GetSelectedCellsType(nsIDOMElement *aElement, uint32_t *aSelectionType) MOZ_OVERRIDE;
nsresult GetCellFromRange(nsRange* aRange, nsIDOMElement** aCell);
@ -214,19 +214,19 @@ public:
// (i.e., each cell added to selection is added in another range
// in the selection's rangelist, independent of location in table)
// aRange is optional: returns the range around the cell
NS_IMETHOD GetFirstSelectedCell(nsIDOMRange **aRange, nsIDOMElement **aCell);
NS_IMETHOD GetFirstSelectedCell(nsIDOMRange **aRange, nsIDOMElement **aCell) MOZ_OVERRIDE;
// Get next cell until no more are found. Always use GetFirstSelected cell first
// aRange is optional: returns the range around the cell
NS_IMETHOD GetNextSelectedCell(nsIDOMRange **aRange, nsIDOMElement **aCell);
NS_IMETHOD GetNextSelectedCell(nsIDOMRange **aRange, nsIDOMElement **aCell) MOZ_OVERRIDE;
// Upper-left-most selected cell in table
NS_IMETHOD GetFirstSelectedCellInTable(int32_t *aRowIndex, int32_t *aColIndex, nsIDOMElement **aCell);
NS_IMETHOD GetFirstSelectedCellInTable(int32_t *aRowIndex, int32_t *aColIndex, nsIDOMElement **aCell) MOZ_OVERRIDE;
/* miscellaneous */
// This sets background on the appropriate container element (table, cell,)
// or calls into nsTextEditor to set the page background
NS_IMETHOD SetCSSBackgroundColor(const nsAString& aColor);
NS_IMETHOD SetHTMLBackgroundColor(const nsAString& aColor);
nsresult SetCSSBackgroundColor(const nsAString& aColor);
nsresult SetHTMLBackgroundColor(const nsAString& aColor);
/* ------------ Block methods moved from nsEditor -------------- */
static already_AddRefed<mozilla::dom::Element> GetBlockNodeParent(nsINode* aNode);
@ -247,13 +247,13 @@ public:
/* ------------ Overrides of nsEditor interface methods -------------- */
nsresult EndUpdateViewBatch();
nsresult EndUpdateViewBatch() MOZ_OVERRIDE;
/** prepare the editor for use */
NS_IMETHOD Init(nsIDOMDocument *aDoc, nsIContent *aRoot,
nsISelectionController *aSelCon, uint32_t aFlags,
const nsAString& aValue);
NS_IMETHOD PreDestroy(bool aDestroyingFrames);
const nsAString& aValue) MOZ_OVERRIDE;
NS_IMETHOD PreDestroy(bool aDestroyingFrames) MOZ_OVERRIDE;
/** Internal, static version */
// aElement must not be null.
@ -263,27 +263,27 @@ protected:
virtual ~nsHTMLEditor();
using nsEditor::IsBlockNode;
virtual bool IsBlockNode(nsINode *aNode);
virtual bool IsBlockNode(nsINode *aNode) MOZ_OVERRIDE;
public:
NS_IMETHOD SetFlags(uint32_t aFlags);
NS_IMETHOD SetFlags(uint32_t aFlags) MOZ_OVERRIDE;
NS_IMETHOD Paste(int32_t aSelectionType);
NS_IMETHOD CanPaste(int32_t aSelectionType, bool *aCanPaste);
NS_IMETHOD Paste(int32_t aSelectionType) MOZ_OVERRIDE;
NS_IMETHOD CanPaste(int32_t aSelectionType, bool *aCanPaste) MOZ_OVERRIDE;
NS_IMETHOD PasteTransferable(nsITransferable *aTransferable);
NS_IMETHOD CanPasteTransferable(nsITransferable *aTransferable, bool *aCanPaste);
NS_IMETHOD PasteTransferable(nsITransferable *aTransferable) MOZ_OVERRIDE;
NS_IMETHOD CanPasteTransferable(nsITransferable *aTransferable, bool *aCanPaste) MOZ_OVERRIDE;
NS_IMETHOD DebugUnitTests(int32_t *outNumTests, int32_t *outNumTestsFailed);
NS_IMETHOD DebugUnitTests(int32_t *outNumTests, int32_t *outNumTestsFailed) MOZ_OVERRIDE;
/** All editor operations which alter the doc should be prefaced
* with a call to StartOperation, naming the action and direction */
NS_IMETHOD StartOperation(EditAction opID,
nsIEditor::EDirection aDirection);
nsIEditor::EDirection aDirection) MOZ_OVERRIDE;
/** All editor operations which alter the doc should be followed
* with a call to EndOperation */
NS_IMETHOD EndOperation();
NS_IMETHOD EndOperation() MOZ_OVERRIDE;
/** returns true if aParentTag can contain a child of type aChildTag */
virtual bool TagCanContainTag(nsIAtom& aParentTag, nsIAtom& aChildTag)
@ -294,15 +294,15 @@ public:
virtual bool IsContainer(nsIDOMNode* aNode) MOZ_OVERRIDE;
/** make the given selection span the entire document */
virtual nsresult SelectEntireDocument(mozilla::dom::Selection* aSelection);
virtual nsresult SelectEntireDocument(mozilla::dom::Selection* aSelection) MOZ_OVERRIDE;
NS_IMETHOD SetAttributeOrEquivalent(nsIDOMElement * aElement,
const nsAString & aAttribute,
const nsAString & aValue,
bool aSuppressTransaction);
bool aSuppressTransaction) MOZ_OVERRIDE;
NS_IMETHOD RemoveAttributeOrEquivalent(nsIDOMElement * aElement,
const nsAString & aAttribute,
bool aSuppressTransaction);
bool aSuppressTransaction) MOZ_OVERRIDE;
/** join together any adjacent editable text nodes in the range */
nsresult CollapseAdjacentTextNodes(nsRange* aRange);
@ -311,30 +311,30 @@ public:
MOZ_OVERRIDE;
NS_IMETHOD DeleteSelectionImpl(EDirection aAction,
EStripWrappers aStripWrappers);
EStripWrappers aStripWrappers) MOZ_OVERRIDE;
nsresult DeleteNode(nsINode* aNode);
NS_IMETHODIMP DeleteNode(nsIDOMNode * aNode);
NS_IMETHOD DeleteNode(nsIDOMNode * aNode) MOZ_OVERRIDE;
nsresult DeleteText(nsGenericDOMDataNode& aTextNode, uint32_t aOffset,
uint32_t aLength);
virtual nsresult InsertTextImpl(const nsAString& aStringToInsert,
nsCOMPtr<nsINode>* aInOutNode,
int32_t* aInOutOffset,
nsIDocument* aDoc) MOZ_OVERRIDE;
NS_IMETHOD_(bool) IsModifiableNode(nsIDOMNode *aNode);
virtual bool IsModifiableNode(nsINode *aNode);
NS_IMETHOD_(bool) IsModifiableNode(nsIDOMNode *aNode) MOZ_OVERRIDE;
virtual bool IsModifiableNode(nsINode *aNode) MOZ_OVERRIDE;
NS_IMETHOD GetIsSelectionEditable(bool* aIsSelectionEditable);
NS_IMETHOD GetIsSelectionEditable(bool* aIsSelectionEditable) MOZ_OVERRIDE;
NS_IMETHOD SelectAll();
NS_IMETHOD SelectAll() MOZ_OVERRIDE;
NS_IMETHOD GetRootElement(nsIDOMElement **aRootElement);
NS_IMETHOD GetRootElement(nsIDOMElement **aRootElement) MOZ_OVERRIDE;
/* ------------ nsICSSLoaderObserver -------------- */
NS_IMETHOD StyleSheetLoaded(mozilla::CSSStyleSheet* aSheet,
bool aWasAlternate, nsresult aStatus);
bool aWasAlternate, nsresult aStatus) MOZ_OVERRIDE;
/* ------------ Utility Routines, not part of public API -------------- */
NS_IMETHOD TypedText(const nsAString& aString, ETypingAction aAction);
NS_IMETHOD TypedText(const nsAString& aString, ETypingAction aAction) MOZ_OVERRIDE;
nsresult InsertNodeAtPoint( nsIDOMNode *aNode,
nsCOMPtr<nsIDOMNode> *ioParent,
int32_t *ioOffset,
@ -376,9 +376,9 @@ public:
// Dealing with the internal style sheet lists:
NS_IMETHOD GetStyleSheetForURL(const nsAString &aURL,
mozilla::CSSStyleSheet** _retval);
mozilla::CSSStyleSheet** _retval) MOZ_OVERRIDE;
NS_IMETHOD GetURLForStyleSheet(mozilla::CSSStyleSheet* aStyleSheet,
nsAString& aURL);
nsAString& aURL) MOZ_OVERRIDE;
// Add a url + known style sheet to the internal lists:
nsresult AddNewStyleSheetToList(const nsAString &aURL,
@ -402,13 +402,13 @@ public:
protected:
NS_IMETHOD InitRules();
NS_IMETHOD InitRules() MOZ_OVERRIDE;
// Create the event listeners for the editor to install
virtual void CreateEventListeners();
virtual void CreateEventListeners() MOZ_OVERRIDE;
virtual nsresult InstallEventListeners();
virtual void RemoveEventListeners();
virtual nsresult InstallEventListeners() MOZ_OVERRIDE;
virtual void RemoveEventListeners() MOZ_OVERRIDE;
bool ShouldReplaceRootElement();
void ResetRootElementAndEventTarget();
@ -426,7 +426,7 @@ protected:
already_AddRefed<mozilla::dom::Element> CreateBR(nsINode* aNode,
int32_t aOffset, EDirection aSelect = eNone);
NS_IMETHOD CreateBR(nsIDOMNode *aNode, int32_t aOffset,
nsCOMPtr<nsIDOMNode> *outBRNode, nsIEditor::EDirection aSelect = nsIEditor::eNone);
nsCOMPtr<nsIDOMNode> *outBRNode, nsIEditor::EDirection aSelect = nsIEditor::eNone) MOZ_OVERRIDE;
// Table Editing (implemented in nsTableEditor.cpp)
@ -549,9 +549,9 @@ protected:
bool aDoDeleteSelection);
// factored methods for handling insertion of data from transferables (drag&drop or clipboard)
NS_IMETHOD PrepareTransferable(nsITransferable **transferable);
NS_IMETHOD PrepareHTMLTransferable(nsITransferable **transferable, bool havePrivFlavor);
NS_IMETHOD InsertFromTransferable(nsITransferable *transferable,
NS_IMETHOD PrepareTransferable(nsITransferable **transferable) MOZ_OVERRIDE;
nsresult PrepareHTMLTransferable(nsITransferable **transferable, bool havePrivFlavor);
nsresult InsertFromTransferable(nsITransferable *transferable,
nsIDOMDocument *aSourceDoc,
const nsAString & aContextStr,
const nsAString & aInfoStr,
@ -563,7 +563,7 @@ protected:
nsIDOMDocument *aSourceDoc,
nsIDOMNode *aDestinationNode,
int32_t aDestOffset,
bool aDoDeleteSelection);
bool aDoDeleteSelection) MOZ_OVERRIDE;
bool HavePrivateHTMLFlavor( nsIClipboard *clipboard );
nsresult ParseCFHTML(nsCString & aCfhtml, char16_t **aStuffToPaste, char16_t **aCfcontext);
nsresult DoContentFilterCallback(const nsAString &aFlavor,

View File

@ -27,7 +27,7 @@ public:
#ifdef DEBUG
// WARNING: You must be use nsHTMLEditor or its sub class for this class.
virtual nsresult Connect(nsEditor* aEditor);
virtual nsresult Connect(nsEditor* aEditor) MOZ_OVERRIDE;
#endif
protected:

View File

@ -71,66 +71,66 @@ public:
NS_IMETHOD SetAttributeOrEquivalent(nsIDOMElement * aElement,
const nsAString & aAttribute,
const nsAString & aValue,
bool aSuppressTransaction);
bool aSuppressTransaction) MOZ_OVERRIDE;
NS_IMETHOD RemoveAttributeOrEquivalent(nsIDOMElement * aElement,
const nsAString & aAttribute,
bool aSuppressTransaction);
bool aSuppressTransaction) MOZ_OVERRIDE;
/** prepare the editor for use */
NS_IMETHOD Init(nsIDOMDocument *aDoc, nsIContent *aRoot,
nsISelectionController *aSelCon, uint32_t aFlags,
const nsAString& aValue);
const nsAString& aValue) MOZ_OVERRIDE;
NS_IMETHOD GetDocumentIsEmpty(bool *aDocumentIsEmpty);
NS_IMETHOD GetIsDocumentEditable(bool *aIsDocumentEditable);
NS_IMETHOD GetDocumentIsEmpty(bool *aDocumentIsEmpty) MOZ_OVERRIDE;
NS_IMETHOD GetIsDocumentEditable(bool *aIsDocumentEditable) MOZ_OVERRIDE;
NS_IMETHOD DeleteSelection(EDirection aAction,
EStripWrappers aStripWrappers);
EStripWrappers aStripWrappers) MOZ_OVERRIDE;
NS_IMETHOD SetDocumentCharacterSet(const nsACString & characterSet);
NS_IMETHOD SetDocumentCharacterSet(const nsACString & characterSet) MOZ_OVERRIDE;
NS_IMETHOD Undo(uint32_t aCount);
NS_IMETHOD Redo(uint32_t aCount);
NS_IMETHOD Undo(uint32_t aCount) MOZ_OVERRIDE;
NS_IMETHOD Redo(uint32_t aCount) MOZ_OVERRIDE;
NS_IMETHOD Cut();
NS_IMETHOD CanCut(bool *aCanCut);
NS_IMETHOD Copy();
NS_IMETHOD CanCopy(bool *aCanCopy);
NS_IMETHOD Paste(int32_t aSelectionType);
NS_IMETHOD CanPaste(int32_t aSelectionType, bool *aCanPaste);
NS_IMETHOD PasteTransferable(nsITransferable *aTransferable);
NS_IMETHOD CanPasteTransferable(nsITransferable *aTransferable, bool *aCanPaste);
NS_IMETHOD Cut() MOZ_OVERRIDE;
NS_IMETHOD CanCut(bool *aCanCut) MOZ_OVERRIDE;
NS_IMETHOD Copy() MOZ_OVERRIDE;
NS_IMETHOD CanCopy(bool *aCanCopy) MOZ_OVERRIDE;
NS_IMETHOD Paste(int32_t aSelectionType) MOZ_OVERRIDE;
NS_IMETHOD CanPaste(int32_t aSelectionType, bool *aCanPaste) MOZ_OVERRIDE;
NS_IMETHOD PasteTransferable(nsITransferable *aTransferable) MOZ_OVERRIDE;
NS_IMETHOD CanPasteTransferable(nsITransferable *aTransferable, bool *aCanPaste) MOZ_OVERRIDE;
NS_IMETHOD OutputToString(const nsAString& aFormatType,
uint32_t aFlags,
nsAString& aOutputString);
nsAString& aOutputString) MOZ_OVERRIDE;
NS_IMETHOD OutputToStream(nsIOutputStream* aOutputStream,
const nsAString& aFormatType,
const nsACString& aCharsetOverride,
uint32_t aFlags);
uint32_t aFlags) MOZ_OVERRIDE;
/** All editor operations which alter the doc should be prefaced
* with a call to StartOperation, naming the action and direction */
NS_IMETHOD StartOperation(EditAction opID,
nsIEditor::EDirection aDirection);
nsIEditor::EDirection aDirection) MOZ_OVERRIDE;
/** All editor operations which alter the doc should be followed
* with a call to EndOperation */
NS_IMETHOD EndOperation();
NS_IMETHOD EndOperation() MOZ_OVERRIDE;
/** make the given selection span the entire document */
virtual nsresult SelectEntireDocument(mozilla::dom::Selection* aSelection);
virtual nsresult SelectEntireDocument(mozilla::dom::Selection* aSelection) MOZ_OVERRIDE;
virtual nsresult HandleKeyPressEvent(nsIDOMKeyEvent* aKeyEvent);
virtual nsresult HandleKeyPressEvent(nsIDOMKeyEvent* aKeyEvent) MOZ_OVERRIDE;
virtual already_AddRefed<mozilla::dom::EventTarget> GetDOMEventTarget();
virtual already_AddRefed<mozilla::dom::EventTarget> GetDOMEventTarget() MOZ_OVERRIDE;
virtual nsresult BeginIMEComposition(mozilla::WidgetCompositionEvent* aEvent);
virtual nsresult BeginIMEComposition(mozilla::WidgetCompositionEvent* aEvent) MOZ_OVERRIDE;
virtual nsresult UpdateIMEComposition(nsIDOMEvent* aTextEvent) MOZ_OVERRIDE;
virtual already_AddRefed<nsIContent> GetInputEventTargetContent();
virtual already_AddRefed<nsIContent> GetInputEventTargetContent() MOZ_OVERRIDE;
/* ------------ Utility Routines, not part of public API -------------- */
NS_IMETHOD TypedText(const nsAString& aString, ETypingAction aAction);
@ -145,9 +145,9 @@ public:
nsIDOMDocument *aSourceDoc,
nsIDOMNode *aDestinationNode,
int32_t aDestOffset,
bool aDoDeleteSelection);
bool aDoDeleteSelection) MOZ_OVERRIDE;
virtual nsresult InsertFromDrop(nsIDOMEvent* aDropEvent);
virtual nsresult InsertFromDrop(nsIDOMEvent* aDropEvent) MOZ_OVERRIDE;
/**
* Extends the selection for given deletion operation

View File

@ -29,7 +29,7 @@ public:
AddStyleSheetTxn();
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(AddStyleSheetTxn, EditTxn)
NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr);
NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr) MOZ_OVERRIDE;
NS_DECL_EDITTXN
@ -54,7 +54,7 @@ public:
RemoveStyleSheetTxn();
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(RemoveStyleSheetTxn, EditTxn)
NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr);
NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr) MOZ_OVERRIDE;
NS_DECL_EDITTXN

View File

@ -358,7 +358,7 @@ nsHTMLEditor::GetNextRow(nsIDOMNode* aCurrentRowNode, nsIDOMNode **aRowNode)
return NS_EDITOR_ELEMENT_NOT_FOUND;
}
NS_IMETHODIMP
nsresult
nsHTMLEditor::GetLastCellInRow(nsIDOMNode* aRowNode, nsIDOMNode** aCellNode)
{
NS_ENSURE_TRUE(aCellNode, NS_ERROR_NULL_POINTER);

View File

@ -46,19 +46,19 @@ public:
nsTextEditRules();
// nsIEditRules methods
NS_IMETHOD Init(nsPlaintextEditor *aEditor);
NS_IMETHOD SetInitialValue(const nsAString& aValue);
NS_IMETHOD DetachEditor();
NS_IMETHOD Init(nsPlaintextEditor *aEditor) MOZ_OVERRIDE;
NS_IMETHOD SetInitialValue(const nsAString& aValue) MOZ_OVERRIDE;
NS_IMETHOD DetachEditor() MOZ_OVERRIDE;
NS_IMETHOD BeforeEdit(EditAction action,
nsIEditor::EDirection aDirection);
nsIEditor::EDirection aDirection) MOZ_OVERRIDE;
NS_IMETHOD AfterEdit(EditAction action,
nsIEditor::EDirection aDirection);
nsIEditor::EDirection aDirection) MOZ_OVERRIDE;
NS_IMETHOD WillDoAction(mozilla::dom::Selection* aSelection,
nsRulesInfo* aInfo, bool* aCancel, bool* aHandled);
nsRulesInfo* aInfo, bool* aCancel, bool* aHandled) MOZ_OVERRIDE;
NS_IMETHOD DidDoAction(mozilla::dom::Selection* aSelection,
nsRulesInfo* aInfo, nsresult aResult);
NS_IMETHOD DocumentIsEmpty(bool *aDocumentIsEmpty);
NS_IMETHOD DocumentModified();
nsRulesInfo* aInfo, nsresult aResult) MOZ_OVERRIDE;
NS_IMETHOD DocumentIsEmpty(bool *aDocumentIsEmpty) MOZ_OVERRIDE;
NS_IMETHOD DocumentModified() MOZ_OVERRIDE;
protected:
virtual ~nsTextEditRules();

View File

@ -30,15 +30,15 @@ public:
explicit nsFilteredContentIterator(nsITextServicesFilter* aFilter);
/* nsIContentIterator */
virtual nsresult Init(nsINode* aRoot);
virtual nsresult Init(nsIDOMRange* aRange);
virtual void First();
virtual void Last();
virtual void Next();
virtual void Prev();
virtual nsINode *GetCurrentNode();
virtual bool IsDone();
virtual nsresult PositionAt(nsINode* aCurNode);
virtual nsresult Init(nsINode* aRoot) MOZ_OVERRIDE;
virtual nsresult Init(nsIDOMRange* aRange) MOZ_OVERRIDE;
virtual void First() MOZ_OVERRIDE;
virtual void Last() MOZ_OVERRIDE;
virtual void Next() MOZ_OVERRIDE;
virtual void Prev() MOZ_OVERRIDE;
virtual nsINode *GetCurrentNode() MOZ_OVERRIDE;
virtual bool IsDone() MOZ_OVERRIDE;
virtual nsresult PositionAt(nsINode* aCurNode) MOZ_OVERRIDE;
/* Helpers */
bool DidSkip() { return mDidSkip; }

View File

@ -107,57 +107,57 @@ public:
NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(nsTextServicesDocument, nsITextServicesDocument)
/* nsITextServicesDocument method implementations. */
NS_IMETHOD InitWithEditor(nsIEditor *aEditor);
NS_IMETHOD GetDocument(nsIDOMDocument **aDoc);
NS_IMETHOD SetExtent(nsIDOMRange* aDOMRange);
NS_IMETHOD ExpandRangeToWordBoundaries(nsIDOMRange *aRange);
NS_IMETHOD SetFilter(nsITextServicesFilter *aFilter);
NS_IMETHOD GetCurrentTextBlock(nsString *aStr);
NS_IMETHOD FirstBlock();
NS_IMETHOD LastSelectedBlock(TSDBlockSelectionStatus *aSelStatus, int32_t *aSelOffset, int32_t *aSelLength);
NS_IMETHOD PrevBlock();
NS_IMETHOD NextBlock();
NS_IMETHOD IsDone(bool *aIsDone);
NS_IMETHOD SetSelection(int32_t aOffset, int32_t aLength);
NS_IMETHOD ScrollSelectionIntoView();
NS_IMETHOD DeleteSelection();
NS_IMETHOD InsertText(const nsString *aText);
NS_IMETHOD InitWithEditor(nsIEditor *aEditor) MOZ_OVERRIDE;
NS_IMETHOD GetDocument(nsIDOMDocument **aDoc) MOZ_OVERRIDE;
NS_IMETHOD SetExtent(nsIDOMRange* aDOMRange) MOZ_OVERRIDE;
NS_IMETHOD ExpandRangeToWordBoundaries(nsIDOMRange *aRange) MOZ_OVERRIDE;
NS_IMETHOD SetFilter(nsITextServicesFilter *aFilter) MOZ_OVERRIDE;
NS_IMETHOD GetCurrentTextBlock(nsString *aStr) MOZ_OVERRIDE;
NS_IMETHOD FirstBlock() MOZ_OVERRIDE;
NS_IMETHOD LastSelectedBlock(TSDBlockSelectionStatus *aSelStatus, int32_t *aSelOffset, int32_t *aSelLength) MOZ_OVERRIDE;
NS_IMETHOD PrevBlock() MOZ_OVERRIDE;
NS_IMETHOD NextBlock() MOZ_OVERRIDE;
NS_IMETHOD IsDone(bool *aIsDone) MOZ_OVERRIDE;
NS_IMETHOD SetSelection(int32_t aOffset, int32_t aLength) MOZ_OVERRIDE;
NS_IMETHOD ScrollSelectionIntoView() MOZ_OVERRIDE;
NS_IMETHOD DeleteSelection() MOZ_OVERRIDE;
NS_IMETHOD InsertText(const nsString *aText) MOZ_OVERRIDE;
/* nsIEditActionListener method implementations. */
NS_IMETHOD WillInsertNode(nsIDOMNode *aNode,
nsIDOMNode *aParent,
int32_t aPosition);
int32_t aPosition) MOZ_OVERRIDE;
NS_IMETHOD DidInsertNode(nsIDOMNode *aNode,
nsIDOMNode *aParent,
int32_t aPosition,
nsresult aResult);
nsresult aResult) MOZ_OVERRIDE;
NS_IMETHOD WillDeleteNode(nsIDOMNode *aChild);
NS_IMETHOD DidDeleteNode(nsIDOMNode *aChild, nsresult aResult);
NS_IMETHOD WillDeleteNode(nsIDOMNode *aChild) MOZ_OVERRIDE;
NS_IMETHOD DidDeleteNode(nsIDOMNode *aChild, nsresult aResult) MOZ_OVERRIDE;
NS_IMETHOD WillSplitNode(nsIDOMNode * aExistingRightNode,
int32_t aOffset);
int32_t aOffset) MOZ_OVERRIDE;
NS_IMETHOD DidSplitNode(nsIDOMNode *aExistingRightNode,
int32_t aOffset,
nsIDOMNode *aNewLeftNode,
nsresult aResult);
nsresult aResult) MOZ_OVERRIDE;
NS_IMETHOD WillJoinNodes(nsIDOMNode *aLeftNode,
nsIDOMNode *aRightNode,
nsIDOMNode *aParent);
nsIDOMNode *aParent) MOZ_OVERRIDE;
NS_IMETHOD DidJoinNodes(nsIDOMNode *aLeftNode,
nsIDOMNode *aRightNode,
nsIDOMNode *aParent,
nsresult aResult);
nsresult aResult) MOZ_OVERRIDE;
// these listen methods are unused:
NS_IMETHOD WillCreateNode(const nsAString& aTag, nsIDOMNode *aParent, int32_t aPosition);
NS_IMETHOD DidCreateNode(const nsAString& aTag, nsIDOMNode *aNode, nsIDOMNode *aParent, int32_t aPosition, nsresult aResult);
NS_IMETHOD WillInsertText(nsIDOMCharacterData *aTextNode, int32_t aOffset, const nsAString &aString);
NS_IMETHOD DidInsertText(nsIDOMCharacterData *aTextNode, int32_t aOffset, const nsAString &aString, nsresult aResult);
NS_IMETHOD WillDeleteText(nsIDOMCharacterData *aTextNode, int32_t aOffset, int32_t aLength);
NS_IMETHOD DidDeleteText(nsIDOMCharacterData *aTextNode, int32_t aOffset, int32_t aLength, nsresult aResult);
NS_IMETHOD WillDeleteSelection(nsISelection *aSelection);
NS_IMETHOD DidDeleteSelection(nsISelection *aSelection);
NS_IMETHOD WillCreateNode(const nsAString& aTag, nsIDOMNode *aParent, int32_t aPosition) MOZ_OVERRIDE;
NS_IMETHOD DidCreateNode(const nsAString& aTag, nsIDOMNode *aNode, nsIDOMNode *aParent, int32_t aPosition, nsresult aResult) MOZ_OVERRIDE;
NS_IMETHOD WillInsertText(nsIDOMCharacterData *aTextNode, int32_t aOffset, const nsAString &aString) MOZ_OVERRIDE;
NS_IMETHOD DidInsertText(nsIDOMCharacterData *aTextNode, int32_t aOffset, const nsAString &aString, nsresult aResult) MOZ_OVERRIDE;
NS_IMETHOD WillDeleteText(nsIDOMCharacterData *aTextNode, int32_t aOffset, int32_t aLength) MOZ_OVERRIDE;
NS_IMETHOD DidDeleteText(nsIDOMCharacterData *aTextNode, int32_t aOffset, int32_t aLength, nsresult aResult) MOZ_OVERRIDE;
NS_IMETHOD WillDeleteSelection(nsISelection *aSelection) MOZ_OVERRIDE;
NS_IMETHOD DidDeleteSelection(nsISelection *aSelection) MOZ_OVERRIDE;
/* Helper functions */
static nsresult GetRangeEndPoints(nsRange* aRange, nsIDOMNode** aParent1,