Do we still need nsNodeSH::PostCreatePrototype?

RESOLVED FIXED in mozilla20

Status

()

Core
DOM
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: bz, Assigned: bz)

Tracking

unspecified
mozilla20
x86
Mac OS X
Points:
---
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

Seems like Node.prototype should have those properties as needed already with the WebIDL bindings, right?  So I think we can nuke this function...
So first problem:  nsIDOMXULDocument does not inherit from nsIDOMDocument.  Which means that the proto chain for XUL documents doesn't actually go through Node, and they're relying on this method (which they get because they _do_ use nsDocumentSH) to make things work.
Created attachment 687637 [details] [diff] [review]
part 1.  Make nsIDOMXULDocument inherit from nsIDOMDocument, so that XUL documents end up with Document.prototype and Node.prototype on their proto chain.
Attachment #687637 - Flags: review?(peterv)
Created attachment 687639 [details] [diff] [review]
part 2.  Remove no-longer-needed nsNodeSH::PostCreatePrototype.
Attachment #687639 - Flags: review?(peterv)
Whiteboard: [need review]
Try run: https://tbpl.mozilla.org/?tree=Try&rev=4b1123f00196
Comment on attachment 687637 [details] [diff] [review]
part 1.  Make nsIDOMXULDocument inherit from nsIDOMDocument, so that XUL documents end up with Document.prototype and Node.prototype on their proto chain.

Review of attachment 687637 [details] [diff] [review]:
-----------------------------------------------------------------

::: content/xul/document/src/nsXULDocument.h
@@ +132,5 @@
>      NS_IMETHOD OnPrototypeLoadDone(bool aResumeWalk);
>      bool OnDocumentParserError();
>  
> +    // nsINode interface overrides
> +    virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;

We could keep MOZ_OVERRIDE here?
Attachment #687637 - Flags: review?(peterv) → review+
Comment on attachment 687639 [details] [diff] [review]
part 2.  Remove no-longer-needed nsNodeSH::PostCreatePrototype.

Review of attachment 687639 [details] [diff] [review]:
-----------------------------------------------------------------

Cool, I thought we needed to hook up chrome-only properties but it'll happen automatically because Node is a non-concrete registered new binding interface.
Attachment #687639 - Flags: review?(peterv) → review+
Put back the MOZ_OVERRIDE.

https://hg.mozilla.org/integration/mozilla-inbound/rev/0a26a48e9315
https://hg.mozilla.org/integration/mozilla-inbound/rev/21ea9ab04f3c
Flags: in-testsuite-
Whiteboard: [need review]
Target Milestone: --- → mozilla20

Comment 8

5 years ago
https://hg.mozilla.org/mozilla-central/rev/0a26a48e9315
https://hg.mozilla.org/mozilla-central/rev/21ea9ab04f3c
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.