nanogui: Thread: WebKit based browser for Nano-X


[<<] [<] Page 1 of 1 [>] [>>]
Subject: WebKit based browser for Nano-X
From: "Georg Potthast" ####@####.####
Date: 14 Dec 2014 12:37:03 -0000
Message-Id: <C4DF1E9B250D47FF912503241B1A739D@SCHREIBTISCHGP>

I made an FLTK GUI frontend for WebKit. My browser is called NetRider and 
can be downloaded here:
https://sourceforge.net/projects/netrider/

Since FLTK can run on NXlib I also got my NetRider browser to work with 
NXlib/nano-X.

I do not have plugins working yet, but the rendering is very good and there 
is Javascript support.

In this project, WebKit is compiled into a shared library. This library does 
not depend on FLTK or X11.
So it would be possible to write a GUI frontend using just Nano-X too.

Georg 

Subject: Re: [nanogui] WebKit based browser for Nano-X
From: "Georg Potthast" ####@####.####
Date: 14 Dec 2014 20:08:41 -0000
Message-Id: <DF8EAFABDFC046049C919269E4CDD979@SCHREIBTISCHGP>

I made a tiny Linux distro called Nanolinux which includes the Dillo browser. https://sourceforge.net/projects/nanolinux/

This distro uses NXlib and FLTK instead of X11 and GTK. I wanted to have a better browser for this distro replacing the Dillo browser so I started with the NetRider project. Also I thought it would be a good thing to have an FLTK GUI for WebKit in addition to GTK and Qt.

Lauri and I started out about the same time with our FLTK browser projects not knowing of each others plans. Now our projects run in parallel. Even though we both use FLTK the projects are quite different.

One difference I see is that the webkit library I made is platform independent while he uses FLTK within his webkit library. So I could make an SDL test application that uses my webkit library and as I mentioned a nano-X GUI could be made as well.

Georg
  ----- Original Message ----- 
  From: Talmai Oliveira 
  To: Georg Potthast 
  Cc: ####@####.#### ; Greg Haerr 
  Sent: Sunday, December 14, 2014 4:40 PM
  Subject: Re: [nanogui] WebKit based browser for Nano-X


  This is awesome. I remember (many many years back) trying to get something similar to this to work on a specific platform, but unable to build all dependencies. Eventually, we just moved on...


  Just for clarification, could you explain the background of this project? And where is it being used, or what's driving the development efforts? Just overall curious.


  How does your project compare against other efforts, such as https://github.com/clbr/webkitfltk


  Thanks 

  On Sunday, December 14, 2014, Georg Potthast ####@####.#### wrote:

    I made an FLTK GUI frontend for WebKit. My browser is called NetRider and can be downloaded here:
    https://sourceforge.net/projects/netrider/

    Since FLTK can run on NXlib I also got my NetRider browser to work with NXlib/nano-X.

    I do not have plugins working yet, but the rendering is very good and there is Javascript support.

    In this project, WebKit is compiled into a shared library. This library does not depend on FLTK or X11.
    So it would be possible to write a GUI frontend using just Nano-X too.

    Georg 

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: ####@####.####
    For additional commands, e-mail: ####@####.####

Subject: Re: [nanogui] WebKit based browser for Nano-X
From: "Georg Potthast" ####@####.####
Date: 19 Dec 2014 18:56:52 -0000
Message-Id: <AC30975743034D83B4F7B9A072B726C0@SCHREIBTISCHGP>

Hi Vidar,

porting such a large library is not simple. However, it may not be that complicated as it seems at first glance. As you know there are already several ports of WebKit to Amiga based on Origyn which is based on WebKit. Also Laura managed to port it to MinGW.

My port uses the Skia graphics library, but it could also be reconfigured to use Cairo. So Aros would need to support one of these. Then my port uses Curl for downloading the web pages. This can be reconfigured to libsoup if required.

I did a search on the code base and there was no "fork()" command in it which did surprise me. I guess threads are handled within Curl using the multi interface. A browser typically opens several threads to download the web page and its images etc. in parallel but you can ask Curl to do that for you internally.

WebKit, at least my port, does not need a GUI, it makes Skia or Cairo pass a "canvas" showing the web page to the browser application. Then the application can make query calls whether the cursor is on a link, whether a file download URL was selected etc.

I did not write a porting guide since I thought nobody would be interested to read it anyways. But I am willing to help if required. As long as I do not have to write code for that other project.

