Bug 11140
| Summary: | REGRESSION: view source window blank | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Geoffrey Garen <ggaren> |
| Component: | Page Loading | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | Critical | CC: | ap, mjs, sullivan |
| Priority: | P1 | ||
| Version: | 420+ | ||
| Hardware: | Mac | ||
| OS: | OS X 10.4 | ||
Geoffrey Garen
1. Load any URL
2. View -> View Source
Nightlies say this regressed form r16709 to 16729. Signs point to r16730, r16725, or r16710, Maciej's loader changes.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
John Sullivan
I've debugged this a little and it looks like the problem has to do with [WebFrame loadData:]. Safari gets the document's source from [WebHTMLRepresentation documentSource]. The string this returns looks fine. Then the string is converted into an NSData object using [string dataUsingEncoding:NSUnicodeStringEncoding]. This results in a non-nil NSData object, presumably correct since this code hasn't changed. Then this data is loaded in the webView using:
[[webView mainFrame] loadData:theDataIJustMentioned MIMEType:@"text/plain" textEncodingName:@"UTF-16" baseURL:nil];
But the display is blank, so presumably something beneath this loadData: call is failing.
Alexey Proskuryakov
Fixed by Maciej in r16848.