mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
LibWeb: Port the FormAssociatedElement value to UTF-16
This porting effort makes it pretty clear we will want a UTF-16-aware GenericLexer. But for now, we can actually make ASCII assumptions about what we are parsing, and act accordingly.
This commit is contained in:
committed by
Andreas Kling
parent
e7b08cf291
commit
c8888609f4
Notes:
github-actions[bot]
2025-07-28 10:26:29 +00:00
Author: https://github.com/trflynn89 Commit: https://github.com/LadybirdBrowser/ladybird/commit/c8888609f40 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5610
@@ -117,10 +117,10 @@ bool HTMLButtonElement::is_submit_button() const
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/form-elements.html#the-button-element:concept-fe-value
|
||||
String HTMLButtonElement::value() const
|
||||
Utf16String HTMLButtonElement::value() const
|
||||
{
|
||||
// The element's value is the value of the element's value attribute, if there is one; otherwise the empty string.
|
||||
return attribute(AttributeNames::value).value_or(String {});
|
||||
return Utf16String::from_utf8(attribute(AttributeNames::value).value_or(String {}));
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/form-elements.html#the-button-element:concept-fe-optional-value
|
||||
|
||||
Reference in New Issue
Block a user