mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backout 449229be3db1 (bug 749455) to fix reftest failures. r=TrySchmy
This commit is contained in:
parent
531cd2d374
commit
21d08d0adc
@ -259,7 +259,6 @@ _BROWSER_FILES = \
|
||||
plugin_bug743421.html \
|
||||
plugin_clickToPlayAllow.html \
|
||||
plugin_clickToPlayDeny.html \
|
||||
plugin_bug749455.html \
|
||||
alltabslistener.html \
|
||||
zoom_test.html \
|
||||
dummy_page.html \
|
||||
|
@ -427,16 +427,5 @@ function test15() {
|
||||
var mainBox = doc.getAnonymousElementByAttribute(plugin, "class", "mainBox");
|
||||
ok(mainBox, "Test 15, Plugin with id=" + plugin.id + " overlay should exist");
|
||||
|
||||
prepareTest(test16, gTestRoot + "plugin_bug749455.html");
|
||||
}
|
||||
|
||||
// Tests that mContentType is used for click-to-play plugins, and not the
|
||||
// inspected type.
|
||||
function test16() {
|
||||
var clickToPlayNotification = PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser);
|
||||
ok(clickToPlayNotification, "Test 16, Should have a click-to-play notification");
|
||||
var missingNotification = PopupNotifications.getNotification("missing-plugins", gTestBrowser);
|
||||
ok(!missingNotification, "Test 16, Should not have a missing plugin notification");
|
||||
|
||||
finishTest();
|
||||
}
|
||||
|
@ -1,8 +0,0 @@
|
||||
<!-- bug 749455 -->
|
||||
<html>
|
||||
<head><meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
|
||||
</head>
|
||||
<body>
|
||||
<embed src="plugin_bug749455.html" type="application/x-test" width="100px" height="100px"></embed>
|
||||
</body>
|
||||
</html>
|
@ -800,25 +800,20 @@ nsObjectLoadingContent::OnStartRequest(nsIRequest *aRequest,
|
||||
chan->SetContentType(channelType);
|
||||
}
|
||||
|
||||
// We want to ignore the channel type if one of the following is true:
|
||||
// We want to use the channel type unless one of the following is true:
|
||||
//
|
||||
// 1) The channel type is application/octet-stream or binary/octet-stream
|
||||
// and we have a type hint (in mContentType) and the type hint is not a
|
||||
// document type.
|
||||
// 2) Our type hint is a type that we support with a plugin
|
||||
// (where "support" means it is enabled or it is click-to-play)
|
||||
// and this object loading content has the capability to load a plugin
|
||||
bool isOctetStream = (channelType.EqualsASCII(APPLICATION_OCTET_STREAM) ||
|
||||
channelType.EqualsASCII(BINARY_OCTET_STREAM));
|
||||
bool caseOne = (isOctetStream &&
|
||||
!mContentType.IsEmpty() &&
|
||||
GetTypeOfContent(mContentType) != eType_Document);
|
||||
nsresult pluginState = IsPluginEnabledForType(mContentType);
|
||||
bool pluginSupported = (NS_SUCCEEDED(pluginState) ||
|
||||
pluginState == NS_ERROR_PLUGIN_CLICKTOPLAY);
|
||||
PRUint32 caps = GetCapabilities();
|
||||
bool caseTwo = (pluginSupported && (caps & eSupportPlugins));
|
||||
if (caseOne || caseTwo) {
|
||||
// 1) The channel type is application/octet-stream and we have a
|
||||
// type hint and the type hint is not a document type.
|
||||
// 2) Our type hint is a type that we support with a plugin.
|
||||
if (((channelType.EqualsASCII(APPLICATION_OCTET_STREAM) ||
|
||||
channelType.EqualsASCII(BINARY_OCTET_STREAM)) &&
|
||||
!mContentType.IsEmpty() &&
|
||||
GetTypeOfContent(mContentType) != eType_Document) ||
|
||||
// Need to check IsPluginEnabledForType() in addition to GetTypeOfContent()
|
||||
// because otherwise the default plug-in's catch-all behavior would
|
||||
// confuse things.
|
||||
(NS_SUCCEEDED(IsPluginEnabledForType(mContentType)) &&
|
||||
GetTypeOfContent(mContentType) == eType_Plugin)) {
|
||||
// Set the type we'll use for dispatch on the channel. Otherwise we could
|
||||
// end up trying to dispatch to a nsFrameLoader, which will complain that
|
||||
// it couldn't find a way to handle application/octet-stream
|
||||
|
Loading…
Reference in New Issue
Block a user