Files
servo/components/layout
Oriol Brufau 7999d114e5 layout: Add Contents::Widget(NonReplacedContents) for HTML widgets (#39928)
Widgets like `<input>` and `<textarea>` have various behaviors similar
to replaced elements, but aren't fully replaced.

Therefore, this adds a new case into the `Contents` enum so that it can
represent the three states: non-replaced, fully replaced, and widget.
This means that `NonReplacedContents::OfTextControl` can be dropped.

The code is refactored in order to centralize the logic to identify
widgets in a single place.

This fixes some places where we weren't checking if the element was a
widget, e.g. in `construct_for_root_element()`. But I think the change
isn't currently observable in practice.

Testing: Unneeded, no behavior change.
This is part of #39927

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-10-17 11:10:43 +00:00
..