WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
12582
REGRESSION: Unclosed <title> makes the window display garbage or empty title
https://bugs.webkit.org/show_bug.cgi?id=12582
Summary
REGRESSION: Unclosed <title> makes the window display garbage or empty title
Alexey Proskuryakov
Reported
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.
Attachments
test case
(64 bytes, text/html)
2007-02-04 07:46 PST
,
Alexey Proskuryakov
no flags
Details
proposed fix
(1.23 KB, patch)
2007-02-07 11:50 PST
,
Alexey Proskuryakov
darin
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Alexey Proskuryakov
Comment 1
2007-02-04 07:46:57 PST
Created
attachment 12916
[details]
test case
Maciej Stachowiak
Comment 2
2007-02-04 11:51:10 PST
<
rdar://problem/4975135
>
David Kilzer (:ddkilzer)
Comment 3
2007-02-04 12:24:02 PST
Similar/related to
Bug 3905
.
Maciej Stachowiak
Comment 4
2007-02-07 00:35:29 PST
Does this affect real-world sites?
Alexey Proskuryakov
Comment 5
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.
Alexey Proskuryakov
Comment 6
2007-02-07 11:50:25 PST
Created
attachment 13012
[details]
proposed fix
Darin Adler
Comment 7
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.
Alexey Proskuryakov
Comment 8
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[0] equals '\n', for example.
Darin Adler
Comment 9
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".
Alexey Proskuryakov
Comment 10
2007-02-07 12:27:02 PST
Committed revision 19473.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug