From f3e044b88ad2f7d45bc5d4edd2218e29771b2025 Mon Sep 17 00:00:00 2001 From: Philip Chee Date: Mon, 25 Apr 2011 02:19:05 +0800 Subject: [PATCH] Backed out changeset: baf7456adc98 --- layout/base/nsDocumentViewer.cpp | 21 +++++++++++++++++++++ layout/base/nsPresContext.cpp | 5 +++++ 2 files changed, 26 insertions(+) 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.