``` <dialog id=dialog onclick="alert('clicked')">hello</dialog> <script> dialog.showModal() </script> ``` the onclick does not work on the ::backdrop, it does in Firefox/Chrome.
<rdar://problem/85359803>
WPT: https://github.com/web-platform-tests/wpt/blob/master/html/semantics/interactive-elements/the-dialog-element/backdrop-receives-element-events.html
Created attachment 448789 [details] Patch
Comment on attachment 448789 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=448789&action=review > Source/WebCore/rendering/updating/RenderTreeUpdaterGeneratedContent.cpp:201 > - // Update or attach to renderer parent > + // Update or attach to renderer > WeakPtr currentParent = backdropRenderer->parent(); > - WeakPtr newParent = renderer.parent(); > + WeakPtr newParent = renderer; auto backdropRenderer = renderer.backdropRenderer(); ... renderer.setBackdropRenderer(*backdropRenderer); don't we always end up either with no backdropRenderer or with one with the correct parent (renderer)? I didn't look through all the cases but could you explain the re-parenting case? (if no reparenting ever happens, we could make this function a lot simpler)
Created attachment 448843 [details] Patch
Committed r287878 (245922@main): <https://commits.webkit.org/245922@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 448843 [details].