Closed Bug 817473 Opened 12 years ago Closed 12 years ago

Do we still need nsNodeSH::PostCreatePrototype?

Categories

(Core :: DOM: Core & HTML, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla20

People

(Reporter: bzbarsky, Assigned: bzbarsky)

Details

Attachments

(2 files)

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.
Whiteboard: [need review]
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
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: