From ac413c29fafb30ebb38877bf98b1bd2ac7e1aba7 Mon Sep 17 00:00:00 2001 From: troy Date: Fri, 22 May 1998 04:54:11 +0000 Subject: [PATCH] Changed splittable enum to be bit flags git-svn-id: svn://10.0.0.236/trunk@2167 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/base/public/nsIFrame.h | 51 ++++++++++++------- mozilla/layout/base/src/nsFrame.cpp | 4 +- mozilla/layout/base/src/nsFrame.h | 2 +- mozilla/layout/base/src/nsSplittableFrame.cpp | 4 +- mozilla/layout/base/src/nsSplittableFrame.h | 2 +- mozilla/layout/generic/nsBlockFrame.cpp | 4 +- mozilla/layout/generic/nsBlockFrame.h | 2 +- mozilla/layout/generic/nsBlockReflowState.cpp | 4 +- mozilla/layout/generic/nsBlockReflowState.h | 4 +- mozilla/layout/generic/nsIFrame.h | 51 ++++++++++++------- mozilla/layout/generic/nsInlineFrame.cpp | 6 +-- mozilla/layout/generic/nsLineLayout.cpp | 10 ++-- mozilla/layout/html/base/src/nsBlockFrame.cpp | 4 +- mozilla/layout/html/base/src/nsBlockFrame.h | 2 +- .../html/base/src/nsBlockReflowState.cpp | 4 +- .../layout/html/base/src/nsBlockReflowState.h | 4 +- .../layout/html/base/src/nsInlineFrame.cpp | 6 +-- mozilla/layout/html/base/src/nsLineLayout.cpp | 10 ++-- .../layout/html/table/src/nsTableFrame.cpp | 6 +-- .../html/table/src/nsTableOuterFrame.cpp | 6 +-- .../layout/html/table/src/nsTableRowFrame.cpp | 6 +-- .../html/table/src/nsTableRowGroupFrame.cpp | 6 +-- mozilla/layout/tables/nsTableFrame.cpp | 6 +-- mozilla/layout/tables/nsTableOuterFrame.cpp | 6 +-- mozilla/layout/tables/nsTableRowFrame.cpp | 6 +-- .../layout/tables/nsTableRowGroupFrame.cpp | 6 +-- 26 files changed, 128 insertions(+), 94 deletions(-) diff --git a/mozilla/layout/base/public/nsIFrame.h b/mozilla/layout/base/public/nsIFrame.h index 63eb0edace8..a3a2d1c4842 100644 --- a/mozilla/layout/base/public/nsIFrame.h +++ b/mozilla/layout/base/public/nsIFrame.h @@ -75,9 +75,14 @@ enum nsReflowReason { eReflowReason_Resize // general request to determine a desired size }; +/** + * Reflow state passed to a frame during reflow. + * + * @see #Reflow() + */ struct nsReflowState { nsReflowReason reason; // the reason for the reflow - nsReflowCommand& reflowCommand; // only used for incremental changes + // nsReflowCommand& reflowCommand; // only used for incremental changes nsSize maxSize; // the available space in which to reflow }; @@ -113,6 +118,33 @@ typedef PRUint32 nsReflowStatus; //---------------------------------------------------------------------- +/** + * Indication of how the frame can be split. This is used when doing runaround + * of floaters, and when pulling up child frames from a next-in-flow. + * + * The choices are splittable, not splittable at all, and splittable in + * a non-rectangular fashion. This last type only applies to block-level + * elements, and indicates whether splitting can be used when doing runaround. + * If you can split across page boundaries, but you expect each continuing + * frame to be the same width then return frSplittable and not + * frSplittableNonRectangular. + * + * @see #IsSplittable() + */ +typedef PRUint32 nsSplittableType; + +#define NS_FRAME_NOT_SPLITTABLE 0 // Note: not a bit! +#define NS_FRAME_SPLITTABLE 0x1 +#define NS_FRAME_SPLITTABLE_NON_RECTANGULAR 0x3 + +#define NS_FRAME_IS_SPLITTABLE(type)\ + (0 != ((type) & NS_FRAME_SPLITTABLE)) + +#define NS_FRAME_IS_NOT_SPLITTABLE(type)\ + (0 == ((type) & NS_FRAME_SPLITTABLE)) + +//---------------------------------------------------------------------- + /** * Frame state bits. Any bits not listed here are reserved for future * extensions, but must be stored by the frames. @@ -445,25 +477,10 @@ public: NS_IMETHOD GetReflowMetrics(nsIPresContext* aPresContext, nsReflowMetrics& aMetrics) = 0; - /** - * Indication of how the frame can be split. This is used when doing runaround - * of floaters, and when pulling up child frames from a next-in-flow. - * - * The choices are splittable, not splittable at all, and splittable in - * a non-rectangular fashion. This last type only applies to block-level - * elements, and indicates whether splitting can be used when doing runaround. - * If you can split across page boundaries, but you expect each continuing - * frame to be the same width then return frSplittable and not - * frSplittableNonRectangular. - * - * @see #IsSplittable() - */ - enum SplittableType {NotSplittable = 0, Splittable = 1, SplittableNonRectangular = 3}; - /** * Return how your frame can be split. */ - NS_IMETHOD IsSplittable(SplittableType& aIsSplittable) const = 0; + NS_IMETHOD IsSplittable(nsSplittableType& aIsSplittable) const = 0; /** * Flow member functions. CreateContinuingFrame() is responsible for diff --git a/mozilla/layout/base/src/nsFrame.cpp b/mozilla/layout/base/src/nsFrame.cpp index e6d920699ee..65518e370a5 100644 --- a/mozilla/layout/base/src/nsFrame.cpp +++ b/mozilla/layout/base/src/nsFrame.cpp @@ -1120,9 +1120,9 @@ NS_METHOD nsFrame::GetReflowMetrics(nsIPresContext* aPresContext, // Flow member functions -NS_METHOD nsFrame::IsSplittable(SplittableType& aIsSplittable) const +NS_METHOD nsFrame::IsSplittable(nsSplittableType& aIsSplittable) const { - aIsSplittable = NotSplittable; + aIsSplittable = NS_FRAME_NOT_SPLITTABLE; return NS_OK; } diff --git a/mozilla/layout/base/src/nsFrame.h b/mozilla/layout/base/src/nsFrame.h index 5cf2600cf9a..1cfc4f885fe 100644 --- a/mozilla/layout/base/src/nsFrame.h +++ b/mozilla/layout/base/src/nsFrame.h @@ -178,7 +178,7 @@ public: nsReflowMetrics& aMetrics); // Flow member functions - NS_IMETHOD IsSplittable(SplittableType& aIsSplittable) const; + NS_IMETHOD IsSplittable(nsSplittableType& aIsSplittable) const; NS_IMETHOD CreateContinuingFrame(nsIPresContext* aPresContext, nsIFrame* aParent, nsIStyleContext* aStyleContext, diff --git a/mozilla/layout/base/src/nsSplittableFrame.cpp b/mozilla/layout/base/src/nsSplittableFrame.cpp index 2bb08618c60..1517338734f 100644 --- a/mozilla/layout/base/src/nsSplittableFrame.cpp +++ b/mozilla/layout/base/src/nsSplittableFrame.cpp @@ -34,9 +34,9 @@ nsSplittableFrame::~nsSplittableFrame() // Flow member functions -NS_METHOD nsSplittableFrame::IsSplittable(SplittableType& aIsSplittable) const +NS_METHOD nsSplittableFrame::IsSplittable(nsSplittableType& aIsSplittable) const { - aIsSplittable = Splittable; + aIsSplittable = NS_FRAME_SPLITTABLE; return NS_OK; } diff --git a/mozilla/layout/base/src/nsSplittableFrame.h b/mozilla/layout/base/src/nsSplittableFrame.h index 13cbe0dda3a..358b21114c0 100644 --- a/mozilla/layout/base/src/nsSplittableFrame.h +++ b/mozilla/layout/base/src/nsSplittableFrame.h @@ -26,7 +26,7 @@ class nsSplittableFrame : public nsFrame public: // CreateContinuingFrame() does the default behavior of using the // content delegate to create a new frame - NS_IMETHOD IsSplittable(SplittableType& aIsSplittable) const; + NS_IMETHOD IsSplittable(nsSplittableType& aIsSplittable) const; NS_IMETHOD CreateContinuingFrame(nsIPresContext* aPresContext, nsIFrame* aParent, nsIStyleContext* aStyleContext, diff --git a/mozilla/layout/generic/nsBlockFrame.cpp b/mozilla/layout/generic/nsBlockFrame.cpp index d7659f09221..1b358fe9345 100644 --- a/mozilla/layout/generic/nsBlockFrame.cpp +++ b/mozilla/layout/generic/nsBlockFrame.cpp @@ -243,9 +243,9 @@ nsBlockFrame::QueryInterface(const nsIID& aIID, void** aInstancePtr) } NS_METHOD -nsBlockFrame::IsSplittable(SplittableType& aIsSplittable) const +nsBlockFrame::IsSplittable(nsSplittableType& aIsSplittable) const { - aIsSplittable = SplittableNonRectangular; + aIsSplittable = NS_FRAME_SPLITTABLE_NON_RECTANGULAR; return NS_OK; } diff --git a/mozilla/layout/generic/nsBlockFrame.h b/mozilla/layout/generic/nsBlockFrame.h index 9e377e48302..05ab0cd05e0 100644 --- a/mozilla/layout/generic/nsBlockFrame.h +++ b/mozilla/layout/generic/nsBlockFrame.h @@ -179,7 +179,7 @@ public: PRInt32 aIndexInParent); NS_IMETHOD GetReflowMetrics(nsIPresContext* aPresContext, nsReflowMetrics& aMetrics); - NS_IMETHOD IsSplittable(SplittableType& aIsSplittable) const; + NS_IMETHOD IsSplittable(nsSplittableType& aIsSplittable) const; NS_IMETHOD CreateContinuingFrame(nsIPresContext* aPresContext, nsIFrame* aParent, nsIStyleContext* aStyleContext, diff --git a/mozilla/layout/generic/nsBlockReflowState.cpp b/mozilla/layout/generic/nsBlockReflowState.cpp index d7659f09221..1b358fe9345 100644 --- a/mozilla/layout/generic/nsBlockReflowState.cpp +++ b/mozilla/layout/generic/nsBlockReflowState.cpp @@ -243,9 +243,9 @@ nsBlockFrame::QueryInterface(const nsIID& aIID, void** aInstancePtr) } NS_METHOD -nsBlockFrame::IsSplittable(SplittableType& aIsSplittable) const +nsBlockFrame::IsSplittable(nsSplittableType& aIsSplittable) const { - aIsSplittable = SplittableNonRectangular; + aIsSplittable = NS_FRAME_SPLITTABLE_NON_RECTANGULAR; return NS_OK; } diff --git a/mozilla/layout/generic/nsBlockReflowState.h b/mozilla/layout/generic/nsBlockReflowState.h index d7659f09221..1b358fe9345 100644 --- a/mozilla/layout/generic/nsBlockReflowState.h +++ b/mozilla/layout/generic/nsBlockReflowState.h @@ -243,9 +243,9 @@ nsBlockFrame::QueryInterface(const nsIID& aIID, void** aInstancePtr) } NS_METHOD -nsBlockFrame::IsSplittable(SplittableType& aIsSplittable) const +nsBlockFrame::IsSplittable(nsSplittableType& aIsSplittable) const { - aIsSplittable = SplittableNonRectangular; + aIsSplittable = NS_FRAME_SPLITTABLE_NON_RECTANGULAR; return NS_OK; } diff --git a/mozilla/layout/generic/nsIFrame.h b/mozilla/layout/generic/nsIFrame.h index 63eb0edace8..a3a2d1c4842 100644 --- a/mozilla/layout/generic/nsIFrame.h +++ b/mozilla/layout/generic/nsIFrame.h @@ -75,9 +75,14 @@ enum nsReflowReason { eReflowReason_Resize // general request to determine a desired size }; +/** + * Reflow state passed to a frame during reflow. + * + * @see #Reflow() + */ struct nsReflowState { nsReflowReason reason; // the reason for the reflow - nsReflowCommand& reflowCommand; // only used for incremental changes + // nsReflowCommand& reflowCommand; // only used for incremental changes nsSize maxSize; // the available space in which to reflow }; @@ -113,6 +118,33 @@ typedef PRUint32 nsReflowStatus; //---------------------------------------------------------------------- +/** + * Indication of how the frame can be split. This is used when doing runaround + * of floaters, and when pulling up child frames from a next-in-flow. + * + * The choices are splittable, not splittable at all, and splittable in + * a non-rectangular fashion. This last type only applies to block-level + * elements, and indicates whether splitting can be used when doing runaround. + * If you can split across page boundaries, but you expect each continuing + * frame to be the same width then return frSplittable and not + * frSplittableNonRectangular. + * + * @see #IsSplittable() + */ +typedef PRUint32 nsSplittableType; + +#define NS_FRAME_NOT_SPLITTABLE 0 // Note: not a bit! +#define NS_FRAME_SPLITTABLE 0x1 +#define NS_FRAME_SPLITTABLE_NON_RECTANGULAR 0x3 + +#define NS_FRAME_IS_SPLITTABLE(type)\ + (0 != ((type) & NS_FRAME_SPLITTABLE)) + +#define NS_FRAME_IS_NOT_SPLITTABLE(type)\ + (0 == ((type) & NS_FRAME_SPLITTABLE)) + +//---------------------------------------------------------------------- + /** * Frame state bits. Any bits not listed here are reserved for future * extensions, but must be stored by the frames. @@ -445,25 +477,10 @@ public: NS_IMETHOD GetReflowMetrics(nsIPresContext* aPresContext, nsReflowMetrics& aMetrics) = 0; - /** - * Indication of how the frame can be split. This is used when doing runaround - * of floaters, and when pulling up child frames from a next-in-flow. - * - * The choices are splittable, not splittable at all, and splittable in - * a non-rectangular fashion. This last type only applies to block-level - * elements, and indicates whether splitting can be used when doing runaround. - * If you can split across page boundaries, but you expect each continuing - * frame to be the same width then return frSplittable and not - * frSplittableNonRectangular. - * - * @see #IsSplittable() - */ - enum SplittableType {NotSplittable = 0, Splittable = 1, SplittableNonRectangular = 3}; - /** * Return how your frame can be split. */ - NS_IMETHOD IsSplittable(SplittableType& aIsSplittable) const = 0; + NS_IMETHOD IsSplittable(nsSplittableType& aIsSplittable) const = 0; /** * Flow member functions. CreateContinuingFrame() is responsible for diff --git a/mozilla/layout/generic/nsInlineFrame.cpp b/mozilla/layout/generic/nsInlineFrame.cpp index 9657529484f..40e86309b40 100644 --- a/mozilla/layout/generic/nsInlineFrame.cpp +++ b/mozilla/layout/generic/nsInlineFrame.cpp @@ -388,13 +388,13 @@ PRBool nsInlineFrame::PullUpChildren(nsIPresContext* aPresContext, // See if the child fits in the available space. If it fits or // it's splittable then reflow it. The reason we can't just move // it is that we still need ascent/descent information - nsSize kidFrameSize; - SplittableType kidIsSplittable; + nsSize kidFrameSize; + nsSplittableType kidIsSplittable; kidFrame->GetSize(kidFrameSize); kidFrame->IsSplittable(kidIsSplittable); if ((kidFrameSize.width > aState.availSize.width) && - (kidIsSplittable == NotSplittable)) { + NS_FRAME_IS_NOT_SPLITTABLE(kidIsSplittable)) { result = PR_FALSE; mLastContentIsComplete = prevLastContentIsComplete; break; diff --git a/mozilla/layout/generic/nsLineLayout.cpp b/mozilla/layout/generic/nsLineLayout.cpp index e3b6642ba3d..cf896fcdb74 100644 --- a/mozilla/layout/generic/nsLineLayout.cpp +++ b/mozilla/layout/generic/nsLineLayout.cpp @@ -374,11 +374,11 @@ nsLineLayout::ReflowMappedChild() // If we need the max-element size and we are splittable then we // have to reflow to get it. - nsIFrame::SplittableType splits; + nsSplittableType splits; mKidFrame->IsSplittable(splits); #if 0 if (nsnull != mMaxElementSizePointer) { - if (nsIFrame::NotSplittable != splits) { + if (NS_FRAME_IS_SPLITTABLE(splits)) { NS_FRAME_LOG(NS_FRAME_TRACE_CHILD_REFLOW, ("nsLineLayout::ReflowMappedChild: need max-element-size")); return ReflowChild(nsnull); @@ -390,7 +390,7 @@ nsLineLayout::ReflowMappedChild() // here to properly handle reflow avoidance. To do that properly we // really need a first-rate protocol here (WillPlace? // CanAvoidReflow?) that gets the frame involved. - if (nsIFrame::NotSplittable != splits) { + if (NS_FRAME_IS_SPLITTABLE(splits)) { NS_FRAME_LOG(NS_FRAME_TRACE_CHILD_REFLOW, ("nsLineLayout::ReflowMappedChild: splittable hack")); return ReflowChild(nsnull); @@ -413,7 +413,7 @@ nsLineLayout::ReflowMappedChild() return ReflowChild(nsnull); } - if (nsIFrame::NotSplittable != splits) { + if (NS_FRAME_IS_SPLITTABLE(splits)) { // XXX a next-in-flow propogated dirty-bit eliminates this code // The splittable frame has not yet been reflowed. This means @@ -530,7 +530,7 @@ nsLineLayout::ReflowMappedChild() // The child doesn't fit as is; if it's splittable then reflow it // otherwise return break-before status so that the non-splittable // child is pushed to the next line. - if (nsIFrame::NotSplittable != splits) { + if (NS_FRAME_IS_SPLITTABLE(splits)) { NS_FRAME_LOG(NS_FRAME_TRACE_CHILD_REFLOW, ("nsLineLayout::ReflowMappedChild: can't directly fit")); return ReflowChild(nsnull); diff --git a/mozilla/layout/html/base/src/nsBlockFrame.cpp b/mozilla/layout/html/base/src/nsBlockFrame.cpp index d7659f09221..1b358fe9345 100644 --- a/mozilla/layout/html/base/src/nsBlockFrame.cpp +++ b/mozilla/layout/html/base/src/nsBlockFrame.cpp @@ -243,9 +243,9 @@ nsBlockFrame::QueryInterface(const nsIID& aIID, void** aInstancePtr) } NS_METHOD -nsBlockFrame::IsSplittable(SplittableType& aIsSplittable) const +nsBlockFrame::IsSplittable(nsSplittableType& aIsSplittable) const { - aIsSplittable = SplittableNonRectangular; + aIsSplittable = NS_FRAME_SPLITTABLE_NON_RECTANGULAR; return NS_OK; } diff --git a/mozilla/layout/html/base/src/nsBlockFrame.h b/mozilla/layout/html/base/src/nsBlockFrame.h index 9e377e48302..05ab0cd05e0 100644 --- a/mozilla/layout/html/base/src/nsBlockFrame.h +++ b/mozilla/layout/html/base/src/nsBlockFrame.h @@ -179,7 +179,7 @@ public: PRInt32 aIndexInParent); NS_IMETHOD GetReflowMetrics(nsIPresContext* aPresContext, nsReflowMetrics& aMetrics); - NS_IMETHOD IsSplittable(SplittableType& aIsSplittable) const; + NS_IMETHOD IsSplittable(nsSplittableType& aIsSplittable) const; NS_IMETHOD CreateContinuingFrame(nsIPresContext* aPresContext, nsIFrame* aParent, nsIStyleContext* aStyleContext, diff --git a/mozilla/layout/html/base/src/nsBlockReflowState.cpp b/mozilla/layout/html/base/src/nsBlockReflowState.cpp index d7659f09221..1b358fe9345 100644 --- a/mozilla/layout/html/base/src/nsBlockReflowState.cpp +++ b/mozilla/layout/html/base/src/nsBlockReflowState.cpp @@ -243,9 +243,9 @@ nsBlockFrame::QueryInterface(const nsIID& aIID, void** aInstancePtr) } NS_METHOD -nsBlockFrame::IsSplittable(SplittableType& aIsSplittable) const +nsBlockFrame::IsSplittable(nsSplittableType& aIsSplittable) const { - aIsSplittable = SplittableNonRectangular; + aIsSplittable = NS_FRAME_SPLITTABLE_NON_RECTANGULAR; return NS_OK; } diff --git a/mozilla/layout/html/base/src/nsBlockReflowState.h b/mozilla/layout/html/base/src/nsBlockReflowState.h index d7659f09221..1b358fe9345 100644 --- a/mozilla/layout/html/base/src/nsBlockReflowState.h +++ b/mozilla/layout/html/base/src/nsBlockReflowState.h @@ -243,9 +243,9 @@ nsBlockFrame::QueryInterface(const nsIID& aIID, void** aInstancePtr) } NS_METHOD -nsBlockFrame::IsSplittable(SplittableType& aIsSplittable) const +nsBlockFrame::IsSplittable(nsSplittableType& aIsSplittable) const { - aIsSplittable = SplittableNonRectangular; + aIsSplittable = NS_FRAME_SPLITTABLE_NON_RECTANGULAR; return NS_OK; } diff --git a/mozilla/layout/html/base/src/nsInlineFrame.cpp b/mozilla/layout/html/base/src/nsInlineFrame.cpp index 9657529484f..40e86309b40 100644 --- a/mozilla/layout/html/base/src/nsInlineFrame.cpp +++ b/mozilla/layout/html/base/src/nsInlineFrame.cpp @@ -388,13 +388,13 @@ PRBool nsInlineFrame::PullUpChildren(nsIPresContext* aPresContext, // See if the child fits in the available space. If it fits or // it's splittable then reflow it. The reason we can't just move // it is that we still need ascent/descent information - nsSize kidFrameSize; - SplittableType kidIsSplittable; + nsSize kidFrameSize; + nsSplittableType kidIsSplittable; kidFrame->GetSize(kidFrameSize); kidFrame->IsSplittable(kidIsSplittable); if ((kidFrameSize.width > aState.availSize.width) && - (kidIsSplittable == NotSplittable)) { + NS_FRAME_IS_NOT_SPLITTABLE(kidIsSplittable)) { result = PR_FALSE; mLastContentIsComplete = prevLastContentIsComplete; break; diff --git a/mozilla/layout/html/base/src/nsLineLayout.cpp b/mozilla/layout/html/base/src/nsLineLayout.cpp index e3b6642ba3d..cf896fcdb74 100644 --- a/mozilla/layout/html/base/src/nsLineLayout.cpp +++ b/mozilla/layout/html/base/src/nsLineLayout.cpp @@ -374,11 +374,11 @@ nsLineLayout::ReflowMappedChild() // If we need the max-element size and we are splittable then we // have to reflow to get it. - nsIFrame::SplittableType splits; + nsSplittableType splits; mKidFrame->IsSplittable(splits); #if 0 if (nsnull != mMaxElementSizePointer) { - if (nsIFrame::NotSplittable != splits) { + if (NS_FRAME_IS_SPLITTABLE(splits)) { NS_FRAME_LOG(NS_FRAME_TRACE_CHILD_REFLOW, ("nsLineLayout::ReflowMappedChild: need max-element-size")); return ReflowChild(nsnull); @@ -390,7 +390,7 @@ nsLineLayout::ReflowMappedChild() // here to properly handle reflow avoidance. To do that properly we // really need a first-rate protocol here (WillPlace? // CanAvoidReflow?) that gets the frame involved. - if (nsIFrame::NotSplittable != splits) { + if (NS_FRAME_IS_SPLITTABLE(splits)) { NS_FRAME_LOG(NS_FRAME_TRACE_CHILD_REFLOW, ("nsLineLayout::ReflowMappedChild: splittable hack")); return ReflowChild(nsnull); @@ -413,7 +413,7 @@ nsLineLayout::ReflowMappedChild() return ReflowChild(nsnull); } - if (nsIFrame::NotSplittable != splits) { + if (NS_FRAME_IS_SPLITTABLE(splits)) { // XXX a next-in-flow propogated dirty-bit eliminates this code // The splittable frame has not yet been reflowed. This means @@ -530,7 +530,7 @@ nsLineLayout::ReflowMappedChild() // The child doesn't fit as is; if it's splittable then reflow it // otherwise return break-before status so that the non-splittable // child is pushed to the next line. - if (nsIFrame::NotSplittable != splits) { + if (NS_FRAME_IS_SPLITTABLE(splits)) { NS_FRAME_LOG(NS_FRAME_TRACE_CHILD_REFLOW, ("nsLineLayout::ReflowMappedChild: can't directly fit")); return ReflowChild(nsnull); diff --git a/mozilla/layout/html/table/src/nsTableFrame.cpp b/mozilla/layout/html/table/src/nsTableFrame.cpp index 8b0127c2ce2..a25997395f6 100644 --- a/mozilla/layout/html/table/src/nsTableFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableFrame.cpp @@ -1219,13 +1219,13 @@ PRBool nsTableFrame::PullUpChildren(nsIPresContext* aPresContext, // See if the child fits in the available space. If it fits or // it's splittable then reflow it. The reason we can't just move // it is that we still need ascent/descent information - nsSize kidFrameSize; - SplittableType kidIsSplittable; + nsSize kidFrameSize; + nsSplittableType kidIsSplittable; kidFrame->GetSize(kidFrameSize); kidFrame->IsSplittable(kidIsSplittable); if ((kidFrameSize.height > aState.availSize.height) && - (kidIsSplittable == NotSplittable)) { + NS_FRAME_IS_NOT_SPLITTABLE(kidIsSplittable)) { result = PR_FALSE; mLastContentIsComplete = prevLastContentIsComplete; break; diff --git a/mozilla/layout/html/table/src/nsTableOuterFrame.cpp b/mozilla/layout/html/table/src/nsTableOuterFrame.cpp index 49719bf7320..92ba16f4d17 100644 --- a/mozilla/layout/html/table/src/nsTableOuterFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableOuterFrame.cpp @@ -688,14 +688,14 @@ PRBool nsTableOuterFrame::PullUpChildren( nsIPresContext* aPresContext, // See if the child fits in the available space. If it fits or // it's splittable then reflow it. The reason we can't just move // it is that we still need ascent/descent information - nsSize kidFrameSize; - SplittableType kidIsSplittable; + nsSize kidFrameSize; + nsSplittableType kidIsSplittable; kidFrame->GetSize(kidFrameSize); kidFrame->IsSplittable(kidIsSplittable); if ((kidFrameSize.width > aState.availSize.height) && - (kidIsSplittable == NotSplittable)) { + NS_FRAME_IS_NOT_SPLITTABLE(kidIsSplittable)) { result = PR_FALSE; mLastContentIsComplete = prevLastContentIsComplete; break; diff --git a/mozilla/layout/html/table/src/nsTableRowFrame.cpp b/mozilla/layout/html/table/src/nsTableRowFrame.cpp index 731c11c7b72..8ba54efa710 100644 --- a/mozilla/layout/html/table/src/nsTableRowFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableRowFrame.cpp @@ -604,14 +604,14 @@ PRBool nsTableRowFrame::PullUpChildren(nsIPresContext* aPresContext, // See if the child fits in the available space. If it fits or // it's splittable then reflow it. The reason we can't just move // it is that we still need ascent/descent information - nsSize kidFrameSize; - SplittableType kidIsSplittable; + nsSize kidFrameSize; + nsSplittableType kidIsSplittable; kidFrame->GetSize(kidFrameSize); kidFrame->IsSplittable(kidIsSplittable); if ((kidFrameSize.height > aState.availSize.height) && - (kidIsSplittable == NotSplittable)) { + NS_FRAME_IS_NOT_SPLITTABLE(kidIsSplittable)) { result = PR_FALSE; mLastContentIsComplete = prevLastContentIsComplete; break; diff --git a/mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp b/mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp index 80e229a19d1..227829b1ec6 100644 --- a/mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp @@ -519,13 +519,13 @@ PRBool nsTableRowGroupFrame::PullUpChildren(nsIPresContext* aPresContext, // See if the child fits in the available space. If it fits or // it's splittable then reflow it. The reason we can't just move // it is that we still need ascent/descent information - nsSize kidFrameSize; - SplittableType kidIsSplittable; + nsSize kidFrameSize; + nsSplittableType kidIsSplittable; kidFrame->GetSize(kidFrameSize); kidFrame->IsSplittable(kidIsSplittable); if ((kidFrameSize.height > aState.availSize.height) && - (kidIsSplittable == NotSplittable)) { + NS_FRAME_IS_NOT_SPLITTABLE(kidIsSplittable)) { result = PR_FALSE; mLastContentIsComplete = prevLastContentIsComplete; break; diff --git a/mozilla/layout/tables/nsTableFrame.cpp b/mozilla/layout/tables/nsTableFrame.cpp index 8b0127c2ce2..a25997395f6 100644 --- a/mozilla/layout/tables/nsTableFrame.cpp +++ b/mozilla/layout/tables/nsTableFrame.cpp @@ -1219,13 +1219,13 @@ PRBool nsTableFrame::PullUpChildren(nsIPresContext* aPresContext, // See if the child fits in the available space. If it fits or // it's splittable then reflow it. The reason we can't just move // it is that we still need ascent/descent information - nsSize kidFrameSize; - SplittableType kidIsSplittable; + nsSize kidFrameSize; + nsSplittableType kidIsSplittable; kidFrame->GetSize(kidFrameSize); kidFrame->IsSplittable(kidIsSplittable); if ((kidFrameSize.height > aState.availSize.height) && - (kidIsSplittable == NotSplittable)) { + NS_FRAME_IS_NOT_SPLITTABLE(kidIsSplittable)) { result = PR_FALSE; mLastContentIsComplete = prevLastContentIsComplete; break; diff --git a/mozilla/layout/tables/nsTableOuterFrame.cpp b/mozilla/layout/tables/nsTableOuterFrame.cpp index 49719bf7320..92ba16f4d17 100644 --- a/mozilla/layout/tables/nsTableOuterFrame.cpp +++ b/mozilla/layout/tables/nsTableOuterFrame.cpp @@ -688,14 +688,14 @@ PRBool nsTableOuterFrame::PullUpChildren( nsIPresContext* aPresContext, // See if the child fits in the available space. If it fits or // it's splittable then reflow it. The reason we can't just move // it is that we still need ascent/descent information - nsSize kidFrameSize; - SplittableType kidIsSplittable; + nsSize kidFrameSize; + nsSplittableType kidIsSplittable; kidFrame->GetSize(kidFrameSize); kidFrame->IsSplittable(kidIsSplittable); if ((kidFrameSize.width > aState.availSize.height) && - (kidIsSplittable == NotSplittable)) { + NS_FRAME_IS_NOT_SPLITTABLE(kidIsSplittable)) { result = PR_FALSE; mLastContentIsComplete = prevLastContentIsComplete; break; diff --git a/mozilla/layout/tables/nsTableRowFrame.cpp b/mozilla/layout/tables/nsTableRowFrame.cpp index 731c11c7b72..8ba54efa710 100644 --- a/mozilla/layout/tables/nsTableRowFrame.cpp +++ b/mozilla/layout/tables/nsTableRowFrame.cpp @@ -604,14 +604,14 @@ PRBool nsTableRowFrame::PullUpChildren(nsIPresContext* aPresContext, // See if the child fits in the available space. If it fits or // it's splittable then reflow it. The reason we can't just move // it is that we still need ascent/descent information - nsSize kidFrameSize; - SplittableType kidIsSplittable; + nsSize kidFrameSize; + nsSplittableType kidIsSplittable; kidFrame->GetSize(kidFrameSize); kidFrame->IsSplittable(kidIsSplittable); if ((kidFrameSize.height > aState.availSize.height) && - (kidIsSplittable == NotSplittable)) { + NS_FRAME_IS_NOT_SPLITTABLE(kidIsSplittable)) { result = PR_FALSE; mLastContentIsComplete = prevLastContentIsComplete; break; diff --git a/mozilla/layout/tables/nsTableRowGroupFrame.cpp b/mozilla/layout/tables/nsTableRowGroupFrame.cpp index 80e229a19d1..227829b1ec6 100644 --- a/mozilla/layout/tables/nsTableRowGroupFrame.cpp +++ b/mozilla/layout/tables/nsTableRowGroupFrame.cpp @@ -519,13 +519,13 @@ PRBool nsTableRowGroupFrame::PullUpChildren(nsIPresContext* aPresContext, // See if the child fits in the available space. If it fits or // it's splittable then reflow it. The reason we can't just move // it is that we still need ascent/descent information - nsSize kidFrameSize; - SplittableType kidIsSplittable; + nsSize kidFrameSize; + nsSplittableType kidIsSplittable; kidFrame->GetSize(kidFrameSize); kidFrame->IsSplittable(kidIsSplittable); if ((kidFrameSize.height > aState.availSize.height) && - (kidIsSplittable == NotSplittable)) { + NS_FRAME_IS_NOT_SPLITTABLE(kidIsSplittable)) { result = PR_FALSE; mLastContentIsComplete = prevLastContentIsComplete; break;