[webkit-reviews] review granted: [Bug 222095] Avoid heap allocation for EventContexts : [Attachment 421500] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Feb 24 22:16:06 PST 2021


Simon Fraser (smfr) <simon.fraser at apple.com> has granted Ryosuke Niwa
<rniwa at webkit.org>'s request for review:
Bug 222095: Avoid heap allocation for EventContexts
https://bugs.webkit.org/show_bug.cgi?id=222095

Attachment 421500: Patch

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




--- Comment #6 from Simon Fraser (smfr) <simon.fraser at apple.com> ---
Comment on attachment 421500
  --> https://bugs.webkit.org/attachment.cgi?id=421500
Patch

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

> Source/WebCore/dom/EventContext.h:62
> +    bool isMouseOrFocusEventContext() const { return m_type ==
Type::MouseOrFocus; }
> +    bool isTouchEventContext() const { return m_type == Type::Touch; }
> +    bool isWindowContext() const { return m_type == Type::Window; }

Not this patch, but it's weird how the context is sometimes about the type of
event, and sometimes about the object it's fired on?

> Source/WebCore/dom/EventContext.h:104
> +    , m_type(type)

Can't this be m_type { type } ?


More information about the webkit-reviews mailing list