Skip to content

Commit

Permalink
[giow] (3) Another attempt at making directionality in various edge c…
Browse files Browse the repository at this point in the history
…ases more useful and more intuitive.

Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=17835
Affected topics: HTML, Rendering

git-svn-id: http://svn.whatwg.org/webapps@7955 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jun 11, 2013
1 parent 2b5b6f1 commit b967fb3
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 43 deletions.
29 changes: 16 additions & 13 deletions complete.html
Expand Up @@ -9748,17 +9748,19 @@ <h5 id=the-dir-attribute><span class=secno>3.2.3.6 </span>The <dfn title=attr-di

<dl class=switch><dt>If the element's <code title=attr-dir><a href=#the-dir-attribute>dir</a></code> attribute is in the <a href=#attr-dir-ltr-state title=attr-dir-ltr-state>ltr</a> state</dt>

<dt>If the element is a <a href=#root-element>root element</a> and the <code title=attr-dir><a href=#the-dir-attribute>dir</a></code>
attribute is not in a defined state (i.e. it is not present or has an invalid value)</dt>

<dt>If the element is an <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href="#telephone-state-(type=tel)" title=attr-input-type-tel>Telephone</a> state, and the <code title=attr-dir><a href=#the-dir-attribute>dir</a></code> attribute is not in a state</dt>

<dd><p><a href=#the-directionality>The directionality</a> of the element is '<a href=#concept-ltr title=concept-ltr>ltr</a>'.</dd>


<dt>If the element's <code title=attr-dir><a href=#the-dir-attribute>dir</a></code> attribute is in the <a href=#attr-dir-rtl-state title=attr-dir-rtl-state>rtl</a> state</dt>

<dt>If the element is an <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href="#telephone-state-(type=tel)" title=attr-input-type-tel>Telephone</a> state, and the <code title=attr-dir><a href=#the-dir-attribute>dir</a></code> attribute is in the <a href=#attr-dir-auto-state title=attr-dir-auto-state>auto</a> state</dt>

<dd><p><a href=#the-directionality>The directionality</a> of the element is '<a href=#concept-rtl title=concept-rtl>rtl</a>'.</dd>


<dt>If the element is an <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href="#text-(type=text)-state-and-search-state-(type=search)" title=attr-input-type-text>Text</a>, <a href="#text-(type=text)-state-and-search-state-(type=search)" title=attr-input-type-search>Search</a>, <a href="#url-state-(type=url)" title=attr-input-type-url>URL</a>, or <a href="#e-mail-state-(type=email)" title=attr-input-type-email>E-mail</a> state, and the <code title=attr-dir><a href=#the-dir-attribute>dir</a></code> attribute is in the <a href=#attr-dir-auto-state title=attr-dir-auto-state>auto</a> state</dt>
<dt>If the element is an <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href="#text-(type=text)-state-and-search-state-(type=search)" title=attr-input-type-text>Text</a>, <a href="#text-(type=text)-state-and-search-state-(type=search)" title=attr-input-type-search>Search</a>, <span title=attr-input-type-telephone>Telephone</span>, <a href="#url-state-(type=url)" title=attr-input-type-url>URL</a>, or <a href="#e-mail-state-(type=email)" title=attr-input-type-email>E-mail</a> state, and the <code title=attr-dir><a href=#the-dir-attribute>dir</a></code> attribute is in the <a href=#attr-dir-auto-state title=attr-dir-auto-state>auto</a> state</dt>

<dt>If the element is a <code><a href=#the-textarea-element>textarea</a></code> element and the <code title=attr-dir><a href=#the-dir-attribute>dir</a></code>
attribute is in the <a href=#attr-dir-auto-state title=attr-dir-auto-state>auto</a> state</dt>
Expand Down Expand Up @@ -9815,7 +9817,8 @@ <h5 id=the-dir-attribute><span class=secno>3.2.3.6 </span>The <dfn title=attr-di
<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,
<!--CLEANUP-->
<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
Expand All @@ -9824,12 +9827,6 @@ <h5 id=the-dir-attribute><span class=secno>3.2.3.6 </span>The <dfn title=attr-di
</dd>


<dt>If the element is a <a href=#root-element>root element</a> and the <code title=attr-dir><a href=#the-dir-attribute>dir</a></code>
attribute is not in a defined state (i.e. it is not present or has an invalid value)</dt>

<dd><p><a href=#the-directionality>The directionality</a> of the element is '<a href=#concept-ltr title=concept-ltr>ltr</a>'.</dd>


<dt>If the element has a parent element and the <code title=attr-dir><a href=#the-dir-attribute>dir</a></code> attribute is
not in a defined state (i.e. it is not present or has an invalid value)</dt>

Expand Down Expand Up @@ -93376,7 +93373,7 @@ <h4 id=phrasing-content-1><span class=secno>14.3.4 </span>Phrasing content</h4>

<pre class=css>@namespace url(http://www.w3.org/1999/xhtml);

[dir]:dir(ltr), bdi:dir(ltr) { direction: ltr; }
[dir]:dir(ltr), bdi:dir(ltr), input[type=tel]:ltr { direction: ltr; }
[dir]:dir(rtl), bdi:dir(rtl) { direction: rtl; }

address, blockquote, center, div, figure, figcaption, footer, form,
Expand Down Expand Up @@ -93408,6 +93405,12 @@ <h4 id=phrasing-content-1><span class=secno>14.3.4 </span>Phrasing content</h4>

textarea[dir=auto i], pre[dir=auto i] { unicode-bidi: plaintext; }</pre>

<p>Input fields (i.e. <code><a href=#the-textarea-element>textarea</a></code> elements, and <code><a href=#the-input-element>input</a></code> elements when their
<code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href="#text-(type=text)-state-and-search-state-(type=search)" title=attr-input-type-text>Text</a>, <a href="#text-(type=text)-state-and-search-state-(type=search)" title=attr-input-type-search>Search</a>,
<a href="#telephone-state-(type=tel)" title=attr-input-type-tel>Telephone</a>, <a href="#url-state-(type=url)" title=attr-input-type-url>URL</a>,
or <a href="#e-mail-state-(type=email)" title=attr-input-type-email>E-mail</a> state) are expected to present an editing
user interface with a directionality that matches the element's 'direction' property.</p>


<h4 id=quotes><span class=secno>14.3.6 </span>Quotes</h4>

Expand Down Expand Up @@ -95115,7 +95118,7 @@ <h4 id=the-textarea-element-0><span class=secno>14.5.15 </span>The <code><a href
<a href=#textarea-effective-width>textarea effective width</a>.</p>

<p>The <dfn id=textarea-effective-width>textarea effective width</dfn> of a
<code><a href=#the-textarea-element>textarea</a></code> element is <span><var title="">size</var>&times;<var title="">avg</var>&nbsp;+&nbsp;<var title="">sbw</var></span>, where <var title="">size</var> is the
<code><a href=#the-textarea-element>textarea</a></code> element is <span title=""><var title="">size</var>&times;<var title="">avg</var>&nbsp;+&nbsp;<var title="">sbw</var></span>, where <var title="">size</var> is the
element's <a href=#attr-textarea-cols-value title=attr-textarea-cols-value>character
width</a>, <var title="">avg</var> is the average character width
of the primary font of the element, in CSS pixels, and <var title="">sbw</var> is the width of a scroll bar, in CSS pixels. (The
Expand Down
29 changes: 16 additions & 13 deletions index
Expand Up @@ -9748,17 +9748,19 @@ Transport Protocol"&gt;HTTP&lt;/abbr&gt; today.&lt;/p&gt;</pre> <!-- DO NOT REWR

<dl class=switch><dt>If the element's <code title=attr-dir><a href=#the-dir-attribute>dir</a></code> attribute is in the <a href=#attr-dir-ltr-state title=attr-dir-ltr-state>ltr</a> state</dt>

<dt>If the element is a <a href=#root-element>root element</a> and the <code title=attr-dir><a href=#the-dir-attribute>dir</a></code>
attribute is not in a defined state (i.e. it is not present or has an invalid value)</dt>

<dt>If the element is an <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href="#telephone-state-(type=tel)" title=attr-input-type-tel>Telephone</a> state, and the <code title=attr-dir><a href=#the-dir-attribute>dir</a></code> attribute is not in a state</dt>

<dd><p><a href=#the-directionality>The directionality</a> of the element is '<a href=#concept-ltr title=concept-ltr>ltr</a>'.</dd>


<dt>If the element's <code title=attr-dir><a href=#the-dir-attribute>dir</a></code> attribute is in the <a href=#attr-dir-rtl-state title=attr-dir-rtl-state>rtl</a> state</dt>

<dt>If the element is an <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href="#telephone-state-(type=tel)" title=attr-input-type-tel>Telephone</a> state, and the <code title=attr-dir><a href=#the-dir-attribute>dir</a></code> attribute is in the <a href=#attr-dir-auto-state title=attr-dir-auto-state>auto</a> state</dt>

<dd><p><a href=#the-directionality>The directionality</a> of the element is '<a href=#concept-rtl title=concept-rtl>rtl</a>'.</dd>


<dt>If the element is an <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href="#text-(type=text)-state-and-search-state-(type=search)" title=attr-input-type-text>Text</a>, <a href="#text-(type=text)-state-and-search-state-(type=search)" title=attr-input-type-search>Search</a>, <a href="#url-state-(type=url)" title=attr-input-type-url>URL</a>, or <a href="#e-mail-state-(type=email)" title=attr-input-type-email>E-mail</a> state, and the <code title=attr-dir><a href=#the-dir-attribute>dir</a></code> attribute is in the <a href=#attr-dir-auto-state title=attr-dir-auto-state>auto</a> state</dt>
<dt>If the element is an <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href="#text-(type=text)-state-and-search-state-(type=search)" title=attr-input-type-text>Text</a>, <a href="#text-(type=text)-state-and-search-state-(type=search)" title=attr-input-type-search>Search</a>, <span title=attr-input-type-telephone>Telephone</span>, <a href="#url-state-(type=url)" title=attr-input-type-url>URL</a>, or <a href="#e-mail-state-(type=email)" title=attr-input-type-email>E-mail</a> state, and the <code title=attr-dir><a href=#the-dir-attribute>dir</a></code> attribute is in the <a href=#attr-dir-auto-state title=attr-dir-auto-state>auto</a> state</dt>

<dt>If the element is a <code><a href=#the-textarea-element>textarea</a></code> element and the <code title=attr-dir><a href=#the-dir-attribute>dir</a></code>
attribute is in the <a href=#attr-dir-auto-state title=attr-dir-auto-state>auto</a> state</dt>
Expand Down Expand Up @@ -9815,7 +9817,8 @@ Transport Protocol"&gt;HTTP&lt;/abbr&gt; today.&lt;/p&gt;</pre> <!-- DO NOT REWR
<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,
<!--CLEANUP-->
<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
Expand All @@ -9824,12 +9827,6 @@ Transport Protocol"&gt;HTTP&lt;/abbr&gt; today.&lt;/p&gt;</pre> <!-- DO NOT REWR
</dd>


<dt>If the element is a <a href=#root-element>root element</a> and the <code title=attr-dir><a href=#the-dir-attribute>dir</a></code>
attribute is not in a defined state (i.e. it is not present or has an invalid value)</dt>

<dd><p><a href=#the-directionality>The directionality</a> of the element is '<a href=#concept-ltr title=concept-ltr>ltr</a>'.</dd>


<dt>If the element has a parent element and the <code title=attr-dir><a href=#the-dir-attribute>dir</a></code> attribute is
not in a defined state (i.e. it is not present or has an invalid value)</dt>

Expand Down Expand Up @@ -93376,7 +93373,7 @@ br[clear=all i], br[clear=both i] { clear: both; }</pre>

<pre class=css>@namespace url(http://www.w3.org/1999/xhtml);

[dir]:dir(ltr), bdi:dir(ltr) { direction: ltr; }
[dir]:dir(ltr), bdi:dir(ltr), input[type=tel]:ltr { direction: ltr; }
[dir]:dir(rtl), bdi:dir(rtl) { direction: rtl; }

address, blockquote, center, div, figure, figcaption, footer, form,
Expand Down Expand Up @@ -93408,6 +93405,12 @@ bdo[dir=auto i] { unicode-bidi: isolate-override; }

textarea[dir=auto i], pre[dir=auto i] { unicode-bidi: plaintext; }</pre>

<p>Input fields (i.e. <code><a href=#the-textarea-element>textarea</a></code> elements, and <code><a href=#the-input-element>input</a></code> elements when their
<code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href="#text-(type=text)-state-and-search-state-(type=search)" title=attr-input-type-text>Text</a>, <a href="#text-(type=text)-state-and-search-state-(type=search)" title=attr-input-type-search>Search</a>,
<a href="#telephone-state-(type=tel)" title=attr-input-type-tel>Telephone</a>, <a href="#url-state-(type=url)" title=attr-input-type-url>URL</a>,
or <a href="#e-mail-state-(type=email)" title=attr-input-type-email>E-mail</a> state) are expected to present an editing
user interface with a directionality that matches the element's 'direction' property.</p>


<h4 id=quotes><span class=secno>14.3.6 </span>Quotes</h4>

Expand Down Expand Up @@ -95115,7 +95118,7 @@ textarea { binding: <i title="">textarea</i>; white-space: pre-wrap; }</pre>
<a href=#textarea-effective-width>textarea effective width</a>.</p>

<p>The <dfn id=textarea-effective-width>textarea effective width</dfn> of a
<code><a href=#the-textarea-element>textarea</a></code> element is <span><var title="">size</var>&times;<var title="">avg</var>&nbsp;+&nbsp;<var title="">sbw</var></span>, where <var title="">size</var> is the
<code><a href=#the-textarea-element>textarea</a></code> element is <span title=""><var title="">size</var>&times;<var title="">avg</var>&nbsp;+&nbsp;<var title="">sbw</var></span>, where <var title="">size</var> is the
element's <a href=#attr-textarea-cols-value title=attr-textarea-cols-value>character
width</a>, <var title="">avg</var> is the average character width
of the primary font of the element, in CSS pixels, and <var title="">sbw</var> is the width of a scroll bar, in CSS pixels. (The
Expand Down
37 changes: 20 additions & 17 deletions source
Expand Up @@ -9662,27 +9662,29 @@ Transport Protocol">HTTP&lt;/abbr> today.&lt;/p></pre> <!-- DO NOT REWRAP THIS L
<dt>If the element's <code title="attr-dir">dir</code> attribute is in the <span
title="attr-dir-ltr-state">ltr</span> state</dt>

<dt>If the element is a <span>root element</span> and the <code title="attr-dir">dir</code>
attribute is not in a defined state (i.e. it is not present or has an invalid value)</dt>

<dt>If the element is an <code>input</code> element whose <code
title="attr-input-type">type</code> attribute is in the <span
title="attr-input-type-tel">Telephone</span> state, and the <code
title="attr-dir">dir</code> attribute is not in a state</dt>

<dd><p><span>The directionality</span> of the element is '<span
title="concept-ltr">ltr</span>'.</p></dd>


<dt>If the element's <code title="attr-dir">dir</code> attribute is in the <span
title="attr-dir-rtl-state">rtl</span> state</dt>

<dt>If the element is an <code>input</code> element whose <code
title="attr-input-type">type</code> attribute is in the <span
title="attr-input-type-tel">Telephone</span> state, and the <code
title="attr-dir">dir</code> attribute is in the <span
title="attr-dir-auto-state">auto</span> state</dt>

<dd><p><span>The directionality</span> of the element is '<span
title="concept-rtl">rtl</span>'.</p></dd>


<dt>If the element is an <code>input</code> element whose <code
title="attr-input-type">type</code> attribute is in the <span
title="attr-input-type-text">Text</span>, <span
title="attr-input-type-search">Search</span>, <span
title="attr-input-type-telephone">Telephone</span>, <span
title="attr-input-type-url">URL</span>, or <span
title="attr-input-type-email">E-mail</span> state, and the <code
title="attr-dir">dir</code> attribute is in the <span
Expand Down Expand Up @@ -9752,7 +9754,8 @@ Transport Protocol">HTTP&lt;/abbr> today.&lt;/p></pre> <!-- DO NOT REWRAP THIS L
<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,
<!--CLEANUP-->
<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
Expand All @@ -9761,13 +9764,6 @@ Transport Protocol">HTTP&lt;/abbr> today.&lt;/p></pre> <!-- DO NOT REWRAP THIS L
</dd>


<dt>If the element is a <span>root element</span> and the <code title="attr-dir">dir</code>
attribute is not in a defined state (i.e. it is not present or has an invalid value)</dt>

<dd><p><span>The directionality</span> of the element is '<span
title="concept-ltr">ltr</span>'.</p></dd>


<dt>If the element has a parent element and the <code title="attr-dir">dir</code> attribute is
not in a defined state (i.e. it is not present or has an invalid value)</dt>

Expand Down Expand Up @@ -104389,7 +104385,7 @@ br[clear=all i], br[clear=both i] { clear: both; }</pre>

<pre class="css">@namespace url(http://www.w3.org/1999/xhtml);

[dir]:dir(ltr), bdi:dir(ltr) { direction: ltr; }
[dir]:dir(ltr), bdi:dir(ltr), input[type=tel]:ltr { direction: ltr; }
[dir]:dir(rtl), bdi:dir(rtl) { direction: rtl; }

address, blockquote, center, div, figure, figcaption, footer, form,
Expand Down Expand Up @@ -104421,6 +104417,13 @@ bdo[dir=auto i] { unicode-bidi: isolate-override; }

textarea[dir=auto i], pre[dir=auto i] { unicode-bidi: plaintext; }</pre>

<p>Input fields (i.e. <code>textarea</code> elements, and <code>input</code> elements when their
<code title="attr-input-type">type</code> attribute is in the <span
title="attr-input-type-text">Text</span>, <span title="attr-input-type-search">Search</span>,
<span title="attr-input-type-tel">Telephone</span>, <span title="attr-input-type-url">URL</span>,
or <span title="attr-input-type-email">E-mail</span> state) are expected to present an editing
user interface with a directionality that matches the element's 'direction' property.</p>


<h4>Quotes</h4>

Expand Down Expand Up @@ -106162,7 +106165,7 @@ textarea { binding: <i title="">textarea</i>; white-space: pre-wrap; }</pre>
<span>textarea effective width</span>.</p>

<p>The <dfn>textarea effective width</dfn> of a
<code>textarea</code> element is <span><var
<code>textarea</code> element is <span title=""><var
title="">size</var>&times;<var title="">avg</var>&nbsp;+&nbsp;<var
title="">sbw</var></span>, where <var title="">size</var> is the
element's <span title="attr-textarea-cols-value">character
Expand Down

0 comments on commit b967fb3

Please sign in to comment.