diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2017-08-04 11:17:24 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-04 11:17:24 -0500 |
commit | 49615284d0f45646da917f7dda22a1103d12974d (patch) | |
tree | dfa476941faaa6d43d2e83df5d76338073b646d0 /components/layout/traversal.rs | |
parent | 7b299caf9b547412390512ff07a119a47d0cc1bf (diff) | |
parent | daf638bc3f1deebb23cc4375f872a1b1b4bc543c (diff) | |
download | servo-49615284d0f45646da917f7dda22a1103d12974d.tar.gz servo-49615284d0f45646da917f7dda22a1103d12974d.zip |
Auto merge of #17923 - mrobinson:fixed-position-css-clip, r=emilio
Fix fixed position items with parents with CSS clips
In order to properly handle CSS clipping, we need to keep track of what
the different kinds of clips that we have. On one hand, clipping due to
overflow rules should respect the containing block hierarchy, while CSS
clipping should respect the flow tree hierarchy. In order to represent
the complexity of items that are scrolled via one clip/scroll frame and
clipped by another we keep track of that status with a
ClipAndScrollInfo.
<!-- 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/17923)
<!-- Reviewable:end -->
Diffstat (limited to 'components/layout/traversal.rs')
-rw-r--r-- | components/layout/traversal.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/components/layout/traversal.rs b/components/layout/traversal.rs index f821b4a2806..7ca56d22f9a 100644 --- a/components/layout/traversal.rs +++ b/components/layout/traversal.rs @@ -222,8 +222,9 @@ impl<'a> BuildDisplayList<'a> { let parent_stacking_context_id = self.state.current_stacking_context_id; self.state.current_stacking_context_id = flow::base(flow).stacking_context_id; - let parent_scroll_root_id = self.state.current_scroll_root_id; - self.state.current_scroll_root_id = flow.scroll_root_id(self.state.layout_context.id); + let parent_clip_and_scroll_info = self.state.current_clip_and_scroll_info; + self.state.current_clip_and_scroll_info = + flow.clip_and_scroll_info(self.state.layout_context.id); if self.should_process() { flow.build_display_list(&mut self.state); @@ -235,7 +236,7 @@ impl<'a> BuildDisplayList<'a> { } self.state.current_stacking_context_id = parent_stacking_context_id; - self.state.current_scroll_root_id = parent_scroll_root_id; + self.state.current_clip_and_scroll_info = parent_clip_and_scroll_info; } #[inline] |