1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 07:37:46 +00:00

LibWeb: Hide input placeholder when input already has a value

This commit is contained in:
Bastiaan van der Plaat 2023-12-10 19:33:37 +01:00 committed by Andreas Kling
parent df57d7ca68
commit d025d207d9
6 changed files with 50 additions and 21 deletions

View file

@ -5,9 +5,6 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
frag 0 from BlockContainer start: 0, length: 0, rect: [11,11 200x25.84375]
BlockContainer <input> at (11,11) content-size 200x25.84375 inline-block [BFC] children: not-inline
Box <div> at (13,12) content-size 196x23.84375 flex-container(row) [FFC] children: not-inline
BlockContainer <(anonymous)> at (13,23.921875) content-size 0x0 flex-item [BFC] children: inline
InlineNode <div>
TextNode <#text>
BlockContainer <div> at (14,13) content-size 194x21.84375 flex-item [BFC] children: inline
TextNode <#text>
@ -16,6 +13,4 @@ ViewportPaintable (Viewport<#document>) [0,0 800x600]
PaintableWithLines (BlockContainer<BODY>) [9,9 782x29.84375]
PaintableWithLines (BlockContainer<INPUT>) [10,10 202x27.84375]
PaintableBox (Box<DIV>) [11,11 200x25.84375]
PaintableWithLines (BlockContainer(anonymous)) [13,23.921875 0x0]
InlinePaintable (InlineNode<DIV>)
PaintableWithLines (BlockContainer<DIV>) [13,12 196x23.84375]

View file

@ -0,0 +1,11 @@
<link rel="match" href="reference/input-placeholder-ref.html" />
<style>
* {
margin: 0;
font: 16px 'SerenitySans';
}
body {
background-color: white;
}
</style>
<input value="PASS" placeholder="FAIL">

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View file

@ -0,0 +1,15 @@
<style>
* {
margin: 0;
}
body {
background-color: white;
}
</style>
<!-- To rebase:
1. Open input-placeholder.html in Ladybird
2. Resize the window just above the width of the canvas
3. Right click > "Take Full Screenshot"
4. Update the image below:
-->
<img src="./images/input-placeholder-ref.png">