Last Comment Bug 740120 - text-transform:lowercase should use conditional mapping for Greek sigma
: text-transform:lowercase should use conditional mapping for Greek sigma
Status: RESOLVED FIXED
: dev-doc-complete, intl
Product: Core
Classification: Components
Component: Layout: Text (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla14
Assigned To: Jonathan Kew (:jfkthame)
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-28 13:06 PDT by Jonathan Kew (:jfkthame)
Modified: 2012-04-16 17:30 PDT (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch, use contextual lowercasing for Greek sigma (5.58 KB, patch)
2012-04-05 05:36 PDT, Jonathan Kew (:jfkthame)
no flags Details | Diff | Review
reftest for contextual lowercasing of Sigma (1.98 KB, patch)
2012-04-05 06:18 PDT, Jonathan Kew (:jfkthame)
smontagu: review+
Details | Diff | Review
patch, use contextual lowercasing for Greek sigma - enhanced comments (6.82 KB, patch)
2012-04-15 04:25 PDT, Jonathan Kew (:jfkthame)
smontagu: review+
Details | Diff | Review

Description Jonathan Kew (:jfkthame) 2012-03-28 13:06:12 PDT
Applying text-transform:lowercase to Greek text currently converts Σ to σ in all cases. However, when the sigma is word-final, it should be converted to ς instead.

See http://dev.w3.org/csswg/css3-text/#text-transform, and SpecialCasing.txt in the Unicode Character Database.

In general terms, the mapping for Σ should be to σ whenever there is a following Greek letter, or when the character Σ occurs in isolation; and to ς when it is preceded by another letter but not followed by one.

(Compare also bug 307039 regarding the Greek uppercase transform.)
Comment 1 Jonathan Kew (:jfkthame) 2012-04-05 05:36:09 PDT
Created attachment 612511 [details] [diff] [review]
patch, use contextual lowercasing for Greek sigma

This should provide a decent approximation of the required behavior. I note that Safari already implements something similar, BTW.

We'll want a reftest to go with this...
Comment 2 Jonathan Kew (:jfkthame) 2012-04-05 06:18:01 PDT
Created attachment 612519 [details] [diff] [review]
reftest for contextual lowercasing of Sigma

Simple reftest for the Sigma behavior. Matches webkit behavior for these testcases.
Comment 3 Simon Montagu :smontagu 2012-04-15 01:19:38 PDT
Comment on attachment 612511 [details] [diff] [review]
patch, use contextual lowercasing for Greek sigma

Review of attachment 612511 [details] [diff] [review]:
-----------------------------------------------------------------

I'm finding this a little hard to follow and needing to use the reftests as documentation for the code. Can you add comments specifying in which cases we're converting to final sigma and which not (as in comment 0, but in-source)?
Comment 4 Jonathan Kew (:jfkthame) 2012-04-15 04:25:02 PDT
Created attachment 615134 [details] [diff] [review]
patch, use contextual lowercasing for Greek sigma - enhanced comments

I've added comments to try and explain better what's being done - hope this makes it easier to follow.
Comment 7 Jean-Yves Perrier [:teoli] 2012-04-16 17:30:57 PDT
I've updated https://developer.mozilla.org/en/CSS/text-transform (summary, examples and the browser compatibility table).
and added a note in: https://developer.mozilla.org/en/Firefox_14_for_developers

Note You need to log in before you can comment on or make changes to this bug.