From 35899af0c63baba2441b76779e765c8110cf4b0d Mon Sep 17 00:00:00 2001 From: Martin Robinson Date: Thu, 3 Aug 2017 07:51:22 -0500 Subject: [PATCH] servo: Merge #17960 - Fix warning in scroll root id assignment to TableColGroupFlow (from mrobinson:fix-warning-for-table-colgroup); r=emilio 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. --- - [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). - [ ] There are tests for these changes OR - [x] These changes do not require tests because they do not change behavior, just fix a runtime warning. Source-Repo: https://github.com/servo/servo Source-Revision: 46f6e68bad7aafc380976bfddd9e76bfaa86229e --HG-- extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear extra : subtree_revision : de75e85a605eaa517b1a88afed60a541df8bba3f --- servo/components/layout/table_colgroup.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/servo/components/layout/table_colgroup.rs b/servo/components/layout/table_colgroup.rs index 44519a3bbaba..97d0ef890221 100644 --- a/servo/components/layout/table_colgroup.rs +++ b/servo/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) {}