Bug 713856 - Dynamic change of DOM in lists before block element creates blank line; r=roc

This commit is contained in:
Ehsan Akhgari 2011-12-30 17:22:47 -05:00
parent fea0fc7084
commit 0382216924
5 changed files with 36 additions and 1 deletions

View File

@ -7449,7 +7449,7 @@ nsTextFrame::ReflowText(nsLineLayout& aLineLayout, nscoord aAvailableWidth,
// Disallow negative widths
aMetrics.width = NSToCoordCeil(NS_MAX(gfxFloat(0.0), textMetrics.mAdvanceWidth));
if (completedFirstLetter && transformedCharsFit == 0 && !usedHyphenation) {
if (transformedCharsFit == 0 && !usedHyphenation) {
aMetrics.ascent = 0;
aMetrics.height = 0;
} else if (boundingBoxType != gfxFont::LOOSE_INK_EXTENTS) {

View File

@ -0,0 +1,15 @@
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<ul>
<li id="blub">
<p>Test</p>
</li>
</ul>
<script>
document.getElementById('blub').firstChild.data = document.getElementById('blub').firstChild.data;
</script>
</body>
</html>

View File

@ -0,0 +1,9 @@
<!DOCTYPE HTML>
<html>
<body>
<ul>
<li><p>Test</p>
</li>
</ul>
</body>
</html>

View File

@ -0,0 +1,9 @@
<!DOCTYPE HTML>
<html>
<body>
<ul>
<li><!--hello--> <!--hello--><p>Test</p>
</li>
</ul>
</body>
</html>

View File

@ -1680,3 +1680,5 @@ needs-focus == 703186-2.html 703186-2-ref.html
needs-focus != 703186-1.html 703186-2.html
== 711359-1.html 711359-1-ref.html
== 712849-1.html 712849-1-ref.html
== 713856-static.html 713856-ref.html
== 713856-dynamic.html 713856-ref.html