Used shared clips for overflow:hidden and CSS clip

Instead of passing down a complex clipping region to each item, used
shared clipping to handle overflow:hidden and CSS clips. In addition to
being more efficient, this should also fix quite a few issues related
to absolutely positioned elements.

One existing reftest is slightly modified to avoid tickling a quirk
with the way that WebRender rasterizes masks. We are working out how to
best express these combined masks with the API or need to. The change
does not affect the original subject of the reftest.

Fixes #13109.
Fixes #10151.
Fixes #7575.
Fixes #8074.
Fixes #8780.
This commit is contained in:
Martin Robinson 2017-03-20 10:45:59 +01:00
parent b9274b7527
commit 4451b8a771
16 changed files with 483 additions and 343 deletions

View file

@ -1,3 +0,0 @@
[attachment-local-clipping-image-6.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[abspos-overflow-004.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[abspos-overflow-005.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[abspos-overflow-006.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[overflow-applies-to-014.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[overflow-applies-to-015.htm]
type: reftest
expected: FAIL

View file

@ -20601,7 +20601,7 @@
"support"
],
"css/border_radius_in_border_radius_a.html": [
"ee5099078e3403236fafbe82879c203f4c13cf50",
"64ad2121d35db22286fbea2d0835f2a36aa90570",
"reftest"
],
"css/border_radius_in_border_radius_ref.html": [
@ -22813,11 +22813,11 @@
"support"
],
"css/overflow_clipping.html": [
"f87d3c74c15393fb490e3855c88f6331fce9e077",
"3e8eb236afa8013c19adbfa807b674a393fc1eed",
"reftest"
],
"css/overflow_clipping_ref.html": [
"d9a6a3b4fa21742d0f4ddd3f348534ec35ab8579",
"f645ece68f6c7afe273daee4d1ec172c7d245632",
"support"
],
"css/overflow_position_abs_inline_block.html": [

View file

@ -1,4 +0,0 @@
[overflow_position_abs_inside_normal_a.html]
type: reftest
expected: FAIL
bug: https://github.com/servo/servo/issues/8780

View file

@ -8,7 +8,6 @@ html, body {
}
.green {
overflow: hidden;
border-radius: 50px;
background: green;
padding: 50px;

View file

@ -18,7 +18,6 @@
</style>
</head>
<body>
<div class="test grayest box" style="overflow: scroll">
<div style="position: relative;">
<div class="overflowing-absolute-child grayer"></div>
@ -35,5 +34,52 @@
</div>
-->
<div style="height: 30px; clear: both;"> </div>
<div class="test grayest box" style="overflow: auto;">
<div class="grayer box" style="margin-left: 10px; margin-top: 10px; position: fixed;"></div>
</div>
<div class="test grayest box" style="overflow: hidden;">
<div class="grayer box" style="margin-left: 10px; margin-top: 10px; position: fixed;"></div>
</div>
<div class="test grayest box" style="overflow: scroll;">
<div class="grayer box" style="margin-left: 10px; margin-top: 10px; position: fixed;"></div>
</div>
<div style="height: 30px; clear: both;"> </div>
<div class="test grayest box" style="overflow: auto;">
<div class="grayer box" style="margin-left: 10px; margin-top: 10px; position: absolute;"></div>
</div>
<div class="test grayest box" style="overflow: hidden;">
<div class="grayer box" style="margin-left: 10px; margin-top: 10px; position: absolute;"></div>
</div>
<div class="test grayest box" style="overflow: scroll;">
<div class="grayer box" style="margin-left: 10px; margin-top: 10px; position: absolute;"></div>
</div>
<div style="height: 30px; clear: both;"> </div>
<div class="test grayest box" style="overflow: auto;">
<div class="grayer box" style="margin-left: 10px; margin-top: 10px; position: relative;"></div>
</div>
<div class="test grayest box" style="overflow: hidden;">
<div class="grayer box" style="margin-left: 10px; margin-top: 10px; position: relative;"></div>
</div>
<div class="test grayest box" style="overflow: scroll;">
<div class="grayer box" style="margin-left: 10px; margin-top: 10px; position: relative;"></div>
</div>
<div style="height: 30px; clear: both;"> </div>
<div class="test grayest box" style="overflow: auto;">
<div class="grayer box" style="margin-left: 10px; margin-top: 10px;"></div>
</div>
<div class="test grayest box" style="overflow: hidden;">
<div class="grayer box" style="margin-left: 10px; margin-top: 10px;"></div>
</div>
<div class="test grayest box" style="overflow: scroll;">
<div class="grayer box" style="margin-left: 10px; margin-top: 10px;"></div>
</div>
</body>
</html>

View file

@ -22,5 +22,53 @@
<div class="grayer smallbox" style="margin-left: 10px; margin-top: 25px; height: 25px;"></div>
</div>
-->
<div style="height: 30px; clear: both;"> </div>
<div class="test grayest box">
<div class="grayer box" style="margin-left: 10px; margin-top: 10px;"></div>
</div>
<div class="test grayest box">
<div class="grayer box" style="margin-left: 10px; margin-top: 10px;"></div>
</div>
<div class="test grayest box">
<div class="grayer box" style="margin-left: 10px; margin-top: 10px;"></div>
</div>
<div style="height: 30px; clear: both;"> </div>
<div class="test grayest box">
<div class="grayer box" style="margin-left: 10px; margin-top: 10px;"></div>
</div>
<div class="test grayest box">
<div class="grayer box" style="margin-left: 10px; margin-top: 10px;"></div>
</div>
<div class="test grayest box">
<div class="grayer box" style="margin-left: 10px; margin-top: 10px;"></div>
</div>
<div style="height: 30px; clear: both;"> </div>
<div class="test grayest box">
<div class="grayer smallbox" style="margin-left: 10px; margin-top: 10px;"></div>
</div>
<div class="test grayest box">
<div class="grayer smallbox" style="margin-left: 10px; margin-top: 10px;"></div>
</div>
<div class="test grayest box">
<div class="grayer smallbox" style="margin-left: 10px; margin-top: 10px;"></div>
</div>
<div style="height: 30px; clear: both;"> </div>
<div class="test grayest box">
<div class="grayer smallbox" style="margin-left: 10px; margin-top: 10px;"></div>
</div>
<div class="test grayest box">
<div class="grayer smallbox" style="margin-left: 10px; margin-top: 10px;"></div>
</div>
<div class="test grayest box">
<div class="grayer smallbox" style="margin-left: 10px; margin-top: 10px;"></div>
</div>
</body>
</html>