Skip to content

Remove type Impl from traits PseudoElement and NonTSPseudoClass - #432

Closed
dislogical wants to merge 2 commits into
servo:mainfrom
dislogical:refactor/selectors-traits-simplify
Closed

Remove type Impl from traits PseudoElement and NonTSPseudoClass#432
dislogical wants to merge 2 commits into
servo:mainfrom
dislogical:refactor/selectors-traits-simplify

Conversation

@dislogical

Copy link
Copy Markdown

These aren't actually used anywhere, and make re-using Pseudo implementations between different parsers MUCH more complicated.

This is technically a breaking change, as downstreams will need to remove the type definition, but that's all that's required (see style/servo/selector_parser.rs for required changes).

@mrobinson

Copy link
Copy Markdown
Member

Are these used in Gecko? If so, I'm not sure we should remove them. We are downstream of Gecko, so this sort of change should likely happen there.

@dislogical

Copy link
Copy Markdown
Author

Great question! I’m new here and can’t find any obvious docs on how to check, is there anything I should be looking at?

These aren't actually used anywhere, and make re-using Pseudo
implementations between different parsers MUCH more complicated.

This is technically a breaking change, as downstreams will need to
remove the `type` definition, but that's all that's required (see
style/servo/selector_parser.rs for required changes).
@dislogical
dislogical force-pushed the refactor/selectors-traits-simplify branch from 1fa7faa to 8e876e7 Compare August 3, 2026 08:43
@nicoburns

Copy link
Copy Markdown
Collaborator

Try applying your patch to https://github.com/mozilla-firefox/firefox (stylo is in the servo directory) and see if it builds.

@dislogical

Copy link
Copy Markdown
Author

Ok just confirmed that this patch does compile in upstream Firefox. Does that mean I should submit this patch there?

@mrobinson

Copy link
Copy Markdown
Member

@dislogical That would be ideal as then we wouldn't have to upstream it and would just incorporate it the next time we sync stylo.

@dislogical

Copy link
Copy Markdown
Author

@mrobinson sounds good, I'll give it a shot! I know their barrier to contribution entry is a bit higher than "PRs welcome," so I'm hoping they'll take such a small change.

@dislogical

Copy link
Copy Markdown
Author

Upstream review: https://phabricator.services.mozilla.com/D316430

@mrobinson

Copy link
Copy Markdown
Member

@dislogical Thank you so much! I'll close this in favor of the upstream contribution.

@mrobinson mrobinson closed this Aug 5, 2026
@dislogical

Copy link
Copy Markdown
Author

No problem! It was easier than I thought.

How often do y'all pull updates from upstream?

@Loirooriol

Copy link
Copy Markdown
Collaborator

Every month

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants