[Webkit-unassigned] [Bug 48372] Fix direct event type querying by using a generic event wrapper function

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Aug 19 19:53:42 PDT 2022


https://bugs.webkit.org/show_bug.cgi?id=48372

--- Comment #2 from Alexey Proskuryakov <ap at webkit.org> ---
We don't have this idea implemented, but we use safer casting. I'll leave it to others to decide if this is still worth tracking. Currently, the code looks like this:

void ImageEventListener::handleEvent(ScriptExecutionContext&, Event& event)
{
    if (event.type() == eventNames().resizeEvent)
        m_document.windowSizeChanged();
    else if (event.type() == eventNames().clickEvent && is<MouseEvent>(event)) {
        MouseEvent& mouseEvent = downcast<MouseEvent>(event);

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220820/d6c3b7d6/attachment.htm>


More information about the webkit-unassigned mailing list