Skip to content

Truly independent web browser

Tests/LibWeb: Test percentage max-height on auto-height flex container

Andreas Kling5d4c9e46aab2
diff --git a/Tests/LibWeb/Layout/expected/flex/single-line-clamped-by-percentage-max-height-of-auto-height-container.txt b/Tests/LibWeb/Layout/expected/flex/single-line-clamped-by-percentage-max-height-of-auto-height-container.txt
new file mode 100644
index 00000000000..9dbbb2cd322
--- /dev/null
+++ b/Tests/LibWeb/Layout/expected/flex/single-line-clamped-by-percentage-max-height-of-auto-height-container.txt
@@ -0,0 +1,12 @@
+Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline
+ BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 0 0+0+0] [BFC] children: not-inline
+ BlockContainer <body> at [0,0] [0+0+0 800 0+0+0] [0+0+0 0 0+0+0] children: not-inline
+ BlockContainer <div.fixed> at [0,0] positioned [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline
+ Box <div.sheet> at [0,0] flex-container(row) [0+0+0 800 0+0+0] [0+0+0 300 0+0+0] [FFC] children: not-inline overflow: [0,0 800x3000]
+ Box <div.layer> at [0,0] flex-container(row) flex-item [0+0+0 100 0+0+0] [0+0+0 3000 0+0+0] [FFC] children: not-inline
+ BlockContainer <div.column> at [0,0] flex-item [0+0+0 100 0+0+0] [0+0+0 3000 0+0+0] [BFC] children: not-inline
+ BlockContainer <div.content> at [0,0] [0+0+0 100 0+0+0] [0+0+0 3000 0+0+0] children: not-inline
+
+SC for Viewport<#document> [0,0 800x600] (z-index: auto)
+ SC for BlockContainer<HTML> [0,0 800x0] (z-index: auto)
+ SC for BlockContainer<DIV>.fixed [0,0 800x600] (z-index: auto)
diff --git a/Tests/LibWeb/Layout/input/flex/single-line-clamped-by-percentage-max-height-of-auto-height-container.html b/Tests/LibWeb/Layout/input/flex/single-line-clamped-by-percentage-max-height-of-auto-height-container.html
new file mode 100644
index 00000000000..32a712c3885
--- /dev/null
+++ b/Tests/LibWeb/Layout/input/flex/single-line-clamped-by-percentage-max-height-of-auto-height-container.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<style>
+ body {
+ margin: 0;
+ }
+ .fixed {
+ position: fixed;
+ top: 0;
+ bottom: 0;
+ left: 0;
+ width: 100%;
+ }
+ .sheet {
+ display: flex;
+ max-height: 50%;
+ overflow: hidden;
+ }
+ .layer {
+ display: flex;
+ }
+ .column {
+ width: 100px;
+ height: 100%;
+ overflow: auto;
+ }
+ .content {
+ height: 3000px;
+ }
+</style>
+<div class="fixed">
+ <div class="sheet">
+ <div class="layer">
+ <div class="column">
+ <div class="content"></div>
+ </div>
+ </div>
+ </div>
+</div>