Skip to content

[pull] master from servo:master #15

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 142 commits into
base: master
Choose a base branch
from
Open

[pull] master from servo:master #15

wants to merge 142 commits into from

Conversation

pull[bot]
Copy link

@pull pull bot commented Dec 4, 2020

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

emilio and others added 3 commits December 3, 2020 20:30
This is:

 * More generic, as the state has more information like the source
   index.

 * Slightly cheaper to compute, as the source location requires math to
   compute, which the parser state doesn't

I need this to improve CSS sanitization in Gecko.

https://bugzilla.mozilla.org/show_bug.cgi?id=1680084
Pass rule start to parser rather than just a location.

This is:

 * More generic, as the state has more information like the source
   index.

 * Slightly cheaper to compute, as the source location requires math to
   compute, which the parser state doesn't

I need this to improve CSS sanitization in Gecko.

https://bugzilla.mozilla.org/show_bug.cgi?id=1680084
@pull pull bot added the ⤵️ pull label Dec 4, 2020
emilio and others added 26 commits January 11, 2021 02:46
…e inputs.

By inlining the happy-path. this improves CSS parsing performance of
benchmarks, even on PGO builds.
macros: Optimize cssparser_internal_to_lowercase for already-lowercase inputs.

By inlining the happy-path. this improves CSS parsing performance of
benchmarks, even on PGO builds.
…ock-less.

This is needed for @layer, which can be block or blockless.
Replace travisCI with Github Actions.

None
Misc. typo fixes.

This PR aims to fix assorted typos in comments and test descriptions.
It's not allowed per spec, though perhaps it should?

I filed w3c/csswg-drafts#6911
color: Don't allow commas in hwb() function.

It's not allowed per spec, though perhaps it should?

I filed w3c/csswg-drafts#6911
Update phf to 0.10

phf 0.8 still uses rand_core version <0.6.2 which suffer from [CVE-2021-27378](https://nvd.nist.gov/vuln/detail/CVE-2021-27378).
Every crate depends on it will be warned by cargo audit.
Bump version to 0.30.0

Sorry I forgot to add the version bump in previous PR.
~~I bump the patch version since this doesn't add or change anything in cssparser itself?~~
Just realized this changed the minimum rust version.
emilio and others added 28 commits June 2, 2023 15:31
This fixes issues that were found when enabling nesting by default on
Nightly.

It matches the spec (see new link) more closely. The places where we
diverge (continuing rather than stopping when hitting right-curly, etc)
are not really observable because of how our other APIs work
(parse_nested_block in particular, for that case).
[css-nesting] Make our nesting implementation match the new spec better.

This fixes issues that were found when enabling nesting by default on Nightly.

It matches the spec (see new link) more closely. The places where we diverge (continuing rather than stopping when hitting right-curly, etc) are not really observable because of how our other APIs work (parse_nested_block in particular, for that case).
Bump version for the nesting fixes.

None
This fixes UB caught by miri.
cow-rc-str: Use ptr::NonNull.

This fixes UB caught by miri.
color: Avoid a string copy in parse_color_function.

None
* Enhance component serialization with inf and nan support

Modern syntax colors support NaN and infinity values. These values are
now allowed, where previously for some lab/lch/oklab/oklch components,
NaN values were truncated to 0.0.

NaN and infinity now also correctly serializes to calc(NaN) and
calc(infinity) respectively.

* Do not clamp or adjust any values when parsing color.
Legacy `rgb`/`rgba` syntax does not allow the "none" keyword and
although the modern `rgb`/`rgba` syntax does support it, it is
immediately converted to 0, because we never have to serialize back to
"none" keywords for `rgb`/`rgba`.

Also `RGBA` is now renamed to `Rgba` as per common rust naming
conventions now that it is not used directly in Gecko any more.
* Run miri on nightly

* Exclude tests under miri on CI that take over a minute to run
This will allow me to remove some duplicated version of this from Gecko.

This changes the API of ascii_case_insensitive_phf_map, so needs to be a
breaking bump.
It can be implemented on top of the parser anyways, and after
bug 1847440 we won't use it anymore.
Because the structs are public it only make sense to make the getters
public as well.
…like selectors. (#359)

This speeds up the test-case in Mozilla bug 1851814 to be ~5s to ~300ms
on a local opt build.

[1]: https://bugzilla.mozilla.org/show_bug.cgi?id=1851814
* parser: Use a lookup table for Delimiter::from_byte.

It's faster.

* tests: Add a benchmark for Delimiters::from_byte
This crate is unused now that we have real proc macros.
)

* Replace TokenSerializationType with TokenSerializationTypeVariants

Making TokenSerializationType public is useful to describe a CSS string
that is already known to be valid in cases when the
TokenSerializationTypes of the start and end of the CSS string is
needed, but Tokens are not.

This helps with creating a custom_properties::VariableValue from the CSS
string of a computed value for CSS Properties and Values, see Mozilla
bug 1858305 [1].

[1]: https://bugzilla.mozilla.org/show_bug.cgi?id=1858305

* Derive Default trait for TokenSerializationType

* Deprecate TokenSerializationType::nothing()
Tested with:

cargo +nightly update -Zminimal-versions
cargo check --all-targets
cargo +nightly check --all-targets --all-features
@mrobinson mrobinson deleted the branch Mattlk13:master March 20, 2024 09:45
@mrobinson mrobinson deleted the master branch March 20, 2024 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.