aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/lib.rs
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2016-08-31 01:26:23 +0200
committerSimon Sapin <simon.sapin@exyr.org>2016-08-31 02:34:09 +0200
commit7ef493047200d2ac797129b676d535c2c2889f22 (patch)
tree36e52b96ea15436ed7ca50eab9809b0f883bf09a /components/script/lib.rs
parentad3437b98a9fc67f7776a8a50df9a6ebee3fc830 (diff)
downloadservo-7ef493047200d2ac797129b676d535c2c2889f22.tar.gz
servo-7ef493047200d2ac797129b676d535c2c2889f22.zip
Prepare for interior mutability in PropertyDeclarationBlock
`Stylist` contains separate hashmaps for important and normal declarations, but typically a given block only contains declarations of one importance. Before this commit, there is an optimization where a `PropertyDeclarationBlock` is only inserted in the corresponding map if it has a non-zero number of declaration of a given importance. With CSSOM, `PropertyDeclarationBlock` is gonna have interior mutability: the importance (priority) of a declaration could change. This optimization would become incorrect when the block is missing in a hashmap where it should be. This commits removes the original optimization, and replaces it with a slightly weaker one: if a block doesn’t have any declaration with the importance we’re cascading for, skip selector matching.
Diffstat (limited to 'components/script/lib.rs')
0 files changed, 0 insertions, 0 deletions