←back to thread

Web Browser Engineering (2021)

(browser.engineering)
770 points MrVandemar | 3 comments | | HN request time: 0.717s | source
Show context
mannyv ◴[] No.41848587[source]
One great thing about this book is the 'stuff I didn't do' part.

Layout is really hard. Just tables by themselves are hard, even without any css around them. CSS makes layout impossibly difficult. I challenge anyone to keep the whole CSS spec and its associated behaviors in their head.

At this point css + html + javascript have become a dynamic PDL, and probably is one of the most complex pieces of software today.

As an aside, video decoding is offloaded onto hardware, so it's not as battery intensive as it used to be.

replies(11): >>41848643 #>>41848664 #>>41848729 #>>41848784 #>>41848785 #>>41849444 #>>41849487 #>>41849657 #>>41851786 #>>41852399 #>>41854447 #
vbezhenar ◴[] No.41848784[source]
This Babylonian tower will crumble one day.

Layout does not have to be so complex. There are dozens of GUI frameworks with simpler layout system. Those are enough for applications everyone uses.

replies(5): >>41849894 #>>41850107 #>>41851738 #>>41853975 #>>41855400 #
1. msie ◴[] No.41851738[source]
Pixel positioning is so nice! I remember how easy it was to layout UIs with VB.
replies(1): >>41857799 #
2. echoangle ◴[] No.41857799[source]
How does that work when someone resizes a window? I'm genuinely asking because pixel positioning to me sounds like hardcoding positions. Do you have to manually code the reflow when the window becomes narrow for example?
replies(1): >>41858493 #
3. vbezhenar ◴[] No.41858493[source]
Pixel positioning usually anchors to a specific side. Like you can anchor label to the right side and it'll move as expected. And you also need to specify minimum width/height to keep thing sane.

Although it works poorly with translations, so it's probably not the best approach, but certainly one of the simplest. If you don't need translations, it works surprisingly well. Basically all Delphi applications used it and there were used a lot in private companies.