Bug 159489
Summary: | iframe srcdoc with quirky doctype should be no-quirks mode | ||
---|---|---|---|
Product: | WebKit | Reporter: | Simon Pieters (:zcorpan) <zcorpan> |
Component: | DOM | Assignee: | Ryosuke Niwa <rniwa> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | ahmad.saleem792, ap, bfulgham, cdumez, rniwa, webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Simon Pieters (:zcorpan)
http://software.hixie.ch/utilities/js/live-dom-viewer/saved/4303
<iframe srcdoc="<!doctype x>">
The srcdoc document should always be in no-quirks mode, regardless of the doctype. In WebKit if there's a quirky doctype it triggers quirks mode.
https://html.spec.whatwg.org/multipage/syntax.html#the-initial-insertion-mode
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Ahmad Saleem
I am able to reproduce this bug in Safari 15.6 on macOS 12.5 using attached test case, where it shows "BackCompat" mode for Safari in logs, while CSS1Compat mode for Firefox Nightly 105 and Chrome Canary 106. Thanks!
Ahmad Saleem
*** Safari 15.6 on macOS 12.5 ***
log: BackCompat
rendering mode: CSS1Compat
document has no title
*** Firefox Nightly 105 ***
log: CSS1Compat
rendering mode: CSS1Compat
document has no title
*** Chrome Canary 106 ***
log: CSS1Compat
rendering mode: CSS1Compat
document has no title
Radar WebKit Bug Importer
<rdar://problem/98460686>
Ryosuke Niwa
Oh, we have a check for this in HTMLConstructionSite::setDefaultCompatibilityMode() but we're missing one in HTMLConstructionSite::setCompatibilityModeFromDoctype
Ryosuke Niwa
Pull request: https://github.com/WebKit/WebKit/pull/3199
EWS
Committed 253326@main (4401d4e5b5d9): <https://commits.webkit.org/253326@main>
Reviewed commits have been landed. Closing PR #3199 and removing active labels.