<?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>10812</bug_id>
          
          <creation_ts>2010-09-29 12:37:42 +0000</creation_ts>
          <short_desc>i18n comment 7 : line breaks in textarea and pre elements</short_desc>
          <delta_ts>2011-01-22 20:14:42 +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>pre-LC1 HTML5 spec (editor: Ian Hickson)</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</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="i18n bidi group">public-i18n-bidi</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>aharon.lists.lanin</cc>
    
    <cc>aronovitch</cc>
    
    <cc>ayg</cc>
    
    <cc>cewcathar</cc>
    
    <cc>ehsan</cc>
    
    <cc>ian</cc>
    
    <cc>mike</cc>
    
    <cc>mjs</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>39942</commentid>
    <comment_count>0</comment_count>
    <who name="i18n bidi group">public-i18n-bidi</who>
    <bug_when>2010-09-29 12:37:42 +0000</bug_when>
    <thetext>Comment from the i18n review of:
http://dev.w3.org/html5/spec/

Comment 7
At http://www.w3.org/International/reviews/html5-bidi/
Editorial/substantive: S
Tracked by: AL

Location in reviewed document:
undefined [http://dev.w3.org/html5/spec/spec.html#contents]

Comment:This is a part of the proposals made by the &quot;Additional Requirements for Bidi in HTML&quot; W3C First Public Working Draft. For a full description of the use cases, please see 
http://www.w3.org/International/docs/html-bidi-requirements/#newline-as-separator [http://www.w3.org/International/docs/html-bidi-requirements/#newline-as-separator]
. Here is the proposal made there:

In elements where line breaks are not collapsed, e.g. &lt;textarea&gt; and elements with white-space:pre|pre-line|pre-wrap, line breaks should constitute UBA paragraph breaks.

When a line break introduces a UBA paragraph break, the base direction of the new UBA paragraph will be determined by the computed direction of the nearest ancestor element whose bidi properties require its contents to be in a separate UBA paragraph (or sequence of paragraphs), e.g. a block element or an element directionally isolated by the ubi attribute (which is being proposed in a separate bug). Furthermore, for every element on the path in between that results in the creation of an embedding or override level, e.g. a &lt;bdo&gt; element or any element with a dir attribute or a value other than &quot;normal&quot; for the unicode-bidi CSS property, the correspondeng embedding or override level is re-introduced at the start of the new UBA paragraph (to be closed at the end of the element or the UBA paragraph, whichever comes first).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39974</commentid>
    <comment_count>1</comment_count>
    <who name="Maciej Stachowiak">mjs</who>
    <bug_when>2010-09-29 16:08:24 +0000</bug_when>
    <thetext>Shouldn&apos;t this be defined in CSS instead of HTML, at least the part that ties behavior to specific white-space values?

See also bug 10810</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>40605</commentid>
    <comment_count>2</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2010-10-05 00:44:32 +0000</bug_when>
    <thetext>I don&apos;t understand what HTML has to do here.

Could you give an example that doesn&apos;t use CSS that demonstrates the ambiguity in the spec today?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>40740</commentid>
    <comment_count>3</comment_count>
    <who name="Aharon Lanin">aharon.lists.lanin</who>
    <bug_when>2010-10-06 20:32:48 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; I don&apos;t understand what HTML has to do here.
&gt; 
&gt; Could you give an example that doesn&apos;t use CSS that demonstrates the ambiguity
&gt; in the spec today?

Here is an example. Uppercase Latin letters are used to represent RTL characters:

&lt;textarea dir=rtl&gt;
1. IT IS IMPORTANT TO LEARN html.
2. css IS IMPORTANT TOO.
&lt;/textarea&gt;

The correct display should be:

          .html NRAEL OT TNATROPMI SI TI .1
                   .OOT TNATROPMI SI css .2

Currently, because the bidi behavior of line breaks in &lt;textarea&gt; has not been explicitly specified, the display in Firefox and Opera is:

          html. NRAEL OT TNATROPMI SI TI .1
                   .OOT TNATROPMI SI 2. css

This is unreadable.

The exact same example could have been given with &lt;pre&gt; instead of &lt;textarea&gt;, and that is why I originally formulated this bug as &quot;In elements where line breaks are not collapsed, e.g. &lt;textarea&gt; and &lt;pre&gt;, line breaks should constitute UBA paragraph breaks.&quot;

However, I then realized that &lt;div style=&quot;white-space:pre&quot;&gt; should also be covered, just like &lt;pre&gt;, and replaced &quot;&lt;pre&gt;&quot; with &quot;elements with white-space:pre|pre-line|pre-wrap&quot;.

As you point out, that was a mistake: the part about elements with white-space:pre|pre-line|pre-wrap should only be in the CSS spec. The HTML spec should just speak of &lt;textarea&gt; and &lt;pre&gt;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>41031</commentid>
    <comment_count>4</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2010-10-12 09:19:37 +0000</bug_when>
    <thetext>Doesn&apos;t Unicode define the bidi behaviour of U+000A?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>41039</commentid>
    <comment_count>5</comment_count>
    <who name="Aharon Lanin">aharon.lists.lanin</who>
    <bug_when>2010-10-12 09:34:23 +0000</bug_when>
    <thetext>(In reply to comment #4)
&gt; Doesn&apos;t Unicode define the bidi behaviour of U+000A?

Yes, it does, and the proposal is compatible with it. But the Unicode standard is not definitive for HTML. After all, newlines are usually whitespace-collapsed in HTML. The ambiguity was sufficient to allow Firefox and Opera to treat line breaks as bidi whitespace for all this time.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>41300</commentid>
    <comment_count>6</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2010-10-14 07:48:13 +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: Rejected
Change Description: no spec change
Rationale:

Unicode is a normative reference, and except where otherwise specified, it is therefore entirely normative. The few places where it _is_ otherwise specified are e.g. in the rendering section, where the specification defines the suggested behaviour in terms of CSS, which itself overrides Unicode in certain specific places but by and large defers straight to Unicode, normatively.

So I don&apos;t think that this is undefined. Firefox and Opera are wrong here. File bugs, pointing to Unicode. If they disagree, send me links to the bugs where they disagree and I&apos;ll help out in whatever way I can.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>41780</commentid>
    <comment_count>7</comment_count>
    <who name="Ehsan Akhgari [:ehsan]">ehsan</who>
    <bug_when>2010-10-27 02:51:07 +0000</bug_when>
    <thetext>I filed this Mozilla bug:

https://bugzilla.mozilla.org/show_bug.cgi?id=607541</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>42266</commentid>
    <comment_count>8</comment_count>
    <who name="Aharon Lanin">aharon.lists.lanin</who>
    <bug_when>2010-11-08 12:04:34 +0000</bug_when>
    <thetext>For the record, this bug was actually fixed (or nearly so) by &lt;http://html5.org/tools/web-apps-tracker?from=5669&amp;to=5670&gt;. (I say &quot;nearly&quot; because that change uses the term &quot;newline&quot;. I think that at least in the past the precise terminology here would have been &quot;line break&quot;, thus covering &lt;CR&gt;, &lt;LF&gt;, and combinations.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>42739</commentid>
    <comment_count>9</comment_count>
    <who name="CE Whitehead">cewcathar</who>
    <bug_when>2010-11-23 23:40:28 +0000</bug_when>
    <thetext>Aharon&apos;s suggestion is fine with me. I would like to see the wording tweaked so that U2028 U2029 U000A U000D all constitute UBA paragraph breaks, 
-- and with this specification applying to both the pre-  and text area elements.  

Best,

--C. E. Whitehead
cewcathar@hotmail.com</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>42770</commentid>
    <comment_count>10</comment_count>
    <who name="Ehsan Akhgari [:ehsan]">ehsan</who>
    <bug_when>2010-11-25 06:50:30 +0000</bug_when>
    <thetext>(In reply to comment #8)
&gt; For the record, this bug was actually fixed (or nearly so) by
&gt; &lt;http://html5.org/tools/web-apps-tracker?from=5669&amp;to=5670&gt;. (I say &quot;nearly&quot;
&gt; because that change uses the term &quot;newline&quot;. I think that at least in the past
&gt; the precise terminology here would have been &quot;line break&quot;, thus covering &lt;CR&gt;,
&gt; &lt;LF&gt;, and combinations.)

Should we file a new bug requesting this change?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>42881</commentid>
    <comment_count>11</comment_count>
    <who name="Aharon Lanin">aharon.lists.lanin</who>
    <bug_when>2010-11-30 09:24:24 +0000</bug_when>
    <thetext>(In reply to comment #10)

Filed bug 11436.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>42981</commentid>
    <comment_count>12</comment_count>
    <who name="Amit Aronovitch">aronovitch</who>
    <bug_when>2010-12-02 07:29:37 +0000</bug_when>
    <thetext>Minor correction to Comment 9:

U2028 should probably be excluded from the list. U2028 is LS, which, by UAX#13, only breaks the line without affecting the flow.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>