GoSuB Browser Progress, pt24
There are so many components we still need to write, and so many things we still do not know. We are currently designing the whole flow as a serialized flow where one component will pass through another. For instance, the html data from a socket will pass completely to a char iterator which turn to the tokenizer. At this point, the tokenizer will emit tokens which get parsed by the parser which is not a complete all-or-nothing thing. We don't tokenizer everything first, and then go to the parser because some things are context-dependant.
Now that we have a document tree, we can try and see if we can implement an initial DOM interface on top of it which we can connect to the javascript engine. Also, we can try and setup the render tree as we also have the css tree pretty much done.
Ultimately, we want everything to be able to run at independent times: we could still be waiting for html data to be received from a socket, while the renderer is already rendering text, boxes and stuff on the screen. This might mean we will need to change the design around a bit, but as said, we are not worried about this too much for now. Probably a bad idea, but we still need to gain a lot of experience by researching other browsers and reading up a lot of documentation, blogs and specs about everything.
My plan is to focus a bit on getting a render tree up and running. For this we need to have the CSS tree to calculate css properties, so we can decide whether or not a node is visible or not. Non-visible nodes are automatically discarded from the render tree.
I also found that writing CLI applications is very easy in rust once you get the hang of it when the help of the clap crate.
About jaytaph
Codemuser extraordinaire
Joined: | March 24, 2023 |
Following: | 2 |
Followers: | 2 |
Posts: | 50 |
Comments: | 3 |
Upvotes: | 4 |
Previous musings
- (1) November 2024
- (1) October 2024
- (1) September 2024
- (1) July 2024
- (2) February 2024
- (3) January 2024
- (3) December 2023
- (4) November 2023
- (5) October 2023
- (10) September 2023
- (8) August 2023
- (1) June 2023
- (1) May 2023
- (4) April 2023
- (5) March 2023