Obtaining session cookies from a running Mozilla instance

2014-11-30 Thread Florian Weimer
I have various web applications which I want to automate with some
script, but they require complex login procedures which are rather
difficult to implement without a full web browser.

I have discovered a way to extract both long-term and session cookies
from the profile stored on disk (at least on GNU/Linux), and it works
really well with the specific Firefox versions I have tested.  But
this does not really look like stable API.  Is there a better way to
achieve my goal?

I want to avoid bundling a complete Firefox installation with my
automation scripts, I'd rather reuse an existing Firefox installation.
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Issues with chrome.manifest when installed in path having japanese characters

2014-08-14 Thread bhargava . animesh29
I am using gecko SDK 28.0 in my application. When my application is installed 
in path having japanese/korean characters then in my embedded browser nothing 
is shown.We found following error in logs
Could not read chrome manifest 
'file:///C:/Users/an/Elements/main/build/targets/x64/elements2%C3%AF%C2%BE%C5%A0%C3%AF%C2%BD%C2%B7%C3%AF%C2%BE%E2%80%9E%C3%AF%C2%BD%C2%B6%C3%AF%C2%BD%C2%BD%C3%AF%C2%BE%C2%9D%C3%AF%C2%BD%C2%B6%C3%AF%C2%BD%C2%B7.Debug/mozilla/chrome.manifest'.
Could not read chrome manifest 
'file:///C:/Users/an/Elements/main/build/targets/x64/elements2%EF%BE%8A%EF%BD%B7%EF%BE%84%EF%BD%B6%EF%BD%BD%EF%BE%9D%EF%BD%B6%EF%BD%B7.Debug/chrome.manifest'.
The actual path is
'file:///C:/Users/an/Elements/main/build/targets/x64/elements2ハキトカスンカキ.Debug/chrome.manifest'.

Inside the browser complete white screen is shown. I have components that need 
to be registered with chrome.manifest. Since i am getting this error ,  those 
components would also be not registering . May be because of this i am getting 
white screen. Not sure why i am getting this error . I am using VS 2010 and 
character set is multi -byte . I also changed it to unicode but nothing changed.

Please suggest
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: Issues with chrome.manifest when installed in path having japanese characters

2014-08-14 Thread Benjamin Smedberg


On 8/14/2014 7:15 AM, bhargava.animes...@gmail.com wrote:

I am using gecko SDK 28.0 in my application. When my application is installed 
in path having japanese/korean characters then in my embedded browser nothing 
is shown.We found following error in logs
Could not read chrome manifest 
'file:///C:/Users/an/Elements/main/build/targets/x64/elements2%C3%AF%C2%BE%C5%A0%C3%AF%C2%BD%C2%B7%C3%AF%C2%BE%E2%80%9E%C3%AF%C2%BD%C2%B6%C3%AF%C2%BD%C2%BD%C3%AF%C2%BE%C2%9D%C3%AF%C2%BD%C2%B6%C3%AF%C2%BD%C2%B7.Debug/mozilla/chrome.manifest'.
Could not read chrome manifest 
'file:///C:/Users/an/Elements/main/build/targets/x64/elements2%EF%BE%8A%EF%BD%B7%EF%BE%84%EF%BD%B6%EF%BD%BD%EF%BE%9D%EF%BD%B6%EF%BD%B7.Debug/chrome.manifest'.
The actual path is
'file:///C:/Users/an/Elements/main/build/targets/x64/elements2ハキトカスンカキ.Debug/chrome.manifest'.

Inside the browser complete white screen is shown. I have components that need 
to be registered with chrome.manifest. Since i am getting this error ,  those 
components would also be not registering .


This sounds like a bug, although it's not clear where exactly the bug is 
without further debugging. Windows is especially hard in this regard 
because the native codepage is variable and doesn't express the full 
unicode range, so internally we try to use wide characters or UTF8 to 
represent windows paths, but occasionally that fails.


You should file a bug to track the issue, but unless you can construct a 
testcase where this bug affects Firefox, it's likely that you will need 
to do the debugging yourself. cc me on the bug and I can point you to 
the lines of code you should look at in your debugger.


--BDS

___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: Issues with chrome.manifest when installed in path having japanese characters

2014-08-14 Thread bhargava . animesh29

In our code , we are having following snippet :

rv = NS_NewNativeLocalFile(nsEmbedCString((char *)filepath), PR_FALSE, 
getter_AddRefs(libxul)); 
if (NS_FAILED(rv)) 
{ 
throw BALBrowserException();
} 


rv = NS_NewNativeLocalFile( nsEmbedCString((char *)filepath), PR_FALSE, 
getter_AddRefs(appDir)); 
if(NS_FAILED(rv)) 
{ 
throw BALBrowserException();
} 
rv = XRE_InitEmbedding(libxul, appDir, 0); 

rv in each case is NS_OK . After execution of 'XRE_InitEmbedding(libxul, 
appDir, 0); '  we are getting the chrome.manifest error. I have checked 
filepath ( containing japanese characters) , it is correct. 
Is there any other way by which we can register our JS and binary components ? 
I'll log a bug separately and cc you.


___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: Issues with chrome.manifest when installed in path having japanese characters

2014-08-14 Thread Benjamin Smedberg


On 8/14/2014 9:08 AM, bhargava.animes...@gmail.com wrote:

In our code , we are having following snippet :

rv = NS_NewNativeLocalFile(nsEmbedCString((char *)filepath), PR_FALSE, 
getter_AddRefs(libxul));
if (NS_FAILED(rv))
{
throw BALBrowserException();
}


rv = NS_NewNativeLocalFile( nsEmbedCString((char *)filepath), PR_FALSE, 
getter_AddRefs(appDir));
if(NS_FAILED(rv))
{
throw BALBrowserException();
}
rv = XRE_InitEmbedding(libxul, appDir, 0);

rv in each case is NS_OK . After execution of 'XRE_InitEmbedding(libxul, 
appDir, 0); '  we are getting the chrome.manifest error. I have checked 
filepath ( containing japanese characters) , it is correct.


What character set is filepath, and what charset is the native 
filesystem? Note that using narrow char* to store these is inherently 
lossy, and you should probably be using char16_t*/WCHAR* for these so 
that you don't run into issues with unicode repertoire: then you'd be 
using NS_NewLocalFile not NS_NewNativeLocalFile.


--BDS

___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


RE: Issues with chrome.manifest when installed in path having japanese characters

2014-08-14 Thread g4
I am not sure if your problem is identical to one I recently had to solve.
XRE_InitEmbedding2Type on Windows uses ReadDependentCB() and TS_tfopen()
internally (implemented in nsXPCOMGlue.cpp. In the 2 helpers, which both
take char* parameters,  the MultibyteToWideChar conversion used the CP_UTF8
flag. If your path contains MBCS double byte characters then this conversion
will produce garbage. 

The 'fix' I used here was to was to call lcid() to get the current locale
and pass that value to MultibyteToWideChar instead of CP_UTF8. This works
when the correct locale is set (Region  language) but will still fail if
you have mixed DBCS character strings. 

I suspect the right thing to do here is actually modify the embedding API to
use wchar_t for filenames etc, which is how things are (correctly) handled
within  the main codebase.

-Original Message-
From: dev-embedding
[mailto:dev-embedding-bounces+g4=novadsp@lists.mozilla.org] On Behalf Of
bhargava.animes...@gmail.com
Sent: 14 August 2014 14:09
To: dev-embedding@lists.mozilla.org
Subject: Re: Issues with chrome.manifest when installed in path having
japanese characters


In our code , we are having following snippet :

rv = NS_NewNativeLocalFile(nsEmbedCString((char *)filepath), PR_FALSE,
getter_AddRefs(libxul)); 
if (NS_FAILED(rv)) 
{ 
throw BALBrowserException();
} 


rv = NS_NewNativeLocalFile( nsEmbedCString((char *)filepath),
PR_FALSE, getter_AddRefs(appDir)); 
if(NS_FAILED(rv)) 
{ 
throw BALBrowserException();
} 
rv = XRE_InitEmbedding(libxul, appDir, 0); 

rv in each case is NS_OK . After execution of 'XRE_InitEmbedding(libxul,
appDir, 0); '  we are getting the chrome.manifest error. I have checked
filepath ( containing japanese characters) , it is correct. 
Is there any other way by which we can register our JS and binary components
? 
I'll log a bug separately and cc you.


___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


RE: Embedding possible in cocoa app using gecko sdk #28?

2014-08-14 Thread g4
Apologies for the very delayed response. I am interested in embedding on the
Mac. Does anyone have any examples or hints they can share?

TIA.

-Original Message-
From: dev-embedding
[mailto:dev-embedding-bounces+g4=novadsp@lists.mozilla.org] On Behalf Of
ruchin.kansa...@gmail.com
Sent: 14 June 2014 06:50
To: dev-embedding@lists.mozilla.org
Subject: Embedding possible in cocoa app using gecko sdk #28?

I am having a mac os cocoa app which is using gecko sdk 28 for embedding
browser. I am having problems upgrading to sdk version 28. Is the embedding
still supported using XRE_InitEmbedding2 for cocoa applications? I dont see
any example doing this for cocoa app now.
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: Issues with chrome.manifest when installed in path having japanese characters

2014-08-14 Thread Benjamin Smedberg


On 8/14/2014 9:58 AM, g...@novadsp.com wrote:

I am not sure if your problem is identical to one I recently had to solve.
XRE_InitEmbedding2Type on Windows uses ReadDependentCB() and TS_tfopen()
internally (implemented in nsXPCOMGlue.cpp. In the 2 helpers, which both
take char* parameters,  the MultibyteToWideChar conversion used the CP_UTF8
flag. If your path contains MBCS double byte characters then this conversion
will produce garbage.


This is correct and intentional: see the comment at 
http://mxr.mozilla.org/mozilla-central/source/xpcom/build/nsXULAppAPI.h#155


We do this because on Windows the native charset doesn't represent 
unicode. So we use a wmain entry point and wchar, and convert to UTF8 
immediately so that we can use a shared char* interface with all the 
other platforms.


--BDS

___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


RE: Issues with chrome.manifest when installed in path having japanese characters

2014-08-14 Thread g4
 This is correct and intentional: see the comment at

http://mxr.mozilla.org/mozilla-central/source/xpcom/build/nsXULAppAPI.h#155
  We do this because on Windows the native charset doesn't represent
unicode. So we use a wmain entry point and wchar, and convert to UTF8
immediately so that we can use a shared 
 char* interface with all the other platforms.

Indeed, and this behaviour is (probably) the best to adopt. However it is a
problem if the embedder is itself an MBCS application.




___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


How to annonce original mozilla app?

2014-07-29 Thread KUKIMOTO Nobuyuki
Hi all

Would you please let me know how to announce my original mozilla applications 
for world wide moziller.

I developed visual communication platform embedded Gecko.
But I could not find out a suitable MDN group to inform this application.


with regard.



___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Embedding possible in cocoa app using gecko sdk #28?

2014-06-13 Thread ruchin . kansal81
I am having a mac os cocoa app which is using gecko sdk 28 for embedding 
browser. I am having problems upgrading to sdk version 28. Is the embedding 
still supported using XRE_InitEmbedding2 for cocoa applications? I dont see any 
example doing this for cocoa app now.
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Asking a question

2014-05-20 Thread Ofer Ben-Oliel
Hi

I recently subscribed to dev-embedding .
How do I  to ask a question in the forum about printing using XulRunner?
(and why it's complicated to do?)

Thanks

Ofer

Software Developer
Tel:  03-9230686  Ext: 216
E-Mail:  ofe...@stms.co.il mailto:lia...@softov.co.il
www.stms.co.ilhttp://www.softov.co.il/
[cid:image001.png@01CC453F.36AAA130]

___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Embedding Firefox, difficulties and gimmicks

2014-05-02 Thread ingwie2000
Hey everyone.

I signed up for this list, because it was the only one whose description came 
close to what I am trying to do at these days.

A while ago, Github's Atom.io went into private beta, and I was lucky to get an 
invitation. But I am one that likes to explore, so I took it apart and spied at 
its components with arbitary tools like nm, objdump and otool. And it turned 
out, that Github had done something that a few people have been striving to do.

Longer ago, somebody created Appjs, it intended to bring html/js based apps to 
the desktop. It was based off CEF1 and ran rather okay. Not the best 
performance, but okay. Meanwhile, node-webkit was founded, and the both kept 
going...however, Apppjs became deprecated, node-webkit keeps going but stays 
rather non-popular (i have not met a single node-webkit based app, ever).

AppJS was given to me, and a friend and me kept trying ot keep the idea of 
AppJS going. But unfortunately, we ran into a wall: you cant just take a 
browser and expect it to act like a nice frontend for a simple app - thus, 
browsers are large.

So, I learned a lot about browsers, javascript engines, embedding in general 
and build tools...and came to a conclusion that doesnt make me very happy. I 
have to write my own embedding, if I want to get to my aproach, to run html/js 
- possibly PHP - based apps on a desktop, as native as possible.

The past months, I have spend trying out various embeddings - CEF, Chromium 
Content API, dillo... But, i have had a variety of issues. And so I decided to 
take a look at a browser I use at school a lot - and it turns out it can be 
embedded.

So I have the following questions:

- How many, approximately, lines are needed to get a basic browser window set 
up?
- What build system(s) can the embedded parts, and its possible ocmponents, be 
built with?
- What architecture is used - multi process, or multi thread? Especially 
important on OS X, as it is my main development target.
- Can the browser view be used with FLTK, which allows to obtain native window 
handles? I guess on OS X, I could set the contentView of an NSWindow - is this 
guess right?
- How easy is the JS api to inject code into a frame and-
- -is there a way to do inter-frame communication?
- Do custom schemes exist? How are they handled?
- Is request interception possible, to inject a PHP instance for example, to 
evaluate a local PHP file and render the output?
- How large is a basic project with embedded firefox?

And these are just basic questions.

I know, most of you might say goto MDN, but I just want a simple answer. I 
have studdied docs for the past ddozen months and have begun work on a 
meta-project, the Phoenix Engine: http://github.com/Deskshell-Core/PhoenixEngine
So all I want, is a simple answer. If I find it considerable, of course I will 
go and read the docs.

But I have to decide, which browser to embed, which JS engine to support. If I 
have to re-write nodejs' core partialy to port its API, etc etc etc...

Hopefully I am right here, and you can answer my questions :)


Kind regards,
Kevin Ingwersen!
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Embedding Firefox, difficulties and gimmicks

2014-04-30 Thread Kevin Ingwersen
Hey everyone.

I signed up for this list, because it was the only one whose description came 
close to what I am trying to do at these days.

A while ago, Github’s Atom.io went into private beta, and I was lucky to get an 
invitation. But I am one that likes to explore, so I took it apart and spied at 
its components with arbitary tools like nm, objdump and otool. And it turned 
out, that Github had done something that a few people have been striving to do.

Longer ago, somebody created Appjs, it intended to bring html/js based apps to 
the desktop. It was based off CEF1 and ran rather okay. Not the best 
performance, but okay. Meanwhile, node-webkit was founded, and the both kept 
going…however, Apppjs became deprecated, node-webkit keeps going but stays 
rather non-popular (i have not met a single node-webkit based app, ever).

AppJS was given to me, and a friend and me kept trying ot keep the idea of 
AppJS going. But unfortunately, we ran into a wall: you cant just take a 
browser and expect it to act like a nice frontend for a simple app - thus, 
browsers are large.

So, I learned a lot about browsers, javascript engines, embedding in general 
and build tools…and came to a conclusion that doesnt make me very happy. I have 
to write my own embedding, if I want to get to my aproach, to run html/js - 
possibly PHP - based apps on a desktop, as native as possible.

The past months, I have spend trying out various embeddings - CEF, Chromium 
Content API, dillo… But, i have had a variety of issues. And so I decided to 
take a look at a browser I use at school a lot - and it turns out it can be 
embedded.

So I have the following questions:

- How many, approximately, lines are needed to get a basic browser window set 
up?
- What build system(s) can the embedded parts, and its possible ocmponents, be 
built with?
- What architecture is used - multi process, or multi thread? Especially 
important on OS X, as it is my main development target.
- Can the browser view be used with FLTK, which allows to obtain native window 
handles? I guess on OS X, I could set the contentView of an NSWindow - is this 
guess right?
- How easy is the JS api to inject code into a frame and-
- -is there a way to do inter-frame communication?
- Do custom schemes exist? How are they handled?
- Is request interception possible, to inject a PHP instance for example, to 
evaluate a local PHP file and render the output?
- How large is a basic project with embedded firefox?

And these are just basic questions.

I know, most of you might say „goto MDN“, but I just want a simple answer. I 
have studdied docs for the past ddozen months and have begun work on a 
meta-project, the Phoenix Engine: http://github.com/Deskshell-Core/PhoenixEngine
So all I want, is a simple answer. If I find it considerable, of course I will 
go and read the docs.

But I have to decide, which browser to embed, which JS engine to support. If I 
have to re-write nodejs’ core partialy to port its API, etc etc etc…

Hopefully I am right here, and you can answer my questions :)


Kind regards,
Kevin Ingwersen!
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


GeckoFX - How to Highlight a specific HTMLelement ?

2014-04-23 Thread cnhx27
I load HTML document in GeckoFX control. Hovering an HTML element (input, 
select  link) will highlight it with red color, moving mouse out will restore 
it's visual state.

One idea is to use OnPaint event and draw rectangle at mouse coordinate. 
But I do not know how to use this in C# with GeckoFX control.

Any ideas on how to achieve this or to highlight HTML element are welcome. 

Thank you.
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: firefox 29 libxul.so has less symbols in its dynamic symbol table.

2014-04-15 Thread Benjamin Smedberg

On 4/15/2014 2:16 PM, Tom Hindle wrote:


This change means I can no longer use functions like 
JS_ContextIterator from programs dlopenning or linking libxul.so.


On windows I can still use these symbols from xul.dll.

Have these symbols been intentionally hidden on Linux, by some 
mechanism I'm not aware of?


Yes, and we intend to hide them on Windows as well, once we solve linker 
memory issues.


See bug 920731.

--BDS

___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


firefox 29 libxul.so has less symbols in its dynamic symbol table.

2014-04-15 Thread Tom Hindle

Hi,

With firefox 25: (Using Ubuntu 12.04)

Symbols like JS_ContextIterator appear in libxul.so dynamic symbol table.

@:/usr/lib/firefox$ objdump -T ./libxul.so  | grep JS_ContextI
01a0e7d0 gDF .text0038  xul25.0 
_Z18JS_ContextIteratorP9JSRuntimePP9JSContext


However I've noticed with firefox 29 this is no longer the case.

The symbol still show in a non stripped libxul.so

@:obj-i686-pc-linux-gnu/dist/bin$ nm libxul.so  | grep JS_ContextI
01ebea70 t _Z18JS_ContextIteratorP9JSRuntimePP9JSContext

I believe that the lower case 't' (rather than 'T') informs that the 
symbol isn't visible. (Like a 'C' static function).


I notice that JS_ContextIterator still has a JS_PUBLIC_API macro as part 
of its signature. But I'm guessing that 
__attribute__((visibility(default))) isn't having the desired 
effect. I've checked and confirmed that when compiling jsapi.cpp both 
HAVE_VISIBILITY_ATTRIBUTE and EXPORT_JS_API are defined.


This change means I can no longer use functions like JS_ContextIterator 
from programs dlopenning or linking libxul.so.


On windows I can still use these symbols from xul.dll.

Have these symbols been intentionally hidden on Linux, by some mechanism 
I'm not aware of?

Can anyone point me to the cause of these changes?

Thanks
Tom



___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


How can I get Firefox's Add-on Bar height using Javascript?

2014-04-01 Thread isxiriellada
It can be thin or fat depending on whether text is displayed along with icons. 
Is it possible to get the exact height using Javascript?
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: How can I get Firefox's Add-on Bar height using Javascript?

2014-04-01 Thread isxiriellada
On Tuesday, April 1, 2014 2:59:47 PM UTC+3, isxiri...@gmail.com wrote:
 It can be thin or fat depending on whether text is displayed along with 
 icons. 
 
 Is it possible to get the exact height using Javascript?

So, no Firefox developer knows (I wouldn't be surprised)?
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: how to implement nsIWepProgressListener in C++

2014-02-24 Thread Christian Sell
ok, I have finally managed. Heres the code:

//class decl
class LocationListener: public nsIWebProgressListener, public 
nsSupportsWeakReference
{
public:
  LocationListener();
  virtual ~LocationListenerW();
  NS_DECL_ISUPPORTS
  NS_DECL_NSIWEBPROGRESSLISTENER
};

//class impl
NS_IMPL_ISUPPORTS2(LocationListener, nsIWebProgressListener, 
nsISupportsWeakReference)

NS_IMETHODIMP LocationListener::OnXXChange(...)
{
return NS_OK;
}

//and class usage. plistener must be created non-locally
LocationListener * listener = new LocationListener();
nsCOMPtrnsISupports plistener = static_castnsIWebProgressListener 
*(listener);

nsCOMPtrnsIWeakReference weakref = do_GetWeakReference(plistener, retval);
retval = browser-AddWebBrowserListener(weakref, 
NS_GET_IID(nsIWebProgressListener));
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


embedded XULRunner 24: AddonManager not initialized

2014-02-20 Thread Christian Sell
Hello,

after getting components to register successfully in our Java embedded 
XULRunner, I am now dealing with plugins/addons. In particular, we need plugins 
for PDF.

First thing I did was to copy the related executables (DLLs to the plugins 
directory, EXEs to the xulrunner base directory). My initial tests show that 
our PDF plugin (Foxit Reader) works as expected, but flash pages fail to load. 

Also, when invoking the about:plugins page, I get an empty page and see the 
following line in the console output:

[JavaScript Error: NS_ERROR_NOT_INITIALIZED: AddonManager is not initialized 
{file: resource://gre/modules/AddonManager.jsm line: 1784}]

Can anyone explain the details of how to register plugins into an embedded 
XULRunner instance? What about the AddonManager thing?

thanks,
Christian
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: Java: how to use xulrunner to convert html to postscript?

2014-02-20 Thread Christian Sell
we have done something similar, actually also from within SWT/Java. Heres some 
caveats:

1. If you want a version of XULRunner  10, you must move up to at least 
Eclipse 4.4M5. That version supports XULRunner 24. You can, however, manipulate 
your Eclipse target to include the 4.4M5 SWT bundles only

2. your solution won't be able to handle large images/webpages. If the 
generated image in itself will not blow up your app because of memory 
consumption, the conversion to AWT will surely do so.
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


how to implement nsIWepProgressListener in C++

2014-02-20 Thread Christian Sell
Hello,

I have the following class declaration:

class MyLocationListener: public nsIWebProgressListener
{
public:
 MyLocationListener();
 virtual ~MyLocationListener();
 NS_DECL_ISUPPORTS
 NS_DECL_NSIWEBPROGRESSLISTENER
};

and the corresponding implementation. I am using this class in the following 
way:

MyLocationListener * listener = new MyLocationListener();

nsCOMPtrnsIWeakReference weakref = do_GetWeakReference(listener, retval);
CHECKERR();
retval = browser-AddWebBrowserListener(weakref, 
NS_GET_IID(nsIWebProgressListener));
CHECKERR();

however, the do_GetWeakReference call fails with an NS_ERROR_NO_INTERFACE error 
code. Can someone point out to me how to fix that? I tried to add a 
nsIWeakReference superclass to the class decl, including the NS_DECL_xx macros, 
but that yielded compile errors that I was notable to decipher. Maybe someone 
has a quick hint, or link..

TIA,
Christian
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: Java: how to use xulrunner to convert html to postscript?

2014-02-20 Thread Daniel Oliveira
Em quinta-feira, 20 de fevereiro de 2014 14h24min46s UTC-3, Christian Sell  
escreveu:
 we have done something similar, actually also from within SWT/Java. Heres 
 some caveats:
 
 
 
 1. If you want a version of XULRunner  10, you must move up to at least 
 Eclipse 4.4M5. That version supports XULRunner 24. You can, however, 
 manipulate your Eclipse target to include the 4.4M5 SWT bundles only
 
 
 
 2. your solution won't be able to handle large images/webpages. If the 
 generated image in itself will not blow up your app because of memory 
 consumption, the conversion to AWT will surely do so.

I was wrong, this solution can't solve all my problems. I necessary that the 
browser not appear, only need to capture the image, is this possible?
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: Java: how to use xulrunner to convert html to postscript?

2014-02-20 Thread Daniel Oliveira
Em quinta-feira, 20 de fevereiro de 2014 15h39min39s UTC-3, Daniel Oliveira  
escreveu:
 Em quinta-feira, 20 de fevereiro de 2014 14h24min46s UTC-3, Christian Sell  
 escreveu:
 
  we have done something similar, actually also from within SWT/Java. Heres 
  some caveats:
 
  
 
  
 
  
 
  1. If you want a version of XULRunner  10, you must move up to at least 
  Eclipse 4.4M5. That version supports XULRunner 24. You can, however, 
  manipulate your Eclipse target to include the 4.4M5 SWT bundles only
 
  
 
  
 
  
 
  2. your solution won't be able to handle large images/webpages. If the 
  generated image in itself will not blow up your app because of memory 
  consumption, the conversion to AWT will surely do so.
 
 
 
 I was wrong, this solution can't solve all my problems. I necessary that the 
 browser not appear, only need to capture the image, is this possible?

Note: The images are small, I just need to print labels on a Zebra printer
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: Java: how to use xulrunner to convert html to postscript?

2014-02-20 Thread Daniel Oliveira
Em quinta-feira, 20 de fevereiro de 2014 15h54min28s UTC-3, Christian Sell  
escreveu:
 browser.setVisible(false)

browser.setVisible hidden the content, but box window yet appear. maybe 
describing my problem can help them help. I Need  receive labels in html format 
via webservice in a java SE application and print the same in an automated 
fashion by controlling the printing and return if the document is printed or 
not. The problem is to convert the html to a print format that the printer 
accepts, ie, postscript or image.
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: Registering components under XULRunner 24

2014-02-18 Thread mrmagoo4207
! wow all the for ONE little bit of of detail huh? pretty special I can't 
wait to get better at this myself.
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: Registering components under XULRunner 24

2014-02-17 Thread Christian Sell
so I've tried to follow the guide under the URL in my previous mail, but still 
no success.

However, looking at the source code of my component, and the sample code under 
the mentioned URL, I found an import reference to an external file:

Components.utils.import(resource://gre/modules/XPCOMUtils.jsm);

so I decided to check whether that file existed. It turns out that it DOES 
exist in XULRunner 10, but IT DOESN'T EXIST in the XULRunner 24 distro I 
downloaded from the Mozilla site.

I am a little wary about just copying the file over from V10 to V24. Can you 
tell me how to proceed?

thanks,
Chris
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: Registering components under XULRunner 24

2014-02-17 Thread Christian Sell
the AppendRelativePath actually returns an NS_ERROR_UNRECOGNIZED_PATH (never 
checked the return code before)! The file does exist on the filesystem! How in 
the world am I to create the nsIFile object? What is going wrong??
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: Registering components under XULRunner 24

2014-02-17 Thread Christian Sell
replaced the
  
file-AppendRelativePath(NS_LITERAL_STRING(components/components.manifest)); 

with 2 calls:
  retval = file-Append(NS_LITERAL_STRING(components));
  retval = file-Append(NS_LITERAL_STRING(components.manifest));

now the manifest file is detected and parsed, resulting in a Javascript warning

[JavaScript Warning: Trying to re-register CID 
'{e96f8106-a919-4a31-8b44-74bf3e5283ed}' already registered by ...

No additional error messages. When trying to load the component later on, still 
NS_ERROR_FACTORY_NOT_REGISTERED.
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: Registering components under XULRunner 24

2014-02-17 Thread Christian Sell
heres the code that fails to load the component:

 nsCOMPtrnsIRegionCapture regionPrinter;
 retval = servMan-GetServiceByContractID(@mozilla.org/regioncapture;1, 
NS_GET_IID(nsIRegionCapture), getter_AddRefs(regionPrinter));
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: Registering components under XULRunner 24

2014-02-17 Thread Christian Sell
added another line to components.manifest, as mentioned in the referenced 
document:

category profile-after-change RegionCapture @mozilla.org/regioncapture;1

still getting NS_ERROR_FACTORY_NOT_REGISTERED. There are no error messages in 
nsIConsoleService (at least none my listener gets). This is easily the worst 
ordeal I have encountered in a decade. Is there ANYBODY out there who can help??
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: Registering components under XULRunner 24

2014-02-17 Thread Christian Sell
ok, I finally got it registered, there was one change that I had applied to the 
wrong copy of one file. So, in summary, heres the steps I had to go through:

1. create a manifest file with the described entries
2. change the component javascript file and add the generateNSGetFactory thingy
3. steal a copy of the missing XPCOMUtils.jsm file and put it into the 
xulrunner/modules directory
3. when building the path for the ComponentRegistrar, dont use 
AppendRelativePath but rather use one Append call for each path segment

3 days of headbanging are over..
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: Registering components under XULRunner 24

2014-02-17 Thread Benjamin Smedberg

On 2/17/2014 11:07 AM, Christian Sell wrote:

3. steal a copy of the missing XPCOMUtils.jsm file and put it into the 
xulrunner/modules directory
This should not be necessary. The correct location for this file is 
within omni.ja, and it seems to be present in the XR27 release.



3. when building the path for the ComponentRegistrar, dont use 
AppendRelativePath but rather use one Append call for each path segment
AppendRelativePath is supposed to work, but it's possible you ran into 
issues with Windows path separators: you must use backslashes on Windows 
and forward slashes on unixy OSes. Lesson learned, though, always check 
result codes ;-)


--BDS

___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: Registering components under XULRunner 24

2014-02-14 Thread Benjamin Smedberg

On 2/13/2014 1:12 PM, Christian Sell wrote:

doesnt work. I am creating the file like this:

retval = directory-Get(NS_GRE_DIR, NS_GET_IID(nsILocalFile), (void **)greDir);
file-InitWithFile(greDir);
file-AppendRelativePath(NS_LITERAL_STRING(components/components.manifest));

the contents of the components.manifest file are just one line:

interfaces RegionCapture.xpt

I still get NS_ERROR_FACTORY_NOT_REGISTERED when trying to access the component.


That's because the interfaces line only registers the interfaces, not 
the component. To register the component you use something like


http://mxr.mozilla.org/mozilla-central/source/toolkit/components/downloads/nsDownloadManagerUI.manifest

to register the component and contract entries

--BDS

___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: Registering components under XULRunner 24

2014-02-14 Thread Christian Sell
I tried that, too, but it didn't do the job either. However, today I found this 
article: 
https://developer.mozilla.org/en-US/docs/Mozilla/XPCOM/XPCOM_changes_in_Gecko_2.0,
 which seems to indicate that I also have to update the javascript component 
code. I'll do that on monday.

thanks for your help so far,
Chris
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: URGENT! RenderOffScreen replacement in Gecko 1.9

2014-02-13 Thread Christian Sell
doesn't seem to work (or even compile) with recent (=24) XULRunner versions
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Offscreen rendering from C++

2014-02-13 Thread Christian Sell
Hello all,

we are using XULRunner 24 embedded in a Java application through Eclipse SWT. 
We need extended functionality only available through the XPCOM API, and since 
the old JavaXPCOM binding has vanished, we are migrating all code to C++, which 
we access from Java through a narrow JNI API. So far, so good.

Now to the real question: we have a XPCOM component written in Javascript that 
saves the content of a browser window onto disk. We do this using the 
Javascript code shown below:

// create a canvas
var canvas = cwin.document.createElement(canvas);

// get the 2D context and draw everythiong on it
var ctx = canvas.getContext(2d);
ctx.clearRect(0, 0, width, height);
ctx.save();
ctx.drawWindow(cwin, 0, position, width, height, rgb(255,255,255));
ctx.restore();

//and then to disk..

Now I would like to rewrite this in C++, and am mighty stuck. Can someone give 
a hint how to proceed? I have spent a full day browsing the APIs and the web, 
but am not able to figure out how to get to the 2D context thingy and do the 
rest. I have found an old post from 2008 regarding a similar issue, but that 
would not even compile.

I'd be REALLY grateful for hints!

thanks
Christian
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Registering components under XULRunner 24

2014-02-13 Thread Christian Sell
Hello,

me again ;). We are embedding XULRunner in our Java application, using a thin 
integration layer written in C++ that provides extended functionality. We also 
have a XPCOM component written in Javascript, which we previously called though 
JavaXPCOM, and now need to call from C++. However, no matter what I do, I keep 
getting a NS_ERROR_FACTORY_NOT_REGISTERED when issuing the following call:

nsCOMPtrnsIRegionCapture regionPrinter;
retval = servMan-GetServiceByContractID(@mozilla.org/regioncapture;1, 
NS_GET_IID(nsIRegionCapture), getter_AddRefs(regionPrinter));

I have tried adding the .js and .xpt files to the xulrunner components 
subdirectory (which I had to create), added chrome.manifest files pointing to 
the component, and even tried programmatic registration through

nsIComponentRegistrar registrar;
retval = NS_GetComponentRegistrar(getter_AddRefs(registrar));
retval = registrar-AutoRegister(file); 

all to no avail. Can someone point out the missing link?

TIA alot!
Christian
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: Registering components under XULRunner 24

2014-02-13 Thread Benjamin Smedberg

On 2/13/2014 12:31 PM, Christian Sell wrote:

Hello,

me again ;). We are embedding XULRunner in our Java application, using a thin 
integration layer written in C++ that provides extended functionality. We also 
have a XPCOM component written in Javascript, which we previously called though 
JavaXPCOM, and now need to call from C++. However, no matter what I do, I keep 
getting a NS_ERROR_FACTORY_NOT_REGISTERED when issuing the following call:

nsCOMPtrnsIRegionCapture regionPrinter;
retval = servMan-GetServiceByContractID(@mozilla.org/regioncapture;1, 
NS_GET_IID(nsIRegionCapture), getter_AddRefs(regionPrinter));

I have tried adding the .js and .xpt files to the xulrunner components 
subdirectory (which I had to create), added chrome.manifest files pointing to 
the component, and even tried programmatic registration through

nsIComponentRegistrar registrar;
retval = NS_GetComponentRegistrar(getter_AddRefs(registrar));
retval = registrar-AutoRegister(file);


If `file` points to the .manifest file you created, then AutoRegister 
should work. Are you seeing any errors from nsIConsoleService? When we 
adopted manifests I tried to make sure that any parsing errors would 
show up in the Firefox console.


--BDS

___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: Offscreen rendering from C++

2014-02-13 Thread Christian Sell
Hi,

I almost expected this answer. Actually, we already have the working code in a 
Javascript component, which we previously called via JavaXPCOM. Since we are 
now forced to write our own C++ XPCOM access layer, I thought it would make 
sense to also migrate the component code in order to limit the number of 
project languages. I also THOUGHT it could't be difficult. Naive I was.

Another reason for trying the rewrite was the fact that I am not able to get 
the Javascript component registered. See my other post.

Thanks,
Christian

___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: Registering components under XULRunner 24

2014-02-13 Thread Christian Sell
no, file points to the directory where the component resides. I dont know 
where the output from nsIConsoleService goes, as that is maintained by the 
Eclipse/SWT integration. I'll try pointing to the manifest file. Thanks
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: Registering components under XULRunner 24

2014-02-13 Thread Christian Sell
doesnt work. I am creating the file like this:

retval = directory-Get(NS_GRE_DIR, NS_GET_IID(nsILocalFile), (void **)greDir);
file-InitWithFile(greDir);
file-AppendRelativePath(NS_LITERAL_STRING(components/components.manifest));

the contents of the components.manifest file are just one line:

interfaces RegionCapture.xpt

I still get NS_ERROR_FACTORY_NOT_REGISTERED when trying to access the component.

Chris
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: Registering components under XULRunner 24

2014-02-13 Thread Christian Sell
added component and contract entries to the manifest file, still no hope. BTW, 
file-Exists() returns true.

I am out till next week. This was a fruitless day..
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: Deployment of a xulrunner application on MacOSX

2013-09-09 Thread jeremy . huart
Le jeudi 5 septembre 2013 15:36:59 UTC+2, jeh@gmail.com a écrit :
 Hi,
 
 
 
 I'm working on a project using the XULRunner framework. The application is a 
 desktop video player.
 
 The prototype works fine on Windows but we have some troubles to get a 
 functional and installable app on MacOSX using the framework (despite the 
 various posts on the internet).
 
 Could you give me some support on the correct bundle to realize for current 
 MacOS version?
 
 Thanks in advance.

Hi,

Finally I succeeded to obtain an installable app with the following tutorial: 

http://joliclic.free.fr/mozilla/howto/dist-xul-app/en/chapter_4.php#howto_dxr_4.4

In this sample, Firefox is used to launch the xulrunner app.
The application works fine with Firefox 20.0 but doesn't work with Firefox 
23.0. 
Details: My application needs Flash and another third party plugin. The Flash 
plugin is executed  and works in each case. The third party plugin is always 
listed in the plugin manager but it is executed only with Firefox 20.0. (The 
plugin works however with any Firefox version when it is executed in the 
browser). With Firefox 23 the plugin isn't launched (invisible in the task 
manager).

My final goal is to bundle the app with a given version of xulrunnner. I 
modified the sample in order to use a bundle framework but the issue is the 
same with all xulrunner versions: the third party plugin is listed in the 
plugin manager but it isn't launched with the app.

So currently  the only functional case is to launch the app with firefox 20.0 
but it is not suitable for the project. Can anyone help me to get a bundle 
application functional with third party plugin and Flash Player?
Thanks in advance.

___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Deployment of a xulrunner application on MacOSX

2013-09-05 Thread jeh . cf13
Hi,

I'm working on a project using the XULRunner framework. The application is a 
desktop video player.
The prototype works fine on Windows but we have some troubles to get a 
functional and installable app on MacOSX using the framework (despite the 
various posts on the internet).
Could you give me some support on the correct bundle to realize for current 
MacOS version?
Thanks in advance.


___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


using JS_EvaluateUCScriptForPrincipals() in XULRunner 24

2013-08-28 Thread Grant Gayed

Hi all,

The SWT Browser's embedding of XULRunner uses 
JS_EvaluateUCScriptForPrincipals() to evaluate arbitrary JS code in the 
context of a loaded page.  This invocation is preceded by a 
nsIJSContextStack.Push() call to push the JSContext.


As of XULRunner 23 the nsIJSContextStack interface is gone, so I tried 
to just remove our Push() invocation (testing against XULRunner 24b2), 
and the JS_EvaluateUCScriptForPrincipals() call now crashes in 
ScriptSourceObject::create()'s invocation of cx-global(), because the 
JSContext's compartment() resolves to 0.


My question is, does the JSContext's compartment() == 0 indicate that 
not pushing the JSContext is likely the underlying problem?  And if so, 
what is the new way of doing this?  I notice within mozilla code the use 
of AutoPushJSContext, but this is not exported for use by embedders.


Or, if compartment() == 0 does not necessarily point at the JSContext 
not being pushed, does anything in the following sequence seem 
particularly wrong?


securityManager = serviceManager.getByContractID(ScriptSecurityManager)
principal = securityManager.getSystemPrincipal()
sgo = 
webBrowser.QI(nsIInterfaceRequestor).getInterface(nsIScriptGlobalObject)

sgo.EnsureScriptEnvironment()
scriptContext = sgo.getScriptContext()
jsContext = scriptContext.GetNativeContext()
jsPrincipals = principal.getJSPrincipals()
globalJSObject = sgo.GetGlobalJSObject()
JS_EvaluateUCScriptForPrincipals(jsContext, globalJSObject, 
jsPrincipals, ...)


Thank-you in advance,
Grant
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Disabling embedded mozilla window

2013-08-01 Thread BlackOp Hydro
We have an application that has embedded mozilla using geckofx.  Is there a way 
to disable the window so that no clicks, etc will be processed when a user 
visits a webpage.  We just want to show the content of the page with no user 
interaction at all.
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: How to embed Gecko in a Win32 C++ app?

2013-06-12 Thread mhminiblog
On Tuesday, March 5, 2013 9:13:40 PM UTC+8, malashen...@gmail.com wrote:
 пятница, 5 февраля 2010 г., 15:03:34 UTC+4 пользователь Dmitry Dartz написал:
 
  I'm also interested in WebKit samples.
 
  Could you please show the way from say 5000ft hight of view?
 
  Just a direction in which we'd try to go.
 
 
 
 You may see excelent example by B.Fulgham:
 
 https://github.com/bfulgham/CallJS
 
 
 
 Also, you may be interest about WebKit build under VS2010 or 2012, so WebKit 
 still officialy require VS2005. See this:
 
 http://blog.ashodnakashian.com/2012/09/building-webkit-with-vs2012/
 
 http://blog.ashodnakashian.com/2012/01/building-webkit-on-windows-7-with-vs2010/

I compile the CallJS and when executing got error.
This application has failed to start because the application configuration is 
incorrect.
What the matter?
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Building xulrunner with MSVC static runtime libraries?

2013-06-06 Thread g4
Can anyone help?

 

The default build configuration changed in release 20.x to using /MD to
dynamically link to the MSVC runtimes. I can see that USE_STATIC_LIBS still
appears in some of the .mk files. Is this build configuration now
obsolete/unsupported? If not, how is it enabled for nspr, js and friends?

 

Thanks

 

 

___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: מדוע בישראל לא מרוויחים

2013-05-24 Thread ב - המכון לאבחון עסקי us_offi...@bizdiagnosis.com
 

 

שלום. בהמשך לחשיפת מחקרנו בערוץ 10 – 

94 אחוז מהעסקים בישראל לא מרוויחים מספיק

 

במהלך 13 השנים האחרונות, לאחר שבחנו מעל 12 אלף עסקים מכל הסוגים בישראל
ובארצות-הברית, גילינו שעסקים רבים בישראל יכולים היו לעמוד על רווחים כספיים
גבוהים בהרבה, אם לא מספר טעויות שנעשות על ידם.

 

בחג האחרון הוקצו מספר מושבים חינם לסדנא מתנה לבעלי העסקים בישראל, בה יפורטו
כל הטעויות שבגללן רוב בתי העסק בישראל לא מרוויחים מספיק.

 

המרצה הוא מחבר רב המכר האם שווה להיות עצמאי?, יועץ בינלאומי בעל ניסיון
עצום בהגדלת רווחים של עסקים תוך זמן קצר.

 

הסדנא תתקיים ביום שני, 3 ליוני, 17:30 עד 20:00, מול גני-התערוכה.

 

נותרו מספר כרטיסים בודדים. הכניסה לבעלי עסקים ובני משפחותיהם בלבד.

 

הסדנה היא במימון אמריקאי מלא. אין צורך בתשלום, אך מותנית בהרשמה מראש

לקבלת כרטיס כניסה נא להשיב למייל זה עם הפרטים הבאים:

 

שם החברה / העסק: 

שם בעל העסק:

טלפון נייד :

פקס:

אי-מייל :

 

 

 

בברכה,

ראש צוות סניף ארהב.


 

*מספר המקומות מוגבל – נא לא להגיע לפני קבלת אישור מהמשרד בארץ. 

 

 



המכון לאבחון עסקי

Ventura Blvd, Woodland, California  

טלפון סניף ישראל (24 שעות ביממה): 03-7300852 

 

 

 

dev-embedding@lists.mozilla.org - עסק רשום. 

משלוח הזמנה זו נעשה באמצעות ובחסות Business Diagnosis Institute -
לוס-אנג'לס, ארהב. 

ההזמנה נשלחה כשירות לציבור. אין לראות בה פרסומת לשירות כלשהו בתשלום. 

אם ברצונך לקבל מידע בפקס או מייל לגבי שירותים בתשלום, נא לשלוח מכתב זה במייל
חוזר.

אם המכתב הגיע אליך בטעות, או שברצונך לא לקבל מכתבים נוספים נא לשלוח דף זה
חזרה עם המילה מחק בשורת הנושא.   

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 




 

.

 

 

 

 

 

נשלח ל dev-embedding@lists.mozilla.org

___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: Sample Project for OS X and Windows...

2013-04-01 Thread rawberg
I'd be interested in that as well. Did anyone ever find anything?
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


replacement for nsIScriptObjectOwner

2013-03-27 Thread lakshmipriya . bms
Hello,

Our application uses XULRunner 10 for embedding the browser and provide browser 
functionality. There is a problem while moving it to XULRunner 17. The 
nsIScriptObjectOwner interface has been removed, the corresponding bug 
(https://bugzilla.mozilla.org/show_bug.cgi?id=773803) doesn't have any 
information on why and which interface can be used as a replacement.

When nsIScriptObjectOwner.getScriptObject() is called for a script, we create 
and return a new JavaScript Object and define a native function on it. Now that 
the interface has been removed, is there an alternate way to do this?

Thanks in advance for the help,
Lakshmi 

___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Soliciting advice on #650960 (replacement for print progress bars)

2013-02-25 Thread Zack Weinberg
https://bugzilla.mozilla.org/show_bug.cgi?id=650960 seeks to replace the 
existing print progress bars with something that isn't app-modal. 
Ignore musings in the description and first few comments about getting 
rid of them entirely and/or waiting for bug 629500.  The current 
thinking is that we need *some* indication that a print job is in 
progress, because we need to prevent the user from closing the tab or 
window until the print job has been completely handed off to the OS. 
However, the way this is implemented now is inconvenient (it's been 
shoehorned into the nsIWebProgressListener interface, which is not 
really fit for the purpose, and it involves some really icky [that's a 
technical term] back-and-forth between C++ and JS) and app-modal 
anything is Just Wrong.


The existing patches in the bug have been vetoed because doorhanger 
notifications aren't even universally available within Firefox, never 
mind other applications.  I am not aware of any universal alternative, 
and I know very little about XUL.  I *think* that the low-level approach 
in the bug, of firing special chrome events at the window (plus some 
docshell goo to do the actual close suppression), is still viable, and I 
think doorhangers are appropriate for this when they're available.  But 
I would like some help figuring out what a good universal-backstop 
*receiver* of those chrome events would look like, both in UX terms and 
implementation-wise.


Thanks,
zw
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


JS_SetErrorReporter?

2013-02-01 Thread g...@novadsp.com
Any thoughts on how to set up a custom JS error reporter when embedding 
Mozilla via XRE_InitEmbedding2/XPCOM and friends? The problem is getting 
the JSContext - is there a convenient interface/hook?


Thanks.

___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


10.0.4esr release updates

2013-01-29 Thread Chris Alexander
Hi folks

We have a deployment of XULrunner 10.0.4esr within SWT. SWT currently only 
supports v10 of XULrunner, and we were wondering if this version would be 
receiving any updates. We see the corresponding Firefox release has been 
updated, and we have some SWT / XULrunner issues (particularly OS X-related) 
which we would like to try and resolve.

Is there anyone updating v10 of XULrunner, if so, are any builds available 
anywhere?

Cheers

Chris
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


SWT, XULrunner, OS X and mouse hover events

2013-01-29 Thread Chris Alexander
Hi all,

We have an Eclipse SWT (http://www.eclipse.org/swt/) application that makes use 
of several SWT Browser controls, backed by XULrunner 
(https://developer.mozilla.org/en/docs/XULRunner). We are using SWT 4.2 and 
XULrunner 10.0.4esr (the latest release that is supported by SWT).

We are experiencing an issue only on OS X (we have tried every variant of Linux 
and Windows we can reasonably get our hands on). The issue is that within the 
browser window, mouse over and exit events are not triggered unless the element 
is clicked. For example, we have some content that uses Twitter Bootstrap’s 
tooltips (http://twitter.github.com/bootstrap/javascript.html#tooltips) – on 
Windows and Linux these function as expected, but on OS X the popups do not 
appear until the button they are on is clicked, and do not disappear again 
until they are clicked again.

There is an open bug with SWT for this 
(https://bugs.eclipse.org/bugs/show_bug.cgi?id=246830) which references an 
Apple issue, but unfortunately we can’t seem to get access to that issue to see 
its status.

I have created this gist which minimally reproduces the issue: 
https://gist.github.com/4665145 (see notes at bottom for configuration and 
usage).

First of all, we were wondering if anyone has also experienced this issue and 
found a way to fix it. We were also wondering if anyone is able to provide a 
workaround for this issue. I have started to formulate something around using 
SWT’s mouse listeners to track the cursor and trigger the events manually but 
have not made much progress with such an approach.

Any input or suggestions would be very much appreciated.

Chris
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: Embedding with new API (keyboard and mouse Wheel not working)

2013-01-28 Thread janderssen
Please discard, I have figured it out.
Cheers
Jason

On Thursday, 10 January 2013 08:23:39 UTC+10, Jason Anderssen  wrote:
 Hi guys,
 
 
 
 I have been learning how to embed using the newAPI method, and downloaded the 
 win32_test and got it all working (after lots of researching :-) )
 
 Anyhow, after finally all is working, the keyboard does not work with 
 entering data into text fields etc… in a web page, and the mouse wheel is not 
 working?
 
 What must I do to get these to work, or is this still work in progress?
 
 
 
 Thanx in advance for your help
 
 
 
 Jason

___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


ETags and Caching

2013-01-28 Thread janderssen
Hi all,

I have a working embedded gecko browser, however, if I visit my website and 
return the appropriate ETags, everything works as expected, but if I close the 
program containing gecko then reopen it again, and visit the same site, it does 
not get the data from the cache the first time, but instead loads it all from 
the server again, and upon revisiting the site (while keeping the program 
opened) it obeys the etags and retreives from the cache (as I was expecting it 
too).

I have been debugging deep inside of the code of gecko (lots of fun, and 
learning lots about how a browser like this is written) but was hoping someone 
may have the answer for me sooner than it will take me to figure it all out.

Any ideas ?

Thanx in advance
Jason Anderssen
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Embedding with new API (keyboard and mouse Wheel not working)

2013-01-09 Thread Jason Anderssen
Hi guys,

I have been learning how to embed using the newAPI method, and downloaded the 
win32_test and got it all working (after lots of researching :-) )
Anyhow, after finally all is working, the keyboard does not work with entering 
data into text fields etc… in a web page, and the mouse wheel is not working?
What must I do to get these to work, or is this still work in progress?

Thanx in advance for your help

Jason

___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


System calls from Mozilla Gecko environment

2012-12-09 Thread Madhavan Malolan
Hi i am new to Gecko and i am developing a small application.
I wanted to know if it is possible to have system calls from the Gecko 
Environment.
If yes, how?
Also could you please give me a good pointer to documentation of File I/O in 
Gecko.

Regards,
Madhavan
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: Problems using NS_InitXPCOM2 from xulrunner 13 and later

2012-11-22 Thread adamdickmeiss

 Just link with:
 
 
 
 `pkg-config --libs libxul` -Wl,--whole-archive -lmozglue -lmemory 
 -Wl,--no-whole-archive
 
 
 
 This solved the problem for me recently.

Works for me too. Thanks.
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: Problems using NS_InitXPCOM2 from xulrunner 13 and later

2012-11-07 Thread Zoltan Boszormenyi
2012. november 5., hétfő 19:58:08 UTC+1 időpontban adamdi...@gmail.com a 
következőt írta:
 I'm trying to get NS_InitXPCOM2 to work . I have linked against xulrunner 
 SDK's 10, 12, 13, 16 and 17. We also have other programs using 
 XRE_InitEmbedding2, but the point of failure is the same.
 
 
 
 #include stdio.h
 
 #include nsIServiceManager.h
 
 #include nsXPCOM.h
 
 #include nsCOMPtr.h
 
 
 
 int main(int argc, char **argv)
 
 {
 
 nsresult rv;
 
 
 
 nsCOMPtrnsIServiceManager servMan;
 
 #if MOZ_MAJOR  16
 
 rv = NS_InitXPCOM2(getter_AddRefs(servMan), nullptr, nullptr);
 
 #else
 
 rv = NS_InitXPCOM2(getter_AddRefs(servMan), nsnull, nsnull);
 
 #endif
 
 if (NS_FAILED(rv))
 
 {
 
 printf(NS_InitXPCOM2 failed . rv=%08x, (int) rv);
 
 return 1;
 
 }
 
 return 0;
 
 }
 
 
 
 
 
 adam@curry:~/proj/cf/engine/src$ gdb ./embed_test 
 
 GNU gdb (GDB) 7.0.1-debian
 
 Copyright (C) 2009 Free Software Foundation, Inc.
 
 License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
 
 This is free software: you are free to change and redistribute it.
 
 There is NO WARRANTY, to the extent permitted by law.  Type show copying
 
 and show warranty for details.
 
 This GDB was configured as x86_64-linux-gnu.
 
 For bug reporting instructions, please see:
 
 http://www.gnu.org/software/gdb/bugs/...
 
 Reading symbols from /home/adam/proj/cf/engine/src/embed_test...done.
 
 (gdb) run
 
 Starting program: /home/adam/proj/cf/engine/src/embed_test 
 
 [Thread debugging using libthread_db enabled]
 
 [New Thread 0x7fffeb690700 (LWP 11054)]
 
 [New Thread 0x7fffeae8f700 (LWP 11055)]
 
 
 
 Program received signal SIGSEGV, Segmentation fault.
 
 0x in ?? ()
 
 (gdb) bt
 
 #0  0x in ?? ()
 
 #1  0x7322f613 in PL_DHashTableOperate (table=0x62bcd8, 
 
 key=0x73a9ccb0, op=PL_DHASH_LOOKUP)
 
 at 
 /builds/slave/rel-m-beta-xr-lnx64-bld/build/obj-firefox/xpcom/build/pldhash.cpp:576
 
 #2  0x732555df in nsTHashtablensBaseHashtableETnsIDHashKey, 
 nsFactoryEntry* ::GetEntry (this=value optimized out, aKey=value 
 optimized out)
 
 at ../../dist/include/nsTHashtable.h:148
 
 #3  0x732555f9 in nsBaseHashtablensIDHashKey, nsFactoryEntry*, 
 nsFactoryEntry*::Get (this=value optimized out, aKey=value optimized out)
 
 at ../../dist/include/nsBaseHashtable.h:126
 
 #4  0x73256cf7 in nsComponentManagerImpl::RegisterCIDEntry (
 
 this=0x62bc70, aEntry=0x747ad0e0, aModule=0x656200)
 
 at 
 /builds/slave/rel-m-beta-xr-lnx64-bld/build/xpcom/components/nsComponentManager.cpp:423
 
 #5  0x73257b62 in nsComponentManagerImpl::RegisterModule (
 
 this=0x62bc70, aModule=0x745638f0, aFile=0x0)
 
 at 
 /builds/slave/rel-m-beta-xr-lnx64-bld/build/xpcom/components/nsComponentManager.cpp:397
 
 #6  0x73257ed9 in nsComponentManagerImpl::Init (this=0x62bc70)
 
 at 
 /builds/slave/rel-m-beta-xr-lnx64-bld/build/xpcom/components/nsComponentManager.cpp:347
 
 #7  0x732327f5 in NS_InitXPCOM2_P (result=0x7fffe260, 
 
 binDirectory=value optimized out, appFileLocationProvider=0x0)
 
 at 
 /builds/slave/rel-m-beta-xr-lnx64-bld/build/xpcom/build/nsXPComInit.cpp:466
 
 #8  0x00400a80 in main (argc=1, argv=0x7fffe378)
 
 at embed_test.cpp:13

Just link with:

`pkg-config --libs libxul` -Wl,--whole-archive -lmozglue -lmemory 
-Wl,--no-whole-archive

This solved the problem for me recently.
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: Focus problem with mozembed

2012-11-05 Thread Glen Gray
This thread might be of help, it's old but may still be relevant.

https://bugzilla.mozilla.org/show_bug.cgi?id=533245

On 2 Nov 2012, at 14:29, Zoltan Boszormenyi zboszorme...@sicom.com wrote:

 Hi,
 
 by running the gtk/tests/test.cpp code, I have noticed that the embedded 
 Gecko engine cannot get the focus. The GtkEntry for the URL and the 
 GtkNotebook page headers are highlighted when tabbing through them but the 
 notebook leaf, the page content cannot. E.g. the entry for the Google 
 search box doesn't get keyboard events, although all other events seem to get 
 through. E.g. clicking on the keyboard icon in the right side of the search 
 entry box shows the on-screen keyboard and it accepts clicks which make the 
 letters appear in the search box. So, everything seems to work except the 
 keyboard focus.
 
 I am using 64-bit Fedora 17, xulrunner-16.0.2 and mozembed tip (29ac0fe51754) 
 with the previously posted patch.
 
 I also noticed that gtk/x11/moz-web-view.cpp and gtk/win32/moz-web-view.cpp 
 are very different. Why? The keyboard focus problem may be solved by unifying 
 them, no? Can someone help me?
 
 Thanks in advance,
 Zoltán Böszörményi
 ___
 dev-embedding mailing list
 dev-embedding@lists.mozilla.org
 https://lists.mozilla.org/listinfo/dev-embedding

-- 
Glen Gray
sla...@slaine.org





___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


The phoenix has burnt and arisen...

2012-10-31 Thread Zoltan Boszormenyi
Hi,

I was fighting with embedding xulrunner for about two weeks now because I had 
problems with Webkit while using an NSAPI plugin that I wrote in GTK and still 
maintain: https://bugs.webkit.org/show_bug.cgi?id=100682

Fortunately, I found the Embedding/NewApi thing here:
https://wiki.mozilla.org/Embedding/NewApi
which uses the XRE_InitEmbedding2() and so on, but the mercurial code is a 
little outdated and makes compiling with more recent xulrunner versions a 
little problematic. ATM, I am using Fedora 17/x86_64 with Firefox/xulrunner 
16.0.2.

Long story short, it seems the code to embed xulrunner in external projects is 
still there, but the API/ABI changed somewhat since the NewApi mozembed code 
was last touched.

The biggest problem is that these extra LDFLAGS below are needed in order to 
successfully call XRE_InitEmbedding2() or NS_InitXPCOM2() without a segfault:

-lmozjs -Wl,--whole-archive -lmozglue -lmemory -Wl,--no-whole-archive -rdynamic

These extra static and dynamic libraries are installed by the xulrunner runtime 
and accessible via the SDK directories, too. Maybe it would be cleaner to put 
these options into xulrunner's pkg-config files.

The patch in the link refreshes the common and GTK portions of the NewApi 
mozembed code, so it compiles and links successfully with the latest 16.0.x 
version and the mini browser under mozembed/gtk/tests  works:
http://www.cybertec.at/download/embedding-newxul-v2.patch

Enjoy!
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Link error : con not open the file

2012-08-14 Thread Victor
Dear All,
This is Victor. Nice to see you here.
I used 3.6.28 Gecko version in my MFC and wanted to upgrade for Gecko 10.0. 
When I debug i got some lib(embed_base_s.lib, xpwidgets_s.lib,etc..)link error 
like Link Error : embed_base_s.lib can not open. I used static library 
command ( parama(,lib)). May I know how to embed and build. Welcome for your 
support and advanced thanks.

Regards,
Victor
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: Newbie question...

2012-07-26 Thread Philipp Wagner
Hi Jürgen,

first: Mozilla Developer Network is just the name of the online
documentation at developer.mozilla.org.

