diff --git a/mozilla/gfx/public/nsIRenderingContext.h b/mozilla/gfx/public/nsIRenderingContext.h index c5f095821ac..d3ee154262e 100644 --- a/mozilla/gfx/public/nsIRenderingContext.h +++ b/mozilla/gfx/public/nsIRenderingContext.h @@ -187,10 +187,8 @@ public: /** * Get and and set RenderingContext to this graphical state - * @return if PR_TRUE, indicates that the clipping region after - * popping state is empty, else PR_FALSE */ - NS_IMETHOD PopState(PRBool &aClipEmpty) = 0; + NS_IMETHOD PopState(void) = 0; /** * Tells if a given rectangle is visible within the rendering context diff --git a/mozilla/gfx/src/beos/nsRenderingContextBeOS.cpp b/mozilla/gfx/src/beos/nsRenderingContextBeOS.cpp index a0af27f5f68..d7828e662cf 100644 --- a/mozilla/gfx/src/beos/nsRenderingContextBeOS.cpp +++ b/mozilla/gfx/src/beos/nsRenderingContextBeOS.cpp @@ -73,10 +73,8 @@ nsRenderingContextBeOS::~nsRenderingContextBeOS() { // Destroy the State Machine if (mStateCache) { PRInt32 cnt = mStateCache->Count(); - while (--cnt >= 0) { - PRBool clipstate; - PopState(clipstate); - } + while (--cnt >= 0) + PopState(); delete mStateCache; mStateCache = nsnull; } @@ -140,8 +138,7 @@ NS_IMETHODIMP nsRenderingContextBeOS::LockDrawingSurface(PRInt32 aX, PRInt32 aY, } NS_IMETHODIMP nsRenderingContextBeOS::UnlockDrawingSurface() { - PRBool clipstate; - PopState(clipstate); + PopState(); mSurface->Unlock(); return NS_OK; } @@ -206,7 +203,7 @@ NS_IMETHODIMP nsRenderingContextBeOS::PushState() { return NS_OK; } -NS_IMETHODIMP nsRenderingContextBeOS::PopState(PRBool &aClipEmpty) { +NS_IMETHODIMP nsRenderingContextBeOS::PopState(void) { PRUint32 cnt = mStateCache->Count(); nsGraphicsState *state; @@ -235,8 +232,6 @@ NS_IMETHODIMP nsRenderingContextBeOS::PopState(PRBool &aClipEmpty) { #endif } - if (mClipRegion) aClipEmpty = mClipRegion->IsEmpty(); - else aClipEmpty = PR_TRUE; return NS_OK; } diff --git a/mozilla/gfx/src/beos/nsRenderingContextBeOS.h b/mozilla/gfx/src/beos/nsRenderingContextBeOS.h index 808a41aaa67..ff9289d4427 100644 --- a/mozilla/gfx/src/beos/nsRenderingContextBeOS.h +++ b/mozilla/gfx/src/beos/nsRenderingContextBeOS.h @@ -79,7 +79,7 @@ public: NS_IMETHOD GetHints(PRUint32 &aResult); NS_IMETHOD PushState(); - NS_IMETHOD PopState(PRBool &aClipEmpty); + NS_IMETHOD PopState(); NS_IMETHOD IsVisibleRect(const nsRect &aRect, PRBool &aVisible); diff --git a/mozilla/gfx/src/gtk/nsImageGTK.cpp b/mozilla/gfx/src/gtk/nsImageGTK.cpp index d8f148cb495..7835f533566 100644 --- a/mozilla/gfx/src/gtk/nsImageGTK.cpp +++ b/mozilla/gfx/src/gtk/nsImageGTK.cpp @@ -1770,7 +1770,7 @@ NS_IMETHODIMP nsImageGTK::DrawTile(nsIRenderingContext &aContext, PR_MIN(validHeight, aY1-y)); } - aContext.PopState(clipState); + aContext.PopState(); return NS_OK; } diff --git a/mozilla/gfx/src/gtk/nsRenderingContextGTK.cpp b/mozilla/gfx/src/gtk/nsRenderingContextGTK.cpp index 28061edef69..ce92dec07f9 100644 --- a/mozilla/gfx/src/gtk/nsRenderingContextGTK.cpp +++ b/mozilla/gfx/src/gtk/nsRenderingContextGTK.cpp @@ -96,10 +96,7 @@ nsRenderingContextGTK::~nsRenderingContextGTK() PRInt32 cnt = mStateCache.Count(); while (--cnt >= 0) - { - PRBool clipstate; - PopState(clipstate); - } + PopState(); if (mTranMatrix) delete mTranMatrix; @@ -233,8 +230,7 @@ NS_IMETHODIMP nsRenderingContextGTK::LockDrawingSurface(PRInt32 aX, PRInt32 aY, NS_IMETHODIMP nsRenderingContextGTK::UnlockDrawingSurface(void) { - PRBool clipstate; - PopState(clipstate); + PopState(); mSurface->Unlock(); @@ -348,7 +344,7 @@ NS_IMETHODIMP nsRenderingContextGTK::PushState(void) return NS_OK; } -NS_IMETHODIMP nsRenderingContextGTK::PopState(PRBool &aClipEmpty) +NS_IMETHODIMP nsRenderingContextGTK::PopState(void) { PRUint32 cnt = mStateCache.Count(); nsGraphicsState * state; @@ -383,11 +379,6 @@ NS_IMETHODIMP nsRenderingContextGTK::PopState(PRBool &aClipEmpty) #endif } - if (mClipRegion) - aClipEmpty = mClipRegion->IsEmpty(); - else - aClipEmpty = PR_TRUE; - return NS_OK; } @@ -791,8 +782,7 @@ NS_IMETHODIMP nsRenderingContextGTK::CreateDrawingSurface(const nsRect &aBounds, mClipRegion = nsnull; UpdateGC(); rv = surf->Init(mGC, aBounds.width, aBounds.height, aSurfFlags); - PRBool empty; - PopState(empty); + PopState(); } else { rv = NS_ERROR_FAILURE; } diff --git a/mozilla/gfx/src/gtk/nsRenderingContextGTK.h b/mozilla/gfx/src/gtk/nsRenderingContextGTK.h index c3bb8d8c54f..eed23b448f7 100644 --- a/mozilla/gfx/src/gtk/nsRenderingContextGTK.h +++ b/mozilla/gfx/src/gtk/nsRenderingContextGTK.h @@ -87,7 +87,7 @@ public: NS_IMETHOD PushState(PRInt32 aFlags); #endif NS_IMETHOD PushState(void); - NS_IMETHOD PopState(PRBool &aClipEmpty); + NS_IMETHOD PopState(void); NS_IMETHOD IsVisibleRect(const nsRect& aRect, PRBool &aVisible); diff --git a/mozilla/gfx/src/mac/nsRenderingContextMac.cpp b/mozilla/gfx/src/mac/nsRenderingContextMac.cpp index e2581f9c3ce..5101940b67a 100644 --- a/mozilla/gfx/src/mac/nsRenderingContextMac.cpp +++ b/mozilla/gfx/src/mac/nsRenderingContextMac.cpp @@ -314,7 +314,7 @@ NS_IMETHODIMP nsRenderingContextMac::PushState(void) //------------------------------------------------------------------------ -NS_IMETHODIMP nsRenderingContextMac::PopState(PRBool &aClipEmpty) +NS_IMETHODIMP nsRenderingContextMac::PopState(void) { NS_ASSERTION(ValidateDrawingState(), "Bad drawing state"); @@ -342,8 +342,6 @@ NS_IMETHODIMP nsRenderingContextMac::PopState(PRBool &aClipEmpty) mTranMatrix = &(mGS->mTMatrix); } - aClipEmpty = (::EmptyRgn(mGS->mClipRegion)); - return NS_OK; } @@ -366,8 +364,7 @@ NS_IMETHODIMP nsRenderingContextMac::LockDrawingSurface(PRInt32 aX, PRInt32 aY, NS_IMETHODIMP nsRenderingContextMac::UnlockDrawingSurface(void) { - PRBool clipstate; - PopState(clipstate); + PopState(); mCurrentSurface->Unlock(); diff --git a/mozilla/gfx/src/mac/nsRenderingContextMac.h b/mozilla/gfx/src/mac/nsRenderingContextMac.h index 712b3637d2d..b0556e6e507 100644 --- a/mozilla/gfx/src/mac/nsRenderingContextMac.h +++ b/mozilla/gfx/src/mac/nsRenderingContextMac.h @@ -82,7 +82,7 @@ public: NS_IMETHOD GetDrawingSurface(nsDrawingSurface *aSurface); NS_IMETHOD GetHints(PRUint32& aResult); NS_IMETHOD PushState(void); - NS_IMETHOD PopState(PRBool &aClipEmpty); + NS_IMETHOD PopState(void); NS_IMETHOD IsVisibleRect(const nsRect& aRect, PRBool &aVisible); NS_IMETHOD SetClipRect(const nsRect& aRect, nsClipCombine aCombine, PRBool &aClipEmpty); NS_IMETHOD GetClipRect(nsRect &aRect, PRBool &aClipValid); diff --git a/mozilla/gfx/src/os2/nsRenderingContextOS2.cpp b/mozilla/gfx/src/os2/nsRenderingContextOS2.cpp index 91c95f02987..4619598b5ba 100644 --- a/mozilla/gfx/src/os2/nsRenderingContextOS2.cpp +++ b/mozilla/gfx/src/os2/nsRenderingContextOS2.cpp @@ -156,8 +156,7 @@ nsRenderingContextOS2::~nsRenderingContextOS2() NS_IF_RELEASE(mFontMetrics); //destroy the initial GraphicsState - PRBool clipState; - PopState (clipState); + PopState (); if (nsnull != mStateCache) { @@ -327,8 +326,7 @@ NS_IMETHODIMP nsRenderingContextOS2::UnlockDrawingSurface() { mSurface->Unlock(); - PRBool clipstate; - PopState(clipstate); + PopState(); return NS_OK; } @@ -437,10 +435,8 @@ NS_IMETHODIMP nsRenderingContextOS2 :: PushState(void) return NS_OK; } -NS_IMETHODIMP nsRenderingContextOS2 :: PopState(PRBool &aClipEmpty) +NS_IMETHODIMP nsRenderingContextOS2 :: PopState(void) { - PRBool retval = PR_FALSE; - if (nsnull == mStates) { NS_ASSERTION(!(nsnull == mStates), "state underflow"); @@ -475,9 +471,6 @@ NS_IMETHODIMP nsRenderingContextOS2 :: PopState(PRBool &aClipEmpty) HRGN hrgn = GFX (::GpiCreateRegion (mPS, 0, NULL), RGN_ERROR); GFX (::GpiCombineRegion (mPS, hrgn, pstate->mClipRegion, 0, CRGN_COPY), RGN_ERROR); int cliptype = OS2_SetClipRegion (mPS, hrgn); - - if (cliptype == RGN_NULL) - retval = PR_TRUE; } } @@ -494,8 +487,6 @@ NS_IMETHODIMP nsRenderingContextOS2 :: PopState(PRBool &aClipEmpty) mTranMatrix = nsnull; } - aClipEmpty = retval; - return NS_OK; } diff --git a/mozilla/gfx/src/os2/nsRenderingContextOS2.h b/mozilla/gfx/src/os2/nsRenderingContextOS2.h index 37181462a14..9fe6af5014e 100644 --- a/mozilla/gfx/src/os2/nsRenderingContextOS2.h +++ b/mozilla/gfx/src/os2/nsRenderingContextOS2.h @@ -94,7 +94,7 @@ public: NS_IMETHOD GetHints(PRUint32& aResult); NS_IMETHOD PushState(void); - NS_IMETHOD PopState(PRBool &aClipState); + NS_IMETHOD PopState(void); NS_IMETHOD IsVisibleRect(const nsRect& aRect, PRBool &aClipState); diff --git a/mozilla/gfx/src/photon/nsRenderingContextPh.cpp b/mozilla/gfx/src/photon/nsRenderingContextPh.cpp index c85ca062e20..fdf7fd45e43 100644 --- a/mozilla/gfx/src/photon/nsRenderingContextPh.cpp +++ b/mozilla/gfx/src/photon/nsRenderingContextPh.cpp @@ -216,7 +216,7 @@ NS_IMETHODIMP nsRenderingContextPh :: PushState( void ) return NS_OK; } -NS_IMETHODIMP nsRenderingContextPh :: PopState( PRBool &aClipEmpty ) +NS_IMETHODIMP nsRenderingContextPh :: PopState(void) { PRUint32 cnt = mStateCache->Count(); nsGraphicsState * state; @@ -250,10 +250,6 @@ NS_IMETHODIMP nsRenderingContextPh :: PopState( PRBool &aClipEmpty ) #endif } - if( mClipRegion ) - aClipEmpty = mClipRegion->IsEmpty(); - else - aClipEmpty = PR_TRUE; return NS_OK; } diff --git a/mozilla/gfx/src/photon/nsRenderingContextPh.h b/mozilla/gfx/src/photon/nsRenderingContextPh.h index b1625d5e455..0efaaaf6ca6 100644 --- a/mozilla/gfx/src/photon/nsRenderingContextPh.h +++ b/mozilla/gfx/src/photon/nsRenderingContextPh.h @@ -111,8 +111,7 @@ public: inline NS_IMETHODIMP UnlockDrawingSurface(void) - { PRBool clipstate; - PopState( clipstate ); + { PopState(); mSurface->Unlock(); return NS_OK; } @@ -136,7 +135,7 @@ public: } NS_IMETHOD PushState(void); - NS_IMETHOD PopState(PRBool &aClipState); + NS_IMETHOD PopState(void); inline NS_IMETHODIMP IsVisibleRect( const nsRect& aRect, PRBool &aVisible ) diff --git a/mozilla/gfx/src/ps/nsRenderingContextPS.cpp b/mozilla/gfx/src/ps/nsRenderingContextPS.cpp index a0c2a620ce8..636e1f7ea4f 100644 --- a/mozilla/gfx/src/ps/nsRenderingContextPS.cpp +++ b/mozilla/gfx/src/ps/nsRenderingContextPS.cpp @@ -318,10 +318,8 @@ nsRenderingContextPS :: PushState(void) * @update 12/21/98 dwc */ NS_IMETHODIMP -nsRenderingContextPS :: PopState(PRBool &aClipEmpty) +nsRenderingContextPS :: PopState(void) { - PRBool retval = PR_FALSE; - if (nsnull == mStates){ NS_ASSERTION(!(nsnull == mStates), "state underflow"); } else { @@ -339,7 +337,6 @@ nsRenderingContextPS :: PopState(PRBool &aClipEmpty) mTranMatrix = nsnull; } - aClipEmpty = retval; mPSObj->graphics_restore(); return NS_OK; diff --git a/mozilla/gfx/src/ps/nsRenderingContextPS.h b/mozilla/gfx/src/ps/nsRenderingContextPS.h index 6d018f9d389..70c4189ab39 100644 --- a/mozilla/gfx/src/ps/nsRenderingContextPS.h +++ b/mozilla/gfx/src/ps/nsRenderingContextPS.h @@ -87,7 +87,7 @@ public: NS_IMETHOD GetHints(PRUint32& aResult); NS_IMETHOD PushState(void); - NS_IMETHOD PopState(PRBool &aClipState); + NS_IMETHOD PopState(void); NS_IMETHOD IsVisibleRect(const nsRect& aRect, PRBool &aClipState); diff --git a/mozilla/gfx/src/windows/nsRenderingContextWin.cpp b/mozilla/gfx/src/windows/nsRenderingContextWin.cpp index e142ebcad57..cb4391eb699 100644 --- a/mozilla/gfx/src/windows/nsRenderingContextWin.cpp +++ b/mozilla/gfx/src/windows/nsRenderingContextWin.cpp @@ -244,8 +244,7 @@ nsRenderingContextWin :: ~nsRenderingContextWin() //destroy the initial GraphicsState - PRBool clipState; - PopState(clipState); + PopState(); //cleanup the DC so that we can just destroy objects //in the graphics state without worrying that we are @@ -549,7 +548,7 @@ NS_IMETHODIMP nsRenderingContextWin :: UnlockDrawingSurface(void) mSurface->Unlock(); mSurface->GetDC(&mDC); - PopState(clipstate); + PopState(); mSurface->IsReleaseDCDestructive(&clipstate); @@ -707,10 +706,8 @@ NS_IMETHODIMP nsRenderingContextWin :: PushState(void) return NS_OK; } -NS_IMETHODIMP nsRenderingContextWin :: PopState(PRBool &aClipEmpty) +NS_IMETHODIMP nsRenderingContextWin :: PopState(void) { - PRBool retval = PR_FALSE; - if (nsnull == mStates) { NS_ASSERTION(!(nsnull == mStates), "state underflow"); @@ -740,12 +737,7 @@ NS_IMETHODIMP nsRenderingContextWin :: PopState(PRBool &aClipEmpty) pstate = pstate->mNext; if (nsnull != pstate) - { - int cliptype = ::SelectClipRgn(mDC, pstate->mClipRegion); - - if (cliptype == NULLREGION) - retval = PR_TRUE; - } + ::SelectClipRgn(mDC, pstate->mClipRegion); } oldstate->mFlags &= ~FLAGS_ALL; @@ -765,8 +757,6 @@ NS_IMETHODIMP nsRenderingContextWin :: PopState(PRBool &aClipEmpty) mTranMatrix = nsnull; } - aClipEmpty = retval; - return NS_OK; } diff --git a/mozilla/gfx/src/windows/nsRenderingContextWin.h b/mozilla/gfx/src/windows/nsRenderingContextWin.h index 3fbee7b94ae..b6e5d29a759 100644 --- a/mozilla/gfx/src/windows/nsRenderingContextWin.h +++ b/mozilla/gfx/src/windows/nsRenderingContextWin.h @@ -87,7 +87,7 @@ public: NS_IMETHOD GetHints(PRUint32& aResult); NS_IMETHOD PushState(void); - NS_IMETHOD PopState(PRBool &aClipState); + NS_IMETHOD PopState(void); NS_IMETHOD IsVisibleRect(const nsRect& aRect, PRBool &aClipState); diff --git a/mozilla/gfx/src/xlib/nsRenderingContextXlib.cpp b/mozilla/gfx/src/xlib/nsRenderingContextXlib.cpp index 94f4ff1a18e..2ae7037bebc 100644 --- a/mozilla/gfx/src/xlib/nsRenderingContextXlib.cpp +++ b/mozilla/gfx/src/xlib/nsRenderingContextXlib.cpp @@ -156,10 +156,8 @@ nsRenderingContextXlib::~nsRenderingContextXlib() /* Destroy the State Machine */ PRInt32 cnt = mStateCache.Count(); - while (--cnt >= 0) { - PRBool clipstate; - PopState(clipstate); - } + while (--cnt >= 0) + PopState(); if (mTranMatrix) delete mTranMatrix; @@ -336,8 +334,7 @@ NS_IMETHODIMP nsRenderingContextXlib::UnlockDrawingSurface(void) { PR_LOG(RenderingContextXlibLM, PR_LOG_DEBUG, ("nsRenderingContextXlib::UnlockDrawingSurface()\n")); - PRBool clipstate; - PopState(clipstate); + PopState(); mSurface->Unlock(); @@ -413,7 +410,7 @@ nsRenderingContextXlib::PushState(void) } NS_IMETHODIMP -nsRenderingContextXlib::PopState(PRBool &aClipState) +nsRenderingContextXlib::PopState(void) { PR_LOG(RenderingContextXlibLM, PR_LOG_DEBUG, ("nsRenderingContextXlib::PopState()\n")); @@ -440,11 +437,6 @@ nsRenderingContextXlib::PopState(PRBool &aClipState) delete state; } - if (mClipRegion) - aClipState = mClipRegion->IsEmpty(); - else - aClipState = PR_TRUE; - return NS_OK; } diff --git a/mozilla/gfx/src/xlib/nsRenderingContextXlib.h b/mozilla/gfx/src/xlib/nsRenderingContextXlib.h index ca3011b5417..fd262a7eb85 100644 --- a/mozilla/gfx/src/xlib/nsRenderingContextXlib.h +++ b/mozilla/gfx/src/xlib/nsRenderingContextXlib.h @@ -87,7 +87,7 @@ public: NS_IMETHOD GetHints(PRUint32& aResult); NS_IMETHOD PushState(void); - NS_IMETHOD PopState(PRBool &aClipEmpty); + NS_IMETHOD PopState(void); NS_IMETHOD IsVisibleRect(const nsRect& aRect, PRBool &aVisible); diff --git a/mozilla/gfx/src/xprint/nsRenderingContextXp.cpp b/mozilla/gfx/src/xprint/nsRenderingContextXp.cpp index 3b44431e600..728c1026dee 100644 --- a/mozilla/gfx/src/xprint/nsRenderingContextXp.cpp +++ b/mozilla/gfx/src/xprint/nsRenderingContextXp.cpp @@ -124,8 +124,7 @@ NS_IMETHODIMP nsRenderingContextXp::UnlockDrawingSurface(void) { PR_LOG(RenderingContextXpLM, PR_LOG_DEBUG, ("nsRenderingContextXp::UnlockDrawingSurface()\n")); - PRBool clipstate; - PopState(clipstate); + PopState(); return NS_OK; } diff --git a/mozilla/layout/base/nsCSSRendering.cpp b/mozilla/layout/base/nsCSSRendering.cpp index 0b114bac13d..dac29474460 100644 --- a/mozilla/layout/base/nsCSSRendering.cpp +++ b/mozilla/layout/base/nsCSSRendering.cpp @@ -2126,7 +2126,7 @@ nscoord width; for(i=0;i<4;i++){ if(borderRadii[i] > 0){ PaintRoundedBorder(aPresContext,aRenderingContext,aForFrame,aDirtyRect,aBorderArea,nsnull,&aOutlineStyle,aStyleContext,aSkipSides,borderRadii,aGap,PR_TRUE); - aRenderingContext.PopState(clipState); + aRenderingContext.PopState(); return; } } @@ -2138,7 +2138,7 @@ nscoord width; (outlineStyle == NS_STYLE_BORDER_STYLE_DASHED)) { DrawDashedSides(0, aRenderingContext, aDirtyRect, ourColor, nsnull, &aOutlineStyle, PR_TRUE, outside, inside, aSkipSides, aGap); - aRenderingContext.PopState(clipState); + aRenderingContext.PopState(); return; } @@ -2194,7 +2194,7 @@ nscoord width; } } // Restore clipping - aRenderingContext.PopState(clipState); + aRenderingContext.PopState(); } /* draw the edges of the border described in aBorderEdges one segment at a time. diff --git a/mozilla/layout/base/nsCaret.cpp b/mozilla/layout/base/nsCaret.cpp index 12d2fb0b88e..f8889a7af2f 100644 --- a/mozilla/layout/base/nsCaret.cpp +++ b/mozilla/layout/base/nsCaret.cpp @@ -1103,8 +1103,7 @@ void nsCaret::GetCaretRectAndInvert() { if (NS_SUCCEEDED(domSelection->SelectionLanguageChange(mKeyboardRTL))) { - PRBool emptyClip; - mRendContext->PopState(emptyClip); + mRendContext->PopState(); return; } } @@ -1135,8 +1134,7 @@ void nsCaret::GetCaretRectAndInvert() mRendContext->InvertRect(mHookRect); #endif - PRBool emptyClip; - mRendContext->PopState(emptyClip); + mRendContext->PopState(); ToggleDrawnStatus(); diff --git a/mozilla/layout/base/nsPresShell.cpp b/mozilla/layout/base/nsPresShell.cpp index d7f498f5838..0db2a2e4463 100644 --- a/mozilla/layout/base/nsPresShell.cpp +++ b/mozilla/layout/base/nsPresShell.cpp @@ -5542,10 +5542,8 @@ PresShell::Paint(nsIView *aView, rv = frame->Paint(mPresContext, aRenderingContext, aDirtyRect, NS_FRAME_PAINT_LAYER_FOREGROUND); - if (setClipRect) { - PRBool clipState; - aRenderingContext.PopState(clipState); - } + if (setClipRect) + aRenderingContext.PopState(); #ifdef NS_DEBUG // Draw a border around the frame @@ -7494,8 +7492,7 @@ void ReflowCountMgr::PaintCount(const char * aName, aRenderingContext->SetColor(color); aRenderingContext->DrawString(buf, strlen(buf), x,y); - PRBool clipEmpty; - aRenderingContext->PopState(clipEmpty); + aRenderingContext->PopState(); } } } diff --git a/mozilla/layout/base/src/nsCaret.cpp b/mozilla/layout/base/src/nsCaret.cpp index 12d2fb0b88e..f8889a7af2f 100644 --- a/mozilla/layout/base/src/nsCaret.cpp +++ b/mozilla/layout/base/src/nsCaret.cpp @@ -1103,8 +1103,7 @@ void nsCaret::GetCaretRectAndInvert() { if (NS_SUCCEEDED(domSelection->SelectionLanguageChange(mKeyboardRTL))) { - PRBool emptyClip; - mRendContext->PopState(emptyClip); + mRendContext->PopState(); return; } } @@ -1135,8 +1134,7 @@ void nsCaret::GetCaretRectAndInvert() mRendContext->InvertRect(mHookRect); #endif - PRBool emptyClip; - mRendContext->PopState(emptyClip); + mRendContext->PopState(); ToggleDrawnStatus(); diff --git a/mozilla/layout/forms/nsComboboxControlFrame.cpp b/mozilla/layout/forms/nsComboboxControlFrame.cpp index f5878263561..e42feb8a97b 100644 --- a/mozilla/layout/forms/nsComboboxControlFrame.cpp +++ b/mozilla/layout/forms/nsComboboxControlFrame.cpp @@ -2392,7 +2392,7 @@ nsComboboxControlFrame::Paint(nsIPresContext* aPresContext, clipRect.x, clipRect.y); } ///////////////////// - aRenderingContext.PopState(clipEmpty); + aRenderingContext.PopState(); } #endif } diff --git a/mozilla/layout/forms/nsFieldSetFrame.cpp b/mozilla/layout/forms/nsFieldSetFrame.cpp index 25ebaa8b59b..5862b4e6f89 100644 --- a/mozilla/layout/forms/nsFieldSetFrame.cpp +++ b/mozilla/layout/forms/nsFieldSetFrame.cpp @@ -227,7 +227,7 @@ nsFieldSetFrame::Paint(nsIPresContext* aPresContext, nsCSSRendering::PaintBorder(aPresContext, aRenderingContext, this, aDirtyRect, rect, *borderStyle, mStyleContext, skipSides); - aRenderingContext.PopState(clipState); + aRenderingContext.PopState(); // draw right side @@ -241,7 +241,7 @@ nsFieldSetFrame::Paint(nsIPresContext* aPresContext, nsCSSRendering::PaintBorder(aPresContext, aRenderingContext, this, aDirtyRect, rect, *borderStyle, mStyleContext, skipSides); - aRenderingContext.PopState(clipState); + aRenderingContext.PopState(); // draw bottom @@ -255,7 +255,7 @@ nsFieldSetFrame::Paint(nsIPresContext* aPresContext, nsCSSRendering::PaintBorder(aPresContext, aRenderingContext, this, aDirtyRect, rect, *borderStyle, mStyleContext, skipSides); - aRenderingContext.PopState(clipState); + aRenderingContext.PopState(); } else { nsCSSRendering::PaintBorder(aPresContext, aRenderingContext, this, diff --git a/mozilla/layout/forms/nsGfxCheckboxControlFrame.cpp b/mozilla/layout/forms/nsGfxCheckboxControlFrame.cpp index a7ed354ff7f..d9f9e566d42 100644 --- a/mozilla/layout/forms/nsGfxCheckboxControlFrame.cpp +++ b/mozilla/layout/forms/nsGfxCheckboxControlFrame.cpp @@ -206,8 +206,7 @@ nsGfxCheckboxControlFrame::PaintCheckBox(nsIPresContext* aPresContext, nsFormControlHelper::PaintCheckMark(aRenderingContext, p2t, checkRect); } - PRBool clip; - aRenderingContext.PopState(clip); + aRenderingContext.PopState(); } diff --git a/mozilla/layout/forms/nsHTMLButtonControlFrame.cpp b/mozilla/layout/forms/nsHTMLButtonControlFrame.cpp index 737e3923048..6c4bd4efe5a 100644 --- a/mozilla/layout/forms/nsHTMLButtonControlFrame.cpp +++ b/mozilla/layout/forms/nsHTMLButtonControlFrame.cpp @@ -353,7 +353,7 @@ nsHTMLButtonControlFrame::Paint(nsIPresContext* aPresContext, PaintChildren(aPresContext, aRenderingContext, aDirtyRect, NS_FRAME_PAINT_LAYER_FLOATS); PaintChildren(aPresContext, aRenderingContext, aDirtyRect, NS_FRAME_PAINT_LAYER_FOREGROUND); - aRenderingContext.PopState(clipEmpty); + aRenderingContext.PopState(); #endif diff --git a/mozilla/layout/generic/nsBlockFrame.cpp b/mozilla/layout/generic/nsBlockFrame.cpp index b8d81cb96ef..50cd1ad0eee 100644 --- a/mozilla/layout/generic/nsBlockFrame.cpp +++ b/mozilla/layout/generic/nsBlockFrame.cpp @@ -5242,10 +5242,8 @@ nsBlockFrame::Paint(nsIPresContext* aPresContext, PaintDecorationsAndChildren(aPresContext, aRenderingContext, aDirtyRect, aWhichLayer, PR_TRUE); - if (NS_STYLE_OVERFLOW_HIDDEN == disp->mOverflow) { - PRBool clipState; - aRenderingContext.PopState(clipState); - } + if (NS_STYLE_OVERFLOW_HIDDEN == disp->mOverflow) + aRenderingContext.PopState(); #if 0 if ((NS_FRAME_PAINT_LAYER_DEBUG == aWhichLayer) && GetShowFrameBorders()) { diff --git a/mozilla/layout/generic/nsImageFrame.cpp b/mozilla/layout/generic/nsImageFrame.cpp index 2633d1ed75e..6b4cc8e6532 100644 --- a/mozilla/layout/generic/nsImageFrame.cpp +++ b/mozilla/layout/generic/nsImageFrame.cpp @@ -1173,7 +1173,7 @@ nsImageFrame::DisplayAltFeedback(nsIPresContext* aPresContext, } } - aRenderingContext.PopState(clipState); + aRenderingContext.PopState(); } NS_METHOD @@ -1309,13 +1309,12 @@ nsImageFrame::Paint(nsIPresContext* aPresContext, if (nsnull != map) { nsRect inner; GetInnerArea(aPresContext, inner); - PRBool clipState; aRenderingContext.SetColor(NS_RGB(0, 0, 0)); aRenderingContext.SetLineStyle(nsLineStyle_kDotted); aRenderingContext.PushState(); aRenderingContext.Translate(inner.x, inner.y); map->Draw(aPresContext, aRenderingContext); - aRenderingContext.PopState(clipState); + aRenderingContext.PopState(); paintOutline = PR_TRUE; } @@ -1337,12 +1336,11 @@ nsImageFrame::Paint(nsIPresContext* aPresContext, if (nsnull != map) { nsRect inner; GetInnerArea(aPresContext, inner); - PRBool clipState; aRenderingContext.SetColor(NS_RGB(0, 0, 0)); aRenderingContext.PushState(); aRenderingContext.Translate(inner.x, inner.y); map->Draw(aPresContext, aRenderingContext); - aRenderingContext.PopState(clipState); + aRenderingContext.PopState(); } } #endif diff --git a/mozilla/layout/generic/nsPageContentFrame.cpp b/mozilla/layout/generic/nsPageContentFrame.cpp index 148e1aae71d..3743aaf769e 100644 --- a/mozilla/layout/generic/nsPageContentFrame.cpp +++ b/mozilla/layout/generic/nsPageContentFrame.cpp @@ -210,7 +210,7 @@ nsPageContentFrame::Paint(nsIPresContext* aPresContext, } #endif - aRenderingContext.PopState(clipEmpty); + aRenderingContext.PopState(); return rv; } diff --git a/mozilla/layout/generic/nsPageFrame.cpp b/mozilla/layout/generic/nsPageFrame.cpp index a9be00b5442..3e2b11700a6 100644 --- a/mozilla/layout/generic/nsPageFrame.cpp +++ b/mozilla/layout/generic/nsPageFrame.cpp @@ -552,7 +552,7 @@ nsPageFrame::DrawHeaderFooter(nsIPresContext* aPresContext, if (NS_FAILED(rv)) #endif // IBMBIDI aRenderingContext.DrawString(str, x, y + aAscent); - aRenderingContext.PopState(clipEmpty); + aRenderingContext.PopState(); #ifdef DEBUG_PRINTING PR_PL(("Page: %p", this)); @@ -698,7 +698,7 @@ nsPageFrame::Paint(nsIPresContext* aPresContext, } - aRenderingContext.PopState(clipEmpty); + aRenderingContext.PopState(); return rv; } diff --git a/mozilla/layout/generic/nsSimplePageSequence.cpp b/mozilla/layout/generic/nsSimplePageSequence.cpp index 13c61731ba7..44dc0223f6f 100644 --- a/mozilla/layout/generic/nsSimplePageSequence.cpp +++ b/mozilla/layout/generic/nsSimplePageSequence.cpp @@ -1013,8 +1013,7 @@ nsSimplePageSequenceFrame::Paint(nsIPresContext* aPresContext, nsresult rv = nsContainerFrame::Paint(aPresContext, aRenderingContext, aDirtyRect, aWhichLayer); - PRBool clipEmpty; - aRenderingContext.PopState(clipEmpty); + aRenderingContext.PopState(); return rv; } diff --git a/mozilla/layout/html/base/src/nsBlockFrame.cpp b/mozilla/layout/html/base/src/nsBlockFrame.cpp index b8d81cb96ef..50cd1ad0eee 100644 --- a/mozilla/layout/html/base/src/nsBlockFrame.cpp +++ b/mozilla/layout/html/base/src/nsBlockFrame.cpp @@ -5242,10 +5242,8 @@ nsBlockFrame::Paint(nsIPresContext* aPresContext, PaintDecorationsAndChildren(aPresContext, aRenderingContext, aDirtyRect, aWhichLayer, PR_TRUE); - if (NS_STYLE_OVERFLOW_HIDDEN == disp->mOverflow) { - PRBool clipState; - aRenderingContext.PopState(clipState); - } + if (NS_STYLE_OVERFLOW_HIDDEN == disp->mOverflow) + aRenderingContext.PopState(); #if 0 if ((NS_FRAME_PAINT_LAYER_DEBUG == aWhichLayer) && GetShowFrameBorders()) { diff --git a/mozilla/layout/html/base/src/nsImageFrame.cpp b/mozilla/layout/html/base/src/nsImageFrame.cpp index 2633d1ed75e..6b4cc8e6532 100644 --- a/mozilla/layout/html/base/src/nsImageFrame.cpp +++ b/mozilla/layout/html/base/src/nsImageFrame.cpp @@ -1173,7 +1173,7 @@ nsImageFrame::DisplayAltFeedback(nsIPresContext* aPresContext, } } - aRenderingContext.PopState(clipState); + aRenderingContext.PopState(); } NS_METHOD @@ -1309,13 +1309,12 @@ nsImageFrame::Paint(nsIPresContext* aPresContext, if (nsnull != map) { nsRect inner; GetInnerArea(aPresContext, inner); - PRBool clipState; aRenderingContext.SetColor(NS_RGB(0, 0, 0)); aRenderingContext.SetLineStyle(nsLineStyle_kDotted); aRenderingContext.PushState(); aRenderingContext.Translate(inner.x, inner.y); map->Draw(aPresContext, aRenderingContext); - aRenderingContext.PopState(clipState); + aRenderingContext.PopState(); paintOutline = PR_TRUE; } @@ -1337,12 +1336,11 @@ nsImageFrame::Paint(nsIPresContext* aPresContext, if (nsnull != map) { nsRect inner; GetInnerArea(aPresContext, inner); - PRBool clipState; aRenderingContext.SetColor(NS_RGB(0, 0, 0)); aRenderingContext.PushState(); aRenderingContext.Translate(inner.x, inner.y); map->Draw(aPresContext, aRenderingContext); - aRenderingContext.PopState(clipState); + aRenderingContext.PopState(); } } #endif diff --git a/mozilla/layout/html/base/src/nsPageContentFrame.cpp b/mozilla/layout/html/base/src/nsPageContentFrame.cpp index 148e1aae71d..3743aaf769e 100644 --- a/mozilla/layout/html/base/src/nsPageContentFrame.cpp +++ b/mozilla/layout/html/base/src/nsPageContentFrame.cpp @@ -210,7 +210,7 @@ nsPageContentFrame::Paint(nsIPresContext* aPresContext, } #endif - aRenderingContext.PopState(clipEmpty); + aRenderingContext.PopState(); return rv; } diff --git a/mozilla/layout/html/base/src/nsPageFrame.cpp b/mozilla/layout/html/base/src/nsPageFrame.cpp index a9be00b5442..3e2b11700a6 100644 --- a/mozilla/layout/html/base/src/nsPageFrame.cpp +++ b/mozilla/layout/html/base/src/nsPageFrame.cpp @@ -552,7 +552,7 @@ nsPageFrame::DrawHeaderFooter(nsIPresContext* aPresContext, if (NS_FAILED(rv)) #endif // IBMBIDI aRenderingContext.DrawString(str, x, y + aAscent); - aRenderingContext.PopState(clipEmpty); + aRenderingContext.PopState(); #ifdef DEBUG_PRINTING PR_PL(("Page: %p", this)); @@ -698,7 +698,7 @@ nsPageFrame::Paint(nsIPresContext* aPresContext, } - aRenderingContext.PopState(clipEmpty); + aRenderingContext.PopState(); return rv; } diff --git a/mozilla/layout/html/base/src/nsPresShell.cpp b/mozilla/layout/html/base/src/nsPresShell.cpp index d7f498f5838..0db2a2e4463 100644 --- a/mozilla/layout/html/base/src/nsPresShell.cpp +++ b/mozilla/layout/html/base/src/nsPresShell.cpp @@ -5542,10 +5542,8 @@ PresShell::Paint(nsIView *aView, rv = frame->Paint(mPresContext, aRenderingContext, aDirtyRect, NS_FRAME_PAINT_LAYER_FOREGROUND); - if (setClipRect) { - PRBool clipState; - aRenderingContext.PopState(clipState); - } + if (setClipRect) + aRenderingContext.PopState(); #ifdef NS_DEBUG // Draw a border around the frame @@ -7494,8 +7492,7 @@ void ReflowCountMgr::PaintCount(const char * aName, aRenderingContext->SetColor(color); aRenderingContext->DrawString(buf, strlen(buf), x,y); - PRBool clipEmpty; - aRenderingContext->PopState(clipEmpty); + aRenderingContext->PopState(); } } } diff --git a/mozilla/layout/html/base/src/nsSimplePageSequence.cpp b/mozilla/layout/html/base/src/nsSimplePageSequence.cpp index 13c61731ba7..44dc0223f6f 100644 --- a/mozilla/layout/html/base/src/nsSimplePageSequence.cpp +++ b/mozilla/layout/html/base/src/nsSimplePageSequence.cpp @@ -1013,8 +1013,7 @@ nsSimplePageSequenceFrame::Paint(nsIPresContext* aPresContext, nsresult rv = nsContainerFrame::Paint(aPresContext, aRenderingContext, aDirtyRect, aWhichLayer); - PRBool clipEmpty; - aRenderingContext.PopState(clipEmpty); + aRenderingContext.PopState(); return rv; } diff --git a/mozilla/layout/html/forms/src/nsComboboxControlFrame.cpp b/mozilla/layout/html/forms/src/nsComboboxControlFrame.cpp index f5878263561..e42feb8a97b 100644 --- a/mozilla/layout/html/forms/src/nsComboboxControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsComboboxControlFrame.cpp @@ -2392,7 +2392,7 @@ nsComboboxControlFrame::Paint(nsIPresContext* aPresContext, clipRect.x, clipRect.y); } ///////////////////// - aRenderingContext.PopState(clipEmpty); + aRenderingContext.PopState(); } #endif } diff --git a/mozilla/layout/html/forms/src/nsFieldSetFrame.cpp b/mozilla/layout/html/forms/src/nsFieldSetFrame.cpp index 25ebaa8b59b..5862b4e6f89 100644 --- a/mozilla/layout/html/forms/src/nsFieldSetFrame.cpp +++ b/mozilla/layout/html/forms/src/nsFieldSetFrame.cpp @@ -227,7 +227,7 @@ nsFieldSetFrame::Paint(nsIPresContext* aPresContext, nsCSSRendering::PaintBorder(aPresContext, aRenderingContext, this, aDirtyRect, rect, *borderStyle, mStyleContext, skipSides); - aRenderingContext.PopState(clipState); + aRenderingContext.PopState(); // draw right side @@ -241,7 +241,7 @@ nsFieldSetFrame::Paint(nsIPresContext* aPresContext, nsCSSRendering::PaintBorder(aPresContext, aRenderingContext, this, aDirtyRect, rect, *borderStyle, mStyleContext, skipSides); - aRenderingContext.PopState(clipState); + aRenderingContext.PopState(); // draw bottom @@ -255,7 +255,7 @@ nsFieldSetFrame::Paint(nsIPresContext* aPresContext, nsCSSRendering::PaintBorder(aPresContext, aRenderingContext, this, aDirtyRect, rect, *borderStyle, mStyleContext, skipSides); - aRenderingContext.PopState(clipState); + aRenderingContext.PopState(); } else { nsCSSRendering::PaintBorder(aPresContext, aRenderingContext, this, diff --git a/mozilla/layout/html/forms/src/nsGfxCheckboxControlFrame.cpp b/mozilla/layout/html/forms/src/nsGfxCheckboxControlFrame.cpp index a7ed354ff7f..d9f9e566d42 100644 --- a/mozilla/layout/html/forms/src/nsGfxCheckboxControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsGfxCheckboxControlFrame.cpp @@ -206,8 +206,7 @@ nsGfxCheckboxControlFrame::PaintCheckBox(nsIPresContext* aPresContext, nsFormControlHelper::PaintCheckMark(aRenderingContext, p2t, checkRect); } - PRBool clip; - aRenderingContext.PopState(clip); + aRenderingContext.PopState(); } diff --git a/mozilla/layout/html/forms/src/nsHTMLButtonControlFrame.cpp b/mozilla/layout/html/forms/src/nsHTMLButtonControlFrame.cpp index 737e3923048..6c4bd4efe5a 100644 --- a/mozilla/layout/html/forms/src/nsHTMLButtonControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsHTMLButtonControlFrame.cpp @@ -353,7 +353,7 @@ nsHTMLButtonControlFrame::Paint(nsIPresContext* aPresContext, PaintChildren(aPresContext, aRenderingContext, aDirtyRect, NS_FRAME_PAINT_LAYER_FLOATS); PaintChildren(aPresContext, aRenderingContext, aDirtyRect, NS_FRAME_PAINT_LAYER_FOREGROUND); - aRenderingContext.PopState(clipEmpty); + aRenderingContext.PopState(); #endif diff --git a/mozilla/layout/html/style/src/nsCSSRendering.cpp b/mozilla/layout/html/style/src/nsCSSRendering.cpp index 0b114bac13d..dac29474460 100644 --- a/mozilla/layout/html/style/src/nsCSSRendering.cpp +++ b/mozilla/layout/html/style/src/nsCSSRendering.cpp @@ -2126,7 +2126,7 @@ nscoord width; for(i=0;i<4;i++){ if(borderRadii[i] > 0){ PaintRoundedBorder(aPresContext,aRenderingContext,aForFrame,aDirtyRect,aBorderArea,nsnull,&aOutlineStyle,aStyleContext,aSkipSides,borderRadii,aGap,PR_TRUE); - aRenderingContext.PopState(clipState); + aRenderingContext.PopState(); return; } } @@ -2138,7 +2138,7 @@ nscoord width; (outlineStyle == NS_STYLE_BORDER_STYLE_DASHED)) { DrawDashedSides(0, aRenderingContext, aDirtyRect, ourColor, nsnull, &aOutlineStyle, PR_TRUE, outside, inside, aSkipSides, aGap); - aRenderingContext.PopState(clipState); + aRenderingContext.PopState(); return; } @@ -2194,7 +2194,7 @@ nscoord width; } } // Restore clipping - aRenderingContext.PopState(clipState); + aRenderingContext.PopState(); } /* draw the edges of the border described in aBorderEdges one segment at a time. diff --git a/mozilla/layout/html/table/src/nsTableCellFrame.cpp b/mozilla/layout/html/table/src/nsTableCellFrame.cpp index 55745a3d0b0..f1e6486c21f 100644 --- a/mozilla/layout/html/table/src/nsTableCellFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableCellFrame.cpp @@ -474,7 +474,7 @@ nsTableCellFrame::Paint(nsIPresContext* aPresContext, PaintChildren(aPresContext, aRenderingContext, aDirtyRect, aWhichLayer, aFlags); if (pushed) { - aRenderingContext.PopState(clipState); + aRenderingContext.PopState(); } } diff --git a/mozilla/layout/html/table/src/nsTableFrame.cpp b/mozilla/layout/html/table/src/nsTableFrame.cpp index 580e2ab3de8..8f5acce1773 100644 --- a/mozilla/layout/html/table/src/nsTableFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableFrame.cpp @@ -1386,10 +1386,8 @@ nsTableFrame::PaintChildren(nsIPresContext* aPresContext, nsHTMLContainerFrame::PaintChildren(aPresContext, aRenderingContext, aDirtyRect, aWhichLayer, aFlags); - if (clip) { - PRBool clipState; - aRenderingContext.PopState(clipState); - } + if (clip) + aRenderingContext.PopState(); } // table paint code is concerned primarily with borders and bg color diff --git a/mozilla/layout/html/table/src/nsTableOuterFrame.cpp b/mozilla/layout/html/table/src/nsTableOuterFrame.cpp index b8354ac1b53..d904898f59c 100644 --- a/mozilla/layout/html/table/src/nsTableOuterFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableOuterFrame.cpp @@ -349,10 +349,8 @@ nsTableOuterFrame::Paint(nsIPresContext* aPresContext, PaintChild(aPresContext, aRenderingContext, aDirtyRect, kid, aWhichLayer); } - if (clip) { - PRBool clipState; - aRenderingContext.PopState(clipState); - } + if (clip) + aRenderingContext.PopState(); return NS_OK; } diff --git a/mozilla/layout/html/table/src/nsTablePainter.cpp b/mozilla/layout/html/table/src/nsTablePainter.cpp index 8773cee1d55..8a838b302f9 100644 --- a/mozilla/layout/html/table/src/nsTablePainter.cpp +++ b/mozilla/layout/html/table/src/nsTablePainter.cpp @@ -683,8 +683,7 @@ TableBackgroundPainter::PaintCell(nsTableCellFrame* aCell, NS_FRAME_PAINT_LAYER_BACKGROUND, NS_PAINT_FLAG_TABLE_BG_PAINT | NS_PAINT_FLAG_TABLE_CELL_BG_PASS); mDirtyRect.MoveBy(mCellRect.x, mCellRect.y); - PRBool clipEmpty; - mRenderingContext.PopState(clipEmpty); + mRenderingContext.PopState(); } return NS_OK; diff --git a/mozilla/layout/html/table/src/nsTableRowFrame.cpp b/mozilla/layout/html/table/src/nsTableRowFrame.cpp index 152e460bb8d..882cf24c82b 100644 --- a/mozilla/layout/html/table/src/nsTableRowFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableRowFrame.cpp @@ -570,10 +570,8 @@ NS_METHOD nsTableRowFrame::Paint(nsIPresContext* aPresContext, } PaintChildren(aPresContext, aRenderingContext, aDirtyRect, aWhichLayer, aFlags); - if (clip) { - PRBool clipState; - aRenderingContext.PopState(clipState); - } + if (clip) + aRenderingContext.PopState(); return NS_OK; } diff --git a/mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp b/mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp index 4d5a44569ca..fbb791a39a3 100644 --- a/mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp @@ -232,10 +232,8 @@ NS_METHOD nsTableRowGroupFrame::Paint(nsIPresContext* aPresContext, } PaintChildren(aPresContext, aRenderingContext, aDirtyRect, aWhichLayer, aFlags); - if (clip) { - PRBool clipState; - aRenderingContext.PopState(clipState); - } + if (clip) + aRenderingContext.PopState(); return NS_OK; /*nsFrame::Paint(aPresContext, aRenderingContext, aDirtyRect, aWhichLayer);*/ @@ -268,7 +266,6 @@ void nsTableRowGroupFrame::PaintChildren(nsIPresContext* aPresContext, nsIFrame* kid = GetFirstFrame(); while (nsnull != kid) { if (!kid->HasView()) { - PRBool clipState; nsRect kidRect = kid->GetRect(); nsRect damageArea(aDirtyRect); // Translate damage area into kid's coordinate system @@ -284,7 +281,7 @@ void nsTableRowGroupFrame::PaintChildren(nsIPresContext* aPresContext, aRenderingContext.DrawRect(0, 0, kidRect.width, kidRect.height); } #endif - aRenderingContext.PopState(clipState); + aRenderingContext.PopState(); } GetNextFrame(kid, &kid); } diff --git a/mozilla/layout/mathml/base/src/nsMathMLChar.cpp b/mozilla/layout/mathml/base/src/nsMathMLChar.cpp index 79d235bd756..f6561520cf9 100644 --- a/mozilla/layout/mathml/base/src/nsMathMLChar.cpp +++ b/mozilla/layout/mathml/base/src/nsMathMLChar.cpp @@ -620,9 +620,8 @@ nsGlyphTable::DrawGlyph(nsIRenderingContext& aRenderingContext, mFontName.StringAt(0, aFont.name); aRenderingContext.SetFont(aFont, nsnull); } - if (aClipRect) { - aRenderingContext.PopState(clipState); - } + if (aClipRect) + aRenderingContext.PopState(); } // class to map a Unicode point to a string (used to store the list of @@ -2216,7 +2215,7 @@ nsMathMLChar::PaintVertically(nsIPresContext* aPresContext, NS_ASSERTION(1000 != count, "something is probably wrong somewhere"); if (1000 == count) return NS_ERROR_UNEXPECTED; } - aRenderingContext.PopState(clipState); + aRenderingContext.PopState(); #ifdef SHOW_BORDERS // last glyph that may cross past its boundary and collide with the next nscoord height = bm.ascent + bm.descent; @@ -2394,7 +2393,7 @@ nsMathMLChar::PaintHorizontally(nsIPresContext* aPresContext, NS_ASSERTION(1000 != count, "something is probably wrong somewhere"); if (1000 == count) return NS_ERROR_UNEXPECTED; } - aRenderingContext.PopState(clipState); + aRenderingContext.PopState(); #ifdef SHOW_BORDERS // last glyph that may cross past its boundary and collide with the next nscoord width = bm.rightBearing - bm.leftBearing; diff --git a/mozilla/layout/svg/base/src/nsSVGOuterSVGFrame.cpp b/mozilla/layout/svg/base/src/nsSVGOuterSVGFrame.cpp index 4be561af096..6e560f6dca4 100644 --- a/mozilla/layout/svg/base/src/nsSVGOuterSVGFrame.cpp +++ b/mozilla/layout/svg/base/src/nsSVGOuterSVGFrame.cpp @@ -842,7 +842,7 @@ nsSVGOuterSVGFrame::Paint(nsIPresContext* aPresContext, printf("SVG Paint Timing: %f ms\n", (end-start)/1000.0); #endif - aRenderingContext.PopState(clipState); + aRenderingContext.PopState(); return NS_OK; // see if we have to draw a selection frame around this container diff --git a/mozilla/layout/tables/nsTableCellFrame.cpp b/mozilla/layout/tables/nsTableCellFrame.cpp index 55745a3d0b0..f1e6486c21f 100644 --- a/mozilla/layout/tables/nsTableCellFrame.cpp +++ b/mozilla/layout/tables/nsTableCellFrame.cpp @@ -474,7 +474,7 @@ nsTableCellFrame::Paint(nsIPresContext* aPresContext, PaintChildren(aPresContext, aRenderingContext, aDirtyRect, aWhichLayer, aFlags); if (pushed) { - aRenderingContext.PopState(clipState); + aRenderingContext.PopState(); } } diff --git a/mozilla/layout/tables/nsTableFrame.cpp b/mozilla/layout/tables/nsTableFrame.cpp index 580e2ab3de8..8f5acce1773 100644 --- a/mozilla/layout/tables/nsTableFrame.cpp +++ b/mozilla/layout/tables/nsTableFrame.cpp @@ -1386,10 +1386,8 @@ nsTableFrame::PaintChildren(nsIPresContext* aPresContext, nsHTMLContainerFrame::PaintChildren(aPresContext, aRenderingContext, aDirtyRect, aWhichLayer, aFlags); - if (clip) { - PRBool clipState; - aRenderingContext.PopState(clipState); - } + if (clip) + aRenderingContext.PopState(); } // table paint code is concerned primarily with borders and bg color diff --git a/mozilla/layout/tables/nsTableOuterFrame.cpp b/mozilla/layout/tables/nsTableOuterFrame.cpp index b8354ac1b53..d904898f59c 100644 --- a/mozilla/layout/tables/nsTableOuterFrame.cpp +++ b/mozilla/layout/tables/nsTableOuterFrame.cpp @@ -349,10 +349,8 @@ nsTableOuterFrame::Paint(nsIPresContext* aPresContext, PaintChild(aPresContext, aRenderingContext, aDirtyRect, kid, aWhichLayer); } - if (clip) { - PRBool clipState; - aRenderingContext.PopState(clipState); - } + if (clip) + aRenderingContext.PopState(); return NS_OK; } diff --git a/mozilla/layout/tables/nsTablePainter.cpp b/mozilla/layout/tables/nsTablePainter.cpp index 8773cee1d55..8a838b302f9 100644 --- a/mozilla/layout/tables/nsTablePainter.cpp +++ b/mozilla/layout/tables/nsTablePainter.cpp @@ -683,8 +683,7 @@ TableBackgroundPainter::PaintCell(nsTableCellFrame* aCell, NS_FRAME_PAINT_LAYER_BACKGROUND, NS_PAINT_FLAG_TABLE_BG_PAINT | NS_PAINT_FLAG_TABLE_CELL_BG_PASS); mDirtyRect.MoveBy(mCellRect.x, mCellRect.y); - PRBool clipEmpty; - mRenderingContext.PopState(clipEmpty); + mRenderingContext.PopState(); } return NS_OK; diff --git a/mozilla/layout/tables/nsTableRowFrame.cpp b/mozilla/layout/tables/nsTableRowFrame.cpp index 152e460bb8d..882cf24c82b 100644 --- a/mozilla/layout/tables/nsTableRowFrame.cpp +++ b/mozilla/layout/tables/nsTableRowFrame.cpp @@ -570,10 +570,8 @@ NS_METHOD nsTableRowFrame::Paint(nsIPresContext* aPresContext, } PaintChildren(aPresContext, aRenderingContext, aDirtyRect, aWhichLayer, aFlags); - if (clip) { - PRBool clipState; - aRenderingContext.PopState(clipState); - } + if (clip) + aRenderingContext.PopState(); return NS_OK; } diff --git a/mozilla/layout/tables/nsTableRowGroupFrame.cpp b/mozilla/layout/tables/nsTableRowGroupFrame.cpp index 4d5a44569ca..fbb791a39a3 100644 --- a/mozilla/layout/tables/nsTableRowGroupFrame.cpp +++ b/mozilla/layout/tables/nsTableRowGroupFrame.cpp @@ -232,10 +232,8 @@ NS_METHOD nsTableRowGroupFrame::Paint(nsIPresContext* aPresContext, } PaintChildren(aPresContext, aRenderingContext, aDirtyRect, aWhichLayer, aFlags); - if (clip) { - PRBool clipState; - aRenderingContext.PopState(clipState); - } + if (clip) + aRenderingContext.PopState(); return NS_OK; /*nsFrame::Paint(aPresContext, aRenderingContext, aDirtyRect, aWhichLayer);*/ @@ -268,7 +266,6 @@ void nsTableRowGroupFrame::PaintChildren(nsIPresContext* aPresContext, nsIFrame* kid = GetFirstFrame(); while (nsnull != kid) { if (!kid->HasView()) { - PRBool clipState; nsRect kidRect = kid->GetRect(); nsRect damageArea(aDirtyRect); // Translate damage area into kid's coordinate system @@ -284,7 +281,7 @@ void nsTableRowGroupFrame::PaintChildren(nsIPresContext* aPresContext, aRenderingContext.DrawRect(0, 0, kidRect.width, kidRect.height); } #endif - aRenderingContext.PopState(clipState); + aRenderingContext.PopState(); } GetNextFrame(kid, &kid); } diff --git a/mozilla/layout/xul/base/src/nsBoxFrame.cpp b/mozilla/layout/xul/base/src/nsBoxFrame.cpp index 07f9b874618..d96391667a1 100644 --- a/mozilla/layout/xul/base/src/nsBoxFrame.cpp +++ b/mozilla/layout/xul/base/src/nsBoxFrame.cpp @@ -1634,9 +1634,8 @@ nsBoxFrame::PaintChildren(nsIPresContext* aPresContext, kid->GetNextBox(&kid); } - if (hasClipped) { - aRenderingContext.PopState(clipState); - } + if (hasClipped) + aRenderingContext.PopState(); if (mState & NS_STATE_CURRENTLY_IN_DEBUG) { @@ -1716,9 +1715,8 @@ nsBoxFrame::PaintChildren(nsIPresContext* aPresContext, kid->GetNextBox(&kid); } - if (hasClipped) { - aRenderingContext.PopState(clipState); - } + if (hasClipped) + aRenderingContext.PopState(); } } diff --git a/mozilla/layout/xul/base/src/nsGroupBoxFrame.cpp b/mozilla/layout/xul/base/src/nsGroupBoxFrame.cpp index 5ef153c441c..549916e09af 100644 --- a/mozilla/layout/xul/base/src/nsGroupBoxFrame.cpp +++ b/mozilla/layout/xul/base/src/nsGroupBoxFrame.cpp @@ -175,7 +175,7 @@ nsGroupBoxFrame::Paint(nsIPresContext* aPresContext, nsCSSRendering::PaintBorder(aPresContext, aRenderingContext, this, aDirtyRect, rect, *borderStyleData, mStyleContext, skipSides); - aRenderingContext.PopState(clipState); + aRenderingContext.PopState(); // draw right side @@ -189,7 +189,7 @@ nsGroupBoxFrame::Paint(nsIPresContext* aPresContext, nsCSSRendering::PaintBorder(aPresContext, aRenderingContext, this, aDirtyRect, rect, *borderStyleData, mStyleContext, skipSides); - aRenderingContext.PopState(clipState); + aRenderingContext.PopState(); @@ -204,7 +204,7 @@ nsGroupBoxFrame::Paint(nsIPresContext* aPresContext, nsCSSRendering::PaintBorder(aPresContext, aRenderingContext, this, aDirtyRect, rect, *borderStyleData, mStyleContext, skipSides); - aRenderingContext.PopState(clipState); + aRenderingContext.PopState(); } else { diff --git a/mozilla/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp b/mozilla/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp index c8a580e730f..208d15072a1 100644 --- a/mozilla/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp +++ b/mozilla/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp @@ -2134,7 +2134,7 @@ nsTreeBodyFrame::Paint(nsIPresContext* aPresContext, PaintRow(i, rowRect, aPresContext, aRenderingContext, aDirtyRect); if (clip) - aRenderingContext.PopState(clipState); + aRenderingContext.PopState(); } } @@ -2470,8 +2470,7 @@ nsTreeBodyFrame::PaintCell(PRInt32 aRowIndex, } } - PRBool clipState; - aRenderingContext.PopState(clipState); + aRenderingContext.PopState(); } // Always leave space for the twisty. diff --git a/mozilla/view/src/nsScrollPortView.cpp b/mozilla/view/src/nsScrollPortView.cpp index fe45b8d1283..82259117e75 100644 --- a/mozilla/view/src/nsScrollPortView.cpp +++ b/mozilla/view/src/nsScrollPortView.cpp @@ -569,7 +569,7 @@ NS_IMETHODIMP nsScrollPortView::Paint(nsIRenderingContext& rc, const nsRect& rec nsresult rv = nsView::Paint(rc, rect, aPaintFlags, aResult); - rc.PopState(clipEmpty); + rc.PopState(); return rv; } @@ -586,7 +586,7 @@ NS_IMETHODIMP nsScrollPortView::Paint(nsIRenderingContext& aRC, const nsIRegion& nsresult rv = nsView::Paint(aRC, aRegion, aPaintFlags, aResult); - aRC.PopState(clipEmpty); + aRC.PopState(); return rv; } diff --git a/mozilla/view/src/nsViewManager.cpp b/mozilla/view/src/nsViewManager.cpp index 138dfca72ec..e2a4d3760ee 100644 --- a/mozilla/view/src/nsViewManager.cpp +++ b/mozilla/view/src/nsViewManager.cpp @@ -1138,10 +1138,8 @@ static void PushStateAndClip(nsIRenderingContext** aRCs, PRInt32 aCount, nsRect static void PopState(nsIRenderingContext **aRCs, PRInt32 aCount) { for (int i = 0; i < aCount; i++) { - if (aRCs[i]) { - PRBool clipEmpty; - aRCs[i]->PopState(clipEmpty); - } + if (aRCs[i]) + aRCs[i]->PopState(); } } @@ -1381,7 +1379,7 @@ void nsViewManager::RenderDisplayListElement(DisplayListElement2* element, element->mView->Paint(*aRC, drect, 0, clipEmpty); - aRC->PopState(clipEmpty); + aRC->PopState(); } void nsViewManager::PaintView(nsView *aView, nsIRenderingContext &aRC, nscoord x, nscoord y, @@ -1391,7 +1389,7 @@ void nsViewManager::PaintView(nsView *aView, nsIRenderingContext &aRC, nscoord x aRC.Translate(x, y); PRBool unused; aView->Paint(aRC, aDamageRect, 0, unused); - aRC.PopState(unused); + aRC.PopState(); } static nsresult NewOffscreenContext(nsIDeviceContext* deviceContext, nsDrawingSurface surface,