[html5] r7805 - [giow] (2) Make dir=auto inherit when the element has no obvious directionality. [...]

whatwg at whatwg.org whatwg at whatwg.org
Wed Apr 10 16:28:15 PDT 2013


Author: ianh
Date: 2013-04-10 16:28:14 -0700 (Wed, 10 Apr 2013)
New Revision: 7805

Modified:
   complete.html
   index
   source
Log:
[giow] (2) Make dir=auto inherit when the element has no obvious directionality. (Except for <bdi>, which still defaults to ltr.)
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=17835
Affected topics: DOM APIs, HTML

Modified: complete.html
===================================================================
--- complete.html	2013-04-10 23:10:05 UTC (rev 7804)
+++ complete.html	2013-04-10 23:28:14 UTC (rev 7805)
@@ -7237,13 +7237,10 @@
   <h3 id=common-dom-interfaces><span class=secno>2.7 </span>Common DOM interfaces</h3>
 
   <h4 id=reflecting-content-attributes-in-idl-attributes><span class=secno>2.7.1 </span>Reflecting content attributes in IDL attributes</h4>
-<!--CLEANUP-->
 
-  <p>Some IDL attributes are defined to <dfn id=reflect>reflect</dfn> a
-  particular content attribute. This means that on getting, the IDL
-  attribute returns the current value of the content attribute, and on
-  setting, the IDL attribute changes the value of the content
-  attribute to the given value.</p>
+  <p>Some IDL attributes are defined to <dfn id=reflect>reflect</dfn> a particular content attribute. This
+  means that on getting, the IDL attribute returns the current value of the content attribute, and
+  on setting, the IDL attribute changes the value of the content attribute to the given value.</p>
 
 <!-- v2 for completeness: (also search for REFLECTIDL)
   <p class="note">A list of <span>reflecting IDL attributes</span> and
@@ -7252,195 +7249,148 @@
 
   <div class=impl>
 
-  <p>In general, on getting, if the content attribute is not present,
-  the IDL attribute must act as if the content attribute's value is
-  the empty string; and on setting, if the content attribute is not
-  present, it must first be added.</p>
+  <p>In general, on getting, if the content attribute is not present, the IDL attribute must act as
+  if the content attribute's value is the empty string; and on setting, if the content attribute is
+  not present, it must first be added.</p>
 
-  <p>If a reflecting IDL attribute is a <code>DOMString</code>
-  attribute whose content attribute is defined to contain a
-  <a href=#url>URL</a>, then on getting, the IDL attribute must <a href=#resolve-a-url title="resolve a url">resolve</a> the value of the content
-  attribute relative to the element and return the resulting
-  <a href=#absolute-url>absolute URL</a> if that was successful, or the empty
-  string otherwise; and on setting, must set the content attribute to
-  the specified literal value. If the content attribute is absent, the
-  IDL attribute must return the default value, if the content
+  <p>If a reflecting IDL attribute is a <code>DOMString</code> attribute whose content attribute is
+  defined to contain a <a href=#url>URL</a>, then on getting, the IDL attribute must <a href=#resolve-a-url title="resolve a url">resolve</a> the value of the content attribute relative to the element
+  and return the resulting <a href=#absolute-url>absolute URL</a> if that was successful, or the empty string
+  otherwise; and on setting, must set the content attribute to the specified literal value. If the
+  content attribute is absent, the IDL attribute must return the default value, if the content
   attribute has one, or else the empty string.</p>
 
-  <p>If a reflecting IDL attribute is a <code>DOMString</code>
-  attribute whose content attribute is defined to contain one or more
-  <a href=#url title=URL>URLs</a>, then on getting, the IDL attribute
-  must <a href=#split-a-string-on-spaces title="split a string on spaces">split the content
-  attribute on spaces</a> and return the concatenation of <a href=#resolve-a-url title="resolve a URL">resolving</a> each token URL to an
-  <a href=#absolute-url>absolute URL</a> relative to the element, with a single
-  U+0020 SPACE character between each URL, ignoring any tokens that
-  did not resolve successfully. If the content attribute is absent,
-  the IDL attribute must return the default value, if the content
-  attribute has one, or else the empty string. On setting, the IDL
-  attribute must set the content attribute to the specified literal
-  value.</p>
+  <p>If a reflecting IDL attribute is a <code>DOMString</code> attribute whose content attribute is
+  defined to contain one or more <a href=#url title=URL>URLs</a>, then on getting, the IDL attribute
+  must <a href=#split-a-string-on-spaces title="split a string on spaces">split the content attribute on spaces</a> and
+  return the concatenation of <a href=#resolve-a-url title="resolve a URL">resolving</a> each token URL to an
+  <a href=#absolute-url>absolute URL</a> relative to the element, with a single U+0020 SPACE character between
+  each URL, ignoring any tokens that did not resolve successfully. If the content attribute is
+  absent, the IDL attribute must return the default value, if the content attribute has one, or else
+  the empty string. On setting, the IDL attribute must set the content attribute to the specified
+  literal value.</p>
 
-  <p>If a reflecting IDL attribute is a <code>DOMString</code>
-  attribute whose content attribute is an <a href=#enumerated-attribute>enumerated
-  attribute</a>, and the IDL attribute is <dfn id=limited-to-only-known-values>limited to only
-  known values</dfn>, then, on getting, the IDL attribute must return
-  the conforming value associated with the state the attribute is in
-  (in its canonical case), if any, or the empty string if the
-  attribute is in a state that has no associated keyword value or if
-  the attribute is not in a state (e.g. the attribute is missing and
-  there is no <i>missing value default</i>); and on setting, the
+  <p>If a reflecting IDL attribute is a <code>DOMString</code> attribute whose content attribute is
+  an <a href=#enumerated-attribute>enumerated attribute</a>, and the IDL attribute is <dfn id=limited-to-only-known-values>limited to only known
+  values</dfn>, then, on getting, the IDL attribute must return the conforming value associated with
+  the state the attribute is in (in its canonical case), if any, or the empty string if the
+  attribute is in a state that has no associated keyword value or if the attribute is not in a state
+  (e.g. the attribute is missing and there is no <i>missing value default</i>); and on setting, the
   content attribute must be set to the specified new value.</p>
 
-  <p>If a reflecting IDL attribute is a <code>DOMString</code>
-  attribute but doesn't fall into any of the above categories, then
-  the getting and setting must be done in a transparent,
+  <p>If a reflecting IDL attribute is a <code>DOMString</code> attribute but doesn't fall into any
+  of the above categories, then the getting and setting must be done in a transparent,
   case-preserving manner.</p>
 
-  <p>If a reflecting IDL attribute is a <code title="">boolean</code>
-  attribute, then on getting the IDL attribute must return true if the
-  content attribute is set, and false if it is absent. On setting, the
-  content attribute must be removed if the IDL attribute is set to
-  false, and must be set to the empty string if the IDL attribute is
-  set to true. (This corresponds to the rules for <a href=#boolean-attribute title="boolean
-  attribute">boolean content attributes</a>.)</p>
+  <p>If a reflecting IDL attribute is a <code title="">boolean</code> attribute, then on getting the
+  IDL attribute must return true if the content attribute is set, and false if it is absent. On
+  setting, the content attribute must be removed if the IDL attribute is set to false, and must be
+  set to the empty string if the IDL attribute is set to true. (This corresponds to the rules for
+  <a href=#boolean-attribute title="boolean attribute">boolean content attributes</a>.)</p>
 
-  <p>If a reflecting IDL attribute has a signed integer type
-  (<code>long</code>) then, on getting, the content attribute must be
-  parsed according to the <a href=#rules-for-parsing-integers title="rules for parsing
-  integers">rules for parsing signed integers</a>, and if that is
-  successful, and the value is in the range of the IDL attribute's
-  type, the resulting value must be returned. If, on the other hand,
-  it fails or returns an out of range value, or if the attribute is
-  absent, then the default value must be returned instead, or 0 if
-  there is no default value. On setting, the given value must be
-  converted to the shortest possible string representing the number as
-  a <a href=#valid-integer>valid integer</a> and then that string must be used as
-  the new content attribute value.</p>
+  <p>If a reflecting IDL attribute has a signed integer type (<code>long</code>) then, on getting,
+  the content attribute must be parsed according to the <a href=#rules-for-parsing-integers title="rules for parsing
+  integers">rules for parsing signed integers</a>, and if that is successful, and the value is in
+  the range of the IDL attribute's type, the resulting value must be returned. If, on the other
+  hand, it fails or returns an out of range value, or if the attribute is absent, then the default
+  value must be returned instead, or 0 if there is no default value. On setting, the given value
+  must be converted to the shortest possible string representing the number as a <a href=#valid-integer>valid
+  integer</a> and then that string must be used as the new content attribute value.</p>
 
-  <p>If a reflecting IDL attribute has a signed integer type
-  (<code>long</code>) that is <dfn id=limited-to-only-non-negative-numbers>limited to only non-negative
-  numbers</dfn> then, on getting, the content attribute must be parsed
-  according to the <a href=#rules-for-parsing-non-negative-integers>rules for parsing non-negative
-  integers</a>, and if that is successful, and the value is in the
-  range of the IDL attribute's type, the resulting value must be
-  returned. If, on the other hand, it fails or returns an out of range
-  value, or if the attribute is absent, the default value must be
-  returned instead, or −1 if there is no default value. On
-  setting, if the value is negative, the user agent must throw an
-  <code><a href=#indexsizeerror>IndexSizeError</a></code> exception. Otherwise, the given value
-  must be converted to the shortest possible string representing the
-  number as a <a href=#valid-non-negative-integer>valid non-negative integer</a> and then that
-  string must be used as the new content attribute value.</p>
+  <p>If a reflecting IDL attribute has a signed integer type (<code>long</code>) that is
+  <dfn id=limited-to-only-non-negative-numbers>limited to only non-negative numbers</dfn> then, on getting, the content attribute must be
+  parsed according to the <a href=#rules-for-parsing-non-negative-integers>rules for parsing non-negative integers</a>, and if that is
+  successful, and the value is in the range of the IDL attribute's type, the resulting value must be
+  returned. If, on the other hand, it fails or returns an out of range value, or if the attribute is
+  absent, the default value must be returned instead, or −1 if there is no default value. On
+  setting, if the value is negative, the user agent must throw an <code><a href=#indexsizeerror>IndexSizeError</a></code>
+  exception. Otherwise, the given value must be converted to the shortest possible string
+  representing the number as a <a href=#valid-non-negative-integer>valid non-negative integer</a> and then that string must be
+  used as the new content attribute value.</p>
 
-  <p>If a reflecting IDL attribute has an <em>unsigned</em> integer
-  type (<code>unsigned long</code>) then, on getting, the content
-  attribute must be parsed according to the <a href=#rules-for-parsing-non-negative-integers>rules for parsing
-  non-negative integers</a>, and if that is successful, and the
-  value is in the range 0 to 2147483647 inclusive, the resulting value
-  must be returned. If, on the other hand, it fails or returns an out
-  of range value, or if the attribute is absent, the default value
-  must be returned instead, or 0 if there is no default value. On
-  setting, first, if the new value is in the range 0 to 2147483647,
-  then let <var title="">n</var> be the new value, otherwise let <var title="">n</var> be the default value, or 0 if there is no default
-  value; then, <var title="">n</var> must be converted to the shortest
-  possible string representing the number as a <a href=#valid-non-negative-integer>valid
-  non-negative integer</a> and that string must be used as the new
-  content attribute value.</p>
+  <p>If a reflecting IDL attribute has an <em>unsigned</em> integer type (<code>unsigned
+  long</code>) then, on getting, the content attribute must be parsed according to the <a href=#rules-for-parsing-non-negative-integers>rules
+  for parsing non-negative integers</a>, and if that is successful, and the value is in the range
+  0 to 2147483647 inclusive, the resulting value must be returned. If, on the other hand, it fails
+  or returns an out of range value, or if the attribute is absent, the default value must be
+  returned instead, or 0 if there is no default value. On setting, first, if the new value is in the
+  range 0 to 2147483647, then let <var title="">n</var> be the new value, otherwise let <var title="">n</var> be the default value, or 0 if there is no default value; then, <var title="">n</var> must be converted to the shortest possible string representing the number as a
+  <a href=#valid-non-negative-integer>valid non-negative integer</a> and that string must be used as the new content attribute
+  value.</p>
   <!-- see http://www.w3.org/Bugs/Public/show_bug.cgi?id=10352
   https://bugzilla.mozilla.org/show_bug.cgi?id=586118 and
   https://www.w3.org/Bugs/Public/show_bug.cgi?id=17705 for why the
   range is clamped to 2147483647 rather the normal unsigned long
   maximum value of 4294967295 -->
 
-  <p>If a reflecting IDL attribute has an unsigned integer type
-  (<code>unsigned long</code>) that is <dfn id=limited-to-only-non-negative-numbers-greater-than-zero>limited to only
-  non-negative numbers greater than zero</dfn>, then the behavior is
-  similar to the previous case, but zero is not allowed. On getting,
-  the content attribute must first be parsed according to the
-  <a href=#rules-for-parsing-non-negative-integers>rules for parsing non-negative integers</a>, and if that is
-  successful, and the value is in the range 1 to 2147483647 inclusive,
-  the resulting value must be returned. If, on the other hand, it
-  fails or returns an out of range value, or if the attribute is
-  absent, the default value must be returned instead, or 1 if there is
-  no default value. On setting, if the value is zero, the user agent
-  must throw an <code><a href=#indexsizeerror>IndexSizeError</a></code> exception. Otherwise,
-  first, if the new value is in the range 1 to 2147483647, then let
-  <var title="">n</var> be the new value, otherwise let <var title="">n</var> be the default value, or 1 if there is no default
-  value; then, <var title="">n</var> must be converted to the shortest
-  possible string representing the number as a <a href=#valid-non-negative-integer>valid
-  non-negative integer</a> and that string must be used as the new
+  <p>If a reflecting IDL attribute has an unsigned integer type (<code>unsigned long</code>) that is
+  <dfn id=limited-to-only-non-negative-numbers-greater-than-zero>limited to only non-negative numbers greater than zero</dfn>, then the behavior is similar to
+  the previous case, but zero is not allowed. On getting, the content attribute must first be parsed
+  according to the <a href=#rules-for-parsing-non-negative-integers>rules for parsing non-negative integers</a>, and if that is successful,
+  and the value is in the range 1 to 2147483647 inclusive, the resulting value must be returned. If,
+  on the other hand, it fails or returns an out of range value, or if the attribute is absent, the
+  default value must be returned instead, or 1 if there is no default value. On setting, if the
+  value is zero, the user agent must throw an <code><a href=#indexsizeerror>IndexSizeError</a></code> exception. Otherwise,
+  first, if the new value is in the range 1 to 2147483647, then let <var title="">n</var> be the new
+  value, otherwise let <var title="">n</var> be the default value, or 1 if there is no default
+  value; then, <var title="">n</var> must be converted to the shortest possible string representing
+  the number as a <a href=#valid-non-negative-integer>valid non-negative integer</a> and that string must be used as the new
   content attribute value.</p>
   <!-- see previous paragraph for note about the weird range -->
  
-  <p>If a reflecting IDL attribute has a floating-point number type
-  (<code>double</code> or <code>unrestricted double</code>), then, on
-  getting, the content attribute must be parsed according to the
-  <a href=#rules-for-parsing-floating-point-number-values>rules for parsing floating-point number values</a>, and if
-  that is successful, the resulting value must be returned. If, on the
-  other hand, it fails, or if the attribute is absent, the default
-  value must be returned instead, or 0.0 if there is no default value.
-  On setting, the given value must be converted to the <a href=#best-representation-of-the-number-as-a-floating-point-number>best
-  representation of the number as a floating-point number</a> and
-  then that string must be used as the new content attribute
-  value.</p>
+  <p>If a reflecting IDL attribute has a floating-point number type (<code>double</code> or
+  <code>unrestricted double</code>), then, on getting, the content attribute must be parsed
+  according to the <a href=#rules-for-parsing-floating-point-number-values>rules for parsing floating-point number values</a>, and if that is
+  successful, the resulting value must be returned. If, on the other hand, it fails, or if the
+  attribute is absent, the default value must be returned instead, or 0.0 if there is no default
+  value. On setting, the given value must be converted to the <a href=#best-representation-of-the-number-as-a-floating-point-number>best representation of the
+  number as a floating-point number</a> and then that string must be used as the new content
+  attribute value.</p>
 
-  <p>If a reflecting IDL attribute has a floating-point number type
-  (<code>double</code> or <code>unrestricted double</code>) that is
-  <dfn id=limited-to-numbers-greater-than-zero>limited to numbers greater than zero</dfn>, then the behavior
-  is similar to the previous case, but zero and negative values are
-  not allowed. On getting, the content attribute must be parsed
-  according to the <a href=#rules-for-parsing-floating-point-number-values>rules for parsing floating-point number
-  values</a>, and if that is successful and the value is greater
-  than 0.0, the resulting value must be returned. If, on the other
-  hand, it fails or returns an out of range value, or if the attribute
-  is absent, the default value must be returned instead, or 0.0 if
-  there is no default value. On setting, if the value is less than or
-  equal to zero, then the value must be ignored. Otherwise, the given
-  value must be converted to the <a href=#best-representation-of-the-number-as-a-floating-point-number>best representation of the
-  number as a floating-point number</a> and then that string must
-  be used as the new content attribute value.</p>
+  <p>If a reflecting IDL attribute has a floating-point number type (<code>double</code> or
+  <code>unrestricted double</code>) that is <dfn id=limited-to-numbers-greater-than-zero>limited to numbers greater than zero</dfn>, then
+  the behavior is similar to the previous case, but zero and negative values are not allowed. On
+  getting, the content attribute must be parsed according to the <a href=#rules-for-parsing-floating-point-number-values>rules for parsing
+  floating-point number values</a>, and if that is successful and the value is greater than 0.0,
+  the resulting value must be returned. If, on the other hand, it fails or returns an out of range
+  value, or if the attribute is absent, the default value must be returned instead, or 0.0 if there
+  is no default value. On setting, if the value is less than or equal to zero, then the value must
+  be ignored. Otherwise, the given value must be converted to the <a href=#best-representation-of-the-number-as-a-floating-point-number>best representation of the
+  number as a floating-point number</a> and then that string must be used as the new content
+  attribute value.</p>
 
-  <p class=note>The values Infinity and Not-a-Number (NaN) values
-  throw an exception on setting, as defined in the Web IDL
-  specification. <a href=#refsWEBIDL>[WEBIDL]</a></p>
+  <p class=note>The values Infinity and Not-a-Number (NaN) values throw an exception on setting,
+  as defined in the Web IDL specification. <a href=#refsWEBIDL>[WEBIDL]</a></p>
 
-  <p>If a reflecting IDL attribute has the type
-  <code><a href=#domtokenlist>DOMTokenList</a></code> or <code><a href=#domsettabletokenlist>DOMSettableTokenList</a></code>, then
-  on getting it must return a <code><a href=#domtokenlist>DOMTokenList</a></code> or
-  <code><a href=#domsettabletokenlist>DOMSettableTokenList</a></code> object (as appropriate) whose
-  associated element is the element in question and whose associated
-  attribute's local name is the name of the attribute in question.
-  The same
-  <code><a href=#domtokenlist>DOMTokenList</a></code> or <code><a href=#domsettabletokenlist>DOMSettableTokenList</a></code>
-  object must be returned every time for each attribute.</p>
+  <p>If a reflecting IDL attribute has the type <code><a href=#domtokenlist>DOMTokenList</a></code> or
+  <code><a href=#domsettabletokenlist>DOMSettableTokenList</a></code>, then on getting it must return a <code><a href=#domtokenlist>DOMTokenList</a></code> or
+  <code><a href=#domsettabletokenlist>DOMSettableTokenList</a></code> object (as appropriate) whose associated element is the element
+  in question and whose associated attribute's local name is the name of the attribute in question.
+  The same <code><a href=#domtokenlist>DOMTokenList</a></code> or <code><a href=#domsettabletokenlist>DOMSettableTokenList</a></code> object must be returned
+  every time for each attribute.</p>
 
-  <p>If a reflecting IDL attribute has the type
-  <code><a href=#htmlelement>HTMLElement</a></code>, or an interface that descends from
-  <code><a href=#htmlelement>HTMLElement</a></code>, then, on getting, it must run the
-  following algorithm (stopping at the first point where a value is
-  returned):</p>
+  <p>If a reflecting IDL attribute has the type <code><a href=#htmlelement>HTMLElement</a></code>, or an interface that
+  descends from <code><a href=#htmlelement>HTMLElement</a></code>, then, on getting, it must run the following algorithm
+  (stopping at the first point where a value is returned):</p>
 
-  <ol><li>If the corresponding content attribute is absent, then the
-   IDL attribute must return null.</li>
+  <ol><li>If the corresponding content attribute is absent, then the IDL attribute must return
+   null.</li>
 
-   <li>Let <var title="">candidate</var> be the element that the <code title=dom-Document-getElementById><a href=#dom-document-getelementbyid>document.getElementById()</a></code> method
-   would find when called on the content attribute's document if it
-   were passed as its argument the current value of the corresponding
-   content attribute.</li>
+   <li>Let <var title="">candidate</var> be the element that the <code title=dom-Document-getElementById><a href=#dom-document-getelementbyid>document.getElementById()</a></code> method would find when
+   called on the content attribute's document if it were passed as its argument the current value of
+   the corresponding content attribute.</li>
 
-   <li>If <var title="">candidate</var> is null, or if it is not
-   type-compatible with the IDL attribute, then the IDL attribute must
-   return null.</li>
+   <li>If <var title="">candidate</var> is null, or if it is not type-compatible with the IDL
+   attribute, then the IDL attribute must return null.</li>
 
    <li>Otherwise, it must return <var title="">candidate</var>.</li>
 
-  </ol><p>On setting, if the given element has an <code title=attr-id><a href=#the-id-attribute>id</a></code> attribute, and has the same <a href=#home-subtree>home
-  subtree</a> as the element of the attribute being set, and the
-  given element is the first element in that <a href=#home-subtree>home subtree</a>
-  whose <a href=#concept-id title=concept-ID>ID</a> is the value of that <code title=attr-id><a href=#the-id-attribute>id</a></code> attribute, then the content attribute must
-  be set to the value of that <code title=attr-id><a href=#the-id-attribute>id</a></code>
-  attribute. Otherwise, the content attribute must be set to the empty
-  string.</p>
+  </ol><p>On setting, if the given element has an <code title=attr-id><a href=#the-id-attribute>id</a></code> attribute, and has the
+  same <a href=#home-subtree>home subtree</a> as the element of the attribute being set, and the given element is
+  the first element in that <a href=#home-subtree>home subtree</a> whose <a href=#concept-id title=concept-ID>ID</a> is
+  the value of that <code title=attr-id><a href=#the-id-attribute>id</a></code> attribute, then the content attribute must be
+  set to the value of that <code title=attr-id><a href=#the-id-attribute>id</a></code> attribute. Otherwise, the content
+  attribute must be set to the empty string.</p>
 
   </div>
 
@@ -9782,8 +9732,20 @@
     bidirectional character type AL or R, and there is no character of bidirectional character type
     L anywhere before it in the element's <a href=#concept-fe-value title=concept-fe-value>value</a>, then
     <a href=#the-directionality>the directionality</a> of the element is '<a href=#concept-rtl title=concept-rtl>rtl</a>'.
-    Otherwise, <a href=#the-directionality>the directionality</a> of the element is '<a href=#concept-ltr title=concept-ltr>ltr</a>'. <a href=#refsBIDI>[BIDI]</a></p>
+    <a href=#refsBIDI>[BIDI]</a></p>
 
+    <p>If the element's <a href=#concept-fe-value title=concept-fe-value>value</a> contains a character of
+    bidirectional character type L, and there is no character of bidirectional character type
+    AL or R anywhere before it in the element's <a href=#concept-fe-value title=concept-fe-value>value</a>, then
+    <a href=#the-directionality>the directionality</a> of the element is '<a href=#concept-ltr title=concept-ltr>ltr</a>'.
+    <a href=#refsBIDI>[BIDI]</a></p>
+
+    <p>Otherwise, if the element is a <a href=#root-element>root element</a>, <a href=#the-directionality>the directionality</a> of
+    the element is '<a href=#concept-ltr title=concept-ltr>ltr</a>'.</p>
+
+    <p>Otherwise, <a href=#the-directionality>the directionality</a> of the element is the same as the element's parent
+    element's <a href=#the-directionality title="the directionality">directionality</a>.</p>
+
    </dd>
 
 
@@ -9818,8 +9780,15 @@
     </ul><p>If such a character is found and it is of bidirectional character type AL or R, <a href=#the-directionality>the
     directionality</a> of the element is '<a href=#concept-rtl title=concept-rtl>rtl</a>'.</p>
 
-    <p>Otherwise, <a href=#the-directionality>the directionality</a> of the element is '<a href=#concept-ltr title=concept-ltr>ltr</a>'.</p>
+    <p>If such a character is found and it is of bidirectional character type L, <a href=#the-directionality>the
+    directionality</a> of the element is '<a href=#concept-ltr title=concept-ltr>ltr</a>'.</p>
 
+    <p>Otherwise, if the element is a <a href=#root-element>root element</a> or a <code><a href=#the-bdi-element>bdi</a></code> element,
+    <a href=#the-directionality>the directionality</a> of the element is '<a href=#concept-ltr title=concept-ltr>ltr</a>'.</p>
+
+    <p>Otherwise, <a href=#the-directionality>the directionality</a> of the element is the same as the element's parent
+    element's <a href=#the-directionality title="the directionality">directionality</a>.</p>
+
    </dd>
 
 
@@ -18729,26 +18698,22 @@
    <dd><a href=#global-attributes>Global attributes</a></dd>
    <dt><a href=#element-dfn-dom title=element-dfn-dom>DOM interface</a>:</dt><!--TOPIC:DOM APIs-->
    <dd>Uses <code><a href=#htmlelement>HTMLElement</a></code>.</dd>
-  </dl><!--TOPIC:HTML--><!-- v2: Add a <credit> element for photo credits --><p>The <code><a href=#the-figure-element>figure</a></code> element <a href=#represents>represents</a> some
-  <a href=#flow-content>flow content</a>, optionally with a caption, that is
-  self-contained and is typically referenced as a single unit from the
-  main flow of the document.</p>
+  </dl><!--TOPIC:HTML--><!-- v2: Add a <credit> element for photo credits --><p>The <code><a href=#the-figure-element>figure</a></code> element <a href=#represents>represents</a> some <a href=#flow-content>flow content</a>,
+  optionally with a caption, that is self-contained and is typically referenced as a single unit
+  from the main flow of the document.</p>
 
-  <p>The element can thus be used to annotate illustrations, diagrams,
-  photos, code listings, etc, that are referred to from the main
-  content of the document, but that could, without affecting the flow
-  of the document, be moved away from that primary content, e.g. to
-  the side of the page, to dedicated pages, or to an appendix.</p>
+  <p>The element can thus be used to annotate illustrations, diagrams, photos, code listings, etc,
+  that are referred to from the main content of the document, but that could, without affecting the
+  flow of the document, be moved away from that primary content, e.g. to the side of the page, to
+  dedicated pages, or to an appendix.</p>
 
-  <p>The <span class=impl>first</span> <code><a href=#the-figcaption-element>figcaption</a></code>
-  element child of the element, if any, represents the caption of the
-  <code><a href=#the-figure-element>figure</a></code> element's contents. If there is no child
+  <p>The <span class=impl>first</span> <code><a href=#the-figcaption-element>figcaption</a></code> element child of the element, if
+  any, represents the caption of the <code><a href=#the-figure-element>figure</a></code> element's contents. If there is no child
   <code><a href=#the-figcaption-element>figcaption</a></code> element, then there is no caption.</p>
 
   <div class=example>
 
-   <p>This example shows the <code><a href=#the-figure-element>figure</a></code> element to mark up a
-   code listing.</p>
+   <p>This example shows the <code><a href=#the-figure-element>figure</a></code> element to mark up a code listing.</p>
 
    <pre><p>In <a href="#l4">listing 4</a> we see the primary core interface
 API declaration.</p>
@@ -18766,8 +18731,7 @@
 
   <div class=example>
 
-   <p>Here we see a <code><a href=#the-figure-element>figure</a></code> element to mark up a
-   photo.</p>
+   <p>Here we see a <code><a href=#the-figure-element>figure</a></code> element to mark up a photo.</p>
 
    <pre><figure>
  <img src="bubbles-work.jpeg"
@@ -18780,8 +18744,8 @@
 
   <div class=example>
 
-   <p>In this example, we see an image that is <em>not</em>
-   a figure, as well as an image and a video that are.</p>
+   <p>In this example, we see an image that is <em>not</em> a figure, as well as an image and a
+   video that are.</p>
 
    <pre><h2>Malinko's comics</h2>
 
@@ -18813,8 +18777,7 @@
 
   <div class=example>
 
-   <p>Here, a part of a poem is marked up using
-   <code><a href=#the-figure-element>figure</a></code>.</p>
+   <p>Here, a part of a poem is marked up using <code><a href=#the-figure-element>figure</a></code>.</p>
 
    <pre><figure>
  <p>'Twas brillig, and the slithy toves<br>
@@ -18828,10 +18791,9 @@
 
   <div class=example>
 
-   <p>In this example, which could be part of a much larger work
-   discussing a castle, nested <code><a href=#the-figure-element>figure</a></code> elements are used
-   to provide both a group caption and individual captions for each
-   figure in the group:</p>
+   <p>In this example, which could be part of a much larger work discussing a castle, nested
+   <code><a href=#the-figure-element>figure</a></code> elements are used to provide both a group caption and individual captions for
+   each figure in the group:</p>
 
    <pre><figure>
  <figcaption>The castle through the ages: 1423, 1858, and 1999 respectively.</figcaption>
@@ -18853,10 +18815,8 @@
 
   <div class=example>
 
-   <p>The previous example could also be more succintly written as
-   follows (using <code title=attr-title><a href=#attr-title>title</a></code> attributes in
-   place of the nested <code><a href=#the-figure-element>figure</a></code>/<code><a href=#the-figcaption-element>figcaption</a></code>
-   pairs):</p>
+   <p>The previous example could also be more succintly written as follows (using <code title=attr-title><a href=#attr-title>title</a></code> attributes in place of the nested
+   <code><a href=#the-figure-element>figure</a></code>/<code><a href=#the-figcaption-element>figcaption</a></code> pairs):</p>
 
    <pre><figure>
  <img src="castle1423.jpeg" title="Etching. Anonymous, ca. 1423."
@@ -18885,10 +18845,8 @@
    <dd><a href=#global-attributes>Global attributes</a></dd>
    <dt><a href=#element-dfn-dom title=element-dfn-dom>DOM interface</a>:</dt><!--TOPIC:DOM APIs-->
    <dd>Uses <code><a href=#htmlelement>HTMLElement</a></code>.</dd>
-  </dl><!--TOPIC:HTML--><p>The <code><a href=#the-figcaption-element>figcaption</a></code> element <a href=#represents>represents</a> a
-  caption or legend for the rest of the contents of the
-  <code><a href=#the-figcaption-element>figcaption</a></code> element's parent <code><a href=#the-figure-element>figure</a></code>
-  element<span class=impl>, if any</span>.</p>
+  </dl><!--TOPIC:HTML--><p>The <code><a href=#the-figcaption-element>figcaption</a></code> element <a href=#represents>represents</a> a caption or legend for the rest of
+  the contents of the <code><a href=#the-figcaption-element>figcaption</a></code> element's parent <code><a href=#the-figure-element>figure</a></code> element<span class=impl>, if any</span>.</p>
 
 
 
@@ -23611,14 +23569,12 @@
 
   <h6 id=a-graphical-representation-of-some-of-the-surrounding-text><span class=secno>4.8.1.1.6 </span>A graphical representation of some of the surrounding text</h6>
 
-  <p>In many cases, the image is actually just supplementary, and
-  its presence merely reinforces the surrounding text. In these
-  cases, the <code title=attr-img-alt><a href=#attr-img-alt>alt</a></code> attribute must be
+  <p>In many cases, the image is actually just supplementary, and its presence merely reinforces the
+  surrounding text. In these cases, the <code title=attr-img-alt><a href=#attr-img-alt>alt</a></code> attribute must be
   present but its value must be the empty string.</p>
 
-  <p>In general, an image falls into this category if removing the
-  image doesn't make the page any less useful, but including the
-  image makes it a lot easier for users of visual browsers to
+  <p>In general, an image falls into this category if removing the image doesn't make the page any
+  less useful, but including the image makes it a lot easier for users of visual browsers to
   understand the concept.</p>
 
   <div class=example>
@@ -23632,12 +23588,10 @@
 passes data to the Tokenizer.</p>
 <strong><p><img src="images/parsing-model-overview.png" alt=""></p></strong></pre>
 
-   <p>In these cases, it would be wrong to include alternative text
-   that consists of just a caption. If a caption is to be included,
-   then either the <code title=attr-title><a href=#attr-title>title</a></code> attribute can
-   be used, or the <code><a href=#the-figure-element>figure</a></code> and <code><a href=#the-figcaption-element>figcaption</a></code>
-   elements can be used. In the latter case, the image would in fact
-   be a phrase or paragraph with an alternative graphical
+   <p>In these cases, it would be wrong to include alternative text that consists of just a caption.
+   If a caption is to be included, then either the <code title=attr-title><a href=#attr-title>title</a></code> attribute
+   can be used, or the <code><a href=#the-figure-element>figure</a></code> and <code><a href=#the-figcaption-element>figcaption</a></code> elements can be used. In the
+   latter case, the image would in fact be a phrase or paragraph with an alternative graphical
    representation, and would thus require alternative text.</p>
 
    <pre><!-- Using the title="" attribute -->
@@ -40307,24 +40261,20 @@
   // <a href="#HTMLTableCaptionElement-partial">also has obsolete members</a>
 };</pre>
    </dd>
-  </dl><!--TOPIC:HTML--><p>The <code><a href=#the-caption-element>caption</a></code> element <a href=#represents>represents</a> the title of the
-  <code><a href=#the-table-element>table</a></code> that is its parent, if it has a parent and that
-  is a <code><a href=#the-table-element>table</a></code> element.</p>
+  </dl><!--TOPIC:HTML--><p>The <code><a href=#the-caption-element>caption</a></code> element <a href=#represents>represents</a> the title of the <code><a href=#the-table-element>table</a></code>
+  that is its parent, if it has a parent and that is a <code><a href=#the-table-element>table</a></code> element.</p>
 
   <div class=impl>
 
-  <p>The <code><a href=#the-caption-element>caption</a></code> element takes part in the <a href=#table-model>table
-  model</a>.</p>
+  <p>The <code><a href=#the-caption-element>caption</a></code> element takes part in the <a href=#table-model>table model</a>.</p>
 
   </div>
 
-  <p>When a <code><a href=#the-table-element>table</a></code> element is the only content in a
-  <code><a href=#the-figure-element>figure</a></code> element other than the <code><a href=#the-figcaption-element>figcaption</a></code>,
-  the <code><a href=#the-caption-element>caption</a></code> element should be omitted in favor of the
-  <code><a href=#the-figcaption-element>figcaption</a></code>.</p>
+  <p>When a <code><a href=#the-table-element>table</a></code> element is the only content in a <code><a href=#the-figure-element>figure</a></code> element other
+  than the <code><a href=#the-figcaption-element>figcaption</a></code>, the <code><a href=#the-caption-element>caption</a></code> element should be omitted in favor of
+  the <code><a href=#the-figcaption-element>figcaption</a></code>.</p>
 
-  <p>A caption can introduce context for a table, making it
-  significantly easier to understand.</p>
+  <p>A caption can introduce context for a table, making it significantly easier to understand.</p>
 
   <div class=example>
 
@@ -40337,9 +40287,8 @@
     <tr><th> 4 <td> 5 <td> 6 <td> 7 <td> 8 <td> 9 <td> 10
     <tr><th> 5 <td> 6 <td> 7 <td> 8 <td> 9 <td> 10 <td> 11
     <tr><th> 6 <td> 7 <td> 8 <td> 9 <td> 10 <td> 11 <td> 12
-   </table><p>In the abstract, this table is not clear. However, with a
-   caption giving the table's number (for reference in the main prose)
-   and explaining its use, it makes more sense:</p>
+   </table><p>In the abstract, this table is not clear. However, with a caption giving the table's number
+   (for reference in the main prose) and explaining its use, it makes more sense:</p>
 
    <pre><caption>
 <p>Table 1.
@@ -44549,44 +44498,39 @@
   readonly attribute <a href=#htmlelement>HTMLElement</a>? <a href=#dom-label-control title=dom-label-control>control</a>;
 };</pre>
    </dd>
-  </dl><!--TOPIC:HTML--><p>The <code><a href=#the-label-element>label</a></code> <a href=#represents>represents</a> a caption in a
-  user interface. The caption can be associated with a specific form
-  control<span class=impl>, known as the <code><a href=#the-label-element>label</a></code>
-  element's <dfn id=labeled-control>labeled control</dfn></span>, either using <code title=attr-label-for><a href=#attr-label-for>for</a></code> attribute, or by putting the form
-  control inside the <code><a href=#the-label-element>label</a></code> element itself.</p>
+  </dl><!--TOPIC:HTML--><p>The <code><a href=#the-label-element>label</a></code> element <a href=#represents>represents</a> a caption in a user interface. The
+  caption can be associated with a specific form control<span class=impl>, known as the
+  <code><a href=#the-label-element>label</a></code> element's <dfn id=labeled-control>labeled control</dfn></span>, either using the <code title=attr-label-for><a href=#attr-label-for>for</a></code> attribute, or by putting the form control inside the
+  <code><a href=#the-label-element>label</a></code> element itself.</p>
 
   <div class=impl>
 
-  <p>Except where otherwise specified by the following rules, a
-  <code><a href=#the-label-element>label</a></code> element has no <a href=#labeled-control>labeled control</a>.</p>
+  <p>Except where otherwise specified by the following rules, a <code><a href=#the-label-element>label</a></code> element has no
+  <a href=#labeled-control>labeled control</a>.</p>
 
   </div>
 
-  <p>The <dfn id=attr-label-for title=attr-label-for><code>for</code></dfn> attribute
-  may be specified to indicate a form control with which the caption
-  is to be associated. If the attribute is specified, the attribute's
-  value must be the <a href=#concept-id title=concept-id>ID</a> of a <a href=#category-label title=category-label>labelable element</a> in the same
-  <code><a href=#document>Document</a></code> as the <code><a href=#the-label-element>label</a></code> element. <span class=impl>If the attribute is specified and there is an element
-  in the <code><a href=#document>Document</a></code> whose <a href=#concept-id title=concept-id>ID</a> is equal to the value of the <code title=attr-label-for><a href=#attr-label-for>for</a></code> attribute, and the first such
-  element is a <a href=#category-label title=category-label>labelable element</a>,
-  then that element is the <code><a href=#the-label-element>label</a></code> element's <a href=#labeled-control>labeled
-  control</a>.</span></p>
+  <p>The <dfn id=attr-label-for title=attr-label-for><code>for</code></dfn> attribute may be specified to indicate a
+  form control with which the caption is to be associated. If the attribute is specified, the
+  attribute's value must be the <a href=#concept-id title=concept-id>ID</a> of a <a href=#category-label title=category-label>labelable element</a> in the same <code><a href=#document>Document</a></code> as the
+  <code><a href=#the-label-element>label</a></code> element. <span class=impl>If the attribute is specified and there is an
+  element in the <code><a href=#document>Document</a></code> whose <a href=#concept-id title=concept-id>ID</a> is equal to the
+  value of the <code title=attr-label-for><a href=#attr-label-for>for</a></code> attribute, and the first such element is a
+  <a href=#category-label title=category-label>labelable element</a>, then that element is the <code><a href=#the-label-element>label</a></code>
+  element's <a href=#labeled-control>labeled control</a>.</span></p>
 
   <div class=impl>
 
-  <p>If the <code title=attr-label-for><a href=#attr-label-for>for</a></code> attribute is not
-  specified, but the <code><a href=#the-label-element>label</a></code> element has a <a href=#category-label title=category-label>labelable element</a> descendant, then the
-  first such descendant in <a href=#tree-order>tree order</a> is the
-  <code><a href=#the-label-element>label</a></code> element's <a href=#labeled-control>labeled control</a>.</p>
+  <p>If the <code title=attr-label-for><a href=#attr-label-for>for</a></code> attribute is not specified, but the
+  <code><a href=#the-label-element>label</a></code> element has a <a href=#category-label title=category-label>labelable element</a> descendant,
+  then the first such descendant in <a href=#tree-order>tree order</a> is the <code><a href=#the-label-element>label</a></code> element's
+  <a href=#labeled-control>labeled control</a>.</p>
 
-  <p>The <code><a href=#the-label-element>label</a></code> element's exact default presentation and
-  behavior, in particular what its <a href=#activation-behavior>activation behavior</a>
-  might be, if anything, should match the platform's label behavior.
-  The <a href=#activation-behavior>activation behavior</a> of a <code><a href=#the-label-element>label</a></code> element
-  for events targeted at <a href=#interactive-content>interactive content</a> descendants
-  of a <code><a href=#the-label-element>label</a></code> element, and any descendants of those
-  <a href=#interactive-content>interactive content</a> descendants, must be to do
-  nothing.</p>
+  <p>The <code><a href=#the-label-element>label</a></code> element's exact default presentation and behavior, in particular what
+  its <a href=#activation-behavior>activation behavior</a> might be, if anything, should match the platform's label
+  behavior. The <a href=#activation-behavior>activation behavior</a> of a <code><a href=#the-label-element>label</a></code> element for events targeted
+  at <a href=#interactive-content>interactive content</a> descendants of a <code><a href=#the-label-element>label</a></code> element, and any
+  descendants of those <a href=#interactive-content>interactive content</a> descendants, must be to do nothing.</p>
 
   <!-- activation behaviour need not be dependent on whether the
   labeled control is being rendered:
@@ -44595,30 +44539,26 @@
 
   <div class=example>
 
-   <p>For example, on platforms where clicking a checkbox label checks
-   the checkbox, clicking the <code><a href=#the-label-element>label</a></code> in the following
-   snippet could trigger the user agent to <a href=#run-synthetic-click-activation-steps>run synthetic click
-   activation steps</a> on the <code><a href=#the-input-element>input</a></code> element, as if
-   the element itself had been triggered by the user:</p>
+   <p>For example, on platforms where clicking a checkbox label checks the checkbox, clicking the
+   <code><a href=#the-label-element>label</a></code> in the following snippet could trigger the user agent to <a href=#run-synthetic-click-activation-steps>run synthetic
+   click activation steps</a> on the <code><a href=#the-input-element>input</a></code> element, as if the element itself had
+   been triggered by the user:</p>
 
    <pre><label><input type=checkbox name=lost> Lost</label></pre>
 
-   <p>On other platforms, the behavior might be just to focus the
-   control, or do nothing.</p>
+   <p>On other platforms, the behavior might be just to focus the control, or do nothing.</p>
 
   </div>
 
   </div>
 
-  <p>The <code title=attr-fae-form><a href=#attr-fae-form>form</a></code> attribute is used to
-  explicitly associate the <code><a href=#the-label-element>label</a></code> element with its
-  <a href=#form-owner>form owner</a>.</p>
+  <p>The <code title=attr-fae-form><a href=#attr-fae-form>form</a></code> attribute is used to explicitly associate the
+  <code><a href=#the-label-element>label</a></code> element with its <a href=#form-owner>form owner</a>.</p>
 
   <div class=example>
 
-   <p>The following example shows three form controls each with a
-   label, two of which have small text showing the right format for
-   users to use.</p>
+   <p>The following example shows three form controls each with a label, two of which have small
+   text showing the right format for users to use.</p>
 
    <pre><p><label>Full name: <input name=fn> <small>Format: First Last</small></label></p>
 <p><label>Age: <input name=age type=number min=0></label></p>
@@ -44637,15 +44577,14 @@
 
   </dl><div class=impl>
 
-  <p>The <dfn id=dom-label-htmlfor title=dom-label-htmlFor><code>htmlFor</code></dfn> IDL
-  attribute must <a href=#reflect>reflect</a> the <code title=attr-label-for><a href=#attr-label-for>for</a></code> content attribute.</p>
+  <p>The <dfn id=dom-label-htmlfor title=dom-label-htmlFor><code>htmlFor</code></dfn> IDL attribute must
+  <a href=#reflect>reflect</a> the <code title=attr-label-for><a href=#attr-label-for>for</a></code> content attribute.</p>
 
-  <p>The <dfn id=dom-label-control title=dom-label-control><code>control</code></dfn> IDL
-  attribute must return the <code><a href=#the-label-element>label</a></code> element's <a href=#labeled-control>labeled
-  control</a>, if any, or null if there isn't one.</p>
+  <p>The <dfn id=dom-label-control title=dom-label-control><code>control</code></dfn> IDL attribute must return the
+  <code><a href=#the-label-element>label</a></code> element's <a href=#labeled-control>labeled control</a>, if any, or null if there isn't one.</p>
 
-  <p>The <code title=dom-fae-form><a href=#dom-fae-form>form</a></code> IDL attribute is part
-  of the element's forms API.</p>
+  <p>The <code title=dom-fae-form><a href=#dom-fae-form>form</a></code> IDL attribute is part of the element's forms
+  API.</p>
 
   </div>
 
@@ -44653,20 +44592,17 @@
 
    <dd>
 
-    <p>Returns a <code><a href=#nodelist>NodeList</a></code> of all the <code><a href=#the-label-element>label</a></code>
-    elements that the form control is associated with.</p>
+    <p>Returns a <code><a href=#nodelist>NodeList</a></code> of all the <code><a href=#the-label-element>label</a></code> elements that the form control
+    is associated with.</p>
 
    </dd>
 
   </dl><div class=impl>
 
-  <p><a href=#category-label title=category-label>Labelable elements</a> have a
-  <code><a href=#nodelist>NodeList</a></code> object associated with them that represents
-  the list of <code><a href=#the-label-element>label</a></code> elements, in <a href=#tree-order>tree order</a>,
-  whose <a href=#labeled-control>labeled control</a> is the element in question. The
-  <dfn id=dom-lfe-labels title=dom-lfe-labels><code>labels</code></dfn> IDL attribute
-  of <a href=#category-label title=category-label>labelable elements</a>, on
-  getting, must return that <code><a href=#nodelist>NodeList</a></code> object.</p>
+  <p><a href=#category-label title=category-label>Labelable elements</a> have a <code><a href=#nodelist>NodeList</a></code> object
+  associated with them that represents the list of <code><a href=#the-label-element>label</a></code> elements, in <a href=#tree-order>tree
+  order</a>, whose <a href=#labeled-control>labeled control</a> is the element in question. The <dfn id=dom-lfe-labels title=dom-lfe-labels><code>labels</code></dfn> IDL attribute of <a href=#category-label title=category-label>labelable elements</a>, on getting, must return that
+  <code><a href=#nodelist>NodeList</a></code> object.</p>
 
   </div>
 <!--TOPIC:HTML-->

Modified: index
===================================================================
--- index	2013-04-10 23:10:05 UTC (rev 7804)
+++ index	2013-04-10 23:28:14 UTC (rev 7805)
@@ -7237,13 +7237,10 @@
   <h3 id=common-dom-interfaces><span class=secno>2.7 </span>Common DOM interfaces</h3>
 
   <h4 id=reflecting-content-attributes-in-idl-attributes><span class=secno>2.7.1 </span>Reflecting content attributes in IDL attributes</h4>
-<!--CLEANUP-->
 
-  <p>Some IDL attributes are defined to <dfn id=reflect>reflect</dfn> a
-  particular content attribute. This means that on getting, the IDL
-  attribute returns the current value of the content attribute, and on
-  setting, the IDL attribute changes the value of the content
-  attribute to the given value.</p>
+  <p>Some IDL attributes are defined to <dfn id=reflect>reflect</dfn> a particular content attribute. This
+  means that on getting, the IDL attribute returns the current value of the content attribute, and
+  on setting, the IDL attribute changes the value of the content attribute to the given value.</p>
 
 <!-- v2 for completeness: (also search for REFLECTIDL)
   <p class="note">A list of <span>reflecting IDL attributes</span> and
@@ -7252,195 +7249,148 @@
 
   <div class=impl>
 
-  <p>In general, on getting, if the content attribute is not present,
-  the IDL attribute must act as if the content attribute's value is
-  the empty string; and on setting, if the content attribute is not
-  present, it must first be added.</p>
+  <p>In general, on getting, if the content attribute is not present, the IDL attribute must act as
+  if the content attribute's value is the empty string; and on setting, if the content attribute is
+  not present, it must first be added.</p>
 
-  <p>If a reflecting IDL attribute is a <code>DOMString</code>
-  attribute whose content attribute is defined to contain a
-  <a href=#url>URL</a>, then on getting, the IDL attribute must <a href=#resolve-a-url title="resolve a url">resolve</a> the value of the content
-  attribute relative to the element and return the resulting
-  <a href=#absolute-url>absolute URL</a> if that was successful, or the empty
-  string otherwise; and on setting, must set the content attribute to
-  the specified literal value. If the content attribute is absent, the
-  IDL attribute must return the default value, if the content
+  <p>If a reflecting IDL attribute is a <code>DOMString</code> attribute whose content attribute is
+  defined to contain a <a href=#url>URL</a>, then on getting, the IDL attribute must <a href=#resolve-a-url title="resolve a url">resolve</a> the value of the content attribute relative to the element
+  and return the resulting <a href=#absolute-url>absolute URL</a> if that was successful, or the empty string
+  otherwise; and on setting, must set the content attribute to the specified literal value. If the
+  content attribute is absent, the IDL attribute must return the default value, if the content
   attribute has one, or else the empty string.</p>
 
-  <p>If a reflecting IDL attribute is a <code>DOMString</code>
-  attribute whose content attribute is defined to contain one or more
-  <a href=#url title=URL>URLs</a>, then on getting, the IDL attribute
-  must <a href=#split-a-string-on-spaces title="split a string on spaces">split the content
-  attribute on spaces</a> and return the concatenation of <a href=#resolve-a-url title="resolve a URL">resolving</a> each token URL to an
-  <a href=#absolute-url>absolute URL</a> relative to the element, with a single
-  U+0020 SPACE character between each URL, ignoring any tokens that
-  did not resolve successfully. If the content attribute is absent,
-  the IDL attribute must return the default value, if the content
-  attribute has one, or else the empty string. On setting, the IDL
-  attribute must set the content attribute to the specified literal
-  value.</p>
+  <p>If a reflecting IDL attribute is a <code>DOMString</code> attribute whose content attribute is
+  defined to contain one or more <a href=#url title=URL>URLs</a>, then on getting, the IDL attribute
+  must <a href=#split-a-string-on-spaces title="split a string on spaces">split the content attribute on spaces</a> and
+  return the concatenation of <a href=#resolve-a-url title="resolve a URL">resolving</a> each token URL to an
+  <a href=#absolute-url>absolute URL</a> relative to the element, with a single U+0020 SPACE character between
+  each URL, ignoring any tokens that did not resolve successfully. If the content attribute is
+  absent, the IDL attribute must return the default value, if the content attribute has one, or else
+  the empty string. On setting, the IDL attribute must set the content attribute to the specified
+  literal value.</p>
 
-  <p>If a reflecting IDL attribute is a <code>DOMString</code>
-  attribute whose content attribute is an <a href=#enumerated-attribute>enumerated
-  attribute</a>, and the IDL attribute is <dfn id=limited-to-only-known-values>limited to only
-  known values</dfn>, then, on getting, the IDL attribute must return
-  the conforming value associated with the state the attribute is in
-  (in its canonical case), if any, or the empty string if the
-  attribute is in a state that has no associated keyword value or if
-  the attribute is not in a state (e.g. the attribute is missing and
-  there is no <i>missing value default</i>); and on setting, the
+  <p>If a reflecting IDL attribute is a <code>DOMString</code> attribute whose content attribute is
+  an <a href=#enumerated-attribute>enumerated attribute</a>, and the IDL attribute is <dfn id=limited-to-only-known-values>limited to only known
+  values</dfn>, then, on getting, the IDL attribute must return the conforming value associated with
+  the state the attribute is in (in its canonical case), if any, or the empty string if the
+  attribute is in a state that has no associated keyword value or if the attribute is not in a state
+  (e.g. the attribute is missing and there is no <i>missing value default</i>); and on setting, the
   content attribute must be set to the specified new value.</p>
 
-  <p>If a reflecting IDL attribute is a <code>DOMString</code>
-  attribute but doesn't fall into any of the above categories, then
-  the getting and setting must be done in a transparent,
+  <p>If a reflecting IDL attribute is a <code>DOMString</code> attribute but doesn't fall into any
+  of the above categories, then the getting and setting must be done in a transparent,
   case-preserving manner.</p>
 
-  <p>If a reflecting IDL attribute is a <code title="">boolean</code>
-  attribute, then on getting the IDL attribute must return true if the
-  content attribute is set, and false if it is absent. On setting, the
-  content attribute must be removed if the IDL attribute is set to
-  false, and must be set to the empty string if the IDL attribute is
-  set to true. (This corresponds to the rules for <a href=#boolean-attribute title="boolean
-  attribute">boolean content attributes</a>.)</p>
+  <p>If a reflecting IDL attribute is a <code title="">boolean</code> attribute, then on getting the
+  IDL attribute must return true if the content attribute is set, and false if it is absent. On
+  setting, the content attribute must be removed if the IDL attribute is set to false, and must be
+  set to the empty string if the IDL attribute is set to true. (This corresponds to the rules for
+  <a href=#boolean-attribute title="boolean attribute">boolean content attributes</a>.)</p>
 
-  <p>If a reflecting IDL attribute has a signed integer type
-  (<code>long</code>) then, on getting, the content attribute must be
-  parsed according to the <a href=#rules-for-parsing-integers title="rules for parsing
-  integers">rules for parsing signed integers</a>, and if that is
-  successful, and the value is in the range of the IDL attribute's
-  type, the resulting value must be returned. If, on the other hand,
-  it fails or returns an out of range value, or if the attribute is
-  absent, then the default value must be returned instead, or 0 if
-  there is no default value. On setting, the given value must be
-  converted to the shortest possible string representing the number as
-  a <a href=#valid-integer>valid integer</a> and then that string must be used as
-  the new content attribute value.</p>
+  <p>If a reflecting IDL attribute has a signed integer type (<code>long</code>) then, on getting,
+  the content attribute must be parsed according to the <a href=#rules-for-parsing-integers title="rules for parsing
+  integers">rules for parsing signed integers</a>, and if that is successful, and the value is in
+  the range of the IDL attribute's type, the resulting value must be returned. If, on the other
+  hand, it fails or returns an out of range value, or if the attribute is absent, then the default
+  value must be returned instead, or 0 if there is no default value. On setting, the given value
+  must be converted to the shortest possible string representing the number as a <a href=#valid-integer>valid
+  integer</a> and then that string must be used as the new content attribute value.</p>
 
-  <p>If a reflecting IDL attribute has a signed integer type
-  (<code>long</code>) that is <dfn id=limited-to-only-non-negative-numbers>limited to only non-negative
-  numbers</dfn> then, on getting, the content attribute must be parsed
-  according to the <a href=#rules-for-parsing-non-negative-integers>rules for parsing non-negative
-  integers</a>, and if that is successful, and the value is in the
-  range of the IDL attribute's type, the resulting value must be
-  returned. If, on the other hand, it fails or returns an out of range
-  value, or if the attribute is absent, the default value must be
-  returned instead, or −1 if there is no default value. On
-  setting, if the value is negative, the user agent must throw an
-  <code><a href=#indexsizeerror>IndexSizeError</a></code> exception. Otherwise, the given value
-  must be converted to the shortest possible string representing the
-  number as a <a href=#valid-non-negative-integer>valid non-negative integer</a> and then that
-  string must be used as the new content attribute value.</p>
+  <p>If a reflecting IDL attribute has a signed integer type (<code>long</code>) that is
+  <dfn id=limited-to-only-non-negative-numbers>limited to only non-negative numbers</dfn> then, on getting, the content attribute must be
+  parsed according to the <a href=#rules-for-parsing-non-negative-integers>rules for parsing non-negative integers</a>, and if that is
+  successful, and the value is in the range of the IDL attribute's type, the resulting value must be
+  returned. If, on the other hand, it fails or returns an out of range value, or if the attribute is
+  absent, the default value must be returned instead, or −1 if there is no default value. On
+  setting, if the value is negative, the user agent must throw an <code><a href=#indexsizeerror>IndexSizeError</a></code>
+  exception. Otherwise, the given value must be converted to the shortest possible string
+  representing the number as a <a href=#valid-non-negative-integer>valid non-negative integer</a> and then that string must be
+  used as the new content attribute value.</p>
 
-  <p>If a reflecting IDL attribute has an <em>unsigned</em> integer
-  type (<code>unsigned long</code>) then, on getting, the content
-  attribute must be parsed according to the <a href=#rules-for-parsing-non-negative-integers>rules for parsing
-  non-negative integers</a>, and if that is successful, and the
-  value is in the range 0 to 2147483647 inclusive, the resulting value
-  must be returned. If, on the other hand, it fails or returns an out
-  of range value, or if the attribute is absent, the default value
-  must be returned instead, or 0 if there is no default value. On
-  setting, first, if the new value is in the range 0 to 2147483647,
-  then let <var title="">n</var> be the new value, otherwise let <var title="">n</var> be the default value, or 0 if there is no default
-  value; then, <var title="">n</var> must be converted to the shortest
-  possible string representing the number as a <a href=#valid-non-negative-integer>valid
-  non-negative integer</a> and that string must be used as the new
-  content attribute value.</p>
+  <p>If a reflecting IDL attribute has an <em>unsigned</em> integer type (<code>unsigned
+  long</code>) then, on getting, the content attribute must be parsed according to the <a href=#rules-for-parsing-non-negative-integers>rules
+  for parsing non-negative integers</a>, and if that is successful, and the value is in the range
+  0 to 2147483647 inclusive, the resulting value must be returned. If, on the other hand, it fails
+  or returns an out of range value, or if the attribute is absent, the default value must be
+  returned instead, or 0 if there is no default value. On setting, first, if the new value is in the
+  range 0 to 2147483647, then let <var title="">n</var> be the new value, otherwise let <var title="">n</var> be the default value, or 0 if there is no default value; then, <var title="">n</var> must be converted to the shortest possible string representing the number as a
+  <a href=#valid-non-negative-integer>valid non-negative integer</a> and that string must be used as the new content attribute
+  value.</p>
   <!-- see http://www.w3.org/Bugs/Public/show_bug.cgi?id=10352
   https://bugzilla.mozilla.org/show_bug.cgi?id=586118 and
   https://www.w3.org/Bugs/Public/show_bug.cgi?id=17705 for why the
   range is clamped to 2147483647 rather the normal unsigned long
   maximum value of 4294967295 -->
 
-  <p>If a reflecting IDL attribute has an unsigned integer type
-  (<code>unsigned long</code>) that is <dfn id=limited-to-only-non-negative-numbers-greater-than-zero>limited to only
-  non-negative numbers greater than zero</dfn>, then the behavior is
-  similar to the previous case, but zero is not allowed. On getting,
-  the content attribute must first be parsed according to the
-  <a href=#rules-for-parsing-non-negative-integers>rules for parsing non-negative integers</a>, and if that is
-  successful, and the value is in the range 1 to 2147483647 inclusive,
-  the resulting value must be returned. If, on the other hand, it
-  fails or returns an out of range value, or if the attribute is
-  absent, the default value must be returned instead, or 1 if there is
-  no default value. On setting, if the value is zero, the user agent
-  must throw an <code><a href=#indexsizeerror>IndexSizeError</a></code> exception. Otherwise,
-  first, if the new value is in the range 1 to 2147483647, then let
-  <var title="">n</var> be the new value, otherwise let <var title="">n</var> be the default value, or 1 if there is no default
-  value; then, <var title="">n</var> must be converted to the shortest
-  possible string representing the number as a <a href=#valid-non-negative-integer>valid
-  non-negative integer</a> and that string must be used as the new
+  <p>If a reflecting IDL attribute has an unsigned integer type (<code>unsigned long</code>) that is
+  <dfn id=limited-to-only-non-negative-numbers-greater-than-zero>limited to only non-negative numbers greater than zero</dfn>, then the behavior is similar to
+  the previous case, but zero is not allowed. On getting, the content attribute must first be parsed
+  according to the <a href=#rules-for-parsing-non-negative-integers>rules for parsing non-negative integers</a>, and if that is successful,
+  and the value is in the range 1 to 2147483647 inclusive, the resulting value must be returned. If,
+  on the other hand, it fails or returns an out of range value, or if the attribute is absent, the
+  default value must be returned instead, or 1 if there is no default value. On setting, if the
+  value is zero, the user agent must throw an <code><a href=#indexsizeerror>IndexSizeError</a></code> exception. Otherwise,
+  first, if the new value is in the range 1 to 2147483647, then let <var title="">n</var> be the new
+  value, otherwise let <var title="">n</var> be the default value, or 1 if there is no default
+  value; then, <var title="">n</var> must be converted to the shortest possible string representing
+  the number as a <a href=#valid-non-negative-integer>valid non-negative integer</a> and that string must be used as the new
   content attribute value.</p>
   <!-- see previous paragraph for note about the weird range -->
  
-  <p>If a reflecting IDL attribute has a floating-point number type
-  (<code>double</code> or <code>unrestricted double</code>), then, on
-  getting, the content attribute must be parsed according to the
-  <a href=#rules-for-parsing-floating-point-number-values>rules for parsing floating-point number values</a>, and if
-  that is successful, the resulting value must be returned. If, on the
-  other hand, it fails, or if the attribute is absent, the default
-  value must be returned instead, or 0.0 if there is no default value.
-  On setting, the given value must be converted to the <a href=#best-representation-of-the-number-as-a-floating-point-number>best
-  representation of the number as a floating-point number</a> and
-  then that string must be used as the new content attribute
-  value.</p>
+  <p>If a reflecting IDL attribute has a floating-point number type (<code>double</code> or
+  <code>unrestricted double</code>), then, on getting, the content attribute must be parsed
+  according to the <a href=#rules-for-parsing-floating-point-number-values>rules for parsing floating-point number values</a>, and if that is
+  successful, the resulting value must be returned. If, on the other hand, it fails, or if the
+  attribute is absent, the default value must be returned instead, or 0.0 if there is no default
+  value. On setting, the given value must be converted to the <a href=#best-representation-of-the-number-as-a-floating-point-number>best representation of the
+  number as a floating-point number</a> and then that string must be used as the new content
+  attribute value.</p>
 
-  <p>If a reflecting IDL attribute has a floating-point number type
-  (<code>double</code> or <code>unrestricted double</code>) that is
-  <dfn id=limited-to-numbers-greater-than-zero>limited to numbers greater than zero</dfn>, then the behavior
-  is similar to the previous case, but zero and negative values are
-  not allowed. On getting, the content attribute must be parsed
-  according to the <a href=#rules-for-parsing-floating-point-number-values>rules for parsing floating-point number
-  values</a>, and if that is successful and the value is greater
-  than 0.0, the resulting value must be returned. If, on the other
-  hand, it fails or returns an out of range value, or if the attribute
-  is absent, the default value must be returned instead, or 0.0 if
-  there is no default value. On setting, if the value is less than or
-  equal to zero, then the value must be ignored. Otherwise, the given
-  value must be converted to the <a href=#best-representation-of-the-number-as-a-floating-point-number>best representation of the
-  number as a floating-point number</a> and then that string must
-  be used as the new content attribute value.</p>
+  <p>If a reflecting IDL attribute has a floating-point number type (<code>double</code> or
+  <code>unrestricted double</code>) that is <dfn id=limited-to-numbers-greater-than-zero>limited to numbers greater than zero</dfn>, then
+  the behavior is similar to the previous case, but zero and negative values are not allowed. On
+  getting, the content attribute must be parsed according to the <a href=#rules-for-parsing-floating-point-number-values>rules for parsing
+  floating-point number values</a>, and if that is successful and the value is greater than 0.0,
+  the resulting value must be returned. If, on the other hand, it fails or returns an out of range
+  value, or if the attribute is absent, the default value must be returned instead, or 0.0 if there
+  is no default value. On setting, if the value is less than or equal to zero, then the value must
+  be ignored. Otherwise, the given value must be converted to the <a href=#best-representation-of-the-number-as-a-floating-point-number>best representation of the
+  number as a floating-point number</a> and then that string must be used as the new content
+  attribute value.</p>
 
-  <p class=note>The values Infinity and Not-a-Number (NaN) values
-  throw an exception on setting, as defined in the Web IDL
-  specification. <a href=#refsWEBIDL>[WEBIDL]</a></p>
+  <p class=note>The values Infinity and Not-a-Number (NaN) values throw an exception on setting,
+  as defined in the Web IDL specification. <a href=#refsWEBIDL>[WEBIDL]</a></p>
 
-  <p>If a reflecting IDL attribute has the type
-  <code><a href=#domtokenlist>DOMTokenList</a></code> or <code><a href=#domsettabletokenlist>DOMSettableTokenList</a></code>, then
-  on getting it must return a <code><a href=#domtokenlist>DOMTokenList</a></code> or
-  <code><a href=#domsettabletokenlist>DOMSettableTokenList</a></code> object (as appropriate) whose
-  associated element is the element in question and whose associated
-  attribute's local name is the name of the attribute in question.
-  The same
-  <code><a href=#domtokenlist>DOMTokenList</a></code> or <code><a href=#domsettabletokenlist>DOMSettableTokenList</a></code>
-  object must be returned every time for each attribute.</p>
+  <p>If a reflecting IDL attribute has the type <code><a href=#domtokenlist>DOMTokenList</a></code> or
+  <code><a href=#domsettabletokenlist>DOMSettableTokenList</a></code>, then on getting it must return a <code><a href=#domtokenlist>DOMTokenList</a></code> or
+  <code><a href=#domsettabletokenlist>DOMSettableTokenList</a></code> object (as appropriate) whose associated element is the element
+  in question and whose associated attribute's local name is the name of the attribute in question.
+  The same <code><a href=#domtokenlist>DOMTokenList</a></code> or <code><a href=#domsettabletokenlist>DOMSettableTokenList</a></code> object must be returned
+  every time for each attribute.</p>
 
-  <p>If a reflecting IDL attribute has the type
-  <code><a href=#htmlelement>HTMLElement</a></code>, or an interface that descends from
-  <code><a href=#htmlelement>HTMLElement</a></code>, then, on getting, it must run the
-  following algorithm (stopping at the first point where a value is
-  returned):</p>
+  <p>If a reflecting IDL attribute has the type <code><a href=#htmlelement>HTMLElement</a></code>, or an interface that
+  descends from <code><a href=#htmlelement>HTMLElement</a></code>, then, on getting, it must run the following algorithm
+  (stopping at the first point where a value is returned):</p>
 
-  <ol><li>If the corresponding content attribute is absent, then the
-   IDL attribute must return null.</li>
+  <ol><li>If the corresponding content attribute is absent, then the IDL attribute must return
+   null.</li>
 
-   <li>Let <var title="">candidate</var> be the element that the <code title=dom-Document-getElementById><a href=#dom-document-getelementbyid>document.getElementById()</a></code> method
-   would find when called on the content attribute's document if it
-   were passed as its argument the current value of the corresponding
-   content attribute.</li>
+   <li>Let <var title="">candidate</var> be the element that the <code title=dom-Document-getElementById><a href=#dom-document-getelementbyid>document.getElementById()</a></code> method would find when
+   called on the content attribute's document if it were passed as its argument the current value of
+   the corresponding content attribute.</li>
 
-   <li>If <var title="">candidate</var> is null, or if it is not
-   type-compatible with the IDL attribute, then the IDL attribute must
-   return null.</li>
+   <li>If <var title="">candidate</var> is null, or if it is not type-compatible with the IDL
+   attribute, then the IDL attribute must return null.</li>
 
    <li>Otherwise, it must return <var title="">candidate</var>.</li>
 
-  </ol><p>On setting, if the given element has an <code title=attr-id><a href=#the-id-attribute>id</a></code> attribute, and has the same <a href=#home-subtree>home
-  subtree</a> as the element of the attribute being set, and the
-  given element is the first element in that <a href=#home-subtree>home subtree</a>
-  whose <a href=#concept-id title=concept-ID>ID</a> is the value of that <code title=attr-id><a href=#the-id-attribute>id</a></code> attribute, then the content attribute must
-  be set to the value of that <code title=attr-id><a href=#the-id-attribute>id</a></code>
-  attribute. Otherwise, the content attribute must be set to the empty
-  string.</p>
+  </ol><p>On setting, if the given element has an <code title=attr-id><a href=#the-id-attribute>id</a></code> attribute, and has the
+  same <a href=#home-subtree>home subtree</a> as the element of the attribute being set, and the given element is
+  the first element in that <a href=#home-subtree>home subtree</a> whose <a href=#concept-id title=concept-ID>ID</a> is
+  the value of that <code title=attr-id><a href=#the-id-attribute>id</a></code> attribute, then the content attribute must be
+  set to the value of that <code title=attr-id><a href=#the-id-attribute>id</a></code> attribute. Otherwise, the content
+  attribute must be set to the empty string.</p>
 
   </div>
 
@@ -9782,8 +9732,20 @@
     bidirectional character type AL or R, and there is no character of bidirectional character type
     L anywhere before it in the element's <a href=#concept-fe-value title=concept-fe-value>value</a>, then
     <a href=#the-directionality>the directionality</a> of the element is '<a href=#concept-rtl title=concept-rtl>rtl</a>'.
-    Otherwise, <a href=#the-directionality>the directionality</a> of the element is '<a href=#concept-ltr title=concept-ltr>ltr</a>'. <a href=#refsBIDI>[BIDI]</a></p>
+    <a href=#refsBIDI>[BIDI]</a></p>
 
+    <p>If the element's <a href=#concept-fe-value title=concept-fe-value>value</a> contains a character of
+    bidirectional character type L, and there is no character of bidirectional character type
+    AL or R anywhere before it in the element's <a href=#concept-fe-value title=concept-fe-value>value</a>, then
+    <a href=#the-directionality>the directionality</a> of the element is '<a href=#concept-ltr title=concept-ltr>ltr</a>'.
+    <a href=#refsBIDI>[BIDI]</a></p>
+
+    <p>Otherwise, if the element is a <a href=#root-element>root element</a>, <a href=#the-directionality>the directionality</a> of
+    the element is '<a href=#concept-ltr title=concept-ltr>ltr</a>'.</p>
+
+    <p>Otherwise, <a href=#the-directionality>the directionality</a> of the element is the same as the element's parent
+    element's <a href=#the-directionality title="the directionality">directionality</a>.</p>
+
    </dd>
 
 
@@ -9818,8 +9780,15 @@
     </ul><p>If such a character is found and it is of bidirectional character type AL or R, <a href=#the-directionality>the
     directionality</a> of the element is '<a href=#concept-rtl title=concept-rtl>rtl</a>'.</p>
 
-    <p>Otherwise, <a href=#the-directionality>the directionality</a> of the element is '<a href=#concept-ltr title=concept-ltr>ltr</a>'.</p>
+    <p>If such a character is found and it is of bidirectional character type L, <a href=#the-directionality>the
+    directionality</a> of the element is '<a href=#concept-ltr title=concept-ltr>ltr</a>'.</p>
 
+    <p>Otherwise, if the element is a <a href=#root-element>root element</a> or a <code><a href=#the-bdi-element>bdi</a></code> element,
+    <a href=#the-directionality>the directionality</a> of the element is '<a href=#concept-ltr title=concept-ltr>ltr</a>'.</p>
+
+    <p>Otherwise, <a href=#the-directionality>the directionality</a> of the element is the same as the element's parent
+    element's <a href=#the-directionality title="the directionality">directionality</a>.</p>
+
    </dd>
 
 
@@ -18729,26 +18698,22 @@
    <dd><a href=#global-attributes>Global attributes</a></dd>
    <dt><a href=#element-dfn-dom title=element-dfn-dom>DOM interface</a>:</dt><!--TOPIC:DOM APIs-->
    <dd>Uses <code><a href=#htmlelement>HTMLElement</a></code>.</dd>
-  </dl><!--TOPIC:HTML--><!-- v2: Add a <credit> element for photo credits --><p>The <code><a href=#the-figure-element>figure</a></code> element <a href=#represents>represents</a> some
-  <a href=#flow-content>flow content</a>, optionally with a caption, that is
-  self-contained and is typically referenced as a single unit from the
-  main flow of the document.</p>
+  </dl><!--TOPIC:HTML--><!-- v2: Add a <credit> element for photo credits --><p>The <code><a href=#the-figure-element>figure</a></code> element <a href=#represents>represents</a> some <a href=#flow-content>flow content</a>,
+  optionally with a caption, that is self-contained and is typically referenced as a single unit
+  from the main flow of the document.</p>
 
-  <p>The element can thus be used to annotate illustrations, diagrams,
-  photos, code listings, etc, that are referred to from the main
-  content of the document, but that could, without affecting the flow
-  of the document, be moved away from that primary content, e.g. to
-  the side of the page, to dedicated pages, or to an appendix.</p>
+  <p>The element can thus be used to annotate illustrations, diagrams, photos, code listings, etc,
+  that are referred to from the main content of the document, but that could, without affecting the
+  flow of the document, be moved away from that primary content, e.g. to the side of the page, to
+  dedicated pages, or to an appendix.</p>
 
-  <p>The <span class=impl>first</span> <code><a href=#the-figcaption-element>figcaption</a></code>
-  element child of the element, if any, represents the caption of the
-  <code><a href=#the-figure-element>figure</a></code> element's contents. If there is no child
+  <p>The <span class=impl>first</span> <code><a href=#the-figcaption-element>figcaption</a></code> element child of the element, if
+  any, represents the caption of the <code><a href=#the-figure-element>figure</a></code> element's contents. If there is no child
   <code><a href=#the-figcaption-element>figcaption</a></code> element, then there is no caption.</p>
 
   <div class=example>
 
-   <p>This example shows the <code><a href=#the-figure-element>figure</a></code> element to mark up a
-   code listing.</p>
+   <p>This example shows the <code><a href=#the-figure-element>figure</a></code> element to mark up a code listing.</p>
 
    <pre><p>In <a href="#l4">listing 4</a> we see the primary core interface
 API declaration.</p>
@@ -18766,8 +18731,7 @@
 
   <div class=example>
 
-   <p>Here we see a <code><a href=#the-figure-element>figure</a></code> element to mark up a
-   photo.</p>
+   <p>Here we see a <code><a href=#the-figure-element>figure</a></code> element to mark up a photo.</p>
 
    <pre><figure>
  <img src="bubbles-work.jpeg"
@@ -18780,8 +18744,8 @@
 
   <div class=example>
 
-   <p>In this example, we see an image that is <em>not</em>
-   a figure, as well as an image and a video that are.</p>
+   <p>In this example, we see an image that is <em>not</em> a figure, as well as an image and a
+   video that are.</p>
 
    <pre><h2>Malinko's comics</h2>
 
@@ -18813,8 +18777,7 @@
 
   <div class=example>
 
-   <p>Here, a part of a poem is marked up using
-   <code><a href=#the-figure-element>figure</a></code>.</p>
+   <p>Here, a part of a poem is marked up using <code><a href=#the-figure-element>figure</a></code>.</p>
 
    <pre><figure>
  <p>'Twas brillig, and the slithy toves<br>
@@ -18828,10 +18791,9 @@
 
   <div class=example>
 
-   <p>In this example, which could be part of a much larger work
-   discussing a castle, nested <code><a href=#the-figure-element>figure</a></code> elements are used
-   to provide both a group caption and individual captions for each
-   figure in the group:</p>
+   <p>In this example, which could be part of a much larger work discussing a castle, nested
+   <code><a href=#the-figure-element>figure</a></code> elements are used to provide both a group caption and individual captions for
+   each figure in the group:</p>
 
    <pre><figure>
  <figcaption>The castle through the ages: 1423, 1858, and 1999 respectively.</figcaption>
@@ -18853,10 +18815,8 @@
 
   <div class=example>
 
-   <p>The previous example could also be more succintly written as
-   follows (using <code title=attr-title><a href=#attr-title>title</a></code> attributes in
-   place of the nested <code><a href=#the-figure-element>figure</a></code>/<code><a href=#the-figcaption-element>figcaption</a></code>
-   pairs):</p>
+   <p>The previous example could also be more succintly written as follows (using <code title=attr-title><a href=#attr-title>title</a></code> attributes in place of the nested
+   <code><a href=#the-figure-element>figure</a></code>/<code><a href=#the-figcaption-element>figcaption</a></code> pairs):</p>
 
    <pre><figure>
  <img src="castle1423.jpeg" title="Etching. Anonymous, ca. 1423."
@@ -18885,10 +18845,8 @@
    <dd><a href=#global-attributes>Global attributes</a></dd>
    <dt><a href=#element-dfn-dom title=element-dfn-dom>DOM interface</a>:</dt><!--TOPIC:DOM APIs-->
    <dd>Uses <code><a href=#htmlelement>HTMLElement</a></code>.</dd>
-  </dl><!--TOPIC:HTML--><p>The <code><a href=#the-figcaption-element>figcaption</a></code> element <a href=#represents>represents</a> a
-  caption or legend for the rest of the contents of the
-  <code><a href=#the-figcaption-element>figcaption</a></code> element's parent <code><a href=#the-figure-element>figure</a></code>
-  element<span class=impl>, if any</span>.</p>
+  </dl><!--TOPIC:HTML--><p>The <code><a href=#the-figcaption-element>figcaption</a></code> element <a href=#represents>represents</a> a caption or legend for the rest of
+  the contents of the <code><a href=#the-figcaption-element>figcaption</a></code> element's parent <code><a href=#the-figure-element>figure</a></code> element<span class=impl>, if any</span>.</p>
 
 
 
@@ -23611,14 +23569,12 @@
 
   <h6 id=a-graphical-representation-of-some-of-the-surrounding-text><span class=secno>4.8.1.1.6 </span>A graphical representation of some of the surrounding text</h6>
 
-  <p>In many cases, the image is actually just supplementary, and
-  its presence merely reinforces the surrounding text. In these
-  cases, the <code title=attr-img-alt><a href=#attr-img-alt>alt</a></code> attribute must be
+  <p>In many cases, the image is actually just supplementary, and its presence merely reinforces the
+  surrounding text. In these cases, the <code title=attr-img-alt><a href=#attr-img-alt>alt</a></code> attribute must be
   present but its value must be the empty string.</p>
 
-  <p>In general, an image falls into this category if removing the
-  image doesn't make the page any less useful, but including the
-  image makes it a lot easier for users of visual browsers to
+  <p>In general, an image falls into this category if removing the image doesn't make the page any
+  less useful, but including the image makes it a lot easier for users of visual browsers to
   understand the concept.</p>
 
   <div class=example>
@@ -23632,12 +23588,10 @@
 passes data to the Tokenizer.</p>
 <strong><p><img src="images/parsing-model-overview.png" alt=""></p></strong></pre>
 
-   <p>In these cases, it would be wrong to include alternative text
-   that consists of just a caption. If a caption is to be included,
-   then either the <code title=attr-title><a href=#attr-title>title</a></code> attribute can
-   be used, or the <code><a href=#the-figure-element>figure</a></code> and <code><a href=#the-figcaption-element>figcaption</a></code>
-   elements can be used. In the latter case, the image would in fact
-   be a phrase or paragraph with an alternative graphical
+   <p>In these cases, it would be wrong to include alternative text that consists of just a caption.
+   If a caption is to be included, then either the <code title=attr-title><a href=#attr-title>title</a></code> attribute
+   can be used, or the <code><a href=#the-figure-element>figure</a></code> and <code><a href=#the-figcaption-element>figcaption</a></code> elements can be used. In the
+   latter case, the image would in fact be a phrase or paragraph with an alternative graphical
    representation, and would thus require alternative text.</p>
 
    <pre><!-- Using the title="" attribute -->
@@ -40307,24 +40261,20 @@
   // <a href="#HTMLTableCaptionElement-partial">also has obsolete members</a>
 };</pre>
    </dd>
-  </dl><!--TOPIC:HTML--><p>The <code><a href=#the-caption-element>caption</a></code> element <a href=#represents>represents</a> the title of the
-  <code><a href=#the-table-element>table</a></code> that is its parent, if it has a parent and that
-  is a <code><a href=#the-table-element>table</a></code> element.</p>
+  </dl><!--TOPIC:HTML--><p>The <code><a href=#the-caption-element>caption</a></code> element <a href=#represents>represents</a> the title of the <code><a href=#the-table-element>table</a></code>
+  that is its parent, if it has a parent and that is a <code><a href=#the-table-element>table</a></code> element.</p>
 
   <div class=impl>
 
-  <p>The <code><a href=#the-caption-element>caption</a></code> element takes part in the <a href=#table-model>table
-  model</a>.</p>
+  <p>The <code><a href=#the-caption-element>caption</a></code> element takes part in the <a href=#table-model>table model</a>.</p>
 
   </div>
 
-  <p>When a <code><a href=#the-table-element>table</a></code> element is the only content in a
-  <code><a href=#the-figure-element>figure</a></code> element other than the <code><a href=#the-figcaption-element>figcaption</a></code>,
-  the <code><a href=#the-caption-element>caption</a></code> element should be omitted in favor of the
-  <code><a href=#the-figcaption-element>figcaption</a></code>.</p>
+  <p>When a <code><a href=#the-table-element>table</a></code> element is the only content in a <code><a href=#the-figure-element>figure</a></code> element other
+  than the <code><a href=#the-figcaption-element>figcaption</a></code>, the <code><a href=#the-caption-element>caption</a></code> element should be omitted in favor of
+  the <code><a href=#the-figcaption-element>figcaption</a></code>.</p>
 
-  <p>A caption can introduce context for a table, making it
-  significantly easier to understand.</p>
+  <p>A caption can introduce context for a table, making it significantly easier to understand.</p>
 
   <div class=example>
 
@@ -40337,9 +40287,8 @@
     <tr><th> 4 <td> 5 <td> 6 <td> 7 <td> 8 <td> 9 <td> 10
     <tr><th> 5 <td> 6 <td> 7 <td> 8 <td> 9 <td> 10 <td> 11
     <tr><th> 6 <td> 7 <td> 8 <td> 9 <td> 10 <td> 11 <td> 12
-   </table><p>In the abstract, this table is not clear. However, with a
-   caption giving the table's number (for reference in the main prose)
-   and explaining its use, it makes more sense:</p>
+   </table><p>In the abstract, this table is not clear. However, with a caption giving the table's number
+   (for reference in the main prose) and explaining its use, it makes more sense:</p>
 
    <pre><caption>
 <p>Table 1.
@@ -44549,44 +44498,39 @@
   readonly attribute <a href=#htmlelement>HTMLElement</a>? <a href=#dom-label-control title=dom-label-control>control</a>;
 };</pre>
    </dd>
-  </dl><!--TOPIC:HTML--><p>The <code><a href=#the-label-element>label</a></code> <a href=#represents>represents</a> a caption in a
-  user interface. The caption can be associated with a specific form
-  control<span class=impl>, known as the <code><a href=#the-label-element>label</a></code>
-  element's <dfn id=labeled-control>labeled control</dfn></span>, either using <code title=attr-label-for><a href=#attr-label-for>for</a></code> attribute, or by putting the form
-  control inside the <code><a href=#the-label-element>label</a></code> element itself.</p>
+  </dl><!--TOPIC:HTML--><p>The <code><a href=#the-label-element>label</a></code> element <a href=#represents>represents</a> a caption in a user interface. The
+  caption can be associated with a specific form control<span class=impl>, known as the
+  <code><a href=#the-label-element>label</a></code> element's <dfn id=labeled-control>labeled control</dfn></span>, either using the <code title=attr-label-for><a href=#attr-label-for>for</a></code> attribute, or by putting the form control inside the
+  <code><a href=#the-label-element>label</a></code> element itself.</p>
 
   <div class=impl>
 
-  <p>Except where otherwise specified by the following rules, a
-  <code><a href=#the-label-element>label</a></code> element has no <a href=#labeled-control>labeled control</a>.</p>
+  <p>Except where otherwise specified by the following rules, a <code><a href=#the-label-element>label</a></code> element has no
+  <a href=#labeled-control>labeled control</a>.</p>
 
   </div>
 
-  <p>The <dfn id=attr-label-for title=attr-label-for><code>for</code></dfn> attribute
-  may be specified to indicate a form control with which the caption
-  is to be associated. If the attribute is specified, the attribute's
-  value must be the <a href=#concept-id title=concept-id>ID</a> of a <a href=#category-label title=category-label>labelable element</a> in the same
-  <code><a href=#document>Document</a></code> as the <code><a href=#the-label-element>label</a></code> element. <span class=impl>If the attribute is specified and there is an element
-  in the <code><a href=#document>Document</a></code> whose <a href=#concept-id title=concept-id>ID</a> is equal to the value of the <code title=attr-label-for><a href=#attr-label-for>for</a></code> attribute, and the first such
-  element is a <a href=#category-label title=category-label>labelable element</a>,
-  then that element is the <code><a href=#the-label-element>label</a></code> element's <a href=#labeled-control>labeled
-  control</a>.</span></p>
+  <p>The <dfn id=attr-label-for title=attr-label-for><code>for</code></dfn> attribute may be specified to indicate a
+  form control with which the caption is to be associated. If the attribute is specified, the
+  attribute's value must be the <a href=#concept-id title=concept-id>ID</a> of a <a href=#category-label title=category-label>labelable element</a> in the same <code><a href=#document>Document</a></code> as the
+  <code><a href=#the-label-element>label</a></code> element. <span class=impl>If the attribute is specified and there is an
+  element in the <code><a href=#document>Document</a></code> whose <a href=#concept-id title=concept-id>ID</a> is equal to the
+  value of the <code title=attr-label-for><a href=#attr-label-for>for</a></code> attribute, and the first such element is a
+  <a href=#category-label title=category-label>labelable element</a>, then that element is the <code><a href=#the-label-element>label</a></code>
+  element's <a href=#labeled-control>labeled control</a>.</span></p>
 
   <div class=impl>
 
-  <p>If the <code title=attr-label-for><a href=#attr-label-for>for</a></code> attribute is not
-  specified, but the <code><a href=#the-label-element>label</a></code> element has a <a href=#category-label title=category-label>labelable element</a> descendant, then the
-  first such descendant in <a href=#tree-order>tree order</a> is the
-  <code><a href=#the-label-element>label</a></code> element's <a href=#labeled-control>labeled control</a>.</p>
+  <p>If the <code title=attr-label-for><a href=#attr-label-for>for</a></code> attribute is not specified, but the
+  <code><a href=#the-label-element>label</a></code> element has a <a href=#category-label title=category-label>labelable element</a> descendant,
+  then the first such descendant in <a href=#tree-order>tree order</a> is the <code><a href=#the-label-element>label</a></code> element's
+  <a href=#labeled-control>labeled control</a>.</p>
 
-  <p>The <code><a href=#the-label-element>label</a></code> element's exact default presentation and
-  behavior, in particular what its <a href=#activation-behavior>activation behavior</a>
-  might be, if anything, should match the platform's label behavior.
-  The <a href=#activation-behavior>activation behavior</a> of a <code><a href=#the-label-element>label</a></code> element
-  for events targeted at <a href=#interactive-content>interactive content</a> descendants
-  of a <code><a href=#the-label-element>label</a></code> element, and any descendants of those
-  <a href=#interactive-content>interactive content</a> descendants, must be to do
-  nothing.</p>
+  <p>The <code><a href=#the-label-element>label</a></code> element's exact default presentation and behavior, in particular what
+  its <a href=#activation-behavior>activation behavior</a> might be, if anything, should match the platform's label
+  behavior. The <a href=#activation-behavior>activation behavior</a> of a <code><a href=#the-label-element>label</a></code> element for events targeted
+  at <a href=#interactive-content>interactive content</a> descendants of a <code><a href=#the-label-element>label</a></code> element, and any
+  descendants of those <a href=#interactive-content>interactive content</a> descendants, must be to do nothing.</p>
 
   <!-- activation behaviour need not be dependent on whether the
   labeled control is being rendered:
@@ -44595,30 +44539,26 @@
 
   <div class=example>
 
-   <p>For example, on platforms where clicking a checkbox label checks
-   the checkbox, clicking the <code><a href=#the-label-element>label</a></code> in the following
-   snippet could trigger the user agent to <a href=#run-synthetic-click-activation-steps>run synthetic click
-   activation steps</a> on the <code><a href=#the-input-element>input</a></code> element, as if
-   the element itself had been triggered by the user:</p>
+   <p>For example, on platforms where clicking a checkbox label checks the checkbox, clicking the
+   <code><a href=#the-label-element>label</a></code> in the following snippet could trigger the user agent to <a href=#run-synthetic-click-activation-steps>run synthetic
+   click activation steps</a> on the <code><a href=#the-input-element>input</a></code> element, as if the element itself had
+   been triggered by the user:</p>
 
    <pre><label><input type=checkbox name=lost> Lost</label></pre>
 
-   <p>On other platforms, the behavior might be just to focus the
-   control, or do nothing.</p>
+   <p>On other platforms, the behavior might be just to focus the control, or do nothing.</p>
 
   </div>
 
   </div>
 
-  <p>The <code title=attr-fae-form><a href=#attr-fae-form>form</a></code> attribute is used to
-  explicitly associate the <code><a href=#the-label-element>label</a></code> element with its
-  <a href=#form-owner>form owner</a>.</p>
+  <p>The <code title=attr-fae-form><a href=#attr-fae-form>form</a></code> attribute is used to explicitly associate the
+  <code><a href=#the-label-element>label</a></code> element with its <a href=#form-owner>form owner</a>.</p>
 
   <div class=example>
 
-   <p>The following example shows three form controls each with a
-   label, two of which have small text showing the right format for
-   users to use.</p>
+   <p>The following example shows three form controls each with a label, two of which have small
+   text showing the right format for users to use.</p>
 
    <pre><p><label>Full name: <input name=fn> <small>Format: First Last</small></label></p>
 <p><label>Age: <input name=age type=number min=0></label></p>
@@ -44637,15 +44577,14 @@
 
   </dl><div class=impl>
 
-  <p>The <dfn id=dom-label-htmlfor title=dom-label-htmlFor><code>htmlFor</code></dfn> IDL
-  attribute must <a href=#reflect>reflect</a> the <code title=attr-label-for><a href=#attr-label-for>for</a></code> content attribute.</p>
+  <p>The <dfn id=dom-label-htmlfor title=dom-label-htmlFor><code>htmlFor</code></dfn> IDL attribute must
+  <a href=#reflect>reflect</a> the <code title=attr-label-for><a href=#attr-label-for>for</a></code> content attribute.</p>
 
-  <p>The <dfn id=dom-label-control title=dom-label-control><code>control</code></dfn> IDL
-  attribute must return the <code><a href=#the-label-element>label</a></code> element's <a href=#labeled-control>labeled
-  control</a>, if any, or null if there isn't one.</p>
+  <p>The <dfn id=dom-label-control title=dom-label-control><code>control</code></dfn> IDL attribute must return the
+  <code><a href=#the-label-element>label</a></code> element's <a href=#labeled-control>labeled control</a>, if any, or null if there isn't one.</p>
 
-  <p>The <code title=dom-fae-form><a href=#dom-fae-form>form</a></code> IDL attribute is part
-  of the element's forms API.</p>
+  <p>The <code title=dom-fae-form><a href=#dom-fae-form>form</a></code> IDL attribute is part of the element's forms
+  API.</p>
 
   </div>
 
@@ -44653,20 +44592,17 @@
 
    <dd>
 
-    <p>Returns a <code><a href=#nodelist>NodeList</a></code> of all the <code><a href=#the-label-element>label</a></code>
-    elements that the form control is associated with.</p>
+    <p>Returns a <code><a href=#nodelist>NodeList</a></code> of all the <code><a href=#the-label-element>label</a></code> elements that the form control
+    is associated with.</p>
 
    </dd>
 
   </dl><div class=impl>
 
-  <p><a href=#category-label title=category-label>Labelable elements</a> have a
-  <code><a href=#nodelist>NodeList</a></code> object associated with them that represents
-  the list of <code><a href=#the-label-element>label</a></code> elements, in <a href=#tree-order>tree order</a>,
-  whose <a href=#labeled-control>labeled control</a> is the element in question. The
-  <dfn id=dom-lfe-labels title=dom-lfe-labels><code>labels</code></dfn> IDL attribute
-  of <a href=#category-label title=category-label>labelable elements</a>, on
-  getting, must return that <code><a href=#nodelist>NodeList</a></code> object.</p>
+  <p><a href=#category-label title=category-label>Labelable elements</a> have a <code><a href=#nodelist>NodeList</a></code> object
+  associated with them that represents the list of <code><a href=#the-label-element>label</a></code> elements, in <a href=#tree-order>tree
+  order</a>, whose <a href=#labeled-control>labeled control</a> is the element in question. The <dfn id=dom-lfe-labels title=dom-lfe-labels><code>labels</code></dfn> IDL attribute of <a href=#category-label title=category-label>labelable elements</a>, on getting, must return that
+  <code><a href=#nodelist>NodeList</a></code> object.</p>
 
   </div>
 <!--TOPIC:HTML-->

Modified: source
===================================================================
--- source	2013-04-10 23:10:05 UTC (rev 7804)
+++ source	2013-04-10 23:28:14 UTC (rev 7805)
@@ -6780,13 +6780,10 @@
   <h3>Common DOM interfaces</h3>
 
   <h4>Reflecting content attributes in IDL attributes</h4>
-<!--CLEANUP-->
 
-  <p>Some IDL attributes are defined to <dfn>reflect</dfn> a
-  particular content attribute. This means that on getting, the IDL
-  attribute returns the current value of the content attribute, and on
-  setting, the IDL attribute changes the value of the content
-  attribute to the given value.</p>
+  <p>Some IDL attributes are defined to <dfn>reflect</dfn> a particular content attribute. This
+  means that on getting, the IDL attribute returns the current value of the content attribute, and
+  on setting, the IDL attribute changes the value of the content attribute to the given value.</p>
 
 <!-- v2 for completeness: (also search for REFLECTIDL)
   <p class="note">A list of <span>reflecting IDL attributes</span> and
@@ -6795,206 +6792,156 @@
 
   <div class="impl">
 
-  <p>In general, on getting, if the content attribute is not present,
-  the IDL attribute must act as if the content attribute's value is
-  the empty string; and on setting, if the content attribute is not
-  present, it must first be added.</p>
+  <p>In general, on getting, if the content attribute is not present, the IDL attribute must act as
+  if the content attribute's value is the empty string; and on setting, if the content attribute is
+  not present, it must first be added.</p>
 
-  <p>If a reflecting IDL attribute is a <code>DOMString</code>
-  attribute whose content attribute is defined to contain a
-  <span>URL</span>, then on getting, the IDL attribute must <span
-  title="resolve a url">resolve</span> the value of the content
-  attribute relative to the element and return the resulting
-  <span>absolute URL</span> if that was successful, or the empty
-  string otherwise; and on setting, must set the content attribute to
-  the specified literal value. If the content attribute is absent, the
-  IDL attribute must return the default value, if the content
+  <p>If a reflecting IDL attribute is a <code>DOMString</code> attribute whose content attribute is
+  defined to contain a <span>URL</span>, then on getting, the IDL attribute must <span
+  title="resolve a url">resolve</span> the value of the content attribute relative to the element
+  and return the resulting <span>absolute URL</span> if that was successful, or the empty string
+  otherwise; and on setting, must set the content attribute to the specified literal value. If the
+  content attribute is absent, the IDL attribute must return the default value, if the content
   attribute has one, or else the empty string.</p>
 
-  <p>If a reflecting IDL attribute is a <code>DOMString</code>
-  attribute whose content attribute is defined to contain one or more
-  <span title="URL">URLs</span>, then on getting, the IDL attribute
-  must <span title="split a string on spaces">split the content
-  attribute on spaces</span> and return the concatenation of <span
-  title="resolve a URL">resolving</span> each token URL to an
-  <span>absolute URL</span> relative to the element, with a single
-  U+0020 SPACE character between each URL, ignoring any tokens that
-  did not resolve successfully. If the content attribute is absent,
-  the IDL attribute must return the default value, if the content
-  attribute has one, or else the empty string. On setting, the IDL
-  attribute must set the content attribute to the specified literal
-  value.</p>
+  <p>If a reflecting IDL attribute is a <code>DOMString</code> attribute whose content attribute is
+  defined to contain one or more <span title="URL">URLs</span>, then on getting, the IDL attribute
+  must <span title="split a string on spaces">split the content attribute on spaces</span> and
+  return the concatenation of <span title="resolve a URL">resolving</span> each token URL to an
+  <span>absolute URL</span> relative to the element, with a single U+0020 SPACE character between
+  each URL, ignoring any tokens that did not resolve successfully. If the content attribute is
+  absent, the IDL attribute must return the default value, if the content attribute has one, or else
+  the empty string. On setting, the IDL attribute must set the content attribute to the specified
+  literal value.</p>
 
-  <p>If a reflecting IDL attribute is a <code>DOMString</code>
-  attribute whose content attribute is an <span>enumerated
-  attribute</span>, and the IDL attribute is <dfn>limited to only
-  known values</dfn>, then, on getting, the IDL attribute must return
-  the conforming value associated with the state the attribute is in
-  (in its canonical case), if any, or the empty string if the
-  attribute is in a state that has no associated keyword value or if
-  the attribute is not in a state (e.g. the attribute is missing and
-  there is no <i>missing value default</i>); and on setting, the
+  <p>If a reflecting IDL attribute is a <code>DOMString</code> attribute whose content attribute is
+  an <span>enumerated attribute</span>, and the IDL attribute is <dfn>limited to only known
+  values</dfn>, then, on getting, the IDL attribute must return the conforming value associated with
+  the state the attribute is in (in its canonical case), if any, or the empty string if the
+  attribute is in a state that has no associated keyword value or if the attribute is not in a state
+  (e.g. the attribute is missing and there is no <i>missing value default</i>); and on setting, the
   content attribute must be set to the specified new value.</p>
 
-  <p>If a reflecting IDL attribute is a <code>DOMString</code>
-  attribute but doesn't fall into any of the above categories, then
-  the getting and setting must be done in a transparent,
+  <p>If a reflecting IDL attribute is a <code>DOMString</code> attribute but doesn't fall into any
+  of the above categories, then the getting and setting must be done in a transparent,
   case-preserving manner.</p>
 
-  <p>If a reflecting IDL attribute is a <code title="">boolean</code>
-  attribute, then on getting the IDL attribute must return true if the
-  content attribute is set, and false if it is absent. On setting, the
-  content attribute must be removed if the IDL attribute is set to
-  false, and must be set to the empty string if the IDL attribute is
-  set to true. (This corresponds to the rules for <span title="boolean
-  attribute">boolean content attributes</span>.)</p>
+  <p>If a reflecting IDL attribute is a <code title="">boolean</code> attribute, then on getting the
+  IDL attribute must return true if the content attribute is set, and false if it is absent. On
+  setting, the content attribute must be removed if the IDL attribute is set to false, and must be
+  set to the empty string if the IDL attribute is set to true. (This corresponds to the rules for
+  <span title="boolean attribute">boolean content attributes</span>.)</p>
 
-  <p>If a reflecting IDL attribute has a signed integer type
-  (<code>long</code>) then, on getting, the content attribute must be
-  parsed according to the <span title="rules for parsing
-  integers">rules for parsing signed integers</span>, and if that is
-  successful, and the value is in the range of the IDL attribute's
-  type, the resulting value must be returned. If, on the other hand,
-  it fails or returns an out of range value, or if the attribute is
-  absent, then the default value must be returned instead, or 0 if
-  there is no default value. On setting, the given value must be
-  converted to the shortest possible string representing the number as
-  a <span>valid integer</span> and then that string must be used as
-  the new content attribute value.</p>
+  <p>If a reflecting IDL attribute has a signed integer type (<code>long</code>) then, on getting,
+  the content attribute must be parsed according to the <span title="rules for parsing
+  integers">rules for parsing signed integers</span>, and if that is successful, and the value is in
+  the range of the IDL attribute's type, the resulting value must be returned. If, on the other
+  hand, it fails or returns an out of range value, or if the attribute is absent, then the default
+  value must be returned instead, or 0 if there is no default value. On setting, the given value
+  must be converted to the shortest possible string representing the number as a <span>valid
+  integer</span> and then that string must be used as the new content attribute value.</p>
 
-  <p>If a reflecting IDL attribute has a signed integer type
-  (<code>long</code>) that is <dfn>limited to only non-negative
-  numbers</dfn> then, on getting, the content attribute must be parsed
-  according to the <span>rules for parsing non-negative
-  integers</span>, and if that is successful, and the value is in the
-  range of the IDL attribute's type, the resulting value must be
-  returned. If, on the other hand, it fails or returns an out of range
-  value, or if the attribute is absent, the default value must be
-  returned instead, or &#x2212;1 if there is no default value. On
-  setting, if the value is negative, the user agent must throw an
-  <code>IndexSizeError</code> exception. Otherwise, the given value
-  must be converted to the shortest possible string representing the
-  number as a <span>valid non-negative integer</span> and then that
-  string must be used as the new content attribute value.</p>
+  <p>If a reflecting IDL attribute has a signed integer type (<code>long</code>) that is
+  <dfn>limited to only non-negative numbers</dfn> then, on getting, the content attribute must be
+  parsed according to the <span>rules for parsing non-negative integers</span>, and if that is
+  successful, and the value is in the range of the IDL attribute's type, the resulting value must be
+  returned. If, on the other hand, it fails or returns an out of range value, or if the attribute is
+  absent, the default value must be returned instead, or &#x2212;1 if there is no default value. On
+  setting, if the value is negative, the user agent must throw an <code>IndexSizeError</code>
+  exception. Otherwise, the given value must be converted to the shortest possible string
+  representing the number as a <span>valid non-negative integer</span> and then that string must be
+  used as the new content attribute value.</p>
 
-  <p>If a reflecting IDL attribute has an <em>unsigned</em> integer
-  type (<code>unsigned long</code>) then, on getting, the content
-  attribute must be parsed according to the <span>rules for parsing
-  non-negative integers</span>, and if that is successful, and the
-  value is in the range 0 to 2147483647 inclusive, the resulting value
-  must be returned. If, on the other hand, it fails or returns an out
-  of range value, or if the attribute is absent, the default value
-  must be returned instead, or 0 if there is no default value. On
-  setting, first, if the new value is in the range 0 to 2147483647,
-  then let <var title="">n</var> be the new value, otherwise let <var
-  title="">n</var> be the default value, or 0 if there is no default
-  value; then, <var title="">n</var> must be converted to the shortest
-  possible string representing the number as a <span>valid
-  non-negative integer</span> and that string must be used as the new
-  content attribute value.</p>
+  <p>If a reflecting IDL attribute has an <em>unsigned</em> integer type (<code>unsigned
+  long</code>) then, on getting, the content attribute must be parsed according to the <span>rules
+  for parsing non-negative integers</span>, and if that is successful, and the value is in the range
+  0 to 2147483647 inclusive, the resulting value must be returned. If, on the other hand, it fails
+  or returns an out of range value, or if the attribute is absent, the default value must be
+  returned instead, or 0 if there is no default value. On setting, first, if the new value is in the
+  range 0 to 2147483647, then let <var title="">n</var> be the new value, otherwise let <var
+  title="">n</var> be the default value, or 0 if there is no default value; then, <var
+  title="">n</var> must be converted to the shortest possible string representing the number as a
+  <span>valid non-negative integer</span> and that string must be used as the new content attribute
+  value.</p>
   <!-- see http://www.w3.org/Bugs/Public/show_bug.cgi?id=10352
   https://bugzilla.mozilla.org/show_bug.cgi?id=586118 and
   https://www.w3.org/Bugs/Public/show_bug.cgi?id=17705 for why the
   range is clamped to 2147483647 rather the normal unsigned long
   maximum value of 4294967295 -->
 
-  <p>If a reflecting IDL attribute has an unsigned integer type
-  (<code>unsigned long</code>) that is <dfn>limited to only
-  non-negative numbers greater than zero</dfn>, then the behavior is
-  similar to the previous case, but zero is not allowed. On getting,
-  the content attribute must first be parsed according to the
-  <span>rules for parsing non-negative integers</span>, and if that is
-  successful, and the value is in the range 1 to 2147483647 inclusive,
-  the resulting value must be returned. If, on the other hand, it
-  fails or returns an out of range value, or if the attribute is
-  absent, the default value must be returned instead, or 1 if there is
-  no default value. On setting, if the value is zero, the user agent
-  must throw an <code>IndexSizeError</code> exception. Otherwise,
-  first, if the new value is in the range 1 to 2147483647, then let
-  <var title="">n</var> be the new value, otherwise let <var
-  title="">n</var> be the default value, or 1 if there is no default
-  value; then, <var title="">n</var> must be converted to the shortest
-  possible string representing the number as a <span>valid
-  non-negative integer</span> and that string must be used as the new
+  <p>If a reflecting IDL attribute has an unsigned integer type (<code>unsigned long</code>) that is
+  <dfn>limited to only non-negative numbers greater than zero</dfn>, then the behavior is similar to
+  the previous case, but zero is not allowed. On getting, the content attribute must first be parsed
+  according to the <span>rules for parsing non-negative integers</span>, and if that is successful,
+  and the value is in the range 1 to 2147483647 inclusive, the resulting value must be returned. If,
+  on the other hand, it fails or returns an out of range value, or if the attribute is absent, the
+  default value must be returned instead, or 1 if there is no default value. On setting, if the
+  value is zero, the user agent must throw an <code>IndexSizeError</code> exception. Otherwise,
+  first, if the new value is in the range 1 to 2147483647, then let <var title="">n</var> be the new
+  value, otherwise let <var title="">n</var> be the default value, or 1 if there is no default
+  value; then, <var title="">n</var> must be converted to the shortest possible string representing
+  the number as a <span>valid non-negative integer</span> and that string must be used as the new
   content attribute value.</p>
   <!-- see previous paragraph for note about the weird range -->
  
-  <p>If a reflecting IDL attribute has a floating-point number type
-  (<code>double</code> or <code>unrestricted double</code>), then, on
-  getting, the content attribute must be parsed according to the
-  <span>rules for parsing floating-point number values</span>, and if
-  that is successful, the resulting value must be returned. If, on the
-  other hand, it fails, or if the attribute is absent, the default
-  value must be returned instead, or 0.0 if there is no default value.
-  On setting, the given value must be converted to the <span>best
-  representation of the number as a floating-point number</span> and
-  then that string must be used as the new content attribute
-  value.</p>
+  <p>If a reflecting IDL attribute has a floating-point number type (<code>double</code> or
+  <code>unrestricted double</code>), then, on getting, the content attribute must be parsed
+  according to the <span>rules for parsing floating-point number values</span>, and if that is
+  successful, the resulting value must be returned. If, on the other hand, it fails, or if the
+  attribute is absent, the default value must be returned instead, or 0.0 if there is no default
+  value. On setting, the given value must be converted to the <span>best representation of the
+  number as a floating-point number</span> and then that string must be used as the new content
+  attribute value.</p>
 
-  <p>If a reflecting IDL attribute has a floating-point number type
-  (<code>double</code> or <code>unrestricted double</code>) that is
-  <dfn>limited to numbers greater than zero</dfn>, then the behavior
-  is similar to the previous case, but zero and negative values are
-  not allowed. On getting, the content attribute must be parsed
-  according to the <span>rules for parsing floating-point number
-  values</span>, and if that is successful and the value is greater
-  than 0.0, the resulting value must be returned. If, on the other
-  hand, it fails or returns an out of range value, or if the attribute
-  is absent, the default value must be returned instead, or 0.0 if
-  there is no default value. On setting, if the value is less than or
-  equal to zero, then the value must be ignored. Otherwise, the given
-  value must be converted to the <span>best representation of the
-  number as a floating-point number</span> and then that string must
-  be used as the new content attribute value.</p>
+  <p>If a reflecting IDL attribute has a floating-point number type (<code>double</code> or
+  <code>unrestricted double</code>) that is <dfn>limited to numbers greater than zero</dfn>, then
+  the behavior is similar to the previous case, but zero and negative values are not allowed. On
+  getting, the content attribute must be parsed according to the <span>rules for parsing
+  floating-point number values</span>, and if that is successful and the value is greater than 0.0,
+  the resulting value must be returned. If, on the other hand, it fails or returns an out of range
+  value, or if the attribute is absent, the default value must be returned instead, or 0.0 if there
+  is no default value. On setting, if the value is less than or equal to zero, then the value must
+  be ignored. Otherwise, the given value must be converted to the <span>best representation of the
+  number as a floating-point number</span> and then that string must be used as the new content
+  attribute value.</p>
 
-  <p class="note">The values Infinity and Not-a-Number (NaN) values
-  throw an exception on setting, as defined in the Web IDL
-  specification. <a href="#refsWEBIDL">[WEBIDL]</a></p>
+  <p class="note">The values Infinity and Not-a-Number (NaN) values throw an exception on setting,
+  as defined in the Web IDL specification. <a href="#refsWEBIDL">[WEBIDL]</a></p>
 
-  <p>If a reflecting IDL attribute has the type
-  <code>DOMTokenList</code> or <code>DOMSettableTokenList</code>, then
-  on getting it must return a <code>DOMTokenList</code> or
-  <code>DOMSettableTokenList</code> object (as appropriate) whose
-  associated element is the element in question and whose associated
-  attribute's local name is the name of the attribute in question.
-  The same
-  <code>DOMTokenList</code> or <code>DOMSettableTokenList</code>
-  object must be returned every time for each attribute.</p>
+  <p>If a reflecting IDL attribute has the type <code>DOMTokenList</code> or
+  <code>DOMSettableTokenList</code>, then on getting it must return a <code>DOMTokenList</code> or
+  <code>DOMSettableTokenList</code> object (as appropriate) whose associated element is the element
+  in question and whose associated attribute's local name is the name of the attribute in question.
+  The same <code>DOMTokenList</code> or <code>DOMSettableTokenList</code> object must be returned
+  every time for each attribute.</p>
 
-  <p>If a reflecting IDL attribute has the type
-  <code>HTMLElement</code>, or an interface that descends from
-  <code>HTMLElement</code>, then, on getting, it must run the
-  following algorithm (stopping at the first point where a value is
-  returned):</p>
+  <p>If a reflecting IDL attribute has the type <code>HTMLElement</code>, or an interface that
+  descends from <code>HTMLElement</code>, then, on getting, it must run the following algorithm
+  (stopping at the first point where a value is returned):</p>
 
   <ol>
 
-   <li>If the corresponding content attribute is absent, then the
-   IDL attribute must return null.</li>
+   <li>If the corresponding content attribute is absent, then the IDL attribute must return
+   null.</li>
 
    <li>Let <var title="">candidate</var> be the element that the <code
-   title="dom-Document-getElementById">document.getElementById()</code> method
-   would find when called on the content attribute's document if it
-   were passed as its argument the current value of the corresponding
-   content attribute.</li>
+   title="dom-Document-getElementById">document.getElementById()</code> method would find when
+   called on the content attribute's document if it were passed as its argument the current value of
+   the corresponding content attribute.</li>
 
-   <li>If <var title="">candidate</var> is null, or if it is not
-   type-compatible with the IDL attribute, then the IDL attribute must
-   return null.</li>
+   <li>If <var title="">candidate</var> is null, or if it is not type-compatible with the IDL
+   attribute, then the IDL attribute must return null.</li>
 
    <li>Otherwise, it must return <var title="">candidate</var>.</li>
 
   </ol>
 
-  <p>On setting, if the given element has an <code
-  title="attr-id">id</code> attribute, and has the same <span>home
-  subtree</span> as the element of the attribute being set, and the
-  given element is the first element in that <span>home subtree</span>
-  whose <span title="concept-ID">ID</span> is the value of that <code
-  title="attr-id">id</code> attribute, then the content attribute must
-  be set to the value of that <code title="attr-id">id</code>
-  attribute. Otherwise, the content attribute must be set to the empty
-  string.</p>
+  <p>On setting, if the given element has an <code title="attr-id">id</code> attribute, and has the
+  same <span>home subtree</span> as the element of the attribute being set, and the given element is
+  the first element in that <span>home subtree</span> whose <span title="concept-ID">ID</span> is
+  the value of that <code title="attr-id">id</code> attribute, then the content attribute must be
+  set to the value of that <code title="attr-id">id</code> attribute. Otherwise, the content
+  attribute must be set to the empty string.</p>
 
   </div>
 
@@ -9723,9 +9670,20 @@
     bidirectional character type AL or R, and there is no character of bidirectional character type
     L anywhere before it in the element's <span title="concept-fe-value">value</span>, then
     <span>the directionality</span> of the element is '<span title="concept-rtl">rtl</span>'.
-    Otherwise, <span>the directionality</span> of the element is '<span
-    title="concept-ltr">ltr</span>'. <a href="#refsBIDI">[BIDI]</a></p>
+    <a href="#refsBIDI">[BIDI]</a></p>
 
+    <p>If the element's <span title="concept-fe-value">value</span> contains a character of
+    bidirectional character type L, and there is no character of bidirectional character type
+    AL or R anywhere before it in the element's <span title="concept-fe-value">value</span>, then
+    <span>the directionality</span> of the element is '<span title="concept-ltr">ltr</span>'.
+    <a href="#refsBIDI">[BIDI]</a></p>
+
+    <p>Otherwise, if the element is a <span>root element</span>, <span>the directionality</span> of
+    the element is '<span title="concept-ltr">ltr</span>'.</p>
+
+    <p>Otherwise, <span>the directionality</span> of the element is the same as the element's parent
+    element's <span title="the directionality">directionality</span>.</p>
+
    </dd>
 
 
@@ -9769,9 +9727,15 @@
     <p>If such a character is found and it is of bidirectional character type AL or R, <span>the
     directionality</span> of the element is '<span title="concept-rtl">rtl</span>'.</p>
 
-    <p>Otherwise, <span>the directionality</span> of the element is '<span
-    title="concept-ltr">ltr</span>'.</p>
+    <p>If such a character is found and it is of bidirectional character type L, <span>the
+    directionality</span> of the element is '<span title="concept-ltr">ltr</span>'.</p>
 
+    <p>Otherwise, if the element is a <span>root element</span> or a <code>bdi</code> element,
+    <span>the directionality</span> of the element is '<span title="concept-ltr">ltr</span>'.</p>
+
+    <p>Otherwise, <span>the directionality</span> of the element is the same as the element's parent
+    element's <span title="the directionality">directionality</span>.</p>
+
    </dd>
 
 
@@ -19529,26 +19493,22 @@
 
   <!-- v2: Add a <credit> element for photo credits -->
 
-  <p>The <code>figure</code> element <span>represents</span> some
-  <span>flow content</span>, optionally with a caption, that is
-  self-contained and is typically referenced as a single unit from the
-  main flow of the document.</p>
+  <p>The <code>figure</code> element <span>represents</span> some <span>flow content</span>,
+  optionally with a caption, that is self-contained and is typically referenced as a single unit
+  from the main flow of the document.</p>
 
-  <p>The element can thus be used to annotate illustrations, diagrams,
-  photos, code listings, etc, that are referred to from the main
-  content of the document, but that could, without affecting the flow
-  of the document, be moved away from that primary content, e.g. to
-  the side of the page, to dedicated pages, or to an appendix.</p>
+  <p>The element can thus be used to annotate illustrations, diagrams, photos, code listings, etc,
+  that are referred to from the main content of the document, but that could, without affecting the
+  flow of the document, be moved away from that primary content, e.g. to the side of the page, to
+  dedicated pages, or to an appendix.</p>
 
-  <p>The <span class="impl">first</span> <code>figcaption</code>
-  element child of the element, if any, represents the caption of the
-  <code>figure</code> element's contents. If there is no child
+  <p>The <span class="impl">first</span> <code>figcaption</code> element child of the element, if
+  any, represents the caption of the <code>figure</code> element's contents. If there is no child
   <code>figcaption</code> element, then there is no caption.</p>
 
   <div class="example">
 
-   <p>This example shows the <code>figure</code> element to mark up a
-   code listing.</p>
+   <p>This example shows the <code>figure</code> element to mark up a code listing.</p>
 
    <pre><p>In <a href="#l4">listing 4</a> we see the primary core interface
 API declaration.</p>
@@ -19566,8 +19526,7 @@
 
   <div class="example">
 
-   <p>Here we see a <code>figure</code> element to mark up a
-   photo.</p>
+   <p>Here we see a <code>figure</code> element to mark up a photo.</p>
 
    <pre><figure>
  <img src="bubbles-work.jpeg"
@@ -19580,8 +19539,8 @@
 
   <div class="example">
 
-   <p>In this example, we see an image that is <em>not</em>
-   a figure, as well as an image and a video that are.</p>
+   <p>In this example, we see an image that is <em>not</em> a figure, as well as an image and a
+   video that are.</p>
 
    <pre><h2>Malinko's comics</h2>
 
@@ -19613,8 +19572,7 @@
 
   <div class="example">
 
-   <p>Here, a part of a poem is marked up using
-   <code>figure</code>.</p>
+   <p>Here, a part of a poem is marked up using <code>figure</code>.</p>
 
    <pre><figure>
  <p>'Twas brillig, and the slithy toves<br>
@@ -19628,10 +19586,9 @@
 
   <div class="example">
 
-   <p>In this example, which could be part of a much larger work
-   discussing a castle, nested <code>figure</code> elements are used
-   to provide both a group caption and individual captions for each
-   figure in the group:</p>
+   <p>In this example, which could be part of a much larger work discussing a castle, nested
+   <code>figure</code> elements are used to provide both a group caption and individual captions for
+   each figure in the group:</p>
 
    <pre><figure>
  <figcaption>The castle through the ages: 1423, 1858, and 1999 respectively.</figcaption>
@@ -19653,10 +19610,9 @@
 
   <div class="example">
 
-   <p>The previous example could also be more succintly written as
-   follows (using <code title="attr-title">title</code> attributes in
-   place of the nested <code>figure</code>/<code>figcaption</code>
-   pairs):</p>
+   <p>The previous example could also be more succintly written as follows (using <code
+   title="attr-title">title</code> attributes in place of the nested
+   <code>figure</code>/<code>figcaption</code> pairs):</p>
 
    <pre><figure>
  <img src="castle1423.jpeg" title="Etching. Anonymous, ca. 1423."
@@ -19686,10 +19642,9 @@
    <dd>Uses <code>HTMLElement</code>.</dd>
   </dl><!--TOPIC:HTML-->
 
-  <p>The <code>figcaption</code> element <span>represents</span> a
-  caption or legend for the rest of the contents of the
-  <code>figcaption</code> element's parent <code>figure</code>
-  element<span class="impl">, if any</span>.</p>
+  <p>The <code>figcaption</code> element <span>represents</span> a caption or legend for the rest of
+  the contents of the <code>figcaption</code> element's parent <code>figure</code> element<span
+  class="impl">, if any</span>.</p>
 
 
 
@@ -24785,14 +24740,12 @@
 
   <h6>A graphical representation of some of the surrounding text</h6>
 
-  <p>In many cases, the image is actually just supplementary, and
-  its presence merely reinforces the surrounding text. In these
-  cases, the <code title="attr-img-alt">alt</code> attribute must be
+  <p>In many cases, the image is actually just supplementary, and its presence merely reinforces the
+  surrounding text. In these cases, the <code title="attr-img-alt">alt</code> attribute must be
   present but its value must be the empty string.</p>
 
-  <p>In general, an image falls into this category if removing the
-  image doesn't make the page any less useful, but including the
-  image makes it a lot easier for users of visual browsers to
+  <p>In general, an image falls into this category if removing the image doesn't make the page any
+  less useful, but including the image makes it a lot easier for users of visual browsers to
   understand the concept.</p>
 
   <div class="example">
@@ -24806,12 +24759,10 @@
 passes data to the Tokenizer.</p>
 <strong><p><img src="images/parsing-model-overview.png" alt=""></p></strong></pre>
 
-   <p>In these cases, it would be wrong to include alternative text
-   that consists of just a caption. If a caption is to be included,
-   then either the <code title="attr-title">title</code> attribute can
-   be used, or the <code>figure</code> and <code>figcaption</code>
-   elements can be used. In the latter case, the image would in fact
-   be a phrase or paragraph with an alternative graphical
+   <p>In these cases, it would be wrong to include alternative text that consists of just a caption.
+   If a caption is to be included, then either the <code title="attr-title">title</code> attribute
+   can be used, or the <code>figure</code> and <code>figcaption</code> elements can be used. In the
+   latter case, the image would in fact be a phrase or paragraph with an alternative graphical
    representation, and would thus require alternative text.</p>
 
    <pre><!-- Using the title="" attribute -->
@@ -48536,24 +48487,20 @@
    </dd>
   </dl><!--TOPIC:HTML-->
 
-  <p>The <code>caption</code> element <span>represents</span> the title of the
-  <code>table</code> that is its parent, if it has a parent and that
-  is a <code>table</code> element.</p>
+  <p>The <code>caption</code> element <span>represents</span> the title of the <code>table</code>
+  that is its parent, if it has a parent and that is a <code>table</code> element.</p>
 
   <div class="impl">
 
-  <p>The <code>caption</code> element takes part in the <span>table
-  model</span>.</p>
+  <p>The <code>caption</code> element takes part in the <span>table model</span>.</p>
 
   </div>
 
-  <p>When a <code>table</code> element is the only content in a
-  <code>figure</code> element other than the <code>figcaption</code>,
-  the <code>caption</code> element should be omitted in favor of the
-  <code>figcaption</code>.</p>
+  <p>When a <code>table</code> element is the only content in a <code>figure</code> element other
+  than the <code>figcaption</code>, the <code>caption</code> element should be omitted in favor of
+  the <code>figcaption</code>.</p>
 
-  <p>A caption can introduce context for a table, making it
-  significantly easier to understand.</p>
+  <p>A caption can introduce context for a table, making it significantly easier to understand.</p>
 
   <div class="example">
 
@@ -48569,9 +48516,8 @@
     <tr> <th> 6 <td> 7 <td> 8 <td> 9 <td> 10 <td> 11 <td> 12
    </table>
 
-   <p>In the abstract, this table is not clear. However, with a
-   caption giving the table's number (for reference in the main prose)
-   and explaining its use, it makes more sense:</p>
+   <p>In the abstract, this table is not clear. However, with a caption giving the table's number
+   (for reference in the main prose) and explaining its use, it makes more sense:</p>
 
    <pre><caption>
 <p>Table 1.
@@ -53298,50 +53244,41 @@
    </dd>
   </dl><!--TOPIC:HTML-->
 
-  <p>The <code>label</code> <span>represents</span> a caption in a
-  user interface. The caption can be associated with a specific form
-  control<span class="impl">, known as the <code>label</code>
-  element's <dfn>labeled control</dfn></span>, either using <code
-  title="attr-label-for">for</code> attribute, or by putting the form
-  control inside the <code>label</code> element itself.</p>
+  <p>The <code>label</code> element <span>represents</span> a caption in a user interface. The
+  caption can be associated with a specific form control<span class="impl">, known as the
+  <code>label</code> element's <dfn>labeled control</dfn></span>, either using the <code
+  title="attr-label-for">for</code> attribute, or by putting the form control inside the
+  <code>label</code> element itself.</p>
 
   <div class="impl">
 
-  <p>Except where otherwise specified by the following rules, a
-  <code>label</code> element has no <span>labeled control</span>.</p>
+  <p>Except where otherwise specified by the following rules, a <code>label</code> element has no
+  <span>labeled control</span>.</p>
 
   </div>
 
-  <p>The <dfn title="attr-label-for"><code>for</code></dfn> attribute
-  may be specified to indicate a form control with which the caption
-  is to be associated. If the attribute is specified, the attribute's
-  value must be the <span title="concept-id">ID</span> of a <span
-  title="category-label">labelable element</span> in the same
-  <code>Document</code> as the <code>label</code> element. <span
-  class="impl">If the attribute is specified and there is an element
-  in the <code>Document</code> whose <span
-  title="concept-id">ID</span> is equal to the value of the <code
-  title="attr-label-for">for</code> attribute, and the first such
-  element is a <span title="category-label">labelable element</span>,
-  then that element is the <code>label</code> element's <span>labeled
-  control</span>.</span></p>
+  <p>The <dfn title="attr-label-for"><code>for</code></dfn> attribute may be specified to indicate a
+  form control with which the caption is to be associated. If the attribute is specified, the
+  attribute's value must be the <span title="concept-id">ID</span> of a <span
+  title="category-label">labelable element</span> in the same <code>Document</code> as the
+  <code>label</code> element. <span class="impl">If the attribute is specified and there is an
+  element in the <code>Document</code> whose <span title="concept-id">ID</span> is equal to the
+  value of the <code title="attr-label-for">for</code> attribute, and the first such element is a
+  <span title="category-label">labelable element</span>, then that element is the <code>label</code>
+  element's <span>labeled control</span>.</span></p>
 
   <div class="impl">
 
-  <p>If the <code title="attr-label-for">for</code> attribute is not
-  specified, but the <code>label</code> element has a <span
-  title="category-label">labelable element</span> descendant, then the
-  first such descendant in <span>tree order</span> is the
-  <code>label</code> element's <span>labeled control</span>.</p>
+  <p>If the <code title="attr-label-for">for</code> attribute is not specified, but the
+  <code>label</code> element has a <span title="category-label">labelable element</span> descendant,
+  then the first such descendant in <span>tree order</span> is the <code>label</code> element's
+  <span>labeled control</span>.</p>
 
-  <p>The <code>label</code> element's exact default presentation and
-  behavior, in particular what its <span>activation behavior</span>
-  might be, if anything, should match the platform's label behavior.
-  The <span>activation behavior</span> of a <code>label</code> element
-  for events targeted at <span>interactive content</span> descendants
-  of a <code>label</code> element, and any descendants of those
-  <span>interactive content</span> descendants, must be to do
-  nothing.</p>
+  <p>The <code>label</code> element's exact default presentation and behavior, in particular what
+  its <span>activation behavior</span> might be, if anything, should match the platform's label
+  behavior. The <span>activation behavior</span> of a <code>label</code> element for events targeted
+  at <span>interactive content</span> descendants of a <code>label</code> element, and any
+  descendants of those <span>interactive content</span> descendants, must be to do nothing.</p>
 
   <!-- activation behaviour need not be dependent on whether the
   labeled control is being rendered:
@@ -53350,30 +53287,26 @@
 
   <div class="example">
 
-   <p>For example, on platforms where clicking a checkbox label checks
-   the checkbox, clicking the <code>label</code> in the following
-   snippet could trigger the user agent to <span>run synthetic click
-   activation steps</span> on the <code>input</code> element, as if
-   the element itself had been triggered by the user:</p>
+   <p>For example, on platforms where clicking a checkbox label checks the checkbox, clicking the
+   <code>label</code> in the following snippet could trigger the user agent to <span>run synthetic
+   click activation steps</span> on the <code>input</code> element, as if the element itself had
+   been triggered by the user:</p>
 
    <pre><label><input type=checkbox name=lost> Lost</label></pre>
 
-   <p>On other platforms, the behavior might be just to focus the
-   control, or do nothing.</p>
+   <p>On other platforms, the behavior might be just to focus the control, or do nothing.</p>
 
   </div>
 
   </div>
 
-  <p>The <code title="attr-fae-form">form</code> attribute is used to
-  explicitly associate the <code>label</code> element with its
-  <span>form owner</span>.</p>
+  <p>The <code title="attr-fae-form">form</code> attribute is used to explicitly associate the
+  <code>label</code> element with its <span>form owner</span>.</p>
 
   <div class="example">
 
-   <p>The following example shows three form controls each with a
-   label, two of which have small text showing the right format for
-   users to use.</p>
+   <p>The following example shows three form controls each with a label, two of which have small
+   text showing the right format for users to use.</p>
 
    <pre><p><label>Full name: <input name=fn> <small>Format: First Last</small></label></p>
 <p><label>Age: <input name=age type=number min=0></label></p>
@@ -53396,16 +53329,14 @@
 
   <div class="impl">
 
-  <p>The <dfn title="dom-label-htmlFor"><code>htmlFor</code></dfn> IDL
-  attribute must <span>reflect</span> the <code
-  title="attr-label-for">for</code> content attribute.</p>
+  <p>The <dfn title="dom-label-htmlFor"><code>htmlFor</code></dfn> IDL attribute must
+  <span>reflect</span> the <code title="attr-label-for">for</code> content attribute.</p>
 
-  <p>The <dfn title="dom-label-control"><code>control</code></dfn> IDL
-  attribute must return the <code>label</code> element's <span>labeled
-  control</span>, if any, or null if there isn't one.</p>
+  <p>The <dfn title="dom-label-control"><code>control</code></dfn> IDL attribute must return the
+  <code>label</code> element's <span>labeled control</span>, if any, or null if there isn't one.</p>
 
-  <p>The <code title="dom-fae-form">form</code> IDL attribute is part
-  of the element's forms API.</p>
+  <p>The <code title="dom-fae-form">form</code> IDL attribute is part of the element's forms
+  API.</p>
 
   </div>
 
@@ -53417,8 +53348,8 @@
 
    <dd>
 
-    <p>Returns a <code>NodeList</code> of all the <code>label</code>
-    elements that the form control is associated with.</p>
+    <p>Returns a <code>NodeList</code> of all the <code>label</code> elements that the form control
+    is associated with.</p>
 
    </dd>
 
@@ -53426,13 +53357,12 @@
 
   <div class="impl">
 
-  <p><span title="category-label">Labelable elements</span> have a
-  <code>NodeList</code> object associated with them that represents
-  the list of <code>label</code> elements, in <span>tree order</span>,
-  whose <span>labeled control</span> is the element in question. The
-  <dfn title="dom-lfe-labels"><code>labels</code></dfn> IDL attribute
-  of <span title="category-label">labelable elements</span>, on
-  getting, must return that <code>NodeList</code> object.</p>
+  <p><span title="category-label">Labelable elements</span> have a <code>NodeList</code> object
+  associated with them that represents the list of <code>label</code> elements, in <span>tree
+  order</span>, whose <span>labeled control</span> is the element in question. The <dfn
+  title="dom-lfe-labels"><code>labels</code></dfn> IDL attribute of <span
+  title="category-label">labelable elements</span>, on getting, must return that
+  <code>NodeList</code> object.</p>
 
   </div>
 <!--TOPIC:HTML-->




More information about the Commit-Watchers mailing list