Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should text/media/plugin/etc documents be in quirks mode? #3113

Closed
bzbarsky opened this issue Oct 10, 2017 · 0 comments · Fixed by #6745
Closed

Should text/media/plugin/etc documents be in quirks mode? #3113

bzbarsky opened this issue Oct 10, 2017 · 0 comments · Fixed by #6745
Labels
agenda+ To be discussed at a triage meeting compat Standard is not web compatible or proprietary feature needs standardizing topic: navigation

Comments

@bzbarsky
Copy link
Contributor

Testcases:

http://software.hixie.ch/utilities/cgi/test-tools/delayed-file?pause=0&mime=text%2Fplain&text=Am%20I%20in%20quirks%20mode?

http://software.hixie.ch/utilities/cgi/test-tools/delayed-file?pause=0&mime=image%2Fgif&text=GIF89a

http://software.hixie.ch/utilities/cgi/test-tools/delayed-file?pause=0&mime=audio/mp3&text=???

All of these are in quirks mode in Firefox, Safari, Chrome, and Edge. In the first three you can just check via the console; in Edge the console seems to be disabled on those file types, but you can use the "DOM Explorer" in devtools to add an onclick="alert(document.compatMode)" attribute on <body> and then click somewhere.

What happens in these cases per spec? The relevant steps for text/plain are https://html.spec.whatwg.org/#read-text and the just create a document object without ever setting its mode, as far as I can tell. Per https://dom.spec.whatwg.org/#concept-document-mode (well, the next paragraph), the default mode is "no-quirks". The tokenizer gets placed in the "PLAINTEXT state", which never hits the parts of the tokenizer that might set quirks-or-not mode. So the document should be standards mode.

Similarly, https://html.spec.whatwg.org/#read-media never sets the mode and never runs the parser, so always ends up in standards mode.

The same applies to https://html.spec.whatwg.org/#read-plugin and https://html.spec.whatwg.org/#read-ua-inline but I don't have good (esp cross-browser) testcases to exercise those.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agenda+ To be discussed at a triage meeting compat Standard is not web compatible or proprietary feature needs standardizing topic: navigation
Development

Successfully merging a pull request may close this issue.

3 participants