<?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>40200</bug_id>
          
          <creation_ts>2010-06-04 20:59:16 -0700</creation_ts>
          <short_desc>&quot;Fix&quot; fast/dom/stripNullFromTextNodes.html in HTML5 parser</short_desc>
          <delta_ts>2010-06-07 11:51:48 -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>DOM</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Other</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</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>
          
          <blocked>39259</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Adam Barth">abarth</reporter>
          <assigned_to name="Adam Barth">abarth</assigned_to>
          <cc>ap</cc>
    
    <cc>eric</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>234501</commentid>
    <comment_count>0</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-06-04 20:59:16 -0700</bug_when>
    <thetext>&quot;Fix&quot; fast/dom/stripNullFromTextNodes.html in HTML5 parser</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>234502</commentid>
    <comment_count>1</comment_count>
      <attachid>57958</attachid>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-06-04 21:00:51 -0700</bug_when>
    <thetext>Created attachment 57958
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>234521</commentid>
    <comment_count>2</comment_count>
      <attachid>57958</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2010-06-04 22:08:19 -0700</bug_when>
    <thetext>Comment on attachment 57958
Patch

I guess we don&apos;t have any way to check in results for a test like this, eh?  We could with the html5lib tests.

Please consider adding a test with checked in results.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>234620</commentid>
    <comment_count>3</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2010-06-05 09:59:49 -0700</bug_when>
    <thetext>So, neither WebKit nor shipping versions of Gecko turn nulls into U+FFFD, but HTML5 requires that. Could it be a bug in the spec? What does IE do?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>234621</commentid>
    <comment_count>4</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2010-06-05 10:06:39 -0700</bug_when>
    <thetext>For some context: HTML5 offline storage parser also had the requirement to turn nulls into U+FFFD, which was dropped based on our feedback.

U+FFFD is generally used to signal decoding errors, which a null definitely doesn&apos;t cause.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>234622</commentid>
    <comment_count>5</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-06-05 10:19:57 -0700</bug_when>
    <thetext>I believe swallows the nulls, but I haven&apos;t tested recently.  We should file a bug with the HTML5 WG.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>234623</commentid>
    <comment_count>6</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2010-06-05 10:24:38 -0700</bug_when>
    <thetext>I tested in more detail, and it seems to be trickier:
- WebKit passes stripNullFromTextNodes.html, as it strips nulls from text node content;
- so does IE 7;
- Firefox 3.6.3 actually fails the test, and inserts U+FFFD;
- but Firefox passes an original reduction for rdar://4702420, which I incorrectly assumed to be the same: &lt;div&gt;\0&lt;/div&gt;

So, Firefox seems to drop the null if it&apos;s the only character in a text node (?!)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>234624</commentid>
    <comment_count>7</comment_count>
      <attachid>57967</attachid>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2010-06-05 10:26:22 -0700</bug_when>
    <thetext>Created attachment 57967
original reduction</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>234974</commentid>
    <comment_count>8</comment_count>
      <attachid>57958</attachid>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-06-07 11:51:41 -0700</bug_when>
    <thetext>Comment on attachment 57958
Patch

Clearing flags on attachment: 57958

Committed r60791: &lt;http://trac.webkit.org/changeset/60791&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>234975</commentid>
    <comment_count>9</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-06-07 11:51:48 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>57958</attachid>
            <date>2010-06-04 21:00:51 -0700</date>
            <delta_ts>2010-06-07 11:51:41 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-40200-20100604210050.patch</filename>
            <type>text/plain</type>
            <size>1764</size>
            <attacher name="Adam Barth">abarth</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1dlYkNvcmUvQ2hhbmdlTG9nIGIvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXgg
OTU3OWYyYTY5YjNlYTQzMzQ0MjdmYzZhNzkzODFhNGZhOTYwZTdjNS4uMzkyMTljMzE4ZTE2MTEw
YjQ0ZGUyNTEyMDlhNDk4MTcwY2FiNWQ5YiAxMDA2NDQKLS0tIGEvV2ViQ29yZS9DaGFuZ2VMb2cK
KysrIGIvV2ViQ29yZS9DaGFuZ2VMb2cKQEAgLTIsNiArMiwyMiBAQAogCiAgICAgICAgIFJldmll
d2VkIGJ5IE5PQk9EWSAoT09QUyEpLgogCisgICAgICAgICJGaXgiIGZhc3QvZG9tL3N0cmlwTnVs
bEZyb21UZXh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JiYzkxN2JiMDgyN2Y0M2IwNDRhMi4uNWVlOGU1NDBkN2QxNzE2Y2IxM2YwNDEz
ZWM1MTIwOGM3MDNjYThiMCAxMDA2NDQKLS0tIGEvV2ViQ29yZS9odG1sL0hUTUw1TGV4ZXIuaAor
KysgYi9XZWJDb3JlL2h0bWwvSFRNTDVMZXhlci5oCkBAIC0xNTAsOCArMTUwLDExIEBAIG5hbWVz
cGFjZSBXZWJDb3JlIHsKICAgICAgICAgICAgICAgICBpZiAobV9uZXh0SW5wdXRDaGFyYWN0ZXIg
PT0gJ1xyJykgewogICAgICAgICAgICAgICAgICAgICBtX25leHRJbnB1dENoYXJhY3RlciA9ICdc
bic7CiAgICAgICAgICAgICAgICAgICAgIG1fc2tpcE5leHROZXdMaW5lID0gdHJ1ZTsKLSAgICAg
ICAgICAgICAgICB9IGVsc2UKKyAgICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAg
ICAgICAgICBtX3NraXBOZXh0TmV3TGluZSA9IGZhbHNlOworICAgICAgICAgICAgICAgICAgICBp
ZiAobV9uZXh0SW5wdXRDaGFyYWN0ZXIgPT0gJ1wwJyB8fCAobV9uZXh0SW5wdXRDaGFyYWN0ZXIg
Pj0gMHhEODAwICYmIG1fbmV4dElucHV0Q2hhcmFjdGVyIDw9IDB4REZGRikpCisgICAgICAgICAg
ICAgICAgICAgICAgICBtX25leHRJbnB1dENoYXJhY3RlciA9IDB4RkZGRDsKKyAgICAgICAgICAg
ICAgICB9CiAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgICAgICB9CiAK
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>57967</attachid>
            <date>2010-06-05 10:26:22 -0700</date>
            <delta_ts>2010-06-05 10:26:22 -0700</delta_ts>
            <desc>original reduction</desc>
            <filename>thReduction.html</filename>
            <type>text/html</type>
            <size>42</size>
            <attacher name="Alexey Proskuryakov">ap</attacher>
            
              <data encoding="base64">PGRpdiBzdHlsZT0iYm9yZGVyOjFweCBzb2xpZCByZWQ7Ij4APC9kaXY+
</data>

          </attachment>
      

    </bug>

</bugzilla>