Merge m-c to inbound. a=merge

CLOSED TREE
This commit is contained in:
Ryan VanderMeulen 2015-07-30 11:56:41 -04:00
commit bbe2cb322a
31 changed files with 197 additions and 537 deletions

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="e862ab9177af664f00b4522e2350f4cb13866d73">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="bf8565e0c3ad216ccb3f109c17f8a2eb2c42f6b8"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="1d3595836bd55b70478923d771051268a5dabf91"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="9f45c1988fe72749f0659409e6e3320fabf7b79a"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="e862ab9177af664f00b4522e2350f4cb13866d73">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="bf8565e0c3ad216ccb3f109c17f8a2eb2c42f6b8"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="1d3595836bd55b70478923d771051268a5dabf91"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="9f45c1988fe72749f0659409e6e3320fabf7b79a"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>

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="bf8565e0c3ad216ccb3f109c17f8a2eb2c42f6b8"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="1d3595836bd55b70478923d771051268a5dabf91"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="9f45c1988fe72749f0659409e6e3320fabf7b79a"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="8bc59310552179f9a8bc6cdd0188e2475df52fb7"/>

View File

@ -17,7 +17,7 @@
</project>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="bf8565e0c3ad216ccb3f109c17f8a2eb2c42f6b8"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="1d3595836bd55b70478923d771051268a5dabf91"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="9f45c1988fe72749f0659409e6e3320fabf7b79a"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="657894b4a1dc0a926117f4812e0940229f9f676f"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="5bb657ada461be666c35f419dbe072ed2ce632fc"/>

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="e862ab9177af664f00b4522e2350f4cb13866d73">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="bf8565e0c3ad216ccb3f109c17f8a2eb2c42f6b8"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="1d3595836bd55b70478923d771051268a5dabf91"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="9f45c1988fe72749f0659409e6e3320fabf7b79a"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="07c383a786f188904311a37f6062c2cb84c9b61d">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="bf8565e0c3ad216ccb3f109c17f8a2eb2c42f6b8"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="1d3595836bd55b70478923d771051268a5dabf91"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="9f45c1988fe72749f0659409e6e3320fabf7b79a"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
@ -143,7 +143,7 @@
<project name="device/generic/armv7-a-neon" path="device/generic/armv7-a-neon" revision="fe7df1bc8dd0fd71571505d7be1c31a4ad1e40fb"/>
<project name="device_generic_goldfish" path="device/generic/goldfish" remote="b2g" revision="48132ec0b0dfe9fc29c7c3f0e799066be8999198"/>
<!-- external/qemu for emulator-l need to be updated in bug-1121378 -->
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="85f91439c854061bda3c6228d98381ea8867170c"/>
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="59e434cbecc02653f44cedeb2ef5cc88dc8bb61b"/>
<project name="platform_external_wpa_supplicant_8" path="external/wpa_supplicant_8" remote="b2g" revision="cbda29a58abc4ea1f7f4611fe354ab67b606219d"/>
<project name="platform/development" path="development" revision="0c51f6e0aa2ee57fcb75ec3b2ff6bf754cece63e"/>
<project name="android-sdk" path="sdk" remote="b2g" revision="ff4190dc603f62a7caa48342aa268acf99863c5c"/>

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="bf8565e0c3ad216ccb3f109c17f8a2eb2c42f6b8"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="1d3595836bd55b70478923d771051268a5dabf91"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="9f45c1988fe72749f0659409e6e3320fabf7b79a"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="8bc59310552179f9a8bc6cdd0188e2475df52fb7"/>

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="e862ab9177af664f00b4522e2350f4cb13866d73">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="bf8565e0c3ad216ccb3f109c17f8a2eb2c42f6b8"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="1d3595836bd55b70478923d771051268a5dabf91"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="9f45c1988fe72749f0659409e6e3320fabf7b79a"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>

View File

@ -1,9 +1,9 @@
{
"git": {
"git_revision": "bf8565e0c3ad216ccb3f109c17f8a2eb2c42f6b8",
"git_revision": "1d3595836bd55b70478923d771051268a5dabf91",
"remote": "https://git.mozilla.org/releases/gaia.git",
"branch": ""
},
"revision": "3b5be8b229de20ea6cdcd3089558bf631c184c58",
"revision": "552e56f79bba1e2f7cd392361dfb0a8552176be8",
"repo_path": "integration/gaia-central"
}

View File

@ -17,7 +17,7 @@
</project>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="bf8565e0c3ad216ccb3f109c17f8a2eb2c42f6b8"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="1d3595836bd55b70478923d771051268a5dabf91"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="9f45c1988fe72749f0659409e6e3320fabf7b79a"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="657894b4a1dc0a926117f4812e0940229f9f676f"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="5bb657ada461be666c35f419dbe072ed2ce632fc"/>

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="07c383a786f188904311a37f6062c2cb84c9b61d">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="bf8565e0c3ad216ccb3f109c17f8a2eb2c42f6b8"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="1d3595836bd55b70478923d771051268a5dabf91"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="9f45c1988fe72749f0659409e6e3320fabf7b79a"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>

View File

