Merge m-c to inbound a=merge

This commit is contained in:
Wes Kocher 2014-07-24 17:55:50 -07:00
commit c605bcd891
40 changed files with 272 additions and 320 deletions

View File

@ -22,4 +22,4 @@
# changes to stick? As of bug 928195, this shouldn't be necessary! Please
# don't change CLOBBER for WebIDL changes any more.
Apparently something in bug 984711 & friends breaks CSS2Properties.webidl in non-clobber builds.
Bug 1016529 - Updating Android SDK to include Google Play Services

View File

@ -427,8 +427,6 @@ pref("network.gonk.ms-release-mms-connection", 30000);
// WebContacts
pref("dom.mozContacts.enabled", true);
pref("dom.navigator-property.disable.mozContacts", false);
pref("dom.global-constructor.disable.mozContact", false);
// Shortnumber matching needed for e.g. Brazil:
// 03187654321 can be found with 87654321
@ -493,7 +491,6 @@ pref("dom.mozApps.single_variant_sourcedir", "/persist/svoperapps");
// WebSettings
pref("dom.mozSettings.enabled", true);
pref("dom.navigator-property.disable.mozSettings", false);
pref("dom.mozPermissionSettings.enabled", true);
// controls if we want camera support

View File

@ -19,7 +19,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="c72257b2d27135bfcd68e89dd584182797784016"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="62eedafb0657bbec8941f5bdaa919b5a59f25db1"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="7f792d756385bb894fba7645da59c67fe2c804bf"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="cd88d860656c31c7da7bb310d6a160d0011b0961"/>

View File

@ -17,7 +17,7 @@
</project>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="c72257b2d27135bfcd68e89dd584182797784016"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="62eedafb0657bbec8941f5bdaa919b5a59f25db1"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="7f792d756385bb894fba7645da59c67fe2c804bf"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="dc5ca96695cab87b4c2fcd7c9f046ae3415a70a5"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="11f01789444d4ebe97581c31d8756d773e18356f"/>

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="999e945b85c578c503ad445c2285940f16aacdae">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="c72257b2d27135bfcd68e89dd584182797784016"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="62eedafb0657bbec8941f5bdaa919b5a59f25db1"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="7f792d756385bb894fba7645da59c67fe2c804bf"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>

View File

@ -19,7 +19,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="c72257b2d27135bfcd68e89dd584182797784016"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="62eedafb0657bbec8941f5bdaa919b5a59f25db1"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="7f792d756385bb894fba7645da59c67fe2c804bf"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="cd88d860656c31c7da7bb310d6a160d0011b0961"/>

View File

@ -17,7 +17,7 @@
</project>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="c72257b2d27135bfcd68e89dd584182797784016"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="62eedafb0657bbec8941f5bdaa919b5a59f25db1"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="7f792d756385bb894fba7645da59c67fe2c804bf"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="dc5ca96695cab87b4c2fcd7c9f046ae3415a70a5"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="11f01789444d4ebe97581c31d8756d773e18356f"/>

View File

@ -4,6 +4,6 @@
"remote": "",
"branch": ""
},
"revision": "fd60711c229532be57fd8164ecf29540276f6acd",
"revision": "ad56e7047114cfe88205972975216ca6c67479f3",
"repo_path": "/integration/gaia-central"
}

View File

@ -17,7 +17,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="c72257b2d27135bfcd68e89dd584182797784016"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="62eedafb0657bbec8941f5bdaa919b5a59f25db1"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="7f792d756385bb894fba7645da59c67fe2c804bf"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>

View File

@ -15,7 +15,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="c72257b2d27135bfcd68e89dd584182797784016"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="62eedafb0657bbec8941f5bdaa919b5a59f25db1"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="7f792d756385bb894fba7645da59c67fe2c804bf"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>

View File

