mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-03 13:02:09 +02:00
AdoptedStyleSheets.cpp still handled CSS-side fallout from adopted sheet list mutations directly. Move sheet attachment and media-query setup to a CSS invalidation helper, along with rule-cache invalidation. The observable array callbacks continue to validate JS values and same-document construction rules. The helper now owns the CSS work for when a constructed stylesheet becomes visible to, or is removed from, a Document or ShadowRoot.
27 lines
457 B
C++
27 lines
457 B
C++
/*
|
|
* Copyright (c) 2026-present, the Ladybird developers
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
namespace Web::DOM {
|
|
|
|
class Node;
|
|
|
|
}
|
|
|
|
namespace Web::CSS {
|
|
|
|
class CSSStyleSheet;
|
|
|
|
}
|
|
|
|
namespace Web::CSS::Invalidation {
|
|
|
|
void invalidate_style_after_adopting_style_sheet(DOM::Node& document_or_shadow_root, CSSStyleSheet&);
|
|
void invalidate_style_after_removing_adopted_style_sheet(DOM::Node& document_or_shadow_root, CSSStyleSheet&);
|
|
|
|
}
|