Checking in bug 90099 again since it seems tnot to have caused Tp regression. Make sure table cells and other odd frames are given views if they need them. r=dbaron,sr=kin
git-svn-id: svn://10.0.0.236/trunk@134892 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
966bf47fea
commit
2d32b81421
@ -1615,6 +1615,8 @@ nsCSSFrameConstructor::CreateGeneratedContentFrame(nsIPresShell* aPresShe
|
||||
}
|
||||
InitAndRestoreFrame(aPresContext, aState, aContent,
|
||||
aFrame, pseudoStyleContext, nsnull, containerFrame);
|
||||
nsHTMLContainerFrame::CreateViewForFrame(aPresContext, containerFrame,
|
||||
pseudoStyleContext, nsnull, PR_FALSE);
|
||||
|
||||
// Mark the frame as being associated with generated content
|
||||
nsFrameState frameState;
|
||||
@ -1639,6 +1641,7 @@ nsCSSFrameConstructor::CreateGeneratedContentFrame(nsIPresShell* aPresShe
|
||||
result = CreateGeneratedFrameFor(aPresContext, mDocument, containerFrame,
|
||||
aContent, textStyleContext,
|
||||
styleContent, contentIndex, &frame);
|
||||
// Non-elements can't possibly have a view, so don't bother checking
|
||||
if (NS_SUCCEEDED(result) && frame) {
|
||||
// Add it to the list of child frames
|
||||
childFrames.AddChild(frame);
|
||||
@ -2615,6 +2618,8 @@ nsCSSFrameConstructor::ConstructTableCaptionFrame(nsIPresShell* aPres
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
InitAndRestoreFrame(aPresContext, aState, aContent,
|
||||
parentFrame, aStyleContext, nsnull, aNewFrame);
|
||||
nsHTMLContainerFrame::CreateViewForFrame(aPresContext, aNewFrame,
|
||||
aStyleContext, nsnull, PR_FALSE);
|
||||
|
||||
nsFrameItems childItems;
|
||||
// pass in aTableCreator so ProcessChildren will call TableProcessChildren
|
||||
@ -2676,6 +2681,8 @@ nsCSSFrameConstructor::ConstructTableRowGroupFrame(nsIPresShell* aPre
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
InitAndRestoreFrame(aPresContext, aState, aContent, parentFrame,
|
||||
aStyleContext, nsnull, aNewFrame);
|
||||
nsHTMLContainerFrame::CreateViewForFrame(aPresContext, aNewFrame,
|
||||
aStyleContext, nsnull, PR_FALSE);
|
||||
}
|
||||
|
||||
if (!aIsPseudo) {
|
||||
@ -2787,6 +2794,8 @@ nsCSSFrameConstructor::ConstructTableRowFrame(nsIPresShell* aPresShel
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
InitAndRestoreFrame(aPresContext, aState, aContent,
|
||||
parentFrame, aStyleContext, nsnull, aNewFrame);
|
||||
nsHTMLContainerFrame::CreateViewForFrame(aPresContext, aNewFrame,
|
||||
aStyleContext, nsnull, PR_FALSE);
|
||||
if (!aIsPseudo) {
|
||||
nsFrameItems childItems;
|
||||
nsIFrame* captionFrame;
|
||||
@ -2916,6 +2925,9 @@ nsCSSFrameConstructor::ConstructTableCellFrame(nsIPresShell* aPresShe
|
||||
// Initialize the table cell frame
|
||||
InitAndRestoreFrame(aPresContext, aState, aContent,
|
||||
parentFrame, aStyleContext, nsnull, aNewCellOuterFrame);
|
||||
nsHTMLContainerFrame::CreateViewForFrame(aPresContext, aNewCellOuterFrame,
|
||||
aStyleContext, nsnull, PR_FALSE);
|
||||
|
||||
// Create a block frame that will format the cell's content
|
||||
rv = aTableCreator.CreateTableCellInnerFrame(&aNewCellInnerFrame);
|
||||
|
||||
@ -13516,11 +13528,12 @@ nsCSSFrameConstructor::ConstructInline(nsIPresShell* aPresShell,
|
||||
nsFrameConstructorSaveState absoluteSaveState; // definition cannot be inside next block
|
||||
// because the object's destructor is significant
|
||||
// this is part of the fix for bug 42372
|
||||
if (aIsPositioned) {
|
||||
// Relatively positioned frames need a view
|
||||
nsHTMLContainerFrame::CreateViewForFrame(aPresContext, aNewFrame,
|
||||
aStyleContext, nsnull, PR_FALSE);
|
||||
|
||||
// Any inline frame might need a view (because of opacity, or fixed background)
|
||||
nsHTMLContainerFrame::CreateViewForFrame(aPresContext, aNewFrame,
|
||||
aStyleContext, nsnull, PR_FALSE);
|
||||
|
||||
if (aIsPositioned) {
|
||||
// Relatively positioned frames becomes a container for child
|
||||
// frames that are positioned
|
||||
aState.PushAbsoluteContainingBlock(aNewFrame, absoluteSaveState);
|
||||
@ -13628,12 +13641,11 @@ nsCSSFrameConstructor::ConstructInline(nsIPresShell* aPresShell,
|
||||
InitAndRestoreFrame(aPresContext, aState, aContent,
|
||||
aParentFrame, blockSC, nsnull, blockFrame);
|
||||
|
||||
// Any inline frame could have a view (e.g., opacity)
|
||||
nsHTMLContainerFrame::CreateViewForFrame(aPresContext, blockFrame,
|
||||
aStyleContext, nsnull, PR_FALSE);
|
||||
|
||||
if (aIsPositioned) {
|
||||
// Relatively positioned frames need a view
|
||||
nsHTMLContainerFrame::CreateViewForFrame(aPresContext, blockFrame,
|
||||
aStyleContext, nsnull, PR_FALSE);
|
||||
|
||||
// Move list2's frames into the new view
|
||||
nsIFrame* oldParent;
|
||||
list2->GetParent(&oldParent);
|
||||
@ -13662,11 +13674,11 @@ nsCSSFrameConstructor::ConstructInline(nsIPresShell* aPresShell,
|
||||
InitAndRestoreFrame(aPresContext, aState, aContent,
|
||||
aParentFrame, aStyleContext, nsnull, inlineFrame);
|
||||
|
||||
if (aIsPositioned) {
|
||||
// Relatively positioned frames need a view
|
||||
nsHTMLContainerFrame::CreateViewForFrame(aPresContext, inlineFrame,
|
||||
aStyleContext, nsnull, PR_FALSE);
|
||||
// Any frame might need a view
|
||||
nsHTMLContainerFrame::CreateViewForFrame(aPresContext, inlineFrame,
|
||||
aStyleContext, nsnull, PR_FALSE);
|
||||
|
||||
if (aIsPositioned) {
|
||||
// Move list3's frames into the new view
|
||||
nsIFrame* oldParent;
|
||||
list3->GetParent(&oldParent);
|
||||
|
||||
@ -1615,6 +1615,8 @@ nsCSSFrameConstructor::CreateGeneratedContentFrame(nsIPresShell* aPresShe
|
||||
}
|
||||
InitAndRestoreFrame(aPresContext, aState, aContent,
|
||||
aFrame, pseudoStyleContext, nsnull, containerFrame);
|
||||
nsHTMLContainerFrame::CreateViewForFrame(aPresContext, containerFrame,
|
||||
pseudoStyleContext, nsnull, PR_FALSE);
|
||||
|
||||
// Mark the frame as being associated with generated content
|
||||
nsFrameState frameState;
|
||||
@ -1639,6 +1641,7 @@ nsCSSFrameConstructor::CreateGeneratedContentFrame(nsIPresShell* aPresShe
|
||||
result = CreateGeneratedFrameFor(aPresContext, mDocument, containerFrame,
|
||||
aContent, textStyleContext,
|
||||
styleContent, contentIndex, &frame);
|
||||
// Non-elements can't possibly have a view, so don't bother checking
|
||||
if (NS_SUCCEEDED(result) && frame) {
|
||||
// Add it to the list of child frames
|
||||
childFrames.AddChild(frame);
|
||||
@ -2615,6 +2618,8 @@ nsCSSFrameConstructor::ConstructTableCaptionFrame(nsIPresShell* aPres
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
InitAndRestoreFrame(aPresContext, aState, aContent,
|
||||
parentFrame, aStyleContext, nsnull, aNewFrame);
|
||||
nsHTMLContainerFrame::CreateViewForFrame(aPresContext, aNewFrame,
|
||||
aStyleContext, nsnull, PR_FALSE);
|
||||
|
||||
nsFrameItems childItems;
|
||||
// pass in aTableCreator so ProcessChildren will call TableProcessChildren
|
||||
@ -2676,6 +2681,8 @@ nsCSSFrameConstructor::ConstructTableRowGroupFrame(nsIPresShell* aPre
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
InitAndRestoreFrame(aPresContext, aState, aContent, parentFrame,
|
||||
aStyleContext, nsnull, aNewFrame);
|
||||
nsHTMLContainerFrame::CreateViewForFrame(aPresContext, aNewFrame,
|
||||
aStyleContext, nsnull, PR_FALSE);
|
||||
}
|
||||
|
||||
if (!aIsPseudo) {
|
||||
@ -2787,6 +2794,8 @@ nsCSSFrameConstructor::ConstructTableRowFrame(nsIPresShell* aPresShel
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
InitAndRestoreFrame(aPresContext, aState, aContent,
|
||||
parentFrame, aStyleContext, nsnull, aNewFrame);
|
||||
nsHTMLContainerFrame::CreateViewForFrame(aPresContext, aNewFrame,
|
||||
aStyleContext, nsnull, PR_FALSE);
|
||||
if (!aIsPseudo) {
|
||||
nsFrameItems childItems;
|
||||
nsIFrame* captionFrame;
|
||||
@ -2916,6 +2925,9 @@ nsCSSFrameConstructor::ConstructTableCellFrame(nsIPresShell* aPresShe
|
||||
// Initialize the table cell frame
|
||||
InitAndRestoreFrame(aPresContext, aState, aContent,
|
||||
parentFrame, aStyleContext, nsnull, aNewCellOuterFrame);
|
||||
nsHTMLContainerFrame::CreateViewForFrame(aPresContext, aNewCellOuterFrame,
|
||||
aStyleContext, nsnull, PR_FALSE);
|
||||
|
||||
// Create a block frame that will format the cell's content
|
||||
rv = aTableCreator.CreateTableCellInnerFrame(&aNewCellInnerFrame);
|
||||
|
||||
@ -13516,11 +13528,12 @@ nsCSSFrameConstructor::ConstructInline(nsIPresShell* aPresShell,
|
||||
nsFrameConstructorSaveState absoluteSaveState; // definition cannot be inside next block
|
||||
// because the object's destructor is significant
|
||||
// this is part of the fix for bug 42372
|
||||
if (aIsPositioned) {
|
||||
// Relatively positioned frames need a view
|
||||
nsHTMLContainerFrame::CreateViewForFrame(aPresContext, aNewFrame,
|
||||
aStyleContext, nsnull, PR_FALSE);
|
||||
|
||||
// Any inline frame might need a view (because of opacity, or fixed background)
|
||||
nsHTMLContainerFrame::CreateViewForFrame(aPresContext, aNewFrame,
|
||||
aStyleContext, nsnull, PR_FALSE);
|
||||
|
||||
if (aIsPositioned) {
|
||||
// Relatively positioned frames becomes a container for child
|
||||
// frames that are positioned
|
||||
aState.PushAbsoluteContainingBlock(aNewFrame, absoluteSaveState);
|
||||
@ -13628,12 +13641,11 @@ nsCSSFrameConstructor::ConstructInline(nsIPresShell* aPresShell,
|
||||
InitAndRestoreFrame(aPresContext, aState, aContent,
|
||||
aParentFrame, blockSC, nsnull, blockFrame);
|
||||
|
||||
// Any inline frame could have a view (e.g., opacity)
|
||||
nsHTMLContainerFrame::CreateViewForFrame(aPresContext, blockFrame,
|
||||
aStyleContext, nsnull, PR_FALSE);
|
||||
|
||||
if (aIsPositioned) {
|
||||
// Relatively positioned frames need a view
|
||||
nsHTMLContainerFrame::CreateViewForFrame(aPresContext, blockFrame,
|
||||
aStyleContext, nsnull, PR_FALSE);
|
||||
|
||||
// Move list2's frames into the new view
|
||||
nsIFrame* oldParent;
|
||||
list2->GetParent(&oldParent);
|
||||
@ -13662,11 +13674,11 @@ nsCSSFrameConstructor::ConstructInline(nsIPresShell* aPresShell,
|
||||
InitAndRestoreFrame(aPresContext, aState, aContent,
|
||||
aParentFrame, aStyleContext, nsnull, inlineFrame);
|
||||
|
||||
if (aIsPositioned) {
|
||||
// Relatively positioned frames need a view
|
||||
nsHTMLContainerFrame::CreateViewForFrame(aPresContext, inlineFrame,
|
||||
aStyleContext, nsnull, PR_FALSE);
|
||||
// Any frame might need a view
|
||||
nsHTMLContainerFrame::CreateViewForFrame(aPresContext, inlineFrame,
|
||||
aStyleContext, nsnull, PR_FALSE);
|
||||
|
||||
if (aIsPositioned) {
|
||||
// Move list3's frames into the new view
|
||||
nsIFrame* oldParent;
|
||||
list3->GetParent(&oldParent);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user