зеркало из https://github.com/mozilla/gecko-dev.git
Fix regressions of 'overflow: hidden' on various table display types. b=221140 r=bernd sr=roc a=asa
This commit is contained in:
Родитель
162f96a58c
Коммит
f9aa023719
|
@ -1387,18 +1387,20 @@ nsTableFrame::PaintChildren(nsIPresContext* aPresContext,
|
|||
PRUint32 aFlags)
|
||||
|
||||
{
|
||||
const nsStyleDisplay* disp = GetStyleDisplay();
|
||||
PRUint8 overflow = GetStyleDisplay()->mOverflow;
|
||||
PRBool clip = overflow == NS_STYLE_OVERFLOW_HIDDEN ||
|
||||
overflow == NS_STYLE_OVERFLOW_SCROLLBARS_NONE;
|
||||
// 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 (clip) {
|
||||
aRenderingContext.PushState();
|
||||
SetOverflowClipRect(aRenderingContext);
|
||||
}
|
||||
|
||||
nsHTMLContainerFrame::PaintChildren(aPresContext, aRenderingContext, aDirtyRect, aWhichLayer, aFlags);
|
||||
|
||||
if (NS_STYLE_OVERFLOW_HIDDEN == disp->mOverflow) {
|
||||
if (clip) {
|
||||
PRBool clipState;
|
||||
aRenderingContext.PopState(clipState);
|
||||
}
|
||||
|
|
|
@ -337,14 +337,16 @@ nsTableOuterFrame::Paint(nsIPresContext* aPresContext,
|
|||
// the remaining code was copied from nsContainerFrame::PaintChildren since
|
||||
// it only paints the primary child list
|
||||
|
||||
const nsStyleDisplay* disp = GetStyleDisplay();
|
||||
|
||||
// Child elements have the opportunity to override the visibility property
|
||||
// of their parent and display even if the parent is hidden
|
||||
|
||||
// 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) {
|
||||
PRUint8 overflow = GetStyleDisplay()->mOverflow;
|
||||
PRBool clip = overflow == NS_STYLE_OVERFLOW_HIDDEN ||
|
||||
overflow == NS_STYLE_OVERFLOW_SCROLLBARS_NONE;
|
||||
if (clip) {
|
||||
aRenderingContext.PushState();
|
||||
SetOverflowClipRect(aRenderingContext);
|
||||
}
|
||||
|
@ -356,7 +358,7 @@ nsTableOuterFrame::Paint(nsIPresContext* aPresContext,
|
|||
PaintChild(aPresContext, aRenderingContext, aDirtyRect, kid, aWhichLayer);
|
||||
}
|
||||
|
||||
if (NS_STYLE_OVERFLOW_HIDDEN == disp->mOverflow) {
|
||||
if (clip) {
|
||||
PRBool clipState;
|
||||
aRenderingContext.PopState(clipState);
|
||||
}
|
||||
|
@ -1602,8 +1604,7 @@ nsTableOuterFrame::IR_ReflowDirty(nsIPresContext* aPresContext,
|
|||
nsRect* oldOverflowArea = GetOverflowAreaProperty(aPresContext);
|
||||
PRBool innerMoved = (innerRect.x != innerOrigin.x) ||
|
||||
(innerRect.y != innerOrigin.y);
|
||||
nsSize desSize = nsSize(aDesiredSize.width,
|
||||
aDesiredSize.height);
|
||||
nsSize desSize(aDesiredSize.width, aDesiredSize.height);
|
||||
InvalidateDamage(aPresContext, (PRUint8) NO_SIDE, desSize, innerMoved, PR_FALSE,
|
||||
oldOverflowArea);
|
||||
}
|
||||
|
|
|
@ -559,13 +559,16 @@ NS_METHOD nsTableRowFrame::Paint(nsIPresContext* aPresContext,
|
|||
#endif
|
||||
// Standards mode background painting removed. See bug 4510
|
||||
|
||||
PRUint8 overflow = GetStyleDisplay()->mOverflow;
|
||||
PRBool clip = overflow == NS_STYLE_OVERFLOW_HIDDEN ||
|
||||
overflow == NS_STYLE_OVERFLOW_SCROLLBARS_NONE;
|
||||
const nsStyleDisplay* disp = GetStyleDisplay();
|
||||
if (disp && (NS_STYLE_OVERFLOW_HIDDEN == disp->mOverflow)) {
|
||||
if (clip) {
|
||||
aRenderingContext.PushState();
|
||||
SetOverflowClipRect(aRenderingContext);
|
||||
}
|
||||
PaintChildren(aPresContext, aRenderingContext, aDirtyRect, aWhichLayer, aFlags);
|
||||
if (disp && (NS_STYLE_OVERFLOW_HIDDEN == disp->mOverflow)) {
|
||||
if (clip) {
|
||||
PRBool clipState;
|
||||
aRenderingContext.PopState(clipState);
|
||||
}
|
||||
|
|
|
@ -206,13 +206,15 @@ NS_METHOD nsTableRowGroupFrame::Paint(nsIPresContext* aPresContext,
|
|||
#endif
|
||||
// Standards mode background painting removed. See bug 4510
|
||||
|
||||
const nsStyleDisplay* disp = GetStyleDisplay();
|
||||
if (disp && (NS_STYLE_OVERFLOW_HIDDEN == disp->mOverflow)) {
|
||||
PRUint8 overflow = GetStyleDisplay()->mOverflow;
|
||||
PRBool clip = overflow == NS_STYLE_OVERFLOW_HIDDEN ||
|
||||
overflow == NS_STYLE_OVERFLOW_SCROLLBARS_NONE;
|
||||
if (clip) {
|
||||
aRenderingContext.PushState();
|
||||
SetOverflowClipRect(aRenderingContext);
|
||||
}
|
||||
PaintChildren(aPresContext, aRenderingContext, aDirtyRect, aWhichLayer, aFlags);
|
||||
if (disp && (NS_STYLE_OVERFLOW_HIDDEN == disp->mOverflow)) {
|
||||
if (clip) {
|
||||
PRBool clipState;
|
||||
aRenderingContext.PopState(clipState);
|
||||
}
|
||||
|
|
|
@ -1387,18 +1387,20 @@ nsTableFrame::PaintChildren(nsIPresContext* aPresContext,
|
|||
PRUint32 aFlags)
|
||||
|
||||
{
|
||||
const nsStyleDisplay* disp = GetStyleDisplay();
|
||||
PRUint8 overflow = GetStyleDisplay()->mOverflow;
|
||||
PRBool clip = overflow == NS_STYLE_OVERFLOW_HIDDEN ||
|
||||
overflow == NS_STYLE_OVERFLOW_SCROLLBARS_NONE;
|
||||
// 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 (clip) {
|
||||
aRenderingContext.PushState();
|
||||
SetOverflowClipRect(aRenderingContext);
|
||||
}
|
||||
|
||||
nsHTMLContainerFrame::PaintChildren(aPresContext, aRenderingContext, aDirtyRect, aWhichLayer, aFlags);
|
||||
|
||||
if (NS_STYLE_OVERFLOW_HIDDEN == disp->mOverflow) {
|
||||
if (clip) {
|
||||
PRBool clipState;
|
||||
aRenderingContext.PopState(clipState);
|
||||
}
|
||||
|
|
|
@ -337,14 +337,16 @@ nsTableOuterFrame::Paint(nsIPresContext* aPresContext,
|
|||
// the remaining code was copied from nsContainerFrame::PaintChildren since
|
||||
// it only paints the primary child list
|
||||
|
||||
const nsStyleDisplay* disp = GetStyleDisplay();
|
||||
|
||||
// Child elements have the opportunity to override the visibility property
|
||||
// of their parent and display even if the parent is hidden
|
||||
|
||||
// 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) {
|
||||
PRUint8 overflow = GetStyleDisplay()->mOverflow;
|
||||
PRBool clip = overflow == NS_STYLE_OVERFLOW_HIDDEN ||
|
||||
overflow == NS_STYLE_OVERFLOW_SCROLLBARS_NONE;
|
||||
if (clip) {
|
||||
aRenderingContext.PushState();
|
||||
SetOverflowClipRect(aRenderingContext);
|
||||
}
|
||||
|
@ -356,7 +358,7 @@ nsTableOuterFrame::Paint(nsIPresContext* aPresContext,
|
|||
PaintChild(aPresContext, aRenderingContext, aDirtyRect, kid, aWhichLayer);
|
||||
}
|
||||
|
||||
if (NS_STYLE_OVERFLOW_HIDDEN == disp->mOverflow) {
|
||||
if (clip) {
|
||||
PRBool clipState;
|
||||
aRenderingContext.PopState(clipState);
|
||||
}
|
||||
|
@ -1602,8 +1604,7 @@ nsTableOuterFrame::IR_ReflowDirty(nsIPresContext* aPresContext,
|
|||
nsRect* oldOverflowArea = GetOverflowAreaProperty(aPresContext);
|
||||
PRBool innerMoved = (innerRect.x != innerOrigin.x) ||
|
||||
(innerRect.y != innerOrigin.y);
|
||||
nsSize desSize = nsSize(aDesiredSize.width,
|
||||
aDesiredSize.height);
|
||||
nsSize desSize(aDesiredSize.width, aDesiredSize.height);
|
||||
InvalidateDamage(aPresContext, (PRUint8) NO_SIDE, desSize, innerMoved, PR_FALSE,
|
||||
oldOverflowArea);
|
||||
}
|
||||
|
|
|
@ -559,13 +559,16 @@ NS_METHOD nsTableRowFrame::Paint(nsIPresContext* aPresContext,
|
|||
#endif
|
||||
// Standards mode background painting removed. See bug 4510
|
||||
|
||||
PRUint8 overflow = GetStyleDisplay()->mOverflow;
|
||||
PRBool clip = overflow == NS_STYLE_OVERFLOW_HIDDEN ||
|
||||
overflow == NS_STYLE_OVERFLOW_SCROLLBARS_NONE;
|
||||
const nsStyleDisplay* disp = GetStyleDisplay();
|
||||
if (disp && (NS_STYLE_OVERFLOW_HIDDEN == disp->mOverflow)) {
|
||||
if (clip) {
|
||||
aRenderingContext.PushState();
|
||||
SetOverflowClipRect(aRenderingContext);
|
||||
}
|
||||
PaintChildren(aPresContext, aRenderingContext, aDirtyRect, aWhichLayer, aFlags);
|
||||
if (disp && (NS_STYLE_OVERFLOW_HIDDEN == disp->mOverflow)) {
|
||||
if (clip) {
|
||||
PRBool clipState;
|
||||
aRenderingContext.PopState(clipState);
|
||||
}
|
||||
|
|
|
@ -206,13 +206,15 @@ NS_METHOD nsTableRowGroupFrame::Paint(nsIPresContext* aPresContext,
|
|||
#endif
|
||||
// Standards mode background painting removed. See bug 4510
|
||||
|
||||
const nsStyleDisplay* disp = GetStyleDisplay();
|
||||
if (disp && (NS_STYLE_OVERFLOW_HIDDEN == disp->mOverflow)) {
|
||||
PRUint8 overflow = GetStyleDisplay()->mOverflow;
|
||||
PRBool clip = overflow == NS_STYLE_OVERFLOW_HIDDEN ||
|
||||
overflow == NS_STYLE_OVERFLOW_SCROLLBARS_NONE;
|
||||
if (clip) {
|
||||
aRenderingContext.PushState();
|
||||
SetOverflowClipRect(aRenderingContext);
|
||||
}
|
||||
PaintChildren(aPresContext, aRenderingContext, aDirtyRect, aWhichLayer, aFlags);
|
||||
if (disp && (NS_STYLE_OVERFLOW_HIDDEN == disp->mOverflow)) {
|
||||
if (clip) {
|
||||
PRBool clipState;
|
||||
aRenderingContext.PopState(clipState);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче