layout: Only include quirks-mode.css in actual quirks mode (#37814)

This stylesheet was being included both in quirks mode and in limited
quirks mode. It should only be the former.

Testing: adding new test.
Part of #37813

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
Oriol Brufau 2025-07-01 20:48:35 +02:00 committed by GitHub
parent 7375d09887
commit 227aecad51
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 86 additions and 1 deletions

View file

@ -727,7 +727,7 @@ impl LayoutThread {
self.load_all_web_fonts_from_stylesheet_with_guard(stylesheet, guards.ua_or_user);
}
if self.stylist.quirks_mode() != QuirksMode::NoQuirks {
if self.stylist.quirks_mode() == QuirksMode::Quirks {
self.stylist.append_stylesheet(
ua_stylesheets.quirks_mode_stylesheet.clone(),
guards.ua_or_user,