serenity icon indicating copy to clipboard operation
serenity copied to clipboard

Ladybird: Implement a GTK 4 chrome :^)

Open ADKaster opened this issue 2 years ago • 2 comments

This is an alternative to https://github.com/SerenityOS/serenity/pull/22260

Import Sergey's ladybird-gtk4 repository as one commit.

There are two notable omissions from the master branch of ladybird-gtk4:

  • JS console. The infrastructure in LibWebView that the JS console native widget was removed in the last month. This widget sadly has to be redesigned.
  • Translations. At a later date they can be imported. However, they are a bit controversial among the current Serenity maintainers, so let's leave them out for the initial PR.

As it's a bit difficult to get an up to date GTK4 developer environment setup on stock Ubuntu LTS, there are two Flatpak-based solutions described in the GTK/README.md: flatpak-builder (command line tool) and GNOME Builder (IDE).

Time for some screenies!

GNOME Builder:

image

Using the Flatpak:

image

Adwaita tab overview:

image

Zoom:

image

ADKaster avatar Dec 15 '23 17:12 ADKaster

Importing upstream as one commit seems alright, but maybe changes from upstream should be in separate commits?

nico avatar Dec 15 '23 17:12 nico

Importing upstream as one commit seems alright, but maybe changes from upstream should be in separate commits?

That's a good point. I'll re-apply my changes from upstream on top of a squash-merged version of #22260 with the addition of the license headers. That way that commit will pass CI. Then the transformation from upstream (downstream?) will be like so:

  1. Filter-branch (move to Ladybird/GTK) + clang-format + add license headers
  2. Remove files we do not intend to merge into SerenityOS/serenity at this time (translation folder, JS Console class, LibSoup integration, custom WebContent main.cpp)
  3. Integrate with Ladybird CMake build + clean up files so that serenity-enabled warnings go away.

Depending on the mess created, I might squash 2. and 3. together :shrug:

ADKaster avatar Dec 16 '23 18:12 ADKaster

I'll close this for now, perhaps there is a path to a GTK chrome some time in the future.

ADKaster avatar Dec 30 '23 17:12 ADKaster