Fix for bug #13570. Changed ContentAppended() and ContentInserted() to check

for an "object" frame


git-svn-id: svn://10.0.0.236/trunk@47171 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
troy%netscape.com
1999-09-13 21:25:43 +00:00
parent 0ca315b40c
commit 49b9cdb4cc
2 changed files with 40 additions and 6 deletions

View File

@@ -5256,6 +5256,7 @@ nsCSSFrameConstructor::ContentAppended(nsIPresContext* aPresContext,
}
#endif // INCLUDE_XUL
// Get the frame associated with the content
nsIFrame* parentFrame = GetFrameFor(shell, aPresContext, aContainer);
if (nsnull != parentFrame) {
// Get the parent frame's last-in-flow
@@ -5267,6 +5268,15 @@ nsCSSFrameConstructor::ContentAppended(nsIPresContext* aPresContext,
}
}
// If we didn't process children when we originally created the frame,
// then don't do any processing now
nsCOMPtr<nsIAtom> frameType;
parentFrame->GetFrameType(getter_AddRefs(frameType));
if (frameType.get() == nsLayoutAtoms::objectFrame) {
// This handles APPLET, EMBED, and OBJECT
return NS_OK;
}
// Create some new frames
PRInt32 count;
nsIFrame* firstAppendedFrame = nsnull;
@@ -5714,10 +5724,8 @@ nsCSSFrameConstructor::ContentInserted(nsIPresContext* aPresContext,
nsLayoutAtoms::fixedList,
state.mFixedItems.childList);
}
}
else {
} else {
// Find the frame that precedes the insertion point.
nsIFrame* prevSibling = FindPreviousSibling(shell, aContainer, aIndexInContainer);
nsIFrame* nextSibling = nsnull;
@@ -5741,6 +5749,15 @@ nsCSSFrameConstructor::ContentInserted(nsIPresContext* aPresContext,
// No previous or next sibling so treat this like an appended frame.
isAppend = PR_TRUE;
shell->GetPrimaryFrameFor(aContainer, &parentFrame);
// If we didn't process children when we originally created the frame,
// then don't do any processing now
nsCOMPtr<nsIAtom> frameType;
parentFrame->GetFrameType(getter_AddRefs(frameType));
if (frameType.get() == nsLayoutAtoms::objectFrame) {
// This handles APPLET, EMBED, and OBJECT
return NS_OK;
}
}
// Construct a new frame