Do not invalidate shadow-root rule caches when the document user style sheet changes. Shadow trees still need style invalidation because document user rules can match their descendants, but their local author rule caches do not include the document user sheet. Since user and content-blocker sheets now live only in the document scope, shadow-DOM state changes also have to consult the document user selector insights for :has() and pseudo-class invalidation. Add content blocker coverage for user-style refreshes, shadow :has() state changes, and shadow pseudo-class invalidation.
20 lines
428 B
C++
20 lines
428 B
C++
/*
|
|
* Copyright (c) 2026-present, the Ladybird developers
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <LibWeb/CSS/PseudoClassBitmap.h>
|
|
|
|
namespace Web::CSS {
|
|
|
|
struct SelectorInsights {
|
|
bool has_has_selectors { false };
|
|
bool has_has_selectors_with_relative_selector_that_has_sibling_combinator { false };
|
|
bool has_local_link_selectors { false };
|
|
PseudoClassBitmap pseudo_classes;
|
|
};
|
|
|
|
}
|