Skip to content

Apply style quirk also in limited-quirks mode #12097

Closed
TimvdLippe wants to merge 1 commit intowhatwg:mainfrom
TimvdLippe:limited-quirks-style-same-domain
Closed

Apply style quirk also in limited-quirks mode #12097
TimvdLippe wants to merge 1 commit intowhatwg:mainfrom
TimvdLippe:limited-quirks-style-same-domain

Conversation

@TimvdLippe
Copy link
Copy Markdown
Contributor

@TimvdLippe TimvdLippe commented Jan 21, 2026

Browsers apply this quirk in both quirks 1 and
limited-quirks mode 2.

(See WHATWG Working Mode: Changes for more details.)


/links.html ( diff )

@zcorpan
Copy link
Copy Markdown
Member

zcorpan commented Jan 22, 2026

The test has

          if (nosniff === "nosniff" || contentType === "wrong Content-Type" && (document.compatMode === "CSS1Compat" || originType[0] === "cross-origin")) {
            l.onerror = t.step_func_done();
            l.onload = t.unreached_func("error event should have fired");
          } else {
            l.onload = t.step_func_done();
            l.onerror = t.unreached_func("load event should have fired");
          }

document.compatMode is CSS1Compat in limited quirks mode.

@TimvdLippe
Copy link
Copy Markdown
Contributor Author

Sorry I don't understand what you mean. Do you mean this PR is wrong or is it a confirmation of the finding? At least when I implement it in Servo and I don't check for both, a lot more tests fail. What am I missing?

@zcorpan
Copy link
Copy Markdown
Member

zcorpan commented Jan 22, 2026

I thought it meant that this PR is wrong. But it's possible I'm missing something...

@zcorpan
Copy link
Copy Markdown
Member

zcorpan commented Jan 22, 2026

The test also uses <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//" ""> which triggers quirks mode in Chromium and WebKit but limited-quirks in Gecko and Servo. The spec was changed in #12084

The test should have a non-empty system identifier to properly test limited-quirks mode.

@TimvdLippe
Copy link
Copy Markdown
Contributor Author

Hm will debug more to figure why these tests are failing. Unfortunately since the spec is unclear how to handle stylesheet fetch status (#1142) it's been a battle trying to figure what's what.

@TimvdLippe
Copy link
Copy Markdown
Contributor Author

After a bit more debugging figured out what was wrong with my implementation. Turns out I first needed to check the relevant parts of the link fetch loading and only then check if the status was Ok. For reference, this is my Servo PR: servo/servo#42037

The limited-quirks test is updated in web-platform-tests/wpt#57295

@TimvdLippe TimvdLippe closed this Jan 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants