Bug 476557. Update view manager cache of page background color in PresShell::Paint, not nsCSSRendering::PaintBackground; permits a small API cleanup. r+sr=roc

This commit is contained in:
Zack Weinberg
2009-02-16 14:11:34 +13:00
parent a065983b4d
commit c6de6120b4
8 changed files with 119 additions and 101 deletions

View File

@@ -8759,9 +8759,7 @@ ApplyRenderingChangeToTree(nsPresContext* aPresContext,
// If the frame's background is propagated to an ancestor, walk up to
// that ancestor.
const nsStyleBackground *bg;
PRBool isCanvas;
while (!nsCSSRendering::FindBackground(aPresContext, aFrame,
&bg, &isCanvas)) {
while (!nsCSSRendering::FindBackground(aPresContext, aFrame, &bg)) {
aFrame = aFrame->GetParent();
NS_ASSERTION(aFrame, "root frame must paint");
}
@@ -8826,10 +8824,8 @@ InvalidateCanvasIfNeeded(nsIFrame* aFrame)
// frame to invalidate and do it.
nsIFrame *ancestor = aFrame;
const nsStyleBackground *bg;
PRBool isCanvas;
nsPresContext* presContext = aFrame->PresContext();
while (!nsCSSRendering::FindBackground(presContext, ancestor,
&bg, &isCanvas)) {
while (!nsCSSRendering::FindBackground(presContext, ancestor, &bg)) {
ancestor = ancestor->GetParent();
NS_ASSERTION(ancestor, "canvas must paint");
}