Bug 1414244 - Part 4 - Remove the "panel-clickcapturer" element. r=Gijs

MozReview-Commit-ID: 3aPVbnmr7QB

--HG--
extra : rebase_source : f59452147d08b3f75521c544f78f1c29b2c39814
This commit is contained in:
Paolo Amadini 2017-11-11 22:48:32 +00:00
parent 82f9f4f35d
commit 90a19d3ca4
2 changed files with 3 additions and 23 deletions

View File

@ -269,8 +269,6 @@ this.PanelMultiView = class {
const {document, window} = this;
this._clickCapturer =
document.getAnonymousElementByAttribute(this.node, "anonid", "clickCapturer");
this._viewContainer =
document.getAnonymousElementByAttribute(this.node, "anonid", "viewContainer");
this._mainViewContainer =
@ -296,12 +294,8 @@ this.PanelMultiView = class {
this._dir = cs.direction;
this.setMainView(this.panelViews.currentView);
this.showMainView();
} else {
this._clickCapturer.addEventListener("click", this);
if (this._mainView) {
this.setMainView(this._mainView);
}
} else if (this._mainView) {
this.setMainView(this._mainView);
}
this._showingSubView = false;
@ -349,8 +343,6 @@ this.PanelMultiView = class {
if (this.panelViews) {
this._moveOutKids(this._viewStack);
this.panelViews.clear();
} else {
this._clickCapturer.removeEventListener("click", this);
}
this._panel.removeEventListener("mousemove", this);
this._panel.removeEventListener("popupshowing", this);
@ -358,7 +350,7 @@ this.PanelMultiView = class {
this._panel.removeEventListener("popupshown", this);
this._panel.removeEventListener("popuphidden", this);
this.window.removeEventListener("keydown", this);
this.node = this._clickCapturer = this._viewContainer = this._mainViewContainer =
this.node = this._viewContainer = this._mainViewContainer =
this._viewStack = this.__dwu = this._panelViewCache =
this._transitionDetails = null;
}
@ -991,11 +983,6 @@ this.PanelMultiView = class {
return;
}
switch (aEvent.type) {
case "click":
if (aEvent.originalTarget == this._clickCapturer) {
this.showMainView();
}
break;
case "keydown":
this._keyNavigation(aEvent);
break;

View File

@ -21,13 +21,6 @@
<xul:vbox anonid="viewContainer" class="panel-viewcontainer" xbl:inherits="panelopen,transitioning">
<xul:stack anonid="viewStack" xbl:inherits="transitioning" class="panel-viewstack">
<xul:vbox anonid="mainViewContainer" class="panel-mainview"/>
<!-- Used to capture click events over the PanelUI-mainView if we're in
subview mode. That way, any click on the PanelUI-mainView causes us
to revert to the mainView mode, whereupon PanelUI-click-capture then
allows click events to go through it. -->
<xul:vbox anonid="clickCapturer" class="panel-clickcapturer"/>
<children includes="panelview"/>
</xul:stack>
</xul:vbox>