mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Temporarily convert existing cfg(debug_assertions) crashes to warnings (#30578)
This commit is contained in:
parent
351b5036bf
commit
66258bfbbd
9 changed files with 53 additions and 16 deletions
|
@ -1762,7 +1762,11 @@ impl BlockFlow {
|
|||
}
|
||||
|
||||
// If you remove the might_have_floats_in conditional, this will go off.
|
||||
debug_assert!(!self.is_inline_flex_item());
|
||||
// TODO(servo#30572) revert to debug_assert!() once underlying bug is fixed
|
||||
#[cfg(debug_assertions)]
|
||||
if !(!self.is_inline_flex_item()) {
|
||||
log::warn!("debug assertion failed! !self.is_inline_flex_item()");
|
||||
}
|
||||
|
||||
// Compute the available space for us, based on the actual floats.
|
||||
let rect = self.base.floats.available_rect(
|
||||
|
|
|
@ -163,7 +163,9 @@ impl Floats {
|
|||
|
||||
/// Adjusts the recorded offset of the flow relative to the first float.
|
||||
pub fn translate(&mut self, delta: LogicalSize<Au>) {
|
||||
self.offset = self.offset + delta
|
||||
// TODO(servo#30577) revert once underlying bug is fixed
|
||||
// self.offset = self.offset + delta
|
||||
self.offset = self.offset.add_or_warn(delta)
|
||||
}
|
||||
|
||||
/// Returns the position of the last float in flow coordinates.
|
||||
|
|
|
@ -1376,7 +1376,11 @@ impl MutableOwnedFlowUtils for FlowRef {
|
|||
let base = FlowRef::deref_mut(self).mut_base();
|
||||
|
||||
for descendant_link in abs_descendants.descendant_links.iter_mut() {
|
||||
debug_assert!(!descendant_link.has_reached_containing_block);
|
||||
// TODO(servo#30573) revert to debug_assert!() once underlying bug is fixed
|
||||
#[cfg(debug_assertions)]
|
||||
if !(!descendant_link.has_reached_containing_block) {
|
||||
log::warn!("debug assertion failed! !descendant_link.has_reached_containing_block");
|
||||
}
|
||||
let descendant_base = FlowRef::deref_mut(&mut descendant_link.flow).mut_base();
|
||||
descendant_base.absolute_cb.set(this.clone());
|
||||
}
|
||||
|
|
|
@ -1517,7 +1517,9 @@ impl Fragment {
|
|||
if let Some(ref inline_fragment_context) = self.inline_context {
|
||||
for node in &inline_fragment_context.nodes {
|
||||
if node.style.get_box().position == Position::Relative {
|
||||
rel_pos = rel_pos + from_style(&*node.style, containing_block_size);
|
||||
// TODO(servo#30577) revert once underlying bug is fixed
|
||||
// rel_pos = rel_pos + from_style(&*node.style, containing_block_size);
|
||||
rel_pos = rel_pos.add_or_warn(from_style(&*node.style, containing_block_size));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue