1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-08 13:37:10 +09:00

LibWeb: Implement “suffering from overflow/underflow” for inputs

This change implements the requirements for the “suffering from an
overflow” and “suffering from an underflow” algorithms for
HTMLInputElement constraint validation.
This commit is contained in:
sideshowbarker 2025-03-07 16:44:29 +09:00 committed by Tim Ledbetter
parent ad9f70dff9
commit cf1425d09e
Notes: github-actions[bot] 2025-03-07 08:33:18 +00:00
6 changed files with 100 additions and 57 deletions

View file

@ -232,6 +232,11 @@ public:
virtual void did_edit_text_node() override;
virtual GC::Ptr<DOM::Text> form_associated_element_to_text_node() override { return m_text_node; }
// https://html.spec.whatwg.org/multipage/input.html#has-a-periodic-domain/
bool has_periodic_domain() const { return type_state() == HTMLInputElement::TypeAttributeState::Time; }
// https://html.spec.whatwg.org/multipage/input.html#has-a-reversed-range
bool has_reversed_range() const;
// https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#definitions
virtual bool suffering_from_being_missing() const override;
virtual bool suffering_from_a_type_mismatch() const override;