diff --git a/components/style/properties/properties.mako.rs b/components/style/properties/properties.mako.rs index 3e6676842c5..7eb36f8d418 100644 --- a/components/style/properties/properties.mako.rs +++ b/components/style/properties/properties.mako.rs @@ -3768,14 +3768,6 @@ where PropertyDeclarationId::Custom(..) => continue, }; - // Only a few properties are allowed to depend on the visited state - // of links. When cascading visited styles, we can save time by - // only processing these properties. - if flags.contains(CascadeFlags::VISITED_DEPENDENT_ONLY) && - !longhand_id.is_visited_dependent() { - continue - } - if !apply_reset && !longhand_id.inherited() { continue; } @@ -3795,6 +3787,14 @@ where continue } + // Only a few properties are allowed to depend on the visited state + // of links. When cascading visited styles, we can save time by + // only processing these properties. + if flags.contains(CascadeFlags::VISITED_DEPENDENT_ONLY) && + !physical_longhand_id.is_visited_dependent() { + continue + } + let mut declaration = match *declaration { PropertyDeclaration::WithVariables(ref declaration) => { if !declaration.id.inherited() {