Bug 576649. r=bzbarsky a=blocking2.0

This commit is contained in:
Mats Palmgren 2010-08-10 19:04:43 -03:00
Родитель 1078bd6bdc
Коммит 3ec9b8970d
2 изменённых файлов: 20 добавлений и 15 удалений

Просмотреть файл

@ -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);

Просмотреть файл

@ -22,6 +22,7 @@
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Mats Palmgren <matspal@gmail.com>
*
* 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