1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 08:24:58 +00:00

LibWeb: Port HTMLInputElement from DeprecatedString to String

And dealing with the fallout of doing so. I am not 100% sure that it is
safe for us to be treating Strings in the value sanitization algorithm
in all cases as if they are ASCII, but this commit does not change any
existing behaviour there.
This commit is contained in:
Shannon Booth 2023-11-20 20:32:40 +13:00 committed by Andreas Kling
parent 6c9fffc4c1
commit e3bc8610a9
6 changed files with 70 additions and 74 deletions

View file

@ -66,7 +66,7 @@ public:
DeprecatedString default_value() const { return deprecated_attribute(HTML::AttributeNames::value); }
DeprecatedString name() const { return deprecated_attribute(HTML::AttributeNames::name); }
virtual DeprecatedString value() const override;
virtual String value() const override;
WebIDL::ExceptionOr<void> set_value(String const&);
Optional<DeprecatedString> placeholder_value() const;
@ -181,7 +181,7 @@ private:
void handle_readonly_attribute(Optional<String> const& value);
// https://html.spec.whatwg.org/multipage/input.html#value-sanitization-algorithm
DeprecatedString value_sanitization_algorithm(DeprecatedString) const;
String value_sanitization_algorithm(String const&) const;
void update_placeholder_visibility();
JS::GCPtr<DOM::Element> m_placeholder_element;
@ -213,7 +213,7 @@ private:
JS::GCPtr<FileAPI::FileList> m_selected_files;
TypeAttributeState m_type { TypeAttributeState::Text };
DeprecatedString m_value;
String m_value;
};
}