alfa icon indicating copy to clipboard operation
alfa copied to clipboard

Investigate possibility of implementing style sharing

Open kasperisager opened this issue 7 years ago • 1 comments

Servo has a pretty neat implementation of style sharing that we may, or may not, benefit from borrowing. See: https://github.com/servo/servo/wiki/styling-overview

kasperisager avatar Jul 11 '18 07:07 kasperisager

Matching complex selector is bruteforce, creating needless work. For example, when matching a b c, we check for every b ancestor if an a ancestor exists, but if the closest b ancestor has none, then no other b ancestor can have an a ancestor… So we could bail out quicker.

Servo has this set of match failure that indicate where to restart the match. Relevant file, check notably this comment and the (likely) relevant code.

Jym77 avatar May 16 '22 11:05 Jym77