Skip to content
Snippets Groups Projects
Commit 2714ff8f authored by Andrey Kleshchev's avatar Andrey Kleshchev
Browse files

MAINT-8276 Arrows 'Navigate back' and 'Navigate forward' have wrong state

parent e6765df1
No related branches found
No related tags found
No related merge requests found
...@@ -1085,6 +1085,8 @@ void LLPluginClassMedia::receivePluginMessage(const LLPluginMessage &message) ...@@ -1085,6 +1085,8 @@ void LLPluginClassMedia::receivePluginMessage(const LLPluginMessage &message)
} }
else if(message_name == "name_text") else if(message_name == "name_text")
{ {
mHistoryBackAvailable = message.getValueBoolean("history_back_available");
mHistoryForwardAvailable = message.getValueBoolean("history_forward_available");
mMediaName = message.getValue("name"); mMediaName = message.getValue("name");
mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_NAME_CHANGED); mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_NAME_CHANGED);
} }
......
...@@ -194,6 +194,8 @@ void MediaPluginCEF::onTitleChangeCallback(std::string title) ...@@ -194,6 +194,8 @@ void MediaPluginCEF::onTitleChangeCallback(std::string title)
{ {
LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "name_text"); LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "name_text");
message.setValue("name", title); message.setValue("name", title);
message.setValueBoolean("history_back_available", mCEFLib->canGoBack());
message.setValueBoolean("history_forward_available", mCEFLib->canGoForward());
sendMessage(message); sendMessage(message);
} }
......
...@@ -399,6 +399,9 @@ void LLFloaterWebContent::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent ...@@ -399,6 +399,9 @@ void LLFloaterWebContent::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent
} }
else if(event == MEDIA_EVENT_NAME_CHANGED ) 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(); std::string page_title = self->getMediaName();
// simulate browser behavior - title is empty, use the current URL // simulate browser behavior - title is empty, use the current URL
if (mShowPageTitle) if (mShowPageTitle)
......
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