mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 15:23:51 +00:00
Bug 848796 part 3. Convert XULDocument to WebIDL. r=peterv
This commit is contained in:
parent
0790ddb12c
commit
81ed36b9a0
@ -87,6 +87,7 @@
|
||||
#include "nsCCUncollectableMarker.h"
|
||||
#include "nsURILoader.h"
|
||||
#include "mozilla/dom/Element.h"
|
||||
#include "mozilla/dom/XULDocumentBinding.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
|
||||
using namespace mozilla;
|
||||
@ -202,7 +203,6 @@ XULDocument::XULDocument(void)
|
||||
mState(eState_Master),
|
||||
mResolutionPhase(nsForwardReference::eStart)
|
||||
{
|
||||
|
||||
// NOTE! nsDocument::operator new() zeroes out all members, so don't
|
||||
// bother initializing members to 0.
|
||||
|
||||
@ -215,6 +215,8 @@ XULDocument::XULDocument(void)
|
||||
mDelayFrameLoaderInitialization = true;
|
||||
|
||||
mAllowXULXBL = eTriTrue;
|
||||
|
||||
SetIsDOMBinding();
|
||||
}
|
||||
|
||||
XULDocument::~XULDocument()
|
||||
@ -4743,5 +4745,15 @@ XULDocument::GetBoxObjectFor(nsIDOMElement* aElement, nsIBoxObject** aResult)
|
||||
return rv.ErrorCode();
|
||||
}
|
||||
|
||||
JSObject*
|
||||
XULDocument::WrapNode(JSContext *aCx, JSObject *aScope)
|
||||
{
|
||||
JSObject* obj = XULDocumentBinding::Wrap(aCx, aScope, this);
|
||||
if (obj && !PostCreateWrapper(aCx, obj)) {
|
||||
return nullptr;
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
@ -296,6 +296,8 @@ protected:
|
||||
nsresult
|
||||
Persist(nsIContent* aElement, int32_t aNameSpaceID, nsIAtom* aAttribute);
|
||||
|
||||
virtual JSObject* WrapNode(JSContext *aCx, JSObject *aScope) MOZ_OVERRIDE;
|
||||
|
||||
// IMPORTANT: The ownership implicit in the following member
|
||||
// variables has been explicitly checked and set using nsCOMPtr
|
||||
// for owning pointers and raw COM interface pointers for weak
|
||||
|
@ -1103,6 +1103,10 @@ DOMInterfaces = {
|
||||
'wrapperCache': False
|
||||
},
|
||||
|
||||
'XULDocument': {
|
||||
'headerFile': 'XULDocument.h'
|
||||
},
|
||||
|
||||
'XULElement': {
|
||||
'nativeType': 'nsXULElement',
|
||||
'resultNotAddRefed': [ 'controllers', 'style' ]
|
||||
@ -1368,6 +1372,7 @@ addExternalIface('MenuBuilder', nativeType='nsIMenuBuilder', notflattened=True)
|
||||
addExternalIface('MozBoxObject', nativeType='nsIBoxObject')
|
||||
addExternalIface('MozControllers', nativeType='nsIControllers')
|
||||
addExternalIface('MozFrameLoader', nativeType='nsIFrameLoader', notflattened=True)
|
||||
addExternalIface('MozObserver', nativeType='nsIObserver', notflattened=True)
|
||||
addExternalIface('MozRDFCompositeDataSource', nativeType='nsIRDFCompositeDataSource',
|
||||
notflattened=True)
|
||||
addExternalIface('MozRDFResource', nativeType='nsIRDFResource', notflattened=True)
|
||||
@ -1398,3 +1403,4 @@ addExternalIface('WindowProxy', nativeType='nsIDOMWindow')
|
||||
addExternalIface('XPathResult', nativeType='nsISupports')
|
||||
addExternalIface('XPathExpression')
|
||||
addExternalIface('XPathNSResolver')
|
||||
addExternalIface('XULCommandDispatcher')
|
||||
|
@ -88,6 +88,7 @@ LOCAL_INCLUDES += -I$(topsrcdir)/js/xpconnect/src \
|
||||
-I$(topsrcdir)/content/xslt/src/xpath \
|
||||
-I$(topsrcdir)/content/xml/content/src \
|
||||
-I$(topsrcdir)/content/xul/content/src \
|
||||
-I$(topsrcdir)/content/xul/document/src \
|
||||
$(NULL)
|
||||
|
||||
ifdef MOZ_AUDIO_CHANNEL_MANAGER
|
||||
|
@ -278,6 +278,7 @@ webidl_files = \
|
||||
XMLSerializer.webidl \
|
||||
XMLStylesheetProcessingInstruction.webidl \
|
||||
XPathEvaluator.webidl \
|
||||
XULDocument.webidl \
|
||||
XULElement.webidl \
|
||||
$(NULL)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user