@ -17,7 +17,7 @@
</project>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="c72257b2d27135bfcd68e89dd584182797784016"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="62eedafb0657bbec8941f5bdaa919b5a59f25db1"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="7f792d756385bb894fba7645da59c67fe2c804bf"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="dc5ca96695cab87b4c2fcd7c9f046ae3415a70a5"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="11f01789444d4ebe97581c31d8756d773e18356f"/>

View File

@ -17,7 +17,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="c72257b2d27135bfcd68e89dd584182797784016"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="62eedafb0657bbec8941f5bdaa919b5a59f25db1"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="7f792d756385bb894fba7645da59c67fe2c804bf"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>

View File

@ -313,8 +313,14 @@ pref("browser.urlbar.doubleClickSelectsAll", true);
#else
pref("browser.urlbar.doubleClickSelectsAll", false);
#endif
// Control autoFill behavior
pref("browser.urlbar.autoFill", true);
pref("browser.urlbar.autoFill.typed", true);
// Use the new unifiedComplete component
pref("browser.urlbar.unifiedcomplete", true);
// 0: Match anywhere (e.g., middle of words)
// 1: Match on word boundaries and then try matching anywhere
// 2: Match only on word boundaries (e.g., after / or .)

View File

@ -218,20 +218,14 @@
<deck id="fxaLoginStatus">
<!-- logged in and verified and all is good -->
<hbox>
<hbox align="center">
<label id="fxaEmailAddress1"/>
<vbox>
<label class="text-link"
onclick="gSyncPane.manageFirefoxAccount();">
&manage.label;
</label>
</vbox>
<spacer flex="1"/>
<vbox>
<button id="fxaUnlinkButton"
oncommand="gSyncPane.unlinkFirefoxAccount(true);"
label="&disconnect.label;"/>
</vbox>
<button oncommand="gSyncPane.manageFirefoxAccount();"
label="&manage.label;"/>
<button id="fxaUnlinkButton"
oncommand="gSyncPane.unlinkFirefoxAccount(true);"
label="&disconnect.label;"/>
</hbox>
<!-- logged in to an unverified account -->

View File

@ -12,6 +12,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf8"/>
<link rel="stylesheet" href="chrome://webide/skin/deck.css" type="text/css"/>
<link rel="stylesheet" href="chrome://webide/skin/addons.css" type="text/css"/>
<script type="application/javascript;version=1.8" src="chrome://webide/content/addons.js"></script>
</head>

View File

@ -12,7 +12,8 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf8"/>
<link rel="stylesheet" href="chrome://webide/skin/tabledoc.css" type="text/css"/>
<link rel="stylesheet" href="chrome://webide/skin/deck.css" type="text/css"/>
<link rel="stylesheet" href="chrome://webide/skin/permissionstable.css" type="text/css"/>
<script type="application/javascript;version=1.8" src="chrome://webide/content/permissionstable.js"></script>
</head>
<body>

View File

@ -12,6 +12,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf8"/>
<link rel="stylesheet" href="chrome://webide/skin/deck.css" type="text/css"/>
<link rel="stylesheet" href="chrome://webide/skin/prefs.css" type="text/css"/>
<script type="application/javascript;version=1.8" src="chrome://webide/content/prefs.js"></script>
</head>

View File

@ -12,7 +12,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf8"/>
<link rel="stylesheet" href="chrome://webide/skin/tabledoc.css" type="text/css"/>
<link rel="stylesheet" href="chrome://webide/skin/deck.css" type="text/css"/>
<link rel="stylesheet" href="chrome://webide/skin/runtimedetails.css" type="text/css"/>
<script type="application/javascript;version=1.8" src="chrome://webide/content/runtimedetails.js"></script>
</head>

View File

