[Webkit-unassigned] [Bug 63243] New: PluginView::dispatchNPEvent is deceptive

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jun 23 04:17:41 PDT 2011


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

           Summary: PluginView::dispatchNPEvent is deceptive
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Plug-ins
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: kbalazs at webkit.org


This is true for the Qt, Gtk, and Windows implementations. This is the Qt one, the other two are almost the same:

bool PluginView::dispatchNPEvent(NPEvent& event)
{
    ...
    bool accepted = m_plugin->pluginFuncs()->event(m_instance, &event);
    ...
    return acccepted;
}

callers are using it this way:
if (!dispatchNPEvent(npEvent))
    event->setDefaultHandled();

This works because the plugin function returns with 0 if the plugin handled the event but it's clear that it is messed up.
dispatchNPEvent should return with the inverted value and the caller should call setDefaultHandled if the return value is true.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list