Bug 471594. In ContentInserted, when we have an insertionPoint and we take the isAppend path, use the insertionPoint's last continuation as the place to append so we don't insert the new frames in the middle of some other content's continuation chain. Patch by Robert O'Callahan <robert@ocallahan.org> r+sr=bzbarsky a=dveditz

git-svn-id: svn://10.0.0.236/trunk@256031 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
dholbert%cs.stanford.edu 2009-02-02 22:35:29 +00:00
parent 509c2c8a64
commit 1d77f592b4
4 changed files with 34 additions and 0 deletions

View File

@ -9027,6 +9027,8 @@ nsCSSFrameConstructor::ContentInserted(nsIContent* aContainer,
else {
// No previous or next sibling, so treat this like an appended frame.
isAppend = PR_TRUE;
// Get continuation that parents the last child
parentFrame = nsLayoutUtils::GetLastContinuationWithChild(parentFrame);
// Deal with fieldsets
parentFrame = ::GetAdjustedParentFrame(parentFrame, parentFrame->GetType(),
aContainer, aIndexInContainer);

View File

@ -0,0 +1,5 @@
<!DOCTYPE HTML>
<html>
<body style="white-space:pre;">a
bs</body>
</html>

View File

@ -0,0 +1,26 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<bindings xmlns="http://www.mozilla.org/xbl">
<binding id="x"><content><span>a
b<children xmlns="http://www.mozilla.org/xbl"/></span></content></binding>
</bindings>
<style>
div#d {
white-space: pre;
-moz-binding: url(#x);
}
span#s {
display: inline-block;
}
</style>
<script>
function boom()
{
document.getElementById("s").style.display = "inline";
}
</script>
</head>
<body onload="boom();">
<div id="d"><span id="s">s</span></div>
</body>
</html>

View File

@ -835,3 +835,4 @@ fails-if(MOZ_WIDGET_TOOLKIT=="gtk2") == 424074-1-ref2.xul 424074-1-ref3.xul
== 440149-1.html 440149-1-ref.html
== 445004-1.html 445004-1-ref.html
== 459443-1.html 459443-1-ref.html
== 471594-1.xhtml 471594-1-ref.html