style: Run rustfmt on servo/components/style and servo/ports/geckolib

This patch is generated by running `cargo +nightly fmt` under
`servo/components/style/` and `servo/ports/geckolib` against mozilla-central
https://hg.mozilla.org/mozilla-central/rev/b193f2e7a6a5d1f042c957ea4acd5c89bf210512

My nightly version is: 1.58.0-nightly (c9c4b5d72 2021-11-17)

Manually remove the redundant braces in author_styles.rs to fix a warning.

Differential Revision: https://phabricator.services.mozilla.com/D131556
This commit is contained in:
Ting-Yu Lin 2023-06-02 02:26:03 +02:00 committed by Oriol Brufau
parent 33ad82c3da
commit a0617bff0d
50 changed files with 486 additions and 340 deletions

View file

@ -14,7 +14,7 @@ use crate::media_queries::MediaType;
use crate::properties::ComputedValues;
use crate::string_cache::Atom;
use crate::values::computed::font::GenericFontFamily;
use crate::values::computed::{Length, ColorScheme};
use crate::values::computed::{ColorScheme, Length};
use crate::values::specified::color::SystemColor;
use crate::values::specified::font::FONT_MEDIUM_PX;
use crate::values::{CustomIdent, KeyframesName};
@ -389,10 +389,12 @@ impl Device {
}
/// Computes a system color and returns it as an nscolor.
pub(crate) fn system_nscolor(&self, system_color: SystemColor, color_scheme: &ColorScheme) -> u32 {
unsafe {
bindings::Gecko_ComputeSystemColor(system_color, self.document(), color_scheme)
}
pub(crate) fn system_nscolor(
&self,
system_color: SystemColor,
color_scheme: &ColorScheme,
) -> u32 {
unsafe { bindings::Gecko_ComputeSystemColor(system_color, self.document(), color_scheme) }
}
/// Returns the default background color.
@ -460,14 +462,16 @@ impl Device {
/// Returns the gtk titlebar radius in CSS pixels.
pub fn titlebar_radius(&self) -> f32 {
unsafe {
bindings::Gecko_GetLookAndFeelInt(bindings::LookAndFeel_IntID::TitlebarRadius as i32) as f32
bindings::Gecko_GetLookAndFeelInt(bindings::LookAndFeel_IntID::TitlebarRadius as i32)
as f32
}
}
/// Returns the gtk menu radius in CSS pixels.
pub fn menu_radius(&self) -> f32 {
unsafe {
bindings::Gecko_GetLookAndFeelInt(bindings::LookAndFeel_IntID::GtkMenuRadius as i32) as f32
bindings::Gecko_GetLookAndFeelInt(bindings::LookAndFeel_IntID::GtkMenuRadius as i32)
as f32
}
}