diff options
Diffstat (limited to 'components/layout_thread/lib.rs')
-rw-r--r-- | components/layout_thread/lib.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/components/layout_thread/lib.rs b/components/layout_thread/lib.rs index 8ee539d6f79..540ea92fd70 100644 --- a/components/layout_thread/lib.rs +++ b/components/layout_thread/lib.rs @@ -71,7 +71,7 @@ use layout::context::RegisteredPainter; use layout::context::RegisteredPainters; use layout::context::heap_size_of_persistent_local_context; use layout::display_list_builder::ToGfxColor; -use layout::flow::{self, Flow, ImmutableFlowUtils, MutableFlowUtils, MutableOwnedFlowUtils}; +use layout::flow::{self, Flow, ImmutableFlowUtils, MutableOwnedFlowUtils}; use layout::flow_ref::FlowRef; use layout::incremental::{LayoutDamageComputation, REFLOW_ENTIRE_DOCUMENT, RelayoutMode}; use layout::layout_debug; @@ -82,7 +82,7 @@ use layout::query::{process_margin_style_query, process_node_overflow_request, p use layout::query::{process_node_geometry_request, process_node_scroll_area_request}; use layout::query::{process_node_scroll_root_id_request, process_offset_parent_query}; use layout::sequential; -use layout::traversal::{ComputeStackingRelativePositions, RecalcStyleAndConstructFlows}; +use layout::traversal::{ComputeStackingRelativePositions, PreorderFlowTraversal, RecalcStyleAndConstructFlows}; use layout::webrender_helpers::WebRenderDisplayListConverter; use layout::wrapper::LayoutNodeLayoutData; use layout_traits::LayoutThreadFactory; @@ -975,9 +975,8 @@ impl LayoutThread { flow::mut_base(layout_root).clip = data.page_clip_rect; if flow::base(layout_root).restyle_damage.contains(REPOSITION) { - layout_root.traverse_preorder(&ComputeStackingRelativePositions { - layout_context: layout_context - }); + let traversal = ComputeStackingRelativePositions { layout_context: layout_context }; + traversal.traverse(layout_root); } if flow::base(layout_root).restyle_damage.contains(REPAINT) || |