mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-31 23:42:52 +00:00
LibWeb: Add style invalidation for :target, :focus, :active and :link
This commit is contained in:
parent
1045000c28
commit
92d9907f8f
Notes:
github-actions[bot]
2024-11-06 20:43:56 +00:00
Author: https://github.com/awesomekling
Commit: 92d9907f8f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2204
9 changed files with 39 additions and 23 deletions
|
@ -31,12 +31,14 @@ void HTMLHyperlinkElementUtils::set_the_url()
|
|||
auto href_content_attribute = hyperlink_element_utils_href();
|
||||
if (!href_content_attribute.has_value()) {
|
||||
m_url = {};
|
||||
hyperlink_element_utils_element().invalidate_style(DOM::StyleInvalidationReason::HTMLHyperlinkElementHrefChange);
|
||||
return;
|
||||
}
|
||||
|
||||
// 2. Otherwise, parse this element's href content attribute value relative to this element's node document.
|
||||
// If parsing is successful, set this element's url to the result; otherwise, set this element's url to null.
|
||||
m_url = hyperlink_element_utils_document().parse_url(*href_content_attribute);
|
||||
hyperlink_element_utils_element().invalidate_style(DOM::StyleInvalidationReason::HTMLHyperlinkElementHrefChange);
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/links.html#dom-hyperlink-origin
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue