mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-03 13:02:09 +02:00
Element.cpp still encoded the CSS consequences of attribute changes: class/id invalidation keys, pseudo-class triggers, and shadow-host stylesheet fallout. Move that policy into AttributeInvalidator. Element now reports attribute changes to the helper and exposes a small state hook to remember removed attributes while invalidation is pending.
28 lines
457 B
C++
28 lines
457 B
C++
/*
|
|
* Copyright (c) 2026-present, the Ladybird developers
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/FlyString.h>
|
|
#include <AK/Optional.h>
|
|
#include <AK/String.h>
|
|
|
|
namespace Web::DOM {
|
|
|
|
class Element;
|
|
|
|
}
|
|
|
|
namespace Web::CSS::Invalidation {
|
|
|
|
void invalidate_style_after_attribute_change(
|
|
DOM::Element&,
|
|
FlyString const& attribute_name,
|
|
Optional<String> const& old_value,
|
|
Optional<String> const& new_value);
|
|
|
|
}
|