mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +01:00
Move PropertyBitField out of its module
This commit is contained in:
parent
16a34ef6b6
commit
c81ebca7df
4 changed files with 47 additions and 53 deletions
|
@ -15,7 +15,7 @@ use properties::{PropertyDeclarationId, LonghandId, DeclaredValue};
|
|||
use properties::PropertyDeclarationParseResult;
|
||||
use properties::animated_properties::TransitionProperty;
|
||||
use properties::longhands::transition_timing_function::single_value::SpecifiedValue as SpecifiedTimingFunction;
|
||||
use properties::property_bit_field::PropertyBitField;
|
||||
use properties::PropertyBitField;
|
||||
use std::fmt;
|
||||
use std::sync::Arc;
|
||||
use style_traits::ToCss;
|
||||
|
|
|
@ -230,7 +230,7 @@
|
|||
use cascade_info::CascadeInfo;
|
||||
use error_reporting::ParseErrorReporter;
|
||||
use properties::longhands;
|
||||
use properties::property_bit_field::PropertyBitField;
|
||||
use properties::PropertyBitField;
|
||||
use properties::{ComputedValues, PropertyDeclaration};
|
||||
use properties::style_structs;
|
||||
use std::boxed::Box as StdBox;
|
||||
|
|
|
@ -29,6 +29,7 @@ use font_metrics::FontMetricsProvider;
|
|||
#[cfg(feature = "servo")] use logical_geometry::{LogicalMargin, PhysicalSide};
|
||||
use logical_geometry::WritingMode;
|
||||
use parser::{Parse, ParserContext, ParserContextExtraData};
|
||||
use properties::animated_properties::TransitionProperty;
|
||||
#[cfg(feature = "servo")] use servo_config::prefs::PREFS;
|
||||
use servo_url::ServoUrl;
|
||||
use style_traits::ToCss;
|
||||
|
@ -39,7 +40,6 @@ use cascade_info::CascadeInfo;
|
|||
use rule_tree::StrongRuleNode;
|
||||
#[cfg(feature = "servo")] use values::specified::BorderStyle;
|
||||
|
||||
use self::property_bit_field::PropertyBitField;
|
||||
pub use self::declaration_block::*;
|
||||
|
||||
#[cfg(feature = "gecko")]
|
||||
|
@ -178,17 +178,12 @@ pub mod animated_properties {
|
|||
<%include file="/helpers/animated_properties.mako.rs" />
|
||||
}
|
||||
|
||||
#[allow(missing_docs)]
|
||||
pub mod property_bit_field {
|
||||
use properties::animated_properties::TransitionProperty;
|
||||
use properties::LonghandId;
|
||||
|
||||
/// A set of longhand properties
|
||||
pub struct PropertyBitField {
|
||||
/// A set of longhand properties
|
||||
pub struct PropertyBitField {
|
||||
storage: [u32; (${len(data.longhands)} - 1 + 32) / 32]
|
||||
}
|
||||
}
|
||||
|
||||
impl PropertyBitField {
|
||||
impl PropertyBitField {
|
||||
/// Create an empty set
|
||||
#[inline]
|
||||
pub fn new() -> PropertyBitField {
|
||||
|
@ -234,7 +229,6 @@ pub mod property_bit_field {
|
|||
TransitionProperty::All => unreachable!("Tried to get TransitionProperty::All in a PropertyBitfield"),
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// A specialized set of PropertyDeclarationId
|
||||
|
|
|
@ -1339,7 +1339,7 @@ pub extern "C" fn Servo_GetComputedKeyframeValues(keyframes: RawGeckoKeyframeLis
|
|||
computed_keyframes: RawGeckoComputedKeyframeValuesListBorrowedMut)
|
||||
{
|
||||
use style::properties::declaration_block::Importance;
|
||||
use style::properties::property_bit_field::PropertyBitField;
|
||||
use style::properties::PropertyBitField;
|
||||
use style::values::computed::Context;
|
||||
|
||||
let style = ComputedValues::as_arc(&style);
|
||||
|
@ -1429,7 +1429,7 @@ pub extern "C" fn Servo_StyleSet_FillKeyframesForName(raw_data: RawServoStyleSet
|
|||
style: ServoComputedValuesBorrowed,
|
||||
keyframes: RawGeckoKeyframeListBorrowedMut) -> bool {
|
||||
use style::gecko_bindings::structs::Keyframe;
|
||||
use style::properties::property_bit_field::PropertyBitField;
|
||||
use style::properties::PropertyBitField;
|
||||
|
||||
let data = PerDocumentStyleData::from_ffi(raw_data).borrow_mut();
|
||||
let name = unsafe { Atom::from(name.as_ref().unwrap().as_str_unchecked()) };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue