[Pkg-mono-svn-commits] [SCM] moon branch, master, updated. upstream/2.3-47-g8f32d36
Jo Shields
directhex at apebox.org
Fri Nov 5 00:59:13 UTC 2010
The following commit has been merged in the master branch:
commit d01b77fed6251b4abb61c89559319dd1ff55bcfa
Author: Jo Shields <directhex at apebox.org>
Date: Thu Nov 4 23:52:03 2010 +0000
New upstream release (removes need for FF3.6 backport patch)
(Historic bzr commit from Tue 2010-03-09 15:58:21 +0000)
diff --git a/debian/changelog b/debian/changelog
index e503de5..7a01e5f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-moon (2.1-0ubuntu1~pre~ppa1) UNRELEASED; urgency=low
+moon (2.2-0ubuntu1~pre~ppa1) UNRELEASED; urgency=low
* New upstream release
* debian/control:
@@ -28,7 +28,7 @@ moon (2.1-0ubuntu1~pre~ppa1) UNRELEASED; urgency=low
* debian/monodoc-moonlight-manual.install:
+ Create manual package for GTK# widget assembly
- -- Jo Shields <directhex at apebox.org> Sat, 19 Dec 2009 13:46:40 +0000
+ -- Jo Shields <jms at apebox.org> Tue, 09 Mar 2010 15:21:48 +0000
moon (1.0.1-3) unstable; urgency=low
diff --git a/debian/patches/moon_backport_support_for_firefox_3.6_r150505_r151553_r151933.patch b/debian/patches/moon_backport_support_for_firefox_3.6_r150505_r151553_r151933.patch
deleted file mode 100644
index 848c9d1..0000000
--- a/debian/patches/moon_backport_support_for_firefox_3.6_r150505_r151553_r151933.patch
+++ /dev/null
@@ -1,1565 +0,0 @@
-Index: moonlight-2.1/m4/mozilla.m4
-===================================================================
---- moonlight-2.1.orig/m4/mozilla.m4 2010-02-16 20:03:50.000000000 +0000
-+++ moonlight-2.1/m4/mozilla.m4 2010-02-17 22:16:17.000000000 +0000
-@@ -1,8 +1,37 @@
- AC_DEFUN([MOONLIGHT_CHECK_MOZILLA],
- [
- with_mozilla=no
-- with_ff3=$browser_support
-- with_ff2=$browser_support
-+
-+ if test x$browser_support = xno; then
-+ with_ff36=no
-+ with_ff3=no
-+ with_ff2=no
-+ fi
-+
-+ dnl
-+ dnl Firefox 3.6
-+ dnl
-+
-+ AC_ARG_WITH(ff36, AC_HELP_STRING([--with-ff36=no|yes],
-+ [If you want to enable the xulrunner 1.9.2+ (Firefox 3.6) bridge]),
-+ [], [with_ff36=yes])
-+
-+ if test x$with_ff36 = xyes -a x$browser_support = xyes; then
-+ FF36_MODULES="libxul mozilla-plugin mozilla-js"
-+
-+ PKG_CHECK_EXISTS($FF36_MODULES,
-+ [with_ff36=yes],
-+ [with_ff36=no ff36_reason="(reason: missing FF36 development packages)"])
-+
-+ if test x$with_ff36 = xyes; then
-+ AC_DEFINE([HAVE_GECKO_1_9_2], [1], [Gecko 1.9.2+ support])
-+ PKG_CHECK_MODULES(FF36, [$FF36_MODULES glib-2.0])
-+ dnl Strip out problem libraries (should already be in process space)
-+ FF36_LIBS="$(echo $FF36_LIBS | sed -e 's/-lmozjs\|-lplds4\|-lplc4\|-lnspr4//g')"
-+ fi
-+ fi
-+
-+ AM_CONDITIONAL(HAVE_GECKO_1_9_2,test x$with_ff36 = xyes)
-
- dnl
- dnl Firefox 3
-@@ -76,8 +105,10 @@
- fi
- elif test x$with_ff3 = xyes; then
- with_mozilla=yes
-+ elif test x$with_ff36 = xyes; then
-+ with_mozilla=yes
- MIN_FIREFOX_VERSION="2.9.*"
-- MAX_FIREFOX_VERSION="3.5.*"
-+ MAX_FIREFOX_VERSION="3.6.*"
- fi
-
- AC_SUBST([MIN_FIREFOX_VERSION])
-Index: moonlight-2.1/plugin/plugin.cpp
-===================================================================
---- moonlight-2.1.orig/plugin/plugin.cpp 2010-02-16 20:03:55.000000000 +0000
-+++ moonlight-2.1/plugin/plugin.cpp 2010-02-17 20:26:24.000000000 +0000
-@@ -34,6 +34,7 @@
- #include "deployment.h"
- #include "uri.h"
- #include "timemanager.h"
-+#include "plugin-domevents.h"
-
- #define Visual _XxVisual
- #define Region _XxRegion
-@@ -853,7 +854,7 @@
- // grovel around in the useragent and try to figure out which
- // browser bridge we should use.
- const char *useragent = MOON_NPN_UserAgent (instance);
--
-+ printf ("%s\n", useragent);
- if (strstr (useragent, "Opera")) {
- // opera based
- TryLoadBridge ("opera");
-@@ -863,10 +864,13 @@
- TryLoadBridge ("webkit");
- }
- else if (strstr (useragent, "Gecko")) {
-- // gecko based, let's look for 'rv:1.8' vs 'rv:1.9'
-+ // gecko based, let's look for 'rv:1.8' vs 'rv:1.9.2' vs 'rv:1.9'
- if (strstr (useragent, "rv:1.8")) {
- TryLoadBridge ("ff2");
- }
-+ else if (strstr (useragent, "rv:1.9.2")) {
-+ TryLoadBridge ("ff36");
-+ }
- else if (strstr (useragent, "rv:1.9")) {
- TryLoadBridge ("ff3");
- }
-@@ -2389,3 +2393,21 @@
- {
- return g_slist_length (plugin_instances);
- }
-+
-+gpointer
-+PluginInstance::HtmlObjectAttachEvent (NPP npp, NPObject *npobj, const char *name, callback_dom_event cb, gpointer context)
-+{
-+ DomEventListener *listener = DomEventListener::Create (npp, this, name, cb, context, npobj);
-+ listener->Attach ();
-+ MOON_NPN_RetainObject (listener);
-+ return listener;
-+
-+}
-+
-+void
-+PluginInstance::HtmlObjectDetachEvent (NPP instance, const char *name, gpointer listener_ptr)
-+{
-+ DomEventListener *listener = (DomEventListener *) listener_ptr;
-+ listener->Detach ();
-+ MOON_NPN_ReleaseObject (listener);
-+}
-Index: moonlight-2.1/plugin/plugin-domevents.cpp
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ moonlight-2.1/plugin/plugin-domevents.cpp 2010-02-17 20:26:24.000000000 +0000
-@@ -0,0 +1,297 @@
-+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-+/*
-+ * ff36-dom.cpp: Firefox 3.6.x DOM wrapper
-+ *
-+ * Contact:
-+ * Moonlight List (moonlight-list at lists.ximian.com)
-+ *
-+ * Copyright 2010 Novell, Inc. (http://www.novell.com)
-+ *
-+ * See the LICENSE file included with the distribution for details.
-+ *
-+ */
-+
-+#include "plugin-domevents.h"
-+
-+#ifdef DEBUG
-+#define d(x) x
-+#else
-+#define d(x)
-+#endif
-+
-+#define STR_FROM_VARIANT(v) ((char *) NPVARIANT_TO_STRING (v).utf8characters)
-+
-+NPClass DomEventListener::DomEventClass = {
-+ 0,
-+ DomEventListener::Allocate,
-+ DomEventListener::_Deallocate, //Deallocate
-+ NULL, //Invalidate
-+ DomEventListener::_HasMethod, //HasMethod
-+ DomEventListener::_Invoke, //Invoke
-+ NULL, //DomEventListener::_InvokeDefault, //InvokeDefault
-+ DomEventListener::_HasProperty, //hasProperty
-+ DomEventListener::_GetProperty, //getProperty
-+ NULL, //setProperty
-+ NULL, //removeProperty
-+ NULL, //enumerate
-+ NULL, //construct
-+};
-+
-+DomEventListener*
-+DomEventListener::Create(NPP npp, PluginInstance *plugin, const char *name, callback_dom_event* cb, gpointer ctx, NPObject *npobj) {
-+ DomEventListener *listener = reinterpret_cast<DomEventListener *> (MOON_NPN_CreateObject(npp, &DomEventClass));
-+ listener->parent = plugin;
-+ listener->callback = cb;
-+ listener->context = ctx;
-+ listener->target = npobj;
-+ listener->name = name;
-+ return listener;
-+}
-+
-+void
-+DomEventListener::Attach ()
-+{
-+ NPVariant args[3];
-+ string_to_npvariant(name, &args[0]);
-+ OBJECT_TO_NPVARIANT(this, args[1]);
-+ BOOLEAN_TO_NPVARIANT(false, args[2]);
-+
-+ NPVariant result;
-+ if (!MOON_NPN_Invoke(npp, target, NPID("addEventListener"), args, 3, &result))
-+ d(printf ("Error attaching event\n"));
-+}
-+
-+void
-+DomEventListener::Detach ()
-+{
-+ NPVariant args[3];
-+ string_to_npvariant(name, &args[0]);
-+ OBJECT_TO_NPVARIANT(this, args[1]);
-+ BOOLEAN_TO_NPVARIANT(true, args[2]);
-+ NPVariant result;
-+ if (!MOON_NPN_Invoke(npp, target, NPID("removeEventListener"), args, 3, &result))
-+ d(printf ("Error detaching event\n"));
-+
-+ callback = NULL;
-+ if (eventTarget)
-+ MOON_NPN_ReleaseObject (eventTarget);
-+ eventTarget = NULL;
-+}
-+
-+
-+NPObject*
-+DomEventListener::Allocate(NPP npp, NPClass *klass) {
-+ return new DomEventListener (npp);
-+}
-+
-+void
-+DomEventListener::_Deallocate(NPObject *obj) {
-+ delete ((DomEventListener*)obj);
-+}
-+
-+bool
-+DomEventListener::_HasMethod(NPObject *obj, NPIdentifier name) {
-+ return ((DomEventListener*)obj)->HasMethod (name);
-+}
-+
-+bool
-+DomEventListener::_Invoke(NPObject *obj, NPIdentifier name, const NPVariant *args, uint32_t argCount, NPVariant *result) {
-+ return ((DomEventListener*)obj)->Invoke (name, args, argCount, result);
-+}
-+
-+bool
-+DomEventListener::_HasProperty(NPObject * obj, NPIdentifier name) {
-+ return ((DomEventListener*)obj)->HasProperty (name);
-+}
-+
-+bool
-+DomEventListener::_GetProperty(NPObject *obj, NPIdentifier name, NPVariant *result) {
-+ return ((DomEventListener*)obj)->GetProperty (name, result);
-+}
-+
-+
-+int
-+DomEventListener::GetScreenX () {
-+ NPVariant res;
-+ MOON_NPN_GetProperty (npp, eventObj, NPID("screenX"), &res);
-+ int x = NPVARIANT_TO_INT32 (res);
-+ MOON_NPN_ReleaseVariantValue (&res);
-+ return x;
-+}
-+
-+int
-+DomEventListener::GetScreenY () {
-+ NPVariant res;
-+ MOON_NPN_GetProperty (npp, eventObj, NPID("screenY"), &res);
-+ int x = NPVARIANT_TO_INT32 (res);
-+ MOON_NPN_ReleaseVariantValue (&res);
-+ return x;
-+}
-+
-+int
-+DomEventListener::GetClientX () {
-+ NPVariant res;
-+ MOON_NPN_GetProperty (npp, eventObj, NPID("clientX"), &res);
-+ int x = NPVARIANT_TO_INT32 (res);
-+ MOON_NPN_ReleaseVariantValue (&res);
-+ return x;
-+}
-+
-+int
-+DomEventListener::GetClientY () {
-+ NPVariant res;
-+ MOON_NPN_GetProperty (npp, eventObj, NPID("clientY"), &res);
-+ int x = NPVARIANT_TO_INT32 (res);
-+ MOON_NPN_ReleaseVariantValue (&res);
-+ return x;
-+}
-+
-+bool
-+DomEventListener::GetAltKey () {
-+ NPVariant res;
-+ MOON_NPN_GetProperty (npp, eventObj, NPID("altKey"), &res);
-+ bool x = NPVARIANT_TO_BOOLEAN (res);
-+ MOON_NPN_ReleaseVariantValue (&res);
-+ return x;
-+}
-+
-+bool
-+DomEventListener::GetCtrlKey () {
-+ NPVariant res;
-+ MOON_NPN_GetProperty (npp, eventObj, NPID("ctrlKey"), &res);
-+ bool x = NPVARIANT_TO_BOOLEAN (res);
-+ MOON_NPN_ReleaseVariantValue (&res);
-+ return x;
-+}
-+
-+bool
-+DomEventListener::GetShiftKey () {
-+ NPVariant res;
-+ MOON_NPN_GetProperty (npp, eventObj, NPID("shiftKey"), &res);
-+ bool x = NPVARIANT_TO_BOOLEAN (res);
-+ MOON_NPN_ReleaseVariantValue (&res);
-+ return x;
-+}
-+
-+int
-+DomEventListener::GetButton () {
-+ NPVariant res;
-+ MOON_NPN_GetProperty (npp, eventObj, NPID("button"), &res);
-+ int x = NPVARIANT_TO_INT32 (res);
-+ MOON_NPN_ReleaseVariantValue (&res);
-+ return x;
-+}
-+
-+int
-+DomEventListener::GetKeyCode () {
-+ NPVariant res;
-+ MOON_NPN_GetProperty (npp, eventObj, NPID("keyCode"), &res);
-+ int x = NPVARIANT_TO_INT32 (res);
-+ MOON_NPN_ReleaseVariantValue (&res);
-+ return x;
-+}
-+
-+int
-+DomEventListener::GetCharCode () {
-+ NPVariant res;
-+ MOON_NPN_GetProperty (npp, eventObj, NPID("charCode"), &res);
-+ int x = NPVARIANT_TO_INT32 (res);
-+ MOON_NPN_ReleaseVariantValue (&res);
-+ return x;
-+}
-+
-+int
-+DomEventListener::GetType () {
-+ NPVariant res;
-+ MOON_NPN_GetProperty (npp, eventObj, NPID("type"), &res);
-+
-+ int x = Other;
-+ char* type = STR_FROM_VARIANT (res);
-+ if (!strncmp (type, "click", strlen("click")) ||
-+ !strncmp (type, "dblclick", strlen("dblclick")) ||
-+ !strncmp (type, "mouse", strlen("mouse")))
-+ x = Mouse;
-+ else if (!strncmp (type, "key", strlen("key")))
-+ x = Key;
-+ MOON_NPN_ReleaseVariantValue (&res);
-+ return x;
-+}
-+
-+bool
-+DomEventListener::HasMethod (NPIdentifier name) {
-+ if (name == NPID ("handleEvent"))
-+ return true;
-+ return false;
-+}
-+
-+bool
-+DomEventListener::HasProperty (NPIdentifier name) {
-+ return false;
-+}
-+
-+bool
-+DomEventListener::GetProperty (NPIdentifier name, NPVariant *result) {
-+ return false;
-+}
-+
-+bool
-+DomEventListener::Invoke (NPIdentifier name,
-+ const NPVariant *args,
-+ guint32 argCount,
-+ NPVariant *result)
-+{
-+ if (name != NPID ("handleEvent"))
-+ return false;
-+
-+ if (callback == NULL)
-+ return true;
-+
-+ NPVariant res;
-+
-+ eventObj = NPVARIANT_TO_OBJECT(args[0]);
-+ MOON_NPN_RetainObject (eventObj);
-+
-+ MOON_NPN_GetProperty (npp, eventObj, NPID("target"), &res);
-+ eventTarget = NPVARIANT_TO_OBJECT (res);
-+ MOON_NPN_RetainObject (eventTarget);
-+ MOON_NPN_ReleaseVariantValue (&res);
-+
-+ int client_x, client_y, offset_x, offset_y, mouse_button, key_code, char_code;
-+ gboolean alt_key, ctrl_key, shift_key;
-+ client_x = client_y = offset_x = offset_y = mouse_button = 0;
-+ alt_key = ctrl_key = shift_key = FALSE;
-+ key_code = char_code = 0;
-+
-+ int type = GetType ();
-+
-+ if (type == Mouse) {
-+ client_x = GetClientX ();
-+ client_y = GetClientY ();
-+ offset_x = GetScreenX ();
-+ offset_y = GetScreenY ();
-+ offset_x -= client_x;
-+ offset_y -= client_y;
-+ mouse_button = GetButton ();
-+ alt_key = GetAltKey ();
-+ ctrl_key = GetCtrlKey ();
-+ shift_key = GetShiftKey ();
-+ } else if (type == Key) {
-+ key_code = GetKeyCode ();
-+ char_code = GetCharCode ();
-+ if (char_code == 0 && key_code != 0)
-+ char_code = key_code;
-+ alt_key = GetAltKey ();
-+ ctrl_key = GetCtrlKey ();
-+ shift_key = GetShiftKey ();
-+ }
-+
-+ MOON_NPN_GetProperty (npp, eventObj, NPID("type"), &res);
-+ char *t = STRDUP_FROM_VARIANT(res);
-+ MOON_NPN_ReleaseVariantValue (&res);
-+
-+ callback (context, t, client_x, client_y, offset_x, offset_y,
-+ alt_key, ctrl_key, shift_key, mouse_button, key_code, char_code, eventTarget);
-+
-+
-+ return true;
-+}
-Index: moonlight-2.1/plugin/plugin-class.cpp
-===================================================================
---- moonlight-2.1.orig/plugin/plugin-class.cpp 2010-02-16 20:03:55.000000000 +0000
-+++ moonlight-2.1/plugin/plugin-class.cpp 2010-02-17 20:26:24.000000000 +0000
-@@ -17,7 +17,6 @@
-
- #include "plugin-class.h"
- #include "plugin-accessibility.h"
--#include "browser-bridge.h"
- #include "plugin.h"
- #include "deployment.h"
- #include "bitmapimage.h"
-@@ -5196,28 +5195,16 @@
- return ret;
- }
-
--const char *
--html_get_element_text (PluginInstance *plugin, const char *element_id)
--{
-- if (!plugin->GetBridge())
-- return NULL;
-- return plugin->GetBridge()->HtmlElementGetText(plugin->GetInstance(), element_id);
--}
--
- gpointer
- html_object_attach_event (PluginInstance *plugin, NPObject *npobj, char *name, callback_dom_event *cb, gpointer context)
- {
-- if (!plugin->GetBridge())
-- return NULL;
-- return plugin->GetBridge()->HtmlObjectAttachEvent (plugin->GetInstance(), npobj, name, cb, context);
-+ return plugin->HtmlObjectAttachEvent (plugin->GetInstance(), npobj, name, cb, context);
- }
-
- void
- html_object_detach_event (PluginInstance *plugin, const char *name, gpointer listener_ptr)
- {
-- if (!plugin->GetBridge())
-- return;
-- plugin->GetBridge()->HtmlObjectDetachEvent (plugin->GetInstance(), name, listener_ptr);
-+ return plugin->HtmlObjectDetachEvent (plugin->GetInstance(), name, listener_ptr);
- }
-
- struct release_data {
-Index: moonlight-2.1/plugin/firefox/ff36/ff36-bridge.cpp
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ moonlight-2.1/plugin/firefox/ff36/ff36-bridge.cpp 2010-02-17 20:26:24.000000000 +0000
-@@ -0,0 +1,25 @@
-+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-+/*
-+ * ff36-bridge.cpp: Firefox 3.6.x bridge
-+ *
-+ * Contact:
-+ * Moonlight List (moonlight-list at lists.ximian.com)
-+ *
-+ * Copyright 2010 Novell, Inc. (http://www.novell.com)
-+ *
-+ * See the LICENSE file included with the distribution for details.
-+ *
-+ */
-+
-+#include "plugin.h"
-+
-+#include "ff36-bridge.h"
-+
-+FF36BrowserBridge::FF36BrowserBridge ()
-+{
-+}
-+
-+BrowserBridge* CreateBrowserBridge ()
-+{
-+ return new FF36BrowserBridge ();
-+}
-Index: moonlight-2.1/plugin/firefox/ff36/ff36-http.cpp
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ moonlight-2.1/plugin/firefox/ff36/ff36-http.cpp 2010-02-17 20:26:24.000000000 +0000
-@@ -0,0 +1,30 @@
-+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-+/*
-+ * ff36-http.cpp: Firefox 3.6.x bridge
-+ *
-+ * Contact:
-+ * Moonlight List (moonlight-list at lists.ximian.com)
-+ *
-+ * Copyright 2010 Novell, Inc. (http://www.novell.com)
-+ *
-+ * See the LICENSE file included with the distribution for details.
-+ *
-+ */
-+
-+// define this here so that protypes.h isn't included (and doesn't
-+// muck with our npapi.h)
-+#define NO_NSPR_10_SUPPORT
-+
-+#include "plugin.h"
-+
-+#include "ff36-bridge.h"
-+
-+#define CONCAT(x,y) x##y
-+#define GECKO_SYM(x) CONCAT(FF36,x)
-+#include "../browser-http.inc"
-+
-+DownloaderRequest*
-+FF36BrowserBridge::CreateDownloaderRequest (const char *method, const char *uri, bool disable_cache)
-+{
-+ return new FF36DownloaderRequest (method, uri, disable_cache);
-+}
-Index: moonlight-2.1/plugin/firefox/ff36/ff36-bridge.h
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ moonlight-2.1/plugin/firefox/ff36/ff36-bridge.h 2010-02-17 20:26:24.000000000 +0000
-@@ -0,0 +1,26 @@
-+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-+/*
-+ * ff36-bridge.h: Firefox 3.6.x bridge
-+ *
-+ * Contact:
-+ * Moonlight List (moonlight-list at lists.ximian.com)
-+ *
-+ * Copyright 2010 Novell, Inc. (http://www.novell.com)
-+ *
-+ * See the LICENSE file included with the distribution for details.
-+ *
-+ */
-+
-+#ifndef FF3_BRIDGE
-+#define FF3_BRIDGE
-+
-+#include "browser-bridge.h"
-+
-+class FF36BrowserBridge : public BrowserBridge {
-+ public:
-+ FF36BrowserBridge ();
-+
-+ virtual DownloaderRequest* CreateDownloaderRequest (const char *method, const char *uri, bool disable_cache);
-+};
-+
-+#endif // FF3_BRIDGE
-Index: moonlight-2.1/plugin/firefox/ff36/Makefile.am
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ moonlight-2.1/plugin/firefox/ff36/Makefile.am 2010-02-17 20:26:24.000000000 +0000
-@@ -0,0 +1,29 @@
-+
-+INCLUDES = \
-+ -I$(top_srcdir)/src \
-+ -I$(top_srcdir)/src/asf \
-+ -I$(top_srcdir)/src/pal \
-+ -I$(top_srcdir)/plugin \
-+ -I$(top_srcdir)/plugin/moz-sdk \
-+ -I/usr/include/X11 \
-+ $(FF36_CFLAGS) \
-+ $(MOON_CFLAGS) \
-+ -DWITH_LIBXUL_UNSTABLE \
-+ -Wall
-+
-+pluginlibdir=$(pkglibdir)/plugin
-+pluginlib_LTLIBRARIES = libmoonplugin-ff36bridge.la
-+noinst_LTLIBRARIES = libmoonpluginxpi-ff36bridge.la
-+
-+
-+libmoonplugin_ff36bridge_la_SOURCES= ff36-bridge.cpp \
-+ ff36-bridge.h \
-+ ff36-http.cpp \
-+ ../ff-common.h
-+
-+libmoonplugin_ff36bridge_la_LDFLAGS=-module -avoid-version
-+libmoonplugin_ff36bridge_la_LIBADD=$(FF36_LIBS) ../../libmoonplugin.la ../../../src/libmoon.la
-+
-+libmoonpluginxpi_ff36bridge_la_SOURCES = $(libmoonplugin_ff36bridge_la_SOURCES)
-+libmoonpluginxpi_ff36bridge_la_LDFLAGS = $(libmoonplugin_ff36bridge_la_LDFLAGS) -rpath /nowhere
-+libmoonpluginxpi_ff36bridge_la_LIBADD = $(FF36_LIBS) ../../libmoonpluginxpi.la
-Index: moonlight-2.1/plugin/firefox/Makefile.am
-===================================================================
---- moonlight-2.1.orig/plugin/firefox/Makefile.am 2010-02-16 20:03:55.000000000 +0000
-+++ moonlight-2.1/plugin/firefox/Makefile.am 2010-02-17 20:26:24.000000000 +0000
-@@ -5,5 +5,8 @@
- if HAVE_GECKO_1_9
- SUBDIRS += ff3
- endif
-+if HAVE_GECKO_1_9_2
-+SUBDIRS += ff36
-+endif
-
- EXTRA_DIST = browser-http.inc ff-common.h
-Index: moonlight-2.1/plugin/firefox/ff2/ff2-dom.cpp
-===================================================================
---- moonlight-2.1.orig/plugin/firefox/ff2/ff2-dom.cpp 2010-02-16 20:03:55.000000000 +0000
-+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
-@@ -1,327 +0,0 @@
--/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
--/*
-- * ff2-dom.cpp: Firefox 2.x DOM wrapper
-- *
-- * Contact:
-- * Moonlight List (moonlight-list at lists.ximian.com)
-- *
-- * Copyright 2007 Novell, Inc. (http://www.novell.com)
-- *
-- * See the LICENSE file included with the distribution for details.
-- *
-- */
--
--#include "../ff-common.h"
--#include "plugin.h"
--
--#include "ff2-bridge.h"
--
--// this is the only one that differs between ff2 and ff3
--#include <dom/nsIDOMKeyEvent.h>
--
--class FF2DomEventWrapper : public nsIDOMEventListener {
--
-- NS_DECL_ISUPPORTS
-- NS_DECL_NSIDOMEVENTLISTENER
--
-- public:
--
-- FF2DomEventWrapper () {
-- callback = NULL;
--
-- NS_INIT_ISUPPORTS ();
-- }
--
-- callback_dom_event *callback;
-- nsCOMPtr<nsIDOMEventTarget> target;
-- gpointer context;
-- NPP npp;
--};
--
--NS_IMPL_ISUPPORTS1(FF2DomEventWrapper, nsIDOMEventListener)
--
--NS_IMETHODIMP
--FF2DomEventWrapper::HandleEvent (nsIDOMEvent *aDOMEvent)
--{
-- int client_x, client_y, offset_x, offset_y, mouse_button, key_code, char_code;
-- gboolean alt_key, ctrl_key, shift_key;
-- nsString str_event;
--
-- if (callback == NULL)
-- return NS_OK;
--
-- aDOMEvent->GetType (str_event);
--
-- client_x = client_y = offset_x = offset_y = mouse_button = 0;
-- alt_key = ctrl_key = shift_key = FALSE;
-- key_code = char_code = 0;
--
-- FFDomEvent *obj = (FFDomEvent *) MOON_NPN_CreateObject (npp, FFDomEventClass);
-- obj->event = aDOMEvent;
--
-- nsCOMPtr<nsIDOMMouseEvent> mouse_event = do_QueryInterface (aDOMEvent);
-- if (mouse_event != nsnull) {
-- int screen_x, screen_y;
--
-- mouse_event->GetScreenX (&screen_x);
-- mouse_event->GetScreenY (&screen_y);
--
-- mouse_event->GetClientX (&client_x);
-- mouse_event->GetClientY (&client_y);
--
-- offset_x = screen_x - client_x;
-- offset_y = screen_y - client_y;
--
-- mouse_event->GetAltKey (&alt_key);
-- mouse_event->GetCtrlKey (&ctrl_key);
-- mouse_event->GetShiftKey (&shift_key);
--
-- PRUint16 umouse_button;
-- mouse_event->GetButton (&umouse_button);
-- mouse_button = umouse_button;
-- }
--
-- nsCOMPtr<nsIDOMKeyEvent> key_event = do_QueryInterface (aDOMEvent);
-- if (key_event != nsnull) {
-- PRUint32 ukey_code, uchar_code;
--
-- key_event->GetKeyCode (&ukey_code);
-- key_event->GetCharCode (&uchar_code);
--
-- key_code = ukey_code;
-- char_code = uchar_code;
--
-- if (char_code == 0 && key_code != 0)
-- char_code = key_code;
--
-- key_event->GetAltKey (&alt_key);
-- key_event->GetCtrlKey (&ctrl_key);
-- key_event->GetShiftKey (&shift_key);
-- }
--
-- callback (context, strdup (NS_ConvertUTF16toUTF8 (str_event).get ()), client_x, client_y, offset_x, offset_y,
-- alt_key, ctrl_key, shift_key, mouse_button, key_code, char_code, obj);
--
-- return NS_OK;
--}
--
--static nsCOMPtr<nsIDOMDocument>
--ff2_get_dom_document (NPP npp)
--{
-- nsCOMPtr<nsIDOMWindow> dom_window;
-- MOON_NPN_GetValue (npp, NPNVDOMWindow, NS_STATIC_CAST(nsIDOMWindow **, getter_AddRefs(dom_window)));
-- if (!dom_window) {
-- d(printf("No DOM window available\n"));
-- return NULL;
-- }
--
-- nsCOMPtr<nsIDOMDocument> dom_document;
-- dom_window->GetDocument (getter_AddRefs (dom_document));
-- if (dom_document == nsnull) {
-- d(printf ("No DOM document available\n"));
-- return NULL;
-- }
--
-- return dom_document;
--}
--
--FF2BrowserBridge::FF2BrowserBridge ()
--{
-- FFDomEventClass = new FFDomEventType ();
--}
--
--const char*
--FF2BrowserBridge::HtmlElementGetText (NPP npp, const char *element_id)
--{
-- nsresult rv = NS_OK;
--
-- nsCOMPtr<nsIDOMDocument> document;
-- document = ff2_get_dom_document (npp);
-- if (!document)
-- return NULL;
--
-- nsString ns_id = NS_ConvertUTF8toUTF16 (element_id, strlen (element_id));
-- nsCOMPtr<nsIDOMElement> element;
-- rv = document->GetElementById (ns_id, getter_AddRefs (element));
-- if (NS_FAILED (rv) || element == NULL)
-- return NULL;
--
-- nsCOMPtr<nsIDOMDocument> owner;
-- element->GetOwnerDocument (getter_AddRefs (owner));
--
-- nsCOMPtr<nsIDOMDocumentRange> doc_range = do_QueryInterface (owner);
-- if (!doc_range)
-- return NULL;
--
-- nsCOMPtr<nsIDOMRange> range;
-- doc_range->CreateRange (getter_AddRefs (range));
-- if (!range)
-- return NULL;
--
-- range->SelectNodeContents (element);
--
-- nsString text;
-- range->ToString (text);
-- return g_strdup (NS_ConvertUTF16toUTF8 (text).get ());
--}
--
--gpointer
--FF2BrowserBridge::HtmlObjectAttachEvent (NPP npp, NPObject *npobj, const char *name, callback_dom_event cb, gpointer context)
--{
-- nsresult rv;
-- NPVariant npresult;
-- NPIdentifier id_identifier = MOON_NPN_GetStringIdentifier ("id");
-- nsCOMPtr<nsISupports> item;
--
-- MOON_NPN_GetProperty (npp, npobj, id_identifier, &npresult);
--
-- if (NPVARIANT_IS_STRING (npresult) && strlen (STR_FROM_VARIANT (npresult)) > 0) {
-- NPString np_id = NPVARIANT_TO_STRING (npresult);
--
-- nsString ns_id = NS_ConvertUTF8toUTF16 (np_id.utf8characters, strlen (np_id.utf8characters));
-- nsCOMPtr<nsIDOMDocument> dom_document = ff2_get_dom_document (npp);
-- if (dom_document == nsnull) {
-- // we can get a NULL value when we navigate away from a page
-- return NULL;
-- }
--
-- nsCOMPtr<nsIDOMElement> element;
-- rv = dom_document->GetElementById (ns_id, getter_AddRefs (element));
-- if (NS_FAILED (rv) || element == nsnull) {
-- return NULL;
-- }
--
-- item = element;
-- } else {
-- NPObject *window = NULL;
-- MOON_NPN_GetValue (npp, NPNVWindowNPObject, &window);
--
-- if (window && npobj->_class == window->_class) {
-- MOON_NPN_GetValue (npp, NPNVDOMWindow, NS_STATIC_CAST (nsISupports **, getter_AddRefs (item)));
-- } else {
-- NPVariant docresult;
-- NPIdentifier document_identifier = MOON_NPN_GetStringIdentifier ("document");
--
-- MOON_NPN_GetProperty (npp, window, document_identifier, &docresult);
--
-- if (npobj == NPVARIANT_TO_OBJECT (docresult)) {
-- item = ff2_get_dom_document (npp);
-- } else {
-- const char *temp_id = "__moonlight_temp_id";
-- NPVariant npvalue;
--
-- string_to_npvariant (temp_id, &npvalue);
-- MOON_NPN_SetProperty (npp, npobj, id_identifier, &npvalue);
-- MOON_NPN_ReleaseVariantValue (&npvalue);
--
-- nsString ns_id = NS_ConvertUTF8toUTF16 (temp_id, strlen (temp_id));
-- nsCOMPtr<nsIDOMDocument> dom_document = ff2_get_dom_document (npp);
-- if (dom_document == nsnull) {
-- // we can get a NULL value when we navigate away from a page
-- return NULL;
-- }
--
-- nsCOMPtr<nsIDOMElement> element;
-- dom_document->GetElementById (ns_id, getter_AddRefs (element));
-- if (element == nsnull) {
-- d(printf ("Unable to find temp_id element\n"));
-- return NULL;
-- }
--
-- item = element;
--
-- // reset to it's original empty value
-- MOON_NPN_SetProperty (npp, npobj, id_identifier, &npresult);
-- }
-- }
-- }
--
-- nsCOMPtr<nsIDOMEventTarget> target = do_QueryInterface (item);
--
-- FF2DomEventWrapper *wrapper = new FF2DomEventWrapper ();
-- wrapper->callback = cb;
-- wrapper->target = target;
-- wrapper->context = context;
-- wrapper->npp = npp;
--
-- rv = target->AddEventListener (NS_ConvertUTF8toUTF16 (name, strlen (name)), wrapper, PR_TRUE);
--
-- return wrapper;
--}
--
--void
--FF2BrowserBridge::HtmlObjectDetachEvent (NPP npp, const char *name, gpointer listener_ptr)
--{
-- FF2DomEventWrapper *wrapper = (FF2DomEventWrapper *) listener_ptr;
--
-- wrapper->target->RemoveEventListener (NS_ConvertUTF8toUTF16 (name, strlen (name)), wrapper, PR_TRUE);
-- wrapper->callback = NULL;
--}
--
--static NPObject *
--dom_event_allocate (NPP instance, NPClass *klass)
--{
-- return new FFDomEvent (instance);
--}
--
--FFDomEventType::FFDomEventType ()
--{
-- allocate = dom_event_allocate;
-- AddMapping (dom_event_mapping, G_N_ELEMENTS (dom_event_mapping));
--}
--
--FFDomEventType *FFDomEventClass;
--
--
--bool
--FFDomEvent::GetProperty (int id, NPIdentifier name, NPVariant *result)
--{
-- NULL_TO_NPVARIANT (*result);
--
--#if ds(!)0
-- NPUTF8 *strname = MOON_NPN_UTF8FromIdentifier (name);
-- printf ("getting event property %s\n", strname);
-- MOON_NPN_MemFree (strname);
--#endif
--
-- switch (id) {
-- case MoonId_Detail: {
-- nsCOMPtr<nsIDOMUIEvent> uievent = do_QueryInterface (event);
-- if (uievent) {
-- int detail;
-- uievent->GetDetail (&detail);
-- INT32_TO_NPVARIANT (detail, *result);
-- }
-- return true;
-- }
-- }
--
-- return false;
--}
--
--bool
--FFDomEvent::Invoke (int id, NPIdentifier name,
-- const NPVariant *args, uint32_t argCount, NPVariant *result)
--{
-- NULL_TO_NPVARIANT (*result);
-- ds(printf("FFDomEvent::Invoke\n"));
-- switch (id) {
-- case MoonId_StopPropagation: {
-- if (event) {
-- ds(printf("FFDomEvent::StopPropagation\n"));
-- event->StopPropagation ();
-- }
-- return true;
-- }
-- case MoonId_PreventDefault: {
-- if (event) {
-- ds(printf("FFDomEvent::PreventDefault\n"));
-- event->PreventDefault ();
-- }
-- return true;
-- }
-- default: {
-- return MoonlightObject::Invoke (id, name, args, argCount, result);
-- }
-- }
--}
-Index: moonlight-2.1/plugin/firefox/ff2/ff2-bridge.cpp
-===================================================================
---- moonlight-2.1.orig/plugin/firefox/ff2/ff2-bridge.cpp 2010-02-16 20:03:55.000000000 +0000
-+++ moonlight-2.1/plugin/firefox/ff2/ff2-bridge.cpp 2010-02-17 20:26:24.000000000 +0000
-@@ -15,6 +15,10 @@
-
- #include "ff2-bridge.h"
-
-+FF2BrowserBridge::FF2BrowserBridge ()
-+{
-+}
-+
- BrowserBridge* CreateBrowserBridge ()
- {
- return new FF2BrowserBridge ();
-Index: moonlight-2.1/plugin/firefox/ff2/Makefile.am
-===================================================================
---- moonlight-2.1.orig/plugin/firefox/ff2/Makefile.am 2010-02-16 20:03:55.000000000 +0000
-+++ moonlight-2.1/plugin/firefox/ff2/Makefile.am 2010-02-17 20:26:24.000000000 +0000
-@@ -15,7 +15,6 @@
-
- libmoonplugin_ff2bridge_la_SOURCES= ff2-bridge.cpp \
- ff2-bridge.h \
-- ff2-dom.cpp \
- ff2-http.cpp \
- ../ff-common.h
-
-Index: moonlight-2.1/plugin/firefox/ff2/ff2-bridge.h
-===================================================================
---- moonlight-2.1.orig/plugin/firefox/ff2/ff2-bridge.h 2010-02-16 20:03:55.000000000 +0000
-+++ moonlight-2.1/plugin/firefox/ff2/ff2-bridge.h 2010-02-17 20:26:24.000000000 +0000
-@@ -21,10 +21,6 @@
- public:
- FF2BrowserBridge ();
-
-- virtual const char *HtmlElementGetText (NPP npp, const char *element_id);
-- virtual gpointer HtmlObjectAttachEvent (NPP npp, NPObject *npobj, const char *name, callback_dom_event cb, gpointer context);
-- virtual void HtmlObjectDetachEvent (NPP npp, const char *name, gpointer listener_ptr);
--
- virtual DownloaderRequest* CreateDownloaderRequest (const char *method, const char *uri, bool disable_cache);
- };
-
-Index: moonlight-2.1/plugin/firefox/ff3/ff3-dom.cpp
-===================================================================
---- moonlight-2.1.orig/plugin/firefox/ff3/ff3-dom.cpp 2010-02-16 20:03:55.000000000 +0000
-+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
-@@ -1,327 +0,0 @@
--/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
--/*
-- * ff3-dom.cpp: Firefox 3.x DOM wrapper
-- *
-- * Contact:
-- * Moonlight List (moonlight-list at lists.ximian.com)
-- *
-- * Copyright 2007 Novell, Inc. (http://www.novell.com)
-- *
-- * See the LICENSE file included with the distribution for details.
-- *
-- */
--
--#include "../ff-common.h"
--#include "plugin.h"
--
--#include "ff3-bridge.h"
--
--// this is the only one that differs between ff2 and ff3
--#include <nsIDOMKeyEvent.h>
--
--class FF3DomEventWrapper : public nsIDOMEventListener {
--
-- NS_DECL_ISUPPORTS
-- NS_DECL_NSIDOMEVENTLISTENER
--
-- public:
--
-- FF3DomEventWrapper () {
-- callback = NULL;
--
-- NS_INIT_ISUPPORTS ();
-- }
--
-- callback_dom_event *callback;
-- nsCOMPtr<nsIDOMEventTarget> target;
-- gpointer context;
-- NPP npp;
--};
--
--NS_IMPL_ISUPPORTS1(FF3DomEventWrapper, nsIDOMEventListener)
--
--NS_IMETHODIMP
--FF3DomEventWrapper::HandleEvent (nsIDOMEvent *aDOMEvent)
--{
-- int client_x, client_y, offset_x, offset_y, mouse_button, key_code, char_code;
-- gboolean alt_key, ctrl_key, shift_key;
-- nsString str_event;
--
-- if (callback == NULL)
-- return NS_OK;
--
-- aDOMEvent->GetType (str_event);
--
-- client_x = client_y = offset_x = offset_y = mouse_button = 0;
-- alt_key = ctrl_key = shift_key = FALSE;
-- key_code = char_code = 0;
--
-- FFDomEvent *obj = (FFDomEvent *) MOON_NPN_CreateObject (npp, FFDomEventClass);
-- obj->event = aDOMEvent;
--
-- nsCOMPtr<nsIDOMMouseEvent> mouse_event = do_QueryInterface (aDOMEvent);
-- if (mouse_event != nsnull) {
-- int screen_x, screen_y;
--
-- mouse_event->GetScreenX (&screen_x);
-- mouse_event->GetScreenY (&screen_y);
--
-- mouse_event->GetClientX (&client_x);
-- mouse_event->GetClientY (&client_y);
--
-- offset_x = screen_x - client_x;
-- offset_y = screen_y - client_y;
--
-- mouse_event->GetAltKey (&alt_key);
-- mouse_event->GetCtrlKey (&ctrl_key);
-- mouse_event->GetShiftKey (&shift_key);
--
-- PRUint16 umouse_button;
-- mouse_event->GetButton (&umouse_button);
-- mouse_button = umouse_button;
-- }
--
-- nsCOMPtr<nsIDOMKeyEvent> key_event = do_QueryInterface (aDOMEvent);
-- if (key_event != nsnull) {
-- PRUint32 ukey_code, uchar_code;
--
-- key_event->GetKeyCode (&ukey_code);
-- key_event->GetCharCode (&uchar_code);
--
-- key_code = ukey_code;
-- char_code = uchar_code;
--
-- if (char_code == 0 && key_code != 0)
-- char_code = key_code;
--
-- key_event->GetAltKey (&alt_key);
-- key_event->GetCtrlKey (&ctrl_key);
-- key_event->GetShiftKey (&shift_key);
-- }
--
-- callback (context, strdup (NS_ConvertUTF16toUTF8 (str_event).get ()), client_x, client_y, offset_x, offset_y,
-- alt_key, ctrl_key, shift_key, mouse_button, key_code, char_code, obj);
--
-- return NS_OK;
--}
--
--static nsCOMPtr<nsIDOMDocument>
--ff3_get_dom_document (NPP npp)
--{
-- nsCOMPtr<nsIDOMWindow> dom_window;
-- MOON_NPN_GetValue (npp, NPNVDOMWindow, static_cast<nsIDOMWindow **>(getter_AddRefs(dom_window)));
-- if (!dom_window) {
-- d (printf ("No DOM window available\n"));
-- return NULL;
-- }
--
-- nsCOMPtr<nsIDOMDocument> dom_document;
-- dom_window->GetDocument (getter_AddRefs (dom_document));
-- if (dom_document == nsnull) {
-- d(printf ("No DOM document available\n"));
-- return NULL;
-- }
--
-- return dom_document;
--}
--
--FF3BrowserBridge::FF3BrowserBridge ()
--{
-- FFDomEventClass = new FFDomEventType ();
--}
--
--const char*
--FF3BrowserBridge::HtmlElementGetText (NPP npp, const char *element_id)
--{
-- nsresult rv = NS_OK;
--
-- nsCOMPtr<nsIDOMDocument> document;
-- document = ff3_get_dom_document (npp);
-- if (!document)
-- return NULL;
--
-- nsString ns_id = NS_ConvertUTF8toUTF16 (element_id, strlen (element_id));
-- nsCOMPtr<nsIDOMElement> element;
-- rv = document->GetElementById (ns_id, getter_AddRefs (element));
-- if (NS_FAILED (rv) || element == NULL)
-- return NULL;
--
-- nsCOMPtr<nsIDOMDocument> owner;
-- element->GetOwnerDocument (getter_AddRefs (owner));
--
-- nsCOMPtr<nsIDOMDocumentRange> doc_range = do_QueryInterface (owner);
-- if (!doc_range)
-- return NULL;
--
-- nsCOMPtr<nsIDOMRange> range;
-- doc_range->CreateRange (getter_AddRefs (range));
-- if (!range)
-- return NULL;
--
-- range->SelectNodeContents (element);
--
-- nsString text;
-- range->ToString (text);
-- return g_strdup (NS_ConvertUTF16toUTF8 (text).get ());
--}
--
--gpointer
--FF3BrowserBridge::HtmlObjectAttachEvent (NPP npp, NPObject *npobj, const char *name, callback_dom_event cb, gpointer context)
--{
-- nsresult rv;
-- NPVariant npresult;
-- NPIdentifier id_identifier = MOON_NPN_GetStringIdentifier ("id");
-- nsCOMPtr<nsISupports> item;
--
-- MOON_NPN_GetProperty (npp, npobj, id_identifier, &npresult);
--
-- if (NPVARIANT_IS_STRING (npresult) && strlen (STR_FROM_VARIANT (npresult)) > 0) {
-- NPString np_id = NPVARIANT_TO_STRING (npresult);
--
-- nsString ns_id = NS_ConvertUTF8toUTF16 (np_id.utf8characters, strlen (np_id.utf8characters));
-- nsCOMPtr<nsIDOMDocument> dom_document = ff3_get_dom_document (npp);
-- if (dom_document == nsnull) {
-- // we can get a NULL value when we navigate away from a page
-- return NULL;
-- }
--
-- nsCOMPtr<nsIDOMElement> element;
-- rv = dom_document->GetElementById (ns_id, getter_AddRefs (element));
-- if (NS_FAILED (rv) || element == nsnull) {
-- return NULL;
-- }
--
-- item = element;
-- } else {
-- NPObject *window = NULL;
-- MOON_NPN_GetValue (npp, NPNVWindowNPObject, &window);
--
-- if (window && npobj->_class == window->_class) {
-- MOON_NPN_GetValue (npp, NPNVDOMWindow, static_cast<nsISupports **>(getter_AddRefs (item)));
-- } else {
-- NPVariant docresult;
-- NPIdentifier document_identifier = MOON_NPN_GetStringIdentifier ("document");
--
-- MOON_NPN_GetProperty (npp, window, document_identifier, &docresult);
--
-- if (npobj == NPVARIANT_TO_OBJECT (docresult)) {
-- item = ff3_get_dom_document (npp);
-- } else {
-- const char *temp_id = "__moonlight_temp_id";
-- NPVariant npvalue;
--
-- string_to_npvariant (temp_id, &npvalue);
-- MOON_NPN_SetProperty (npp, npobj, id_identifier, &npvalue);
-- MOON_NPN_ReleaseVariantValue (&npvalue);
--
-- nsString ns_id = NS_ConvertUTF8toUTF16 (temp_id, strlen (temp_id));
-- nsCOMPtr<nsIDOMDocument> dom_document = ff3_get_dom_document (npp);
-- if (dom_document == nsnull) {
-- // we can get a NULL value when we navigate away from a page
-- return NULL;
-- }
--
-- nsCOMPtr<nsIDOMElement> element;
-- dom_document->GetElementById (ns_id, getter_AddRefs (element));
-- if (element == nsnull) {
-- d(printf ("Unable to find temp_id element\n"));
-- return NULL;
-- }
--
-- item = element;
--
-- // reset to it's original empty value
-- MOON_NPN_SetProperty (npp, npobj, id_identifier, &npresult);
-- }
-- }
-- }
--
-- nsCOMPtr<nsIDOMEventTarget> target = do_QueryInterface (item);
--
-- FF3DomEventWrapper *wrapper = new FF3DomEventWrapper ();
-- wrapper->callback = cb;
-- wrapper->target = target;
-- wrapper->context = context;
-- wrapper->npp = npp;
--
-- rv = target->AddEventListener (NS_ConvertUTF8toUTF16 (name, strlen (name)), wrapper, PR_TRUE);
--
-- return wrapper;
--}
--
--void
--FF3BrowserBridge::HtmlObjectDetachEvent (NPP instance, const char *name, gpointer listener_ptr)
--{
-- FF3DomEventWrapper *wrapper = (FF3DomEventWrapper *) listener_ptr;
--
-- wrapper->target->RemoveEventListener (NS_ConvertUTF8toUTF16 (name, strlen (name)), wrapper, PR_TRUE);
-- wrapper->callback = NULL;
--}
--
--static NPObject *
--dom_event_allocate (NPP instance, NPClass *klass)
--{
-- return new FFDomEvent (instance);
--}
--
--FFDomEventType::FFDomEventType ()
--{
-- allocate = dom_event_allocate;
-- AddMapping (dom_event_mapping, G_N_ELEMENTS (dom_event_mapping));
--}
--
--FFDomEventType *FFDomEventClass;
--
--
--bool
--FFDomEvent::GetProperty (int id, NPIdentifier name, NPVariant *result)
--{
-- NULL_TO_NPVARIANT (*result);
--
--#if ds(!)0
-- NPUTF8 *strname = MOON_NPN_UTF8FromIdentifier (name);
-- printf ("getting event property %s\n", strname);
-- MOON_NPN_MemFree (strname);
--#endif
--
-- switch (id) {
-- case MoonId_Detail: {
-- nsCOMPtr<nsIDOMUIEvent> uievent = do_QueryInterface (event);
-- if (uievent) {
-- int detail;
-- uievent->GetDetail (&detail);
-- INT32_TO_NPVARIANT (detail, *result);
-- }
-- return true;
-- }
-- }
--
-- return false;
--}
--
--bool
--FFDomEvent::Invoke (int id, NPIdentifier name,
-- const NPVariant *args, uint32_t argCount, NPVariant *result)
--{
-- NULL_TO_NPVARIANT (*result);
-- ds(printf("FFDomEvent::Invoke\n"));
-- switch (id) {
-- case MoonId_StopPropagation: {
-- if (event) {
-- ds(printf("FFDomEvent::StopPropagation\n"));
-- event->StopPropagation ();
-- }
-- return true;
-- }
-- case MoonId_PreventDefault: {
-- if (event) {
-- ds(printf("FFDomEvent::PreventDefault\n"));
-- event->PreventDefault ();
-- }
-- return true;
-- }
-- default: {
-- return MoonlightObject::Invoke (id, name, args, argCount, result);
-- }
-- }
--}
-Index: moonlight-2.1/plugin/firefox/ff3/Makefile.am
-===================================================================
---- moonlight-2.1.orig/plugin/firefox/ff3/Makefile.am 2010-02-16 20:03:55.000000000 +0000
-+++ moonlight-2.1/plugin/firefox/ff3/Makefile.am 2010-02-17 20:26:24.000000000 +0000
-@@ -17,7 +17,6 @@
-
- libmoonplugin_ff3bridge_la_SOURCES= ff3-bridge.cpp \
- ff3-bridge.h \
-- ff3-dom.cpp \
- ff3-http.cpp \
- ../ff-common.h
-
-Index: moonlight-2.1/plugin/firefox/ff3/ff3-bridge.cpp
-===================================================================
---- moonlight-2.1.orig/plugin/firefox/ff3/ff3-bridge.cpp 2010-02-16 20:03:55.000000000 +0000
-+++ moonlight-2.1/plugin/firefox/ff3/ff3-bridge.cpp 2010-02-17 20:26:24.000000000 +0000
-@@ -15,6 +15,10 @@
-
- #include "ff3-bridge.h"
-
-+FF3BrowserBridge::FF3BrowserBridge ()
-+{
-+}
-+
- BrowserBridge* CreateBrowserBridge ()
- {
- return new FF3BrowserBridge ();
-Index: moonlight-2.1/plugin/firefox/ff3/ff3-bridge.h
-===================================================================
---- moonlight-2.1.orig/plugin/firefox/ff3/ff3-bridge.h 2010-02-16 20:03:55.000000000 +0000
-+++ moonlight-2.1/plugin/firefox/ff3/ff3-bridge.h 2010-02-17 20:26:24.000000000 +0000
-@@ -20,10 +20,6 @@
- public:
- FF3BrowserBridge ();
-
-- virtual const char *HtmlElementGetText (NPP npp, const char *element_id);
-- virtual gpointer HtmlObjectAttachEvent (NPP npp, NPObject *npobj, const char *name, callback_dom_event cb, gpointer context);
-- virtual void HtmlObjectDetachEvent (NPP npp, const char *name, gpointer listener_ptr);
--
- virtual DownloaderRequest* CreateDownloaderRequest (const char *method, const char *uri, bool disable_cache);
- };
-
-Index: moonlight-2.1/plugin/plugin.h
-===================================================================
---- moonlight-2.1.orig/plugin/plugin.h 2010-02-16 20:03:55.000000000 +0000
-+++ moonlight-2.1/plugin/plugin.h 2010-02-17 20:26:24.000000000 +0000
-@@ -25,6 +25,10 @@
- #endif
-
- char *NPN_strdup (const char *val);
-+typedef void callback_dom_event (gpointer context, char *name, int client_x, int client_y, int offset_x, int offset_y, gboolean alt_key,
-+ gboolean ctrl_key, gboolean shift_key, int mouse_button,
-+ int key_code, int char_code,
-+ gpointer domEvent);
-
- class PluginInstance
- {
-@@ -146,7 +150,10 @@
-
- gpointer ManagedCreateXamlLoaderForFile (XamlLoader* loader, const char *resourceBase, const char *file);
- gpointer ManagedCreateXamlLoaderForString (XamlLoader* loader, const char *resourceBase, const char *str);
--
-+
-+ gpointer HtmlObjectAttachEvent (NPP npp, NPObject *npobj, const char *name, callback_dom_event cb, gpointer context);
-+ void HtmlObjectDetachEvent (NPP instance, const char *name, gpointer listener_ptr);
-+
- private:
- #if DEBUG
- List *moon_sources;
-Index: moonlight-2.1/plugin/plugin-domevents.h
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ moonlight-2.1/plugin/plugin-domevents.h 2010-02-17 20:26:24.000000000 +0000
-@@ -0,0 +1,87 @@
-+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-+/*
-+ * ff36-dom.cpp: Firefox 3.6.x DOM wrapper
-+ *
-+ * Contact:
-+ * Moonlight List (moonlight-list at lists.ximian.com)
-+ *
-+ * Copyright 2010 Novell, Inc. (http://www.novell.com)
-+ *
-+ * See the LICENSE file included with the distribution for details.
-+ *
-+ */
-+
-+#ifndef __DOM_EVENTS_H__
-+#define __DOM_EVENTS_H__
-+
-+#include "plugin-class.h"
-+
-+typedef void callback_dom_event (gpointer context, char *name, int client_x, int client_y, int offset_x, int offset_y, gboolean alt_key,
-+ gboolean ctrl_key, gboolean shift_key, int mouse_button,
-+ int key_code, int char_code,
-+ gpointer domEvent);
-+
-+
-+enum EventType {
-+ Mouse,
-+ Key,
-+ Other,
-+};
-+
-+class DomEventListener : public NPObject {
-+
-+ public:
-+ static NPClass DomEventClass;
-+ static DomEventListener *Create(NPP npp, PluginInstance *plugin, const char *name, callback_dom_event* cb, gpointer ctx, NPObject *npobj);
-+ static NPObject *Allocate(NPP npp, NPClass *klass);
-+ static void _Deallocate(NPObject *obj);
-+ static bool _HasMethod(NPObject *obj, NPIdentifier name);
-+ static bool _Invoke(NPObject *obj, NPIdentifier name, const NPVariant *args, uint32_t argCount, NPVariant *result);
-+ static bool _HasProperty(NPObject * obj, NPIdentifier name);
-+ static bool _GetProperty(NPObject *obj, NPIdentifier name, NPVariant *result);
-+
-+ DomEventListener () : callback (0) {}
-+
-+ DomEventListener (NPP instance) : npp (instance),
-+ parent(0), callback(0), context(0),
-+ target(0), eventObj(0), name(0) {}
-+
-+
-+ ~DomEventListener () {}
-+
-+ void Attach ();
-+ void Detach ();
-+
-+ bool HasMethod (NPIdentifier unmapped);
-+ bool Invoke (NPIdentifier name,
-+ const NPVariant *args,
-+ guint32 argCount,
-+ NPVariant *result);
-+ bool HasProperty (NPIdentifier name);
-+ bool GetProperty (NPIdentifier name, NPVariant *result);
-+
-+
-+ int GetScreenX ();
-+ int GetScreenY ();
-+ int GetClientX ();
-+ int GetClientY ();
-+ bool GetAltKey ();
-+ bool GetCtrlKey ();
-+ bool GetShiftKey ();
-+ int GetButton ();
-+ int GetKeyCode ();
-+ int GetCharCode ();
-+ int GetType ();
-+ NPObject* GetTarget ();
-+
-+ NPP npp;
-+ PluginInstance *parent;
-+ callback_dom_event *callback;
-+ gpointer context;
-+ NPObject *target;
-+ NPObject *eventObj;
-+ NPObject *eventTarget;
-+ const char *name;
-+};
-+
-+#endif
-\ No newline at end of file
-Index: moonlight-2.1/plugin/plugin-class.h
-===================================================================
---- moonlight-2.1.orig/plugin/plugin-class.h 2010-02-16 20:03:55.000000000 +0000
-+++ moonlight-2.1/plugin/plugin-class.h 2010-02-17 20:26:24.000000000 +0000
-@@ -1205,15 +1205,6 @@
-
- /*** HtmlObject ***************************************************/
-
--// int clientX, int clientY,
--
--typedef void callback_dom_event (gpointer context, char *name, int client_x, int client_y, int offset_x, int offset_y, gboolean alt_key,
-- gboolean ctrl_key, gboolean shift_key, int mouse_button,
-- int key_code, int char_code,
-- gpointer domEvent);
--
--const char *html_get_element_text (PluginInstance *plugin, const char *element_id);
--
- // These are meant to be called by System.Silverlight.dll
- /* @GeneratePInvoke */
- bool html_object_has_property (PluginInstance *plugin, NPObject *npobj, char *name);
-Index: moonlight-2.1/plugin/browser-bridge.h
-===================================================================
---- moonlight-2.1.orig/plugin/browser-bridge.h 2010-02-16 20:03:55.000000000 +0000
-+++ moonlight-2.1/plugin/browser-bridge.h 2010-02-17 20:26:24.000000000 +0000
-@@ -28,11 +28,6 @@
-
- class BrowserBridge {
- public:
-- // HtmlObject
-- virtual const char *HtmlElementGetText (NPP npp, const char *element_id) = 0;
-- virtual gpointer HtmlObjectAttachEvent (NPP npp, NPObject *npobj, const char *name, callback_dom_event cb, gpointer context) = 0;
-- virtual void HtmlObjectDetachEvent (NPP npp, const char *name, gpointer listener_ptr) = 0;
--
- virtual DownloaderRequest* CreateDownloaderRequest (const char *method, const char *uri, bool disable_cache) = 0;
- };
-
-Index: moonlight-2.1/plugin/Makefile.am
-===================================================================
---- moonlight-2.1.orig/plugin/Makefile.am 2010-02-16 20:03:55.000000000 +0000
-+++ moonlight-2.1/plugin/Makefile.am 2010-02-17 20:26:24.000000000 +0000
-@@ -51,6 +51,8 @@
- plugin.h \
- plugin-accessibility.cpp \
- plugin-accessibility.h \
-+ plugin-domevents.cpp \
-+ plugin-domevents.h \
- plugin-downloader.cpp \
- plugin-downloader.h \
- plugin-entry.cpp \
-Index: moonlight-2.1/configure.ac
-===================================================================
---- moonlight-2.1.orig/configure.ac 2010-02-16 20:05:43.000000000 +0000
-+++ moonlight-2.1/configure.ac 2010-02-17 20:26:24.000000000 +0000
-@@ -134,7 +134,9 @@
-
- DOCDIR=$(pkg-config --variable=sourcesdir monodoc)
-
--if test x$with_ff3 = xyes; then
-+if test x$with_ff36 = xyes; then
-+ MOZILLA_CFLAGS=$FF36_CFLAGS
-+elif test x$with_ff3 = xyes; then
- MOZILLA_CFLAGS=$FF3_CFLAGS
- else
- MOZILLA_CFLAGS=$FF2_CFLAGS
-@@ -211,6 +213,7 @@
- plugin/firefox/Makefile
- plugin/firefox/ff2/Makefile
- plugin/firefox/ff3/Makefile
-+plugin/firefox/ff36/Makefile
- plugin/install/Makefile
- plugin/install/install.rdf
- plugin/test/Makefile
-@@ -282,6 +285,7 @@
- Plugin Installer (.xpi): $user_plugin
- Gecko 1.8 (Firefox 2): $with_ff2 $ff2_reason
- Gecko 1.9 (Firefox 3): $with_ff3 $ff3_reason
-+ Gecko 1.9.2 (Firefox 3.6): $with_ff36 $ff36_reason
- EOF
- fi
-
-Index: moonlight-2.1/plugin/install/Makefile.am
-===================================================================
---- moonlight-2.1.orig/plugin/install/Makefile.am 2010-02-16 20:03:55.000000000 +0000
-+++ moonlight-2.1/plugin/install/Makefile.am 2010-02-17 20:26:24.000000000 +0000
-@@ -79,6 +79,10 @@
- # Rename the bridges to the original names
- cp -L ../firefox/ff2/.libs/libmoonpluginxpi-ff2bridge.so .xpinstall/plugins/moonlight/libmoonplugin-ff2bridge.so
- endif HAVE_GECKO_1_8
-+if HAVE_GECKO_1_9_2
-+# Rename the bridges to the original names
-+ cp -L ../firefox/ff36/.libs/libmoonpluginxpi-ff36bridge.so .xpinstall/plugins/moonlight/libmoonplugin-ff36bridge.so
-+endif HAVE_GECKO_1_9_2
- if HAVE_GECKO_1_9
- # Rename the bridges to the original names
- cp -L ../firefox/ff3/.libs/libmoonpluginxpi-ff3bridge.so .xpinstall/plugins/moonlight/libmoonplugin-ff3bridge.so
diff --git a/debian/patches/series b/debian/patches/series
index 25a665a..73ac86a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1 @@
use_bundled_mono_runtime_for_smcs.patch
-moon_backport_support_for_firefox_3.6_r150505_r151553_r151933.patch
--
moon
More information about the Pkg-mono-svn-commits
mailing list