mirror of
https://github.com/servo/servo.git
synced 2025-08-10 16:05:43 +01:00
Auto merge of #14979 - mrobinson:scroll-roots-when-necessary, r=emilio
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. <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #14574 (github issue number if applicable). <!-- Either: --> - [x] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14979) <!-- Reviewable:end -->
This commit is contained in:
commit
3ab514302f
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",
|
||||
|
@ -20574,6 +20586,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