diff --git a/layout/base/nsCSSFrameConstructor.cpp b/layout/base/nsCSSFrameConstructor.cpp index 61c11df17574..f442d679c51d 100644 --- a/layout/base/nsCSSFrameConstructor.cpp +++ b/layout/base/nsCSSFrameConstructor.cpp @@ -7820,7 +7820,7 @@ nsCSSFrameConstructor::ContentInserted(nsIContent* aContainer, aChild); parentFrame = ::AdjustAppendParentForAfterContent(mPresShell->GetPresContext(), - aContainer, parentFrame, + container, parentFrame, &appendAfterFrame); } } @@ -7910,7 +7910,7 @@ nsCSSFrameConstructor::ContentInserted(nsIContent* aContainer, nsIFrame* firstChild = parentFrame->GetFirstChild(nsnull); if (firstChild && - nsLayoutUtils::IsGeneratedContentFor(aContainer, firstChild, + nsLayoutUtils::IsGeneratedContentFor(container, firstChild, nsCSSPseudoElements::before)) { // Insert the new frames after the last continuation of the :before prevSibling = firstChild->GetTailContinuation(); @@ -7989,7 +7989,7 @@ nsCSSFrameConstructor::ContentInserted(nsIContent* aContainer, isAppend = PR_TRUE; parentFrame = ::AdjustAppendParentForAfterContent(mPresShell->GetPresContext(), - aContainer, + container, frameItems.childList->GetParent(), &appendAfterFrame); } @@ -8004,7 +8004,10 @@ nsCSSFrameConstructor::ContentInserted(nsIContent* aContainer, } else { // Use more complicated insert logic when inserting - InsertFirstLineFrames(state, aContainer, containingBlock, &parentFrame, + // XXXbz this method is a no-op, so it's easy for the args being passed + // here to make no sense without anyone noticing... If it ever stops + // being a no-op, vet them carefully! + InsertFirstLineFrames(state, container, containingBlock, &parentFrame, prevSibling, frameItems); } } @@ -8014,7 +8017,7 @@ nsCSSFrameConstructor::ContentInserted(nsIContent* aContainer, NS_ASSERTION(!captionItems.childList, "leaking caption frames"); // Notify the parent frame if (isAppend) { - AppendFrames(state, aContainer, parentFrame, frameItems, + AppendFrames(state, container, parentFrame, frameItems, appendAfterFrame); } else { state.mFrameManager->InsertFrames(parentFrame, diff --git a/layout/reftests/bugs/482592-1-ref.html b/layout/reftests/bugs/482592-1-ref.html new file mode 100644 index 000000000000..188c7b279a1a --- /dev/null +++ b/layout/reftests/bugs/482592-1-ref.html @@ -0,0 +1,6 @@ + + +
+ xy + + diff --git a/layout/reftests/bugs/482592-1a.xhtml b/layout/reftests/bugs/482592-1a.xhtml new file mode 100644 index 000000000000..f87c211b9c33 --- /dev/null +++ b/layout/reftests/bugs/482592-1a.xhtml @@ -0,0 +1,27 @@ + + + +