summaryrefslogtreecommitdiffstats
path: root/layout/generic/nsIFrame.h
diff options
context:
space:
mode:
Diffstat (limited to 'layout/generic/nsIFrame.h')
-rw-r--r--layout/generic/nsIFrame.h31
1 files changed, 9 insertions, 22 deletions
diff --git a/layout/generic/nsIFrame.h b/layout/generic/nsIFrame.h
index ec3568483..57f5c460c 100644
--- a/layout/generic/nsIFrame.h
+++ b/layout/generic/nsIFrame.h
@@ -25,6 +25,7 @@
#include "CaretAssociationHint.h"
#include "FrameProperties.h"
+#include "LayoutConstants.h"
#include "mozilla/layout/FrameChildList.h"
#include "mozilla/Maybe.h"
#include "mozilla/WritingModes.h"
@@ -130,30 +131,12 @@ typedef uint32_t nsSplittableType;
#define NS_FRAME_IS_NOT_SPLITTABLE(type)\
(0 == ((type) & NS_FRAME_SPLITTABLE))
-#define NS_INTRINSIC_WIDTH_UNKNOWN nscoord_MIN
-
//----------------------------------------------------------------------
#define NS_SUBTREE_DIRTY(_frame) \
(((_frame)->GetStateBits() & \
(NS_FRAME_IS_DIRTY | NS_FRAME_HAS_DIRTY_CHILDREN)) != 0)
-/**
- * Constant used to indicate an unconstrained size.
- *
- * @see #Reflow()
- */
-#define NS_UNCONSTRAINEDSIZE NS_MAXSIZE
-
-#define NS_INTRINSICSIZE NS_UNCONSTRAINEDSIZE
-#define NS_AUTOHEIGHT NS_UNCONSTRAINEDSIZE
-// +1 is to avoid clamped huge margin values being processed as auto margins
-#define NS_AUTOMARGIN (NS_UNCONSTRAINEDSIZE + 1)
-#define NS_AUTOOFFSET NS_UNCONSTRAINEDSIZE
-// NOTE: there are assumptions all over that these have the same value, namely NS_UNCONSTRAINEDSIZE
-// if any are changed to be a value other than NS_UNCONSTRAINEDSIZE
-// at least update AdjustComputedHeight/Width and test ad nauseum
-
// 1 million CSS pixels less than our max app unit measure.
// For reflowing with an "infinite" available inline space per [css-sizing].
// (reflowing with an NS_UNCONSTRAINEDSIZE available inline size isn't allowed
@@ -2050,23 +2033,27 @@ public:
/**
* Return the horizontal components of padding, border, and margin
* that contribute to the intrinsic width that applies to the parent.
+ * @param aPercentageBasis the percentage basis to use for padding/margin -
+ * i.e. the Containing Block's inline-size
*/
struct IntrinsicISizeOffsetData {
nscoord hPadding, hBorder, hMargin;
- float hPctPadding, hPctMargin;
IntrinsicISizeOffsetData()
: hPadding(0), hBorder(0), hMargin(0)
- , hPctPadding(0.0f), hPctMargin(0.0f)
{}
};
- virtual IntrinsicISizeOffsetData IntrinsicISizeOffsets() = 0;
+ virtual IntrinsicISizeOffsetData
+ IntrinsicISizeOffsets(nscoord aPercentageBasis = NS_UNCONSTRAINEDSIZE) = 0;
/**
* Return the bsize components of padding, border, and margin
* that contribute to the intrinsic width that applies to the parent.
+ * @param aPercentageBasis the percentage basis to use for padding/margin -
+ * i.e. the Containing Block's inline-size
*/
- IntrinsicISizeOffsetData IntrinsicBSizeOffsets();
+ IntrinsicISizeOffsetData
+ IntrinsicBSizeOffsets(nscoord aPercentageBasis = NS_UNCONSTRAINEDSIZE);
virtual mozilla::IntrinsicSize GetIntrinsicSize() = 0;