diff options
author | Andreas Kling <kling@serenityos.org> | 2023-05-25 12:34:54 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-05-25 14:42:24 +0200 |
commit | 7d24c13d8b6b0762b68d44f289083369e45879ae (patch) | |
tree | d26dc03fefc4a3ac2e6a7cc4d1d092efda9a1975 /Userland/Libraries/LibCompress | |
parent | 6fb661e781095d844a5f7d8f4d72a968b65960ee (diff) | |
download | serenity-7d24c13d8b6b0762b68d44f289083369e45879ae.zip |
LibWeb: Make input element placeholders look better
We now create a flex container inside the input element's UA shadow tree
and add the placeholder and non-placeholder text as flex items (wrapped
in elements whose style we can manipulate).
This fixes the visual glitch where the placeholder would appear below
the bounding box of the input element. It also allows us to align the
text vertically inside the input element (like we're supposed to).
In order to achieve this, I had to make two small architectural changes
to layout tree building:
- Elements can now report that they represent a given pseudo element.
This allows us to instantiate the ::placeholder pseudo element as an
actual DOM element inside the input element's UA shadow tree.
- We no longer create a separate layout node for the shadow root itself.
Instead, children of the shadow root are treated as if they were
children of the DOM element itself for the purpose of layout tree
building.
Diffstat (limited to 'Userland/Libraries/LibCompress')
0 files changed, 0 insertions, 0 deletions