[html5] r8283 - [cgiow] (3) Change how dir='' works, from being an embedding to being an overrid [...]

whatwg at whatwg.org whatwg at whatwg.org
Thu Nov 14 14:20:00 PST 2013


Author: ianh
Date: 2013-11-14 14:19:58 -0800 (Thu, 14 Nov 2013)
New Revision: 8283

Modified:
   complete.html
   index
   source
Log:
[cgiow] (3) Change how dir='' works, from being an embedding to being an override, for better results on mixed-directionality sites. THIS IS A HIGH RISK CHANGE, EXPECT BREAKAGE. Please report breakage on the bug if it's higher than acceptable, so we can revert the change if necessary.
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=23260
Affected topics: HTML, Rendering

Modified: complete.html
===================================================================
--- complete.html	2013-11-13 22:45:38 UTC (rev 8282)
+++ complete.html	2013-11-14 22:19:58 UTC (rev 8283)
@@ -298,7 +298,7 @@
 
   <header class=head id=head><p><a href=http://www.whatwg.org/ class=logo><img width=101 src=/images/logo alt=WHATWG height=101></a></p>
    <hgroup><h1 class=allcaps>HTML</h1>
-    <h2 class="no-num no-toc">Living Standard — Last Updated 13 November 2013</h2>
+    <h2 class="no-num no-toc">Living Standard — Last Updated 14 November 2013</h2>
    </hgroup><dl><dt><strong>Web developer edition:</strong></dt>
     <dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
     <dt>Multiple-page version:</dt>
@@ -10748,8 +10748,9 @@
 
    <dd>
 
+<!--CLEANUP-->
     <p>Indicates that the contents of the element are explicitly
-    directionally embedded left-to-right text.</p>
+    directionally isolated left-to-right text.</p>
 
    </dd>
 
@@ -10757,8 +10758,9 @@
 
    <dd>
 
+<!--CLEANUP-->
     <p>Indicates that the contents of the element are explicitly
-    directionally embedded right-to-left text.</p>
+    directionally isolated right-to-left text.</p>
 
    </dd>
 
@@ -10766,7 +10768,8 @@
 
    <dd>
 
-    <p>Indicates that the contents of the element are explicitly embedded text, but that the
+<!--CLEANUP-->
+    <p>Indicates that the contents of the element are explicitly directionally isolated text, but that the
     direction is to be determined programmatically using the contents of the element (as described
     below).</p>
 
@@ -10882,6 +10885,19 @@
   directionality">directionality</a> from their parent element, or, if they don't have one,
   default to '<a href=#concept-ltr title=concept-ltr>ltr</a>'.</p>
 
+  <p>For the purposes of applying the bidirectional algorithm to the contents of elements with a
+  <code title=attr-dir><a href=#the-dir-attribute>dir</a></code> attribute that is in one of the states defined above, user
+  agents must treat the element as an independent and isolated segment.</p>
+
+  <p>For the purposes of applying the bidirectional algorithm to the paragraph-level container that
+  a such an element finds itself within, the element must be treated like a U+FFFC OBJECT
+  REPLACEMENT CHARACTER (in the same manner that an image or other inline object is handled).</p>
+
+  <p>The requirements on handling such elements for the bidirectional algorithm may be implemented
+  indirectly through the style layer. For example, the rendering section in this specification
+  defines a mapping from the <code title=attr-dir><a href=#the-dir-attribute>dir</a></code> attribute to the CSS 'direction' and
+  'unicode-bidi' properties, and CSS defines rendering in terms of those properties.</p>
+
   <hr><p>The <dfn id=directionality-of-the-attribute title="directionality of the attribute">directionality of an attribute</dfn> of an
   <a href=#html-elements title="HTML elements">HTML element</a>, which is used when the text of that attribute is
   to be included in the rendering in some manner, is determined as per the first appropriate set of
@@ -10923,11 +10939,7 @@
    <li><code title="">placeholder</code> on <code title=attr-input-placeholder><a href=#attr-input-placeholder>input</a></code> and
                                             <code title=attr-textarea-placeholder><a href=#attr-textarea-placeholder>textarea</a></code> elements</li>
    <li><code title=attr-title><a href=#attr-title>title</a></code> on all <a href=#html-elements>HTML elements</a> elements</li>
