Bug 1155359 - Set NS_FRAME_IS_BIDI on nsTextBoxFrame if text direction is set to RTL r=roc

This commit is contained in:
George Wright 2015-04-15 16:00:29 -04:00
parent f8aa15f24d
commit 30ff6880b6

View File

@ -636,7 +636,8 @@ nsTextBoxFrame::CalculateTitleForWidth(nsPresContext* aPresContext,
aRenderingContext); aRenderingContext);
if (titleWidth <= aWidth) { if (titleWidth <= aWidth) {
mCroppedTitle = mTitle; mCroppedTitle = mTitle;
if (HasRTLChars(mTitle)) { if (HasRTLChars(mTitle) ||
StyleVisibility()->mDirection == NS_STYLE_DIRECTION_RTL) {
mState |= NS_FRAME_IS_BIDI; mState |= NS_FRAME_IS_BIDI;
} }
return titleWidth; // fits, done. return titleWidth; // fits, done.