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.
This commit is contained in:
Martin Robinson 2017-07-27 11:25:59 +02:00
parent 46f6e68bad
commit daf638bc3f
11 changed files with 214 additions and 106 deletions

View file

@ -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]