-  </ul><hr><p>The effect of this attribute is primarily on the presentation layer. For example, the rendering
-  section in this specification defines a mapping from this attribute to the CSS 'direction' and
-  'unicode-bidi' properties, and CSS defines rendering in terms of those properties.</p>
-
-  <hr><dl class=domintro><dt><var title="">document</var> . <code title=dom-dir><a href=#dom-dir>dir</a></code> [ = <var title="">value</var> ]</dt>
+  </ul><hr><dl class=domintro><dt><var title="">document</var> . <code title=dom-dir><a href=#dom-dir>dir</a></code> [ = <var title="">value</var> ]</dt>
    <dd>
     <p>Returns <a href=#the-html-element-0>the <code>html</code> element</a>'s <code title=attr-dir><a href=#the-dir-attribute>dir</a></code> attribute's value, if any.</p>
     <p>Can be set, to either "<code title="">ltr</code>", "<code title="">rtl</code>", or "<code title="">auto</code>" to replace <a href=#the-html-element-0>the <code>html</code> element</a>'s <code title=attr-dir><a href=#the-dir-attribute>dir</a></code> attribute's value.</p>
@@ -16142,6 +16154,7 @@
  <p>Cooking is done by the chefs on a set rotation.</p>
 </section></pre>
 
+<!--CLEANUP-->
    <p>There is no need for an <code><a href=#the-hr-element>hr</a></code> element between the
    sections themselves, since the <code><a href=#the-section-element>section</a></code> elements and
    the <code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h1</a></code> elements imply thematic changes themselves.</p>
@@ -16203,7 +16216,7 @@
   // <a href="#HTMLPreElement-partial">also has obsolete members</a>
 };</pre>
    </dd>
-  </dl><!--TOPIC:HTML--><p>The <code><a href=#the-pre-element>pre</a></code> element <a href=#represents>represents</a> a block of
+  </dl><!--TOPIC:HTML--><!--CLEANUP--><p>The <code><a href=#the-pre-element>pre</a></code> element <a href=#represents>represents</a> a block of
   preformatted text, in which structure is represented by typographic
   conventions rather than by elements.</p>
 
@@ -19839,18 +19852,20 @@
   explicitly specifying a direction override. <a href=#refsBIDI>[BIDI]</a></p>
 
   <p>Authors must specify the <code title=attr-dir><a href=#the-dir-attribute>dir</a></code> attribute on this element, with the
-  value <code>ltr</code> to specify a left-to-right override and with the value <code>rtl</code> to
-  specify a right-to-left override.</p>
+  value <code title=attr-dir-ltr><a href=#attr-dir-ltr>ltr</a></code> to specify a left-to-right override and with the value <code title=attr-dir-rtl><a href=#attr-dir-rtl>rtl</a></code> to
+  specify a right-to-left override. The <code title=attr-dir-auto><a href=#attr-dir-auto>auto</a></code> value must not be specified.</p>
 
   <div class=impl>
 
-  <p>If the element's <code title=attr-dir><a href=#the-dir-attribute>dir</a></code> attribute is in the <i title=attr-dir-rtl-state><a href=#attr-dir-rtl-state>rtl</a></i> state, then for the purposes of the bidirectional algorithm,
-  the user agent must act as if there was a U+202D LEFT-TO-RIGHT OVERRIDE character at the start of
-  the element, and a U+202C POP DIRECTIONAL FORMATTING at the end of the element.</p>
+<!--CLEANUP-->
+  <p>If the element's <a href=#the-directionality title="the directionality">directionality</a> is '<a href=#concept-ltr title=concept-ltr>ltr</a>', then for the purposes of the bidirectional algorithm,
+  the user agent must act as if there was a U+2066 LEFT-TO-RIGHT ISOLATE character at the start of
+  the element, and a U+2069 POP DIRECTIONAL ISOLATE character at the end of the element.</p>
 
-  <p>If the element's <code title=attr-dir><a href=#the-dir-attribute>dir</a></code> attribute is in the <i title=attr-dir-ltr-state><a href=#attr-dir-ltr-state>ltr</a></i>, then for the purposes of the bidirectional algorithm, the user
-  agent must act as if there was a U+202E RIGHT-TO-LEFT OVERRIDE character at the start of the
-  element, and a U+202C POP DIRECTIONAL FORMATTING at the end of the element.</p>
+<!--CLEANUP-->
+  <p>If the element's <a href=#the-directionality title="the directionality">directionality</a> is '<a href=#concept-rtl title=concept-rtl>rtl</a>', then for the purposes of the bidirectional algorithm, the user
+  agent must act as if there was a U+2067 RIGHT-TO-LEFT ISOLATE character at the start of the
+  element, and a U+2069 POP DIRECTIONAL ISOLATE character at the end of the element.</p>
 
   <p>The requirements on handling the <code><a href=#the-bdo-element>bdo</a></code> element for the bidirectional algorithm may
   be implemented indirectly through the style layer. For example, an HTML+CSS user agent could
@@ -93385,29 +93400,12 @@
 header, hr, legend, listing, main, p, plaintext, pre, summary, xmp, article,
 aside, h1, h2, h3, h4, h5, h6, hgroup, nav, section, table, caption,
 colgroup, col, thead, tbody, tfoot, tr, td, th, dir, dd, dl, dt, menu,
