void HTMLPlugInElement::defaultEventHandler(Event* event)
{
    // Firefox seems to use a fake event listener to dispatch events to plugin
    // (tested with mouse events only). This is observable via different order
    // of events - in Firefox, event listeners specified in HTML attributes
    // fires first, then an event gets dispatched to plugin, and only then
    // other event listeners fire. Hopefully, this difference does not matter in
    // practice.

    // FIXME: Mouse down and scroll events are passed down to plugin via custom
    // code in EventHandler; these code paths should be united.

    LayoutObject* r = layoutObject();
    if (!r || !r->isLayoutPart())
        return;
    if (r->isEmbeddedObject()) {
        if (toLayoutEmbeddedObject(r)->showsUnavailablePluginIndicator())
            return;
    }
    RefPtrWillBeRawPtr<Widget> widget = toLayoutPart(r)->widget();
    if (!widget)
        return;
    widget->handleEvent(event);
    if (event->defaultHandled())
        return;
    HTMLFrameOwnerElement::defaultEventHandler(event);
}
bool HTMLPlugInElement::willRespondToMouseClickEvents()
{
    if (isDisabledFormControl())
        return false;
    LayoutObject* r = layoutObject();
    return r && (r->isEmbeddedObject() || r->isLayoutPart());
}