mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-29 08:11:13 +00:00
LibWeb: Don't try to invalidate style for character data nodes
Character data nodes like text and HTML comments don't have style, so let's just exit invalidation immediately for those.
This commit is contained in:
parent
8beb7c7700
commit
f351f75a34
Notes:
github-actions[bot]
2024-09-22 18:08:40 +00:00
Author: https://github.com/awesomekling Commit: https://github.com/LadybirdBrowser/ladybird/commit/f351f75a346 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1483 Reviewed-by: https://github.com/kalenikaliaksandr
|
@ -389,6 +389,9 @@ JS::GCPtr<HTML::Navigable> Node::navigable() const
|
|||
|
||||
void Node::invalidate_style(StyleInvalidationReason reason)
|
||||
{
|
||||
if (is_character_data())
|
||||
return;
|
||||
|
||||
if (!needs_style_update() && !document().needs_full_style_update()) {
|
||||
dbgln_if(STYLE_INVALIDATION_DEBUG, "Invalidate style ({}): {}", to_string(reason), debug_description());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue