From 38e4ae0833fbc15c8579d40bca7fc87e9d37cb03 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Wed, 6 Nov 2019 15:39:32 -0500 Subject: [PATCH] layout: Record sizes for iframes that have no pipeline. --- components/layout/display_list/builder.rs | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/components/layout/display_list/builder.rs b/components/layout/display_list/builder.rs index f951bd3f8f2..c44324d43a1 100644 --- a/components/layout/display_list/builder.rs +++ b/components/layout/display_list/builder.rs @@ -1800,18 +1800,9 @@ impl Fragment { Some(browsing_context_id) => browsing_context_id, None => return warn!("No browsing context id for iframe."), }; - let pipeline_id = match fragment_info.pipeline_id { - Some(pipeline_id) => pipeline_id, - None => return warn!("No pipeline id for iframe {}.", browsing_context_id), - }; let base = create_base_display_item(state); let bounds = stacking_relative_content_box.to_layout(); - let item = DisplayItem::Iframe(Box::new(IframeDisplayItem { - base, - bounds, - iframe: pipeline_id, - })); // XXXjdm: This sleight-of-hand to convert LayoutRect -> Size2D // looks bogus. @@ -1820,6 +1811,16 @@ impl Fragment { size: euclid::Size2D::new(bounds.size.width, bounds.size.height), }); + let pipeline_id = match fragment_info.pipeline_id { + Some(pipeline_id) => pipeline_id, + None => return warn!("No pipeline id for iframe {}.", browsing_context_id), + }; + + let item = DisplayItem::Iframe(Box::new(IframeDisplayItem { + base, + bounds, + iframe: pipeline_id, + })); state.add_display_item(item); } },