diff --git a/browser/devtools/scratchpad/scratchpad.js b/browser/devtools/scratchpad/scratchpad.js index 9c20d837c34a..9d57f93136d1 100644 --- a/browser/devtools/scratchpad/scratchpad.js +++ b/browser/devtools/scratchpad/scratchpad.js @@ -337,7 +337,7 @@ var Scratchpad = { let contentWindow = this.gBrowser.selectedBrowser.contentWindow; let scriptError = Cc["@mozilla.org/scripterror;1"]. - createInstance(Ci.nsIScriptError2); + createInstance(Ci.nsIScriptError); scriptError.initWithWindowID(ex.message + "\n" + ex.stack, ex.fileName, "", ex.lineNumber, 0, scriptError.errorFlag, diff --git a/browser/devtools/webconsole/HUDService.jsm b/browser/devtools/webconsole/HUDService.jsm index a9648aadf851..a1142e93fdb6 100644 --- a/browser/devtools/webconsole/HUDService.jsm +++ b/browser/devtools/webconsole/HUDService.jsm @@ -6527,7 +6527,6 @@ HUDConsoleObserver = { } if (!(aSubject instanceof Ci.nsIScriptError) || - !(aSubject instanceof Ci.nsIScriptError2) || !aSubject.outerWindowID) { return; } diff --git a/browser/devtools/webconsole/test/browser_webconsole_bug_603750_websocket.js b/browser/devtools/webconsole/test/browser_webconsole_bug_603750_websocket.js index 2166c1782800..8de3a1f7d247 100644 --- a/browser/devtools/webconsole/test/browser_webconsole_bug_603750_websocket.js +++ b/browser/devtools/webconsole/test/browser_webconsole_bug_603750_websocket.js @@ -21,8 +21,7 @@ let TestObserver = { observe: function test_observe(aSubject) { - if (!(aSubject instanceof Ci.nsIScriptError) || - !(aSubject instanceof Ci.nsIScriptError2)) { + if (!(aSubject instanceof Ci.nsIScriptError)) { return; } diff --git a/build/binary-location.mk b/build/binary-location.mk index d19634dd137d..f2579e2bf98e 100644 --- a/build/binary-location.mk +++ b/build/binary-location.mk @@ -40,7 +40,7 @@ ifneq (,$(filter OS2 WINNT,$(OS_ARCH))) PROGRAM = $(MOZ_APP_NAME)$(BIN_SUFFIX) else -ifeq ($(MOZ_BUILD_APP),mobile) +ifeq ($(MOZ_BUILD_APP),mobile/xul) PROGRAM = $(MOZ_APP_NAME)$(BIN_SUFFIX) else PROGRAM = $(MOZ_APP_NAME)-bin$(BIN_SUFFIX) diff --git a/config/system-headers b/config/system-headers index 8cc86c426629..4822d2434d5f 100644 --- a/config/system-headers +++ b/config/system-headers @@ -531,6 +531,7 @@ nl_types.h NodeInfo.h nss.h nssilock.h +nsswitch.h objbase.h objidl.h Objsafe.h @@ -750,6 +751,7 @@ sys/sysctl.h sys/sysinfo.h sys/sysmp.h sys/syssgi.h +sys/system_properties.h sys/systeminfo.h sys/timeb.h sys/time.h diff --git a/content/base/src/nsAttrAndChildArray.h b/content/base/src/nsAttrAndChildArray.h index 983d87e28025..a3e66c1e4012 100644 --- a/content/base/src/nsAttrAndChildArray.h +++ b/content/base/src/nsAttrAndChildArray.h @@ -44,6 +44,8 @@ #ifndef nsAttrAndChildArray_h___ #define nsAttrAndChildArray_h___ +#include "mozilla/Attributes.h" + #include "nscore.h" #include "nsAttrName.h" #include "nsAttrValue.h" @@ -136,8 +138,8 @@ public: PRInt64 SizeOf() const; private: - nsAttrAndChildArray(const nsAttrAndChildArray& aOther); // Not to be implemented - nsAttrAndChildArray& operator=(const nsAttrAndChildArray& aOther); // Not to be implemented + nsAttrAndChildArray(const nsAttrAndChildArray& aOther) MOZ_DELETE; + nsAttrAndChildArray& operator=(const nsAttrAndChildArray& aOther) MOZ_DELETE; void Clear(); diff --git a/content/base/src/nsContentUtils.cpp b/content/base/src/nsContentUtils.cpp index 555c50089c1a..e088a81da370 100644 --- a/content/base/src/nsContentUtils.cpp +++ b/content/base/src/nsContentUtils.cpp @@ -2831,7 +2831,7 @@ nsContentUtils::ReportToConsole(PRUint32 aErrorFlags, if (aURI) aURI->GetSpec(spec); - nsCOMPtr errorObject = + nsCOMPtr errorObject = do_CreateInstance(NS_SCRIPTERROR_CONTRACTID, &rv); NS_ENSURE_SUCCESS(rv, rv); @@ -2843,8 +2843,7 @@ nsContentUtils::ReportToConsole(PRUint32 aErrorFlags, innerWindowID); NS_ENSURE_SUCCESS(rv, rv); - nsCOMPtr logError = do_QueryInterface(errorObject); - return sConsoleService->LogMessage(logError); + return sConsoleService->LogMessage(errorObject); } bool diff --git a/content/base/src/nsEventSource.cpp b/content/base/src/nsEventSource.cpp index 3ac1d84d8ee7..a68503d6efff 100644 --- a/content/base/src/nsEventSource.cpp +++ b/content/base/src/nsEventSource.cpp @@ -1091,7 +1091,7 @@ nsEventSource::PrintErrorOnConsole(const char *aBundleURI, do_GetService(NS_CONSOLESERVICE_CONTRACTID, &rv)); NS_ENSURE_SUCCESS(rv, rv); - nsCOMPtr errObj( + nsCOMPtr errObj( do_CreateInstance(NS_SCRIPTERROR_CONTRACTID, &rv)); NS_ENSURE_SUCCESS(rv, rv); @@ -1106,16 +1106,16 @@ nsEventSource::PrintErrorOnConsole(const char *aBundleURI, } NS_ENSURE_SUCCESS(rv, rv); - errObj->InitWithWindowID(message.get(), - mScriptFile.get(), - nsnull, - mScriptLine, 0, - nsIScriptError::errorFlag, - "Event Source", mInnerWindowID); + rv = errObj->InitWithWindowID(message.get(), + mScriptFile.get(), + nsnull, + mScriptLine, 0, + nsIScriptError::errorFlag, + "Event Source", mInnerWindowID); + NS_ENSURE_SUCCESS(rv, rv); // print the error message directly to the JS console - nsCOMPtr logError = do_QueryInterface(errObj); - rv = console->LogMessage(logError); + rv = console->LogMessage(errObj); NS_ENSURE_SUCCESS(rv, rv); return NS_OK; diff --git a/content/base/src/nsWebSocket.cpp b/content/base/src/nsWebSocket.cpp index 3d182926c5a9..b0e88d4919bd 100644 --- a/content/base/src/nsWebSocket.cpp +++ b/content/base/src/nsWebSocket.cpp @@ -127,7 +127,7 @@ nsWebSocket::PrintErrorOnConsole(const char *aBundleURI, do_GetService(NS_CONSOLESERVICE_CONTRACTID, &rv)); NS_ENSURE_SUCCESS(rv, rv); - nsCOMPtr errorObject( + nsCOMPtr errorObject( do_CreateInstance(NS_SCRIPTERROR_CONTRACTID, &rv)); NS_ENSURE_SUCCESS(rv, rv); @@ -142,15 +142,15 @@ nsWebSocket::PrintErrorOnConsole(const char *aBundleURI, } NS_ENSURE_SUCCESS(rv, rv); - errorObject->InitWithWindowID(message.get(), - NS_ConvertUTF8toUTF16(mScriptFile).get(), - nsnull, mScriptLine, 0, - nsIScriptError::errorFlag, "Web Socket", - mInnerWindowID); + rv = errorObject->InitWithWindowID(message.get(), + NS_ConvertUTF8toUTF16(mScriptFile).get(), + nsnull, mScriptLine, 0, + nsIScriptError::errorFlag, "Web Socket", + mInnerWindowID); + NS_ENSURE_SUCCESS(rv, rv); // print the error message directly to the JS console - nsCOMPtr logError(do_QueryInterface(errorObject)); - rv = console->LogMessage(logError); + rv = console->LogMessage(errorObject); NS_ENSURE_SUCCESS(rv, rv); return NS_OK; diff --git a/content/events/src/nsEventStateManager.cpp b/content/events/src/nsEventStateManager.cpp index 8b0f8cf0e306..667c3e80e0b5 100644 --- a/content/events/src/nsEventStateManager.cpp +++ b/content/events/src/nsEventStateManager.cpp @@ -4508,6 +4508,31 @@ nsEventStateManager::UpdateAncestorState(nsIContent* aStartNode, DoStateChange(labelTarget, aState, aAddState); } } + + if (aAddState) { + // We might be in a situation where a node was in hover both + // because it was hovered and because the label for it was + // hovered, and while we stopped hovering the node the label is + // still hovered. Or we might have had two nested labels for the + // same node, and while one is no longer hovered the other still + // is. In that situation, the label that's still hovered will be + // aStopBefore or some ancestor of it, and the call we just made + // to UpdateAncestorState with aAddState = false would have + // removed the hover state from the node. But the node should + // still be in hover state. To handle this situation we need to + // keep walking up the tree and any time we find a label mark its + // corresponding node as still in our state. + for ( ; aStartNode; aStartNode = aStartNode->GetParent()) { + if (!aStartNode->IsElement()) { + continue; + } + + Element* labelTarget = GetLabelTarget(aStartNode->AsElement()); + if (labelTarget && !labelTarget->State().HasState(aState)) { + DoStateChange(labelTarget, aState, true); + } + } + } } bool diff --git a/content/events/test/test_bug656379-2.html b/content/events/test/test_bug656379-2.html index 54a2df545328..597bee66394c 100644 --- a/content/events/test/test_bug656379-2.html +++ b/content/events/test/test_bug656379-2.html @@ -9,15 +9,18 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=656379 Mozilla Bug 656379

- - + +