Bidi fixes, r=aharon

Thu, 02 Aug 2012 15:09:24 -0700

author
fantasai <fantasai.cvs@inkedblade.net>
date
Thu, 02 Aug 2012 15:09:24 -0700
changeset 6334
9b5c11ee5f05
parent 6333
020aaacedd3b
child 6335
6b6042aaa7b1

Bidi fixes, r=aharon

css3-writing-modes/Overview.html file | annotate | diff | comparison | revisions
css3-writing-modes/Overview.src.html file | annotate | diff | comparison | revisions
     1.1 --- a/css3-writing-modes/Overview.html	Wed Aug 01 12:12:01 2012 -0700
     1.2 +++ b/css3-writing-modes/Overview.html	Thu Aug 02 15:09:24 2012 -0700
     1.3 @@ -32,7 +32,7 @@
     1.4  
     1.5     <h1>CSS Writing Modes Module Level 3</h1>
     1.6  
     1.7 -   <h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 31 July 2012</h2>
     1.8 +   <h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 2 August 2012</h2>
     1.9  
    1.10     <dl>
    1.11      <dt>This version:
    1.12 @@ -40,7 +40,7 @@
    1.13      <dd><a
    1.14       href="http://dev.w3.org/csswg/css3-writing-modes/">http://dev.w3.org/csswg/css3-writing-modes/</a>
    1.15       <!--
    1.16 -    <dd><a href="http://www.w3.org/TR/2012/WD-css3-writing-modes-20120731/">http://www.w3.org/TR/2012/ED-css3-writing-modes-20120731/</a>
    1.17 +    <dd><a href="http://www.w3.org/TR/2012/WD-css3-writing-modes-20120802/">http://www.w3.org/TR/2012/ED-css3-writing-modes-20120802/</a>
    1.18  -->
    1.19       
    1.20  
    1.21 @@ -545,9 +545,9 @@
    1.22    <p>Two CSS properties, ‘<a href="#direction0"><code
    1.23     class=property>direction</code></a>’ and ‘<a
    1.24     href="#unicode-bidi0"><code class=property>unicode-bidi</code></a>’,
    1.25 -   provide explicit embedding and override controls in the CSS layer. Because
    1.26 -   the base directionality of a text depends on the structure and semantics
    1.27 -   of the document, the ‘<a href="#direction0"><code
    1.28 +   provide explicit embedding, isolation, and override controls in the CSS
    1.29 +   layer. Because the base directionality of a text depends on the structure
    1.30 +   and semantics of the document, the ‘<a href="#direction0"><code
    1.31     class=property>direction</code></a>’ and ‘<a
    1.32     href="#unicode-bidi0"><code class=property>unicode-bidi</code></a>’
    1.33     properties should in most cases be used only to map bidi information in
    1.34 @@ -558,23 +558,18 @@
    1.35  
    1.36    <p>In general, the paragraph embedding level is set according to the ‘<a
    1.37     href="#direction0"><code class=property>direction</code></a>’ property
    1.38 -   of the element <i>immediately containing</i> the paragraph rather than by
    1.39 -   the heuristic given in steps P2 and P3 of the Unicode algorithm. <a
    1.40 -   href="#UAX9" rel=biblioentry>[UAX9]<!--{{!UAX9}}--></a> When the computed
    1.41 -   ‘<a href="#unicode-bidi0"><code
    1.42 -   class=property>unicode-bidi</code></a>’ of the element <i>immediately
    1.43 -   containing</i> the paragraph is ‘<a href="#plaintext"><code
    1.44 -   class=css>plaintext</code></a>’, however, the Unicode heuristics are
    1.45 -   used instead. An element <dfn id=bidi-contains>immediately contains</dfn>
    1.46 -   a bidi paragraph if the element itself, but none of its descendants, both
    1.47 -   contains the entire bidi paragraph and is a block container or <a
    1.48 -   href="#bidi-isolate"><i>bidi-isolating</i></a> inline.
    1.49 +   of the paragraph's containing block rather than by the heuristic given in
    1.50 +   steps P2 and P3 of the Unicode algorithm. <a href="#UAX9"
    1.51 +   rel=biblioentry>[UAX9]<!--{{!UAX9}}--></a> When the computed ‘<a
    1.52 +   href="#unicode-bidi0"><code class=property>unicode-bidi</code></a>’ of
    1.53 +   the paragraph's containing block is ‘<a href="#plaintext"><code
    1.54 +   class=css>plaintext</code></a>’, however, the Unicode heuristics (rules
    1.55 +   P2 and P3) are used instead.
    1.56  
    1.57    <p>The HTML specifications (<a href="#HTML401"
    1.58     rel=biblioentry>[HTML401]<!--{{HTML401}}--></a>, section 8.2, and <a
    1.59     href="#HTML5" rel=biblioentry>[HTML5]<!--{{HTML5}}--></a>, section 10.3.5)
    1.60 -   define bidirectionality behavior for HTML elements. The HTML 4
    1.61 -   specification also contains more information on bidirectionality issues.
    1.62 +   define bidirectionality behavior for HTML elements.
    1.63  
    1.64    <p class=note>Because HTML UAs can turn off CSS styling, we advise HTML
    1.65     authors to use the HTML ‘<code class=property>dir</code>’ attribute
    1.66 @@ -629,11 +624,12 @@
    1.67    </table>
    1.68  
    1.69    <p>This property specifies the inline base direction or directionality of
    1.70 -   any bidi paragraph, embedding, or override established by the element.
    1.71 -   (See ‘<a href="#unicode-bidi0"><code
    1.72 -   class=property>unicode-bidi</code></a>’) In addition, it informs the
    1.73 -   ordering of <a href="http://www.w3.org/TR/CSS21/tables.html">table</a>
    1.74 -   column layout, the direction of horizontal <a
    1.75 +   any bidi paragraph, embedding, isolate, or override established by the
    1.76 +   element. (See ‘<a href="#unicode-bidi0"><code
    1.77 +   class=property>unicode-bidi</code></a>’.) <!-- except plaintext --> In
    1.78 +   addition, it informs the ordering of <a
    1.79 +   href="http://www.w3.org/TR/CSS21/tables.html">table</a> column layout, the
    1.80 +   direction of horizontal <a
    1.81     href="http://www.w3.org/TR/CSS21/visufx.html#overflow">overflow</a>, and
    1.82     the default alignment of text within a line, and other layout effects that
    1.83     depend on the element's inline base direction.
    1.84 @@ -729,9 +725,9 @@
    1.85    <p>Normally (i.e. when ‘<a href="#unicode-bidi0"><code
    1.86     class=property>unicode-bidi</code></a>’ is ‘<a href="#normal"><code
    1.87     class=css>normal</code></a>’) an inline element is transparent to the
    1.88 -   unicode bidi algorithm; content is ordered as if the element boundaries
    1.89 -   were not there. The ‘<a href="#unicode-bidi0"><code
    1.90 -   class=property>unicode-bidi</code></a>’ property allows inline elements
    1.91 +   unicode bidi algorithm; content is ordered as if the element's boundaries
    1.92 +   were not there. Other values of the ‘<a href="#unicode-bidi0"><code
    1.93 +   class=property>unicode-bidi</code></a>’ property cause inline elements
    1.94     to create scopes within the algorithm, and to override the intrinsic
    1.95     directionality of text.
    1.96  
    1.97 @@ -808,51 +804,74 @@
    1.98  
    1.99     <dt><dfn id=embed>embed</dfn>
   1.100  
   1.101 -   <dd>If the element is inline, this value opens an additional level of
   1.102 -    embedding with respect to the bidirectional algorithm. The direction of
   1.103 -    this embedding level is given by the ‘<a href="#direction0"><code
   1.104 -    class=property>direction</code></a>’ property. Inside the element,
   1.105 -    reordering is done implicitly. This corresponds to adding a LRE (U+202A),
   1.106 -    for ‘<code class=css>direction: ltr</code>’, or RLE (U+202B), for
   1.107 -    ‘<code class=css>direction: rtl</code>’, at the start of the element
   1.108 -    and a PDF (U+202C) at the end of the element. <span class=note>This value
   1.109 -    has no effect on elements that are not inline.</span>
   1.110 +   <dd>If the element is inline, this value creates a <dfn
   1.111 +    id=directional-embedding>directional embedding</dfn> by opening an
   1.112 +    additional level of embedding with respect to the bidirectional
   1.113 +    algorithm. The direction of this embedding level is given by the ‘<a
   1.114 +    href="#direction0"><code class=property>direction</code></a>’ property.
   1.115 +    Inside the element, reordering is done implicitly. This corresponds to
   1.116 +    adding a LRE (U+202A), for ‘<code class=css>direction: ltr</code>’,
   1.117 +    or RLE (U+202B), for ‘<code class=css>direction: rtl</code>’, at the
   1.118 +    start of the element and a PDF (U+202C) at the end of the element. <span
   1.119 +    class=note>This value has no effect on elements that are not
   1.120 +    inline.</span>
   1.121  
   1.122     <dt><dfn id=isolate>isolate</dfn>
   1.123  
   1.124     <dd>On an inline element, this <dfn id=bidi-isolate
   1.125      title="bidi-isolate|bidi isolation|isolation">bidi-isolates</dfn> its
   1.126 -    contents: for the purpose of bidi resolution in its containing bidi
   1.127 -    paragraph (if any), the element is treated as if it were an Object
   1.128 -    Replacement Character (U+FFFC). (If the element is broken across multiple
   1.129 -    lines, then each box of the element is treated as an Object Replacement
   1.130 -    Character.) Within the element, its contents are considered, for the
   1.131 -    purposes of bidi resolution, to be inside a separate, independent
   1.132 -    document whose <a href="#paragraph"><i>bidi paragraphs</i></a> are
   1.133 -    assigned the base directionality specified by the element's ‘<a
   1.134 -    href="#direction0"><code class=property>direction</code></a>’ property.
   1.135 +    contents. This is similar to a directional embedding (and increases the
   1.136 +    embedding level accordingly) except that each sequence of inline-level
   1.137 +    boxes uninterrupted by any block boundary or <a
   1.138 +    href="#forced-paragraph-break"><i>forced paragraph break</i></a> is
   1.139 +    treated as an <dfn id=isolated-sequence->isolated sequence<dfn>:
   1.140 +    </dfn></dfn>
   1.141 +    <ul>
   1.142 +     <li>the content within the sequence is ordered as if inside an
   1.143 +      independent paragraph with the base directionality specified by the
   1.144 +      element's ‘<a href="#direction0"><code
   1.145 +      class=property>direction</code></a>’ property.
   1.146 +
   1.147 +     <li>for the purpose of bidi resolution in its containing bidi paragraph,
   1.148 +      the sequence is treated as if it were a single Object Replacement
   1.149 +      Character (U+FFFC).
   1.150 +    </ul>
   1.151 +    In effect, neither is the content inside the element bidi-affected by the
   1.152 +    content surrounding the element, nor is the content surrounding the
   1.153 +    element bidi-affected by the content or specified directionality of the
   1.154 +    element. However, <a href="#forced-paragraph-break"><i>forced paragraph
   1.155 +    breaks</i></a> within the element still create a corresponding break in
   1.156 +    the containing paragraph.
   1.157 +    <p class=note>In Unicode 7.0 and beyond, this will correspond to adding
   1.158 +     an LRI (U+2066), for ‘<code class=css>direction: ltr</code>’, or RLI
   1.159 +     (U+2067), for ‘<code class=css>direction: rtl</code>’, at the start
   1.160 +     of the element, and a PDI (U+2069) at the end of the element.
   1.161 +
   1.162 +    <p class=note>This value has no effect on elements that are not inline.
   1.163  
   1.164     <dt><dfn id=bidi-override>bidi-override</dfn>
   1.165  
   1.166 -   <dd>For inline elements this creates an <dfn id=override>override</dfn>.
   1.167 -    (For block-container elements this creates an <a
   1.168 -    href="#override"><i>override</i></a> for inline-level descendants not
   1.169 -    within another block container element.) This means that inside the
   1.170 -    element, reordering is strictly in sequence according to the ‘<a
   1.171 -    href="#direction0"><code class=property>direction</code></a>’ property;
   1.172 -    the implicit part of the bidirectional algorithm is ignored. This
   1.173 -    corresponds to adding a LRO (U+202D), for ‘<code class=css>direction:
   1.174 -    ltr</code>’, or RLO (U+202E), for ‘<code class=css>direction:
   1.175 -    rtl</code>’, at the start of the element and a PDF (U+202C) at the end
   1.176 -    of the element.
   1.177 +   <dd>This value puts the element's immediate content in a <dfn
   1.178 +    id=directional-override>directional override</dfn>. For an inline, this
   1.179 +    means that the element acts like a <a
   1.180 +    href="#directional-embedding"><i>directional embedding</i></a> in the
   1.181 +    bidirectional algorithm, except that reordering within it is strictly in
   1.182 +    sequence according to the ‘<a href="#direction0"><code
   1.183 +    class=property>direction</code></a>’ property; the implicit part of the
   1.184 +    bidirectional algorithm is ignored. This corresponds to adding a LRO
   1.185 +    (U+202D), for ‘<code class=css>direction: ltr</code>’, or RLO
   1.186 +    (U+202E), for ‘<code class=css>direction: rtl</code>’, at the start
   1.187 +    of the element and a PDF (U+202C) at the end of the element. If the
   1.188 +    element is a block container, the override is applied to an anonymous
   1.189 +    inline element that surrounds all of its content.
   1.190  
   1.191     <dt><dfn id=isolate-override>isolate-override<dfn></dfn></dfn>
   1.192  
   1.193     <dd>This combines the <a href="#bidi-isolate"><i>isolation</i></a>
   1.194      behavior of ‘<a href="#isolate"><code class=css>isolate</code></a>’
   1.195 -    with the <a href="#override"><i>override</i></a> behavior of ‘<a
   1.196 -    href="#bidi-override"><code class=css>bidi-override</code></a>’: to
   1.197 -    surrounding content, it is equivalent to ‘<a href="#isolate"><code
   1.198 +    with the <i>override</i> behavior of ‘<a href="#bidi-override"><code
   1.199 +    class=css>bidi-override</code></a>’: to surrounding content, it is
   1.200 +    equivalent to ‘<a href="#isolate"><code
   1.201      class=css>isolate</code></a>’, but within the element content is
   1.202      ordered as if ‘<a href="#bidi-override"><code
   1.203      class=css>bidi-override</code></a>’ were specified.
   1.204 @@ -863,11 +882,16 @@
   1.205      <p>This value behaves as ‘<a href="#isolate"><code
   1.206       class=css>isolate</code></a>’ except that for the purposes of the
   1.207       Unicode bidirectional algorithm, the base directionality of each of the
   1.208 -     element's <a href="#paragraph"><i>bidi paragraphs</i></a> is determined
   1.209 -     by following the heuristic in rules P2 and P3 of the Unicode
   1.210 -     bidirectional algorithm (rather than by using the ‘<a
   1.211 -     href="#direction0"><code class=property>direction</code></a>’ property
   1.212 -     of the element).
   1.213 +     element's <a href="#paragraph"><i>bidi paragraphs</i></a> (if a block
   1.214 +     container) or <a href="#isolated-sequence-"><i>isolated
   1.215 +     sequences</i></a> (if an inline) is determined by following the
   1.216 +     heuristic in rules P2 and P3 of the Unicode bidirectional algorithm
   1.217 +     (rather than by using the ‘<a href="#direction0"><code
   1.218 +     class=property>direction</code></a>’ property of the element).
   1.219 +
   1.220 +    <p class=note>In Unicode 7.0 and beyond, for inline elements this will
   1.221 +     correspond to adding an FSI (U+2068) at the start of the element, and a
   1.222 +     PDI (U+2069) at the end of the element.
   1.223    </dl>
   1.224  
   1.225    <p class=note>Because the ‘<a href="#unicode-bidi0"><code
   1.226 @@ -906,22 +930,38 @@
   1.227    <p>If an inline element is broken around a <a href="#paragraph"><i>bidi
   1.228     paragraph</i></a> boundary (e.g. if split by a block or <a
   1.229     href="#forced-paragraph-break"><i>forced paragraph break</i></a>), then
   1.230 -   the bidi control codes corresponding to the end of the element are added
   1.231 -   before the interruption and the codes corresponding to the start of the
   1.232 -   element are added after it. (In other words, any embedding levels or
   1.233 -   overrides started by the element are closed at the paragraph break and
   1.234 -   reopened on the other side of it.)
   1.235 -
   1.236 -  <p>Because the Unicode algorithm has a limit of 61 levels of embedding,
   1.237 -   care should be taken not to use ‘<a href="#unicode-bidi0"><code
   1.238 -   class=property>unicode-bidi</code></a>’ with a value other than ‘<a
   1.239 -   href="#normal"><code class=property>normal</code></a>’ unless
   1.240 -   appropriate. In particular, a value of ‘<code
   1.241 -   class=css>inherit</code>’ should be used with extreme caution. However,
   1.242 -   for elements that are, in general, intended to be displayed as blocks, a
   1.243 -   setting of ‘<code class=css>unicode-bidi: isolate</code>’ is preferred
   1.244 -   to keep the element together in case the ‘<code
   1.245 -   class=property>display</code>’ is changed to ‘<code
   1.246 +   the bidi control codes assigned to the end of the element are added before
   1.247 +   the interruption and the codes assigned to the start of the element are
   1.248 +   added after it. (In other words, any embedding levels or overrides started
   1.249 +   by the element are closed at the paragraph break and reopened on the other
   1.250 +   side of it.)
   1.251 +
   1.252 +  <div class=example>
   1.253 +   <p>For example, where &lt;BR/&gt; is a <a
   1.254 +    href="#forced-paragraph-break"><i>forced paragraph break</i></a> the bidi
   1.255 +    ordering is identical between
   1.256 +
   1.257 +   <pre>&lt;para>...&lt;i1>&lt;i2>...&lt;BR/>...&lt;/i2>&lt;i1>...&lt;/para></pre>
   1.258 +
   1.259 +   <p>and
   1.260 +
   1.261 +   <pre>&lt;para>...&lt;i1>&lt;i2>...&lt;/i2>&lt;i1>&lt;BR/>&lt;i1>&lt;i2>...&lt;/i2>&lt;i1>...&lt;/para></pre>
   1.262 +
   1.263 +   <p>for all values of ‘<a href="#unicode-bidi0"><code
   1.264 +    class=property>unicode-bidi</code></a>’ on inline elements &lt;i1&gt;
   1.265 +    and &lt;i2&gt;.
   1.266 +  </div>
   1.267 +
   1.268 +  <p class=note> Because the Unicode algorithm has a limit of 61 levels of
   1.269 +   embedding, care should be taken not to use ‘<a
   1.270 +   href="#unicode-bidi0"><code class=property>unicode-bidi</code></a>’ with
   1.271 +   a value other than ‘<a href="#normal"><code
   1.272 +   class=property>normal</code></a>’ unless appropriate. In particular, a
   1.273 +   value of ‘<code class=css>inherit</code>’ should be used with extreme
   1.274 +   caution. However, for elements that are, in general, intended to be
   1.275 +   displayed as blocks, a setting of ‘<code class=css>unicode-bidi:
   1.276 +   isolate</code>’ is preferred to keep the element together in case the
   1.277 +   ‘<code class=property>display</code>’ is changed to ‘<code
   1.278     class=css>inline</code>’ (see example below).
   1.279  
   1.280    <h3 id=bidi-example><span class=secno>2.3. </span> Example of Bidirectional
   1.281 @@ -4048,8 +4088,8 @@
   1.282  
   1.283    <p>For replaced elements, the <a href="#min-content"><i>min-content</i></a>
   1.284     and <a href="#max-content"><i>max-content</i></a> sizes are equivalent and
   1.285 -   correspond used size of the replaced element according to the ‘<code
   1.286 -   class=css>auto</code>’ width and height calculations.
   1.287 +   correspond to the used size of the replaced element according to the
   1.288 +   ‘<code class=css>auto</code>’ width and height calculations.
   1.289  
   1.290    <h3 class=no-num id=multicol-intrinsic> Intrinsic Sizes in Multi-column
   1.291     Layout</h3>
     2.1 --- a/css3-writing-modes/Overview.src.html	Wed Aug 01 12:12:01 2012 -0700
     2.2 +++ b/css3-writing-modes/Overview.src.html	Thu Aug 02 15:09:24 2012 -0700
     2.3 @@ -237,7 +237,7 @@
     2.4      <a href="#bidi-isolate"><i>bidi-isolated</i></a> inline element also forms a <i>bidi paragraph</i>.
     2.5  
     2.6    <p>Two CSS properties, 'direction' and 'unicode-bidi',
     2.7 -    provide explicit embedding and override controls in the CSS layer.
     2.8 +    provide explicit embedding, isolation, and override controls in the CSS layer.
     2.9      Because the base directionality of a text depends on the structure and
    2.10      semantics of the document, the 'direction' and 'unicode-bidi' properties
    2.11      should in most cases be used only to map bidi information in the markup
    2.12 @@ -247,18 +247,13 @@
    2.13      specify CSS rules to override them.</p>
    2.14  
    2.15    <p>In general, the paragraph embedding level is set according to
    2.16 -    the 'direction' property of the element <i>immediately containing</i> the paragraph
    2.17 +    the 'direction' property of the paragraph's containing block
    2.18      rather than by the heuristic given in steps P2 and P3 of the Unicode algorithm. [[!UAX9]]
    2.19 -    When the computed 'unicode-bidi' of the element <i>immediately containing</i> the paragraph is ''plaintext'',
    2.20 -    however, the Unicode heuristics are used instead.
    2.21 -    An element <dfn id=bidi-contains>immediately contains</dfn> a bidi paragraph
    2.22 -    if the element itself, but none of its descendants,
    2.23 -    both contains the entire bidi paragraph
    2.24 -    and is a block container or <a href="#bidi-isolate"><i>bidi-isolating</i></a> inline.
    2.25 +    When the computed 'unicode-bidi' of the paragraph's containing block is ''plaintext'',
    2.26 +    however, the Unicode heuristics (rules P2 and P3) are used instead.
    2.27  
    2.28    <p>The HTML specifications ([[HTML401]], section 8.2, and [[HTML5]], section 10.3.5) define
    2.29 -    bidirectionality behavior for HTML elements. The HTML 4 specification
    2.30 -    also contains more information on bidirectionality issues.</p>
    2.31 +    bidirectionality behavior for HTML elements.</p>
    2.32  
    2.33    <p class="note">Because HTML UAs can turn off CSS styling, we advise HTML 
    2.34      authors to use the HTML 'dir' attribute and &lt;bdo&gt; element to
    2.35 @@ -305,8 +300,8 @@
    2.36    </table>
    2.37  
    2.38    <p>This property specifies the inline base direction or directionality
    2.39 -    of any bidi paragraph, embedding, or override established by the element.
    2.40 -    (See 'unicode-bidi')
    2.41 +    of any bidi paragraph, embedding, isolate, or override established by the element.
    2.42 +    (See 'unicode-bidi'.) <!-- except plaintext -->
    2.43      In addition, it informs the ordering of
    2.44      <a href="http://www.w3.org/TR/CSS21/tables.html">table</a> column layout,
    2.45      the direction of horizontal <a href="http://www.w3.org/TR/CSS21/visufx.html#overflow">overflow</a>,
    2.46 @@ -383,8 +378,9 @@
    2.47  
    2.48    <p>Normally (i.e. when 'unicode-bidi' is ''normal'')
    2.49      an inline element is transparent to the unicode bidi algorithm;
    2.50 -    content is ordered as if the element boundaries were not there.
    2.51 -    The 'unicode-bidi' property allows inline elements to create scopes within the algorithm,
    2.52 +    content is ordered as if the element's boundaries were not there.
    2.53 +    Other values of the 'unicode-bidi' property cause inline elements
    2.54 +    to create scopes within the algorithm,
    2.55      and to override the intrinsic directionality of text.
    2.56  
    2.57    <p>The following informative table summarizes the element-internal and
    2.58 @@ -422,8 +418,8 @@
    2.59        respect to the bidirectional algorithm. For inline elements,
    2.60        implicit reordering works across element boundaries.</dd>
    2.61      <dt><dfn>embed</dfn></dt>
    2.62 -    <dd>If the element is inline, this value opens an additional level
    2.63 -      of embedding with respect to the bidirectional algorithm.
    2.64 +    <dd>If the element is inline, this value creates a <dfn>directional embedding</dfn>
    2.65 +      by opening an additional level of embedding with respect to the bidirectional algorithm.
    2.66        The direction of this embedding level is given by the 'direction'
    2.67        property. Inside the element, reordering is done implicitly. This
    2.68        corresponds to adding a LRE (U+202A), for 'direction: ltr', or RLE
    2.69 @@ -432,26 +428,41 @@
    2.70        <span class="note">This value has no effect on elements that are
    2.71        not inline.</span></dd>
    2.72      <dt><dfn>isolate</dfn></dt>
    2.73 -    <dd>On an inline element, this <dfn id=bidi-isolate title="bidi-isolate|bidi isolation|isolation">bidi-isolates</dfn> its contents:
    2.74 -      for the purpose of bidi resolution in its containing bidi paragraph (if any),
    2.75 -      the element is treated as if it were an Object Replacement Character (U+FFFC).
    2.76 -      (If the element is broken across multiple lines, then each box
    2.77 -      of the element is treated as an Object Replacement Character.)
    2.78 -      Within the element, its contents are considered,
    2.79 -      for the purposes of bidi resolution,
    2.80 -      to be inside a separate, independent document
    2.81 -      whose <i>bidi paragraphs</i> are assigned the base directionality
    2.82 -      specified by the element's 'direction' property.</dd>
    2.83 +    <dd>On an inline element, this <dfn id=bidi-isolate title="bidi-isolate|bidi isolation|isolation">bidi-isolates</dfn> its contents.
    2.84 +      This is similar to a directional embedding (and increases the embedding level accordingly)
    2.85 +      except that each sequence of inline-level boxes
    2.86 +      uninterrupted by any block boundary or <i>forced paragraph break</i>
    2.87 +      is treated as an <dfn>isolated sequence<dfn>:
    2.88 +      <ul>
    2.89 +        <li>the content within the sequence is ordered
    2.90 +          as if inside an independent paragraph
    2.91 +          with the base directionality specified by the element's 'direction' property.
    2.92 +        <li>for the purpose of bidi resolution in its containing bidi paragraph,
    2.93 +          the sequence is treated as if it were a single Object Replacement Character (U+FFFC).
    2.94 +      </ul>
    2.95 +      In effect, neither is the content inside the element bidi-affected
    2.96 +      by the content surrounding the element,
    2.97 +      nor is the content surrounding the element bidi-affected by the
    2.98 +      content or specified directionality of the element.
    2.99 +      However, <i>forced paragraph breaks</i> within the element still create
   2.100 +      a corresponding break in the containing paragraph.
   2.101 +      <p class="note">In Unicode 7.0 and beyond,
   2.102 +      this will correspond to adding an LRI (U+2066), for ''direction: ltr'',
   2.103 +      or RLI (U+2067), for ''direction: rtl'', at the start of the element,
   2.104 +      and a PDI (U+2069) at the end of the element.
   2.105 +      <p class="note">This value has no effect on elements that are not inline.</span>
   2.106      <dt><dfn>bidi-override</dfn></dt>
   2.107 -    <dd>For inline elements this creates an <dfn>override</dfn>.
   2.108 -      (For block-container elements this creates an <i>override</i>
   2.109 -      for inline-level descendants not within another block container element.)
   2.110 -      This means that inside the element,
   2.111 -      reordering is strictly in sequence according to the
   2.112 +    <dd>This value puts the element's immediate content in a <dfn>directional override</dfn>.
   2.113 +      For an inline, this means that the element acts like a <i>directional embedding</i>
   2.114 +      in the bidirectional algorithm,
   2.115 +      except that reordering within it is strictly in sequence according to the
   2.116        'direction' property; the implicit part of the bidirectional algorithm
   2.117        is ignored. This corresponds to adding a LRO (U+202D), for ''direction:
   2.118        ltr'', or RLO (U+202E), for ''direction: rtl'', at the start of the
   2.119 -      element and a PDF (U+202C) at the end of the element.</dd>
   2.120 +      element and a PDF (U+202C) at the end of the element.
   2.121 +      If the element is a block container,
   2.122 +      the override is applied to an anonymous inline element
   2.123 +      that surrounds all of its content.</dd>
   2.124      <dt><dfn>isolate-override<dfn></dt>
   2.125      <dd>This combines the <i>isolation</i> behavior of ''isolate'' with the
   2.126        <i>override</i> behavior of ''bidi-override'': to surrounding content,
   2.127 @@ -460,9 +471,14 @@
   2.128      <dt><dfn>plaintext</dfn></dt>
   2.129      <dd><p>This value behaves as ''isolate'' except that for the purposes of
   2.130        the Unicode bidirectional algorithm, the base directionality of each
   2.131 -      of the element's <i>bidi paragraphs</i> is determined by following the
   2.132 -      heuristic in rules P2 and P3 of the Unicode bidirectional algorithm
   2.133 +      of the element's <i>bidi paragraphs</i> (if a block container)
   2.134 +      or <i>isolated sequences</i> (if an inline)
   2.135 +      is determined by following the heuristic in rules P2 and P3
   2.136 +      of the Unicode bidirectional algorithm
   2.137        (rather than by using the 'direction' property of the element).
   2.138 +      <p class="note">In Unicode 7.0 and beyond, for inline elements
   2.139 +      this will correspond to adding an FSI (U+2068) at the start of the element,
   2.140 +      and a PDI (U+2069) at the end of the element.
   2.141    </dl>
   2.142  
   2.143    <p class=note>Because the 'unicode-bidi' property does not inherit,
   2.144 @@ -492,13 +508,23 @@
   2.145  
   2.146    <p>If an inline element is broken around a <i>bidi paragraph</i>
   2.147      boundary (e.g. if split by a block or <i>forced paragraph break</i>), then
   2.148 -    the bidi control codes corresponding to the end of the element are
   2.149 -    added before the interruption and the codes corresponding to the
   2.150 +    the bidi control codes assigned to the end of the element
   2.151 +    are added before the interruption and the codes assigned to the
   2.152      start of the element are added after it. (In other words, any embedding
   2.153      levels or overrides started by the element are closed at the paragraph
   2.154      break and reopened on the other side of it.)
   2.155  
   2.156 -  <p>Because the Unicode algorithm has a limit of 61 levels of embedding,
   2.157 +  <div class="example">
   2.158 +    <p>For example, where &lt;BR/&gt; is a <i>forced paragraph break</i>
   2.159 +    the bidi ordering is identical between
   2.160 +    <pre>&lt;para>...&lt;i1>&lt;i2>...&lt;BR/>...&lt;/i2>&lt;i1>...&lt;/para></pre>
   2.161 +    <p>and
   2.162 +    <pre>&lt;para>...&lt;i1>&lt;i2>...&lt;/i2>&lt;i1>&lt;BR/>&lt;i1>&lt;i2>...&lt;/i2>&lt;i1>...&lt;/para></pre>
   2.163 +    <p>for all values of 'unicode-bidi' on inline elements &lt;i1&gt; and &lt;i2&gt;.
   2.164 +  </div>
   2.165 +
   2.166 +  <p class="note">
   2.167 +    Because the Unicode algorithm has a limit of 61 levels of embedding,
   2.168      care should be taken not to use 'unicode-bidi'
   2.169      with a value other than 'normal' unless appropriate.
   2.170      In particular, a value of ''inherit''

mercurial