mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-23 03:22:54 +00:00
LibWeb: Invalidate document style when media rules are changed
This ensures that new media rules are always produce the correct result when evaluated.
This commit is contained in:
parent
1659381362
commit
c941170e5a
Notes:
github-actions[bot]
2025-04-04 08:11:48 +00:00
Author: https://github.com/tcl3
Commit: c941170e5a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4213
Reviewed-by: https://github.com/gmta ✅
4 changed files with 2110 additions and 0 deletions
|
@ -329,6 +329,7 @@ void CSSStyleSheet::remove_owning_document_or_shadow_root(DOM::Node& document_or
|
|||
|
||||
void CSSStyleSheet::invalidate_owners(DOM::StyleInvalidationReason reason)
|
||||
{
|
||||
m_did_match = {};
|
||||
for (auto& document_or_shadow_root : m_owning_documents_or_shadow_roots) {
|
||||
document_or_shadow_root->invalidate_style(reason);
|
||||
document_or_shadow_root->document().style_computer().invalidate_rule_cache();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue