Fix: Add support for stylesheet MIME type quirk in quirks mode#51860
Merged
servo-wpt-sync merged 2 commits intoweb-platform-tests:masterfrom Apr 6, 2025
Merged
Fix: Add support for stylesheet MIME type quirk in quirks mode#51860servo-wpt-sync merged 2 commits intoweb-platform-tests:masterfrom
servo-wpt-sync merged 2 commits intoweb-platform-tests:masterfrom
Conversation
wpt-pr-bot
approved these changes
Apr 4, 2025
Collaborator
wpt-pr-bot
left a comment
There was a problem hiding this comment.
The review process for this patch is being conducted in the Servo project.
bcbd18e to
5e1398d
Compare
Signed-off-by: saku-1101 <[email protected]>
Signed-off-by: saku-1101 <[email protected]>
5e1398d to
7a8fbe7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements the HTML spec quirk for stylesheets: https://html.spec.whatwg.org/multipage/#link-type-stylesheet
The implementation adds a check in
stylesheet_loader.rsto handle this quirk condition correctly, and adds a new WPT test to verify that same-origin non-CSS MIME type resources are properly treated as CSS in quirks mode.Testing: Added a new WPT test (
quirk-origin-check-positive.html) that verifies the positive case for this quirk.Fixes: servo/servo#36324
Reviewed in servo/servo#36338