Over the past month I've come to conclude that a lot of css stuff will have to 
run at document load time, maybe not all of it but enough,
and that says the stuff probably has to be rewritten in C.
I translated the css parser from javascript to c, thus the new file css.c.
This was about as much fun as cleaning the bathroom.

I pushed just because there are 900 new lines of code and I didn't want to lose 
all that work if my computer flaked out.

It isn't used yet, it just exists.
You can invoke it from jdb by cssCompile("css string")
or perhaps an existing source like
cssCompile(cssSource[0].data)
It parses the css and builds the tree of descriptors and rules internally
and prints it out for debugging purposes, in /tmp/css
All the old js machinery still does querySelectorAll and getComputedStyle etc.
This is the foundation.
I do expect it all to be very fast when done though.

I did find a few things while translating that I wasn't doing at all.
Like
@import url(blah)
which lets one css file import another.   Like #include
So that's working in the c version.
And a couple other small fixes too.
It's going to be a long road.

Karl Dahlke
_______________________________________________
Edbrowse-dev mailing list
Edbrowse-dev@lists.the-brannons.com
http://lists.the-brannons.com/mailman/listinfo/edbrowse-dev

Reply via email to