Skip to content
  • robhogan's avatar
    Don't attempt to collapse empty anonymous blocks if they might already have been destroyed · 6b42be50
    robhogan authored
    LayoutBlock::addChild() can destroy its own object and that of any out-of-flow
    or floating siblings - for that reason it's not safe to access the object or any
    of its siblings after calling it. So when checking for an empty anonymous block
    here, do so after removing its child and before we add it to its new home.
    
    The check was introduced in wkbug.com/78250 and a follow-up wkbug.com/79681
    so we have test coverage from those two CLs as well.
    
    BUG=598722
    
    Review URL: https://codereview.chromium.org/1843213002
    
    Cr-Commit-Position: refs/heads/master@{#385009}
    6b42be50