Skip to content
This repository was archived by the owner on Mar 19, 2021. It is now read-only.

Commit 50fa6ad

Browse files
vmpstrchromium-wpt-export-bot
authored andcommitted
NG/ContentSize: Save unconstrained intrinsic block size in NG for overflow calc.
This patch saves the unconstrained intrinsic box size during the block layout algorithm in order to use it for overflow calculation in the node. Since we can override the intrinsic size with css-content-size, we may cause scrollbars to appear. By using unconstrained size, we retain correct behavior in which scrollbars only depend on the child content, and not on content-size override. [email protected], [email protected] Bug: 991096 Change-Id: I0d9cb270ee710b759f93202497f69bf72544f81a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1833074 Reviewed-by: Morten Stenshorne <[email protected]> Commit-Queue: vmpstr <[email protected]> Cr-Commit-Position: refs/heads/master@{#706135}
1 parent 2bd57e0 commit 50fa6ad

File tree

2 files changed

+54
-0
lines changed

2 files changed

+54
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<!DOCTYPE html>
2+
<meta charset="utf-8">
3+
<title>CSS Containment Test: Size containment scrollbars</title>
4+
<link rel="author" title="Vladimir Levin" href="mailto:[email protected]">
5+
<link rel="help" href="https://drafts.csswg.org/css-contain-1/#containment-size">
6+
<link rel="match" href="reference/contain-size-scrollbars-004-ref.html">
7+
<meta name=assert content="This test checks that contain:size element's content and padding are considered for scrollbars.">
8+
<style>
9+
#scroller {
10+
contain: size;
11+
background: lightgreen;
12+
overflow: scroll;
13+
padding-bottom: 50px;
14+
width: 100px;
15+
height: 100px;
16+
}
17+
#content {
18+
background: lightblue;
19+
width: 50px;
20+
height: 130px;
21+
}
22+
</style>
23+
24+
<div id=scroller>
25+
<div id=content>
26+
</div>
27+
</div>
28+
29+
<p>This test passes if it has the same output as the reference.</p>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<!DOCTYPE html>
2+
<meta charset="utf-8">
3+
<title>CSS Containment Test: Reference file</title>
4+
<link rel="author" title="Vladimir Levin" href="mailto:[email protected]">
5+
<style>
6+
#scroller {
7+
background: lightgreen;
8+
overflow: scroll;
9+
padding-bottom: 50px;
10+
width: 100px;
11+
height: 100px;
12+
}
13+
#content {
14+
background: lightblue;
15+
width: 50px;
16+
height: 130px;
17+
}
18+
</style>
19+
20+
<div id=scroller>
21+
<div id=content>
22+
</div>
23+
</div>
24+
25+
<p>This test passes if it has the same output as the reference.</p>

0 commit comments

Comments
 (0)