mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Auto merge of #13417 - mrobinson:simplify-stacking-context-collection, r=glennw
Simplify stacking context collection <!-- 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: --> - [x] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> Simplify the way that stacking contexts are collected. Instead of passing the StackingContextId down the tree, pass the parent StackingContext itself. This will allow future patches to get more information about the parent stacking context (such as location). Also remove the return value of collect_stacking_contexts, which was unused. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13417) <!-- Reviewable:end -->
This commit is contained in:
commit
81dfa6a96b
16 changed files with 88 additions and 184 deletions
|
@ -20,7 +20,6 @@ use fragment::SpecificFragmentInfo;
|
|||
use gfx::display_list::{OpaqueNode, StackingContext};
|
||||
use gfx::font::FontMetrics;
|
||||
use gfx::font_context::FontContext;
|
||||
use gfx_traits::StackingContextId;
|
||||
use gfx_traits::print_tree::PrintTree;
|
||||
use layout_debug;
|
||||
use model::IntrinsicISizesContribution;
|
||||
|
@ -1660,11 +1659,8 @@ impl Flow for InlineFlow {
|
|||
|
||||
fn update_late_computed_block_position_if_necessary(&mut self, _: Au) {}
|
||||
|
||||
fn collect_stacking_contexts(&mut self,
|
||||
parent_id: StackingContextId,
|
||||
contexts: &mut Vec<Box<StackingContext>>)
|
||||
-> StackingContextId {
|
||||
self.collect_stacking_contexts_for_inline(parent_id, contexts)
|
||||
fn collect_stacking_contexts(&mut self, parent: &mut StackingContext) {
|
||||
self.collect_stacking_contexts_for_inline(parent);
|
||||
}
|
||||
|
||||
fn build_display_list(&mut self, state: &mut DisplayListBuildState) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue