<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>11734</bug_id>
          
          <creation_ts>2011-01-11 13:35:09 +0000</creation_ts>
          <short_desc>Document the special effect of dir=auto on &lt;pre&gt; and &lt;textarea&gt;</short_desc>
          <delta_ts>2011-08-04 05:14:58 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML WG</product>
          <component>LC1 HTML5 spec</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>NEEDSINFO</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Aharon Lanin">aharon.lists.lanin</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>aharon.lists.lanin</cc>
    
    <cc>dbaron</cc>
    
    <cc>fantasai.bugs</cc>
    
    <cc>ian</cc>
    
    <cc>mike</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
    
    <cc>public-i18n-bidi</cc>
          
          <qa_contact name="HTML WG Bugzilla archive list">public-html-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>44142</commentid>
    <comment_count>0</comment_count>
    <who name="Aharon Lanin">aharon.lists.lanin</who>
    <bug_when>2011-01-11 13:35:09 +0000</bug_when>
    <thetext>This originally appeared as bug 10808 comment 51.

While most of the directional effects of the dir attribute (like those of the bdo and bdi elements) are explicitly documented, it is not documented that the &lt;pre&gt; and &lt;textarea&gt; elements significantly modify the effects of dir=auto (by setting unicode-bidi:plaintext). That this happens only in the presentation layer, via the default sylesheet, is irrelevant: the effects of &lt;bdo&gt; are also entirely defined by the default stylesheet, but are nevertheless explicitly documented.

I would therefore suggest something like the following note under the description of the dir attribute, perhaps after &quot;For example, the rendering section in this specification defines a mapping from this attribute to the CSS &apos;direction&apos; and &apos;unicode-bidi&apos; properties, and CSS defines rendering in terms of those properties.&quot;):

&quot;Please note that this mapping is significantly augmented for the pre and textarea elements, where dir=auto results in unicode-bidi:plaintext, which determines the base direction of each bidi paragraph of these elements&apos; content independently.&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>45504</commentid>
    <comment_count>1</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-02-14 23:27:08 +0000</bug_when>
    <thetext>So I started doing this (I&apos;ll push an incomplete patch below) but I realised I have no idea what white-space:plaintext means, so I actually can&apos;t write the relevant style rules. In particular it&apos;s not clear to me what it means when applied to &lt;textarea&gt;, since CSS generally applies to DOM contents and the contents of replaced elements like &lt;textarea&gt; aren&apos;t affected by it, and it&apos;s not clear to me what it means on &lt;pre&gt; when &lt;pre&gt; has explicit &lt;br&gt;s and implicit line breaks from line-wrapping and explicit line breaks from embedded newlines or double-newlines.

What behaviour do you want to require from browsers?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>45505</commentid>
    <comment_count>2</comment_count>
    <who name="">contributor</who>
    <bug_when>2011-02-14 23:27:35 +0000</bug_when>
    <thetext>Checked in as WHATWG revision r5886.
Check-in comment: Incomplete requirement text for &lt;pre dir=auto&gt; and &lt;textarea dir=auta&gt; (blocked on getting spec for white-space:plaintext)
http://html5.org/tools/web-apps-tracker?from=5885&amp;to=5886</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>45506</commentid>
    <comment_count>3</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-02-14 23:28:37 +0000</bug_when>
    <thetext>er, s/white-space/unicode-bidi/g</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>45507</commentid>
    <comment_count>4</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-02-14 23:52:10 +0000</bug_when>
    <thetext>Ok, fantasai pointed me to the right specs.

I&apos;ve updated the spec to be consistent with how other such requirements are made and how they defer to CSS. Please don&apos;t hesitate to reopen the bug if there&apos;s something else that can be done to make this clearer.

EDITOR&apos;S RESPONSE: This is an Editor&apos;s Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Accepted
Change Description: see diff given below
Rationale: Concurred with reporter&apos;s comments.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>45508</commentid>
    <comment_count>5</comment_count>
    <who name="">contributor</who>
    <bug_when>2011-02-14 23:52:28 +0000</bug_when>
    <thetext>Checked in as WHATWG revision r5887.
Check-in comment: Update bidi requirements for &lt;pre&gt;, &lt;textarea&gt;, and &lt;br&gt;.
http://html5.org/tools/web-apps-tracker?from=5886&amp;to=5887</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>45718</commentid>
    <comment_count>6</comment_count>
    <who name="Aharon Lanin">aharon.lists.lanin</who>
    <bug_when>2011-02-16 16:45:34 +0000</bug_when>
    <thetext>The change made by http://html5.org/tools/web-apps-tracker?from=5886&amp;to=5887 is partially incorrect, because it says that the style layer can implement the bidi paragraph breaking requirements of &lt;br&gt;, as well as newlines in &lt;pre&gt; and &lt;textarea&gt; by &quot;implementing the CSS &apos;unicode-bidi&apos; property&quot;. As far as I know, unicode-bidi can not implement the bidi paragraph breaking requirements of these elements. What the style layer can and should do, however, is simply implement the Unicode Bidi Algorithm re newlines, which the UBA defines to be bidi paragraph breaks. This will result in the newlines in &lt;pre&gt; and &lt;textarea&gt; serving as paragraph breaks, since the existing default white-space style of these elements, as implemented by the style layer, will leave the newlines in these elements&apos; content. For &lt;br&gt;, the style layer should be able to implement it being a paragraph break via the default stylesheet settings for &lt;br&gt;, as they already appear in http://www.whatwg.org/specs/web-apps/current-work/multipage/rendering.html#punctuation-and-decorations:

br { content: &apos;\A&apos;; white-space: pre; }

I do realize that this comment has nothing to do with the subject of this bug (which is dir=auto), and will file a separate bug on the above if you prefer I do so.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>45720</commentid>
    <comment_count>7</comment_count>
    <who name="Aharon Lanin">aharon.lists.lanin</who>
    <bug_when>2011-02-16 17:04:26 +0000</bug_when>
    <thetext>The note added re dir=auto, i.e. &quot;For textarea and pre elements, the heuristic is applied on a per-paragraph level&quot; is great!

However, you might want to also tack on the standard disclaimer there: &quot;This requirement may be implemented indirectly through the style layer. For example, an HTML+CSS user agent could implement these requirements by implementing the CSS &apos;unicode-bidi&apos; property.&quot; (The unicode-bidi property *is* relevant here, since its plaintext value is what turns on the per-paragraph directionality estimation.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47911</commentid>
    <comment_count>8</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-05-03 22:15:35 +0000</bug_when>
    <thetext>EDITOR&apos;S RESPONSE: This is an Editor&apos;s Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Did Not Understand Request
Change Description: no spec change
Rationale:

I don&apos;t understand what is being requested here.

Please make sure to file separate bugs for separate issues, so that I can clearly track each issue and make sure nothing gets overlooked. Is comment 6 now dealt with in a separate bug? (It&apos;s unclear whether you did or did not file a new bug as mentioned in that comment.)

For comment 7, the suggested text is already present at the bottom of the section in question.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47932</commentid>
    <comment_count>9</comment_count>
    <who name="Aharon Lanin">aharon.lists.lanin</who>
    <bug_when>2011-05-04 09:04:48 +0000</bug_when>
    <thetext>You are right!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>53548</commentid>
    <comment_count>10</comment_count>
    <who name="Michael[tm] Smith">mike</who>
    <bug_when>2011-08-04 05:14:58 +0000</bug_when>
    <thetext>mass-move component to LC1</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>