Closed Bug 721920 Opened 13 years ago Closed 13 years ago

Honor the 'lang' attribute on SVG as we do in HTML

Categories

(Core :: SVG, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla13

People

(Reporter: jwatt, Assigned: jwatt)

References

(Blocks 1 open bug, )

Details

(Keywords: dev-doc-needed)

Attachments

(3 files, 2 obsolete files)

We should support the 'lang' attribute in SVG just as we do in HTML.
Attached image testcase (deleted) —
Attachment #592325 - Attachment is patch: false
Attachment #592325 - Attachment mime type: text/plain → image/svg+xml
Chrome supports this.
SVG 1.1 uses xml:lang="" for declaring the language of text content, and lang="" just for declaring what language a particular SVG Font glyph is for. I'll file an issue for SVG 2 to use lang="" rather than xml:lang="".
Thanks, that'd be great.
Blocks: 722097
Attached patch patch (obsolete) (deleted) — Splinter Review
Still need tests, but this works. (The fact that selector matching doesn't use the nsStyleFont struct caught me out for a while, but I figured it out.)
> The fact that selector matching doesn't use the nsStyleFont struct... By which I mean the code for ePseudoClass_lang in nsCSSRuleProcessor.cpp uses GetLang(), not an nsStyleFont...hence the change to nsIContent.h in the patch.
Attached patch patch (obsolete) (deleted) — Splinter Review
Attachment #592484 - Attachment is obsolete: true
No longer blocks: 722097
Attached patch patch (deleted) — Splinter Review
Attachment #592486 - Attachment is obsolete: true
Attachment #598198 - Flags: review?(bzbarsky)
Attachment #598198 - Flags: review?(bzbarsky) → review+
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla13
Depends on: 728974
Blocks: svg2
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: