|Summary:||REGRESSION: Unclosed <title> makes the window display garbage or empty title|
|Product:||WebKit||Reporter:||Alexey Proskuryakov <ap>|
|Component:||Page Loading||Assignee:||Alexey Proskuryakov <ap>|
|OS:||OS X 10.4|
Description Alexey Proskuryakov 2007-02-04 07:46:26 PST
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.
Comment 4 Maciej Stachowiak 2007-02-07 00:35:29 PST
Does this affect real-world sites?
Comment 5 Alexey Proskuryakov 2007-02-07 01:22:18 PST
> 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.
Comment 6 Alexey Proskuryakov 2007-02-07 11:50:25 PST
Created attachment 13012 [details] proposed fix
Comment 7 Darin Adler 2007-02-07 11:56:22 PST
Comment on attachment 13012 [details] proposed fix How does this patch help? It looks to me like if i == length then the for loop won't do anything, the while loop won't do anything, and the following if statement will return "" anyway. So this patch would have no effect.
Comment 8 Alexey Proskuryakov 2007-02-07 12:03:29 PST
Comment on attachment 13012 [details] proposed fix In this case, the if statement doesn't return "": (!builderIndex && stringBuilder[builderIndex] == ' ') is false when stringBuilder equals '\n', for example.
Comment 9 Darin Adler 2007-02-07 12:19:10 PST
Comment on attachment 13012 [details] proposed fix OK. I'm convinced this is correct. Let me note in passing that I'm unhappy with the structure and readability of the function. It took me a really long time studying the code to understand why it's OK to look at stringBuilder[builderIndex] when builderIndex is 0, even though that's "off the end of the array".
Comment 10 Alexey Proskuryakov 2007-02-07 12:27:02 PST
Committed revision 19473.