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

Set initial values for animation and transition property. #15780

Conversation

@hiikezoe
Copy link
Contributor

hiikezoe commented Mar 1, 2017

These properties are not allowed to set empty vector.
This is a follow up fix for #15761.
Also this fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1343168

r? @Manishearth


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes fix #__ (github issue number if applicable).
  • [] There are tests for these changes OR
  • These changes do not require tests because I am not sure we should write test cases for this , anyway gecko has some test cases.

This change is Reviewable

These properties are not allowed to set empty vector.
@highfive
Copy link

highfive commented Mar 1, 2017

Heads up! This PR modifies the following files:

  • @bholley: components/style/properties/shorthand/box.mako.rs
  • @emilio: components/style/properties/shorthand/box.mako.rs
@highfive
Copy link

highfive commented Mar 1, 2017

warning Warning warning

  • These commits modify style code, but no tests are modified. Please consider adding a test!
@upsuper
Copy link
Member

upsuper commented Mar 1, 2017

I think this is wrong. When animation is set to none, all its subproperties should be set to none as well. It doesn't make sense to have one "initial" value inside those subproperties.

@upsuper
Copy link
Member

upsuper commented Mar 1, 2017

Actually I don't understand why we have an allow_empty in vector_longhand at all. Shouldn't all those vector longhands be empty when they are set to none?

@hiikezoe
Copy link
Contributor Author

hiikezoe commented Mar 1, 2017

I guess the reason is that the comment for allow_empty was somewhat misleading.
#14913 (comment)

@hiikezoe hiikezoe closed this Mar 1, 2017
@Manishearth
Copy link
Member

Manishearth commented Mar 1, 2017

Actually I don't understand why we have an allow_empty in vector_longhand at all.

for the background/etc properties, you don't actually parse none as a separate keyword, each vector element is allowed to be none (you can have none, none, url(), none). But for other properties without none values in their individual vector elements, they need a global none value.

Parsing bg-foo as none | <bg-foo># where bg-foo itself is stuff | none would cause problems because the zero case would count as the one case and the number of elements here (even if null) is important. So I've kept these as separate cases with allow_empty

@hiikezoe hiikezoe deleted the hiikezoe:initial-values-for-animation-properties branch Apr 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.