diff --git a/core/src/layout_diagnostics.rs b/core/src/layout_diagnostics.rs index 6950aa1..ffe4e29 100644 --- a/core/src/layout_diagnostics.rs +++ b/core/src/layout_diagnostics.rs @@ -72,6 +72,7 @@ labelled! { TextBreaks = "text line breaks", GlyphPlacements = "glyph placements", OutsidePinnedLen = "reuse outside: the length it was pinned to", + OutsideWindow = "reuse outside: this window", OutsideRelBase = "reuse outside: a rel base", OutsideRegion = "reuse outside: a region length", } @@ -352,7 +353,7 @@ pub(crate) fn reuse(id: WidgetId, outcome: ReuseOutcome) { } /// A drawing that cannot be reused because the box on offer is outside what -/// it holds for, and which of the three contracts said so. They overlap: a +/// it holds for, and which of the four contracts said so. They overlap: a /// drawing can be outside two of them at once, and counting each is what /// says where a rel base redrawing more than it should is coming from. pub(crate) fn outside( @@ -369,10 +370,12 @@ pub(crate) fn outside( if holds.region_len.is_some_and(|pinned| pinned != len) { bump(Counter::OutsidePinnedLen); } - if !holds.window.contains(window) - || holds - .rel_base - .is_some_and(|pinned| pinned != rel_base[axis]) + if !holds.window.contains(window) { + bump(Counter::OutsideWindow); + } + if holds + .rel_base + .is_some_and(|pinned| pinned != rel_base[axis]) { bump(Counter::OutsideRelBase); }