Skip to content

Conversation

@nex3
Copy link
Contributor

@nex3 nex3 commented Jul 14, 2022

@nex3 nex3 force-pushed the complex-component branch 4 times, most recently from 44a8ea2 to 015599a Compare July 15, 2022 01:53
@nex3 nex3 force-pushed the complex-component branch from 015599a to 3ea339e Compare July 15, 2022 22:45
@nex3 nex3 marked this pull request as ready for review July 15, 2022 22:47
@nex3 nex3 requested a review from jathak July 15, 2022 22:47
const AnySelectorVisitor();

bool visitComplexSelector(ComplexSelector complex) => complex.components
.any((component) => visitCompoundSelector(component.selector));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason why this calls visitCompoundSelector directly instead of component.selector.accept(this)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It just avoids an unnecessary layer of calls, especially since highly polymorphic calls like accept() tend to be particularly difficult for JIT VMs to optimize.

dependency_overrides:
source_span:
git:
url: https://github.com/dart-lang/source_span
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this PR also be marked as blocked on dart-archive/source_span#86?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't release with a Git dependency, but it's fine to have one for -dev versions.

@nex3 nex3 merged commit 4b53c16 into main Jul 18, 2022
@nex3 nex3 deleted the complex-component branch July 18, 2022 23:16
var selector = pseudo.selector;
if (selector == null) return false;

// The CSS spec specifically allows leading combinators in `:has()`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CSS spec allows 1 leading combinator.

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

Labels

None yet

4 participants