Georg
  ----- Original Message ----- 
  From: Vidar Hokstad 
  To: Georg Potthast 
  Cc: ####@####.#### ; Greg Haerr 
  Sent: Friday, December 19, 2014 1:03 PM
  Subject: Re: [nanogui] WebKit based browser for Nano-X


  Very impressive. I've not actually done anything with NanoX since I worked on a webpad that was intended to use it back in '99, but I've stayed on the mailing list because I love the fact that there's still new stuff being built for it...


  How portable is the underlying webkit library? E.g. does it rely on things like pthreads, or other more "complicated" POSIX/Linux-isms? Reason I'm asking is that I'm also (very occasionally) hacking on AROS - an AmigaOS reimplementation, and it might be interesting to try to port it. (pthreads and fork() tends to be the biggest obstacles).


  Regards,
  Vidar




  On Sun, Dec 14, 2014 at 12:36 PM, Georg Potthast ####@####.#### wrote:
    I made an FLTK GUI frontend for WebKit. My browser is called NetRider and can be downloaded here:
    https://sourceforge.net/projects/netrider/

    Since FLTK can run on NXlib I also got my NetRider browser to work with NXlib/nano-X.

    I do not have plugins working yet, but the rendering is very good and there is Javascript support.

    In this project, WebKit is compiled into a shared library. This library does not depend on FLTK or X11.
    So it would be possible to write a GUI frontend using just Nano-X too.

    Georg 

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: ####@####.####
    For additional commands, e-mail: ####@####.####

Subject: Re: [nanogui] WebKit based browser for Nano-X
From: "Georg Potthast" ####@####.####
Date: 19 Dec 2014 19:15:25 -0000
Message-Id: <DF116F4ABACA4F518FE72BEB33815B93@SCHREIBTISCHGP>

Hi Vidar,

if you start off, there is an SDL WebLauncher application included which may be simpler to start with for you than FLTK. I assume SDL is already ported to Aros. Of cause really usable is the FLTK browser.

Please consult my Readme file which should really help you. And compile it on Linux first to see how far you get with that and what you will encounter when trying to compile it on Aros.

Georg
  ----- Original Message ----- 
  From: Vidar Hokstad 
  To: Georg Potthast 
  Cc: ####@####.#### ; Greg Haerr 
  Sent: Friday, December 19, 2014 8:06 PM
  Subject: Re: [nanogui] WebKit based browser for Nano-X


  Hi Georg,


  On Fri, Dec 19, 2014 at 6:56 PM, Georg Potthast ####@####.#### wrote:


    porting such a large library is not simple. However, it may not be that complicated as it seems at first glance. As you know there are already several ports of WebKit to Amiga based on Origyn which is based on WebKit. Also Laura managed to port it to MinGW.

  Yes, I'm aware. There's been ongoing challenges with keeping those ports up to date, though (they may have been resolved; not sure, but more options is always great), which is why I got interested when you mentioned yours had quite few dependencies.

    My port uses the Skia graphics library, but it could also be reconfigured to use Cairo. So Aros would need to support one of these. Then my port uses Curl for downloading the web pages. This can be reconfigured to libsoup if required.


  That part would likely be quite easy (fun fact: Curl was started by an ex. Amiga developer)

    I did a search on the code base and there was no "fork()" command in it which did surprise me. I guess threads are handled within Curl using the multi interface. A browser typically opens several threads to download the web page and its images etc. in parallel but you can ask Curl to do that for you internally.


  That's good news - fork() is by far the trickiest to porting stuff usually, since AROS is single-address-space and doesn't really have memory protection (there are some plants, but they'd retain the single-address-space nature which doesn't work well with fork()).
    
    WebKit, at least my port, does not need a GUI, it makes Skia or Cairo pass a "canvas" showing the web page to the browser application. Then the application can make query calls whether the cursor is on a link, whether a file download URL was selected etc. 

    I did not write a porting guide since I thought nobody would be interested to read it anyways. But I am willing to help if required. As long as I do not have to write code for that other project.


  That's great. Thanks. I'll have a look at your FLTK version first (and have a look at Nano-X again for the first time in a decade or so perhaps), and then I'll see if I get a chance to try to compile it in my AROS environment to see what breaks... There is/was even a work in progress FLTK port to AmigaOS at one point, so it might be possible to use that.


  Regards,
  Vidar

Subject: Re: [nanogui] WebKit based browser for Nano-X
From: LM ####@####.####
Date: 22 Dec 2014 12:52:52 -0000
Message-Id: <CAFipMOEpRWR5KaJUc7SRin9F7Yab9TQX9YPGjBWguD2C99NLiw@mail.gmail.com>

On Fri, Dec 19, 2014 Vidar wrote:
> How portable is the underlying webkit library? E.g. does it rely on things like pthreads, or other more "complicated" POSIX/Linux-isms? Reason I'm asking is that I'm also (very occasionally) hacking on AROS - an AmigaOS reimplementation, and it might be interesting to try to port it. (pthreads and fork() tends to be the biggest obstacles).

Would be great to get wkccc working on a variety of platforms including AROS.

It does pull in pthreads for the Windows build and needs sockets
support and libraries like icu and libxslt.  As Georg mentioned, no
fork support needed.  Windows doesn't have any real support for fork
either unless you use something like Cygwin.  From what I remember
reading, Google and Apple had differing opinions on where the majority
of threading should take place.  One group wanted the threading
basically at the browser level for backward compatibility and the
other wanted it integrated more into the webkit library.  wkccc on
Windows also needed glew which probably means there are some OpenGL
requirements.  I don't believe it needed glew on the Linux versions,
but I think it still may have used OpenGL.  Does AROS have OpenGL
support?  I've been doing some work on using PicoGL (which needs a
library like SDL as a base) instead of OpenGL, but so far, I've only
got this working with some OpenGL demos and most recently with Emilia
Pinball.

Is there a port of pthreads to AROS?  I'm curious because I'm working
on some C11 thread support so I can use that on Windows.  Was hoping
at some point to expand it and use it as the base for some pthreads
support for a port to Windows of the newlib C library.  It's still
very much a work in progress, but 'm wondering how portable my C11
thread code would be.  I've tried to use mostly semaphores and some
atomic operations as the foundation for it.  Still a work in progress
and hasn't been tested yet though.  One of my goals is to make it as
portable as possible.

Sincerely,
Laura
http://www.distasis.com/cpp
Subject: Re: [nanogui] WebKit based browser for Nano-X
From: "Georg Potthast" ####@####.####
Date: 22 Dec 2014 17:22:04 -0000
Message-Id: <33922FD6BBD64F49B6B4EE39B89EF13A@SCHREIBTISCHGP>

Glew is needed by the skia graphics library the WKCCC library is using, 
WKCCC itself does compile without it.

Regarding pthreads, apparently the WebKit library can be compiled in single 
threading mode. In the file JavaScriptCore/wtf/platform.h the capabilities 
of various platforms can be set. One platform sets:
#define ENABLE_SINGLE_THREADED 1

which apparently is used in other parts of the code as:
#if ENABLE(SINGLE_THREADED)

So I guess you can remove the pthreads dependency this way.

Georg


----- Original Message ----- 
From: "LM" ####@####.####
To: ####@####.####
Sent: Monday, December 22, 2014 1:52 PM
Subject: Re: [nanogui] WebKit based browser for Nano-X


On Fri, Dec 19, 2014 Vidar wrote:
> How portable is the underlying webkit library? E.g. does it rely on things 
> like pthreads, or other more "complicated" POSIX/Linux-isms? Reason I'm 
> asking is that I'm also (very occasionally) hacking on AROS - an AmigaOS 
> reimplementation, and it might be interesting to try to port it. (pthreads 
> and fork() tends to be the biggest obstacles).

Would be great to get wkccc working on a variety of platforms including 
AROS.

It does pull in pthreads for the Windows build and needs sockets
support and libraries like icu and libxslt.  As Georg mentioned, no
fork support needed.  Windows doesn't have any real support for fork
either unless you use something like Cygwin.  From what I remember
reading, Google and Apple had differing opinions on where the majority
of threading should take place.  One group wanted the threading
basically at the browser level for backward compatibility and the
other wanted it integrated more into the webkit library.  wkccc on
Windows also needed glew which probably means there are some OpenGL
requirements.  I don't believe it needed glew on the Linux versions,
but I think it still may have used OpenGL.  Does AROS have OpenGL
support?  I've been doing some work on using PicoGL (which needs a
library like SDL as a base) instead of OpenGL, but so far, I've only
got this working with some OpenGL demos and most recently with Emilia
Pinball.

Is there a port of pthreads to AROS?  I'm curious because I'm working
on some C11 thread support so I can use that on Windows.  Was hoping
at some point to expand it and use it as the base for some pthreads
support for a port to Windows of the newlib C library.  It's still
very much a work in progress, but 'm wondering how portable my C11
thread code would be.  I've tried to use mostly semaphores and some
atomic operations as the foundation for it.  Still a work in progress
and hasn't been tested yet though.  One of my goals is to make it as
portable as possible.

Sincerely,
Laura
http://www.distasis.com/cpp

---------------------------------------------------------------------
To unsubscribe, e-mail: ####@####.####
For additional commands, e-mail: ####@####.####

[<<] [<] Page 1 of 1 [>] [>>]


Powered by ezmlm-browse 0.20.