1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2026-01-16 09:31:00 +00:00
serenity/Tests/LibWeb
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
..
Layout LibWeb: Special case SVG masks during layout 2024-03-12 08:51:50 +01:00
Ref Tests/LibWeb: Add SVG maskContentUnits ref test 2024-03-12 08:51:50 +01:00
Text LibWeb: Don't crash on live range offset update during node insertion 2024-03-12 16:30:39 +01:00
WPT CI: Remove the WPT directory after tests have completed 2024-02-29 14:27:25 -05:00
CMakeLists.txt LibWeb: Add test for week_number_of_the_last_day microsyntax 2023-12-11 14:04:27 -07:00
rebaseline-libweb-test Tests/LibWeb: Update rebaseline-libweb-test after libexec binary move 2024-03-11 18:29:10 +01:00
TestConfig.ini LibWeb: Disable animations tests that depend on consistent timing 2024-03-10 12:13:58 -04:00
TestCSSIDSpeed.cpp LibWeb: Make value_id_from_string() return Optional 2023-05-25 06:36:10 +02:00
TestCSSPixels.cpp LibWeb: Remove rounding division for CSSPixels 2024-01-06 21:40:27 +01:00
TestHTMLTokenizer.cpp Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
TestMicrosyntax.cpp LibWeb: Add test for week_number_of_the_last_day microsyntax 2023-12-11 14:04:27 -07:00
TestMimeSniff.cpp LibWeb/MimeSniff: Add non-standard text or binary context sniffing 2024-02-02 14:34:17 -05:00
TestNumbers.cpp LibWeb: Implement spec-compliant integer parsing 2023-08-24 22:26:53 +01:00
tokenizer-test.html LibWeb: Fix assertion failure when tokenizing JS regex literals 2021-07-15 01:47:22 +02:00