mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibWeb: Do includes_properties_from_invalidation_set() for :link & co
Fixes #3511.
This commit is contained in:
parent
c4bc0842c1
commit
5f10f8c54c
Notes:
github-actions[bot]
2025-02-09 14:21:51 +00:00
Author: https://github.com/awesomekling
Commit: 5f10f8c54c
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3516
2 changed files with 25 additions and 0 deletions
|
@ -41,6 +41,8 @@
|
|||
#include <LibWeb/HTML/CustomElements/CustomElementReactionNames.h>
|
||||
#include <LibWeb/HTML/CustomElements/CustomElementRegistry.h>
|
||||
#include <LibWeb/HTML/EventLoop/EventLoop.h>
|
||||
#include <LibWeb/HTML/HTMLAnchorElement.h>
|
||||
#include <LibWeb/HTML/HTMLAreaElement.h>
|
||||
#include <LibWeb/HTML/HTMLBodyElement.h>
|
||||
#include <LibWeb/HTML/HTMLButtonElement.h>
|
||||
#include <LibWeb/HTML/HTMLFieldSetElement.h>
|
||||
|
@ -72,6 +74,7 @@
|
|||
#include <LibWeb/Page/Page.h>
|
||||
#include <LibWeb/Painting/PaintableBox.h>
|
||||
#include <LibWeb/Painting/ViewportPaintable.h>
|
||||
#include <LibWeb/SVG/SVGAElement.h>
|
||||
#include <LibWeb/Selection/Selection.h>
|
||||
#include <LibWeb/WebIDL/AbstractOperations.h>
|
||||
#include <LibWeb/WebIDL/DOMException.h>
|
||||
|
@ -1198,6 +1201,15 @@ bool Element::includes_properties_from_invalidation_set(CSS::InvalidationSet con
|
|||
// - FIXME: textarea elements that have a placeholder attribute whose value is currently being presented to the user.
|
||||
return false;
|
||||
}
|
||||
case CSS::PseudoClass::AnyLink:
|
||||
case CSS::PseudoClass::Link:
|
||||
case CSS::PseudoClass::LocalLink: {
|
||||
if (!is<HTML::HTMLAnchorElement>(*this) && !is<HTML::HTMLAreaElement>(*this) && !is<SVG::SVGAElement>(*this))
|
||||
return false;
|
||||
if (!has_attribute(HTML::AttributeNames::href))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
default:
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue