Merge branch 'animesh' of https://github.com/Lirusaito/SingularityViewer into animesh
This commit is contained in:
@@ -3477,6 +3477,39 @@ This should be as low as possible, but too low may break functionality</string>
|
||||
<key>Value</key>
|
||||
<integer>3128</integer>
|
||||
</map>
|
||||
<key>BrowserProxyType</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Type of proxy for Web Browser</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>S32</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>BrowserProxyUsername</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Username for Web Proxy authentication</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string />
|
||||
</map>
|
||||
<key>BrowserProxyPassword</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Password for Web Proxy authentication</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string />
|
||||
</map>
|
||||
<key>BrowserProxySocks45</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
#include "lldxhardware.h"
|
||||
#endif
|
||||
|
||||
#include "cef/llceflib.h"
|
||||
#include "cef/dullahan.h"
|
||||
|
||||
extern LLMemoryInfo gSysMemory;
|
||||
extern U32 gPacketsIn;
|
||||
@@ -286,8 +286,17 @@ LLFloaterAbout::LLFloaterAbout()
|
||||
support.append( gAudiop ? gAudiop->getDriverName(want_fullname) : "(none)" );
|
||||
support += '\n';
|
||||
|
||||
support.append("LLCEFLib/CEF Version: ");
|
||||
support.append(LLCEFLIB_VERSION);
|
||||
std::stringstream supportstrm;
|
||||
supportstrm << "Dullahan: "
|
||||
<< DULLAHAN_VERSION_MAJOR
|
||||
<< '.'
|
||||
<< DULLAHAN_VERSION_MINOR
|
||||
<< '.'
|
||||
<< DULLAHAN_VERSION_BUILD
|
||||
|
||||
<< " / CEF: " << CEF_VERSION
|
||||
<< " / Chrome: " << CHROME_VERSION_MAJOR;
|
||||
support += supportstrm.str();
|
||||
support += '\n';
|
||||
|
||||
if (gPacketsIn > 0)
|
||||
|
||||
@@ -99,6 +99,7 @@ LLMediaCtrl::LLMediaCtrl( const Params& p) :
|
||||
mTextureWidth ( 1024 ),
|
||||
mTextureHeight ( 1024 ),
|
||||
mClearCache(false),
|
||||
mUpdateScrolls( false ),
|
||||
mHomePageMimeType(p.initial_mime_type),
|
||||
mErrorPageURL(p.error_page_url),
|
||||
mTrusted(p.trusted_content),
|
||||
@@ -143,7 +144,7 @@ LLMediaCtrl::~LLMediaCtrl()
|
||||
if (mMediaSource)
|
||||
{
|
||||
mMediaSource->remObserver( this );
|
||||
mMediaSource = NULL;
|
||||
mMediaSource = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -395,6 +396,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 )
|
||||
@@ -514,6 +521,16 @@ void LLMediaCtrl::navigateForward()
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
void LLMediaCtrl::navigateStop()
|
||||
{
|
||||
if (mMediaSource && mMediaSource->hasMedia())
|
||||
{
|
||||
mMediaSource->getMediaPlugin()->browse_stop();
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
bool LLMediaCtrl::canNavigateBack()
|
||||
@@ -549,22 +566,6 @@ void LLMediaCtrl::clearCache()
|
||||
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
void LLMediaCtrl::set404RedirectUrl( std::string redirect_url )
|
||||
{
|
||||
if(mMediaSource && mMediaSource->hasMedia())
|
||||
mMediaSource->getMediaPlugin()->set_status_redirect( 404, redirect_url );
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
void LLMediaCtrl::clr404RedirectUrl()
|
||||
{
|
||||
if(mMediaSource && mMediaSource->hasMedia())
|
||||
mMediaSource->getMediaPlugin()->set_status_redirect(404, "");
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
void LLMediaCtrl::navigateTo( std::string url_in, std::string mime_type)
|
||||
@@ -582,12 +583,9 @@ void LLMediaCtrl::navigateTo( std::string url_in, std::string mime_type)
|
||||
|
||||
if (ensureMediaSourceExists())
|
||||
{
|
||||
if (mCurrentNavUrl != url_in)
|
||||
{
|
||||
mCurrentNavUrl = url_in;
|
||||
mMediaSource->setSize(mTextureWidth, mTextureHeight);
|
||||
mMediaSource->navigateTo(url_in, mime_type, mime_type.empty());
|
||||
}
|
||||
mCurrentNavUrl = url_in;
|
||||
mMediaSource->setSize(mTextureWidth, mTextureHeight);
|
||||
mMediaSource->navigateTo(url_in, mime_type, mime_type.empty());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -609,7 +607,6 @@ void LLMediaCtrl::navigateToLocalPage( const std::string& subdir, const std::str
|
||||
mMediaSource->setSize(mTextureWidth, mTextureHeight);
|
||||
mMediaSource->navigateTo(LLWeb::escapeURL(expanded_filename), "text/html", false);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -699,7 +696,13 @@ bool LLMediaCtrl::ensureMediaSourceExists()
|
||||
mMediaSource->addObserver( this );
|
||||
mMediaSource->setBackgroundColor( getBackgroundColor() );
|
||||
mMediaSource->setTrustedBrowser(mTrusted);
|
||||
mMediaSource->setPageZoomFactor( LLUI::getScaleFactor().mV[ VX ] );
|
||||
|
||||
F32 scale_factor = LLUI::getScaleFactor().mV[ VX ];
|
||||
if (scale_factor != mMediaSource->getPageZoomFactor())
|
||||
{
|
||||
mMediaSource->setPageZoomFactor( scale_factor );
|
||||
mUpdateScrolls = true;
|
||||
}
|
||||
|
||||
if(mClearCache)
|
||||
{
|
||||
@@ -721,7 +724,11 @@ bool LLMediaCtrl::ensureMediaSourceExists()
|
||||
//
|
||||
void LLMediaCtrl::unloadMediaSource()
|
||||
{
|
||||
mMediaSource = NULL;
|
||||
if (mMediaSource)
|
||||
{
|
||||
mMediaSource->remObserver(this);
|
||||
mMediaSource = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -735,10 +742,11 @@ LLPluginClassMedia* LLMediaCtrl::getMediaPlugin()
|
||||
//
|
||||
void LLMediaCtrl::draw()
|
||||
{
|
||||
if ( gRestoreGL == 1 )
|
||||
if ( gRestoreGL == 1 || mUpdateScrolls)
|
||||
{
|
||||
LLRect r = getRect();
|
||||
reshape( r.getWidth(), r.getHeight(), FALSE );
|
||||
mUpdateScrolls = false;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -784,7 +792,12 @@ void LLMediaCtrl::draw()
|
||||
{
|
||||
gGL.pushUIMatrix();
|
||||
{
|
||||
mMediaSource->setPageZoomFactor( LLUI::getScaleFactor().mV[ VX ] );
|
||||
F32 scale_factor = LLUI::getScaleFactor().mV[ VX ];
|
||||
if (scale_factor != mMediaSource->getPageZoomFactor())
|
||||
{
|
||||
mMediaSource->setPageZoomFactor( scale_factor );
|
||||
mUpdateScrolls = true;
|
||||
}
|
||||
|
||||
// scale texture to fit the space using texture coords
|
||||
gGL.getTexUnit(0)->bind(media_texture);
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
|
||||
#include "lluictrl.h"
|
||||
#include "llframetimer.h"
|
||||
#include "llnotificationptr.h"
|
||||
|
||||
class LLViewBorder;
|
||||
class LLUICtrlFactory;
|
||||
@@ -51,6 +52,7 @@ class LLMediaCtrl :
|
||||
{
|
||||
LOG_CLASS(LLMediaCtrl);
|
||||
public:
|
||||
|
||||
struct Params : public LLInitParam::Block<Params, LLPanel::Params>
|
||||
{
|
||||
Optional<std::string> start_url;
|
||||
@@ -92,20 +94,21 @@ public:
|
||||
static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory);
|
||||
|
||||
// handle mouse related methods
|
||||
virtual BOOL handleHover( S32 x, S32 y, MASK mask );
|
||||
virtual BOOL handleMouseUp( S32 x, S32 y, MASK mask );
|
||||
virtual BOOL handleMouseDown( S32 x, S32 y, MASK mask );
|
||||
virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
|
||||
virtual BOOL handleRightMouseUp(S32 x, S32 y, MASK mask);
|
||||
virtual BOOL handleDoubleClick( S32 x, S32 y, MASK mask );
|
||||
virtual BOOL handleScrollWheel( S32 x, S32 y, S32 clicks );
|
||||
virtual BOOL handleToolTip(S32 x, S32 y, std::string& msg, LLRect* sticky_rect_screen);
|
||||
BOOL handleHover( S32 x, S32 y, MASK mask ) override;
|
||||
BOOL handleMouseUp( S32 x, S32 y, MASK mask ) override;
|
||||
BOOL handleMouseDown( S32 x, S32 y, MASK mask ) override;
|
||||
BOOL handleRightMouseDown(S32 x, S32 y, MASK mask) override;
|
||||
BOOL handleRightMouseUp(S32 x, S32 y, MASK mask) override;
|
||||
BOOL handleDoubleClick( S32 x, S32 y, MASK mask ) override;
|
||||
BOOL handleScrollWheel( S32 x, S32 y, S32 clicks ) override;
|
||||
BOOL handleToolTip(S32 x, S32 y, std::string& msg, LLRect* sticky_rect_screen) override;
|
||||
|
||||
// navigation
|
||||
void navigateTo( std::string url_in, std::string mime_type = "");
|
||||
void navigateBack();
|
||||
void navigateHome();
|
||||
void navigateForward();
|
||||
void navigateStop();
|
||||
void navigateToLocalPage( const std::string& subdir, const std::string& filename_in );
|
||||
bool canNavigateBack();
|
||||
bool canNavigateForward();
|
||||
@@ -128,9 +131,6 @@ public:
|
||||
// Clear the browser cache when the instance gets loaded
|
||||
void clearCache();
|
||||
|
||||
void set404RedirectUrl( std::string redirect_url );
|
||||
void clr404RedirectUrl();
|
||||
|
||||
// accessor/mutator for flag that indicates if frequent updates to texture happen
|
||||
bool getFrequentUpdates() { return mFrequentUpdates; };
|
||||
void setFrequentUpdates( bool frequentUpdatesIn ) { mFrequentUpdates = frequentUpdatesIn; };
|
||||
@@ -153,35 +153,38 @@ public:
|
||||
|
||||
void setTextureSize(S32 width, S32 height);
|
||||
|
||||
void showNotification(boost::shared_ptr<class LLNotification> notify);
|
||||
void showNotification(LLNotificationPtr notify);
|
||||
void hideNotification();
|
||||
|
||||
void setTrustedContent(bool trusted);
|
||||
|
||||
// over-rides
|
||||
virtual BOOL handleKeyHere( KEY key, MASK mask);
|
||||
virtual BOOL handleKeyUpHere(KEY key, MASK mask);
|
||||
virtual void handleVisibilityChange ( BOOL new_visibility );
|
||||
virtual BOOL handleUnicodeCharHere(llwchar uni_char);
|
||||
virtual void reshape( S32 width, S32 height, BOOL called_from_parent = TRUE);
|
||||
virtual void draw();
|
||||
virtual BOOL postBuild();
|
||||
BOOL handleKeyHere( KEY key, MASK mask) override;
|
||||
BOOL handleKeyUpHere(KEY key, MASK mask) override;
|
||||
void handleVisibilityChange ( BOOL new_visibility ) override;
|
||||
BOOL handleUnicodeCharHere(llwchar uni_char) override;
|
||||
void reshape( S32 width, S32 height, BOOL called_from_parent = TRUE) override;
|
||||
void draw() override;
|
||||
BOOL postBuild() override;
|
||||
|
||||
// focus overrides
|
||||
void onFocusLost();
|
||||
void onFocusReceived();
|
||||
void onFocusLost() override;
|
||||
void onFocusReceived() override;
|
||||
|
||||
// Incoming media event dispatcher
|
||||
virtual void handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event);
|
||||
void handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event) override;
|
||||
|
||||
// right click debugging item
|
||||
void onOpenWebInspector();
|
||||
void onShowSource();
|
||||
|
||||
LLUUID getTextureID() {return mMediaTextureID;}
|
||||
|
||||
// The Browser windows want keyup and keydown events. Overridden from LLFocusableElement to return true.
|
||||
virtual bool wantsKeyUpKeyDown() const;
|
||||
virtual bool wantsReturnKey() const;
|
||||
bool wantsKeyUpKeyDown() const override;
|
||||
bool wantsReturnKey() const override;
|
||||
|
||||
virtual BOOL acceptsTextInput() const override { return TRUE; }
|
||||
|
||||
protected:
|
||||
void convertInputCoords(S32& x, S32& y);
|
||||
@@ -204,7 +207,8 @@ public:
|
||||
mHidingInitialLoad,
|
||||
mClearCache,
|
||||
mHoverTextChanged,
|
||||
mDecoupleTextureSize;
|
||||
mDecoupleTextureSize,
|
||||
mUpdateScrolls;
|
||||
|
||||
std::string mHomePageUrl,
|
||||
mHomePageMimeType,
|
||||
|
||||
@@ -243,9 +243,6 @@ BOOL LLPanelDirFind::postBuild()
|
||||
// need to handle secondlife:///app/ URLs for direct teleports
|
||||
mWebBrowser->setTrustedContent( true );
|
||||
|
||||
// redirect 404 pages from S3 somewhere else
|
||||
mWebBrowser->set404RedirectUrl( getString("redirect_404_url") );
|
||||
|
||||
navigateToDefaultPage();
|
||||
}
|
||||
|
||||
|
||||
@@ -1263,7 +1263,7 @@ void LLViewerMedia::setCookiesEnabled(bool enabled)
|
||||
LLPluginClassMedia* plugin = pimpl->getMediaPlugin();
|
||||
if(plugin)
|
||||
{
|
||||
plugin->enable_cookies(enabled);
|
||||
plugin->cookies_enabled(enabled);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1281,7 +1281,7 @@ void LLViewerMedia::setProxyConfig(bool enable, const std::string &host, int por
|
||||
LLPluginClassMedia* plugin = pimpl->getMediaPlugin();
|
||||
if(plugin)
|
||||
{
|
||||
plugin->proxy_setup(enable, host, port);
|
||||
//pimpl->mMediaSource->proxy_setup(enable, host, port);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1894,7 +1894,7 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_
|
||||
|
||||
// collect 'cookies enabled' setting from prefs and send to embedded browser
|
||||
bool cookies_enabled = gSavedSettings.getBOOL( "CookiesEnabled" );
|
||||
media_source->enable_cookies( cookies_enabled );
|
||||
media_source->cookies_enabled( cookies_enabled );
|
||||
|
||||
// collect 'plugins enabled' setting from prefs and send to embedded browser
|
||||
bool plugins_enabled = gSavedSettings.getBOOL( "BrowserPluginsEnabled" );
|
||||
@@ -1988,24 +1988,14 @@ bool LLViewerMediaImpl::initializePlugin(const std::string& media_type)
|
||||
std::string ca_path = gDirUtilp->getExpandedFilename( LL_PATH_APP_SETTINGS, "ca-bundle.crt" );
|
||||
media_source->addCertificateFilePath( ca_path );
|
||||
|
||||
media_source->proxy_setup(gSavedSettings.getBOOL("BrowserProxyEnabled"), gSavedSettings.getString("BrowserProxyAddress"), gSavedSettings.getS32("BrowserProxyPort"));
|
||||
media_source->proxy_setup(gSavedSettings.getBOOL("BrowserProxyEnabled"), gSavedSettings.getS32("BrowserProxyType"), gSavedSettings.getString("BrowserProxyAddress"), gSavedSettings.getS32("BrowserProxyPort"),
|
||||
gSavedSettings.getString("BrowserProxyUsername"), gSavedSettings.getString("BrowserProxyPassword"));
|
||||
|
||||
if(mClearCache)
|
||||
{
|
||||
mClearCache = false;
|
||||
media_source->clear_cache();
|
||||
}
|
||||
|
||||
// TODO: Only send cookies to plugins that need them
|
||||
// Ideally, the plugin should tell us whether it handles cookies or not -- either via the init response or through a separate message.
|
||||
// Due to the ordering of messages, it's possible we wouldn't get that information back in time to send cookies before sending a navigate message,
|
||||
// which could cause odd race conditions.
|
||||
std::string all_cookies = LLViewerMedia::getCookieStore()->getAllCookies();
|
||||
LL_DEBUGS() << "setting cookies: " << all_cookies << LL_ENDL;
|
||||
if(!all_cookies.empty())
|
||||
{
|
||||
media_source->set_cookies(all_cookies);
|
||||
}
|
||||
|
||||
mPluginBase = media_source;
|
||||
mPluginBase->setDeleteOK(false) ;
|
||||
@@ -2918,7 +2908,7 @@ void LLViewerMediaImpl::update()
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_MEDIA_DO_UPDATE);
|
||||
LLPluginClassMedia* mMediaSource = getMediaPlugin();
|
||||
if(mMediaSource == NULL)
|
||||
if(mMediaSource == nullptr)
|
||||
{
|
||||
if(mPriority == PRIORITY_UNLOADED)
|
||||
{
|
||||
@@ -2953,17 +2943,10 @@ void LLViewerMediaImpl::update()
|
||||
|
||||
// TODO: this is updated every frame - is this bad?
|
||||
updateJavascriptObject();
|
||||
|
||||
// If we didn't just create the impl, it may need to get cookie updates.
|
||||
if(!sUpdatedCookies.empty())
|
||||
{
|
||||
// TODO: Only send cookies to plugins that need them
|
||||
mMediaSource->set_cookies(sUpdatedCookies);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(mMediaSource == NULL)
|
||||
if(mMediaSource == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -2976,7 +2959,7 @@ void LLViewerMediaImpl::update()
|
||||
setNavigateSuspended(false);
|
||||
|
||||
mMediaSource = getMediaPlugin();
|
||||
if(mMediaSource == NULL)
|
||||
if(mMediaSource == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -3018,12 +3001,14 @@ void LLViewerMediaImpl::update()
|
||||
if(width > 0 && height > 0)
|
||||
{
|
||||
|
||||
U8* data = NULL;
|
||||
U8* data = nullptr;
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_MEDIA_GET_DATA);
|
||||
data = mMediaSource->getBitsData();
|
||||
}
|
||||
|
||||
if(data != NULL)
|
||||
{
|
||||
// Offset the pixels pointer to match x_pos and y_pos
|
||||
data += ( x_pos * mMediaSource->getTextureDepth() * mMediaSource->getBitsWidth() );
|
||||
data += ( y_pos * mMediaSource->getTextureDepth() );
|
||||
@@ -3039,6 +3024,7 @@ void LLViewerMediaImpl::update()
|
||||
width,
|
||||
height,
|
||||
TRUE); // <alchemy/>
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3061,7 +3047,7 @@ LLViewerMediaTexture* LLViewerMediaImpl::updatePlaceholderImage()
|
||||
if(mTextureId.isNull())
|
||||
{
|
||||
// The code that created this instance will read from the plugin's bits.
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
LLViewerMediaTexture* placeholder_image = LLViewerTextureManager::getMediaTexture( mTextureId );
|
||||
@@ -3299,7 +3285,7 @@ bool LLViewerMediaImpl::isPlayable() const
|
||||
|
||||
static void handle_pick_file_request_continued(LLPluginClassMedia* plugin, AIFilePicker* filepicker)
|
||||
{
|
||||
plugin->sendPickFileResponse(filepicker->hasFilename() ? filepicker->getFilename() : LLStringUtil::null);
|
||||
plugin->sendPickFileResponse(filepicker->hasFilename() ? filepicker->getFilenames() : std::vector<std::string>());
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -3313,7 +3299,7 @@ void LLViewerMediaImpl::handleMediaEvent(LLPluginClassMedia* plugin, LLPluginCla
|
||||
LL_DEBUGS("Media") << "MEDIA_EVENT_CLICK_LINK_NOFOLLOW, uri is: " << plugin->getClickURL() << LL_ENDL;
|
||||
std::string url = plugin->getClickURL();
|
||||
std::string nav_type = plugin->getClickNavType();
|
||||
LLURLDispatcher::dispatch(url, nav_type, NULL, mTrustedBrowser);
|
||||
LLURLDispatcher::dispatch(url, nav_type, nullptr, mTrustedBrowser);
|
||||
}
|
||||
break;
|
||||
case MEDIA_EVENT_CLICK_LINK_HREF:
|
||||
|
||||
@@ -9342,6 +9342,31 @@ class ListToggleMute : public view_listener_t
|
||||
}
|
||||
};
|
||||
|
||||
LLMediaCtrl* get_focused_media_ctrl()
|
||||
{
|
||||
auto media_ctrl = dynamic_cast<LLMediaCtrl*>(gFocusMgr.getKeyboardFocus());
|
||||
llassert(media_ctrl); // This listener only applies to media_ctrls
|
||||
return media_ctrl;
|
||||
}
|
||||
|
||||
class MediaCtrlWebInspector : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
get_focused_media_ctrl()->onOpenWebInspector();
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class MediaCtrlViewSource : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
get_focused_media_ctrl()->onShowSource();
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
struct MarketplaceViewSortAction : view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata)
|
||||
@@ -9693,6 +9718,10 @@ void initialize_menus()
|
||||
LLTextEditor::setIsFriendCallback(LLAvatarActions::isFriend);
|
||||
LLTextEditor::addMenuListeners();
|
||||
|
||||
// Media Ctrl menus
|
||||
addMenu(new MediaCtrlWebInspector(), "Open.WebInspector");
|
||||
addMenu(new MediaCtrlViewSource(), "Open.ViewSource");
|
||||
|
||||
addMenu(new MarketplaceViewSortAction, "Marketplace.ViewSort.Action");
|
||||
addMenu(new MarketplaceViewSortCheckItem, "Marketplace.ViewSort.CheckItem");
|
||||
|
||||
|
||||
@@ -142,9 +142,6 @@
|
||||
<string name="done_text">
|
||||
Done
|
||||
</string>
|
||||
<string name="redirect_404_url">
|
||||
http://secondlife.com/app/search/notfound.html
|
||||
</string>
|
||||
<string name="default_search_page">"http://secondlife.com/app/search/index.php?"</string>
|
||||
</panel>
|
||||
<panel bottom="-549" follows="all" height="533" label="All" left="1" mouse_opaque="false" name="web_panel" width="778">
|
||||
@@ -158,7 +155,6 @@
|
||||
<text bottom="5" follows="bottom|left" left="10" height="16" name="status_text"/>
|
||||
<string name="loading_text">Loading...</string>
|
||||
<string name="done_text">Done</string>
|
||||
<string name="redirect_404_url">[APP_SITE]/404</string>
|
||||
<string name="default_search_page">http://search.secondlife.com/</string>
|
||||
</panel>
|
||||
<panel border="true" bottom="-549" follows="left|top|right|bottom" height="533"
|
||||
@@ -420,7 +416,6 @@
|
||||
height="16" />
|
||||
<string name="loading_text">Loading...</string>
|
||||
<string name="done_text">Done</string>
|
||||
<string name="redirect_404_url">http://secondlife.com/app/search/notfound.html</string>
|
||||
<string name="default_search_page">"http://secondlife.com/app/showcase/index.php?"</string>
|
||||
</panel>
|
||||
<panel border="true" bottom="-549" follows="left|top|right|bottom" height="533"
|
||||
@@ -769,7 +764,6 @@ To buy direct, visit the land and click on the place name in the title bar.
|
||||
<text bottom="5" follows="bottom|left" left="10" height="16" name="status_text"/>
|
||||
<string name="loading_text">Loading...</string>
|
||||
<string name="done_text">Done</string>
|
||||
<string name="redirect_404_url">[APP_SITE]/404</string>
|
||||
<string name="default_search_page">https://marketplace.secondlife.com/</string>
|
||||
</panel>
|
||||
</tab_container>
|
||||
|
||||
@@ -1,6 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<menu
|
||||
name="media ctrl context menu">
|
||||
<menu_item_call
|
||||
label="Undo"
|
||||
layout="topleft"
|
||||
name="undo">
|
||||
<menu_item_call.on_click
|
||||
function="Edit.Undo" />
|
||||
<menu_item_call.on_enable
|
||||
function="Edit.EnableUndo" />
|
||||
</menu_item_call>
|
||||
<menu_item_call
|
||||
label="Redo"
|
||||
layout="topleft"
|
||||
name="redo">
|
||||
<menu_item_call.on_click
|
||||
function="Edit.Redo" />
|
||||
<menu_item_call.on_enable
|
||||
function="Edit.EnableRedo" />
|
||||
</menu_item_call>
|
||||
<menu_item_separator
|
||||
layout="topleft"
|
||||
name="undo_separator" />
|
||||
<menu_item_call
|
||||
label="Cut"
|
||||
layout="topleft"
|
||||
@@ -28,4 +49,45 @@
|
||||
<menu_item_call.on_enable
|
||||
function="Edit.EnablePaste" />
|
||||
</menu_item_call>
|
||||
<menu_item_call
|
||||
label="Delete"
|
||||
layout="topleft"
|
||||
name="delete">
|
||||
<menu_item_call.on_click
|
||||
function="Edit.Delete" />
|
||||
<menu_item_call.on_enable
|
||||
function="Edit.EnableDelete" />
|
||||
</menu_item_call>
|
||||
<menu_item_separator
|
||||
layout="topleft"
|
||||
name="select_separator" />
|
||||
<menu_item_call
|
||||
label="Select All"
|
||||
layout="topleft"
|
||||
name="select_all">
|
||||
<menu_item_call.on_click
|
||||
function="Edit.SelectAll" />
|
||||
<menu_item_call.on_enable
|
||||
function="Edit.EnableSelectAll" />
|
||||
</menu_item_call>
|
||||
<menu_item_separator
|
||||
layout="topleft"
|
||||
name="debug_separator"
|
||||
visible="false" />
|
||||
<menu_item_call
|
||||
label="Open Web Inspector"
|
||||
layout="topleft"
|
||||
name="open_webinspector"
|
||||
visible="false">
|
||||
<menu_item_call.on_click
|
||||
function="Open.WebInspector" />
|
||||
</menu_item_call>
|
||||
<menu_item_call
|
||||
label="Show Source"
|
||||
layout="topleft"
|
||||
name="show_page_source"
|
||||
visible="false">
|
||||
<menu_item_call.on_click
|
||||
function="Open.ViewSource" />
|
||||
</menu_item_call>
|
||||
</menu>
|
||||
|
||||
@@ -370,32 +370,30 @@ class WindowsManifest(ViewerManifest):
|
||||
self.end_prefix()
|
||||
|
||||
# CEF runtime files - debug
|
||||
if self.args['configuration'].lower() == 'debug':
|
||||
if self.prefix(src=os.path.join(os.pardir, 'packages', 'bin', 'debug'), dst="llplugin"):
|
||||
self.path("d3dcompiler_47.dll")
|
||||
self.path("libcef.dll")
|
||||
self.path("libEGL.dll")
|
||||
self.path("libGLESv2.dll")
|
||||
self.path("llceflib_host.exe")
|
||||
self.path("natives_blob.bin")
|
||||
self.path("snapshot_blob.bin")
|
||||
self.path("widevinecdmadapter.dll")
|
||||
self.path("wow_helper.exe")
|
||||
self.end_prefix()
|
||||
else:
|
||||
# CEF runtime files - not debug (release, relwithdebinfo etc.)
|
||||
if self.prefix(src=os.path.join(os.pardir, 'packages', 'bin', 'release'), dst="llplugin"):
|
||||
config = 'debug' if self.args['configuration'].lower() == 'debug' else 'release'
|
||||
if self.prefix(src=os.path.join(os.pardir, 'packages', 'bin', config), dst="llplugin"):
|
||||
self.path("chrome_elf.dll")
|
||||
self.path("d3dcompiler_47.dll")
|
||||
self.path("libcef.dll")
|
||||
self.path("libEGL.dll")
|
||||
self.path("libGLESv2.dll")
|
||||
self.path("llceflib_host.exe")
|
||||
self.path("dullahan_host.exe")
|
||||
self.path("natives_blob.bin")
|
||||
self.path("snapshot_blob.bin")
|
||||
self.path("v8_context_snapshot.bin")
|
||||
self.path("widevinecdmadapter.dll")
|
||||
self.path("wow_helper.exe")
|
||||
|
||||
self.end_prefix()
|
||||
|
||||
# CEF runtime files for software rendering - debug
|
||||
# CEF runtime files for software rendering - not debug (release, relwithdebinfo etc.)
|
||||
if self.prefix(src=os.path.join(pkgdir, 'bin', config, 'swiftshader'), dst=os.path.join("llplugin", 'swiftshader')):
|
||||
self.path("libEGL.dll")
|
||||
self.path("libGLESv2.dll")
|
||||
self.end_prefix()
|
||||
|
||||
|
||||
# CEF files common to all configurations
|
||||
if self.prefix(src=os.path.join(os.pardir, 'packages', 'resources'), dst="llplugin"):
|
||||
self.path("cef.pak")
|
||||
@@ -462,6 +460,7 @@ class WindowsManifest(ViewerManifest):
|
||||
self.path("zh-TW.pak")
|
||||
self.end_prefix()
|
||||
|
||||
|
||||
if not self.is_packaging_viewer():
|
||||
self.package_file = "copied_deps"
|
||||
|
||||
@@ -772,13 +771,27 @@ class DarwinManifest(ViewerManifest):
|
||||
except OSError as err:
|
||||
print "Can't symlink %s -> %s: %s" % (src, dst, err)
|
||||
|
||||
# LLCefLib helper apps go inside AlchemyPlugin.app
|
||||
# Dullahan helper apps go inside AlchemyPlugin.app
|
||||
if self.prefix(src="", dst="AlchemyPlugin.app/Contents/Frameworks"):
|
||||
for helperappfile in ('LLCefLib Helper.app',
|
||||
'LLCefLib Helper EH.app'):
|
||||
self.path2basename(relpkgdir, helperappfile)
|
||||
helperappfile = 'DullahanHelper.app'
|
||||
self.path2basename(relbinpkgdir, helperappfile)
|
||||
|
||||
pluginframeworkpath = self.dst_path_of('Chromium Embedded Framework.framework');
|
||||
# Putting a Frameworks directory under Contents/MacOS
|
||||
# isn't canonical, but the path baked into Dullahan
|
||||
# Helper.app/Contents/MacOS/DullahanHelper is:
|
||||
# @executable_path/Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework
|
||||
# (notice, not @executable_path/../Frameworks/etc.)
|
||||
# So we'll create a symlink (below) from there back to the
|
||||
# Frameworks directory nested under SLPlugin.app.
|
||||
helperframeworkpath = \
|
||||
self.dst_path_of('DullahanHelper.app/Contents/MacOS/'
|
||||
'Frameworks/Chromium Embedded Framework.framework')
|
||||
|
||||
helperexecutablepath = self.dst_path_of('DullahanHelper.app/Contents/MacOS/DullahanHelper')
|
||||
self.run_command(['install_name_tool', '-change',
|
||||
'@rpath/Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework',
|
||||
'@executable_path/Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework', helperexecutablepath])
|
||||
|
||||
self.end_prefix()
|
||||
|
||||
@@ -805,19 +818,42 @@ class DarwinManifest(ViewerManifest):
|
||||
# This code constructs a relative path from the
|
||||
# target framework folder back to the location of the symlink.
|
||||
# It needs to be relative so that the symlink still works when
|
||||
# (as is normal) the user moves the app bunlde out of the DMG
|
||||
# (as is normal) the user moves the app bundle out of the DMG
|
||||
# and into the /Applications folder. Note we also call 'raise'
|
||||
# to terminate the process if we get an error since without
|
||||
# this symlink, Second Life web media can't possibly work.
|
||||
# Real Framework folder:
|
||||
# Second Life.app/Contents/Frameworks/Chromium Embedded Framework.framework/
|
||||
# Location of symlink and why it'ds relavie
|
||||
# Second Life.app/Contents/Resources/AlchemyPlugin.app/Contents/Frameworks/Chromium Embedded Framework.framework/
|
||||
frameworkpath = os.path.join(os.pardir, os.pardir, os.pardir, os.pardir, "Frameworks", "Chromium Embedded Framework.framework")
|
||||
# Alchemy.app/Contents/Frameworks/Chromium Embedded Framework.framework/
|
||||
# Location of symlink and why it's relative
|
||||
# Alchemy.app/Contents/Resources/AlchemyPlugin.app/Contents/Frameworks/Chromium Embedded Framework.framework/
|
||||
# Real Frameworks folder, with the symlink inside the bundled SLPlugin.app (and why it's relative)
|
||||
# <top level>.app/Contents/Frameworks/Chromium Embedded Framework.framework/
|
||||
# <top level>.app/Contents/Resources/AlchemyPlugin.app/Contents/Frameworks/Chromium Embedded Framework.framework ->
|
||||
# It might seem simpler just to create a symlink Frameworks to
|
||||
# the parent of Chromimum Embedded Framework.framework. But
|
||||
# that would create a symlink cycle, which breaks our
|
||||
# packaging step. So make a symlink from Chromium Embedded
|
||||
# Framework.framework to the directory of the same name, which
|
||||
# is NOT an ancestor of the symlink.
|
||||
frameworkpath = os.path.join(os.pardir, os.pardir, os.pardir,
|
||||
os.pardir, "Frameworks",
|
||||
"Chromium Embedded Framework.framework")
|
||||
try:
|
||||
symlinkf(frameworkpath, pluginframeworkpath)
|
||||
# from AlchemyPlugin.app/Contents/Frameworks/Chromium Embedded
|
||||
# Framework.framework back to
|
||||
# Alchemy.app/Contents/Frameworks/Chromium Embedded Framework.framework
|
||||
origin, target = pluginframeworkpath, frameworkpath
|
||||
self.symlinkf(target, origin)
|
||||
# from AlchemyPlugin.app/Contents/Frameworks/Dullahan
|
||||
# Helper.app/Contents/MacOS/Frameworks/Chromium Embedded
|
||||
# Framework.framework back to
|
||||
# AlchemyPlugin.app/Contents/Frameworks/Chromium Embedded Framework.framework
|
||||
self.cmakedirs(os.path.dirname(helperframeworkpath))
|
||||
origin = helperframeworkpath
|
||||
target = os.path.join(os.pardir, frameworkpath)
|
||||
self.symlinkf(target, origin)
|
||||
except OSError as err:
|
||||
print "Can't symlink %s -> %s: %s" % (frameworkpath, pluginframeworkpath, err)
|
||||
print "Can't symlink %s -> %s: %s" % (origin, target, err)
|
||||
raise
|
||||
|
||||
self.end_prefix("Contents")
|
||||
@@ -1029,9 +1065,10 @@ class LinuxManifest(ViewerManifest):
|
||||
# CEF files
|
||||
if self.prefix(src=os.path.join(pkgdir, 'bin', 'release'), dst="bin"):
|
||||
self.path("chrome-sandbox")
|
||||
self.path("llceflib_host")
|
||||
self.path("dullahan_host")
|
||||
self.path("natives_blob.bin")
|
||||
self.path("snapshot_blob.bin")
|
||||
self.path("v8_context_snapshot.bin")
|
||||
self.end_prefix()
|
||||
|
||||
if self.prefix(src=os.path.join(pkgdir, 'resources'), dst="bin"):
|
||||
|
||||
Reference in New Issue
Block a user