@@ -124,7 +124,7 @@ std::optional<SurfaceId> LayoutAnimationsProxy_Legacy::endLayoutAnimation(int ta
124124
125125 auto node = nodeForTag_[tag];
126126 auto mutationNode = std::static_pointer_cast<MutationNode>(node);
127- mutationNode->state = DEAD ;
127+ mutationNode->state = ExitingState_Legacy:: DEAD ;
128128 auto &[deadNodes] = surfaceContext_[surfaceId];
129129 deadNodes.insert (mutationNode);
130130
@@ -172,7 +172,7 @@ void LayoutAnimationsProxy_Legacy::parseRemoveMutations(
172172 }
173173 }
174174 if (!deletedViews.contains (mutation.oldChildShadowView .tag )) {
175- mutationNode->state = MOVED ;
175+ mutationNode->state = ExitingState_Legacy:: MOVED ;
176176 movedViews.insert_or_assign (mutation.oldChildShadowView .tag , -1 );
177177 }
178178 nodeForTag_[tag] = mutationNode;
@@ -245,11 +245,11 @@ void LayoutAnimationsProxy_Legacy::handleRemovals(
245245 if (!startAnimationsRecursively (node, true , shouldAnimate, false , filteredMutations)) {
246246 filteredMutations.push_back (node->mutation );
247247 node->unflattenedParent ->removeChildFromUnflattenedTree (node); // ???
248- if (node->state != MOVED ) {
248+ if (node->state != ExitingState_Legacy:: MOVED ) {
249249 maybeCancelAnimation (node->tag );
250250 filteredMutations.push_back (ShadowViewMutation::DeleteMutation (node->mutation .oldChildShadowView ));
251251 nodeForTag_.erase (node->tag );
252- node->state = DELETED ;
252+ node->state = ExitingState_Legacy:: DELETED ;
253253#ifdef LAYOUT_ANIMATIONS_LOGS
254254 LOG (INFO ) << " delete " << node->tag << std::endl;
255255#endif
@@ -258,7 +258,7 @@ void LayoutAnimationsProxy_Legacy::handleRemovals(
258258 }
259259
260260 for (const auto &node : deadNodes) {
261- if (node->state != DELETED ) {
261+ if (node->state != ExitingState_Legacy:: DELETED ) {
262262 endAnimationsRecursively (node, filteredMutations);
263263 maybeDropAncestors (node->unflattenedParent , node, filteredMutations);
264264 }
@@ -429,12 +429,12 @@ void LayoutAnimationsProxy_Legacy::endAnimationsRecursively(
429429 const std::shared_ptr<MutationNode> &node,
430430 ShadowViewMutationList &mutations) const {
431431 maybeCancelAnimation (node->tag );
432- node->state = DELETED ;
432+ node->state = ExitingState_Legacy:: DELETED ;
433433 // iterate from the end, so that children
434434 // with higher indices appear first in the mutations list
435435 for (auto it = node->unflattenedChildren .rbegin (); it != node->unflattenedChildren .rend (); it++) {
436436 auto &subNode = *it;
437- if (subNode->state != DELETED ) {
437+ if (subNode->state != ExitingState_Legacy:: DELETED ) {
438438 endAnimationsRecursively (subNode, mutations);
439439 }
440440 }
@@ -457,11 +457,11 @@ void LayoutAnimationsProxy_Legacy::maybeDropAncestors(
457457
458458 auto node = std::static_pointer_cast<MutationNode>(parent);
459459
460- if (node->children .size () == 0 && node->state != ANIMATING ) {
460+ if (node->children .size () == 0 && node->state != ExitingState_Legacy:: ANIMATING ) {
461461 nodeForTag_.erase (node->tag );
462462 cleanupMutations.push_back (node->mutation );
463463 maybeCancelAnimation (node->tag );
464- node->state = DELETED ;
464+ node->state = ExitingState_Legacy:: DELETED ;
465465#ifdef LAYOUT_ANIMATIONS_LOGS
466466 LOG (INFO ) << " delete " << node->tag << std::endl;
467467#endif
@@ -492,7 +492,7 @@ bool LayoutAnimationsProxy_Legacy::startAnimationsRecursively(
492492 bool hasAnimatedChildren = false ;
493493
494494 shouldRemoveSubviewsWithoutAnimations =
495- shouldRemoveSubviewsWithoutAnimations && (!hasExitAnimation || node->state == MOVED );
495+ shouldRemoveSubviewsWithoutAnimations && (!hasExitAnimation || node->state == ExitingState_Legacy:: MOVED );
496496 std::vector<std::shared_ptr<MutationNode>> toBeRemoved;
497497
498498 // iterate from the end, so that children
@@ -503,8 +503,8 @@ bool LayoutAnimationsProxy_Legacy::startAnimationsRecursively(
503503 LOG (INFO ) << " child " << subNode->tag << " "
504504 << " " << shouldAnimate << " " << shouldRemoveSubviewsWithoutAnimations << std::endl;
505505#endif
506- if (subNode->state != UNDEFINED && subNode->state != MOVED ) {
507- if (shouldAnimate && subNode->state != DEAD ) {
506+ if (subNode->state != ExitingState_Legacy:: UNDEFINED && subNode->state != ExitingState_Legacy:: MOVED ) {
507+ if (shouldAnimate && subNode->state != ExitingState_Legacy:: DEAD ) {
508508 hasAnimatedChildren = true ;
509509 } else {
510510 endAnimationsRecursively (subNode, mutations);
@@ -516,29 +516,29 @@ bool LayoutAnimationsProxy_Legacy::startAnimationsRecursively(
516516 LOG (INFO ) << " child " << subNode->tag << " start animations returned true " << std::endl;
517517#endif
518518 hasAnimatedChildren = true ;
519- } else if (subNode->state == MOVED ) {
519+ } else if (subNode->state == ExitingState_Legacy:: MOVED ) {
520520 mutations.push_back (subNode->mutation );
521521 toBeRemoved.push_back (subNode);
522522 } else if (shouldRemoveSubviewsWithoutAnimations) {
523523 maybeCancelAnimation (subNode->tag );
524524 mutations.push_back (subNode->mutation );
525525 toBeRemoved.push_back (subNode);
526- subNode->state = DELETED ;
526+ subNode->state = ExitingState_Legacy:: DELETED ;
527527 nodeForTag_.erase (subNode->tag );
528528#ifdef LAYOUT_ANIMATIONS_LOGS
529529 LOG (INFO ) << " delete " << subNode->tag << std::endl;
530530#endif
531531 mutations.push_back (ShadowViewMutation::DeleteMutation (subNode->mutation .oldChildShadowView ));
532532 } else {
533- subNode->state = WAITING ;
533+ subNode->state = ExitingState_Legacy:: WAITING ;
534534 }
535535 }
536536
537537 for (auto &subNode : toBeRemoved) {
538538 node->removeChildFromUnflattenedTree (subNode);
539539 }
540540
541- if (node->state == MOVED ) {
541+ if (node->state == ExitingState_Legacy:: MOVED ) {
542542 auto replacement = std::make_shared<Node>(*node);
543543 for (const auto &subNode : node->children ) {
544544 subNode->parent = replacement;
@@ -553,7 +553,7 @@ bool LayoutAnimationsProxy_Legacy::startAnimationsRecursively(
553553 bool wantAnimateExit = hasExitAnimation || hasAnimatedChildren;
554554
555555 if (hasExitAnimation) {
556- node->state = ANIMATING ;
556+ node->state = ExitingState_Legacy:: ANIMATING ;
557557 startExitingAnimation (node->tag , node->mutation );
558558 } else {
559559 layoutAnimationsManager_->clearLayoutAnimationConfig (node->tag );
0 commit comments