From db8f1e5d62bea6141da2c9e91997aa812a091e89 Mon Sep 17 00:00:00 2001 From: "uriber@gmail.com" Date: Wed, 9 Jan 2008 11:19:49 -0800 Subject: [PATCH] Look at all continuations, not just in-flows, when tracking frames sharing a background image. bug=411046, r+sr=roc --- layout/base/nsCSSRendering.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/layout/base/nsCSSRendering.cpp b/layout/base/nsCSSRendering.cpp index f4ab8984391f..c6186352d813 100644 --- a/layout/base/nsCSSRendering.cpp +++ b/layout/base/nsCSSRendering.cpp @@ -157,9 +157,9 @@ protected: { NS_PRECONDITION(aFrame, "Need a frame"); - nsIFrame *prevInFlow = aFrame->GetPrevInFlow(); + nsIFrame *prevContinuation = aFrame->GetPrevContinuation(); - if (!prevInFlow || mFrame != prevInFlow) { + if (!prevContinuation || mFrame != prevContinuation) { // Ok, we've got the wrong frame. We have to start from scratch. Reset(); Init(aFrame); @@ -177,14 +177,14 @@ protected: { // Start with the previous flow frame as our continuation point // is the total of the widths of the previous frames. - nsIFrame* inlineFrame = aFrame->GetPrevInFlow(); + nsIFrame* inlineFrame = aFrame->GetPrevContinuation(); while (inlineFrame) { nsRect rect = inlineFrame->GetRect(); mContinuationPoint += rect.width; mUnbrokenWidth += rect.width; mBoundingBox.UnionRect(mBoundingBox, rect); - inlineFrame = inlineFrame->GetPrevInFlow(); + inlineFrame = inlineFrame->GetPrevContinuation(); } // Next add this frame and subsequent frames to the bounding box and @@ -194,7 +194,7 @@ protected: nsRect rect = inlineFrame->GetRect(); mUnbrokenWidth += rect.width; mBoundingBox.UnionRect(mBoundingBox, rect); - inlineFrame = inlineFrame->GetNextInFlow(); + inlineFrame = inlineFrame->GetNextContinuation(); } mFrame = aFrame;