Closed
Bug 300374
Opened 19 years ago
Closed 16 years ago
render mode depends on the number of leading (irregular) characters
Categories
(Firefox :: General, defect)
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: csongor, Unassigned)
References
()
Details
(Keywords: testcase)
Attachments
(2 files)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4 On the link written above I made two files available. Both of them are irregular, i.e. they do not compliant to the standards. Both of them has a lot of "a" letters before the DOCTYPE definition, so this DOCTYPE definition should be ignored by the browser. The difference between them is only the number of "a" characters before the DOCTYPE definition. In the main part of the html files there is a table with an empty and a non-empty cell. My problem is that the two files are rendered differently, the first one ( http://www.webcenter.hu/~halmai/illustration/empty_cells/with_border.html )in "Standards compliance mode" and the other one ( http://www.webcenter.hu/~halmai/illustration/empty_cells/without_border.html ) in "Quirks mode". Thanks to the different rendering mode the empty cell is rendered deiiferently: with border in the first and without border in the second case. Reproducible: Always Steps to Reproduce: 1. visit the http://www.webcenter.hu/~halmai/illustration/empty_cells/with_border.html page 2. visit the http://www.webcenter.hu/~halmai/illustration/empty_cells/without_border.html page 3. compare them visually. Expected Results: I think the number of "a" characters should not influent the rendering mode. If there is at least one "a" character then it should ignore my DOCTYPE, otherwise it should not.
Well, what I wrote above is not a "bug" in it's strict meaning because it works funny only in case of out-of-standard html files. Anyway, I think it is a senseless behaviour, that's why I reported it.
A clever one you are ;-) This is because we look for the doctype inside the first 1024 (starting with the first non-whitespace) characters of a document. In your case you can image as if you wrote: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd" (which still triggers Standards Mode) ... and then <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd (which triggers Quirks Mode, as the closing " is missing). The reason you don't count 1024 chars in your documents is because they use Windows linebraks, which count for two chars each.
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•