diff --git a/mozilla/layout/base/nsCSSFrameConstructor.cpp b/mozilla/layout/base/nsCSSFrameConstructor.cpp index 625d62a7d3b..eac0d9744e7 100644 --- a/mozilla/layout/base/nsCSSFrameConstructor.cpp +++ b/mozilla/layout/base/nsCSSFrameConstructor.cpp @@ -5400,9 +5400,18 @@ nsCSSFrameConstructor::ContentAppended(nsIPresContext* aPresContext, if (NS_SUCCEEDED(result) && firstAppendedFrame) { // Perform special check for diddling around with the frames in // a special inline frame. - if (WipeContainingBlock(aPresContext, state, blockContent, adjustedParentFrame, - frameItems.childList)) { - return NS_OK; + + // XXX Bug 18366 + // Although select frame are inline we do not want to call + // 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) { + if (WipeContainingBlock(aPresContext, state, blockContent, adjustedParentFrame, + frameItems.childList)) { + return NS_OK; + } } // Append the flowed frames to the principal child list diff --git a/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp b/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp index 625d62a7d3b..eac0d9744e7 100644 --- a/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp +++ b/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp @@ -5400,9 +5400,18 @@ nsCSSFrameConstructor::ContentAppended(nsIPresContext* aPresContext, if (NS_SUCCEEDED(result) && firstAppendedFrame) { // Perform special check for diddling around with the frames in // a special inline frame. - if (WipeContainingBlock(aPresContext, state, blockContent, adjustedParentFrame, - frameItems.childList)) { - return NS_OK; + + // XXX Bug 18366 + // Although select frame are inline we do not want to call + // 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) { + if (WipeContainingBlock(aPresContext, state, blockContent, adjustedParentFrame, + frameItems.childList)) { + return NS_OK; + } } // Append the flowed frames to the principal child list