Skip to content

style: Move font-size-adjust outside of mako - #19153

Merged
bors-servo merged 1 commit into
servo:masterfrom
CYBAI:font-size-adjust-out-of-mako
Nov 8, 2017
Merged

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

Conversation

@CYBAI

@CYBAI CYBAI commented Nov 8, 2017 •

Copy link
Copy Markdown
Member

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



This change is Reviewable

@highfive

highfive commented Nov 8, 2017

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

highfive commented Nov 8, 2017

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 8, 2017

@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! r=me with that nit.

use style_traits::{ToCss, StyleParseErrorKind, ParseError};
use values::computed::{font as computed, Context, Length, NonNegativeLength, ToComputedValue};
use values::specified::{AllowQuirks, LengthOrPercentage, NoCalcLength};
use values::specified::{AllowQuirks, LengthOrPercentage, NoCalcLength, Number as SpecifiedNumber};

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.

Why SpecifiedNumber? Let's just use Number, since this is the specified module.

@CYBAI CYBAI Nov 8, 2017 •

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.

I originally think it will become Number(Number) in FontSizeAdjust enum if using Number but I think you're right.
Using SpecifiedNumber looks redundant.
I've updated it.


impl ToAnimatedZero for FontSizeAdjust {
#[inline]
fn to_animated_zero(&self) -> Result<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.

Can you add under this a line like:

// FIXME(emilio): why?

products="gecko",
initial_value="computed::FontSizeAdjust::none()",
initial_specified_value="specified::FontSizeAdjust::none()",
animation_value_type="computed::FontSizeAdjust",

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.

I think you can change this to animation_value_type="ComputedValue".

@CYBAI
CYBAI force-pushed the font-size-adjust-out-of-mako branch from ce38e36 to e73f237 Compare November 8, 2017 15:40
@emilio

emilio commented Nov 8, 2017

Copy link
Copy Markdown
Member

@bors-servo r+

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit e73f237 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 8, 2017
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit e73f237 with merge 294a24a...

bors-servo pushed a commit that referenced this pull request Nov 8, 2017
style: Move font-size-adjust 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 #19151  (github issue number if applicable).
- [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/19153)
<!-- 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 294a24a to master...

@bors-servo
bors-servo merged commit e73f237 into servo:master Nov 8, 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 8, 2017
@CYBAI
CYBAI deleted the font-size-adjust-out-of-mako branch November 9, 2017 01:34
@emilio emilio mentioned this pull request Nov 9, 2017
48 of 49 tasks
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-size-adjust outside of mako.

4 participants