News for hackers. Stuff that matters.
Re:How Browsers Lay Out Web Pages by ronsor on Tuesday April 06, 2021 @12:26AM (#26707952)
No doubt I'll do something crazy, that is, try to implement this in C.
Re:How Browsers Lay Out Web Pages by peterkos on Tuesday April 06, 2021 @02:16AM (#26708531)
I was going to > inb4 rust!, but, isn't Gecko built in Rust?
Re:How Browsers Lay Out Web Pages by KwanEsq on Tuesday April 06, 2021 @06:47AM (#26710326)
The style parts are in Rust, but layout is C++, I believe. servo does have an experimental layout engine (or two? layout 2020?) in Rust, but I don't think that ever reached a point where Mozilla were seriously considering replacing Gecko's with it.
Re:How Browsers Lay Out Web Pages by timw4mail on Tuesday April 06, 2021 @08:52AM (#26711157)
I think Servo is basically a proving ground for replacing components in Firefox with Rust equivalents.
Re:How Browsers Lay Out Web Pages by ronsor on Tuesday April 06, 2021 @02:29AM (#26708644)
Gecko is (mostly, at least) traditional C++. Servo is written in Rust.
Re:How Browsers Lay Out Web Pages by amelius on Tuesday April 06, 2021 @06:14AM (#26710121)
Would Rust be the best choice of language, given all the back pointers (previous, parent)?
Re:How Browsers Lay Out Web Pages by timw4mail on Tuesday April 06, 2021 @08:54AM (#26711177)
Trees are not that bad in Rust, it's when you have a cyclical structure that Rust is really difficult.
Re:How Browsers Lay Out Web Pages by amelius on Tuesday April 06, 2021 @11:14AM (#26712825)
Yes, that's what I meant by "back pointers". In the article, every node has a parent pointer and a child pointer (or several). You can't have both of these pointers without introducing cycles.