mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-03 13:02:09 +02:00
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.
27 lines
550 B
C++
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&);
|
|
|
|
}
|