Files
ladybird/Libraries/LibWeb/CSS/Invalidation/HasMutationInvalidator.h
Andreas Kling 79c32f88d2 LibWeb: Move pending :has() invalidation into the helper
Document.cpp still flushed pending :has() invalidation by walking the
document and shadow-root style scopes directly. Move that CSS-specific
flush into CSS::Invalidation::HasMutationInvalidator.

Document continues to own the flag that says a :has() flush is needed.
The helper now owns the style-scope work needed to invalidate elements
affected by pending :has() mutations.
2026-04-29 15:47:23 +02:00

27 lines
550 B
C++

/*
* Copyright (c) 2026-present, the Ladybird developers
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibWeb/DOM/StyleInvalidationReason.h>
namespace Web::DOM {
class Document;
class Element;
class Node;
}
namespace Web::CSS::Invalidation {
void invalidate_element_if_affected_by_has(DOM::Element&);
void invalidate_style_for_pending_has_mutations(DOM::Document&);
void schedule_has_invalidation_for_node(DOM::Node&, DOM::StyleInvalidationReason);
void schedule_has_invalidation_for_same_parent_move(DOM::Node&);
}