summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2013-07-19 22:35:45 -0700
committerMerov Linden <merov@lindenlab.com>2013-07-19 22:35:45 -0700
commiteadb42eb9d202c38ca2761be07ee4376863550ce (patch)
treee3be91baa660a413a02af6d4084d2fb81ad49c77 /indra
parent39a2f52b026ee20daf9f55bb40273e573cecfa30 (diff)
ACME-734 : Fix : Feed browsing history but without the query part
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llfacebookconnect.cpp1
-rwxr-xr-xindra/newview/llfloaterwebcontent.cpp10
-rwxr-xr-xindra/newview/llfloaterwebcontent.h2
-rwxr-xr-xindra/newview/llurlhistory.cpp23
4 files changed, 17 insertions, 19 deletions
diff --git a/indra/newview/llfacebookconnect.cpp b/indra/newview/llfacebookconnect.cpp
index f0b735c5ca..7c1e7b3b16 100644
--- a/indra/newview/llfacebookconnect.cpp
+++ b/indra/newview/llfacebookconnect.cpp
@@ -321,7 +321,6 @@ void LLFacebookConnect::openFacebookWeb(std::string url)
p.url(url).show_chrome(true);
p.url(url).allow_address_entry(false);
p.url(url).allow_back_forward_navigation(false);
- p.url(url).save_url_history(false);
p.url(url).trusted_content(true);
LLFloaterReg::showInstance("fbc_web", p);
diff --git a/indra/newview/llfloaterwebcontent.cpp b/indra/newview/llfloaterwebcontent.cpp
index 7a65b8d28f..5e8bb7ad57 100755
--- a/indra/newview/llfloaterwebcontent.cpp
+++ b/indra/newview/llfloaterwebcontent.cpp
@@ -48,7 +48,6 @@ LLFloaterWebContent::_Params::_Params()
show_chrome("show_chrome", true),
allow_address_entry("allow_address_entry", true),
allow_back_forward_navigation("allow_back_forward_navigation", true),
- save_url_history("save_url_history", true),
preferred_media_size("preferred_media_size"),
trusted_content("trusted_content", false),
show_page_title("show_page_title", true)
@@ -69,7 +68,6 @@ LLFloaterWebContent::LLFloaterWebContent( const Params& params )
mUUID(params.id()),
mShowPageTitle(params.show_page_title),
mAllowNavigation(true),
- mSaveURLHistory(true),
mDisplayURL("")
{
mCommitCallbackRegistrar.add( "WebContent.Back", boost::bind( &LLFloaterWebContent::onClickBack, this ));
@@ -250,7 +248,6 @@ void LLFloaterWebContent::open_media(const Params& p)
getChild<LLLayoutPanel>("nav_controls")->setVisible(p.show_chrome);
bool address_entry_enabled = p.allow_address_entry && !p.trusted_content;
mAllowNavigation = p.allow_back_forward_navigation;
- mSaveURLHistory = p.save_url_history;
getChildView("address")->setEnabled(address_entry_enabled);
getChildView("popexternal")->setEnabled(address_entry_enabled);
@@ -421,11 +418,8 @@ void LLFloaterWebContent::set_current_url(const std::string& url)
LLStringUtil::trim(mCurrentURL);
LLURLHistory::removeURL("browser", mCurrentURL);
- if (mSaveURLHistory)
- {
- // serialize url history into the system URL History manager
- LLURLHistory::addURL("browser", mCurrentURL);
- }
+ // serialize url history into the system URL History manager
+ LLURLHistory::addURL("browser", mCurrentURL);
if (!mDisplayURL.empty())
{
diff --git a/indra/newview/llfloaterwebcontent.h b/indra/newview/llfloaterwebcontent.h
index 4d77537f5f..9d6d28bce0 100755
--- a/indra/newview/llfloaterwebcontent.h
+++ b/indra/newview/llfloaterwebcontent.h
@@ -55,7 +55,6 @@ public:
Optional<bool> show_chrome,
allow_address_entry,
allow_back_forward_navigation,
- save_url_history,
trusted_content,
show_page_title;
Optional<LLRect> preferred_media_size;
@@ -112,7 +111,6 @@ protected:
std::string mUUID;
bool mShowPageTitle;
bool mAllowNavigation;
- bool mSaveURLHistory;
};
#endif // LL_LLFLOATERWEBCONTENT_H
diff --git a/indra/newview/llurlhistory.cpp b/indra/newview/llurlhistory.cpp
index dd17068be5..a80b9da13c 100755
--- a/indra/newview/llurlhistory.cpp
+++ b/indra/newview/llurlhistory.cpp
@@ -103,22 +103,29 @@ LLSD LLURLHistory::getURLHistory(const std::string& collection)
// static
void LLURLHistory::addURL(const std::string& collection, const std::string& url)
{
- if(! url.empty())
+ if(!url.empty())
{
- sHistorySD[collection].insert(0, url);
+ LLURI u(url);
+ std::string simplified_url = u.scheme() + "://" + u.authority() + u.path();
+ sHistorySD[collection].insert(0, simplified_url);
LLURLHistory::limitSize(collection);
}
}
// static
void LLURLHistory::removeURL(const std::string& collection, const std::string& url)
{
- for(int index = 0; index < sHistorySD[collection].size(); index++)
+ if(!url.empty())
{
- if(sHistorySD[collection].get(index).asString() == url)
- {
- sHistorySD[collection].erase(index);
- }
- }
+ LLURI u(url);
+ std::string simplified_url = u.scheme() + "://" + u.authority() + u.path();
+ for(int index = 0; index < sHistorySD[collection].size(); index++)
+ {
+ if(sHistorySD[collection].get(index).asString() == simplified_url)
+ {
+ sHistorySD[collection].erase(index);
+ }
+ }
+ }
}
// static