Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: Move font-family outside of mako #19366

Merged
merged 1 commit into from Nov 25, 2017

Conversation

CYBAI
Copy link
Member

@CYBAI CYBAI commented Nov 24, 2017

This is a sub-PR of #19015
Besides, this is the last PR for font.mako.rs! πŸŽ‰
r? emilio



This change is Reviewable

Copy link
Member

@emilio emilio left a comment

Choose a reason for hiding this comment

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

Looks great, just minor nits.

Thanks a lot for knocking out font.mako.rs!!! \o/

pub fn generic(name: &Atom) -> (structs::FontFamilyType, u8) {
use gecko_bindings::structs::FontFamilyType;
if *name == atom!("serif") {
(FontFamilyType::eFamily_serif,
Copy link
Member

Choose a reason for hiding this comment

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

nit: Indentation looks weird here, I'd put all either on the same line, or:

(FontFamilyType::eFamily_serif,
 structs::kGenericFont_serif)

Though no big preference...

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh, I didn't notice it. In the same line might be a little tedious?
Please let me make them in the same indentation in different lines.

name: (&*family.mName).into(),
syntax: FamilyNameSyntax::Quoted,
}),
x => panic!("Found unexpected font SingleFontFamily: {:?}", x),
Copy link
Member

Choose a reason for hiding this comment

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

nit: Found unexpected FontFamilyType, maybe?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, nice catch! Thanks!

#[cfg(feature = "servo")]
#[derive(Clone, Debug, Eq, Hash, MallocSizeOf, PartialEq)]
/// A list of SingleFontFamily
pub struct FontFamilyList(Vec<SingleFontFamily>);
Copy link
Member

Choose a reason for hiding this comment

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

nit: This could be Box<[SingleFontFamily]>.

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Nov 25, 2017
@emilio
Copy link
Member

emilio commented Nov 25, 2017

@bors-servo r+

@bors-servo
Copy link
Contributor

πŸ“Œ Commit a470ebd has been approved by emilio

@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. labels Nov 25, 2017
@bors-servo
Copy link
Contributor

βŒ› Testing commit a470ebd with merge 8f61fde...

bors-servo pushed a commit that referenced this pull request Nov 25, 2017
style: Move font-family outside of mako

This is a sub-PR of #19015
Besides, this is the last PR for `font.mako.rs`! πŸŽ‰
r? emilio

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #19355
- [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/19366)
<!-- Reviewable:end -->
@bors-servo
Copy link
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 8f61fde to master...

@bors-servo bors-servo merged commit a470ebd into servo:master Nov 25, 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 25, 2017
@CYBAI CYBAI deleted the font-family-out-of-mako branch November 26, 2017 08:32
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-family outside of mako.
4 participants