aboutsummaryrefslogtreecommitdiffstats
path: root/embed/ephy-embed.c
diff options
context:
space:
mode:
authorXan Lopez <xan@gnome.org>2009-12-08 22:29:08 +0800
committerXan Lopez <xan@gnome.org>2009-12-08 22:29:08 +0800
commita1ef399affa0a1ac0ddbc796208a8e2ff40758a0 (patch)
treea259699acb5f23ea032a66188efe24a83e462921 /embed/ephy-embed.c
parent41ceee8ac728d660245972ed41b0fa577b694446 (diff)
downloadgsoc2013-epiphany-a1ef399affa0a1ac0ddbc796208a8e2ff40758a0.tar
gsoc2013-epiphany-a1ef399affa0a1ac0ddbc796208a8e2ff40758a0.tar.gz
gsoc2013-epiphany-a1ef399affa0a1ac0ddbc796208a8e2ff40758a0.tar.bz2
gsoc2013-epiphany-a1ef399affa0a1ac0ddbc796208a8e2ff40758a0.tar.lz
gsoc2013-epiphany-a1ef399affa0a1ac0ddbc796208a8e2ff40758a0.tar.xz
gsoc2013-epiphany-a1ef399affa0a1ac0ddbc796208a8e2ff40758a0.tar.zst
gsoc2013-epiphany-a1ef399affa0a1ac0ddbc796208a8e2ff40758a0.zip
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
Diffstat (limited to 'embed/ephy-embed.c')
-rw-r--r--embed/ephy-embed.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/embed/ephy-embed.c b/embed/ephy-embed.c
index 16f9ded00..d8f8a31dd 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