Bug 898947 - Remove nsIInlineEventHandlers from nodes r=bz

This commit is contained in:
David Zbarsky 2013-07-29 16:04:09 -07:00
parent 3b2bbf2c84
commit 96da4fe14d
10 changed files with 5 additions and 74 deletions

View File

@ -27,7 +27,6 @@
#include "nsIDOMXPathNSResolver.h"
#include "nsPresContext.h"
#include "nsDOMClassInfoID.h" // DOMCI_DATA
#include "nsIInlineEventHandlers.h"
#include "mozilla/CORSMode.h"
#include "mozilla/Attributes.h"
#include "nsContentUtils.h"

View File

@ -18,7 +18,6 @@
#include "nsCycleCollectionParticipant.h" // NS_DECL_CYCLE_*
#include "nsIContent.h" // base class
#include "nsIDOMXPathNSResolver.h" // base class
#include "nsIInlineEventHandlers.h" // base class
#include "nsINodeList.h" // base class
#include "nsIWeakReference.h" // base class
#include "nsNodeUtils.h" // class member nsNodeUtils::CloneNodeImpl
@ -154,10 +153,6 @@ private:
nsCOMPtr<nsINode> mNode;
};
// Forward declare to allow being a friend
class nsTouchEventReceiverTearoff;
class nsInlineEventHandlersTearoff;
/**
* A generic base class for DOM elements, implementing many nsIContent,
* nsIDOMNode and nsIDOMElement methods.
@ -173,9 +168,6 @@ public:
FragmentOrElement(already_AddRefed<nsINodeInfo> aNodeInfo);
virtual ~FragmentOrElement();
friend class ::nsTouchEventReceiverTearoff;
friend class ::nsInlineEventHandlersTearoff;
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_SIZEOF_EXCLUDING_THIS
@ -403,26 +395,6 @@ protected:
} // namespace dom
} // namespace mozilla
/**
* Tearoff class to implement nsIInlineEventHandlers
*/
class nsInlineEventHandlersTearoff MOZ_FINAL : public nsIInlineEventHandlers
{
public:
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_FORWARD_NSIINLINEEVENTHANDLERS(mElement->)
NS_DECL_CYCLE_COLLECTION_CLASS(nsInlineEventHandlersTearoff)
nsInlineEventHandlersTearoff(mozilla::dom::FragmentOrElement *aElement) : mElement(aElement)
{
}
private:
nsRefPtr<mozilla::dom::FragmentOrElement> mElement;
};
#define NS_ELEMENT_INTERFACE_TABLE_TO_MAP_SEGUE \
if (NS_SUCCEEDED(rv)) \
return rv; \

View File

@ -502,17 +502,6 @@ nsNodeSupportsWeakRefTearoff::GetWeakReference(nsIWeakReference** aInstancePtr)
return NS_OK;
}
//----------------------------------------------------------------------
NS_IMPL_CYCLE_COLLECTION_1(nsInlineEventHandlersTearoff, mElement)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsInlineEventHandlersTearoff)
NS_INTERFACE_MAP_ENTRY(nsIInlineEventHandlers)
NS_INTERFACE_MAP_END_AGGREGATED(mElement)
NS_IMPL_CYCLE_COLLECTING_ADDREF(nsInlineEventHandlersTearoff)
NS_IMPL_CYCLE_COLLECTING_RELEASE(nsInlineEventHandlersTearoff)
//----------------------------------------------------------------------
FragmentOrElement::nsDOMSlots::nsDOMSlots()
: nsINode::nsSlots(),
@ -1750,8 +1739,6 @@ NS_INTERFACE_MAP_BEGIN(FragmentOrElement)
new nsNodeSupportsWeakRefTearoff(this))
NS_INTERFACE_MAP_ENTRY_TEAROFF(nsIDOMXPathNSResolver,
new nsNode3Tearoff(this))
NS_INTERFACE_MAP_ENTRY_TEAROFF(nsIInlineEventHandlers,
new nsInlineEventHandlersTearoff(this))
// DOM bindings depend on the identity pointer being the
// same as nsINode (which nsIContent inherits).
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIContent)

View File

