summaryrefslogtreecommitdiffstats
path: root/layout/generic/nsBlockFrame.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
commitfbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 (patch)
tree4c1ccaf5486d4f2009f9a338a98a83e886e29c97 /layout/generic/nsBlockFrame.h
parentReleasing progress-linux version 124.0.1-1~progress7.99u1. (diff)
downloadfirefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.tar.xz
firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.zip
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'layout/generic/nsBlockFrame.h')
-rw-r--r--layout/generic/nsBlockFrame.h31
1 files changed, 30 insertions, 1 deletions
diff --git a/layout/generic/nsBlockFrame.h b/layout/generic/nsBlockFrame.h
index 15dd4c3278..9fb909430c 100644
--- a/layout/generic/nsBlockFrame.h
+++ b/layout/generic/nsBlockFrame.h
@@ -492,6 +492,14 @@ class nsBlockFrame : public nsContainerFrame {
BlockReflowState& aState, ReflowOutput& aMetrics);
/**
+ * Calculates the necessary shift to honor 'align-content' and applies it.
+ */
+ void AlignContent(BlockReflowState& aState, ReflowOutput& aMetrics,
+ nscoord aBEndEdgeOfChildren);
+ // Stash the effective align-content shift value between reflows
+ NS_DECLARE_FRAME_PROPERTY_SMALL_VALUE(AlignContentShift, nscoord)
+
+ /**
* Helper method for Reflow(). Computes the overflow areas created by our
* children, and includes them into aOverflowAreas.
*/
@@ -540,6 +548,16 @@ class nsBlockFrame : public nsContainerFrame {
*/
bool IsVisualFormControl(nsPresContext* aPresContext);
+ /** Whether this block has an effective align-content property */
+ bool IsAligned() const {
+ return StylePosition()->mAlignContent.primary !=
+ mozilla::StyleAlignFlags::NORMAL;
+ }
+
+ nscoord GetAlignContentShift() const {
+ return IsAligned() ? GetProperty(AlignContentShift()) : 0;
+ }
+
/**
* For text-wrap:balance, we iteratively try reflowing with adjusted inline
* size to find the "best" result (the tightest size that can be applied
@@ -849,12 +867,23 @@ class nsBlockFrame : public nsContainerFrame {
bool* aKeepReflowGoing);
/**
+ * Indicates if we need to compute a page name for the next page when pushing
+ * a truncated line.
+ *
+ * Using a value of No saves work when a new page name has already been set
+ * with nsCSSFrameConstructor::SetNextPageContentFramePageName.
+ */
+ enum class ComputeNewPageNameIfNeeded : uint8_t { Yes, No };
+
+ /**
* Push aLine (and any after it), since it cannot be placed on this
* page/column. Set aKeepReflowGoing to false and set
* flag aState.mReflowStatus as incomplete.
*/
void PushTruncatedLine(BlockReflowState& aState, LineIterator aLine,
- bool* aKeepReflowGoing);
+ bool* aKeepReflowGoing,
+ ComputeNewPageNameIfNeeded aComputeNewPageName =
+ ComputeNewPageNameIfNeeded::Yes);
void SplitLine(BlockReflowState& aState, nsLineLayout& aLineLayout,
LineIterator aLine, nsIFrame* aFrame,