Bug 218660 - Look at parents when event bubbles for input element activation behavior
Summary: Look at parents when event bubbles for input element activation behavior
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-11-06 09:58 PST by Chris Dumez
Modified: 2020-11-09 09:28 PST (History)
13 users (show)

See Also:


Attachments
WIP Patch (5.00 KB, patch)
2020-11-06 09:58 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
WIP Patch (2.95 KB, patch)
2020-11-06 09:59 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (4.96 KB, patch)
2020-11-06 12:10 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (5.16 KB, patch)
2020-11-09 08:43 PST, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2020-11-06 09:58:13 PST
Look at parents when event bubbles for input element activation behavior.
Comment 1 Chris Dumez 2020-11-06 09:58:42 PST
Created attachment 413439 [details]
WIP Patch
Comment 2 Chris Dumez 2020-11-06 09:59:22 PST
Created attachment 413440 [details]
WIP Patch
Comment 3 EWS Watchlist 2020-11-06 09:59:39 PST
This patch modifies the imported WPT tests. Please ensure that any changes on the tests (not coming from a WPT import) are exported to WPT. Please see https://trac.webkit.org/wiki/WPTExportProcess
Comment 4 Chris Dumez 2020-11-06 12:10:58 PST
Created attachment 413461 [details]
Patch
Comment 5 Ryosuke Niwa 2020-11-07 20:40:58 PST
Comment on attachment 413461 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=413461&action=review

> Source/WebCore/dom/EventDispatcher.cpp:159
> +    RefPtr<HTMLInputElement> input = is<HTMLInputElement>(node) ? &downcast<HTMLInputElement>(node) : nullptr;
> +    if (!input && event.type() == eventNames().clickEvent && event.bubbles())
> +        input = findInputElementInEventPath(eventPath);

To make the relationship with the spec language more clear, can we define a boolean called:
isActivationEvent = event.type() == eventNames().clickEvent
and input to something like inputWithLegacyPreActivationBehavior?
Comment 6 Chris Dumez 2020-11-09 08:43:15 PST
Created attachment 413588 [details]
Patch
Comment 7 EWS 2020-11-09 09:27:05 PST
Committed r269582: <https://trac.webkit.org/changeset/269582>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 413588 [details].
Comment 8 Radar WebKit Bug Importer 2020-11-09 09:28:20 PST
<rdar://problem/71195341>