mirror of
https://github.com/servo/servo.git
synced 2025-08-12 08:55:32 +01:00
style: Store a LayerOrder in ApplicableDeclarationBlock
This shouldn't change behavior jut yet. Differential Revision: https://phabricator.services.mozilla.com/D129380
This commit is contained in:
parent
77078dd660
commit
5f2a29659f
2 changed files with 6 additions and 5 deletions
|
@ -6,6 +6,7 @@
|
|||
|
||||
use crate::properties::PropertyDeclarationBlock;
|
||||
use crate::rule_tree::{CascadeLevel, StyleSource};
|
||||
use crate::stylesheets::layer_rule::LayerOrder;
|
||||
use crate::shared_lock::Locked;
|
||||
use servo_arc::Arc;
|
||||
use smallvec::SmallVec;
|
||||
|
@ -72,7 +73,7 @@ pub struct ApplicableDeclarationBlock {
|
|||
/// The specificity of the selector.
|
||||
pub specificity: u32,
|
||||
/// The layer order of the selector.
|
||||
pub layer_order: u32,
|
||||
pub layer_order: LayerOrder,
|
||||
}
|
||||
|
||||
impl ApplicableDeclarationBlock {
|
||||
|
@ -87,13 +88,13 @@ impl ApplicableDeclarationBlock {
|
|||
source: StyleSource::from_declarations(declarations),
|
||||
bits: ApplicableDeclarationBits::new(0, level),
|
||||
specificity: 0,
|
||||
layer_order: 0,
|
||||
layer_order: LayerOrder::first(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Constructs an applicable declaration block from the given components
|
||||
#[inline]
|
||||
pub fn new(source: StyleSource, source_order: u32, level: CascadeLevel, specificity: u32, layer_order: u32) -> Self {
|
||||
pub fn new(source: StyleSource, source_order: u32, level: CascadeLevel, specificity: u32, layer_order: LayerOrder) -> Self {
|
||||
ApplicableDeclarationBlock {
|
||||
source,
|
||||
bits: ApplicableDeclarationBits::new(source_order, level),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue