mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1035394 - Fix dangerous public destructors in editor - r=ehsan
This commit is contained in:
parent
79c308b707
commit
ae77343c7f
@ -16,6 +16,10 @@ ChangeAttributeTxn::ChangeAttributeTxn()
|
||||
{
|
||||
}
|
||||
|
||||
ChangeAttributeTxn::~ChangeAttributeTxn()
|
||||
{
|
||||
}
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_INHERITED(ChangeAttributeTxn, EditTxn,
|
||||
mElement)
|
||||
|
||||
|
@ -46,6 +46,7 @@ public:
|
||||
NS_IMETHOD RedoTransaction();
|
||||
|
||||
protected:
|
||||
virtual ~ChangeAttributeTxn();
|
||||
|
||||
/** the editor that created this transaction */
|
||||
nsIEditor* mEditor;
|
||||
|
@ -32,6 +32,10 @@ CreateElementTxn::CreateElementTxn()
|
||||
{
|
||||
}
|
||||
|
||||
CreateElementTxn::~CreateElementTxn()
|
||||
{
|
||||
}
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_INHERITED(CreateElementTxn, EditTxn,
|
||||
mParent,
|
||||
mNewNode,
|
||||
|
@ -48,7 +48,8 @@ public:
|
||||
NS_IMETHOD GetNewNode(nsIDOMNode **aNewNode);
|
||||
|
||||
protected:
|
||||
|
||||
virtual ~CreateElementTxn();
|
||||
|
||||
/** the document into which the new node will be inserted */
|
||||
nsEditor* mEditor;
|
||||
|
||||
|
@ -17,6 +17,10 @@ DeleteNodeTxn::DeleteNodeTxn()
|
||||
{
|
||||
}
|
||||
|
||||
DeleteNodeTxn::~DeleteNodeTxn()
|
||||
{
|
||||
}
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_INHERITED(DeleteNodeTxn, EditTxn,
|
||||
mNode,
|
||||
mParent,
|
||||
|
@ -39,6 +39,7 @@ public:
|
||||
NS_IMETHOD RedoTransaction();
|
||||
|
||||
protected:
|
||||
virtual ~DeleteNodeTxn();
|
||||
|
||||
/** the element to delete */
|
||||
nsCOMPtr<nsINode> mNode;
|
||||
|
@ -16,6 +16,10 @@ EditAggregateTxn::EditAggregateTxn()
|
||||
{
|
||||
}
|
||||
|
||||
EditAggregateTxn::~EditAggregateTxn()
|
||||
{
|
||||
}
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_INHERITED(EditAggregateTxn, EditTxn,
|
||||
mChildren)
|
||||
|
||||
|
@ -41,6 +41,7 @@ public:
|
||||
NS_IMETHOD GetName(nsIAtom **aName);
|
||||
|
||||
protected:
|
||||
virtual ~EditAggregateTxn();
|
||||
|
||||
nsTArray< nsRefPtr<EditTxn> > mChildren;
|
||||
nsCOMPtr<nsIAtom> mName;
|
||||
|
@ -24,6 +24,10 @@ InsertElementTxn::InsertElementTxn()
|
||||
{
|
||||
}
|
||||
|
||||
InsertElementTxn::~InsertElementTxn()
|
||||
{
|
||||
}
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_INHERITED(InsertElementTxn, EditTxn,
|
||||
mNode,
|
||||
mParent)
|
||||
|
@ -39,7 +39,8 @@ public:
|
||||
NS_DECL_EDITTXN
|
||||
|
||||
protected:
|
||||
|
||||
virtual ~InsertElementTxn();
|
||||
|
||||
/** the element to insert */
|
||||
nsCOMPtr<nsIDOMNode> mNode;
|
||||
|
||||
|
@ -20,6 +20,10 @@ InsertTextTxn::InsertTextTxn()
|
||||
{
|
||||
}
|
||||
|
||||
InsertTextTxn::~InsertTextTxn()
|
||||
{
|
||||
}
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_INHERITED(InsertTextTxn, EditTxn,
|
||||
mElement)
|
||||
|
||||
|
@ -57,6 +57,7 @@ public:
|
||||
NS_IMETHOD GetData(nsString& aResult);
|
||||
|
||||
protected:
|
||||
virtual ~InsertTextTxn();
|
||||
|
||||
/** return true if aOtherTxn immediately follows this txn */
|
||||
virtual bool IsSequentialInsert(InsertTextTxn *aOtherTxn);
|
||||
|
@ -23,6 +23,10 @@ PlaceholderTxn::PlaceholderTxn() : EditAggregateTxn(),
|
||||
{
|
||||
}
|
||||
|
||||
PlaceholderTxn::~PlaceholderTxn()
|
||||
{
|
||||
}
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_CLASS(PlaceholderTxn)
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(PlaceholderTxn,
|
||||
|
@ -60,6 +60,7 @@ public:
|
||||
NS_IMETHOD RememberEndingSelection();
|
||||
|
||||
protected:
|
||||
virtual ~PlaceholderTxn();
|
||||
|
||||
/** the presentation shell, which we'll need to get the selection */
|
||||
bool mAbsorb; // do we auto absorb any and all transaction?
|
||||
|
@ -24,6 +24,10 @@ SplitElementTxn::SplitElementTxn()
|
||||
{
|
||||
}
|
||||
|
||||
SplitElementTxn::~SplitElementTxn()
|
||||
{
|
||||
}
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_INHERITED(SplitElementTxn, EditTxn,
|
||||
mParent,
|
||||
mNewLeftNode)
|
||||
|
@ -45,7 +45,8 @@ public:
|
||||
NS_IMETHOD GetNewNode(nsIDOMNode **aNewNode);
|
||||
|
||||
protected:
|
||||
|
||||
virtual ~SplitElementTxn();
|
||||
|
||||
/** the element to operate upon */
|
||||
nsCOMPtr<nsIDOMNode> mExistingRightNode;
|
||||
|
||||
|
@ -67,10 +67,8 @@ class nsHTMLEditRules : public nsTextEditRules, public nsIEditActionListener
|
||||
public:
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
nsHTMLEditRules();
|
||||
virtual ~nsHTMLEditRules();
|
||||
|
||||
nsHTMLEditRules();
|
||||
|
||||
// nsIEditRules methods
|
||||
NS_IMETHOD Init(nsPlaintextEditor *aEditor);
|
||||
@ -111,6 +109,7 @@ public:
|
||||
NS_IMETHOD DidDeleteSelection(nsISelection *aSelection);
|
||||
|
||||
protected:
|
||||
virtual ~nsHTMLEditRules();
|
||||
|
||||
enum RulesEndpoint
|
||||
{
|
||||
|
@ -94,8 +94,7 @@ public:
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(nsHTMLEditor, nsPlaintextEditor)
|
||||
|
||||
|
||||
nsHTMLEditor();
|
||||
virtual ~nsHTMLEditor();
|
||||
nsHTMLEditor();
|
||||
|
||||
bool GetReturnInParagraphCreatesNewParagraph();
|
||||
|
||||
@ -260,6 +259,8 @@ public:
|
||||
static bool NodeIsBlockStatic(const mozilla::dom::Element* aElement);
|
||||
static nsresult NodeIsBlockStatic(nsIDOMNode *aNode, bool *aIsBlock);
|
||||
protected:
|
||||
virtual ~nsHTMLEditor();
|
||||
|
||||
using nsEditor::IsBlockNode;
|
||||
virtual bool IsBlockNode(nsINode *aNode);
|
||||
|
||||
|
@ -54,8 +54,7 @@ public:
|
||||
eTypedBreak /* user typed enter */
|
||||
};
|
||||
|
||||
nsPlaintextEditor();
|
||||
virtual ~nsPlaintextEditor();
|
||||
nsPlaintextEditor();
|
||||
|
||||
/* ------------ nsIPlaintextEditor methods -------------- */
|
||||
NS_DECL_NSIPLAINTEXTEDITOR
|
||||
@ -162,6 +161,7 @@ public:
|
||||
int32_t &aCaretStyle);
|
||||
|
||||
protected:
|
||||
virtual ~nsPlaintextEditor();
|
||||
|
||||
NS_IMETHOD InitRules();
|
||||
void BeginEditorInit();
|
||||
|
Loading…
Reference in New Issue
Block a user