diff --git a/layout/base/nsDocumentViewer.cpp b/layout/base/nsDocumentViewer.cpp index 6b24d7048653..7f4ca54d2dbb 100644 --- a/layout/base/nsDocumentViewer.cpp +++ b/layout/base/nsDocumentViewer.cpp @@ -3201,6 +3201,27 @@ NS_IMETHODIMP DocumentViewerImpl::GetBidiSupport(PRUint8* aSupport) return NS_OK; } +NS_IMETHODIMP DocumentViewerImpl::SetBidiCharacterSet(PRUint8 aCharacterSet) +{ + PRUint32 bidiOptions; + + GetBidiOptions(&bidiOptions); + SET_BIDI_OPTION_CHARACTERSET(bidiOptions, aCharacterSet); + SetBidiOptions(bidiOptions); + return NS_OK; +} + +NS_IMETHODIMP DocumentViewerImpl::GetBidiCharacterSet(PRUint8* aCharacterSet) +{ + PRUint32 bidiOptions; + + if (aCharacterSet) { + GetBidiOptions(&bidiOptions); + *aCharacterSet = GET_BIDI_OPTION_CHARACTERSET(bidiOptions); + } + return NS_OK; +} + NS_IMETHODIMP DocumentViewerImpl::SetBidiOptions(PRUint32 aBidiOptions) { if (mPresContext) { diff --git a/layout/base/nsPresContext.cpp b/layout/base/nsPresContext.cpp index 6cbca726f83d..5065e858e7f4 100644 --- a/layout/base/nsPresContext.cpp +++ b/layout/base/nsPresContext.cpp @@ -764,6 +764,11 @@ nsPresContext::GetUserPreferences() GET_BIDI_OPTION_SUPPORT(bidiOptions)); SET_BIDI_OPTION_SUPPORT(bidiOptions, prefInt); + prefInt = + nsContentUtils::GetIntPref(IBMBIDI_CHARSET_STR, + GET_BIDI_OPTION_CHARACTERSET(bidiOptions)); + SET_BIDI_OPTION_CHARACTERSET(bidiOptions, prefInt); + // We don't need to force reflow: either we are initializing a new // prescontext or we are being called from UpdateAfterPreferencesChanged() // which triggers a reflow anyway.