From 3ec9b8970d8077c493f7829025e7d53b8ff34aa9 Mon Sep 17 00:00:00 2001 From: Mats Palmgren Date: Tue, 10 Aug 2010 19:04:43 -0300 Subject: [PATCH] Bug 576649. r=bzbarsky a=blocking2.0 --- layout/base/nsCSSFrameConstructor.cpp | 11 ++++++----- layout/base/nsFrameManager.cpp | 24 ++++++++++++++---------- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/layout/base/nsCSSFrameConstructor.cpp b/layout/base/nsCSSFrameConstructor.cpp index 31edd94bb07..d9970839bea 100644 --- a/layout/base/nsCSSFrameConstructor.cpp +++ b/layout/base/nsCSSFrameConstructor.cpp @@ -7611,13 +7611,14 @@ UpdateViewsForTree(nsIFrame* aFrame, nsIViewManager* aViewManager, if (!(child->GetStateBits() & NS_FRAME_OUT_OF_FLOW) || (child->GetStateBits() & NS_FRAME_IS_OVERFLOW_CONTAINER)) { // only do frames that don't have placeholders - if (nsGkAtoms::placeholderFrame == child->GetType()) { // placeholder - // get out of flow frame and start over there + if (nsGkAtoms::placeholderFrame == child->GetType()) { + // do the out-of-flow frame and its continuations nsIFrame* outOfFlowFrame = nsPlaceholderFrame::GetRealFrameForPlaceholder(child); - - DoApplyRenderingChangeToTree(outOfFlowFrame, aViewManager, - aFrameManager, aChange); + do { + DoApplyRenderingChangeToTree(outOfFlowFrame, aViewManager, + aFrameManager, aChange); + } while (outOfFlowFrame = outOfFlowFrame->GetNextContinuation()); } else if (childList == nsGkAtoms::popupList) { DoApplyRenderingChangeToTree(child, aViewManager, aFrameManager, aChange); diff --git a/layout/base/nsFrameManager.cpp b/layout/base/nsFrameManager.cpp index 737b58072fd..0801ccd3237 100644 --- a/layout/base/nsFrameManager.cpp +++ b/layout/base/nsFrameManager.cpp @@ -22,6 +22,7 @@ * the Initial Developer. All Rights Reserved. * * Contributor(s): + * Mats Palmgren * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"), @@ -771,12 +772,13 @@ nsresult nsFrameManager::ReparentStyleContext(nsIFrame* aFrame) { if (nsGkAtoms::placeholderFrame == aFrame->GetType()) { - // Also reparent the out-of-flow + // Also reparent the out-of-flow and all its continuations. nsIFrame* outOfFlow = nsPlaceholderFrame::GetRealFrameForPlaceholder(aFrame); NS_ASSERTION(outOfFlow, "no out-of-flow frame"); - - ReparentStyleContext(outOfFlow); + do { + ReparentStyleContext(outOfFlow); + } while (outOfFlow = outOfFlow->GetNextContinuation()); } // DO NOT verify the style tree before reparenting. The frame @@ -1470,13 +1472,15 @@ nsFrameManager::ReResolveStyleContext(nsPresContext *aPresContext, // |nsFrame::GetParentStyleContextFrame| checks being out // of flow so that this works correctly. - ReResolveStyleContext(aPresContext, outOfFlowFrame, - content, aChangeList, - NS_SubtractHint(aMinChange, - nsChangeHint_ReflowFrame), - childRestyleHint, - fireAccessibilityEvents, - aRestyleTracker); + do { + ReResolveStyleContext(aPresContext, outOfFlowFrame, + content, aChangeList, + NS_SubtractHint(aMinChange, + nsChangeHint_ReflowFrame), + childRestyleHint, + fireAccessibilityEvents, + aRestyleTracker); + } while (outOfFlowFrame = outOfFlowFrame->GetNextContinuation()); // reresolve placeholder's context under the same parent // as the out-of-flow frame