mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Rename PropertyBitField to LonghandIdSet
This commit is contained in:
parent
c81ebca7df
commit
4ad844f7bd
4 changed files with 14 additions and 14 deletions
|
@ -12,10 +12,10 @@ use parking_lot::RwLock;
|
|||
use parser::{ParserContext, ParserContextExtraData, log_css_error};
|
||||
use properties::{Importance, PropertyDeclaration, PropertyDeclarationBlock, PropertyId};
|
||||
use properties::{PropertyDeclarationId, LonghandId, DeclaredValue};
|
||||
use properties::LonghandIdSet;
|
||||
use properties::PropertyDeclarationParseResult;
|
||||
use properties::animated_properties::TransitionProperty;
|
||||
use properties::longhands::transition_timing_function::single_value::SpecifiedValue as SpecifiedTimingFunction;
|
||||
use properties::PropertyBitField;
|
||||
use std::fmt;
|
||||
use std::sync::Arc;
|
||||
use style_traits::ToCss;
|
||||
|
@ -248,7 +248,7 @@ pub struct KeyframesAnimation {
|
|||
/// Get all the animated properties in a keyframes animation.
|
||||
fn get_animated_properties(keyframes: &[Arc<RwLock<Keyframe>>]) -> Vec<TransitionProperty> {
|
||||
let mut ret = vec![];
|
||||
let mut seen = PropertyBitField::new();
|
||||
let mut seen = LonghandIdSet::new();
|
||||
// NB: declarations are already deduplicated, so we don't have to check for
|
||||
// it here.
|
||||
for keyframe in keyframes {
|
||||
|
|
|
@ -230,7 +230,7 @@
|
|||
use cascade_info::CascadeInfo;
|
||||
use error_reporting::ParseErrorReporter;
|
||||
use properties::longhands;
|
||||
use properties::PropertyBitField;
|
||||
use properties::LonghandIdSet;
|
||||
use properties::{ComputedValues, PropertyDeclaration};
|
||||
use properties::style_structs;
|
||||
use std::boxed::Box as StdBox;
|
||||
|
|
|
@ -179,15 +179,15 @@ pub mod animated_properties {
|
|||
}
|
||||
|
||||
/// A set of longhand properties
|
||||
pub struct PropertyBitField {
|
||||
pub struct LonghandIdSet {
|
||||
storage: [u32; (${len(data.longhands)} - 1 + 32) / 32]
|
||||
}
|
||||
|
||||
impl PropertyBitField {
|
||||
impl LonghandIdSet {
|
||||
/// Create an empty set
|
||||
#[inline]
|
||||
pub fn new() -> PropertyBitField {
|
||||
PropertyBitField { storage: [0; (${len(data.longhands)} - 1 + 32) / 32] }
|
||||
pub fn new() -> LonghandIdSet {
|
||||
LonghandIdSet { storage: [0; (${len(data.longhands)} - 1 + 32) / 32] }
|
||||
}
|
||||
|
||||
/// Return whether the given property is in the set
|
||||
|
@ -233,7 +233,7 @@ impl PropertyBitField {
|
|||
|
||||
/// A specialized set of PropertyDeclarationId
|
||||
pub struct PropertyDeclarationIdSet {
|
||||
longhands: PropertyBitField,
|
||||
longhands: LonghandIdSet,
|
||||
|
||||
// FIXME: Use a HashSet instead? This Vec is usually small, so linear scan might be ok.
|
||||
custom: Vec<::custom_properties::Name>,
|
||||
|
@ -243,7 +243,7 @@ impl PropertyDeclarationIdSet {
|
|||
/// Empty set
|
||||
pub fn new() -> Self {
|
||||
PropertyDeclarationIdSet {
|
||||
longhands: PropertyBitField::new(),
|
||||
longhands: LonghandIdSet::new(),
|
||||
custom: Vec::new(),
|
||||
}
|
||||
}
|
||||
|
@ -1835,7 +1835,7 @@ pub fn apply_declarations<'a, F, I>(viewport_size: Size2D<Au>,
|
|||
// NB: The cacheable boolean is not used right now, but will be once we
|
||||
// start caching computed values in the rule nodes.
|
||||
let mut cacheable = true;
|
||||
let mut seen = PropertyBitField::new();
|
||||
let mut seen = LonghandIdSet::new();
|
||||
|
||||
// Declaration blocks are stored in increasing precedence order, we want
|
||||
// them in decreasing order here.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue