From 06e54ea916ebcf0f32dde314f6c6f5e7f3cc117d Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Tue, 12 Oct 2021 00:15:08 +0200 Subject: [PATCH] LibWeb: Add missing upcalls in HTMLInputElement We need to call the base class in overrides of inserted() and removed_from(), or things like style invalidation will break. --- Userland/Libraries/LibWeb/HTML/HTMLInputElement.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/HTML/HTMLInputElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLInputElement.cpp index aff62a37e7..9198e864e1 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLInputElement.cpp +++ b/Userland/Libraries/LibWeb/HTML/HTMLInputElement.cpp @@ -118,11 +118,13 @@ void HTMLInputElement::create_shadow_tree_if_needed() void HTMLInputElement::inserted() { + HTMLElement::inserted(); set_form(first_ancestor_of_type()); } -void HTMLInputElement::removed_from(DOM::Node*) +void HTMLInputElement::removed_from(DOM::Node* old_parent) { + HTMLElement::removed_from(old_parent); set_form(nullptr); }