Bug 1405288 - Remove scrollIntoView actor method check from the inspector r=ochameau

The scrollIntoView actor method was added in bug 901250 3 years ago and
shipped with FF 40.
We support all the way back to the latest ESR (52 now).
So let's drop this backward compat check code.

MozReview-Commit-ID: 5FKRpiOXfzd

--HG--
extra : rebase_source : 4c3b0850750081a87b77bc1b85d7a2e852f58c82
This commit is contained in:
Patrick Brosset 2017-10-19 11:12:23 +02:00
Родитель 896c0325ae
Коммит b66f6388b1
3 изменённых файлов: 0 добавлений и 28 удалений

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

@ -131,7 +131,6 @@ function Inspector(toolbox) {
this.onSidebarShown = this.onSidebarShown.bind(this);
this._target.on("will-navigate", this._onBeforeNavigate);
this._detectingActorFeatures = this._detectActorFeatures();
}
Inspector.prototype = {
@ -215,23 +214,6 @@ Inspector.prototype = {
}
},
/**
* Figure out what features the backend supports
*/
_detectActorFeatures: function () {
this._supportsScrollIntoView = false;
// Use getActorDescription first so that all actorHasMethod calls use
// a cached response from the server.
return this._target.getActorDescription("domwalker").then(desc => {
return promise.all([
this._target.actorHasMethod("domnode", "scrollIntoView").then(value => {
this._supportsScrollIntoView = value;
}).catch(console.error)
]);
});
},
_deferredOpen: async function (defaultSelection) {
this.breadcrumbs = new HTMLBreadcrumbs(this);
@ -1374,7 +1356,6 @@ Inspector.prototype = {
label: INSPECTOR_L10N.getStr("inspectorScrollNodeIntoView.label"),
accesskey:
INSPECTOR_L10N.getStr("inspectorScrollNodeIntoView.accesskey"),
hidden: !this._supportsScrollIntoView,
disabled: !isSelectionElement,
click: () => this.scrollNodeIntoView(),
}));

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

@ -93,12 +93,6 @@ add_task(function* () {
let linkFollow = allMenuItems.find(i => i.id === "node-menu-link-follow");
let linkCopy = allMenuItems.find(i => i.id === "node-menu-link-copy");
// The contextual menu setup is async, because it needs to know if the
// inspector has the resolveRelativeURL method first. So call actorHasMethod
// here too to make sure the first call resolves first and the menu is
// properly setup.
yield inspector.target.actorHasMethod("inspector", "resolveRelativeURL");
is(linkFollow.visible, test.isLinkFollowItemVisible,
"The follow-link item display is correct");
is(linkCopy.visible, test.isLinkCopyItemVisible,

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

@ -30,9 +30,6 @@ var openInspector = Task.async(function* (hostType) {
yield inspector.once("inspector-updated");
}
info("Waiting for actor features to be detected");
yield inspector._detectingActorFeatures;
yield registerTestActor(toolbox.target.client);
let testActor = yield getTestActor(toolbox);