Closed Bug 847586 Opened 7 years ago Closed 7 years ago

Paris binding for MutationEvent

Categories

(Core :: DOM: Events, defect)

x86_64
Linux
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla22

People

(Reporter: smaug, Assigned: smaug)

References

Details

Attachments

(2 files, 3 obsolete files)

.
Attached patch patch (obsolete) — Splinter Review
https://tbpl.mozilla.org/?tree=Try&rev=779cc0e2816d

Wanted to do a try: -a for the first webidl event on top of the base Event interface.
Assignee: nobody → bugs
Comment on attachment 721317 [details] [diff] [review]
patch

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

::: content/events/src/nsDOMMutationEvent.h
@@ +49,5 @@
> +                         nsINode*& aRelatedNode,
> +                         const mozilla::dom::NonNull<nsAString>& aPrevValue,
> +                         const mozilla::dom::NonNull<nsAString_internal>& aNewValue,
> +                         const mozilla::dom::NonNull<nsAString_internal>& aAttrName,
> +                         uint16_t& aAttrChange, mozilla::ErrorResult& aRv)

Should just be

 void InitMutationEvent(const nsAString& aType,
                        bool aCanBubble, bool aCancelable,
                        nsINode* aRelatedNode,
                        const nsAString& aPrevValue,
                        const nsAString& aNewValue,
                        const nsAString& aAttrName,
                        uint16_t aAttrChange, mozilla::ErrorResult& aRv)
Hmm, ok.
Attached patch patch (obsolete) — Splinter Review
https://tbpl.mozilla.org/?tree=Try&rev=ecfd4f0ee07d
Attachment #721317 - Attachment is obsolete: true
Attachment #721332 - Flags: review?(Ms2ger)
Attached patch patch (obsolete) — Splinter Review
Attachment #721332 - Attachment is obsolete: true
Attachment #721332 - Flags: review?(Ms2ger)
Attachment #723119 - Flags: review?(Ms2ger)
(Could use AsDOMNode() instead of QI. But not big deal)
Attached patch patchSplinter Review
Attachment #723119 - Attachment is obsolete: true
Attachment #723119 - Flags: review?(Ms2ger)
Attachment #723123 - Flags: review?(Ms2ger)
Comment on attachment 723123 [details] [diff] [review]
patch

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

::: content/events/src/nsDOMMutationEvent.cpp
@@ +42,5 @@
>  nsDOMMutationEvent::GetRelatedNode(nsIDOMNode** aRelatedNode)
>  {
> +  nsCOMPtr<nsINode> relatedNode = GetRelatedNode();
> +  nsCOMPtr<nsIDOMNode> relatedDOMNode = relatedNode ? relatedNode->AsDOMNode() : nullptr;
> +  relatedDOMNode.swap(*aRelatedNode);

relatedDOMNode.forget(aRelatedNode);

::: content/events/src/nsDOMMutationEvent.h
@@ +39,5 @@
> +
> +  already_AddRefed<nsINode> GetRelatedNode()
> +  {
> +    nsCOMPtr<nsINode> n =
> +      do_QueryInterface(static_cast<nsMutationEvent*>(mEvent)->mRelatedNode);

I'd ask for a followup to make mRelatedNode an nsINode, but meh, MutationEvent.
Attachment #723123 - Flags: review?(Ms2ger) → review+
Attached patch patchSplinter Review
Comment on attachment 724855 [details] [diff] [review]
patch

>+
>+  virtual JSObject* WrapObject(JSContext* aCx, JSObject* aScope)

MOZ_OVERRIDE
https://hg.mozilla.org/mozilla-central/rev/8c88ac65a81b
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
You need to log in before you can comment on or make changes to this bug.