Changes to bring clipping inline with upcoming CSS2 errata
git-svn-id: svn://10.0.0.236/trunk@66887 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -5929,13 +5929,6 @@ nsBlockFrame::Paint(nsIPresContext* aPresContext,
|
||||
const nsStyleDisplay* disp = (const nsStyleDisplay*)
|
||||
mStyleContext->GetStyleData(eStyleStruct_Display);
|
||||
|
||||
// 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) {
|
||||
aRenderingContext.PushState();
|
||||
SetClipRect(aRenderingContext);
|
||||
}
|
||||
|
||||
// Only paint the border and background if we're visible
|
||||
if (disp->IsVisible() && (NS_FRAME_PAINT_LAYER_BACKGROUND == aWhichLayer) &&
|
||||
(0 != mRect.width) && (0 != mRect.height)) {
|
||||
@@ -5956,6 +5949,14 @@ nsBlockFrame::Paint(nsIPresContext* aPresContext,
|
||||
aDirtyRect, rect, *spacing, mStyleContext, 0);
|
||||
}
|
||||
|
||||
// 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) {
|
||||
aRenderingContext.PushState();
|
||||
SetOverflowClipRect(aRenderingContext);
|
||||
}
|
||||
|
||||
// Child elements have the opportunity to override the visibility
|
||||
// property and display even if the parent is hidden
|
||||
if (NS_FRAME_PAINT_LAYER_FLOATERS == aWhichLayer) {
|
||||
|
||||
Reference in New Issue
Block a user