summaryrefslogtreecommitdiff
path: root/indra/newview/llmediactrl.cpp
diff options
context:
space:
mode:
authorJonathan "Geenz" Goodman <geenz@lindenlab.com>2025-09-18 15:25:31 -0400
committerGitHub <noreply@github.com>2025-09-18 15:25:31 -0400
commitf316a92f308be836b57f638514dcd56f3851a89a (patch)
tree9a1431c0c311de41388879b31f26c6faa8bf5e89 /indra/newview/llmediactrl.cpp
parentbadeccbebcfa73a11cf0f8a4562c9a0d386834c1 (diff)
parent82e431e0906647dcfc4a64b057e6bc305c9add8e (diff)
Merge pull request #4700 from secondlife/geenz/2025.07-develop
Geenz/2025.07 -> develop
Diffstat (limited to 'indra/newview/llmediactrl.cpp')
-rw-r--r--indra/newview/llmediactrl.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp
index 202008f7f9..c7b60b2fd5 100644
--- a/indra/newview/llmediactrl.cpp
+++ b/indra/newview/llmediactrl.cpp
@@ -347,6 +347,7 @@ bool LLMediaCtrl::handleRightMouseDown( S32 x, S32 y, MASK mask )
{
LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registar;
registar.add("Open.WebInspector", boost::bind(&LLMediaCtrl::onOpenWebInspector, this));
+ registar.add("Open.ShowSource", boost::bind(&LLMediaCtrl::onShowSource, this));
// stinson 05/05/2014 : use this as the parent of the context menu if the static menu
// container has yet to be created
@@ -364,8 +365,9 @@ bool LLMediaCtrl::handleRightMouseDown( S32 x, S32 y, MASK mask )
{
// hide/show debugging options
bool media_plugin_debugging_enabled = gSavedSettings.getBOOL("MediaPluginDebugging");
+ menu->setItemVisible("debug_separator", media_plugin_debugging_enabled);
menu->setItemVisible("open_webinspector", media_plugin_debugging_enabled );
- menu->setItemVisible("debug_separator", media_plugin_debugging_enabled );
+ menu->setItemVisible("show_page_source", media_plugin_debugging_enabled);
menu->show(x, y);
LLMenuGL::showPopup(this, menu, x, y);
@@ -444,6 +446,12 @@ void LLMediaCtrl::onOpenWebInspector()
mMediaSource->getMediaPlugin()->showWebInspector( true );
}
+void LLMediaCtrl::onShowSource()
+{
+ if (mMediaSource && mMediaSource->hasMedia())
+ mMediaSource->getMediaPlugin()->showPageSource();
+}
+
////////////////////////////////////////////////////////////////////////////////
//
bool LLMediaCtrl::handleKeyHere( KEY key, MASK mask )