Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make positionAbsoluteChild the sole place that matters when determining absolute node's position #41684

Closed
wants to merge 1 commit into from

Commits on Dec 7, 2023

  1. Make positionAbsoluteChild the sole place that matters when determini…

    …ng absolute node's position (facebook#41684)
    
    Summary:
    X-link: facebook/yoga#1481
    
    
    Absolute nodes can be laid out by themselves and do not have to care about what is happening to their siblings. Because of this we can make `positionAbsoluteChild` the sole place where we handle this logic. Right now that is scattered around algorithm with many `if (child is absolute)` cases everywhere. This makes implementing position static a lot harder since we are relying on the CB to do all this work, not the parent.
    
    With this change the only time we set position for an absolute node and it matter (i.e. not overwritten) is in `positionAbsoluteChild`
    
    Reviewed By: NickGerleman
    
    Differential Revision: D51290723
    Joe Vilches authored and facebook-github-bot committed Dec 7, 2023
    Configuration menu
    Copy the full SHA
    7343d39 View commit details
    Browse the repository at this point in the history