From 82b3daf6c8909f63ccfce85435c2371f3ebb278a Mon Sep 17 00:00:00 2001 From: Mats Palmgren Date: Mon, 16 Nov 2015 17:32:39 +0100 Subject: [PATCH] Bug 1223282 - Make NS_AUTOMARGIN be a different value than NS_UNCONSTRAINEDSIZE to avoid having clamped huge margin values be interpreted as auto margins. r=roc --- layout/generic/nsIFrame.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/layout/generic/nsIFrame.h b/layout/generic/nsIFrame.h index 3ccd1fdd1719..2f7e5f480015 100644 --- a/layout/generic/nsIFrame.h +++ b/layout/generic/nsIFrame.h @@ -143,7 +143,8 @@ typedef uint32_t nsSplittableType; #define NS_INTRINSICSIZE NS_UNCONSTRAINEDSIZE #define NS_AUTOHEIGHT NS_UNCONSTRAINEDSIZE -#define NS_AUTOMARGIN 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