mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-07 08:39:22 +00:00
LibWeb/CSS: Evaluate media queries in shadow roots
This fixes a rendering issue on https://prodengi.kz/ that someone on Discord reported. :^)
This commit is contained in:
parent
1aab7b51ea
commit
0b775da7c7
Notes:
github-actions[bot]
2024-10-20 06:58:04 +00:00
Author: https://github.com/thislooksfun
Commit: 0b775da7c7
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1869
Reviewed-by: https://github.com/AtkinsSJ ✅
5 changed files with 43 additions and 13 deletions
|
@ -328,14 +328,8 @@ void StyleComputer::for_each_stylesheet(CascadeOrigin cascade_origin, Callback c
|
|||
callback(*m_user_style_sheet, {});
|
||||
}
|
||||
if (cascade_origin == CascadeOrigin::Author) {
|
||||
document().for_each_active_css_style_sheet([&](CSSStyleSheet& sheet) {
|
||||
callback(sheet, {});
|
||||
});
|
||||
|
||||
const_cast<DOM::Document&>(document()).for_each_shadow_root([&](DOM::ShadowRoot& shadow_root) {
|
||||
shadow_root.for_each_css_style_sheet([&](CSSStyleSheet& sheet) {
|
||||
callback(sheet, &shadow_root);
|
||||
});
|
||||
document().for_each_active_css_style_sheet([&](auto& sheet, auto shadow_root) {
|
||||
callback(sheet, shadow_root);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue