[kazehakase-svn] [3398] *format clean only

Zurück zum Archiv-Index

svnno****@sourc***** svnno****@sourc*****
Tue Feb 26 03:56:31 JST 2008


Revision: 3398
          http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=kazehakase&view=rev&rev=3398
Author:   pal_gene
Date:     2008-02-26 03:56:31 +0900 (Tue, 26 Feb 2008)

Log Message:
-----------
*format clean only

	modified:   module/embed/gecko/kz-mozthumbnailer.cpp

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

Modified: kazehakase/trunk/module/embed/gecko/kz-mozthumbnailer.cpp
===================================================================
--- kazehakase/trunk/module/embed/gecko/kz-mozthumbnailer.cpp	2008-02-24 08:20:26 UTC (rev 3397)
+++ kazehakase/trunk/module/embed/gecko/kz-mozthumbnailer.cpp	2008-02-25 18:56:31 UTC (rev 3398)
@@ -43,27 +43,20 @@
                                   guint last_modified, EggPixbufThumbSize size)
 {
 	nsresult rv;
-	nsCOMPtr<nsIDOMDocument> domDoc;
-	domWindow->GetDocument(getter_AddRefs(domDoc));
-
+	
 	nsCOMPtr<nsICanvasRenderingContextInternal> context;
-
-	const char *ctxString = "@mozilla.org/content/canvas-rendering-context;1?id=2d";
-	context = do_CreateInstance(ctxString, &rv);
-
+	context = do_CreateInstance("@mozilla.org/content/canvas-rendering-context;1?id=2d", &rv);
 	if (NS_FAILED(rv) || !context) return FALSE;
-
 	context->SetDimensions(size, KZ_THUMB_HEIGHT);
 	context->SetCanvasElement(nsnull);
-
 	nsCOMPtr<nsIDOMCanvasRenderingContext2D> domCanvas = do_QueryInterface(context, &rv);
 	if (NS_FAILED(rv) || !domCanvas) return FALSE;
 
-	float sx, sy;
-	sx = (float) size / KZ_CANVAS_WIDTH;
-	sy = (float) KZ_THUMB_HEIGHT / KZ_CANVAS_HEIGHT;
+	nsCOMPtr<nsIDOMDocument> domDoc;
+	domWindow->GetDocument(getter_AddRefs(domDoc));
+	float sx = (float) size / KZ_CANVAS_WIDTH;
+	float sy = (float) KZ_THUMB_HEIGHT / KZ_CANVAS_HEIGHT;
 	domCanvas->Scale(sx, sy);
-
 	rv = domCanvas->DrawWindow(domWindow, 0, 0, KZ_CANVAS_WIDTH, KZ_CANVAS_HEIGHT, NS_LITERAL_STRING("rgb(0,0,0)")); 
 	if (NS_FAILED(rv)) return FALSE;
 




More information about the Kazehakase-cvs mailing list
Zurück zum Archiv-Index