[epiphany] about-handler: Do not send encoded images to the web process in about:applications



commit 7393c9a4db71319967b554ea1fdd94c644a573c6
Author: Carlos Garcia Campos <cgarcia igalia com>
Date:   Fri Feb 21 09:59:19 2014 +0100

    about-handler: Do not send encoded images to the web process in about:applications
    
    Pass the app icon filename instead.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=724862

 embed/ephy-about-handler.c |   10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)
---
diff --git a/embed/ephy-about-handler.c b/embed/ephy-about-handler.c
index 2ef4b67..b133df3 100644
--- a/embed/ephy-about-handler.c
+++ b/embed/ephy-about-handler.c
@@ -369,24 +369,18 @@ handle_applications_finished_cb (EphyAboutHandler *handler,
 
   applications = g_task_propagate_pointer (G_TASK (result), NULL);
   for (p = applications; p; p = p->next) {
-    char *img_data = NULL, *img_data_base64 = NULL;
-    gsize data_length;
     EphyWebApplication *app = (EphyWebApplication*)p->data;
 
-    if (g_file_get_contents (app->icon_url, &img_data, &data_length, NULL))
-      img_data_base64 = g_base64_encode ((guchar*)img_data, data_length);
     g_string_append_printf (data_str,
                             "<form>" \
                             "<tbody><tr>" \
-                            "<td class=\"icon\"><img width=64 height=64 
src=\"data:image/png;base64,%s\"></img></td>" \
+                            "<td class=\"icon\"><img width=64 height=64 src=\"file://%s\"></img></td>" \
                             "<td class=\"data\"><div class=\"appname\">%s</div><div 
class=\"appurl\">%s</div></td>" \
                             "<td class=\"input\"><input type=\"hidden\" name=\"app_id\" value=\"%s\"><input 
type=\"submit\" value=\"Delete\" id=\"%s\">" \
                             "</td><td class=\"date\">%s <br /> %s</td></tr></tbody></form>",
-                            img_data_base64, app->name, app->url, app->name, app->name,
+                            app->icon_url, app->name, app->url, app->name, app->name,
                             /* Note for translators: this refers to the installation date. */
                             _("Installed on:"), app->install_date);
-    g_free (img_data_base64);
-    g_free (img_data);
   }
 
   g_string_append (data_str, "</table></body></html>");


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]