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

LibWeb: Add textarea placeholder

This commit is contained in:
Bastiaan van der Plaat 2023-12-21 18:13:16 +01:00 committed by Andreas Kling
parent 091faf1aae
commit 52397d01bd
6 changed files with 85 additions and 33 deletions

View file

@ -1,38 +1,38 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x56.9375 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x40.9375 children: inline
line 0 width: 403.75, height: 40.9375, bottom: 40.9375, baseline: 13.53125
frag 0 from BlockContainer start: 0, length: 0, rect: [11,11 191.875x34.9375]
frag 1 from TextNode start: 0, length: 1, rect: [206,8 8x17.46875]
BlockContainer <html> at (0,0) content-size 800x65.6875 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x49.6875 children: inline
line 0 width: 502, height: 49.6875, bottom: 49.6875, baseline: 16.921875
frag 0 from BlockContainer start: 0, length: 0, rect: [11,11 240x43.6875]
frag 1 from TextNode start: 0, length: 1, rect: [254,8 10x21.84375]
" "
frag 2 from BlockContainer start: 0, length: 0, rect: [217,11 191.875x34.9375]
frag 2 from BlockContainer start: 0, length: 0, rect: [267,11 240x43.6875]
TextNode <#text>
BlockContainer <textarea> at (11,11) content-size 191.875x34.9375 inline-block [BFC] children: not-inline
BlockContainer <div> at (11,11) content-size 191.875x17.46875 children: not-inline
BlockContainer <div> at (11,11) content-size 191.875x17.46875 children: inline
line 0 width: 152.203125, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 17, rect: [11,11 152.203125x17.46875]
BlockContainer <textarea> at (11,11) content-size 240x43.6875 inline-block [BFC] children: not-inline
BlockContainer <div> at (11,11) content-size 240x21.84375 children: not-inline
BlockContainer <div> at (11,11) content-size 240x21.84375 children: inline
line 0 width: 190.265625, height: 21.84375, bottom: 21.84375, baseline: 16.921875
frag 0 from TextNode start: 0, length: 17, rect: [11,11 190.265625x21.84375]
"Bonjour mon amis!"
TextNode <#text>
TextNode <#text>
BlockContainer <textarea> at (217,11) content-size 191.875x34.9375 inline-block [BFC] children: not-inline
BlockContainer <div> at (217,11) content-size 191.875x17.46875 children: not-inline
BlockContainer <div> at (217,11) content-size 191.875x17.46875 children: inline
line 0 width: 142.140625, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 19, rect: [217,11 142.140625x17.46875]
BlockContainer <textarea> at (267,11) content-size 240x43.6875 inline-block [BFC] children: not-inline
BlockContainer <div> at (267,11) content-size 240x21.84375 children: not-inline
BlockContainer <div> at (267,11) content-size 240x21.84375 children: inline
line 0 width: 177.6875, height: 21.84375, bottom: 21.84375, baseline: 16.921875
frag 0 from TextNode start: 0, length: 19, rect: [267,11 177.6875x21.84375]
"Well hello friends!"
TextNode <#text>
TextNode <#text>
ViewportPaintable (Viewport<#document>) [0,0 800x600]
PaintableWithLines (BlockContainer<HTML>) [0,0 800x56.9375]
PaintableWithLines (BlockContainer<BODY>) [8,8 784x40.9375]
PaintableWithLines (BlockContainer<TEXTAREA>) [8,8 197.875x40.9375]
PaintableWithLines (BlockContainer<DIV>) [11,11 191.875x17.46875]
PaintableWithLines (BlockContainer<DIV>) [11,11 191.875x17.46875]
PaintableWithLines (BlockContainer<HTML>) [0,0 800x65.6875]
PaintableWithLines (BlockContainer<BODY>) [8,8 784x49.6875]
PaintableWithLines (BlockContainer<TEXTAREA>) [8,8 246x49.6875]
PaintableWithLines (BlockContainer<DIV>) [11,11 240x21.84375]
PaintableWithLines (BlockContainer<DIV>) [11,11 240x21.84375]
TextPaintable (TextNode<#text>)
TextPaintable (TextNode<#text>)
PaintableWithLines (BlockContainer<TEXTAREA>) [214,8 197.875x40.9375]
PaintableWithLines (BlockContainer<DIV>) [217,11 191.875x17.46875]
PaintableWithLines (BlockContainer<DIV>) [217,11 191.875x17.46875]
PaintableWithLines (BlockContainer<TEXTAREA>) [264,8 246x49.6875]
PaintableWithLines (BlockContainer<DIV>) [267,11 240x21.84375]
PaintableWithLines (BlockContainer<DIV>) [267,11 240x21.84375]
TextPaintable (TextNode<#text>)

View file

@ -1,9 +1,11 @@
<!doctype html>
<body>
<!DOCTYPE html><html><head><style>
* {
font: 20px 'SerenitySans';
}
</style></head><body>
<textarea>Bonjour mon amis!</textarea>
<script>
const textarea = document.createElement("textarea");
textarea.innerText = "Well hello friends!";
document.body.appendChild(textarea);
</script>
</body>