Skip to content

Derive more Parse implementations (fixes #19827) - #19903

Merged
bors-servo merged 7 commits into
masterfrom
derive-all-the-things
Feb 1, 2018
Merged

bors-servo merged 7 commits into
masterfrom
derive-all-the-things

Conversation

@nox

@nox nox commented Jan 30, 2018 •

Copy link
Copy Markdown
Contributor

Fixes #19827.

This change is Reviewable

@highfive

Copy link
Copy Markdown

Heads up! This PR modifies the following files:

  • @bholley: components/style/values/specified/color.rs, components/style/gecko/conversions.rs, components/style/lib.rs, components/style/properties/shorthand/border.mako.rs, components/style/macros.rs and 15 more
  • @canaltinova: components/style/values/specified/color.rs, components/style/gecko/conversions.rs, components/style/lib.rs, components/style/properties/shorthand/border.mako.rs, components/style/macros.rs and 15 more
  • @emilio: components/style/values/specified/color.rs, components/style/gecko/conversions.rs, components/style/lib.rs, components/style/properties/shorthand/border.mako.rs, components/style/macros.rs and 15 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 Jan 30, 2018
@nox
nox force-pushed the derive-all-the-things branch from 7063c6a to 75efdc4 Compare January 30, 2018 14:20

@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.

r=me, with a green geckotry

input: &mut Parser<'i, 't>
) -> Result<OutlineStyle, ParseError<'i>> {
if let Ok(border_style) = input.try(|i| BorderStyle::parse(context, i)) {
if let Ok(border_style) = input.try(|i| BorderStyle::parse(i)) {

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: input.try(BorderStyle::parse)?

@nox nox changed the title Derive more Parse implementations Derive more Parse implementations (fixes #19827) Jan 30, 2018
@nox
nox force-pushed the derive-all-the-things branch from 75efdc4 to f73ed3c Compare January 30, 2018 14:34
@nox

nox commented Jan 30, 2018

Copy link
Copy Markdown
Contributor Author

@nox
nox force-pushed the derive-all-the-things branch from f73ed3c to 036415b Compare January 31, 2018 14:25
@jdm jdm assigned emilio and unassigned jdm Jan 31, 2018
@nox
nox force-pushed the derive-all-the-things branch from 036415b to 23e1a79 Compare January 31, 2018 17:32
@bors-servo

Copy link
Copy Markdown
Contributor

☔ The latest upstream changes (presumably #19859) made this pull request unmergeable. Please resolve the merge conflicts.

@highfive highfive added the S-needs-rebase There are merge conflict errors. label Jan 31, 2018
@nox
nox force-pushed the derive-all-the-things branch 2 times, most recently from 862d1ef to 19d5175 Compare February 1, 2018 11:06

@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.

r=me

self.copy_transition_property_from(other)
}

pub fn set_transform_style(&mut self, v: TransformStyle) {

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.

Maybe note in a comment that this is done because of the preserve3d / preserve-3d stuff, which is why we can use one of our crappy macro helpers? Just so I don't waste time trying to rewrite it in the future :)

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.

err, can't of course

${helpers.predefined_type(
"transform-style",
"TransformStyle",
"computed::TransformStyle::" + ("Auto" if product == "servo" else "Flat"),

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.

wth

Comment thread components/style/values/mod.rs Outdated
@@ -197,8 +197,12 @@ impl ToCss for KeyframesName {

// A type for possible values for min- and max- flavors of width,
// height, block-size, and inline-size.

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.

mind converting this to a doc comment while you're here?

TableFooterGroup, TableRow, TableColumnGroup,
TableColumn, TableCell, TableCaption, ListItem, None,
#[parse(aliases = "-webkit-flex")]
#[css(aliases = "-webkit-flex")]

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.

nice :)

@nox
nox force-pushed the derive-all-the-things branch from 19d5175 to 1fa88b8 Compare February 1, 2018 11:50
@nox

nox commented Feb 1, 2018

Copy link
Copy Markdown
Contributor Author

@bors-servo r=emilio p=1

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit 1fa88b8 has been approved by emilio

@highfive highfive removed the S-awaiting-review There is new code that needs to be reviewed. label Feb 1, 2018
@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-needs-rebase There are merge conflict errors. labels Feb 1, 2018
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 1fa88b8 with merge b4339ab...

bors-servo pushed a commit that referenced this pull request Feb 1, 2018
@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 b4339ab to master...

@bors-servo
bors-servo merged commit 1fa88b8 into master Feb 1, 2018
@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Feb 1, 2018
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