From ba88babee3ac0ebd7e8739b2d87e5844024f71d6 Mon Sep 17 00:00:00 2001 From: Bas Schouten Date: Wed, 1 Dec 2010 04:20:05 +0100 Subject: [PATCH] Bug 615462: Only draw native theme for the dirty rect. r=roc a=blocking-final --- layout/base/nsCSSRendering.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/layout/base/nsCSSRendering.cpp b/layout/base/nsCSSRendering.cpp index 3b437d485c0..8c43912e2d9 100644 --- a/layout/base/nsCSSRendering.cpp +++ b/layout/base/nsCSSRendering.cpp @@ -1213,8 +1213,12 @@ nsCSSRendering::PaintBoxShadowOuter(nsPresContext* aPresContext, devCtx->CreateRenderingContextInstance(*getter_AddRefs(wrapperCtx)); wrapperCtx->Init(devCtx, shadowContext); wrapperCtx->Translate(shadowItem->mXOffset, shadowItem->mYOffset); + + nsRect nativeRect; + nativeRect.IntersectRect(frameRect, aDirtyRect); + aPresContext->GetTheme()->DrawWidgetBackground(wrapperCtx, aForFrame, - styleDisplay->mAppearance, aFrameArea, frameRect); + styleDisplay->mAppearance, aFrameArea, nativeRect); } else { // Clip out the area of the actual frame so the shadow is not shown within // the frame