Closed Bug 902732 Opened 6 years ago Closed 6 years ago

Drop nsILink from non-<link> elements

Categories

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

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla26

People

(Reporter: dzbarsky, Assigned: dzbarsky)

References

Details

Attachments

(1 file, 2 obsolete files)

No description provided.
Attached patch Merge nsILink and dom::Link r=bz (obsolete) — Splinter Review
Attachment #787258 - Flags: review?(bzbarsky)
Assignee: nobody → dzbarsky
Status: NEW → ASSIGNED
Comment on attachment 787258 [details] [diff] [review]
Merge nsILink and dom::Link r=bz

How about we nuke LinkAdded/LinkRemoved off everything that's not HTMLLinkElement altogether, and make the ones on HTMLLinkElement non-virtual.  Then we change this bit in nsDocument:

  nsRefPtr<nsContentList> links = NS_GetContentList(root,
                                                    kNameSpaceID_Unknown,
                                                    NS_LITERAL_STRING("link"));

to pass kNameSpaceID_HTML and then we can just static_cast the list elements to HTMLLinkElement.  Do that in both pageshow and pagehide.

The rest looks good.
Attachment #787258 - Flags: review?(bzbarsky)
Attachment #787258 - Flags: review-
Attachment #787258 - Flags: feedback+
Attached patch Merge nsILink and dom::Link r=bz (obsolete) — Splinter Review
Attachment #787258 - Attachment is obsolete: true
Attachment #787341 - Flags: review?(bzbarsky)
Attachment #787341 - Attachment is obsolete: true
Attachment #787341 - Flags: review?(bzbarsky)
Attachment #787343 - Flags: review?(bzbarsky)
Comment on attachment 787343 [details] [diff] [review]
Merge nsILink and dom::Link r=bz

r=me
Attachment #787343 - Flags: review?(bzbarsky) → review+
Duplicate of this bug: 824848
Summary: Merge nsILink and dom::Link → Drop nsILink from non-<link> elements
https://hg.mozilla.org/mozilla-central/rev/e76495237e88
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
Andrea, this could probably bitrot your patches for the URL API.
Ehsan, I updated my patch for URL API, can you take a look and see if this patch changes something for it?
(In reply to Andrea Marchesini (:baku) from comment #10)
> Ehsan, I updated my patch for URL API, can you take a look and see if this
> patch changes something for it?

It shouldn't change anything fundamental, I mostly CCed you here in case your patches failed to apply on top of this.  Otherwise, no need to worry about anything here!
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.