| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|\ \
| |/
|/|
| |
| |
| |
| |
| | |
Prepare some code for future derivation 🌊
<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17774)
<!-- Reviewable:end -->
|
| | |
|
|/
|
|
| |
MozReview-Commit-ID: Ieg2GJT0yUl
|
| |
|
| |
|
| |
|
|
|
|
| |
… rather than generating similar code for every longhand property
|
|
|
|
| |
… rather than generating similar code for each shorthand.
|
|
|
|
| |
… rather than generating similar code for every longhand property.
|
|
|
|
| |
what Gecko does.
|
| |
|
|
|
|
| |
The impl is now always generated if animation_value_type is ComputedValue.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This allows us to support stroke-dasharray the same way as comma-separated
values.
|
|\
| |
| |
| |
| |
| |
| |
| | |
Distinguish the emptiness of a property from its initial value
<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17469)
<!-- Reviewable:end -->
|
| | |
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
For now, all variants get serialised as the space-separated serialisations
of their fields. Unit variants are not supported.
|
|\
| |
| |
| |
| |
| |
| |
| | |
Reuse Rect<T> some more
<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17071)
<!-- Reviewable:end -->
|
| |
| |
| |
| |
| | |
It makes no sense to have named fields in some cases, notably to reuse
Rect<T> in BorderRadius<T>.
|
|/ |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Prefixed intrinsic size value
<!-- Please describe your changes on the following line: -->
This is a PR for https://bugzilla.mozilla.org/show_bug.cgi?id=1355402
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #16788
- [X] These changes do not require tests because it's for stylo
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16962)
<!-- Reviewable:end -->
|
| |
| |
| |
| | |
auto() and zero() are used in the parser for flex shorthand property.
|
| | |
|
| | |
|
|/ |
|
|\
| |
| |
| |
| |
| |
| |
| | |
Derive HasViewportPercentage 🍷
<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16960)
<!-- Reviewable:end -->
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This enum type used to contain the result of parsing
one CSS source declaration (`name: value;`) and expanding shorthands.
Enum types are as big as the biggest of their variant (plus discriminant),
which was quite big because some shorthands
expand to many longhand properties.
This type was returned through many functions and methods,
wrapped and rewrapped in `Result` with different error types.
This presumably caused significant `memmove` traffic.
Instead, we now allocate an `ArrayVec` on the stack
and pass `&mut` references to it for various functions to push into it.
This type is also very big, but we never move it.
We still use an intermediate data structure because we sometimes decide
after shorthand expansion that a declaration is invalid after all
and that we’re gonna drop it.
Only later do we push to a `PropertyDeclarationBlock`,
with an entire `ArrayVec` or nothing.
In future work we can try to avoid a large stack-allocated array,
and instead writing directly to the heap allocation
of the `Vec` inside `PropertyDeclarationBlock`.
However this is tricky:
we need to preserve this "all or nothing" aspect
of parsing one source declaration,
and at the same time we want to make it as little error-prone as possible
for the various call sites.
`PropertyDeclarationBlock` curently does property deduplication
incrementally: as each `PropertyDeclaration` is pushed,
we check if an existing declaration of the same property exists
and if so overwrite it.
To get rid of the stack allocated array we’d need to somehow
deduplicate separately after pushing multiple `PropertyDeclaration`.
|
|/ |
|
| |
|
|
|
|
|
| |
Generalizing the procedure like this will allow us to re-use it for addition of
most types.
|
| |
|
| |
|
| |
|
|
|
|
| |
MozReview-Commit-ID: I7oOpYhVP5S
|
| |
|
|
|
|
| |
MozReview-Commit-ID: flF0fv9E9M
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
style: Add a StyleBuilder struct to avoid refcount and atomic CAS during the cascade.
This should fix most of the complaints that caused
https://bugzilla.mozilla.org/show_bug.cgi?id=1360889 to be open, and also fix a
bunch of other FIXMEs across the style system.
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16663)
<!-- Reviewable:end -->
|
| |
| |
| |
| |
| |
| |
| |
| | |
cascade.
This should fix most of the complaints that caused
https://bugzilla.mozilla.org/show_bug.cgi?id=1360889 to be open, and also fix a
bunch of other FIXMEs across the style system.
|