My progress at porting Ladybird, the SerenityOS Browser

Skia should definitely be ported to Haiku one day, as in the long run it will open the way for a Chromium port. But unfortunately it doesn’t look like the most pleasant library to port:

They also don’t accept patches for a new operating systems, which is a shame. (Sigh. I wish Google open-source projects were more open minded and adopted the tiered platform support model, like Firefox, Rust or Node.js do).

Google deciding not to support other operating systems saves me the trouble. I honestly don’t see any value in a chromium port ever. It’s already basically an illegal monopoly, and they don’t need any more market share.

4 Likes

It is a factual monopoly, that’s true. But IIRC, Skia presence would be also beneficial for a Firefox port (even though not strictly required).

Exactly this!
It’s a shame that Ladybird decided to use Google crap :cry:
We already have a Chromium port with QtWebEngine,it seems it doesn’t even require Skia?
Anyway,I try avoid using QtWebEngine browsers if the website I want to visit also works in another one.
Chromium is a illegal monopoly which doesn’t care about anything but the big three (Windows, Linux, MacOS) and doesn’t even accept patches for the BSDs which would be near to zero effort for them,but they just don’t want it.

Having a LibreWolf (Firefox minus spyware) port would be more than welcome here,but as long as it doesn’t strictly require Google crap,I think it’s better to avoid it.

Google Chrome and Chromium by extension is the biggest threat to the open web much like IE6 was back in the day.

1 Like

I wonder if dabbling with old dead BeOS web browser and folding in new web browser tech is feasible?

https://netoptimist.sourceforge.net/

http://lexbor.com/
https://duktape.org/

Trying to modernize those outdated browsers with only basic features and making them support modern web standard is as much work as writing a new browser from scratch - what the Ladybird project did with a huge number of volunteers and what I think is impossible to do alone in a reasonable time frame.
What may be easier is writing a native UI around a modern web engine library.
The browser UI isn’t the big challenge,rendering websites corrently with all the modern features is the hard task.
In fact,I hoped that a native UI around the Ladybird LibWeb engine could be written for Haiku,given that the platform support is mature and upstreamed.
With recent developments,I doubt that will now ever happen.

Now,if you have good C++ knowledge,it’s probably best to invest your time into improving NetSurf (also one of this rather basic browsers,with great native integration but not so great support for modern web standards) or WebPositive (rather good support for modern web standards,probably more work to do on the Browser (non-Engine) side to add things like Add-ons,Adblocker and such).

Another good chance to get a modern Browser with lots of features may Pale Moon become in the future.
Unfortunately their build system still requires Python 2 which has been EOL and removed from Haiku a long time ago,but there’s interest in finally upgrading it to Python 3: Build system development (python3, perl, etc.) - Pale Moon forum
After that is ready,it may be worth giving it a try again.

1 Like

Not exactly surprising, since Firefox and WebKitGTK also use that. If your goal is not to write a web browsaer from scratch, certainly you don’t want to spend the first 10 years writing a 2D graphics rendering library from scratch.

As for it being crap, well, Google certainly isn’t a great company to work with, but still, they have engineers who know what they are doing. So, Skia actually does a good job at 2D rendering. Yes, it pretty much is a Google internal product where the sources happen to be published to the outside world. But it seems it does such a good job that every “serious” browser development is going to use it. In the case of WebKit, they are “vendoring” it, that is, keeping their own copy of it in their own sourcetree, I assume with a different buildsystem and some patches.

If you are looking for something easily portable outside of mainstream platforms, the choices are mainly WebKit and NetSurf. Maybe also Dillo now (it has been ressurected recently, after being dormant for a few years following the death of one of the lead developers).

3 Likes

While I could understand that they use existing libraries if they start to build a new browser from scratch today,I totally do not understand that they replace their own work that they have already written for SerenityOS and move to using third-party stuff instead.
For me,personally,Ladybird has changed from a refreshing do it yourself community project into a “put source-available corporate shit into a mixer once again” thing in a matter of only a few days.

Maybe I should have a look at Dillo again,last time I saw it was when it was unmaintained.
Besides that,I care most about Gecko-based browsers because they’re usually quite fast and feature rich.
Mozilla as a company isn’t a lot better than Google or Micro$oft,but there are luckily many forks which remove the evil telemetry features.
Having one of that sort,be it LibreWolf, Pale Moon, Waterfox or something else,available on Haiku would be a huge step forward for the OS in my view.

1 Like

But “they” kind of split ( or will split ) in two branches. If some people want to include other libraries in the “generic” fork of ladybird, and the guys from serenityos want to keep using their in-house libraries, these two source trees will end up diverging more and more

That’s true and the split has already happened.
The problem is that the SerenityOS project restricts their version of Ladybird to the SerenityOS system.
Multi-platform support is not yet removed,but the build system already checks wether you use SerenityOS and throws an error otherwise.
Patches to maintain platform support in that repository won’t be accepted and I don’t know,I wouldn’t be too surprised if they decided to remove #ifdefs that enable support for non-SerenityOS platforms completely later.
That’s a really unfortunate situation,since I’d be very interested in maintaining support for this version of Ladybird.

The new Ladybird repository still accepts patches for better platform support,but requires more and more third-party stuff and they even publicly talk about a possible write in another programming language,so even if I put in the effort to make Skia work on Haiku today,it may break again in the not-so-distant future because of their rewrite.

Skia is already ported to Haiku, but it have no its own package because of unstable API, it is usually included to packages that use it. It can be built for Haiku quite easily. Even Vulkan rendering works.

10 Likes

Look: GitHub - X547/skia: Skia is a complete 2D graphic library for drawing Text, Geometries, and Images.

1 Like

Today I played around with it again and I realized that this was totally my own fault,sorry for all the noise :confused:
The Ladybird from the SerenityOS repository still supports running on other platforms and builds totally fine with only one additional patch plus those I already shared.
The errors I ran into were caused by not specifying -S Ladybird as source for cmake.
I forgot that,because the Ladybird from the separate repository doesn’t need it,but the one from SerenityOS does,otherwise you’re attempting to build the whole OS.
You can now get the patches on top of the current master branch combined into a single file here: https://upload.odirf.de/file/qGJvHCw4TW6q.patch
It’s really a shame that they won’t accept the patches upstream,would be rather easy to continue supporting otherwise.

4 Likes

How to apply this patch? it is not an .exe…nor a .hpkg file

Haiku website when accessed via ladybird does not render properly…cross-hatch pattern lines at the top, not all content in one page view…

horrible fonts

The project separation is still new and they want people to understand that.
Also, people knowing well that code have probably left for the other project or, are less present at the time. It is certainly a lot of manpower that disappeared. So I guess that there will be a period of adaptation, the time those who are still there get confident with that. Once they will understand the code better, they might accept such patches.

1 Like

You need to clone the SerenityOS git repository from GitHub - SerenityOS/serenity: The Serenity Operating System 🐞
Then you can apply the patchfile using git am
Now you can compile the code (without the patches that step would fail) and then run your locally compiled Ladybird.
There are no prebuilt binaries,and the version available in the HaikuDepot is outdated by more than a year and barely comparable to the current version,which has improved a lot.

As I see, Ladybird is still actively developed in SerenityOS repo. So now 2 actively developed browsers? Or it is backporting?

I think SerenityOS is mostly backporting compatible changes from the new Ladybird repo,but I don’t know for sure.
Maybe there will be bigger differences in the future,especially when the new Ladybird gets rewritten in another language,removing any compatibility to the SerenityOS project.
Don’t know what will happen with the SerenityOS version then,however,I mean if they’ll be able to keep up with changes of web standards alone.

after git clone, tried to build as under, as mentioned on git/serenityos…specifically for haiku

cmake -GNinja -S Ladybird -B Build/ladybird
cmake --build Build/ladybird
ninja -C Build/ladybird run

Build fails as shown below..

Cannot copy the content
6/2621: no directory: include <execinfo.h>