Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: cd5d1b32f5a4b4348623a5171df6bfba1f92b4f2
      
https://github.com/WebKit/WebKit/commit/cd5d1b32f5a4b4348623a5171df6bfba1f92b4f2
  Author: Tim Nguyen <[email protected]>
  Date:   2024-04-20 (Sat, 20 Apr 2024)

  Changed paths:
    A 
LayoutTests/fast/css/view-transitions-update-layer-lists-crash-expected.txt
    A LayoutTests/fast/css/view-transitions-update-layer-lists-crash.html
    M Source/WebCore/dom/ViewTransition.cpp

  Log Message:
  -----------
  heap-use-after-free | WebCore::RenderLayer::updateLayerListsIfNeeded; 
WebCore::forEachElementInPaintOrder; WebCore::forEachElementInPaintOrder
https://bugs.webkit.org/show_bug.cgi?id=272868
rdar://126636219

Reviewed by Ryosuke Niwa.

The code inside the `forEachElementInPaintOrder` callback can end up destroying 
RenderLayers indirectly through `updateStyleIfNeeded` which is invoked through 
`Element::checkVisibility`.

Call `document->updateStyleIfNeeded()` before the callback is invoked to avoid 
destroying RenderLayers while iterating through layers.

* LayoutTests/fast/css/view-transitions-update-layer-lists-crash-expected.txt: 
Added.
* LayoutTests/fast/css/view-transitions-update-layer-lists-crash.html: Added.
* Source/WebCore/dom/ViewTransition.cpp:
(WebCore::ViewTransition::captureOldState):
(WebCore::ViewTransition::activateViewTransition):

Canonical link: https://commits.webkit.org/277779@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to