merge
commit
54672c8f14
|
|
@ -1206,9 +1206,9 @@
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>1b92a69f5eba7cd8b017180659076db5</string>
|
||||
<string>7108c2443dbcf4c032305814ce65ebb7</string>
|
||||
<key>url</key>
|
||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/roxie_3p-llqtwebkit/rev/242182/arch/Darwin/installer/llqtwebkit-4.7.1-darwin-20111003.tar.bz2</string>
|
||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-llqtwebkit/rev/244065/arch/Darwin/installer/llqtwebkit-4.7.1-darwin-20111028.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>darwin</string>
|
||||
|
|
@ -1230,9 +1230,9 @@
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>1e7f24b69b0fc751c7e86efe7c621882</string>
|
||||
<string>24048a31d7b852774dc3117acbd4a86a</string>
|
||||
<key>url</key>
|
||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/roxie_3p-llqtwebkit/rev/242182/arch/CYGWIN/installer/llqtwebkit-4.7.1-windows-20111003.tar.bz2</string>
|
||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-llqtwebkit/rev/244065/arch/CYGWIN/installer/llqtwebkit-4.7.1-windows-20111028.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>windows</string>
|
||||
|
|
|
|||
|
|
@ -1239,6 +1239,14 @@ void LLPluginClassMedia::focus(bool focused)
|
|||
sendMessage(message);
|
||||
}
|
||||
|
||||
void LLPluginClassMedia::set_page_zoom_factor( double factor )
|
||||
{
|
||||
LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "set_page_zoom_factor");
|
||||
|
||||
message.setValueReal("factor", factor);
|
||||
sendMessage(message);
|
||||
}
|
||||
|
||||
void LLPluginClassMedia::clear_cache()
|
||||
{
|
||||
LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "clear_cache");
|
||||
|
|
|
|||
|
|
@ -202,6 +202,7 @@ public:
|
|||
bool pluginSupportsMediaBrowser(void);
|
||||
|
||||
void focus(bool focused);
|
||||
void set_page_zoom_factor( double factor );
|
||||
void clear_cache();
|
||||
void clear_cookies();
|
||||
void set_cookies(const std::string &cookies);
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@ public:
|
|||
void reshape(S32 width, S32 height, BOOL called_from_parent = true);
|
||||
void setEnabled(BOOL enabled);
|
||||
void setCommandId(const LLCommandId& id) { mId = id; }
|
||||
LLCommandId getCommandId() { return mId; }
|
||||
|
||||
void setStartDragCallback(tool_startdrag_callback_t cb) { mStartDragItemCallback = cb; }
|
||||
void setHandleDragCallback(tool_handledrag_callback_t cb) { mHandleDragItemCallback = cb; }
|
||||
|
|
@ -164,7 +165,8 @@ public:
|
|||
pad_bottom,
|
||||
pad_between,
|
||||
min_girth;
|
||||
// get rid of this
|
||||
|
||||
// default command set
|
||||
Multiple<LLCommandId::Params> commands;
|
||||
|
||||
Optional<LLPanel::Params> button_panel;
|
||||
|
|
@ -175,8 +177,6 @@ public:
|
|||
// virtuals
|
||||
void draw();
|
||||
void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
|
||||
int getRankFromPosition(S32 x, S32 y);
|
||||
int getRankFromPosition(const LLCommandId& id);
|
||||
BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
|
||||
virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
|
||||
EDragAndDropType cargo_type,
|
||||
|
|
@ -185,15 +185,14 @@ public:
|
|||
std::string& tooltip_msg);
|
||||
|
||||
static const int RANK_NONE = -1;
|
||||
|
||||
bool addCommand(const LLCommandId& commandId, int rank = RANK_NONE);
|
||||
int removeCommand(const LLCommandId& commandId); // Returns the rank the removed command was at, RANK_NONE if not found
|
||||
bool hasCommand(const LLCommandId& commandId) const;
|
||||
bool enableCommand(const LLCommandId& commandId, bool enabled);
|
||||
bool stopCommandInProgress(const LLCommandId& commandId);
|
||||
bool flashCommand(const LLCommandId& commandId, bool flash);
|
||||
bool hasCommand(const LLCommandId& commandId) const; // is this command bound to a button in this toolbar
|
||||
bool enableCommand(const LLCommandId& commandId, bool enabled); // enable/disable button bound to the specified command, if it exists in this toolbar
|
||||
bool stopCommandInProgress(const LLCommandId& commandId); // stop command if it is currently active
|
||||
bool flashCommand(const LLCommandId& commandId, bool flash); // flash button associated with given command, if in this toolbar
|
||||
|
||||
void setStartDragCallback(tool_startdrag_callback_t cb) { mStartDragItemCallback = cb; }
|
||||
void setStartDragCallback(tool_startdrag_callback_t cb) { mStartDragItemCallback = cb; } // connects drag and drop behavior to external logic
|
||||
void setHandleDragCallback(tool_handledrag_callback_t cb) { mHandleDragItemCallback = cb; }
|
||||
void setHandleDropCallback(tool_handledrop_callback_t cb) { mHandleDropCallback = cb; }
|
||||
bool isReadOnly() const { return mReadOnly; }
|
||||
|
|
@ -206,18 +205,48 @@ public:
|
|||
boost::signals2::connection setButtonLeaveCallback(const button_signal_t::slot_type& cb);
|
||||
boost::signals2::connection setButtonRemoveCallback(const button_signal_t::slot_type& cb);
|
||||
|
||||
void setTooltipButtonSuffix(const std::string& suffix) { mButtonTooltipSuffix = suffix; }
|
||||
// append the specified string to end of tooltip
|
||||
void setTooltipButtonSuffix(const std::string& suffix) { mButtonTooltipSuffix = suffix; }
|
||||
|
||||
LLToolBarEnums::SideType getSideType() const { return mSideType; }
|
||||
bool hasButtons() const { return !mButtons.empty(); }
|
||||
bool isModified() const { return mModified; }
|
||||
|
||||
protected:
|
||||
int getRankFromPosition(S32 x, S32 y);
|
||||
int getRankFromPosition(const LLCommandId& id);
|
||||
|
||||
// Methods used in loading and saving toolbar settings
|
||||
void setButtonType(LLToolBarEnums::ButtonType button_type);
|
||||
LLToolBarEnums::ButtonType getButtonType() { return mButtonType; }
|
||||
command_id_list_t& getCommandsList() { return mButtonCommands; }
|
||||
void clearCommandsList();
|
||||
|
||||
private:
|
||||
friend class LLUICtrlFactory;
|
||||
LLToolBar(const Params&);
|
||||
~LLToolBar();
|
||||
|
||||
void initFromParams(const Params&);
|
||||
void createContextMenu();
|
||||
void updateLayoutAsNeeded();
|
||||
void createButtons();
|
||||
void resizeButtonsInRow(std::vector<LLToolBarButton*>& buttons_in_row, S32 max_row_girth);
|
||||
BOOL isSettingChecked(const LLSD& userdata);
|
||||
void onSettingEnable(const LLSD& userdata);
|
||||
|
||||
private:
|
||||
// static layout state
|
||||
const bool mReadOnly;
|
||||
const LLToolBarEnums::SideType mSideType;
|
||||
const bool mWrap;
|
||||
const S32 mPadLeft,
|
||||
mPadRight,
|
||||
mPadTop,
|
||||
mPadBottom,
|
||||
mPadBetween,
|
||||
mMinGirth;
|
||||
|
||||
// drag and drop state
|
||||
tool_startdrag_callback_t mStartDragItemCallback;
|
||||
tool_handledrag_callback_t mHandleDragItemCallback;
|
||||
tool_handledrop_callback_t mHandleDropCallback;
|
||||
|
|
@ -227,49 +256,23 @@ protected:
|
|||
mDragy,
|
||||
mDragGirth;
|
||||
|
||||
public:
|
||||
// Methods used in loading and saving toolbar settings
|
||||
void setButtonType(LLToolBarEnums::ButtonType button_type);
|
||||
LLToolBarEnums::ButtonType getButtonType() { return mButtonType; }
|
||||
command_id_list_t& getCommandsList() { return mButtonCommands; }
|
||||
void clearCommandsList();
|
||||
|
||||
private:
|
||||
void createContextMenu();
|
||||
void updateLayoutAsNeeded();
|
||||
void createButtons();
|
||||
void resizeButtonsInRow(std::vector<LLToolBarButton*>& buttons_in_row, S32 max_row_girth);
|
||||
BOOL isSettingChecked(const LLSD& userdata);
|
||||
void onSettingEnable(const LLSD& userdata);
|
||||
|
||||
const bool mReadOnly;
|
||||
|
||||
typedef std::list<LLToolBarButton*> toolbar_button_list;
|
||||
typedef std::map<LLUUID, LLToolBarButton*> command_id_map;
|
||||
toolbar_button_list mButtons;
|
||||
command_id_list_t mButtonCommands;
|
||||
typedef std::map<LLUUID, LLToolBarButton*> command_id_map;
|
||||
command_id_map mButtonMap;
|
||||
|
||||
LLToolBarEnums::ButtonType mButtonType;
|
||||
LLLayoutStack* mCenteringStack;
|
||||
LLLayoutStack* mWrapStack;
|
||||
LLPanel* mButtonPanel;
|
||||
LLToolBarEnums::SideType mSideType;
|
||||
|
||||
bool mWrap;
|
||||
bool mNeedsLayout;
|
||||
bool mModified;
|
||||
S32 mPadLeft,
|
||||
mPadRight,
|
||||
mPadTop,
|
||||
mPadBottom,
|
||||
mPadBetween,
|
||||
mMinGirth;
|
||||
|
||||
LLToolBarButton::Params mButtonParams[LLToolBarEnums::BTNTYPE_COUNT];
|
||||
|
||||
// related widgets
|
||||
LLLayoutStack* mCenteringStack;
|
||||
LLPanel* mButtonPanel;
|
||||
LLHandle<class LLContextMenu> mPopupMenuHandle;
|
||||
|
||||
bool mNeedsLayout;
|
||||
bool mModified;
|
||||
|
||||
button_signal_t* mButtonAddSignal;
|
||||
button_signal_t* mButtonEnterSignal;
|
||||
button_signal_t* mButtonLeaveSignal;
|
||||
|
|
|
|||
|
|
@ -25,12 +25,11 @@
|
|||
* $/LicenseInfo$
|
||||
* @endcond
|
||||
*/
|
||||
|
||||
#include "llqtwebkit.h"
|
||||
|
||||
#include "linden_common.h"
|
||||
#include "indra_constants.h" // for indra keyboard codes
|
||||
|
||||
#include "lltimer.h"
|
||||
#include "llgl.h"
|
||||
|
||||
#include "llplugininstance.h"
|
||||
|
|
@ -117,15 +116,19 @@ private:
|
|||
F32 mBackgroundG;
|
||||
F32 mBackgroundB;
|
||||
std::string mTarget;
|
||||
|
||||
LLTimer mElapsedTime;
|
||||
|
||||
VolumeCatcher mVolumeCatcher;
|
||||
|
||||
void postDebugMessage( const std::string& msg )
|
||||
{
|
||||
if ( mEnableMediaPluginDebugging )
|
||||
{
|
||||
std::stringstream str;
|
||||
str << "@Media Msg> " << "[" << (double)mElapsedTime.getElapsedTimeF32() << "] -- " << msg;
|
||||
|
||||
LLPluginMessage debug_message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "debug_message");
|
||||
debug_message.setValue("message_text", "Media> " + msg);
|
||||
debug_message.setValue("message_text", str.str());
|
||||
debug_message.setValue("message_level", "info");
|
||||
sendMessage(debug_message);
|
||||
}
|
||||
|
|
@ -323,7 +326,11 @@ private:
|
|||
LLQtWebKit::getInstance()->enablePlugins( mPluginsEnabled );
|
||||
|
||||
// turn on/off Javascript based on what host app tells us
|
||||
#if LLQTWEBKIT_API_VERSION >= 11
|
||||
LLQtWebKit::getInstance()->enableJavaScript( mJavascriptEnabled );
|
||||
#else
|
||||
LLQtWebKit::getInstance()->enableJavascript( mJavascriptEnabled );
|
||||
#endif
|
||||
|
||||
std::stringstream str;
|
||||
str << "Cookies enabled = " << mCookiesEnabled << ", plugins enabled = " << mPluginsEnabled << ", Javascript enabled = " << mJavascriptEnabled;
|
||||
|
|
@ -346,7 +353,7 @@ private:
|
|||
// append details to agent string
|
||||
LLQtWebKit::getInstance()->setBrowserAgentId( mUserAgent );
|
||||
postDebugMessage( "Updating user agent with " + mUserAgent );
|
||||
|
||||
|
||||
#if !LL_QTWEBKIT_USES_PIXMAPS
|
||||
// don't flip bitmap
|
||||
LLQtWebKit::getInstance()->flipWindow( mBrowserWindowId, true );
|
||||
|
|
@ -374,7 +381,14 @@ private:
|
|||
url << "%22%3E%3C/body%3E%3C/html%3E";
|
||||
|
||||
//lldebugs << "data url is: " << url.str() << llendl;
|
||||
|
||||
|
||||
// loading overlay debug screen follows media debugging flag from client for now.
|
||||
LLQtWebKit::getInstance()->enableLoadingOverlay(mBrowserWindowId, mEnableMediaPluginDebugging);
|
||||
|
||||
str.clear();
|
||||
str << "Loading overlay enabled = " << mEnableMediaPluginDebugging << " for mBrowserWindowId = " << mBrowserWindowId;
|
||||
postDebugMessage( str.str() );
|
||||
|
||||
LLQtWebKit::getInstance()->navigateTo( mBrowserWindowId, url.str() );
|
||||
// LLQtWebKit::getInstance()->navigateTo( mBrowserWindowId, "about:blank" );
|
||||
|
||||
|
|
@ -583,6 +597,10 @@ private:
|
|||
// These could be passed through as well, but aren't really needed.
|
||||
// message.setValue("uri", event.getEventUri());
|
||||
// message.setValueBoolean("dead", (event.getIntValue() != 0))
|
||||
|
||||
// debug spam
|
||||
postDebugMessage( "Sending cookie_set message from plugin: " + event.getStringValue() );
|
||||
|
||||
sendMessage(message);
|
||||
}
|
||||
|
||||
|
|
@ -863,6 +881,8 @@ MediaPluginWebKit::MediaPluginWebKit(LLPluginInstance::sendMessageFunction host_
|
|||
mPluginsEnabled = true; // default to on
|
||||
mEnableMediaPluginDebugging = false;
|
||||
mUserAgent = "LLPluginMedia Web Browser";
|
||||
|
||||
mElapsedTime.reset();
|
||||
}
|
||||
|
||||
MediaPluginWebKit::~MediaPluginWebKit()
|
||||
|
|
@ -1210,7 +1230,6 @@ void MediaPluginWebKit::receiveMessage(const char *message_string)
|
|||
{
|
||||
mEnableMediaPluginDebugging = message_in.getValueBoolean( "enable" );
|
||||
}
|
||||
|
||||
else
|
||||
if(message_name == "js_enable_object")
|
||||
{
|
||||
|
|
@ -1298,6 +1317,15 @@ void MediaPluginWebKit::receiveMessage(const char *message_string)
|
|||
mFirstFocus = false;
|
||||
}
|
||||
}
|
||||
else if(message_name == "set_page_zoom_factor")
|
||||
{
|
||||
#if LLQTWEBKIT_API_VERSION >= 15
|
||||
F32 factor = message_in.getValueReal("factor");
|
||||
LLQtWebKit::getInstance()->setPageZoomFactor(factor);
|
||||
#else
|
||||
llwarns << "Ignoring setPageZoomFactor message (llqtwebkit version is too old)." << llendl;
|
||||
#endif
|
||||
}
|
||||
else if(message_name == "clear_cache")
|
||||
{
|
||||
LLQtWebKit::getInstance()->clearCache();
|
||||
|
|
@ -1324,6 +1352,9 @@ void MediaPluginWebKit::receiveMessage(const char *message_string)
|
|||
else if(message_name == "set_cookies")
|
||||
{
|
||||
LLQtWebKit::getInstance()->setCookies(message_in.getValue("cookies"));
|
||||
|
||||
// debug spam
|
||||
postDebugMessage( "Plugin setting cookie: " + message_in.getValue("cookies") );
|
||||
}
|
||||
else if(message_name == "proxy_setup")
|
||||
{
|
||||
|
|
|
|||
|
|
@ -68,7 +68,6 @@ static LLDefaultChildRegistry::Register<LLMediaCtrl> r("web_browser");
|
|||
LLMediaCtrl::Params::Params()
|
||||
: start_url("start_url"),
|
||||
border_visible("border_visible", true),
|
||||
ignore_ui_scale("ignore_ui_scale", true),
|
||||
decouple_texture_size("decouple_texture_size", false),
|
||||
texture_width("texture_width", 1024),
|
||||
texture_height("texture_height", 1024),
|
||||
|
|
@ -89,7 +88,6 @@ LLMediaCtrl::LLMediaCtrl( const Params& p) :
|
|||
mFrequentUpdates( true ),
|
||||
mForceUpdate( false ),
|
||||
mHomePageUrl( "" ),
|
||||
mIgnoreUIScale( true ),
|
||||
mAlwaysRefresh( false ),
|
||||
mMediaSource( 0 ),
|
||||
mTakeFocusOnClick( p.focus_on_click ),
|
||||
|
|
@ -112,8 +110,6 @@ LLMediaCtrl::LLMediaCtrl( const Params& p) :
|
|||
setCaretColor( (unsigned int)color.mV[0], (unsigned int)color.mV[1], (unsigned int)color.mV[2] );
|
||||
}
|
||||
|
||||
setIgnoreUIScale(p.ignore_ui_scale);
|
||||
|
||||
setHomePageUrl(p.start_url, p.initial_mime_type);
|
||||
|
||||
setBorderVisible(p.border_visible);
|
||||
|
|
@ -124,10 +120,8 @@ LLMediaCtrl::LLMediaCtrl( const Params& p) :
|
|||
|
||||
if(!getDecoupleTextureSize())
|
||||
{
|
||||
S32 screen_width = mIgnoreUIScale ?
|
||||
llround((F32)getRect().getWidth() * LLUI::sGLScaleFactor.mV[VX]) : getRect().getWidth();
|
||||
S32 screen_height = mIgnoreUIScale ?
|
||||
llround((F32)getRect().getHeight() * LLUI::sGLScaleFactor.mV[VY]) : getRect().getHeight();
|
||||
S32 screen_width = llround((F32)getRect().getWidth() * LLUI::sGLScaleFactor.mV[VX]);
|
||||
S32 screen_height = llround((F32)getRect().getHeight() * LLUI::sGLScaleFactor.mV[VY]);
|
||||
|
||||
setTextureSize(screen_width, screen_height);
|
||||
}
|
||||
|
|
@ -471,8 +465,8 @@ void LLMediaCtrl::reshape( S32 width, S32 height, BOOL called_from_parent )
|
|||
{
|
||||
if(!getDecoupleTextureSize())
|
||||
{
|
||||
S32 screen_width = mIgnoreUIScale ? llround((F32)width * LLUI::sGLScaleFactor.mV[VX]) : width;
|
||||
S32 screen_height = mIgnoreUIScale ? llround((F32)height * LLUI::sGLScaleFactor.mV[VY]) : height;
|
||||
S32 screen_width = llround((F32)width * LLUI::sGLScaleFactor.mV[VX]);
|
||||
S32 screen_height = llround((F32)height * LLUI::sGLScaleFactor.mV[VY]);
|
||||
|
||||
// when floater is minimized, these sizes are negative
|
||||
if ( screen_height > 0 && screen_width > 0 )
|
||||
|
|
@ -689,6 +683,8 @@ bool LLMediaCtrl::ensureMediaSourceExists()
|
|||
mMediaSource->addObserver( this );
|
||||
mMediaSource->setBackgroundColor( getBackgroundColor() );
|
||||
mMediaSource->setTrustedBrowser(mTrusted);
|
||||
mMediaSource->setPageZoomFactor( LLUI::sGLScaleFactor.mV[ VX ] );
|
||||
|
||||
if(mClearCache)
|
||||
{
|
||||
mMediaSource->clearCache();
|
||||
|
|
@ -770,15 +766,7 @@ void LLMediaCtrl::draw()
|
|||
{
|
||||
gGL.pushUIMatrix();
|
||||
{
|
||||
if (mIgnoreUIScale)
|
||||
{
|
||||
gGL.loadUIIdentity();
|
||||
// font system stores true screen origin, need to scale this by UI scale factor
|
||||
// to get render origin for this view (with unit scale)
|
||||
gGL.translateUI(floorf(LLFontGL::sCurOrigin.mX * LLUI::sGLScaleFactor.mV[VX]),
|
||||
floorf(LLFontGL::sCurOrigin.mY * LLUI::sGLScaleFactor.mV[VY]),
|
||||
LLFontGL::sCurOrigin.mZ);
|
||||
}
|
||||
mMediaSource->setPageZoomFactor( LLUI::sGLScaleFactor.mV[ VX ] );
|
||||
|
||||
// scale texture to fit the space using texture coords
|
||||
gGL.getTexUnit(0)->bind(media_texture);
|
||||
|
|
@ -826,14 +814,6 @@ void LLMediaCtrl::draw()
|
|||
x_offset = (r.getWidth() - width) / 2;
|
||||
y_offset = (r.getHeight() - height) / 2;
|
||||
|
||||
if(mIgnoreUIScale)
|
||||
{
|
||||
x_offset = llround((F32)x_offset * LLUI::sGLScaleFactor.mV[VX]);
|
||||
y_offset = llround((F32)y_offset * LLUI::sGLScaleFactor.mV[VY]);
|
||||
width = llround((F32)width * LLUI::sGLScaleFactor.mV[VX]);
|
||||
height = llround((F32)height * LLUI::sGLScaleFactor.mV[VY]);
|
||||
}
|
||||
|
||||
// draw the browser
|
||||
gGL.begin( LLRender::QUADS );
|
||||
if (! media_plugin->getTextureCoordsOpenGL())
|
||||
|
|
@ -900,14 +880,14 @@ void LLMediaCtrl::convertInputCoords(S32& x, S32& y)
|
|||
coords_opengl = mMediaSource->getMediaPlugin()->getTextureCoordsOpenGL();
|
||||
}
|
||||
|
||||
x = mIgnoreUIScale ? llround((F32)x * LLUI::sGLScaleFactor.mV[VX]) : x;
|
||||
x = llround((F32)x * LLUI::sGLScaleFactor.mV[VX]);
|
||||
if ( ! coords_opengl )
|
||||
{
|
||||
y = mIgnoreUIScale ? llround((F32)(y) * LLUI::sGLScaleFactor.mV[VY]) : y;
|
||||
y = llround((F32)(y) * LLUI::sGLScaleFactor.mV[VY]);
|
||||
}
|
||||
else
|
||||
{
|
||||
y = mIgnoreUIScale ? llround((F32)(getRect().getHeight() - y) * LLUI::sGLScaleFactor.mV[VY]) : getRect().getHeight() - y;
|
||||
y = llround((F32)(getRect().getHeight() - y) * LLUI::sGLScaleFactor.mV[VY]);
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -51,7 +51,6 @@ public:
|
|||
Optional<std::string> start_url;
|
||||
|
||||
Optional<bool> border_visible,
|
||||
ignore_ui_scale,
|
||||
hide_loading,
|
||||
decouple_texture_size,
|
||||
trusted_content,
|
||||
|
|
@ -125,9 +124,6 @@ public:
|
|||
bool getFrequentUpdates() { return mFrequentUpdates; };
|
||||
void setFrequentUpdates( bool frequentUpdatesIn ) { mFrequentUpdates = frequentUpdatesIn; };
|
||||
|
||||
void setIgnoreUIScale(bool ignore) { mIgnoreUIScale = ignore; }
|
||||
bool getIgnoreUIScale() { return mIgnoreUIScale; }
|
||||
|
||||
void setAlwaysRefresh(bool refresh) { mAlwaysRefresh = refresh; }
|
||||
bool getAlwaysRefresh() { return mAlwaysRefresh; }
|
||||
|
||||
|
|
@ -181,28 +177,29 @@ public:
|
|||
const S32 mTextureDepthBytes;
|
||||
LLUUID mMediaTextureID;
|
||||
LLViewBorder* mBorder;
|
||||
bool mFrequentUpdates;
|
||||
bool mForceUpdate;
|
||||
bool mTrusted;
|
||||
std::string mHomePageUrl;
|
||||
std::string mHomePageMimeType;
|
||||
std::string mCurrentNavUrl;
|
||||
std::string mErrorPageURL;
|
||||
std::string mTarget;
|
||||
bool mIgnoreUIScale;
|
||||
bool mAlwaysRefresh;
|
||||
bool mFrequentUpdates,
|
||||
mForceUpdate,
|
||||
mTrusted,
|
||||
mAlwaysRefresh,
|
||||
mTakeFocusOnClick,
|
||||
mStretchToFill,
|
||||
mMaintainAspectRatio,
|
||||
mHideLoading,
|
||||
mHidingInitialLoad,
|
||||
mClearCache,
|
||||
mHoverTextChanged,
|
||||
mDecoupleTextureSize;
|
||||
|
||||
std::string mHomePageUrl,
|
||||
mHomePageMimeType,
|
||||
mCurrentNavUrl,
|
||||
mErrorPageURL,
|
||||
mTarget;
|
||||
viewer_media_t mMediaSource;
|
||||
bool mTakeFocusOnClick;
|
||||
bool mStretchToFill;
|
||||
bool mMaintainAspectRatio;
|
||||
bool mHideLoading;
|
||||
bool mHidingInitialLoad;
|
||||
bool mDecoupleTextureSize;
|
||||
S32 mTextureWidth;
|
||||
S32 mTextureHeight;
|
||||
bool mClearCache;
|
||||
S32 mTextureWidth,
|
||||
mTextureHeight;
|
||||
|
||||
class LLWindowShade* mWindowShade;
|
||||
bool mHoverTextChanged;
|
||||
LLContextMenu* mContextMenu;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1716,7 +1716,8 @@ LLViewerMediaImpl::LLViewerMediaImpl( const LLUUID& texture_id,
|
|||
mNavigateSuspended(false),
|
||||
mNavigateSuspendedDeferred(false),
|
||||
mIsUpdated(false),
|
||||
mTrustedBrowser(false)
|
||||
mTrustedBrowser(false),
|
||||
mZoomFactor(1.0)
|
||||
{
|
||||
|
||||
// Set up the mute list observer if it hasn't been set up already.
|
||||
|
|
@ -2302,6 +2303,17 @@ void LLViewerMediaImpl::clearCache()
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
void LLViewerMediaImpl::setPageZoomFactor( double factor )
|
||||
{
|
||||
if(mMediaSource && factor != mZoomFactor)
|
||||
{
|
||||
mZoomFactor = factor;
|
||||
mMediaSource->set_page_zoom_factor( factor );
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
void LLViewerMediaImpl::mouseDown(S32 x, S32 y, MASK mask, S32 button)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -250,6 +250,7 @@ public:
|
|||
std::string getMediaEntryURL() { return mMediaEntryURL; }
|
||||
void setHomeURL(const std::string& home_url, const std::string& mime_type = LLStringUtil::null) { mHomeURL = home_url; mHomeMimeType = mime_type;};
|
||||
void clearCache();
|
||||
void setPageZoomFactor( double factor );
|
||||
std::string getMimeType() { return mMimeType; }
|
||||
void scaleMouse(S32 *mouse_x, S32 *mouse_y);
|
||||
void scaleTextureCoords(const LLVector2& texture_coords, S32 *x, S32 *y);
|
||||
|
|
@ -416,6 +417,7 @@ private:
|
|||
private:
|
||||
// a single media url with some data and an impl.
|
||||
LLPluginClassMedia* mMediaSource;
|
||||
F64 mZoomFactor;
|
||||
LLUUID mTextureId;
|
||||
bool mMovieImageHasMips;
|
||||
std::string mMediaURL; // The last media url set with NavigateTo
|
||||
|
|
|
|||
|
|
@ -23,6 +23,5 @@
|
|||
right="-1"
|
||||
top="1"
|
||||
bottom="-1"
|
||||
ignore_ui_scale="false"
|
||||
name="browser"/>
|
||||
</floater>
|
||||
|
|
|
|||
|
|
@ -22,17 +22,17 @@ top="600"
|
|||
<!-- *NOTE: Custom resize logic for login_html in llpanellogin.cpp -->
|
||||
<web_browser
|
||||
tab_stop="false"
|
||||
trusted_content="true"
|
||||
bg_opaque_color="Black"
|
||||
border_visible="false"
|
||||
bottom="600"
|
||||
follows="all"
|
||||
left="0"
|
||||
name="login_html"
|
||||
start_url=""
|
||||
top="0"
|
||||
height="600"
|
||||
width="980" />
|
||||
trusted_content="true"
|
||||
bg_opaque_color="Black"
|
||||
border_visible="false"
|
||||
bottom="600"
|
||||
follows="all"
|
||||
left="0"
|
||||
name="login_html"
|
||||
start_url=""
|
||||
top="0"
|
||||
height="600"
|
||||
width="980"/>
|
||||
<layout_stack
|
||||
follows="left|bottom|right"
|
||||
name="login_widgets"
|
||||
|
|
|
|||
Loading…
Reference in New Issue