Selectors cssparser upgrade#264
Selectors cssparser upgrade#264kornelski merged 7 commits intocloudflare:masterfrom paolobarbolini:selectors-cssparser-upgrade
Conversation
|
I'd missed the additional tests that get run by the script. I'll try understanding what broke when I have time. |
|
there is a test failure. This seems like an edge case, so I'm not sure if that's an implementation problem, or the test needs updating. |
|
I'm looking into it right now. The test is correct, so there's a regression somewhere. |
|
I'm still not sure what changed but basically CSS doesn't consider an empty string to start or end by an empty string. |
This finally resolves the dependency on phf 0.8. - Port to_unconditional from selectors – this is no longer implemented for ParsedCaseSensitivity. - Add PhantomData to ExtraMatchingData which now requires a lifetime. - Add unsupported Has(_) type
|
So the current issue is in With I think this may be a legit use-after-free error, or at least an incompatibility of selectors with WASM. I've tracked it down to The /// A selector list is a tagged pointer with either a single selector, or a ThinArc<()> of multiple
/// selectors.
#[derive(Clone, Eq, Debug, PartialEq)]
#[cfg_attr(feature = "to_shmem", derive(ToShmem))]
#[cfg_attr(feature = "to_shmem", shmem(no_bounds))]
pub struct SelectorList<Impl: SelectorImpl>(
#[cfg_attr(feature = "to_shmem", shmem(field_bound))]
ThinArcUnion<SpecificityAndFlags, Component<Impl>, (), Selector<Impl>>,
); |
|
|
🚢 Thank you for this, looks like we can get rid of the duplicate crates in downstream projects now. |
|
Any chance of getting a new release out? I'd really like to get this improvement in our projects |
This takes the branch from #250 (comment) and applies some additional commits to make this work. I'm not sure if this is correct, but tests pass. The biggest change I did was making tests have
[foo*=""]require attributes, which it wasn't expecting before.Closes #250
Closes #262