mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibWeb: Note what's causing a style invalidation to happen
You can now build with STYLE_INVALIDATION_DEBUG and get a debug stream of reasons why style invalidations are happening and where. I've rewritten this code many times, so instead of throwing it away once again, I figured we should at least have it behind a flag.
This commit is contained in:
parent
1f5c49f40d
commit
ddbfac38b0
Notes:
github-actions[bot]
2024-09-08 07:46:37 +00:00
Author: https://github.com/awesomekling
Commit: ddbfac38b0
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1276
20 changed files with 92 additions and 38 deletions
|
@ -158,7 +158,7 @@ WebIDL::ExceptionOr<unsigned> CSSStyleSheet::insert_rule(StringView rule, unsign
|
|||
|
||||
if (m_style_sheet_list) {
|
||||
m_style_sheet_list->document().style_computer().invalidate_rule_cache();
|
||||
m_style_sheet_list->document_or_shadow_root().invalidate_style();
|
||||
m_style_sheet_list->document_or_shadow_root().invalidate_style(DOM::StyleInvalidationReason::StyleSheetInsertRule);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -179,7 +179,7 @@ WebIDL::ExceptionOr<void> CSSStyleSheet::delete_rule(unsigned index)
|
|||
if (!result.is_exception()) {
|
||||
if (m_style_sheet_list) {
|
||||
m_style_sheet_list->document().style_computer().invalidate_rule_cache();
|
||||
m_style_sheet_list->document_or_shadow_root().invalidate_style();
|
||||
m_style_sheet_list->document_or_shadow_root().invalidate_style(DOM::StyleInvalidationReason::StyleSheetDeleteRule);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue