• svillar@igalia.com's avatar
    Don't leave stale pointers into m_grid · a0e31d67
    svillar@igalia.com authored
    Sometimes grid children are wrapped into an anonymous blocks to become grid
    items. Those anonymous blocks could be eventually removed by
    RenderBlock::removeLeftoverAnonymousBlock() (called for example when adding
    a new child to the grid). That method does not notify the hierarchy about
    the removal since those anonymous blocks are not part of the
    DOM. This means that further accesses to the m_grid contents will trigger
    invalid accesses to the already deleted RenderObjects (the anonymous blocks).
    
    To fix it we invalidate the contents of m_grid by setting the dirty flag in
    the grid.
    
    Based on the previous work in r161127 by <jchaffraix@chromium.org>
    
    BUG=313293
    
    Review URL: https://codereview.chromium.org/302083005
    
    git-svn-id: svn://svn.chromium.org/blink/trunk@175912 bbb929c8-8fbe-4397-9dbb-9b2b20218538
    a0e31d67
stale-grid-layout-2-expected.txt 144 Bytes