W3C home > Mailing lists > Public > www-style@w3.org > November 2013

Replaced elements as U+FFFC for line breaking doesn't seem Web compatible

From: Kang-Hao (Kenny) Lu <kanghaol@oupeng.com>
Date: Sun, 10 Nov 2013 22:21:22 +0800
Message-ID: <527F9662.5020200@oupeng.com>
To: WWW Style <www-style@w3.org>
Our internal channel reveals that for this case

  data:text/html,<style>body { width: 0; }</style><input>&nbsp;<input>

, there should be a soft soft wrap opportunity after the NO-BREAK SPACE,
while this contradicts css-text + UAX#14 at this moment:

Unicode UAX14[1]

  # GL: Non-breaking (“Glue”) (XB/XA) (Non-tailorable)
  # Non-breaking characters prohibit breaks on either side, but that
  # prohibition can be overridden by SP or ZW. In particular, when
  # NO-BREAK SPACE follows SPACE, there is a break opportunity after
  # the SPACE and the NO-BREAK SPACE will go as visible space onto the
  # next line. See also WJ. The following are examples of characters of
  # line break class GL:


  # * When ‘white-space’ allows wrapping, line breaking behavior
  #   defined for the WJ, ZW, and GL line-breaking classes in [UAX14]
  #   must be honored.


  # * The line breaking behavior of a replaced element or other atomic
  #   inline is equivalent to that of the Object Replacement Character
  #   (U+FFFC).

Only Presto is following the spec here, every IE mode I tested, WebKit,
Firefox all behave otherwise, and I doubt other browsers will want to
follow the spec because our client reports this as Presto's bug.

I think the last quoted sentence should probably changed to something

  | * Replaced element or other atomic inline introduces soft wrap
  |   opportunities on both side.

to be Web compatible.

(I don't have much faith in this section before we have decent test
coverage, and it seems that this section might undergo multple rounds
of LC ↔ CR transitions. I don't have good knowledge about the process
to know if this is a good thing or not.)

[1] http://www.unicode.org/reports/tr14/#DescriptionOfProperties
[2] http://dev.w3.org/csswg/css-text/#line-break-details

Web Specialist, Opera Sphinx Game Force, Oupeng Browser, Beijing
Try Oupeng: http://www.oupeng.com/
Received on Sunday, 10 November 2013 14:21:36 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:34 UTC