From 7429b7dcd9ef3a2b21013bd394fc369c654efbd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Na=C5=9Bciszewski?= Date: Thu, 14 Sep 2017 12:24:03 +0200 Subject: [PATCH] Avoid creating multiple scroll roots for sticky tables This should prevent problems when a table has position:sticky and overflow:scroll. --- components/layout/display_list_builder.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/layout/display_list_builder.rs b/components/layout/display_list_builder.rs index 187799e6f76..074fe441010 100644 --- a/components/layout/display_list_builder.rs +++ b/components/layout/display_list_builder.rs @@ -2648,6 +2648,9 @@ impl BlockFlowDisplayListBuilding for BlockFlow { let new_clip_scroll_node_id = ClipId::new(self.fragment.unique_id(IdType::OverflowClip), state.pipeline_id.to_webrender()); + if state.has_clip_scroll_node(new_clip_scroll_node_id) { + return; + } let parent_id = self.clip_and_scroll_info(state.pipeline_id).scroll_node_id; state.add_clip_scroll_node( ClipScrollNode {