This commit is contained in:
Manish Goregaokar 2017-07-17 18:45:19 -07:00
parent c33fa3effa
commit 8eafe6a3b7
6 changed files with 17 additions and 17 deletions

View file

@ -10,8 +10,7 @@
use gecko_bindings::bindings::{RawServoImportRule, RawServoSupportsRule};
use gecko_bindings::bindings::{RawServoKeyframe, RawServoKeyframesRule};
use gecko_bindings::bindings::RawServoMediaRule;
use gecko_bindings::bindings::{RawServoNamespaceRule, RawServoPageRule};
use gecko_bindings::bindings::{RawServoMediaRule, RawServoNamespaceRule, RawServoPageRule};
use gecko_bindings::bindings::{RawServoRuleNode, RawServoRuleNodeStrong, RawServoDocumentRule};
use gecko_bindings::bindings::ServoCssRules;
use gecko_bindings::structs::{RawServoAnimationValue, RawServoDeclarationBlock, RawServoStyleRule, RawServoMediaList};

View file

@ -866,8 +866,8 @@ impl<'le> TElement for GeckoElement<'le> {
}
let declarations = unsafe { Gecko_GetStyleAttrDeclarationBlock(self.0) };
let declarations: Option<&RawOffsetArc<Locked<PropertyDeclarationBlock>>>
= declarations.and_then(|s| s.as_arc_opt());
let declarations: Option<&RawOffsetArc<Locked<PropertyDeclarationBlock>>> =
declarations.and_then(|s| s.as_arc_opt());
declarations.map(|s| s.borrow_arc())
}
@ -881,8 +881,8 @@ impl<'le> TElement for GeckoElement<'le> {
fn get_smil_override(&self) -> Option<ArcBorrow<Locked<PropertyDeclarationBlock>>> {
let declarations = unsafe { Gecko_GetSMILOverrideDeclarationBlock(self.0) };
let declarations: Option<&RawOffsetArc<Locked<PropertyDeclarationBlock>>>
= declarations.and_then(|s| s.as_arc_opt());
let declarations: Option<&RawOffsetArc<Locked<PropertyDeclarationBlock>>> =
declarations.and_then(|s| s.as_arc_opt());
declarations.map(|s| s.borrow_arc())
}
@ -1431,16 +1431,16 @@ impl<'le> PresentationalHintsSynthesizer for GeckoElement<'le> {
}
}
let declarations = unsafe { Gecko_GetHTMLPresentationAttrDeclarationBlock(self.0) };
let declarations: Option<&RawOffsetArc<Locked<PropertyDeclarationBlock>>>
= declarations.and_then(|s| s.as_arc_opt());
let declarations: Option<&RawOffsetArc<Locked<PropertyDeclarationBlock>>> =
declarations.and_then(|s| s.as_arc_opt());
if let Some(decl) = declarations {
hints.push(
ApplicableDeclarationBlock::from_declarations(decl.clone_arc(), ServoCascadeLevel::PresHints)
);
}
let declarations = unsafe { Gecko_GetExtraContentStyleDeclarations(self.0) };
let declarations: Option<&RawOffsetArc<Locked<PropertyDeclarationBlock>>>
= declarations.and_then(|s| s.as_arc_opt());
let declarations: Option<&RawOffsetArc<Locked<PropertyDeclarationBlock>>> =
declarations.and_then(|s| s.as_arc_opt());
if let Some(decl) = declarations {
hints.push(
ApplicableDeclarationBlock::from_declarations(decl.clone_arc(), ServoCascadeLevel::PresHints)
@ -1474,8 +1474,8 @@ impl<'le> PresentationalHintsSynthesizer for GeckoElement<'le> {
let active = self.get_state().intersects(NonTSPseudoClass::Active.state_flag());
if active {
let declarations = unsafe { Gecko_GetActiveLinkAttrDeclarationBlock(self.0) };
let declarations: Option<&RawOffsetArc<Locked<PropertyDeclarationBlock>>>
= declarations.and_then(|s| s.as_arc_opt());
let declarations: Option<&RawOffsetArc<Locked<PropertyDeclarationBlock>>> =
declarations.and_then(|s| s.as_arc_opt());
if let Some(decl) = declarations {
hints.push(
ApplicableDeclarationBlock::from_declarations(decl.clone_arc(), ServoCascadeLevel::PresHints)

View file

@ -148,7 +148,9 @@ impl ComputedValuesInner {
visited_style: None,
flags: ComputedValueFlags::empty(),
% for style_struct in data.style_structs:
${style_struct.gecko_name}: Arc::into_raw_offset(style_structs::${style_struct.name}::default(pres_context)),
${style_struct.gecko_name}: Arc::into_raw_offset(
style_structs::${style_struct.name}::default(pres_context)
),
% endfor
}
}

View file

@ -168,7 +168,7 @@ impl PseudoElement {
}
/// Stub, only Gecko needs this
pub fn pseudo_info(&self) -> () { () }
pub fn pseudo_info(&self) { () }
}
/// The type used for storing pseudo-class string arguments.