diff --git a/components/layout/display_list_builder.rs b/components/layout/display_list_builder.rs index db8b67400fc..de342475c7f 100644 --- a/components/layout/display_list_builder.rs +++ b/components/layout/display_list_builder.rs @@ -14,7 +14,7 @@ use app_units::{Au, AU_PER_PX}; use azure::azure_hl::Color; use block::{BlockFlow, BlockStackingContextType}; use canvas_traits::{CanvasMsg, CanvasData, FromLayoutMsg}; -use context::LayoutContext; +use context::SharedLayoutContext; use euclid::{Matrix4D, Point2D, Point3D, Radians, Rect, SideOffsets2D, Size2D}; use flex::FlexFlow; use flow::{BaseFlow, Flow, IS_ABSOLUTELY_POSITIONED}; @@ -65,16 +65,17 @@ fn get_cyclic(arr: &[T], index: usize) -> &T { } pub struct DisplayListBuildState<'a> { - pub layout_context: &'a LayoutContext<'a>, + pub shared_layout_context: &'a SharedLayoutContext, pub items: Vec, pub stacking_context_id_stack: Vec, } impl<'a> DisplayListBuildState<'a> { - pub fn new(layout_context: &'a LayoutContext, stacking_context_id: StackingContextId) + pub fn new(shared_layout_context: &'a SharedLayoutContext, + stacking_context_id: StackingContextId) -> DisplayListBuildState<'a> { DisplayListBuildState { - layout_context: layout_context, + shared_layout_context: shared_layout_context, items: Vec::new(), stacking_context_id_stack: vec!(stacking_context_id), } @@ -491,8 +492,7 @@ impl FragmentDisplayListBuilding for Fragment { index: usize) { let background = style.get_background(); let fetch_image_data_as_well = !opts::get().use_webrender; - let webrender_image = state.layout_context - .shared + let webrender_image = state.shared_layout_context .get_webrender_image_for_url(image_url, UsePlaceholder::No, fetch_image_data_as_well); diff --git a/components/layout/sequential.rs b/components/layout/sequential.rs index 1862086b163..cbd5954ebee 100644 --- a/components/layout/sequential.rs +++ b/components/layout/sequential.rs @@ -89,7 +89,7 @@ pub fn build_display_list_for_subtree(root: &mut FlowRef, &mut children); root_stacking_context.add_children(children); let mut build_display_list = BuildDisplayList { - state: DisplayListBuildState::new(&layout_context, + state: DisplayListBuildState::new(&layout_context.shared, flow::base(&*flow_root).stacking_context_id), }; build_display_list.traverse(&mut *flow_root);