style: Reformat recent changes.

This commit is contained in:
Emilio Cobos Álvarez 2020-04-16 17:01:24 +02:00
parent 7c96aed31d
commit f76acc84c6
30 changed files with 330 additions and 191 deletions

View file

@ -10,7 +10,7 @@
#![allow(unsafe_code)]
use crate::gecko_bindings::structs::{Matrix4x4Components, nsresult};
use crate::gecko_bindings::structs::{nsresult, Matrix4x4Components};
use crate::stylesheets::RulesMutateError;
use crate::values::computed::transform::Matrix3D;

View file

@ -318,7 +318,9 @@ impl Device {
let mut right = 0.0;
let mut bottom = 0.0;
let mut left = 0.0;
unsafe { bindings::Gecko_GetSafeAreaInsets(pc, &mut top, &mut right, &mut bottom, &mut left) };
unsafe {
bindings::Gecko_GetSafeAreaInsets(pc, &mut top, &mut right, &mut bottom, &mut left)
};
SideOffsets2D::new(top, right, bottom, left)
}
}

View file

@ -173,7 +173,7 @@ impl NonTSPseudoClass {
#[inline]
fn is_enabled_in_content(&self) -> bool {
if matches!(*self, NonTSPseudoClass::FocusVisible) {
return static_prefs::pref!("layout.css.focus-visible.enabled")
return static_prefs::pref!("layout.css.focus-visible.enabled");
}
!self.has_any_flag(NonTSPseudoClassFlag::PSEUDO_CLASS_ENABLED_IN_UA_SHEETS_AND_CHROME)
}

View file

@ -93,13 +93,7 @@ pub(super) fn each_exported_part(
None => return,
};
let mut length = 0;
let atoms = unsafe {
bindings::Gecko_Element_ExportedParts(
attr,
name.as_ptr(),
&mut length,
)
};
let atoms = unsafe { bindings::Gecko_Element_ExportedParts(attr, name.as_ptr(), &mut length) };
if atoms.is_null() {
return;
}