From 815ed0c29c2a840977382e2ea2b3e54ec12f6409 Mon Sep 17 00:00:00 2001 From: Martin Robinson Date: Thu, 3 Aug 2017 11:34:26 +0200 Subject: [PATCH] Fix warning in scroll root id assignment to TableColGroupFlow The traversal currently expects every flow to have a scroll root id assigned, even if it doesn't produce any display items. This change fixes the error that arises from this situation. --- components/layout/table_colgroup.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/components/layout/table_colgroup.rs b/components/layout/table_colgroup.rs index 44519a3bbab..97d0ef89022 100644 --- a/components/layout/table_colgroup.rs +++ b/components/layout/table_colgroup.rs @@ -92,7 +92,11 @@ impl Flow for TableColGroupFlow { // Table columns are invisible. fn build_display_list(&mut self, _: &mut DisplayListBuildState) { } - fn collect_stacking_contexts(&mut self, _: &mut DisplayListBuildState) {} + fn collect_stacking_contexts(&mut self, state: &mut DisplayListBuildState) { + self.base.stacking_context_id = state.current_stacking_context_id; + self.base.scroll_root_id = Some(state.current_scroll_root_id); + } + fn repair_style(&mut self, _: &::ServoArc) {}