mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-24 10:22:05 -05: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. (cherry picked from commit f351f75a34619ad969f660312a2e5486f742f685)
This commit is contained in:
parent
319dd59fc4
commit
66c8631bf8
1 changed files with 3 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue