Skip to content

Commit 8d00643

Browse files
bfgeekchromium-wpt-export-bot
authored andcommitted
[fieldset] Fix fieldsets within flex by disabling simplified pass.
When flex did a 2-pass layout (once to determine the intrinsic size, and a followup to shrink - and the block-size changed, we'd just perform a simplified layout pass. The fieldset layout algorithm "stretches" its content to its block-size upfront. Due to this using the simplified layout pass resulted in an incorrect layout, never correctly sizing the anonymous fieldset content. This patch disables the simplified layout pass for fieldsets. Bug: 1149714 Change-Id: I454a65363c019240dd4b30531009a13e8b596ea4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2544755 Reviewed-by: Kent Tamura <[email protected]> Reviewed-by: Christian Biesinger <[email protected]> Reviewed-by: Morten Stenshorne <[email protected]> Commit-Queue: Ian Kilpatrick <[email protected]> Cr-Commit-Position: refs/heads/master@{#828360}
1 parent c948cbb commit 8d00643

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<!DOCTYPE html>
2+
<div style="width: 100px; height: 100px; border: solid;">
3+
<div style="overflow-y: scroll; max-height: 100%;">
4+
<div style="height: 200px; background: green;"></div>
5+
</div>
6+
</div>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<!DOCTYPE html>
2+
<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1149714">
3+
<link rel="match" href="fieldset-as-item-overflow-ref.html">
4+
<meta name="assert" content="A fieldset element when flex-shrink is applied has scrollable overflow.">
5+
<div style="display: flex; flex-direction: column; width: 100px; height: 100px; border: solid;">
6+
<fieldset style="margin: 0; border: none; padding: 0; overflow-y: scroll; overflow-x: hidden; flex-grow: 1;">
7+
<div style="height: 200px; background: green;"></div>
8+
</fieldset>
9+
</div>

0 commit comments

Comments
 (0)