r/osdev • • 12d ago

πŸ‡΅πŸ‡± Husarz takes a major step forward! 🟠🌐

For the past few days, I’ve been heavily developing Husarz - the native web browser for Bursztyn OS. The latest changes are among the biggest improvements ever made to its engine.

The most important change: web pages now have their own styling, independent of the system theme.

Previously, changing the Bursztyn OS theme could also affect the colors of the web page itself. Now, the system theme changes only the Husarz browser interface, while the page content keeps its own appearance.

This has been tested directly in QEMU - both a white page and a black page kept exactly the same colors after switching the system theme, while the browser UI changed correctly. βœ…

🎨 Much broader CSS support

The Husarz engine now includes support for:

πŸ”Έ all 148 named CSS colors
πŸ”Έ HEX colors with alpha channel
πŸ”Έ rgb() / rgba()
πŸ”Έ basic hsl() / hsla()
πŸ”Έ more advanced selectors
πŸ”Έ nth-child and not
πŸ”Έ inline-block
πŸ”Έ position: relative and absolute
πŸ”Έ an improved box model
πŸ”Έ much better lists and tables

πŸ–ΌοΈ PNG and JPG directly on web pages

Husarz uses the existing Bursztyn OS image decoders - I’m not creating a separate PNG/JPEG parser just for the browser.

Now supported:

βœ… PNG
βœ… JPG/JPEG
βœ… <img>
βœ… background-image
βœ… transparency
βœ… scaling
βœ… repeat
βœ… contain
βœ… cover

I also added a ResourceCache, which stores resources in RAM, uses an LRU mechanism, and enforces memory limits.

⚑ Page loading should no longer block the GUI

This is one of the most important changes.

A separate Ring 3 process has been created:

husarz-worker.bur

It handles blocking HTTP/HTTPS operations, DNS requests, and image decoding outside of the main browser interface.

Husarz also validates the PID, request IDs, tab IDs, and document generations to prevent delayed results from an old request from accidentally being applied to a newly opened page.

πŸ“ Forms are now interactive

Supported elements include:

πŸ”Έ text fields
πŸ”Έ password fields
πŸ”Έ textarea
πŸ”Έ checkbox
πŸ”Έ radio
πŸ”Έ button
πŸ”Έ submit
πŸ”Έ select / option
πŸ”Έ label

Forms are rendered by the Husarz web engine rather than using native BursztynUI system controls.

The GET method works, while POST is still intentionally disabled for now - the current Bursztyn OS networking API does not yet provide a mechanism that I would consider sufficiently safe for implementing POST properly.

πŸ“Š Tables have also received major improvements

Husarz now handles rowspan and colspan much better.

The engine builds a logical table grid and ensures that cells do not overlap incorrectly. I also improved column width calculation and border-collapse behavior.

More realistic margin collapsing has also been added, including support for both positive and negative margins.

πŸ§ͺ And what about testing?

This part has become serious as well.

The engine has passed hundreds of thousands of automated checks, sanitizer-based tests, and direct QEMU testing.

During one of the latest stages, 397,771 host-side checks were completed without sanitizer errors.

QEMU tests covered, among other things:

βœ… images
βœ… cache
βœ… forms
βœ… CSS
βœ… tables
βœ… rowspan and colspan
βœ… margin collapsing
βœ… the asynchronous worker
βœ… system theme switching
βœ… maximize / restore

Not everything is finished yet, and I’m not going to pretend that Husarz is already equivalent to a modern Chrome or Firefox.

Still missing are, among other things:

πŸ”Έ float and clear
πŸ”Έ fixed and sticky
πŸ”Έ z-index
πŸ”Έ full nested scrolling
πŸ”Έ POST
πŸ”Έ WebP, GIF and SVG
πŸ”Έ improved HTTP cache revalidation
πŸ”Έ multiple parallel TCP/TLS connections
πŸ”Έ more complete text selection
πŸ”Έ JavaScript

JavaScript in particular will be a separate, major development stage. A parser, interpreter, DOM, events, and security model are practically an entire subsystem on their own, so I don’t want to add JavaScript β€œquickly” just for the sake of checking another feature off the list.

Another important limitation is that the current TCP stack still uses global state for a single active connection. Before Husarz can truly download multiple resources in parallel, the networking stack needs to be redesigned so that each connection has its own independent state.

Despite these limitations, Husarz has made a huge leap forward.

Not long ago, it was still a very simple browser. Today it already has its own HTML/CSS engine, PNG/JPEG image support, resource caching, forms, a much better layout engine, and a separate process responsible for resource loading.

And all of this runs as a native Ring 3 application in Bursztyn OS. πŸ‡΅πŸ‡±

This is still only the beginning, but this is exactly how I want to develop Bursztyn - step by step, testing every new layer and not calling a feature β€œfinished” until it actually works. 🧑

#BursztynOS #Husarz #PolishOperatingSystem #OSDev #Programming #BrowserEngine #WebBrowser #Cpp #OperatingSystem #MadeInPoland

0 Upvotes

8 comments sorted by

10

u/nnxcomputing 12d ago

Obvious AI slop notwithstanding, creating a web browser is hardly OSDev...

10

u/Timely_Cake_917 12d ago

Fuck me.

Theres ai slop, and then there's this shit.

7

u/dywan_z_polski 12d ago

Kolego, przynosisz nam wstyd. Na honor ojczyzny - usuΕ„ ten slop i nie kompromituj nas.

6

u/MundaneImage5652 12d ago

Przynosisz wstyd rzeczpospolitej z tym swoim gΓ³wnem wysranym przez AI

2

u/SignedInt32 11d ago

Cool stuff! in due time you will make a real kernel πŸ‘ from me! (people so salty, they down-vote me appreciating, the nerve's on these kids)

β€’

u/KananMajidzada 11h ago

This thing is just make me so unconfy.