mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-05 07:39:16 +00:00
AK+LibJS+LibWeb+LibRegex: Replace AK::Utf16Data with AK::Utf16String
This commit is contained in:
parent
a43cb15e81
commit
9582895759
Notes:
github-actions[bot]
2025-07-18 16:46:53 +00:00
Author: https://github.com/trflynn89
Commit: 9582895759
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5388
Reviewed-by: https://github.com/shannonbooth ✅
22 changed files with 101 additions and 222 deletions
|
@ -48,8 +48,8 @@ ByteString SVGTextContentElement::text_contents() const
|
|||
// https://svgwg.org/svg2-draft/text.html#__svg__SVGTextContentElement__getNumberOfChars
|
||||
WebIDL::ExceptionOr<WebIDL::Long> SVGTextContentElement::get_number_of_chars() const
|
||||
{
|
||||
auto chars = TRY_OR_THROW_OOM(vm(), utf8_to_utf16(text_contents())).data;
|
||||
return static_cast<WebIDL::Long>(chars.size());
|
||||
auto length_in_code_units = AK::utf16_code_unit_length_from_utf8(text_contents());
|
||||
return static_cast<WebIDL::Long>(length_in_code_units);
|
||||
}
|
||||
|
||||
GC::Ref<Geometry::DOMPoint> SVGTextContentElement::get_start_position_of_char(WebIDL::UnsignedLong charnum)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue