зеркало из https://github.com/mozilla/pjs.git
Bug 473390 part 3. Move some HTML frame construction assertions out of the frame constructor and into the relevant frame creation methods. r+sr=roc
This commit is contained in:
Родитель
42028dd8b5
Коммит
a71a7fc3a2
|
@ -5386,9 +5386,6 @@ nsCSSFrameConstructor::ConstructHTMLFrame(nsFrameConstructorState& aState,
|
|||
addedToFrameList = PR_TRUE;
|
||||
}
|
||||
else if (nsGkAtoms::legend == aTag) {
|
||||
NS_ASSERTION(!display->IsAbsolutelyPositioned() && !display->IsFloating(),
|
||||
"Legends should not be positioned and should not float");
|
||||
|
||||
if (!aHasPseudoParent && !aState.mPseudoFrames.IsEmpty()) {
|
||||
ProcessPseudoFrames(aState, aFrameItems);
|
||||
}
|
||||
|
@ -5396,9 +5393,6 @@ nsCSSFrameConstructor::ConstructHTMLFrame(nsFrameConstructorState& aState,
|
|||
triedFrame = PR_TRUE;
|
||||
}
|
||||
else if (nsGkAtoms::frameset == aTag) {
|
||||
NS_ASSERTION(!display->IsAbsolutelyPositioned() && !display->IsFloating(),
|
||||
"Framesets should not be positioned and should not float");
|
||||
|
||||
if (!aHasPseudoParent && !aState.mPseudoFrames.IsEmpty()) {
|
||||
ProcessPseudoFrames(aState, aFrameItems);
|
||||
}
|
||||
|
@ -5415,8 +5409,6 @@ nsCSSFrameConstructor::ConstructHTMLFrame(nsFrameConstructorState& aState,
|
|||
triedFrame = PR_TRUE;
|
||||
}
|
||||
else if (nsGkAtoms::spacer == aTag) {
|
||||
NS_ASSERTION(!display->IsAbsolutelyPositioned() && !display->IsFloating(),
|
||||
"Spacers should not be positioned and should not float");
|
||||
if (!aHasPseudoParent && !aState.mPseudoFrames.IsEmpty()) {
|
||||
ProcessPseudoFrames(aState, aFrameItems);
|
||||
}
|
||||
|
|
|
@ -55,6 +55,12 @@
|
|||
nsIFrame*
|
||||
NS_NewLegendFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
const nsStyleDisplay* disp = aContext->GetStyleDisplay();
|
||||
NS_ASSERTION(!disp->IsAbsolutelyPositioned() && !disp->IsFloating(),
|
||||
"Legends should not be positioned and should not float");
|
||||
#endif
|
||||
|
||||
nsIFrame* f = new (aPresShell) nsLegendFrame(aContext);
|
||||
if (f) {
|
||||
f->AddStateBits(NS_BLOCK_FLOAT_MGR | NS_BLOCK_MARGIN_ROOT);
|
||||
|
|
|
@ -1604,6 +1604,12 @@ nsHTMLFramesetFrame::EndMouseDrag(nsPresContext* aPresContext)
|
|||
nsIFrame*
|
||||
NS_NewHTMLFramesetFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
const nsStyleDisplay* disp = aContext->GetStyleDisplay();
|
||||
NS_ASSERTION(!disp->IsAbsolutelyPositioned() && !disp->IsFloating(),
|
||||
"Framesets should not be positioned and should not float");
|
||||
#endif
|
||||
|
||||
return new (aPresShell) nsHTMLFramesetFrame(aContext);
|
||||
}
|
||||
|
||||
|
|
|
@ -73,6 +73,12 @@ protected:
|
|||
nsIFrame*
|
||||
NS_NewSpacerFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
const nsStyleDisplay* disp = aContext->GetStyleDisplay();
|
||||
NS_ASSERTION(!disp->IsAbsolutelyPositioned() && !disp->IsFloating(),
|
||||
"Spacers should not be positioned and should not float");
|
||||
#endif
|
||||
|
||||
return new (aPresShell) SpacerFrame(aContext);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче