From f8509e2183c12c22bfa1fb53e78f57a3d2d72376 Mon Sep 17 00:00:00 2001 From: Bastiaan van der Plaat Date: Sat, 9 Dec 2023 08:26:50 +0100 Subject: [PATCH] LibWeb: Add input number up down UI buttons --- .../input-element-with-display-inline.txt | 4 +- ...text-node-invalidation-on-value-change.txt | 28 +++---- ...ext-node-invalidation-on-value-change.html | 9 ++- .../LibWeb/HTML/HTMLInputElement.cpp | 73 +++++++++++++++---- 4 files changed, 83 insertions(+), 31 deletions(-) diff --git a/Tests/LibWeb/Layout/expected/input-element-with-display-inline.txt b/Tests/LibWeb/Layout/expected/input-element-with-display-inline.txt index d07e641f41..fd8360912f 100644 --- a/Tests/LibWeb/Layout/expected/input-element-with-display-inline.txt +++ b/Tests/LibWeb/Layout/expected/input-element-with-display-inline.txt @@ -5,7 +5,7 @@ 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 at (11,11) content-size 200x25.84375 inline-block [BFC] children: not-inline Box
at (13,12) content-size 196x23.84375 flex-container(row) [FFC] children: not-inline - BlockContainer
at (14,13) content-size 0x21.84375 flex-item [BFC] children: inline + BlockContainer
at (14,13) content-size 194x21.84375 flex-item [BFC] children: inline TextNode <#text> ViewportPaintable (Viewport<#document>) [0,0 800x600] @@ -13,4 +13,4 @@ ViewportPaintable (Viewport<#document>) [0,0 800x600] PaintableWithLines (BlockContainer) [9,9 782x29.84375] PaintableWithLines (BlockContainer) [10,10 202x27.84375] PaintableBox (Box
) [11,11 200x25.84375] - PaintableWithLines (BlockContainer
) [13,12 2x23.84375] + PaintableWithLines (BlockContainer
) [13,12 196x23.84375] diff --git a/Tests/LibWeb/Layout/expected/input-text-node-invalidation-on-value-change.txt b/Tests/LibWeb/Layout/expected/input-text-node-invalidation-on-value-change.txt index 9e4218415e..641681a0e0 100644 --- a/Tests/LibWeb/Layout/expected/input-text-node-invalidation-on-value-change.txt +++ b/Tests/LibWeb/Layout/expected/input-text-node-invalidation-on-value-change.txt @@ -1,22 +1,22 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline - BlockContainer at (0,0) content-size 800x600 [BFC] children: not-inline - BlockContainer at (8,8) content-size 784x21.46875 children: inline - line 0 width: 191.875, height: 21.46875, bottom: 21.46875, baseline: 13.53125 - frag 0 from BlockContainer start: 0, length: 0, rect: [9,9 189.875x19.46875] - BlockContainer at (9,9) content-size 189.875x19.46875 inline-block [BFC] children: not-inline - Box
at (11,10) content-size 185.875x17.46875 flex-container(row) [FFC] children: not-inline - BlockContainer
at (11,10) content-size 49.734375x17.46875 flex-item [BFC] children: inline - line 0 width: 49.734375, height: 17.46875, bottom: 17.46875, baseline: 13.53125 - frag 0 from TextNode start: 0, length: 4, rect: [11,10 49.734375x17.46875] + BlockContainer at (0,0) content-size 800x41.84375 [BFC] children: not-inline + BlockContainer at (8,8) content-size 784x25.84375 children: inline + line 0 width: 202, height: 25.84375, bottom: 25.84375, baseline: 16.921875 + frag 0 from BlockContainer start: 0, length: 0, rect: [9,9 200x23.84375] + BlockContainer at (9,9) content-size 200x23.84375 inline-block [BFC] children: not-inline + Box
at (11,10) content-size 196x21.84375 flex-container(row) [FFC] children: not-inline + BlockContainer
at (11,10) content-size 196x21.84375 flex-item [BFC] children: inline + line 0 width: 62.171875, height: 21.84375, bottom: 21.84375, baseline: 16.921875 + frag 0 from TextNode start: 0, length: 4, rect: [11,10 62.171875x21.84375] "PASS" TextNode <#text> TextNode <#text> TextNode <#text> ViewportPaintable (Viewport<#document>) [0,0 800x600] - PaintableWithLines (BlockContainer) [0,0 800x600] - PaintableWithLines (BlockContainer) [8,8 784x21.46875] - PaintableWithLines (BlockContainer#foo) [8,8 191.875x21.46875] - PaintableBox (Box
) [9,9 189.875x19.46875] - PaintableWithLines (BlockContainer
) [11,10 49.734375x17.46875] + PaintableWithLines (BlockContainer) [0,0 800x41.84375] + PaintableWithLines (BlockContainer) [8,8 784x25.84375] + PaintableWithLines (BlockContainer#foo) [8,8 202x25.84375] + PaintableBox (Box
) [9,9 200x23.84375] + PaintableWithLines (BlockContainer
) [11,10 196x21.84375] TextPaintable (TextNode<#text>) diff --git a/Tests/LibWeb/Layout/input/input-text-node-invalidation-on-value-change.html b/Tests/LibWeb/Layout/input/input-text-node-invalidation-on-value-change.html index 2d44904490..525e4594a9 100644 --- a/Tests/LibWeb/Layout/input/input-text-node-invalidation-on-value-change.html +++ b/Tests/LibWeb/Layout/input/input-text-node-invalidation-on-value-change.html @@ -1,4 +1,11 @@ - +