瀏覽代碼

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.
Andreas Kling 3 年之前
父節點
當前提交
06e54ea916
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      Userland/Libraries/LibWeb/HTML/HTMLInputElement.cpp

+ 3 - 1
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<HTMLFormElement>());
 }
 
-void HTMLInputElement::removed_from(DOM::Node*)
+void HTMLInputElement::removed_from(DOM::Node* old_parent)
 {
+    HTMLElement::removed_from(old_parent);
     set_form(nullptr);
 }