mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Fix tidy
This commit is contained in:
parent
c33fa3effa
commit
8eafe6a3b7
6 changed files with 17 additions and 17 deletions
|
@ -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};
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -3358,7 +3358,6 @@ pub extern "C" fn Servo_StyleSet_HasStateDependency(
|
|||
pub extern "C" fn Servo_GetCustomPropertyValue(computed_values: ServoComputedValuesBorrowed,
|
||||
name: *const nsAString,
|
||||
value: *mut nsAString) -> bool {
|
||||
|
||||
let custom_properties = match computed_values.custom_properties() {
|
||||
Some(p) => p,
|
||||
None => return false,
|
||||
|
|
|
@ -11,7 +11,7 @@ use style::context::QuirksMode;
|
|||
use style::font_metrics::ServoMetricsProvider;
|
||||
use style::media_queries::{Device, MediaType};
|
||||
use style::parser::ParserContext;
|
||||
use style::properties::{ComputedValues, StyleBuilder};
|
||||
use style::properties::{ComputedValues, ComputedValuesInner, StyleBuilder};
|
||||
use style::stylesheets::{CssRuleType, Origin};
|
||||
use style::values::computed::{Context, ToComputedValue};
|
||||
use style_traits::{PARSING_MODE_DEFAULT, ToCss, ParseError};
|
||||
|
@ -49,7 +49,7 @@ fn assert_computed_serialization<C, F, T>(f: F, input: &'static str, output: &st
|
|||
T: ToComputedValue<ComputedValue=C>, C: ToCss
|
||||
{
|
||||
let viewport_size = TypedSize2D::new(0., 0.);
|
||||
let initial_style = ComputedValues::initial_values();
|
||||
let initial_style = ComputedValuesInner::initial_values();
|
||||
let device = Device::new(MediaType::Screen, viewport_size);
|
||||
|
||||
let context = Context {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue