зеркало из https://github.com/mozilla/pjs.git
Backout 39d5bb6c6d4d for reftest-2 failures on Android
This commit is contained in:
Родитель
ae2a9a576c
Коммит
3730fa1682
|
@ -105,10 +105,6 @@ static PRLogModuleInfo* gObjectLog = PR_NewLogModule("objlc");
|
|||
#define LOG(args) PR_LOG(gObjectLog, PR_LOG_DEBUG, args)
|
||||
#define LOG_ENABLED() PR_LOG_TEST(gObjectLog, PR_LOG_DEBUG)
|
||||
|
||||
#ifdef ANDROID
|
||||
#include "nsXULAppAPI.h"
|
||||
#endif
|
||||
|
||||
class nsAsyncInstantiateEvent : public nsRunnable {
|
||||
public:
|
||||
// This stores both the content and the frame so that Instantiate calls can be
|
||||
|
@ -1053,12 +1049,6 @@ nsObjectLoadingContent::AsyncOnChannelRedirect(nsIChannel *aOldChannel,
|
|||
nsEventStates
|
||||
nsObjectLoadingContent::ObjectState() const
|
||||
{
|
||||
#ifdef ANDROID
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Content) {
|
||||
return NS_EVENT_STATE_TYPE_CLICK_TO_PLAY;
|
||||
}
|
||||
#endif
|
||||
|
||||
switch (mType) {
|
||||
case eType_Loading:
|
||||
return NS_EVENT_STATE_LOADING;
|
||||
|
|
|
@ -264,8 +264,6 @@ private:
|
|||
// Content is the full screen element, or a frame containing the
|
||||
// current full-screen element.
|
||||
#define NS_EVENT_STATE_FULL_SCREEN NS_DEFINE_EVENT_STATE_MACRO(34)
|
||||
// Handler for click to play plugin
|
||||
#define NS_EVENT_STATE_TYPE_CLICK_TO_PLAY NS_DEFINE_EVENT_STATE_MACRO(35)
|
||||
|
||||
/**
|
||||
* NOTE: do not go over 63 without updating nsEventStates::InternalType!
|
||||
|
|
|
@ -94,7 +94,6 @@
|
|||
#include "nsXPCOMCID.h"
|
||||
#include "nsISupportsPrimitives.h"
|
||||
|
||||
#include "nsXULAppAPI.h"
|
||||
#include "nsIXULRuntime.h"
|
||||
|
||||
// for the dialog
|
||||
|
@ -2252,11 +2251,6 @@ nsresult nsPluginHost::ScanPluginsDirectoryList(nsISimpleEnumerator *dirEnum,
|
|||
|
||||
nsresult nsPluginHost::LoadPlugins()
|
||||
{
|
||||
#ifdef ANDROID
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Content) {
|
||||
return NS_OK;
|
||||
}
|
||||
#endif
|
||||
// do not do anything if it is already done
|
||||
// use ReloadPlugins() to enforce loading
|
||||
if (mPluginsLoaded)
|
||||
|
|
|
@ -151,15 +151,18 @@ abstract public class GeckoApp
|
|||
public ArrayList<PackageInfo> mPackageInfoCache = new ArrayList<PackageInfo>();
|
||||
|
||||
String[] getPluginDirectories() {
|
||||
|
||||
ArrayList<String> directories = new ArrayList<String>();
|
||||
PackageManager pm = this.mAppContext.getPackageManager();
|
||||
List<ResolveInfo> plugins = pm.queryIntentServices(new Intent(PLUGIN_ACTION),
|
||||
PackageManager.GET_SERVICES | PackageManager.GET_META_DATA);
|
||||
|
||||
synchronized(mPackageInfoCache) {
|
||||
|
||||
// clear the list of existing packageInfo objects
|
||||
mPackageInfoCache.clear();
|
||||
|
||||
|
||||
for (ResolveInfo info : plugins) {
|
||||
|
||||
// retrieve the plugin's service information
|
||||
|
@ -171,6 +174,7 @@ abstract public class GeckoApp
|
|||
|
||||
Log.w(LOGTAG, "Loading plugin: " + serviceInfo.packageName);
|
||||
|
||||
|
||||
// retrieve information from the plugin's manifest
|
||||
PackageInfo pkgInfo;
|
||||
try {
|
||||
|
|
|
@ -156,8 +156,6 @@ CSS_STATE_PSEUDO_CLASS(mozSuppressed, ":-moz-suppressed",
|
|||
CSS_STATE_PSEUDO_CLASS(mozLoading, ":-moz-loading", NS_EVENT_STATE_LOADING)
|
||||
CSS_STATE_PSEUDO_CLASS(mozTypeUnsupported, ":-moz-type-unsupported",
|
||||
NS_EVENT_STATE_TYPE_UNSUPPORTED)
|
||||
CSS_STATE_PSEUDO_CLASS(mozHandlerClickToPlay, ":-moz-handler-clicktoplay",
|
||||
NS_EVENT_STATE_TYPE_CLICK_TO_PLAY)
|
||||
CSS_STATE_PSEUDO_CLASS(mozHandlerDisabled, ":-moz-handler-disabled",
|
||||
NS_EVENT_STATE_HANDLER_DISABLED)
|
||||
CSS_STATE_PSEUDO_CLASS(mozHandlerBlocked, ":-moz-handler-blocked",
|
||||
|
|
|
@ -437,14 +437,10 @@ pref("browser.ui.touch.weight.visited", 120); // percentage
|
|||
// plugins
|
||||
#if MOZ_PLATFORM_MAEMO == 6
|
||||
pref("plugin.disable", false);
|
||||
pref("dom.ipc.plugins.enabled", true);
|
||||
#elifdef ANDROID
|
||||
pref("plugin.disable", false);
|
||||
pref("dom.ipc.plugins.enabled", false);
|
||||
#else
|
||||
pref("plugin.disable", true);
|
||||
pref("dom.ipc.plugins.enabled", true);
|
||||
#endif
|
||||
pref("dom.ipc.plugins.enabled", true);
|
||||
|
||||
// process priority
|
||||
// higher values give content process less CPU time
|
||||
|
|
|
@ -400,7 +400,6 @@ var Browser = {
|
|||
messageManager.addMessageListener("Browser:CertException", this);
|
||||
messageManager.addMessageListener("Browser:BlockedSite", this);
|
||||
messageManager.addMessageListener("Browser:ErrorPage", this);
|
||||
messageManager.addMessageListener("Browser:PluginClickToPlay", this);
|
||||
|
||||
// Broadcast a UIReady message so add-ons know we are finished with startup
|
||||
let event = document.createEvent("Events");
|
||||
|
@ -499,7 +498,6 @@ var Browser = {
|
|||
messageManager.removeMessageListener("Browser:CertException", this);
|
||||
messageManager.removeMessageListener("Browser:BlockedSite", this);
|
||||
messageManager.removeMessageListener("Browser:ErrorPage", this);
|
||||
messageManager.removeMessageListener("Browser:PluginClickToPlay", this);
|
||||
|
||||
var os = Services.obs;
|
||||
os.removeObserver(XPInstallObserver, "addon-install-blocked");
|
||||
|
@ -1272,31 +1270,6 @@ var Browser = {
|
|||
case "Browser:ErrorPage":
|
||||
this._handleErrorPage(aMessage);
|
||||
break;
|
||||
case "Browser:PluginClickToPlay": {
|
||||
// Save off session history
|
||||
let parent = browser.parentNode;
|
||||
let data = browser.__SS_data;
|
||||
if (data.entries.length == 0)
|
||||
return;
|
||||
|
||||
// Remove the browser from the DOM, effectively killing it's content
|
||||
parent.removeChild(browser);
|
||||
|
||||
// Re-create the browser as non-remote, so plugins work
|
||||
browser.setAttribute("remote", "false");
|
||||
parent.appendChild(browser);
|
||||
|
||||
// Reload the content using session history
|
||||
browser.__SS_data = data;
|
||||
let json = {
|
||||
uri: data.entries[data.index - 1].url,
|
||||
flags: null,
|
||||
entries: data.entries,
|
||||
index: data.index
|
||||
};
|
||||
browser.messageManager.sendAsyncMessage("WebNavigation:LoadURI", json);
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -283,7 +283,6 @@ let Content = {
|
|||
addEventListener("DOMContentLoaded", this, false);
|
||||
addEventListener("pagehide", this, false);
|
||||
addEventListener("keypress", this, false, false);
|
||||
addEventListener("PluginClickToPlay", this, false, true);
|
||||
|
||||
// Attach a listener to watch for "click" events bubbling up from error
|
||||
// pages and other similar page. This lets us fix bugs like 401575 which
|
||||
|
@ -395,10 +394,6 @@ let Content = {
|
|||
if (aEvent.target == content.document)
|
||||
this._resetFontSize();
|
||||
break;
|
||||
|
||||
case "PluginClickToPlay":
|
||||
sendAsyncMessage("Browser:PluginClickToPlay", { });
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
<!ENTITY pluginWizard.finalPage.restart.label "&brandShortName; needs to be restarted for the plugin(s) to work.">
|
||||
|
||||
<!ENTITY missingPlugin "A plugin is needed to display this content.">
|
||||
<!ENTITY clickToPlayPlugin "Tap here to activate plugin.">
|
||||
<!ENTITY disabledPlugin "This plugin is disabled.">
|
||||
<!ENTITY blockedPlugin.label "This plugin has been blocked for your protection.">
|
||||
|
||||
|
|
|
@ -58,9 +58,6 @@
|
|||
<xul:spacer flex="1"/>
|
||||
<xul:box class="icon"/>
|
||||
<html:div class="msg msgUnsupported">&missingPlugin;</html:div>
|
||||
<html:div class="msg msgClickToPlay" onclick="var evt = document.createEvent('Events'); evt.initEvent('PluginClickToPlay', true, false); this.dispatchEvent(evt);">
|
||||
&clickToPlayPlugin;
|
||||
</html:div>
|
||||
<html:div class="msg msgDisabled">&disabledPlugin;</html:div>
|
||||
<html:div class="msg msgBlocked">&blockedPlugin.label;</html:div>
|
||||
<html:div class="msg msgCrashed"><!-- set at runtime --></html:div>
|
||||
|
|
|
@ -41,15 +41,12 @@
|
|||
embed:-moz-handler-disabled,
|
||||
embed:-moz-handler-blocked,
|
||||
embed:-moz-handler-crashed,
|
||||
embed:-moz-handler-clicktoplay,
|
||||
applet:-moz-handler-disabled,
|
||||
applet:-moz-handler-blocked,
|
||||
applet:-moz-handler-crashed,
|
||||
applet:-moz-handler-clicktoplay,
|
||||
object:-moz-has-handlerref:-moz-handler-disabled,
|
||||
object:-moz-has-handlerref:-moz-handler-blocked,
|
||||
object:-moz-handler-crashed,
|
||||
object:-moz-handler-clicktoplay {
|
||||
object:-moz-handler-crashed {
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
-moz-binding: url('chrome://mozapps/content/plugins/pluginProblem.xml#pluginProblem') !important;
|
||||
|
|
|
@ -13,13 +13,11 @@ html|applet:not([height]), html|applet[height=""] {
|
|||
}
|
||||
|
||||
:-moz-type-unsupported .mainBox,
|
||||
:-moz-handler-clicktoplay .mainBox,
|
||||
:-moz-handler-disabled .mainBox,
|
||||
:-moz-handler-blocked .mainBox {
|
||||
-moz-user-focus: normal;
|
||||
}
|
||||
:-moz-type-unsupported .mainBox:focus,
|
||||
:-moz-handler-clicktoplay .mainBox:focus,
|
||||
:-moz-handler-disabled .mainBox:focus,
|
||||
:-moz-handler-blocked .mainBox:focus {
|
||||
outline: 1px dotted;
|
||||
|
@ -42,7 +40,6 @@ html|applet:not([height]), html|applet[height=""] {
|
|||
}
|
||||
|
||||
:-moz-type-unsupported .msgUnsupported,
|
||||
:-moz-handler-clicktoplay .msgClickToPlay,
|
||||
:-moz-handler-disabled .msgDisabled,
|
||||
:-moz-handler-disabled .msgManagePlugins,
|
||||
:-moz-handler-blocked .msgBlocked,
|
||||
|
|
|
@ -34,9 +34,6 @@ html|a {
|
|||
:-moz-type-unsupported .icon[status="ready"] {
|
||||
background-image: url(chrome://mozapps/skin/plugins/contentPluginDownload.png);
|
||||
}
|
||||
:-moz-handler-clicktoplay .icon {
|
||||
background-image: url(chrome://mozapps/skin/plugins/contentPluginMissing.png);
|
||||
}
|
||||
:-moz-handler-disabled .icon {
|
||||
background-image: url(chrome://mozapps/skin/plugins/contentPluginDisabled.png);
|
||||
}
|
||||
|
|
|
@ -34,9 +34,6 @@ html|a {
|
|||
:-moz-type-unsupported .icon[status="ready"] {
|
||||
background-image: url(chrome://mozapps/skin/plugins/contentPluginDownload.png);
|
||||
}
|
||||
:-moz-handler-clicktoplay .icon {
|
||||
background-image: url(chrome://mozapps/skin/plugins/contentPluginMissing.png);
|
||||
}
|
||||
:-moz-handler-disabled .icon {
|
||||
background-image: url(chrome://mozapps/skin/plugins/contentPluginDisabled.png);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче