diff options
author | Luke Wilde <lukew@serenityos.org> | 2023-03-28 18:45:36 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2023-03-28 19:45:00 +0100 |
commit | 4c090a9a3575c1eac2581ab45e29de628019ed21 (patch) | |
tree | 5aa57b253cbc52b6d940d68bde69ad0cbef807e4 /Tests/LibWeb | |
parent | 5ccb2409451571e9d9473f09e08b1e16b99859a2 (diff) | |
download | serenity-4c090a9a3575c1eac2581ab45e29de628019ed21.zip |
Tests/LibWeb: Add layout test for layout fix in PR #15780
Adds a layout test for the fix in 488a979.
Diffstat (limited to 'Tests/LibWeb')
2 files changed, 33 insertions, 0 deletions
diff --git a/Tests/LibWeb/Layout/expected/position-absolute-ignores-padding-of-position-relative-floating-parent.txt b/Tests/LibWeb/Layout/expected/position-absolute-ignores-padding-of-position-relative-floating-parent.txt new file mode 100644 index 0000000000..60130fffa9 --- /dev/null +++ b/Tests/LibWeb/Layout/expected/position-absolute-ignores-padding-of-position-relative-floating-parent.txt @@ -0,0 +1,6 @@ +Viewport <#document> at (0,0) content-size 800x600 children: not-inline + BlockContainer <html> at (0,0) content-size 800x216 children: not-inline + BlockContainer <body> at (8,8) content-size 784x200 children: not-inline + BlockContainer <div#guide> at (8,8) content-size 200x200 children: not-inline + BlockContainer <div#container> at (18,18) content-size 0x0 positioned floating children: not-inline + BlockContainer <div#box> at (8,8) content-size 100x100 positioned children: not-inline diff --git a/Tests/LibWeb/Layout/input/position-absolute-ignores-padding-of-position-relative-floating-parent.html b/Tests/LibWeb/Layout/input/position-absolute-ignores-padding-of-position-relative-floating-parent.html new file mode 100644 index 0000000000..697317840f --- /dev/null +++ b/Tests/LibWeb/Layout/input/position-absolute-ignores-padding-of-position-relative-floating-parent.html @@ -0,0 +1,27 @@ +<!DOCTYPE html> +<html><head><style> +* { + font-family: 'SerenitySans'; +} + +#guide { + width: 200px; + height: 200px; + background-color: blue; +} + +#container { + position: relative; + float: left; + padding: 10px; +} + +#box { + position: absolute; + left: 0px; + top: 0px; + width: 100px; + height: 100px; + background-color: orange; +} +</style></head><body><div id="guide"><div id="container"><div id="box">
\ No newline at end of file |