1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 06:18:12 +00:00
serenity/Tests/LibWeb
Shannon Booth d8759d9656 LibWeb: Use UTF-16 code unit offsets and lengths in CharacterData
We were previously assuming that the input offsets and lengths were all
in raw byte offsets into a UTF-8 string. While internally our String
representation may be in UTF-8 from the external world it is seen as
UTF-16, with code unit offsets passed through, and used as the returned
length.

Beforehand, the included test included in this commit would crash
ladybird (and otherwise return wrong values).

The implementation here is very inefficient, I am sure there is a
much smarter way to write it so that we would not need a conversion
from UTF-8 to a UTF-16 string (and then back again).

Fixes: #20971
2023-12-23 20:41:41 +01:00
..
Layout LibWeb: Move use pseudo element styles from TreeBuilder to StyleComputer 2023-12-17 23:12:34 +01:00
Ref Tests/LibWeb: Add ref-tests for "overflow: hidden" 2023-12-21 19:25:31 +01:00
Text LibWeb: Use UTF-16 code unit offsets and lengths in CharacterData 2023-12-23 20:41:41 +01:00
WPT WPT: Update metadata for current WPT master and ladybird results 2023-10-24 01:43:31 +02: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 for path changes 2023-06-10 21:46:33 +02:00
TestConfig.ini LibWeb: Add config file for LibWeb tests that skips Worker-echo.html 2023-12-07 16:46:20 -05:00
TestCSSIDSpeed.cpp LibWeb: Make value_id_from_string() return Optional 2023-05-25 06:36:10 +02:00
TestCSSPixels.cpp LibWeb: Perform rounding when dividing CSSPixels 2023-09-05 14:50:45 +02: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 sniffing in an audio or video context 2023-12-07 10:31:54 -07: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