Граф коммитов

245 Коммитов

Автор SHA1 Сообщение Дата
Tiaan Louw c8476cb106 Bug 1817641 - Convert RGBA to AbsoluteColor for computed/animated/resolved CSS colors r=emilio
Computed color values will not be in the correct format, closer to the
one specified by the author.  This also means that colors accross the
code are stored now as AbsoluteColor or StyleAbsoluteColor.  This allows
color space/gamut information to be available for use.

Some animation related test failures had to be changed, because colors
now has greater precision.  Animated a color now causes a lot more
animation updates, which was not initially expected.  See the bug for
discussion.

Differential Revision: https://phabricator.services.mozilla.com/D171021
2023-03-07 11:28:15 +00:00
Tiaan Louw 5b5450146f Bug 1352757 - Add lab(), lch(), oklab(), oklch() to specified colors. r=supply-chain-reviewers,emilio
Use new changes from cssparser and use the new lab/lch/oklab/oklch color
formats.

Introduced a new color type AbsoluteColor.  It represents any kind of
color that has absolute numerical values.  It is also tied to a color
space and therefore can be trivially converted to another color space.

Differential Revision: https://phabricator.services.mozilla.com/D163579
2023-01-20 10:55:51 +00:00
Cosmin Sabou c5cbcf0a2e Backed out changeset 218b12b92ccb (bug 1352757) for causing failures on test_transitions_per_property.html. 2023-01-19 19:34:50 +02:00
Tiaan Louw bb0657c1b2 Bug 1352757 - Add lab(), lch(), oklab(), oklch() to specified colors. r=supply-chain-reviewers,emilio
Use new changes from cssparser and use the new lab/lch/oklab/oklch color
formats.

Introduced a new color type AbsoluteColor.  It represents any kind of
color that has absolute numerical values.  It is also tied to a color
space and therefore can be trivially converted to another color space.

Differential Revision: https://phabricator.services.mozilla.com/D163579
2023-01-19 16:17:15 +00:00
Emilio Cobos Álvarez 711d458368 Bug 1770616 - Update color-mix() syntax to match the current spec. r=barret
Test expectation updates for this in the latest patch of the bug.

Differential Revision: https://phabricator.services.mozilla.com/D147002
2022-05-31 08:33:47 +00:00
Emilio Cobos Álvarez b9e7c7653c Bug 1762088 - Implement parsing / serialization for container{,-type,-name} CSS properties. r=firefox-style-system-reviewers,layout-reviewers,boris
Two noteworthy details that may seem random otherwise:

 * Moving values around in nsStyleDisplay is needed so that the struct
   remains under the size limit that we have to avoid jumping allocator
   buckets.

 * All the test expectation churn is because tests depend on
   `container-type: size` parsing to run, and now they run. Tests for
   the relevant bits I implemented are passing, with the only exception
   of some `container-name-computed.html` failures which are
   https://github.com/w3c/csswg-drafts/issues/7181. Safari agrees with
   us there.

Other notes when looking at the spec and seeing how it matches the
implementation:

 * `container` syntax doesn't match spec, but matches tests and sanity:
   https://github.com/w3c/csswg-drafts/issues/7180

 * `container-type` syntax doesn't _quite_ match spec, but matches tests
   and I think it's a spec bug since the definition for the missing
   keyword is gone:
   https://github.com/w3c/csswg-drafts/issues/7179

Differential Revision: https://phabricator.services.mozilla.com/D142419
2022-03-31 22:56:20 +00:00
Emilio Cobos Álvarez bfde1cd835 Bug 1762088 - Allow to derive Parse/ToCss/SpecifiedValueInfo on bitflags. r=firefox-style-system-reviewers,layout-reviewers,boris
We keep getting this pattern of properties that have a set of joint and
disjoint flags, and copy-pasting or writing the same parsing and
serialization code in slightly different ways.

container-type is one such type, and I think we should have a single way
of dealing with this, thus implement deriving for various traits for
bitflags, with an attribute that says which flags are single vs mixed.

See docs and properties I ported. The remaining ones I left TODOs with,
they are a bit trickier but can be ported with some care.

Differential Revision: https://phabricator.services.mozilla.com/D142418
2022-03-31 22:05:02 +00:00
Mats Palmgren 039e1146f4 Bug 1738520 - Make #[css(field_bound)] and #[css(iterable)] work properly. r=mats
For now, use IntoIterator to figure the right type to add the bound.

If we need this on types that are iterable but don't provide
IntoIterator, we can add another attribute field or something.

Differential Revision: https://phabricator.services.mozilla.com/D129962
2021-11-04 18:31:55 +00:00
Emilio Cobos Álvarez 4b3dc20891 Bug 1728617 - Tweak at-rule parsing APIs to support cascade layers. r=boris
This needs https://github.com/servo/rust-cssparser/pull/287 and a
cssparser update.

Differential Revision: https://phabricator.services.mozilla.com/D124216
2021-09-03 09:26:10 +00:00
Emilio Cobos Álvarez fb069248c0 Bug 1716045 - Unify font-family storage. r=mats,jfkthame
This changes font-family storage to reuse the rust types, removing a
bunch of code while at it. This allows us to, for example, use a single
static font family for -moz-bullet and clone it, rather than creating a
lot of expensive copies.

Differential Revision: https://phabricator.services.mozilla.com/D118011
2021-06-18 19:35:50 +00:00
Emilio Cobos Álvarez 562c44a853 Bug 1551040 - Add dark mode to plaintext.css, and a document rule to target plaintext documents. r=boris
We add two @-moz-document functions: `plain-text-document()`, matching the
obvious, and `unobservable-document()`, which matches a top-level document with
no opener. This is the equivalent check we do for automatic darkening of
`about:blank` here:

    https://searchfox.org/mozilla-central/rev/014fe72eaba26dcf6082fb9bbaf208f97a38594e/layout/base/PresShell.cpp#5282

The former we don't need to use, but it's nice to let user stylesheets target
plaintext documents properly (rather than relying on extensions or what not).

Note that these are not content-observable.

Add two tests: One showing that we produce different rendering when on dark
mode, and one showing that we produce the same one from an iframe, regardless
of dark mode.

Depends on D101517

Differential Revision: https://phabricator.services.mozilla.com/D101518
2021-01-17 14:44:41 +00:00
Dorel Luca dac45cc702 Backed out 3 changesets (bug 1551040) for Browser-chrome failures in browser/base/content/test/static/browser_parsable_css.js
Backed out changeset f48f479bcacd (bug 1551040)
Backed out changeset a6cd4b393999 (bug 1551040)
Backed out changeset 252cbf40efcb (bug 1551040)
2021-01-17 16:38:39 +02:00
Emilio Cobos Álvarez 71b5ff7515 Bug 1551040 - Add dark mode to plaintext.css, and a document rule to target plaintext documents. r=boris
We add two @-moz-document functions: `plain-text-document()`, matching the
obvious, and `unobservable-document()`, which matches a top-level document with
no opener. This is the equivalent check we do for automatic darkening of
`about:blank` here:

    https://searchfox.org/mozilla-central/rev/014fe72eaba26dcf6082fb9bbaf208f97a38594e/layout/base/PresShell.cpp#5282

The former we don't need to use, but it's nice to let user stylesheets target
plaintext documents properly (rather than relying on extensions or what not).

Note that these are not content-observable.

Add two tests: One showing that we produce different rendering when on dark
mode, and one showing that we produce the same one from an iframe, regardless
of dark mode.

Depends on D101517

Differential Revision: https://phabricator.services.mozilla.com/D101518
2021-01-16 19:15:59 +00:00
Bogdan Tara c88a628881 Backed out 3 changesets (bug 1551040) for stylesheets related bustage CLOSED TREE
Backed out changeset 3822fe3e163d (bug 1551040)
Backed out changeset 032025f28d8f (bug 1551040)
Backed out changeset 1aeb38c2dce3 (bug 1551040)
2021-01-16 20:53:31 +02:00
Emilio Cobos Álvarez fcace619be Bug 1551040 - Add dark mode to plaintext.css, and a document rule to target plaintext documents. r=boris
We add two @-moz-document functions: `plain-text-document()`, matching the
obvious, and `unobservable-document()`, which matches a top-level document with
no opener. This is the equivalent check we do for automatic darkening of
`about:blank` here:

    https://searchfox.org/mozilla-central/rev/014fe72eaba26dcf6082fb9bbaf208f97a38594e/layout/base/PresShell.cpp#5282

The former we don't need to use, but it's nice to let user stylesheets target
plaintext documents properly (rather than relying on extensions or what not).

Note that these are not content-observable.

Add two tests: One showing that we produce different rendering when on dark
mode, and one showing that we produce the same one from an iframe, regardless
of dark mode.

Depends on D101517

Differential Revision: https://phabricator.services.mozilla.com/D101518
2021-01-16 10:53:09 +00:00
Mihai Alexandru Michis f1247be876 Backed out 4 changesets (bug 1551040) for causing mochitest failures.
CLOSED TREE

Backed out changeset 06c07b144db8 (bug 1551040)
Backed out changeset a6ebb45be432 (bug 1551040)
Backed out changeset 38f1416a92c3 (bug 1551040)
Backed out changeset 6c80881c8844 (bug 1551040)
2021-01-16 12:47:04 +02:00
Emilio Cobos Álvarez 08ce37b5ed Bug 1551040 - Add dark mode to plaintext.css, and a document rule to target plaintext documents. r=boris
We add two @-moz-document functions: `plain-text-document()`, matching the
obvious, and `unobservable-document()`, which matches a top-level document with
no opener. This is the equivalent check we do for automatic darkening of
`about:blank` here:

    https://searchfox.org/mozilla-central/rev/014fe72eaba26dcf6082fb9bbaf208f97a38594e/layout/base/PresShell.cpp#5282

The former we don't need to use, but it's nice to let user stylesheets target
plaintext documents properly (rather than relying on extensions or what not).

Note that these are not content-observable.

Add two tests: One showing that we produce different rendering when on dark
mode, and one showing that we produce the same one from an iframe, regardless
of dark mode.

Depends on D101517

Differential Revision: https://phabricator.services.mozilla.com/D101518
2021-01-16 03:19:38 +00:00
Emilio Cobos Álvarez 96a85ab8c6 Bug 1680558 - Update cssparser to get ParserState in rule parser. r=heycam
The changes should be trivial.

The third_party changes are up for review in
https://github.com/servo/rust-cssparser/pull/277 (and of course I'll
land with a bump to 0.28 rather than the override after that gets r+'d).

The basic idea is that with this we have the actual start offset of the
rule, so we wouldn't include html comments or other invalid stuff we
discard during sanitization in bug 1680084. But that's a separate
change.

Differential Revision: https://phabricator.services.mozilla.com/D98677
2020-12-04 10:47:55 +00:00
Razvan Maries e755870785 Backed out changeset 54068f044426 (bug 1680558) for perma failures on browser_resources_stylesheets.js. CLOSED TREE 2020-12-04 06:48:30 +02:00
Emilio Cobos Álvarez 659a6773ad Bug 1680558 - Update cssparser to get ParserState in rule parser. r=heycam
The changes should be trivial.

The third_party changes are up for review in
https://github.com/servo/rust-cssparser/pull/277 (and of course I'll
land with a bump to 0.28 rather than the override after that gets r+'d).

The basic idea is that with this we have the actual start offset of the
rule, so we wouldn't include html comments or other invalid stuff we
discard during sanitization in bug 1680084. But that's a separate
change.

Differential Revision: https://phabricator.services.mozilla.com/D98677
2020-12-04 03:14:36 +00:00
Nicolas Silva 298e987b8e Bug 1656236 - Update euclid in stylo. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D85762
2020-08-18 17:28:27 +00:00
Csoregi Natalia fd9ca77e37 Backed out 3 changesets (bug 1656236) for wrench failures on filter-drop-shadow-clip-3.yaml. CLOSED TREE
Backed out changeset 78205b816ac8 (bug 1656236)
Backed out changeset dc4ccb5a8ea9 (bug 1656236)
Backed out changeset dcfa644ba078 (bug 1656236)
2020-08-18 20:22:57 +03:00
Nicolas Silva 0473064210 Bug 1656236 - Update euclid in stylo. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D85762
2020-08-18 16:06:19 +00:00
Dorel Luca c594ecfbe7 Backed out 4 changesets (bug 1656236) for Webrender build bustage in reftests/filters/filter-drop-shadow-clip-3.yaml. CLOSED TREE
Backed out changeset c24f6a05294b (bug 1656236)
Backed out changeset a5d6a6f2f3ac (bug 1656236)
Backed out changeset bf4a2fe9f9c0 (bug 1656236)
Backed out changeset c5189b274b91 (bug 1656236)
2020-08-05 18:39:35 +03:00
Nicolas Silva 22f326b43d Bug 1656236 - Update euclid in stylo. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D85762
2020-08-05 09:15:24 +00:00
Cristina Coroiu 2930787297 Backed out 4 changesets (bug 1656236) for build bustages on a CLOSED TREE
Backed out changeset bd79e14bc5ba (bug 1656236)
Backed out changeset dc76da883823 (bug 1656236)
Backed out changeset c4883923e091 (bug 1656236)
Backed out changeset 9464c1dcb0c9 (bug 1656236)
2020-08-05 12:10:43 +03:00
Nicolas Silva 4db3a418e0 Bug 1656236 - Update euclid in stylo. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D85762
2020-08-05 08:37:38 +00:00
Simon Sapin 0cf71dd3a3 Bug 1643201 - Move most of `SequenceWriter::write_item` to non-generic functions.
The size of LLVM IR for the `style` crate is reduced by ~1.5% (27k lines out of 1.8M)

CC https://github.com/servo/servo/issues/26713

Depends on D78202

Differential Revision: https://phabricator.services.mozilla.com/D78203
2020-06-04 00:35:30 +00:00
Emilio Cobos Álvarez 1afb168e99 Bug 1643201 - Cherry-pick some Servo Cargo.toml cleanups.
Depends on D78200

Differential Revision: https://phabricator.services.mozilla.com/D78201
2020-06-04 00:35:19 +00:00
Emilio Cobos Álvarez 31ea245f41 Bug 1643201 - Miscellaneous build fixes.
Depends on D78198

Differential Revision: https://phabricator.services.mozilla.com/D78199
2020-06-04 00:35:08 +00:00
Cameron McCormack 3ccaaa0422 Bug 1621773 - Gracefully handle errors creating shared memory UA style sheets. r=emilio
We still panic in a debug build, so that developers can notice when they
need to add a new static atom after modifying UA sheets.

We also add telemetry to note when this happens, add an app note to a
crash report, in case any crash later on occurs, and re-up the existing,
expired shared memory sheet telemetry probes so we can look at them
again.

Differential Revision: https://phabricator.services.mozilla.com/D73188
2020-05-11 00:11:45 +00:00
Erik Nordin 8dfda8ef7c Bug 1621849 - Add CSS Error for DisallowedImportRule r=emilio
- Add new CSS Error
- Add new test case for error
- Ensure that test cases use `replace()` and `replaceSync()`

Differential Revision: https://phabricator.services.mozilla.com/D69423

--HG--
extra : moz-landing-system : lando
2020-04-08 22:45:24 +00:00
Emilio Cobos Álvarez 96a8c38b0f Bug 1624298 - Ensure that derived types are right for optimized-away implementations. r=heycam
We have this optimization where, for non-generic structs, we generate just a
clone / move as the ToComputedValue / ToResolvedValue implementation.

This moves the optimization a bit further down, and refines it so that we still
generate all the relevant where clauses that make it sound, that is, that all
the ToComputedValue implementations of the fields return the same type.

Otherwise this wouldn't be sound and the type would need to become generic.

We add an escape hatch (no_field_bound) for fields that need to be cloned but
which don't implement the trait. This is right now only for the RefPtr<> in the
shared font-family list, and a piece of code in PaintWorklet which looks kinda
fishy, and probably should be fixed (but we don't ship it in Firefox and there's
a pre-existing FIXME for servo, so I punted on it for now).

The other thing this patch does is adding a bunch of ToComputedValue /
ToResolvedValue implementations that are trivial and were missing.

Differential Revision: https://phabricator.services.mozilla.com/D67913

--HG--
extra : moz-landing-system : lando
2020-03-26 13:04:20 +00:00
Emilio Cobos Álvarez f811ee2f3b Bug 1614394 - Fix Servo build.
Differential Revision: https://phabricator.services.mozilla.com/D62306

--HG--
extra : moz-landing-system : lando
2020-02-10 17:32:25 +00:00
Simon Sapin 583c7b9d38 Bug 1614394 - Move `OpaqueNode` to `style_traits`.
Differential Revision: https://phabricator.services.mozilla.com/D62302

--HG--
extra : moz-landing-system : lando
2020-02-10 17:32:11 +00:00
Boris Chiou 14387265a7 Bug 1592822 - Use Serde for SVGOffsetPath. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D60087

