Closed
Bug 1223523
Opened 9 years ago
Closed 9 years ago
Named getter on document should not return images with empty name
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla45
Tracking | Status | |
---|---|---|
firefox45 | --- | fixed |
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
(Blocks 1 open bug)
Details
(Keywords: dev-doc-complete, site-compat)
Attachments
(2 files, 1 obsolete file)
(deleted),
patch
|
peterv
:
review+
|
Details | Diff | Splinter Review |
(deleted),
text/html
|
Details |
Spec says that <img id="foo"> only creates a named property named "foo" on the document if the <img> element also has a nonempty "name" attribute. Chrome seems to do that.
Assignee | ||
Comment 1•9 years ago
|
||
Oh, and specifically the spec says that the set of named elements with name "name" include: img elements that have an id content attribute whose value is "name", and that have a non-empty name content attribute present also.
Comment 2•9 years ago
|
||
Hmm... I check this again and don't see that Chrome (48.0.2535.0) change it's behaviour: https://bugzilla.mozilla.org/show_bug.cgi?id=1010241#c2
Assignee | ||
Comment 3•9 years ago
|
||
I'm not sure what that has to do with this bug.
Assignee | ||
Comment 4•9 years ago
|
||
Attachment #8686989 -
Flags: review?(peterv)
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Assignee | ||
Comment 5•9 years ago
|
||
Attachment #8687015 -
Flags: review?(peterv)
Assignee | ||
Updated•9 years ago
|
Attachment #8686989 -
Attachment is obsolete: true
Attachment #8686989 -
Flags: review?(peterv)
Updated•9 years ago
|
Attachment #8687015 -
Flags: review?(peterv) → review+
Comment 7•9 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/4488d33aa551
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
Comment 8•8 years ago
|
||
Found a question on SUMO [1] and narrowed down to this bug with mozregression. Yes, the new behaviour matches Chrome but needs a site compatibility doc. https://support.mozilla.org/en-US/questions/1113589
Keywords: dev-doc-needed,
site-compat
Comment 9•8 years ago
|
||
Well, the new behaviour does not match Chrome, actually... Anyway, I have just posted the site compatibility document: https://www.fxsitecompat.com/en-CA/docs/2016/image-with-id-no-longer-appears-on-document-unless-it-has-name-as-well/
Keywords: dev-doc-needed → dev-doc-complete
Assignee | ||
Comment 10•8 years ago
|
||
> Well, the new behaviour does not match Chrome, actually...
Er... it did in my testing. How do they differ?
Flags: needinfo?(kohei.yoshino)
Comment 11•8 years ago
|
||
Hmm, I was testing with the snippet posted on SUMO (comment 8). In this case, Firefox returns both img1 and img2, but Chrome doesn't return img1 which is from DOMParser. Maybe a bug in Chrome?
Flags: needinfo?(kohei.yoshino)
Assignee | ||
Comment 12•8 years ago
|
||
Yes, definitely a bug in Chrome. Filed https://bugs.chromium.org/p/chromium/issues/detail?id=594008 -- they just have a broken named getter on the return value of DOMParser, whether you do it by id or name or something else.
You need to log in
before you can comment on or make changes to this bug.
Description
•