3 ms·
About three years ago, I decided that I was going to build my own browser from scratch, and I thought it would be really easy to implement as long as I strictly
by tombert 9y ago
About three years ago, I decided that I was going to build my own browser from scratch, and I thought it would be really easy to implement as long as I strictly followed the web standards.
Within a few minutes, I got stuck with the fact that I could not get any performance out of even a simple attempt at a CSS engine.
After about three days of mucking with that, I gave up on the project, and gained a lot more respect for Mozilla.
- hossbeast 9y agoYou had a running css engine in a few minutes?
- tombert 9y agoHeh, bad wording; I should say that I had performance problems within a few minutes. I did eventually get something that kind of worked, but that took about a day, and still suffered performance issues, probably because I had no idea what the hell I was doing (and still don't, really)
- nnethercote 9y agoYou had a running CSS engine within a day?
- tombert 9y agoYeah, a really crappy one that parsed a CSS file using Bison, and could change text colors, background colors, and position things based on pixels (no em or %). I never got around to implementing class support, but I did allow targeting an element via ID. I did this in C++ for some reason, and used Xerces to parse the XML, and I used Allegro to render everything. If I were to try and make this now, I probably would not use a rendering system designed for games, but I was naive back then. I'll have to look to see if I can find the old files on my NAS; if I can I'll put it on Github.
- tvararu 9y agoThese kind of high-level overviews of prototype implementations are very useful, thank you for sharing.