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 upstylo: Bug 1341372 - Detect new transitions and let it run. #16496
Conversation
Animation-only restyle should include both Animation and Transition cascade levels. MozReview-Commit-ID: 5l6gaJKbixM
Add one FFI to check if there is any transition in CSSTransitionCollection. This will be used to check if we need to update transition and if we should compute the after-change style. MozReview-Commit-ID: 6HpVAtrx6Rc
We will add another function, needs_update_transitions, to check if we need to update transitions, so factor this out. MozReview-Commit-ID: 5LYkyi4aDri
It is possible to call get_after_change_style if there is no transition rule. In order to avoid cloning the token computed values, we just return None. The caller can use this Option to know which computed values should be used. MozReview-Commit-ID: 7fcgSVEtXWh
TransitionProperty::any returns true if one of its closure returns true. MozReview-Commit-ID: 4YsKkHaWCYq
1. We need to call get_after_change_style, which is the computed styles without transition rules, while process_animations. 2. If we have after-change style, we may replace the new computed values with after-change style, according to whether we really need to update transitions. 3. There are some cases we don't update transitions, so we need to early return. might_needs_transitions_update() will check it first and it will filter out most common cases. 4. needs_transitions_update() will check each property and existing running transitions to make sure we really don't need to update transitions. The logic of this function is similar with that of nsTransitionManager::DoUpdateTransitions(). MozReview-Commit-ID: 2ccdPjgrxKz
MozReview-Commit-ID: 2bJlBbdX543
highfive
commented
Apr 17, 2017
|
Heads up! This PR modifies the following files:
|
highfive
commented
Apr 17, 2017
|
I would like to wait the try results (gecko side). |
|
r?@heycam |
|
@bors-servo r- |
|
@bors-servo r=heycam |
|
|
bors-servo
added a commit
that referenced
this pull request
Apr 17, 2017
stylo: Bug 1341372 - Detect new transitions and let it run. These are interdependent patches of Bug 1341372. We let animation-only restyle also work for RESTYLE_CSS_TRANSITIONS, and check if we need to update transitions by each transition property. If it is necessary to create/replace/cancel transitions, we create a SequentialTask for CSS_TRANSITIONS. --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix Bug 1341372 - [X] These changes do not require tests because there are tests in Gecko already. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16496) <!-- Reviewable:end -->
|
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
BorisChiou commentedApr 17, 2017
•
edited by larsbergstrom
These are interdependent patches of Bug 1341372. We let animation-only restyle also work for RESTYLE_CSS_TRANSITIONS, and check if we need to update transitions by each transition property. If it is necessary to create/replace/cancel transitions, we create a SequentialTask for CSS_TRANSITIONS.
./mach build -ddoes not report any errors./mach test-tidydoes not report any errorsThis change is