mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
LibWeb: Use invalidation sets for link-related pseudo classes
- :any-link - :link - :local-link
This commit is contained in:
committed by
Alexander Kalenik
parent
719a2e448f
commit
39abd75d59
Notes:
github-actions[bot]
2025-02-08 17:12:20 +00:00
Author: https://github.com/awesomekling Commit: https://github.com/LadybirdBrowser/ladybird/commit/39abd75d592 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3504
@@ -30,7 +30,14 @@ void HTMLHyperlinkElementUtils::set_the_url()
|
||||
{
|
||||
ScopeGuard invalidate_style_if_needed = [old_url = m_url, this] {
|
||||
if (m_url != old_url) {
|
||||
hyperlink_element_utils_element().invalidate_style(DOM::StyleInvalidationReason::HTMLHyperlinkElementHrefChange);
|
||||
hyperlink_element_utils_element().invalidate_style(
|
||||
DOM::StyleInvalidationReason::HTMLHyperlinkElementHrefChange,
|
||||
{
|
||||
{ .type = CSS::InvalidationSet::Property::Type::PseudoClass, .value = CSS::PseudoClass::AnyLink },
|
||||
{ .type = CSS::InvalidationSet::Property::Type::PseudoClass, .value = CSS::PseudoClass::Link },
|
||||
{ .type = CSS::InvalidationSet::Property::Type::PseudoClass, .value = CSS::PseudoClass::LocalLink },
|
||||
},
|
||||
{});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user