summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2018-02-12 19:27:09 +0000
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2018-02-12 19:27:09 +0000
commit2714ff8f25972c28d6667c83b834f189b0427f2d (patch)
tree82dc0e7dd57ecf43d8ddffb2d6a26c41134bafd5 /indra
parente6765df1baa40a46b77e5362c8855a336125e5f7 (diff)
MAINT-8276 Arrows 'Navigate back' and 'Navigate forward' have wrong state
Diffstat (limited to 'indra')
-rw-r--r--indra/llplugin/llpluginclassmedia.cpp2
-rw-r--r--indra/media_plugins/cef/media_plugin_cef.cpp2
-rw-r--r--indra/newview/llfloaterwebcontent.cpp3
3 files changed, 7 insertions, 0 deletions
diff --git a/indra/llplugin/llpluginclassmedia.cpp b/indra/llplugin/llpluginclassmedia.cpp
index 680017204c..f3fd4277ce 100644
--- a/indra/llplugin/llpluginclassmedia.cpp
+++ b/indra/llplugin/llpluginclassmedia.cpp
@@ -1085,6 +1085,8 @@ void LLPluginClassMedia::receivePluginMessage(const LLPluginMessage &message)
}
else if(message_name == "name_text")
{
+ mHistoryBackAvailable = message.getValueBoolean("history_back_available");
+ mHistoryForwardAvailable = message.getValueBoolean("history_forward_available");
mMediaName = message.getValue("name");
mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_NAME_CHANGED);
}
diff --git a/indra/media_plugins/cef/media_plugin_cef.cpp b/indra/media_plugins/cef/media_plugin_cef.cpp
index f3d7762a08..4dbee12ea0 100644
--- a/indra/media_plugins/cef/media_plugin_cef.cpp
+++ b/indra/media_plugins/cef/media_plugin_cef.cpp
@@ -194,6 +194,8 @@ void MediaPluginCEF::onTitleChangeCallback(std::string title)
{
LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "name_text");
message.setValue("name", title);
+ message.setValueBoolean("history_back_available", mCEFLib->canGoBack());
+ message.setValueBoolean("history_forward_available", mCEFLib->canGoForward());
sendMessage(message);
}
diff --git a/indra/newview/llfloaterwebcontent.cpp b/indra/newview/llfloaterwebcontent.cpp
index dece3fc1ea..8a8d92d459 100644
--- a/indra/newview/llfloaterwebcontent.cpp
+++ b/indra/newview/llfloaterwebcontent.cpp
@@ -399,6 +399,9 @@ void LLFloaterWebContent::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent
}
else if(event == MEDIA_EVENT_NAME_CHANGED )
{
+ // flags are sent with this event
+ mBtnBack->setEnabled(self->getHistoryBackAvailable());
+ mBtnForward->setEnabled(self->getHistoryForwardAvailable());
std::string page_title = self->getMediaName();
// simulate browser behavior - title is empty, use the current URL
if (mShowPageTitle)