Repository navigation
style: Move font-variant-east-asian outside of mako - #19220
Conversation
9121dbf to
bb9eb4f
Compare
|
Heads up! This PR modifies the following files:
|
acc4f31 to
93fd10e
Compare
|
There is a typo in the commit title: "font-vairant-east-asian". |
|
@nox Oh, thanks! Let me update it! |
93fd10e to
9a2e1b8
Compare
emilio
left a comment
There was a problem hiding this comment.
Looks good! But let's make the patch a bit smaller using the fact that the representations match.
| /// Obtain a specified value from a Gecko keyword value | ||
| /// | ||
| /// Intended for use with presentation attributes, not style structs | ||
| pub fn from_gecko_keyword(kw: u16) -> Self { |
There was a problem hiding this comment.
Yeah, this is not great, the right way to do it is having the same bytes as the gecko keyword, and using VariantEastAsian::from_bits_truncate and VariantEastAsiant::bits to go from / to u16.
The cool part is, they match already I believe!
But we need to assert it so it doesn't break, so I'd add a pub fn assert_variant_east_asian_matches() similar to:
And then make this function just:
Self::from_bits_truncate(kw)And the to_gecko_keyword just:
self.bits()9a2e1b8 to
c110c8a
Compare
|
@bors-servo r+ Neat! |
|
📌 Commit c110c8a has been approved by |
…milio style: Move font-variant-east-asian 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 #19216 - [x] These changes do not require tests <!-- 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/19220) <!-- Reviewable:end -->
|
💔 Test failed - mac-rel-css1 |
|
@bors-servo retry
|
…milio style: Move font-variant-east-asian 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 #19216 - [x] These changes do not require tests <!-- 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/19220) <!-- Reviewable:end -->
|
☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css1, mac-rel-css2, mac-rel-wpt1, mac-rel-wpt2, mac-rel-wpt3, mac-rel-wpt4, windows-msvc-dev |
This is a sub-PR of #19015
r? emilio
./mach build -ddoes not report any errors./mach test-tidydoes not report any errorsThis change is