Empty inlines can get misplaced during incremental reflow in bidi pages. Bug 496006, r+sr=roc (regression from bug 332655)

This commit is contained in:
Simon Montagu 2009-06-08 01:59:39 -07:00
parent 0519efc9d2
commit dd55f5ecf8
4 changed files with 36 additions and 5 deletions

View File

@ -477,11 +477,6 @@ nsBidiPresUtils::Resolve(nsBlockFrame* aBlockFrame,
mContentToFrameIndex.Get(content, &newIndex);
if (newIndex > frameIndex) {
RemoveBidiContinuation(frame, frameIndex, newIndex, temp);
if (lineNeedsUpdate) {
AdvanceLineIteratorToFrame(frame, &lineIter, prevFrame);
lineNeedsUpdate = PR_FALSE;
}
lineIter.GetLine()->MarkDirty();
runLength -= temp;
fragmentLength -= temp;
lineOffset += temp;
@ -489,6 +484,11 @@ nsBidiPresUtils::Resolve(nsBlockFrame* aBlockFrame,
}
}
frame->AdjustOffsetsForBidi(contentOffset, contentOffset + fragmentLength);
if (lineNeedsUpdate) {
AdvanceLineIteratorToFrame(frame, &lineIter, prevFrame);
lineNeedsUpdate = PR_FALSE;
}
lineIter.GetLine()->MarkDirty();
}
} // isTextFrame
else {

View File

@ -0,0 +1,10 @@
<html>
<head>
</head>
<body style="direction: rtl;">
m
<span id="a" style="border: 1px solid black"></span>
<div></div>
m
</body>
</html>

View File

@ -0,0 +1,20 @@
<html>
<head>
</head>
<body style="direction: rtl;">
m
<span id="a" style="border: 1px solid black;"></span>
<div><script>document.body.offsetHeight;</script></div>
m
<script>
function doe() {
var a=document.getElementById('a');
a.style.outline = '1px solid transparent';
document.body.offsetHeight;
a.style.outline = '';
}
setTimeout(doe, 500);
</script>
</body>
</html>

View File

@ -40,3 +40,4 @@ random-if(MOZ_WIDGET_TOOLKIT=="gtk2") == 386339.html 386339-ref.html
== 489517-1.html 489517-1-ref.html
== 489887-1.html 489887-1-ref.html
== 492231-1.html 492231-1-ref.html
== 496006-1.html 496006-1-ref.html