зеркало из https://github.com/mozilla/gecko-dev.git
Fix assorted issues with fastback, including adding progress listener notifications and introducing the PageHide and PageShow events. See bug 292971 for all of the details. r=darin, sr=bzbarsky, a=shaver.
This commit is contained in:
Родитель
d1798870bd
Коммит
3cec60ee65
|
@ -131,8 +131,8 @@ function()
|
|||
linkToolbarUI.toolbarActive = true;
|
||||
document.getElementById("linktoolbar").setAttribute("hasitems", "true");
|
||||
var contentArea = document.getElementById("appcontent");
|
||||
contentArea.addEventListener("unload", linkToolbarUI.clear, true);
|
||||
contentArea.addEventListener("load", linkToolbarUI.deactivate, true);
|
||||
contentArea.addEventListener("PageHide", linkToolbarUI.clear, true);
|
||||
contentArea.addEventListener("PageShow", linkToolbarUI.deactivate, true);
|
||||
contentArea.addEventListener("DOMHeadLoaded", linkToolbarUI.deactivate,
|
||||
true);
|
||||
}
|
||||
|
@ -150,8 +150,8 @@ function()
|
|||
linkToolbarUI.toolbarActive = false;
|
||||
document.getElementById("linktoolbar").setAttribute("hasitems", "false");
|
||||
var contentArea = document.getElementById("appcontent");
|
||||
contentArea.removeEventListener("unload", linkToolbarUI.clear, true);
|
||||
contentArea.removeEventListener("load", linkToolbarUI.deactivate, true);
|
||||
contentArea.removeEventListener("PageHide", linkToolbarUI.clear, true);
|
||||
contentArea.removeEventListener("PageShow", linkToolbarUI.deactivate, true);
|
||||
contentArea.removeEventListener("DOMHeadLoaded", linkToolbarUI.deactivate,
|
||||
true);
|
||||
}
|
||||
|
@ -249,7 +249,7 @@ function()
|
|||
if (!linkToolbarUI.initialized)
|
||||
{
|
||||
linkToolbarUI.initialized = true;
|
||||
document.removeEventListener("load", linkToolbarUI.initHandlers, true);
|
||||
document.removeEventListener("PageShow", linkToolbarUI.initHandlers, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
|
||||
<script type="application/x-javascript">
|
||||
<![CDATA[
|
||||
document.addEventListener("load", linkToolbarUI.initHandlers, true);
|
||||
document.addEventListener("PageShow", linkToolbarUI.initHandlers, true);
|
||||
]]>
|
||||
</script>
|
||||
|
||||
|
|
|
@ -248,7 +248,7 @@ function removePopupPermListener(observer)
|
|||
* one listener that calls all real handlers.
|
||||
*/
|
||||
|
||||
function loadEventHandlers(event)
|
||||
function pageShowEventHandlers(event)
|
||||
{
|
||||
// Filter out events that are not about the document load we are interested in
|
||||
if (event.originalTarget == content.document) {
|
||||
|
@ -554,7 +554,7 @@ function Startup()
|
|||
// (rjc note: not the entire window, otherwise we'll get sidebar pane loads too!)
|
||||
// so we'll be notified when onloads complete.
|
||||
var contentArea = document.getElementById("appcontent");
|
||||
contentArea.addEventListener("load", loadEventHandlers, true);
|
||||
contentArea.addEventListener("PageShow", pageShowEventHandlers, true);
|
||||
contentArea.addEventListener("focus", contentAreaFrameFocus, true);
|
||||
|
||||
var turboMode = false;
|
||||
|
|
Загрузка…
Ссылка в новой задаче