Bug 128882

Summary: When applying style, attribute value matching should be case sensitive for SVG
Product: WebKit Reporter: Benjamin Poulain <benjamin>
Component: New BugsAssignee: Benjamin Poulain <benjamin>
Status: RESOLVED FIXED    
Severity: Normal CC: allan.jensen, commit-queue, esprehn+autocc, glenn, gyuyoung.kim, koivisto, krit, macpherson, menard
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Benjamin Poulain 2014-02-15 20:54:50 PST
When applying style, attribute value matching should be case sensitive for SVG
Comment 1 Benjamin Poulain 2014-02-15 20:58:46 PST
Created attachment 224314 [details]
Patch
Comment 2 Andreas Kling 2014-02-16 10:55:40 PST
Comment on attachment 224314 [details]
Patch

r=me, great catch!
Comment 3 Benjamin Poulain 2014-02-16 19:14:38 PST
Comment on attachment 224314 [details]
Patch

Clearing flags on attachment: 224314

Committed r164203: <http://trac.webkit.org/changeset/164203>
Comment 4 Benjamin Poulain 2014-02-16 19:14:45 PST
All reviewed patches have been landed.  Closing bug.
Comment 5 Dirk Schulze 2014-02-17 04:51:07 PST
I do not disagree that XML and SVG require case sensitiveness. So according to standards this is correct for now.

However, we try to harmonize SVG and HMTL where ever possible. Even the specification is slowly going into this direction. I am not sure if case sensitiveness for SVG is the right signal here.
Comment 6 Benjamin Poulain 2014-02-17 11:16:32 PST
(In reply to comment #5)
> However, we try to harmonize SVG and HMTL where ever possible. Even the specification is slowly going into this direction. I am not sure if case sensitiveness for SVG is the right signal here.

In the case of SelectorChecker, it is only doing case-insensitive value matching for a handful of legacy attributes. It is compatibility feature for old content.

This case-insensitive exception is nonsense in my opinion. It is impossible to understand for authors (the list is arbitrary and poorly documented) and those attributes are slower. We should aim toward removing this from HTML instead of adding it to SVG.
Comment 7 Dirk Schulze 2014-02-18 00:40:35 PST
(In reply to comment #6)
> (In reply to comment #5)
> > However, we try to harmonize SVG and HMTL where ever possible. Even the specification is slowly going into this direction. I am not sure if case sensitiveness for SVG is the right signal here.
> 
> In the case of SelectorChecker, it is only doing case-insensitive value matching for a handful of legacy attributes. It is compatibility feature for old content.
> 
> This case-insensitive exception is nonsense in my opinion. It is impossible to understand for authors (the list is arbitrary and poorly documented) and those attributes are slower. We should aim toward removing this from HTML instead of adding it to SVG.

Are there ambitions on WHATWG or somewhere else to drive this forward? Just to make it clear, I care less about case sensitiveness but more about consistency. Authors shouldn't be surprised because the same code that works in HTML doesn't work in SVG and vice versa. This is particularly bad for inline SVG embedded in HTML directly.
Comment 8 Benjamin Poulain 2014-02-18 00:57:07 PST
(In reply to comment #7)
> Are there ambitions on WHATWG or somewhere else to drive this forward? Just to make it clear, I care less about case sensitiveness but more about consistency. Authors shouldn't be surprised because the same code that works in HTML doesn't work in SVG and vice versa. This is particularly bad for inline SVG embedded in HTML directly.

There is a spec, it is followed by Firefox (and probably IE) -> we should match the spec.

You think there is matter to change the spec. It can go two ways: update SVG or fix HTML. I am in favor of fixing HTML. I do not participate in WHATWG so it is up to you if you want the change.

If you change the SVG spec (and Mozilla/Microsoft are on board), I am totally ok with "unfixing" this bug.