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
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
142 commits
Select commit Hold shift + click to select a range
4734033
Pass rule start to parser rather than just a location.
emilio Dec 3, 2020
1e4dbb7
Breaking version bump.
emilio Dec 3, 2020
a37566b
Auto merge of #277 - servo:start, r=heycam
bors-servo Dec 4, 2020
534be35
macros: Optimize cssparser_internal_to_lowercase for already-lowercas…
emilio Jan 10, 2021
906ed7f
Minor version bump.
emilio Jan 11, 2021
0212922
Auto merge of #279 - servo:lowercase-happy, r=heycam
bors-servo Jan 11, 2021
5307ec3
serializer: Add a TODO for something the fuzzer caught which was a re…
emilio Mar 11, 2021
d2dc268
Add fuzzing support.
emilio Mar 11, 2021
2bb4986
Auto merge of #284 - servo:fuzzing, r=BorisChiou
bors-servo Mar 30, 2021
e7bb929
Tweak at-rule parsing API to allow a single at-rule to be block or bl…
emilio Sep 1, 2021
b8ae0a3
Bump version.
emilio Sep 1, 2021
91fceb2
Misc. typo fixes.
RillingDev Sep 25, 2021
15c2ec2
Replace deprecated std constants by associated constants.
RillingDev Sep 25, 2021
b677b96
Replace travisCI with Github Actions.
jdm Nov 21, 2021
79ff609
Auto merge of #291 - servo:github-actions, r=jdm
bors-servo Nov 21, 2021
64eb9e3
Auto merge of #288 - FelixRilling:typo-fixes, r=jdm
bors-servo Nov 21, 2021
62d63fe
Implement support for hwb() color syntax
devongovett Nov 25, 2021
9c38d86
Share more code between hsl and hwb parsing.
emilio Nov 26, 2021
f055466
Bump version.
emilio Nov 26, 2021
bf31c1d
color: Don't allow commas in hwb() function.
emilio Dec 24, 2021
5e3bf84
Auto merge of #295 - servo:hwb-fix, r=emilio
bors-servo Dec 24, 2021
1e4fe23
Update phf to 0.10
Apr 28, 2022
8ef116b
Update min rust version to 1.40
Apr 28, 2022
8b17f4e
Auto merge of #300 - wusyong:phf, r=emilio
bors-servo Apr 28, 2022
df92570
Bump version to 0.30.0
Apr 28, 2022
3873411
Bump patch version instead
Apr 28, 2022
6865fd0
Auto merge of #301 - wusyong:bump, r=emilio
bors-servo Apr 29, 2022
9201560
Update itoa to 1.0
Apr 25, 2022
4759651
Bump version.
emilio May 18, 2022
6de90d5
color: Expose hsl/hwb to rgb functions.
emilio May 21, 2022
7cb5206
Allow working with older PHF versions.
emilio May 21, 2022
d23eb49
Shrink unsafe block
cactter Jul 22, 2022
defa171
Switch Travis CI badge to GitHub Actions and update link
atouchet Aug 7, 2022
9f936c0
Include 0.11 in the range of compatible phf versions.
adamreichold Aug 6, 2022
707336b
Auto merge of #306 - adamreichold:increase-phf-version-range, r=emilio
bors-servo Aug 7, 2022
4c5d065
Auto merge of #307 - atouchet:bdg, r=jdm
bors-servo Aug 7, 2022
b99a415
Implement [ok]lab, [ok]lch from color-4 spec.
tiaanl Oct 7, 2022
5314a2a
Remove WithAlpha trait and fix a few small issues.
tiaanl Oct 18, 2022
52e12a4
Change alpha values to f32
tiaanl Oct 19, 2022
0a88c18
Rename color structs to follow rust style guide
tiaanl Oct 19, 2022
c685ccd
Rename Absolute color enum values to follow rust coding style.
tiaanl Oct 20, 2022
250e11d
Revert changing RGBA struct name
tiaanl Oct 20, 2022
4244657
Try to fix CI.
emilio Oct 20, 2022
375b537
Auto merge of #310 - servo:ci-woes, r=emilio
bors-servo Oct 20, 2022
d478409
Auto merge of #309 - tiaanl:new-csscolor, r=emilio
bors-servo Oct 20, 2022
3e6b3d4
parser: Add parse_comma_separated_ignoring_errors.
emilio Dec 6, 2022
63e209c
Bump MSRV to 1.56
GPHemsley Dec 9, 2022
0d6dc4a
Fix CI, again.
emilio Dec 12, 2022
aa72d31
Auto merge of #316 - servo:fix-ci-again, r=emilio
bors-servo Dec 12, 2022
0666a74
Change color tests to check the serialized output of colors in stead …
tiaanl Dec 7, 2022
722b30d
Auto merge of #313 - tiaanl:tests-only, r=emilio
bors-servo Dec 14, 2022
7c58008
Add parsing of color() (#317)
tiaanl Jan 25, 2023
d3670a8
Use the `std::matches!` macro
nickelc Jan 23, 2023
f9093b5
Remove AbsoluteColor abstraction
tiaanl Jan 30, 2023
fb10dbe
Fix csswg urls
tiaanl Jan 30, 2023
c5104c2
Auto merge of #321 - tiaanl:normalize-color, r=emilio
bors-servo Jan 31, 2023
8be0dc6
Auto merge of #322 - tiaanl:fix-csswg-urls, r=emilio
bors-servo Jan 31, 2023
5a345d6
Refactor color parser to take a generic as output
tiaanl Jan 31, 2023
0a85c09
Auto merge of #323 - tiaanl:abstract-parse, r=emilio
bors-servo Feb 6, 2023
5b20da8
Make the abstract color parser types public
tiaanl Feb 17, 2023
b196a16
Auto merge of #324 - tiaanl:publics, r=emilio
bors-servo Feb 17, 2023
81a6424
Combine parsing into legacy and new parsing.
tiaanl Mar 7, 2023
85463cd
Rename percentage_max to percentage_basis
tiaanl Mar 9, 2023
caa0076
Auto merge of #328 - tiaanl:new-parsing, r=emilio
bors-servo Mar 9, 2023
2f56d1c
Do not convert hsl/hwb to RGB at parse time to not loose precision.
tiaanl Mar 9, 2023
af78ba0
Auto merge of #326 - tiaanl:add-hsl-hwb, r=emilio
bors-servo Mar 9, 2023
e91919c
Allow use of none keyword as color components.
tiaanl Mar 9, 2023
496ce0b
Don't use hacky Option<T> impl for serializing "none".
tiaanl Mar 9, 2023
56ec454
Allow "none" is rgb/rgba() with new syntax.
tiaanl Mar 9, 2023
f962676
Clean up legacy parsing functions.
tiaanl Mar 9, 2023
95af223
Do not pass Option for HSHL, because we never have to serialize with …
tiaanl Mar 9, 2023
c1d4607
Factor out parse_modern_alpha.
tiaanl Mar 10, 2023
a2013cd
Use Option<f32> for hsl components as well.
tiaanl Mar 10, 2023
9bdf3bc
Use Option<f32> for rgb components as well.
tiaanl Mar 10, 2023
4582f86
Change parse_hash_color to output a FromParsedColor.
tiaanl Mar 10, 2023
da5ea89
Small cleanup for mapping values.
tiaanl Mar 11, 2023
45bc47e
Auto merge of #327 - tiaanl:add-none-keyword, r=emilio
bors-servo Mar 11, 2023
dc39bd5
Add documentation for Hsl and Hwb structs.
tiaanl Mar 11, 2023
79d0cf5
Color struct no longer need to be repr(C)
tiaanl Mar 11, 2023
8d4c776
Expand documentaton for Color
tiaanl Mar 11, 2023
a44c83a
Address some clippy suggestions
tiaanl Mar 11, 2023
51cb57c
Add correct links and silence doc warning.
tiaanl Mar 11, 2023
11f6aaf
Allow macros to be imported with `use` instead of `#[macro_use]`
SimonSapin Apr 19, 2023
e88763d
Auto merge of #330 - servo:macro-import, r=jdm
bors-servo Apr 22, 2023
53ace36
Auto merge of #329 - tiaanl:next, r=emilio
bors-servo Apr 27, 2023
9ea6150
Auto merge of #305 - cactter:master, r=emilio
bors-servo Apr 27, 2023
460eb9d
rules_and_declarations: Minor clean-ups.
emilio Apr 27, 2023
48b8f0f
rules_and_declarations: Clean-up lambdas.
emilio Apr 27, 2023
bd27360
Bump MSRV to 1.63
emilio Apr 27, 2023
c2ca656
Make `ParseError` a `std::error::Error`
lucacasonato Apr 6, 2022
c49f434
Auto merge of #332 - servo:parseerror, r=emilio
bors-servo Apr 27, 2023
c8afe3b
Auto merge of #289 - FelixRilling:deprecation-fixes, r=emilio
bors-servo Apr 27, 2023
20be7cc
Auto merge of #331 - servo:r-and-d-cleanups, r=emilio
bors-servo Apr 27, 2023
313a7dc
nesting: Introduce an opt-in into nesting.
emilio Apr 27, 2023
2546cfa
Bump version to 0.31 because it's a breaking change.
emilio Apr 27, 2023
ce43ee6
macros: Fix indentation of cssparser_internal_to_lowercase.
emilio Apr 27, 2023
05c4e05
Auto merge of #334 - servo:indent-fix, r=emilio
bors-servo Apr 27, 2023
3e1bd05
Auto merge of #333 - servo:nesting, r=tiaanl
bors-servo Apr 29, 2023
020c5d7
Encapsulate unsafe in _cssparser_internal_to_lowercase macro
nicoburns Apr 30, 2023
8982f0b
Move function outside of macro definition
nicoburns Apr 30, 2023
39ea1b0
Fix fn reference and remove usize cast
nicoburns Apr 30, 2023
b0c1761
Auto merge of #335 - nicoburns:encapsulate-unsafe-in-macro, r=SimonSapin
bors-servo Apr 30, 2023
f83b67f
build: Make match_byte a proper proc-macro.
emilio May 8, 2023
da24523
Auto merge of #337 - servo:proc-macro, r=SimonSapin
bors-servo May 9, 2023
bcbc543
[css-nesting] Remove DeclarationListParser.
emilio May 13, 2023
ba298b6
Auto merge of #338 - servo:nesting, r=tiaanl
bors-servo May 16, 2023
dd6bb20
[css-nesting] Fix body parsing recovery when nesting is not enabled.
emilio May 16, 2023
6ce91af
Auto merge of #339 - servo:nesting, r=emilio
bors-servo May 16, 2023
d5230b9
Make the serialize_alpha function public as serialize_color_alpha.
tiaanl May 19, 2023
8a24b11
Auto merge of #340 - tiaanl:pub-alpha, r=tiaanl
bors-servo May 22, 2023
24f30b4
Remove build dependencies
glandium Jun 1, 2023
b18832e
Update cssparser-macros to syn 2
glandium Jun 1, 2023
842ba9a
Auto merge of #342 - glandium:syn2, r=emilio
bors-servo Jun 2, 2023
a3ebfb1
Auto merge of #341 - glandium:build-deps, r=emilio
bors-servo Jun 2, 2023
a01848b
[css-nesting] Make our nesting implementation match the new spec better.
emilio May 30, 2023
2a46b64
Auto merge of #343 - servo:nesting, r=tiaanl
bors-servo Jun 3, 2023
7f70ad9
Bump version for the nesting fixes.
emilio Jun 4, 2023
90d38e8
Auto merge of #344 - servo:version-bump, r=emilio
bors-servo Jun 4, 2023
0ebd17b
Bump cssparser-macros version too.
emilio Jun 4, 2023
6cd4285
cow-rc-str: Use ptr::NonNull.
emilio Jun 4, 2023
d2c5f86
color: Avoid a string copy in parse_color_function.
emilio Jun 5, 2023
aa95ebc
Auto merge of #345 - servo:cow-rc-str, r=glandium
bors-servo Jun 6, 2023
1ba4991
Auto merge of #347 - servo:color-copy, r=emilio
bors-servo Jun 6, 2023
a5ba6dd
Version bump.
emilio Jun 6, 2023
2fd15ba
Enable the GitHub merge queue (#349)
mrobinson Jul 11, 2023
a09f283
Enhance modern component serialization with inf and nan support (#351)
tiaanl Jul 24, 2023
a6b30d8
Rgba does not store Option as component (#352)
tiaanl Jul 24, 2023
dd17d00
Run miri on CI (#350)
zrhoffman Jul 26, 2023
8ff38af
color: Expose named colors more directly.
emilio Aug 2, 2023
0dd3140
macros: Keep the ability for ascii_case_insensitive_phf_map to refere…
emilio Aug 2, 2023
de00131
parser: Remove the line-number-offset mechanism. (#355)
emilio Aug 10, 2023
d320a8e
tokenizer: Source positions are always at char boundaries, so avoid o…
emilio Aug 25, 2023
9c53e4f
Make NumberOrPercentage and AngleOrNumber getters public. (#357)
tiaanl Sep 1, 2023
d5631d8
parser: minor clean-ups.
emilio Sep 6, 2023
88134d4
rules: Avoid tokenizing too much when nesting declarations that look …
emilio Sep 11, 2023
c97ba60
serializer: Use match_byte in the serializer. (#361)
emilio Sep 11, 2023
1ccc577
parser: Use a lookup table for Delimiter::from_byte. (#358)
emilio Sep 11, 2023
eecbe57
Remove procedural-masquerade. (#362)
emilio Sep 11, 2023
b4522c6
color: Split most of the color parsing to a separate crate. (#363)
emilio Sep 11, 2023
cab31ea
Bump version.
emilio Sep 11, 2023
aaa966d
Replace TokenSerializationType with TokenSerializationTypeVariants (#…
zrhoffman Nov 14, 2023
87438e1
Fix dependencies minimal versions (#365)
g2p Jan 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Run miri on CI (servo#350)
* Run miri on nightly

* Exclude tests under miri on CI that take over a minute to run
  • Loading branch information
zrhoffman authored Jul 26, 2023
commit dd17d007a6ea1fe1f8b1c77f7418988742a37fea
5 changes: 5 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
profile: minimal
toolchain: ${{ matrix.toolchain }}
override: true
components: ${{ matrix.toolchain == 'nightly' && 'miri,rust-src' || '' }}

- name: Cargo build
run: cargo build ${{ matrix.features }}
Expand All @@ -50,6 +51,10 @@ jobs:
run: cargo build
working-directory: macros

- name: Cargo miri test
if: "matrix.toolchain == 'nightly'"
run: cargo miri test --features skip_long_tests ${{ matrix.features }}

build_result:
name: Result
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ smallvec = "1.0"
[features]
bench = []
dummy_match_byte = []
# Useful for skipping tests when execution is slow, e.g., under miri
skip_long_tests = []

[workspace]
members = [".", "./macros", "./procedural-masquerade"]
6 changes: 6 additions & 0 deletions src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,7 @@ fn color3() {
})
}

#[cfg_attr(all(miri, feature = "skip_long_tests"), ignore)]
#[test]
fn color3_hsl() {
run_color_tests(include_str!("css-parsing-tests/color3_hsl.json"), |c| {
Expand All @@ -395,6 +396,7 @@ fn color3_keywords() {
)
}

#[cfg_attr(all(miri, feature = "skip_long_tests"), ignore)]
#[test]
fn color4_hwb() {
run_color_tests(include_str!("css-parsing-tests/color4_hwb.json"), |c| {
Expand All @@ -404,6 +406,7 @@ fn color4_hwb() {
})
}

#[cfg_attr(all(miri, feature = "skip_long_tests"), ignore)]
#[test]
fn color4_lab_lch_oklab_oklch() {
run_color_tests(
Expand Down Expand Up @@ -939,6 +942,7 @@ fn unquoted_url(b: &mut Bencher) {
})
}

#[cfg_attr(all(miri, feature = "skip_long_tests"), ignore)]
#[cfg(feature = "bench")]
#[bench]
fn numeric(b: &mut Bencher) {
Expand All @@ -953,6 +957,7 @@ fn numeric(b: &mut Bencher) {

struct JsonParser;

#[cfg_attr(all(miri, feature = "skip_long_tests"), ignore)]
#[test]
fn no_stack_overflow_multiple_nested_blocks() {
let mut input: String = "{{".into();
Expand Down Expand Up @@ -1413,6 +1418,7 @@ fn parse_sourceurl_comments() {
}
}

#[cfg_attr(all(miri, feature = "skip_long_tests"), ignore)]
#[test]
fn roundtrip_percentage_token() {
fn test_roundtrip(value: &str) {
Expand Down