Fix names of constants to correspond to the new definitions of the values of the 'overflow' property. b=69355 r+sr=roc

This commit is contained in:
dbaron%dbaron.org 2004-08-10 01:32:10 +00:00
Родитель 835333e66a
Коммит 94bc9d26c8
28 изменённых файлов: 75 добавлений и 71 удалений

Просмотреть файл

@ -3035,7 +3035,7 @@ nsGenericHTMLElement::MapScrollingAttributeInto(const nsMappedAttributes* aAttri
case NS_STYLE_FRAME_OFF:
case NS_STYLE_FRAME_NOSCROLL:
case NS_STYLE_FRAME_NO:
mappedValue = NS_STYLE_OVERFLOW_SCROLLBARS_NONE;
mappedValue = NS_STYLE_OVERFLOW_HIDDEN;
break;
case NS_STYLE_FRAME_AUTO:

Просмотреть файл

@ -677,12 +677,12 @@ const PRInt32 nsCSSProps::kOutlineColorKTable[] = {
const PRInt32 nsCSSProps::kOverflowKTable[] = {
eCSSKeyword_visible, NS_STYLE_OVERFLOW_VISIBLE,
eCSSKeyword_hidden, NS_STYLE_OVERFLOW_SCROLLBARS_NONE,
eCSSKeyword_hidden, NS_STYLE_OVERFLOW_HIDDEN,
eCSSKeyword_scroll, NS_STYLE_OVERFLOW_SCROLL,
eCSSKeyword__moz_scrollbars_none, NS_STYLE_OVERFLOW_SCROLLBARS_NONE,
eCSSKeyword__moz_scrollbars_none, NS_STYLE_OVERFLOW_HIDDEN,
eCSSKeyword__moz_scrollbars_horizontal, NS_STYLE_OVERFLOW_SCROLLBARS_HORIZONTAL,
eCSSKeyword__moz_scrollbars_vertical, NS_STYLE_OVERFLOW_SCROLLBARS_VERTICAL,
eCSSKeyword__moz_hidden_unscrollable, NS_STYLE_OVERFLOW_HIDDEN,
eCSSKeyword__moz_hidden_unscrollable, NS_STYLE_OVERFLOW_CLIP,
-1,-1
};

Просмотреть файл

@ -6552,7 +6552,7 @@ nsCSSFrameConstructor::IsScrollable(nsPresContext* aPresContext,
switch (aDisplay->mOverflow) {
case NS_STYLE_OVERFLOW_SCROLL:
case NS_STYLE_OVERFLOW_AUTO:
case NS_STYLE_OVERFLOW_SCROLLBARS_NONE:
case NS_STYLE_OVERFLOW_HIDDEN:
case NS_STYLE_OVERFLOW_SCROLLBARS_HORIZONTAL:
case NS_STYLE_OVERFLOW_SCROLLBARS_VERTICAL:
return PR_TRUE;

Просмотреть файл

@ -441,9 +441,9 @@
#define NS_STYLE_OVERFLOW_HIDDEN 1
#define NS_STYLE_OVERFLOW_SCROLL 2
#define NS_STYLE_OVERFLOW_AUTO 3
#define NS_STYLE_OVERFLOW_SCROLLBARS_NONE 4
#define NS_STYLE_OVERFLOW_SCROLLBARS_HORIZONTAL 5
#define NS_STYLE_OVERFLOW_SCROLLBARS_VERTICAL 6
#define NS_STYLE_OVERFLOW_CLIP 4
#define NS_STYLE_OVERFLOW_SCROLLBARS_HORIZONTAL 5
#define NS_STYLE_OVERFLOW_SCROLLBARS_VERTICAL 6
// See nsStyleList
#define NS_STYLE_LIST_STYLE_NONE 0

Просмотреть файл

@ -441,9 +441,9 @@
#define NS_STYLE_OVERFLOW_HIDDEN 1
#define NS_STYLE_OVERFLOW_SCROLL 2
#define NS_STYLE_OVERFLOW_AUTO 3
#define NS_STYLE_OVERFLOW_SCROLLBARS_NONE 4
#define NS_STYLE_OVERFLOW_SCROLLBARS_HORIZONTAL 5
#define NS_STYLE_OVERFLOW_SCROLLBARS_VERTICAL 6
#define NS_STYLE_OVERFLOW_CLIP 4
#define NS_STYLE_OVERFLOW_SCROLLBARS_HORIZONTAL 5
#define NS_STYLE_OVERFLOW_SCROLLBARS_VERTICAL 6
// See nsStyleList
#define NS_STYLE_LIST_STYLE_NONE 0

Просмотреть файл

@ -1634,12 +1634,12 @@ nsTextControlFrame::CreateAnonymousContent(nsPresContext* aPresContext,
if (!IsSingleLineTextControl()) {
// We can't just inherit the overflow because setting visible overflow will
// crash when the number of lines exceeds the height of the textarea and
// setting -moz-hidden-unscrollable overflow (NS_STYLE_OVERFLOW_HIDDEN)
// setting -moz-hidden-unscrollable overflow (NS_STYLE_OVERFLOW_CLIP)
// doesn't paint the caret for some reason.
const nsStyleDisplay* disp = GetStyleDisplay();
if (disp->mOverflow != NS_STYLE_OVERFLOW_AUTO && // this is the default
disp->mOverflow != NS_STYLE_OVERFLOW_VISIBLE &&
disp->mOverflow != NS_STYLE_OVERFLOW_HIDDEN) {
disp->mOverflow != NS_STYLE_OVERFLOW_CLIP) {
rv = divContent->SetAttr(kNameSpaceID_None, nsHTMLAtoms::style,
NS_LITERAL_STRING("overflow: inherit;"),
PR_FALSE);

Просмотреть файл

@ -900,7 +900,7 @@ nsBlockFrame::Reflow(nsPresContext* aPresContext,
}
if (NS_FRAME_IS_NOT_COMPLETE(state.mReflowStatus)) {
if (NS_STYLE_OVERFLOW_HIDDEN == aReflowState.mStyleDisplay->mOverflow) {
if (NS_STYLE_OVERFLOW_CLIP == aReflowState.mStyleDisplay->mOverflow) {
state.mReflowStatus = NS_FRAME_COMPLETE;
}
else {
@ -1373,7 +1373,7 @@ nsBlockFrame::ComputeCombinedArea(const nsHTMLReflowState& aReflowState,
// XXX_perf: This can be done incrementally. It is currently one of
// the things that makes incremental reflow O(N^2).
nscoord xa = 0, ya = 0, xb = aMetrics.width, yb = aMetrics.height;
if (NS_STYLE_OVERFLOW_HIDDEN != aReflowState.mStyleDisplay->mOverflow) {
if (NS_STYLE_OVERFLOW_CLIP != aReflowState.mStyleDisplay->mOverflow) {
for (line_iterator line = begin_lines(), line_end = end_lines();
line != line_end;
++line)
@ -5257,7 +5257,7 @@ nsBlockFrame::Paint(nsPresContext* aPresContext,
// 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
if (NS_STYLE_OVERFLOW_HIDDEN == disp->mOverflow) {
if (NS_STYLE_OVERFLOW_CLIP == disp->mOverflow) {
aRenderingContext.PushState();
SetOverflowClipRect(aRenderingContext);
}
@ -5271,7 +5271,7 @@ nsBlockFrame::Paint(nsPresContext* aPresContext,
PaintDecorationsAndChildren(aPresContext, aRenderingContext,
aDirtyRect, aWhichLayer, PR_TRUE);
if (NS_STYLE_OVERFLOW_HIDDEN == disp->mOverflow)
if (NS_STYLE_OVERFLOW_CLIP == disp->mOverflow)
aRenderingContext.PopState();
#if 0

Просмотреть файл

@ -657,7 +657,7 @@ SyncFrameViewGeometryDependentProperties(nsPresContext* aPresContext,
// in the style context...
PRBool isBlockLevel = display->IsBlockLevel() || (kidState & NS_FRAME_OUT_OF_FLOW);
PRBool hasClip = display->IsAbsolutelyPositioned() && (display->mClipFlags & NS_STYLE_CLIP_RECT);
PRBool hasOverflowClip = isBlockLevel && (display->mOverflow == NS_STYLE_OVERFLOW_HIDDEN);
PRBool hasOverflowClip = isBlockLevel && (display->mOverflow == NS_STYLE_OVERFLOW_CLIP);
if (hasClip || hasOverflowClip) {
nsSize frameSize = aFrame->GetSize();
nsRect clipRect;
@ -908,7 +908,7 @@ nsContainerFrame::FrameNeedsView(nsIFrame* aFrame)
// block-level, but we can't trust that the style context 'display' value is
// set correctly
if ((display->IsBlockLevel() || display->IsFloating()) &&
(display->mOverflow == NS_STYLE_OVERFLOW_HIDDEN)) {
(display->mOverflow == NS_STYLE_OVERFLOW_CLIP)) {
// XXX Check for the frame being a block frame and only force a view
// in that case, because adding a view for box frames seems to cause
// problems for XUL...

Просмотреть файл

@ -4284,10 +4284,10 @@ nsFrame::ConsiderChildOverflow(nsPresContext* aPresContext,
nsIFrame* aChildFrame)
{
const nsStyleDisplay* disp = GetStyleDisplay();
// check here also for scrollbar none as table frames (table, tr and td) currently
// 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_HIDDEN != disp->mOverflow &&
NS_STYLE_OVERFLOW_SCROLLBARS_NONE != disp->mOverflow) {
if (NS_STYLE_OVERFLOW_CLIP != disp->mOverflow &&
NS_STYLE_OVERFLOW_HIDDEN != disp->mOverflow) {
nsRect* overflowArea = aChildFrame->GetOverflowAreaProperty();
if (overflowArea) {
nsRect childOverflow(*overflowArea);

Просмотреть файл

@ -649,7 +649,7 @@ nsSubDocumentFrame::ShowDocShell()
PRInt32 scrolling = GetStyleDisplay()->mOverflow;
PRInt32 scrollX, scrollY;
switch (scrolling) {
case NS_STYLE_OVERFLOW_SCROLLBARS_NONE:
case NS_STYLE_OVERFLOW_CLIP:
scrollX = NS_STYLE_OVERFLOW_HIDDEN;
scrollY = NS_STYLE_OVERFLOW_HIDDEN;
break;

Просмотреть файл

@ -1205,12 +1205,14 @@ nsGfxScrollFrameInner::GetScrollbarStylesFromFrame() const
switch (overflow) {
case NS_STYLE_OVERFLOW_SCROLL:
case NS_STYLE_OVERFLOW_HIDDEN:
case NS_STYLE_OVERFLOW_VISIBLE:
case NS_STYLE_OVERFLOW_VISIBLE: // should never happen
case NS_STYLE_OVERFLOW_AUTO:
return ScrollbarStyles(overflow, overflow);
case NS_STYLE_OVERFLOW_SCROLLBARS_NONE:
// This isn't quite right. The scrollframe will still be scrollable using keys.
// This can happen when HTML or BODY has propagated this style to the viewport.
case NS_STYLE_OVERFLOW_CLIP:
// This isn't quite right (although the value is deprecated and not
// very important). The scrollframe will still be scrollable using
// keys. This can happen when HTML or BODY has propagated the style
// to the viewport. (In other cases, there will be no scrollframe.)
return ScrollbarStyles(NS_STYLE_OVERFLOW_HIDDEN, NS_STYLE_OVERFLOW_HIDDEN);
case NS_STYLE_OVERFLOW_SCROLLBARS_VERTICAL:
return ScrollbarStyles(NS_STYLE_OVERFLOW_HIDDEN, NS_STYLE_OVERFLOW_SCROLL);

Просмотреть файл

@ -900,7 +900,7 @@ nsBlockFrame::Reflow(nsPresContext* aPresContext,
}
if (NS_FRAME_IS_NOT_COMPLETE(state.mReflowStatus)) {
if (NS_STYLE_OVERFLOW_HIDDEN == aReflowState.mStyleDisplay->mOverflow) {
if (NS_STYLE_OVERFLOW_CLIP == aReflowState.mStyleDisplay->mOverflow) {
state.mReflowStatus = NS_FRAME_COMPLETE;
}
else {
@ -1373,7 +1373,7 @@ nsBlockFrame::ComputeCombinedArea(const nsHTMLReflowState& aReflowState,
// XXX_perf: This can be done incrementally. It is currently one of
// the things that makes incremental reflow O(N^2).
nscoord xa = 0, ya = 0, xb = aMetrics.width, yb = aMetrics.height;
if (NS_STYLE_OVERFLOW_HIDDEN != aReflowState.mStyleDisplay->mOverflow) {
if (NS_STYLE_OVERFLOW_CLIP != aReflowState.mStyleDisplay->mOverflow) {
for (line_iterator line = begin_lines(), line_end = end_lines();
line != line_end;
++line)
@ -5257,7 +5257,7 @@ nsBlockFrame::Paint(nsPresContext* aPresContext,
// 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
if (NS_STYLE_OVERFLOW_HIDDEN == disp->mOverflow) {
if (NS_STYLE_OVERFLOW_CLIP == disp->mOverflow) {
aRenderingContext.PushState();
SetOverflowClipRect(aRenderingContext);
}
@ -5271,7 +5271,7 @@ nsBlockFrame::Paint(nsPresContext* aPresContext,
PaintDecorationsAndChildren(aPresContext, aRenderingContext,
aDirtyRect, aWhichLayer, PR_TRUE);
if (NS_STYLE_OVERFLOW_HIDDEN == disp->mOverflow)
if (NS_STYLE_OVERFLOW_CLIP == disp->mOverflow)
aRenderingContext.PopState();
#if 0

Просмотреть файл

@ -657,7 +657,7 @@ SyncFrameViewGeometryDependentProperties(nsPresContext* aPresContext,
// in the style context...
PRBool isBlockLevel = display->IsBlockLevel() || (kidState & NS_FRAME_OUT_OF_FLOW);
PRBool hasClip = display->IsAbsolutelyPositioned() && (display->mClipFlags & NS_STYLE_CLIP_RECT);
PRBool hasOverflowClip = isBlockLevel && (display->mOverflow == NS_STYLE_OVERFLOW_HIDDEN);
PRBool hasOverflowClip = isBlockLevel && (display->mOverflow == NS_STYLE_OVERFLOW_CLIP);
if (hasClip || hasOverflowClip) {
nsSize frameSize = aFrame->GetSize();
nsRect clipRect;
@ -908,7 +908,7 @@ nsContainerFrame::FrameNeedsView(nsIFrame* aFrame)
// block-level, but we can't trust that the style context 'display' value is
// set correctly
if ((display->IsBlockLevel() || display->IsFloating()) &&
(display->mOverflow == NS_STYLE_OVERFLOW_HIDDEN)) {
(display->mOverflow == NS_STYLE_OVERFLOW_CLIP)) {
// XXX Check for the frame being a block frame and only force a view
// in that case, because adding a view for box frames seems to cause
// problems for XUL...

Просмотреть файл

@ -4284,10 +4284,10 @@ nsFrame::ConsiderChildOverflow(nsPresContext* aPresContext,
nsIFrame* aChildFrame)
{
const nsStyleDisplay* disp = GetStyleDisplay();
// check here also for scrollbar none as table frames (table, tr and td) currently
// 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_HIDDEN != disp->mOverflow &&
NS_STYLE_OVERFLOW_SCROLLBARS_NONE != disp->mOverflow) {
if (NS_STYLE_OVERFLOW_CLIP != disp->mOverflow &&
NS_STYLE_OVERFLOW_HIDDEN != disp->mOverflow) {
nsRect* overflowArea = aChildFrame->GetOverflowAreaProperty();
if (overflowArea) {
nsRect childOverflow(*overflowArea);

Просмотреть файл

@ -1205,12 +1205,14 @@ nsGfxScrollFrameInner::GetScrollbarStylesFromFrame() const
switch (overflow) {
case NS_STYLE_OVERFLOW_SCROLL:
case NS_STYLE_OVERFLOW_HIDDEN:
case NS_STYLE_OVERFLOW_VISIBLE:
case NS_STYLE_OVERFLOW_VISIBLE: // should never happen
case NS_STYLE_OVERFLOW_AUTO:
return ScrollbarStyles(overflow, overflow);
case NS_STYLE_OVERFLOW_SCROLLBARS_NONE:
// This isn't quite right. The scrollframe will still be scrollable using keys.
// This can happen when HTML or BODY has propagated this style to the viewport.
case NS_STYLE_OVERFLOW_CLIP:
// This isn't quite right (although the value is deprecated and not
// very important). The scrollframe will still be scrollable using
// keys. This can happen when HTML or BODY has propagated the style
// to the viewport. (In other cases, there will be no scrollframe.)
return ScrollbarStyles(NS_STYLE_OVERFLOW_HIDDEN, NS_STYLE_OVERFLOW_HIDDEN);
case NS_STYLE_OVERFLOW_SCROLLBARS_VERTICAL:
return ScrollbarStyles(NS_STYLE_OVERFLOW_HIDDEN, NS_STYLE_OVERFLOW_SCROLL);

Просмотреть файл

@ -649,7 +649,7 @@ nsSubDocumentFrame::ShowDocShell()
PRInt32 scrolling = GetStyleDisplay()->mOverflow;
PRInt32 scrollX, scrollY;
switch (scrolling) {
case NS_STYLE_OVERFLOW_SCROLLBARS_NONE:
case NS_STYLE_OVERFLOW_CLIP:
scrollX = NS_STYLE_OVERFLOW_HIDDEN;
scrollY = NS_STYLE_OVERFLOW_HIDDEN;
break;

Просмотреть файл

@ -1634,12 +1634,12 @@ nsTextControlFrame::CreateAnonymousContent(nsPresContext* aPresContext,
if (!IsSingleLineTextControl()) {
// We can't just inherit the overflow because setting visible overflow will
// crash when the number of lines exceeds the height of the textarea and
// setting -moz-hidden-unscrollable overflow (NS_STYLE_OVERFLOW_HIDDEN)
// setting -moz-hidden-unscrollable overflow (NS_STYLE_OVERFLOW_CLIP)
// doesn't paint the caret for some reason.
const nsStyleDisplay* disp = GetStyleDisplay();
if (disp->mOverflow != NS_STYLE_OVERFLOW_AUTO && // this is the default
disp->mOverflow != NS_STYLE_OVERFLOW_VISIBLE &&
disp->mOverflow != NS_STYLE_OVERFLOW_HIDDEN) {
disp->mOverflow != NS_STYLE_OVERFLOW_CLIP) {
rv = divContent->SetAttr(kNameSpaceID_None, nsHTMLAtoms::style,
NS_LITERAL_STRING("overflow: inherit;"),
PR_FALSE);

Просмотреть файл

@ -6552,7 +6552,7 @@ nsCSSFrameConstructor::IsScrollable(nsPresContext* aPresContext,
switch (aDisplay->mOverflow) {
case NS_STYLE_OVERFLOW_SCROLL:
case NS_STYLE_OVERFLOW_AUTO:
case NS_STYLE_OVERFLOW_SCROLLBARS_NONE:
case NS_STYLE_OVERFLOW_HIDDEN:
case NS_STYLE_OVERFLOW_SCROLLBARS_HORIZONTAL:
case NS_STYLE_OVERFLOW_SCROLLBARS_VERTICAL:
return PR_TRUE;

Просмотреть файл

@ -432,10 +432,10 @@ nsTableCellFrame::Paint(nsPresContext* aPresContext,
nsClipCombine_kIntersect);
}
else {
if (NS_STYLE_OVERFLOW_HIDDEN == disp->mOverflow ||
// XXXldb SCROLLBARS_NONE should really create a scrollframe,
if (NS_STYLE_OVERFLOW_CLIP == disp->mOverflow ||
// XXXldb HIDDEN should really create a scrollframe,
// but test here since it doesn't.
NS_STYLE_OVERFLOW_SCROLLBARS_NONE == disp->mOverflow ||
NS_STYLE_OVERFLOW_HIDDEN == disp->mOverflow ||
HasPctOverHeight()) {
aRenderingContext.PushState();
pushed = PR_TRUE;

Просмотреть файл

@ -1363,8 +1363,8 @@ nsTableFrame::PaintChildren(nsPresContext* aPresContext,
{
PRUint8 overflow = GetStyleDisplay()->mOverflow;
PRBool clip = overflow == NS_STYLE_OVERFLOW_HIDDEN ||
overflow == NS_STYLE_OVERFLOW_SCROLLBARS_NONE;
PRBool clip = overflow == NS_STYLE_OVERFLOW_CLIP ||
overflow == NS_STYLE_OVERFLOW_HIDDEN;
// 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 +2076,7 @@ NS_METHOD nsTableFrame::Reflow(nsPresContext* aPresContext,
if (aDesiredSize.mFlags & NS_REFLOW_CALC_MAX_WIDTH) {
aDesiredSize.mMaximumWidth = GetPreferredWidth();
}
if (NS_STYLE_OVERFLOW_HIDDEN != aReflowState.mStyleDisplay->mOverflow) {
if (NS_STYLE_OVERFLOW_CLIP != aReflowState.mStyleDisplay->mOverflow) {
// collapsed border may leak out
nsMargin bcMargin = GetBCMargin(aPresContext);
nsRect tableRect(0, 0, aDesiredSize.width, aDesiredSize.height) ;

Просмотреть файл

@ -334,8 +334,8 @@ 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_HIDDEN ||
overflow == NS_STYLE_OVERFLOW_SCROLLBARS_NONE;
PRBool clip = overflow == NS_STYLE_OVERFLOW_CLIP ||
overflow == NS_STYLE_OVERFLOW_HIDDEN;
if (clip) {
aRenderingContext.PushState();
SetOverflowClipRect(aRenderingContext);

Просмотреть файл

@ -556,8 +556,8 @@ NS_METHOD nsTableRowFrame::Paint(nsPresContext* aPresContext,
}
PRUint8 overflow = GetStyleDisplay()->mOverflow;
PRBool clip = overflow == NS_STYLE_OVERFLOW_HIDDEN ||
overflow == NS_STYLE_OVERFLOW_SCROLLBARS_NONE;
PRBool clip = overflow == NS_STYLE_OVERFLOW_CLIP ||
overflow == NS_STYLE_OVERFLOW_HIDDEN;
if (clip) {
aRenderingContext.PushState();
SetOverflowClipRect(aRenderingContext);

Просмотреть файл

@ -677,12 +677,12 @@ const PRInt32 nsCSSProps::kOutlineColorKTable[] = {
const PRInt32 nsCSSProps::kOverflowKTable[] = {
eCSSKeyword_visible, NS_STYLE_OVERFLOW_VISIBLE,
eCSSKeyword_hidden, NS_STYLE_OVERFLOW_SCROLLBARS_NONE,
eCSSKeyword_hidden, NS_STYLE_OVERFLOW_HIDDEN,
eCSSKeyword_scroll, NS_STYLE_OVERFLOW_SCROLL,
eCSSKeyword__moz_scrollbars_none, NS_STYLE_OVERFLOW_SCROLLBARS_NONE,
eCSSKeyword__moz_scrollbars_none, NS_STYLE_OVERFLOW_HIDDEN,
eCSSKeyword__moz_scrollbars_horizontal, NS_STYLE_OVERFLOW_SCROLLBARS_HORIZONTAL,
eCSSKeyword__moz_scrollbars_vertical, NS_STYLE_OVERFLOW_SCROLLBARS_VERTICAL,
eCSSKeyword__moz_hidden_unscrollable, NS_STYLE_OVERFLOW_HIDDEN,
eCSSKeyword__moz_hidden_unscrollable, NS_STYLE_OVERFLOW_CLIP,
-1,-1
};

Просмотреть файл

@ -432,10 +432,10 @@ nsTableCellFrame::Paint(nsPresContext* aPresContext,
nsClipCombine_kIntersect);
}
else {
if (NS_STYLE_OVERFLOW_HIDDEN == disp->mOverflow ||
// XXXldb SCROLLBARS_NONE should really create a scrollframe,
if (NS_STYLE_OVERFLOW_CLIP == disp->mOverflow ||
// XXXldb HIDDEN should really create a scrollframe,
// but test here since it doesn't.
NS_STYLE_OVERFLOW_SCROLLBARS_NONE == disp->mOverflow ||
NS_STYLE_OVERFLOW_HIDDEN == disp->mOverflow ||
HasPctOverHeight()) {
aRenderingContext.PushState();
pushed = PR_TRUE;

Просмотреть файл

@ -1363,8 +1363,8 @@ nsTableFrame::PaintChildren(nsPresContext* aPresContext,
{
PRUint8 overflow = GetStyleDisplay()->mOverflow;
PRBool clip = overflow == NS_STYLE_OVERFLOW_HIDDEN ||
overflow == NS_STYLE_OVERFLOW_SCROLLBARS_NONE;
PRBool clip = overflow == NS_STYLE_OVERFLOW_CLIP ||
overflow == NS_STYLE_OVERFLOW_HIDDEN;
// 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 +2076,7 @@ NS_METHOD nsTableFrame::Reflow(nsPresContext* aPresContext,
if (aDesiredSize.mFlags & NS_REFLOW_CALC_MAX_WIDTH) {
aDesiredSize.mMaximumWidth = GetPreferredWidth();
}
if (NS_STYLE_OVERFLOW_HIDDEN != aReflowState.mStyleDisplay->mOverflow) {
if (NS_STYLE_OVERFLOW_CLIP != aReflowState.mStyleDisplay->mOverflow) {
// collapsed border may leak out
nsMargin bcMargin = GetBCMargin(aPresContext);
nsRect tableRect(0, 0, aDesiredSize.width, aDesiredSize.height) ;

Просмотреть файл

@ -334,8 +334,8 @@ 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_HIDDEN ||
overflow == NS_STYLE_OVERFLOW_SCROLLBARS_NONE;
PRBool clip = overflow == NS_STYLE_OVERFLOW_CLIP ||
overflow == NS_STYLE_OVERFLOW_HIDDEN;
if (clip) {
aRenderingContext.PushState();
SetOverflowClipRect(aRenderingContext);

Просмотреть файл

@ -556,8 +556,8 @@ NS_METHOD nsTableRowFrame::Paint(nsPresContext* aPresContext,
}
PRUint8 overflow = GetStyleDisplay()->mOverflow;
PRBool clip = overflow == NS_STYLE_OVERFLOW_HIDDEN ||
overflow == NS_STYLE_OVERFLOW_SCROLLBARS_NONE;
PRBool clip = overflow == NS_STYLE_OVERFLOW_CLIP ||
overflow == NS_STYLE_OVERFLOW_HIDDEN;
if (clip) {
aRenderingContext.PushState();
SetOverflowClipRect(aRenderingContext);

Просмотреть файл

@ -1632,7 +1632,7 @@ nsBoxFrame::PaintChildren(nsPresContext* aPresContext,
// If overflow is hidden then set the clip rect so that children
// don't leak out of us
if (NS_STYLE_OVERFLOW_HIDDEN == disp->mOverflow) {
if (NS_STYLE_OVERFLOW_CLIP == disp->mOverflow) {
nsMargin im(0,0,0,0);
GetInset(im);
r.Deflate(im);
@ -1645,7 +1645,7 @@ nsBoxFrame::PaintChildren(nsPresContext* aPresContext,
nsIFrame* frame = nsnull;
kid->GetFrame(&frame);
if (!hasClipped && NS_STYLE_OVERFLOW_HIDDEN == disp->mOverflow) {
if (!hasClipped && NS_STYLE_OVERFLOW_CLIP == disp->mOverflow) {
// if we haven't already clipped and we should
// check to see if the child is in out bounds. If not then
// we begin clipping.
@ -1674,7 +1674,7 @@ nsBoxFrame::PaintChildren(nsPresContext* aPresContext,
nscoord onePixel = aPresContext->IntScaledPixelsToTwips(1);
GetContentRect(r);
if (NS_STYLE_OVERFLOW_HIDDEN == disp->mOverflow) {
if (NS_STYLE_OVERFLOW_CLIP == disp->mOverflow) {
GetDebugMargin(debugMargin);
PixelMarginToTwips(aPresContext, debugMargin);
r.Deflate(debugMargin);
@ -1684,7 +1684,7 @@ nsBoxFrame::PaintChildren(nsPresContext* aPresContext,
GetChildBox(&kid);
while (nsnull != kid) {
if (!hasClipped && NS_STYLE_OVERFLOW_HIDDEN == disp->mOverflow) {
if (!hasClipped && NS_STYLE_OVERFLOW_CLIP == disp->mOverflow) {
// if we haven't already clipped and we should
// check to see if the child is in out bounds. If not then
// we begin clipping.