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: Add an iterator for transition properties #26200
Conversation
highfive
commented
Apr 16, 2020
|
Heads up! This PR modifies the following files:
|
highfive
commented
Apr 16, 2020
|
@emilio, if you have some free moments do you mind looking at this change? I'm not entirely certain what the right procedure is for making changes to the Gecko-specific code. I've verified that the changes build, but I don't think I have try access any longer. |
|
Thanks, and sorry for the lag. This looks good with a few nits to me. I can push it to try, let me know if you want to recover access, I think we're pretty liberal reenabling accounts :) |
| }); | ||
| } | ||
|
|
||
| let index = match self.index_range.next() { |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| }; | ||
|
|
||
| match self.style.get_box().transition_property_at(index) { | ||
| TransitionProperty::Custom(..) | TransitionProperty::Unsupported(..) => self.next(), |
This comment has been minimized.
This comment has been minimized.
emilio
Apr 16, 2020
Member
May be better to make this a loop { } instead of recursive. I don't think it should be much harder.
This comment has been minimized.
This comment has been minimized.
mrobinson
Apr 17, 2020
Author
Member
Sounds good. I've changed this too a loop and added a comment explaining what is going on.
| pub fn transition_properties<'a>( | ||
| &'a self | ||
| ) -> animated_properties::TransitionPropertyIterator<'a> | ||
| { |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
mrobinson
Apr 17, 2020
Author
Member
It seems like rustfmt might not be processing Mako templates? In any case, I've formatted this to look like the other methods in the file.
This comment has been minimized.
This comment has been minimized.
|
r=me with the nits fixed. |
Thanks for the review! I've fixed your nits and will ask bors to merge this. Do you mind pushing this one to try for me? I think once I make one or two more changes to the gecko code, I might need try access again. I'd hate to ask people to do a bunch of work and then never use it. @bors-servo r=emilio |
|
|
style: Add an iterator for transition properties This simplifies the code a bit and also will allow us to more easily make improvements to servo's animation implementation in the future. <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #___ (GitHub issue number if applicable) <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because they should not change behavior. <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
|
|
|
@bors-servo retry |
style: Add an iterator for transition properties This simplifies the code a bit and also will allow us to more easily make improvements to servo's animation implementation in the future. <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #___ (GitHub issue number if applicable) <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because they should not change behavior. <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
|
|
This simplifies the code a bit and also will allow us to more easily make improvements to servo's animation implementation in the future.
|
@bors-servo r=emilio |
|
|
style: Add an iterator for transition properties This simplifies the code a bit and also will allow us to more easily make improvements to servo's animation implementation in the future. <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #___ (GitHub issue number if applicable) <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because they should not change behavior. <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
|
|
|
@bors-servo retry |
style: Add an iterator for transition properties This simplifies the code a bit and also will allow us to more easily make improvements to servo's animation implementation in the future. <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #___ (GitHub issue number if applicable) <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because they should not change behavior. <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
|
|
|
@bors-servo retry |
|
|
mrobinson commentedApr 16, 2020
This simplifies the code a bit and also will allow us to more easily
make improvements to servo's animation implementation in the future.
./mach build -ddoes not report any errors./mach test-tidydoes not report any errors