bug 75066; author=simon@softel.co.il; r=jst; sr=erik; diffs from IBM bidi
project (e.g. Arabic, Hebrew) git-svn-id: svn://10.0.0.236/trunk@92118 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -91,6 +91,10 @@
|
||||
// http://bugzilla.mozilla.org/show_bug.cgi?id=71482
|
||||
#include "nsIBrowserHistory.h"
|
||||
|
||||
#ifdef IBMBIDI
|
||||
#include "nsIUBidiUtils.h"
|
||||
#endif
|
||||
|
||||
static NS_DEFINE_IID(kDeviceContextCID, NS_DEVICE_CONTEXT_CID);
|
||||
static NS_DEFINE_CID(kSimpleURICID, NS_SIMPLEURI_CID);
|
||||
static NS_DEFINE_CID(kDocumentCharsetInfoCID, NS_DOCUMENTCHARSETINFO_CID);
|
||||
@@ -2930,6 +2934,10 @@ NS_IMETHODIMP nsDocShell::SetupNewViewer(nsIContentViewer* aNewViewer)
|
||||
NS_ENSURE_SUCCESS(GetSameTypeParent(getter_AddRefs(parentAsItem)),
|
||||
NS_ERROR_FAILURE);
|
||||
nsCOMPtr<nsIDocShell> parent(do_QueryInterface(parentAsItem));
|
||||
#ifdef IBMBIDI
|
||||
PRUint32 options;
|
||||
nsIMarkupDocumentViewer* newViewer = nsnull;
|
||||
#endif // IBMBIDI
|
||||
|
||||
if(mContentViewer || parent)
|
||||
{
|
||||
@@ -2965,6 +2973,10 @@ NS_IMETHODIMP nsDocShell::SetupNewViewer(nsIContentViewer* aNewViewer)
|
||||
NS_ERROR_FAILURE);
|
||||
NS_ENSURE_SUCCESS(oldMUDV->GetHintCharacterSetSource(&hintCharsetSource),
|
||||
NS_ERROR_FAILURE);
|
||||
#ifdef IBMBIDI
|
||||
NS_ENSURE_SUCCESS(oldMUDV->GetBidiOptions(&options), NS_ERROR_FAILURE);
|
||||
newViewer = newMUDV.get();
|
||||
#endif // IBMBIDI
|
||||
|
||||
// set the old state onto the new content viewer
|
||||
NS_ENSURE_SUCCESS(newMUDV->SetDefaultCharacterSet(defaultCharset),
|
||||
@@ -3036,6 +3048,12 @@ NS_IMETHODIMP nsDocShell::SetupNewViewer(nsIContentViewer* aNewViewer)
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
#ifdef IBMBIDI
|
||||
if (newViewer) {
|
||||
// set the old state onto the new content viewer
|
||||
NS_ENSURE_SUCCESS(newViewer->SetBidiOptions(options), NS_ERROR_FAILURE);
|
||||
}
|
||||
#endif // IBMBIDI
|
||||
// XXX: It looks like the LayoutState gets restored again in Embed()
|
||||
// right after the call to SetupNewViewer(...)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user