Skip to content

Commit

Permalink
Merge from mozilla-central.
Browse files Browse the repository at this point in the history
--HG--
extra : rebase_source : 521cbf2f434cad88106f32be797faae4861afc39
  • Loading branch information
David Anderson committed Jun 25, 2012
1 parent b5f5c1a commit 1222b46
Show file tree
Hide file tree
Showing 210 changed files with 2,595 additions and 1,089 deletions.
19 changes: 8 additions & 11 deletions browser/components/migration/src/MigrationUtils.jsm
Expand Up @@ -266,17 +266,14 @@ let MigratorPrototype = {
getService(Ci.nsIObserver);
browserGlue.observe(null, TOPIC_WILL_IMPORT_BOOKMARKS, "");
let bookmarksHTMLFile = Services.dirsvc.get("BMarks", Ci.nsIFile);
if (bookmarksHTMLFile.exists()) {
// Note doMigrate doesn't care about the success value of the
// callback.
BookmarkHTMLUtils.importFromURL(
NetUtil.newURI(bookmarksHTMLFile).spec, true, function(a) {
browserGlue.observe(null, TOPIC_DID_IMPORT_BOOKMARKS, "");
doMigrate();
});
return;
}
// Note doMigrate doesn't care about the success value of the
// callback.
BookmarkHTMLUtils.importFromURL(
"resource:///defaults/profile/bookmarks.html", true, function(a) {
browserGlue.observe(null, TOPIC_DID_IMPORT_BOOKMARKS, "");
doMigrate();
});
return;
}
}
doMigrate();
Expand Down
3 changes: 0 additions & 3 deletions browser/components/tabview/ui.js
Expand Up @@ -250,9 +250,6 @@ let UI = {
let event = document.createEvent("Events");
event.initEvent("tabviewframeinitialized", true, false);
dispatchEvent(event);

// XXX this can be removed when bug 731868 is fixed
event = null;
} catch(e) {
Utils.log(e);
} finally {
Expand Down
57 changes: 50 additions & 7 deletions browser/modules/WebappsInstaller.jsm
Expand Up @@ -42,10 +42,10 @@ let WebappsInstaller = {
shell.install();
} catch (ex) {
Cu.reportError("Error installing app: " + ex);
return false;
return null;
}

return true;
return shell;
}
}

Expand Down Expand Up @@ -107,12 +107,16 @@ function NativeApp(aData) {
}
this.shortDescription = sanitize(shortDesc);

this.appcacheDefined = (app.manifest.appcache_path != undefined);

this.manifest = app.manifest;

this.profileFolder = Services.dirsvc.get("ProfD", Ci.nsIFile);
// The app registry is the Firefox profile from which the app
// was installed.
this.registryFolder = Services.dirsvc.get("ProfD", Ci.nsIFile);

this.webappJson = {
"registryDir": this.profileFolder.path,
"registryDir": this.registryFolder.path,
"app": app
};

Expand All @@ -125,8 +129,8 @@ function NativeApp(aData) {
*
* The Windows installation process will generate the following files:
*
* ${FolderName} = app-origin;protocol;port
* e.g.: subdomain.example.com;http;-1
* ${FolderName} = protocol;app-origin[;port]
* e.g.: subdomain.example.com;http;85
*
* %APPDATA%/${FolderName}
* - webapp.ini
Expand Down Expand Up @@ -170,6 +174,7 @@ WinNativeApp.prototype = {
this._createConfigFiles();
this._createShortcutFiles();
this._writeSystemKeys();
this._createAppProfile();
} catch (ex) {
this._removeInstallation();
throw(ex);
Expand All @@ -191,8 +196,8 @@ WinNativeApp.prototype = {
}

// The ${InstallDir} format is as follows:
// host of the app origin + ";" +
// protocol
// + ";" + host of the app origin
// + ";" + port (only if port is not default)
this.installDir = Services.dirsvc.get("AppData", Ci.nsIFile);
let installDirLeaf = this.launchURI.scheme
Expand Down Expand Up @@ -280,6 +285,20 @@ WinNativeApp.prototype = {
this.uninstallDir.create(Ci.nsIFile.DIRECTORY_TYPE, 0755);
},

/**
* Creates the profile to be used for this app.
*/
_createAppProfile: function() {
if (!this.appcacheDefined)
return;

let profSvc = Cc["@mozilla.org/toolkit/profile-service;1"]
.getService(Ci.nsIToolkitProfileService);

this.appProfile = profSvc.createDefaultProfileForApp(this.installDir.leafName,
null, null);
},

/**
* Copy the pre-built files into their destination folders.
*/
Expand Down Expand Up @@ -495,6 +514,7 @@ MacNativeApp.prototype = {
this._createDirectoryStructure();
this._copyPrebuiltFiles();
this._createConfigFiles();
this._createAppProfile();
} catch (ex) {
this._removeInstallation(false);
throw(ex);
Expand Down Expand Up @@ -533,6 +553,17 @@ MacNativeApp.prototype = {
this.resourcesDir.create(Ci.nsIFile.DIRECTORY_TYPE, 0755);
},

_createAppProfile: function() {
if (!this.appcacheDefined)
return;

let profSvc = Cc["@mozilla.org/toolkit/profile-service;1"]
.getService(Ci.nsIToolkitProfileService);

this.appProfile = profSvc.createDefaultProfileForApp(this.appProfileDir.leafName,
null, null);
},

_copyPrebuiltFiles: function() {
let webapprt = this.runtimeFolder.clone();
webapprt.append("webapprt-stub");
Expand Down Expand Up @@ -695,6 +726,7 @@ LinuxNativeApp.prototype = {
this._createDirectoryStructure();
this._copyPrebuiltFiles();
this._createConfigFiles();
this._createAppProfile();
} catch (ex) {
this._removeInstallation();
throw(ex);
Expand Down Expand Up @@ -724,6 +756,17 @@ LinuxNativeApp.prototype = {
webapprtPre.copyTo(this.installDir, this.webapprt.leafName);
},

_createAppProfile: function() {
if (!this.appcacheDefined)
return;

let profSvc = Cc["@mozilla.org/toolkit/profile-service;1"]
.getService(Ci.nsIToolkitProfileService);

return profSvc.createDefaultProfileForApp(this.installDir.leafName,
null, null);
},

_createConfigFiles: function() {
// ${InstallDir}/webapp.json
let configJson = this.installDir.clone();
Expand Down
10 changes: 8 additions & 2 deletions browser/modules/webappsUI.jsm
Expand Up @@ -109,8 +109,14 @@ let webappsUI = {
label: bundle.getString("webapps.install"),
accessKey: bundle.getString("webapps.install.accesskey"),
callback: function(notification) {
if (WebappsInstaller.install(aData)) {
DOMApplicationRegistry.confirmInstall(aData);
let app = WebappsInstaller.install(aData);
if (app) {
let localDir = null;
if (app.appcacheDefined && app.appProfile) {
localDir = app.appProfile.localDir;
}

DOMApplicationRegistry.confirmInstall(aData, false, localDir);
} else {
DOMApplicationRegistry.denyInstall(aData);
}
Expand Down
4 changes: 0 additions & 4 deletions browser/themes/gnomestripe/browser.css
Expand Up @@ -1009,10 +1009,6 @@ toolbar[iconsize="small"] #feed-button {
list-style-image: url(chrome://browser/skin/identity-icons-https-ev.png);
}

.mixedContent > #page-proxy-favicon[pageproxystate="valid"] {
list-style-image: url(chrome://browser/skin/identity-icons-https-mixed.png);
}

#identity-box:hover > #page-proxy-favicon {
-moz-image-region: rect(0, 32px, 16px, 16px);
}
Expand Down
Binary file not shown.
1 change: 0 additions & 1 deletion browser/themes/gnomestripe/jar.mn
Expand Up @@ -26,7 +26,6 @@ browser.jar:
skin/classic/browser/identity-icons-generic.png
skin/classic/browser/identity-icons-https.png
skin/classic/browser/identity-icons-https-ev.png
skin/classic/browser/identity-icons-https-mixed.png
skin/classic/browser/Info.png
skin/classic/browser/KUI-close.png
skin/classic/browser/monitor.png
Expand Down
4 changes: 0 additions & 4 deletions browser/themes/pinstripe/browser.css
Expand Up @@ -1066,10 +1066,6 @@ toolbar[mode="icons"] #zoom-in-button {
list-style-image: url(chrome://browser/skin/identity-icons-https-ev.png);
}

.mixedContent > #page-proxy-favicon[pageproxystate="valid"] {
list-style-image: url(chrome://browser/skin/identity-icons-https-mixed.png);
}

#identity-box:hover:active > #page-proxy-favicon,
#identity-box[open=true] > #page-proxy-favicon {
-moz-image-region: rect(0, 32px, 16px, 16px);
Expand Down
Binary file removed browser/themes/pinstripe/identity-icons-https-mixed.png
Binary file not shown.
1 change: 0 additions & 1 deletion browser/themes/pinstripe/jar.mn
Expand Up @@ -32,7 +32,6 @@ browser.jar:
skin/classic/browser/identity-icons-generic.png
skin/classic/browser/identity-icons-https.png
skin/classic/browser/identity-icons-https-ev.png
skin/classic/browser/identity-icons-https-mixed.png
skin/classic/browser/Info.png
skin/classic/browser/KUI-background.png
skin/classic/browser/KUI-close.png
Expand Down
4 changes: 0 additions & 4 deletions browser/themes/winstripe/browser.css
Expand Up @@ -1446,10 +1446,6 @@ html|*.urlbar-input:-moz-lwtheme:-moz-placeholder,
list-style-image: url(chrome://browser/skin/identity-icons-https-ev.png);
}

.mixedContent > #page-proxy-favicon[pageproxystate="valid"] {
list-style-image: url(chrome://browser/skin/identity-icons-https-mixed.png);
}

#identity-box:hover > #page-proxy-favicon {
-moz-image-region: rect(0, 32px, 16px, 16px);
}
Expand Down
Binary file removed browser/themes/winstripe/identity-icons-https-mixed.png
Binary file not shown.
2 changes: 0 additions & 2 deletions browser/themes/winstripe/jar.mn
Expand Up @@ -32,7 +32,6 @@ browser.jar:
skin/classic/browser/identity-icons-generic.png
skin/classic/browser/identity-icons-https.png
skin/classic/browser/identity-icons-https-ev.png
skin/classic/browser/identity-icons-https-mixed.png
skin/classic/browser/keyhole-forward-mask.svg
skin/classic/browser/KUI-background.png
skin/classic/browser/KUI-close.png
Expand Down Expand Up @@ -230,7 +229,6 @@ browser.jar:
skin/classic/aero/browser/identity-icons-generic.png
skin/classic/aero/browser/identity-icons-https.png
skin/classic/aero/browser/identity-icons-https-ev.png
skin/classic/aero/browser/identity-icons-https-mixed.png
skin/classic/aero/browser/keyhole-forward-mask.svg
skin/classic/aero/browser/KUI-background.png
skin/classic/aero/browser/KUI-close.png
Expand Down
1 change: 1 addition & 0 deletions build/autoconf/android.m4
Expand Up @@ -98,6 +98,7 @@ case "$target" in
fi
dnl set up compilers
TOOLCHAIN_PREFIX="$android_toolchain/bin/$android_tool_prefix-"
AS="$android_toolchain"/bin/"$android_tool_prefix"-as
CC="$android_toolchain"/bin/"$android_tool_prefix"-gcc
CXX="$android_toolchain"/bin/"$android_tool_prefix"-g++
Expand Down
25 changes: 19 additions & 6 deletions build/mobile/sutagent/android/DoCommand.java
Expand Up @@ -105,7 +105,7 @@ public class DoCommand {
String ffxProvider = "org.mozilla.ffxcp";
String fenProvider = "org.mozilla.fencp";

private final String prgVersion = "SUTAgentAndroid Version 1.08";
private final String prgVersion = "SUTAgentAndroid Version 1.09";

public enum Command
{
Expand Down Expand Up @@ -162,6 +162,7 @@ public enum Command
INST ("inst"),
UPDT ("updt"),
UNINST ("uninst"),
UNINSTALL ("uninstall"),
TEST ("test"),
DBG ("dbg"),
TRACE ("trace"),
Expand Down Expand Up @@ -356,9 +357,16 @@ public String processCommand(String theCmdLine, PrintWriter out, BufferedInputSt

case UNINST:
if (Argc >= 2)
strReturn = UnInstallApp(Argv[1], cmdOut);
strReturn = UnInstallApp(Argv[1], cmdOut, true);
else
strReturn = sErrorPrefix + "Wrong number of arguments for inst command!";
strReturn = sErrorPrefix + "Wrong number of arguments for uninst command!";
break;

case UNINSTALL:
if (Argc >= 2)
strReturn = UnInstallApp(Argv[1], cmdOut, false);
else
strReturn = sErrorPrefix + "Wrong number of arguments for uninstall command!";
break;

case ALRT:
Expand Down Expand Up @@ -3115,13 +3123,17 @@ public String RunReboot(OutputStream out, String sCallBackIP, String sCallBackPo
return theArgs;
}

public String UnInstallApp(String sApp, OutputStream out)
public String UnInstallApp(String sApp, OutputStream out, boolean reboot)
{
String sRet = "";

try
{
pProc = Runtime.getRuntime().exec(this.getSuArgs("pm uninstall " + sApp + ";reboot;exit"));
if (reboot == true) {
pProc = Runtime.getRuntime().exec(this.getSuArgs("pm uninstall " + sApp + ";reboot;exit"));
} else {
pProc = Runtime.getRuntime().exec(this.getSuArgs("pm uninstall " + sApp + ";exit"));
}

RedirOutputThread outThrd = new RedirOutputThread(pProc, out);
outThrd.start();
Expand Down Expand Up @@ -3762,7 +3774,8 @@ private String PrintUsage()
"zip zipfile src - zip the source file/dir into zipfile\n" +
"rebt - reboot device\n" +
"inst /path/filename.apk - install the referenced apk file\n" +
"uninst packagename - uninstall the referenced package\n" +
"uninst packagename - uninstall the referenced package and reboot\n" +
"uninstall packagename - uninstall the referenced package without a reboot\n" +
"updt pkgname pkgfile - unpdate the referenced package\n" +
"clok - the current device time expressed as the" +
" number of millisecs since epoch\n" +
Expand Down
1 change: 1 addition & 0 deletions config/autoconf.mk.in
Expand Up @@ -357,6 +357,7 @@ HAVE_64BIT_OS = @HAVE_64BIT_OS@
CC = @CC@
CXX = @CXX@
CPP = @CPP@
TOOLCHAIN_PREFIX = @TOOLCHAIN_PREFIX@

CC_VERSION = @CC_VERSION@
CXX_VERSION = @CXX_VERSION@
Expand Down
4 changes: 2 additions & 2 deletions config/config.mk
Expand Up @@ -736,8 +736,8 @@ OPTIMIZE_JARS_CMD = $(PYTHON) $(call core_abspath,$(topsrcdir)/config/optimizeja

CREATE_PRECOMPLETE_CMD = $(PYTHON) $(call core_abspath,$(topsrcdir)/config/createprecomplete.py)

EXPAND_LIBS_EXEC = $(PYTHON) $(topsrcdir)/config/pythonpath.py -I$(DEPTH)/config $(topsrcdir)/config/expandlibs_exec.py $(if $@,--depend $(MDDEPDIR)/$(basename $(@F)).pp --target $@)
EXPAND_LIBS_GEN = $(PYTHON) $(topsrcdir)/config/pythonpath.py -I$(DEPTH)/config $(topsrcdir)/config/expandlibs_gen.py $(if $@,--depend $(MDDEPDIR)/$(basename $(@F)).pp)
EXPAND_LIBS_EXEC = $(PYTHON) $(topsrcdir)/config/pythonpath.py -I$(DEPTH)/config $(topsrcdir)/config/expandlibs_exec.py $(if $@,--depend $(MDDEPDIR)/$(@F).pp --target $@)
EXPAND_LIBS_GEN = $(PYTHON) $(topsrcdir)/config/pythonpath.py -I$(DEPTH)/config $(topsrcdir)/config/expandlibs_gen.py $(if $@,--depend $(MDDEPDIR)/$(@F).pp)
EXPAND_AR = $(EXPAND_LIBS_EXEC) --extract -- $(AR)
EXPAND_CC = $(EXPAND_LIBS_EXEC) --uselist -- $(CC)
EXPAND_CCC = $(EXPAND_LIBS_EXEC) --uselist -- $(CCC)
Expand Down
2 changes: 1 addition & 1 deletion config/rules.mk
Expand Up @@ -286,7 +286,7 @@ endif

ifndef MOZ_AUTO_DEPS
ifneq (,$(OBJS)$(XPIDLSRCS)$(SIMPLE_PROGRAMS))
MDDEPFILES = $(addprefix $(MDDEPDIR)/,$(OBJS:.$(OBJ_SUFFIX)=.pp))
MDDEPFILES = $(addprefix $(MDDEPDIR)/,$(OBJS:=.pp))
ifndef NO_GEN_XPT
MDDEPFILES += $(addprefix $(MDDEPDIR)/,$(XPIDLSRCS:.idl=.h.pp) $(XPIDLSRCS:.idl=.xpt.pp))
endif
Expand Down
5 changes: 3 additions & 2 deletions configure.in
Expand Up @@ -171,6 +171,7 @@ if test -n "$gonkdir" ; then
ANDROID_NDK="${ANDROID_SOURCE}/ndk"

dnl set up compilers
TOOLCHAIN_PREFIX="$gonk_toolchain_prefix"
AS="$gonk_toolchain_prefix"as
CC="$gonk_toolchain_prefix"gcc
CXX="$gonk_toolchain_prefix"g++
Expand Down Expand Up @@ -7762,7 +7763,7 @@ MOZ_ARG_DISABLE_BOOL(md,
fi])
if test "$_cpp_md_flag"; then
COMPILER_DEPEND=1
_DEPEND_CFLAGS='$(filter-out %/.pp,-MD -MF $(MDDEPDIR)/$(basename $(@F)).pp)'
_DEPEND_CFLAGS='$(filter-out %/.pp,-MD -MF $(MDDEPDIR)/$(@F).pp)'
dnl Sun Studio on Solaris use -xM instead of -MD, see config/rules.mk
if test "$SOLARIS_SUNPRO_CC"; then
_DEPEND_CFLAGS=
Expand Down Expand Up @@ -8320,6 +8321,7 @@ AC_SUBST(MOZ_FEEDS)
AC_SUBST(NS_PRINTING)
AC_SUBST(MOZ_WEBGL)
AC_SUBST(MOZ_HELP_VIEWER)
AC_SUBST(TOOLCHAIN_PREFIX)

AC_SUBST(JAVA)
AC_SUBST(JAVAC)
Expand Down Expand Up @@ -8464,7 +8466,6 @@ AC_SUBST(MOZ_APP_UA_NAME)
AC_DEFINE_UNQUOTED(MOZ_APP_UA_VERSION, "$MOZ_APP_VERSION")
AC_SUBST(MOZ_APP_VERSION)
AC_SUBST(MOZ_APP_MAXVERSION)
AC_DEFINE_UNQUOTED(MOZ_UA_FIREFOX_VERSION, "$FIREFOX_VERSION")
AC_DEFINE_UNQUOTED(FIREFOX_VERSION,$FIREFOX_VERSION)
AC_SUBST(FIREFOX_VERSION)

Expand Down
6 changes: 6 additions & 0 deletions content/base/src/nsContentUtils.cpp
Expand Up @@ -6251,6 +6251,12 @@ nsContentUtils::IsSubDocumentTabbable(nsIContent* aContent)
return false;
}

// If the subdocument lives in another process, the frame is
// tabbable.
if (nsEventStateManager::IsRemoteTarget(aContent)) {
return true;
}

// XXXbz should this use OwnerDoc() for GetSubDocumentFor?
// sXBL/XBL2 issue!
nsIDocument* subDoc = doc->GetSubDocumentFor(aContent);
Expand Down

0 comments on commit 1222b46

Please sign in to comment.