diff options
-rw-r--r-- | components/malloc_size_of/lib.rs | 4 | ||||
-rw-r--r-- | components/selectors/attr.rs | 3 | ||||
-rw-r--r-- | components/selectors/matching.rs | 15 | ||||
-rw-r--r-- | components/selectors/parser.rs | 23 | ||||
-rw-r--r-- | components/selectors/tree.rs | 2 | ||||
-rw-r--r-- | components/style/values/computed/mod.rs | 2 |
6 files changed, 17 insertions, 32 deletions
diff --git a/components/malloc_size_of/lib.rs b/components/malloc_size_of/lib.rs index ddd7b5f2dad..fe988e78f6c 100644 --- a/components/malloc_size_of/lib.rs +++ b/components/malloc_size_of/lib.rs @@ -472,7 +472,7 @@ macro_rules! malloc_size_of_hash_set { n } } - } + }; } malloc_size_of_hash_set!(std::collections::HashSet<T, S>); @@ -513,7 +513,7 @@ macro_rules! malloc_size_of_hash_map { n } } - } + }; } malloc_size_of_hash_map!(std::collections::HashMap<K, V, S>); diff --git a/components/selectors/attr.rs b/components/selectors/attr.rs index 35e678946f9..36d31e11345 100644 --- a/components/selectors/attr.rs +++ b/components/selectors/attr.rs @@ -155,8 +155,7 @@ impl ParsedCaseSensitivity { ParsedCaseSensitivity::AsciiCaseInsensitiveIfInHtmlElementInHtmlDocument => { CaseSensitivity::CaseSensitive }, - ParsedCaseSensitivity::CaseSensitive | - ParsedCaseSensitivity::ExplicitCaseSensitive => { + ParsedCaseSensitivity::CaseSensitive | ParsedCaseSensitivity::ExplicitCaseSensitive => { CaseSensitivity::CaseSensitive }, ParsedCaseSensitivity::AsciiCaseInsensitive => CaseSensitivity::AsciiCaseInsensitive, diff --git a/components/selectors/matching.rs b/components/selectors/matching.rs index 8a9a2790f52..7c509e8e673 100644 --- a/components/selectors/matching.rs +++ b/components/selectors/matching.rs @@ -521,12 +521,8 @@ where Combinator::PseudoElement => SelectorMatchingResult::NotMatchedGlobally, }; - let mut next_element = next_element_for_combinator( - element, - combinator, - &selector_iter, - &context, - ); + let mut next_element = + next_element_for_combinator(element, combinator, &selector_iter, &context); // Stop matching :visited as soon as we find a link, or a combinator for // something that isn't an ancestor. @@ -590,12 +586,7 @@ where visited_handling = VisitedHandlingMode::AllLinksUnvisited; } - next_element = next_element_for_combinator( - &element, - combinator, - &selector_iter, - &context, - ); + next_element = next_element_for_combinator(&element, combinator, &selector_iter, &context); } } diff --git a/components/selectors/parser.rs b/components/selectors/parser.rs index d88d6f38aa5..4dda76d3200 100644 --- a/components/selectors/parser.rs +++ b/components/selectors/parser.rs @@ -1721,7 +1721,8 @@ where let case_sensitivity; { let local_name_lower_cow = to_ascii_lowercase(&local_name); - case_sensitivity = attribute_flags.to_case_sensitivity(local_name_lower_cow.as_ref(), namespace.is_some()); + case_sensitivity = + attribute_flags.to_case_sensitivity(local_name_lower_cow.as_ref(), namespace.is_some()); local_name_lower = local_name_lower_cow.as_ref().into(); local_name_is_ascii_lowercase = matches!(local_name_lower_cow, Cow::Borrowed(..)); } @@ -1758,32 +1759,26 @@ enum AttributeFlags { // Matching should be case-insensitive ('i' flag). AsciiCaseInsensitive, // No flags. Matching behavior depends on the name of the attribute. - CaseSensitivityDependsOnName + CaseSensitivityDependsOnName, } impl AttributeFlags { - fn to_case_sensitivity( - self, - local_name: &str, - have_namespace: bool, - ) -> ParsedCaseSensitivity { + fn to_case_sensitivity(self, local_name: &str, have_namespace: bool) -> ParsedCaseSensitivity { match self { - AttributeFlags::CaseSensitive => - ParsedCaseSensitivity::ExplicitCaseSensitive, - AttributeFlags::AsciiCaseInsensitive => - ParsedCaseSensitivity::AsciiCaseInsensitive, + AttributeFlags::CaseSensitive => ParsedCaseSensitivity::ExplicitCaseSensitive, + AttributeFlags::AsciiCaseInsensitive => ParsedCaseSensitivity::AsciiCaseInsensitive, AttributeFlags::CaseSensitivityDependsOnName => { if !have_namespace && include!(concat!( env!("OUT_DIR"), "/ascii_case_insensitive_html_attributes.rs" )) - .contains(local_name) + .contains(local_name) { ParsedCaseSensitivity::AsciiCaseInsensitiveIfInHtmlElementInHtmlDocument } else { ParsedCaseSensitivity::CaseSensitive } - } + }, } } } @@ -1798,7 +1793,7 @@ fn parse_attribute_flags<'i, 't>( // Selectors spec says language-defined; HTML says it depends on the // exact attribute name. return Ok(AttributeFlags::CaseSensitivityDependsOnName); - } + }, }; let ident = match *token { diff --git a/components/selectors/tree.rs b/components/selectors/tree.rs index 6d8c5fcd25f..badfca86ed6 100644 --- a/components/selectors/tree.rs +++ b/components/selectors/tree.rs @@ -12,7 +12,7 @@ use std::fmt::Debug; use std::ptr::NonNull; /// Opaque representation of an Element, for identity comparisons. -#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)] pub struct OpaqueElement(NonNull<()>); unsafe impl Send for OpaqueElement {} diff --git a/components/style/values/computed/mod.rs b/components/style/values/computed/mod.rs index 8e135b52caa..93ee3e73cc1 100644 --- a/components/style/values/computed/mod.rs +++ b/components/style/values/computed/mod.rs @@ -43,7 +43,7 @@ pub use self::border::{BorderImageRepeat, BorderImageSideWidth}; pub use self::border::{BorderImageSlice, BorderImageWidth}; pub use self::box_::{AnimationIterationCount, AnimationName, Contain}; pub use self::box_::{Appearance, BreakBetween, BreakWithin, Clear, Float}; -pub use self::box_::{Display, TransitionProperty, Overflow}; +pub use self::box_::{Display, Overflow, TransitionProperty}; pub use self::box_::{OverflowClipBox, OverscrollBehavior, Perspective, Resize}; pub use self::box_::{ScrollSnapType, TouchAction, VerticalAlign, WillChange}; pub use self::color::{Color, ColorPropertyValue, RGBAColor}; |