Skip to content

style: Move font-variant-east-asian outside of mako - #19220

Merged
bors-servo merged 1 commit into
servo:masterfrom
CYBAI:font-variant-east-asian-out-of-mako
Nov 16, 2017
Merged

bors-servo merged 1 commit into
servo:masterfrom
CYBAI:font-variant-east-asian-out-of-mako

Conversation

@CYBAI

@CYBAI CYBAI commented Nov 14, 2017 •

Copy link
Copy Markdown
Member

This is a sub-PR of #19015
r? emilio



This change is Reviewable

@jdm jdm added the S-needs-rebase There are merge conflict errors. label Nov 14, 2017
@CYBAI
CYBAI force-pushed the font-variant-east-asian-out-of-mako branch from 9121dbf to bb9eb4f Compare November 14, 2017 16:55
@highfive

Copy link
Copy Markdown

Heads up! This PR modifies the following files:

  • @bholley: components/style/values/computed/font.rs, components/style/values/specified/mod.rs, components/style/values/specified/font.rs, components/style/properties/longhand/font.mako.rs, components/style/values/computed/mod.rs
  • @canaltinova: components/style/values/computed/font.rs, components/style/values/specified/mod.rs, components/style/values/specified/font.rs, components/style/properties/longhand/font.mako.rs, components/style/values/computed/mod.rs
  • @emilio: components/style/values/computed/font.rs, components/style/values/specified/mod.rs, components/style/values/specified/font.rs, components/style/properties/longhand/font.mako.rs, components/style/values/computed/mod.rs

@highfive

Copy link
Copy Markdown

warning Warning warning

  • These commits modify style code, but no tests are modified. Please consider adding a test!

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Nov 14, 2017
@CYBAI
CYBAI force-pushed the font-variant-east-asian-out-of-mako branch 3 times, most recently from acc4f31 to 93fd10e Compare November 15, 2017 05:49
@CYBAI CYBAI changed the title [WIP] style: Move font-vairant-east-asian outside of mako style: Move font-vairant-east-asian outside of mako Nov 15, 2017
@nox nox changed the title style: Move font-vairant-east-asian outside of mako style: Move font-variant-east-asian outside of mako Nov 15, 2017
@nox

nox commented Nov 15, 2017

Copy link
Copy Markdown
Contributor

There is a typo in the commit title: "font-vairant-east-asian".

@CYBAI

CYBAI commented Nov 15, 2017

Copy link
Copy Markdown
Member Author

@nox Oh, thanks! Let me update it!

@CYBAI
CYBAI force-pushed the font-variant-east-asian-out-of-mako branch from 93fd10e to 9a2e1b8 Compare November 15, 2017 11:28

@emilio emilio left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

pub fn assert_restyle_hints_match() {

And then make this function just:

Self::from_bits_truncate(kw)

And the to_gecko_keyword just:

self.bits()

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated!

@CYBAI
CYBAI force-pushed the font-variant-east-asian-out-of-mako branch from 9a2e1b8 to c110c8a Compare November 15, 2017 13:27
@emilio

emilio commented Nov 15, 2017

Copy link
Copy Markdown
Member

@bors-servo r+

Neat!

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit c110c8a has been approved by emilio

@highfive highfive assigned emilio and unassigned metajack Nov 15, 2017
@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. S-needs-rebase There are merge conflict errors. labels Nov 15, 2017
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit c110c8a with merge a64b435...

bors-servo pushed a commit that referenced this pull request Nov 15, 2017
…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 -->
@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - mac-rel-css1

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Nov 15, 2017
@jdm

jdm commented Nov 15, 2017

Copy link
Copy Markdown
Member

@bors-servo retry

  • failure to build random crate

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit c110c8a with merge 8c332f5...

bors-servo pushed a commit that referenced this pull request Nov 16, 2017
…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 -->
@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-tests-failed The changes caused existing tests to fail. labels Nov 16, 2017
@bors-servo

Copy link
Copy Markdown
Contributor

☀️ 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
Approved by: emilio
Pushing 8c332f5 to master...

@bors-servo
bors-servo merged commit c110c8a into servo:master Nov 16, 2017
@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Nov 16, 2017
@CYBAI
CYBAI deleted the font-variant-east-asian-out-of-mako branch November 16, 2017 03:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move font-variant-east-asian outside of mako.

7 participants