mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Only create scrolling overflow regions when necessary
Only create scroll roots for overflow regions when the overflow region is actually larger than the container size. This prevents creating scrolling roots for elements that do not have overflow scroll as a side-effect of the way their height and width is defined. For example, tables should never respect overflow:scroll since their height and width should always be large enough to prevent overflow. This also decreases the size and complexity of the display list in many other circumstances. As part of this change, transformed overflow calculation is moved from display list construction to layout. This should mean that overflow is handled more accurately earlier. Fixes #14574.
This commit is contained in:
parent
14aa666a5a
commit
44b24de60f
10 changed files with 139 additions and 63 deletions
|
@ -5232,6 +5232,18 @@
|
|||
"url": "/_mozilla/css/table_margin_auto_a.html"
|
||||
}
|
||||
],
|
||||
"css/table_overflow.html": [
|
||||
{
|
||||
"path": "css/table_overflow.html",
|
||||
"references": [
|
||||
[
|
||||
"/_mozilla/css/table_overflow_ref.html",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
"url": "/_mozilla/css/table_overflow.html"
|
||||
}
|
||||
],
|
||||
"css/table_padding_a.html": [
|
||||
{
|
||||
"path": "css/table_padding_a.html",
|
||||
|
@ -20556,6 +20568,18 @@
|
|||
"url": "/_mozilla/css/table_margin_auto_a.html"
|
||||
}
|
||||
],
|
||||
"css/table_overflow.html": [
|
||||
{
|
||||
"path": "css/table_overflow.html",
|
||||
"references": [
|
||||
[
|
||||
"/_mozilla/css/table_overflow_ref.html",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
"url": "/_mozilla/css/table_overflow.html"
|
||||
}
|
||||
],
|
||||
"css/table_padding_a.html": [
|
||||
{
|
||||
"path": "css/table_padding_a.html",
|
||||
|
|
19
tests/wpt/mozilla/tests/css/table_overflow.html
Normal file
19
tests/wpt/mozilla/tests/css/table_overflow.html
Normal file
|
@ -0,0 +1,19 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>Ensure that table overflow:auto and overflow:scroll do not crash</title>
|
||||
<link rel="match" href="table_overflow_ref.html">
|
||||
|
||||
<style>
|
||||
div {
|
||||
height: 100px;
|
||||
width: 100px;
|
||||
background: green;
|
||||
}
|
||||
</style>
|
||||
|
||||
<body>
|
||||
|
||||
<table style="overflow: scroll;"><tr><td><div></div></td></tr></table>
|
||||
<table style="overflow: auto;"><tr><td><div></div></td></tr></table>
|
||||
|
||||
</body>
|
17
tests/wpt/mozilla/tests/css/table_overflow_ref.html
Normal file
17
tests/wpt/mozilla/tests/css/table_overflow_ref.html
Normal file
|
@ -0,0 +1,17 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>Ensure that table overflow:auto and overflow:scroll do not crash</title>
|
||||
<style>
|
||||
div {
|
||||
height: 100px;
|
||||
width: 100px;
|
||||
background: green;
|
||||
}
|
||||
</style>
|
||||
|
||||
<body>
|
||||
|
||||
<table><tr><td><div></div></td></tr></table>
|
||||
<table><tr><td><div></div></td></tr></table>
|
||||
|
||||
</body>
|
Loading…
Add table
Add a link
Reference in a new issue