Skip to content

enable :has() selector#363

Open
yezhizhen wants to merge 9 commits into
mainfrom
enable-has
Open

enable :has() selector#363
yezhizhen wants to merge 9 commits into
mainfrom
enable-has

Conversation

@yezhizhen

@yezhizhen yezhizhen commented May 13, 2026

Copy link
Copy Markdown
Member

I have a scenario that is bugged by this.
Servo PR: servo/servo#44902

delan and others added 9 commits May 3, 2026 03:55
Any ancestors of this commit are from upstream mozilla-central, with
some filtering and renaming. Our patches and sync tooling start here.

The sync tooling has all been squashed into this commit, based on:
https://github.com/servo/stylo/commits/64731e10dc8ef87ef52aa2fb9f988c3b2530f3a7
This is a rebase of 40aa59d

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
- Bump stylo_* to 0.17.0
- Bump selectors to 0.38.0
- Bump to_shmem to 0.4.0

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
…operties (#360)

For standard longhands, `computed_value_to_string()` calls
`computed_or_resolved_value()`, which uses `to_resolved_value()`. But
for custom properties, `computed_value_to_string()` was returning the
unresolved computed value. Now it will use `to_resolved_value()` too.

See https://phabricator.services.mozilla.com/D287814 for reference.

Servo PR: servo/servo#44856

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Signed-off-by: Euclid Ye <euclid.ye@huawei.com>
@yezhizhen yezhizhen marked this pull request as ready for review May 13, 2026 08:17
@yezhizhen yezhizhen requested a review from Loirooriol May 13, 2026 08:41
@Loirooriol

Copy link
Copy Markdown
Collaborator

When @mrobinson tried this, invalidation was not working

@nicoburns

Copy link
Copy Markdown
Collaborator

Yeah, :has requires custom invalidation logic on the Servo side.

@yezhizhen

Copy link
Copy Markdown
Member Author

Yeah, :has requires custom invalidation logic on the Servo side.

Thanks. Do we have a rough idea how hard is it to support this, and where we can start from in Servo side?

@nicoburns

Copy link
Copy Markdown
Collaborator

Yeah, :has requires custom invalidation logic on the Servo side.

Thanks. Do we have a rough idea how hard is it to support this, and where we can start from in Servo side?

It's probably one of the hardest CSS feature to support! But it's definitely doable. The main trouble is that none of the requirements are documented, so it'd be a case of cribbing from the Gecko codebase and asking for help from Gecko developers (#layout in Mozilla matrix).

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