diff --git a/mozilla/accessible/src/base/nsRootAccessible.cpp b/mozilla/accessible/src/base/nsRootAccessible.cpp index 046079c8d9c..41eada92a01 100644 --- a/mozilla/accessible/src/base/nsRootAccessible.cpp +++ b/mozilla/accessible/src/base/nsRootAccessible.cpp @@ -287,11 +287,11 @@ nsresult nsRootAccessible::AddEventListeners() GetChromeEventHandler(getter_AddRefs(target)); NS_ASSERTION(target, "No chrome event handler for document"); if (target) { - nsresult rv = target->AddEventListener(NS_LITERAL_STRING("PageHide"), + nsresult rv = target->AddEventListener(NS_LITERAL_STRING("pagehide"), NS_STATIC_CAST(nsIDOMXULListener*, this), PR_TRUE); NS_ENSURE_SUCCESS(rv, rv); - target->AddEventListener(NS_LITERAL_STRING("PageShow"), + target->AddEventListener(NS_LITERAL_STRING("pageshow"), NS_STATIC_CAST(nsIDOMXULListener*, this), PR_TRUE); NS_ENSURE_SUCCESS(rv, rv); @@ -334,10 +334,10 @@ nsresult nsRootAccessible::RemoveEventListeners() GetChromeEventHandler(getter_AddRefs(target)); if (target) { - target->RemoveEventListener(NS_LITERAL_STRING("PageHide"), + target->RemoveEventListener(NS_LITERAL_STRING("pagehide"), NS_STATIC_CAST(nsIDOMXULListener*, this), PR_TRUE); - target->RemoveEventListener(NS_LITERAL_STRING("PageShow"), + target->RemoveEventListener(NS_LITERAL_STRING("pageshow"), NS_STATIC_CAST(nsIDOMXULListener*, this), PR_TRUE); } @@ -710,7 +710,7 @@ NS_IMETHODIMP nsRootAccessible::HandleEvent(nsIDOMEvent* aEvent) } #else AtkStateChange stateData; - if (eventType.EqualsIgnoreCase("PageShow")) { + if (eventType.EqualsIgnoreCase("pageshow")) { nsCOMPtr htmlDoc(do_QueryInterface(targetNode)); if (htmlDoc) { privAcc->FireToolkitEvent(nsIAccessibleEvent::EVENT_REORDER, diff --git a/mozilla/browser/base/content/browser.js b/mozilla/browser/base/content/browser.js index 188de7d8c04..6ac0bc41daf 100644 --- a/mozilla/browser/base/content/browser.js +++ b/mozilla/browser/base/content/browser.js @@ -746,7 +746,7 @@ function delayedStartup() // loads the services initServices(); initBMService(); - gBrowser.addEventListener("PageShow", function(evt) { setTimeout(pageShowEventHandlers, 0, evt); }, true); + gBrowser.addEventListener("pageshow", function(evt) { setTimeout(pageShowEventHandlers, 0, evt); }, true); window.addEventListener("keypress", ctrlNumberTabSelection, false); diff --git a/mozilla/content/base/src/nsHTMLContentSerializer.cpp b/mozilla/content/base/src/nsHTMLContentSerializer.cpp index ee87be1c7b6..8bb1e0f6d3f 100644 --- a/mozilla/content/base/src/nsHTMLContentSerializer.cpp +++ b/mozilla/content/base/src/nsHTMLContentSerializer.cpp @@ -476,6 +476,7 @@ nsHTMLContentSerializer::IsJavaScript(nsIAtom* aAttrNameAtom, const nsAString& a || (aAttrNameAtom == nsLayoutAtoms::onfocus) || (aAttrNameAtom == nsLayoutAtoms::onkeydown) || (aAttrNameAtom == nsLayoutAtoms::onkeypress) || (aAttrNameAtom == nsLayoutAtoms::onkeyup) || (aAttrNameAtom == nsLayoutAtoms::onload) || (aAttrNameAtom == nsLayoutAtoms::onmousedown) + || (aAttrNameAtom == nsLayoutAtoms::onpageshow) || (aAttrNameAtom == nsLayoutAtoms::onpagehide) || (aAttrNameAtom == nsLayoutAtoms::onmousemove) || (aAttrNameAtom == nsLayoutAtoms::onmouseout) || (aAttrNameAtom == nsLayoutAtoms::onmouseover) || (aAttrNameAtom == nsLayoutAtoms::onmouseup) || (aAttrNameAtom == nsLayoutAtoms::onreset) || (aAttrNameAtom == nsLayoutAtoms::onselect) diff --git a/mozilla/content/events/src/nsDOMEvent.cpp b/mozilla/content/events/src/nsDOMEvent.cpp index 1033bc7a0b2..5fb0848e8eb 100644 --- a/mozilla/content/events/src/nsDOMEvent.cpp +++ b/mozilla/content/events/src/nsDOMEvent.cpp @@ -68,7 +68,7 @@ static const char* const sEventNames[] = { "DOMNodeRemovedFromDocument", "DOMNodeInsertedIntoDocument", "DOMAttrModified", "DOMCharacterDataModified", "popupBlocked", "DOMActivate", "DOMFocusIn", "DOMFocusOut", - "PageShow", "PageHide" + "pageshow", "pagehide" }; static char *sPopupAllowedEvents; @@ -459,9 +459,9 @@ nsDOMEvent::SetEventType(const nsAString& aEventTypeArg) else if (atom == nsLayoutAtoms::onDOMFocusOut) mEvent->message = NS_UI_FOCUSOUT; } else if (mEvent->eventStructType == NS_PAGETRANSITION_EVENT) { - if (atom == nsLayoutAtoms::onPageShow) + if (atom == nsLayoutAtoms::onpageshow) mEvent->message = NS_PAGE_SHOW; - else if (atom == nsLayoutAtoms::onPageHide) + else if (atom == nsLayoutAtoms::onpagehide) mEvent->message = NS_PAGE_HIDE; } @@ -897,9 +897,9 @@ const char* nsDOMEvent::GetEventName(PRUint32 aEventType) case NS_UI_FOCUSOUT: return sEventNames[eDOMEvents_DOMFocusOut]; case NS_PAGE_SHOW: - return sEventNames[eDOMEvents_PageShow]; + return sEventNames[eDOMEvents_pageshow]; case NS_PAGE_HIDE: - return sEventNames[eDOMEvents_PageHide]; + return sEventNames[eDOMEvents_pagehide]; default: break; } diff --git a/mozilla/content/events/src/nsDOMEvent.h b/mozilla/content/events/src/nsDOMEvent.h index 28e67288fdc..44fbc078287 100644 --- a/mozilla/content/events/src/nsDOMEvent.h +++ b/mozilla/content/events/src/nsDOMEvent.h @@ -123,8 +123,8 @@ public: eDOMEvents_DOMActivate, eDOMEvents_DOMFocusIn, eDOMEvents_DOMFocusOut, - eDOMEvents_PageShow, - eDOMEvents_PageHide + eDOMEvents_pageshow, + eDOMEvents_pagehide }; nsDOMEvent(nsPresContext* aPresContext, nsEvent* aEvent); diff --git a/mozilla/content/events/src/nsEventListenerManager.cpp b/mozilla/content/events/src/nsEventListenerManager.cpp index 310a2c69c5a..6c98ea3d711 100644 --- a/mozilla/content/events/src/nsEventListenerManager.cpp +++ b/mozilla/content/events/src/nsEventListenerManager.cpp @@ -1024,11 +1024,11 @@ nsEventListenerManager::GetIdentifiersForType(nsIAtom* aType, *aArrayType = eEventArrayType_Composition; *aFlags = NS_EVENT_BITS_COMPOSITION_END; } - else if (aType == nsLayoutAtoms::onPageShow) { + else if (aType == nsLayoutAtoms::onpageshow) { *aArrayType = eEventArrayType_PageTransition; *aFlags = NS_EVENT_BITS_PAGETRANSITION_SHOW; } - else if (aType == nsLayoutAtoms::onPageHide) { + else if (aType == nsLayoutAtoms::onpagehide) { *aArrayType = eEventArrayType_PageTransition; *aFlags = NS_EVENT_BITS_PAGETRANSITION_HIDE; } diff --git a/mozilla/content/html/content/src/nsGenericHTMLElement.cpp b/mozilla/content/html/content/src/nsGenericHTMLElement.cpp index d65eeb1c02f..f50c624d3c3 100644 --- a/mozilla/content/html/content/src/nsGenericHTMLElement.cpp +++ b/mozilla/content/html/content/src/nsGenericHTMLElement.cpp @@ -1858,6 +1858,8 @@ PRBool nsGenericHTMLElement::IsEventName(nsIAtom* aName) aName == nsLayoutAtoms::onload || aName == nsLayoutAtoms::onunload || aName == nsLayoutAtoms::onbeforeunload || + aName == nsLayoutAtoms::onpageshow || + aName == nsLayoutAtoms::onpagehide || aName == nsLayoutAtoms::onabort || aName == nsLayoutAtoms::onerror || aName == nsLayoutAtoms::onfocus || diff --git a/mozilla/docshell/base/nsDocShell.cpp b/mozilla/docshell/base/nsDocShell.cpp index fe0c6dbb20b..9daece2771e 100644 --- a/mozilla/docshell/base/nsDocShell.cpp +++ b/mozilla/docshell/base/nsDocShell.cpp @@ -5035,7 +5035,7 @@ nsDocShell::FinishRestore() if (doc) { // Finally, we remove the request from the loadgroup. This will // cause onStateChange(STATE_STOP) to fire, which will fire the - // PageShow event to the chrome. + // pageshow event to the chrome. nsIChannel *channel = doc->GetChannel(); if (channel) { diff --git a/mozilla/dom/public/idl/events/nsIDOMPageTransitionEvent.idl b/mozilla/dom/public/idl/events/nsIDOMPageTransitionEvent.idl index e27d5db3ba5..f457665cb9f 100755 --- a/mozilla/dom/public/idl/events/nsIDOMPageTransitionEvent.idl +++ b/mozilla/dom/public/idl/events/nsIDOMPageTransitionEvent.idl @@ -39,8 +39,8 @@ #include "nsIDOMEvent.idl" /** - * The nsIDOMPageTransitionEvent interface is used for the PageShow and - * PageHide events, which are generic events that apply to both page + * The nsIDOMPageTransitionEvent interface is used for the pageshow and + * pagehide events, which are generic events that apply to both page * load/unload and saving/restoring a document from session history. */ @@ -54,7 +54,7 @@ interface nsIDOMPageTransitionEvent : nsIDOMEvent */ readonly attribute boolean persisted; - /* Initialize a new PageShow or PageHide event. */ + /* Initialize a new pageshow or pagehide event. */ void initPageTransitionEvent(in DOMString typeArg, in boolean canBubbleArg, in boolean canCancelArg, diff --git a/mozilla/dom/src/base/nsDOMClassInfo.cpp b/mozilla/dom/src/base/nsDOMClassInfo.cpp index 281810a2de0..31ba1ac90b0 100644 --- a/mozilla/dom/src/base/nsDOMClassInfo.cpp +++ b/mozilla/dom/src/base/nsDOMClassInfo.cpp @@ -1069,6 +1069,8 @@ jsval nsDOMClassInfo::sOnselect_id = JSVAL_VOID; jsval nsDOMClassInfo::sOnload_id = JSVAL_VOID; jsval nsDOMClassInfo::sOnbeforeunload_id = JSVAL_VOID; jsval nsDOMClassInfo::sOnunload_id = JSVAL_VOID; +jsval nsDOMClassInfo::sOnpageshow_id = JSVAL_VOID; +jsval nsDOMClassInfo::sOnpagehide_id = JSVAL_VOID; jsval nsDOMClassInfo::sOnabort_id = JSVAL_VOID; jsval nsDOMClassInfo::sOnerror_id = JSVAL_VOID; jsval nsDOMClassInfo::sOnpaint_id = JSVAL_VOID; @@ -1242,6 +1244,8 @@ nsDOMClassInfo::DefineStaticJSVals(JSContext *cx) SET_JSVAL_TO_STRING(sOnload_id, cx, "onload"); SET_JSVAL_TO_STRING(sOnbeforeunload_id, cx, "onbeforeunload"); SET_JSVAL_TO_STRING(sOnunload_id, cx, "onunload"); + SET_JSVAL_TO_STRING(sOnpageshow_id, cx, "onpageshow"); + SET_JSVAL_TO_STRING(sOnpagehide_id, cx, "onpagehide"); SET_JSVAL_TO_STRING(sOnabort_id, cx, "onabort"); SET_JSVAL_TO_STRING(sOnerror_id, cx, "onerror"); SET_JSVAL_TO_STRING(sOnpaint_id, cx, "onpaint"); @@ -3308,6 +3312,8 @@ nsDOMClassInfo::ShutDown() sOnload_id = JSVAL_VOID; sOnbeforeunload_id = JSVAL_VOID; sOnunload_id = JSVAL_VOID; + sOnpageshow_id = JSVAL_VOID; + sOnpagehide_id = JSVAL_VOID; sOnabort_id = JSVAL_VOID; sOnerror_id = JSVAL_VOID; sOnpaint_id = JSVAL_VOID; @@ -5615,7 +5621,9 @@ nsEventReceiverSH::ReallyIsEventName(jsval id, jschar aFirstChar) case 'l' : return id == sOnload_id; case 'p' : - return id == sOnpaint_id; + return (id == sOnpaint_id || + id == sOnpageshow_id || + id == sOnpagehide_id); case 'k' : return (id == sOnkeydown_id || id == sOnkeypress_id || diff --git a/mozilla/dom/src/base/nsDOMClassInfo.h b/mozilla/dom/src/base/nsDOMClassInfo.h index 481363b5603..28fbd269ef3 100644 --- a/mozilla/dom/src/base/nsDOMClassInfo.h +++ b/mozilla/dom/src/base/nsDOMClassInfo.h @@ -278,6 +278,8 @@ protected: static jsval sOnload_id; static jsval sOnbeforeunload_id; static jsval sOnunload_id; + static jsval sOnpageshow_id; + static jsval sOnpagehide_id; static jsval sOnabort_id; static jsval sOnerror_id; static jsval sOnpaint_id; diff --git a/mozilla/extensions/inspector/resources/content/inspector.js b/mozilla/extensions/inspector/resources/content/inspector.js index 1bf38da30b1..f412923cfea 100644 --- a/mozilla/extensions/inspector/resources/content/inspector.js +++ b/mozilla/extensions/inspector/resources/content/inspector.js @@ -110,7 +110,7 @@ InspectorApp.prototype = //this.initSearch(); var el = document.getElementById("bxBrowser"); - el.addEventListener("PageShow", BrowserPageShowListener, true); + el.addEventListener("pageshow", BrowserPageShowListener, true); this.setBrowser(false, true); //this.setSearch(false, true); @@ -578,7 +578,7 @@ InspectorApp.prototype = function BrowserPageShowListener(aEvent) { - // since we will also get PageShow events for frame documents, + // since we will also get pageshow events for frame documents, // make sure we respond to the top-level document load if (aEvent.target.defaultView == _content) inspector.documentLoaded(); diff --git a/mozilla/extensions/inspector/resources/content/search/inSearchService.js b/mozilla/extensions/inspector/resources/content/search/inSearchService.js index faf537f6f9d..6f3fad0249d 100644 --- a/mozilla/extensions/inspector/resources/content/search/inSearchService.js +++ b/mozilla/extensions/inspector/resources/content/search/inSearchService.js @@ -68,7 +68,7 @@ function inSearchService() // the xmlextras facility for loading xml, but it's broken, so // we use a browser for onw var browser = document.getElementById("inSearchServiceLoader"); - browser.addEventListener("PageShow", inSearchService_LoadListener, true); + browser.addEventListener("pageshow", inSearchService_LoadListener, true); this.mWebNav = browser.webNavigation; } diff --git a/mozilla/layout/base/nsLayoutAtomList.h b/mozilla/layout/base/nsLayoutAtomList.h index f380243ddfc..c8293801757 100644 --- a/mozilla/layout/base/nsLayoutAtomList.h +++ b/mozilla/layout/base/nsLayoutAtomList.h @@ -212,8 +212,8 @@ LAYOUT_ATOM(onDOMAttrModified, "onDOMAttrModified") LAYOUT_ATOM(onDOMCharacterDataModified, "onDOMCharacterDataModified") // pagetransition events -LAYOUT_ATOM(onPageShow, "onPageShow") -LAYOUT_ATOM(onPageHide, "onPageHide") +LAYOUT_ATOM(onpageshow, "onpageshow") +LAYOUT_ATOM(onpagehide, "onpagehide") // Alphabetical list of languages for lang-specific transforms LAYOUT_ATOM(Japanese, "ja") diff --git a/mozilla/toolkit/content/charsetOverlay.js b/mozilla/toolkit/content/charsetOverlay.js index 7dd4f10160a..7dcbabf362c 100644 --- a/mozilla/toolkit/content/charsetOverlay.js +++ b/mozilla/toolkit/content/charsetOverlay.js @@ -260,7 +260,7 @@ if (window && (wintype == "navigator:browser")) { var contentArea = window.document.getElementById("appcontent"); if (contentArea) - contentArea.addEventListener("PageShow", charsetLoadListener, true); + contentArea.addEventListener("pageshow", charsetLoadListener, true); } else { @@ -269,14 +269,14 @@ else { var messageContent = window.document.getElementById("messagepane"); if (messageContent) - messageContent.addEventListener("PageShow", mailCharsetLoadListener, true); + messageContent.addEventListener("pageshow", mailCharsetLoadListener, true); } else if (window && arrayOfStrings[0] == "composer") { contentArea = window.document.getElementById("appcontent"); if (contentArea) - contentArea.addEventListener("PageShow", composercharsetLoadListener, true); + contentArea.addEventListener("pageshow", composercharsetLoadListener, true); } } diff --git a/mozilla/toolkit/content/widgets/browser.xml b/mozilla/toolkit/content/widgets/browser.xml index e0bbb7d7b24..698dfff097e 100644 --- a/mozilla/toolkit/content/widgets/browser.xml +++ b/mozilla/toolkit/content/widgets/browser.xml @@ -567,8 +567,8 @@ } // Listen for first load for lazy attachment to form fill controller - this.addEventListener("PageShow", this.onPageShow, true); - this.addEventListener("PageHide", this.onPageHide, true); + this.addEventListener("pageshow", this.onPageShow, true); + this.addEventListener("pagehide", this.onPageHide, true); this.addEventListener("DOMPopupBlocked", this.onPopupBlocked, false); ]]> @@ -607,8 +607,8 @@ this._fastFind = null; this._webBrowserFind = null; - this.removeEventListener("PageShow", this.onPageShow, true); - this.removeEventListener("PageHide", this.onPageHide, true); + this.removeEventListener("pageshow", this.onPageShow, true); + this.removeEventListener("pagehide", this.onPageHide, true); this.removeEventListener("DOMPopupBlocked", this.onPopupBlocked, true); ]]> diff --git a/mozilla/xpfe/browser/resources/content/linkToolbarOverlay.js b/mozilla/xpfe/browser/resources/content/linkToolbarOverlay.js index d87c5e68628..4ddd96b612b 100644 --- a/mozilla/xpfe/browser/resources/content/linkToolbarOverlay.js +++ b/mozilla/xpfe/browser/resources/content/linkToolbarOverlay.js @@ -131,8 +131,8 @@ function() linkToolbarUI.toolbarActive = true; document.getElementById("linktoolbar").setAttribute("hasitems", "true"); var contentArea = document.getElementById("appcontent"); - contentArea.addEventListener("PageHide", linkToolbarUI.clear, true); - contentArea.addEventListener("PageShow", 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("PageHide", linkToolbarUI.clear, true); - contentArea.removeEventListener("PageShow", 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("PageShow", linkToolbarUI.initHandlers, true); + document.removeEventListener("pageshow", linkToolbarUI.initHandlers, true); } } diff --git a/mozilla/xpfe/browser/resources/content/linkToolbarOverlay.xul b/mozilla/xpfe/browser/resources/content/linkToolbarOverlay.xul index 43e64c5d82d..a8e2ea64512 100644 --- a/mozilla/xpfe/browser/resources/content/linkToolbarOverlay.xul +++ b/mozilla/xpfe/browser/resources/content/linkToolbarOverlay.xul @@ -56,7 +56,7 @@ diff --git a/mozilla/xpfe/browser/resources/content/navigator.js b/mozilla/xpfe/browser/resources/content/navigator.js index fa69ae2132a..d139ccfd33a 100644 --- a/mozilla/xpfe/browser/resources/content/navigator.js +++ b/mozilla/xpfe/browser/resources/content/navigator.js @@ -564,7 +564,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("PageShow", pageShowEventHandlers, true); + contentArea.addEventListener("pageshow", pageShowEventHandlers, true); contentArea.addEventListener("focus", contentAreaFrameFocus, true); var turboMode = false; diff --git a/mozilla/xpfe/global/resources/content/charsetOverlay.js b/mozilla/xpfe/global/resources/content/charsetOverlay.js index 2afad773239..a1936cf4735 100644 --- a/mozilla/xpfe/global/resources/content/charsetOverlay.js +++ b/mozilla/xpfe/global/resources/content/charsetOverlay.js @@ -283,7 +283,7 @@ if (window && (wintype == "navigator:browser")) { var contentArea = window.document.getElementById("appcontent"); if (contentArea) - contentArea.addEventListener("PageShow", charsetLoadListener, true); + contentArea.addEventListener("pageshow", charsetLoadListener, true); } else { @@ -292,14 +292,14 @@ else { var messageContent = window.document.getElementById("messagepane"); if (messageContent) - messageContent.addEventListener("PageShow", mailCharsetLoadListener, true); + messageContent.addEventListener("pageshow", mailCharsetLoadListener, true); } else if (window && arrayOfStrings[0] == "composer") { contentArea = window.document.getElementById("appcontent"); if (contentArea) - contentArea.addEventListener("PageShow", composercharsetLoadListener, true); + contentArea.addEventListener("pageshow", composercharsetLoadListener, true); } }