Merged in DRTVWR-492
commit
16437e771b
|
|
@ -580,9 +580,9 @@
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>23aeaf23e7db2484a1850017141860dd</string>
|
||||
<string>063d23fc17a12cc523c1339797e6ab2f</string>
|
||||
<key>url</key>
|
||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/34069/283470/dullahan-1.1.1320_3.3626.1895.g7001d56-darwin64-525361.tar.bz2</string>
|
||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/39378/333003/dullahan-1.2.201906191209_75.0.8_g5da93a1_chromium-75.0.3770.80-darwin64-528361.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>darwin64</string>
|
||||
|
|
@ -592,9 +592,9 @@
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>71fa66203326aca918796e874976c080</string>
|
||||
<string>dc407cb4676b40de44222e7b5a01b511</string>
|
||||
<key>url</key>
|
||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/34070/283477/dullahan-1.1.1320_3.3626.1895.g7001d56-windows-525361.tar.bz2</string>
|
||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/39381/333016/dullahan-1.2.201906191911_75.0.8_g5da93a1_chromium-75.0.3770.80-windows-528361.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>windows</string>
|
||||
|
|
@ -604,16 +604,16 @@
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>c7162e4805f50a3609f5dc63d0cf2bc0</string>
|
||||
<string>bbab698b2807da3c2a3dc94de3aa3084</string>
|
||||
<key>url</key>
|
||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/34071/283480/dullahan-1.1.1320_3.3626.1895.g7001d56-windows64-525361.tar.bz2</string>
|
||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/39380/333017/dullahan-1.2.201906191911_75.0.8_g5da93a1_chromium-75.0.3770.80-windows64-528361.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>windows64</string>
|
||||
</map>
|
||||
</map>
|
||||
<key>version</key>
|
||||
<string>1.1.1320_3.3626.1895.g7001d56</string>
|
||||
<string>1.2.201906191911_75.0.8_g5da93a1_chromium-75.0.3770.80</string>
|
||||
</map>
|
||||
<key>elfio</key>
|
||||
<map>
|
||||
|
|
|
|||
|
|
@ -656,12 +656,14 @@ bool LLPluginClassMedia::keyEvent(EKeyEventType type, int key_code, MASK modifie
|
|||
return result;
|
||||
}
|
||||
|
||||
void LLPluginClassMedia::scrollEvent(int x, int y, MASK modifiers)
|
||||
void LLPluginClassMedia::scrollEvent(int x, int y, int clicks_x, int clicks_y, MASK modifiers)
|
||||
{
|
||||
LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "scroll_event");
|
||||
|
||||
message.setValueS32("x", x);
|
||||
message.setValueS32("y", y);
|
||||
message.setValueS32("clicks_x", clicks_x);
|
||||
message.setValueS32("clicks_y", clicks_y);
|
||||
message.setValue("modifiers", translateModifiers(modifiers));
|
||||
|
||||
sendMessage(message);
|
||||
|
|
@ -847,12 +849,10 @@ void LLPluginClassMedia::paste()
|
|||
}
|
||||
|
||||
void LLPluginClassMedia::setUserDataPath(const std::string &user_data_path_cache,
|
||||
const std::string &user_data_path_cookies,
|
||||
const std::string &user_data_path_cef_log)
|
||||
{
|
||||
LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "set_user_data_path");
|
||||
message.setValue("cache_path", user_data_path_cache);
|
||||
message.setValue("cookies_path", user_data_path_cookies);
|
||||
message.setValue("cef_log_file", user_data_path_cef_log);
|
||||
|
||||
bool cef_verbose_log = gSavedSettings.getBOOL("CefVerboseLog");
|
||||
|
|
@ -1128,6 +1128,10 @@ void LLPluginClassMedia::receivePluginMessage(const LLPluginMessage &message)
|
|||
mDebugMessageLevel = message.getValue("message_level");
|
||||
mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_DEBUG_MESSAGE);
|
||||
}
|
||||
else if (message_name == "tooltip_text")
|
||||
{
|
||||
mHoverText = message.getValue("tooltip");
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS("Plugin") << "Unknown " << message_name << " class message: " << message_name << LL_ENDL;
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ public:
|
|||
|
||||
bool keyEvent(EKeyEventType type, int key_code, MASK modifiers, LLSD native_key_data);
|
||||
|
||||
void scrollEvent(int x, int y, MASK modifiers);
|
||||
void scrollEvent(int x, int y, int clicks_x, int clicks_y, MASK modifiers);
|
||||
|
||||
// enable/disable media plugin debugging messages and info spam
|
||||
void enableMediaPluginDebugging( bool enable );
|
||||
|
|
@ -195,7 +195,7 @@ public:
|
|||
bool canPaste() const { return mCanPaste; };
|
||||
|
||||
// These can be called before init(), and they will be queued and sent before the media init message.
|
||||
void setUserDataPath(const std::string &user_data_path_cache, const std::string &user_data_path_cookies, const std::string &user_data_path_cef_log);
|
||||
void setUserDataPath(const std::string &user_data_path_cache, const std::string &user_data_path_cef_log);
|
||||
void setLanguageCode(const std::string &language_code);
|
||||
void setPluginsEnabled(const bool enabled);
|
||||
void setJavascriptEnabled(const bool enabled);
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@ private:
|
|||
void onConsoleMessageCallback(std::string message, std::string source, int line);
|
||||
void onStatusMessageCallback(std::string value);
|
||||
void onTitleChangeCallback(std::string title);
|
||||
void onTooltipCallback(std::string text);
|
||||
void onLoadStartCallback();
|
||||
void onRequestExitCallback();
|
||||
void onLoadEndCallback(int httpStatusCode);
|
||||
|
|
@ -95,7 +96,6 @@ private:
|
|||
bool mCanCopy;
|
||||
bool mCanPaste;
|
||||
std::string mCachePath;
|
||||
std::string mCookiePath;
|
||||
std::string mCefLogFile;
|
||||
bool mCefLogVerbose;
|
||||
std::vector<std::string> mPickedFiles;
|
||||
|
|
@ -127,7 +127,6 @@ MediaPluginBase(host_send_func, host_user_data)
|
|||
mCanCopy = false;
|
||||
mCanPaste = false;
|
||||
mCachePath = "";
|
||||
mCookiePath = "";
|
||||
mCefLogFile = "";
|
||||
mCefLogVerbose = false;
|
||||
mPickedFiles.clear();
|
||||
|
|
@ -208,6 +207,12 @@ void MediaPluginCEF::onTitleChangeCallback(std::string title)
|
|||
sendMessage(message);
|
||||
}
|
||||
|
||||
void MediaPluginCEF::onTooltipCallback(std::string text)
|
||||
{
|
||||
LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "tooltip_text");
|
||||
message.setValue("tooltip", text);
|
||||
sendMessage(message);
|
||||
}
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
void MediaPluginCEF::onLoadStartCallback()
|
||||
|
|
@ -486,6 +491,7 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
|
|||
mCEFLib->setOnConsoleMessageCallback(std::bind(&MediaPluginCEF::onConsoleMessageCallback, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
|
||||
mCEFLib->setOnStatusMessageCallback(std::bind(&MediaPluginCEF::onStatusMessageCallback, this, std::placeholders::_1));
|
||||
mCEFLib->setOnTitleChangeCallback(std::bind(&MediaPluginCEF::onTitleChangeCallback, this, std::placeholders::_1));
|
||||
mCEFLib->setOnTooltipCallback(std::bind(&MediaPluginCEF::onTooltipCallback, this, std::placeholders::_1));
|
||||
mCEFLib->setOnLoadStartCallback(std::bind(&MediaPluginCEF::onLoadStartCallback, this));
|
||||
mCEFLib->setOnLoadEndCallback(std::bind(&MediaPluginCEF::onLoadEndCallback, this, std::placeholders::_1));
|
||||
mCEFLib->setOnLoadErrorCallback(std::bind(&MediaPluginCEF::onLoadError, this, std::placeholders::_1, std::placeholders::_2));
|
||||
|
|
@ -501,7 +507,6 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
|
|||
settings.background_color = 0xff282828;
|
||||
settings.cache_enabled = true;
|
||||
settings.cache_path = mCachePath;
|
||||
settings.cookie_store_path = mCookiePath;
|
||||
settings.cookies_enabled = mCookiesEnabled;
|
||||
settings.disable_gpu = mDisableGPU;
|
||||
settings.flash_enabled = mPluginsEnabled;
|
||||
|
|
@ -556,7 +561,6 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
|
|||
std::string user_data_path_cookies = message_in.getValue("cookies_path");
|
||||
|
||||
mCachePath = user_data_path_cache + "cef_cache";
|
||||
mCookiePath = user_data_path_cookies + "cef_cookies";
|
||||
mCefLogFile = message_in.getValue("cef_log_file");
|
||||
mCefLogVerbose = message_in.getValueBoolean("cef_verbose_log");
|
||||
}
|
||||
|
|
@ -657,10 +661,13 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
|
|||
{
|
||||
S32 x = message_in.getValueS32("x");
|
||||
S32 y = message_in.getValueS32("y");
|
||||
S32 delta_x = message_in.getValueS32("clicks_x");
|
||||
S32 delta_y = message_in.getValueS32("clicks_y");
|
||||
const int scaling_factor = 40;
|
||||
y *= -scaling_factor;
|
||||
delta_x *= -scaling_factor;
|
||||
delta_y *= -scaling_factor;
|
||||
|
||||
mCEFLib->mouseWheel(x, y);
|
||||
mCEFLib->mouseWheel(x, y, delta_x, delta_y);
|
||||
}
|
||||
else if (message_name == "text_event")
|
||||
{
|
||||
|
|
|
|||
|
|
@ -202,7 +202,10 @@ BOOL LLMediaCtrl::handleScrollWheel( S32 x, S32 y, S32 clicks )
|
|||
{
|
||||
if (LLPanel::handleScrollWheel(x, y, clicks)) return TRUE;
|
||||
if (mMediaSource && mMediaSource->hasMedia())
|
||||
mMediaSource->getMediaPlugin()->scrollEvent(0, clicks, gKeyboard->currentMask(TRUE));
|
||||
{
|
||||
convertInputCoords(x, y);
|
||||
mMediaSource->scrollWheel(x, y, 0, clicks, gKeyboard->currentMask(TRUE));
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -547,17 +547,17 @@ void LLPanelPrimMediaControls::updateShape()
|
|||
switch (mScrollState)
|
||||
{
|
||||
case SCROLL_UP:
|
||||
media_impl->scrollWheel(0, -1, MASK_NONE);
|
||||
media_impl->scrollWheel(0, 0, 0, -1, MASK_NONE);
|
||||
break;
|
||||
case SCROLL_DOWN:
|
||||
media_impl->scrollWheel(0, 1, MASK_NONE);
|
||||
media_impl->scrollWheel(0, 0, 0, 1, MASK_NONE);
|
||||
break;
|
||||
case SCROLL_LEFT:
|
||||
media_impl->scrollWheel(1, 0, MASK_NONE);
|
||||
media_impl->scrollWheel(0, 0, 1, 0, MASK_NONE);
|
||||
// media_impl->handleKeyHere(KEY_LEFT, MASK_NONE);
|
||||
break;
|
||||
case SCROLL_RIGHT:
|
||||
media_impl->scrollWheel(-1, 0, MASK_NONE);
|
||||
media_impl->scrollWheel(0, 0, -1, 0, MASK_NONE);
|
||||
// media_impl->handleKeyHere(KEY_RIGHT, MASK_NONE);
|
||||
break;
|
||||
case SCROLL_NONE:
|
||||
|
|
@ -1134,7 +1134,7 @@ void LLPanelPrimMediaControls::onScrollUp(void* user_data)
|
|||
|
||||
if(impl)
|
||||
{
|
||||
impl->scrollWheel(0, -1, MASK_NONE);
|
||||
impl->scrollWheel(0, 0, 0, -1, MASK_NONE);
|
||||
}
|
||||
}
|
||||
void LLPanelPrimMediaControls::onScrollUpHeld(void* user_data)
|
||||
|
|
@ -1151,7 +1151,7 @@ void LLPanelPrimMediaControls::onScrollRight(void* user_data)
|
|||
|
||||
if(impl)
|
||||
{
|
||||
impl->scrollWheel(-1, 0, MASK_NONE);
|
||||
impl->scrollWheel(0, 0, -1, 0, MASK_NONE);
|
||||
// impl->handleKeyHere(KEY_RIGHT, MASK_NONE);
|
||||
}
|
||||
}
|
||||
|
|
@ -1170,7 +1170,7 @@ void LLPanelPrimMediaControls::onScrollLeft(void* user_data)
|
|||
|
||||
if(impl)
|
||||
{
|
||||
impl->scrollWheel(1, 0, MASK_NONE);
|
||||
impl->scrollWheel(0, 0, 1, 0, MASK_NONE);
|
||||
// impl->handleKeyHere(KEY_LEFT, MASK_NONE);
|
||||
}
|
||||
}
|
||||
|
|
@ -1189,7 +1189,7 @@ void LLPanelPrimMediaControls::onScrollDown(void* user_data)
|
|||
|
||||
if(impl)
|
||||
{
|
||||
impl->scrollWheel(0, 1, MASK_NONE);
|
||||
impl->scrollWheel(0, 0, 0, 1, MASK_NONE);
|
||||
}
|
||||
}
|
||||
void LLPanelPrimMediaControls::onScrollDownHeld(void* user_data)
|
||||
|
|
|
|||
|
|
@ -1731,12 +1731,10 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_
|
|||
std::string launcher_name = gDirUtilp->getLLPluginLauncher();
|
||||
std::string plugin_name = gDirUtilp->getLLPluginFilename(plugin_basename);
|
||||
|
||||
// cookies now are stored in the CEF cache directory too (no more control over their location)
|
||||
std::string user_data_path_cache = gDirUtilp->getCacheDir(false);
|
||||
user_data_path_cache += gDirUtilp->getDirDelimiter();
|
||||
|
||||
std::string user_data_path_cookies = gDirUtilp->getOSUserAppDir();
|
||||
user_data_path_cookies += gDirUtilp->getDirDelimiter();
|
||||
|
||||
std::string user_data_path_cef_log = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "cef_log.txt");
|
||||
|
||||
// Fix for EXT-5960 - make browser profile specific to user (cache, cookies etc.)
|
||||
|
|
@ -1747,8 +1745,9 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_
|
|||
std::string linden_user_dir = gDirUtilp->getLindenUserDir();
|
||||
if ( ! linden_user_dir.empty() )
|
||||
{
|
||||
user_data_path_cookies = linden_user_dir;
|
||||
user_data_path_cookies += gDirUtilp->getDirDelimiter();
|
||||
// cookies now are stored in the CEF cache directory too (no more control over their location)
|
||||
user_data_path_cache = linden_user_dir;
|
||||
user_data_path_cache += gDirUtilp->getDirDelimiter();
|
||||
};
|
||||
|
||||
// See if the plugin executable exists
|
||||
|
|
@ -1767,7 +1766,7 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_
|
|||
{
|
||||
media_source = new LLPluginClassMedia(owner);
|
||||
media_source->setSize(default_width, default_height);
|
||||
media_source->setUserDataPath(user_data_path_cache, user_data_path_cookies, user_data_path_cef_log);
|
||||
media_source->setUserDataPath(user_data_path_cache, user_data_path_cef_log);
|
||||
media_source->setLanguageCode(LLUI::getLanguage());
|
||||
media_source->setZoomFactor(zoom_factor);
|
||||
|
||||
|
|
@ -2309,14 +2308,14 @@ void LLViewerMediaImpl::mouseDoubleClick(S32 x, S32 y, MASK mask, S32 button)
|
|||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
void LLViewerMediaImpl::scrollWheel(S32 x, S32 y, MASK mask)
|
||||
void LLViewerMediaImpl::scrollWheel(S32 x, S32 y, S32 scroll_x, S32 scroll_y, MASK mask)
|
||||
{
|
||||
scaleMouse(&x, &y);
|
||||
mLastMouseX = x;
|
||||
mLastMouseY = y;
|
||||
if (mMediaSource)
|
||||
{
|
||||
mMediaSource->scrollEvent(x, y, mask);
|
||||
mMediaSource->scrollEvent(x, y, scroll_x, scroll_y, mask);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -230,7 +230,7 @@ public:
|
|||
void mouseMove(const LLVector2& texture_coords, MASK mask);
|
||||
void mouseDoubleClick(const LLVector2& texture_coords, MASK mask);
|
||||
void mouseDoubleClick(S32 x, S32 y, MASK mask, S32 button = 0);
|
||||
void scrollWheel(S32 x, S32 y, MASK mask);
|
||||
void scrollWheel(S32 x, S32 y, S32 scroll_x, S32 scroll_y, MASK mask);
|
||||
void mouseCapture();
|
||||
|
||||
void navigateBack();
|
||||
|
|
|
|||
|
|
@ -377,12 +377,7 @@ BOOL LLViewerMediaFocus::handleScrollWheel(S32 x, S32 y, S32 clicks)
|
|||
LLViewerMediaImpl* media_impl = getFocusedMediaImpl();
|
||||
if(media_impl && media_impl->hasMedia())
|
||||
{
|
||||
// the scrollEvent() API's x and y are not the same as handleScrollWheel's x and y.
|
||||
// The latter is the position of the mouse at the time of the event
|
||||
// The former is the 'scroll amount' in x and y, respectively.
|
||||
// All we have for 'scroll amount' here is 'clicks'.
|
||||
// We're also not passed the keyboard modifier mask, but we can get that from gKeyboard.
|
||||
media_impl->getMediaPlugin()->scrollEvent(0, clicks, gKeyboard->currentMask(TRUE));
|
||||
media_impl->scrollWheel(x, y, 0, clicks, gKeyboard->currentMask(TRUE));
|
||||
retval = TRUE;
|
||||
}
|
||||
return retval;
|
||||
|
|
|
|||
Loading…
Reference in New Issue