It's not only more consistent (since we have a proper ParserContext there), but
also fixes a bunch of bugs where Gecko accidentally exposes and allows setting
internal state because of conversions from nsCSSPropertyID to PropertyId.
This adds the extra complexity of caring about aliases for longer, but that's
probably not a big deal in practice, since we also have PropertyDeclarationId.
MozReview-Commit-ID: C2Js8PfloxQ
style: Move font -moz-script-level outside of mako
This is a sub-PR of #19015
r? emilio
---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix#19068 (github issue number if applicable).
- [x] These changes do not require tests because _____
<!-- 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/19101)
<!-- Reviewable:end -->
Constified enums are default now. I think I want to introduce an option to
bindgen to allow setting the default enum behavior, but it doesn't need to block
this.
The ServoBindings.toml changes are somewhat hacky, but that's because of
https://github.com/rust-lang-nursery/rust-bindgen/issues/1125.
Also, the fixups now need to account for whitespace, since quote generates stuff
like root :: nsString, and we don't rustfmt the bindings if there's no rustfmt
installed.
Bug: 1412486
Reviewed-by: xidorn
MozReview-Commit-ID: EY5eNnCiTIw
The code that uses it is of dubious utility, fwiw, but some of it is used on
Servo, so I'll kill that separately.
Bug: 1412486
Reviewed-by: xidorn
MozReview-Commit-ID: KauvXX32zLM
style: Move font -moz-script-min-size outside of mako
This is a sub-PR for #19015
r? emilio
---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix#19034 (github issue number if applicable).
- [X] These changes do not require tests because _____
<!-- 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/19051)
<!-- Reviewable:end -->
style: Move text-overflow outside of mako
<!-- Please describe your changes on the following line: -->
---
<!-- 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 are apart of #19015 (github issue number if applicable).
<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because refactoring.
<!-- 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/19044)
<!-- Reviewable:end -->
There are two key steps when resolving text styles with `::first-line`:
1. `ResolveStyleForText` computes the initial style of the text via
`Servo_ComputedValues_Inherit`
2. `ReparentStyleContext` is called to update style data when the first line
of text is moved to be a child of the `::first-line` frame
Before this patch, `Servo_ComputedValues_Inherit` would clear out unvisited
rules, but visited styles (with rules inside) were cloned as-is, meaning that
step 1 might leave the text node with a style that has:
* Unvisited rules: None
* Visited rules: Some
When we later go to step 2 and re-parent onto the `::first-line` styles, we try
to cascade with these leftover visited rules. This causes any `::first-line`
styles from our parent to be overridden by these rules which are no longer quite
right for the new frame tree.
In this patch, we resolve this by changing `StyleBuilder::for_inheritance`
(which is used by step 1's `Servo_ComputedValues_Inherit`) to also clear out
visited rules, so that we use the same logic for both unvisited and visited text
styles when reparenting onto the `::first-line` frame.
MozReview-Commit-ID: 3sgc4eGHBXs
We have three different enums to represent slightly different things. Reuse them
properly, and kill some code in the animated_properties module while at it.
MozReview-Commit-ID: 5ZAly8f4lWy
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
We share value representation, so there's no reason to do this in a more complex
way.
MozReview-Commit-ID: BITfCPqTkal
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>