From fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:14:29 +0200 Subject: Merging upstream version 125.0.1. Signed-off-by: Daniel Baumann --- layout/generic/BlockReflowState.h | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'layout/generic/BlockReflowState.h') diff --git a/layout/generic/BlockReflowState.h b/layout/generic/BlockReflowState.h index 1dfaa4d9ad..6f05b6ab0a 100644 --- a/layout/generic/BlockReflowState.h +++ b/layout/generic/BlockReflowState.h @@ -41,16 +41,16 @@ class BlockReflowState { mCanHaveOverflowMarkers(false) {} // Set in the BlockReflowState constructor when reflowing a "block margin - // root" frame (i.e. a frame with any of the NS_BLOCK_BFC_STATE_BITS flag - // set, for which margins apply by default). + // root" frame (i.e. a frame with any of the NS_BLOCK_BFC flag set, for + // which margins apply by default). // // The flag is also set when reflowing a frame whose computed BStart border // padding is non-zero. bool mIsBStartMarginRoot : 1; // Set in the BlockReflowState constructor when reflowing a "block margin - // root" frame (i.e. a frame with any of the NS_BLOCK_BFC_STATE_BITS flag - // set, for which margins apply by default). + // root" frame (i.e. a frame with any of the NS_BLOCK_BFC flag set, for + // which margins apply by default). // // The flag is also set when reflowing a frame whose computed BEnd border // padding is non-zero. @@ -101,6 +101,13 @@ class BlockReflowState { const nscoord aEffectiveContentBoxBSize, const nscoord aInset = 0); + /** + * Unshifts coords, restores availableBSize to reality. + * (Constructor applies any cached shift before reflow + * so that frames are reflowed with cached shift) + */ + void UndoAlignContentShift(); + /** * Get the available reflow space (the area not occupied by floats) * for the current y coordinate. The available space is relative to @@ -407,6 +414,11 @@ class BlockReflowState { // continuations. const nscoord mConsumedBSize; + // The amount of block-axis alignment shift to assume during reflow. + // Cached between reflows in the AlignContentShift property. + // (This system optimizes reflow for not changing the shift.) + nscoord mAlignContentShift; + // Cache the current line's BSize if nsBlockFrame::PlaceLine() fails to // place the line. When redoing the line, it will be used to query the // accurate float available space in AddFloat() and -- cgit v1.2.3