-ol, ul, li {
-  unicode-bidi: isolate;<!-- basically anything that is display:block-like -->
+ol, ul, li, bdi, output, [dir=ltr i], [dir=rtl i], [dir=auto i] {
+  unicode-bidi: isolate; <!-- anything that's similar to display:block, plus <bdi>, <output>, and dir="" -->
 }
 
-:matches([dir=ltr i], [dir=rtl i], [dir=auto i]):not(address):not(blockquote
-):not(center):not(div):not(figure):not(figcaption):not(footer):not(form
-):not(header):not(hr):not(legend):not(listing):not(main):not(p):not(plaintext):not(pre
-):not(summary):not(xmp):not(article):not(aside):not(h1):not(h2):not(h3):not(h4
-):not(h5):not(h6):not(hgroup):not(nav):not(section):not(table):not(caption
-):not(colgroup):not(col):not(thead):not(tbody):not(tfoot):not(tr):not(td
-):not(th):not(dir):not(dd):not(dl):not(dt):not(menu):not(ol):not(ul):not(li) {
-  unicode-bidi: embed;
-}
+bdo { unicode-bidi: isolate-override; }
 
-bdi, bdi:matches([dir=ltr i], [dir=rtl i]),
-output, output:matches([dir=ltr i], [dir=rtl i]),
-[dir=auto i] {
-  unicode-bidi: isolate;
-}
-
-bdo, bdo:matches([dir=ltr i], [dir=rtl i]) { unicode-bidi: bidi-override; }
-bdo[dir=auto i] { unicode-bidi: isolate-override; }
-
 textarea[dir=auto i], pre[dir=auto i] { unicode-bidi: plaintext; }</pre>
 
   <p>Input fields (i.e. <code><a href=#the-textarea-element>textarea</a></code> elements, and <code><a href=#the-input-element>input</a></code> elements when their

Modified: index
===================================================================
--- index	2013-11-13 22:45:38 UTC (rev 8282)
+++ index	2013-11-14 22:19:58 UTC (rev 8283)
@@ -298,7 +298,7 @@
 
   <header class=head id=head><p><a href=http://www.whatwg.org/ class=logo><img width=101 src=/images/logo alt=WHATWG height=101></a></p>
    <hgroup><h1 class=allcaps>HTML</h1>
-    <h2 class="no-num no-toc">Living Standard — Last Updated 13 November 2013</h2>
+    <h2 class="no-num no-toc">Living Standard — Last Updated 14 November 2013</h2>
    </hgroup><dl><dt><strong>Web developer edition:</strong></dt>
     <dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
     <dt>Multiple-page version:</dt>
@@ -10748,8 +10748,9 @@
 
    <dd>
 
+<!--CLEANUP-->
     <p>Indicates that the contents of the element are explicitly
-    directionally embedded left-to-right text.</p>
+    directionally isolated left-to-right text.</p>
 
    </dd>
 
@@ -10757,8 +10758,9 @@
 
    <dd>
 
+<!--CLEANUP-->
     <p>Indicates that the contents of the element are explicitly
-    directionally embedded right-to-left text.</p>
+    directionally isolated right-to-left text.</p>
 
    </dd>
 
@@ -10766,7 +10768,8 @@
 
    <dd>
 
-    <p>Indicates that the contents of the element are explicitly embedded text, but that the
+<!--CLEANUP-->
+    <p>Indicates that the contents of the element are explicitly directionally isolated text, but that the
     direction is to be determined programmatically using the contents of the element (as described
     below).</p>
 
@@ -10882,6 +10885,19 @@
   directionality">directionality</a> from their parent element, or, if they don't have one,
   default to '<a href=#concept-ltr title=concept-ltr>ltr</a>'.</p>
 
+  <p>For the purposes of applying the bidirectional algorithm to the contents of elements with a
+  <code title=attr-dir><a href=#the-dir-attribute>dir</a></code> attribute that is in one of the states defined above, user
+  agents must treat the element as an independent and isolated segment.</p>
+
+  <p>For the purposes of applying the bidirectional algorithm to the paragraph-level container that
+  a such an element finds itself within, the element must be treated like a U+FFFC OBJECT
+  REPLACEMENT CHARACTER (in the same manner that an image or other inline object is handled).</p>
+
+  <p>The requirements on handling such elements for the bidirectional algorithm may be implemented
+  indirectly through the style layer. For example, the rendering section in this specification
+  defines a mapping from the <code title=attr-dir><a href=#the-dir-attribute>dir</a></code> attribute to the CSS 'direction' and
+  'unicode-bidi' properties, and CSS defines rendering in terms of those properties.</p>
+
   <hr><p>The <dfn id=directionality-of-the-attribute title="directionality of the attribute">directionality of an attribute</dfn> of an
   <a href=#html-elements title="HTML elements">HTML element</a>, which is used when the text of that attribute is
   to be included in the rendering in some manner, is determined as per the first appropriate set of
@@ -10923,11 +10939,7 @@
    <li><code title="">placeholder</code> on <code title=attr-input-placeholder><a href=#attr-input-placeholder>input</a></code> and
                                             <code title=attr-textarea-placeholder><a href=#attr-textarea-placeholder>textarea</a></code> elements</li>
    <li><code title=attr-title><a href=#attr-title>title</a></code> on all <a href=#html-elements>HTML elements</a> elements</li>
-  </ul><hr><p>The effect of this attribute is primarily on the presentation layer. For example, the rendering
-  section in this specification defines a mapping from this attribute to the CSS 'direction' and
-  'unicode-bidi' properties, and CSS defines rendering in terms of those properties.</p>
-
-  <hr><dl class=domintro><dt><var title="">document</var> . <code title=dom-dir><a href=#dom-dir>dir</a></code> [ = <var title="">value</var> ]</dt>
+  </ul><hr><dl class=domintro><dt><var title="">document</var> . <code title=dom-dir><a href=#dom-dir>dir</a></code> [ = <var title="">value</var> ]</dt>
    <dd>
     <p>Returns <a href=#the-html-element-0>the <code>html</code> element</a>'s <code title=attr-dir><a href=#the-dir-attribute>dir</a></code> attribute's value, if any.</p>
     <p>Can be set, to either "<code title="">ltr</code>", "<code title="">rtl</code>", or "<code title="">auto</code>" to replace <a href=#the-html-element-0>the <code>html</code> element</a>'s <code title=attr-dir><a href=#the-dir-attribute>dir</a></code> attribute's value.</p>
@@ -16142,6 +16154,7 @@
  <p>Cooking is done by the chefs on a set rotation.</p>
 </section></pre>
 
+<!--CLEANUP-->
    <p>There is no need for an <code><a href=#the-hr-element>hr</a></code> element between the
    sections themselves, since the <code><a href=#the-section-element>section</a></code> elements and
    the <code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h1</a></code> elements imply thematic changes themselves.</p>
@@ -16203,7 +16216,7 @@
   // <a href="#HTMLPreElement-partial">also has obsolete members</a>
 };</pre>
    </dd>
-  </dl><!--TOPIC:HTML--><p>The <code><a href=#the-pre-element>pre</a></code> element <a href=#represents>represents</a> a block of
+  </dl><!--TOPIC:HTML--><!--CLEANUP--><p>The <code><a href=#the-pre-element>pre</a></code> element <a href=#represents>represents</a> a block of
   preformatted text, in which structure is represented by typographic
   conventions rather than by elements.</p>
 
@@ -19839,18 +19852,20 @@
   explicitly specifying a direction override. <a href=#refsBIDI>[BIDI]</a></p>
 
   <p>Authors must specify the <code title=attr-dir><a href=#the-dir-attribute>dir</a></code> attribute on this element, with the
-  value <code>ltr</code> to specify a left-to-right override and with the value <code>rtl</code> to
-  specify a right-to-left override.</p>
+  value <code title=attr-dir-ltr><a href=#attr-dir-ltr>ltr</a></code> to specify a left-to-right override and with the value <code title=attr-dir-rtl><a href=#attr-dir-rtl>rtl</a></code> to
+  specify a right-to-left override. The <code title=attr-dir-auto><a href=#attr-dir-auto>auto</a></code> value must not be specified.</p>
 
   <div class=impl>
 
-  <p>If the element's <code title=attr-dir><a href=#the-dir-attribute>dir</a></code> attribute is in the <i title=attr-dir-rtl-state><a href=#attr-dir-rtl-state>rtl</a></i> state, then for the purposes of the bidirectional algorithm,
-  the user agent must act as if there was a U+202D LEFT-TO-RIGHT OVERRIDE character at the start of
-  the element, and a U+202C POP DIRECTIONAL FORMATTING at the end of the element.</p>
+<!--CLEANUP-->
+  <p>If the element's <a href=#the-directionality title="the directionality">directionality</a> is '<a href=#concept-ltr title=concept-ltr>ltr</a>', then for the purposes of the bidirectional algorithm,
+  the user agent must act as if there was a U+2066 LEFT-TO-RIGHT ISOLATE character at the start of
+  the element, and a U+2069 POP DIRECTIONAL ISOLATE character at the end of the element.</p>
 
-  <p>If the element's <code title=attr-dir><a href=#the-dir-attribute>dir</a></code> attribute is in the <i title=attr-dir-ltr-state><a href=#attr-dir-ltr-state>ltr</a></i>, then for the purposes of the bidirectional algorithm, the user
-  agent must act as if there was a U+202E RIGHT-TO-LEFT OVERRIDE character at the start of the
-  element, and a U+202C POP DIRECTIONAL FORMATTING at the end of the element.</p>
+<!--CLEANUP-->
+  <p>If the element's <a href=#the-directionality title="the directionality">directionality</a> is '<a href=#concept-rtl title=concept-rtl>rtl</a>', then for the purposes of the bidirectional algorithm, the user
+  agent must act as if there was a U+2067 RIGHT-TO-LEFT ISOLATE character at the start of the
+  element, and a U+2069 POP DIRECTIONAL ISOLATE character at the end of the element.</p>
 
   <p>The requirements on handling the <code><a href=#the-bdo-element>bdo</a></code> element for the bidirectional algorithm may
   be implemented indirectly through the style layer. For example, an HTML+CSS user agent could
@@ -93385,29 +93400,12 @@
 header, hr, legend, listing, main, p, plaintext, pre, summary, xmp, article,
 aside, h1, h2, h3, h4, h5, h6, hgroup, nav, section, table, caption,
 colgroup, col, thead, tbody, tfoot, tr, td, th, dir, dd, dl, dt, menu,
-ol, ul, li {
-  unicode-bidi: isolate;<!-- basically anything that is display:block-like -->
+ol, ul, li, bdi, output, [dir=ltr i], [dir=rtl i], [dir=auto i] {
+  unicode-bidi: isolate; <!-- anything that's similar to display:block, plus <bdi>, <output>, and dir="" -->
 }
 
-:matches([dir=ltr i], [dir=rtl i], [dir=auto i]):not(address):not(blockquote
-):not(center):not(div):not(figure):not(figcaption):not(footer):not(form
-):not(header):not(hr):not(legend):not(listing):not(main):not(p):not(plaintext):not(pre
-):not(summary):not(xmp):not(article):not(aside):not(h1):not(h2):not(h3):not(h4
-):not(h5):not(h6):not(hgroup):not(nav):not(section):not(table):not(caption
-):not(colgroup):not(col):not(thead):not(tbody):not(tfoot):not(tr):not(td
-):not(th):not(dir):not(dd):not(dl):not(dt):not(menu):not(ol):not(ul):not(li) {
-  unicode-bidi: embed;
-}
+bdo { unicode-bidi: isolate-override; }
 
-bdi, bdi:matches([dir=ltr i], [dir=rtl i]),
-output, output:matches([dir=ltr i], [dir=rtl i]),
-[dir=auto i] {
-  unicode-bidi: isolate;
-}
-
-bdo, bdo:matches([dir=ltr i], [dir=rtl i]) { unicode-bidi: bidi-override; }
-bdo[dir=auto i] { unicode-bidi: isolate-override; }
-
 textarea[dir=auto i], pre[dir=auto i] { unicode-bidi: plaintext; }</pre>
 
   <p>Input fields (i.e. <code><a href=#the-textarea-element>textarea</a></code> elements, and <code><a href=#the-input-element>input</a></code> elements when their

Modified: source
===================================================================
--- source	2013-11-13 22:45:38 UTC (rev 8282)
+++ source	2013-11-14 22:19:58 UTC (rev 8283)
@@ -10670,8 +10670,9 @@
 
    <dd>
 
+<!--CLEANUP-->
     <p>Indicates that the contents of the element are explicitly
-    directionally embedded left-to-right text.</p>
+    directionally isolated left-to-right text.</p>
 
    </dd>
 
@@ -10679,8 +10680,9 @@
 
    <dd>
 
+<!--CLEANUP-->
     <p>Indicates that the contents of the element are explicitly
-    directionally embedded right-to-left text.</p>
+    directionally isolated right-to-left text.</p>
 
    </dd>
 
@@ -10688,7 +10690,8 @@
 
    <dd>
 
-    <p>Indicates that the contents of the element are explicitly embedded text, but that the
+<!--CLEANUP-->
+    <p>Indicates that the contents of the element are explicitly directionally isolated text, but that the
     direction is to be determined programmatically using the contents of the element (as described
     below).</p>
 
@@ -10835,6 +10838,19 @@
   directionality">directionality</span> from their parent element, or, if they don't have one,
   default to '<span data-x="concept-ltr">ltr</span>'.</p>
 
+  <p>For the purposes of applying the bidirectional algorithm to the contents of elements with a
+  <code data-x="attr-dir">dir</code> attribute that is in one of the states defined above, user
+  agents must treat the element as an independent and isolated segment.</p>
+
+  <p>For the purposes of applying the bidirectional algorithm to the paragraph-level container that
+  a such an element finds itself within, the element must be treated like a U+FFFC OBJECT
+  REPLACEMENT CHARACTER (in the same manner that an image or other inline object is handled).</p>
+
+  <p>The requirements on handling such elements for the bidirectional algorithm may be implemented
+  indirectly through the style layer. For example, the rendering section in this specification
+  defines a mapping from the <code data-x="attr-dir">dir</code> attribute to the CSS 'direction' and
+  'unicode-bidi' properties, and CSS defines rendering in terms of those properties.</p>
+
   <hr>
 
   <p>The <dfn data-x="directionality of the attribute">directionality of an attribute</dfn> of an
@@ -10889,12 +10905,6 @@
 
   <hr>
 
-  <p>The effect of this attribute is primarily on the presentation layer. For example, the rendering
-  section in this specification defines a mapping from this attribute to the CSS 'direction' and
-  'unicode-bidi' properties, and CSS defines rendering in terms of those properties.</p>
-
-  <hr>
-
   <dl class="domintro">
 
    <dt><var data-x="">document</var> . <code data-x="dom-dir">dir</code> [ = <var data-x="">value</var> ]</dt>
@@ -16821,6 +16831,7 @@
  <p>Cooking is done by the chefs on a set rotation.</p>
 </section></pre>
 
+<!--CLEANUP-->
    <p>There is no need for an <code>hr</code> element between the
    sections themselves, since the <code>section</code> elements and
    the <code>h1</code> elements imply thematic changes themselves.</p>
@@ -16881,6 +16892,7 @@
    </dd>
   </dl><!--TOPIC:HTML-->
 
+<!--CLEANUP-->
   <p>The <code>pre</code> element <span>represents</span> a block of
   preformatted text, in which structure is represented by typographic
   conventions rather than by elements.</p>
@@ -20688,20 +20700,22 @@
   explicitly specifying a direction override. <a href="#refsBIDI">[BIDI]</a></p>
 
   <p>Authors must specify the <code data-x="attr-dir">dir</code> attribute on this element, with the
-  value <code>ltr</code> to specify a left-to-right override and with the value <code>rtl</code> to
-  specify a right-to-left override.</p>
+  value <code data-x="attr-dir-ltr">ltr</code> to specify a left-to-right override and with the value <code data-x="attr-dir-rtl">rtl</code> to
+  specify a right-to-left override. The <code data-x="attr-dir-auto">auto</code> value must not be specified.</p>
 
   <div class="impl">
 
-  <p>If the element's <code data-x="attr-dir">dir</code> attribute is in the <i
-  data-x="attr-dir-rtl-state">rtl</i> state, then for the purposes of the bidirectional algorithm,
-  the user agent must act as if there was a U+202D LEFT-TO-RIGHT OVERRIDE character at the start of
-  the element, and a U+202C POP DIRECTIONAL FORMATTING at the end of the element.</p>
+<!--CLEANUP-->
+  <p>If the element's <span data-x="the directionality">directionality</span> is '<span
+  data-x="concept-ltr">ltr</span>', then for the purposes of the bidirectional algorithm,
+  the user agent must act as if there was a U+2066 LEFT-TO-RIGHT ISOLATE character at the start of
+  the element, and a U+2069 POP DIRECTIONAL ISOLATE character at the end of the element.</p>
 
-  <p>If the element's <code data-x="attr-dir">dir</code> attribute is in the <i
-  data-x="attr-dir-ltr-state">ltr</i>, then for the purposes of the bidirectional algorithm, the user
-  agent must act as if there was a U+202E RIGHT-TO-LEFT OVERRIDE character at the start of the
-  element, and a U+202C POP DIRECTIONAL FORMATTING at the end of the element.</p>
+<!--CLEANUP-->
+  <p>If the element's <span data-x="the directionality">directionality</span> is '<span
+  data-x="concept-rtl">rtl</span>', then for the purposes of the bidirectional algorithm, the user
+  agent must act as if there was a U+2067 RIGHT-TO-LEFT ISOLATE character at the start of the
+  element, and a U+2069 POP DIRECTIONAL ISOLATE character at the end of the element.</p>
 
   <p>The requirements on handling the <code>bdo</code> element for the bidirectional algorithm may
   be implemented indirectly through the style layer. For example, an HTML+CSS user agent could
@@ -104069,29 +104083,12 @@
 header, hr, legend, listing, main, p, plaintext, pre, summary, xmp, article,
 aside, h1, h2, h3, h4, h5, h6, hgroup, nav, section, table, caption,
 colgroup, col, thead, tbody, tfoot, tr, td, th, dir, dd, dl, dt, menu,
-ol, ul, li {
-  unicode-bidi: isolate;<!-- basically anything that is display:block-like -->
+ol, ul, li, bdi, output, [dir=ltr i], [dir=rtl i], [dir=auto i] {
+  unicode-bidi: isolate; <!-- anything that's similar to display:block, plus <bdi>, <output>, and dir="" -->
 }
 
-:matches([dir=ltr i], [dir=rtl i], [dir=auto i]):not(address):not(blockquote
-):not(center):not(div):not(figure):not(figcaption):not(footer):not(form
-):not(header):not(hr):not(legend):not(listing):not(main):not(p):not(plaintext):not(pre
-):not(summary):not(xmp):not(article):not(aside):not(h1):not(h2):not(h3):not(h4
-):not(h5):not(h6):not(hgroup):not(nav):not(section):not(table):not(caption
-):not(colgroup):not(col):not(thead):not(tbody):not(tfoot):not(tr):not(td
-):not(th):not(dir):not(dd):not(dl):not(dt):not(menu):not(ol):not(ul):not(li) {
-  unicode-bidi: embed;
-}
+bdo { unicode-bidi: isolate-override; }
 
-bdi, bdi:matches([dir=ltr i], [dir=rtl i]),
-output, output:matches([dir=ltr i], [dir=rtl i]),
-[dir=auto i] {
-  unicode-bidi: isolate;
-}
-
-bdo, bdo:matches([dir=ltr i], [dir=rtl i]) { unicode-bidi: bidi-override; }
-bdo[dir=auto i] { unicode-bidi: isolate-override; }
-
 textarea[dir=auto i], pre[dir=auto i] { unicode-bidi: plaintext; }</pre>
 
   <p>Input fields (i.e. <code>textarea</code> elements, and <code>input</code> elements when their




More information about the Commit-Watchers mailing list