зеркало из https://github.com/mozilla/gecko-dev.git
Popup whitelisting continues.
This commit is contained in:
Родитель
a6c3e08a2c
Коммит
2a94a198fd
|
@ -515,6 +515,15 @@
|
||||||
</body>
|
</body>
|
||||||
</method>
|
</method>
|
||||||
|
|
||||||
|
<method name="onPopupBlocked">
|
||||||
|
<parameter name="evt"/>
|
||||||
|
<body>
|
||||||
|
<![CDATA[
|
||||||
|
evt.preventBubble();
|
||||||
|
]]>
|
||||||
|
</body>
|
||||||
|
</method>
|
||||||
|
|
||||||
<method name="onTitleChanged">
|
<method name="onTitleChanged">
|
||||||
<parameter name="evt"/>
|
<parameter name="evt"/>
|
||||||
<body>
|
<body>
|
||||||
|
@ -595,8 +604,9 @@
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
this.mTabbedMode = true; // Welcome to multi-tabbed mode.
|
this.mTabbedMode = true; // Welcome to multi-tabbed mode.
|
||||||
|
|
||||||
// Get the first tab all hooked up with a title listener.
|
// Get the first tab all hooked up with a title listener and popup blocking listener.
|
||||||
this.mCurrentBrowser.addEventListener("DOMTitleChanged", this.onTitleChanged, false);
|
this.mCurrentBrowser.addEventListener("DOMTitleChanged", this.onTitleChanged, false);
|
||||||
|
this.mCurrentBrowser.addEventListener("DOMPopupBlocked", this.onPopupBlocked, false);
|
||||||
|
|
||||||
this.setTabTitle(this.mCurrentTab);
|
this.setTabTitle(this.mCurrentTab);
|
||||||
|
|
||||||
|
@ -670,7 +680,8 @@
|
||||||
this.mPanelContainer.appendChild(b);
|
this.mPanelContainer.appendChild(b);
|
||||||
|
|
||||||
b.addEventListener("DOMTitleChanged", this.onTitleChanged, false);
|
b.addEventListener("DOMTitleChanged", this.onTitleChanged, false);
|
||||||
|
b.addEventListener("DOMPopupBlocked", this.onPopupBlocked, false);
|
||||||
|
|
||||||
if (this.mStrip.collapsed)
|
if (this.mStrip.collapsed)
|
||||||
this.setStripVisibilityTo(true);
|
this.setStripVisibilityTo(true);
|
||||||
|
|
||||||
|
@ -765,9 +776,10 @@
|
||||||
this.mTabFilters.splice(index, 1);
|
this.mTabFilters.splice(index, 1);
|
||||||
this.mTabListeners.splice(index, 1);
|
this.mTabListeners.splice(index, 1);
|
||||||
|
|
||||||
// Remove our title change listener
|
// Remove our title change and blocking listeners
|
||||||
oldBrowser.removeEventListener("DOMTitleChanged", this.onTitleChanged, false);
|
oldBrowser.removeEventListener("DOMTitleChanged", this.onTitleChanged, false);
|
||||||
|
oldBrowser.removeEventListener("DOMPopupBlocked", this.onPopupBlocked, false);
|
||||||
|
|
||||||
// We are no longer the primary content area.
|
// We are no longer the primary content area.
|
||||||
oldBrowser.setAttribute("type", "content");
|
oldBrowser.setAttribute("type", "content");
|
||||||
|
|
||||||
|
@ -1142,6 +1154,7 @@
|
||||||
|
|
||||||
<constructor>
|
<constructor>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
|
this.addEventListener("DOMPopupBlocked", this.onPopupBlocked, false);
|
||||||
this.mCurrentBrowser = this.mPanelContainer.firstChild;
|
this.mCurrentBrowser = this.mPanelContainer.firstChild;
|
||||||
this.mCurrentTab = this.mTabContainer.firstChild;
|
this.mCurrentTab = this.mTabContainer.firstChild;
|
||||||
this.mTabBox.setAttribute("handleCtrlTab", "false");
|
this.mTabBox.setAttribute("handleCtrlTab", "false");
|
||||||
|
@ -1156,6 +1169,7 @@
|
||||||
this.mTabFilters[i] = null;
|
this.mTabFilters[i] = null;
|
||||||
this.mTabListeners[i] = null;
|
this.mTabListeners[i] = null;
|
||||||
this.mPanelContainer.childNodes[i].removeEventListener("DOMTitleChanged", this.onTitleChanged, false);
|
this.mPanelContainer.childNodes[i].removeEventListener("DOMTitleChanged", this.onTitleChanged, false);
|
||||||
|
this.mPanelContainer.childNodes[i].removeEventListener("DOMPopupBlocked", this.onPopupBlocked, false);
|
||||||
}
|
}
|
||||||
this.mPanelContainer.removeEventListener("DOMLinkAdded", this.onLinkAdded, false);
|
this.mPanelContainer.removeEventListener("DOMLinkAdded", this.onLinkAdded, false);
|
||||||
]]>
|
]]>
|
||||||
|
|
Загрузка…
Ссылка в новой задаче