@ -7,13 +7,6 @@
"unpack": true
},
{
"size": 4079256,
"digest": "bb5238558bcf6db2ca395513c8dccaa15dd61b3c375598eb6a685356b0c1a2d9840e3bf81bc00242b872fd798541f53d723777c754412abf0e772b7cc284937c",
"algorithm": "sha512",
"filename": "gtk3.tar.xz",
"unpack": true
},
{
"size": 167175,
"digest": "0b71a936edf5bd70cf274aaa5d7abc8f77fe8e7b5593a208f805cc9436fac646b9c4f0b43c2b10de63ff3da671497d35536077ecbc72dba7f8159a38b580f831",
"algorithm": "sha512",

View File

@ -7,13 +7,6 @@
"unpack": true
},
{
"size": 4431740,
"digest": "68fc56b0fb0cdba629b95683d6649ff76b00dccf97af90960c3d7716f6108b2162ffd5ffcd5c3a60a21b28674df688fe4dabc67345e2da35ec5abeae3d48c8e3",
"algorithm": "sha512",
"filename": "gtk3.tar.xz",
"unpack": true
},
{
"size": 167175,
"digest": "0b71a936edf5bd70cf274aaa5d7abc8f77fe8e7b5593a208f805cc9436fac646b9c4f0b43c2b10de63ff3da671497d35536077ecbc72dba7f8159a38b580f831",
"algorithm": "sha512",

View File

@ -96,6 +96,10 @@ ContentSearchUIController.prototype = {
set engines(val) {
this._engines = val;
if (!this._table.hidden) {
this._setUpOneOffButtons();
return;
}
this._pendingOneOffRefresh = true;
},
@ -123,9 +127,6 @@ ContentSearchUIController.prototype = {
let allElts = [...this._suggestionsList.children,
...this._oneOffButtons,
document.getElementById("contentSearchSettingsButton")];
// If we are selecting a suggestion and a one-off is selected, don't deselect it.
let excludeIndex = idx < this.numSuggestions && this.selectedButtonIndex > -1 ?
this.numSuggestions + this.selectedButtonIndex : -1;
for (let i = 0; i < allElts.length; ++i) {
let elt = allElts[i];
let ariaSelectedElt = i < this.numSuggestions ? elt.firstChild : elt;
@ -134,43 +135,16 @@ ContentSearchUIController.prototype = {
ariaSelectedElt.setAttribute("aria-selected", "true");
this.input.setAttribute("aria-activedescendant", ariaSelectedElt.id);
}
else if (i != excludeIndex) {
else {
elt.classList.remove("selected");
ariaSelectedElt.setAttribute("aria-selected", "false");
}
}
},
get selectedButtonIndex() {
let elts = [...this._oneOffButtons,
document.getElementById("contentSearchSettingsButton")];
for (let i = 0; i < elts.length; ++i) {
if (elts[i].classList.contains("selected")) {
return i;
}
}
return -1;
},
set selectedButtonIndex(idx) {
let elts = [...this._oneOffButtons,
document.getElementById("contentSearchSettingsButton")];
for (let i = 0; i < elts.length; ++i) {
let elt = elts[i];
if (i == idx) {
elt.classList.add("selected");
elt.setAttribute("aria-selected", "true");
}
else {
elt.classList.remove("selected");
elt.setAttribute("aria-selected", "false");
}
}
},
get selectedEngineName() {
let selectedElt = this._oneOffsTable.querySelector(".selected");
if (selectedElt) {
let selectedElt = this._table.querySelector(".selected");
if (selectedElt && selectedElt.engineName) {
return selectedElt.engineName;
}
return this.defaultEngine.name;
@ -220,7 +194,7 @@ ContentSearchUIController.prototype = {
},
_onCommand: function(aEvent) {
if (this.selectedButtonIndex == this._oneOffButtons.length) {
if (this.selectedIndex == this.numSuggestions + this._oneOffButtons.length) {
// Settings button was selected.
this._sendMsg("ManageEngines");
return;
@ -290,58 +264,19 @@ ContentSearchUIController.prototype = {
_onKeypress: function (event) {
let selectedIndexDelta = 0;
let selectedSuggestionDelta = 0;
let selectedOneOffDelta = 0;
switch (event.keyCode) {
case event.DOM_VK_UP:
if (this._table.hidden) {
return;
if (!this._table.hidden) {
selectedIndexDelta = -1;
}
if (event.getModifierState("Accel")) {
if (event.shiftKey) {
selectedSuggestionDelta = -1;
break;
}
this._cycleCurrentEngine(true);
break;
}
if (event.altKey) {
selectedOneOffDelta = -1;
break;
}
selectedIndexDelta = -1;
break;
case event.DOM_VK_DOWN:
if (this._table.hidden) {
this._getSuggestions();
return;
}
if (event.getModifierState("Accel")) {
if (event.shiftKey) {
selectedSuggestionDelta = 1;
break;
}
this._cycleCurrentEngine(false);
break;
else {
selectedIndexDelta = 1;
}
if (event.altKey) {
selectedOneOffDelta = 1;
break;
}
selectedIndexDelta = 1;
break;
case event.DOM_VK_TAB:
if (this._table.hidden) {
return;
}
// Shift+tab when either the first or no one-off is selected, as well as
// tab when the settings button is selected, should change focus as normal.
if ((this.selectedButtonIndex <= 0 && event.shiftKey) ||
this.selectedButtonIndex == this._oneOffButtons.length && !event.shiftKey) {
return;
}
selectedOneOffDelta = event.shiftKey ? -1 : 1;
break;
case event.DOM_VK_RIGHT:
// Allow normal caret movement until the caret is at the end of the input.
@ -362,97 +297,37 @@ ContentSearchUIController.prototype = {
}
this._stickyInputValue = this.input.value;
this._hideSuggestions();
return;
break;
case event.DOM_VK_RETURN:
this._onCommand(event);
return;
break;
case event.DOM_VK_DELETE:
if (this.selectedIndex >= 0) {
this.deleteSuggestionAtIndex(this.selectedIndex);
}
return;
break;
case event.DOM_VK_ESCAPE:
if (!this._table.hidden) {
this._hideSuggestions();
}
return;
default:
return;
}
let currentIndex = this.selectedIndex;
if (selectedIndexDelta) {
let newSelectedIndex = currentIndex + selectedIndexDelta;
// Update the selection.
let newSelectedIndex = this.selectedIndex + selectedIndexDelta;
if (newSelectedIndex < -1) {
newSelectedIndex = this.numSuggestions + this._oneOffButtons.length;
}
// If are moving up from the first one off, we have to deselect the one off
// manually because the selectedIndex setter tries to exclude the selected
// one-off (which is desirable for accel+shift+up/down).
if (currentIndex == this.numSuggestions && selectedIndexDelta == -1) {
this.selectedButtonIndex = -1;
}
this.selectAndUpdateInput(newSelectedIndex);
}
else if (selectedSuggestionDelta) {
let newSelectedIndex;
if (currentIndex >= this.numSuggestions || currentIndex == -1) {
// No suggestion already selected, select the first/last one appropriately.
newSelectedIndex = selectedSuggestionDelta == 1 ?
0 : this.numSuggestions - 1;
}
else {
newSelectedIndex = currentIndex + selectedSuggestionDelta;
}
if (newSelectedIndex >= this.numSuggestions) {
else if (this.numSuggestions + this._oneOffButtons.length < newSelectedIndex) {
newSelectedIndex = -1;
}
this.selectAndUpdateInput(newSelectedIndex);
}
else if (selectedOneOffDelta) {
let newSelectedIndex;
let currentButton = this.selectedButtonIndex;
if (currentButton == -1 || currentButton == this._oneOffButtons.length) {
// No one-off already selected, select the first/last one appropriately.
newSelectedIndex = selectedOneOffDelta == 1 ?
0 : this._oneOffButtons.length - 1;
}
else {
newSelectedIndex = currentButton + selectedOneOffDelta;
}
// Allow selection of the settings button via the tab key.
if (newSelectedIndex == this._oneOffButtons.length &&
event.keyCode != event.DOM_VK_TAB) {
newSelectedIndex = -1;
}
this.selectedButtonIndex = newSelectedIndex;
// Prevent the input's caret from moving.
event.preventDefault();
}
// Prevent the input's caret from moving.
event.preventDefault();
},
_currentEngineIndex: -1,
_cycleCurrentEngine: function (aReverse) {
if ((this._currentEngineIndex == this._oneOffButtons.length - 1 && !aReverse) ||
(this._currentEngineIndex < 0 && aReverse)) {
return;
}
this._currentEngineIndex += aReverse ? -1 : 1;
let engine;
if (this._currentEngineIndex == -1) {
engine = this._originalDefaultEngine;
} else {
let button = this._oneOffButtons[this._currentEngineIndex];
engine = {
name: button.engineName,
icon: button.firstChild.getAttribute("src"),
};
}
this._sendMsg("SetCurrentEngine", engine.name);
this.defaultEngine = engine;
},
_onFocus: function () {
@ -481,12 +356,7 @@ ContentSearchUIController.prototype = {
},
_onMousemove: function (event) {
let idx = this._indexOfTableItem(event.target);
if (idx >= this.numSuggestions) {
this.selectedButtonIndex = idx - this.numSuggestions;
return;
}
this.selectedIndex = idx;
this.selectedIndex = this._indexOfTableItem(event.target);
},
_onMouseup: function (event) {
@ -496,15 +366,6 @@ ContentSearchUIController.prototype = {
this._onCommand(event);
},
_onMouseout: function (event) {
// We only deselect one-off buttons and the settings button when they are
// moused out.
let idx = this._indexOfTableItem(event.originalTarget);
if (idx >= this.numSuggestions) {
this.selectedButtonIndex = -1;
}
},
_onClick: function (event) {
this._onMouseup(event);
},
@ -566,10 +427,6 @@ ContentSearchUIController.prototype = {
}
this._table.hidden = false;
this.input.setAttribute("aria-expanded", "true");
this._originalDefaultEngine = {
name: this.defaultEngine.name,
icon: this.defaultEngine.icon,
};
}
},
@ -590,6 +447,10 @@ ContentSearchUIController.prototype = {
name: engine.name,
icon: this._getFaviconURIFromBuffer(engine.iconBuffer),
};
if (!this._table.hidden) {
this._setUpOneOffButtons();
return;
}
this._pendingOneOffRefresh = true;
},
@ -711,9 +572,6 @@ ContentSearchUIController.prototype = {
_hideSuggestions: function () {
this.input.setAttribute("aria-expanded", "false");
this.selectedIndex = -1;
this.selectedButtonIndex = -1;
this._currentEngineIndex = -1;
this._table.hidden = true;
},
@ -747,7 +605,11 @@ ContentSearchUIController.prototype = {
document.addEventListener("mouseup", () => { delete this._mousedown; });
// Deselect the selected element on mouseout if it wasn't a suggestion.
this._table.addEventListener("mouseout", this);
this._table.addEventListener("mouseout", () => {
if (this.selectedIndex >= this.numSuggestions) {
this.selectAndUpdateInput(-1);
}
});
// If a search is loaded in the same tab, ensure the suggestions dropdown
// is hidden immediately when the page starts loading and not when it first

View File

@ -102,7 +102,7 @@ add_task(function* rightLeftKeys() {
// trigger suggestions again and cycle through them by pressing Down until
// nothing is selected again.
state = yield msg("key", "VK_RIGHT");
checkState(state, "xfoo", [], -1);
checkState(state, "xfoo", [], 0);
state = yield msg("key", { key: "VK_DOWN", waitForSuggestions: true });
checkState(state, "xfoo", ["xfoofoo", "xfoobar"], -1);
@ -125,202 +125,20 @@ add_task(function* rightLeftKeys() {
yield msg("reset");
});
add_task(function* tabKey() {
yield setUp();
yield msg("key", { key: "x", waitForSuggestions: true });
let state = yield msg("key", "VK_TAB");
checkState(state, "x", ["xfoo", "xbar"], 2);
state = yield msg("key", "VK_TAB");
checkState(state, "x", ["xfoo", "xbar"], 3);
state = yield msg("key", { key: "VK_TAB", modifiers: { shiftKey: true }});
checkState(state, "x", ["xfoo", "xbar"], 2);
state = yield msg("key", { key: "VK_TAB", modifiers: { shiftKey: true }});
checkState(state, "x", [], -1);
yield setUp();
yield msg("key", { key: "VK_DOWN", waitForSuggestions: true });
for (let i = 0; i < 3; ++i) {
state = yield msg("key", "VK_TAB");
}
checkState(state, "x", [], -1);
yield setUp();
yield msg("key", { key: "VK_DOWN", waitForSuggestions: true });
state = yield msg("key", "VK_DOWN");
checkState(state, "xfoo", ["xfoo", "xbar"], 0);
state = yield msg("key", "VK_TAB");
checkState(state, "xfoo", ["xfoo", "xbar"], 0, 0);
state = yield msg("key", "VK_TAB");
checkState(state, "xfoo", ["xfoo", "xbar"], 0, 1);
state = yield msg("key", "VK_DOWN");
checkState(state, "xbar", ["xfoo", "xbar"], 1, 1);
state = yield msg("key", "VK_DOWN");
checkState(state, "x", ["xfoo", "xbar"], 2);
state = yield msg("key", "VK_UP");
checkState(state, "xbar", ["xfoo", "xbar"], 1);
state = yield msg("key", "VK_TAB");
checkState(state, "xbar", ["xfoo", "xbar"], 1, 0);
state = yield msg("key", "VK_TAB");
checkState(state, "xbar", ["xfoo", "xbar"], 1, 1);
state = yield msg("key", "VK_TAB");
checkState(state, "xbar", [], -1);
yield msg("reset");
});
add_task(function* cycleSuggestions() {
yield setUp();
yield msg("key", { key: "x", waitForSuggestions: true });
let cycle = Task.async(function* (aSelectedButtonIndex) {
let modifiers = {
shiftKey: true,
accelKey: true,
};
let state = yield msg("key", { key: "VK_DOWN", modifiers: modifiers });
checkState(state, "xfoo", ["xfoo", "xbar"], 0, aSelectedButtonIndex);
state = yield msg("key", { key: "VK_DOWN", modifiers: modifiers });
checkState(state, "xbar", ["xfoo", "xbar"], 1, aSelectedButtonIndex);
state = yield msg("key", { key: "VK_DOWN", modifiers: modifiers });
checkState(state, "x", ["xfoo", "xbar"], -1, aSelectedButtonIndex);
state = yield msg("key", { key: "VK_DOWN", modifiers: modifiers });
checkState(state, "xfoo", ["xfoo", "xbar"], 0, aSelectedButtonIndex);
state = yield msg("key", { key: "VK_UP", modifiers: modifiers });
checkState(state, "x", ["xfoo", "xbar"], -1, aSelectedButtonIndex);
state = yield msg("key", { key: "VK_UP", modifiers: modifiers });
checkState(state, "xbar", ["xfoo", "xbar"], 1, aSelectedButtonIndex);
state = yield msg("key", { key: "VK_UP", modifiers: modifiers });
checkState(state, "xfoo", ["xfoo", "xbar"], 0, aSelectedButtonIndex);
state = yield msg("key", { key: "VK_UP", modifiers: modifiers });
checkState(state, "x", ["xfoo", "xbar"], -1, aSelectedButtonIndex);
});
yield cycle();
// Repeat with a one-off selected.
let state = yield msg("key", "VK_TAB");
checkState(state, "x", ["xfoo", "xbar"], 2);
yield cycle(0);
// Repeat with the settings button selected.
state = yield msg("key", "VK_TAB");
checkState(state, "x", ["xfoo", "xbar"], 3);
yield cycle(1);
yield msg("reset");
});
add_task(function* cycleOneOffs() {
yield setUp();
yield msg("key", { key: "x", waitForSuggestions: true });
yield msg("addDuplicateOneOff");
let state = yield msg("key", "VK_DOWN");
state = yield msg("key", "VK_DOWN");
checkState(state, "xbar", ["xfoo", "xbar"], 1);
let modifiers = {
altKey: true,
};
state = yield msg("key", { key: "VK_DOWN", modifiers: modifiers });
checkState(state, "xbar", ["xfoo", "xbar"], 1, 0);
state = yield msg("key", { key: "VK_DOWN", modifiers: modifiers });
checkState(state, "xbar", ["xfoo", "xbar"], 1, 1);
state = yield msg("key", { key: "VK_DOWN", modifiers: modifiers });
checkState(state, "xbar", ["xfoo", "xbar"], 1);
state = yield msg("key", { key: "VK_UP", modifiers: modifiers });
checkState(state, "xbar", ["xfoo", "xbar"], 1, 1);
state = yield msg("key", { key: "VK_UP", modifiers: modifiers });
checkState(state, "xbar", ["xfoo", "xbar"], 1, 0);
state = yield msg("key", { key: "VK_UP", modifiers: modifiers });
checkState(state, "xbar", ["xfoo", "xbar"], 1);
// If the settings button is selected, pressing alt+up/down should select the
// last/first one-off respectively (and deselect the settings button).
yield msg("key", "VK_TAB");
yield msg("key", "VK_TAB");
state = yield msg("key", "VK_TAB"); // Settings button selected.
checkState(state, "xbar", ["xfoo", "xbar"], 1, 2);
state = yield msg("key", { key: "VK_UP", modifiers: modifiers });
checkState(state, "xbar", ["xfoo", "xbar"], 1, 1);
state = yield msg("key", "VK_TAB");
checkState(state, "xbar", ["xfoo", "xbar"], 1, 2);
state = yield msg("key", { key: "VK_DOWN", modifiers: modifiers });
checkState(state, "xbar", ["xfoo", "xbar"], 1, 0);
yield msg("removeLastOneOff");
yield msg("reset");
});
add_task(function* mouse() {
yield setUp();
let state = yield msg("key", { key: "x", waitForSuggestions: true });
checkState(state, "x", ["xfoo", "xbar"], -1);
state = yield msg("mousemove", 0);
checkState(state, "x", ["xfoo", "xbar"], 0);
state = yield msg("mousemove", 1);
checkState(state, "x", ["xfoo", "xbar"], 1);
state = yield msg("mousemove", 2);
checkState(state, "x", ["xfoo", "xbar"], 1, 0);
state = yield msg("mousemove", 3);
checkState(state, "x", ["xfoo", "xbar"], 1, 1);
for (let i = 0; i < 4; ++i) {
state = yield msg("mousemove", i);
checkState(state, "x", ["xfoo", "xbar"], i);
}
state = yield msg("mousemove", -1);
checkState(state, "x", ["xfoo", "xbar"], 1);
yield msg("reset");
yield setUp();
state = yield msg("key", { key: "x", waitForSuggestions: true });
checkState(state, "x", ["xfoo", "xbar"], -1);
state = yield msg("mousemove", 0);
checkState(state, "x", ["xfoo", "xbar"], 0);
state = yield msg("mousemove", 2);
checkState(state, "x", ["xfoo", "xbar"], 0, 0);
state = yield msg("mousemove", -1);
checkState(state, "x", ["xfoo", "xbar"], 0);
yield msg("reset");
});
@ -379,33 +197,6 @@ add_task(function* formHistory() {
yield msg("reset");
});
add_task(function* cycleEngines() {
yield setUp();
yield msg("key", "VK_DOWN");
function promiseEngineChange(newEngineName) {
let deferred = Promise.defer();
Services.obs.addObserver(function resolver(subj, topic, data) {
if (data != "engine-current") {
return;
}
is(subj.name, newEngineName, "Engine cycled correctly");
Services.obs.removeObserver(resolver, "browser-search-engine-modified");
deferred.resolve();
}, "browser-search-engine-modified", false);
}
let p = promiseEngineChange(TEST_ENGINE_PREFIX + " " + TEST_ENGINE_2_BASENAME);
yield msg("key", { key: "VK_DOWN", modifiers: { accelKey: true }});
yield p;
p = promiseEngineChange(TEST_ENGINE_PREFIX + " " + TEST_ENGINE_BASENAME);
yield msg("key", { key: "VK_UP", modifiers: { accelKey: true }});
yield p;
yield msg("reset");
});
add_task(function* search() {
yield setUp();
@ -506,42 +297,6 @@ add_task(function* search() {
yield promiseTab();
yield setUp();
// Test selecting a suggestion, then clicking a one-off without deselecting the
// suggestion.
yield msg("key", { key: "x", waitForSuggestions: true });
p = msg("waitForSearch");
yield msg("mousemove", 1);
yield msg("mousemove", 3);
yield msg("click", { eltIdx: 3, modifiers: modifiers });
mesg = yield p;
eventData.searchString = "xfoo"
eventData.selection = {
index: 1,
kind: "mouse",
};
SimpleTest.isDeeply(eventData, mesg, "Search event data");
yield promiseTab();
yield setUp();
// Same as above, but with the keyboard.
delete modifiers.button;
yield msg("key", { key: "x", waitForSuggestions: true });
p = msg("waitForSearch");
yield msg("key", "VK_DOWN");
yield msg("key", "VK_DOWN");
yield msg("key", "VK_TAB");
yield msg("key", { key: "VK_RETURN", modifiers: modifiers });
mesg = yield p;
eventData.selection = {
index: 1,
kind: "key",
};
SimpleTest.isDeeply(eventData, mesg, "Search event data");
yield promiseTab();
yield setUp();
// Test searching when using IME composition.
let state = yield msg("startComposition", { data: "" });
checkState(state, "", [], -1);
@ -553,10 +308,8 @@ add_task(function* search() {
p = msg("waitForSearch");
yield msg("key", { key: "VK_RETURN", modifiers: modifiers });
mesg = yield p;
eventData.searchString = "x"
eventData.originalEvent = modifiers;
eventData.engineName = TEST_ENGINE_PREFIX + " " + TEST_ENGINE_BASENAME;
delete eventData.selection;
SimpleTest.isDeeply(eventData, mesg, "Search event data");
yield promiseTab();
@ -675,7 +428,7 @@ function msg(type, data=null) {
}
function checkState(actualState, expectedInputVal, expectedSuggestions,
expectedSelectedIdx, expectedSelectedButtonIdx) {
expectedSelectedIdx) {
expectedSuggestions = expectedSuggestions.map(sugg => {
return typeof(sugg) == "object" ? sugg : {
str: sugg,
@ -683,10 +436,6 @@ function checkState(actualState, expectedInputVal, expectedSuggestions,
};
});
if (expectedSelectedIdx == -1 && expectedSelectedButtonIdx != undefined) {
expectedSelectedIdx = expectedSuggestions.length + expectedSelectedButtonIdx;
}
let expectedState = {
selectedIndex: expectedSelectedIdx,
numSuggestions: expectedSuggestions.length,
@ -699,15 +448,6 @@ function checkState(actualState, expectedInputVal, expectedSuggestions,
inputValue: expectedInputVal,
ariaExpanded: expectedSuggestions.length == 0 ? "false" : "true",
};
if (expectedSelectedButtonIdx != undefined) {
expectedState.selectedButtonIndex = expectedSelectedButtonIdx;
}
else if (expectedSelectedIdx < expectedSuggestions.length) {
expectedState.selectedButtonIndex = -1;
}
else {
expectedState.selectedButtonIndex = expectedSelectedIdx - expectedSuggestions.length;
}
SimpleTest.isDeeply(actualState, expectedState, "State");
}

View File

@ -124,27 +124,11 @@ let messageHandlers = {
ack("addInputValueToFormHistory");
},
addDuplicateOneOff: function () {
let btn = gController._oneOffButtons[gController._oneOffButtons.length - 1];
let newBtn = btn.cloneNode(true);
btn.parentNode.appendChild(newBtn);
gController._oneOffButtons.push(newBtn);
ack("addDuplicateOneOff");
},
removeLastOneOff: function () {
gController._oneOffButtons.pop().remove();
ack("removeLastOneOff");
},
reset: function () {
// Reset both the input and suggestions by select all + delete. If there was
// no text entered, this won't have any effect, so also escape to ensure the
// suggestions table is closed.
// Reset both the input and suggestions by select all + delete.
gController.input.focus();
content.synthesizeKey("a", { accelKey: true });
content.synthesizeKey("VK_DELETE", {});
content.synthesizeKey("VK_ESCAPE", {});
ack("reset");
},
};
@ -181,7 +165,6 @@ function waitForContentSearchEvent(messageType, cb) {
function currentState() {
let state = {
selectedIndex: gController.selectedIndex,
selectedButtonIndex: gController.selectedButtonIndex,
numSuggestions: gController._table.hidden ? 0 : gController.numSuggestions,
suggestionAtIndex: [],
isFormHistorySuggestionAtIndex: [],

View File

@ -1380,7 +1380,9 @@ html[dir="rtl"] .standalone .room-conversation-wrapper .room-inner-info-area {
background-repeat: no-repeat;
border: 1rem #fff solid;
box-shadow: 0 0 5px #000;
margin: 0;
margin: auto;
/* `width` here is specified by the design spec. */
width: 250px;
}
.standalone .prompt-media-message.chrome {

View File

@ -26,7 +26,6 @@ CFLAGS="$CFLAGS -Wno-attributes"
CPPFLAGS="$CPPFLAGS -Wno-attributes"
CXXFLAGS="$CXXFLAGS -Wno-attributes"
TOOLTOOL_DIR="$(dirname $topsrcdir)"
export PKG_CONFIG_LIBDIR=/usr/lib64/pkgconfig:/usr/share/pkgconfig
. $topsrcdir/build/unix/mozconfig.gtk

View File

@ -8,12 +8,5 @@
"algorithm": "sha512",
"filename": "clang.tar.bz2",
"unpack": true
},
{
"size": 4431740,
"digest": "68fc56b0fb0cdba629b95683d6649ff76b00dccf97af90960c3d7716f6108b2162ffd5ffcd5c3a60a21b28674df688fe4dabc67345e2da35ec5abeae3d48c8e3",
"algorithm": "sha512",
"filename": "gtk3.tar.xz",
"unpack": true
}
]

View File

@ -8,12 +8,5 @@
"algorithm": "sha512",
"filename": "clang.tar.bz2",
"unpack": true
},
{
"size": 4431740,
"digest": "68fc56b0fb0cdba629b95683d6649ff76b00dccf97af90960c3d7716f6108b2162ffd5ffcd5c3a60a21b28674df688fe4dabc67345e2da35ec5abeae3d48c8e3",
"algorithm": "sha512",
"filename": "gtk3.tar.xz",
"unpack": true
}
]

View File

@ -1935,6 +1935,7 @@ MarkupContainer.prototype = {
let link = target.dataset.link;
let type = target.dataset.type;
this.markup._inspector.followAttributeLink(type, link);
return;
}
// Start dragging the container after a delay.

View File

@ -25,7 +25,7 @@ add_task(function*() {
preventDefault: function() {}
});
is(el.isDragging, false, "isDragging should not be set to true immedietly");
ok(!el.isDragging, "isDragging should not be set to true immediately");
info("Waiting " + (GRAB_DELAY + 1) + "ms");
yield wait(GRAB_DELAY + 1);
@ -42,5 +42,20 @@ add_task(function*() {
yield dropCompleted;
is(el.isDragging, false, "isDragging false after mouseUp");
ok(!el.isDragging, "isDragging false after mouseUp");
info("Simulating middle click on #test");
el._onMouseDown({
target: el.tagLine,
button: 1,
pageX: rect.x,
pageY: rect.y,
stopPropagation: function() {},
preventDefault: function() {}
});
ok(!el.isDragging, "isDragging should not be set to true immediately");
info("Waiting " + (GRAB_DELAY + 1) + "ms");
yield wait(GRAB_DELAY + 1);
ok(!el.isDragging, "isDragging never starts after middle click after mouseUp");
});

View File

@ -111,6 +111,7 @@ support-files =
test-property-provider.html
test-repeated-messages.html
test-result-format-as-string.html
test-trackingprotection-securityerrors.html
test-webconsole-error-observer.html
test_bug_770099_violation.html
test_bug_770099_violation.html^headers^
@ -350,6 +351,8 @@ skip-if = e10s # Bug 1042253 - webconsole tests disabled with e10s
[browser_webconsole_split_focus.js]
[browser_webconsole_split_persist.js]
skip-if = e10s # Bug 1042253 - webconsole e10s tests (Linux debug timeout)
[browser_webconsole_trackingprotection_errors.js]
tags = trackingprotection
[browser_webconsole_view_source.js]
skip-if = e10s # Bug 1042253 - webconsole tests disabled with e10s (expectUncaughtException)
[browser_webconsole_reflow.js]

View File

@ -0,0 +1,48 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
// Load a page with tracking elements that get blocked and make sure that a
// 'learn more' link shows up in the webconsole.
"use strict";
const TEST_URI = "http://tracking.example.org/browser/browser/devtools/webconsole/test/test-trackingprotection-securityerrors.html";
const LEARN_MORE_URI = "https://developer.mozilla.org/Firefox/Privacy/Tracking_Protection";
const PREF = "privacy.trackingprotection.enabled";
const {UrlClassifierTestUtils} = Cu.import("resource://testing-common/UrlClassifierTestUtils.jsm", {});
registerCleanupFunction(function() {
Services.prefs.clearUserPref(PREF);
UrlClassifierTestUtils.cleanupTestTrackers();
});
add_task(function* testMessagesAppear() {
yield UrlClassifierTestUtils.addTestTrackers();
Services.prefs.setBoolPref(PREF, true);
let { browser } = yield loadTab(TEST_URI);
let hud = yield openConsole();
let results = yield waitForMessages({
webconsole: hud,
messages: [
{
name: "Was blocked because tracking protection is enabled",
text: "The resource at \"http://tracking.example.com/\" was blocked because tracking protection is enabled",
category: CATEGORY_SECURITY,
severity: SEVERITY_WARNING,
objects: true,
},
],
});
yield testClickOpenNewTab(hud, results[0]);
});
function testClickOpenNewTab(hud, match) {
let warningNode = match.clickableElements[0];
ok(warningNode, "link element");
ok(warningNode.classList.contains("learn-more-link"), "link class name");
return simulateMessageLinkClick(warningNode, LEARN_MORE_URI);
}

View File

@ -0,0 +1,12 @@
<!DOCTYPE HTML>
<!-- 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 dir="ltr" xml:lang="en-US" lang="en-US">
<head>
<meta charset="utf8">
</head>
<body>
<iframe src="http://tracking.example.com/"></iframe>
</body>
</html>

View File

@ -42,6 +42,8 @@ const XHTML_NS = "http://www.w3.org/1999/xhtml";
const MIXED_CONTENT_LEARN_MORE = "https://developer.mozilla.org/docs/Security/MixedContent";
const TRACKING_PROTECTION_LEARN_MORE = "https://developer.mozilla.org/Firefox/Privacy/Tracking_Protection";
const INSECURE_PASSWORDS_LEARN_MORE = "https://developer.mozilla.org/docs/Security/InsecurePasswords";
const STRICT_TRANSPORT_SECURITY_LEARN_MORE = "https://developer.mozilla.org/docs/Security/HTTP_Strict_Transport_Security";
@ -1679,6 +1681,9 @@ WebConsoleFrame.prototype = {
case "SHA-1 Signature":
url = WEAK_SIGNATURE_ALGORITHM_LEARN_MORE;
break;
case "Tracking Protection":
url = TRACKING_PROTECTION_LEARN_MORE;
break;
default:
// Unknown category. Return without adding more info node.
return;

View File

@ -1,38 +1,36 @@
TOOLTOOL_DIR=${TOOLTOOL_DIR:-$topsrcdir}
# $TOOLTOOL_DIR/gtk3 comes from tooltool, when the tooltool manifest contains it.
if [ -d "$TOOLTOOL_DIR/gtk3" ]; then
# $topsrcdir/gtk3 comes from tooltool, when the tooltool manifest contains it.
if [ -d "$topsrcdir/gtk3" ]; then
if [ -z "$PKG_CONFIG_LIBDIR" ]; then
echo PKG_CONFIG_LIBDIR must be set >&2
exit 1
fi
export PKG_CONFIG_SYSROOT_DIR="$TOOLTOOL_DIR/gtk3"
export PKG_CONFIG_PATH="$TOOLTOOL_DIR/gtk3/usr/local/lib/pkgconfig"
export PATH="$TOOLTOOL_DIR/gtk3/usr/local/bin:${PATH}"
export PKG_CONFIG_SYSROOT_DIR="$topsrcdir/gtk3"
export PKG_CONFIG_PATH="$topsrcdir/gtk3/usr/local/lib/pkgconfig"
export PATH="$topsrcdir/gtk3/usr/local/bin:${PATH}"
# Ensure cairo, gdk-pixbuf, etc. are not taken from the system installed packages.
LDFLAGS="-L$TOOLTOOL_DIR/gtk3/usr/local/lib ${LDFLAGS}"
mk_add_options "export LD_LIBRARY_PATH=$TOOLTOOL_DIR/gtk3/usr/local/lib"
LDFLAGS="-L$topsrcdir/gtk3/usr/local/lib ${LDFLAGS}"
mk_add_options "export LD_LIBRARY_PATH=$topsrcdir/gtk3/usr/local/lib"
ac_add_options --enable-default-toolkit=cairo-gtk3
# Set things up to use Gtk+3 from the tooltool package
mk_add_options "export FONTCONFIG_PATH=$TOOLTOOL_DIR/gtk3/usr/local/etc/fonts"
mk_add_options "export PANGO_SYSCONFDIR=$TOOLTOOL_DIR/gtk3/usr/local/etc"
mk_add_options "export PANGO_LIBDIR=$TOOLTOOL_DIR/gtk3/usr/local/lib"
mk_add_options "export GDK_PIXBUF_MODULE_FILE=$TOOLTOOL_DIR/gtk3/usr/local/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache"
mk_add_options "export GDK_PIXBUF_MODULEDIR=$TOOLTOOL_DIR/gtk3/usr/local/lib/gdk-pixbuf-2.0/2.10.0/loaders"
mk_add_options "export LD_LIBRARY_PATH=$TOOLTOOL_DIR/gtk3/usr/local/lib"
mk_add_options "export FONTCONFIG_PATH=$topsrcdir/gtk3/usr/local/etc/fonts"
mk_add_options "export PANGO_SYSCONFDIR=$topsrcdir/gtk3/usr/local/etc"
mk_add_options "export PANGO_LIBDIR=$topsrcdir/gtk3/usr/local/lib"
mk_add_options "export GDK_PIXBUF_MODULE_FILE=$topsrcdir/gtk3/usr/local/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache"
mk_add_options "export GDK_PIXBUF_MODULEDIR=$topsrcdir/gtk3/usr/local/lib/gdk-pixbuf-2.0/2.10.0/loaders"
mk_add_options "export LD_LIBRARY_PATH=$topsrcdir/gtk3/usr/local/lib"
# pango expects absolute paths in pango.modules, and TOOLTOOL_DIR may vary...
LD_LIBRARY_PATH=$TOOLTOOL_DIR/gtk3/usr/local/lib \
PANGO_SYSCONFDIR=$TOOLTOOL_DIR/gtk3/usr/local/etc \
PANGO_LIBDIR=$TOOLTOOL_DIR/gtk3/usr/local/lib \
$TOOLTOOL_DIR/gtk3/usr/local/bin/pango-querymodules > $TOOLTOOL_DIR/gtk3/usr/local/etc/pango/pango.modules
# pango expects absolute paths in pango.modules, and topsrcdir may vary...
LD_LIBRARY_PATH=$topsrcdir/gtk3/usr/local/lib \
PANGO_SYSCONFDIR=$topsrcdir/gtk3/usr/local/etc \
PANGO_LIBDIR=$topsrcdir/gtk3/usr/local/lib \
$topsrcdir/gtk3/usr/local/bin/pango-querymodules > $topsrcdir/gtk3/usr/local/etc/pango/pango.modules
# same with gdb-pixbuf and loaders.cache
LD_LIBRARY_PATH=$TOOLTOOL_DIR/gtk3/usr/local/lib \
GDK_PIXBUF_MODULE_FILE=$TOOLTOOL_DIR/gtk3/usr/local/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache \
GDK_PIXBUF_MODULEDIR=$TOOLTOOL_DIR/gtk3/usr/local/lib/gdk-pixbuf-2.0/2.10.0/loaders \
$TOOLTOOL_DIR/gtk3/usr/local/bin/gdk-pixbuf-query-loaders > $TOOLTOOL_DIR/gtk3/usr/local/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
LD_LIBRARY_PATH=$topsrcdir/gtk3/usr/local/lib \
GDK_PIXBUF_MODULE_FILE=$topsrcdir/gtk3/usr/local/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache \
GDK_PIXBUF_MODULEDIR=$topsrcdir/gtk3/usr/local/lib/gdk-pixbuf-2.0/2.10.0/loaders \
$topsrcdir/gtk3/usr/local/bin/gdk-pixbuf-query-loaders > $topsrcdir/gtk3/usr/local/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
# The fontconfig version in the tooltool package has known uses of
# uninitialized memory when creating its cache, and while most users
@ -45,7 +43,7 @@ if [ -d "$TOOLTOOL_DIR/gtk3" ]; then
# mock build environment doesn't have fonts in /usr/share/fonts, but
# has some in /usr/share/X11/fonts. Add this directory to the
# fontconfig configuration without changing the gtk3 tooltool package.
cat << EOF > $TOOLTOOL_DIR/gtk3/usr/local/etc/fonts/local.conf
cat << EOF > $topsrcdir/gtk3/usr/local/etc/fonts/local.conf
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>

View File

@ -1883,13 +1883,37 @@ TelephonyService.prototype = {
return;
}
// It's a foreground call.
// After hangup a single call, gecko has to resume the held call or conference.
if (!call.isConference) {
let heldCalls = this._getCallsWithState(aClientId, nsITelephonyService.CALL_STATE_HELD);
// Automatic resume another held call.
if (heldCalls.length) {
this._hangUpForeground(aClientId, aCallback);
if (call.state === nsITelephonyService.CALL_STATE_CONNECTED) {
// For a foreground call, ril has a request to do two actions together.
this._hangUpForeground(aClientId, aCallback);
} else {
// Otherwise, gecko should send out two consecutive requests by itself.
this._sendToRilWorker(aClientId, "hangUpCall", { callIndex: aCallIndex }, response => {
if (response.errorMsg) {
aCallback.notifyError(response.errorMsg);
} else {
aCallback.notifySuccess();
let emptyCallback = {
QueryInterface: XPCOMUtils.generateQI([Ci.nsITelephonyCallback]),
notifySuccess: () => {},
notifyError: () => {}
};
if (heldCalls.length === 1) {
this.resumeCall(aClientId, heldCalls[0].callIndex, emptyCallback);
} else {
this.resumeConference(aClientId, emptyCallback);
}
}
});
}
return;
}
}

View File

@ -8,12 +8,5 @@
"algorithm": "sha512",
"filename": "gcc.tar.xz",
"unpack": true
},
{
"size": 4431740,
"digest": "68fc56b0fb0cdba629b95683d6649ff76b00dccf97af90960c3d7716f6108b2162ffd5ffcd5c3a60a21b28674df688fe4dabc67345e2da35ec5abeae3d48c8e3",
"algorithm": "sha512",
"filename": "gtk3.tar.xz",
"unpack": true
}
]

View File

@ -129,7 +129,7 @@ public class FirefoxAccounts {
// exist.
final AndroidFxAccount fxAccount =
AccountPickler.unpickle(context, FxAccountConstants.ACCOUNT_PICKLE_FILENAME);
accounts[0] = fxAccount.getAndroidAccount();
accounts[0] = fxAccount != null ? fxAccount.getAndroidAccount() : null;
} finally {
latch.countDown();
}

View File

@ -80,12 +80,13 @@ public class AccountPickler {
/**
* Remove Firefox account persisted to disk.
* This operation is synchronized to avoid race condition while deleting the account.
*
* @param context Android context.
* @param filename name of persisted pickle file; must not contain path separators.
* @return <code>true</code> if given pickle existed and was successfully deleted.
*/
public static boolean deletePickle(final Context context, final String filename) {
public synchronized static boolean deletePickle(final Context context, final String filename) {
return context.deleteFile(filename);
}
@ -122,11 +123,12 @@ public class AccountPickler {
/**
* Persist Firefox account to disk as a JSON object.
* This operation is synchronized to avoid race condition while deleting the account.
*
* @param AndroidFxAccount the account to persist to disk
* @param account the AndroidFxAccount to persist to disk
* @param filename name of file to persist to; must not contain path separators.
*/
public static void pickle(final AndroidFxAccount account, final String filename) {
public synchronized static void pickle(final AndroidFxAccount account, final String filename) {
final ExtendedJSONObject o = toJSON(account, System.currentTimeMillis());
writeToDisk(account.context, filename, o);
}
@ -155,6 +157,7 @@ public class AccountPickler {
/**
* Create Android account from saved JSON object. Assumes that an account does not exist.
* This operation is synchronized to avoid race condition while deleting the account.
*
* @param context
* Android context.
@ -162,7 +165,7 @@ public class AccountPickler {
* name of file to read from; must not contain path separators.
* @return created Android account, or null on error.
*/
public static AndroidFxAccount unpickle(final Context context, final String filename) {
public synchronized static AndroidFxAccount unpickle(final Context context, final String filename) {
final String jsonString = Utils.readFile(context, filename);
if (jsonString == null) {
Logger.info(LOG_TAG, "Pickle file '" + filename + "' not found; aborting.");