[webkit-reviews] review granted: [Bug 218660] Look at parents when event bubbles for input element activation behavior : [Attachment 413461] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Nov 7 20:40:58 PST 2020


Ryosuke Niwa <rniwa at webkit.org> has granted Chris Dumez <cdumez at apple.com>'s
request for review:
Bug 218660: Look at parents when event bubbles for input element activation
behavior
https://bugs.webkit.org/show_bug.cgi?id=218660

Attachment 413461: Patch

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




--- Comment #5 from Ryosuke Niwa <rniwa at webkit.org> ---
Comment on attachment 413461
  --> https://bugs.webkit.org/attachment.cgi?id=413461
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?


More information about the webkit-reviews mailing list