Repository navigation
Conversation
|
Heads up! This PR modifies the following files:
|
emilio
left a comment
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
@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?
There was a problem hiding this comment.
Really? Oh, I used Firefox to verify this jsfiddle test. Sorry, I will try Servo browser again.
There was a problem hiding this comment.
Hmm... I got after 500ms: -68.7001px -68.7001px when I ran it locally second time.
I'll check it more detail tomorrow.
There was a problem hiding this comment.
@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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
@BorisChiou Thanks for the update! I think we can merge this PR and let's fix the issue in another PR?
cc @emilio
There was a problem hiding this comment.
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.
f833fe4 to
41cbd40
Compare
|
☔ The latest upstream changes (presumably #19838) made this pull request unmergeable. Please resolve the merge conflicts. |
41cbd40 to
9be9ebd
Compare
9be9ebd to
10b4a19
Compare
|
☔ The latest upstream changes (presumably #20230) made this pull request unmergeable. Please resolve the merge conflicts. |
|
@emilio Cheers that this is fixed! Thanks a lot! 😆 |
|
Cool! Thanks~ |
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