--HG--
extra : moz-landing-system : lando
2020-01-22 20:18:35 +00:00
Boris Chiou 38cc52c091 Bug 1592822 - Use Serde for Transform. r=emilio
Though this may make us use more space when serializing
StyleTransform, but we don't have to do extra conversion on the compostior
side, and this makes us easier to maintain the Rust type.

Differential Revision: https://phabricator.services.mozilla.com/D60045

--HG--
extra : moz-landing-system : lando
2020-01-22 20:20:38 +00:00
Bogdan Tara 958c34b738 Backed out 6 changesets (bug 1592822) for bustages complaining about layout/painting/nsDisplayList.cpp CLOSED TREE
Backed out changeset 90d0f2ebd310 (bug 1592822)
Backed out changeset 9890bad86a0e (bug 1592822)
Backed out changeset 43870cc90433 (bug 1592822)
Backed out changeset d80e0e3f5b87 (bug 1592822)
Backed out changeset 99be49183325 (bug 1592822)
Backed out changeset 9ce641556acc (bug 1592822)

--HG--
extra : histedit_source : fa4e4b2c899510f1d39ee3baa0374e2ce16d2815
2020-01-22 21:17:39 +02:00
Boris Chiou 40f3cb3d65 Bug 1592822 - Use Serde for SVGOffsetPath. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D60087

--HG--
extra : moz-landing-system : lando
2020-01-22 18:40:11 +00:00
Boris Chiou 9735c2e972 Bug 1592822 - Use Serde for Transform. r=emilio
Though this may make us use more space when serializing
StyleTransform, but we don't have to do extra conversion on the compostior
side, and this makes us easier to maintain the Rust type.

Differential Revision: https://phabricator.services.mozilla.com/D60045

--HG--
extra : moz-landing-system : lando
2020-01-22 18:40:09 +00:00
Emilio Cobos Álvarez 5d2dcb5b73 Bug 1600443 - Update cssparser and phf. r=heycam
This aligns us with Servo. It pulls a new `rand` crate version, but I'm removing
one in https://phabricator.services.mozilla.com/D55351, so hopefully adds up :)

Differential Revision: https://phabricator.services.mozilla.com/D55359

--HG--
rename : third_party/rust/cssparser-macros/Cargo.toml => third_party/rust/phf_macros/Cargo.toml
rename : third_party/rust/cssparser-macros/Cargo.toml => third_party/rust/proc-macro-hack/Cargo.toml
rename : third_party/rust/rand/.cargo-checksum.json => third_party/rust/rand-0.6.5/.cargo-checksum.json
rename : third_party/rust/rand/CHANGELOG.md => third_party/rust/rand-0.6.5/CHANGELOG.md
rename : third_party/rust/rand/Cargo.toml => third_party/rust/rand-0.6.5/Cargo.toml
rename : third_party/rust/rand/README.md => third_party/rust/rand-0.6.5/README.md
rename : third_party/rust/rand/benches/distributions.rs => third_party/rust/rand-0.6.5/benches/distributions.rs
rename : third_party/rust/rand/benches/generators.rs => third_party/rust/rand-0.6.5/benches/generators.rs
rename : third_party/rust/rand/benches/misc.rs => third_party/rust/rand-0.6.5/benches/misc.rs
rename : third_party/rust/rand/benches/seq.rs => third_party/rust/rand-0.6.5/benches/seq.rs
rename : third_party/rust/rand/build.rs => third_party/rust/rand-0.6.5/build.rs
rename : third_party/rust/rand/examples/monte-carlo.rs => third_party/rust/rand-0.6.5/examples/monte-carlo.rs
rename : third_party/rust/rand/examples/monty-hall.rs => third_party/rust/rand-0.6.5/examples/monty-hall.rs
rename : third_party/rust/rand/src/deprecated.rs => third_party/rust/rand-0.6.5/src/deprecated.rs
rename : third_party/rust/rand/src/distributions/bernoulli.rs => third_party/rust/rand-0.6.5/src/distributions/bernoulli.rs
rename : third_party/rust/rand/src/distributions/binomial.rs => third_party/rust/rand-0.6.5/src/distributions/binomial.rs
rename : third_party/rust/rand/src/distributions/cauchy.rs => third_party/rust/rand-0.6.5/src/distributions/cauchy.rs
rename : third_party/rust/rand/src/distributions/dirichlet.rs => third_party/rust/rand-0.6.5/src/distributions/dirichlet.rs
rename : third_party/rust/rand/src/distributions/exponential.rs => third_party/rust/rand-0.6.5/src/distributions/exponential.rs
rename : third_party/rust/rand/src/distributions/float.rs => third_party/rust/rand-0.6.5/src/distributions/float.rs
rename : third_party/rust/rand/src/distributions/gamma.rs => third_party/rust/rand-0.6.5/src/distributions/gamma.rs
rename : third_party/rust/rand/src/distributions/integer.rs => third_party/rust/rand-0.6.5/src/distributions/integer.rs
rename : third_party/rust/rand/src/distributions/mod.rs => third_party/rust/rand-0.6.5/src/distributions/mod.rs
rename : third_party/rust/rand/src/distributions/normal.rs => third_party/rust/rand-0.6.5/src/distributions/normal.rs
rename : third_party/rust/rand/src/distributions/other.rs => third_party/rust/rand-0.6.5/src/distributions/other.rs
rename : third_party/rust/rand/src/distributions/pareto.rs => third_party/rust/rand-0.6.5/src/distributions/pareto.rs
rename : third_party/rust/rand/src/distributions/poisson.rs => third_party/rust/rand-0.6.5/src/distributions/poisson.rs
rename : third_party/rust/rand/src/distributions/triangular.rs => third_party/rust/rand-0.6.5/src/distributions/triangular.rs
rename : third_party/rust/rand/src/distributions/uniform.rs => third_party/rust/rand-0.6.5/src/distributions/uniform.rs
rename : third_party/rust/rand/src/distributions/unit_circle.rs => third_party/rust/rand-0.6.5/src/distributions/unit_circle.rs
rename : third_party/rust/rand/src/distributions/unit_sphere.rs => third_party/rust/rand-0.6.5/src/distributions/unit_sphere.rs
rename : third_party/rust/rand/src/distributions/utils.rs => third_party/rust/rand-0.6.5/src/distributions/utils.rs
rename : third_party/rust/rand/src/distributions/weibull.rs => third_party/rust/rand-0.6.5/src/distributions/weibull.rs
rename : third_party/rust/rand/src/distributions/weighted.rs => third_party/rust/rand-0.6.5/src/distributions/weighted.rs
rename : third_party/rust/rand/src/lib.rs => third_party/rust/rand-0.6.5/src/lib.rs
rename : third_party/rust/rand/src/prelude.rs => third_party/rust/rand-0.6.5/src/prelude.rs
rename : third_party/rust/rand/src/prng/mod.rs => third_party/rust/rand-0.6.5/src/prng/mod.rs
rename : third_party/rust/rand/src/rngs/adapter/mod.rs => third_party/rust/rand-0.6.5/src/rngs/adapter/mod.rs
rename : third_party/rust/rand/src/rngs/adapter/read.rs => third_party/rust/rand-0.6.5/src/rngs/adapter/read.rs
rename : third_party/rust/rand/src/rngs/adapter/reseeding.rs => third_party/rust/rand-0.6.5/src/rngs/adapter/reseeding.rs
rename : third_party/rust/rand/src/rngs/entropy.rs => third_party/rust/rand-0.6.5/src/rngs/entropy.rs
rename : third_party/rust/rand/src/rngs/mock.rs => third_party/rust/rand-0.6.5/src/rngs/mock.rs
rename : third_party/rust/rand/src/rngs/mod.rs => third_party/rust/rand-0.6.5/src/rngs/mod.rs
rename : third_party/rust/rand/src/rngs/small.rs => third_party/rust/rand-0.6.5/src/rngs/small.rs
rename : third_party/rust/rand/src/rngs/std.rs => third_party/rust/rand-0.6.5/src/rngs/std.rs
rename : third_party/rust/rand/src/rngs/thread.rs => third_party/rust/rand-0.6.5/src/rngs/thread.rs
rename : third_party/rust/rand/src/seq/index.rs => third_party/rust/rand-0.6.5/src/seq/index.rs
rename : third_party/rust/rand/src/seq/mod.rs => third_party/rust/rand-0.6.5/src/seq/mod.rs
rename : third_party/rust/rand/tests/uniformity.rs => third_party/rust/rand-0.6.5/tests/uniformity.rs
rename : third_party/rust/rand/src/distributions/weighted.rs => third_party/rust/rand/src/distributions/weighted/mod.rs
rename : third_party/rust/rand_chacha/.cargo-checksum.json => third_party/rust/rand_chacha-0.1.1/.cargo-checksum.json
rename : third_party/rust/rand_chacha/CHANGELOG.md => third_party/rust/rand_chacha-0.1.1/CHANGELOG.md
rename : third_party/rust/rand_chacha/Cargo.toml => third_party/rust/rand_chacha-0.1.1/Cargo.toml
rename : third_party/rust/rand_chacha/README.md => third_party/rust/rand_chacha-0.1.1/README.md
rename : third_party/rust/rand_chacha/build.rs => third_party/rust/rand_chacha-0.1.1/build.rs
rename : third_party/rust/rand_chacha/src/chacha.rs => third_party/rust/rand_chacha-0.1.1/src/chacha.rs
rename : third_party/rust/rand_chacha/src/lib.rs => third_party/rust/rand_chacha-0.1.1/src/lib.rs
rename : third_party/rust/rand_core/.cargo-checksum.json => third_party/rust/rand_core-0.4.0/.cargo-checksum.json
rename : third_party/rust/rand_core/CHANGELOG.md => third_party/rust/rand_core-0.4.0/CHANGELOG.md
rename : third_party/rust/rand_core/Cargo.toml => third_party/rust/rand_core-0.4.0/Cargo.toml
rename : third_party/rust/rand_core/README.md => third_party/rust/rand_core-0.4.0/README.md
rename : third_party/rust/rand_core/src/block.rs => third_party/rust/rand_core-0.4.0/src/block.rs
rename : third_party/rust/rand_core/src/error.rs => third_party/rust/rand_core-0.4.0/src/error.rs
rename : third_party/rust/rand_core/src/impls.rs => third_party/rust/rand_core-0.4.0/src/impls.rs
rename : third_party/rust/rand_core/src/lib.rs => third_party/rust/rand_core-0.4.0/src/lib.rs
rename : third_party/rust/rand_hc/.cargo-checksum.json => third_party/rust/rand_hc-0.1.0/.cargo-checksum.json
rename : third_party/rust/rand_hc/CHANGELOG.md => third_party/rust/rand_hc-0.1.0/CHANGELOG.md
rename : third_party/rust/rand_hc/Cargo.toml => third_party/rust/rand_hc-0.1.0/Cargo.toml
rename : third_party/rust/rand_hc/README.md => third_party/rust/rand_hc-0.1.0/README.md
rename : third_party/rust/rand_hc/src/hc128.rs => third_party/rust/rand_hc-0.1.0/src/hc128.rs
rename : third_party/rust/rand_hc/src/lib.rs => third_party/rust/rand_hc-0.1.0/src/lib.rs
rename : third_party/rust/rand_pcg/.cargo-checksum.json => third_party/rust/rand_pcg-0.1.2/.cargo-checksum.json
rename : third_party/rust/rand_pcg/CHANGELOG.md => third_party/rust/rand_pcg-0.1.2/CHANGELOG.md
rename : third_party/rust/rand_pcg/Cargo.toml => third_party/rust/rand_pcg-0.1.2/Cargo.toml
rename : third_party/rust/rand_pcg/README.md => third_party/rust/rand_pcg-0.1.2/README.md
rename : third_party/rust/rand_chacha/build.rs => third_party/rust/rand_pcg-0.1.2/build.rs
rename : third_party/rust/rand_pcg/src/lib.rs => third_party/rust/rand_pcg-0.1.2/src/lib.rs
rename : third_party/rust/rand_pcg/src/pcg128.rs => third_party/rust/rand_pcg-0.1.2/src/pcg128.rs
rename : third_party/rust/rand_pcg/src/pcg64.rs => third_party/rust/rand_pcg-0.1.2/src/pcg64.rs
rename : third_party/rust/rand_pcg/tests/lcg64xsh32.rs => third_party/rust/rand_pcg-0.1.2/tests/lcg64xsh32.rs
rename : third_party/rust/rand_pcg/tests/mcg128xsl64.rs => third_party/rust/rand_pcg-0.1.2/tests/mcg128xsl64.rs
extra : moz-landing-system : lando
2019-12-04 19:54:06 +00:00
Boris Chiou 58ba6b888a Bug 1429305 - Use serde to serialize LengthPercentage and StyleRayFunction. r=emilio
We need to pass these two types into the compositor, so we need a better
way to serialize these rust types. We use serde and bincode to
serialize/deserialize them, and use ByteBuf to pass the &[u8] data
through IPC. We define StyleVecU8 for FFI usage only.

