mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 607494. Add assertions to catch creating frames for content nodes that already have a frame. r=bzbarsky a=blocking-final+
This commit is contained in:
parent
d5f55db812
commit
ada7022f3f
@ -5041,6 +5041,13 @@ nsCSSFrameConstructor::AddFrameConstructionItems(nsFrameConstructorState& aState
|
||||
~ELEMENT_PENDING_RESTYLE_FLAGS);
|
||||
}
|
||||
|
||||
// XXX the GetContent() != aContent check is needed due to bug 135040.
|
||||
// Remove it once that's fixed.
|
||||
NS_ASSERTION(!aContent->GetPrimaryFrame() ||
|
||||
aContent->GetPrimaryFrame()->GetContent() != aContent ||
|
||||
aState.mCreatingExtraFrames,
|
||||
"asked to create frame construction item for a node that already has a frame");
|
||||
|
||||
// don't create a whitespace frame if aParent doesn't want it
|
||||
if (!NeedFrameFor(aState, aParentFrame, aContent)) {
|
||||
return;
|
||||
@ -6481,6 +6488,18 @@ nsCSSFrameConstructor::ContentAppended(nsIContent* aContainer,
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
for (nsIContent* child = aFirstNewContent;
|
||||
child;
|
||||
child = child->GetNextSibling()) {
|
||||
// XXX the GetContent() != child check is needed due to bug 135040.
|
||||
// Remove it once that's fixed.
|
||||
NS_ASSERTION(!child->GetPrimaryFrame() ||
|
||||
child->GetPrimaryFrame()->GetContent() != child,
|
||||
"asked to construct a frame for a node that already has a frame");
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_XUL
|
||||
if (aContainer) {
|
||||
PRInt32 namespaceID;
|
||||
@ -6832,6 +6851,18 @@ nsCSSFrameConstructor::ContentRangeInserted(nsIContent* aContainer,
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
for (nsIContent* child = aStartChild;
|
||||
child != aEndChild;
|
||||
child = child->GetNextSibling()) {
|
||||
// XXX the GetContent() != child check is needed due to bug 135040.
|
||||
// Remove it once that's fixed.
|
||||
NS_ASSERTION(!child->GetPrimaryFrame() ||
|
||||
child->GetPrimaryFrame()->GetContent() != child,
|
||||
"asked to construct a frame for a node that already has a frame");
|
||||
}
|
||||
#endif
|
||||
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
PRBool isSingleInsert = (aStartChild->GetNextSibling() == aEndChild);
|
||||
|
Loading…
Reference in New Issue
Block a user