mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backout a0868fe02c2a because I suspect it caused the debug mochitest failures resulting in the CLOSED TREE
This commit is contained in:
parent
6b47661305
commit
53f3f3f4df
@ -27,6 +27,7 @@
|
||||
#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"
|
||||
|
@ -18,6 +18,7 @@
|
||||
#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
|
||||
@ -153,6 +154,10 @@ 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.
|
||||
@ -168,6 +173,9 @@ public:
|
||||
FragmentOrElement(already_AddRefed<nsINodeInfo> aNodeInfo);
|
||||
virtual ~FragmentOrElement();
|
||||
|
||||
friend class ::nsTouchEventReceiverTearoff;
|
||||
friend class ::nsInlineEventHandlersTearoff;
|
||||
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
|
||||
NS_DECL_SIZEOF_EXCLUDING_THIS
|
||||
@ -395,6 +403,26 @@ 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; \
|
||||
|
@ -502,6 +502,17 @@ 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(),
|
||||
@ -1739,6 +1750,8 @@ 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)
|
||||
|
@ -1578,6 +1578,7 @@ 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)
|
||||
@ -11025,6 +11026,18 @@ 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()
|
||||
{
|
||||
|
@ -64,6 +64,7 @@
|
||||
#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"
|
||||
@ -503,6 +504,7 @@ class nsDocument : public nsIDocument,
|
||||
public nsIRadioGroupContainer,
|
||||
public nsIApplicationCacheContainer,
|
||||
public nsStubMutationObserver,
|
||||
public nsIInlineEventHandlers,
|
||||
public nsIObserver
|
||||
{
|
||||
public:
|
||||
@ -779,6 +781,9 @@ public:
|
||||
// nsIApplicationCacheContainer
|
||||
NS_DECL_NSIAPPLICATIONCACHECONTAINER
|
||||
|
||||
// nsIInlineEventHandlers
|
||||
NS_DECL_NSIINLINEEVENTHANDLERS
|
||||
|
||||
// nsIObserver
|
||||
NS_DECL_NSIOBSERVER
|
||||
|
||||
|
@ -32,7 +32,8 @@ function HTML_TAG(aTagName, aImplClass) {
|
||||
classInfos[aTagName] = aImplClass;
|
||||
interfaces[aTagName] =
|
||||
[ "nsIDOMEventTarget",
|
||||
"nsIDOMElementCSSInlineStyle" ];
|
||||
"nsIDOMElementCSSInlineStyle",
|
||||
"nsIInlineEventHandlers" ];
|
||||
|
||||
// Some interfaces don't appear in classinfo because other interfaces that
|
||||
// inherit from them do.
|
||||
|
@ -27,7 +27,7 @@ interface nsIDOMLocation;
|
||||
* http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html
|
||||
*/
|
||||
|
||||
[scriptable, uuid(aa4b59de-462a-4f61-abd9-4232fef3dacc)]
|
||||
[scriptable, uuid(18de0c13-f82e-4c7e-9a48-b778e00df9ca)]
|
||||
interface nsIDOMDocument : nsIDOMNode
|
||||
{
|
||||
readonly attribute nsIDOMDocumentType doctype;
|
||||
@ -387,6 +387,14 @@ 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.
|
||||
*/
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
#include "nsIDOMDocument.idl"
|
||||
|
||||
[scriptable, uuid(90903f50-7611-42c1-a13c-dac4e735bee2)]
|
||||
[scriptable, uuid(79547ba5-291e-4775-b71e-2440a4621b54)]
|
||||
interface nsIDOMXMLDocument : nsIDOMDocument
|
||||
{
|
||||
// DOM Level 3 Load & Save, DocumentLS
|
||||
|
@ -13,7 +13,7 @@
|
||||
*/
|
||||
interface nsISelection;
|
||||
|
||||
[scriptable, uuid(cb0cc619-5862-4e00-86d3-dca3c6ecc34b)]
|
||||
[scriptable, uuid(60e0e311-b9c7-4952-8e9c-d4974005e887)]
|
||||
interface nsIDOMHTMLDocument : nsIDOMDocument
|
||||
{
|
||||
attribute DOMString domain;
|
||||
|
@ -10,7 +10,7 @@ interface nsIDOMXULCommandDispatcher;
|
||||
interface nsIObserver;
|
||||
interface nsIBoxObject;
|
||||
|
||||
[scriptable, uuid(e057a0ef-4be3-4d60-b45a-6cb9d35d8563)]
|
||||
[scriptable, uuid(7b188822-f3fc-42f2-93a9-7eee445e0108)]
|
||||
interface nsIDOMXULDocument : nsIDOMDocument
|
||||
{
|
||||
attribute nsIDOMNode popupNode;
|
||||
|
Loading…
Reference in New Issue
Block a user