Bug 1116714 part 3 - Use GetParentOrPlaceholderFor (not GetParent) so that reframing anonymous content frames works also for fixed pos frames. r=roc

This commit is contained in:
Mats Palmgren 2015-01-06 09:27:56 +00:00
parent d76290891a
commit 8b28082cae

View File

@ -9293,9 +9293,9 @@ nsCSSFrameConstructor::RecreateFramesForContent(nsIContent* aContent,
// nsIAnonymousContentCreator that created this content knows how to make // nsIAnonymousContentCreator that created this content knows how to make
// that happen. // that happen.
nsIAnonymousContentCreator* acc = nullptr; nsIAnonymousContentCreator* acc = nullptr;
nsIFrame* ancestor = frame->GetParent(); nsIFrame* ancestor = nsLayoutUtils::GetParentOrPlaceholderFor(frame);
while (!(acc = do_QueryFrame(ancestor))) { while (!(acc = do_QueryFrame(ancestor))) {
ancestor = ancestor->GetParent(); ancestor = nsLayoutUtils::GetParentOrPlaceholderFor(ancestor);
} }
NS_ASSERTION(acc, "Where is the nsIAnonymousContentCreator? We may fail " NS_ASSERTION(acc, "Where is the nsIAnonymousContentCreator? We may fail "
"to recreate its content correctly"); "to recreate its content correctly");