Now that PropertyDeclaration and AnimationValue have the same discriminants,
that means the trick found in PropertyDeclaration::id can be done in
AnimationValue::id.
By making AnimationValue have the same representation as PropertyDeclaration
and Void variants for non-animatable properties, we know by constructions
that all properties have the same discriminant in both.
Try to reduce instances of intermittent failures in wpt sync.
Making the job take longer in favour of reducing the variability of test results makes sense to me.
<!-- 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/20006)
<!-- Reviewable:end -->
style: Add infrastructure to have a standalone author stylesheet collection
Right now Gecko uses a whole `Stylist` for stuff like XBL / Shadow DOM.
That's not great, because it has tons of unrelated logic, and also eats up a lot of memory. Also, it prevents us to optimize style changes in shadow hosts the same way we do for the document.
These patches mostly rejigger stuff around so that you can define a `DocumentStylesheetSet` and then an `AuthorStylesheetSet`, which would contain just the Shadow DOM sheets / XBL resource sheets.
It still doesn't introduce any use for the later, but that will come later.
There's a patch in this PR that requires Gecko changes, posted in https://bugzilla.mozilla.org/show_bug.cgi?id=1436798.
<!-- 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/20004)
<!-- Reviewable:end -->
In particular, `rebuild` is now done entirely by CascadeData, which simplifies
more stuff.
The eventual final state for this is that the data structure we use to store the
XBL / Shadow DOM stuff will be something like:
struct AuthorStyles { CascadeData, AuthorSheetCollection }
MozReview-Commit-ID: 8TExtP58L4X
This will make it easier to handle it properly for Shadow DOM, though this patch
doesn't do that.
This also makes some method inline and infallible for convenience, since nobody
checks the errors anyway.
Bug: 1436798
Reviewed-by: bholley
MozReview-Commit-ID: Hq3erAUs5tf
Chances are we need to pass it around in a bit.
Also invert the boolean because I don't want to reason about double negations,
even if they're simple.
MozReview-Commit-ID: KhX4lDKwDoj
replaced content_type from DOCString to Mime
Replaced content_type from DomString to Mime
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix#16483 (https://github.com/servo/servo/issues/16483).
<!-- Either: -->
- [x] These changes do not require tests because they make changes to already existing files
<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
<!-- 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/19972)
<!-- Reviewable:end -->
Improve Freetype font handling and font selection
<!-- Please describe your changes on the following line: -->
This correctly implements the boldness and stretchiness properties for Freetype fonts. This also modifies the metric used to select fonts so that it takes account of stretchiness and italicness instead of just boldness. Finally there is a test of font selection (and thereby that fonts are having their boldness/italicness correctly read).
These were originally part of an old and abandoned pull request. I've rebased the changes and modified them to make them work with some name changes.
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).
<!-- Either: -->
- [X] There are tests for these changes OR
- [ ] These changes do not require tests because _____
<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
<!-- 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/19965)
<!-- Reviewable:end -->
Fix FontTemplateDescriptor under FreeType
Issue #17321. Under Linux, using "font-family: sans-serif" previously
caused Servo to select the "UltraLight" face (of DejaVu Sans). There were
two reasons for this:
1. Font weight was only retrieved from the OS/2 table for bold faces.
This neglected to retrieve the weight information for "lighter than
normal" weight faces. This meant that the UltraLight face appeared as
normal weight, and was selected.
2. Retrieval of font stretch information from the OS/2 table was not
implemented at all.
<!-- 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/19928)
<!-- Reviewable:end -->