Skip to content

The headless browser for AI agents and web scraping

test: gate forced line break geometry

SGavrleb133de419af
diff --git a/render-repros/checks.json b/render-repros/checks.json
index a3be4c4f..2571eac4 100644
--- a/render-repros/checks.json
+++ b/render-repros/checks.json
@@ -63,6 +63,14 @@
{"name": "custom property font shorthand sets em geometry", "color": "#1971c2", "x": 0, "y": 0, "width": 200, "height": 80},
{"name": "later font shorthand replaces prior longhands", "color": "#e8590c", "x": 0, "y": 80, "width": 200, "height": 40}
],
+ "forced-line-breaks": [
+ {"name": "break-only inline context contributes one line", "color": "#087f5b", "x": 0, "y": 20, "width": 100, "height": 20},
+ {"name": "trailing consecutive breaks preserve empty line", "color": "#1971c2", "x": 150, "y": 40, "width": 100, "height": 20},
+ {"name": "break-only run counts every forced line", "color": "#e8590c", "x": 300, "y": 60, "width": 100, "height": 20},
+ {"name": "mixed inline and block content retains break lines", "color": "#7048e8", "x": 450, "y": 60, "width": 100, "height": 20},
+ {"name": "forced break flex item uses inherited line height", "color": "#c2255c", "x": 600, "y": 30, "width": 100, "height": 10},
+ {"name": "forced break honors tight explicit line height", "color": "#2b8a3e", "x": 750, "y": 20, "width": 100, "height": 20}
+ ],
"font-metric-line-height": [
{"name": "small normal sans lines use grid-fitted metrics", "color": "#087f5b", "x": 0, "y": 200, "width": 100, "height": 20},
{"name": "medium normal sans lines round metrics independently", "color": "#1971c2", "x": 150, "y": 140, "width": 100, "height": 20},
diff --git a/render-repros/forced-line-breaks.html b/render-repros/forced-line-breaks.html
new file mode 100644
index 00000000..e167a8c9
--- /dev/null
+++ b/render-repros/forced-line-breaks.html
@@ -0,0 +1,42 @@
+<!doctype html>
+<html>
+<head>
+ <meta charset="utf-8">
+ <title>forced line break geometry</title>
+ <style>
+ html, body { margin: 0; }
+ .column {
+ position: absolute;
+ top: 0;
+ width: 120px;
+ color: transparent;
+ font: 16px/20px "Liberation Sans", sans-serif;
+ }
+ .marker { width: 100px; height: 20px; }
+ .pure { left: 0; }
+ .trailing { left: 150px; }
+ .break-only { left: 300px; }
+ .mixed { left: 450px; }
+ .flex { left: 600px; display: flex; flex-direction: column; }
+ .tight {
+ left: 750px;
+ font-size: 20px;
+ line-height: 10px;
+ }
+ .pure .marker { background: #087f5b; }
+ .trailing .marker { background: #1971c2; }
+ .break-only .marker { background: #e8590c; }
+ .mixed .marker { background: #7048e8; }
+ .flex .marker { background: #c2255c; }
+ .tight .marker { background: #2b8a3e; }
+ </style>
+</head>
+<body>
+ <div class="column pure"><br><div class="marker"></div></div>
+ <div class="column trailing">Ag<br><br><div class="marker"></div></div>
+ <div class="column break-only"><br><br><br><div class="marker"></div></div>
+ <div class="column mixed"><span>Ag</span><br><br><div style="height: 20px"></div><div class="marker"></div></div>
+ <div class="column flex"><div style="height: 10px"></div><br><div class="marker" style="height: 10px"></div></div>
+ <div class="column tight"><br><br><div class="marker"></div></div>
+</body>
+</html>