diff options
author | Aleric Inglewood | 2010-10-31 15:47:04 +0100 |
---|---|---|
committer | McCabe Maxsted | 2010-11-02 16:49:51 -0700 |
commit | 27cd3784b870deec313678d28de65bb8d7fe4626 (patch) | |
tree | 32996efd6ea81cbdbc1cd3e894e0e3dbde8a4c87 /linden/indra/llplugin | |
parent | Make LLStringUtilBase<T>::null a constant. (diff) | |
download | meta-impy-27cd3784b870deec313678d28de65bb8d7fe4626.zip meta-impy-27cd3784b870deec313678d28de65bb8d7fe4626.tar.gz meta-impy-27cd3784b870deec313678d28de65bb8d7fe4626.tar.bz2 meta-impy-27cd3784b870deec313678d28de65bb8d7fe4626.tar.xz |
Fix llqtwebkit version incompatibility.
This patch has the minimum changes needed to be compatible with
LLQTWEBKIT_API_VERSION 2. From llqtwebkit.h:
Version 2:
indra/media_plugins/webkit/media_plugin_webkit.cpp:
* Changed the usage of the event parameters in onClickLinkHref and
onClickLinkNoFollow events slightly. The clicked URI for both should
now be retrieved with getEventUri() instead of getStringValue().
The "target" string in onClickLinkHref is now retrieved with
getStringValue() instead of getStringValue2().
* The contents of getStringValue2() in the onClickLinkHref event is
now a unique ID for the window proxy the click targets.
all changed files:
* Removed the "link target type" concept, since it doesn't really belong
here.
Note that not all changes have been taken into account, since we need
a LOT of code changes for MoaP before that gets relevant; most notably:
"target" and "uuid" aren't used anywhere.
The new LLEmbeddedBrowserWindowObserver::onWindowGeometryChangeRequested
and LLEmbeddedBrowserWindowObserver::onRequestFilePicker are still not
implemented.
Version 1 introduced LLEmbeddedBrowserWindowObserver::onWindowCloseRequested
which is also still not implemented.
Diffstat (limited to 'linden/indra/llplugin')
-rwxr-xr-x | linden/indra/llplugin/llpluginclassmedia.cpp | 28 | ||||
-rwxr-xr-x | linden/indra/llplugin/llpluginclassmedia.h | 11 |
2 files changed, 0 insertions, 39 deletions
diff --git a/linden/indra/llplugin/llpluginclassmedia.cpp b/linden/indra/llplugin/llpluginclassmedia.cpp index 5dc0c47..85241be 100755 --- a/linden/indra/llplugin/llpluginclassmedia.cpp +++ b/linden/indra/llplugin/llpluginclassmedia.cpp | |||
@@ -150,7 +150,6 @@ void LLPluginClassMedia::reset() | |||
150 | mProgressPercent = 0; | 150 | mProgressPercent = 0; |
151 | mClickURL.clear(); | 151 | mClickURL.clear(); |
152 | mClickTarget.clear(); | 152 | mClickTarget.clear(); |
153 | mClickTargetType = TARGET_NONE; | ||
154 | 153 | ||
155 | // media_time class | 154 | // media_time class |
156 | mCurrentTime = 0.0f; | 155 | mCurrentTime = 0.0f; |
@@ -722,30 +721,6 @@ void LLPluginClassMedia::setJavascriptEnabled(const bool enabled) | |||
722 | sendMessage(message); | 721 | sendMessage(message); |
723 | } | 722 | } |
724 | 723 | ||
725 | LLPluginClassMedia::ETargetType getTargetTypeFromLLQtWebkit(int target_type) | ||
726 | { | ||
727 | llassert(false); | ||
728 | return LLPluginClassMedia::TARGET_OTHER; | ||
729 | #if 0 | ||
730 | // convert a LinkTargetType value from llqtwebkit to an ETargetType | ||
731 | // so that we don't expose the llqtwebkit header in viewer code | ||
732 | switch (target_type) | ||
733 | { | ||
734 | case LLQtWebKit::LTT_TARGET_NONE: | ||
735 | return LLPluginClassMedia::TARGET_NONE; | ||
736 | |||
737 | case LLQtWebKit::LTT_TARGET_BLANK: | ||
738 | return LLPluginClassMedia::TARGET_BLANK; | ||
739 | |||
740 | case LLQtWebKit::LTT_TARGET_EXTERNAL: | ||
741 | return LLPluginClassMedia::TARGET_EXTERNAL; | ||
742 | |||
743 | default: | ||
744 | return LLPluginClassMedia::TARGET_OTHER; | ||
745 | } | ||
746 | #endif | ||
747 | } | ||
748 | |||
749 | /* virtual */ | 724 | /* virtual */ |
750 | void LLPluginClassMedia::receivePluginMessage(const LLPluginMessage &message) | 725 | void LLPluginClassMedia::receivePluginMessage(const LLPluginMessage &message) |
751 | { | 726 | { |
@@ -998,15 +973,12 @@ void LLPluginClassMedia::receivePluginMessage(const LLPluginMessage &message) | |||
998 | { | 973 | { |
999 | mClickURL = message.getValue("uri"); | 974 | mClickURL = message.getValue("uri"); |
1000 | mClickTarget = message.getValue("target"); | 975 | mClickTarget = message.getValue("target"); |
1001 | U32 target_type = message.getValueU32("target_type"); | ||
1002 | mClickTargetType = ::getTargetTypeFromLLQtWebkit(target_type); | ||
1003 | mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_CLICK_LINK_HREF); | 976 | mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_CLICK_LINK_HREF); |
1004 | } | 977 | } |
1005 | else if(message_name == "click_nofollow") | 978 | else if(message_name == "click_nofollow") |
1006 | { | 979 | { |
1007 | mClickURL = message.getValue("uri"); | 980 | mClickURL = message.getValue("uri"); |
1008 | mClickTarget.clear(); | 981 | mClickTarget.clear(); |
1009 | mClickTargetType = TARGET_NONE; | ||
1010 | mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_CLICK_LINK_NOFOLLOW); | 982 | mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_CLICK_LINK_NOFOLLOW); |
1011 | } | 983 | } |
1012 | else if(message_name == "cookie_set") | 984 | else if(message_name == "cookie_set") |
diff --git a/linden/indra/llplugin/llpluginclassmedia.h b/linden/indra/llplugin/llpluginclassmedia.h index abb7926..0004971 100755 --- a/linden/indra/llplugin/llpluginclassmedia.h +++ b/linden/indra/llplugin/llpluginclassmedia.h | |||
@@ -225,16 +225,6 @@ public: | |||
225 | // This is valid after MEDIA_EVENT_CLICK_LINK_HREF | 225 | // This is valid after MEDIA_EVENT_CLICK_LINK_HREF |
226 | std::string getClickTarget() const { return mClickTarget; }; | 226 | std::string getClickTarget() const { return mClickTarget; }; |
227 | 227 | ||
228 | typedef enum | ||
229 | { | ||
230 | TARGET_NONE, // empty href target string | ||
231 | TARGET_BLANK, // target to open link in user's preferred browser | ||
232 | TARGET_EXTERNAL, // target to open link in external browser | ||
233 | TARGET_OTHER // nonempty and unsupported target type | ||
234 | }ETargetType; | ||
235 | |||
236 | // This is valid after MEDIA_EVENT_CLICK_LINK_HREF | ||
237 | ETargetType getClickTargetType() const { return mClickTargetType; }; | ||
238 | 228 | ||
239 | std::string getMediaName() const { return mMediaName; }; | 229 | std::string getMediaName() const { return mMediaName; }; |
240 | std::string getMediaDescription() const { return mMediaDescription; }; | 230 | std::string getMediaDescription() const { return mMediaDescription; }; |
@@ -366,7 +356,6 @@ protected: | |||
366 | std::string mLocation; | 356 | std::string mLocation; |
367 | std::string mClickURL; | 357 | std::string mClickURL; |
368 | std::string mClickTarget; | 358 | std::string mClickTarget; |
369 | ETargetType mClickTargetType; | ||
370 | 359 | ||
371 | ///////////////////////////////////////// | 360 | ///////////////////////////////////////// |
372 | // media_time class | 361 | // media_time class |