Skip to content

style: Derive more stuff - #19186

Merged
bors-servo merged 6 commits into
servo:masterfrom
emilio:derive-more-stuff
Nov 12, 2017
Merged

bors-servo merged 6 commits into
servo:masterfrom
emilio:derive-more-stuff

Conversation

@emilio

@emilio emilio commented Nov 12, 2017 •

Copy link
Copy Markdown
Member

This change is Reviewable

@highfive

Copy link
Copy Markdown

Heads up! This PR modifies the following files:

  • @bholley: components/style/values/specified/font.rs, components/style/values/computed/angle.rs, components/style/values/specified/angle.rs, components/style/gecko/conversions.rs, components/style/values/specified/length.rs and 1 more
  • @canaltinova: components/style/values/specified/font.rs, components/style/values/computed/angle.rs, components/style/values/specified/angle.rs, components/style/gecko/conversions.rs, components/style/values/specified/length.rs and 1 more

@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 12, 2017
@emilio

emilio commented Nov 12, 2017

Copy link
Copy Markdown
Member Author

r? @nox

@highfive highfive assigned nox and unassigned glennw Nov 12, 2017
@emilio

emilio commented Nov 12, 2017

Copy link
Copy Markdown
Member Author

@bors-servo try

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Trying commit 1f80008 with merge 3f39428...

bors-servo pushed a commit that referenced this pull request Nov 12, 2017
@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - linux-rel-wpt

@highfive highfive added the S-tests-failed The changes caused existing tests to fail. label Nov 12, 2017
@highfive highfive removed the S-tests-failed The changes caused existing tests to fail. label Nov 12, 2017
@emilio

emilio commented Nov 12, 2017

Copy link
Copy Markdown
Member Author

@bors-servo try

  • Now building

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Trying commit 950c7ca with merge 9a57e53...

bors-servo pushed a commit that referenced this pull request Nov 12, 2017
@bors-servo

Copy link
Copy Markdown
Contributor

nox
nox previously requested changes Nov 12, 2017

@nox nox left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Very neat, but I have a few nits.

///
/// Should only be serialized by presentation attributes, so even though
/// serialization for this would look the same as for the `Relative`
/// variant, it is unexposed, so no big deal.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe add #[css(function)] and name it ServoAbsolute or something, so that it serialises to -servo-absolute? At least if it ever leak outside we will know what's happening.

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.

Done (with -moz-absolute since this is moz-only anyway).

#[css(function)]
Stylistic(CustomIdent),
/// Enables display with stylistic sets
#[css(comma, function, iterable)]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Document #[css(iterable)] in the ToCss docs.

///
/// <https://drafts.csswg.org/css-values/#viewport-relative-lengths>
#[derive(Clone, Copy, Debug, MallocSizeOf, PartialEq, ToCss)]
#[css(dimension)]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please make it such that this attribute go on the dimension variants, not on the type itself. CSS doesn't say that things that use dimensions should always use dimensions.

Also, document it in ToCss.

@emilio

emilio commented Nov 12, 2017

Copy link
Copy Markdown
Member Author

Ammended, mind-re-reviewing @nox? Thanks!

@nox

nox commented Nov 12, 2017

Copy link
Copy Markdown
Contributor

@bors-servo r+

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit b750f70 has been approved by nox

@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 12, 2017
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit b750f70 with merge fad4d7a...

bors-servo pushed a commit that referenced this pull request Nov 12, 2017
@emilio
emilio dismissed nox’s stale review November 12, 2017 15:41

Comments addressed.

@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: nox
Pushing fad4d7a to master...

@bors-servo
bors-servo merged commit b750f70 into servo:master Nov 12, 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 12, 2017
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.

5 participants