From 342c812121475400d8d204226ee676a811ecc281 Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Tue, 26 Nov 2013 05:13:02 -0500 Subject: [PATCH] Add initial_mime_type param to LLFloaterWebContent, defaulted to "text/html" --- indra/newview/llfloaterwebcontent.cpp | 5 +++-- indra/newview/llfloaterwebcontent.h | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/indra/newview/llfloaterwebcontent.cpp b/indra/newview/llfloaterwebcontent.cpp index 6d2a2ae3e..a8f27731b 100644 --- a/indra/newview/llfloaterwebcontent.cpp +++ b/indra/newview/llfloaterwebcontent.cpp @@ -43,6 +43,7 @@ LLFloaterWebContent::_Params::_Params() : url("url"), target("target"), + initial_mime_type("initial_mime_type", "text/html"), id("id"), window_class("window_class", "web_content"), show_chrome("show_chrome", true), @@ -283,9 +284,9 @@ void LLFloaterWebContent::open_media(const Params& p) { // Specifying a mime type of text/html here causes the plugin system to skip the MIME type probe and just open a browser plugin. LLViewerMedia::proxyWindowOpened(p.target(), p.id()); - mWebBrowser->setHomePageUrl(p.url, "text/html"); + mWebBrowser->setHomePageUrl(p.url, p.initial_mime_type); mWebBrowser->setTarget(p.target); - mWebBrowser->navigateTo(p.url, "text/html"); + mWebBrowser->navigateTo(p.url, p.initial_mime_type); set_current_url(p.url); diff --git a/indra/newview/llfloaterwebcontent.h b/indra/newview/llfloaterwebcontent.h index 9fabe42ac..8dbca1d24 100644 --- a/indra/newview/llfloaterwebcontent.h +++ b/indra/newview/llfloaterwebcontent.h @@ -50,6 +50,7 @@ public: { Optional url, target, + initial_mime_type, window_class, id; Optional show_chrome,