Enable bidi when a frame has right-to-left direction during style post-processing instead of frame construction to catch dynamic changes to direction. Bug 489517, r+sr=dbaron

This commit is contained in:
Simon Montagu
2009-04-23 09:09:47 +03:00
parent 8c370909e6
commit 7f609be841
9 changed files with 98 additions and 10 deletions

View File

@@ -5432,16 +5432,6 @@ nsCSSFrameConstructor::ConstructFramesFromItem(nsFrameConstructorState& aState,
aFrameItems);
}
// If the page contains markup that overrides text direction, and
// does not contain any characters that would activate the Unicode
// bidi algorithm, we need to call |SetBidiEnabled| on the pres
// context before reflow starts. This requires us to resolve some
// style information now. See bug 115921.
{
if (styleContext->GetStyleVisibility()->mDirection ==
NS_STYLE_DIRECTION_RTL)
aState.mPresContext->SetBidiEnabled();
}
// Start background loads during frame construction. This is just
// a hint; the paint code will do the right thing in any case.
{