mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 817473 part 1. Make nsIDOMXULDocument inherit from nsIDOMDocument, so that XUL documents end up with Document.prototype and Node.prototype on their proto chain. r=peterv
This commit is contained in:
parent
a4f96fba76
commit
2b8b9159d1
@ -390,16 +390,6 @@ nsXULDocument::ResetToURI(nsIURI* aURI, nsILoadGroup* aLoadGroup,
|
||||
NS_NOTREACHED("ResetToURI");
|
||||
}
|
||||
|
||||
// Override the nsDocument.cpp method to keep from returning the
|
||||
// "cached XUL" type which is completely internal and may confuse
|
||||
// people
|
||||
NS_IMETHODIMP
|
||||
nsXULDocument::GetContentType(nsAString& aContentType)
|
||||
{
|
||||
aContentType.AssignLiteral("application/vnd.mozilla.xul+xml");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
nsXULDocument::SetContentType(const nsAString& aContentType)
|
||||
{
|
||||
@ -1882,11 +1872,11 @@ nsXULDocument::RemoveElementFromRefMap(Element* aElement)
|
||||
// nsIDOMNode interface
|
||||
//
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXULDocument::CloneNode(bool aDeep, uint8_t aOptionalArgc, nsIDOMNode** aReturn)
|
||||
nsresult
|
||||
nsXULDocument::Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const
|
||||
{
|
||||
// We don't allow cloning of a document
|
||||
*aReturn = nullptr;
|
||||
// We don't allow cloning of a XUL document
|
||||
*aResult = nullptr;
|
||||
return NS_ERROR_DOM_NOT_SUPPORTED_ERR;
|
||||
}
|
||||
|
||||
|
@ -132,18 +132,16 @@ public:
|
||||
NS_IMETHOD OnPrototypeLoadDone(bool aResumeWalk);
|
||||
bool OnDocumentParserError();
|
||||
|
||||
// nsIDOMNode interface overrides
|
||||
NS_IMETHOD CloneNode(bool deep, uint8_t aOptionalArgc, nsIDOMNode **_retval)
|
||||
MOZ_OVERRIDE;
|
||||
// nsINode interface overrides
|
||||
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
|
||||
|
||||
// nsIDOMDocument
|
||||
NS_IMETHOD GetContentType(nsAString& aContentType);
|
||||
// nsIDOMNode interface
|
||||
NS_FORWARD_NSIDOMNODE_TO_NSINODE
|
||||
|
||||
// nsIDOMDocument interface
|
||||
NS_FORWARD_NSIDOMDOCUMENT(nsXMLDocument::)
|
||||
|
||||
// nsDocument interface overrides
|
||||
NS_IMETHOD GetElementById(const nsAString& aId, nsIDOMElement** aReturn)
|
||||
{
|
||||
return nsDocument::GetElementById(aId, aReturn);
|
||||
}
|
||||
virtual mozilla::dom::Element* GetElementById(const nsAString & elementId);
|
||||
|
||||
// nsIDOMXULDocument interface
|
||||
|
@ -4,13 +4,14 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "domstubs.idl"
|
||||
#include "nsIDOMDocument.idl"
|
||||
|
||||
interface nsIDOMXULCommandDispatcher;
|
||||
interface nsIObserver;
|
||||
interface nsIBoxObject;
|
||||
|
||||
[scriptable, uuid(b16d13c3-837d-445d-8f56-05d83d9b9eae)]
|
||||
interface nsIDOMXULDocument : nsISupports
|
||||
[scriptable, uuid(9230f88f-a61f-4fc2-b0a3-79e65d58f94f)]
|
||||
interface nsIDOMXULDocument : nsIDOMDocument
|
||||
{
|
||||
attribute nsIDOMNode popupNode;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user