New issue
Advanced search Search tips

Issue 614171 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

SVG element names lowercased

Project Member Reported by geoff...@gmail.com, May 23 2016

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2746.0 Safari/537.36

Steps to reproduce the problem:
1. Go to "data:text/html,<svg><feComposite>"
2. Open dev tools, expand all elements

What is the expected behavior?
There is an "feComposite" element within the "svg" element

What went wrong?
There is an "fecomposite" element within the "svg" element (note the lowercase).

Did this work before? N/A 

Chrome version: 53.0.2746.0  Channel: canary
OS Version: OS X 10.11.5
Flash Version: Shockwave Flash 22.0 r0

document.body.firstChild.firstChild.tagName and document.body.firstChild.firstChild.localName both give the correctly camel-cased version.
 
Labels: -OS-Mac OS-All
Owner: dgozman@chromium.org
Status: Assigned (was: Unconfirmed)
Cc: lushnikov@chromium.org
Labels: Needs-Feedback
We change all tag names to the lower case when displaying in DevTools. Is that an issue for you? Can you add more details on how this affects you?

Comment 3 by geoff...@gmail.com, May 23 2016

I think it's definitely an issue: I was having problems with SVG filters not applying, and when I looked in the devtools to make sure they were in the tree I found my feComposite elements weren't feComposite elements after all, but rather fecomposite elements, which would explain why the filters weren't working as I expected. I then spent half an hour trying to work out why Chrome was lowercasing the elements, before eventually realising only the devtools were.

I'd expect the element name in the devtools to match el.prefix === null ? el.localName : el.prefix + ":" + el.localName
Yes, it makes a lot more sense to take advantage of the case-canonicalization the platform already does via `el.localName`, and not try to create home-grown lowercasing code which fails in important cases like this one.
Cc: -lushnikov@chromium.org dgozman@chromium.org
Labels: -Needs-Feedback
Owner: lushnikov@chromium.org
Note that Elements panel predates el.localName by quite a while. We'll look into using localName though, thanks for suggestion.

Comment 6 by geoff...@gmail.com, May 24 2016

FWIW, el.localName has been around since… forever. Certainly I don't remember it ever not existing; I'm pretty sure it goes all the way back to pre-fork KHTML. The only "newness" is it getting moved from Node.prototype to Element.prototype, but that makes no difference to its availability on elements.
Owner: einbinder@chromium.org
Status: Started (was: Assigned)
Status: Fixed (was: Started)

Sign in to add a comment