Bug 11140 - REGRESSION: view source window blank
Summary: REGRESSION: view source window blank
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P1 Critical
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-03 16:19 PDT by Geoffrey Garen
Modified: 2006-10-06 05:39 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Geoffrey Garen 2006-10-03 16:19:36 PDT
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.
Comment 1 John Sullivan 2006-10-04 17:34:21 PDT
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.
Comment 2 Alexey Proskuryakov 2006-10-06 05:39:40 PDT
Fixed by Maciej in r16848.