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