Bug 17465 - REGRESSION: <DIV> tokenized into Div if still searching for DOCTYPE
Summary: REGRESSION: <DIV> tokenized into Div if still searching for DOCTYPE
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P1 Critical
Assignee: mitz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-20 22:18 PST by mitz
Modified: 2008-02-20 23:39 PST (History)
2 users (show)

See Also:


Attachments
Test case (71 bytes, text/html)
2008-02-20 22:18 PST, mitz
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description mitz 2008-02-20 22:18:39 PST
A comment at the beginning of a document causes WebKit to parse tags in some case-sensitive mode, so for example <DIV> is does not create an HTML DIV element. See attached test case.
Comment 1 mitz 2008-02-20 22:18:54 PST
Created attachment 19249 [details]
Test case
Comment 2 Robert Blaut 2008-02-20 22:25:51 PST
Expected behavior of the test case is border around inside? If yes I cannot confirm the bug in Webkit r30377. DIV element is created in DOM.

http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!--%20comment%20--%3E%0A%3CDIV%20style%3D%22border%3A%201px%20solid%3B%22%3EInside%20%3C%2FDIV%3E%0Aoutside

Comment 3 mitz 2008-02-20 22:48:35 PST
This is actually very specific, and is caused by the fact that DIV and DOCTYPE begin with the same letter. The lowercasing isn't in effect while searching for DOCTYPE so the D remains uppercase.
Comment 4 mitz 2008-02-20 23:39:40 PST
Fixed in <http://trac.webkit.org/projects/webkit/changeset/30455>.