Avoid double-calling URLs when the address bar changes in any webkit floater/prim.

This commit is contained in:
Diva Canto
2014-12-01 16:09:53 -08:00
parent 7e00d0763d
commit 4c8e1bceb8
+7 -3
View File
@@ -565,9 +565,12 @@ void LLMediaCtrl::navigateTo( std::string url_in, std::string mime_type)
if (ensureMediaSourceExists())
{
mCurrentNavUrl = url_in;
mMediaSource->setSize(mTextureWidth, mTextureHeight);
mMediaSource->navigateTo(url_in, mime_type, mime_type.empty());
if (mCurrentNavUrl != url_in)
{
mCurrentNavUrl = url_in;
mMediaSource->setSize(mTextureWidth, mTextureHeight);
mMediaSource->navigateTo(url_in, mime_type, mime_type.empty());
}
}
}
@@ -970,6 +973,7 @@ void LLMediaCtrl::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event)
case MEDIA_EVENT_LOCATION_CHANGED:
{
LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_LOCATION_CHANGED, new uri is: " << self->getLocation() << LL_ENDL;
mCurrentNavUrl = self->getLocation();
};
break;