зеркало из https://github.com/mozilla/gecko-dev.git
Make sure to reflow the caption if it gets inserted into our table before another caption. Bug 389924, r=bernd, sr+a=dbaron
This commit is contained in:
Родитель
331a767fbd
Коммит
725f9f32fc
|
@ -0,0 +1,7 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<table id="table"><caption>THIS SHOULD BE VISIBLE</caption><tbody></tbody></table>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,20 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<script>
|
||||||
|
function boom()
|
||||||
|
{
|
||||||
|
var table = document.getElementById("table");
|
||||||
|
|
||||||
|
var newCaption = document.createElement('caption');
|
||||||
|
newCaption.appendChild(document.createTextNode("THIS SHOULD BE VISIBLE"));
|
||||||
|
table.insertBefore(newCaption, table.firstChild);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body onload="boom();">
|
||||||
|
|
||||||
|
<table id="table"><tbody></tbody></table>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,21 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<script>
|
||||||
|
function boom()
|
||||||
|
{
|
||||||
|
var table = document.getElementById("table");
|
||||||
|
|
||||||
|
var newCaption = document.createElement('caption');
|
||||||
|
newCaption.appendChild(document.createTextNode("THIS SHOULD BE VISIBLE"));
|
||||||
|
table.appendChild(newCaption);
|
||||||
|
table.appendChild(document.createElement("tbody"));
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body onload="boom();">
|
||||||
|
|
||||||
|
<table id="table"></table>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -325,6 +325,12 @@ nsTableOuterFrame::InsertFrames(nsIAtom* aListName,
|
||||||
"inserting non-caption frame into captionList");
|
"inserting non-caption frame into captionList");
|
||||||
mCaptionFrames.InsertFrames(nsnull, aPrevFrame, aFrameList);
|
mCaptionFrames.InsertFrames(nsnull, aPrevFrame, aFrameList);
|
||||||
mCaptionFrame = mCaptionFrames.FirstChild();
|
mCaptionFrame = mCaptionFrames.FirstChild();
|
||||||
|
|
||||||
|
// Reflow the new caption frame. It's already marked dirty, so
|
||||||
|
// just tell the pres shell.
|
||||||
|
PresContext()->PresShell()->
|
||||||
|
FrameNeedsReflow(this, nsIPresShell::eTreeChange,
|
||||||
|
NS_FRAME_HAS_DIRTY_CHILDREN);
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче