diff options
author | Martin Robinson <mrobinson@igalia.com> | 2017-07-27 11:25:59 +0200 |
---|---|---|
committer | Martin Robinson <mrobinson@igalia.com> | 2017-08-03 17:52:02 +0200 |
commit | daf638bc3f1deebb23cc4375f872a1b1b4bc543c (patch) | |
tree | 87ea0fd8ab332146fcd829c0410d7b9a99d033b8 /components/layout/traversal.rs | |
parent | 46f6e68bad7aafc380976bfddd9e76bfaa86229e (diff) | |
download | servo-daf638bc3f1deebb23cc4375f872a1b1b4bc543c.tar.gz servo-daf638bc3f1deebb23cc4375f872a1b1b4bc543c.zip |
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.
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] |