mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-19 07:22:21 +00:00
LibWeb: Don't attempt to set the frozen base url on a null base element
This commit is contained in:
parent
72a384bc1f
commit
1c2b6ae03e
Notes:
github-actions[bot]
2025-06-24 13:34:55 +00:00
Author: https://github.com/tcl3
Commit: 1c2b6ae03e
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5197
Reviewed-by: https://github.com/shannonbooth ✅
3 changed files with 162 additions and 1 deletions
|
@ -49,7 +49,7 @@ void HTMLBaseElement::removed_from(Node* old_parent, Node& old_root)
|
|||
// The frozen base URL must be immediately set for an element whenever any of the following situations occur:
|
||||
// - The base element becomes the first base element in tree order with an href content attribute in its Document.
|
||||
auto first_base_element_with_href_in_document = document().first_base_element_with_href_in_tree_order();
|
||||
if (first_base_element_with_href_in_document != old_first_base_element_with_href_in_tree_order)
|
||||
if (first_base_element_with_href_in_document && first_base_element_with_href_in_document != old_first_base_element_with_href_in_tree_order)
|
||||
first_base_element_with_href_in_document->set_the_frozen_base_url();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue