зеркало из https://github.com/mozilla/gecko-dev.git
bug 281241 if a content based column looses its content based children we need to create anonymous cols r=bzbarsky
This commit is contained in:
Родитель
f692b154d1
Коммит
315a47d07a
|
@ -0,0 +1,13 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>col removal</title>
|
||||
</head>
|
||||
<body>
|
||||
<table border>
|
||||
<colgroup width="500px">
|
||||
</colgroup>
|
||||
<tr><td> </td></tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,23 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>col removal</title>
|
||||
<script type="text/javascript">
|
||||
function foo ()
|
||||
{
|
||||
var out =document.getElementById('outer');
|
||||
var int =document.getElementById('inner');
|
||||
out.removeChild(int);
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="foo()">
|
||||
|
||||
<table border>
|
||||
<colgroup width="500px" id="outer">
|
||||
<col width="200px" id="inner">
|
||||
</colgroup>
|
||||
<tr><td> </td></tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,12 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
|
||||
<html>
|
||||
<body>
|
||||
<table border>
|
||||
<colgroup width="100px">
|
||||
<script>var v = document.body.offsetHeight;</script>
|
||||
<col width="500px">
|
||||
</colgroup>
|
||||
<tr><td> </td></tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -258,6 +258,8 @@ skip-if(MOZ_WIDGET_TOOLKIT=="cocoa") != 240536-resizer-ltr.xul 240536-resizer-rt
|
|||
== 278266-1b.html 278266-1-ref.html
|
||||
== 280708-1a.html 280708-1-ref.html
|
||||
== 280708-1b.html 280708-1-ref.html
|
||||
== 281241-1.html 281241-1-ref.html
|
||||
== 281241-2.html 281241-1-ref.html
|
||||
== 283686-1.html about:blank
|
||||
== 283686-2.html 283686-2-ref.html
|
||||
== 283686-3.html about:blank
|
||||
|
|
|
@ -324,10 +324,12 @@ nsTableColGroupFrame::RemoveFrame(nsIAtom* aListName,
|
|||
NS_ASSERTION(!aListName, "unexpected child list");
|
||||
|
||||
if (!aOldFrame) return NS_OK;
|
||||
PRBool contentRemoval = PR_FALSE;
|
||||
|
||||
if (nsGkAtoms::tableColFrame == aOldFrame->GetType()) {
|
||||
nsTableColFrame* colFrame = (nsTableColFrame*)aOldFrame;
|
||||
if (colFrame->GetColType() == eColContent) {
|
||||
contentRemoval = PR_TRUE;
|
||||
// Remove any anonymous column frames this <col> produced via a colspan
|
||||
nsTableColFrame* col = colFrame->GetNextCol();
|
||||
nsTableColFrame* nextCol;
|
||||
|
@ -350,6 +352,11 @@ nsTableColGroupFrame::RemoveFrame(nsIAtom* aListName,
|
|||
return NS_ERROR_NULL_POINTER;
|
||||
|
||||
tableFrame->RemoveCol(this, colIndex, PR_TRUE, PR_TRUE);
|
||||
if (mFrames.IsEmpty() && contentRemoval &&
|
||||
GetColType() == eColGroupContent) {
|
||||
tableFrame->AppendAnonymousColFrames(this, GetSpan(),
|
||||
eColAnonymousColGroup, PR_TRUE);
|
||||
}
|
||||
}
|
||||
else {
|
||||
mFrames.DestroyFrame(aOldFrame);
|
||||
|
|
Загрузка…
Ссылка в новой задаче