mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
style: Plumb layer order through ApplicableDeclarationBlock, and make it have an effect
Same, I want to land this separately to see if it affects micro-benchmarks. If so, we might want to pack the layer order _somewhere_ (though in this case I'm not sure where, tbh). With this, layer rules should have an effect on the page. There are a few things missing before being able to enable them: * Fix nested layer order in some cases (when parent layers are declared out of order, see the previous commit mentioning this). * Some kind of OM representation, perhaps. * Tests of course, which are coming in bug 1728722 and bug 1727276. But this should be enough to allow playing with them. Depends on D124337 Differential Revision: https://phabricator.services.mozilla.com/D124338
This commit is contained in:
parent
93fb8861ae
commit
3dc3fb9412
3 changed files with 10 additions and 5 deletions
|
@ -2176,6 +2176,7 @@ impl CascadeData {
|
|||
self.rules_source_order,
|
||||
CascadeLevel::UANormal,
|
||||
selector.specificity(),
|
||||
current_layer_order,
|
||||
));
|
||||
continue;
|
||||
}
|
||||
|
@ -2678,7 +2679,7 @@ impl Rule {
|
|||
level: CascadeLevel,
|
||||
) -> ApplicableDeclarationBlock {
|
||||
let source = StyleSource::from_rule(self.style_rule.clone());
|
||||
ApplicableDeclarationBlock::new(source, self.source_order, level, self.specificity())
|
||||
ApplicableDeclarationBlock::new(source, self.source_order, level, self.specificity(), self.layer_order)
|
||||
}
|
||||
|
||||
/// Creates a new Rule.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue