GoSuB Browser Progress, pt26
There is been a lot of yak shaving the last week. I wanted to work on the whole "http connection -> rendertree" pipeline, but I got stuck at the point that I wanted to incorporate the CSS parser in the main html5 parser. To make things easy, i wanted to use a blocking parser: when it finds a stylesheet, it will stop the html5 parsing until the css3 parsing is done.
Unfortunately, the CSS3 isn't as easy as (at least I) thought. Turns out we have a tokenizer and parser for the general CSS, but that just converts it into blocks of rules. It doesn't actually do anything syntaxly with the data. So, it will see there is a qualified rule, but the prelude/selectors aren't parsed into neat selectors yet.
This is where i'm currently stuck at. I'm trying to use nom for doing some generating of the css-tree and the idea might be ok, I have a lot of trouble with execution. I don't understand the library enough to use it properly yet (it doesn't help if you are parsing custom tokens instead of chars, although this should be possible with nom according to the internet (so it must be true)).
So, at least this week, probably next one too, will be about trying to make CSS3 sheets into an AST tree that can be used at the render-tree level (and actually also at the CSSOM interface, which should be fairly easy to implement at that point).
Much progress is being made (not by me) with the javascript research and implementation, so I'm hoping we get this implemented very soon as well.
About jaytaph
Codemuser extraordinaire
Joined: | March 24, 2023 |
Following: | 2 |
Followers: | 2 |
Posts: | 51 |
Comments: | 3 |
Upvotes: | 4 |
Previous musings
- (1) December 2024
- (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