User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:53.0) Gecko/20100101 Firefox/53.0 Build ID: 20170131004003 Steps to reproduce: <div style="width:5em;background:lightgreen;color:black"> <p>XA111，XA5，XA23 <p>你，我蛤，好 </div> Actual results: Firefox is unable to break lines at fullwidth commas. (And lang="zh" doesn't help.) Expected results: Firefox should have considered these line-break opportunities.
:masayuki, would you agree fullwidth punctuation like this should be treated as a line-break opportunity? It seems reasonable to me but I'm not sure offhand if there are any rules/standards that we should check...
Not masayuki here, but I believe line-breaking at punctuations is fine and actually preferred as long as Firefox follows the prohibition rules (don't leave an open paren hanging at the end; don't start a line with a comma, this kind of stuff).
Unicode defines "，" and "．" as: FF0C;FULLWIDTH COMMA;Po;0;CS;<wide> 002C;;;;N;;;;; FF0E;FULLWIDTH FULL STOP;Po;0;CS;<wide> 002E;;;;N;FULLWIDTH PERIOD;;;; I think that it's reasonable to treated "，" and "．" as "Punctuation that prohibits break before" since glyph for them typically includes enough space at left-half of the em-square. (I'm not sure about the other full-width punctuation line "）", "？", etc. https://searchfox.org/mozilla-central/rev/1a4a26905f923458679a59a4be1e455ebc53c333/intl/lwbrk/nsJISx4051LineBreaker.cpp#317 https://www.unicode.org/charts/PDF/UFF00.pdf So, perhaps, treating them as ", " and ". " (i.e., followed by ASCII whitespace) shows better result. Kimura-san and Makoto-san, if you have some opinions, let us know. (Although, it might be not enough to treat them as "Punctuation that prohibits break before" in conservative mode (like the test case). See https://searchfox.org/mozilla-central/rev/1a4a26905f923458679a59a4be1e455ebc53c333/intl/lwbrk/nsJISx4051LineBreaker.cpp#254 )
FYI: Currently, some full width characters (less than U+FF60) are treated as ASCII characters: https://searchfox.org/mozilla-central/rev/1a4a26905f923458679a59a4be1e455ebc53c333/intl/lwbrk/nsJISx4051LineBreaker.cpp#438-440 (Although, I guess it should be less than U+FF5F?) So, currently, they must be treated as "Close parenthese (or punctuations) like Character".
Per <https://www.unicode.org/Public/UNIDATA/LineBreak.txt>, > FF0C;CL # Po FULLWIDTH COMMA > FF0E;CL # Po FULLWIDTH FULL STOP And per <http://www.unicode.org/reports/tr14/>, > CL Close Punctuation “}”, “❳”, “⟫” etc. Prohibit line breaks before