From 70fda8cdbe4efbd69f67db4ea5ffc2753c1cea58 Mon Sep 17 00:00:00 2001 From: "rods%netscape.com" Date: Wed, 24 Nov 1999 21:10:49 +0000 Subject: [PATCH] Add a check around the WipeContaingBlock call in ContentInserted, it checks for the select and doesn't do it. Just like Bug 18366, r=kmcclusk Bug 19949 --- layout/base/nsCSSFrameConstructor.cpp | 16 ++++++++++++---- layout/html/style/src/nsCSSFrameConstructor.cpp | 16 ++++++++++++---- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/layout/base/nsCSSFrameConstructor.cpp b/layout/base/nsCSSFrameConstructor.cpp index a9dabc3aab5..168e5d9d04f 100644 --- a/layout/base/nsCSSFrameConstructor.cpp +++ b/layout/base/nsCSSFrameConstructor.cpp @@ -6002,10 +6002,18 @@ nsCSSFrameConstructor::ContentInserted(nsIPresContext* aPresContext, rv = ConstructFrame(aPresContext, state, aChild, parentFrame, frameItems); - // Perform special check for diddling around with the frames in - // a special inline frame. - if (WipeContainingBlock(aPresContext, state, blockContent, parentFrame, frameItems.childList)) { - return NS_OK; + // XXX Bug 19949 + // Although select frame are inline we do not want to call + // WipeContainingBlock because it will throw away the entire select frame and + // start over which is something we do not want to do + // + nsCOMPtr selectContent(do_QueryInterface(aContainer)); + if (!selectContent) { + // Perform special check for diddling around with the frames in + // a special inline frame. + if (WipeContainingBlock(aPresContext, state, blockContent, parentFrame, frameItems.childList)) { + return NS_OK; + } } if (haveFirstLineStyle) { diff --git a/layout/html/style/src/nsCSSFrameConstructor.cpp b/layout/html/style/src/nsCSSFrameConstructor.cpp index a9dabc3aab5..168e5d9d04f 100644 --- a/layout/html/style/src/nsCSSFrameConstructor.cpp +++ b/layout/html/style/src/nsCSSFrameConstructor.cpp @@ -6002,10 +6002,18 @@ nsCSSFrameConstructor::ContentInserted(nsIPresContext* aPresContext, rv = ConstructFrame(aPresContext, state, aChild, parentFrame, frameItems); - // Perform special check for diddling around with the frames in - // a special inline frame. - if (WipeContainingBlock(aPresContext, state, blockContent, parentFrame, frameItems.childList)) { - return NS_OK; + // XXX Bug 19949 + // Although select frame are inline we do not want to call + // WipeContainingBlock because it will throw away the entire select frame and + // start over which is something we do not want to do + // + nsCOMPtr selectContent(do_QueryInterface(aContainer)); + if (!selectContent) { + // Perform special check for diddling around with the frames in + // a special inline frame. + if (WipeContainingBlock(aPresContext, state, blockContent, parentFrame, frameItems.childList)) { + return NS_OK; + } } if (haveFirstLineStyle) {