WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
233072
::backdrop pseudo element should react to event listeners
https://bugs.webkit.org/show_bug.cgi?id=233072
Summary
::backdrop pseudo element should react to event listeners
Tim Nguyen (:ntim)
Reported
2021-11-12 14:01:16 PST
``` <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.
Attachments
Patch
(4.53 KB, patch)
2022-01-10 12:53 PST
,
Tim Nguyen (:ntim)
zalan
: review+
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Patch
(6.46 KB, patch)
2022-01-11 06:34 PST
,
Tim Nguyen (:ntim)
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2021-11-12 15:27:22 PST
<
rdar://problem/85359803
>
Tim Nguyen (:ntim)
Comment 2
2021-11-26 10:44:17 PST
WPT:
https://github.com/web-platform-tests/wpt/blob/master/html/semantics/interactive-elements/the-dialog-element/backdrop-receives-element-events.html
Tim Nguyen (:ntim)
Comment 3
2022-01-10 12:53:06 PST
Created
attachment 448789
[details]
Patch
zalan
Comment 4
2022-01-10 17:31:37 PST
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)
Tim Nguyen (:ntim)
Comment 5
2022-01-11 06:34:44 PST
Created
attachment 448843
[details]
Patch
EWS
Comment 6
2022-01-11 07:19:36 PST
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]
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug