Closed
Bug 936517
Opened 11 years ago
Closed 11 years ago
SVG <switch> element not evaluating "systemLanguage" attribute correctly
Categories
(Core :: SVG, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: Eduard.Braun2, Unassigned)
References
()
Details
Attachments
(1 file)
610 bytes,
image/svg+xml
|
Details |
It seems the implementation of the SVG <switch> element is not correctly evaluating the "systemLanguage" attribute: - From my tests I think Firefox picks the first child whose "systemLanguage" attribute matches *any* of the languages set as preferred browser languages. - It would be expected that Firefox picks the child whose "systemLanguage" matches the *first* language in the list of preferred languages and only if this one is not available checks the next language code in the list. You can try the attached testcase: On most systems it probably shows "en", even if the first preferred language was set to e.g. "de" or "fr".
Comment 1•11 years ago
|
||
We do what the SVG specification says: http://www.w3.org/TR/SVG/struct.html#SystemLanguageAttribute Evaluates to "true" if one of the languages indicated by user preferences exactly equals one of the languages given in the value of this parameter You'll likely find that the SMIL 3.0 allowReorder attribute (http://www.w3.org/TR/SMIL3/smil-content.html#adef-allowReorder) which we do support is useful. If you set this you'll find switch processing is more likely to meet your expectations.
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Resolution: --- → INVALID
Reporter | ||
Comment 2•11 years ago
|
||
I see... So it's actually a bug in SVG specification that was luckily already "patched out" by a badly documented attribute ;)
Comment 3•11 years ago
|
||
In what way is it badly documented? <switch> is part of the SMIL specification that was incorporated into SVG. It even says in the SVG specification that switch comes from SMIL. Is there some documentation missing from MDN?
Reporter | ||
Comment 4•11 years ago
|
||
Oh sorry, I did not have MDN in mind, the explanation there is fine. Actually if I had a look at MDN earlier this bug report would have probably been unnecessary. I was talking about the W3C specification itself. On the URL I linked in the bug report the "allowReorder" attribute is not mentioned, therefore I didn't even know about its existence.
Comment 5•11 years ago
|
||
The SVG 1.1 specification was written prior to the SMIL 3.0 specification. The upcoming SVG 2 specification should mention allowReorder but currently doesn't. I'll send them a note reminding them: http://lists.w3.org/Archives/Public/www-svg/2013Nov/
You need to log in
before you can comment on or make changes to this bug.
Description
•