Auto merge of #18123 - mrobinson:absolute-containing-blocks, r=pcwalton

Improve containing block creation for position:absolute flows

Instead of only promoting flows with positioned fragments to containing
blocks, also do this for flows which have the transform, perspective or
filter properties set. This is what the spec requires and also fixes
some failing tests. It will allow us to stop creating stacking contexts
for overflow:hidden and overflow:scroll flows.

Fixes #18091.

<!-- 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 #18091  (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/18123)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-08-17 19:42:20 -05:00 committed by GitHub
commit 12607531d8
15 changed files with 107 additions and 43 deletions

View file

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

View file

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

View file

@ -26120,11 +26120,11 @@
"reftest"
],
"css/translate_clip_nested.html": [
"319619a3ae8d8d1f935fedfecf41f895cb205033",
"11adf8b4fa7c3176b002b32f8309c12bfb40043d",
"reftest"
],
"css/translate_clip_nested_ref.html": [
"2f0dc9fe89d71550e1acc76865e950bbb9f2db79",
"7481c266d32dc59034490a89321e45a86b47bb1b",
"support"
],
"css/translate_clip_ref.html": [

View file

@ -10,7 +10,14 @@
<div style="position: relative; overflow: hidden; background: red;">
<div style="transform: translateX(-100px);">
<div style="position: absolute; right: -100px; background: green;">
1 2 3 4 5 6 7 8 9 10 11 12 13
</div>
</div>
</div>
<!-- Repeat the same test, but this time make the outer div a stacking context. -->
<div style="position: relative; z-index: 1; overflow: hidden; background: red;">
<div style="transform: translateX(-100px);">
<div style="position: absolute; right: -100px; background: green;">
</div>
</div>
</div>

View file

@ -6,8 +6,5 @@
width: 200px;
}
</style>
<div style="position: relative; overflow: hidden; background: red;">
<div style="position: absolute; right: 0; background: green;">
1 2 3 4 5 6 7 8 9 10 11 12 13
</div>
</div>
<div style="position: relative; overflow: hidden; background: green;"> </div>
<div style="position: relative; overflow: hidden; background: green;"> </div>