mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-26 20:55:35 +03:00
LibWeb: Don't crash when querying the CDataSection.assignedSlot property
This commit is contained in:
parent
3518f39b60
commit
521a1be97f
Notes:
sideshowbarker
2024-07-17 01:28:15 +09:00
Author: https://github.com/tcl3 Commit: https://github.com/SerenityOS/serenity/commit/521a1be97f Pull-request: https://github.com/SerenityOS/serenity/pull/23687 Reviewed-by: https://github.com/awesomekling
@ -0,0 +1 @@
|
|||||||
|
PASS (didn't crash)
|
@ -0,0 +1,9 @@
|
|||||||
|
<script src="../include.js"></script>
|
||||||
|
<script>
|
||||||
|
test(() => {
|
||||||
|
const xmlDocument = new DOMParser().parseFromString(`<xml></xml>`, "application/xml");
|
||||||
|
const cdata = xmlDocument.createCDATASection("Test CDATA");
|
||||||
|
const assignedSlot = cdata.assignedSlot;
|
||||||
|
println("PASS (didn't crash)")
|
||||||
|
});
|
||||||
|
</script>
|
@ -66,7 +66,7 @@ public:
|
|||||||
bool is_character_data() const { return type() == NodeType::TEXT_NODE || type() == NodeType::COMMENT_NODE; }
|
bool is_character_data() const { return type() == NodeType::TEXT_NODE || type() == NodeType::COMMENT_NODE; }
|
||||||
bool is_document_fragment() const { return type() == NodeType::DOCUMENT_FRAGMENT_NODE; }
|
bool is_document_fragment() const { return type() == NodeType::DOCUMENT_FRAGMENT_NODE; }
|
||||||
bool is_parent_node() const { return is_element() || is_document() || is_document_fragment(); }
|
bool is_parent_node() const { return is_element() || is_document() || is_document_fragment(); }
|
||||||
bool is_slottable() const { return is_element() || is_text(); }
|
bool is_slottable() const { return is_element() || is_text() || is_cdata_section(); }
|
||||||
bool is_attribute() const { return type() == NodeType::ATTRIBUTE_NODE; }
|
bool is_attribute() const { return type() == NodeType::ATTRIBUTE_NODE; }
|
||||||
bool is_cdata_section() const { return type() == NodeType::CDATA_SECTION_NODE; }
|
bool is_cdata_section() const { return type() == NodeType::CDATA_SECTION_NODE; }
|
||||||
virtual bool is_shadow_root() const { return false; }
|
virtual bool is_shadow_root() const { return false; }
|
||||||
|
Loading…
Reference in New Issue
Block a user