Auto merge of #16284 - mrobinson:scroll-root-clip, r=glennw

Use real clips when generating scroll roots

This is the first step toward removing inherited clips in favor of
scroll roots for handling overflow and CSS clipping. This will allow us
to more easily handle elements that should not be clipped. While we are
still using inherited clips here, we now properly clip some types of
content that wasn't clipped before.

<!-- 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
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [x] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- 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/16284)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-04-06 14:32:16 -05:00 committed by GitHub
commit 24cea409f2
6 changed files with 134 additions and 12 deletions

View file

@ -4079,6 +4079,18 @@
{}
]
],
"css/overflow_border_radius.html": [
[
"/_mozilla/css/overflow_border_radius.html",
[
[
"/_mozilla/css/overflow_border_radius_ref.html",
"=="
]
],
{}
]
],
"css/overflow_position_abs_inline_block.html": [
[
"/_mozilla/css/overflow_position_abs_inline_block.html",
@ -8415,6 +8427,11 @@
{}
]
],
"css/overflow_border_radius_ref.html": [
[
{}
]
],
"css/overflow_position_abs_inline_block_ref.html": [
[
{}
@ -22689,6 +22706,14 @@
"195201950fd56bd139e71971d66f92ee4fef815d",
"support"
],
"css/overflow_border_radius.html": [
"2c8a650f518ccff78517556540416f7e0e798033",
"reftest"
],
"css/overflow_border_radius_ref.html": [
"3798d0efb1b9858ad47ecf6f09357c3c0dae1b80",
"support"
],
"css/overflow_position_abs_inline_block.html": [
"7550f9c9f3e91635c15554d9ae21e172944054e6",
"reftest"

View file

@ -0,0 +1,36 @@
<!doctype html>
<html>
<meta charset="utf-8">
<title>Test to ensure that clipped overflow is clipped to border radius</title>
<link rel="match" href="overflow_border_radius_ref.html">
<body>
<style>
.box {
width: 50px;
height: 50px;
border-radius: 20px;
border: 5px transparent solid;
margin-right: 10px;
float: left;
}
.overflowingbox {
margin-left: -25px;
margin-top: -25px;
width: 100px;
height: 100px;
background: gray;
}
</style>
<div class="box border" style="overflow: auto;">
<div class="overflowingbox"></div>
</div>
<div class="box border" style="overflow: scroll;">
<div class="overflowingbox"></div>
</div>
</body>
</html>

View file

@ -0,0 +1,26 @@
<!doctype html>
<html>
<meta charset="utf-8">
<title></title>
<body>
<style>
.box {
width: 50px;
height: 50px;
margin-left: 5px;
margin-top: 5px;
border-radius: 15px;
background: gray;
float: left;
margin-right: 15px;
}
</style>
<div class="box"></div>
<div class="box"></div>
</body>
</html>