some DOCTYPEs that should lead to limited-quirks mode lead to no-quirks mode
Categories
(Core :: DOM: HTML Parser, defect)
Tracking
()
People
(Reporter: dbaron, Assigned: hsivonen)
Details
Attachments
(3 files)
708 bytes,
text/html
|
Details | |
706 bytes,
text/html
|
Details | |
47 bytes,
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-esr78+
|
Details | Review |
I was just writing a test to file bug 1636606 and I noticed that we don't match the spec's rules for determining when to be in limited-quirks mode, whereas Chromium does.
In particular, the spec that currently says:
Otherwise, if the document is not an iframe srcdoc document, and the DOCTYPE token matches one of the conditions in the following list, then set the Document to limited-quirks mode:
- [...]
- The system identifier is not missing and the public identifier starts with: "-//W3C//DTD HTML 4.01 Transitional//"
It appears that, instead of the test:
the public identifier starts with: "-//W3C//DTD HTML 4.01 Transitional//"
we behave as though the spec had said:
the public identifier is: "-//W3C//DTD HTML 4.01 Transitional//EN"
Chromium appears to follow the spec.
While I'd perhaps have preferred that the spec match our behavior, it doesn't, and it seems like it might be worth aligning with the spec on this case (and probably other similar cases).
Reporter | ||
Comment 1•4 years ago
|
||
Reporter | ||
Comment 2•4 years ago
|
||
Reporter | ||
Comment 3•4 years ago
|
||
In those testcases, the difference between no-quirks mode and limited-quirks mode is whether the "hello" "hello" lines are stuck together (limited-quirks or quirks) or spaced apart (no-quirks mode). Everything else should be the same between no-quirks and limited-quirks.
Updated•4 years ago
|
Assignee | ||
Comment 4•4 years ago
|
||
The almost quirks list changed to prefix match at the same time as the quirks list:
https://searchfox.org/whatwg-html/diff/9345b201261c452868a68780ece85370f17644a3/source#42357
Yet, I somehow failed to make the change to the almost standard check at the time.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 5•4 years ago
|
||
Implements a part of the spec change
https://searchfox.org/whatwg-html/diff/9345b201261c452868a68780ece85370f17644a3/source#42357
that was originally missed.
Assignee | ||
Comment 6•4 years ago
|
||
Pushed by hsivonen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5def8ccd9388 Use prefix match for public identifiers that trigger the Almost Standards Mode. r=alchen
Comment 8•4 years ago
|
||
bugherder |
Assignee | ||
Comment 9•4 years ago
|
||
Updated•4 years ago
|
Assignee | ||
Comment 10•4 years ago
|
||
Comment on attachment 9147261 [details]
Bug 1636607 - Use prefix match for public identifiers that trigger the Almost Standards Mode.
ESR Uplift Approval Request
- If this is not a sec:{high,crit} bug, please state case for ESR consideration: Some pages in the long tail of the legacy Web will get the wrong rendering mode.
- User impact if declined: Layout/styling of pages may look slightly broken.
- Fix Landed on Version: 79
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): Merely changes exact match to prefix match.
- String or UUID changes made by this patch: None.
Updated•4 years ago
|
Comment 11•4 years ago
|
||
Comment on attachment 9147261 [details]
Bug 1636607 - Use prefix match for public identifiers that trigger the Almost Standards Mode.
Improves web compat for legacy sites. Approved for 78.1esr.
Comment 12•4 years ago
|
||
bugherder uplift |
Description
•