Differential Revision: https://phabricator.services.mozilla.com/D50688

--HG--
extra : moz-landing-system : lando
2019-10-31 21:35:05 +00:00
Emilio Cobos Álvarez 1f3d6c04f2 Bug 1519958 - Refactor grid types to preserve repeat() at computed value time and use cbindgen. r=mats,boris
I'm _really_ sorry for the size of the patch. I tried to do this in two steps
but it was a lot of work and pretty ugly.

This patch makes us use cbindgen for grid-template-{rows,columns}, in order to:

 * Make us preserve repeat() at computed-value time. This is per spec since
   interpolation needs to know about repeat(). Except for subgrid, which did the
   repeat expansion at parse-time and was a bit more annoying (plus it doesn't
   really animate yet so we don't need it to comply with the spec).

 * Tweaks the WPT tests for interpolation to adopt the resolution at:
   https://github.com/w3c/csswg-drafts/issues/3503.

Trade-off here, as this patch stands, is that this change makes us use less
long-living memory, since we expand repeat() during layout, but at the cost of a
bit of CPU time during layout (conditional on the property applying though,
which wasn't the case before). It should be very easy to store a cached version
of the template, should this be too hot (I expect it isn't), or to change the
representation in other ways to optimize grid layout code if it's worth it.

Another trade-off: I've used SmallPointerArray to handle line-name merging,
pointing to the individual arrays in the style data, rather than actually
heap-allocating the merged lists. This would also be pretty easy to change
should we measure and see that it's not worth it.

This patch also opens the gate to potentially improving memory usage in some
other ways, by reference-counting line-name lists for example, though I don't
have data that suggests it is worth it.

In general, this patch makes much easier to tweak the internal representation of
the grid style data structures. Overall, I think it's a win, the amount of magic
going on in that mako code was a bit huge; it took a bit to wrap my head around
it.

This patch comments out the style struct size assertions. They will be
uncommented in a follow-up patch which contains some improvements for this type,
which are worth getting reviewed separately.

Also, this patch doesn't remove as much code as I would've hoped for because of
I tried not to change most of the dom/grid code for inspector, but I think a
fair bit of the nsGridContainerFrame.cpp code that collects information for it
can be simplified / de-copy-pasted to some extent. But that was a pre-existing
problem and this patch is already quite massive.

Differential Revision: https://phabricator.services.mozilla.com/D36598
2019-08-05 22:13:21 +02:00
Emilio Cobos Álvarez 42fd1a62a1 Bug 1568083 - Fix servo build and rustfmt / tidy recent changes. 2019-07-23 02:18:36 +02:00
Patrick Walton b65fc89d31 Bug 1568083 - WebRender units are no longer reexported. r=emilio
This cherry-picks changes from Servo PR #23516.
2019-07-23 02:18:35 +02:00
Nicolas Silva a58ba90d31 Bug 1567241 - Update to euclid 0.20. r=kvark, emilio.
Differential Revision: https://phabricator.services.mozilla.com/D38530

--HG--
extra : source : d65512e23a13164f540430ff0c85a1f2a147d8a0
2019-07-18 22:54:16 +02:00
Emilio Cobos Álvarez 3a16c93150 Bug 1556602 - Fix various warnings with rust 1.37 nightly. r=froydnj
In particular:

 * trait objects without an explicit `dyn` are deprecated
 * `...` range patterns are deprecated

I think these shouldn't really warn by default and should be clippy / opt-in
lints, but anyway, doesn't hurt.

Differential Revision: https://phabricator.services.mozilla.com/D35135

--HG--
extra : moz-landing-system : lando
2019-06-18 21:32:16 +00:00
Emilio Cobos Álvarez bce5af1e30 Bug 1552080 - Add refcount logging to servo_arc. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D32173
2019-05-29 21:30:23 +02:00
Emilio Cobos Álvarez 393e8c0703 Bug 1554347 - Appease tidy. 2019-05-25 04:14:33 +02:00
Emilio Cobos Álvarez 344f076c16 Bug 1554347 - Reformat recent style system changes. 2019-05-25 04:14:30 +02:00