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

Changeset 243908 in webkit


Ignore:
Timestamp:
Apr 4, 2019, 2:47:29 PM (7 years ago)
Author:
Simon Fraser
Message:

Fix rare crash under collectRelatedCoordinatedScrollingNodes()
https://bugs.webkit.org/show_bug.cgi?id=196610
rdar://problem/49595426

Reviewed by Zalan Bujtas.

hasCompositedScrollableOverflow() doesn't check whether a layer is composited (it has
to report the right status before layers have been created), so collectRelatedCoordinatedScrollingNodes()
needs to check whether there's backing.

  • rendering/RenderLayerCompositor.cpp:

(WebCore::collectRelatedCoordinatedScrollingNodes):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r243905 r243908  
     12019-04-04  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Fix rare crash under collectRelatedCoordinatedScrollingNodes()
     4        https://bugs.webkit.org/show_bug.cgi?id=196610
     5        rdar://problem/49595426
     6
     7        Reviewed by Zalan Bujtas.
     8
     9        hasCompositedScrollableOverflow() doesn't check whether a layer is composited (it has
     10        to report the right status before layers have been created), so collectRelatedCoordinatedScrollingNodes()
     11        needs to check whether there's backing.
     12
     13        * rendering/RenderLayerCompositor.cpp:
     14        (WebCore::collectRelatedCoordinatedScrollingNodes):
     15
    1162019-04-04  Simon Fraser  <simon.fraser@apple.com>
    217
  • trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp

    r243786 r243908  
    29882988        for (const auto* currLayer = layer.parent(); currLayer != compositedAncestor; currLayer = currLayer->parent()) {
    29892989            if (currLayer->hasCompositedScrollableOverflow()) {
    2990                 auto scrollingNodeID = currLayer->backing()->scrollingNodeIDForRole(ScrollCoordinationRole::Scrolling);
     2990                auto scrollingNodeID = currLayer->isComposited() ? currLayer->backing()->scrollingNodeIDForRole(ScrollCoordinationRole::Scrolling) : 0;
    29912991                if (scrollingNodeID)
    29922992                    overflowNodeData.append(scrollingNodeID);
    29932993                else
    2994                     LOG(Scrolling, "Layer %p doesn't have scrolling node ID yet", &layer);
     2994                    LOG(Scrolling, "Layer %p isn't composited or doesn't have scrolling node ID yet", &layer);
    29952995            }
    29962996        }
Note: See TracChangeset for help on using the changeset viewer.