Skip to content

style: Move font-family outside of mako - #19366

Merged
bors-servo merged 1 commit into
servo:masterfrom
CYBAI:font-family-out-of-mako
Nov 25, 2017
Merged

bors-servo merged 1 commit into
servo:masterfrom
CYBAI:font-family-out-of-mako

Conversation

@CYBAI

@CYBAI CYBAI commented Nov 24, 2017 •

Copy link
Copy Markdown
Member

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



This change is Reviewable

@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 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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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]>.

@CYBAI
CYBAI force-pushed the font-family-out-of-mako branch from 02c0d1a to a470ebd Compare November 25, 2017 16:36
@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Nov 25, 2017
@emilio

emilio commented Nov 25, 2017

Copy link
Copy Markdown
Member

@bors-servo r+

@bors-servo

Copy link
Copy Markdown
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
Copy Markdown
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
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 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