зеркало из https://github.com/mozilla/gecko-dev.git
Merge mozilla-central to b2g-inbound a=merge
This commit is contained in:
Коммит
9e379bcc00
|
@ -1173,6 +1173,9 @@ pref("toolbar.customization.usesheet", true);
|
|||
pref("toolbar.customization.usesheet", false);
|
||||
#endif
|
||||
|
||||
// Disable Flash protected mode to reduce hang/crash rates.
|
||||
pref("dom.ipc.plugins.flash.disable-protected-mode", true);
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
// On mac, the default pref is per-architecture
|
||||
pref("dom.ipc.plugins.enabled.i386", true);
|
||||
|
|
|
@ -1011,6 +1011,12 @@
|
|||
label="&changeSearchSettings.button;"/>
|
||||
</content>
|
||||
<implementation>
|
||||
<!-- Popup rollup is triggered by native events before the mousedown event
|
||||
reaches the DOM. The will be set to true by the popuphiding event and
|
||||
false after the mousedown event has been triggered to detect what
|
||||
caused rollup. -->
|
||||
<field name="_isHiding">false</field>
|
||||
|
||||
<method name="updateHeader">
|
||||
<body><![CDATA[
|
||||
let currentEngine = Services.search.currentEngine;
|
||||
|
@ -1264,6 +1270,13 @@
|
|||
installCallback);
|
||||
}
|
||||
]]></handler>
|
||||
|
||||
<handler event="popuphiding"><![CDATA[
|
||||
this._isHiding = true;
|
||||
setTimeout(() => {
|
||||
this._isHiding = false;
|
||||
}, 0);
|
||||
]]></handler>
|
||||
</handlers>
|
||||
</binding>
|
||||
|
||||
|
|
|
@ -678,6 +678,7 @@
|
|||
]]></destructor>
|
||||
|
||||
<field name="_ignoreFocus">false</field>
|
||||
<field name="_clickClosedPopup">false</field>
|
||||
|
||||
<method name="rebuildPopup">
|
||||
<body><![CDATA[
|
||||
|
@ -749,6 +750,13 @@
|
|||
this.openSuggestionsPanel();
|
||||
]]></handler>
|
||||
|
||||
<handler event="mousedown" phase="capturing">
|
||||
<![CDATA[
|
||||
if (event.originalTarget.getAttribute("anonid") == "searchbar-search-button") {
|
||||
this._clickClosedPopup = this._textbox.popup._isHiding;
|
||||
}
|
||||
]]></handler>
|
||||
|
||||
<handler event="click" button="0">
|
||||
<![CDATA[
|
||||
// Ignore clicks on the search go button.
|
||||
|
@ -756,10 +764,16 @@
|
|||
return;
|
||||
}
|
||||
|
||||
let isIconClick = event.originalTarget.getAttribute("anonid") == "searchbar-search-button";
|
||||
|
||||
// Ignore clicks on the icon if they were made to close the popup
|
||||
if (isIconClick && this._clickClosedPopup) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Open the suggestions whenever clicking on the search icon or if there
|
||||
// is text in the textbox.
|
||||
if (event.originalTarget.getAttribute("anonid") == "searchbar-search-button" ||
|
||||
this._textbox.value) {
|
||||
if (isIconClick || this._textbox.value) {
|
||||
this.openSuggestionsPanel(true);
|
||||
}
|
||||
]]></handler>
|
||||
|
|
|
@ -7,6 +7,23 @@ const goButton = document.getAnonymousElementByAttribute(searchbar, "anonid", "s
|
|||
const textbox = searchbar._textbox;
|
||||
const searchPopup = document.getElementById("PopupSearchAutoComplete");
|
||||
|
||||
const isWindows = Services.appinfo.OS == "WINNT";
|
||||
const mouseDown = isWindows ? 2 : 1;
|
||||
const mouseUp = isWindows ? 4 : 2;
|
||||
const utils = window.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIDOMWindowUtils);
|
||||
const scale = utils.screenPixelsPerCSSPixel;
|
||||
|
||||
function synthesizeNativeMouseClick(aElement) {
|
||||
let rect = aElement.getBoundingClientRect();
|
||||
let win = aElement.ownerDocument.defaultView;
|
||||
let x = win.mozInnerScreenX + (rect.left + rect.right) / 2;
|
||||
let y = win.mozInnerScreenY + (rect.top + rect.bottom) / 2;
|
||||
|
||||
utils.sendNativeMouseEvent(x * scale, y * scale, mouseDown, 0, null);
|
||||
utils.sendNativeMouseEvent(x * scale, y * scale, mouseUp, 0, null);
|
||||
}
|
||||
|
||||
function promiseNewEngine(basename) {
|
||||
return new Promise((resolve, reject) => {
|
||||
info("Waiting for engine to be added: " + basename);
|
||||
|
@ -77,6 +94,7 @@ add_no_popup_task(function* open_icon_context() {
|
|||
});
|
||||
|
||||
// With no text in the search box left clicking the icon should open the popup.
|
||||
// Clicking the icon again should hide the popup and not show it again.
|
||||
add_task(function* open_empty() {
|
||||
gURLBar.focus();
|
||||
|
||||
|
@ -85,11 +103,27 @@ add_task(function* open_empty() {
|
|||
EventUtils.synthesizeMouseAtCenter(searchIcon, {});
|
||||
yield promise;
|
||||
is(searchPopup.getAttribute("showonlysettings"), "true", "Should only show the settings");
|
||||
is(textbox.mController.searchString, "", "Should be an empty search string");
|
||||
|
||||
// By giving the textbox some text any next attempt to open the search popup
|
||||
// from the click handler will try to search for this text.
|
||||
textbox.value = "foo";
|
||||
|
||||
promise = promiseEvent(searchPopup, "popuphidden");
|
||||
let clickPromise = promiseEvent(searchIcon, "click");
|
||||
|
||||
info("Hiding popup");
|
||||
searchPopup.hidePopup();
|
||||
synthesizeNativeMouseClick(searchIcon);
|
||||
yield promise;
|
||||
|
||||
is(textbox.mController.searchString, "", "Should not have started to search for the new text");
|
||||
|
||||
// Cancel the search if it started.
|
||||
if (textbox.mController.searchString != "") {
|
||||
textbox.mController.stopSearch();
|
||||
}
|
||||
|
||||
textbox.value = "";
|
||||
});
|
||||
|
||||
// With no text in the search box left clicking it should not open the popup.
|
||||
|
@ -223,29 +257,6 @@ add_no_popup_task(function* tab_doesnt_open_popup() {
|
|||
textbox.value = "";
|
||||
});
|
||||
|
||||
// Clicks outside the search popup should close the popup but not consume the click.
|
||||
add_task(function* dont_consume_clicks() {
|
||||
gURLBar.focus();
|
||||
textbox.value = "foo";
|
||||
|
||||
let promise = promiseEvent(searchPopup, "popupshown");
|
||||
EventUtils.synthesizeMouseAtCenter(textbox, {});
|
||||
yield promise;
|
||||
isnot(searchPopup.getAttribute("showonlysettings"), "true", "Should show the full popup");
|
||||
|
||||
is(Services.focus.focusedElement, textbox.inputField, "Should have focused the search bar");
|
||||
is(textbox.selectionStart, 0, "Should have selected all of the text");
|
||||
is(textbox.selectionEnd, 3, "Should have selected all of the text");
|
||||
|
||||
promise = promiseEvent(searchPopup, "popuphidden");
|
||||
EventUtils.synthesizeMouseAtCenter(gURLBar, {});
|
||||
yield promise;
|
||||
|
||||
is(Services.focus.focusedElement, gURLBar.inputField, "Should have focused the URL bar");
|
||||
|
||||
textbox.value = "";
|
||||
});
|
||||
|
||||
// Switching back to the window when the search box has focus from mouse should not open the popup.
|
||||
add_task(function* refocus_window_doesnt_open_popup_mouse() {
|
||||
gURLBar.focus();
|
||||
|
@ -335,3 +346,26 @@ add_no_popup_task(function* search_go_doesnt_open_popup() {
|
|||
textbox.value = "";
|
||||
gBrowser.removeCurrentTab();
|
||||
});
|
||||
|
||||
// Clicks outside the search popup should close the popup but not consume the click.
|
||||
add_task(function* dont_consume_clicks() {
|
||||
gURLBar.focus();
|
||||
textbox.value = "foo";
|
||||
|
||||
let promise = promiseEvent(searchPopup, "popupshown");
|
||||
EventUtils.synthesizeMouseAtCenter(textbox, {});
|
||||
yield promise;
|
||||
isnot(searchPopup.getAttribute("showonlysettings"), "true", "Should show the full popup");
|
||||
|
||||
is(Services.focus.focusedElement, textbox.inputField, "Should have focused the search bar");
|
||||
is(textbox.selectionStart, 0, "Should have selected all of the text");
|
||||
is(textbox.selectionEnd, 3, "Should have selected all of the text");
|
||||
|
||||
promise = promiseEvent(searchPopup, "popuphidden");
|
||||
synthesizeNativeMouseClick(gURLBar);
|
||||
yield promise;
|
||||
|
||||
is(Services.focus.focusedElement, gURLBar.inputField, "Should have focused the URL bar");
|
||||
|
||||
textbox.value = "";
|
||||
});
|
||||
|
|
|
@ -28,29 +28,8 @@
|
|||
<toolbarbutton id="record-button"
|
||||
class="devtools-toolbarbutton"
|
||||
tooltiptext="&profilerUI.recordButton.tooltip;"/>
|
||||
<toolbarbutton id="clear-button"
|
||||
class="devtools-toolbarbutton"
|
||||
label="&profilerUI.clearButton;"/>
|
||||
</hbox>
|
||||
<spacer flex="1"></spacer>
|
||||
<hbox id="performance-toolbar-controls-storage" class="devtools-toolbarbutton-group">
|
||||
<toolbarbutton id="import-button"
|
||||
class="devtools-toolbarbutton"
|
||||
label="&profilerUI.importButton;"/>
|
||||
<toolbarbutton id="export-button"
|
||||
class="devtools-toolbarbutton"
|
||||
label="&profilerUI.exportButton;"/>
|
||||
</hbox>
|
||||
</toolbar>
|
||||
|
||||
<vbox id="overview-pane">
|
||||
<hbox id="markers-overview"/>
|
||||
<hbox id="memory-overview"/>
|
||||
<hbox id="time-framerate"/>
|
||||
</vbox>
|
||||
|
||||
<toolbar id="details-toolbar" class="devtools-toolbar">
|
||||
<hbox class="devtools-toolbarbutton-group">
|
||||
<hbox id="performance-toolbar-controls-detail-views" class="devtools-toolbarbutton-group">
|
||||
<toolbarbutton id="select-waterfall-view"
|
||||
class="devtools-toolbarbutton"
|
||||
data-view="waterfall" />
|
||||
|
@ -61,11 +40,30 @@
|
|||
class="devtools-toolbarbutton"
|
||||
data-view="flamegraph" />
|
||||
</hbox>
|
||||
<spacer flex="1"></spacer>
|
||||
<hbox id="performance-toolbar-controls-storage" class="devtools-toolbarbutton-group">
|
||||
<toolbarbutton id="import-button"
|
||||
class="devtools-toolbarbutton"
|
||||
label="&profilerUI.importButton;"/>
|
||||
<toolbarbutton id="export-button"
|
||||
class="devtools-toolbarbutton"
|
||||
label="&profilerUI.exportButton;"/>
|
||||
<toolbarbutton id="clear-button"
|
||||
class="devtools-toolbarbutton"
|
||||
label="&profilerUI.clearButton;"/>
|
||||
</hbox>
|
||||
</toolbar>
|
||||
|
||||
<vbox id="overview-pane">
|
||||
<hbox id="markers-overview"/>
|
||||
<hbox id="memory-overview"/>
|
||||
<hbox id="time-framerate"/>
|
||||
</vbox>
|
||||
|
||||
<deck id="details-pane" flex="1">
|
||||
|
||||
<hbox id="waterfall-view" flex="1">
|
||||
<vbox id="waterfall-graph" flex="1" />
|
||||
<vbox id="waterfall-breakdown" flex="1" />
|
||||
<splitter class="devtools-side-splitter"/>
|
||||
<vbox id="waterfall-details"
|
||||
class="theme-sidebar"
|
||||
|
|
|
@ -16,26 +16,26 @@ let WaterfallView = {
|
|||
this._onMarkerSelected = this._onMarkerSelected.bind(this);
|
||||
this._onResize = this._onResize.bind(this);
|
||||
|
||||
this.graph = new Waterfall($("#waterfall-graph"), $("#details-pane"), TIMELINE_BLUEPRINT);
|
||||
this.markerDetails = new MarkerDetails($("#waterfall-details"), $("#waterfall-view > splitter"));
|
||||
this.waterfall = new Waterfall($("#waterfall-breakdown"), $("#details-pane"), TIMELINE_BLUEPRINT);
|
||||
this.details = new MarkerDetails($("#waterfall-details"), $("#waterfall-view > splitter"));
|
||||
|
||||
this.graph.on("selected", this._onMarkerSelected);
|
||||
this.graph.on("unselected", this._onMarkerSelected);
|
||||
this.markerDetails.on("resize", this._onResize);
|
||||
this.waterfall.on("selected", this._onMarkerSelected);
|
||||
this.waterfall.on("unselected", this._onMarkerSelected);
|
||||
this.details.on("resize", this._onResize);
|
||||
|
||||
PerformanceController.on(EVENTS.RECORDING_STARTED, this._onRecordingStarted);
|
||||
PerformanceController.on(EVENTS.RECORDING_STOPPED, this._onRecordingStopped);
|
||||
|
||||
this.graph.recalculateBounds();
|
||||
this.waterfall.recalculateBounds();
|
||||
}),
|
||||
|
||||
/**
|
||||
* Unbinds events.
|
||||
*/
|
||||
destroy: function () {
|
||||
this.graph.off("selected", this._onMarkerSelected);
|
||||
this.graph.off("unselected", this._onMarkerSelected);
|
||||
this.markerDetails.off("resize", this._onResize);
|
||||
this.waterfall.off("selected", this._onMarkerSelected);
|
||||
this.waterfall.off("unselected", this._onMarkerSelected);
|
||||
this.details.off("resize", this._onResize);
|
||||
|
||||
PerformanceController.off(EVENTS.RECORDING_STARTED, this._onRecordingStarted);
|
||||
PerformanceController.off(EVENTS.RECORDING_STOPPED, this._onRecordingStopped);
|
||||
|
@ -48,7 +48,8 @@ let WaterfallView = {
|
|||
let { startTime, endTime } = PerformanceController.getInterval();
|
||||
let markers = PerformanceController.getMarkers();
|
||||
|
||||
this.graph.setData(markers, startTime, startTime, endTime);
|
||||
this.waterfall.setData(markers, startTime, startTime, endTime);
|
||||
|
||||
this.emit(EVENTS.WATERFALL_RENDERED);
|
||||
},
|
||||
|
||||
|
@ -56,7 +57,7 @@ let WaterfallView = {
|
|||
* Called when recording starts.
|
||||
*/
|
||||
_onRecordingStarted: function () {
|
||||
this.graph.clearView();
|
||||
this.waterfall.clearView();
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -72,14 +73,14 @@ let WaterfallView = {
|
|||
*/
|
||||
_onMarkerSelected: function (event, marker) {
|
||||
if (event === "selected") {
|
||||
this.markerDetails.render({
|
||||
this.details.render({
|
||||
toolbox: gToolbox,
|
||||
marker: marker,
|
||||
frames: PerformanceController.getFrames()
|
||||
});
|
||||
}
|
||||
if (event === "unselected") {
|
||||
this.markerDetails.empty();
|
||||
this.details.empty();
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -87,7 +88,7 @@ let WaterfallView = {
|
|||
* Called when the marker details view is resized.
|
||||
*/
|
||||
_onResize: function () {
|
||||
this.graph.recalculateBounds();
|
||||
this.waterfall.recalculateBounds();
|
||||
this.render();
|
||||
}
|
||||
};
|
||||
|
|
|
@ -24,10 +24,11 @@ let DetailsView = {
|
|||
*/
|
||||
initialize: Task.async(function *() {
|
||||
this.el = $("#details-pane");
|
||||
this.toolbar = $("#performance-toolbar-controls-detail-views");
|
||||
|
||||
this._onViewToggle = this._onViewToggle.bind(this);
|
||||
|
||||
for (let button of $$("toolbarbutton[data-view]", $("#details-toolbar"))) {
|
||||
for (let button of $$("toolbarbutton[data-view]", this.toolbar)) {
|
||||
button.addEventListener("command", this._onViewToggle);
|
||||
}
|
||||
|
||||
|
@ -42,7 +43,7 @@ let DetailsView = {
|
|||
* Unbinds events, destroys subviews.
|
||||
*/
|
||||
destroy: Task.async(function *() {
|
||||
for (let button of $$("toolbarbutton[data-view]", $("#details-toolbar"))) {
|
||||
for (let button of $$("toolbarbutton[data-view]", this.toolbar)) {
|
||||
button.removeEventListener("command", this._onViewToggle);
|
||||
}
|
||||
|
||||
|
@ -61,7 +62,7 @@ let DetailsView = {
|
|||
selectView: function (selectedView) {
|
||||
this.el.selectedIndex = this.viewIndexes[selectedView];
|
||||
|
||||
for (let button of $$("toolbarbutton[data-view]", $("#details-toolbar"))) {
|
||||
for (let button of $$("toolbarbutton[data-view]", this.toolbar)) {
|
||||
if (button.getAttribute("data-view") === selectedView) {
|
||||
button.setAttribute("checked", true);
|
||||
} else {
|
||||
|
|
|
@ -11,10 +11,10 @@ const OVERVIEW_UPDATE_INTERVAL = 200; // ms
|
|||
const FRAMERATE_GRAPH_LOW_RES_INTERVAL = 100; // ms
|
||||
const FRAMERATE_GRAPH_HIGH_RES_INTERVAL = 16; // ms
|
||||
|
||||
const FRAMERATE_GRAPH_HEIGHT = 45; // px
|
||||
const FRAMERATE_GRAPH_HEIGHT = 40; // px
|
||||
const MARKERS_GRAPH_HEADER_HEIGHT = 14; // px
|
||||
const MARKERS_GRAPH_ROW_HEIGHT = 11; // px
|
||||
const MARKERS_GROUP_VERTICAL_PADDING = 5; // px
|
||||
const MARKERS_GRAPH_ROW_HEIGHT = 10; // px
|
||||
const MARKERS_GROUP_VERTICAL_PADDING = 4; // px
|
||||
const MEMORY_GRAPH_HEIGHT = 30; // px
|
||||
|
||||
const GRAPH_SCROLL_EVENTS_DRAIN = 50; // ms
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
// Tests that text metrics in the flame graph widget work properly.
|
||||
|
||||
let HTML_NS = "http://www.w3.org/1999/xhtml";
|
||||
let FLAME_GRAPH_BLOCK_TEXT_FONT_SIZE = 9; // px
|
||||
let FLAME_GRAPH_BLOCK_TEXT_FONT_SIZE = 8; // px
|
||||
let FLAME_GRAPH_BLOCK_TEXT_FONT_FAMILY = "sans-serif";
|
||||
let {ViewHelpers} = Cu.import("resource:///modules/devtools/ViewHelpers.jsm", {});
|
||||
let {FlameGraph} = Cu.import("resource:///modules/devtools/FlameGraph.jsm", {});
|
||||
|
@ -38,28 +38,33 @@ function testGraph(graph) {
|
|||
is(graph._overflowCharWidth, getCharWidth(L10N.ellipsis),
|
||||
"The ellipsis char width was calculated correctly.");
|
||||
|
||||
is(graph._getTextWidthApprox("This text is maybe overflowing"),
|
||||
getAverageCharWidth() * 30,
|
||||
let text = "This text is maybe overflowing";
|
||||
let text1000px = graph._getFittedText(text, 1000);
|
||||
let text50px = graph._getFittedText(text, 50);
|
||||
let text10px = graph._getFittedText(text, 10);
|
||||
let text1px = graph._getFittedText(text, 1);
|
||||
|
||||
is(graph._getTextWidthApprox(text), getAverageCharWidth() * text.length,
|
||||
"The approximate width was calculated correctly.");
|
||||
|
||||
is(graph._getFittedText("This text is maybe overflowing", 1000),
|
||||
"This text is maybe overflowing",
|
||||
info("Text at 1000px width: " + text1000px);
|
||||
info("Text at 50px width : " + text50px);
|
||||
info("Text at 10px width : " + text10px);
|
||||
info("Text at 1px width : " + text1px);
|
||||
|
||||
is(text1000px, text,
|
||||
"The fitted text for 1000px width is correct.");
|
||||
|
||||
isnot(graph._getFittedText("This text is maybe overflowing", 100),
|
||||
"This text is maybe overflowing",
|
||||
"The fitted text for 100px width is correct (1).");
|
||||
isnot(text50px, text,
|
||||
"The fitted text for 50px width is correct (1).");
|
||||
|
||||
ok(graph._getFittedText("This text is maybe overflowing", 100)
|
||||
.contains(L10N.ellipsis),
|
||||
"The fitted text for 100px width is correct (2).");
|
||||
ok(text50px.contains(L10N.ellipsis),
|
||||
"The fitted text for 50px width is correct (2).");
|
||||
|
||||
is(graph._getFittedText("This text is maybe overflowing", 10),
|
||||
L10N.ellipsis,
|
||||
is(graph._getFittedText(text, 10), L10N.ellipsis,
|
||||
"The fitted text for 10px width is correct.");
|
||||
|
||||
is(graph._getFittedText("This text is maybe overflowing", 1),
|
||||
"",
|
||||
is(graph._getFittedText(text, 1), "",
|
||||
"The fitted text for 1px width is correct.");
|
||||
}
|
||||
|
||||
|
|
|
@ -111,7 +111,7 @@ let EXPECTED_OUTPUT = [{
|
|||
x: 50,
|
||||
y: 0,
|
||||
width: 410,
|
||||
height: 12,
|
||||
height: 11,
|
||||
text: "A"
|
||||
}]
|
||||
}, {
|
||||
|
@ -121,9 +121,9 @@ let EXPECTED_OUTPUT = [{
|
|||
rawLocation: "B"
|
||||
},
|
||||
x: 50,
|
||||
y: 12,
|
||||
y: 11,
|
||||
width: 160,
|
||||
height: 12,
|
||||
height: 11,
|
||||
text: "B"
|
||||
}, {
|
||||
srcData: {
|
||||
|
@ -131,9 +131,9 @@ let EXPECTED_OUTPUT = [{
|
|||
rawLocation: "B"
|
||||
},
|
||||
x: 330,
|
||||
y: 12,
|
||||
y: 11,
|
||||
width: 130,
|
||||
height: 12,
|
||||
height: 11,
|
||||
text: "B"
|
||||
}]
|
||||
}, {
|
||||
|
@ -145,7 +145,7 @@ let EXPECTED_OUTPUT = [{
|
|||
x: 0,
|
||||
y: 0,
|
||||
width: 50,
|
||||
height: 12,
|
||||
height: 11,
|
||||
text: "M"
|
||||
}, {
|
||||
srcData: {
|
||||
|
@ -153,9 +153,9 @@ let EXPECTED_OUTPUT = [{
|
|||
rawLocation: "C"
|
||||
},
|
||||
x: 50,
|
||||
y: 24,
|
||||
y: 22,
|
||||
width: 50,
|
||||
height: 12,
|
||||
height: 11,
|
||||
text: "C"
|
||||
}, {
|
||||
srcData: {
|
||||
|
@ -163,9 +163,9 @@ let EXPECTED_OUTPUT = [{
|
|||
rawLocation: "C"
|
||||
},
|
||||
x: 330,
|
||||
y: 24,
|
||||
y: 22,
|
||||
width: 130,
|
||||
height: 12,
|
||||
height: 11,
|
||||
text: "C"
|
||||
}]
|
||||
}, {
|
||||
|
@ -175,9 +175,9 @@ let EXPECTED_OUTPUT = [{
|
|||
rawLocation: "N"
|
||||
},
|
||||
x: 0,
|
||||
y: 12,
|
||||
y: 11,
|
||||
width: 50,
|
||||
height: 12,
|
||||
height: 11,
|
||||
text: "N"
|
||||
}, {
|
||||
srcData: {
|
||||
|
@ -185,9 +185,9 @@ let EXPECTED_OUTPUT = [{
|
|||
rawLocation: "D"
|
||||
},
|
||||
x: 100,
|
||||
y: 24,
|
||||
y: 22,
|
||||
width: 110,
|
||||
height: 12,
|
||||
height: 11,
|
||||
text: "D"
|
||||
}, {
|
||||
srcData: {
|
||||
|
@ -197,7 +197,7 @@ let EXPECTED_OUTPUT = [{
|
|||
x: 460,
|
||||
y: 0,
|
||||
width: 40,
|
||||
height: 12,
|
||||
height: 11,
|
||||
text: "X"
|
||||
}]
|
||||
}, {
|
||||
|
@ -207,9 +207,9 @@ let EXPECTED_OUTPUT = [{
|
|||
rawLocation: "E"
|
||||
},
|
||||
x: 210,
|
||||
y: 12,
|
||||
y: 11,
|
||||
width: 120,
|
||||
height: 12,
|
||||
height: 11,
|
||||
text: "E"
|
||||
}, {
|
||||
srcData: {
|
||||
|
@ -217,9 +217,9 @@ let EXPECTED_OUTPUT = [{
|
|||
rawLocation: "Y"
|
||||
},
|
||||
x: 460,
|
||||
y: 12,
|
||||
y: 11,
|
||||
width: 40,
|
||||
height: 12,
|
||||
height: 11,
|
||||
text: "Y"
|
||||
}]
|
||||
}, {
|
||||
|
@ -229,9 +229,9 @@ let EXPECTED_OUTPUT = [{
|
|||
rawLocation: "P"
|
||||
},
|
||||
x: 0,
|
||||
y: 24,
|
||||
y: 22,
|
||||
width: 50,
|
||||
height: 12,
|
||||
height: 11,
|
||||
text: "P"
|
||||
}, {
|
||||
srcData: {
|
||||
|
@ -239,9 +239,9 @@ let EXPECTED_OUTPUT = [{
|
|||
rawLocation: "F"
|
||||
},
|
||||
x: 210,
|
||||
y: 24,
|
||||
y: 22,
|
||||
width: 120,
|
||||
height: 12,
|
||||
height: 11,
|
||||
text: "F"
|
||||
}, {
|
||||
srcData: {
|
||||
|
@ -249,9 +249,9 @@ let EXPECTED_OUTPUT = [{
|
|||
rawLocation: "Z"
|
||||
},
|
||||
x: 460,
|
||||
y: 24,
|
||||
y: 22,
|
||||
width: 40,
|
||||
height: 12,
|
||||
height: 11,
|
||||
text: "Z"
|
||||
}]
|
||||
}, {
|
||||
|
|
|
@ -29,7 +29,7 @@ const GRAPH_MIN_SELECTION_WIDTH = 10; // ms
|
|||
const TIMELINE_TICKS_MULTIPLE = 5; // ms
|
||||
const TIMELINE_TICKS_SPACING_MIN = 75; // px
|
||||
|
||||
const OVERVIEW_HEADER_HEIGHT = 18; // px
|
||||
const OVERVIEW_HEADER_HEIGHT = 16; // px
|
||||
const OVERVIEW_HEADER_SAFE_BOUNDS = 50; // px
|
||||
const OVERVIEW_HEADER_TEXT_COLOR = "#18191a";
|
||||
const OVERVIEW_HEADER_TEXT_FONT_SIZE = 9; // px
|
||||
|
@ -40,9 +40,9 @@ const OVERVIEW_TIMELINE_STROKES = "#ddd";
|
|||
|
||||
const FLAME_GRAPH_BLOCK_BORDER = 1; // px
|
||||
const FLAME_GRAPH_BLOCK_TEXT_COLOR = "#000";
|
||||
const FLAME_GRAPH_BLOCK_TEXT_FONT_SIZE = 9; // px
|
||||
const FLAME_GRAPH_BLOCK_TEXT_FONT_SIZE = 8; // px
|
||||
const FLAME_GRAPH_BLOCK_TEXT_FONT_FAMILY = "sans-serif";
|
||||
const FLAME_GRAPH_BLOCK_TEXT_PADDING_TOP = 1; // px
|
||||
const FLAME_GRAPH_BLOCK_TEXT_PADDING_TOP = 0; // px
|
||||
const FLAME_GRAPH_BLOCK_TEXT_PADDING_LEFT = 3; // px
|
||||
const FLAME_GRAPH_BLOCK_TEXT_PADDING_RIGHT = 3; // px
|
||||
|
||||
|
@ -799,7 +799,7 @@ FlameGraph.prototype = {
|
|||
}
|
||||
};
|
||||
|
||||
const FLAME_GRAPH_BLOCK_HEIGHT = 12; // px
|
||||
const FLAME_GRAPH_BLOCK_HEIGHT = 11; // px
|
||||
|
||||
const PALLETTE_SIZE = 10;
|
||||
const PALLETTE_HUE_OFFSET = Math.random() * 90;
|
||||
|
|
|
@ -240,7 +240,7 @@ MarkersOverview.prototype = Heritage.extend(AbstractCanvasGraph.prototype, {
|
|||
this.selectionStripesColor = setAlpha("#fff", 0.1);
|
||||
this.headerBackgroundColor = getColor("body-background", theme);
|
||||
this.headerTextColor = getColor("body-color", theme);
|
||||
this.headerTimelineStrokeColor = setAlpha(getColor("body-color-alt", theme), 0.1);
|
||||
this.headerTimelineStrokeColor = setAlpha(getColor("body-color-alt", theme), 0.25);
|
||||
this.alternatingBackgroundColor = setAlpha(getColor("body-color", theme), 0.05);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -276,7 +276,8 @@
|
|||
}
|
||||
|
||||
.waterfall-header-name {
|
||||
padding: 4px;
|
||||
padding: 2px 4px;
|
||||
font-size: 90%;
|
||||
}
|
||||
|
||||
.waterfall-header-tick {
|
||||
|
|
|
@ -386,17 +386,17 @@ class RepatchIonCache : public IonCache
|
|||
{
|
||||
}
|
||||
|
||||
virtual void reset();
|
||||
virtual void reset() MOZ_OVERRIDE;
|
||||
|
||||
// Set the initial jump state of the cache. The initialJump is the inline
|
||||
// jump that will point to out-of-line code (such as the slow path, or
|
||||
// stubs), and the rejoinLabel is the position that all out-of-line paths
|
||||
// will rejoin to.
|
||||
void emitInitialJump(MacroAssembler &masm, AddCacheState &addState);
|
||||
void bindInitialJump(MacroAssembler &masm, AddCacheState &addState);
|
||||
void emitInitialJump(MacroAssembler &masm, AddCacheState &addState) MOZ_OVERRIDE;
|
||||
void bindInitialJump(MacroAssembler &masm, AddCacheState &addState) MOZ_OVERRIDE;
|
||||
|
||||
// Update the labels once the code is finalized.
|
||||
void updateBaseAddress(JitCode *code, MacroAssembler &masm);
|
||||
void updateBaseAddress(JitCode *code, MacroAssembler &masm) MOZ_OVERRIDE;
|
||||
|
||||
virtual void *rejoinAddress() MOZ_OVERRIDE {
|
||||
return rejoinLabel().raw();
|
||||
|
@ -492,14 +492,14 @@ class DispatchIonCache : public IonCache
|
|||
{
|
||||
}
|
||||
|
||||
virtual void reset();
|
||||
virtual void initializeAddCacheState(LInstruction *ins, AddCacheState *addState);
|
||||
virtual void reset() MOZ_OVERRIDE;
|
||||
virtual void initializeAddCacheState(LInstruction *ins, AddCacheState *addState) MOZ_OVERRIDE;
|
||||
|
||||
void emitInitialJump(MacroAssembler &masm, AddCacheState &addState);
|
||||
void bindInitialJump(MacroAssembler &masm, AddCacheState &addState);
|
||||
void emitInitialJump(MacroAssembler &masm, AddCacheState &addState) MOZ_OVERRIDE;
|
||||
void bindInitialJump(MacroAssembler &masm, AddCacheState &addState) MOZ_OVERRIDE;
|
||||
|
||||
// Fix up the first stub pointer once the code is finalized.
|
||||
void updateBaseAddress(JitCode *code, MacroAssembler &masm);
|
||||
void updateBaseAddress(JitCode *code, MacroAssembler &masm) MOZ_OVERRIDE;
|
||||
|
||||
virtual void *rejoinAddress() MOZ_OVERRIDE {
|
||||
return rejoinLabel_.raw();
|
||||
|
|
|
@ -1029,14 +1029,14 @@ class LInstructionHelper : public LInstruction
|
|||
temps_[index] = a;
|
||||
}
|
||||
|
||||
size_t numSuccessors() const {
|
||||
size_t numSuccessors() const MOZ_OVERRIDE {
|
||||
return 0;
|
||||
}
|
||||
MBasicBlock *getSuccessor(size_t i) const {
|
||||
MBasicBlock *getSuccessor(size_t i) const MOZ_OVERRIDE {
|
||||
MOZ_ASSERT(false);
|
||||
return nullptr;
|
||||
}
|
||||
void setSuccessor(size_t i, MBasicBlock *successor) {
|
||||
void setSuccessor(size_t i, MBasicBlock *successor) MOZ_OVERRIDE {
|
||||
MOZ_ASSERT(false);
|
||||
}
|
||||
|
||||
|
|
1418
js/src/jit/MIR.h
1418
js/src/jit/MIR.h
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -198,7 +198,7 @@ BEGIN_TEST(testChromeBuffer)
|
|||
|
||||
return true;
|
||||
}
|
||||
virtual void uninit() {
|
||||
virtual void uninit() MOZ_OVERRIDE {
|
||||
trusted_glob = nullptr;
|
||||
trusted_fun = nullptr;
|
||||
JS::RemoveObjectRoot(cx, &trusted_glob);
|
||||
|
|
|
@ -52,7 +52,7 @@ BEGIN_TEST(testGCOutOfMemory)
|
|||
return true;
|
||||
}
|
||||
|
||||
virtual JSRuntime * createRuntime() {
|
||||
virtual JSRuntime * createRuntime() MOZ_OVERRIDE {
|
||||
JSRuntime *rt = JS_NewRuntime(768 * 1024);
|
||||
if (!rt)
|
||||
return nullptr;
|
||||
|
@ -60,7 +60,7 @@ virtual JSRuntime * createRuntime() {
|
|||
return rt;
|
||||
}
|
||||
|
||||
virtual void destroyRuntime() {
|
||||
virtual void destroyRuntime() MOZ_OVERRIDE {
|
||||
JS_DestroyRuntime(rt);
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ BEGIN_TEST(testOOM)
|
|||
return true;
|
||||
}
|
||||
|
||||
virtual JSRuntime * createRuntime()
|
||||
virtual JSRuntime * createRuntime() MOZ_OVERRIDE
|
||||
{
|
||||
JSRuntime *rt = JS_NewRuntime(0);
|
||||
if (!rt)
|
||||
|
|
|
@ -317,8 +317,8 @@ class JSAPITest
|
|||
#define BEGIN_TEST(testname) \
|
||||
class cls_##testname : public JSAPITest { \
|
||||
public: \
|
||||
virtual const char * name() { return #testname; } \
|
||||
virtual bool run(JS::HandleObject global)
|
||||
virtual const char * name() MOZ_OVERRIDE { return #testname; } \
|
||||
virtual bool run(JS::HandleObject global) MOZ_OVERRIDE
|
||||
|
||||
#define END_TEST(testname) \
|
||||
}; \
|
||||
|
@ -335,8 +335,8 @@ class JSAPITest
|
|||
#define BEGIN_FIXTURE_TEST(fixture, testname) \
|
||||
class cls_##testname : public fixture { \
|
||||
public: \
|
||||
virtual const char * name() { return #testname; } \
|
||||
virtual bool run(JS::HandleObject global)
|
||||
virtual const char * name() MOZ_OVERRIDE { return #testname; } \
|
||||
virtual bool run(JS::HandleObject global) MOZ_OVERRIDE
|
||||
|
||||
#define END_FIXTURE_TEST(fixture, testname) \
|
||||
}; \
|
||||
|
|
|
@ -409,7 +409,7 @@ class JS_PUBLIC_API(DirectProxyHandler) : public BaseProxyHandler
|
|||
unsigned indent) const MOZ_OVERRIDE;
|
||||
virtual bool regexp_toShared(JSContext *cx, HandleObject proxy,
|
||||
RegExpGuard *g) const MOZ_OVERRIDE;
|
||||
virtual bool boxedValue_unbox(JSContext *cx, HandleObject proxy, MutableHandleValue vp) const;
|
||||
virtual bool boxedValue_unbox(JSContext *cx, HandleObject proxy, MutableHandleValue vp) const MOZ_OVERRIDE;
|
||||
virtual bool isCallable(JSObject *obj) const MOZ_OVERRIDE;
|
||||
virtual JSObject *weakmapKeyDelegate(JSObject *proxy) const MOZ_OVERRIDE;
|
||||
};
|
||||
|
|
|
@ -1574,7 +1574,7 @@ class DebugScopeProxy : public BaseProxyHandler
|
|||
}
|
||||
|
||||
bool getOwnPropertyDescriptor(JSContext *cx, HandleObject proxy, HandleId id,
|
||||
MutableHandle<PropertyDescriptor> desc) const
|
||||
MutableHandle<PropertyDescriptor> desc) const MOZ_OVERRIDE
|
||||
{
|
||||
Rooted<DebugScopeObject*> debugScope(cx, &proxy->as<DebugScopeObject>());
|
||||
Rooted<ScopeObject*> scope(cx, &debugScope->scope());
|
||||
|
@ -1732,7 +1732,7 @@ class DebugScopeProxy : public BaseProxyHandler
|
|||
JS_PROPERTYOP_SETTER(desc.setter()));
|
||||
}
|
||||
|
||||
bool ownPropertyKeys(JSContext *cx, HandleObject proxy, AutoIdVector &props) const
|
||||
bool ownPropertyKeys(JSContext *cx, HandleObject proxy, AutoIdVector &props) const MOZ_OVERRIDE
|
||||
{
|
||||
Rooted<ScopeObject*> scope(cx, &proxy->as<DebugScopeObject>().scope());
|
||||
|
||||
|
|
|
@ -10,20 +10,6 @@
|
|||
#include "nsStyleContext.h"
|
||||
#include "nsBidiUtils.h"
|
||||
|
||||
// If WRITING_MODE_VERTICAL_ENABLED is defined, we will attempt to support
|
||||
// the vertical writing-mode values; if it is not defined, then
|
||||
// WritingMode.IsVertical() will be hard-coded to return false, allowing
|
||||
// many conditional branches to be optimized away while we're in the process
|
||||
// of transitioning layout to use writing-mode and logical directions, but
|
||||
// not yet ready to ship vertical support.
|
||||
|
||||
// XXX To be removed, and the #ifdef blocks below made unconditional,
|
||||
// once we're confident we can leave it permanently enabled.
|
||||
|
||||
#ifndef RELEASE_BUILD
|
||||
#define WRITING_MODE_VERTICAL_ENABLED 1
|
||||
#endif
|
||||
|
||||
// It is the caller's responsibility to operate on logical-coordinate objects
|
||||
// with matched writing modes. Failure to do so will be a runtime bug; the
|
||||
// compiler can't catch it, but in debug mode, we'll throw an assertion.
|
||||
|
@ -190,11 +176,7 @@ public:
|
|||
* True if vertical writing mode, i.e. when
|
||||
* writing-mode: vertical-lr | vertical-rl.
|
||||
*/
|
||||
#ifdef WRITING_MODE_VERTICAL_ENABLED
|
||||
bool IsVertical() const { return !!(mWritingMode & eOrientationMask); }
|
||||
#else
|
||||
bool IsVertical() const { return false; }
|
||||
#endif
|
||||
|
||||
/**
|
||||
* True if line-over/line-under are inverted from block-start/block-end.
|
||||
|
@ -202,11 +184,7 @@ public:
|
|||
* - writing-mode is vertical-rl && text-orientation is sideways-left
|
||||
* - writing-mode is vertical-lr && text-orientation is not sideways-left
|
||||
*/
|
||||
#ifdef WRITING_MODE_VERTICAL_ENABLED
|
||||
bool IsLineInverted() const { return !!(mWritingMode & eLineOrientMask); }
|
||||
#else
|
||||
bool IsLineInverted() const { return false; }
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Block-axis flow-relative to line-relative factor.
|
||||
|
@ -227,11 +205,7 @@ public:
|
|||
* due to text-orientation:mixed resolution, but in that case the dominant
|
||||
* baseline remains centered.
|
||||
*/
|
||||
#ifdef WRITING_MODE_VERTICAL_ENABLED
|
||||
bool IsSideways() const { return !!(mWritingMode & eSidewaysMask); }
|
||||
#else
|
||||
bool IsSideways() const { return false; }
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Default constructor gives us a horizontal, LTR writing mode.
|
||||
|
@ -251,7 +225,6 @@ public:
|
|||
|
||||
const nsStyleVisibility* styleVisibility = aStyleContext->StyleVisibility();
|
||||
|
||||
#ifdef WRITING_MODE_VERTICAL_ENABLED
|
||||
switch (styleVisibility->mWritingMode) {
|
||||
case NS_STYLE_WRITING_MODE_HORIZONTAL_TB:
|
||||
mWritingMode = 0;
|
||||
|
@ -294,9 +267,6 @@ public:
|
|||
mWritingMode = 0;
|
||||
break;
|
||||
}
|
||||
#else
|
||||
mWritingMode = 0;
|
||||
#endif
|
||||
|
||||
if (NS_STYLE_DIRECTION_RTL == styleVisibility->mDirection) {
|
||||
mWritingMode |= eInlineFlowMask | //XXX needs update when text-orientation added
|
||||
|
|
|
@ -59,6 +59,8 @@ import org.mozilla.gecko.home.SearchEngine;
|
|||
import org.mozilla.gecko.menu.GeckoMenu;
|
||||
import org.mozilla.gecko.menu.GeckoMenuItem;
|
||||
import org.mozilla.gecko.mozglue.ContextUtils;
|
||||
import org.mozilla.gecko.mozglue.ContextUtils.SafeIntent;
|
||||
import org.mozilla.gecko.mozglue.RobocopTarget;
|
||||
import org.mozilla.gecko.preferences.ClearOnShutdownPref;
|
||||
import org.mozilla.gecko.preferences.GeckoPreferences;
|
||||
import org.mozilla.gecko.prompts.Prompt;
|
||||
|
@ -170,6 +172,9 @@ public class BrowserApp extends GeckoApp
|
|||
// Request ID for startActivityForResult.
|
||||
private static final int ACTIVITY_REQUEST_PREFERENCES = 1001;
|
||||
|
||||
@RobocopTarget
|
||||
public static final String EXTRA_SKIP_STARTPANE = "skipstartpane";
|
||||
|
||||
public static final String PREF_STARTPANE_ENABLED = "startpane_enabled";
|
||||
|
||||
private BrowserSearch mBrowserSearch;
|
||||
|
@ -682,20 +687,26 @@ public class BrowserApp extends GeckoApp
|
|||
}
|
||||
|
||||
/**
|
||||
* Check and show Onboarding start pane if Firefox has never been launched and
|
||||
* Check and show onboarding start pane if the browser has never been launched and
|
||||
* is not opening an external link from another application.
|
||||
*
|
||||
* @param context Context of application; used to show Start Pane if appropriate
|
||||
* @param intentAction Intent that launched this activity
|
||||
* @param intent Intent that launched this activity
|
||||
*/
|
||||
private void checkStartPane(Context context, String intentAction) {
|
||||
private void checkStartPane(Context context, SafeIntent intent) {
|
||||
if (intent.getBooleanExtra(EXTRA_SKIP_STARTPANE, false)) {
|
||||
// Note that we don't set the pref, so subsequent launches can result
|
||||
// in the start pane being shown.
|
||||
return;
|
||||
}
|
||||
|
||||
final StrictMode.ThreadPolicy savedPolicy = StrictMode.allowThreadDiskReads();
|
||||
|
||||
try {
|
||||
final SharedPreferences prefs = GeckoSharedPrefs.forProfile(this);
|
||||
|
||||
if (prefs.getBoolean(PREF_STARTPANE_ENABLED, false)) {
|
||||
if (!Intent.ACTION_VIEW.equals(intentAction)) {
|
||||
if (!Intent.ACTION_VIEW.equals(intent.getAction())) {
|
||||
final DialogFragment dialog = new StartPane();
|
||||
dialog.show(getSupportFragmentManager(), ONBOARD_STARTPANE_TAG);
|
||||
}
|
||||
|
@ -741,8 +752,8 @@ public class BrowserApp extends GeckoApp
|
|||
|
||||
@Override
|
||||
public void onAttachedToWindow() {
|
||||
// We can't show Onboarding until Gecko has finished initialization (bug 1077583).
|
||||
checkStartPane(this, getIntent().getAction());
|
||||
// We can't show the first run experience until Gecko has finished initialization (bug 1077583).
|
||||
checkStartPane(this, new SafeIntent(getIntent()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
android:inputType="textUri|textNoSuggestions"
|
||||
android:imeOptions="actionGo|flagNoExtractUi|flagNoFullscreen"
|
||||
android:selectAllOnFocus="true"
|
||||
android:contentDescription="@string/url_bar_default_text"
|
||||
gecko:autoUpdateTheme="false"/>
|
||||
|
||||
</merge>
|
||||
|
|
|
@ -16,6 +16,7 @@ import org.json.JSONArray;
|
|||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
import org.mozilla.gecko.Actions;
|
||||
import org.mozilla.gecko.BrowserApp;
|
||||
import org.mozilla.gecko.Driver;
|
||||
import org.mozilla.gecko.Element;
|
||||
import org.mozilla.gecko.FennecNativeActions;
|
||||
|
@ -25,7 +26,6 @@ import org.mozilla.gecko.GeckoEvent;
|
|||
import org.mozilla.gecko.GeckoProfile;
|
||||
import org.mozilla.gecko.GeckoThread;
|
||||
import org.mozilla.gecko.GeckoThread.LaunchState;
|
||||
import org.mozilla.gecko.NewTabletUI;
|
||||
import org.mozilla.gecko.R;
|
||||
import org.mozilla.gecko.RobocopUtils;
|
||||
import org.mozilla.gecko.Tab;
|
||||
|
@ -113,7 +113,12 @@ abstract class BaseTest extends BaseRobocopTest {
|
|||
// Create the intent to be used with all the important arguments.
|
||||
Intent i = new Intent(Intent.ACTION_MAIN);
|
||||
mProfile = mConfig.get("profile");
|
||||
|
||||
// Don't show the first run experience.
|
||||
i.putExtra(BrowserApp.EXTRA_SKIP_STARTPANE, true);
|
||||
|
||||
i.putExtra("args", "-no-remote -profile " + mProfile);
|
||||
|
||||
String envString = mConfig.get("envvars");
|
||||
if (envString != "") {
|
||||
String[] envStrings = envString.split(",");
|
||||
|
|
|
@ -8,6 +8,7 @@ import java.util.Map;
|
|||
|
||||
import org.mozilla.gecko.Actions;
|
||||
import org.mozilla.gecko.Assert;
|
||||
import org.mozilla.gecko.BrowserApp;
|
||||
import org.mozilla.gecko.Driver;
|
||||
import org.mozilla.gecko.FennecNativeActions;
|
||||
import org.mozilla.gecko.FennecNativeDriver;
|
||||
|
@ -193,6 +194,9 @@ abstract class UITest extends BaseRobocopTest
|
|||
private static Intent createActivityIntent(final Map<String, String> config) {
|
||||
final Intent intent = new Intent(Intent.ACTION_MAIN);
|
||||
|
||||
// Don't show the first run experience.
|
||||
intent.putExtra(BrowserApp.EXTRA_SKIP_STARTPANE, true);
|
||||
|
||||
final String profile = config.get("profile");
|
||||
intent.putExtra("args", "-no-remote -profile " + profile);
|
||||
|
||||
|
|
|
@ -32,6 +32,8 @@ import android.view.inputmethod.EditorInfo;
|
|||
import android.view.inputmethod.InputConnection;
|
||||
import android.view.inputmethod.InputConnectionWrapper;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.view.ViewParent;
|
||||
import android.view.accessibility.AccessibilityEvent;
|
||||
import android.widget.TextView;
|
||||
|
||||
/**
|
||||
|
@ -118,6 +120,21 @@ public class ToolbarEditText extends CustomEditText
|
|||
resetAutocompleteState();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendAccessibilityEventUnchecked(AccessibilityEvent event) {
|
||||
// We need to bypass the isShown() check in the default implementation
|
||||
// for TYPE_VIEW_TEXT_SELECTION_CHANGED events so that accessibility
|
||||
// services could detect a url change.
|
||||
if (event.getEventType() == AccessibilityEvent.TYPE_VIEW_TEXT_SELECTION_CHANGED &&
|
||||
getParent() != null && !isShown()) {
|
||||
onInitializeAccessibilityEvent(event);
|
||||
dispatchPopulateAccessibilityEvent(event);
|
||||
getParent().requestSendAccessibilityEvent(this, event);
|
||||
} else {
|
||||
super.sendAccessibilityEventUnchecked(event);
|
||||
}
|
||||
}
|
||||
|
||||
void setToolbarPrefs(final ToolbarPrefs prefs) {
|
||||
mPrefs = prefs;
|
||||
}
|
||||
|
|
|
@ -243,9 +243,9 @@ public:
|
|||
private:
|
||||
virtual ~nsPrefLocalizedString();
|
||||
|
||||
NS_IMETHOD GetData(char16_t**);
|
||||
NS_IMETHOD SetData(const char16_t* aData);
|
||||
NS_IMETHOD SetDataWithLength(uint32_t aLength, const char16_t *aData);
|
||||
NS_IMETHOD GetData(char16_t**) MOZ_OVERRIDE;
|
||||
NS_IMETHOD SetData(const char16_t* aData) MOZ_OVERRIDE;
|
||||
NS_IMETHOD SetDataWithLength(uint32_t aLength, const char16_t *aData) MOZ_OVERRIDE;
|
||||
|
||||
nsCOMPtr<nsISupportsString> mUnicodeString;
|
||||
};
|
||||
|
|
|
@ -55,7 +55,7 @@ public:
|
|||
// as network specific items like cancels.
|
||||
bool SoftStreamError(nsresult code)
|
||||
{
|
||||
if (NS_SUCCEEDED(code)) {
|
||||
if (NS_SUCCEEDED(code) || code == NS_BASE_STREAM_WOULD_BLOCK) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -174,6 +174,27 @@ Http2BigListener.prototype.onStopRequest = function(request, ctx, status) {
|
|||
do_test_finished();
|
||||
};
|
||||
|
||||
var Http2HugeSuspendedListener = function() {};
|
||||
|
||||
Http2HugeSuspendedListener.prototype = new Http2CheckListener();
|
||||
Http2HugeSuspendedListener.prototype.count = 0;
|
||||
|
||||
Http2HugeSuspendedListener.prototype.onDataAvailable = function(request, ctx, stream, off, cnt) {
|
||||
this.onDataAvailableFired = true;
|
||||
this.isHttp2Connection = checkIsHttp2(request);
|
||||
this.count += cnt;
|
||||
read_stream(stream, cnt);
|
||||
};
|
||||
|
||||
Http2HugeSuspendedListener.prototype.onStopRequest = function(request, ctx, status) {
|
||||
do_check_true(this.onStartRequestFired);
|
||||
do_check_true(this.onDataAvailableFired);
|
||||
do_check_true(this.isHttp2Connection);
|
||||
do_check_eq(this.count, 1024 * 1024 * 1); // 1mb of data expected
|
||||
run_next_test();
|
||||
do_test_finished();
|
||||
};
|
||||
|
||||
// Does the appropriate checks for POSTs
|
||||
var Http2PostListener = function(expected_md5) {
|
||||
this.expected_md5 = expected_md5;
|
||||
|
@ -333,6 +354,14 @@ function test_http2_big() {
|
|||
chan.asyncOpen(listener, null);
|
||||
}
|
||||
|
||||
function test_http2_huge_suspended() {
|
||||
var chan = makeChan("https://localhost:6944/huge");
|
||||
var listener = new Http2HugeSuspendedListener();
|
||||
chan.asyncOpen(listener, null);
|
||||
chan.suspend();
|
||||
do_timeout(500, chan.resume);
|
||||
}
|
||||
|
||||
// Support for doing a POST
|
||||
function do_post(content, chan, listener) {
|
||||
var stream = Cc["@mozilla.org/io/string-input-stream;1"]
|
||||
|
@ -565,6 +594,7 @@ var tests = [ test_http2_post_big
|
|||
, test_http2_cookie_crumbling
|
||||
, test_http2_multiplex
|
||||
, test_http2_big
|
||||
, test_http2_huge_suspended
|
||||
, test_http2_post
|
||||
, test_http2_pushapi_1
|
||||
// These next two must always come in this order
|
||||
|
|
|
@ -353,7 +353,7 @@ class OSXBootstrapper(BaseBootstrapper):
|
|||
def suggest_homebrew_mobile_android_mozconfig(self):
|
||||
import android
|
||||
# We could probably fish this path from |brew info android-sdk|.
|
||||
sdk_path = '/usr/local/opt/android-sdk/platform/%s' % android.ANDROID_PLATFORM
|
||||
sdk_path = '/usr/local/opt/android-sdk/platforms/%s' % android.ANDROID_PLATFORM
|
||||
ndk_path = '/usr/local/opt/android-ndk'
|
||||
android.suggest_mozconfig(sdk_path=sdk_path, ndk_path=ndk_path)
|
||||
|
||||
|
|
|
@ -108,20 +108,20 @@ public:
|
|||
NS_DECL_NSIEXPATSINK
|
||||
|
||||
// nsIContentSink
|
||||
NS_IMETHOD WillParse(void);
|
||||
NS_IMETHOD WillBuildModel(nsDTDMode aDTDMode);
|
||||
NS_IMETHOD DidBuildModel(bool aTerminated);
|
||||
NS_IMETHOD WillInterrupt(void);
|
||||
NS_IMETHOD WillResume(void);
|
||||
NS_IMETHOD SetParser(nsParserBase* aParser);
|
||||
virtual void FlushPendingNotifications(mozFlushType aType) { }
|
||||
NS_IMETHOD SetDocumentCharset(nsACString& aCharset) { return NS_OK; }
|
||||
virtual nsISupports *GetTarget() { return nullptr; }
|
||||
NS_IMETHOD WillParse(void) MOZ_OVERRIDE;
|
||||
NS_IMETHOD WillBuildModel(nsDTDMode aDTDMode) MOZ_OVERRIDE;
|
||||
NS_IMETHOD DidBuildModel(bool aTerminated) MOZ_OVERRIDE;
|
||||
NS_IMETHOD WillInterrupt(void) MOZ_OVERRIDE;
|
||||
NS_IMETHOD WillResume(void) MOZ_OVERRIDE;
|
||||
NS_IMETHOD SetParser(nsParserBase* aParser) MOZ_OVERRIDE;
|
||||
virtual void FlushPendingNotifications(mozFlushType aType) MOZ_OVERRIDE { }
|
||||
NS_IMETHOD SetDocumentCharset(nsACString& aCharset) MOZ_OVERRIDE { return NS_OK; }
|
||||
virtual nsISupports *GetTarget() MOZ_OVERRIDE { return nullptr; }
|
||||
|
||||
// nsIRDFContentSink
|
||||
NS_IMETHOD Init(nsIURI* aURL);
|
||||
NS_IMETHOD SetDataSource(nsIRDFDataSource* aDataSource);
|
||||
NS_IMETHOD GetDataSource(nsIRDFDataSource*& aDataSource);
|
||||
NS_IMETHOD Init(nsIURI* aURL) MOZ_OVERRIDE;
|
||||
NS_IMETHOD SetDataSource(nsIRDFDataSource* aDataSource) MOZ_OVERRIDE;
|
||||
NS_IMETHOD GetDataSource(nsIRDFDataSource*& aDataSource) MOZ_OVERRIDE;
|
||||
|
||||
// pseudo constants
|
||||
static int32_t gRefCnt;
|
||||
|
|
|
@ -530,7 +530,7 @@ public:
|
|||
NS_DECL_NSIRDFNODE
|
||||
|
||||
// nsIRDFDate
|
||||
NS_IMETHOD GetValue(PRTime *value);
|
||||
NS_IMETHOD GetValue(PRTime *value) MOZ_OVERRIDE;
|
||||
|
||||
private:
|
||||
virtual ~DateImpl();
|
||||
|
@ -637,7 +637,7 @@ public:
|
|||
NS_DECL_NSIRDFNODE
|
||||
|
||||
// nsIRDFInt
|
||||
NS_IMETHOD GetValue(int32_t *value);
|
||||
NS_IMETHOD GetValue(int32_t *value) MOZ_OVERRIDE;
|
||||
|
||||
private:
|
||||
virtual ~IntImpl();
|
||||
|
|
|
@ -158,118 +158,118 @@ public:
|
|||
nsIRDFDataSource)
|
||||
|
||||
// nsIRDFDataSource
|
||||
NS_IMETHOD GetURI(char* *uri);
|
||||
NS_IMETHOD GetURI(char* *uri) MOZ_OVERRIDE;
|
||||
|
||||
NS_IMETHOD GetSource(nsIRDFResource* property,
|
||||
nsIRDFNode* target,
|
||||
bool tv,
|
||||
nsIRDFResource** source) {
|
||||
nsIRDFResource** source) MOZ_OVERRIDE {
|
||||
return mInner->GetSource(property, target, tv, source);
|
||||
}
|
||||
|
||||
NS_IMETHOD GetSources(nsIRDFResource* property,
|
||||
nsIRDFNode* target,
|
||||
bool tv,
|
||||
nsISimpleEnumerator** sources) {
|
||||
nsISimpleEnumerator** sources) MOZ_OVERRIDE {
|
||||
return mInner->GetSources(property, target, tv, sources);
|
||||
}
|
||||
|
||||
NS_IMETHOD GetTarget(nsIRDFResource* source,
|
||||
nsIRDFResource* property,
|
||||
bool tv,
|
||||
nsIRDFNode** target) {
|
||||
nsIRDFNode** target) MOZ_OVERRIDE {
|
||||
return mInner->GetTarget(source, property, tv, target);
|
||||
}
|
||||
|
||||
NS_IMETHOD GetTargets(nsIRDFResource* source,
|
||||
nsIRDFResource* property,
|
||||
bool tv,
|
||||
nsISimpleEnumerator** targets) {
|
||||
nsISimpleEnumerator** targets) MOZ_OVERRIDE {
|
||||
return mInner->GetTargets(source, property, tv, targets);
|
||||
}
|
||||
|
||||
NS_IMETHOD Assert(nsIRDFResource* aSource,
|
||||
nsIRDFResource* aProperty,
|
||||
nsIRDFNode* aTarget,
|
||||
bool tv);
|
||||
bool tv) MOZ_OVERRIDE;
|
||||
|
||||
NS_IMETHOD Unassert(nsIRDFResource* source,
|
||||
nsIRDFResource* property,
|
||||
nsIRDFNode* target);
|
||||
nsIRDFNode* target) MOZ_OVERRIDE;
|
||||
|
||||
NS_IMETHOD Change(nsIRDFResource* aSource,
|
||||
nsIRDFResource* aProperty,
|
||||
nsIRDFNode* aOldTarget,
|
||||
nsIRDFNode* aNewTarget);
|
||||
nsIRDFNode* aNewTarget) MOZ_OVERRIDE;
|
||||
|
||||
NS_IMETHOD Move(nsIRDFResource* aOldSource,
|
||||
nsIRDFResource* aNewSource,
|
||||
nsIRDFResource* aProperty,
|
||||
nsIRDFNode* aTarget);
|
||||
nsIRDFNode* aTarget) MOZ_OVERRIDE;
|
||||
|
||||
NS_IMETHOD HasAssertion(nsIRDFResource* source,
|
||||
nsIRDFResource* property,
|
||||
nsIRDFNode* target,
|
||||
bool tv,
|
||||
bool* hasAssertion) {
|
||||
bool* hasAssertion) MOZ_OVERRIDE {
|
||||
return mInner->HasAssertion(source, property, target, tv, hasAssertion);
|
||||
}
|
||||
|
||||
NS_IMETHOD AddObserver(nsIRDFObserver* aObserver) {
|
||||
NS_IMETHOD AddObserver(nsIRDFObserver* aObserver) MOZ_OVERRIDE {
|
||||
return mInner->AddObserver(aObserver);
|
||||
}
|
||||
|
||||
NS_IMETHOD RemoveObserver(nsIRDFObserver* aObserver) {
|
||||
NS_IMETHOD RemoveObserver(nsIRDFObserver* aObserver) MOZ_OVERRIDE {
|
||||
return mInner->RemoveObserver(aObserver);
|
||||
}
|
||||
|
||||
NS_IMETHOD HasArcIn(nsIRDFNode *aNode, nsIRDFResource *aArc, bool *_retval) {
|
||||
NS_IMETHOD HasArcIn(nsIRDFNode *aNode, nsIRDFResource *aArc, bool *_retval) MOZ_OVERRIDE {
|
||||
return mInner->HasArcIn(aNode, aArc, _retval);
|
||||
}
|
||||
|
||||
NS_IMETHOD HasArcOut(nsIRDFResource *aSource, nsIRDFResource *aArc, bool *_retval) {
|
||||
NS_IMETHOD HasArcOut(nsIRDFResource *aSource, nsIRDFResource *aArc, bool *_retval) MOZ_OVERRIDE {
|
||||
return mInner->HasArcOut(aSource, aArc, _retval);
|
||||
}
|
||||
|
||||
NS_IMETHOD ArcLabelsIn(nsIRDFNode* node,
|
||||
nsISimpleEnumerator** labels) {
|
||||
nsISimpleEnumerator** labels) MOZ_OVERRIDE {
|
||||
return mInner->ArcLabelsIn(node, labels);
|
||||
}
|
||||
|
||||
NS_IMETHOD ArcLabelsOut(nsIRDFResource* source,
|
||||
nsISimpleEnumerator** labels) {
|
||||
nsISimpleEnumerator** labels) MOZ_OVERRIDE {
|
||||
return mInner->ArcLabelsOut(source, labels);
|
||||
}
|
||||
|
||||
NS_IMETHOD GetAllResources(nsISimpleEnumerator** aResult) {
|
||||
NS_IMETHOD GetAllResources(nsISimpleEnumerator** aResult) MOZ_OVERRIDE {
|
||||
return mInner->GetAllResources(aResult);
|
||||
}
|
||||
|
||||
NS_IMETHOD GetAllCmds(nsIRDFResource* source,
|
||||
nsISimpleEnumerator/*<nsIRDFResource>*/** commands) {
|
||||
nsISimpleEnumerator/*<nsIRDFResource>*/** commands) MOZ_OVERRIDE {
|
||||
return mInner->GetAllCmds(source, commands);
|
||||
}
|
||||
|
||||
NS_IMETHOD IsCommandEnabled(nsISupportsArray/*<nsIRDFResource>*/* aSources,
|
||||
nsIRDFResource* aCommand,
|
||||
nsISupportsArray/*<nsIRDFResource>*/* aArguments,
|
||||
bool* aResult) {
|
||||
bool* aResult) MOZ_OVERRIDE {
|
||||
return mInner->IsCommandEnabled(aSources, aCommand, aArguments, aResult);
|
||||
}
|
||||
|
||||
NS_IMETHOD DoCommand(nsISupportsArray/*<nsIRDFResource>*/* aSources,
|
||||
nsIRDFResource* aCommand,
|
||||
nsISupportsArray/*<nsIRDFResource>*/* aArguments) {
|
||||
nsISupportsArray/*<nsIRDFResource>*/* aArguments) MOZ_OVERRIDE {
|
||||
// XXX Uh oh, this could cause problems wrt. the "dirty" flag
|
||||
// if it changes the in-memory store's internal state.
|
||||
return mInner->DoCommand(aSources, aCommand, aArguments);
|
||||
}
|
||||
|
||||
NS_IMETHOD BeginUpdateBatch() {
|
||||
NS_IMETHOD BeginUpdateBatch() MOZ_OVERRIDE {
|
||||
return mInner->BeginUpdateBatch();
|
||||
}
|
||||
|
||||
NS_IMETHOD EndUpdateBatch() {
|
||||
NS_IMETHOD EndUpdateBatch() MOZ_OVERRIDE {
|
||||
return mInner->EndUpdateBatch();
|
||||
}
|
||||
|
||||
|
@ -295,14 +295,14 @@ public:
|
|||
NS_DECL_NSICHANNELEVENTSINK
|
||||
|
||||
// rdfIDataSource
|
||||
NS_IMETHOD VisitAllSubjects(rdfITripleVisitor *aVisitor) {
|
||||
NS_IMETHOD VisitAllSubjects(rdfITripleVisitor *aVisitor) MOZ_OVERRIDE {
|
||||
nsresult rv;
|
||||
nsCOMPtr<rdfIDataSource> rdfds = do_QueryInterface(mInner, &rv);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
return rdfds->VisitAllSubjects(aVisitor);
|
||||
}
|
||||
|
||||
NS_IMETHOD VisitAllTriples(rdfITripleVisitor *aVisitor) {
|
||||
NS_IMETHOD VisitAllTriples(rdfITripleVisitor *aVisitor) MOZ_OVERRIDE {
|
||||
nsresult rv;
|
||||
nsCOMPtr<rdfIDataSource> rdfds = do_QueryInterface(mInner, &rv);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
|
|
@ -66,60 +66,60 @@ public:
|
|||
|
||||
// nsIRDFDataSource interface. Most of these are just delegated to
|
||||
// the inner, in-memory datasource.
|
||||
NS_IMETHOD GetURI(char* *aURI);
|
||||
NS_IMETHOD GetURI(char* *aURI) MOZ_OVERRIDE;
|
||||
|
||||
NS_IMETHOD GetSource(nsIRDFResource* aProperty,
|
||||
nsIRDFNode* aTarget,
|
||||
bool aTruthValue,
|
||||
nsIRDFResource** aSource) {
|
||||
nsIRDFResource** aSource) MOZ_OVERRIDE {
|
||||
return mInner->GetSource(aProperty, aTarget, aTruthValue, aSource);
|
||||
}
|
||||
|
||||
NS_IMETHOD GetSources(nsIRDFResource* aProperty,
|
||||
nsIRDFNode* aTarget,
|
||||
bool aTruthValue,
|
||||
nsISimpleEnumerator** aSources) {
|
||||
nsISimpleEnumerator** aSources) MOZ_OVERRIDE {
|
||||
return mInner->GetSources(aProperty, aTarget, aTruthValue, aSources);
|
||||
}
|
||||
|
||||
NS_IMETHOD GetTarget(nsIRDFResource* aSource,
|
||||
nsIRDFResource* aProperty,
|
||||
bool aTruthValue,
|
||||
nsIRDFNode** aTarget) {
|
||||
nsIRDFNode** aTarget) MOZ_OVERRIDE {
|
||||
return mInner->GetTarget(aSource, aProperty, aTruthValue, aTarget);
|
||||
}
|
||||
|
||||
NS_IMETHOD GetTargets(nsIRDFResource* aSource,
|
||||
nsIRDFResource* aProperty,
|
||||
bool aTruthValue,
|
||||
nsISimpleEnumerator** aTargets) {
|
||||
nsISimpleEnumerator** aTargets) MOZ_OVERRIDE {
|
||||
return mInner->GetTargets(aSource, aProperty, aTruthValue, aTargets);
|
||||
}
|
||||
|
||||
NS_IMETHOD Assert(nsIRDFResource* aSource,
|
||||
nsIRDFResource* aProperty,
|
||||
nsIRDFNode* aTarget,
|
||||
bool aTruthValue) {
|
||||
bool aTruthValue) MOZ_OVERRIDE {
|
||||
return mInner->Assert(aSource, aProperty, aTarget, aTruthValue);
|
||||
}
|
||||
|
||||
NS_IMETHOD Unassert(nsIRDFResource* aSource,
|
||||
nsIRDFResource* aProperty,
|
||||
nsIRDFNode* aTarget) {
|
||||
nsIRDFNode* aTarget) MOZ_OVERRIDE {
|
||||
return mInner->Unassert(aSource, aProperty, aTarget);
|
||||
}
|
||||
|
||||
NS_IMETHOD Change(nsIRDFResource* aSource,
|
||||
nsIRDFResource* aProperty,
|
||||
nsIRDFNode* aOldTarget,
|
||||
nsIRDFNode* aNewTarget) {
|
||||
nsIRDFNode* aNewTarget) MOZ_OVERRIDE {
|
||||
return mInner->Change(aSource, aProperty, aOldTarget, aNewTarget);
|
||||
}
|
||||
|
||||
NS_IMETHOD Move(nsIRDFResource* aOldSource,
|
||||
nsIRDFResource* aNewSource,
|
||||
nsIRDFResource* aProperty,
|
||||
nsIRDFNode* aTarget) {
|
||||
nsIRDFNode* aTarget) MOZ_OVERRIDE {
|
||||
return mInner->Move(aOldSource, aNewSource, aProperty, aTarget);
|
||||
}
|
||||
|
||||
|
@ -127,65 +127,65 @@ public:
|
|||
nsIRDFResource* aProperty,
|
||||
nsIRDFNode* aTarget,
|
||||
bool aTruthValue,
|
||||
bool* hasAssertion) {
|
||||
bool* hasAssertion) MOZ_OVERRIDE {
|
||||
return mInner->HasAssertion(aSource, aProperty, aTarget, aTruthValue, hasAssertion);
|
||||
}
|
||||
|
||||
NS_IMETHOD AddObserver(nsIRDFObserver* aObserver) {
|
||||
NS_IMETHOD AddObserver(nsIRDFObserver* aObserver) MOZ_OVERRIDE {
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHOD RemoveObserver(nsIRDFObserver* aObserver) {
|
||||
NS_IMETHOD RemoveObserver(nsIRDFObserver* aObserver) MOZ_OVERRIDE {
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHOD HasArcIn(nsIRDFNode *aNode, nsIRDFResource *aArc, bool *_retval) {
|
||||
NS_IMETHOD HasArcIn(nsIRDFNode *aNode, nsIRDFResource *aArc, bool *_retval) MOZ_OVERRIDE {
|
||||
return mInner->HasArcIn(aNode, aArc, _retval);
|
||||
}
|
||||
|
||||
NS_IMETHOD HasArcOut(nsIRDFResource *aSource, nsIRDFResource *aArc, bool *_retval) {
|
||||
NS_IMETHOD HasArcOut(nsIRDFResource *aSource, nsIRDFResource *aArc, bool *_retval) MOZ_OVERRIDE {
|
||||
return mInner->HasArcOut(aSource, aArc, _retval);
|
||||
}
|
||||
|
||||
NS_IMETHOD ArcLabelsIn(nsIRDFNode* aNode,
|
||||
nsISimpleEnumerator** aLabels) {
|
||||
nsISimpleEnumerator** aLabels) MOZ_OVERRIDE {
|
||||
return mInner->ArcLabelsIn(aNode, aLabels);
|
||||
}
|
||||
|
||||
NS_IMETHOD ArcLabelsOut(nsIRDFResource* aSource,
|
||||
nsISimpleEnumerator** aLabels) {
|
||||
nsISimpleEnumerator** aLabels) MOZ_OVERRIDE {
|
||||
return mInner->ArcLabelsOut(aSource, aLabels);
|
||||
}
|
||||
|
||||
NS_IMETHOD GetAllResources(nsISimpleEnumerator** aResult) {
|
||||
NS_IMETHOD GetAllResources(nsISimpleEnumerator** aResult) MOZ_OVERRIDE {
|
||||
return mInner->GetAllResources(aResult);
|
||||
}
|
||||
|
||||
NS_IMETHOD GetAllCmds(nsIRDFResource* aSource,
|
||||
nsISimpleEnumerator/*<nsIRDFResource>*/** aCommands);
|
||||
nsISimpleEnumerator/*<nsIRDFResource>*/** aCommands) MOZ_OVERRIDE;
|
||||
|
||||
NS_IMETHOD IsCommandEnabled(nsISupportsArray/*<nsIRDFResource>*/* aSources,
|
||||
nsIRDFResource* aCommand,
|
||||
nsISupportsArray/*<nsIRDFResource>*/* aArguments,
|
||||
bool* aResult);
|
||||
bool* aResult) MOZ_OVERRIDE;
|
||||
|
||||
NS_IMETHOD DoCommand(nsISupportsArray/*<nsIRDFResource>*/* aSources,
|
||||
nsIRDFResource* aCommand,
|
||||
nsISupportsArray/*<nsIRDFResource>*/* aArguments);
|
||||
nsISupportsArray/*<nsIRDFResource>*/* aArguments) MOZ_OVERRIDE;
|
||||
|
||||
NS_IMETHOD BeginUpdateBatch() {
|
||||
NS_IMETHOD BeginUpdateBatch() MOZ_OVERRIDE {
|
||||
return mInner->BeginUpdateBatch();
|
||||
}
|
||||
|
||||
NS_IMETHOD EndUpdateBatch() {
|
||||
NS_IMETHOD EndUpdateBatch() MOZ_OVERRIDE {
|
||||
return mInner->EndUpdateBatch();
|
||||
}
|
||||
|
||||
NS_IMETHOD GetLoaded(bool* _result);
|
||||
NS_IMETHOD Init(const char *uri);
|
||||
NS_IMETHOD Flush();
|
||||
NS_IMETHOD FlushTo(const char *aURI);
|
||||
NS_IMETHOD Refresh(bool sync);
|
||||
NS_IMETHOD GetLoaded(bool* _result) MOZ_OVERRIDE;
|
||||
NS_IMETHOD Init(const char *uri) MOZ_OVERRIDE;
|
||||
NS_IMETHOD Flush() MOZ_OVERRIDE;
|
||||
NS_IMETHOD FlushTo(const char *aURI) MOZ_OVERRIDE;
|
||||
NS_IMETHOD Refresh(bool sync) MOZ_OVERRIDE;
|
||||
|
||||
// nsIObserver
|
||||
NS_DECL_NSIOBSERVER
|
||||
|
|
|
@ -66,35 +66,35 @@ public:
|
|||
NS_DECL_ISUPPORTS
|
||||
|
||||
// nsIOutputStream interface
|
||||
NS_IMETHOD Close(void) {
|
||||
NS_IMETHOD Close(void) MOZ_OVERRIDE {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHOD Write(const char* aBuf, uint32_t aCount, uint32_t *aWriteCount) {
|
||||
NS_IMETHOD Write(const char* aBuf, uint32_t aCount, uint32_t *aWriteCount) MOZ_OVERRIDE {
|
||||
PR_Write(PR_GetSpecialFD(PR_StandardOutput), aBuf, aCount);
|
||||
*aWriteCount = aCount;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHOD
|
||||
WriteFrom(nsIInputStream *inStr, uint32_t count, uint32_t *_retval) {
|
||||
WriteFrom(nsIInputStream *inStr, uint32_t count, uint32_t *_retval) MOZ_OVERRIDE {
|
||||
NS_NOTREACHED("WriteFrom");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHOD
|
||||
WriteSegments(nsReadSegmentFun reader, void * closure, uint32_t count, uint32_t *_retval) {
|
||||
WriteSegments(nsReadSegmentFun reader, void * closure, uint32_t count, uint32_t *_retval) MOZ_OVERRIDE {
|
||||
NS_NOTREACHED("WriteSegments");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHOD
|
||||
IsNonBlocking(bool *aNonBlocking) {
|
||||
IsNonBlocking(bool *aNonBlocking) MOZ_OVERRIDE {
|
||||
NS_NOTREACHED("IsNonBlocking");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHOD Flush(void) {
|
||||
NS_IMETHOD Flush(void) MOZ_OVERRIDE {
|
||||
PR_Sync(PR_GetSpecialFD(PR_StandardOutput));
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -64,35 +64,35 @@ public:
|
|||
NS_DECL_ISUPPORTS
|
||||
|
||||
// nsIOutputStream interface
|
||||
NS_IMETHOD Close(void) {
|
||||
NS_IMETHOD Close(void) MOZ_OVERRIDE {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHOD Write(const char* aBuf, uint32_t aCount, uint32_t *aWriteCount) {
|
||||
NS_IMETHOD Write(const char* aBuf, uint32_t aCount, uint32_t *aWriteCount) MOZ_OVERRIDE {
|
||||
PR_Write(PR_GetSpecialFD(PR_StandardOutput), aBuf, aCount);
|
||||
*aWriteCount = aCount;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHOD
|
||||
WriteFrom(nsIInputStream *inStr, uint32_t count, uint32_t *_retval) {
|
||||
WriteFrom(nsIInputStream *inStr, uint32_t count, uint32_t *_retval) MOZ_OVERRIDE {
|
||||
NS_NOTREACHED("WriteFrom");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHOD
|
||||
WriteSegments(nsReadSegmentFun reader, void * closure, uint32_t count, uint32_t *_retval) {
|
||||
WriteSegments(nsReadSegmentFun reader, void * closure, uint32_t count, uint32_t *_retval) MOZ_OVERRIDE {
|
||||
NS_NOTREACHED("WriteSegments");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHOD
|
||||
IsNonBlocking(bool *aNonBlocking) {
|
||||
IsNonBlocking(bool *aNonBlocking) MOZ_OVERRIDE {
|
||||
NS_NOTREACHED("IsNonBlocking");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHOD Flush(void) {
|
||||
NS_IMETHOD Flush(void) MOZ_OVERRIDE {
|
||||
PR_Sync(PR_GetSpecialFD(PR_StandardOutput));
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -25,16 +25,16 @@ public:
|
|||
NS_DECL_THREADSAFE_ISUPPORTS
|
||||
|
||||
// nsIRDFNode methods:
|
||||
NS_IMETHOD EqualsNode(nsIRDFNode* aNode, bool* aResult);
|
||||
NS_IMETHOD EqualsNode(nsIRDFNode* aNode, bool* aResult) MOZ_OVERRIDE;
|
||||
|
||||
// nsIRDFResource methods:
|
||||
NS_IMETHOD Init(const char* aURI);
|
||||
NS_IMETHOD GetValue(char* *aURI);
|
||||
NS_IMETHOD GetValueUTF8(nsACString& aResult);
|
||||
NS_IMETHOD GetValueConst(const char** aURI);
|
||||
NS_IMETHOD EqualsString(const char* aURI, bool* aResult);
|
||||
NS_IMETHOD GetDelegate(const char* aKey, REFNSIID aIID, void** aResult);
|
||||
NS_IMETHOD ReleaseDelegate(const char* aKey);
|
||||
NS_IMETHOD Init(const char* aURI) MOZ_OVERRIDE;
|
||||
NS_IMETHOD GetValue(char* *aURI) MOZ_OVERRIDE;
|
||||
NS_IMETHOD GetValueUTF8(nsACString& aResult) MOZ_OVERRIDE;
|
||||
NS_IMETHOD GetValueConst(const char** aURI) MOZ_OVERRIDE;
|
||||
NS_IMETHOD EqualsString(const char* aURI, bool* aResult) MOZ_OVERRIDE;
|
||||
NS_IMETHOD GetDelegate(const char* aKey, REFNSIID aIID, void** aResult) MOZ_OVERRIDE;
|
||||
NS_IMETHOD ReleaseDelegate(const char* aKey) MOZ_OVERRIDE;
|
||||
|
||||
// nsRDFResource methods:
|
||||
nsRDFResource(void);
|
||||
|
|
|
@ -378,7 +378,7 @@ class DeviceManagerADB(DeviceManager):
|
|||
envCnt += 1
|
||||
if uri != "":
|
||||
acmd.append("-d")
|
||||
acmd.append(uri);
|
||||
acmd.append(''.join(['\'',uri, '\'']));
|
||||
self._logger.info(acmd)
|
||||
self._checkCmd(acmd)
|
||||
return outputFile
|
||||
|
|
|
@ -213,16 +213,16 @@ class XPCShellRunner(MozbuildObject):
|
|||
class AndroidXPCShellRunner(MozbuildObject):
|
||||
"""Get specified DeviceManager"""
|
||||
def get_devicemanager(self, devicemanager, ip, port, remote_test_root):
|
||||
from mozdevice import devicemanagerADB, devicemanagerSUT
|
||||
import mozdevice
|
||||
dm = None
|
||||
if devicemanager == "adb":
|
||||
if ip:
|
||||
dm = devicemanagerADB.DeviceManagerADB(ip, port, packageName=None, deviceRoot=remote_test_root)
|
||||
dm = mozdevice.DroidADB(ip, port, packageName=None, deviceRoot=remote_test_root)
|
||||
else:
|
||||
dm = devicemanagerADB.DeviceManagerADB(packageName=None, deviceRoot=remote_test_root)
|
||||
dm = mozdevice.DroidADB(packageName=None, deviceRoot=remote_test_root)
|
||||
else:
|
||||
if ip:
|
||||
dm = devicemanagerSUT.DeviceManagerSUT(ip, port, deviceRoot=remote_test_root)
|
||||
dm = mozdevice.DroidSUT(ip, port, deviceRoot=remote_test_root)
|
||||
else:
|
||||
raise Exception("You must provide a device IP to connect to via the --ip option")
|
||||
return dm
|
||||
|
|
|
@ -227,6 +227,18 @@ function handleRequest(req, res) {
|
|||
res.setHeader("X-Expected-MD5", md5);
|
||||
}
|
||||
|
||||
else if (u.pathname === "/huge") {
|
||||
content = generateContent(1024);
|
||||
res.setHeader('Content-Type', 'text/plain');
|
||||
res.writeHead(200);
|
||||
// 1mb of data
|
||||
for (var i = 0; i < (1024 * 1); i++) {
|
||||
res.write(content); // 1kb chunk
|
||||
}
|
||||
res.end();
|
||||
return;
|
||||
}
|
||||
|
||||
else if (u.pathname === "/post") {
|
||||
if (req.method != "POST") {
|
||||
res.writeHead(405);
|
||||
|
|
|
@ -50,8 +50,8 @@ friend class nsWindowMediator;
|
|||
public:
|
||||
nsAppShellWindowEnumerator(const char16_t* aTypeString,
|
||||
nsWindowMediator& inMediator);
|
||||
NS_IMETHOD GetNext(nsISupports **retval) = 0;
|
||||
NS_IMETHOD HasMoreElements(bool *retval);
|
||||
NS_IMETHOD GetNext(nsISupports **retval) MOZ_OVERRIDE = 0;
|
||||
NS_IMETHOD HasMoreElements(bool *retval) MOZ_OVERRIDE;
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
|
|
|
@ -450,7 +450,7 @@ public:
|
|||
|
||||
NS_DECL_THREADSAFE_ISUPPORTS
|
||||
|
||||
NS_IMETHOD Notify(nsITimer* aTimer)
|
||||
NS_IMETHOD Notify(nsITimer* aTimer) MOZ_OVERRIDE
|
||||
{
|
||||
// Although this object participates in a refcount cycle (this -> mWindow
|
||||
// -> mSPTimer -> this), mSPTimer is a one-shot timer and releases this
|
||||
|
|
|
@ -47,20 +47,20 @@ public:
|
|||
NS_DECL_NSIWEBPROGRESSLISTENER
|
||||
|
||||
// nsIBaseWindow
|
||||
NS_IMETHOD Destroy();
|
||||
NS_IMETHOD Destroy() MOZ_OVERRIDE;
|
||||
|
||||
// nsIWidgetListener
|
||||
virtual nsIXULWindow* GetXULWindow() { return this; }
|
||||
virtual nsIPresShell* GetPresShell();
|
||||
virtual bool WindowMoved(nsIWidget* aWidget, int32_t x, int32_t y);
|
||||
virtual bool WindowResized(nsIWidget* aWidget, int32_t aWidth, int32_t aHeight);
|
||||
virtual bool RequestWindowClose(nsIWidget* aWidget);
|
||||
virtual void SizeModeChanged(nsSizeMode sizeMode);
|
||||
virtual void OSToolbarButtonPressed();
|
||||
virtual nsIXULWindow* GetXULWindow() MOZ_OVERRIDE { return this; }
|
||||
virtual nsIPresShell* GetPresShell() MOZ_OVERRIDE;
|
||||
virtual bool WindowMoved(nsIWidget* aWidget, int32_t x, int32_t y) MOZ_OVERRIDE;
|
||||
virtual bool WindowResized(nsIWidget* aWidget, int32_t aWidth, int32_t aHeight) MOZ_OVERRIDE;
|
||||
virtual bool RequestWindowClose(nsIWidget* aWidget) MOZ_OVERRIDE;
|
||||
virtual void SizeModeChanged(nsSizeMode sizeMode) MOZ_OVERRIDE;
|
||||
virtual void OSToolbarButtonPressed() MOZ_OVERRIDE;
|
||||
virtual bool ZLevelChanged(bool aImmediate, nsWindowZ *aPlacement,
|
||||
nsIWidget* aRequestBelow, nsIWidget** aActualBelow);
|
||||
virtual void WindowActivated();
|
||||
virtual void WindowDeactivated();
|
||||
nsIWidget* aRequestBelow, nsIWidget** aActualBelow) MOZ_OVERRIDE;
|
||||
virtual void WindowActivated() MOZ_OVERRIDE;
|
||||
virtual void WindowDeactivated() MOZ_OVERRIDE;
|
||||
|
||||
protected:
|
||||
friend class mozilla::WebShellWindowTimerCallback;
|
||||
|
|
Загрузка…
Ссылка в новой задаче