Repository navigation
Complete animations whether or not cascade needs done - #12623
Conversation
|
Heads up! This PR modifies the following files:
|
| if let Some(ref animations) = animations_to_expire { | ||
| for animation in *animations { | ||
| // NB: Expiring a keyframes animation is the same as not | ||
| // applying the keyframes style to it, so we're safe. |
There was a problem hiding this comment.
This is not quite true, could you make a note about supporting animation fill mode?
|
Reviewed 2 of 2 files at r2, 2 of 2 files at r3, 1 of 2 files at r5. components/style/matching.rs, line 477 [r3] (raw file):
Can we factor this code out and use it in both situations? components/style/traversal.rs, line 239 [r1] (raw file):
I'm kind of worried this is a bit overkill in the common case there aren't transitions to expire. Also, I wonder if this will even work now #12563 has landed, where we won't process the nodes that aren't marked as needing a restyle. We also don't construct flows again for every node, so this might be fixed with that patch? In case it's not: What about just layout marking nodes as dirty once it detects there's an animation to expire, and running the cascade then? Hmm... But layout only knows about Other way to do it is adding a flag to the node ( Another solution that may actually work even better is updating the expired animation style from layout (in We could remove the items in the expired animations map there if it's not needed from the cascade (haven't actually tested it), but even if it's needed, updating the style there should prevent it getting updated again until a proper restyle with cascade is done. components/style/traversal.rs, line 252 [r1] (raw file):
|
|
Review status: 1 of 4 files reviewed at latest revision, 2 unresolved discussions. components/style/traversal.rs, line 239 [r1] (raw file):
|
|
components/style/matching.rs, line 477 [r3] (raw file):
|
| node.opaque(), | ||
| node.mutate_data().unwrap().style.as_mut().unwrap(), | ||
| context.shared_context() | ||
| ); |
There was a problem hiding this comment.
Aren't we doing this twice now in the cascade case?
|
components/style/traversal.rs, line 244 [r7] (raw file):
|
|
@bors-servo: try Let's check if there's any other transition/animation test that could check this in wpt. |
Complete animations whether or not cascade needs done - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #12554 (github issue number if applicable). - [x] There are tests for these changes <!-- 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/12623) <!-- Reviewable:end -->
|
💔 Test failed - linux-rel |
Other than that, no unexpected test results, including passes. |
|
📌 Commit d908d52 has been approved by |
|
@bors-servo: r- Could you squash before, please? @bors-servo: delegate+ |
|
✌️ @notriddle can now approve this pull request |
|
Is iframe_visibliity.html a known intermittent? Because there's no issue for it. |
|
@bors-servo r=emilio |
|
📌 Commit f70b8c7 has been approved by |
Complete animations whether or not cascade needs done - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #12554 (github issue number if applicable). - [x] There are tests for these changes <!-- 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/12623) <!-- Reviewable:end -->
|
☀️ Test successful - arm32, arm64, linux-dev, linux-rel, mac-dev-unit, mac-rel-css, mac-rel-wpt, windows-dev |
./mach build -ddoes not report any errors./mach test-tidydoes not report any errorsThis change is