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

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>119567</bug_id>
          
          <creation_ts>2013-08-08 02:23:11 -0700</creation_ts>
          <short_desc>LayoutTests/canvas/philip/tests/2d.text.draw.space.collapse.nonspace.html is against the spec</short_desc>
          <delta_ts>2022-07-18 15:01:50 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Canvas</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</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>0</everconfirmed>
          <reporter name="Rashmi Shyamasundar">rashmi.s2</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>bfulgham</cc>
    
    <cc>cdumez</cc>
    
    <cc>ian</cc>
    
    <cc>krit</cc>
    
    <cc>mrobinson</cc>
    
    <cc>rashmi.shyam</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>915353</commentid>
    <comment_count>0</comment_count>
    <who name="Rashmi Shyamasundar">rashmi.s2</who>
    <bug_when>2013-08-08 02:23:11 -0700</bug_when>
    <thetext>The layout test - LayoutTests/canvas/philip/tests/2d.text.draw.space.collapse.nonspace.html, is against the spec.

According to the below points in spec :-

1. http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#text-preparation-algorithm 
2. http://www.whatwg.org/specs/web-apps/current-work/multipage/common-microsyntaxes.html#space-character 

Only 4 space characters listed below should be replaced with U+0020
1. U+0009
2. U+000A
3. U+000C
4. U+000D

But, this test case is expecting that U+000B should also be replaced with U+0020.

Currently this test case passing on WebKit, since we are replacing U+000B with U+0020. So, both the implementation and the test case needs to be corrected.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>915354</commentid>
    <comment_count>1</comment_count>
    <who name="Rashmi Shyamasundar">rashmi.s2</who>
    <bug_when>2013-08-08 02:24:19 -0700</bug_when>
    <thetext>I am trying to fix the implementation as part of patch to the bug - 

https://bugs.webkit.org/show_bug.cgi?id=108881</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>915361</commentid>
    <comment_count>2</comment_count>
    <who name="Rashmi Shyamasundar">rashmi.s2</who>
    <bug_when>2013-08-08 02:51:21 -0700</bug_when>
    <thetext>There is a bug on W3C for the same test case :-

https://www.w3.org/Bugs/Public/show_bug.cgi?id=15925

And, the proposed patch in this W3C bug is to :-

replace the line
      &quot;ctx.fillText(&apos;E\x0b EE&apos;, -150, 37.5);&quot;

with 
      &quot;ctx.fillText(&apos;E\x0b EE&apos;, -100, 37.5);&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>915365</commentid>
    <comment_count>3</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2013-08-08 03:16:25 -0700</bug_when>
    <thetext>How do other browsers (Firefox 23 / IE10) behave?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>915382</commentid>
    <comment_count>4</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2013-08-08 04:40:35 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; How do other browsers (Firefox 23 / IE10) behave?

The test passes on Firefox 23, WebKit and Blink.

It fails on IE10 but apparently due to lack of support:
&quot;Aborted with exception: Object doesn&apos;t support property or method &apos;getContext&apos;&quot;

So it seems Chrome / Safari / Firefox and currently in sync. I would not change our behavior despite what the specification says.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>917897</commentid>
    <comment_count>5</comment_count>
    <who name="Rashmi Shyamasundar">rashmi.s2</who>
    <bug_when>2013-08-16 04:10:01 -0700</bug_when>
    <thetext>According to this draft spec - http://www.w3.org/html/wg/drafts/html/master/single-page.html#space-character , U+000B is an undefined Unicode character and its usage should result in a parse error.

Extracted from the above link :-

Any occurrences of any characters in the ranges U+0001 to U+0008, U+000E to U+001F, U+007F to U+009F, U+FDD0 to U+FDEF, and characters U+000B, U+FFFE, U+FFFF, U+1FFFE, U+1FFFF, U+2FFFE, U+2FFFF, U+3FFFE, U+3FFFF, U+4FFFE, U+4FFFF, U+5FFFE, U+5FFFF, U+6FFFE, U+6FFFF, U+7FFFE, U+7FFFF, U+8FFFE, U+8FFFF, U+9FFFE, U+9FFFF, U+AFFFE, U+AFFFF, U+BFFFE, U+BFFFF, U+CFFFE, U+CFFFF, U+DFFFE, U+DFFFF, U+EFFFE, U+EFFFF, U+FFFFE, U+FFFFF, U+10FFFE, and U+10FFFF are parse errors. These are all control characters or permanently undefined Unicode characters (noncharacters).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>921728</commentid>
    <comment_count>6</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-08-27 16:24:59 -0700</bug_when>
    <thetext>This test seems bogus to me -- how do you know what the font will draw U+000B as?

A better test would be something like comparing these two calls:

   ctx.fillText(&quot;E \x0b E&quot;, ...
   ctx.fillText(&quot;E E&quot;, ...

...to see if the two spaces collapse into one.

There should probably also be a separate test that checks the text in:

   http://www.w3.org/TR/css3-text/#white-space-processing

...saying that control characters in general should be ignored...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>944392</commentid>
    <comment_count>7</comment_count>
    <who name="Rashmi Shyamasundar">rashmi.s2</who>
    <bug_when>2013-10-29 05:16:59 -0700</bug_when>
    <thetext>As discussed with Mr. Christophe Dumez :-

The test passes on Chrome / Safari and Firefox. Our behavior should be in sync with others, despite what the specification says.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1884904</commentid>
    <comment_count>8</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2022-07-18 15:01:43 -0700</bug_when>
    <thetext>We deleted this test suit from LayoutTests a while ago.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1884905</commentid>
    <comment_count>9</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2022-07-18 15:01:50 -0700</bug_when>
    <thetext>suite*</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>