Summary: | window.event should not be affected by nodes moving post-dispatch | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Chris Dumez <cdumez> | ||||||
Component: | DOM | Assignee: | Chris Dumez <cdumez> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | darin, esprehn+autocc, ews-watchlist, ggaren, kangil.han, rniwa, sam, webkit-bug-importer | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Chris Dumez
2020-11-05 15:09:13 PST
Created attachment 413355 [details]
Patch
Comment on attachment 413355 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=413355&action=review r=me > Source/WebCore/dom/Event.cpp:134 > + m_currentTargetIsInShadowTree = isInShadowTree.valueOr(is<Node>(currentTarget) && downcast<Node>(*currentTarget).isInShadowTree()); Fancy! Comment on attachment 413355 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=413355&action=review >> Source/WebCore/dom/Event.cpp:134 >> + m_currentTargetIsInShadowTree = isInShadowTree.valueOr(is<Node>(currentTarget) && downcast<Node>(*currentTarget).isInShadowTree()); > > Fancy! Too fancy! The argument to valueOr is going to be computed unconditionally; do we really want that? (In reply to Darin Adler from comment #3) > Comment on attachment 413355 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=413355&action=review > > >> Source/WebCore/dom/Event.cpp:134 > >> + m_currentTargetIsInShadowTree = isInShadowTree.valueOr(is<Node>(currentTarget) && downcast<Node>(*currentTarget).isInShadowTree()); > > > > Fancy! > > Too fancy! The argument to valueOr is going to be computed unconditionally; > do we really want that? Fair point. Will fix. Created attachment 413376 [details]
Patch
Committed r269500: <https://trac.webkit.org/changeset/269500> All reviewed patches have been landed. Closing bug and clearing flags on attachment 413376 [details]. |