mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 15:45:25 +00:00
LibWeb: Create HTMLInputElement UA shadow tree when inserted into DOM
Previously, we were creating a user-agent shadow tree when constructing a layout tree. This meant that we did DOM manipulation (and consequently style invalidation) during layout tree construction, which made things very hard to reason about in Layout::TreeBuilder. Simply everything by simply creating the UA shadow tree when the input element inserted into a parent node instead.
This commit is contained in:
@@ -100,6 +100,8 @@ public:
|
||||
// https://html.spec.whatwg.org/multipage/forms.html#category-label
|
||||
virtual bool is_labelable() const override { return type_state() != TypeAttributeState::Hidden; }
|
||||
|
||||
virtual void inserted() override;
|
||||
|
||||
private:
|
||||
// ^DOM::EventTarget
|
||||
virtual void did_receive_focus() override;
|
||||
|
||||
Reference in New Issue
Block a user