mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-05 08:06:09 +00:00
LibWeb: Add stub for ValidityState
This fixes https://html5test.com/ as previously an exception was being thrown after trying to access this attribute which would then result in a popup about the test failing (and none of the test results being shown).
This commit is contained in:
committed by
Andreas Kling
parent
0ec0e92b10
commit
e0bbbc729b
@@ -27,6 +27,7 @@
|
||||
#include <LibWeb/HTML/HTMLDivElement.h>
|
||||
#include <LibWeb/HTML/HTMLFormElement.h>
|
||||
#include <LibWeb/HTML/HTMLInputElement.h>
|
||||
#include <LibWeb/HTML/ValidityState.h>
|
||||
#include <LibWeb/HTML/Numbers.h>
|
||||
#include <LibWeb/HTML/Parser/HTMLParser.h>
|
||||
#include <LibWeb/HTML/Scripting/Environments.h>
|
||||
@@ -82,6 +83,17 @@ void HTMLInputElement::visit_edges(Cell::Visitor& visitor)
|
||||
visitor.visit(m_image_request);
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#dom-cva-validity
|
||||
JS::NonnullGCPtr<ValidityState const> HTMLInputElement::validity() const
|
||||
{
|
||||
auto& vm = this->vm();
|
||||
auto& realm = this->realm();
|
||||
|
||||
dbgln("FIXME: Implement validity attribute getter");
|
||||
|
||||
return vm.heap().allocate<ValidityState>(realm, realm);
|
||||
}
|
||||
|
||||
JS::GCPtr<Layout::Node> HTMLInputElement::create_layout_node(NonnullRefPtr<CSS::StyleProperties> style)
|
||||
{
|
||||
if (type_state() == TypeAttributeState::Hidden)
|
||||
|
||||
Reference in New Issue
Block a user