This commit is contained in:
Wes Kocher 2015-01-28 18:36:42 -08:00
Родитель 091ae96190 1adc493a26
Коммит a4cef467eb
33 изменённых файлов: 276 добавлений и 136 удалений

Просмотреть файл

@ -25,11 +25,11 @@ let gDataNotificationInfoBar = {
},
init: function() {
window.addEventListener("unload", function onUnload() {
window.addEventListener("unload", () => {
for (let o of this._OBSERVERS) {
Services.obs.removeObserver(this, o);
}
}.bind(this), false);
}, false);
for (let o of this._OBSERVERS) {
Services.obs.addObserver(this, o, true);
@ -59,10 +59,10 @@ let gDataNotificationInfoBar = {
label: gNavigatorBundle.getString("dataReportingNotification.button.label"),
accessKey: gNavigatorBundle.getString("dataReportingNotification.button.accessKey"),
popup: null,
callback: function () {
callback: () => {
this._actionTaken = true;
window.openAdvancedPreferences("dataChoicesTab");
}.bind(this),
},
}];
this._log.info("Creating data reporting policy notification.");
@ -72,11 +72,11 @@ let gDataNotificationInfoBar = {
null,
this._notificationBox.PRIORITY_INFO_HIGH,
buttons,
function onEvent(event) {
event => {
if (event == "removed") {
Services.obs.notifyObservers(null, "datareporting:notify-data-policy:close", null);
}
}.bind(this)
}
);
// It is important to defer calling onUserNotifyComplete() until we're
// actually sure the notification was displayed. If we ever called

Просмотреть файл

@ -67,6 +67,7 @@ loop.panel = (function(_, mozL10n) {
React.createElement("li", {className: cx({selected: isSelected}),
key: i,
"data-tab-name": tabName,
title: mozL10n.get(tabName + "_tab_button_tooltip"),
onClick: this.handleSelectTab})
);
}

Просмотреть файл

@ -67,6 +67,7 @@ loop.panel = (function(_, mozL10n) {
<li className={cx({selected: isSelected})}
key={i}
data-tab-name={tabName}
title={mozL10n.get(tabName + "_tab_button_tooltip")}
onClick={this.handleSelectTab} />
);
}

Просмотреть файл

@ -615,7 +615,7 @@ let SessionStoreInternal = {
let tab = win.gBrowser.getTabForBrowser(browser);
// Ensure we receive only specific messages from <xul:browser>s that
// have no tab assigned, e.g. the ones that preload aobut:newtab pages.
// have no tab assigned, e.g. the ones that preload about:newtab pages.
if (!tab && !FMM_NOTAB_MESSAGES.has(aMessage.name)) {
throw new Error(`received unexpected message '${aMessage.name}' ` +
`from a browser that has no tab`);
@ -688,10 +688,7 @@ let SessionStoreInternal = {
Services.obs.notifyObservers(browser, NOTIFY_TAB_RESTORED, null);
}
let tab = browser.__SS_restore_tab;
delete browser.__SS_restore_data;
delete browser.__SS_restore_tab;
delete browser.__SS_data;
SessionStoreInternal._resetLocalTabRestoringState(tab);
@ -702,7 +699,7 @@ let SessionStoreInternal = {
break;
case "SessionStore:reloadPendingTab":
if (this.isCurrentEpoch(browser, aMessage.data.epoch)) {
if (tab && browser.__SS_restoreState == TAB_STATE_NEEDS_RESTORE) {
if (browser.__SS_restoreState == TAB_STATE_NEEDS_RESTORE) {
this.restoreTabContent(tab);
}
}
@ -2729,8 +2726,6 @@ let SessionStoreInternal = {
browser.__SS_restore_data = {};
}
browser.__SS_restore_tab = aTab;
browser.messageManager.sendAsyncMessage("SessionStore:restoreTabContent",
{loadArguments: aLoadArguments});
},

Просмотреть файл

@ -70,7 +70,8 @@ const EVENTS = {
};
const HTML_NS = "http://www.w3.org/1999/xhtml";
const STRINGS_URI = "chrome://browser/locale/devtools/canvasdebugger.properties"
const STRINGS_URI = "chrome://browser/locale/devtools/canvasdebugger.properties";
const SHARED_STRINGS_URI = "chrome://browser/locale/devtools/shared.properties";
const SNAPSHOT_START_RECORDING_DELAY = 10; // ms
const SNAPSHOT_DATA_EXPORT_MAX_BLOCK = 1000; // ms
@ -701,7 +702,8 @@ let CallsListView = Heritage.extend(WidgetMethods, {
let dimensionsNode = $("#screenshot-dimensions");
let actualWidth = (width / scaling) | 0;
let actualHeight = (height / scaling) | 0;
dimensionsNode.setAttribute("value", actualWidth + " \u00D7 " + actualHeight);
dimensionsNode.setAttribute("value",
SHARED_L10N.getFormatStr("dimensions", actualWidth, actualHeight));
window.emit(EVENTS.CALL_SCREENSHOT_DISPLAYED);
},
@ -1050,6 +1052,7 @@ let CallsListView = Heritage.extend(WidgetMethods, {
* Localization convenience methods.
*/
let L10N = new ViewHelpers.L10N(STRINGS_URI);
let SHARED_L10N = new ViewHelpers.L10N(SHARED_STRINGS_URI);
/**
* Convenient way of emitting events from the panel window.

Просмотреть файл

@ -20,7 +20,7 @@ function ifTestingSupported() {
is($("#screenshot-container").hidden, false,
"The screenshot container should now be visible.");
is($("#screenshot-dimensions").getAttribute("value"), "128" + " \u00D7 " + "128",
is($("#screenshot-dimensions").getAttribute("value"), "128" + "\u00D7" + "128",
"The screenshot dimensions label has the expected value.");
is($("#screenshot-image").getAttribute("flipped"), "false",

Просмотреть файл

@ -14,12 +14,14 @@ Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/Task.jsm");
Cu.import("resource://gre/modules/devtools/Loader.jsm");
Cu.import("resource://gre/modules/devtools/Console.jsm");
Cu.import("resource:///modules/devtools/ViewHelpers.jsm");
const {Promise: promise} = Cu.import("resource://gre/modules/Promise.jsm", {});
const {InplaceEditor, editableItem} = devtools.require("devtools/shared/inplace-editor");
const {parseDeclarations} = devtools.require("devtools/styleinspector/css-parsing-utils");
const {ReflowFront} = devtools.require("devtools/server/actors/layout");
const SHARED_L10N = new ViewHelpers.L10N("chrome://browser/locale/devtools/shared.properties");
const NUMERIC = /^-?[\d\.]+$/;
const LONG_TEXT_ROTATE_LIMIT = 3;
@ -401,7 +403,8 @@ LayoutView.prototype = {
this._lastRequest = null;
let width = layout.width;
let height = layout.height;
let newLabel = width + "\u00D7" + height;
let newLabel = SHARED_L10N.getFormatStr("dimensions", width, height);
if (this.sizeHeadingLabel.textContent != newLabel) {
this.sizeHeadingLabel.textContent = newLabel;
}

Просмотреть файл

@ -11,6 +11,7 @@ Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource:///modules/devtools/gDevTools.jsm");
Cu.import("resource://gre/modules/devtools/event-emitter.js");
Cu.import("resource:///modules/devtools/ViewHelpers.jsm");
let { Promise: promise } = Cu.import("resource://gre/modules/Promise.jsm", {});
XPCOMUtils.defineLazyModuleGetter(this, "SystemAppProxy",
"resource://gre/modules/SystemAppProxy.jsm");
@ -33,6 +34,8 @@ const ROUND_RATIO = 10;
const INPUT_PARSER = /(\d+)[^\d]+(\d+)/;
const SHARED_L10N = new ViewHelpers.L10N("chrome://browser/locale/devtools/shared.properties");
let ActiveTabs = new Map();
this.ResponsiveUIManager = {
@ -604,7 +607,8 @@ ResponsiveUI.prototype = {
* @param aPreset associated preset.
*/
setMenuLabel: function RUI_setMenuLabel(aMenuitem, aPreset) {
let size = Math.round(aPreset.width) + "\u00D7" + Math.round(aPreset.height);
let size = SHARED_L10N.getFormatStr("dimensions",
Math.round(aPreset.width), Math.round(aPreset.height));
// .inputField might be not reachable yet (async XBL loading)
if (this.menulist.inputField) {

Просмотреть файл

@ -24,9 +24,11 @@ support-files =
[browser_audionode-actor-bypass.js]
[browser_audionode-actor-connectnode-disconnect.js]
[browser_audionode-actor-connectparam.js]
skip-if = true # bug 1092571
[browser_audionode-actor-add-automation-event.js]
[browser_audionode-actor-get-automation-data-01.js]
[browser_audionode-actor-get-automation-data-02.js]
[browser_audionode-actor-get-automation-data-03.js]
[browser_webaudio-actor-simple.js]
[browser_webaudio-actor-destroy-node.js]
[browser_webaudio-actor-connect-param.js]
@ -49,6 +51,7 @@ support-files =
[browser_wa_graph-render-03.js]
[browser_wa_graph-render-04.js]
[browser_wa_graph-render-05.js]
skip-if = true # bug 1092571
[browser_wa_graph-selected.js]
[browser_wa_graph-zoom.js]

Просмотреть файл

@ -0,0 +1,34 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
/**
* Test that `cancelScheduledEvents` clears out events on and after
* its argument.
*/
add_task(function*() {
let { target, front } = yield initBackend(SIMPLE_CONTEXT_URL);
let [_, [destNode, oscNode, gainNode]] = yield Promise.all([
front.setup({ reload: true }),
get3(front, "create-node")
]);
yield oscNode.addAutomationEvent("frequency", "setValueAtTime", [300, 0]);
yield oscNode.addAutomationEvent("frequency", "linearRampToValueAtTime", [500, 0.9]);
yield oscNode.addAutomationEvent("frequency", "setValueAtTime", [700, 1]);
yield oscNode.addAutomationEvent("frequency", "exponentialRampToValueAtTime", [1000, 2]);
yield oscNode.addAutomationEvent("frequency", "cancelScheduledValues", [1]);
var { events, values } = yield oscNode.getAutomationData("frequency");
is(events.length, 2, "2 recorded events returned.");
is(values.length, 2000, "2000 value points returned");
checkAutomationValue(values, 0, 300);
checkAutomationValue(values, 0.5, 411.15);
checkAutomationValue(values, 0.9, 499.9);
checkAutomationValue(values, 1, 499.9);
checkAutomationValue(values, 2, 499.9);
yield removeTab(target.tab);
});

Просмотреть файл

@ -10,11 +10,16 @@ const {Connection} = require("devtools/client/connection-manager");
const {RuntimeTypes} = require("devtools/webide/runtimes");
const Strings = Services.strings.createBundle("chrome://browser/locale/devtools/webide.properties");
const UNRESTRICTED_HELP_URL = "https://developer.mozilla.org/docs/Tools/WebIDE#Unrestricted_app_debugging_%28including_certified_apps.2C_main_process.2C_etc.%29";
window.addEventListener("load", function onLoad() {
window.removeEventListener("load", onLoad);
document.querySelector("#close").onclick = CloseUI;
document.querySelector("#certified-check button").onclick = EnableCertApps;
document.querySelector("#devtools-check button").onclick = EnableCertApps;
document.querySelector("#adb-check button").onclick = RootADB;
document.querySelector("#unrestricted-privileges").onclick = function() {
window.parent.UI.openInBrowser(UNRESTRICTED_HELP_URL);
};
AppManager.on("app-manager-update", OnAppManagerUpdate);
BuildUI();
CheckLockState();
@ -63,10 +68,10 @@ function BuildUI() {
function CheckLockState() {
let adbCheckResult = document.querySelector("#adb-check > .yesno");
let certCheckResult = document.querySelector("#certified-check > .yesno");
let flipCertPerfButton = document.querySelector("#certified-check button");
let devtoolsCheckResult = document.querySelector("#devtools-check > .yesno");
let flipCertPerfButton = document.querySelector("#devtools-check button");
let adbRootButton = document.querySelector("#adb-check button");
let flipCertPerfAction = document.querySelector("#certified-check > .action");
let flipCertPerfAction = document.querySelector("#devtools-check > .action");
let adbRootAction = document.querySelector("#adb-check > .action");
let sYes = Strings.GetStringFromName("runtimedetails_checkyes");
@ -79,7 +84,7 @@ function CheckLockState() {
adbRootAction.setAttribute("hidden", "true");
adbCheckResult.textContent = sUnknown;
certCheckResult.textContent = sUnknown;
devtoolsCheckResult.textContent = sUnknown;
if (AppManager.connection &&
AppManager.connection.status == Connection.Status.CONNECTED) {
@ -109,15 +114,15 @@ function CheckLockState() {
let prefFront = AppManager.preferenceFront;
prefFront.getBoolPref("devtools.debugger.forbid-certified-apps").then(isForbidden => {
if (isForbidden) {
certCheckResult.textContent = sYes;
devtoolsCheckResult.textContent = sNo;
flipCertPerfAction.removeAttribute("hidden");
} else {
certCheckResult.textContent = sNo;
devtoolsCheckResult.textContent = sYes;
}
}, e => console.error(e));
} catch(e) {
// Exception. pref actor is only accessible if forbird-certified-apps is false
certCheckResult.textContent = sYes;
devtoolsCheckResult.textContent = sYes;
flipCertPerfAction.removeAttribute("hidden");
}

Просмотреть файл

@ -32,8 +32,8 @@
<em>&runtimedetails_ADBRootWarning;</em>
</div>
</p>
<p id="certified-check">
&runtimedetails_restrictedPrivileges;<span class="yesno"></span>
<p id="devtools-check">
<a id="unrestricted-privileges">&runtimedetails_unrestrictedPrivileges;</a><span class="yesno"></span>
<div class="action">
<button>&runtimedetails_requestPrivileges;</button>
<em>&runtimedetails_privilegesWarning;</em>

Просмотреть файл

@ -11,6 +11,11 @@ html, body {
padding-left: 6px;
}
#devtools-check > a {
color: #4C9ED9;
cursor: pointer;
}
.action {
display: inline;
}

Просмотреть файл

@ -0,0 +1,7 @@
# 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/.
# LOCALIZATION NOTE (dimensions): This is used to display the dimensions
# of a node or image, like 100×200.
dimensions=%S\u00D7%S

Просмотреть файл

@ -145,7 +145,7 @@
<!ENTITY runtimedetails_adbIsRoot "ADB is root: ">
<!ENTITY runtimedetails_summonADBRoot "root device">
<!ENTITY runtimedetails_ADBRootWarning "(requires unlocked bootloader)">
<!ENTITY runtimedetails_restrictedPrivileges "DevTools restricted privileges: ">
<!ENTITY runtimedetails_unrestrictedPrivileges "Unrestricted DevTools privileges: ">
<!ENTITY runtimedetails_requestPrivileges "request higher privileges">
<!ENTITY runtimedetails_privilegesWarning "(Will reboot device. Requires root access.)">

Просмотреть файл

@ -8,6 +8,9 @@
## should remain "Firefox Hello" for all locales.
clientShortname2=Firefox Hello
rooms_tab_button_tooltip=Conversations
contacts_tab_button_tooltip=Contacts
## LOCALIZATION_NOTE(first_time_experience.title): clientShortname will be
## replaced by the brand name
first_time_experience_title={{clientShortname}} — Join the conversation

Просмотреть файл

@ -45,6 +45,7 @@
locale/browser/devtools/webconsole.properties (%chrome/browser/devtools/webconsole.properties)
locale/browser/devtools/inspector.properties (%chrome/browser/devtools/inspector.properties)
locale/browser/devtools/tilt.properties (%chrome/browser/devtools/tilt.properties)
locale/browser/devtools/shared.properties (%chrome/browser/devtools/shared.properties)
locale/browser/devtools/scratchpad.properties (%chrome/browser/devtools/scratchpad.properties)
locale/browser/devtools/scratchpad.dtd (%chrome/browser/devtools/scratchpad.dtd)
locale/browser/devtools/storage.properties (%chrome/browser/devtools/storage.properties)

Просмотреть файл

@ -7,10 +7,11 @@
:root {
--tab-toolbar-navbar-overlap: 1px;
--tab-min-height: 31px;
--tab-curve-width: 30px;
--tab-curve-half-width: 15px;
}
%define tabCurveWidth 30px
%define tabCurveHalfWidth 15px
/* image preloading hack */
#tabbrowser-tabs::before {
/* Because of bug 853415, we need to ordinal this to the first position: */
@ -54,12 +55,9 @@
.tab-background-middle {
-moz-box-flex: 1;
background-clip: padding-box;
border-left: var(--tab-curve-half-width) solid transparent;
border-right: var(--tab-curve-half-width) solid transparent;
/* XXX: Switch to `margin: 0 calc(-1 * var(--tab-curve-half-width))` after bug 1099448 */
margin: 0;
-moz-margin-start: calc(-1 * var(--tab-curve-half-width));
-moz-margin-end: calc(-1 * var(--tab-curve-half-width));
border-left: @tabCurveHalfWidth@ solid transparent;
border-right: @tabCurveHalfWidth@ solid transparent;
margin: 0 -@tabCurveHalfWidth@;
}
.tab-content {
@ -110,13 +108,13 @@
.tab-background,
.tabs-newtab-button {
/* overlap the tab curves */
-moz-margin-end: calc(-1 * var(--tab-curve-half-width));
-moz-margin-start: calc(-1 * var(--tab-curve-half-width));
-moz-margin-end: -@tabCurveHalfWidth@;
-moz-margin-start: -@tabCurveHalfWidth@;
}
.tabbrowser-arrowscrollbox > .arrowscrollbox-scrollbox {
-moz-padding-end: var(--tab-curve-half-width);
-moz-padding-start: var(--tab-curve-half-width);
-moz-padding-end: @tabCurveHalfWidth@;
-moz-padding-start: @tabCurveHalfWidth@;
}
/* Tab Overflow */
@ -163,7 +161,7 @@
.tab-background-end[selected=true]::after,
.tab-background-end[selected=true]::before {
min-height: var(--tab-min-height);
width: var(--tab-curve-width);
width: @tabCurveWidth@;
}
.tabbrowser-tab:not([selected=true]),
@ -185,7 +183,7 @@
.tab-background-start[selected=true]::after,
.tab-background-end[selected=true]::after {
/* position ::after on top of its parent */
-moz-margin-start: calc(-1 * var(--tab-curve-width));
-moz-margin-start: -@tabCurveWidth@;
background-size: 100% 100%;
content: "";
display: -moz-box;
@ -276,9 +274,9 @@
background-image: url(chrome://browser/skin/tabbrowser/tab-background-start.png),
url(chrome://browser/skin/tabbrowser/tab-background-middle.png),
url(chrome://browser/skin/tabbrowser/tab-background-end.png);
background-position: left bottom, var(--tab-curve-width) bottom, right bottom;
background-position: left bottom, @tabCurveWidth@ bottom, right bottom;
background-repeat: no-repeat;
background-size: var(--tab-curve-width) 100%, calc(100% - (2 * var(--tab-curve-width))) 100%, var(--tab-curve-width) 100%;
background-size: @tabCurveWidth@ 100%, calc(100% - (2 * @tabCurveWidth@)) 100%, @tabCurveWidth@ 100%;
}
/* Tab pointer-events */
@ -334,5 +332,5 @@
/* New tab button */
.tabs-newtab-button {
width: calc(36px + var(--tab-curve-width));
width: calc(36px + @tabCurveWidth@);
}

Просмотреть файл

@ -428,6 +428,8 @@
<provider android:name="org.mozilla.gecko.db.ReadingListProvider"
android:authorities="@ANDROID_PACKAGE_NAME@.db.readinglist"
android:exported="false"
android:label="@string/reading_list_title"
android:permission="@ANDROID_PACKAGE_NAME@.permissions.BROWSER_PROVIDER"/>
<provider android:name="org.mozilla.gecko.db.SearchHistoryProvider"

Просмотреть файл

@ -1,29 +0,0 @@
// Configure shared Android settings. This should be run (using "apply from")
// immediately after applying the Android plugin. Be aware that IntelliJ does
// not parse these values correctly: the Android-Gradle facet panel manually
// parses build.gradle rather than interrogating the Gradle model.
android {
compileSdkVersion "android-${mozconfig.defines.ANDROID_TARGET_SDK}"
// Turn "android-sdk/build-tools/21.1.1" into "21.1.1".
buildToolsVersion (new File(mozconfig.substs.ANDROID_BUILD_TOOLS).getName())
defaultConfig {
targetSdkVersion mozconfig.defines.ANDROID_TARGET_SDK
minSdkVersion mozconfig.defines.MOZ_ANDROID_MIN_SDK_VERSION
if (mozconfig.defines.MOZ_ANDROID_MAX_SDK_VERSION) {
maxSdkVersion mozconfig.defines.MOZ_ANDROID_MAX_SDK_VERSION
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
android {
lintOptions {
abortOnError false
}
}
}

Просмотреть файл

@ -1,8 +1,28 @@
apply plugin: 'com.android.application'
apply from: rootProject.file("${topsrcdir}/mobile/android/gradle/android.gradle")
android {
compileSdkVersion 21
buildToolsVersion "21.1.1"
defaultConfig {
targetSdkVersion 21
minSdkVersion 9
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
dexOptions {
incremental true
preDexLibraries true
}
lintOptions {
abortOnError false
}
buildTypes {
release {
minifyEnabled true
@ -10,6 +30,11 @@ android {
}
}
defaultConfig {
testApplicationId 'org.mozilla.roboexample.test'
testInstrumentationRunner 'org.mozilla.gecko.FennecInstrumentationTestRunner'
}
sourceSets {
androidTest {
java {

Просмотреть файл

@ -1,8 +1,27 @@
apply plugin: 'com.android.library'
apply from: "${topsrcdir}/mobile/android/gradle/android.gradle"
android {
compileSdkVersion 21
buildToolsVersion "21.1.1"
defaultConfig {
targetSdkVersion 21
minSdkVersion 9
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
dexOptions {
incremental true
}
lintOptions {
abortOnError false
}
buildTypes {
release {
minifyEnabled false
@ -31,12 +50,13 @@ android {
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:support-v4:19.1.+'
compile 'com.android.support:support-v4:21.+'
if (mozconfig.substs.MOZ_NATIVE_DEVICES) {
compile 'com.android.support:appcompat-v7:19.1.+'
compile 'com.android.support:mediarouter-v7:19.1.+'
compile 'com.google.android.gms:play-services:5.+'
compile 'com.android.support:appcompat-v7:21.+'
compile 'com.android.support:mediarouter-v7:21.+'
compile 'com.google.android.gms:play-services-base:6.5.+'
compile 'com.google.android.gms:play-services-cast:6.5.+'
}
compile project(':branding')
@ -53,9 +73,7 @@ apply plugin: 'idea'
idea {
module {
// excludeDirs = []
excludeDirs += file('src/main/java/org/mozilla/gecko/tests')
excludeDirs += file('org/mozilla/gecko/resources')
excludeDirs += file('org/mozilla/gecko/tests')
excludeDirs += file('tests')
}
}

Просмотреть файл

@ -1,12 +1,24 @@
apply plugin: 'com.android.library'
apply from: "${topsrcdir}/mobile/android/gradle/android.gradle"
android {
buildTypes {
release {
minifyEnabled false
proguardFile getDefaultProguardFile('proguard-android.txt')
}
compileSdkVersion 21
buildToolsVersion "21.1.1"
defaultConfig {
targetSdkVersion 21
minSdkVersion 9
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
dexOptions {
incremental true
}
lintOptions {
abortOnError false
}
}

Просмотреть файл

@ -33,5 +33,15 @@ subprojects {
commandLine "${topsrcdir}/mach"
args 'build'
args 'mobile/android/base/gradle-targets'
// Only show the output if something went wrong.
ignoreExitValue = true
standardOutput = new ByteArrayOutputStream()
errorOutput = standardOutput
doLast {
if (execResult.exitValue != 0) {
throw new GradleException("Process '${commandLine}' finished with non-zero exit value ${execResult.exitValue}:\n\n${standardOutput.toString()}")
}
}
}
}

Просмотреть файл

@ -23,6 +23,16 @@ task buildOmnijar(type:Exec) {
args '-C'
args 'mobile/android/base'
args 'gradle-omnijar'
// Only show the output if something went wrong.
ignoreExitValue = true
standardOutput = new ByteArrayOutputStream()
errorOutput = standardOutput
doLast {
if (execResult.exitValue != 0) {
throw new GradleException("Process '${commandLine}' finished with non-zero exit value ${execResult.exitValue}:\n\n${standardOutput.toString()}")
}
}
}
apply plugin: 'idea'

Просмотреть файл

@ -1,13 +1,25 @@
apply plugin: 'android-library'
apply from: "${topsrcdir}/mobile/android/gradle/android.gradle"
android {
buildTypes {
release {
minifyEnabled false
proguardFile getDefaultProguardFile('proguard-android.txt')
}
compileSdkVersion 21
buildToolsVersion "21.1.1"
defaultConfig {
targetSdkVersion 21
minSdkVersion 9
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
dexOptions {
incremental true
}
lintOptions {
abortOnError false
}
}

Просмотреть файл

@ -1,13 +1,25 @@
apply plugin: 'com.android.library'
apply from: "${topsrcdir}/mobile/android/gradle/android.gradle"
android {
buildTypes {
release {
minifyEnabled false
proguardFile getDefaultProguardFile('proguard-android.txt')
}
compileSdkVersion 21
buildToolsVersion "21.1.1"
defaultConfig {
targetSdkVersion 21
minSdkVersion 9
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
dexOptions {
incremental true
}
lintOptions {
abortOnError false
}
}

Просмотреть файл

@ -8,20 +8,20 @@ if (!hasProperty('topsrcdir')) {
logger.warn("topsrcdir is undefined: assuming source directory Gradle invocation with topsrcdir=${topsrcdir}.")
}
def command = ["${topsrcdir}/mach", "environment", "--format", "json", "--verbose"]
def proc = command.execute(null, new File(topsrcdir))
def sout = new StringBuffer()
def serr = new StringBuffer()
proc.consumeProcessOutput(sout, serr)
def commandLine = ["${topsrcdir}/mach", "environment", "--format", "json", "--verbose"]
def proc = commandLine.execute(null, new File(topsrcdir))
def standardOutput = new ByteArrayOutputStream()
proc.consumeProcessOutput(standardOutput, standardOutput)
proc.waitFor()
// Only show the output if something went wrong.
if (proc.exitValue() != 0) {
throw new GradleException("Could not extract mozconfig/build environment from |${topsrcdir}/mach environment|!");
throw new GradleException("Process '${commandLine}' finished with non-zero exit value ${proc.exitValue()}:\n\n${standardOutput.toString()}")
}
import groovy.json.JsonSlurper
def slurper = new JsonSlurper()
def json = slurper.parseText(sout.toString())
def json = slurper.parseText(standardOutput.toString())
include ':app'
include ':base'

28
mobile/android/gradle/thirdparty/build.gradle поставляемый
Просмотреть файл

@ -1,17 +1,29 @@
apply plugin: 'com.android.library'
apply from: "${topsrcdir}/mobile/android/gradle/android.gradle"
android {
buildTypes {
release {
minifyEnabled false
proguardFile getDefaultProguardFile('proguard-android.txt')
}
compileSdkVersion 21
buildToolsVersion "21.1.1"
defaultConfig {
targetSdkVersion 21
minSdkVersion 9
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
dexOptions {
incremental true
}
lintOptions {
abortOnError false
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:support-v4:19.1.+'
compile 'com.android.support:support-v4:21.+'
}

Просмотреть файл

@ -112,6 +112,8 @@ class MachCommands(MachCommandBase):
srcdir('app/build.gradle', 'mobile/android/gradle/app/build.gradle')
objdir('app/src/main/AndroidManifest.xml', 'mobile/android/base/AndroidManifest.xml')
srcdir('app/src/androidTest/res', 'build/mobile/robocop/res')
srcdir('app/src/androidTest/assets', 'mobile/android/base/tests/assets')
objdir('app/src/debug/assets', 'dist/fennec/assets')
objdir('app/src/debug/jniLibs', 'dist/fennec/lib')
# Test code.

Просмотреть файл

@ -251,7 +251,6 @@ let TimelineActor = exports.TimelineActor = protocol.ActorClass({
if (withMemory) {
this._memoryActor = new MemoryActor(this.conn, this.tabActor, this._stackFrames);
events.emit(this, "memory", this._startTime, this._memoryActor.measure());
}
if (withTicks) {

Просмотреть файл

@ -35,7 +35,7 @@ const NODE_CREATION_METHODS = [
const AUTOMATION_METHODS = [
"setValueAtTime", "linearRampToValueAtTime", "exponentialRampToValueAtTime",
"setTargetAtTime", "setValueCurveAtTime"
"setTargetAtTime", "setValueCurveAtTime", "cancelScheduledValues"
];
const NODE_ROUTING_METHODS = [

Просмотреть файл

@ -9,7 +9,6 @@ this.EXPORTED_SYMBOLS = ["FormData"];
const Cu = Components.utils;
const Ci = Components.interfaces;
Cu.import("resource://gre/modules/Timer.jsm");
Cu.import("resource://gre/modules/XPathGenerator.jsm");
/**
@ -262,17 +261,10 @@ let FormDataInternal = {
}
if ("innerHTML" in data) {
// We know that the URL matches data.url right now, but the user
// may navigate away before the setTimeout handler runs. We do
// a simple comparison against savedURL to check for that.
let savedURL = doc.documentURI;
setTimeout(() => {
if (doc.body && doc.designMode == "on" && doc.documentURI == savedURL) {
doc.body.innerHTML = data.innerHTML;
this.fireEvent(doc.body, "input");
}
});
if (doc.body && doc.designMode == "on") {
doc.body.innerHTML = data.innerHTML;
this.fireEvent(doc.body, "input");
}
}
},