From 4ced84a548213bde4183f37d05097ab0184837f4 Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Tue, 16 Apr 2024 12:38:51 -0400 Subject: [PATCH] LibWeb: Copy the css-attr-typed-fallback ref test as a layout test As a layout test, this verifies that the fallback attr() substitution results in the expected layout node. For example, the fallback content for a `string` attribute type should create a text node. --- .../expected/css-attr-typed-fallback.txt | 38 +++++++++++++++++++ .../Layout/input/css-attr-typed-fallback.html | 26 +++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 Tests/LibWeb/Layout/expected/css-attr-typed-fallback.txt create mode 100644 Tests/LibWeb/Layout/input/css-attr-typed-fallback.html diff --git a/Tests/LibWeb/Layout/expected/css-attr-typed-fallback.txt b/Tests/LibWeb/Layout/expected/css-attr-typed-fallback.txt new file mode 100644 index 00000000000..bfe762ec2c1 --- /dev/null +++ b/Tests/LibWeb/Layout/expected/css-attr-typed-fallback.txt @@ -0,0 +1,38 @@ +Viewport <#document> at (0,0) content-size 800x600 children: not-inline + BlockContainer at (0,0) content-size 800x126 [BFC] children: not-inline + BlockContainer at (8,8) content-size 784x110 children: not-inline + BlockContainer at (9,9) content-size 100x20 children: inline + InlineNode <(anonymous)> + frag 0 from TextNode start: 0, length: 4, rect: [9,9 41.53125x17] baseline: 13.296875 + "WHF!" + TextNode <#text> + BlockContainer <(anonymous)> at (8,30) content-size 784x0 children: inline + TextNode <#text> + BlockContainer at (9,31) content-size 200x20 children: not-inline + BlockContainer <(anonymous)> at (8,52) content-size 784x0 children: inline + TextNode <#text> + BlockContainer at (9,53) content-size 200x20 children: not-inline + BlockContainer <(anonymous)> at (8,74) content-size 784x0 children: inline + TextNode <#text> + BlockContainer at (9,75) content-size 100x20 children: not-inline + BlockContainer <(anonymous)> at (8,96) content-size 784x0 children: inline + TextNode <#text> + BlockContainer at (9,97) content-size 100x20 children: not-inline + BlockContainer <(anonymous)> at (8,118) content-size 784x0 children: inline + TextNode <#text> + +ViewportPaintable (Viewport<#document>) [0,0 800x600] + PaintableWithLines (BlockContainer) [0,0 800x126] + PaintableWithLines (BlockContainer) [8,8 784x110] + PaintableWithLines (BlockContainer
.string) [8,8 102x22] + InlinePaintable (InlineNode(anonymous)) + TextPaintable (TextNode<#text>) + PaintableWithLines (BlockContainer(anonymous)) [8,30 784x0] + PaintableWithLines (BlockContainer
.length) [8,30 202x22] + PaintableWithLines (BlockContainer(anonymous)) [8,52 784x0] + PaintableWithLines (BlockContainer
.px) [8,52 202x22] + PaintableWithLines (BlockContainer(anonymous)) [8,74 784x0] + PaintableWithLines (BlockContainer
.color) [8,74 102x22] + PaintableWithLines (BlockContainer(anonymous)) [8,96 784x0] + PaintableWithLines (BlockContainer
.color) [8,96 102x22] + PaintableWithLines (BlockContainer(anonymous)) [8,118 784x0] diff --git a/Tests/LibWeb/Layout/input/css-attr-typed-fallback.html b/Tests/LibWeb/Layout/input/css-attr-typed-fallback.html new file mode 100644 index 00000000000..56f4e906761 --- /dev/null +++ b/Tests/LibWeb/Layout/input/css-attr-typed-fallback.html @@ -0,0 +1,26 @@ + + + +
+
+
+
+