summaryrefslogtreecommitdiff
path: root/Tests/LibWeb/Layout/input
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2023-03-11 11:50:42 +0100
committerAndreas Kling <kling@serenityos.org>2023-03-11 11:52:19 +0100
commitf3556f239e47d55ed5002dda0b94643870251dea (patch)
treeb6e9fb39069fb2f8a46cb7e28de27ff14f14dfca /Tests/LibWeb/Layout/input
parent0808463a7d4c9b7fc2bd64a650c6445cfda3d33d (diff)
downloadserenity-f3556f239e47d55ed5002dda0b94643870251dea.zip
LibWeb: Don't touch flex items after they we've been frozen
When using the flex shrink factor, the flexible length resolution algorithm was incorrectly ignoring the `frozen` flag on items and would update the same items again, causing overconsumption of the remaining free space on the flex line.
Diffstat (limited to 'Tests/LibWeb/Layout/input')
-rw-r--r--Tests/LibWeb/Layout/input/flex-frozen-items-should-be-respected.html13
1 files changed, 13 insertions, 0 deletions
diff --git a/Tests/LibWeb/Layout/input/flex-frozen-items-should-be-respected.html b/Tests/LibWeb/Layout/input/flex-frozen-items-should-be-respected.html
new file mode 100644
index 0000000000..10f5b7ca77
--- /dev/null
+++ b/Tests/LibWeb/Layout/input/flex-frozen-items-should-be-respected.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html><html><head><style>
+ * {
+ border: 1px solid black;
+ font-family: 'SerenitySans';
+ }
+ .flexbox {
+ display: flex;
+ height: 50px;
+ }
+ .last {
+ width: 500px;
+ }
+</style></head><body><div class="flexbox"><div>LongPieceOfText</div><div>LongPieceOfText</div><div>LongPieceOfText</div><div>LongPieceOfText</div><div class="last item">LongPieceOfText</div></div></div></body></html> \ No newline at end of file