Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 4fef6aeb87184c720ade5901d11df721a966e345
      
https://github.com/WebKit/WebKit/commit/4fef6aeb87184c720ade5901d11df721a966e345
  Author: Simon Fraser <simon.fra...@apple.com>
  Date:   2024-06-06 (Thu, 06 Jun 2024)

  Changed paths:
    A LayoutTests/fast/layers/layer-order-after-top-layer-expected.html
    A LayoutTests/fast/layers/layer-order-after-top-layer.html
    M Source/WebCore/rendering/RenderLayer.cpp

  Log Message:
  -----------
  After closing a modal <dialog>, elements can be z-ordered incorrectly
https://bugs.webkit.org/show_bug.cgi?id=275188
rdar://128899243

Reviewed by Antti Koivisto.

When adding or removing an element from the top layer (e.g. for dialog or 
popups),
`RenderLayer::establishesTopLayerDidChange()` is called. This called 
`parentLayer->addChild()`
which re-parents the RenderLayer, but it always appended it to the end of the 
list. This would
cause adjacent `position:absolute` elements to z-order incorrectly when closing 
a modal dialog.

* LayoutTests/fast/layers/layer-order-after-top-layer-expected.html: Added.
* LayoutTests/fast/layers/layer-order-after-top-layer.html: Added.
* Source/WebCore/rendering/RenderLayer.cpp:
(WebCore::RenderLayer::establishesTopLayerDidChange):

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



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

Reply via email to