From 16709a9bef3ebf24c60eac29f7c5cb743e855da1 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Thu, 18 Jul 2013 21:05:41 -0700 Subject: ACME-734 : WIP : Implemented changes for https URL in the address bar and added options to web floater to hide history and disable buttons --- indra/newview/llfloaterwebcontent.cpp | 43 +++++++++++++++++++++++++++-------- 1 file changed, 33 insertions(+), 10 deletions(-) (limited to 'indra/newview/llfloaterwebcontent.cpp') diff --git a/indra/newview/llfloaterwebcontent.cpp b/indra/newview/llfloaterwebcontent.cpp index 3fe2518de6..92dbbb402d 100755 --- a/indra/newview/llfloaterwebcontent.cpp +++ b/indra/newview/llfloaterwebcontent.cpp @@ -46,7 +46,9 @@ LLFloaterWebContent::_Params::_Params() id("id"), window_class("window_class", "web_content"), show_chrome("show_chrome", true), - allow_address_entry("allow_address_entry", 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) @@ -58,6 +60,7 @@ LLFloaterWebContent::LLFloaterWebContent( const Params& params ) mWebBrowser(NULL), mAddressCombo(NULL), mSecureLockIcon(NULL), + mSecurePrefix(NULL), mStatusBarText(NULL), mStatusBarProgress(NULL), mBtnBack(NULL), @@ -65,7 +68,9 @@ LLFloaterWebContent::LLFloaterWebContent( const Params& params ) mBtnReload(NULL), mBtnStop(NULL), mUUID(params.id()), - mShowPageTitle(params.show_page_title) + mShowPageTitle(params.show_page_title), + mAllowNavigation(true), + mSaveURLHistory(true) { mCommitCallbackRegistrar.add( "WebContent.Back", boost::bind( &LLFloaterWebContent::onClickBack, this )); mCommitCallbackRegistrar.add( "WebContent.Forward", boost::bind( &LLFloaterWebContent::onClickForward, this )); @@ -97,7 +102,8 @@ BOOL LLFloaterWebContent::postBuild() // cache image for secure browsing mSecureLockIcon = getChild< LLIconCtrl >("media_secure_lock_flag"); - + mSecurePrefix = getChild< LLTextBox >( "secured_prefix" ); + // initialize the URL history using the system URL History manager initializeURLHistory(); @@ -243,6 +249,8 @@ void LLFloaterWebContent::open_media(const Params& p) getChild("status_bar")->setVisible(p.show_chrome); getChild("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); @@ -295,8 +303,8 @@ void LLFloaterWebContent::onClose(bool app_quitting) void LLFloaterWebContent::draw() { // this is asynchronous so we need to keep checking - mBtnBack->setEnabled( mWebBrowser->canNavigateBack() ); - mBtnForward->setEnabled( mWebBrowser->canNavigateForward() ); + mBtnBack->setEnabled( mWebBrowser->canNavigateBack() && mAllowNavigation); + mBtnForward->setEnabled( mWebBrowser->canNavigateForward() && mAllowNavigation); LLFloater::draw(); } @@ -344,16 +352,28 @@ void LLFloaterWebContent::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent mStatusBarText->setText( end_str ); // decide if secure browsing icon should be displayed - std::string prefix = std::string("https://"); + std::string prefix = std::string("https://"); std::string test_prefix = mCurrentURL.substr(0, prefix.length()); LLStringUtil::toLower(test_prefix); - if(test_prefix == prefix) + if (test_prefix == prefix) { mSecureLockIcon->setVisible(true); + mSecurePrefix->setVisible(true); + // Hack : we suppress the "https" prefix and move the text a bit + // to make space for the lock icon and the green "https" text. + // However, so not to confuse the list management, we're not adding + // that hacked url to the history. The full url is already in there. + std::string url = mCurrentURL; + url.replace(0,5,""); + url = " " + url; + mAddressCombo->remove( url ); + mAddressCombo->add( url ); + mAddressCombo->selectByValue( url ); } else { mSecureLockIcon->setVisible(false); + mSecurePrefix->setVisible(false); } } else if(event == MEDIA_EVENT_CLOSE_REQUEST) @@ -399,9 +419,12 @@ void LLFloaterWebContent::set_current_url(const std::string& url) { mCurrentURL = url; - // serialize url history into the system URL History manager - LLURLHistory::removeURL("browser", mCurrentURL); - LLURLHistory::addURL("browser", mCurrentURL); + LLURLHistory::removeURL("browser", mCurrentURL); + if (mSaveURLHistory) + { + // serialize url history into the system URL History manager + LLURLHistory::addURL("browser", mCurrentURL); + } mAddressCombo->remove( mCurrentURL ); mAddressCombo->add( mCurrentURL ); -- cgit v1.2.3 From 652ec2feeeb39c5c7ec9553563e3fdc29c66780d Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Fri, 19 Jul 2013 17:47:58 -0700 Subject: ACME-734 : Suppress the green https experiment, prevent logging urls when skipping history, allow temporary url for display purposes --- indra/newview/llfloaterwebcontent.cpp | 48 +++++++++++++++++++++-------------- 1 file changed, 29 insertions(+), 19 deletions(-) (limited to 'indra/newview/llfloaterwebcontent.cpp') diff --git a/indra/newview/llfloaterwebcontent.cpp b/indra/newview/llfloaterwebcontent.cpp index 92dbbb402d..eb1717d384 100755 --- a/indra/newview/llfloaterwebcontent.cpp +++ b/indra/newview/llfloaterwebcontent.cpp @@ -60,7 +60,6 @@ LLFloaterWebContent::LLFloaterWebContent( const Params& params ) mWebBrowser(NULL), mAddressCombo(NULL), mSecureLockIcon(NULL), - mSecurePrefix(NULL), mStatusBarText(NULL), mStatusBarProgress(NULL), mBtnBack(NULL), @@ -70,7 +69,8 @@ LLFloaterWebContent::LLFloaterWebContent( const Params& params ) mUUID(params.id()), mShowPageTitle(params.show_page_title), mAllowNavigation(true), - mSaveURLHistory(true) + mSaveURLHistory(true), + mDisplayURL("") { mCommitCallbackRegistrar.add( "WebContent.Back", boost::bind( &LLFloaterWebContent::onClickBack, this )); mCommitCallbackRegistrar.add( "WebContent.Forward", boost::bind( &LLFloaterWebContent::onClickForward, this )); @@ -102,7 +102,6 @@ BOOL LLFloaterWebContent::postBuild() // cache image for secure browsing mSecureLockIcon = getChild< LLIconCtrl >("media_secure_lock_flag"); - mSecurePrefix = getChild< LLTextBox >( "secured_prefix" ); // initialize the URL history using the system URL History manager initializeURLHistory(); @@ -242,8 +241,10 @@ void LLFloaterWebContent::open_media(const Params& p) LLViewerMedia::proxyWindowOpened(p.target(), p.id()); mWebBrowser->setHomePageUrl(p.url, "text/html"); mWebBrowser->setTarget(p.target); + LLViewerMedia::setLogURL(p.save_url_history); // Turn logging on/off as requested (flag default is true) mWebBrowser->navigateTo(p.url, "text/html"); + mSecureLockIcon->setVisible(false); set_current_url(p.url); getChild("status_bar")->setVisible(p.show_chrome); @@ -319,6 +320,7 @@ void LLFloaterWebContent::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent if ( url.length() ) mStatusBarText->setText( url ); + mSecureLockIcon->setVisible(false); set_current_url( url ); } else if(event == MEDIA_EVENT_NAVIGATE_BEGIN) @@ -358,23 +360,22 @@ void LLFloaterWebContent::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent if (test_prefix == prefix) { mSecureLockIcon->setVisible(true); - mSecurePrefix->setVisible(true); - // Hack : we suppress the "https" prefix and move the text a bit - // to make space for the lock icon and the green "https" text. - // However, so not to confuse the list management, we're not adding - // that hacked url to the history. The full url is already in there. - std::string url = mCurrentURL; - url.replace(0,5,""); - url = " " + url; - mAddressCombo->remove( url ); - mAddressCombo->add( url ); - mAddressCombo->selectByValue( url ); - } - else - { - mSecureLockIcon->setVisible(false); - mSecurePrefix->setVisible(false); + if (!mDisplayURL.empty()) + { + // Clear temporary entry if any + mAddressCombo->remove( mDisplayURL ); + mDisplayURL = ""; + } + // Hack : we move the text a bit to make space for the lock icon. + // That entry in the list will be deleted on the next add. + mDisplayURL = " " + mCurrentURL; + mAddressCombo->add( mDisplayURL ); + mAddressCombo->selectByValue( mDisplayURL ); } + else + { + mSecureLockIcon->setVisible(false); + } } else if(event == MEDIA_EVENT_CLOSE_REQUEST) { @@ -418,6 +419,7 @@ void LLFloaterWebContent::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent void LLFloaterWebContent::set_current_url(const std::string& url) { mCurrentURL = url; + LLStringUtil::trim(mCurrentURL); LLURLHistory::removeURL("browser", mCurrentURL); if (mSaveURLHistory) @@ -426,6 +428,12 @@ void LLFloaterWebContent::set_current_url(const std::string& url) LLURLHistory::addURL("browser", mCurrentURL); } + if (!mDisplayURL.empty()) + { + // Clear temporary entry if any + mAddressCombo->remove( mDisplayURL ); + mDisplayURL = ""; + } mAddressCombo->remove( mCurrentURL ); mAddressCombo->add( mCurrentURL ); mAddressCombo->selectByValue( mCurrentURL ); @@ -472,6 +480,7 @@ void LLFloaterWebContent::onEnterAddress() // make sure there is at least something there. // (perhaps this test should be for minimum length of a URL) std::string url = mAddressCombo->getValue().asString(); + LLStringUtil::trim(url); if ( url.length() > 0 ) { mWebBrowser->navigateTo( url, "text/html"); @@ -483,6 +492,7 @@ void LLFloaterWebContent::onPopExternal() // make sure there is at least something there. // (perhaps this test should be for minimum length of a URL) std::string url = mAddressCombo->getValue().asString(); + LLStringUtil::trim(url); if ( url.length() > 0 ) { LLWeb::loadURLExternal( url ); -- cgit v1.2.3 From 9b5104b3b5f608dbc9f06596885bdab9878f4065 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Fri, 19 Jul 2013 19:32:53 -0700 Subject: ACME-734 : Fix : Continue to log but just skip the query parts --- indra/newview/llfloaterwebcontent.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview/llfloaterwebcontent.cpp') diff --git a/indra/newview/llfloaterwebcontent.cpp b/indra/newview/llfloaterwebcontent.cpp index eb1717d384..7a65b8d28f 100755 --- a/indra/newview/llfloaterwebcontent.cpp +++ b/indra/newview/llfloaterwebcontent.cpp @@ -241,7 +241,6 @@ void LLFloaterWebContent::open_media(const Params& p) LLViewerMedia::proxyWindowOpened(p.target(), p.id()); mWebBrowser->setHomePageUrl(p.url, "text/html"); mWebBrowser->setTarget(p.target); - LLViewerMedia::setLogURL(p.save_url_history); // Turn logging on/off as requested (flag default is true) mWebBrowser->navigateTo(p.url, "text/html"); mSecureLockIcon->setVisible(false); -- cgit v1.2.3 From eadb42eb9d202c38ca2761be07ee4376863550ce Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Fri, 19 Jul 2013 22:35:45 -0700 Subject: ACME-734 : Fix : Feed browsing history but without the query part --- indra/newview/llfloaterwebcontent.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'indra/newview/llfloaterwebcontent.cpp') 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("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()) { -- cgit v1.2.3 From f44d24fafba7e8b9e8b5318602088a69d8da741c Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Sun, 21 Jul 2013 13:02:55 -0700 Subject: ACME-734 : Fix : Factorize and clean up web browsing address, log and history code --- indra/newview/llfloaterwebcontent.cpp | 36 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 20 deletions(-) (limited to 'indra/newview/llfloaterwebcontent.cpp') diff --git a/indra/newview/llfloaterwebcontent.cpp b/indra/newview/llfloaterwebcontent.cpp index 5e8bb7ad57..129e1f0e2a 100755 --- a/indra/newview/llfloaterwebcontent.cpp +++ b/indra/newview/llfloaterwebcontent.cpp @@ -68,6 +68,7 @@ LLFloaterWebContent::LLFloaterWebContent( const Params& params ) mUUID(params.id()), mShowPageTitle(params.show_page_title), mAllowNavigation(true), + mCurrentURL(""), mDisplayURL("") { mCommitCallbackRegistrar.add( "WebContent.Back", boost::bind( &LLFloaterWebContent::onClickBack, this )); @@ -356,17 +357,8 @@ void LLFloaterWebContent::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent if (test_prefix == prefix) { mSecureLockIcon->setVisible(true); - if (!mDisplayURL.empty()) - { - // Clear temporary entry if any - mAddressCombo->remove( mDisplayURL ); - mDisplayURL = ""; - } // Hack : we move the text a bit to make space for the lock icon. - // That entry in the list will be deleted on the next add. - mDisplayURL = " " + mCurrentURL; - mAddressCombo->add( mDisplayURL ); - mAddressCombo->selectByValue( mDisplayURL ); + set_current_url(" " + mCurrentURL); } else { @@ -414,22 +406,26 @@ void LLFloaterWebContent::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent void LLFloaterWebContent::set_current_url(const std::string& url) { + if (!mCurrentURL.empty()) + { + // Clean up the current browsing list to show true URL + mAddressCombo->remove(mDisplayURL); + mAddressCombo->add(mCurrentURL); + } + + // Update current URLs + mDisplayURL = url; mCurrentURL = url; LLStringUtil::trim(mCurrentURL); + // Serialize url history into the system URL History manager LLURLHistory::removeURL("browser", mCurrentURL); - // serialize url history into the system URL History manager LLURLHistory::addURL("browser", mCurrentURL); - if (!mDisplayURL.empty()) - { - // Clear temporary entry if any - mAddressCombo->remove( mDisplayURL ); - mDisplayURL = ""; - } - mAddressCombo->remove( mCurrentURL ); - mAddressCombo->add( mCurrentURL ); - mAddressCombo->selectByValue( mCurrentURL ); + // Clean up browsing list (prevent dupes) and add/select new URL to it + mAddressCombo->remove(mCurrentURL); + mAddressCombo->add(mDisplayURL); + mAddressCombo->selectByValue(mDisplayURL); } void LLFloaterWebContent::onClickForward() -- cgit v1.2.3 From 9c97f4f5ef46369714b8e7beb2cb990f06b0f096 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Mon, 22 Jul 2013 18:47:05 -0700 Subject: ACME-734 : Fix: Do not log empty URLs, refocus on page if the focus was there --- indra/newview/llfloaterwebcontent.cpp | 37 ++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 16 deletions(-) (limited to 'indra/newview/llfloaterwebcontent.cpp') diff --git a/indra/newview/llfloaterwebcontent.cpp b/indra/newview/llfloaterwebcontent.cpp index 129e1f0e2a..62eb9dba8e 100755 --- a/indra/newview/llfloaterwebcontent.cpp +++ b/indra/newview/llfloaterwebcontent.cpp @@ -358,7 +358,9 @@ void LLFloaterWebContent::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent { mSecureLockIcon->setVisible(true); // Hack : we move the text a bit to make space for the lock icon. + BOOL browser_has_focus = mWebBrowser->hasFocus(); set_current_url(" " + mCurrentURL); + mWebBrowser->setFocus(browser_has_focus); } else { @@ -406,26 +408,29 @@ void LLFloaterWebContent::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent void LLFloaterWebContent::set_current_url(const std::string& url) { - if (!mCurrentURL.empty()) + if (!url.empty()) { - // Clean up the current browsing list to show true URL - mAddressCombo->remove(mDisplayURL); - mAddressCombo->add(mCurrentURL); - } + if (!mCurrentURL.empty()) + { + // Clean up the current browsing list to show true URL + mAddressCombo->remove(mDisplayURL); + mAddressCombo->add(mCurrentURL); + } - // Update current URLs - mDisplayURL = url; - mCurrentURL = url; - LLStringUtil::trim(mCurrentURL); + // Update current URLs + mDisplayURL = url; + mCurrentURL = url; + LLStringUtil::trim(mCurrentURL); - // Serialize url history into the system URL History manager - LLURLHistory::removeURL("browser", mCurrentURL); - LLURLHistory::addURL("browser", mCurrentURL); + // Serialize url history into the system URL History manager + LLURLHistory::removeURL("browser", mCurrentURL); + LLURLHistory::addURL("browser", mCurrentURL); - // Clean up browsing list (prevent dupes) and add/select new URL to it - mAddressCombo->remove(mCurrentURL); - mAddressCombo->add(mDisplayURL); - mAddressCombo->selectByValue(mDisplayURL); + // Clean up browsing list (prevent dupes) and add/select new URL to it + mAddressCombo->remove(mCurrentURL); + mAddressCombo->add(mDisplayURL); + mAddressCombo->selectByValue(mDisplayURL); + } } void LLFloaterWebContent::onClickForward() -- cgit v1.2.3 From 6df15cb0908dab240e85b5db1433726ee09ad9bf Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Tue, 23 Jul 2013 15:31:36 -0700 Subject: ACME-734 : Fix issues with the lock icon when editing the address bar. Generalize the secure browsing UI. --- indra/newview/llfloaterwebcontent.cpp | 42 ++++++++++++++++------------------- 1 file changed, 19 insertions(+), 23 deletions(-) (limited to 'indra/newview/llfloaterwebcontent.cpp') diff --git a/indra/newview/llfloaterwebcontent.cpp b/indra/newview/llfloaterwebcontent.cpp index 62eb9dba8e..e81055f7b1 100755 --- a/indra/newview/llfloaterwebcontent.cpp +++ b/indra/newview/llfloaterwebcontent.cpp @@ -69,7 +69,8 @@ LLFloaterWebContent::LLFloaterWebContent( const Params& params ) mShowPageTitle(params.show_page_title), mAllowNavigation(true), mCurrentURL(""), - mDisplayURL("") + mDisplayURL(""), + mSecureURL(false) { mCommitCallbackRegistrar.add( "WebContent.Back", boost::bind( &LLFloaterWebContent::onClickBack, this )); mCommitCallbackRegistrar.add( "WebContent.Forward", boost::bind( &LLFloaterWebContent::onClickForward, this )); @@ -242,7 +243,6 @@ void LLFloaterWebContent::open_media(const Params& p) mWebBrowser->setTarget(p.target); mWebBrowser->navigateTo(p.url, "text/html"); - mSecureLockIcon->setVisible(false); set_current_url(p.url); getChild("status_bar")->setVisible(p.show_chrome); @@ -304,6 +304,9 @@ 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(); } @@ -317,7 +320,6 @@ void LLFloaterWebContent::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent if ( url.length() ) mStatusBarText->setText( url ); - mSecureLockIcon->setVisible(false); set_current_url( url ); } else if(event == MEDIA_EVENT_NAVIGATE_BEGIN) @@ -349,23 +351,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 ); - - // decide if secure browsing icon should be displayed - std::string prefix = std::string("https://"); - std::string test_prefix = mCurrentURL.substr(0, prefix.length()); - LLStringUtil::toLower(test_prefix); - if (test_prefix == prefix) - { - mSecureLockIcon->setVisible(true); - // Hack : we move the text a bit to make space for the lock icon. - BOOL browser_has_focus = mWebBrowser->hasFocus(); - set_current_url(" " + mCurrentURL); - mWebBrowser->setFocus(browser_has_focus); - } - else - { - mSecureLockIcon->setVisible(false); - } } else if(event == MEDIA_EVENT_CLOSE_REQUEST) { @@ -417,8 +402,7 @@ void LLFloaterWebContent::set_current_url(const std::string& url) mAddressCombo->add(mCurrentURL); } - // Update current URLs - mDisplayURL = url; + // Update current URL mCurrentURL = url; LLStringUtil::trim(mCurrentURL); @@ -426,10 +410,22 @@ void LLFloaterWebContent::set_current_url(const std::string& url) LLURLHistory::removeURL("browser", mCurrentURL); LLURLHistory::addURL("browser", mCurrentURL); - // Clean up browsing list (prevent dupes) and add/select new URL to it + // Check if this is a secure 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); + + // Clean up browsing list (prevent dupes) and add/select the new URL to it mAddressCombo->remove(mCurrentURL); mAddressCombo->add(mDisplayURL); mAddressCombo->selectByValue(mDisplayURL); + + // Set the focus back to the web page. When setting the url, there's no point to leave the focus anywhere else. + mWebBrowser->setFocus(TRUE); } } -- cgit v1.2.3 From aec50ffdad0705e01e14a66b83683f8947c8e02a Mon Sep 17 00:00:00 2001 From: maksymsproductengine Date: Fri, 2 Aug 2013 20:12:55 +0300 Subject: MAINT-2902 FIXED Browser secure session indicator should be prominent --- indra/newview/llfloaterwebcontent.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llfloaterwebcontent.cpp') diff --git a/indra/newview/llfloaterwebcontent.cpp b/indra/newview/llfloaterwebcontent.cpp index 3fe2518de6..c8b48ea6ca 100755 --- a/indra/newview/llfloaterwebcontent.cpp +++ b/indra/newview/llfloaterwebcontent.cpp @@ -350,10 +350,12 @@ void LLFloaterWebContent::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent if(test_prefix == prefix) { mSecureLockIcon->setVisible(true); + mAddressCombo->setLeftTextPadding(22); } else { mSecureLockIcon->setVisible(false); + mAddressCombo->setLeftTextPadding(2); } } else if(event == MEDIA_EVENT_CLOSE_REQUEST) -- cgit v1.2.3 From 35278461964653fc032995afdc366f096c937a14 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Fri, 2 Aug 2013 19:25:10 -0700 Subject: ACME-796 : Do not flip the fbc state to failure while connecting through web browser. Handle the dismiss case as best as possible. --- indra/newview/llfloaterwebcontent.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'indra/newview/llfloaterwebcontent.cpp') diff --git a/indra/newview/llfloaterwebcontent.cpp b/indra/newview/llfloaterwebcontent.cpp index e81055f7b1..9d703d2752 100755 --- a/indra/newview/llfloaterwebcontent.cpp +++ b/indra/newview/llfloaterwebcontent.cpp @@ -29,6 +29,7 @@ #include "llcombobox.h" #include "lliconctrl.h" #include "llfloaterreg.h" +#include "llfacebookconnect.h" #include "lllayoutstack.h" #include "llpluginclassmedia.h" #include "llprogressbar.h" @@ -293,6 +294,16 @@ void LLFloaterWebContent::onOpen(const LLSD& key) //virtual void LLFloaterWebContent::onClose(bool app_quitting) { + // If we close the web browsing window showing the facebook login, we need to signal to this object that the connection will not happen + LLFloater* fbc_web = LLFloaterReg::getInstance("fbc_web"); + if (fbc_web == this) + { + if (!LLFacebookConnect::instance().isConnected()) + { + LLFacebookConnect::instance().setConnectionState(LLFacebookConnect::FB_CONNECTION_FAILED); + } + } + LLViewerMedia::proxyWindowClosed(mUUID); destroy(); } -- cgit v1.2.3