Clean up debug options

This commit is contained in:
Martin Robinson 2023-04-28 08:58:18 +02:00
parent 3e3bd9c728
commit dc192172ad
10 changed files with 172 additions and 308 deletions

View file

@ -2068,7 +2068,7 @@ impl FlowRef {
/// All flows must be finished at some point, or they will not have their intrinsic inline-sizes
/// properly computed. (This is not, however, a memory safety problem.)
fn finish(&mut self) {
if !opts::get().bubble_inline_sizes_separately {
if !opts::get().debug.bubble_inline_sizes_separately {
FlowRef::deref_mut(self).bubble_inline_sizes();
FlowRef::deref_mut(self)
.mut_base()

View file

@ -1713,7 +1713,7 @@ impl Fragment {
);
});
if opts::get().show_debug_fragment_borders {
if opts::get().debug.show_fragment_borders {
self.build_debug_borders_around_fragment(state, stacking_relative_border_box, clip)
}
}
@ -1772,7 +1772,7 @@ impl Fragment {
clip,
);
if opts::get().show_debug_fragment_borders {
if opts::get().debug.show_fragment_borders {
self.build_debug_borders_around_text_fragments(
state,
self.style(),
@ -1793,7 +1793,7 @@ impl Fragment {
clip,
);
if opts::get().show_debug_fragment_borders {
if opts::get().debug.show_fragment_borders {
self.build_debug_borders_around_text_fragments(
state,
self.style(),
@ -1817,7 +1817,7 @@ impl Fragment {
SpecificFragmentInfo::InlineAbsolute(_) |
SpecificFragmentInfo::TruncatedFragment(_) |
SpecificFragmentInfo::Svg(_) => {
if opts::get().show_debug_fragment_borders {
if opts::get().debug.show_fragment_borders {
self.build_debug_borders_around_fragment(
state,
stacking_relative_border_box,
@ -2885,7 +2885,7 @@ impl BaseFlow {
state: &mut DisplayListBuildState,
node: OpaqueNode,
) {
if !opts::get().show_debug_parallel_layout {
if !opts::get().debug.show_parallel_layout {
return;
}

View file

@ -196,7 +196,7 @@ pub fn reflow(
context: &LayoutContext,
queue: &rayon::ThreadPool,
) {
if opts::get().bubble_inline_sizes_separately {
if opts::get().debug.bubble_inline_sizes_separately {
let bubble_inline_sizes = BubbleISizes {
layout_context: &context,
};

View file

@ -55,7 +55,7 @@ pub fn reflow(root: &mut dyn Flow, layout_context: &LayoutContext, relayout_mode
}
}
if opts::get().bubble_inline_sizes_separately {
if opts::get().debug.bubble_inline_sizes_separately {
let bubble_inline_sizes = BubbleISizes {
layout_context: &layout_context,
};