Drill down through placeholder frames to the real frames in bidi reordering. Bug 525740, r=roc

This commit is contained in:
Simon Montagu 2009-11-08 09:40:46 -08:00
parent 1951d7d761
commit 300dbdf6e5
4 changed files with 25 additions and 1 deletions

View File

@ -835,7 +835,8 @@ nsBidiPresUtils::GetFrameEmbeddingLevel(nsIFrame* aFrame)
{
nsIFrame* firstLeaf = aFrame;
while (!IsBidiLeaf(firstLeaf)) {
firstLeaf = firstLeaf->GetFirstChild(nsnull);
firstLeaf =
nsPlaceholderFrame::GetRealFrameFor(firstLeaf->GetFirstChild(nsnull));
}
return NS_GET_EMBEDDING_LEVEL(firstLeaf);
}

View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
div:first-letter { float: right; color: lime; }
</style>
</head>
<body dir="rtl">
<div>ab &#x06CD; c</div>
</body>
</html>

View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
div:first-letter { float: right; color: lime; }
</style>
</head>
<body dir="rtl">
<div><span>ab &#x06CD; c</span></div>
</body>
</html>

View File

@ -43,3 +43,4 @@ random-if(MOZ_WIDGET_TOOLKIT=="gtk2") == 386339.html 386339-ref.html
== 496006-1.html 496006-1-ref.html
== 503269-1.html 503269-1-ref.html
== 503957-1.html 503957-1-ref.html
== 525740-1.html 525740-1-ref.html