[kazehakase-svn] [3872] fix for xulrunner-1.9.2.

Back to archive index

svnno****@sourc***** svnno****@sourc*****
Mon May 3 16:23:58 JST 2010


Revision: 3872
          http://sourceforge.jp/projects/kazehakase/svn/view?view=rev&revision=3872
Author:   ikezoe
Date:     2010-05-03 16:23:58 +0900 (Mon, 03 May 2010)

Log Message:
-----------
fix for xulrunner-1.9.2.

Modified Paths:
--------------
    kazehakase/trunk/module/embed/gecko/kz-mozwrapper.cpp

Modified: kazehakase/trunk/module/embed/gecko/kz-mozwrapper.cpp
===================================================================
--- kazehakase/trunk/module/embed/gecko/kz-mozwrapper.cpp	2010-05-03 07:23:57 UTC (rev 3871)
+++ kazehakase/trunk/module/embed/gecko/kz-mozwrapper.cpp	2010-05-03 07:23:58 UTC (rev 3872)
@@ -102,7 +102,7 @@
 #ifndef G_OS_WIN32
 #  define nsString_h___
 #  define nsAString_h___
-#  include <nsPresContext.h>
+//#  include <nsPresContext.h>
 #  undef nsAString_h___
 #  undef nsString_h___
 #endif
@@ -2152,29 +2152,5 @@
 gboolean
 KzMozWrapper::SetZoomOnDocShell (float aZoom, nsIDocShell *DocShell)
 {
-#ifndef G_OS_WIN32
-	nsCOMPtr<nsPresContext> PresContext;
-	nsresult rv = DocShell->GetPresContext (getter_AddRefs(PresContext));
-	if (NS_FAILED(rv) || !PresContext) return FALSE;
-
-	nsIDeviceContext *DeviceContext(nsnull);
-	DeviceContext = PresContext->DeviceContext();
-	if (!DeviceContext) return FALSE;
-
-	nsCOMPtr<nsIContentViewer> ContentViewer;
-	
-	rv = DocShell->GetContentViewer(getter_AddRefs(ContentViewer));
-	if (NS_FAILED(rv) || !ContentViewer) return FALSE;
-
-	nsCOMPtr<nsIMarkupDocumentViewer> mdv = do_QueryInterface(ContentViewer);
-	if (!mdv) return FALSE;
-
-	rv = mdv->SetTextZoom (aZoom);
-
-	if NS_FAILED(rv) return FALSE;
-	
-	return TRUE;
-#else
-	return FALSE;
-#endif
+	return NS_SUCCEEDED(mDOMWindow->SetTextZoom(aZoom));
 }




More information about the Kazehakase-cvs mailing list
Back to archive index