@ -1578,7 +1578,6 @@ NS_INTERFACE_TABLE_HEAD(nsDocument)
NS_INTERFACE_TABLE_ENTRY(nsDocument, nsIRadioGroupContainer)
NS_INTERFACE_TABLE_ENTRY(nsDocument, nsIMutationObserver)
NS_INTERFACE_TABLE_ENTRY(nsDocument, nsIApplicationCacheContainer)
NS_INTERFACE_TABLE_ENTRY(nsDocument, nsIInlineEventHandlers)
NS_INTERFACE_TABLE_ENTRY(nsDocument, nsIObserver)
NS_INTERFACE_TABLE_END
NS_INTERFACE_TABLE_TO_MAP_SEGUE_CYCLE_COLLECTION(nsDocument)
@ -11026,18 +11025,6 @@ nsDocument::XPCOMShutdown()
gPendingPointerLockRequest = nullptr;
}
#define EVENT(name_, id_, type_, struct_) \
NS_IMETHODIMP nsDocument::GetOn##name_(JSContext *cx, JS::Value *vp) { \
return nsINode::GetOn##name_(cx, vp); \
} \
NS_IMETHODIMP nsDocument::SetOn##name_(JSContext *cx, const JS::Value &v) { \
return nsINode::SetOn##name_(cx, v); \
}
#define DOCUMENT_ONLY_EVENT EVENT
#include "nsEventNameList.h"
#undef DOCUMENT_ONLY_EVENT
#undef EVENT
void
nsDocument::UpdateVisibilityState()
{

View File

@ -64,7 +64,6 @@
#include "mozilla/MemoryReporting.h"
#include "mozilla/dom/DOMImplementation.h"
#include "nsIDOMTouchEvent.h"
#include "nsIInlineEventHandlers.h"
#include "nsDataHashtable.h"
#include "mozilla/TimeStamp.h"
#include "mozilla/Attributes.h"
@ -504,7 +503,6 @@ class nsDocument : public nsIDocument,
public nsIRadioGroupContainer,
public nsIApplicationCacheContainer,
public nsStubMutationObserver,
public nsIInlineEventHandlers,
public nsIObserver
{
public:
@ -781,9 +779,6 @@ public:
// nsIApplicationCacheContainer
NS_DECL_NSIAPPLICATIONCACHECONTAINER
// nsIInlineEventHandlers
NS_DECL_NSIINLINEEVENTHANDLERS
// nsIObserver
NS_DECL_NSIOBSERVER

View File

@ -32,8 +32,7 @@ function HTML_TAG(aTagName, aImplClass) {
classInfos[aTagName] = aImplClass;
interfaces[aTagName] =
[ "nsIDOMEventTarget",
"nsIDOMElementCSSInlineStyle",
"nsIInlineEventHandlers" ];
"nsIDOMElementCSSInlineStyle" ];
// Some interfaces don't appear in classinfo because other interfaces that
// inherit from them do.

View File

@ -27,7 +27,7 @@ interface nsIDOMLocation;
* http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html
*/
[scriptable, uuid(18de0c13-f82e-4c7e-9a48-b778e00df9ca)]
[scriptable, uuid(aa4b59de-462a-4f61-abd9-4232fef3dacc)]
interface nsIDOMDocument : nsIDOMNode
{
readonly attribute nsIDOMDocumentType doctype;
@ -387,14 +387,6 @@ interface nsIDOMDocument : nsIDOMNode
*/
void mozExitPointerLock();
/**
* Inline event handler for readystatechange events.
*/
[implicit_jscontext] attribute jsval onreadystatechange;
[implicit_jscontext] attribute jsval onmouseenter;
[implicit_jscontext] attribute jsval onmouseleave;
/**
* Visibility API implementation.
*/

View File

@ -5,7 +5,7 @@
#include "nsIDOMDocument.idl"
[scriptable, uuid(79547ba5-291e-4775-b71e-2440a4621b54)]
[scriptable, uuid(90903f50-7611-42c1-a13c-dac4e735bee2)]
interface nsIDOMXMLDocument : nsIDOMDocument
{
// DOM Level 3 Load & Save, DocumentLS

View File

@ -13,7 +13,7 @@
*/
interface nsISelection;
[scriptable, uuid(60e0e311-b9c7-4952-8e9c-d4974005e887)]
[scriptable, uuid(cb0cc619-5862-4e00-86d3-dca3c6ecc34b)]
interface nsIDOMHTMLDocument : nsIDOMDocument
{
attribute DOMString domain;

View File

@ -10,7 +10,7 @@ interface nsIDOMXULCommandDispatcher;
interface nsIObserver;
interface nsIBoxObject;
[scriptable, uuid(7b188822-f3fc-42f2-93a9-7eee445e0108)]
[scriptable, uuid(e057a0ef-4be3-4d60-b45a-6cb9d35d8563)]
interface nsIDOMXULDocument : nsIDOMDocument
{
attribute nsIDOMNode popupNode;