<?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>12582</bug_id>
          
          <creation_ts>2007-02-04 07:46:26 -0800</creation_ts>
          <short_desc>REGRESSION: Unclosed &lt;title&gt; makes the window display garbage or empty title</short_desc>
          <delta_ts>2007-02-07 12:27:02 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Page Loading</component>
          <version>420+</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar, Regression</keywords>
          <priority>P1</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alexey Proskuryakov">ap</reporter>
          <assigned_to name="Alexey Proskuryakov">ap</assigned_to>
          <cc>ddkilzer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>28613</commentid>
    <comment_count>0</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2007-02-04 07:46:26 -0800</bug_when>
    <thetext>Steps to reproduce: reload the attached document several times. The window title will be blank, or will display garbage intermittently.

The is a regression from shipping WebKit, where the file name is used as window title.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>28599</commentid>
    <comment_count>1</comment_count>
      <attachid>12916</attachid>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2007-02-04 07:46:57 -0800</bug_when>
    <thetext>Created attachment 12916
test case</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>27654</commentid>
    <comment_count>2</comment_count>
    <who name="Maciej Stachowiak">mjs</who>
    <bug_when>2007-02-04 11:51:10 -0800</bug_when>
    <thetext>&lt;rdar://problem/4975135&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>27635</commentid>
    <comment_count>3</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-02-04 12:24:02 -0800</bug_when>
    <thetext>Similar/related to Bug 3905.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>25381</commentid>
    <comment_count>4</comment_count>
    <who name="Maciej Stachowiak">mjs</who>
    <bug_when>2007-02-07 00:35:29 -0800</bug_when>
    <thetext>Does this affect real-world sites?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>25389</commentid>
    <comment_count>5</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2007-02-07 01:22:18 -0800</bug_when>
    <thetext>&gt; Does this affect real-world sites?

I am not aware of any such sites. Discovered by accident when making a test case for another bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>24916</commentid>
    <comment_count>6</comment_count>
      <attachid>13012</attachid>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2007-02-07 11:50:25 -0800</bug_when>
    <thetext>Created attachment 13012
proposed fix</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>24917</commentid>
    <comment_count>7</comment_count>
      <attachid>13012</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2007-02-07 11:56:22 -0800</bug_when>
    <thetext>Comment on attachment 13012
proposed fix

How does this patch help?

It looks to me like if i == length then the for loop won&apos;t do anything, the while loop won&apos;t do anything, and the following if statement will return &quot;&quot; anyway. So this patch would have no effect.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>24919</commentid>
    <comment_count>8</comment_count>
      <attachid>13012</attachid>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2007-02-07 12:03:29 -0800</bug_when>
    <thetext>Comment on attachment 13012
proposed fix

In this case, the if statement doesn&apos;t return &quot;&quot;: (!builderIndex &amp;&amp; stringBuilder[builderIndex] == &apos; &apos;) is false when stringBuilder[0] equals &apos;\n&apos;, for example.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>24924</commentid>
    <comment_count>9</comment_count>
      <attachid>13012</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2007-02-07 12:19:10 -0800</bug_when>
    <thetext>Comment on attachment 13012
proposed fix

OK.

I&apos;m convinced this is correct. Let me note in passing that I&apos;m unhappy with the structure and readability of the function.

It took me a really long time studying the code to understand why it&apos;s OK to look at stringBuilder[builderIndex] when builderIndex is 0, even though that&apos;s &quot;off the end of the array&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>24926</commentid>
    <comment_count>10</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2007-02-07 12:27:02 -0800</bug_when>
    <thetext>Committed revision 19473.
</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>12916</attachid>
            <date>2007-02-04 07:46:57 -0800</date>
            <delta_ts>2007-02-04 07:46:57 -0800</delta_ts>
            <desc>test case</desc>
            <filename>empty-title.html</filename>
            <type>text/html</type>
            <size>64</size>
            <attacher name="Alexey Proskuryakov">ap</attacher>
            
              <data encoding="base64">PGh0bWw+CiAgPGhlYWQ+CiAgICA8dGl0bGU+CiAgPC9oZWFkPgogIDxib2R5PgogIDwvYm9keT4K
PC9odG1sPg==
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>13012</attachid>
            <date>2007-02-07 11:50:25 -0800</date>
            <delta_ts>2007-02-07 12:19:10 -0800</delta_ts>
            <desc>proposed fix</desc>
            <filename>12582r1_patch.txt</filename>
            <type>text/plain</type>
            <size>1260</size>
            <attacher name="Alexey Proskuryakov">ap</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYkNvcmUvQ2hhbm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mUvbG9h
ZGVyL0RvY3VtZW50TG9hZGVyLmNwcAkocmV2aXNpb24gMTk0NjYpCisrKyBXZWJDb3JlL2xvYWRl
ci9Eb2N1bWVudExvYWRlci5jcHAJKHdvcmtpbmcgY29weSkKQEAgLTY3LDYgKzY3LDkgQEAgc3Rh
dGljIGlubGluZSBTdHJpbmcgY2Fub25pY2FsaXplZFRpdGxlKAogICAgICAgICAgICAgYnJlYWs7
CiAgICAgfQogCisgICAgaWYgKGkgPT0gbGVuZ3RoKQorICAgICAgICByZXR1cm4gIiI7CisKICAg
ICAvLyBSZXBsYWNlIGNvbnRyb2wgY2hhcmFjdGVycyB3aXRoIHNwYWNlcywgYW5kIGJhY2tzbGFz
aGVzIHdpdGggY3VycmVuY3kgc3ltYm9scywgYW5kIGNvbGxhcHNlIHdoaXRlc3BhY2UuCiAgICAg
Ym9vbCBwcmV2aW91c0NoYXJXYXNXUyA9IGZhbHNlOwogICAgIGZvciAoOyBpIDwgbGVuZ3RoOyAr
K2kpIHsK
</data>
<flag name="review"
          id="5030"
          type_id="1"
          status="+"
          setter="darin"
    />
          </attachment>
      

    </bug>

</bugzilla>