Re:Ladybird: A new cross-platform browser project
by c-smile on Monday September 12, 2022 @10:28PM
(#32820079)
> You don’t need parent
You do need parent, check this: https://developer.mozilla.org/en-US/docs/Web/API/Node/parent...
> You want sibling nodes otherwise you will have to traverse back to the root node sometimes to find a sibling.
The only need for this is in Node.nextSibling implementation: https://developer.mozilla.org/en-US/docs/Web/API/Node/nextSi...
Where vector<>::find is pretty sufficient.
But in reality (at least in my Sciter) node stores its index in parent's m_children so it is O(1) operation.
Re:Ladybird: A new cross-platform browser project
by lenkite on Friday September 16, 2022 @02:50AM
(#32862932)
Is there source code available online illustrating your more-efficient DOM data-structure ?
Re:Ladybird: A new cross-platform browser project
by xigoi on Tuesday September 13, 2022 @04:56AM
(#32822013)
How about the + operator in CSS?
You want sibling nodes otherwise you will have to traverse back to the root node sometimes to find a sibling.