mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Make PropertyDeclarationBlock fields private
This commit is contained in:
parent
da4e5146e9
commit
f70a49974a
8 changed files with 31 additions and 33 deletions
|
@ -40,20 +40,13 @@ impl Importance {
|
|||
}
|
||||
}
|
||||
|
||||
impl Default for Importance {
|
||||
#[inline]
|
||||
fn default() -> Self {
|
||||
Importance::Normal
|
||||
}
|
||||
}
|
||||
|
||||
/// Overridden declarations are skipped.
|
||||
#[derive(Debug, PartialEq, Clone)]
|
||||
pub struct PropertyDeclarationBlock {
|
||||
/// The group of declarations, along with their importance.
|
||||
///
|
||||
/// Only deduplicated declarations appear here.
|
||||
pub declarations: Vec<(PropertyDeclaration, Importance)>,
|
||||
declarations: Vec<(PropertyDeclaration, Importance)>,
|
||||
|
||||
/// The number of entries in `self.declaration` with `Importance::Important`
|
||||
important_count: usize,
|
||||
|
@ -76,6 +69,11 @@ impl PropertyDeclarationBlock {
|
|||
}
|
||||
}
|
||||
|
||||
/// The declarations in this block
|
||||
pub fn declarations(&self) -> &[(PropertyDeclaration, Importance)] {
|
||||
&self.declarations
|
||||
}
|
||||
|
||||
/// Returns wheather this block contains any declaration with `!important`.
|
||||
///
|
||||
/// This is based on the `important_count` counter,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue