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

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 Brows

Re: The future of binary embedding

2011-04-08 Thread Grant Gayed
Actually Eclipse uses XPCOM to embed xulrunner, and exposes JavaXPCOM to clients. So the second part is of course dependent on JavaXPCOM's fate, but the embedding part could continue on without JavaXPCOM. Grant "Benjamin Smedberg" wrote in message news:mailman.1997.1302204651.16651.dev-embe

Re: The future of binary embedding

2011-04-01 Thread Grant Gayed
Hi Benjamin, > As a project, we aren't going to spend effort trying to solve the problems > associated with in-process embedding. Can you clarify what this means? Is it just referring to the dropping of gtkmozembed/javaxpcom/ActiveX control? Or is it saying that once mozilla has entered the

Re: JavaXPCOM, nsIFavIconService

2010-03-23 Thread Grant Gayed
The lines you want are: nsIServiceManager serviceManager = Mozilla.getInstance().getServiceManager(); nsIFaviconService service = (nsIFaviconService)serviceManager.getServiceByContractID("@mozilla.org/brows er/favicon-service;1", nsIFaviconService.NS_IFAVICONSERVICE_IID); If you're asking which s

Re: Bogus painting in xul-1.9.0.5/Win32

2009-01-05 Thread Grant Gayed
Hi, This is logged as https://bugzilla.mozilla.org/show_bug.cgi?id=453523 . It's not expected behaviour, because this same problem was fixed on gtk prior to the 1.9 release, see https://bugzilla.mozilla.org/show_bug.cgi?id=415789 . Grant "Dmitry Dartz" wrote in message news:46idnz6fopqbe8lunz2

injecting javascript

2008-05-05 Thread Grant Gayed
Hi, To execute a javascript string in a displayed .html page our embedding app uses nsIWebNavigation.LoadURI(...) to navigate to "javascript://;void(0);". This works generally well, but has problems with javascript strings that are read from a multi-line source and therefore may contain content l

Re: Problem with gmail on embedded browser

2008-05-02 Thread Grant Gayed
Hi Glen, There was a problem until recently in SWT's Safari-based Browsers when accessing gmail and google calendar because they look for certain user-agent strings in the request header to decide what to enable. Embedding cases may not have these strings if they are added by the browser (eg.- "F

Re: https in java embedding - crashes

2008-04-11 Thread Grant Gayed
ote in message news:[EMAIL PROTECTED] > On Apr 10, 7:50 pm, "Grant Gayed" <[EMAIL PROTECTED]> wrote: > > I'm not sure about the approach you describe. The SWT Browser does this by > > calling NS_InitXPCOM2(...) at creation time, and providing a > > ns

Re: https in java embedding - crashes

2008-04-10 Thread Grant Gayed
ant "krithika" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Apr 4, 6:32 pm, "Grant Gayed" <[EMAIL PROTECTED]> wrote: > > I think this happens when you either don't have a profile directory set, or > > you may have one set

Re: https in java embedding - crashes

2008-04-04 Thread Grant Gayed
I think this happens when you either don't have a profile directory set, or you may have one set that does not exist or cannot be written to. HTH, Grant "krithika" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I have embedded Gecko1.8.1.4 in my java application.I have been using

Re: handling popups and target="_blank" links

2008-04-04 Thread Grant Gayed
Hi Bart, To see popups like this in the swt Browser you need to add a couple of extra listeners, as demonstrated in http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet270.java?view=co . The Browser receives notifications for these by setting a Wi

showing invalid certificate page/dialog in xulrunner 1.9

2008-01-31 Thread Grant Gayed
Hi, I see in xulrunner trunk builds that embedders can no longer have invalid certificates handled for them by simply providing a window (in response to an nsIWindowCreator2 request) for xulrunner to fill in. In the latest Firefox 3.0b3 this error dialog has been replaced by an error page that al

Re: nsiWebBrowserFind and SWT browser

2007-11-26 Thread Grant Gayed
See the SWT.Selection listener below: import org.eclipse.swt.*; import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*; import org.eclipse.swt.browser.*; import org.mozilla.interfaces.*; public class Main { public static void main(String [] args) { Display display = new Display ();

Re: Executing JS code in hosted browser.

2007-07-23 Thread Grant Gayed
Hi Jacek, I think the following does what you want (written in terms of java/javaxpcom): String url = "javascript:" + script + ";void(0);"; nsIWebNavigation navigation = (nsIWebNavigation)webBrowser.queryInterface(nsIWebNavigation.NS_IWEBNAVIGATI ON_IID); navigation.loadURI(url, nsIWebNavigation.

stream append fails with content charset=utf-8

2007-06-22 Thread Grant Gayed
Hi, I started with a large test page, but have been able to reduce it to the following: hi1hi2 When I navigate to this page with nsIWebNavigation.LoadURI(...) it works fine. However when I try to set it as the browser's content directly using its nsIWebBrowserStream, once the full "meta" tag ha

Re: difference between navigating to url and clicking link to url

2007-04-24 Thread Grant Gayed
Thanks for the help Boris, it's working for me now. Grant "Boris Zbarsky" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Grant Gayed wrote: > > - Is it expected that nsIURIContentListener.IsPreferred(...) gets called > > when clicking on a link

difference between navigating to url and clicking link to url

2007-04-19 Thread Grant Gayed
Hi, I implement and provide a nsIURIContentListener via nsIWebBrowser.SetParentURIContentListener(...). Works as expected, at least on the surface: If I navigate directly to a url that is a pdf (I have the Acrobat reader plug-in installed) then after calling my nsIURIContentListener.OnStartURIOpe

Re: Embeded Mozilla in SWT

2007-04-04 Thread Grant Gayed
ox browser to change the properties (that cookies should > only be saved for a session and some other settings) > But the embedded Browser that uses exactly this profile doesn't care > about the settings. It also ignores every extension installed in this > profile. > > Mar

Re: Embeded Mozilla in SWT

2007-04-03 Thread Grant Gayed
rom the user profile directory? > > Is there a way to get a completely working firefox user profile? > > Regards > Martin > > Grant Gayed schrieb: > > (note that questions like this that are specific to the swt Browser are best > > asked on the eclipse.platform.swt

Re: Embeded Mozilla in SWT

2007-04-03 Thread Grant Gayed
(note that questions like this that are specific to the swt Browser are best asked on the eclipse.platform.swt newsgroup) I'm not sure that I understand the question. Is the problem that the swt browser is not seeing your Flash plug-in? If so, this is likely because the plug-in is installed with

pop-up window with missing content plug-in behaviour changes

2007-03-21 Thread Grant Gayed
Hi, If I'm using a GRE that does not have a Flash plug-in installed, navigating to http://64.233.179.104/translate_c?hl=en&u=http://www.sohu.com/&prev=/search%3Fq%3Dnews.sohu.com%26hl%3Den shows the page, pops up an empty advertisement window (by invoking our nsIWindowCreator2) that contains Flash

Re: Embedding Gecko Rendering engine in linux

2007-03-12 Thread Grant Gayed
If you want to do this with swt's Browser: - requires: - xulrunner 1.8.1.2 (I see that you have this already) - a very recent 3.3 stream swt (eg.- http://download.eclipse.org/downloads/drops/I20070306-1200/index.php ) Example snippet: import org.eclipse.swt.SWT; import org.eclipse.swt.browser

Re: GRE_GetGREPathWithProperties returning wrong arch XULRunner

2007-02-23 Thread Grant Gayed
> i think the simpler question is: why do you have a 64bit version of > xulrunner (or any other gecko) anywhere? Anyone running on a recent 64-bit linux distro is likely to have one of these that came with the OS. If GRE_GetGREPathWithProperties answers this as a GRE that satisfies your version r

GRE_GetGREPathWithProperties returning wrong arch XULRunner

2007-02-19 Thread Grant Gayed
Hi, I'm living in a setup where I always have the same home directory regardless of which Linux machine I log onto (it's on a shared network). I don't know how common this is. This causes me a problem when my app invokes GRE_GetGREPathWithProperties while I'm on a 64-bit Linux machine because th