⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 268701 in webkit


Ignore:
Timestamp:
Oct 19, 2020, 5:08:38 PM (6 years ago)
Author:
Simon Fraser
Message:

Fix possible crash in GraphicsLayerCA::computeVisibleAndCoverageRect()
https://bugs.webkit.org/show_bug.cgi?id=217930
<rdar://problem/70316943>

Reviewed by Tim Horton.

If we made a m_overflowControlsHostLayerAncestorClippingStack, make sure we unparent
its layers when tearing down the RenderLayerBacking, and when we determine that we
longer need a m_ancestorClippingStack (having a m_overflowControlsHostLayerAncestorClippingStack
implies that we have a m_ancestorClippingStack).

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::destroyGraphicsLayers):
(WebCore::RenderLayerBacking::updateAncestorClipping):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r268700 r268701  
     12020-10-19  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Fix possible crash in GraphicsLayerCA::computeVisibleAndCoverageRect()
     4        https://bugs.webkit.org/show_bug.cgi?id=217930
     5        <rdar://problem/70316943>
     6
     7        Reviewed by Tim Horton.
     8
     9        If we made a m_overflowControlsHostLayerAncestorClippingStack, make sure we unparent
     10        its layers when tearing down the RenderLayerBacking, and when we determine that we
     11        longer need a m_ancestorClippingStack (having a m_overflowControlsHostLayerAncestorClippingStack
     12        implies that we have a m_ancestorClippingStack).
     13
     14        * rendering/RenderLayerBacking.cpp:
     15        (WebCore::RenderLayerBacking::destroyGraphicsLayers):
     16        (WebCore::RenderLayerBacking::updateAncestorClipping):
     17
    1182020-10-19  Chris Dumez  <cdumez@apple.com>
    219
  • trunk/Source/WebCore/rendering/RenderLayerBacking.cpp

    r268615 r268701  
    579579    GraphicsLayer::clear(m_maskLayer);
    580580
    581     if (m_ancestorClippingStack) {
    582         for (auto& entry : m_ancestorClippingStack->stack())
    583             GraphicsLayer::unparentAndClear(entry.clippingLayer);
    584     }
     581    if (m_ancestorClippingStack)
     582        removeClippingStackLayers(*m_ancestorClippingStack);
     583
     584    if (m_overflowControlsHostLayerAncestorClippingStack)
     585        removeClippingStackLayers(*m_overflowControlsHostLayerAncestorClippingStack);
    585586
    586587    GraphicsLayer::unparentAndClear(m_contentsContainmentLayer);
     
    19271928    } else if (m_ancestorClippingStack) {
    19281929        removeClippingStackLayers(*m_ancestorClippingStack);
    1929 
    19301930        m_ancestorClippingStack = nullptr;
     1931       
     1932        if (m_overflowControlsHostLayerAncestorClippingStack) {
     1933            removeClippingStackLayers(*m_overflowControlsHostLayerAncestorClippingStack);
     1934            m_overflowControlsHostLayerAncestorClippingStack = nullptr;
     1935        }
     1936       
    19311937        layersChanged = true;
    19321938    }
Note: See TracChangeset for help on using the changeset viewer.