Falkon: Development Update, Aug 2022

Weird news from development of Falkon web browser.

Why?

Sadly, even after project moved under the wings of KDE it did not see many contributors (am I as major stalker at fault?), maybe new contributors did not want to go through hassle of creating KDE account (joining KDE). This is hard to say for me.

Anyway, I wanted to do something what is already outlined and what someone already tried in the past and thus there is a bit of information on how it should be done. That is how I came across “Site Settings” feature. This idea comes from a merge request on Phabricator “Added feature to remember the zoom set on a host” by Anmol Gautam but was not accepted since it was a lot of code which only handles zoom while all data were still stored in the ini file which would make it slower and slower as time goes on.

In the comment David Rosca (The original developer of Falkon) proposed to move the backend to database and add to zoom other settings like javascript, images, html5 permissions etc. and we never saw any changes done after that. Yeah, that was like 4 years ago. I think it rested long enough so I started poking into it.

At first thought

When it comes to designing and programming in Qt and C++ I can be considered a better novice and I make a lot of errors and rewrites, This is exactly one such case. While I could spend days and weeks trying to think of all possible cases and desing an interface and everything in most efficient and nice manner, I lack the experience to do so and instead of that I decided to jump into the water and start programming hoping the code and my thoughts will adjust itself over the time.

And that is how it is still ongoing. I create something thinking it is good enough only for it to be replaced by a new code a little after. Or I did not think of some possibilities or edge cases and designed something in a way that adding this functionality will be a total mess. But that is the only way how I think I can make this work since if I tried to spend weeks “designing” it, it would never be done (like never ever).

The main goal

The aim is to add per site setting for some features to Falkon. There already is per site configuration of HTML5 permissions but this needs to be rewritten and integrated with the new SiteSetting manager. The rest of the features will be new to Falkon. The short list of features I would like to have in SiteSettings is:

  • HTML5 permissions
  • Zoom level
  • Cookies
  • Javascript
  • Autoload Images
  • Other javascript options (Available in Privacy tab in Preferences)
    • Pop up windows
    • Clipboard access
    • Paste from clipboard
    • Activate windows
  • And some more located in QtWebEnginePage::SiteOptions enum

The list is pretty broad but all SiteOptions can be grouped together to one logic and I believe this can be done and this should simplify the development a little bit (maybe?).

The other part is to create Graphical User Interface for manipulating these settings. I want to have a default browser-wide settings and persite configuration which would override some parts of it when set to do so.

The current progress

There are already some working parts of this big patch.

HTML5 permissions

This became my first playgruond after getting some backend running, since I believe it is best to get some results quickly. I hooked the current code to SiteSettings and updated current HTML5 permissions dialog to be able to change default configuration. This was a first mock-up interface I did and it works, but it is not good enough so I will replace it with the one I used for SiteInfo window.

Next after I worked on backend a bit more I added a new “Permissions” tab to SiteInfo window with these permissions and created another mock-up interface which looks similar to the one from Firefox and I think I will stick with this one.

QtWebEngine SiteOptions

There is a lot of options in the enum and quite few which I want to add to the SiteSettings system. I have a small example containing Javascript and AutoloadImages options. I also updated StatusBarIcons to work with SiteSettings (but I believe I did terrible job). Hey, the prototype works so I only need to build on top of it.

Cookies

I looked at the code of CookiesManager and it looks like the whitelist and blacklist is stored in a ini file and it should not be that hard to modify it to work with SiteSettings. (Or so I hope.)

Zoom level

This one I think is a bit tricky since it requires special handling and thinking on when to store the new zoom data and when not to and how to work with it. This is my next target fr addition.

##x User interface

As I mentioned before it is a huge work in progress and I hope it will turn out well, otherwise others will be stuck with my little monster which I am totally fine with.

Backend

Because I did not spend a lot of time designing the whole thing I am rewriting and changing SiteSettingsManager class often, to the point that I worry a little bit since each addition of new feature means I need to rewrite or create something some methods and structures. What I need to do though is to have some method to get all permissions which needs to be set while age is loading so that all of them can be fetched at once and other to fetch all of them for SiteInfo GUI. Or maybe just one with everything? I want to avoid using raw SQL commands just to get some data when there should not be need for it, I have a small desire to hide the SQL backend when possible.

Conclusion

I know you wanted to read something nice, but this is all you will get from me.

Any help is welcome and can speed up or improve the quality of this patch.

You can follow the progress of the development on KDE Invent where I created an issue and draft of a merge request.

Articles from blogs I follow:

Richard Stallman's political discourse on sex

Richard Stallman, the founder of the Free Software Foundation, has been subject to numerous allegations of misconduct. He stepped down in 2019, and following his re-instatement in 2021, a famous open letter was published in which numerous organizations and i…

via Drew DeVault's blog November 25, 2023

Upgrading to FreeBSD 14 - how to fix a broken BIOS bootcode

A lot of people running ZFS zroot have managed to break their FreeBSD systems upgrading from 13.2 to the new 14.0 release because of a broken BIOS bootcode. In this tutorial I'll show you how you can fix that without having to reinstall.

via unixsheikh.com November 22, 2023

C++ Guidelines

C++ is definitely a language that has Lots of Ways to do It – kind of like Perl’s TIMTOWTSAC. A consequence is that when writing code, you need to think about which way to do things. When context-switching between projects, employers, or what-have-you, yo…

via [bobulate] November 21, 2023

Generated by openring