From 045b61ba6bd98da15205441e7ea58dc8bb0e9d4f Mon Sep 17 00:00:00 2001 From: "roc+@cs.cmu.edu" Date: Mon, 21 Apr 2008 15:00:48 -0700 Subject: [PATCH] Bug 316500. Fix merge regression so that fixed-background tables display correctly. r+sr=mats,a=damon --- layout/tables/nsTableFrame.cpp | 8 ++++---- layout/tables/nsTableFrame.h | 3 +-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/layout/tables/nsTableFrame.cpp b/layout/tables/nsTableFrame.cpp index fc6c2d510e0..f479e2a455b 100644 --- a/layout/tables/nsTableFrame.cpp +++ b/layout/tables/nsTableFrame.cpp @@ -1262,8 +1262,7 @@ nsDisplayTableItem::GetBounds(nsDisplayListBuilder* aBuilder) { } PRBool -nsDisplayTableItem::IsVaryingRelativeToFrame(nsDisplayListBuilder* aBuilder, - nsIFrame* aAncestorFrame) +nsDisplayTableItem::IsVaryingRelativeToMovingFrame(nsDisplayListBuilder* aBuilder) { if (!mPartHasFixedBackground) return PR_FALSE; @@ -1274,8 +1273,9 @@ nsDisplayTableItem::IsVaryingRelativeToFrame(nsDisplayListBuilder* aBuilder, // will move relative to its viewport, which means this display item will // change when it is moved. If they are in different documents, we do not // want to return true because mFrame won't move relative to its viewport. - return mFrame == aAncestorFrame || - nsLayoutUtils::IsProperAncestorFrame(aAncestorFrame, mFrame); + nsIFrame* rootMover = aBuilder->GetRootMovingFrame(); + return mFrame == rootMover || + nsLayoutUtils::IsProperAncestorFrame(rootMover, mFrame); } /* static */ void diff --git a/layout/tables/nsTableFrame.h b/layout/tables/nsTableFrame.h index 4de68e5735c..d0223998c9e 100644 --- a/layout/tables/nsTableFrame.h +++ b/layout/tables/nsTableFrame.h @@ -79,8 +79,7 @@ public: nsDisplayTableItem(nsIFrame* aFrame) : nsDisplayItem(aFrame), mPartHasFixedBackground(PR_FALSE) {} - virtual PRBool IsVaryingRelativeToFrame(nsDisplayListBuilder* aBuilder, - nsIFrame* aAncestorFrame); + virtual PRBool IsVaryingRelativeToMovingFrame(nsDisplayListBuilder* aBuilder); // With collapsed borders, parts of the collapsed border can extend outside // the table part frames, so allow this display element to blow out to our // overflow rect. This is also useful for row frames that have spanning