зеркало из https://github.com/mozilla/gecko-dev.git
Merge m-c to inbound on a CLOSED TREE.
This commit is contained in:
Коммит
3b7a7bb3b6
|
@ -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="e046133c79d13d2ad26814547a163ec1732d36e7"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="553da99ab09b6b894d9f95bb06b16b6e1ddbf0a1"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="266bca6e60dad43e395f38b66edabe8bdc882334"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="55bcc2d7e44dc805c24b57d1e783fc26e8a2ee86"/>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
</project>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="e046133c79d13d2ad26814547a163ec1732d36e7"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="553da99ab09b6b894d9f95bb06b16b6e1ddbf0a1"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="266bca6e60dad43e395f38b66edabe8bdc882334"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="8d6c36d74ba9aefbc8c3618fc93dd4907a0dbf5e"/>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<project name="platform_build" path="build" remote="b2g" revision="52c909ccead537f8f9dbf634f3e6639078a8b0bd">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="e046133c79d13d2ad26814547a163ec1732d36e7"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="553da99ab09b6b894d9f95bb06b16b6e1ddbf0a1"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="266bca6e60dad43e395f38b66edabe8bdc882334"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
|
||||
|
|
|
@ -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="e046133c79d13d2ad26814547a163ec1732d36e7"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="553da99ab09b6b894d9f95bb06b16b6e1ddbf0a1"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="266bca6e60dad43e395f38b66edabe8bdc882334"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="55bcc2d7e44dc805c24b57d1e783fc26e8a2ee86"/>
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1f6a1fe07f81c5bc5e1d079c9b60f7f78ca2bf4f"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="e046133c79d13d2ad26814547a163ec1732d36e7"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="553da99ab09b6b894d9f95bb06b16b6e1ddbf0a1"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="266bca6e60dad43e395f38b66edabe8bdc882334"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="8d6c36d74ba9aefbc8c3618fc93dd4907a0dbf5e"/>
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
"remote": "",
|
||||
"branch": ""
|
||||
},
|
||||
"revision": "baa54fb0f2c415a4521259d7fa2f14db32f608a7",
|
||||
"revision": "a54e097e9e3384d885c0116d9c4ca15c1e1cd75e",
|
||||
"repo_path": "/integration/gaia-central"
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="e046133c79d13d2ad26814547a163ec1732d36e7"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="553da99ab09b6b894d9f95bb06b16b6e1ddbf0a1"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="266bca6e60dad43e395f38b66edabe8bdc882334"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1f6a1fe07f81c5bc5e1d079c9b60f7f78ca2bf4f"/>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="e046133c79d13d2ad26814547a163ec1732d36e7"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="553da99ab09b6b894d9f95bb06b16b6e1ddbf0a1"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="266bca6e60dad43e395f38b66edabe8bdc882334"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1f6a1fe07f81c5bc5e1d079c9b60f7f78ca2bf4f"/>
|
||||
|
|
|
@ -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="e046133c79d13d2ad26814547a163ec1732d36e7"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="553da99ab09b6b894d9f95bb06b16b6e1ddbf0a1"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="266bca6e60dad43e395f38b66edabe8bdc882334"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1f6a1fe07f81c5bc5e1d079c9b60f7f78ca2bf4f"/>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="e046133c79d13d2ad26814547a163ec1732d36e7"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="553da99ab09b6b894d9f95bb06b16b6e1ddbf0a1"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="266bca6e60dad43e395f38b66edabe8bdc882334"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1f6a1fe07f81c5bc5e1d079c9b60f7f78ca2bf4f"/>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
</project>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="e046133c79d13d2ad26814547a163ec1732d36e7"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="553da99ab09b6b894d9f95bb06b16b6e1ddbf0a1"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="266bca6e60dad43e395f38b66edabe8bdc882334"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="8d6c36d74ba9aefbc8c3618fc93dd4907a0dbf5e"/>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="e046133c79d13d2ad26814547a163ec1732d36e7"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="553da99ab09b6b894d9f95bb06b16b6e1ddbf0a1"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="266bca6e60dad43e395f38b66edabe8bdc882334"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1f6a1fe07f81c5bc5e1d079c9b60f7f78ca2bf4f"/>
|
||||
|
|
|
@ -804,6 +804,7 @@ this.PlacesUIUtils = {
|
|||
let items = as.getItemsWithAnnotation(this.ORGANIZER_QUERY_ANNO);
|
||||
// While looping through queries we will also check for their validity.
|
||||
let queriesCount = 0;
|
||||
let corrupt = false;
|
||||
for (let i = 0; i < items.length; i++) {
|
||||
let queryName = as.getItemAnnotation(items[i], this.ORGANIZER_QUERY_ANNO);
|
||||
|
||||
|
@ -817,6 +818,7 @@ this.PlacesUIUtils = {
|
|||
|
||||
if (!itemExists(query.itemId)) {
|
||||
// Orphan annotation, bail out and create a new left pane root.
|
||||
corrupt = true;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -825,6 +827,7 @@ this.PlacesUIUtils = {
|
|||
if (items.indexOf(parentId) == -1 && parentId != leftPaneRoot) {
|
||||
// The parent is not part of the left pane, bail out and create a new
|
||||
// left pane root.
|
||||
corrupt = true;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -842,7 +845,11 @@ this.PlacesUIUtils = {
|
|||
queriesCount++;
|
||||
}
|
||||
|
||||
if (queriesCount != EXPECTED_QUERY_COUNT) {
|
||||
// Note: it's not enough to just check for queriesCount, since we may
|
||||
// find an invalid query just after accounting for a sufficient number of
|
||||
// valid ones. As well as we can't just rely on corrupt since we may find
|
||||
// less valid queries than expected.
|
||||
if (corrupt || queriesCount != EXPECTED_QUERY_COUNT) {
|
||||
// Queries number is wrong, so the left pane must be corrupt.
|
||||
// Note: we can't just remove the leftPaneRoot, because some query could
|
||||
// have a bad parent, so we have to remove all items one by one.
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
let gLeftPaneFolderIdGetter;
|
||||
let gAllBookmarksFolderIdGetter;
|
||||
// Used to store the original left Pane status as a JSON string.
|
||||
let gReferenceJSON;
|
||||
let gReferenceHierarchy;
|
||||
let gLeftPaneFolderId;
|
||||
// Third party annotated folder.
|
||||
let gFolderId;
|
||||
|
@ -104,15 +104,9 @@ function run_test() {
|
|||
// Create the left pane, and store its current status, it will be used
|
||||
// as reference value.
|
||||
gLeftPaneFolderId = PlacesUIUtils.leftPaneFolderId;
|
||||
|
||||
gReferenceHierarchy = folderIdToHierarchy(gLeftPaneFolderId);
|
||||
do_test_pending();
|
||||
|
||||
Task.spawn(function() {
|
||||
gReferenceJSON = yield folderToJSON(gLeftPaneFolderId);
|
||||
|
||||
// Kick-off tests.
|
||||
do_timeout(0, run_next_test);
|
||||
});
|
||||
run_next_test();
|
||||
}
|
||||
|
||||
function run_next_test() {
|
||||
|
@ -126,11 +120,14 @@ function run_next_test() {
|
|||
PlacesUIUtils.__defineGetter__("allBookmarksFolderId", gAllBookmarksFolderIdGetter);
|
||||
// Check the new left pane folder.
|
||||
Task.spawn(function() {
|
||||
let leftPaneJSON = yield folderToJSON(gLeftPaneFolderId);
|
||||
do_check_true(compareJSON(gReferenceJSON, leftPaneJSON));
|
||||
let leftPaneHierarchy = folderIdToHierarchy(gLeftPaneFolderId)
|
||||
if (gReferenceHierarchy != leftPaneHierarchy) {
|
||||
do_throw("hierarchies differ!\n" + gReferenceHierarchy +
|
||||
"\n" + leftPaneHierarchy);
|
||||
}
|
||||
do_check_eq(PlacesUtils.bookmarks.getItemTitle(gFolderId), "test");
|
||||
// Go to next test.
|
||||
do_timeout(0, run_next_test);
|
||||
run_next_test();
|
||||
});
|
||||
}
|
||||
else {
|
||||
|
@ -143,56 +140,27 @@ function run_next_test() {
|
|||
/**
|
||||
* Convert a folder item id to a JSON representation of it and its contents.
|
||||
*/
|
||||
function folderToJSON(aItemId) {
|
||||
return Task.spawn(function() {
|
||||
let query = PlacesUtils.history.getNewQuery();
|
||||
query.setFolders([aItemId], 1);
|
||||
let options = PlacesUtils.history.getNewQueryOptions();
|
||||
options.queryType = Ci.nsINavHistoryQueryOptions.QUERY_TYPE_BOOKMARKS;
|
||||
let root = PlacesUtils.history.executeQuery(query, options).root;
|
||||
let writer = {
|
||||
value: "",
|
||||
write: function PU_wrapNode__write(aStr, aLen) {
|
||||
this.value += aStr;
|
||||
}
|
||||
};
|
||||
yield BookmarkJSONUtils.serializeNodeAsJSONToOutputStream(root, writer,
|
||||
false, false);
|
||||
do_check_true(writer.value.length > 0);
|
||||
throw new Task.Result(writer.value);
|
||||
});
|
||||
function folderIdToHierarchy(aFolderId) {
|
||||
let root = PlacesUtils.getFolderContents(aFolderId).root;
|
||||
let hier = JSON.stringify(hierarchyToObj(root));
|
||||
root.containerOpen = false;
|
||||
return hier;
|
||||
}
|
||||
|
||||
/**
|
||||
* Compare the JSON representation of 2 nodes, skipping everchanging properties
|
||||
* like dates.
|
||||
*/
|
||||
function compareJSON(aNodeJSON_1, aNodeJSON_2) {
|
||||
let node1 = JSON.parse(aNodeJSON_1);
|
||||
let node2 = JSON.parse(aNodeJSON_2);
|
||||
|
||||
// List of properties we should not compare (expected to be different).
|
||||
const SKIP_PROPS = ["dateAdded", "lastModified", "id"];
|
||||
|
||||
function compareObjects(obj1, obj2) {
|
||||
function count(o) { var n = 0; for (let p in o) n++; return n; }
|
||||
do_check_eq(count(obj1), count(obj2));
|
||||
for (let prop in obj1) {
|
||||
// Skip everchanging values.
|
||||
if (SKIP_PROPS.indexOf(prop) != -1)
|
||||
continue;
|
||||
// Skip undefined objects, otherwise we hang on them.
|
||||
if (!obj1[prop])
|
||||
continue;
|
||||
if (typeof(obj1[prop]) == "object")
|
||||
return compareObjects(obj1[prop], obj2[prop]);
|
||||
if (obj1[prop] !== obj2[prop]) {
|
||||
print(prop + ": " + obj1[prop] + "!=" + obj2[prop]);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
function hierarchyToObj(aNode) {
|
||||
let o = {}
|
||||
o.title = aNode.title;
|
||||
o.annos = PlacesUtils.getAnnotationsForItem(aNode.itemId)
|
||||
if (PlacesUtils.nodeIsURI(aNode)) {
|
||||
o.uri = aNode.uri;
|
||||
}
|
||||
|
||||
return compareObjects(node1, node2);
|
||||
else if (PlacesUtils.nodeIsFolder(aNode)) {
|
||||
o.children = [];
|
||||
PlacesUtils.asContainer(aNode).containerOpen = true;
|
||||
for (let i = 0; i < aNode.childCount; ++i) {
|
||||
o.children.push(hierarchyToObj(aNode.getChild(i)));
|
||||
}
|
||||
aNode.containerOpen = false;
|
||||
}
|
||||
return o;
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"use strict";
|
||||
|
||||
const { Cc, Ci, Cu, Cr } = require("chrome");
|
||||
const promise = require("sdk/core/promise");
|
||||
const { Promise: promise } = Cu.import("resource://gre/modules/Promise.jsm", {});
|
||||
const EventEmitter = require("devtools/toolkit/event-emitter");
|
||||
const { DevToolsUtils } = Cu.import("resource://gre/modules/devtools/DevToolsUtils.jsm", {});
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ let gEnableLogging = Services.prefs.getBoolPref("devtools.debugger.log");
|
|||
Services.prefs.setBoolPref("devtools.debugger.log", false);
|
||||
|
||||
let { Task } = Cu.import("resource://gre/modules/Task.jsm", {});
|
||||
let { Promise: promise } = Cu.import("resource://gre/modules/commonjs/sdk/core/promise.js", {});
|
||||
let { Promise: promise } = Cu.import("resource://gre/modules/Promise.jsm", {});
|
||||
let { gDevTools } = Cu.import("resource:///modules/devtools/gDevTools.jsm", {});
|
||||
let { devtools } = Cu.import("resource://gre/modules/devtools/Loader.jsm", {});
|
||||
let { require } = devtools;
|
||||
|
|
|
@ -6,7 +6,7 @@ function test() {
|
|||
let inspector, doc, toolbox;
|
||||
let {devtools} = Cu.import("resource://gre/modules/devtools/Loader.jsm", {});
|
||||
let {require} = devtools;
|
||||
let promise = require("sdk/core/promise");
|
||||
let {Promise: promise} = Cu.import("resource://gre/modules/Promise.jsm", {});
|
||||
let {Task} = Cu.import("resource://gre/modules/Task.jsm", {});
|
||||
|
||||
waitForExplicitFinish();
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
let promise = devtools.require("sdk/core/promise");
|
||||
let {Promise: promise} = Cu.import("resource://gre/modules/Promise.jsm", {});
|
||||
let Toolbox = devtools.Toolbox;
|
||||
let TargetFactory = devtools.TargetFactory;
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// highlighter, depending on the type of node hovered over.
|
||||
|
||||
let {devtools} = Cu.import("resource://gre/modules/devtools/Loader.jsm", {});
|
||||
let promise = devtools.require("sdk/core/promise");
|
||||
let {Promise: promise} = Cu.import("resource://gre/modules/Promise.jsm", {});
|
||||
let {Task} = Cu.import("resource://gre/modules/Task.jsm", {});
|
||||
|
||||
const TEST_PAGE = "http://mochi.test:8888/browser/browser/devtools/inspector/test/browser_inspector_bug_958456_highlight_comments.html";
|
||||
|
|
|
@ -84,7 +84,7 @@ function _clickOnInspectMenuItem(node) {
|
|||
document.popupNode = node;
|
||||
var contentAreaContextMenu = document.getElementById("contentAreaContextMenu");
|
||||
var contextMenu = new nsContextMenu(contentAreaContextMenu);
|
||||
var promise = devtools.require("sdk/core/promise");
|
||||
var {Promise: promise} = Cu.import("resource://gre/modules/Promise.jsm", {});
|
||||
var deferred = promise.defer();
|
||||
contextMenu.inspectNode().then(() => {
|
||||
let i = getActiveInspector();
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
Cu.import("resource://gre/modules/Task.jsm");
|
||||
|
||||
let {devtools} = Cu.import("resource://gre/modules/devtools/Loader.jsm", {});
|
||||
const promise = devtools.require("sdk/core/promise");
|
||||
const {Promise: promise} = Cu.import("resource://gre/modules/Promise.jsm", {});
|
||||
let TargetFactory = devtools.TargetFactory;
|
||||
|
||||
Services.prefs.setBoolPref("devtools.inspector.sidebarOpen", true);
|
||||
|
|
|
@ -15,7 +15,7 @@ Cu.import("resource://gre/modules/Task.jsm");
|
|||
Cu.import("resource://gre/modules/devtools/Loader.jsm");
|
||||
Cu.import("resource://gre/modules/devtools/Console.jsm");
|
||||
|
||||
const promise = devtools.require("sdk/core/promise");
|
||||
const {Promise: promise} = Cu.import("resource://gre/modules/Promise.jsm", {});
|
||||
const {InplaceEditor, editableItem} = devtools.require("devtools/shared/inplace-editor");
|
||||
const {parseDeclarations} = devtools.require("devtools/styleinspector/css-parsing-utils");
|
||||
|
||||
|
|
|
@ -289,9 +289,7 @@ MarkupView.prototype = {
|
|||
let done = this._inspector.updating("markup-view");
|
||||
if (selection.isNode()) {
|
||||
if (this._shouldNewSelectionBeHighlighted()) {
|
||||
this._brieflyShowBoxModel(selection.nodeFront, {
|
||||
scrollIntoView: true
|
||||
});
|
||||
this._brieflyShowBoxModel(selection.nodeFront, {});
|
||||
}
|
||||
|
||||
this.showNode(selection.nodeFront, true).then(() => {
|
||||
|
|
|
@ -29,7 +29,7 @@ const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
|
|||
|
||||
let { XPCOMUtils } = Cu.import("resource://gre/modules/XPCOMUtils.jsm", {});
|
||||
let { Services } = Cu.import("resource://gre/modules/Services.jsm", {});
|
||||
let { Promise: promise } = Cu.import("resource://gre/modules/commonjs/sdk/core/promise.js", {});
|
||||
let { Promise: promise } = Cu.import("resource://gre/modules/Promise.jsm", {});
|
||||
|
||||
this.EXPORTED_SYMBOLS = ["AppCacheUtils"];
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
"use strict";
|
||||
|
||||
const {Cc, Cu, Ci} = require("chrome");
|
||||
const promise = require("sdk/core/promise");
|
||||
const {Promise: promise} = Cu.import("resource://gre/modules/Promise.jsm", {});
|
||||
const IOService = Cc["@mozilla.org/network/io-service;1"]
|
||||
.getService(Ci.nsIIOService);
|
||||
const {Spectrum} = require("devtools/shared/widgets/Spectrum");
|
||||
|
|
|
@ -24,7 +24,7 @@ Cu.import("resource:///modules/devtools/ViewHelpers.jsm");
|
|||
Cu.import("resource://gre/modules/devtools/event-emitter.js");
|
||||
Cu.import("resource://gre/modules/devtools/DevToolsUtils.jsm");
|
||||
Cu.import("resource://gre/modules/Task.jsm");
|
||||
let promise = Cu.import("resource://gre/modules/commonjs/sdk/core/promise.js").Promise;
|
||||
let {Promise: promise} = Cu.import("resource://gre/modules/Promise.jsm", {});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "devtools",
|
||||
"resource://gre/modules/devtools/Loader.jsm");
|
||||
|
|
|
@ -9,7 +9,7 @@ const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
|
|||
|
||||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
let promise = Cu.import("resource://gre/modules/commonjs/sdk/core/promise.js").Promise;
|
||||
let {Promise: promise} = Cu.import("resource://gre/modules/Promise.jsm", {});
|
||||
Cu.import("resource:///modules/devtools/VariablesView.jsm");
|
||||
Cu.import("resource:///modules/devtools/ViewHelpers.jsm");
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
Components.utils.import("resource://gre/modules/Task.jsm");
|
||||
let {devtools} = Cu.import("resource://gre/modules/devtools/Loader.jsm", {});
|
||||
let promise = devtools.require("sdk/core/promise");
|
||||
let {Promise: promise} = Cu.import("resource://gre/modules/Promise.jsm", {});
|
||||
|
||||
const TESTCASE_URI_HTML = TEST_BASE + "sourcemaps.html";
|
||||
const TESTCASE_URI_CSS = TEST_BASE + "sourcemap-css/sourcemaps.css";
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
const {Cc, Cu, Ci} = require("chrome");
|
||||
const promise = require("sdk/core/promise");
|
||||
const {Promise: promise} = Cu.import("resource://gre/modules/Promise.jsm", {});
|
||||
|
||||
let ToolDefinitions = require("main").Tools;
|
||||
|
||||
|
|
|
@ -175,7 +175,7 @@ panelmultiview[nosubviews=true] > .panel-viewcontainer > .panel-viewstack > .pan
|
|||
.panelUI-grid:not([customize-transitioning]) .toolbarbutton-1 > .toolbarbutton-menubutton-button > .toolbarbutton-multiline-text,
|
||||
.panelUI-grid:not([customize-transitioning]) .toolbarbutton-1 > .toolbarbutton-multiline-text {
|
||||
position: absolute;
|
||||
clip: rect(auto, auto, 2.2em, auto);
|
||||
clip: rect(auto, auto, 2.3em, auto);
|
||||
}
|
||||
|
||||
.panelUI-grid .toolbarbutton-1 > .toolbarbutton-text,
|
||||
|
|
|
@ -1,132 +0,0 @@
|
|||
/* 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/. */
|
||||
|
||||
#include "DOMCameraCapabilities.h"
|
||||
#include "DOMCameraControl.h"
|
||||
#include "CameraCommon.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
DOMCI_DATA(CameraCapabilities, nsICameraCapabilities)
|
||||
|
||||
NS_INTERFACE_MAP_BEGIN(DOMCameraCapabilities)
|
||||
NS_INTERFACE_MAP_ENTRY(nsISupports)
|
||||
NS_INTERFACE_MAP_ENTRY(nsICameraCapabilities)
|
||||
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(CameraCapabilities)
|
||||
NS_INTERFACE_MAP_END
|
||||
|
||||
NS_IMPL_ADDREF(DOMCameraCapabilities)
|
||||
NS_IMPL_RELEASE(DOMCameraCapabilities)
|
||||
|
||||
/* [implicit_jscontext] readonly attribute jsval previewSizes; */
|
||||
NS_IMETHODIMP
|
||||
DOMCameraCapabilities::GetPreviewSizes(JSContext* cx, JS::Value* aPreviewSizes)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* [implicit_jscontext] readonly attribute jsval pictureSizes; */
|
||||
NS_IMETHODIMP
|
||||
DOMCameraCapabilities::GetPictureSizes(JSContext* cx, JS::Value* aPictureSizes)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* [implicit_jscontext] readonly attribute jsval fileFormats; */
|
||||
NS_IMETHODIMP
|
||||
DOMCameraCapabilities::GetFileFormats(JSContext* cx, JS::Value* aFileFormats)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* [implicit_jscontext] readonly attribute jsval whiteBalanceModes; */
|
||||
NS_IMETHODIMP
|
||||
DOMCameraCapabilities::GetWhiteBalanceModes(JSContext* cx, JS::Value* aWhiteBalanceModes)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* [implicit_jscontext] readonly attribute jsval sceneModes; */
|
||||
NS_IMETHODIMP
|
||||
DOMCameraCapabilities::GetSceneModes(JSContext* cx, JS::Value* aSceneModes)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* [implicit_jscontext] readonly attribute jsval effects; */
|
||||
NS_IMETHODIMP
|
||||
DOMCameraCapabilities::GetEffects(JSContext* cx, JS::Value* aEffects)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* [implicit_jscontext] readonly attribute jsval flashModes; */
|
||||
NS_IMETHODIMP
|
||||
DOMCameraCapabilities::GetFlashModes(JSContext* cx, JS::Value* aFlashModes)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* [implicit_jscontext] readonly attribute jsval focusModes; */
|
||||
NS_IMETHODIMP
|
||||
DOMCameraCapabilities::GetFocusModes(JSContext* cx, JS::Value* aFocusModes)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* [implicit_jscontext] readonly attribute long maxFocusAreas; */
|
||||
NS_IMETHODIMP
|
||||
DOMCameraCapabilities::GetMaxFocusAreas(JSContext* cx, int32_t* aMaxFocusAreas)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* [implicit_jscontext] readonly attribute double minExposureCompensation; */
|
||||
NS_IMETHODIMP
|
||||
DOMCameraCapabilities::GetMinExposureCompensation(JSContext* cx, double* aMinExposureCompensation)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* [implicit_jscontext] readonly attribute double maxExposureCompensation; */
|
||||
NS_IMETHODIMP
|
||||
DOMCameraCapabilities::GetMaxExposureCompensation(JSContext* cx, double* aMaxExposureCompensation)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* [implicit_jscontext] readonly attribute double stepExposureCompensation; */
|
||||
NS_IMETHODIMP
|
||||
DOMCameraCapabilities::GetStepExposureCompensation(JSContext* cx, double* aStepExposureCompensation)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* [implicit_jscontext] readonly attribute long maxMeteringAreas; */
|
||||
NS_IMETHODIMP
|
||||
DOMCameraCapabilities::GetMaxMeteringAreas(JSContext* cx, int32_t* aMaxMeteringAreas)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* [implicit_jscontext] readonly attribute long maxDetectedFaces; */
|
||||
NS_IMETHODIMP
|
||||
DOMCameraCapabilities::GetMaxDetectedFaces(JSContext* cx, int32_t* aMaxDetectedFaces)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* [implicit_jscontext] readonly attribute jsval zoomRatios; */
|
||||
NS_IMETHODIMP
|
||||
DOMCameraCapabilities::GetZoomRatios(JSContext* cx, JS::Value* aZoomRatios)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* [implicit_jscontext] readonly attribute jsval videoSizes; */
|
||||
NS_IMETHODIMP
|
||||
DOMCameraCapabilities::GetVideoSizes(JSContext* cx, JS::Value* aVideoSizes)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
|
@ -173,28 +173,6 @@ this.BookmarkJSONUtils = Object.freeze({
|
|||
{ tmpPath: OS.Path.join(aFilePath + ".tmp") });
|
||||
return { count: count, hash: hash };
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Serializes the given node (and all its descendents) as JSON
|
||||
* and writes the serialization to the given output stream.
|
||||
*
|
||||
* @param aNode
|
||||
* An nsINavHistoryResultNode
|
||||
* @param aStream
|
||||
* An nsIOutputStream. NOTE: it only uses the write(str, len)
|
||||
* method of nsIOutputStream. The caller is responsible for
|
||||
* closing the stream.
|
||||
* @return {Promise}
|
||||
* @resolves When node have been serialized and wrote to output stream.
|
||||
* @rejects JavaScript exception.
|
||||
*
|
||||
* @note This is likely to go away (bug 970291), so it's suggested to not
|
||||
* add more uses of it. This is not yet firing a deprecation warning
|
||||
* cause it still has some internal usage.
|
||||
*/
|
||||
serializeNodeAsJSONToOutputStream: function (aNode, aStream) {
|
||||
return BookmarkNode.serializeAsJSONToOutputStream(aNode, aStream);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -533,212 +511,3 @@ function fixupQuery(aQueryURI, aFolderIdMap) {
|
|||
|
||||
return NetUtil.newURI(stringURI);
|
||||
}
|
||||
|
||||
let BookmarkNode = {
|
||||
/**
|
||||
* Serializes the given node (and all its descendents) as JSON
|
||||
* and writes the serialization to the given output stream.
|
||||
*
|
||||
* @param aNode
|
||||
* An nsINavHistoryResultNode
|
||||
* @param aStream
|
||||
* An nsIOutputStream. NOTE: it only uses the write(str, len)
|
||||
* method of nsIOutputStream. The caller is responsible for
|
||||
* closing the stream.
|
||||
* @returns Task promise
|
||||
* @resolves the number of serialized uri nodes.
|
||||
*/
|
||||
serializeAsJSONToOutputStream: function (aNode, aStream) {
|
||||
|
||||
return Task.spawn(function* () {
|
||||
// Serialize to stream
|
||||
let array = [];
|
||||
let result = yield this._appendConvertedNode(aNode, null, array);
|
||||
if (result.appendedNode) {
|
||||
let jsonString = JSON.stringify(array[0]);
|
||||
aStream.write(jsonString, jsonString.length);
|
||||
} else {
|
||||
throw Cr.NS_ERROR_UNEXPECTED;
|
||||
}
|
||||
return result.nodeCount;
|
||||
}.bind(this));
|
||||
},
|
||||
|
||||
_appendConvertedNode: function (bNode, aIndex, aArray) {
|
||||
return Task.spawn(function* () {
|
||||
let node = {};
|
||||
let nodeCount = 0;
|
||||
|
||||
// Set index in order received
|
||||
// XXX handy shortcut, but are there cases where we don't want
|
||||
// to export using the sorting provided by the query?
|
||||
if (aIndex)
|
||||
node.index = aIndex;
|
||||
|
||||
this._addGenericProperties(bNode, node);
|
||||
|
||||
let parent = bNode.parent;
|
||||
let grandParent = parent ? parent.parent : null;
|
||||
|
||||
if (PlacesUtils.nodeIsURI(bNode)) {
|
||||
// Tag root accept only folder nodes
|
||||
if (parent && parent.itemId == PlacesUtils.tagsFolderId)
|
||||
return { appendedNode: false, nodeCount: nodeCount };
|
||||
|
||||
// Check for url validity, since we can't halt while writing a backup.
|
||||
// This will throw if we try to serialize an invalid url and it does
|
||||
// not make sense saving a wrong or corrupt uri node.
|
||||
try {
|
||||
NetUtil.newURI(bNode.uri);
|
||||
} catch (ex) {
|
||||
return { appendedNode: false, nodeCount: nodeCount };
|
||||
}
|
||||
|
||||
yield this._addURIProperties(bNode, node);
|
||||
nodeCount++;
|
||||
} else if (PlacesUtils.nodeIsContainer(bNode)) {
|
||||
// Tag containers accept only uri nodes
|
||||
if (grandParent && grandParent.itemId == PlacesUtils.tagsFolderId)
|
||||
return { appendedNode: false, nodeCount: nodeCount };
|
||||
|
||||
this._addContainerProperties(bNode, node);
|
||||
} else if (PlacesUtils.nodeIsSeparator(bNode)) {
|
||||
// Tag root accept only folder nodes
|
||||
// Tag containers accept only uri nodes
|
||||
if ((parent && parent.itemId == PlacesUtils.tagsFolderId) ||
|
||||
(grandParent && grandParent.itemId == PlacesUtils.tagsFolderId))
|
||||
return { appendedNode: false, nodeCount: nodeCount };
|
||||
|
||||
this._addSeparatorProperties(bNode, node);
|
||||
}
|
||||
|
||||
if (!node.feedURI && node.type == PlacesUtils.TYPE_X_MOZ_PLACE_CONTAINER) {
|
||||
nodeCount += yield this._appendConvertedComplexNode(node,
|
||||
bNode,
|
||||
aArray)
|
||||
return { appendedNode: true, nodeCount: nodeCount };
|
||||
}
|
||||
|
||||
aArray.push(node);
|
||||
return { appendedNode: true, nodeCount: nodeCount };
|
||||
}.bind(this));
|
||||
},
|
||||
|
||||
_addGenericProperties: function (aPlacesNode, aJSNode) {
|
||||
aJSNode.title = aPlacesNode.title;
|
||||
aJSNode.id = aPlacesNode.itemId;
|
||||
if (aJSNode.id != -1) {
|
||||
let parent = aPlacesNode.parent;
|
||||
if (parent)
|
||||
aJSNode.parent = parent.itemId;
|
||||
let dateAdded = aPlacesNode.dateAdded;
|
||||
if (dateAdded)
|
||||
aJSNode.dateAdded = dateAdded;
|
||||
let lastModified = aPlacesNode.lastModified;
|
||||
if (lastModified)
|
||||
aJSNode.lastModified = lastModified;
|
||||
|
||||
// XXX need a hasAnnos api
|
||||
let annos = [];
|
||||
try {
|
||||
annos =
|
||||
PlacesUtils.getAnnotationsForItem(aJSNode.id);
|
||||
} catch(ex) {}
|
||||
if (annos.length != 0)
|
||||
aJSNode.annos = annos;
|
||||
}
|
||||
// XXXdietrich - store annos for non-bookmark items
|
||||
},
|
||||
|
||||
_addURIProperties: function BN__addURIProperties(
|
||||
aPlacesNode, aJSNode) {
|
||||
return Task.spawn(function() {
|
||||
aJSNode.type = PlacesUtils.TYPE_X_MOZ_PLACE;
|
||||
aJSNode.uri = aPlacesNode.uri;
|
||||
if (aJSNode.id && aJSNode.id != -1) {
|
||||
// Harvest bookmark-specific properties
|
||||
let keyword = PlacesUtils.bookmarks.getKeywordForBookmark(aJSNode.id);
|
||||
if (keyword)
|
||||
aJSNode.keyword = keyword;
|
||||
}
|
||||
|
||||
if (aPlacesNode.tags)
|
||||
aJSNode.tags = aPlacesNode.tags;
|
||||
|
||||
// Last character-set
|
||||
let uri = NetUtil.newURI(aPlacesNode.uri);
|
||||
let lastCharset = yield PlacesUtils.getCharsetForURI(uri)
|
||||
if (lastCharset)
|
||||
aJSNode.charset = lastCharset;
|
||||
});
|
||||
},
|
||||
|
||||
_addSeparatorProperties: function BN__addSeparatorProperties(
|
||||
aPlacesNode, aJSNode) {
|
||||
aJSNode.type = PlacesUtils.TYPE_X_MOZ_PLACE_SEPARATOR;
|
||||
},
|
||||
|
||||
_addContainerProperties: function BN__addContainerProperties(
|
||||
aPlacesNode, aJSNode) {
|
||||
let concreteId = PlacesUtils.getConcreteItemId(aPlacesNode);
|
||||
if (concreteId != -1) {
|
||||
// This is a bookmark or a tag container.
|
||||
if (PlacesUtils.nodeIsQuery(aPlacesNode) ||
|
||||
concreteId != aPlacesNode.itemId) {
|
||||
aJSNode.type = PlacesUtils.TYPE_X_MOZ_PLACE;
|
||||
aJSNode.uri = aPlacesNode.uri;
|
||||
aJSNode.concreteId = concreteId;
|
||||
} else {
|
||||
// Bookmark folder or a shortcut we should convert to folder.
|
||||
aJSNode.type = PlacesUtils.TYPE_X_MOZ_PLACE_CONTAINER;
|
||||
|
||||
// Mark root folders.
|
||||
if (aJSNode.id == PlacesUtils.placesRootId)
|
||||
aJSNode.root = "placesRoot";
|
||||
else if (aJSNode.id == PlacesUtils.bookmarksMenuFolderId)
|
||||
aJSNode.root = "bookmarksMenuFolder";
|
||||
else if (aJSNode.id == PlacesUtils.tagsFolderId)
|
||||
aJSNode.root = "tagsFolder";
|
||||
else if (aJSNode.id == PlacesUtils.unfiledBookmarksFolderId)
|
||||
aJSNode.root = "unfiledBookmarksFolder";
|
||||
else if (aJSNode.id == PlacesUtils.toolbarFolderId)
|
||||
aJSNode.root = "toolbarFolder";
|
||||
}
|
||||
} else {
|
||||
// This is a grouped container query, generated on the fly.
|
||||
aJSNode.type = PlacesUtils.TYPE_X_MOZ_PLACE;
|
||||
aJSNode.uri = aPlacesNode.uri;
|
||||
}
|
||||
},
|
||||
|
||||
_appendConvertedComplexNode: function (aNode, aSourceNode, aArray) {
|
||||
return Task.spawn(function* () {
|
||||
let repr = {};
|
||||
let nodeCount = 0;
|
||||
|
||||
for (let [name, value] in Iterator(aNode))
|
||||
repr[name] = value;
|
||||
|
||||
// Write child nodes
|
||||
let children = repr.children = [];
|
||||
if (!aNode.annos ||
|
||||
!aNode.annos.some(anno => anno.name == PlacesUtils.LMANNO_FEEDURI)) {
|
||||
PlacesUtils.asContainer(aSourceNode);
|
||||
let wasOpen = aSourceNode.containerOpen;
|
||||
if (!wasOpen)
|
||||
aSourceNode.containerOpen = true;
|
||||
let cc = aSourceNode.childCount;
|
||||
for (let i = 0; i < cc; ++i) {
|
||||
let childNode = aSourceNode.getChild(i);
|
||||
let result = yield this._appendConvertedNode(aSourceNode.getChild(i), i, children);
|
||||
nodeCount += result.nodeCount;
|
||||
}
|
||||
if (!wasOpen)
|
||||
aSourceNode.containerOpen = false;
|
||||
}
|
||||
|
||||
aArray.push(repr);
|
||||
return nodeCount;
|
||||
}.bind(this));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ Cu.import("resource://gre/modules/osfile.jsm");
|
|||
const {Services} = Cu.import("resource://gre/modules/Services.jsm");
|
||||
const {FileUtils} = Cu.import("resource://gre/modules/FileUtils.jsm");
|
||||
const {devtools} = Cu.import("resource://gre/modules/devtools/Loader.jsm", {});
|
||||
const promise = require("sdk/core/promise");
|
||||
const {Promise: promise} = Cu.import("resource://gre/modules/Promise.jsm", {});
|
||||
|
||||
// XXX: bug 912476 make this module a real protocol.js front
|
||||
// by converting webapps actor to protocol.js
|
||||
|
|
|
@ -7,7 +7,7 @@ const {Cc, Ci, Cu, Cr} = require("chrome");
|
|||
const {Services} = Cu.import("resource://gre/modules/Services.jsm", {});
|
||||
|
||||
const events = require("sdk/event/core");
|
||||
const promise = require("sdk/core/promise");
|
||||
const {Promise: promise} = Cu.import("resource://gre/modules/Promise.jsm", {});
|
||||
|
||||
/**
|
||||
* Handles adding an observer for the creation of content document globals,
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
const {Cc, Ci, Cu, Cr} = require("chrome");
|
||||
const events = require("sdk/event/core");
|
||||
const promise = require("sdk/core/promise");
|
||||
const {Promise: promise} = Cu.import("resource://gre/modules/Promise.jsm", {});
|
||||
const protocol = require("devtools/server/protocol");
|
||||
const {ContentObserver} = require("devtools/content-observer");
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
const {Cc, Ci, Cu, Cr} = require("chrome");
|
||||
const events = require("sdk/event/core");
|
||||
const promise = require("sdk/core/promise");
|
||||
const {Promise: promise} = Cu.import("resource://gre/modules/Promise.jsm", {});
|
||||
const protocol = require("devtools/server/protocol");
|
||||
const {CallWatcherActor, CallWatcherFront} = require("devtools/server/actors/call-watcher");
|
||||
const DevToolsUtils = require("devtools/toolkit/DevToolsUtils.js");
|
||||
|
|
|
@ -107,7 +107,6 @@ let HighlighterActor = protocol.ActorClass({
|
|||
}, {
|
||||
request: {
|
||||
node: Arg(0, "domnode"),
|
||||
scrollIntoView: Option(1),
|
||||
region: Option(1)
|
||||
}
|
||||
}),
|
||||
|
@ -475,10 +474,6 @@ BoxModelHighlighter.prototype = {
|
|||
this._attachPageListeners();
|
||||
this._update();
|
||||
this._trackMutations();
|
||||
|
||||
if (options.scrollIntoView) {
|
||||
this.chromeLayoutHelper.scrollIntoViewIfNeeded(node);
|
||||
}
|
||||
},
|
||||
|
||||
_trackMutations: function() {
|
||||
|
|
Загрузка…
Ссылка в новой задаче