mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 17:55:07 +02: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:
Notes:
sideshowbarker
2024-07-17 17:21:43 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/88173648e3
@@ -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