LibWeb: Implement validity IDL attribute

This commit is contained in:
Psychpsyo 2025-02-17 20:44:26 +01:00 committed by Tim Ledbetter
parent 184ae687c5
commit 83c4e22247
Notes: github-actions[bot] 2025-02-18 06:38:10 +00:00
33 changed files with 2007 additions and 31 deletions

View file

@ -36,7 +36,6 @@
#include <LibWeb/HTML/Scripting/Environments.h>
#include <LibWeb/HTML/SelectedFile.h>
#include <LibWeb/HTML/SharedResourceRequest.h>
#include <LibWeb/HTML/ValidityState.h>
#include <LibWeb/HTML/Window.h>
#include <LibWeb/Infra/CharacterTypes.h>
#include <LibWeb/Infra/Strings.h>
@ -90,16 +89,6 @@ void HTMLInputElement::visit_edges(Cell::Visitor& visitor)
visitor.visit(m_resource_request);
}
// https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#dom-cva-validity
GC::Ref<ValidityState const> HTMLInputElement::validity() const
{
auto& realm = this->realm();
dbgln("FIXME: Implement validity attribute getter");
return realm.create<ValidityState>(realm);
}
GC::Ptr<Layout::Node> HTMLInputElement::create_layout_node(GC::Ref<CSS::ComputedProperties> style)
{
if (type_state() == TypeAttributeState::Hidden)