Call AdjustOffsetsForBidi on a new continuation frame immediately after creating it. Bug 536963, r=roc
This commit is contained in:
Родитель
932e4f1c8b
Коммит
98253e6509
|
@ -513,14 +513,17 @@ nsBidiPresUtils::Resolve(nsBlockFrame* aBlockFrame,
|
|||
}
|
||||
lineIter.GetLine()->MarkDirty();
|
||||
nsIFrame* nextBidi;
|
||||
PRInt32 runEnd = contentOffset + runLength;
|
||||
EnsureBidiContinuation(frame, &nextBidi, frameIndex,
|
||||
contentOffset,
|
||||
contentOffset + runLength);
|
||||
runEnd);
|
||||
if (NS_FAILED(mSuccess)) {
|
||||
break;
|
||||
}
|
||||
nextBidi->AdjustOffsetsForBidi(runEnd,
|
||||
contentOffset + fragmentLength);
|
||||
frame = nextBidi;
|
||||
contentOffset += runLength;
|
||||
contentOffset = runEnd;
|
||||
} // if (runLength < fragmentLength)
|
||||
else {
|
||||
if (contentOffset + fragmentLength == contentTextLength) {
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title>Dynamic bidi bug</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<style type="text/css">
|
||||
p { width: 3ch;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p dir="rtl">0 123 4</p>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,20 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title>Dynamic bidi bug</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<style type="text/css">
|
||||
p { width: 3ch;}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
function flip()
|
||||
{
|
||||
var flipped= document.getElementById('flipped');
|
||||
flipped.dir = "rtl";
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="flip()">
|
||||
<p id="flipped">0 123 4</p>
|
||||
</body>
|
||||
</html>
|
|
@ -44,3 +44,4 @@ random-if(MOZ_WIDGET_TOOLKIT=="gtk2") == 386339.html 386339-ref.html
|
|||
== 503269-1.html 503269-1-ref.html
|
||||
== 503957-1.html 503957-1-ref.html
|
||||
== 525740-1.html 525740-1-ref.html
|
||||
== 536963-1.html 536963-1-ref.html
|
||||
|
|
Загрузка…
Ссылка в новой задаче