1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-18 21:35:06 +00:00

LibHTML: Only actually-linked <a> elements should be blue+underlined

Turns out this just needed a little push in the selector engine. :^)
This commit is contained in:
Andreas Kling 2019-10-20 09:18:46 +02:00
parent c41bae3d54
commit 64ce453050
2 changed files with 3 additions and 2 deletions

View file

@ -20,7 +20,8 @@ bool matches(const Selector::Component& component, const Element& element)
case Selector::Component::PseudoClass::None:
break;
case Selector::Component::PseudoClass::Link:
ASSERT_NOT_REACHED();
if (!element.is_link())
return false;
break;
case Selector::Component::PseudoClass::Hover:
if (!matches_hover_pseudo_class(element))