Bug 1441284 - Part 2 - Remove the "_currentSubView" property. r=Gijs

MozReview-Commit-ID: Aua3V8hOT39

--HG--
extra : rebase_source : 08d506c3d65b3e2e72532183e776f8aa1c6c0975
This commit is contained in:
Paolo Amadini 2018-02-26 18:43:43 +00:00
Родитель 2d4d390d41
Коммит 228213e40d
1 изменённых файлов: 5 добавлений и 8 удалений

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

@ -380,12 +380,6 @@ var PanelMultiView = class extends this.AssociatedToNode {
.getService(Ci.nsIScreenManager);
}
get _currentSubView() {
// Peek the top of the stack, but fall back to the main view if the list of
// opened views is currently empty.
let panelView = this.openViews[this.openViews.length - 1];
return (panelView && panelView.node) || this._mainView;
}
get showingSubView() {
return this.openViews.length > 1;
}
@ -1108,8 +1102,11 @@ var PanelMultiView = class extends this.AssociatedToNode {
switch (aEvent.type) {
case "keydown":
if (!this._transitioning) {
PanelView.forNode(this._currentSubView)
.keyNavigation(aEvent, this._dir);
// Since we start listening for the "keydown" event when the popup is
// already showing and stop listening when the panel is hidden, we
// always have at least one view open.
let currentView = this.openViews[this.openViews.length - 1];
currentView.keyNavigation(aEvent, this._dir);
}
break;
case "mousemove":