Closed Bug 1055776 Opened 10 years ago Closed 8 years ago

Investigate moving namespaceURI, prefix, and localName to Element and Attr

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla48
Tracking Status
firefox48 --- fixed

People

(Reporter: annevk, Assigned: ayg)

Details

(Keywords: dev-doc-complete, site-compat)

Attachments

(1 file)

I don't think any browser is leading the charge here as of yet. But filing to keep track.

See http://mxr.mozilla.org/mozilla-central/source/dom/webidl/Node.webidl#94
No longer depends on: 1055773
Looks like Chrome 48 land this change, all this attributes return undefined for other nodes than Element and Attr.
Attached patch PatchSplinter Review
I only changed the IDLs, not the internal methods, because I don't see why I should bother copying the same method to both Element and Attr.  It seems to work fine as-is (compiles and passes the wpt test).

https://treeherder.mozilla.org/#/jobs?repo=try&revision=030a1303ee38
Assignee: nobody → ayg
Status: NEW → ASSIGNED
Attachment #8740432 - Flags: review?(bzbarsky)
Comment on attachment 8740432 [details] [diff] [review]
Patch

Please make the Attr versions of these getters [Constant] too.

r=me assuming you are willing to be on the hook for watching for regressions and dealing with them.  I'm not going to have time to do that this time around...
Attachment #8740432 - Flags: review?(bzbarsky) → review+
I should be around Sunday-Thursday this week and next, but not in two weeks, but yes in three weeks.  If a problem occurs in the week I'm out, or after May 8, someone can just back out the patch and I'll look when I get back.  Current Chrome seems to have already done this, so presumably it doesn't break the web.

New try push: https://treeherder.mozilla.org/#/jobs?repo=try&revision=b137d26a9adce8e5908266b6747a1928d62ffd19
No, I meant that someone should be responsible for keeping an eye on incoming bugs that might be fallout from this, not just that someone needs to deal if there is a problem.  If you're not able to do that yourself, please talk to Andrew Overholt to make sure someone else is planning to do it...
I'll do it.
https://hg.mozilla.org/mozilla-central/rev/5dde3034452c
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
Flags: needinfo?(fscholz)
Flags: needinfo?(annevk)
Looks good to me so far, Sebastian. Thank you! In order to dev-doc-complete this, we will also need to update these two pages:

https://developer.mozilla.org/en-US/docs/Web/API/Node/prefix
https://developer.mozilla.org/en-US/docs/Web/API/Element/namespaceURI
Flags: needinfo?(fscholz)
Sebastian, looks great!
Flags: needinfo?(annevk)
(In reply to Florian Scholz [:fscholz] (MDN) from comment #11)
> Looks good to me so far, Sebastian. Thank you! In order to dev-doc-complete
> this, we will also need to update these two pages:
> 
> https://developer.mozilla.org/en-US/docs/Web/API/Node/prefix
> https://developer.mozilla.org/en-US/docs/Web/API/Element/namespaceURI

Oh, right. I've now updated those two pages and also created the following pages:

https://developer.mozilla.org/en-US/docs/Web/API/Element/namespaceURI
https://developer.mozilla.org/en-US/docs/Web/API/Element/prefix
https://developer.mozilla.org/en-US/docs/Web/API/Attr/namespaceURI
https://developer.mozilla.org/en-US/docs/Web/API/Attr/prefix

Sebastian
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.