mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:27:35 +00:00
LibWeb: Support :active pseudo-class for hyperlinks, :focus possibly
Adds support for the :active pseudo-class for hyperlinks (<a> tags only). Also, since it was very similar to :focus and an element having a focused state was already implemented, I went ahead and implemented that pseudo-class too, although I cannot come up with a working example to validate it.
This commit is contained in:
parent
457edaa4d2
commit
5eb65286b6
10 changed files with 39 additions and 2 deletions
|
@ -876,6 +876,17 @@ void Document::set_focused_element(Element* element)
|
|||
m_layout_root->set_needs_display();
|
||||
}
|
||||
|
||||
void Document::set_active_element(Element* element)
|
||||
{
|
||||
if (m_active_element == element)
|
||||
return;
|
||||
|
||||
m_active_element = element;
|
||||
|
||||
if (m_layout_root)
|
||||
m_layout_root->set_needs_display();
|
||||
}
|
||||
|
||||
void Document::set_ready_state(const String& ready_state)
|
||||
{
|
||||
m_ready_state = ready_state;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue