diff --git a/Libraries/LibWeb/HTML/HTMLBaseElement.cpp b/Libraries/LibWeb/HTML/HTMLBaseElement.cpp index bacda241da2..2b44d88d843 100644 --- a/Libraries/LibWeb/HTML/HTMLBaseElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLBaseElement.cpp @@ -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(); } diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/cssom/css-style-attr-decl-block.txt b/Tests/LibWeb/Text/expected/wpt-import/css/cssom/css-style-attr-decl-block.txt new file mode 100644 index 00000000000..c00ad4ef970 --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/css/cssom/css-style-attr-decl-block.txt @@ -0,0 +1,13 @@ +Harness status: OK + +Found 7 tests + +6 Pass +1 Fail +Pass Style attribute should create CSS declaration block based on its content +Pass Changes to style attribute should reflect on CSS declaration block +Pass Changes to CSS declaration block should reflect on style attribute +Pass Changes to CSS declaration block should queue mutation record for style attribute +Pass Removing non-existing property or setting invalid value on CSS declaration block shouldn't queue mutation record +Fail Changes to CSS declaration block after a base URL change +Pass Expansion of all:unset and all:revert treated identically \ No newline at end of file diff --git a/Tests/LibWeb/Text/input/wpt-import/css/cssom/css-style-attr-decl-block.html b/Tests/LibWeb/Text/input/wpt-import/css/cssom/css-style-attr-decl-block.html new file mode 100644 index 00000000000..6c38f80be4f --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/css/cssom/css-style-attr-decl-block.html @@ -0,0 +1,148 @@ + + + + + + + +