diff --git a/mozilla/layout/base/nsCSSFrameConstructor.cpp b/mozilla/layout/base/nsCSSFrameConstructor.cpp index eac0d9744e7..98d023be9e4 100644 --- a/mozilla/layout/base/nsCSSFrameConstructor.cpp +++ b/mozilla/layout/base/nsCSSFrameConstructor.cpp @@ -5406,8 +5406,8 @@ nsCSSFrameConstructor::ContentAppended(nsIPresContext* aPresContext, // WipeContainingBlock because it will throw away the entire selct frame and // start over which is something we do not want to do // - nsCOMPtr selectContent(do_QueryInterface(blockContent)); - if (selectContent) { + nsCOMPtr selectContent(do_QueryInterface(aContainer)); + if (!selectContent) { if (WipeContainingBlock(aPresContext, state, blockContent, adjustedParentFrame, frameItems.childList)) { return NS_OK; diff --git a/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp b/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp index eac0d9744e7..98d023be9e4 100644 --- a/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp +++ b/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp @@ -5406,8 +5406,8 @@ nsCSSFrameConstructor::ContentAppended(nsIPresContext* aPresContext, // WipeContainingBlock because it will throw away the entire selct frame and // start over which is something we do not want to do // - nsCOMPtr selectContent(do_QueryInterface(blockContent)); - if (selectContent) { + nsCOMPtr selectContent(do_QueryInterface(aContainer)); + if (!selectContent) { if (WipeContainingBlock(aPresContext, state, blockContent, adjustedParentFrame, frameItems.childList)) { return NS_OK;