Closed Bug 779085 Opened 7 years ago Closed 7 years ago

Move attribute stuff from FragmentOrElement to nsGenericElement

Categories

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

enhancement
Not set

Tracking

()

RESOLVED FIXED
mozilla18

People

(Reporter: ayg, Assigned: dzbarsky)

References

Details

(Whiteboard: [mentor=bz][lang=c++])

Attachments

(1 file)

(In reply to Boris Zbarsky (:bz) from bug 563659 comment #28)
> Is there a reason to implement HasAttributes/GetAttributes on the
> superclass, with switching on IsElement() instead of directly in subclasses?
> If not, a followup.
Aryeh, do you want to take this?

If not, David, do you want to?
Aryeh, if you don't want this, I'll do it eventually.
I have lots of other things to do right now, so probably not.
Assignee: nobody → dzbarsky
Status: NEW → ASSIGNED
Whiteboard: [mentor=bz]
Whiteboard: [mentor=bz] → [mentor=bz][lang=c++]
Attached patch PatchSplinter Review
Try run at https://tbpl.mozilla.org/?tree=Try&rev=e03fa6b54e7b
Attachment #663055 - Flags: review?(bzbarsky)
Comment on attachment 663055 [details] [diff] [review]
Patch

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

::: content/base/src/nsGenericElement.cpp
@@ +164,5 @@
> +{
> +  nsDOMSlots *slots = DOMSlots();
> +
> +  if (!slots->mAttributeMap) {
> +    slots->mAttributeMap = new nsDOMAttributeMap(this->AsElement());

Just 'this', I think.
Comment on attachment 663055 [details] [diff] [review]
Patch

Can you put this on nsGenericElement instead?

r=me with that and the nixed AsElement() bit.
Attachment #663055 - Flags: review?(bzbarsky) → review+
Sure, but isn't the plan to merge dom::Element and nsGenericElement?
Plan is in flux on that.
https://hg.mozilla.org/mozilla-central/rev/6b3d73912991
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → mozilla18
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.