[Webkit-unassigned] [Bug 36721] Use Chromium's plugins/get-url-with-blank-target.html for all platforms

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Jun 13 11:17:07 PDT 2010


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





--- Comment #6 from Robert Hogan <robert at webkit.org>  2010-06-13 11:17:04 PST ---
(In reply to comment #5)
> (From update of attachment 53051 [details])
> > Chromium introduced a new version of test that works for Qt and possibly other platforms.
> 
> What prevents the original test from working on other platforms?
> 

See also https://bugs.webkit.org/show_bug.cgi?id=32886, which is a duplicate of this I think - though strictly it's the other way round!

The difference is the customized behaviour of Mac for handling load requests from plugins that have a _blank target. 

For Mac the load happens in (void)loadPluginRequest:(WebPluginRequest *)pluginRequest and if a new webview can't be created for the request, which is how targeted requests are handled in Mac, it does this:

1657                if (!newWebView) {
1658                    if ([pluginRequest sendNotification]) {
1659                        [self willCallPlugInFunction];
1660                        {
1661                            JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
1662                            [_pluginPackage.get() pluginFuncs]->urlnotify(plugin, [[[pluginRequest request] URL] _web_URLCString], NPERR_GENERIC_ERROR, [pluginRequest notifyData]);
1663                        }
1664                        [self didCallPlugInFunction];
1665                    }
1666                    return;
1667                }

Note the NPERR_GENERIC_ERROR in line 1662 - this is what generates the expected result on Mac. It aborts the targeted request when the client can't create a webview to contain it.

All other ports  use the generic WebCore code in PluginView.cpp, which is:

void PluginView::performRequest(PluginRequest* request)
{
<..>
            m_parentFrame->loader()->load(request->frameLoadRequest().resourceRequest(), targetFrameName, false);

            if (request->sendNotification()) {
                PluginView::setCurrentPluginView(this);
                JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
                setCallingPlugin(true);
                m_plugin->pluginFuncs()->urlnotify(m_instance, requestURL.string().utf8().data(), NPRES_DONE, request->notifyData());
<..>
}

Again note the NPRES_DONE, the request is handled normally rather than made dependent on the ability to create a new webview.

My understanding is that the behaviour of ports other than Mac is correct on its own terms - they have no need to create a new window/webview for targeted requests so will not fail, all other things being equal, and don't end up in the same possible crash situation as Mac.

Also, the Mac behaviour that is the subject of a fixme in WebNetscapePluginView.mm:

1646            // FIXME - need to get rid of this window creation which
1647            // bypasses normal targeted link handling



So I think there is strong case for saying the Chromium results should be be made platform-independent and the current platform-independent (i.e. Mac) results moved to platform/mac.

-- 
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