@ -2,28 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
html {
font: message-box;
font-size: 15px;
font-weight: normal;
margin: 0;
color: #737980;
background-image: linear-gradient(#fff, #ededed 100px);
height: 100%;
}
body {
padding: 20px;
}
h1 {
font-size: 2.5em;
font-weight: lighter;
line-height: 1.2;
margin: 0;
margin-bottom: .5em;
}
button {
line-height: 20px;
font-size: 1em;
@ -81,24 +59,6 @@ li {
font-size: 0.9em;
}
#controls {
position: absolute;
top: 10px;
right: 10px;
}
#controls > a {
color: #4C9ED9;
font-size: small;
cursor: pointer;
border-bottom: 1px dotted;
}
#close {
margin-left: 10px;
}
li[status="unknown"],
li > .uninstall-button,
li > .install-button,

View File

@ -2,12 +2,32 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
html {
font: message-box;
font-size: 15px;
font-weight: normal;
margin: 0;
height: 100%;
color: #737980;
background-color: #ededed;
}
body {
background: white;
margin: 0;
padding: 20px;
background-image: linear-gradient(#fff, #ededed 100px);
}
h1 {
font-size: 2.5em;
font-weight: lighter;
line-height: 1.2;
margin: 0;
margin-bottom: .5em;
}
#controls {
position: fixed;
position: absolute;
top: 10px;
right: 10px;
}
@ -30,29 +50,13 @@ table {
th, td {
padding: 5px;
border: 1px solid #EEE;
border: 1px solid #eee;
}
th {
min-width: 130px;
}
.permissionstable td {
text-align: center;
}
th:first-of-type, td:first-of-type {
text-align: left;
}
.permallow {
color: rgb(152,207,57);
}
.permprompt {
color: rgb(0,158,237);
}
.permdeny {
color: rgb(204,73,8);
}

View File

@ -4,12 +4,13 @@
webide.jar:
% skin webide classic/1.0 %skin/
* skin/webide.css (webide.css)
skin/icons.png (icons.png)
skin/details.css (details.css)
skin/newapp.css (newapp.css)
skin/throbber.svg (throbber.svg)
skin/addons.css (addons.css)
skin/prefs.css (prefs.css)
skin/tabledoc.css (tabledoc.css)
skin/runtimedetails.css (runtimedetails.css)
* skin/webide.css (webide.css)
skin/icons.png (icons.png)
skin/details.css (details.css)
skin/newapp.css (newapp.css)
skin/throbber.svg (throbber.svg)
skin/deck.css (deck.css)
skin/addons.css (addons.css)
skin/prefs.css (prefs.css)
skin/runtimedetails.css (runtimedetails.css)
skin/permissionstable.css (permissionstable.css)

View File

@ -0,0 +1,23 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
html, body {
background: white;
}
.permissionstable td {
text-align: center;
}
.permallow {
color: rgb(152,207,57);
}
.permprompt {
color: rgb(0,158,237);
}
.permdeny {
color: rgb(204,73,8);
}

View File

@ -2,45 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
html {
font: message-box;
font-size: 15px;
font-weight: normal;
margin: 0;
color: #737980;
background-image: linear-gradient(#fff, #ededed 100px);
height: 100%;
}
body {
padding: 20px;
}
h1 {
font-size: 2.5em;
font-weight: lighter;
line-height: 1.2;
margin: 0;
margin-bottom: .5em;
}
#controls {
position: absolute;
top: 10px;
right: 10px;
}
#controls > a {
color: #4C9ED9;
font-size: small;
cursor: pointer;
border-bottom: 1px dotted;
}
#close {
margin-left: 10px;
}
li {
list-style: none;
}

View File

@ -2,6 +2,10 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
html, body {
background: white;
}
#devicePrivileges {
font-family: monospace;
padding-left: 6px;

View File

