forked from servo/rust-cssparser
-
Notifications
You must be signed in to change notification settings - Fork 0
[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
pull
wants to merge
142
commits into
Mattlk13:master
Choose a base branch
from
servo:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
…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.
Add fuzzing support.
…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.
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.
…nce custom types. (#354) See rust-lang/rust#114369. use super::* wouldn't be enough.
It can be implemented on top of the parser anyways, and after bug 1847440 we won't use it anymore.
…verhead when slicing. (#356) These show up in profiles: https://share.firefox.dev/45Gh2s7
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot]
Can you help keep this open source service alive? 💖 Please sponsor : )