W3C home > Mailing lists > Public > whatwg@whatwg.org > January 2010

[whatwg] [html5] r4483 - [giow] (0) Clarify that <br> doesn't stop bidi processing. Fixing http://www.w3. [...]

From: L. David Baron <dbaron@dbaron.org>
Date: Tue, 5 Jan 2010 09:40:09 -0500
Message-ID: <20100105144009.GA5105@pickering.dbaron.org>
On Tuesday 2010-01-05 03:16 -0800, whatwg at whatwg.org wrote:
(describing http://html5.org/tools/web-apps-tracker?from=4482&to=4483)
> [giow] (0) Clarify that <br> doesn't stop bidi processing.
> Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=8363

It might be worth saying that it is equivalent to LINE SEPARATOR in
terms of bidi processing, as HTML4 did:
  # With respect to bidirectional formatting, the BR element should
  # behave the same way the [ISO10646] LINE SEPARATOR character
  # behaves in the bidirectional algorithm.
     -- http://www.w3.org/TR/html4/struct/text.html#h-9.3.2.1

As I understand it, the bidi algorithm [1] has two parts:
 * resolution, in which characters are assigned embedding levels
 * reordering, in which the characters are reorderded into their
   left-to-right display order by, for each N decreasing from 63 to
   1, reversing all contiguous runs of embedding level N or higher

The importance of being a line separator is that *resolution* is run
on paragraphs (so is run on units containing line separators in the
middle), but reordering is run on lines (so it is not run on units
containing line separators).

This means that characters on one side of a line separator can
influence the directionality of characters on the other side, but
reordering can't move them to the opposite side of the BR (i.e.,
across lines).

For example the markup (where uppercase characters are
right-to-left) within a left-to-right direction block:
  HEB-<br>REW
looks like:
  -BEH
  WER
whereas the markup:
  HEB-<p>REW
looks like:
  BEH-
  WER
(the hyphen appears at the opposite end).

-David

[1] http://unicode.org/reports/tr9/

-- 
L. David Baron                                 http://dbaron.org/
Mozilla Corporation                       http://www.mozilla.com/
Received on Tuesday, 5 January 2010 06:40:09 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:20 UTC