@ -412,7 +412,6 @@ TiledContentHost::RenderTile(const TileHost& aTile,
}
if (aBackgroundColor) {
MOZ_ASSERT(aOpacity == 1.0f);
aEffectChain.mPrimaryEffect = new EffectSolidColor(ToColor(*aBackgroundColor));
nsIntRegionRectIterator it(aScreenRegion);
for (const nsIntRect* rect = it.Next(); rect != nullptr; rect = it.Next()) {

View File

@ -117,13 +117,15 @@ public class GeckoApplication extends Application
@Override
public void onCreate() {
HardwareUtils.init(getApplicationContext());
Clipboard.init(getApplicationContext());
FilePicker.init(getApplicationContext());
GeckoLoader.loadMozGlue();
HomePanelsManager.getInstance().init(getApplicationContext());
// This getInstance call will force initializatino of the NotificationHelper, but does nothing with the result
NotificationHelper.getInstance(getApplicationContext()).init();
final Context context = getApplicationContext();
HardwareUtils.init(context);
Clipboard.init(context);
FilePicker.init(context);
GeckoLoader.loadMozGlue(context);
HomePanelsManager.getInstance().init(context);
// This getInstance call will force initialization of the NotificationHelper, but does nothing with the result
NotificationHelper.getInstance(context).init();
super.onCreate();
}

View File

@ -78,7 +78,7 @@ public class GeckoView extends LayerView
// If you want to use GeckoNetworkManager, start it.
GeckoLoader.loadMozGlue();
GeckoLoader.loadMozGlue(context);
BrowserDB.setEnableContentProviders(false);
}

View File

@ -78,14 +78,14 @@ public class PasswordsProvider extends SQLiteBridgeContentProvider {
DELETED_PASSWORDS_PROJECTION_MAP.put(DeletedPasswords.ID, DeletedPasswords.ID);
DELETED_PASSWORDS_PROJECTION_MAP.put(DeletedPasswords.GUID, DeletedPasswords.GUID);
DELETED_PASSWORDS_PROJECTION_MAP.put(DeletedPasswords.TIME_DELETED, DeletedPasswords.TIME_DELETED);
// We don't use .loadMozGlue because we're in a different process,
// and we just want to reuse code rather than use the loader lock etc.
GeckoLoader.doLoadLibrary("mozglue");
}
public PasswordsProvider() {
super(LOG_TAG);
// We don't use .loadMozGlue because we're in a different process,
// and we just want to reuse code rather than use the loader lock etc.
GeckoLoader.doLoadLibrary(getContext(), "mozglue");
}
@Override

View File

@ -159,7 +159,7 @@ public final class GeckoLoader {
/* We really want to use this code, but it requires bumping up the SDK to 17 so for now
we will use reflection. See https://bugzilla.mozilla.org/show_bug.cgi?id=811763#c11
if (Build.VERSION.SDK_INT >= 17) {
android.os.UserManager um = (android.os.UserManager)context.getSystemService(Context.USER_SERVICE);
if (um != null) {
@ -234,7 +234,7 @@ public final class GeckoLoader {
}
@RobocopTarget
public static void loadSQLiteLibs(Context context, String apkName) {
public static void loadSQLiteLibs(final Context context, final String apkName) {
synchronized (sLibLoadingLock) {
if (sSQLiteLibsLoaded) {
return;
@ -242,13 +242,12 @@ public final class GeckoLoader {
sSQLiteLibsLoaded = true;
}
loadMozGlue();
// the extract libs parameter is being removed in bug 732069
loadMozGlue(context);
loadLibsSetup(context);
loadSQLiteLibsNative(apkName, false);
}
public static void loadNSSLibs(Context context, String apkName) {
public static void loadNSSLibs(final Context context, final String apkName) {
synchronized (sLibLoadingLock) {
if (sNSSLibsLoaded) {
return;
@ -256,31 +255,130 @@ public final class GeckoLoader {
sNSSLibsLoaded = true;
}
loadMozGlue();
loadMozGlue(context);
loadLibsSetup(context);
loadNSSLibsNative(apkName, false);
}
public static void doLoadLibrary(final String lib) {
private static String getLoadDiagnostics(final Context context, final String lib) {
final StringBuilder message = new StringBuilder("LOAD ");
message.append(lib);
message.append(": Data: " + context.getApplicationInfo().dataDir);
try {
System.loadLibrary(lib);
} catch (UnsatisfiedLinkError e) {
Log.wtf(LOGTAG, "Couldn't load " + lib + ". Trying /data/app-lib path.");
try {
System.load("/data/app-lib/" + ANDROID_PACKAGE_NAME + "/lib" + lib + ".so");
} catch (Throwable ee) {
try {
Log.wtf(LOGTAG, "Couldn't load " + lib + ": " + ee + ". Trying /data/data path.");
System.load("/data/data/" + ANDROID_PACKAGE_NAME + "/lib/lib" + lib + ".so");
} catch (Throwable eee) {
Log.wtf(LOGTAG, "Failed every attempt to load " + lib + ". Giving up.");
throw new RuntimeException("Unable to load " + lib, eee);
}
final boolean appLibExists = new File("/data/app-lib/" + ANDROID_PACKAGE_NAME + "/lib" + lib + ".so").exists();
final boolean dataDataExists = new File("/data/data/" + ANDROID_PACKAGE_NAME + "/lib/lib" + lib + ".so").exists();
message.append(", ax=" + appLibExists);
message.append(", ddx=" + dataDataExists);
} catch (Throwable e) {
message.append(": ax/ddx fail, ");
}
try {
final String dashOne = "/data/data/" + ANDROID_PACKAGE_NAME + "-1";
final String dashTwo = "/data/data/" + ANDROID_PACKAGE_NAME + "-2";
final boolean dashOneExists = new File(dashOne).exists();
final boolean dashTwoExists = new File(dashTwo).exists();
message.append(", -1x=" + dashOneExists);
message.append(", -2x=" + dashTwoExists);
} catch (Throwable e) {
message.append(", dash fail, ");
}
try {
if (Build.VERSION.SDK_INT >= 9) {
final String nativeLibPath = context.getApplicationInfo().nativeLibraryDir;
final boolean nativeLibDirExists = new File(nativeLibPath).exists();
final boolean nativeLibLibExists = new File(nativeLibPath + "/lib" + lib + ".so").exists();
message.append(", nativeLib: " + nativeLibPath);
message.append(", dirx=" + nativeLibDirExists);
message.append(", libx=" + nativeLibLibExists);
} else {
message.append(", <pre-9>");
}
} catch (Throwable e) {
message.append(", nativeLib fail.");
}
return message.toString();
}
private static final boolean attemptLoad(final String path) {
try {
System.load(path);
return true;
} catch (Throwable e) {
Log.wtf(LOGTAG, "Couldn't load " + path + ": " + e);
}
return false;
}
/**
* The first two attempts at loading a library: directly, and
* then using the app library path.
*
* Returns null or the cause exception.
*/
private static final Throwable doLoadLibraryExpected(final Context context, final String lib) {
try {
// Attempt 1: the way that should work.
System.loadLibrary(lib);
return null;
} catch (Throwable e) {
Log.wtf(LOGTAG, "Couldn't load " + lib + ". Trying native library dir.");
if (Build.VERSION.SDK_INT < 9) {
// We can't use nativeLibraryDir.
return e;
}
// Attempt 2: use nativeLibraryDir, which should also work.
final String libDir = context.getApplicationInfo().nativeLibraryDir;
if (attemptLoad(libDir + "/lib" + lib + ".so")) {
// Success!
return null;
}
// We failed. Return the original cause.
return e;
}
}
public static void loadMozGlue() {
public static void doLoadLibrary(final Context context, final String lib) {
final Throwable e = doLoadLibraryExpected(context, lib);
if (e == null) {
// Success.
return;
}
// Attempt 3: try finding the path the pseudo-supported way using .dataDir.
final String dataLibPath = context.getApplicationInfo().dataDir + "/lib/lib" + lib + ".so";
if (attemptLoad(dataLibPath)) {
return;
}
// Attempt 4: use /data/app-lib directly. This is a last-ditch effort.
if (attemptLoad("/data/app-lib/" + ANDROID_PACKAGE_NAME + "/lib" + lib + ".so")) {
return;
}
// Attempt 5: even more optimistic.
if (attemptLoad("/data/data/" + ANDROID_PACKAGE_NAME + "/lib/lib" + lib + ".so")) {
return;
}
// Give up loudly, leaking information to debug the failure.
final String message = getLoadDiagnostics(context, lib);
Log.e(LOGTAG, "Load diagnostics: " + message);
// Throw the descriptive message, using the original library load
// failure as the cause.
throw new RuntimeException(message, e);
}
public static void loadMozGlue(final Context context) {
synchronized (sLibLoadingLock) {
if (sMozGlueLoaded) {
return;
@ -288,10 +386,10 @@ public final class GeckoLoader {
sMozGlueLoaded = true;
}
doLoadLibrary("mozglue");
doLoadLibrary(context, "mozglue");
}
public static void loadGeckoLibs(Context context, String apkName) {
public static void loadGeckoLibs(final Context context, final String apkName) {
loadLibsSetup(context);
loadGeckoLibsNative(apkName);
}

View File

@ -6,8 +6,8 @@
"filename": "android-ndk.tar.bz2"
},
{
"size": 156663204,
"digest": "69c9be39a452c202ebe99fa3a7f31cb9a8028a8413afc344ef80d0f0d41e28c25cc9ad634e24e23639792b19f07d6acc22494429789dde725d8e202fe5625e27",
"size": 190380996,
"digest": "9e2da00cd4783e10a52c144d2dc9de71b9ab9772f26c9a4e36b9a744e05edd1d13c212b976a3d2f6cbcb86bce00b78fd262b47f8573eff2ab9db0ed2d4cfb8c5",
"algorithm": "sha512",
"filename": "android-sdk.tar.xz"
},

View File

@ -6,8 +6,8 @@
"filename": "android-ndk.tar.bz2"
},
{
"size": 156663204,
"digest": "69c9be39a452c202ebe99fa3a7f31cb9a8028a8413afc344ef80d0f0d41e28c25cc9ad634e24e23639792b19f07d6acc22494429789dde725d8e202fe5625e27",
"size": 190380996,
"digest": "9e2da00cd4783e10a52c144d2dc9de71b9ab9772f26c9a4e36b9a744e05edd1d13c212b976a3d2f6cbcb86bce00b78fd262b47f8573eff2ab9db0ed2d4cfb8c5",
"algorithm": "sha512",
"filename": "android-sdk.tar.xz"
},

View File

@ -6,8 +6,8 @@
"filename": "android-ndk.tar.bz2"
},
{
"size": 156663204,
"digest": "69c9be39a452c202ebe99fa3a7f31cb9a8028a8413afc344ef80d0f0d41e28c25cc9ad634e24e23639792b19f07d6acc22494429789dde725d8e202fe5625e27",
"size": 190380996,
"digest": "9e2da00cd4783e10a52c144d2dc9de71b9ab9772f26c9a4e36b9a744e05edd1d13c212b976a3d2f6cbcb86bce00b78fd262b47f8573eff2ab9db0ed2d4cfb8c5",
"algorithm": "sha512",
"filename": "android-sdk.tar.xz"
},

View File

@ -3998,8 +3998,6 @@ pref("dom.sms.defaultServiceId", 0);
// WebContacts
pref("dom.mozContacts.enabled", false);
pref("dom.navigator-property.disable.mozContacts", true);
pref("dom.global-constructor.disable.mozContact", true);
// WebAlarms
pref("dom.mozAlarms.enabled", false);

View File

@ -144,8 +144,6 @@ user_pref("layout.spammy_warnings.enabled", false);
// Enable mozContacts
user_pref("dom.mozContacts.enabled", true);
user_pref("dom.navigator-property.disable.mozContacts", false);
user_pref("dom.global-constructor.disable.mozContact", false);
// Enable mozSettings
user_pref("dom.mozSettings.enabled", true);

View File

@ -66,7 +66,7 @@ let wantVerbose =
Services.prefs.getPrefType(VERBOSE_PREF) !== Services.prefs.PREF_INVALID &&
Services.prefs.getBoolPref(VERBOSE_PREF);
let noop = () => {};
const noop = () => {};
function dumpn(str) {
if (wantLogging) {
@ -901,7 +901,8 @@ DebuggerClient.prototype = {
// Packets that indicate thread state changes get special treatment.
if (aPacket.type in ThreadStateTypes &&
this._clients.has(aPacket.from)) {
this._clients.has(aPacket.from) &&
typeof this._clients.get(aPacket.from)._onThreadState == "function") {
this._clients.get(aPacket.from)._onThreadState(aPacket);
}
// On navigation the server resumes, so the client must resume as well.
@ -2683,11 +2684,3 @@ this.debuggerSocketConnect = function (aHost, aPort)
}
return transport;
}
/**
* Takes a pair of items and returns them as an array.
*/
function pair(aItemOne, aItemTwo) {
return [aItemOne, aItemTwo];
}
function noop() {}

View File

@ -1,64 +0,0 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set sw=2 ts=8 et ft=cpp : */
/* Copyright 2012 Mozilla Foundation and Mozilla contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "Framebuffer.h"
#include "android/log.h"
#include <fcntl.h>
#include <linux/fb.h>
#include <sys/ioctl.h>
#include "nsSize.h"
#include "mozilla/FileUtils.h"
#define LOG(args...) __android_log_print(ANDROID_LOG_INFO, "Gonk" , ## args)
using namespace std;
namespace mozilla {
namespace Framebuffer {
static size_t sMappedSize;
static struct fb_var_screeninfo sVi;
static gfxIntSize *sScreenSize = nullptr;
bool
GetSize(nsIntSize *aScreenSize) {
// If the framebuffer has been opened, we should always have the size.
if (sScreenSize) {
*aScreenSize = *sScreenSize;
return true;
}
ScopedClose fd(open("/dev/graphics/fb0", O_RDWR));
if (0 > fd.get()) {
LOG("Error opening framebuffer device");
return false;
}
if (0 > ioctl(fd.get(), FBIOGET_VSCREENINFO, &sVi)) {
LOG("Error getting variable screeninfo");
return false;
}
sScreenSize = new gfxIntSize(sVi.xres, sVi.yres);
*aScreenSize = *sScreenSize;
return true;
}
} // namespace Framebuffer
} // namespace mozilla

View File

@ -1,28 +0,0 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set sw=2 ts=8 et ft=cpp : */
/* Copyright 2012 Mozilla Foundation and Mozilla contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
class nsIntSize;
namespace mozilla {
namespace Framebuffer {
// Return true if the fbdev was successfully opened or the size was
// already cached.
bool GetSize(nsIntSize *aScreenSize);
} // namespace Framebuffer
} // namespace mozilla

View File

@ -18,7 +18,6 @@
#include <string.h>
#include "libdisplay/GonkDisplay.h"
#include "Framebuffer.h"
#include "HwcUtils.h"
#include "HwcComposer2D.h"
#include "LayerScope.h"
@ -98,8 +97,10 @@ HwcComposer2D::Init(hwc_display_t dpy, hwc_surface_t sur, gl::GLContext* aGLCont
nsIntSize screenSize;
mozilla::Framebuffer::GetSize(&screenSize);
mScreenRect = nsIntRect(nsIntPoint(0, 0), screenSize);
ANativeWindow *win = GetGonkDisplay()->GetNativeWindow();
win->query(win, NATIVE_WINDOW_WIDTH, &screenSize.width);
win->query(win, NATIVE_WINDOW_HEIGHT, &screenSize.height);
mScreenRect = nsIntRect(nsIntPoint(0, 0), screenSize);
#if ANDROID_VERSION >= 17
int supported = 0;

View File

@ -44,7 +44,6 @@ SOURCES += ['libui/' + src for src in [
]]
SOURCES += [
'Framebuffer.cpp',
'GfxInfo.cpp',
'GonkMemoryPressureMonitoring.cpp',
'GonkPermission.cpp',

View File

@ -25,7 +25,6 @@
#include "mozilla/Services.h"
#include "mozilla/FileUtils.h"
#include "mozilla/ClearOnShutdown.h"
#include "Framebuffer.h"
#include "gfxContext.h"
#include "gfxPlatform.h"
#include "gfxUtils.h"
@ -126,43 +125,47 @@ displayEnabledCallback(bool enabled)
nsWindow::nsWindow()
{
if (!sScreenInitialized) {
sScreenOnEvent = new ScreenOnOffEvent(true);
ClearOnShutdown(&sScreenOnEvent);
sScreenOffEvent = new ScreenOnOffEvent(false);
ClearOnShutdown(&sScreenOffEvent);
GetGonkDisplay()->OnEnabled(displayEnabledCallback);
if (sScreenInitialized)
return;
nsIntSize screenSize;
bool gotFB = Framebuffer::GetSize(&screenSize);
if (!gotFB) {
NS_RUNTIMEABORT("Failed to get size from framebuffer, aborting...");
}
gScreenBounds = nsIntRect(nsIntPoint(0, 0), screenSize);
sScreenOnEvent = new ScreenOnOffEvent(true);
ClearOnShutdown(&sScreenOnEvent);
sScreenOffEvent = new ScreenOnOffEvent(false);
ClearOnShutdown(&sScreenOffEvent);
GetGonkDisplay()->OnEnabled(displayEnabledCallback);
char propValue[PROPERTY_VALUE_MAX];
property_get("ro.sf.hwrotation", propValue, "0");
sPhysicalScreenRotation = atoi(propValue) / 90;
nsIntSize screenSize;
sVirtualBounds = gScreenBounds;
ANativeWindow *win = GetGonkDisplay()->GetNativeWindow();
sScreenInitialized = true;
nsAppShell::NotifyScreenInitialized();
// This is a hack to force initialization of the compositor
// resources, if we're going to use omtc.
//
// NB: GetPlatform() will create the gfxPlatform, which wants
// to know the color depth, which asks our native window.
// This has to happen after other init has finished.
gfxPlatform::GetPlatform();
if (!ShouldUseOffMainThreadCompositing()) {
MOZ_CRASH("How can we render apps, then?");
}
//Update sUsingHwc whenever layers.composer2d.enabled changes
Preferences::AddBoolVarCache(&sUsingHwc, "layers.composer2d.enabled");
if (win->query(win, NATIVE_WINDOW_WIDTH, &screenSize.width) ||
win->query(win, NATIVE_WINDOW_HEIGHT, &screenSize.height)) {
NS_RUNTIMEABORT("Failed to get native window size, aborting...");
}
gScreenBounds = nsIntRect(nsIntPoint(0, 0), screenSize);
char propValue[PROPERTY_VALUE_MAX];
property_get("ro.sf.hwrotation", propValue, "0");
sPhysicalScreenRotation = atoi(propValue) / 90;
sVirtualBounds = gScreenBounds;
sScreenInitialized = true;
nsAppShell::NotifyScreenInitialized();
// This is a hack to force initialization of the compositor
// resources, if we're going to use omtc.
//
// NB: GetPlatform() will create the gfxPlatform, which wants
// to know the color depth, which asks our native window.
// This has to happen after other init has finished.
gfxPlatform::GetPlatform();
if (!ShouldUseOffMainThreadCompositing()) {
MOZ_CRASH("How can we render apps, then?");
}
// Update sUsingHwc whenever layers.composer2d.enabled changes
Preferences::AddBoolVarCache(&sUsingHwc, "layers.composer2d.enabled");
}
nsWindow::~nsWindow()