Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upstyle: Move mask-size outside of mako #19470
Conversation
highfive
commented
Dec 3, 2017
|
Heads up! This PR modifies the following files:
|
highfive
commented
Dec 3, 2017
|
Code looks good, but let's way for @BorisChiou to ensure that this can be removed or help testing it. |
| fn from_animated_value(animated: Self::AnimatedValue) -> Self { | ||
| use values::computed::{Length, Percentage}; | ||
| let clamp_animated_value = |value: LengthOrPercentageOrAuto| -> LengthOrPercentageOrAuto { | ||
| match value { |
This comment has been minimized.
This comment has been minimized.
emilio
Dec 3, 2017
Member
So, as we discussed on IRC, this works, but this removes the clamping behavior on BackgroundSize... I just pushed this to try (https://treeherder.mozilla.org/#/jobs?repo=try&revision=d7479f22e46b38c6103a46045e1bf83186927b18&selectedJob=149390573) and it looks green.
@BorisChiou, you added this code in ebedea5 (#17783).
Can we remove this? If not, could you write guidance on how to write a test for this?
This comment has been minimized.
This comment has been minimized.
BorisChiou
Dec 4, 2017
•
Contributor
Unfortunately, Gecko doesn't test this [1]. I added this because we may use a negative cubic timing function [2] for animations/transitions. If you want to verify your patch, you could try to run this: https://jsfiddle.net/borischiou/w5yqs437/. If the console output is "0px 0px", it works. However, if you see something like "calc(-68.3px) calc(-68.3px)", please fix it because the size property should always be 0 or any positive number. :)
[1] https://searchfox.org/mozilla-central/rev/477ac066b565ae0eb3519875581a62dfb1430e98/layout/style/test/test_transitions_per_property.html#109-113
[2] cubic-bezier(0.25, -2, 0.75, 1)
This comment has been minimized.
This comment has been minimized.
BorisChiou
Dec 4, 2017
Contributor
And I guess you may get the negative value (i.e. unclamped value) if animation_value_type == "ComputedValue" for background-size. mask-size has the similar problem, I think. Therefore, It's better not to remove this.
This comment has been minimized.
This comment has been minimized.
CYBAI
Dec 4, 2017
Author
Collaborator
@BorisChiou After trying to access the jsfiddle link, I found it logged with 0px 0px in my local. However, it got an error of ERROR:script::dom::bindings::error: Error at https://jsfiddle.net/js/_dist-editor.js?update_24_11_2017_2:1:228763 Ao(...).getBoundingClientRect is not a function so I cannot see the jsfiddle UI.
Not sure if it means updated in this PR works?
This comment has been minimized.
This comment has been minimized.
BorisChiou
Dec 5, 2017
Contributor
Really? Oh, I used Firefox to verify this jsfiddle test. Sorry, I will try Servo browser again.
This comment has been minimized.
This comment has been minimized.
CYBAI
Dec 6, 2017
Author
Collaborator
Hmm... I got after 500ms: -68.7001px -68.7001px when I ran it locally second time.
I'll check it more detail tomorrow.
This comment has been minimized.
This comment has been minimized.
emilio
Dec 9, 2017
Member
@BorisChiou mask-size was already bogus here, wasn't it? In particular, it was using animation_value_size="ComputedValue".
Could we get that stuff tested pretty please?
This comment has been minimized.
This comment has been minimized.
BorisChiou
Dec 11, 2017
•
Contributor
Yes..we have to do that. We have to update the test cases in test_transitions_per_property.html for background-size and mask-size (so at least we test it on Firefox), and fix the problem of mask-size. I have to file a bug for it.
FIled Bug 1424671.
This comment has been minimized.
This comment has been minimized.
CYBAI
Dec 11, 2017
Author
Collaborator
@BorisChiou Thanks for the update! I think we can merge this PR and let's fix the issue in another PR?
cc @emilio
This comment has been minimized.
This comment has been minimized.
BorisChiou
Dec 11, 2017
Contributor
But the problem is: this PR makes background-size be buggy for animation. At least now we have to make sure background-size is correct for animation.
|
|
|
|
|
I fixed this in https://bugzilla.mozilla.org/show_bug.cgi?id=1462829. Thanks @CYBAI! |
|
@emilio Cheers that this is fixed! Thanks a lot! |
|
Cool! Thanks~ |
CYBAI commentedDec 3, 2017
•
edited by emilio
This is a sub-PR of #19015
r? emilio
./mach build -ddoes not report any errors./mach test-tidydoes not report any errorsThis change is