1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-22 19:35:06 +00:00
serenity/Tests/LibWeb/Text/expected/DOM
Andreas Kling bbb96d65b1 LibWeb: Don't crash on live range offset update during node insertion
When inserting a node into a parent, any live DOM ranges that reference
the parent may need to be updated. The spec does this by increasing or
decreasing the start/end offsets of each live range *before* actually
performing the insertion.

This caused us to crash with a verification failure, since it was
possible to set the range offset to an invalid value (that would go on
to immediately become valid after the insertion was finished).

This patch fixes the issue by adding special badged helpers on Range for
Node to reach into it and increase/decrease the offsets during node
insertion. This skips the offset validity check and actually makes our
code read slightly more like the spec.

Found by Domato :^)
2024-03-12 16:30:39 +01:00
..
ChildNode-after-next-sibling.txt LibWeb: Fix infinite loop in ChildNode's before() and after() 2024-03-11 18:29:10 +01:00
ChildNode-before-previous-sibling.txt LibWeb: Fix infinite loop in ChildNode's before() and after() 2024-03-11 18:29:10 +01:00
createElement-with-emoji-in-tag-name.txt LibWeb: Don't crash on Document.createElement() with emoji in tag name 2023-12-04 00:04:04 +01:00
Delete-from-text-node-with-associated-range.txt LibWeb: Use correct offset value when replacing character data 2024-02-10 11:18:51 +01:00
Document-createCDATASection.txt LibWeb: Implement document.createCDATASection() 2024-02-19 10:42:56 +01:00
Document-named-properties.txt LibWeb: Implement Document named properties with light caching 2024-02-16 16:18:31 -05:00
Document-set-designMode.txt LibWeb: Implement document.designMode 2024-02-12 07:35:14 +01:00
DOMImplementation-create-xml-document.txt LibWeb: Create XMLDocuments in DOMImplementation.createDocument 2024-01-04 11:23:20 +01:00
DOMImplementation-createHTMLDocument.txt LibWeb: Make DOMImplementation.createHTMLDocument() create HTMLDocument 2024-03-11 18:29:10 +01:00
DOMParser-xml-document.txt LibWeb: Create XML Documents in DOMParser.parseFromString 2024-01-04 11:23:20 +01:00
Element-from-point-2.txt LibWeb: Do paint-order traversal in Document::element_from_point() 2024-02-14 06:56:22 +01:00
Element-from-point.txt LibWeb: Implement document.elementFromPoint() 2024-02-06 08:43:03 +01:00
Element-getAttributeNodeNS.txt LibWeb: Implement Element.getAttributeNodeNS 2024-01-14 16:10:18 -07:00
Element-getAttributeNS.txt LibWeb: Implement Element.getAttributeNS 2024-01-13 08:33:10 +01:00
Element-removeAttributeNS.txt LibWeb: Implement Element.removeAttributeNS 2024-01-14 16:10:18 -07:00
element-scroll-height.txt LibWeb: Return overflow rect height from Element::scroll_height() 2024-02-19 20:07:12 +01:00
element-scroll-width.txt LibWeb: Return overflow rect width from Element::scroll_width() 2024-02-19 20:07:12 +01:00
Element-set-scroll-left.txt LibWeb: Clamp scroll offset to valid range in set_scroll_offset() 2024-02-22 07:35:30 +01:00
Elements-from-point-2.txt LibWeb: Do paint-order traversal in Document::elements_from_point() 2024-02-14 06:56:22 +01:00
Elements-from-point-3.txt LibWeb: Do paint-order traversal in Document::elements_from_point() 2024-02-14 06:56:22 +01:00
Elements-from-point.txt LibWeb: Do paint-order traversal in Document::elements_from_point() 2024-02-14 06:56:22 +01:00
Offset-of-empty-inline-element.txt LibWeb: Don't crash when querying offsets of empty inline elements 2024-01-28 23:32:40 +01:00
Range-to-string.txt LibWeb: Use UTF-16 code unit offsets in Range::to_string 2024-01-04 10:10:44 +01:00
setAttribute-with-emoji-in-attribute-name.txt LibWeb: Don't crash on Element.setAttribute() with emoji in name 2023-12-04 00:04:04 +01:00
Text-methods.txt LibWeb: Use UTF-16 code unit offsets and lengths in CharacterData 2023-12-23 20:41:41 +01:00
Text-set-get-data.txt LibWeb: Add a test for setting and getting Text data 2023-12-22 08:19:51 +00:00
TreeWalker-nextNode-with-detached-currentNode.txt LibWeb: Don't get stuck in TreeWalker.nextNode() when current detached 2023-12-03 23:16:26 +01:00
update-live-ranges-on-node-insertion.txt LibWeb: Don't crash on live range offset update during node insertion 2024-03-12 16:30:39 +01:00