mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:28:11 +00:00
LibWeb: Fix up constructing the form entry list
In particular: - Don't include none submitter buttons. - Use type_state() instead type() to avoid direct string comparisons - Support the hidden _charset_ input - Get form associated element's value directly instead of via the value attribute - Split line break normalization into a separate function so that it can also be used by form submission.
This commit is contained in:
parent
f154446a9f
commit
c9c1ddd0bb
8 changed files with 101 additions and 30 deletions
|
@ -63,7 +63,7 @@ public:
|
|||
DeprecatedString default_value() const { return attribute(HTML::AttributeNames::value); }
|
||||
DeprecatedString name() const { return attribute(HTML::AttributeNames::name); }
|
||||
|
||||
DeprecatedString value() const;
|
||||
virtual DeprecatedString value() const override;
|
||||
WebIDL::ExceptionOr<void> set_value(DeprecatedString);
|
||||
|
||||
Optional<DeprecatedString> placeholder_value() const;
|
||||
|
@ -120,6 +120,12 @@ public:
|
|||
// https://html.spec.whatwg.org/multipage/forms.html#category-autocapitalize
|
||||
virtual bool is_auto_capitalize_inheriting() const override { return true; }
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/forms.html#concept-button
|
||||
virtual bool is_button() const override;
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/forms.html#concept-submit-button
|
||||
virtual bool is_submit_button() const override;
|
||||
|
||||
virtual void reset_algorithm() override;
|
||||
|
||||
virtual void form_associated_element_was_inserted() override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue