1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 14:57:35 +00:00
serenity/Userland/Libraries
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
..
LibAccelGfx LibWeb: Implement border radius corner clipping in GPU painter 2023-12-17 23:12:48 +01:00
LibArchive Everywhere: Use to_number<T> instead of to_{int,uint,float,double} 2023-12-23 20:41:07 +01:00
LibAudio Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
LibC Everywhere: Use to_number<T> instead of to_{int,uint,float,double} 2023-12-23 20:41:07 +01:00
LibCards Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
LibChess Everywhere: Use to_number<T> instead of to_{int,uint,float,double} 2023-12-23 20:41:07 +01:00
LibCMake LibSyntax+Userland: Make LibSyntax not depend on LibGUI 2023-08-29 07:57:39 -04:00
LibCodeComprehension Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
LibCompress LibCompress: Implement the XZ BCJ filter for ARM64 2023-12-14 08:59:23 -07:00
LibConfig Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
LibCore Everywhere: Use to_number<T> instead of to_{int,uint,float,double} 2023-12-23 20:41:07 +01:00
LibCoredump 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
LibCrypt Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
LibCrypto Everywhere: Use to_number<T> instead of to_{int,uint,float,double} 2023-12-23 20:41:07 +01:00
LibDebug Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
LibDesktop Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
LibDeviceTree Everywhere: Remove unused DeprecatedString includes 2023-04-09 22:00:54 +02:00
LibDiff Everywhere: Use to_number<T> instead of to_{int,uint,float,double} 2023-12-23 20:41:07 +01:00
LibDNS Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
LibDSP Userland: Prefer _string over _short_string 2023-08-08 07:37:21 +02:00
LibEDID Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
LibELF Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
LibFileSystem Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
LibFileSystemAccessClient Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
LibGemini Everywhere: Use to_number<T> instead of to_{int,uint,float,double} 2023-12-23 20:41:07 +01:00
LibGfx Everywhere: Use to_number<T> instead of to_{int,uint,float,double} 2023-12-23 20:41:07 +01:00
LibGL LibGL: Optimize appends in gl_vertex 2023-10-15 12:14:07 +02:00
LibGLSL LibGLSL: Add tests for GLSL parser 2023-08-18 15:29:48 +02:00
LibGPU Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
LibGUI Everywhere: Use to_number<T> instead of to_{int,uint,float,double} 2023-12-23 20:41:07 +01:00
LibHTTP Everywhere: Use to_number<T> instead of to_{int,uint,float,double} 2023-12-23 20:41:07 +01:00
LibIDL Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
LibImageDecoderClient Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
LibIMAP Everywhere: Use to_number<T> instead of to_{int,uint,float,double} 2023-12-23 20:41:07 +01:00
LibIPC Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
LibJIT LibJIT: Integrate GDB JIT Interface with ELF builders 2023-12-07 15:34:38 -07:00
LibJS Everywhere: Use to_number<T> instead of to_{int,uint,float,double} 2023-12-23 20:41:07 +01:00
LibKeyboard Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
LibLine Everywhere: Use to_number<T> instead of to_{int,uint,float,double} 2023-12-23 20:41:07 +01:00
LibLocale LibLocale: Remove compact currency patterns 2023-09-04 18:22:28 +02:00
LibMain
LibManual Everywhere: Use to_number<T> instead of to_{int,uint,float,double} 2023-12-23 20:41:07 +01:00
LibMarkdown Everywhere: Use to_number<T> instead of to_{int,uint,float,double} 2023-12-23 20:41:07 +01:00
LibPartition Everywhere: Remove needless trailing semi-colons after functions 2023-07-08 10:32:56 +01:00
LibPCIDB Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
LibPDF Everywhere: Use to_number<T> instead of to_{int,uint,float,double} 2023-12-23 20:41:07 +01:00
LibProtocol Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
LibRegex Everywhere: Use to_number<T> instead of to_{int,uint,float,double} 2023-12-23 20:41:07 +01:00
LibSanitizer LibSanitizer: Add _abort variants of UBSan handlers 2023-08-13 05:14:07 +02:00
LibSoftGPU LibSoftGPU: Optimize GPU::Vertex lists 2023-10-15 12:14:07 +02:00
LibSQL Everywhere: Use to_number<T> instead of to_{int,uint,float,double} 2023-12-23 20:41:07 +01:00
LibSymbolication Everywhere: Use to_number<T> instead of to_{int,uint,float,double} 2023-12-23 20:41:07 +01:00
LibSyntax Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
LibSystem Everywhere: Resolve conflicts with LibC and libc++ 2023-06-27 12:40:38 +02:00
LibTest Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
LibTextCodec LibTextCodec: Add PDFDocEncoding decoder 2023-11-22 09:08:06 -07:00
LibThreading Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
LibTimeZone Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
LibTLS Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
LibUnicode Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
LibUSBDB Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
LibVideo Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
LibVirtGPU LibGL+Lib*GPU: Set model view and projection matrices separately 2023-10-15 12:14:07 +02:00
LibVT Everywhere: Use to_number<T> instead of to_{int,uint,float,double} 2023-12-23 20:41:07 +01:00
LibWasm Everywhere: Use to_number<T> instead of to_{int,uint,float,double} 2023-12-23 20:41:07 +01:00
LibWeb LibWeb: Use UTF-16 code unit offsets and lengths in CharacterData 2023-12-23 20:41:41 +01:00
LibWebSocket Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
LibWebView LibWeb: Fix select dropdown position when scrolled on a page 2023-12-23 10:12:36 +01:00
LibX86 Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
LibXML Everywhere: Use to_number<T> instead of to_{int,uint,float,double} 2023-12-23 20:41:07 +01:00
CMakeLists.txt LibAccelGfx+Meta: Introduce OpenGL painting library 2023-10-29 17:13:23 +01:00