svnno****@sourc*****
svnno****@sourc*****
Fri Apr 13 15:03:54 JST 2007
Revision: 3176 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=kazehakase&view=rev&rev=3176 Author: kous Date: 2007-04-13 15:03:53 +0900 (Fri, 13 Apr 2007) Log Message: ----------- * module/embed/gecko/kz-mozwrapper.{cpp,h}, module/embed/gecko/MozillaPrivate.{cpp,h}, module/embed/gecko/kz-gecko-embed.cpp: passed last_modified. Modified Paths: -------------- kazehakase/trunk/ChangeLog kazehakase/trunk/module/embed/gecko/MozillaPrivate.cpp kazehakase/trunk/module/embed/gecko/MozillaPrivate.h kazehakase/trunk/module/embed/gecko/kz-gecko-embed.cpp kazehakase/trunk/module/embed/gecko/kz-mozwrapper.cpp kazehakase/trunk/module/embed/gecko/kz-mozwrapper.h Modified: kazehakase/trunk/ChangeLog =================================================================== --- kazehakase/trunk/ChangeLog 2007-04-13 05:59:17 UTC (rev 3175) +++ kazehakase/trunk/ChangeLog 2007-04-13 06:03:53 UTC (rev 3176) @@ -1,5 +1,9 @@ 2007-04-13 Kouhei Sutou <kou****@cozmi*****> + * module/embed/gecko/kz-mozwrapper.{cpp,h}, + module/embed/gecko/MozillaPrivate.{cpp,h}, + module/embed/gecko/kz-gecko-embed.cpp: passed last_modified. + * module/embed/gecko/kz-gecko-embed.cpp (net_stop_proccess): Gecko 1.8 generates thumbnail on net-stop. Modified: kazehakase/trunk/module/embed/gecko/MozillaPrivate.cpp =================================================================== --- kazehakase/trunk/module/embed/gecko/MozillaPrivate.cpp 2007-04-13 05:59:17 UTC (rev 3175) +++ kazehakase/trunk/module/embed/gecko/MozillaPrivate.cpp 2007-04-13 06:03:53 UTC (rev 3176) @@ -324,7 +324,7 @@ #define KZ_CANVAS_HEIGHT 800 gboolean MozillaPrivate::CreateThumbnail(nsIDOMWindow *domWindow, const gchar *uri, - EggPixbufThumbSize size) + guint last_modified, EggPixbufThumbSize size) { nsresult rv; nsCOMPtr<nsIDOMDocument> domDoc; @@ -394,11 +394,9 @@ if (!thumbnail) return FALSE; - GTimeVal now; - g_get_current_time(&now); egg_pixbuf_add_thumbnail_data(thumbnail, uri, - now.tv_sec, + last_modified, size); egg_pixbuf_save_thumbnail(thumbnail, NULL, NULL); g_object_unref(thumbnail); Modified: kazehakase/trunk/module/embed/gecko/MozillaPrivate.h =================================================================== --- kazehakase/trunk/module/embed/gecko/MozillaPrivate.h 2007-04-13 05:59:17 UTC (rev 3175) +++ kazehakase/trunk/module/embed/gecko/MozillaPrivate.h 2007-04-13 06:03:53 UTC (rev 3176) @@ -54,6 +54,7 @@ #ifdef MOZ_NSICANVASRENDERINGCONTEXTINTERNAL_HAVE_GETINPUTSTREAM_ gboolean CreateThumbnail (nsIDOMWindow *domWindow, const gchar *uri, + guint last_modified, EggPixbufThumbSize size); #endif } Modified: kazehakase/trunk/module/embed/gecko/kz-gecko-embed.cpp =================================================================== --- kazehakase/trunk/module/embed/gecko/kz-gecko-embed.cpp 2007-04-13 05:59:17 UTC (rev 3175) +++ kazehakase/trunk/module/embed/gecko/kz-gecko-embed.cpp 2007-04-13 06:03:53 UTC (rev 3176) @@ -2937,12 +2937,20 @@ if (uri[0] == '\0') return; + guint last_modified = kz_gecko_embed_get_last_modified(kzembed); + if (last_modified == 0) + { + GTimeVal now; + g_get_current_time(&now); + last_modified = now.tv_sec; + } + #ifdef MOZ_NSICANVASRENDERINGCONTEXTINTERNAL_HAVE_GETINPUTSTREAM_ KzGeckoEmbedPrivate *priv = KZ_GECKO_EMBED_GET_PRIVATE (kzembed); KzMozWrapper *wrapper = priv->wrapper; g_return_if_fail (wrapper != NULL); - wrapper->CreateThumbnail(uri, size); + wrapper->CreateThumbnail(uri, last_modified, size); #else nsresult rv; @@ -2971,14 +2979,6 @@ if (!thumbnail) return; - guint last_modified = kz_gecko_embed_get_last_modified(kzembed); - if (last_modified == 0) - { - GTimeVal now; - g_get_current_time(&now); - last_modified = now.tv_sec; - } - egg_pixbuf_add_thumbnail_data(thumbnail, uri, last_modified, Modified: kazehakase/trunk/module/embed/gecko/kz-mozwrapper.cpp =================================================================== --- kazehakase/trunk/module/embed/gecko/kz-mozwrapper.cpp 2007-04-13 05:59:17 UTC (rev 3175) +++ kazehakase/trunk/module/embed/gecko/kz-mozwrapper.cpp 2007-04-13 06:03:53 UTC (rev 3176) @@ -2022,12 +2022,15 @@ #ifdef MOZ_NSICANVASRENDERINGCONTEXTINTERNAL_HAVE_GETINPUTSTREAM_ nsresult -KzMozWrapper::CreateThumbnail (const gchar *uri, EggPixbufThumbSize size) +KzMozWrapper::CreateThumbnail (const gchar *uri, + guint last_modified, + EggPixbufThumbSize size) { nsCOMPtr<nsIDOMWindow> domWindow; GetDOMWindow(getter_AddRefs(domWindow)); - if (!MozillaPrivate::CreateThumbnail(domWindow, uri, size)) + if (!MozillaPrivate::CreateThumbnail(domWindow, uri, + last_modified, size)) return NS_ERROR_FAILURE; return NS_OK; Modified: kazehakase/trunk/module/embed/gecko/kz-mozwrapper.h =================================================================== --- kazehakase/trunk/module/embed/gecko/kz-mozwrapper.h 2007-04-13 05:59:17 UTC (rev 3175) +++ kazehakase/trunk/module/embed/gecko/kz-mozwrapper.h 2007-04-13 06:03:53 UTC (rev 3176) @@ -149,6 +149,7 @@ #ifdef MOZ_NSICANVASRENDERINGCONTEXTINTERNAL_HAVE_GETINPUTSTREAM_ nsresult CreateThumbnail (const gchar *uri, + guint last_modified, EggPixbufThumbSize size); #endif