Summary: | Force wheel event listeners on the root to be passive | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Simon Fraser (smfr) <simon.fraser> | ||||||||
Component: | UI Events | Assignee: | Simon Fraser (smfr) <simon.fraser> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | cdumez, graouts, simon.fraser, webkit-bug-importer | ||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||
Version: | Safari Technology Preview | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=218931 | ||||||||||
Attachments: |
|
Description
Simon Fraser (smfr)
2020-11-11 21:24:44 PST
Created attachment 413985 [details]
Patch
Comment on attachment 413985 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=413985&action=review r=me with nits > Source/WebCore/page/Quirks.cpp:818 > + if (is<DOMWindow>(eventTarget)) I believe can can simply do: return downcast<Document>(eventTarget.scriptExecutionContext()); since we know here to EventTarget is a Window or a Node, and thus its script execution context has to be a Document. > LayoutTests/fast/events/wheel/wheel-event-listeners-on-body-made-passive.html:26 > + event.preventDefault(); In these tests, I would recommend checking event.defaultPrevented after calling preventDefault(). This is the easiest way to check if we are passive. Created attachment 413994 [details]
Patch
Created attachment 414001 [details]
Patch
|