mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Don’t mark flow_ref::deref_mut as unsafe.
See discussion in https://github.com/servo/servo/pull/7237
This commit is contained in:
parent
649250130b
commit
21d69314d4
10 changed files with 53 additions and 72 deletions
|
@ -1771,7 +1771,6 @@ pub trait InlineFlowDisplayListBuilding {
|
|||
}
|
||||
|
||||
impl InlineFlowDisplayListBuilding for InlineFlow {
|
||||
#[allow(unsafe_code)]
|
||||
fn build_display_list_for_inline(&mut self, layout_context: &LayoutContext) {
|
||||
// TODO(#228): Once we form lines and have their cached bounds, we can be smarter and
|
||||
// not recurse on a line if nothing in it can intersect the dirty region.
|
||||
|
@ -1798,17 +1797,17 @@ impl InlineFlowDisplayListBuilding for InlineFlow {
|
|||
|
||||
match fragment.specific {
|
||||
SpecificFragmentInfo::InlineBlock(ref mut block_flow) => {
|
||||
let block_flow = unsafe { flow_ref::deref_mut(&mut block_flow.flow_ref) };
|
||||
let block_flow = flow_ref::deref_mut(&mut block_flow.flow_ref);
|
||||
flow::mut_base(block_flow).display_list_building_result
|
||||
.add_to(&mut *display_list)
|
||||
}
|
||||
SpecificFragmentInfo::InlineAbsoluteHypothetical(ref mut block_flow) => {
|
||||
let block_flow = unsafe { flow_ref::deref_mut(&mut block_flow.flow_ref) };
|
||||
let block_flow = flow_ref::deref_mut(&mut block_flow.flow_ref);
|
||||
flow::mut_base(block_flow).display_list_building_result
|
||||
.add_to(&mut *display_list)
|
||||
}
|
||||
SpecificFragmentInfo::InlineAbsolute(ref mut block_flow) => {
|
||||
let block_flow = unsafe { flow_ref::deref_mut(&mut block_flow.flow_ref) };
|
||||
let block_flow = flow_ref::deref_mut(&mut block_flow.flow_ref);
|
||||
flow::mut_base(block_flow).display_list_building_result
|
||||
.add_to(&mut *display_list)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue