Skip to content
Snippets Groups Projects
Commit 100b0f48 authored by maksymsproductengine's avatar maksymsproductengine
Browse files

MAINT-2902 FIXED Browser secure session indicator should be prominent

parent 7a45e6fd
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
......@@ -112,7 +112,6 @@ class LLFloaterWebContent :
std::string mUUID;
bool mShowPageTitle;
bool mAllowNavigation;
bool mSecureURL; // true when the current url is prefixed "https://"
};
#endif // LL_LLFLOATERWEBCONTENT_H
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment