aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout_thread
diff options
context:
space:
mode:
authorMatt Brubeck <mbrubeck@limpet.net>2017-08-07 16:59:05 -0700
committerMatt Brubeck <mbrubeck@limpet.net>2017-08-08 10:53:19 -0700
commitd1a37f1ea374b1ea9d4907f02402afbb89dc8df0 (patch)
tree0288c9cdf0fd00d27e0a85b37c97bc4ffcd5c082 /components/layout_thread
parenta08bc13df96c70022e5ab0207419609a501d85dc (diff)
downloadservo-d1a37f1ea374b1ea9d4907f02402afbb89dc8df0.tar.gz
servo-d1a37f1ea374b1ea9d4907f02402afbb89dc8df0.zip
Code organization: Move all generic traversal code to layout::traversal
Diffstat (limited to 'components/layout_thread')
-rw-r--r--components/layout_thread/lib.rs9
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) ||