second: don't try to embed Gecko into your application. Many have tried
before and failed sooner or later. If you want to embed a browser, use
Webkit or IE (depending on how you developed your application, e.g. in
Qt it's really easy to embed Webkit).

third: for your use case I don't think you even need to embed a web
browser into your application. You could use a simple XULRunner
application or even a regular Firefox with a (to-be-developed) special
Add-On.

Philipp


Am 19.07.2012 11:42, schrieb Jürgen Keser:
 Hi All,
 
 I am an absolutely newbie at the Mozilla Developer Network and I have
 a few questions. I don't know if  it's possible to realize the project I will
 do here with all the great stuff you provide. But let me explain what I will 
 do:
 
 1.
 We have an application(cross platform Macintosh + Windows) that is running. 
 Out of
 this application we will show now an present Homepage of a partner of us. 
 This should 
 happen in an separate window but I think this must be possible with the stuff 
 from here?
 https://developer.mozilla.org/en/The_Joy_of_XUL
 
 
 2.
 If this Homepage is opened in the separate window the user could choose out 
 of a few download links
 that are on this page.
 If he now click on one of the download links, normally the download window of 
 the web browser will 
 come up to show where the file will be saved. 
 But what we want is to download the file at a separate place we could define 
 without the dialog where
 it should be saved and close the separate window that shows the Homepage. 
 
 3.
 Now when the browser window is closed we need a message or anything else in 
 the main application that
 a file was downloaded. Now we could load the downloaded file in the main 
 application that is running.
 
 
 I know this is just a very short description of the things we will do. But 
 maybe someone of you did something
 similar and could give me some hints, how this project could be realized? 
 Maybe it's not possible to
 realize with the Mozilla Developer Network? Maybe I need to search for 
 another Developer Network?
 
 
 Thanks for any help!!!
 
 Regards,
 
 Jürgen
 


___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Sample Project for OS X and Windows...

2012-07-20 Thread Jürgen Keser
Hi All,

ist there anywhere a simple project (mac + win). That opens just a simple
url in an browser window. No Buttons or anything else. 

Just a very simple sample (Xcode an VisualStudio that I can recompile) to get 
started with Gecko?

Thanks for any hints,

Jürgen
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Newbie question...

2012-07-19 Thread Jürgen Keser
Hi All,

I am an absolutely newbie at the Mozilla Developer Network and I have
a few questions. I don't know if  it's possible to realize the project I will
do here with all the great stuff you provide. But let me explain what I will do:

1.
We have an application(cross platform Macintosh + Windows) that is running. Out 
of
this application we will show now an present Homepage of a partner of us. This 
should 
happen in an separate window but I think this must be possible with the stuff 
from here?
https://developer.mozilla.org/en/The_Joy_of_XUL


2.
If this Homepage is opened in the separate window the user could choose out of 
a few download links
that are on this page.
If he now click on one of the download links, normally the download window of 
the web browser will 
come up to show where the file will be saved. 
But what we want is to download the file at a separate place we could define 
without the dialog where
it should be saved and close the separate window that shows the Homepage. 

3.
Now when the browser window is closed we need a message or anything else in the 
main application that
a file was downloaded. Now we could load the downloaded file in the main 
application that is running.


I know this is just a very short description of the things we will do. But 
maybe someone of you did something
similar and could give me some hints, how this project could be realized? Maybe 
it's not possible to
realize with the Mozilla Developer Network? Maybe I need to search for another 
Developer Network?


Thanks for any help!!!

Regards,

Jürgen
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: JavaXPCOM development?

2012-07-16 Thread Grant Gayed

 lol actually they are using javaXPCOM and are stuck at Xul 1.9, which
 is why I'm here asking

The Browser control in the SWT 3.8/4.2 release can embed XULRunner 10.x 
because it uses XPCOM directly, it does not use JavaXPCOM.  The part 
that does not work beyond XULRunner 1.9.2.x is its 
Browser.getWebBrowser() method, which provides a JavaXPCOM wrapper of 
its nsIWebBrowser.


Grant
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: How to make about:memory work within xulrunner9 on Linux?

2012-07-12 Thread blakebinkley
On Monday, March 19, 2012 5:59:23 AM UTC-4, Emma wrote:
 We embedded xulrunner9 with java, but the about:memory page can not be
 displayed on Linux, it displayed well on Windows. Do you know how to
 make it work on Linux? Thank you.

Emma, could you share the process by which you were able to embed Xulrunner  3 
in java, I was under the impression that all JavaXPCOM work was abandoned and 
was no longer being worked on by anyone.

IE: https://developer.mozilla.org/En/JavaXPCOM 
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


JavaXPCOM development?

2012-07-12 Thread Blake Binkley
is there anyone who has XulRunner 10+ embedded in java?

I have been under the impression that javaXPCOM was no longer being worked on 
and was a dead project, but in another thread here somone is talking about java 
and having a new version of XulRunner embedded, if not via javaXPCOM then by 
what means is it being done?

my only info that is was dead is: https://developer.mozilla.org/En/JavaXPCOM
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: JavaXPCOM development?

2012-07-12 Thread Benjamin Smedberg

On 7/12/2012 12:11 PM, Blake Binkley wrote:

is there anyone who has XulRunner 10+ embedded in java?

I have been under the impression that javaXPCOM was no longer being worked on 
and was a dead project, but in another thread here somone is talking about java 
and having a new version of XulRunner embedded, if not via javaXPCOM then by 
what means is it being done?

JavaXPCOM does not have a maintainer and is essentially dead, yes.

I believe that there are separate projects like an SWT embedding widget 
which don't use JavaXPCOM. I'm not clear on exactly how all those work.


And of course Java still works as a NPAPI plugin in the browser.

--BDs

___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: JavaXPCOM development?

2012-07-12 Thread Blake Binkley
On Thursday, July 12, 2012 12:39:04 PM UTC-4, Benjamin Smedberg wrote:

 I believe that there are separate projects like an SWT embedding widget 
 which don#39;t use JavaXPCOM. I#39;m not clear on exactly how all those 
 work.
 
 And of course Java still works as a NPAPI plugin in the browser.
 
 --BDs
lol actually they are using javaXPCOM and are stuck at Xul 1.9, which is why 
I'm here asking :)
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: How to make about:memory work within xulrunner9 on Linux?

2012-06-21 Thread Thomas Max

How did you disable it ?

On 13.06.2012 09:28, Emma wrote:

Dis

On Monday, March 19, 2012 5:59:23 PM UTC+8, Emma wrote:

We embedded xulrunner9 with java, but the about:memory page can not be
displayed on Linux, it displayed well on Windows. Do you know how to
make it work on Linux? Thank you.


Disable the jemalloc can make the about:memory work well on Linux.




___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: How to make about:memory work within xulrunner9 on Linux?

2012-06-13 Thread Emma
Dis

On Monday, March 19, 2012 5:59:23 PM UTC+8, Emma wrote:
 We embedded xulrunner9 with java, but the about:memory page can not be
 displayed on Linux, it displayed well on Windows. Do you know how to
 make it work on Linux? Thank you.

Disable the jemalloc can make the about:memory work well on Linux.
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


How do I print preview a page with Gecko2.0 and higher version?

2012-06-13 Thread Emma
Hello, 

In Gecko1.9, we can print preview a page with 
nsIWebBrowserPrint::PrintPreview() method only need provide one printSettings 
parameter by: printPreview(printSetting, null, null); 

But in Gecko2.0, above code not work, after reading the source, I know that the 
second parameter(childWindow) should not be null in Gecko2.0. But I don't know 
which window should be passed to it? I tried pass current browser window to it, 
but not work. Anyone can help me out? Any comment is welcome. Thanks a lot. 
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


odd javascript behavior

2012-06-04 Thread jim bodkins
Hi, I am not an experienced javascript coder. I need to do enough to
make an ajax/websockets app work. (Ajax at the moment). But I am
experiencing odd behavior.


This code:

app.getMessages = function() {
var fieldval;
  $.ajax({
dataType: 'jsonp',
url: app.backendUrl + '/ajax/get_messages',
data: {field: fieldval, text: field.value},
success: app.refresh,
error: function() {
},
  });
  window.setTimeout(app.getMessages, app.getMessagesIntervalMs);
};


... from a file on the server is arriving in the browser as:

app.getMessages = function() {
  $.ajax({
dataType: 'jsonp',
url: app.backendUrl + '/ajax/get_messages',
data: {text: app.inputval},
success: app.widget = app.inputval,
error: function() {
},
  });
  window.setTimeout(app.getMessages, app.getMessagesIntervalMs);
};




as a note ... app.refresh is ...

app.refresh = function(data) {
  $.each(data, function(index, entry) {
var row = $('div').addClass('message-row').appendTo('#mml');
var timestamp = (new Date(entry.timestamp *
1000)).toLocaleTimeString();
};


Where in the world did success: app.widget = app.inputval,  come
from? Is this stable or is it me?

Thanks
Jim
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


building error when linking to one more library

2012-05-25 Thread Yuhao
Hi All,

I met some problem when linking to libpfm. The error message was:

/usr/bin/python2.7 /home/yuhao/Documents/mozilla-release/config/
pythonpath.py -I../../config /home/yuhao/Documents/mozilla-release/
config/expandlibs_exec.py --uselist -- c++ -o firefox -fno-rtti -
pedantic -Wall -Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-
dtor-privacy -Wno-non-virtual-dtor -Wcast-align -Wno-invalid-offsetof -
Wno-variadic-macros -Werror=return-type -Wno-long-long -I/usr/local/
include -fno-exceptions -fno-strict-aliasing -std=gnu++0x -pthread -
ffunction-sections -fdata-sections -pipe -DNDEBUG -DTRIMMED -g -Os -
freorder-blocks -fomit-frame-pointer nsBrowserApp.o -lpthread -Wl,-
rpath-link,/home/yuhao/Documents/mozilla-release/firefox-release/dist/
bin -Wl,-rpath-link,/usr/local/lib -Wl,--whole-archive /home/yuhao/
Documents/mozilla-release/firefox-release/dist/lib/libmozglue.a -Wl,--
no-whole-archive -rdynamic -L../../dist/bin -L../../dist/lib -lpfm -L/
usr/local/lib /home/yuhao/Documents/mozilla-release/firefox-release/
dist/lib/libxpcomglue.a -ldl -lpfm

nsBrowserApp.o: In function `main':
/home/yuhao/Documents/mozilla-release/browser/app/nsBrowserApp.cpp:
218: undefined reference to `pfm_initialize'
/usr/bin/ld.bfd.real: firefox: hidden symbol `pfm_initialize' isn't
defined
/usr/bin/ld.bfd.real: final link failed: Bad value
collect2: ld returned 1 exit status

This doesn't make sense to me. I specified the library name (-lpfm),
as well as the path for the linker to find it (-L/usr/local/lib). I am
sure these paths are correct.

I also tried not to use the python script, but just normal building:

c++ -o firefox -fno-rtti -pedantic -Wall -Wpointer-arith -Woverloaded-
virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wcast-
align -Wno-invalid-offsetof -Wno-variadic-macros -Werror=return-type -
Wno-long-long -I/usr/local/include -fno-exceptions -fno-strict-
aliasing -std=gnu++0x -pthread -ffunction-sections -fdata-sections -
pipe -DNDEBUG -DTRIMMED -g -Os -freorder-blocks -fomit-frame-pointer
nsBrowserApp.o -lpthread -Wl,-rpath-link,/home/yuhao/Documents/mozilla-
release/firefox-release/dist/bin -Wl,-rpath-link,/usr/local/lib -Wl,--
whole-archive /home/yuhao/Documents/mozilla-release/firefox-release/
dist/lib/libmozglue.a -Wl,--no-whole-archive -rdynamic -L../../dist/
bin -L../../dist/lib -lpfm -L/usr/local/lib /home/yuhao/Documents/
mozilla-release/firefox-release/dist/lib/libxpcomglue.a -ldl -lpfm

And it just worked. So I assume the problem was with the python
script. I am not familiar with python, so could anyone help me with
this?

Thanks,
Yuhao
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: Undefined simbols moz_xmalloc (et al.) in Gecko 12

2012-05-21 Thread Benjamin Smedberg

On 5/18/2012 4:20 AM, Babele Dunnit wrote:

Hi everybody,

I am updating our embedding app from Gecko7 to Gecko12. I get linking
errors:

In function `operator new(unsigned int)':
/dist/include/mozilla/mozalloc.h:229: undefined reference to
`moz_xmalloc'

In function `operator new[](unsigned int)':
/dist/include/mozilla/mozalloc.h:241: undefined reference to
`moz_xmalloc'

In function `operator delete(void*)':
/dist/include/mozilla/mozalloc.h:253: undefined reference to
`moz_free'

In function `operator delete[](void*)':
dist/include/mozilla/mozalloc.h:265: undefined reference to `moz_free'

I am building xulrunner with a default .mozconfig, with just

ac_add_options --enable-cpp-rtti

added.

Any advice (apart from copying the sources and forcing the compilation/
linking, which I will do now) ?
These errors occur while linking your embedding app? Are you using 
dependent or independent glue? I think you would need to end up linking 
against mozutil (which contains mozalloc IIRC), but that might depend on 
how you're linking to begin with.


--BDS

___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: Undefined simbols moz_xmalloc (et al.) in Gecko 12

2012-05-18 Thread Babele Dunnit

Sorry, I forgot: Linux, GTK embedding, Ubuntu 12.04.

On May 18, 10:20 am, Babele Dunnit babele.dun...@gmail.com wrote:
 Hi everybody,

 I am updating our embedding app from Gecko7 to Gecko12. I get linking
 errors:

 In function `operator new(unsigned int)':
 /dist/include/mozilla/mozalloc.h:229: undefined reference to
 `moz_xmalloc'

 In function `operator new[](unsigned int)':
 /dist/include/mozilla/mozalloc.h:241: undefined reference to
 `moz_xmalloc'

 In function `operator delete(void*)':
 /dist/include/mozilla/mozalloc.h:253: undefined reference to
 `moz_free'

 In function `operator delete[](void*)':
 dist/include/mozilla/mozalloc.h:265: undefined reference to `moz_free'

 I am building xulrunner with a default .mozconfig, with just

 ac_add_options --enable-cpp-rtti

 added.

 Any advice (apart from copying the sources and forcing the compilation/
 linking, which I will do now) ?

 Thanks,
 Aaron

___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Problem with offscreen rendering, texture in a 3D ogre application

2012-04-22 Thread hummelebop
Hello,

XULRUNNER APPLICATION, last mozilla-central nightly, in a C++ XPCOM Component 
on msWindows MSVC10.

I'm working on a wrapper for Mozilla Gecko that allows a developper to manage 
multiple 'browsers' and render their contents to a texture for ogre3D.
(See https://bugzilla.mozilla.org/show_bug.cgi?id=718985)

I am rendering via RenderDocument (nsIDOMWindowUtils) and MozAfterPaint event.

There is a strange problem : I'm working with browsers in hidden windows...

When the window is hidden or offscreen, the application is slow for create 
rendering texture.
When Browsers windows are showed and visible in monitor screen, that's work 
fine and this is really fast.

What do you think about that ?

Regards
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: Embedding Xulrunner 2.0: CreateChromeWindow2 (e.g. if Xulrunner Requests a Window for a simple Alert Box): chrome://global/content/commonDialog.xul rendered without content

2012-03-27 Thread arcoun
Hello Dominik,

I'm replying to this old thread because I have the same problem.

Have you found a solution since then?

Best regards.
-- arcoun

On Wednesday, April 20, 2011 4:51:29 PM UTC+2, dhoelzl wrote:
 If Embedding Xulrunner 2.0 it requests for a new window with a browser inside
 if e.g. a web page opens a simple alert box.
 It calls nsIWindowCreator2::CreateChromeWindow2 and renders the dialog box
 content into the returned nsIWebBrowserChrome.
 
 That works all fine, but inside the returned nsIWebBrowserChrome only the
 URL of the dialog content (chrome://global/content/commonDialog.xul) is
 displayed, but without content (like i just enter the chrome url in the
 firefox 4.0 browser). It seems that the parameters for the XUL get lost
 somewhere.
 
 If using Xulrunner 1.9.2 all works fine.
 (Xulrunner 1.9.2 uses nsIPromptService2 to display alert boxes, but other
 XUL-dialogs like the certificate error dialog works well)
 
 Does anybody know what changed inside the Xulrunner framwork?
 Debugging Xulrunner where it looses the parameters seems to be very
 elaborate.
 
 Greetings,
 Dominik

___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Courios Problem with FF

2012-03-27 Thread John Sinclair
Hi all,

my english is not proper.

I have a courios problem with mozilla.
I programming any Application with VS2008, .Net 3.5, XulRunner 10, GeckoFX
10.0.4
All works fine.

When i use security server com this error message:
server does not support RFC 5746, see CVE-2009-3555

when i use this url with Firefox 11 (normal, basic, as Browser)
i have this no errors and all connections works fine.

what can i do?

I hope any Profi can me help.

see you


-- 


Disclaimer:
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte 
Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail 
irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und 
vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte 
Weitergabe dieser Mail ist nicht gestattet.

Terms of Use:
This e-mail may contain confidential and/or privileged information. If you 
are not the intended recipient (or have received this e-mail in error) 
please notify the sender immediately and destroy this e-mail. Any 
unauthorised copying, disclosure or distribution of the material in this 
e-mail is strictly forbidden.





___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: xulrunner 10, je_malloc_usable_size_in_advance

2012-03-13 Thread Mike Hommey
On Tue, Mar 13, 2012 at 10:27:35AM -0400, Benjamin Smedberg wrote:
 On 3/13/2012 10:09 AM, Adam Dickmeiss wrote:
 We have an application that has been working well since 1.9 through 9,
 but in Xulrunner 10 we get a crash , on Linux, 64-bit.
 
 
 #0  0x in ?? ()
 #1  0x7310ca8b in mozilla::storage::(anonymous
 namespace)::sqliteMemRoundup (n=optimized out)
  at /home/adam/proj/mozilla/ftp.mozilla.org/pub/mozilla.org/
 xulrunner/releases/10.0.2/source/mozilla-release/storage/src/
 mozStorageService.cpp:370
 #2  0x7fffec7e42fb in ?? ()
 from /home/adam/prefix/lib/xulrunner-10.0.2/libmozsqlite3.so
 #3  0x7fffec7e43c9 in ?? ()
 from /home/adam/prefix/lib/xulrunner-10.0.2/libmozsqlite3.so
 #4  0x7fffec7e441d in ?? ()
 from /home/adam/prefix/lib/xulrunner-10.0.2/libmozsqlite3.so
 #5  0x7fffec7e446f in ?? ()
 from /home/adam/prefix/lib/xulrunner-10.0.2/libmozsqlite3.so
 #6  0x7fffec7ed45e in sqlite3_initialize ()
 from /home/adam/prefix/lib/xulrunner-10.0.2/libmozsqlite3.so
 #7  0x7310e45a in mozilla::storage::Service::initialize
 (this=0xe64f00)
  at /home/adam/proj/mozilla/ftp.mozilla.org/pub/mozilla.org/
 xulrunner/releases/10.0.2/source/mozilla-release/storage/src/
 mozStorageService.cpp:418
 #8  0x7310e741 in mozilla::storage::Service::getSingleton ()
  at /home/adam/proj/mozilla/ftp.mozilla.org/pub/mozilla.org/
 xulrunner/releases/10.0.2/source/mozilla-release/storage/src/
 mozStorageService.cpp:244
 
 Seems that the call to je_malloc_usable_size_in_advance fails.
 
 mozStorageService.cpp also reads:
 
 // jemalloc is directly linked into firefox-bin; libxul doesn't link
 // with it.  So if we tried to use je_malloc_usable_size_in_advance
 directly
 // here, it wouldn't be defined.  Instead, we don't include the
 jemalloc header
 // and weakly link against je_malloc_usable_size_in_advance.
 extern C {
 extern size_t je_malloc_usable_size_in_advance(size_t size)
NS_VISIBILITY_DEFAULT __attribute__((weak));
 }
 
 So tried to see where THAT was defined.. Seems to be in libmozutils.a
 which Is NOT installed by 'make -f client.mk install'.
 
 Fortunately linking with that library seems to solve our immediate
 problem, but not an ideal situation.
 
 Since we have very little automated testing of Mozilla outside of
 the normal XUL launch environment, this is I think just a bug. On
 Linux, we do not expect that all embedders are going to link against
 jemalloc/mozutils, and so Mozilla code should expect that jemalloc-
 or mozutils-specific symbols may not be present. Feel free to fix
 this.
 
 Your workaround of linking mozutils to pick up jemalloc seems like a
 good solution for now.

There is an open bug for that particular one:
https://bugzilla.mozilla.org/show_bug.cgi?id=720682

Considering how things are evolving, I think libmozglue.a (what used to be
libmozutils.a) should be shipped in the sdk in two flavours: one with and
one without jemalloc, and be linked as we require the xpcom glue to be
linked.

Mike
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: xulrunner 10, je_malloc_usable_size_in_advance

2012-03-13 Thread Adam Dickmeiss
On Mar 13, 3:36 pm, Mike Hommey mhom...@mozilla.com wrote:
 On Tue, Mar 13, 2012 at 10:27:35AM -0400, Benjamin Smedberg wrote:
  On 3/13/2012 10:09 AM, Adam Dickmeiss wrote:
  We have an application that has been working well since 1.9 through 9,
  but in Xulrunner 10 we get a crash , on Linux, 64-bit.

  #0  0x in ?? ()
  #1  0x7310ca8b in mozilla::storage::(anonymous
  namespace)::sqliteMemRoundup (n=optimized out)
       at /home/adam/proj/mozilla/ftp.mozilla.org/pub/mozilla.org/
  xulrunner/releases/10.0.2/source/mozilla-release/storage/src/
  mozStorageService.cpp:370
  #2  0x7fffec7e42fb in ?? ()
      from /home/adam/prefix/lib/xulrunner-10.0.2/libmozsqlite3.so
  #3  0x7fffec7e43c9 in ?? ()
      from /home/adam/prefix/lib/xulrunner-10.0.2/libmozsqlite3.so
  #4  0x7fffec7e441d in ?? ()
      from /home/adam/prefix/lib/xulrunner-10.0.2/libmozsqlite3.so
  #5  0x7fffec7e446f in ?? ()
      from /home/adam/prefix/lib/xulrunner-10.0.2/libmozsqlite3.so
  #6  0x7fffec7ed45e in sqlite3_initialize ()
      from /home/adam/prefix/lib/xulrunner-10.0.2/libmozsqlite3.so
  #7  0x7310e45a in mozilla::storage::Service::initialize
  (this=0xe64f00)
       at /home/adam/proj/mozilla/ftp.mozilla.org/pub/mozilla.org/
  xulrunner/releases/10.0.2/source/mozilla-release/storage/src/
  mozStorageService.cpp:418
  #8  0x7310e741 in mozilla::storage::Service::getSingleton ()
       at /home/adam/proj/mozilla/ftp.mozilla.org/pub/mozilla.org/
  xulrunner/releases/10.0.2/source/mozilla-release/storage/src/
  mozStorageService.cpp:244

  Seems that the call to je_malloc_usable_size_in_advance fails.

  mozStorageService.cpp also reads:

  // jemalloc is directly linked into firefox-bin; libxul doesn't link
  // with it.  So if we tried to use je_malloc_usable_size_in_advance
  directly
  // here, it wouldn't be defined.  Instead, we don't include the
  jemalloc header
  // and weakly link against je_malloc_usable_size_in_advance.
  extern C {
  extern size_t je_malloc_usable_size_in_advance(size_t size)
     NS_VISIBILITY_DEFAULT __attribute__((weak));
  }

  So tried to see where THAT was defined.. Seems to be in libmozutils.a
  which Is NOT installed by 'make -f client.mk install'.

  Fortunately linking with that library seems to solve our immediate
  problem, but not an ideal situation.

  Since we have very little automated testing of Mozilla outside of
  the normal XUL launch environment, this is I think just a bug. On
  Linux, we do not expect that all embedders are going to link against
  jemalloc/mozutils, and so Mozilla code should expect that jemalloc-
  or mozutils-specific symbols may not be present. Feel free to fix
  this.

  Your workaround of linking mozutils to pick up jemalloc seems like a
  good solution for now.

 There is an open bug for that particular 
 one:https://bugzilla.mozilla.org/show_bug.cgi?id=720682

 Considering how things are evolving, I think libmozglue.a (what used to be
 libmozutils.a) should be shipped in the sdk in two flavours: one with and
 one without jemalloc, and be linked as we require the xpcom glue to be
 linked.

 Mike

Thanks for the answers and pointers everyone.

/ Adam
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


No nsIWebProgressListener callbacks when clicking on a target=_blank link?

2012-03-05 Thread Babele Dunnit
Hi all,

the subject says it all. I was expecting at least some activity on a
nsIWebProgressListener interface even if I do NOT implement any new
tab/popup/new window functionality (via nsIWindowCreator), but
nothing happens at all.

Is implementing nsIWindowCreator  (or nsIWindowCreator2, obviously)
the only way to get notifications about clicks on target=_blank
links??

___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Crash in XRE_InitEmbedding2 since Firefox 10

2012-03-04 Thread Daniel Paepke
Hello,

we are using the Embedded API for rendering. Since Firefox 10 we get a
crash while creating (constructor) the MozApp-object. More precisely
the crash is by calling the API 'XRE_InitEmbedding2()' (its function-
pointer is valid!) in 'InitEmbedding()' of the MozApp constructor in
the xul.dll (Fileversion: 10.0.0.4411 BuildID: 20120129021758). Up to
version 9 of Firefox we do not have this crash - only since version
10. You can find details in the following bug report here:
https://bugzilla.mozilla.org/show_bug.cgi?id=724822

Now, we have adapted the Embedded API and it works for us with xul-
runner 10.0.2... but there are some points left - therefore we
actually use simple/stupid workarounds to make it work for us - but
this is not a good solution (especially for all).

1. The Embedded API uses the API 'GRE_GetGREPathWithProperties'. But
it is missing in the xul-runner 10.0.2 sources. Actually we would like
to search the windows registry for the Firefox installation-path to
call 'XPCOMGlueStartup'. But this is not a good solution for everyone.
What could be the better solution here?

2. I get a build-error, that 'ToProvidedString' in 'nsNetUtil.h' of
the xul-runner 10.0.2 sources is missing, when building the Embedded
API. How could be the solution look here?

3. Additional some API definitions have changed their data-types from
'PRBool' zu 'bool' - this is pretty simple to fix.

But my questions are:
Would someone adapt the Embedded API in the offical way so it can be
used with the actual sources of xul-runner without special adaptions?
And if not: Who is the responsible developer for this part in the
mozilla project to talk to for adapting the Embedded API together?

Many thanks for your help!
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: The future of binary embedding

2012-03-01 Thread Bobby Holley

 Does anyone have an idea about how much work it would take to maintain
 python-xpcom?


Lots.

I don't know much about pyxpcom, but I imagine it being pretty analogous to
XPConnect (our JS-XPCOM bridge). XPConnect is probably the most notorious
module in Gecko - it's complicated, scary, and easy to get wrong. We
already sink a ton of engineering resources into it, and wouldn't if it
weren't so fundamental to our entire architecture.

More importantly, for a number of reasons the DOM is becoming more
intimately tied to JS: we're removing the abstraction layer that
sorta-kinda makes the DOM language-agnostic (it's too slow), and we're
writing new custom DOM bindings.

So if it isn't true already, pyxpcom won't be able to script the DOM
anymore, which makes it significantly less useful. Reversing this course
(and maintaining a separate set of python DOM bindings) is pretty much out
of the question: it incurs a performance penalty for the Web that we don't
want to pay, and it would take months and months of engineering by Boris,
Kyle, Peter, Blake, Ben, Johnny, Olli, and myself to make happen.

In a nutshell, script bindings aren't easy - this stuff is some of the most
complicated and delicate code in Gecko. So the issue isn't that Benjamin is
too lazy or proud to keep the relevant embedding APIs. The issue is that
there is a very small group of people in the world who have the knowledge
to build and maintain something like this, and they have other priorities.

bholley
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: The future of binary embedding

2012-02-29 Thread lkcl luke
https://bugzilla.mozilla.org/show_bug.cgi?id=731121

where is the information required to fix this problem?

also, why was pyxpcom excluded from the update my god this was _months_ ago!
https://bugzilla.mozilla.org/show_bug.cgi?id=675221

why was pyxpcom not included in that update, when the information was
fresh in everyone's minds??

oh i know - because pyxpcom has been relegated to third party status.

ok.

how is this going to get fixed? (a so that this stops happening b
these specific coding errors so i can get some working code)


On Tue, Feb 28, 2012 at 6:05 AM, lkcl luke luke.leigh...@gmail.com wrote:
 the policy of relegating pyxpcom to third party status within the
 mozilla codebase has resulted in these kinds of things, below.

 you will recognise this as the consequences of a decision some time in
 the past few weeks (which i wasn't party to, because i am an
 outsider having no funds or time to pay 24x7 attention to each and
 every decision made by the people who _are_ funded by the mozilla
 foundation)

 basically that decision looks like it involved deliberate splitting of
 the header files into public api and not public api.

 so, this header file nsIProxyObjectManager.h is treated as internal api...

 ... but somebody forgot that pyxpcom needs it... because they have
 relegated pyxpcom to third party status.

 they forgot that pyxpcom *needs* to be built as an internal
 component, yet the mozilla foundation has completely failed to provide
 a system for building such components, yet at the same time has
 basically dumped the responsibility onto other people.

 if however pyxpcom was actually part of mozilla-central, then not only
 would this problem simply not be present but also it would be a damn
 sight easier to find issues.

 temporarily i am forced to manually seek out, copy and make available
 this nsIProxyObjectManager.h file each and every damn time i do a
 rebuild and reinstall of a particular version of the xulrunner
 runtime.

 that's incredibly tiresome and it's part of the *additional* burden
 that the mozilla foundation's decisions are placing onto external
 developers.

 ... developers that are *not* funded by the mozilla foundation, it's
 worth once again pointing out.

 right now i cannot agree more that the OLPC team made the right
 decision to remove all mozilla-foundation-funded technology from their
 machines.

 l.

 c++ -o _xpcom.o -c -I../../../dist/system_wrappers -include
 ../../../../config/gcc_hidden.h -DOSTYPE=\Linux2.6\ -DOSARCH=Linux
 -DMOZ_NO_MOZALLOC -I/usr/include/python2.7
 -I../../../../xpcom/src/module -I. -I../../../dist/include
 -I../../../dist/include/nsprpub
 -I/usr/local/lib/xulrunner-devel-13.0a1/include
 -I/usr/local/lib/xulrunner-devel-13.0a1/include/nsprpub
 -I/usr/include/nspr          -fPIC   -fno-rtti -fno-exceptions -Wall
 -Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy
 -Wno-non-virtual-dtor -Wcast-align -Wno-invalid-offsetof
 -Wno-long-long -pedantic -DXULRUNNER_13_0A1 -std=gnu++0x -fshort-wchar
 -fno-strict-aliasing -pipe -std=gnu++0x  -DNDEBUG -DTRIMMED -Os
 -freorder-blocks -fno-reorder-functions    -DMOZILLA_CLIENT -include
 /usr/local/lib/xulrunner-devel-13.0a1/include/mozilla-config.h
 -Wp,-MD,.deps/_xpcom.pp ../../../../xpcom/src/module/_xpcom.cpp
 ../../../../xpcom/src/module/_xpcom.cpp:68:35: fatal error:
 nsIProxyObjectManager.h: No such file or directory
 compilation terminated.
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: The future of binary embedding

2012-02-29 Thread Kyle Huey
On Wed, Feb 29, 2012 at 4:30 PM, lkcl luke luke.leigh...@gmail.com wrote:

 https://bugzilla.mozilla.org/show_bug.cgi?id=731121 oh i know - because
 pyxpcom has been relegated to third party status.


Yes, exactly.

how is this going to get fixed? (a so that this stops happening b
 these specific coding errors so i can get some working code)


It's not going to get fixed unless someone steps up to fix it.  And as has
been stated several times, the core Mozilla community has no interest in
doing so.

- Kyle
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: The future of binary embedding

2012-02-29 Thread lkcl luke
On Thu, Mar 1, 2012 at 2:29 AM, Justin Lebar justin.le...@gmail.com wrote:
 i'm going to keep on, and on, and on, and on, and on, and on at this
 until i get answers, and pyxpcom works.

 Luke, I think it is unlikely that you will accomplish your goals if
 you make trolling your primary strategy.

 i don't know what trolling is, and you are probably mistaking
trolling for pathological bug-fixing and 100% focus on getting a goal
completed irrespective of trying to make friends.

 but you are dragging the conversation off topic.  i am still waiting
for ben to acknowledge the points made regarding his misunderstanding
of the situation regarding the continuous changes to XPCOM interfaces,
which are absolutely irrelevant to dynamic programming languages.

 and, if that was the primary justification for destroying pyxpcom
then it is a mistake.



 You've tried to argue that it's in our best interests to maintain the
 python-xpcom bindings.  Those in this thread have heard your argument,

 no they haven't.  i'm not done yet.

 there's more to this.

 so far i've explained to chris that javascript as a compiler target
of a dynamic programming language results in an order of magniture
performance hit; to ben that he's mistaken about the binary
compatibility issue and so on.


 and they disagree.

how can you disagree with an incomplete perspective?  i don't understand.


  You think that's our loss, and maybe you're right!

 maybe?  there shouldn't be *any* maybe.  you're supposed to be
world leaders at the forefront of technology.  there should _be_ no
maybes.


 But just because you think we're wrong doesn't give you the right to
 waste everyone's time.  You are not entitled to anyone's attention
 here or in bugzilla.

 you are assuming that this is ego-driven.  where is the money that i
am being paid to do this work on behalf of others?  where is it?  can
you please tell me where the personal motivation is, please?

 have you seen any?

 mm?

 you've already badly let down the OLPC community.  that means that
it's now my responsibility to the pyjamas community to get this done,
and i'm PISSED that it's going to cost _me_ money and time when i've
been earning UNDER POVERTY LEVEL INCOME FOR FOUR FUCKING YEARS.

 do you not fucking get it?  we got EVICTED last year - myself, my
partner and my 2-year-old daughter, because i stick to free software
principles and have to turn down lucrative contracts where people in
the United States violate the Treaty of Rome's clauses on intellectual
property ownership.

 you guys have absolutely no idea.  i was _homeless_ for two years,
from about 2007 to 2009 for god's sake.  and i _still_ kept to free
software principles and still kept working on free software.


 Maintaining xpcom bindings for Python is work!  You're probably right
 that it would be more work for you than it would be for a core xpcom
 contributor.  But it's work either way,

 yes, it is.  so go on.  ban me.  come on.  go stick your fingers in
your ears.  make the decision to revoke my bugzilla account (like the
webkit team did, after their deliberate bullying).  see how far that
gets you.

 the damage to the free software community of mark rowe's bullying was
- is - _immense_.

 you want to do the same thing?  go ahead.  because if you don't start
taking responsibility for this instead of going nur, nur it's not our
core focus, i _will_ absolutely pathologically drive you to that.


 and I think you are unlikely
 to convince someone to do work by threatening to be a troll.

 i don't actually know what a troll is.

 however i _will_ be absolutely pathological, persistent and get this done.

 it would be very very good if you found someone _else_ to do the work.

 anyway.

 you've made me extremely angry, but let's forget that that happened, shall we?

 now, back to the subject at hand.

 here's where we are: i'm waiting for ben to acknowledge that the
points made about the dynamic programming language bindings to XPCOM
interfaces make no odds regarding this binary compatibility
argument.

 he very kindly raised the point, which gives us an insight into why
the mistake was made.

 now.

 ben.

 without prejudice.

 it's okay to admit that you made a mistake.

 nobody is going to think anything less of you if you say ah, i made
an error of judgement because i didn't know how pyxpcom+hulahop works

 do you acknowledge that for dynamic programming languages which use
lazy binding, binary compatibility with XPCOM interfaces is
irrelevant?

 i'm keenly aware that all decisions have been made to destroy pyxpcom
based on the mistaken assumption that binary compatibility is
important to dynamic programming languages.

 a simple yes would suffice, then we can move on to the next stage, ok?

l.
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: The future of binary embedding

2012-02-28 Thread Asa Dotzler

On 2/27/2012 1:14 PM, lkcl luke wrote:

btw, ben, about speed of using XPCOM through pyxpcom+hulahop...


Luke, it seems like you've ignored a very important reply to your 
ongoing attempts at educating Mozillians about the value of your 
project. I urge you to re-read what Benjamin said in a previous reply:



I don't think that python-hulahop is strategically important to our core
goals of innovation on the internet. So I don't think that in terms of
the Mozilla mission our core community should make maintenance and
development of that code a priority. I'd be happy to provide a place for
you or somebody else to build a community around python-hulahop, though.


- A
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: The future of binary embedding

2012-02-27 Thread Benjamin Smedberg

On 2/25/2012 7:05 AM, luke.leigh...@gmail.com wrote:

the first question is this: how the heck is it possible that i could create, in 
under 3 weeks, an entire port of pyjamas-desktop to use the MSHTML IE engine, 
*without* requiring access to the proprietary MSHTML Trident Engine?
The browser engine provided by Microsoft has a stable COM API. It also 
does not require the embedder to handle any kind of persistent data 
access: history/cache/cookie stores are handled via a single operating 
system store which is shared across processes.

the key question is this: what is it about the microsoft technology that makes 
this possible?  this is not a rhetorical question.  this is not a sarcastic 
question.  i genuinely require that you actually think, ben, and find out the 
answer (hint: you already implement one.  or used to.  until it was pulled).

No, we didn't.

The ActiveX control provided an emulation layer which satisifed some of 
the behaviors (allowing gecko to run in a process hidden behind at least 
the basic set of Microsoft interfaces). But because we don't have any 
form of cross-process profile sharing, the embedder either had to 
configure and run their own profile directory (and think about the 
consequences of only being able to use that datastore from one process 
at a time) or run without any data store, which is not a well-tested 
gecko configuration and will cause many websites to fail because cookies 
and the cache do not behave correctly.


In addition, the primary way to access DOM nodes through the MS API is 
via IDispatch, and the bridge between IDispach and COM typeinfo was 
never complete and didn't match the Microsoft implementation in key 
ways. The closest cross-platform equivalent we have to IDispatch is the 
NPRuntime, which is pretty well tested but isn't efficient and has 
inherent cycle issues.


and if microsoft can do it, why can't the mozilla foundation?
We *could* do it. But it would require significant engineering effort to 
implement shared profile data, solve the IDispatch-or-equivalent problem 
(especially if we needed it to be safe for object cycles via the cycle 
collector), and then provide real QA and release resources for the 
project. Since we are not prepared to do any of that at this time, it's 
better to be perfectly clear about the situation then string embedders 
along thinking that they have a better solution than they actually have.


--BDS
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: The future of binary embedding

2012-02-27 Thread lkcl luke
allo ben, thanks for taking this up.

On Mon, Feb 27, 2012 at 1:53 PM, Benjamin Smedberg
benja...@smedbergs.us wrote:
 On 2/25/2012 3:53 AM, luke.leigh...@gmail.com wrote:


 We never solved it fully, and each embedder has had to
       spend lots of time tweaking things.

  perhaps it might be worthwhile for the mozilla foundation to find - and
 fund - the people who _do_ understand these things, rather than totally
 abandon existing efforts and leave entire communities completely without
 support:

  http://lists.sugarlabs.org/archive/sugar-devel/2011-June/031865.html

 There is no free lunch. As I noted, finding and funding embedding support
 must necessarily come at the expense of something we could be doing instead.
 Overall I'm not saying that we don't want Mozilla to be embeddable, but that
 there are more important things to work on, both strategically and
 technically. This is not a permanent calculus, and it can change again in
 the future.

 Part of this decision is merely making clear that there hasn't been a
 community maintaining this code effectively. If you'd like to build that
 community, I encourage you to do so!

 well...  there's the problem.

 there's a community *depending* on this stuff *working*, but they are
all python programmers.  they shouldn't _have_ to learn c or c++ -
massive amounts of it.

 and, because this code doesn't actually need development - just
maintenance - there's no community to actually build!

 there's a critical CRITICAL difference between middleware and the
code that *uses* that middleware.  the maintenance and development
cycles are _completely_ different.

 * code that uses middleware requires continuous upkeep, development
etc. in order to stay relevant.  it's also orders of magnitude larger
than the middleware it uses

 * middleware does NOT require constant development.  it works or it
doesn't.  if it doesn't work, it was designed WRONG in the first
place.  middleware DOES however require maintenance to keep up-to-date
with its dependencies (mozilla-core in this case).

 ... how can a community be built around something that requires only
a tiny amount of occasional maintenance?

 ... it can't, can it?  once every year to two years, a couple of
hard-core developers get together, bash out a few updates on the
dependencies, and then go away again?  that's *not* a community, is
it, ben.

 you see what i'm getting at?

 just because xpcom (and hulahop) appear not to have an active
community does *not* mean that they are shit or unmaintained or
should be relegated to third party status or removed entirely from
the mozilla codebase.

 that's the mistake that's been made.


  no it's not.  if you have things like XPCOM which is a dynamic object
 model interface, you don't *need* binary compatibility - you just need to
 make sure that XPCOM works.

  XPCOM, which was based on (inspired by) microsoft's COM, is just as
 misunderstood, it seems, as COM is.

  the benefits of Common Object Model technology are just... i cannot
 emphasise enough how powerful they are.  this is something that the Free
 Software Community as a whole simply does NOT get, to its detriment.
  microsoft dominated computing for nearly two decades thanks to COM/DCOM.
  apple dominates its sector through Objective-C, at the heart of which is,
 yes, you guessed it: a type of Dynamic Object Model system.

 objective-c and COM are fundamentally different in how they achieve
 backwards compatibility. XPCOM working correctly will prevent you from
 crashing, but it only achieves the goal of being *compatible* if you don't
 change the interfaces.

 ah in static programming languages, yes.  in dynamic programming
languages such as python where you use the trick of lazy / dynamic
binding (based on the name) - absolutely NOT.  the changing of the
interfaces is COMPLETELY irrelevant.

 We have tried this, and it's clear that our current
 interfaces are not suited to freezing.

 ben - python doesn't *care* about the interface GUIDs, and as long as
the interfaces are designed by adding extra default arguments (rather
than changing the number or order of the arguments), python doesn't
even care if you _add_ to the interfaces.

 even if you change the type of one of the arguments from say a
nsHTMLImage to a nsHTMLElement python *still* doesn't care!

 this is really really frustrating for me to have to be explaining
this stuff because you should _know_ how it works.

 but there's more.  do you remember this bugreport?
   https://bugzilla.mozilla.org/show_bug.cgi?id=502234

 do you remember that i said that adding that optional_arg concept
was a really bad idea [instead of doing proper IDispatch (coclass)
stuff where you can merge / look up multiple COM interfaces]?

 the reason for that is clear when you look at microsoft's COM IDL
files for MSHTML.  you don't need to look at _microsoft's_ COM IDL
file(s), you can look on the Wine web site, here:

 http://source.winehq.org/source/include/mshtml.idl

 

Re: The future of binary embedding

2012-02-27 Thread lkcl luke
On Sat, Feb 25, 2012 at 4:59 PM, L. David Baron dba...@dbaron.org wrote:

 Has PyXPCOM been hooked up to the cycle collector yet, or do uses of
 APIs that depend on cycle collection just leak memory?

 david, hi, this had me thinking again.   pyxpcom was designed, eek...
a decade ago?  but i'm not sure it's entirely relevant.  the logic
goes as follows:

 * python objects (in c) have their own obj-ref count concept
 * XPCOM objects also have their own obj-ref count concept (AddRef)
which is exactly the same as COM, which inspired XPCOM.
 * when a python object corresponding to an XPCOM object is created,
python takes care of adding *one* and *only* one XPCOM object into the
c data structure, and calls AddRef *once* and *only* once.
 * also at the same time, the python object has its PyObject_Ref
increased (by one, obviously).
 * when you need that exact same XPCOM object, if mark hammond didn't
program a way to look up the python object which was *already* created
to look after it, i'll fall off my bloody chair.
 * so, assuming that mark is the competent programmer that he is, when
you look up an XPCOM object for which a python object already exists,
you DO NOT increase the refcount (AddRef) on the XPCOM object, you
increase the refcount on the *PYTHON* object.
 * when the python object's refcount goes to zero, *python's*
garbage-collection takes care of destroying the python object, and in
the destructor function (in the c-based pyxpcom module), that code
also performs an XPCOM Release call.

 so with this in mind, i do not see how the cycle collector has any
relevance, because pyxpcom is merely a direct reflector of the XPCOM
objects.  but i believe that todd would welcome some input - to todd,
who is the de-facto maintainer of pyxpcom - because he, as the
de-facto maintainer, would be the person with the most experience in
actually sorting it out.

 esp. if it's a global function that, if not called, results in XPCOM
objects not getting properly garbage-collected after the Release or
something - i don't know, because i don't know what this cycle
collector is, or what it does.

 just fyi i went through some... interesting times with webkit's
memory management.  they don't have anything like XPCOM: it's entirely
c++ classes.  a massive suite of virtual base classes that derive from
a class named DOMObject.  mostly :)

 at the ultimate lowest level they had to implement the usual type
id system which lets you externally identify an object even when it's
type-cast back down to the absolute lowest object in the hierarchy
(gobject has something similar, except they do it entirely in c!).
XPCOM and COM both have something similar, except they drop a GUID
into the type field.

 this type id allows you to *BACK*-typecast a c++ object up to its
correct (real) class!

 on top of this, they have c++ refcounting (virtual base class, again).

 as the concept of XPCOM / COM was entirely missing, they have a
templated infrastructure which allows you to map
object-of-the-bound-type to
object-of-the-webkit-type-when-typecast-down-to-the-base-class-type.

 then you have to _manually_ provide a massive suite of upcast
functions which check the type-id and call the next upcast function
in the chain, after doing a switch statement to get there!

 all this to handle the one-for-one representation between (say)
python objects and webkit's c++ objects, or gobjects and webkit's c++
objects.

 but even here, you can _still_ do and only need to do one and only
one refcount increase on a per-object basis, because once you've
gotten into the other side (the bindings), the refcounting of *that*
system takes over.

 so there are close parallels - it's still complicated as hell though :)

 anyway, do let todd know about this cycle collection because i have
no idea if he knows about it.

 l.
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: The future of binary embedding

2012-02-27 Thread lkcl luke
btw, ben, about speed of using XPCOM through pyxpcom+hulahop...

when i said we don't care [because working is a higher priority than
speed, and it's a GUI anyway], i think it helps to give some context.

for the pyjs (compiled) version of any pyjamas application, the fact
that python is a dynamic language, being translated to another dynamic
language, gives a performance hit that's so high it's difficult for
people to believe it could be that bad, just to obtain python feature
interoperability.

[with the end result that they go off and implement their *own*
python-to-javascript compiler, in some cases.  this has actually
happened about four times, now!]

i spoke about this on b2g a couple of months back, when chris jones
(bless him) rather naively said that javascript was acceptable as the
de-facto language of the web implication being in absolutely all
circumstances because of projects such as dart, gwt and pyjamas.

if he'd ever run pyjs he'd've known that that simply isn't true,
because to even do something as simple as use the add operator, you
must check first if the two objects being added actually exist - which
must be done dynamically in case __getattr__ has to be used; then you
have to check the type of both objects (int? float? string?) and go
through a lookup table (!!) to find out if the two are compatible;
then you must coerce one type to the other; then _finally_ you can
actually add the two objects.

that very _very_ small and i mean small description should have you
going oops... and it should emphasise that maybe javascript as a
compiler target isn't such a good idea after all - not for dynamic
languages, anyway.

by contrast: for _static_ programming languages like java, c and c++,
it's great!

but for pyjamas, the performance hit is so high that when you run the
exact same application under pyjd it's a five-fold performance
improvement.

against that kind of background, and bearing in mind that that's still
using name-based lookups for absolutely each and every single access
to absolutely every single one of the functions, objects and
properties of DOM/HTML5, what we have right now looks very very good.

speed's *not* critical.  we're using xulrunner+xpcom+hulahop as a GUI
widget set.  a very powerful and flexible one.  pyjd doesn't have to
be lightning-quick. i've installed it on 400mhz ARM9 CPUs, and it had
perfectly acceptable performance.

l.
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: The future of binary embedding

2012-02-27 Thread lkcl luke
the policy of relegating pyxpcom to third party status within the
mozilla codebase has resulted in these kinds of things, below.

you will recognise this as the consequences of a decision some time in
the past few weeks (which i wasn't party to, because i am an
outsider having no funds or time to pay 24x7 attention to each and
every decision made by the people who _are_ funded by the mozilla
foundation)

basically that decision looks like it involved deliberate splitting of
the header files into public api and not public api.

so, this header file nsIProxyObjectManager.h is treated as internal api...

... but somebody forgot that pyxpcom needs it... because they have
relegated pyxpcom to third party status.

they forgot that pyxpcom *needs* to be built as an internal
component, yet the mozilla foundation has completely failed to provide
a system for building such components, yet at the same time has
basically dumped the responsibility onto other people.

if however pyxpcom was actually part of mozilla-central, then not only
would this problem simply not be present but also it would be a damn
sight easier to find issues.

temporarily i am forced to manually seek out, copy and make available
this nsIProxyObjectManager.h file each and every damn time i do a
rebuild and reinstall of a particular version of the xulrunner
runtime.

that's incredibly tiresome and it's part of the *additional* burden
that the mozilla foundation's decisions are placing onto external
developers.

... developers that are *not* funded by the mozilla foundation, it's
worth once again pointing out.

right now i cannot agree more that the OLPC team made the right
decision to remove all mozilla-foundation-funded technology from their
machines.

l.

c++ -o _xpcom.o -c -I../../../dist/system_wrappers -include
../../../../config/gcc_hidden.h -DOSTYPE=\Linux2.6\ -DOSARCH=Linux
-DMOZ_NO_MOZALLOC -I/usr/include/python2.7
-I../../../../xpcom/src/module -I. -I../../../dist/include
-I../../../dist/include/nsprpub
-I/usr/local/lib/xulrunner-devel-13.0a1/include
-I/usr/local/lib/xulrunner-devel-13.0a1/include/nsprpub
-I/usr/include/nspr  -fPIC   -fno-rtti -fno-exceptions -Wall
-Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy
-Wno-non-virtual-dtor -Wcast-align -Wno-invalid-offsetof
-Wno-long-long -pedantic -DXULRUNNER_13_0A1 -std=gnu++0x -fshort-wchar
-fno-strict-aliasing -pipe -std=gnu++0x  -DNDEBUG -DTRIMMED -Os
-freorder-blocks -fno-reorder-functions-DMOZILLA_CLIENT -include
/usr/local/lib/xulrunner-devel-13.0a1/include/mozilla-config.h
-Wp,-MD,.deps/_xpcom.pp ../../../../xpcom/src/module/_xpcom.cpp
../../../../xpcom/src/module/_xpcom.cpp:68:35: fatal error:
nsIProxyObjectManager.h: No such file or directory
compilation terminated.
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: The future of binary embedding

2012-02-26 Thread lkcl luke
david, hi,

i've got over being taken aback by what you said about the APIs thing,
and it occurred to me that if i didn't provide further information and
explanation there was the risk that people reading my comments could
potentially view the response as being from a har har i'm more
superior than you har har you're so ignorant har har you know nothing
i know everything now go away and educate yourself complete fucking
twonce (viz: a twat _and_ a nonce, rolled into one obsequious
egoistical moron whose fingers should be broken to prevent them from
being able to type on the internet, ever again).

as i'm _not_ that kind of person, it's a responsibility and a duty for
me to clarify what i said.

you said:

I think any future in our embedding API should be based around APIs
designed to be an embedding API, not around a collection of internal
functions gathered up and labeled as an API.  The problem with the
latter is that it's hard to avoid changing them, because they
weren't designed to be permanent.

the thing is: xpcom isn't an API, it's middleware which *provides*
access to APIs.  dynamically.  changes to the APIs that are reflected
*through* XPCOM automatically are available.

thus, XPCOM-the-API requires no labelling.  it just... is.  it
works, it's done.  no further development required.  that's the nature
of Common Object Models [as long as they've actually been designed
properly...]

thus also, any APIs that are *available* through XPCOM are *also* not
your problem.  they simply aren't.  they're available - transparently
- end of story.

... do you see therefore what i was driving at?

now in addition to that, there's hulahop, which is the next layer
up, and it's... if you will... grounding of both the
XPCOM-accessible NPAPI and the gecko engine into the reality of
python from a declarative programming perspective.

look closely at this:
http://pyxpcomext.mozdev.org/no_wrap/tutorials/hulahop/xpcom-hulahop.html

look first at the implementation of progresslistener.py.  what do you
notice about it?  it's nothing more than an object-orientated
wrapper, in python, around the XPCOM-accessible
nsIWebProgressListener interface, isn't it?

so there _is_ no API to be developed, here, is there?

then, come back to the main hula.py file.  what do you notice?  what
evidence of the existence of any mozilla-required APIs do you see?
what in that file requires any actual API design?  i honestly cannot
see any.

these lines, for example:
   # this is equivalent to ~/.firefox profiles subdirectory
   hulahop.startup('/home/lkcl/test')

they are absolutely essential.  there's no design required.  ok,
perhaps you might pick a different name from startup, but who
honestly cares about that?

then there's the ContentInvoker class.  this is required as part of
the XPCOM API, which is set in stone, is not going to change.  the
invocation and linking of ContentInvoker class instances is, again,
set in stone:

listener = xpcom.server.WrapObject(ContentInvoker(self),
interfaces.nsIDOMEventListener)

 so that is inviolate, as well.  no API development required.

the class Browser, which derives from the c-based python-gtk module
WebView, is where there *might* be room for API Development, but
there you're actually actively constrained by the _GTK_ API, or more
specifically by the python-gtk2 API, which defines how pygtk widget
APIs are written.

so absolutely no development of APIs is required *there*, either.

about the only function which looks slightly odd, to me, is this
do_setup function.  i don't actually know the deep compelling
technical reason why that's there, and i mention that in the tutorial.
 looking in the source code hulahop.c it's _still_ not blindingly
obvious, but i'm not going to worry about it.  the main point is: it
appears to be a techical detail associated with the fundamentals of
python c-based modules, getting over some problem/issue that the
hulahop developers created, and, again, it has absolutely nothing to
do with xulrunner APIs.

conceivably you could argue that the name of this function do_setup
could be changed, but what would be the point?

so, throughout the entire hulahop codebase there is nothing -
absolutely not one single thing - that requires designing.  the
hybrid combination of the various bits of technology *automatically*
defines the published and public API.

you create a widget, you get access to the NPAPI.  wow!  that's so
simple, it's actually difficult to make it complicated enough for
people to grasp the significance.

so do you see?  not only is there no API designing required, but there
exists proven stable code that already *implements* the
already-automatically-technically-constrained API.  code which, if
you even tried to modify it would result in yet further (and
unnecessary) knock-on effects for the users of that code in an already
untenable situation.

anyway.  i'll try tackling pyxpcom to see if i can get it

Re: The future of binary embedding

2012-02-25 Thread luke . leighton
On Monday, March 28, 2011 10:03:11 PM UTC+1, Benjamin Smedberg wrote:
 Last summer, I led a session at the Mozilla summit to discuss whether 
 and how we ought to continue supporting our various embedding efforts 
 (gtkmozembed, javaxpcom, the ActiveX control, the NSView embedding 
 widget, etc) given the effort involved in preserving their various 
 degrees of code and binary compatibility with Mozilla core. We came the 
 following conclusions:
 
 * Embedding Mozilla rendering into other processes is a tough
   problem.

 no it's not - the python-hulahop widget uses GTK just like firefox does: it 
works perfectly, and it even provides access to XPCOM so that python-xpcom can 
get hold of the NPAPI and use DOM functionality in exactly the same way that 
javascript does [when xulrunner is embedded in firefox]

 We never solved it fully, and each embedder has had to
   spend lots of time tweaking things.

 perhaps it might be worthwhile for the mozilla foundation to find - and fund - 
the people who _do_ understand these things, rather than totally abandon 
existing efforts and leave entire communities completely without support:

 http://lists.sugarlabs.org/archive/sugar-devel/2011-June/031865.html



 * Firefox is the key product of the Mozilla project; to the extent
   that supporting embedding takes away from Firefox, we should
   strongly prioritize Firefox.
 * Binary compatibility of our embedding bindings is a high cost
 
 no it's not.  if you have things like XPCOM which is a dynamic object model 
interface, you don't *need* binary compatibility - you just need to make sure 
that XPCOM works.

 XPCOM, which was based on (inspired by) microsoft's COM, is just as 
misunderstood, it seems, as COM is.

 the benefits of Common Object Model technology are just... i cannot emphasise 
enough how powerful they are.  this is something that the Free Software 
Community as a whole simply does NOT get, to its detriment.  microsoft 
dominated computing for nearly two decades thanks to COM/DCOM.  apple dominates 
its sector through Objective-C, at the heart of which is, yes, you guessed it: 
a type of Dynamic Object Model system.


   which is not worth the benefits.

 what??? completely abandoning and orphaning entire communities is seen as 
beneficial??

 * As we move Firefox into a multiple-process model, the embedding
   solution we really want is very different from the one we
   currently have: we really want embedders to be simple containers
   for a separate Firefox process which would do the actual web
   rendering.
 
 Because of this, I'm planning on making the following changes in our code:
 
 * Remove gtkmozembed and its supporting code. 
 
 that's actually very sensible.  gtkmozembed is pretty lame.  it doesn't go 
nearly far enough.  without dynamic language bindings - i.e. without access to 
what's actually *in* the web page, who the hell just wants to drop a web 
rendering engine into an application?

 you didn't go far *enough*, ben.

 people want to be able to drop in widgets into the middle of the HTML page: 
they want to be able to respond interactively to events (DOM events) - but not 
just in c, it has to happen in *all* programming languages, be it c, c++, java, 
python, ruby, perl - anything.

 now.
 
 that *is* possible with python-hulahop.

 so do you think it would be a good start for the mozilla foundation to adopt 
python-hulahop as the beginnings of reversing this trend towards isolation of 
the mozilla foundation from absolutely everything but javascript, javascript, 
javascript and firefox, firefox, firefox?

 The promise of
   gtkmozembed was a binary-compatible wrapper that GTK applications
   could use to easily get web rendering into their application.
   Without significant supporting code to deal with profiles,
   certificates, prompts, and other details, this code doesn't work
   correctly, and is unmaintained.

 hulahop manages absolutely fine.  all that's written in python.  it just 
works.  



 As a project, we aren't going to spend effort trying to solve the 
 problems associated with in-process embedding. Once separate-process 
 rendering is implemented in Firefox, we may consider ways to make really 
 simple multi-process embedding a possibility.

 it's not enough.

 you need to have the dual worlds functionality.  a foot in the embedded 
widget door *and* a foot in the DOM world, via XPCOM.

 hulahop provides exactly that.

 the problem is that because it's third party, it's absolute hell for 
non-funded part-time free software community members to keep it up-to-date, and 
the mozilla-foundation-driven release cycle does *not* include hulahop, meaning 
that releases like xulrunner 10.0.2 go out the door with serious memory 
corruption problems that, more by luck than judgement, happen *not* to be hit 
by firefox... but that hulahop runs smack into with a segfault.

 what is the mozilla 

  1   2   3   4   5   6   7   8   9   10   >