Bug 490173. Switching display from -moz-popup to block in an HTML document doesn't trigger a frame reconstruct. r+sr=dbaron

This commit is contained in:
Boris Zbarsky 2009-05-07 15:21:54 -04:00
parent 64b2d5e1bf
commit fc728b8197
6 changed files with 43 additions and 0 deletions

View File

@ -5300,6 +5300,7 @@ nsCSSFrameConstructor::AddFrameConstructionItemsInternal(nsFrameConstructorState
NS_ASSERTION(data, "Should have frame construction data now");
if (data->mBits & FCDATA_SUPPRESS_FRAME) {
aState.mFrameManager->SetUndisplayedContent(aContent, styleContext);
return;
}
@ -5309,6 +5310,7 @@ nsCSSFrameConstructor::AddFrameConstructionItemsInternal(nsFrameConstructorState
aParentFrame->GetType() != nsGkAtoms::menuFrame)) {
if (!aState.mPopupItems.containingBlock &&
!aState.mHavePendingPopupgroup) {
aState.mFrameManager->SetUndisplayedContent(aContent, styleContext);
return;
}
@ -5324,6 +5326,7 @@ nsCSSFrameConstructor::AddFrameConstructionItemsInternal(nsFrameConstructorState
aParentFrame->GetType() == nsGkAtoms::tableColGroupFrame &&
(!(bits & FCDATA_IS_TABLE_PART) ||
display->mDisplay != NS_STYLE_DISPLAY_TABLE_COLUMN)) {
aState.mFrameManager->SetUndisplayedContent(aContent, styleContext);
return;
}

View File

@ -0,0 +1,8 @@
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<div>Foo</div>
</body>
</html>

View File

@ -0,0 +1,8 @@
<!DOCTYPE html>
<html>
<head>
</head>
<body onload="document.getElementById('f1').style.display = '';">
<div id="f1" style="display: -moz-popup;">Foo</div>
</body>
</html>

View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<body>
<table border="1">
<colgroup>
<col width="200">
</colgroup>
<tr><td>Foo</tr></td>
</table>
</body>
</html>

View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<body onload="document.getElementById('c1').style.display = '';">
<table border="1">
<colgroup>
<col id="c1" width="200" style="display: block">
</colgroup>
<tr><td>Foo</tr></td>
</table>
</body>
</html>

View File

@ -1229,4 +1229,6 @@ fails-if(MOZ_WIDGET_TOOLKIT=="gtk2") == 481948-3.html 481948-3-ref.html # differ
== 487539-1.html about:blank
== 488390-1.html 488390-1-ref.html
== 488685-1.html 488685-1-ref.html
-- 490173-1.html 490173-1-ref.html
-- 490173-2.html 490173-2-ref.html
fails-if(MOZ_WIDGET_TOOLKIT!="cocoa") == 488692-1.html 488692-1-ref.html # needs EXTEND_PAD on non-Mac for correct scaling behaviour