Bug 480017. Suppress misplaced popups before we construct table pseudoframe parents. r+sr=roc

This commit is contained in:
Boris Zbarsky 2009-03-01 10:16:29 -05:00
parent e291896fc6
commit 85fb7d8a47
4 changed files with 48 additions and 8 deletions

View File

@ -6634,6 +6634,14 @@ nsCSSFrameConstructor::ConstructFrameInternal(nsFrameConstructorState& aState,
if (data->mBits & FCDATA_SUPPRESS_FRAME) {
return NS_OK;
}
#ifdef MOZ_XUL
if ((data->mBits & FCDATA_IS_POPUP) &&
aParentFrame->GetType() != nsGkAtoms::menuFrame &&
!aState.mPopupItems.containingBlock) {
return NS_OK;
}
#endif /* MOZ_XUL */
}
nsIFrame* adjParentFrame = aParentFrame;
@ -6669,14 +6677,6 @@ nsCSSFrameConstructor::ConstructFrameInternal(nsFrameConstructorState& aState,
styleContext->GetStyleBackground();
}
#ifdef MOZ_XUL
if ((data->mBits & FCDATA_IS_POPUP) &&
adjParentFrame->GetType() != nsGkAtoms::menuFrame &&
!aState.mPopupItems.containingBlock) {
return NS_OK;
}
#endif /* MOZ_XUL */
// Construct a page break frame for page-break-before, if needed, and
// remember whether we need one for page-break-after.
PRBool pageBreakAfter =

View File

@ -0,0 +1,15 @@
<!DOCTYPE html>
<html>
<body>
<table cellpadding="0" cellspacing="0">
<tr>
<td>First Column</td>
<td>Second Column</td>
</tr>
<tr>
<td>First Column</td>
<td>Second Column</td>
</tr>
</table>
</body>
</html>

View File

@ -0,0 +1,24 @@
<!DOCTYPE html>
<html>
<body>
<div style="display:table">
<div style="display: table-row">
<div style="display: table-cell">
First Column
</div>
<div style="display: table-cell">
Second Column
</div>
</div>
<div style="display: table-row">
<div style="display: table-cell">
First Column
</div>
<div style="display: -moz-popup; display: popup"></div>
<div style="display: table-cell">
Second Column
</div>
</div>
</div>
</body>
</html>

View File

@ -1094,3 +1094,4 @@ fails == 461512-1.html 461512-1-ref.html # Bug 461512
== 478811-4.html 478811-4-ref.html
== 478956-1a.html 478956-1-ref.html
== 478956-1b.html 478956-1-ref.html
== 480017-1.html 480017-1-ref.html