mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
layout: Record sizes for iframes that have no pipeline.
This commit is contained in:
parent
7474b309b4
commit
38e4ae0833
1 changed files with 10 additions and 9 deletions
|
@ -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<CSSPixel>
|
||||
// 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);
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue