[epiphany/gnome-2-28] ephy-embed: consider text/plain pages as document-type HTML



commit 26dd4368f537a9bb518e90feb59287643bf57181
Author: Xan Lopez <xan gnome org>
Date:   Tue Dec 8 16:29:08 2009 +0200

    ephy-embed: consider text/plain pages as document-type HTML
    
    WebKit still thinks of them as HTML documents, and otherwise things
    like the text-encoding menu are disabled for them.
    
    Bug #603927

 embed/ephy-embed.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/embed/ephy-embed.c b/embed/ephy-embed.c
index d215ed6..408c59b 100644
--- a/embed/ephy-embed.c
+++ b/embed/ephy-embed.c
@@ -373,14 +373,15 @@ mime_type_policy_decision_requested_cb (WebKitWebView *web_view,
   if (webkit_web_view_get_main_frame (web_view) == frame) {
     type = EPHY_WEB_VIEW_DOCUMENT_OTHER;
 
-    if (!strcmp (mime_type, "text/html"))
+    if (!strcmp (mime_type, "text/html") ||
+        !strcmp (mime_type, "text/plain"))
       type = EPHY_WEB_VIEW_DOCUMENT_HTML;
     else if (!strcmp (mime_type, "application/xhtml+xml"))
       type = EPHY_WEB_VIEW_DOCUMENT_XML;
     else if (!strncmp (mime_type, "image/", 6))
       type = EPHY_WEB_VIEW_DOCUMENT_IMAGE;
 
-    /* FIXME: mayb  e it makes more sense to have an API to query the mime
+    /* FIXME: maybe it makes more sense to have an API to query the mime
      * type when the load of a page starts than doing this here.
      */
     /* FIXME: rename ge-document-type (and all ge- signals...) to



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