ladybird/Tests
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
..
AK Everywhere: Use to_number<T> instead of to_{int,uint,float,double} 2023-12-23 20:41:07 +01:00
JSSpecCompiler Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
Kernel Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
LibAudio Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
LibC Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
LibCompress Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
LibCore Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
LibCpp Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
LibCrypto Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
LibDiff LibDiff: Fix wrong index used when prepending context lines 2023-09-11 12:10:50 +01:00
LibEDID AK: Rename AK::FixedPoint::round to rint and fix a rounding error 2023-08-14 14:20:45 -06:00
LibELF Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
LibGfx LibGfx/TIFF: Add support for images with UnassociatedAlpha 2023-12-22 08:08:47 +00:00
LibGL Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
LibGLSL Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
LibIMAP Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
LibJS Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
LibLocale LibLocale+LibJS+ClockSettings: Make date time format APIs infallible 2023-08-23 05:29:21 +02:00
LibMarkdown Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
LibPDF Tests: Add a PDF rendering test 2023-12-20 12:45:07 +01:00
LibRegex Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
LibSQL Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
LibTest LibTest: Add a suite of tests for the generators 2023-10-26 17:26:52 -06:00
LibTextCodec LibTextCodec+Everywhere: Port Decoders to new Strings 2023-02-19 17:15:47 +01:00
LibThreading LibThreading: Improve resiliancy of timed threading tests 2023-05-24 00:25:35 +02:00
LibTimeZone LibTimeZone+Userland: Change timezone functions to use UnixDateTime 2023-05-24 23:18:07 +02:00
LibTLS Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
LibTTF LibGfx/OpenType: Ensure Cmap subtable offset is within expected range 2023-11-11 22:20:17 +01:00
LibUnicode LibUnicode: Add IDNA::to_ascii 2023-12-10 08:04:58 -05:00
LibVideo Tests: Add regression tests for fixed OSS-Fuzz test cases 2023-10-24 07:30:04 +02:00
LibWasm Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
LibWeb LibWeb: Use UTF-16 code unit offsets and lengths in CharacterData 2023-12-23 20:41:41 +01:00
LibWebView LibWebView: Avoid trying to break a schemeless URL into renderable parts 2023-12-04 14:47:09 +00:00
LibXML LibXML: Actually append resolved references when parsing content 2023-07-23 16:09:12 +02:00
Spreadsheet Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
UserspaceEmulator Everywhere: Remove unused includes of LibC/stdlib.h 2023-01-02 20:27:20 -05:00
Utilities Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
CMakeLists.txt LibWebView: Protect URL highlighting against partially-typed URLs 2023-10-28 19:03:19 +02:00