[epiphany] ephy-embed: consider text/plain pages as document-type HTML
- From: Xan Lopez <xan src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [epiphany] ephy-embed: consider text/plain pages as document-type HTML
- Date: Tue, 8 Dec 2009 14:31:29 +0000 (UTC)
commit a1ef399affa0a1ac0ddbc796208a8e2ff40758a0
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 16f9ded..d8f8a31 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]