Bug 32671

Summary: REGRESSION(4.0.4-TOT):Web Inspector: Incorrect Doctype
Product: WebKit Reporter: Jay Robinson <jay>
Component: Web Inspector (Deprecated)Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Minor CC: abarth, bweinstein, commit-queue, eric, joepeck, keishi, pfeldman, pmuellr, rik, timothy, webkit.review.bot
Priority: P4 Keywords: Regression
Version: 528+ (Nightly build)   
Hardware: Mac (Intel)   
OS: OS X 10.6   
URL: http://www.apple.com/support
Attachments:
Description Flags
Screenshot of Apple.com/support inspected by Web Inspector with actual source code window behind the browser window.
none
[PATCH] The fix.
none
[PATCH] Same with tests. none

Description Jay Robinson 2009-12-17 10:28:20 PST
Created attachment 45084 [details]
Screenshot of Apple.com/support inspected by Web Inspector with actual source code window behind the browser window.

All HTML source code viewed through the Web Inspector will show an HTML5 doctype instead of the doctype actually specified. 

Tested with various doctypes with the same results. This has been a problem for at least the last several builds.

For example, Apple.com/support specifies HTML 4.01 transitional. However, the Web Inspector shows an HTML doctype on the first line of the HTML source code. 

Screenshot attached.
Comment 1 Timothy Hatcher 2009-12-17 10:32:39 PST
I wonder if we are showing the inspector's doctype and not the page's…
Comment 2 Timothy Hatcher 2009-12-17 10:34:04 PST
I see the correct doctype in Safari 4.0.4.
Comment 3 Pavel Feldman 2009-12-17 11:00:55 PST
Created attachment 45094 [details]
[PATCH] The fix.

I did not copy those via dom agent...
Comment 4 WebKit Review Bot 2009-12-17 11:02:41 PST
style-queue ran check-webkit-style on attachment 45094 [details] without any errors.
Comment 5 Pavel Feldman 2009-12-17 11:06:40 PST
Created attachment 45095 [details]
[PATCH] Same with tests.
Comment 6 WebKit Review Bot 2009-12-17 11:08:07 PST
style-queue ran check-webkit-style on attachment 45095 [details] without any errors.
Comment 7 WebKit Commit Bot 2009-12-17 12:11:33 PST
Comment on attachment 45095 [details]
[PATCH] Same with tests.

Rejecting patch 45095 from commit-queue.

Unexpected failure when landing patch!  Please file a bug against bugzilla-tool.
Failed to run "['WebKitTools/Scripts/bugzilla-tool', '--status-host=webkit-commit-queue.appspot.com', 'land-attachment', '--force-clean', '--non-interactive', '--parent-command=commit-queue', '--quiet', '45095']" exit_code: 1
Last 500 characters of output:
ut))
  File "/Users/eseidel/Projects/CommitQueue/WebKitTools/Scripts/modules/statusbot.py", line 73, in update_status
    response = self.browser.submit()
  File "build/bdist.macosx-10.5-i386/egg/mechanize/_mechanize.py", line 547, in submit
  File "build/bdist.macosx-10.5-i386/egg/mechanize/_mechanize.py", line 209, in open
  File "build/bdist.macosx-10.5-i386/egg/mechanize/_mechanize.py", line 261, in _mech_open
mechanize._response.httperror_seek_wrapper: HTTP Error 500: Internal Server Error
Comment 8 Pavel Feldman 2009-12-17 12:38:47 PST
Comment on attachment 45095 [details]
[PATCH] Same with tests.

Another attempt
Comment 9 Eric Seidel (no email) 2009-12-17 12:44:13 PST
I think Adam is working on a fix for this class of bug.  AppEngine (which is where the queue status server http://webkit-commit-queue.appspot.com/ is hosted) commonly gives us back 500 errors.  We should silently ignore them and try again.
Comment 10 WebKit Commit Bot 2009-12-17 12:53:20 PST
Comment on attachment 45095 [details]
[PATCH] Same with tests.

Clearing flags on attachment: 45095

Committed r52279: <http://trac.webkit.org/changeset/52279>
Comment 11 WebKit Commit Bot 2009-12-17 12:53:29 PST
All reviewed patches have been landed.  Closing bug.
Comment 12 Adam Barth 2009-12-17 15:00:39 PST
> I think Adam is working on a fix for this class of bug.

This is a different kind of bug.  Basically, by piping the status-host to bugzilla-tool, you made it possible for it to throw a new kind of error.  We need to update the error handling to take that into account.
Comment 13 Alexey Proskuryakov 2009-12-17 18:03:36 PST
+2009-12-17  Pavel Feldman  <pfeldman@dhcp-172-28-174-220.spb.corp.google.com>

Is that your preferred e-mail address?
Comment 14 Pavel Feldman 2009-12-17 22:47:51 PST
(In reply to comment #13)
> +2009-12-17  Pavel Feldman  <pfeldman@dhcp-172-28-174-220.spb.corp.google.com>
> 
> Is that your preferred e-mail address?

Heh. Thanks for heads up. This is a second time my config goes crazy.