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.

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [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).

<!-- Either: -->
- [ ] 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.

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

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
This commit is contained in:
Martin Robinson 2017-08-03 07:51:22 -05:00
Родитель 691d3a678f
Коммит 35899af0c6
1 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

@ -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<ComputedValues>) {}