diff --git a/mozilla/layout/generic/nsFrame.cpp b/mozilla/layout/generic/nsFrame.cpp index c90f436e76e..a50cbdd7021 100644 --- a/mozilla/layout/generic/nsFrame.cpp +++ b/mozilla/layout/generic/nsFrame.cpp @@ -4230,8 +4230,7 @@ nsFrame::ConsiderChildOverflow(nsPresContext* aPresContext, const nsStyleDisplay* disp = GetStyleDisplay(); // check here also for hidden as table frames (table, tr and td) currently // don't wrap their content into a scrollable frame if overflow is specified - if (NS_STYLE_OVERFLOW_CLIP != disp->mOverflow && - NS_STYLE_OVERFLOW_HIDDEN != disp->mOverflow) { + if (!disp->IsTableClip()) { nsRect* overflowArea = aChildFrame->GetOverflowAreaProperty(); if (overflowArea) { nsRect childOverflow(*overflowArea); diff --git a/mozilla/layout/html/base/src/nsFrame.cpp b/mozilla/layout/html/base/src/nsFrame.cpp index c90f436e76e..a50cbdd7021 100644 --- a/mozilla/layout/html/base/src/nsFrame.cpp +++ b/mozilla/layout/html/base/src/nsFrame.cpp @@ -4230,8 +4230,7 @@ nsFrame::ConsiderChildOverflow(nsPresContext* aPresContext, const nsStyleDisplay* disp = GetStyleDisplay(); // check here also for hidden as table frames (table, tr and td) currently // don't wrap their content into a scrollable frame if overflow is specified - if (NS_STYLE_OVERFLOW_CLIP != disp->mOverflow && - NS_STYLE_OVERFLOW_HIDDEN != disp->mOverflow) { + if (!disp->IsTableClip()) { nsRect* overflowArea = aChildFrame->GetOverflowAreaProperty(); if (overflowArea) { nsRect childOverflow(*overflowArea); diff --git a/mozilla/layout/html/table/src/nsTableCellFrame.cpp b/mozilla/layout/html/table/src/nsTableCellFrame.cpp index ac7935562a4..2fa0bda07d8 100644 --- a/mozilla/layout/html/table/src/nsTableCellFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableCellFrame.cpp @@ -431,10 +431,9 @@ nsTableCellFrame::Paint(nsPresContext* aPresContext, nsClipCombine_kIntersect); } else { - if (NS_STYLE_OVERFLOW_CLIP == disp->mOverflow || - // XXXldb HIDDEN should really create a scrollframe, - // but test here since it doesn't. - NS_STYLE_OVERFLOW_HIDDEN == disp->mOverflow || + // XXXldb HIDDEN should really create a scrollframe, + // but use |IsTableClip| here since it doesn't. + if (disp->IsTableClip() || HasPctOverHeight()) { aRenderingContext.PushState(); pushed = PR_TRUE; diff --git a/mozilla/layout/html/table/src/nsTableFrame.cpp b/mozilla/layout/html/table/src/nsTableFrame.cpp index 30f62771755..0379709c605 100644 --- a/mozilla/layout/html/table/src/nsTableFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableFrame.cpp @@ -1360,11 +1360,8 @@ nsTableFrame::PaintChildren(nsPresContext* aPresContext, const nsRect& aDirtyRect, nsFramePaintLayer aWhichLayer, PRUint32 aFlags) - { - PRUint8 overflow = GetStyleDisplay()->mOverflow; - PRBool clip = overflow == NS_STYLE_OVERFLOW_CLIP || - overflow == NS_STYLE_OVERFLOW_HIDDEN; + PRBool clip = GetStyleDisplay()->IsTableClip(); // If overflow is hidden then set the clip rect so that children don't // leak out of us. Note that because overflow'-clip' only applies to // the content area we do this after painting the border and background @@ -2076,7 +2073,7 @@ NS_METHOD nsTableFrame::Reflow(nsPresContext* aPresContext, if (aDesiredSize.mFlags & NS_REFLOW_CALC_MAX_WIDTH) { aDesiredSize.mMaximumWidth = GetPreferredWidth(); } - if (NS_STYLE_OVERFLOW_CLIP != aReflowState.mStyleDisplay->mOverflow) { + if (!aReflowState.mStyleDisplay->IsTableClip()) { // collapsed border may leak out nsMargin bcMargin = GetBCMargin(aPresContext); nsRect tableRect(0, 0, aDesiredSize.width, aDesiredSize.height) ; diff --git a/mozilla/layout/html/table/src/nsTableOuterFrame.cpp b/mozilla/layout/html/table/src/nsTableOuterFrame.cpp index 1b9c4ea77b8..6fcaf937069 100644 --- a/mozilla/layout/html/table/src/nsTableOuterFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableOuterFrame.cpp @@ -333,9 +333,7 @@ nsTableOuterFrame::Paint(nsPresContext* aPresContext, // If overflow is hidden then set the clip rect so that children // don't leak out of us - PRUint8 overflow = GetStyleDisplay()->mOverflow; - PRBool clip = overflow == NS_STYLE_OVERFLOW_CLIP || - overflow == NS_STYLE_OVERFLOW_HIDDEN; + PRBool clip = GetStyleDisplay()->IsTableClip(); if (clip) { aRenderingContext.PushState(); SetOverflowClipRect(aRenderingContext); diff --git a/mozilla/layout/html/table/src/nsTableRowFrame.cpp b/mozilla/layout/html/table/src/nsTableRowFrame.cpp index 5d6f3979ea4..38fc27e42ff 100644 --- a/mozilla/layout/html/table/src/nsTableRowFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableRowFrame.cpp @@ -555,9 +555,7 @@ NS_METHOD nsTableRowFrame::Paint(nsPresContext* aPresContext, aFlags |= NS_PAINT_FLAG_TABLE_BG_PAINT; } - PRUint8 overflow = GetStyleDisplay()->mOverflow; - PRBool clip = overflow == NS_STYLE_OVERFLOW_CLIP || - overflow == NS_STYLE_OVERFLOW_HIDDEN; + PRBool clip = GetStyleDisplay()->IsTableClip(); if (clip) { aRenderingContext.PushState(); SetOverflowClipRect(aRenderingContext); diff --git a/mozilla/layout/tables/nsTableCellFrame.cpp b/mozilla/layout/tables/nsTableCellFrame.cpp index ac7935562a4..2fa0bda07d8 100644 --- a/mozilla/layout/tables/nsTableCellFrame.cpp +++ b/mozilla/layout/tables/nsTableCellFrame.cpp @@ -431,10 +431,9 @@ nsTableCellFrame::Paint(nsPresContext* aPresContext, nsClipCombine_kIntersect); } else { - if (NS_STYLE_OVERFLOW_CLIP == disp->mOverflow || - // XXXldb HIDDEN should really create a scrollframe, - // but test here since it doesn't. - NS_STYLE_OVERFLOW_HIDDEN == disp->mOverflow || + // XXXldb HIDDEN should really create a scrollframe, + // but use |IsTableClip| here since it doesn't. + if (disp->IsTableClip() || HasPctOverHeight()) { aRenderingContext.PushState(); pushed = PR_TRUE; diff --git a/mozilla/layout/tables/nsTableFrame.cpp b/mozilla/layout/tables/nsTableFrame.cpp index 30f62771755..0379709c605 100644 --- a/mozilla/layout/tables/nsTableFrame.cpp +++ b/mozilla/layout/tables/nsTableFrame.cpp @@ -1360,11 +1360,8 @@ nsTableFrame::PaintChildren(nsPresContext* aPresContext, const nsRect& aDirtyRect, nsFramePaintLayer aWhichLayer, PRUint32 aFlags) - { - PRUint8 overflow = GetStyleDisplay()->mOverflow; - PRBool clip = overflow == NS_STYLE_OVERFLOW_CLIP || - overflow == NS_STYLE_OVERFLOW_HIDDEN; + PRBool clip = GetStyleDisplay()->IsTableClip(); // If overflow is hidden then set the clip rect so that children don't // leak out of us. Note that because overflow'-clip' only applies to // the content area we do this after painting the border and background @@ -2076,7 +2073,7 @@ NS_METHOD nsTableFrame::Reflow(nsPresContext* aPresContext, if (aDesiredSize.mFlags & NS_REFLOW_CALC_MAX_WIDTH) { aDesiredSize.mMaximumWidth = GetPreferredWidth(); } - if (NS_STYLE_OVERFLOW_CLIP != aReflowState.mStyleDisplay->mOverflow) { + if (!aReflowState.mStyleDisplay->IsTableClip()) { // collapsed border may leak out nsMargin bcMargin = GetBCMargin(aPresContext); nsRect tableRect(0, 0, aDesiredSize.width, aDesiredSize.height) ; diff --git a/mozilla/layout/tables/nsTableOuterFrame.cpp b/mozilla/layout/tables/nsTableOuterFrame.cpp index 1b9c4ea77b8..6fcaf937069 100644 --- a/mozilla/layout/tables/nsTableOuterFrame.cpp +++ b/mozilla/layout/tables/nsTableOuterFrame.cpp @@ -333,9 +333,7 @@ nsTableOuterFrame::Paint(nsPresContext* aPresContext, // If overflow is hidden then set the clip rect so that children // don't leak out of us - PRUint8 overflow = GetStyleDisplay()->mOverflow; - PRBool clip = overflow == NS_STYLE_OVERFLOW_CLIP || - overflow == NS_STYLE_OVERFLOW_HIDDEN; + PRBool clip = GetStyleDisplay()->IsTableClip(); if (clip) { aRenderingContext.PushState(); SetOverflowClipRect(aRenderingContext); diff --git a/mozilla/layout/tables/nsTableRowFrame.cpp b/mozilla/layout/tables/nsTableRowFrame.cpp index 5d6f3979ea4..38fc27e42ff 100644 --- a/mozilla/layout/tables/nsTableRowFrame.cpp +++ b/mozilla/layout/tables/nsTableRowFrame.cpp @@ -555,9 +555,7 @@ NS_METHOD nsTableRowFrame::Paint(nsPresContext* aPresContext, aFlags |= NS_PAINT_FLAG_TABLE_BG_PAINT; } - PRUint8 overflow = GetStyleDisplay()->mOverflow; - PRBool clip = overflow == NS_STYLE_OVERFLOW_CLIP || - overflow == NS_STYLE_OVERFLOW_HIDDEN; + PRBool clip = GetStyleDisplay()->IsTableClip(); if (clip) { aRenderingContext.PushState(); SetOverflowClipRect(aRenderingContext);