Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Running Gecko without a UI design question

12 views
Skip to first unread message

andrej

unread,
May 2, 2008, 11:51:13 AM5/2/08
to

I'm trying to build Gecko that I can run on a server for some
automation. So, there's no UI, and I
don't need pages to be rendered at all.

What I have is working somewhat (learned a lot from Jaxer's source
code), but many events do not work. E.g. calling click() on an
HTMLInputElement doesn't do anyting because there's no pres shell
and no pres context. So no onclick() event handler is called. Also,
the onload event handler of a
body tag is not called because there's no nsIContentViewer (so
LoadComplete is not called).

Instead of hacking Gecko to make these work, I wonder if there's a
better way, and that is to
create a new Toolkit, that implements all the interfaces, just doesn't
render anyting.

Is it straight forward to create a Toolkit that just doesn't render
anyting? Ideally embedding Gecko
using a No-UI toolkit. Or is it just better to hack Gecko and to
tackle issues one by one?

Thx
Andrej

rocal...@gmail.com

unread,
May 3, 2008, 5:04:26 AM5/3/08
to
On May 3, 3:51 am, andrej <gab...@gmail.com> wrote:
> Instead of hacking Gecko to make these work, I wonder if there's a
> better way, and that is to
> create a new Toolkit, that implements all the interfaces, just doesn't
> render anyting.
>
> Is it straight forward to create a Toolkit that just doesn't render
> anyting? Ideally embedding Gecko
> using a No-UI toolkit.

People tried that approach a long time ago --- "Crystalzilla" was one
attempt, with code available, but the code rotted long ago.

One problem with that approach is plugins. Do you care about plugins
working?

Rob

Mike Shaver

unread,
May 3, 2008, 11:54:05 AM5/3/08
to rocal...@gmail.com, dev-pl...@lists.mozilla.org
On Sat, May 3, 2008 at 5:04 AM, rob...@ocallahan.org
<rocal...@gmail.com> wrote:
> On May 3, 3:51 am, andrej <gab...@gmail.com> wrote:
> > Instead of hacking Gecko to make these work, I wonder if there's a
> > better way, and that is to
> > create a new Toolkit, that implements all the interfaces, just doesn't
> > render anyting.
> >
> > Is it straight forward to create a Toolkit that just doesn't render
> > anyting? Ideally embedding Gecko
> > using a No-UI toolkit.
>
> People tried that approach a long time ago --- "Crystalzilla" was one
> attempt, with code available, but the code rotted long ago.

Another is Aptana's Jaxer, though I'm not sure it renders things
(might just be content model):

http://aptana.com/jaxer

Mike

andrej

unread,
May 4, 2008, 12:57:22 PM5/4/08
to

No, I don't care about plugins. After reading up on Crystalzilla, it
seems it still does render,
just offscreen. There are other projects similar like this such as
bbMozlib, llMozlib, or
OffscreenGecko - they all still render, just to a buffer. But, I would
like no layout and no
rendering at all (for performance and resources).

On May 3, 11:04 am, "rob...@ocallahan.org" <rocalla...@gmail.com>
wrote:

andrej

unread,
May 4, 2008, 1:06:11 PM5/4/08
to

Yep, I know about Jaxer, and I've learned a lot from its source code
changes and
build integration in Mozilla (I've diffed Jaxer with Firefox source
code release).

Jaxer doesn't render at all, it only serialize the DOM tree after some
server
scripts have executed. So, with Jaxer, you can manipulate the DOM tree
by server-side scripts, and from that generate the page again which is
sent
to a client. It doesn't care much about event handling, such as
"onclick".

I think I'm pretty close as I can load pages, walk the dom tree, run
client-side scripts that manipulate the dom tree. Only events and form
submission
don't work, as well as loading of frames in a frameset. Looks like I
have to
tackle those problems one by one...

0 new messages