summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormaksymsproductengine <maksymsproductengine@lindenlab.com>2014-03-03 20:13:09 +0200
committermaksymsproductengine <maksymsproductengine@lindenlab.com>2014-03-03 20:13:09 +0200
commit100b0f48a9d9aa2883e12ee2c52fc380540711bb (patch)
tree9493bb97eb6f1f13b862bc501edffa6c71f8b2a2
parent7a45e6fd7716ede5cf7b5481542cde039de62509 (diff)
MAINT-2902 FIXED Browser secure session indicator should be prominent
-rwxr-xr-xindra/newview/llfloaterwebcontent.cpp16
-rwxr-xr-xindra/newview/llfloaterwebcontent.h1
2 files changed, 5 insertions, 12 deletions
diff --git a/indra/newview/llfloaterwebcontent.cpp b/indra/newview/llfloaterwebcontent.cpp
index 68dbb5ae33..3e9051967c 100755
--- a/indra/newview/llfloaterwebcontent.cpp
+++ b/indra/newview/llfloaterwebcontent.cpp
@@ -70,8 +70,7 @@ LLFloaterWebContent::LLFloaterWebContent( const Params& params )
mShowPageTitle(params.show_page_title),
mAllowNavigation(true),
mCurrentURL(""),
- mDisplayURL(""),
- mSecureURL(false)
+ mDisplayURL("")
{
mCommitCallbackRegistrar.add( "WebContent.Back", boost::bind( &LLFloaterWebContent::onClickBack, this ));
mCommitCallbackRegistrar.add( "WebContent.Forward", boost::bind( &LLFloaterWebContent::onClickForward, this ));
@@ -315,9 +314,6 @@ void LLFloaterWebContent::draw()
mBtnBack->setEnabled( mWebBrowser->canNavigateBack() && mAllowNavigation);
mBtnForward->setEnabled( mWebBrowser->canNavigateForward() && mAllowNavigation);
- // Show/hide the lock icon
- mSecureLockIcon->setVisible(mSecureURL && !mAddressCombo->hasFocus());
-
LLFloater::draw();
}
@@ -362,8 +358,6 @@ void LLFloaterWebContent::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent
// we populate the status bar with URLs as they change so clear it now we're done
const std::string end_str = "";
mStatusBarText->setText( end_str );
- mAddressCombo->setLeftTextPadding(22);
- mAddressCombo->setLeftTextPadding(2);
}
else if(event == MEDIA_EVENT_CLOSE_REQUEST)
{
@@ -430,10 +424,10 @@ void LLFloaterWebContent::set_current_url(const std::string& url)
static const std::string secure_prefix = std::string("https://");
std::string prefix = mCurrentURL.substr(0, secure_prefix.length());
LLStringUtil::toLower(prefix);
- mSecureURL = (prefix == secure_prefix);
-
- // Hack : we move the text a bit to make space for the lock icon in the secure URL case
- mDisplayURL = (mSecureURL ? " " + mCurrentURL : mCurrentURL);
+ bool secure_url = (prefix == secure_prefix);
+ mSecureLockIcon->setVisible(secure_url);
+ mAddressCombo->setLeftTextPadding(secure_url ? 22 : 2);
+ mDisplayURL = mCurrentURL;
// Clean up browsing list (prevent dupes) and add/select the new URL to it
mAddressCombo->remove(mCurrentURL);
diff --git a/indra/newview/llfloaterwebcontent.h b/indra/newview/llfloaterwebcontent.h
index f22940cd07..2206784e37 100755
--- a/indra/newview/llfloaterwebcontent.h
+++ b/indra/newview/llfloaterwebcontent.h
@@ -112,7 +112,6 @@ protected:
std::string mUUID;
bool mShowPageTitle;
bool mAllowNavigation;
- bool mSecureURL; // true when the current url is prefixed "https://"
};
#endif // LL_LLFLOATERWEBCONTENT_H