From 93cc6b0f518ad8ed2b563b254b08f4aa727fc034 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Fri, 2 Jan 2015 21:13:39 -0500 Subject: [PATCH] Bug 1117264 - Mark virtual overridden functions as MOZ_OVERRIDE in dom/base code; r=baku --- dom/base/Attr.h | 4 +- dom/base/Comment.h | 2 +- dom/base/DOMQuad.cpp | 8 +- dom/base/DOMStringList.h | 2 +- dom/base/DocumentFragment.h | 2 +- dom/base/Element.h | 102 ++++++++++-------- dom/base/EventSource.cpp | 2 +- dom/base/File.cpp | 2 +- dom/base/File.h | 8 +- dom/base/FragmentOrElement.h | 2 +- dom/base/ImageEncoder.cpp | 4 +- dom/base/PerformanceResourceTiming.h | 4 +- dom/base/WebSocket.cpp | 2 +- dom/base/nsContentIterator.cpp | 32 +++--- dom/base/nsContentUtils.cpp | 4 +- dom/base/nsDOMClassInfo.h | 2 +- dom/base/nsDocument.cpp | 4 +- dom/base/nsDocument.h | 68 ++++++------ dom/base/nsFrameMessageManager.cpp | 2 +- dom/base/nsFrameMessageManager.h | 2 +- dom/base/nsGenConImageContent.cpp | 8 +- dom/base/nsGenericDOMDataNode.h | 2 +- dom/base/nsGlobalWindow.cpp | 4 +- dom/base/nsGlobalWindow.h | 130 +++++++++++------------ dom/base/nsGlobalWindowCommands.cpp | 6 +- dom/base/nsHostObjectProtocolHandler.cpp | 4 +- dom/base/nsIDocument.h | 2 +- dom/base/nsIDocumentObserver.h | 24 ++--- dom/base/nsIMutationObserver.h | 18 ++-- dom/base/nsINode.h | 72 ++++++------- dom/base/nsInProcessTabChildGlobal.h | 4 +- dom/base/nsJSEnvironment.cpp | 2 +- dom/base/nsJSTimeoutHandler.cpp | 8 +- dom/base/nsObjectLoadingContent.cpp | 4 +- dom/base/nsReferencedElement.h | 6 +- dom/base/nsScreen.h | 2 +- dom/base/nsStyledElement.h | 2 +- dom/base/nsTextNode.cpp | 6 +- dom/base/nsTextNode.h | 2 +- dom/base/nsWindowMemoryReporter.h | 2 +- dom/base/nsXMLHttpRequest.cpp | 2 +- dom/base/nsXMLHttpRequest.h | 4 +- 42 files changed, 292 insertions(+), 280 deletions(-) diff --git a/dom/base/Attr.h b/dom/base/Attr.h index 3305a9e7519..d6b486229cc 100644 --- a/dom/base/Attr.h +++ b/dom/base/Attr.h @@ -79,7 +79,7 @@ public: NS_DECL_CYCLE_COLLECTION_SKIPPABLE_SCRIPT_HOLDER_CLASS_AMBIGUOUS(Attr, nsIAttribute) - virtual nsIDOMNode* AsDOMNode() { return this; } + virtual nsIDOMNode* AsDOMNode() MOZ_OVERRIDE { return this; } // WebIDL virtual JSObject* WrapNode(JSContext* aCx) MOZ_OVERRIDE; @@ -98,7 +98,7 @@ public: Element* GetOwnerElement(ErrorResult& aRv); protected: - virtual Element* GetNameSpaceElement() + virtual Element* GetNameSpaceElement() MOZ_OVERRIDE { return GetElement(); } diff --git a/dom/base/Comment.h b/dom/base/Comment.h index 27e8060766e..538610f1a76 100644 --- a/dom/base/Comment.h +++ b/dom/base/Comment.h @@ -52,7 +52,7 @@ public: // Empty interface // nsINode - virtual bool IsNodeOfType(uint32_t aFlags) const; + virtual bool IsNodeOfType(uint32_t aFlags) const MOZ_OVERRIDE; virtual nsGenericDOMDataNode* CloneDataNode(mozilla::dom::NodeInfo *aNodeInfo, bool aCloneText) const MOZ_OVERRIDE; diff --git a/dom/base/DOMQuad.cpp b/dom/base/DOMQuad.cpp index 2f0b912cdf2..9c4581fcee7 100644 --- a/dom/base/DOMQuad.cpp +++ b/dom/base/DOMQuad.cpp @@ -84,25 +84,25 @@ public: NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(QuadBounds, DOMRectReadOnly) NS_DECL_ISUPPORTS_INHERITED - virtual double X() const + virtual double X() const MOZ_OVERRIDE { double x1, x2; GetHorizontalMinMax(&x1, &x2); return x1; } - virtual double Y() const + virtual double Y() const MOZ_OVERRIDE { double y1, y2; GetVerticalMinMax(&y1, &y2); return y1; } - virtual double Width() const + virtual double Width() const MOZ_OVERRIDE { double x1, x2; GetHorizontalMinMax(&x1, &x2); return x2 - x1; } - virtual double Height() const + virtual double Height() const MOZ_OVERRIDE { double y1, y2; GetVerticalMinMax(&y1, &y2); diff --git a/dom/base/DOMStringList.h b/dom/base/DOMStringList.h index 87e9fd9c429..03b28a3d1de 100644 --- a/dom/base/DOMStringList.h +++ b/dom/base/DOMStringList.h @@ -24,7 +24,7 @@ public: NS_DECL_CYCLE_COLLECTING_ISUPPORTS NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMStringList) - virtual JSObject* WrapObject(JSContext* aCx); + virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE; nsISupports* GetParentObject() { return nullptr; diff --git a/dom/base/DocumentFragment.h b/dom/base/DocumentFragment.h index 2a9d64fc07d..550c37913a4 100644 --- a/dom/base/DocumentFragment.h +++ b/dom/base/DocumentFragment.h @@ -112,7 +112,7 @@ public: return; } - virtual Element* GetNameSpaceElement() + virtual Element* GetNameSpaceElement() MOZ_OVERRIDE { return nullptr; } diff --git a/dom/base/Element.h b/dom/base/Element.h index 7ece1b52443..c51b341b20d 100644 --- a/dom/base/Element.h +++ b/dom/base/Element.h @@ -159,7 +159,7 @@ public: NS_DECLARE_STATIC_IID_ACCESSOR(NS_ELEMENT_IID) - NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr); + NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr) MOZ_OVERRIDE; /** * Method to get the full state of this element. See mozilla/EventStates.h @@ -1211,7 +1211,7 @@ protected: nsIFrame* GetStyledFrame(); - virtual Element* GetNameSpaceElement() + virtual Element* GetNameSpaceElement() MOZ_OVERRIDE { return this; } @@ -1311,9 +1311,9 @@ public: NS_DECL_NSIDOMNODELIST // nsINodeList - virtual nsIContent* Item(uint32_t aIndex); - virtual int32_t IndexOf(nsIContent* aContent); - virtual nsINode* GetParentObject() { return mParent; } + virtual nsIContent* Item(uint32_t aIndex) MOZ_OVERRIDE; + virtual int32_t IndexOf(nsIContent* aContent) MOZ_OVERRIDE; + virtual nsINode* GetParentObject() MOZ_OVERRIDE { return mParent; } virtual uint32_t Length() const; virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE; protected: @@ -1467,43 +1467,45 @@ _elementName::Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult) const #define NS_FORWARD_NSIDOMELEMENT_TO_GENERIC \ typedef mozilla::dom::Element Element; \ -NS_IMETHOD GetTagName(nsAString& aTagName) MOZ_FINAL \ +NS_IMETHOD GetTagName(nsAString& aTagName) MOZ_FINAL MOZ_OVERRIDE \ { \ Element::GetTagName(aTagName); \ return NS_OK; \ } \ -NS_IMETHOD GetId(nsAString& aId) MOZ_FINAL \ +NS_IMETHOD GetId(nsAString& aId) MOZ_FINAL MOZ_OVERRIDE \ { \ Element::GetId(aId); \ return NS_OK; \ } \ -NS_IMETHOD SetId(const nsAString& aId) MOZ_FINAL \ +NS_IMETHOD SetId(const nsAString& aId) MOZ_FINAL MOZ_OVERRIDE \ { \ Element::SetId(aId); \ return NS_OK; \ } \ -NS_IMETHOD GetClassName(nsAString& aClassName) MOZ_FINAL \ +NS_IMETHOD GetClassName(nsAString& aClassName) MOZ_FINAL MOZ_OVERRIDE \ { \ Element::GetClassName(aClassName); \ return NS_OK; \ } \ -NS_IMETHOD SetClassName(const nsAString& aClassName) MOZ_FINAL \ +NS_IMETHOD SetClassName(const nsAString& aClassName) MOZ_FINAL MOZ_OVERRIDE \ { \ Element::SetClassName(aClassName); \ return NS_OK; \ } \ -NS_IMETHOD GetClassList(nsISupports** aClassList) MOZ_FINAL \ +NS_IMETHOD GetClassList(nsISupports** aClassList) MOZ_FINAL MOZ_OVERRIDE \ { \ Element::GetClassList(aClassList); \ return NS_OK; \ } \ NS_IMETHOD GetAttributes(nsIDOMMozNamedAttrMap** aAttributes) MOZ_FINAL \ + MOZ_OVERRIDE \ { \ NS_ADDREF(*aAttributes = Attributes()); \ return NS_OK; \ } \ using Element::GetAttribute; \ NS_IMETHOD GetAttribute(const nsAString& name, nsAString& _retval) MOZ_FINAL \ + MOZ_OVERRIDE \ { \ nsString attr; \ GetAttribute(name, attr); \ @@ -1512,13 +1514,13 @@ NS_IMETHOD GetAttribute(const nsAString& name, nsAString& _retval) MOZ_FINAL \ } \ NS_IMETHOD GetAttributeNS(const nsAString& namespaceURI, \ const nsAString& localName, \ - nsAString& _retval) MOZ_FINAL \ + nsAString& _retval) MOZ_FINAL MOZ_OVERRIDE \ { \ Element::GetAttributeNS(namespaceURI, localName, _retval); \ return NS_OK; \ } \ NS_IMETHOD SetAttribute(const nsAString& name, \ - const nsAString& value) \ + const nsAString& value) MOZ_OVERRIDE \ { \ mozilla::ErrorResult rv; \ Element::SetAttribute(name, value, rv); \ @@ -1526,14 +1528,14 @@ NS_IMETHOD SetAttribute(const nsAString& name, \ } \ NS_IMETHOD SetAttributeNS(const nsAString& namespaceURI, \ const nsAString& qualifiedName, \ - const nsAString& value) MOZ_FINAL \ + const nsAString& value) MOZ_FINAL MOZ_OVERRIDE \ { \ mozilla::ErrorResult rv; \ Element::SetAttributeNS(namespaceURI, qualifiedName, value, rv); \ return rv.ErrorCode(); \ } \ using Element::RemoveAttribute; \ -NS_IMETHOD RemoveAttribute(const nsAString& name) MOZ_FINAL \ +NS_IMETHOD RemoveAttribute(const nsAString& name) MOZ_FINAL MOZ_OVERRIDE \ { \ mozilla::ErrorResult rv; \ RemoveAttribute(name, rv); \ @@ -1541,6 +1543,7 @@ NS_IMETHOD RemoveAttribute(const nsAString& name) MOZ_FINAL \ } \ NS_IMETHOD RemoveAttributeNS(const nsAString& namespaceURI, \ const nsAString& localName) MOZ_FINAL \ + MOZ_OVERRIDE \ { \ mozilla::ErrorResult rv; \ Element::RemoveAttributeNS(namespaceURI, localName, rv); \ @@ -1548,31 +1551,31 @@ NS_IMETHOD RemoveAttributeNS(const nsAString& namespaceURI, \ } \ using Element::HasAttribute; \ NS_IMETHOD HasAttribute(const nsAString& name, \ - bool* _retval) MOZ_FINAL \ + bool* _retval) MOZ_FINAL MOZ_OVERRIDE \ { \ *_retval = HasAttribute(name); \ return NS_OK; \ } \ NS_IMETHOD HasAttributeNS(const nsAString& namespaceURI, \ const nsAString& localName, \ - bool* _retval) MOZ_FINAL \ + bool* _retval) MOZ_FINAL MOZ_OVERRIDE \ { \ *_retval = Element::HasAttributeNS(namespaceURI, localName); \ return NS_OK; \ } \ -NS_IMETHOD HasAttributes(bool* _retval) MOZ_FINAL \ +NS_IMETHOD HasAttributes(bool* _retval) MOZ_FINAL MOZ_OVERRIDE \ { \ *_retval = Element::HasAttributes(); \ return NS_OK; \ } \ NS_IMETHOD GetAttributeNode(const nsAString& name, \ - nsIDOMAttr** _retval) MOZ_FINAL \ + nsIDOMAttr** _retval) MOZ_FINAL MOZ_OVERRIDE \ { \ NS_IF_ADDREF(*_retval = Element::GetAttributeNode(name)); \ return NS_OK; \ } \ NS_IMETHOD SetAttributeNode(nsIDOMAttr* newAttr, \ - nsIDOMAttr** _retval) MOZ_FINAL \ + nsIDOMAttr** _retval) MOZ_FINAL MOZ_OVERRIDE \ { \ if (!newAttr) { \ return NS_ERROR_INVALID_POINTER; \ @@ -1583,7 +1586,7 @@ NS_IMETHOD SetAttributeNode(nsIDOMAttr* newAttr, \ return rv.ErrorCode(); \ } \ NS_IMETHOD RemoveAttributeNode(nsIDOMAttr* oldAttr, \ - nsIDOMAttr** _retval) MOZ_FINAL \ + nsIDOMAttr** _retval) MOZ_FINAL MOZ_OVERRIDE \ { \ if (!oldAttr) { \ return NS_ERROR_INVALID_POINTER; \ @@ -1595,14 +1598,14 @@ NS_IMETHOD RemoveAttributeNode(nsIDOMAttr* oldAttr, \ } \ NS_IMETHOD GetAttributeNodeNS(const nsAString& namespaceURI, \ const nsAString& localName, \ - nsIDOMAttr** _retval) MOZ_FINAL \ + nsIDOMAttr** _retval) MOZ_FINAL MOZ_OVERRIDE \ { \ NS_IF_ADDREF(*_retval = Element::GetAttributeNodeNS(namespaceURI, \ localName)); \ return NS_OK; \ } \ NS_IMETHOD SetAttributeNodeNS(nsIDOMAttr* newAttr, \ - nsIDOMAttr** _retval) MOZ_FINAL \ + nsIDOMAttr** _retval) MOZ_FINAL MOZ_OVERRIDE \ { \ mozilla::ErrorResult rv; \ mozilla::dom::Attr* attr = static_cast(newAttr); \ @@ -1611,6 +1614,7 @@ NS_IMETHOD SetAttributeNodeNS(nsIDOMAttr* newAttr, \ } \ NS_IMETHOD GetElementsByTagName(const nsAString& name, \ nsIDOMHTMLCollection** _retval) MOZ_FINAL \ + MOZ_OVERRIDE \ { \ Element::GetElementsByTagName(name, _retval); \ return NS_OK; \ @@ -1618,21 +1622,25 @@ NS_IMETHOD GetElementsByTagName(const nsAString& name, \ NS_IMETHOD GetElementsByTagNameNS(const nsAString& namespaceURI, \ const nsAString& localName, \ nsIDOMHTMLCollection** _retval) MOZ_FINAL \ + MOZ_OVERRIDE\ { \ return Element::GetElementsByTagNameNS(namespaceURI, localName, \ _retval); \ } \ NS_IMETHOD GetElementsByClassName(const nsAString& classes, \ nsIDOMHTMLCollection** _retval) MOZ_FINAL \ + MOZ_OVERRIDE\ { \ return Element::GetElementsByClassName(classes, _retval); \ } \ NS_IMETHOD GetChildElements(nsIDOMNodeList** aChildElements) MOZ_FINAL \ + MOZ_OVERRIDE \ { \ nsIHTMLCollection* list = FragmentOrElement::Children(); \ return CallQueryInterface(list, aChildElements); \ } \ NS_IMETHOD GetFirstElementChild(nsIDOMElement** aFirstElementChild) MOZ_FINAL \ + MOZ_OVERRIDE \ { \ Element* element = Element::GetFirstElementChild(); \ if (!element) { \ @@ -1642,6 +1650,7 @@ NS_IMETHOD GetFirstElementChild(nsIDOMElement** aFirstElementChild) MOZ_FINAL \ return CallQueryInterface(element, aFirstElementChild); \ } \ NS_IMETHOD GetLastElementChild(nsIDOMElement** aLastElementChild) MOZ_FINAL \ + MOZ_OVERRIDE \ { \ Element* element = Element::GetLastElementChild(); \ if (!element) { \ @@ -1651,7 +1660,7 @@ NS_IMETHOD GetLastElementChild(nsIDOMElement** aLastElementChild) MOZ_FINAL \ return CallQueryInterface(element, aLastElementChild); \ } \ NS_IMETHOD GetPreviousElementSibling(nsIDOMElement** aPreviousElementSibling) \ - MOZ_FINAL \ + MOZ_FINAL MOZ_OVERRIDE \ { \ Element* element = Element::GetPreviousElementSibling(); \ if (!element) { \ @@ -1661,7 +1670,7 @@ NS_IMETHOD GetPreviousElementSibling(nsIDOMElement** aPreviousElementSibling) \ return CallQueryInterface(element, aPreviousElementSibling); \ } \ NS_IMETHOD GetNextElementSibling(nsIDOMElement** aNextElementSibling) \ - MOZ_FINAL \ + MOZ_FINAL MOZ_OVERRIDE \ { \ Element* element = Element::GetNextElementSibling(); \ if (!element) { \ @@ -1671,121 +1680,124 @@ NS_IMETHOD GetNextElementSibling(nsIDOMElement** aNextElementSibling) \ return CallQueryInterface(element, aNextElementSibling); \ } \ NS_IMETHOD GetChildElementCount(uint32_t* aChildElementCount) MOZ_FINAL \ + MOZ_OVERRIDE \ { \ *aChildElementCount = Element::ChildElementCount(); \ return NS_OK; \ } \ -NS_IMETHOD MozRemove() MOZ_FINAL \ +NS_IMETHOD MozRemove() MOZ_FINAL MOZ_OVERRIDE \ { \ nsINode::Remove(); \ return NS_OK; \ } \ NS_IMETHOD GetClientRects(nsIDOMClientRectList** _retval) MOZ_FINAL \ + MOZ_OVERRIDE \ { \ *_retval = Element::GetClientRects().take(); \ return NS_OK; \ } \ NS_IMETHOD GetBoundingClientRect(nsIDOMClientRect** _retval) MOZ_FINAL \ + MOZ_OVERRIDE \ { \ *_retval = Element::GetBoundingClientRect().take(); \ return NS_OK; \ } \ -NS_IMETHOD GetScrollTop(int32_t* aScrollTop) MOZ_FINAL \ +NS_IMETHOD GetScrollTop(int32_t* aScrollTop) MOZ_FINAL MOZ_OVERRIDE \ { \ *aScrollTop = Element::ScrollTop(); \ return NS_OK; \ } \ -NS_IMETHOD SetScrollTop(int32_t aScrollTop) MOZ_FINAL \ +NS_IMETHOD SetScrollTop(int32_t aScrollTop) MOZ_FINAL MOZ_OVERRIDE \ { \ Element::SetScrollTop(aScrollTop); \ return NS_OK; \ } \ -NS_IMETHOD GetScrollLeft(int32_t* aScrollLeft) MOZ_FINAL \ +NS_IMETHOD GetScrollLeft(int32_t* aScrollLeft) MOZ_FINAL MOZ_OVERRIDE \ { \ *aScrollLeft = Element::ScrollLeft(); \ return NS_OK; \ } \ -NS_IMETHOD SetScrollLeft(int32_t aScrollLeft) MOZ_FINAL \ +NS_IMETHOD SetScrollLeft(int32_t aScrollLeft) MOZ_FINAL MOZ_OVERRIDE \ { \ Element::SetScrollLeft(aScrollLeft); \ return NS_OK; \ } \ -NS_IMETHOD GetScrollWidth(int32_t* aScrollWidth) MOZ_FINAL \ +NS_IMETHOD GetScrollWidth(int32_t* aScrollWidth) MOZ_FINAL MOZ_OVERRIDE \ { \ *aScrollWidth = Element::ScrollWidth(); \ return NS_OK; \ } \ -NS_IMETHOD GetScrollHeight(int32_t* aScrollHeight) MOZ_FINAL \ +NS_IMETHOD GetScrollHeight(int32_t* aScrollHeight) MOZ_FINAL MOZ_OVERRIDE \ { \ *aScrollHeight = Element::ScrollHeight(); \ return NS_OK; \ } \ -NS_IMETHOD GetClientTop(int32_t* aClientTop) MOZ_FINAL \ +NS_IMETHOD GetClientTop(int32_t* aClientTop) MOZ_FINAL MOZ_OVERRIDE \ { \ *aClientTop = Element::ClientTop(); \ return NS_OK; \ } \ -NS_IMETHOD GetClientLeft(int32_t* aClientLeft) MOZ_FINAL \ +NS_IMETHOD GetClientLeft(int32_t* aClientLeft) MOZ_FINAL MOZ_OVERRIDE \ { \ *aClientLeft = Element::ClientLeft(); \ return NS_OK; \ } \ -NS_IMETHOD GetClientWidth(int32_t* aClientWidth) MOZ_FINAL \ +NS_IMETHOD GetClientWidth(int32_t* aClientWidth) MOZ_FINAL MOZ_OVERRIDE \ { \ *aClientWidth = Element::ClientWidth(); \ return NS_OK; \ } \ -NS_IMETHOD GetClientHeight(int32_t* aClientHeight) MOZ_FINAL \ +NS_IMETHOD GetClientHeight(int32_t* aClientHeight) MOZ_FINAL MOZ_OVERRIDE \ { \ *aClientHeight = Element::ClientHeight(); \ return NS_OK; \ } \ -NS_IMETHOD GetScrollLeftMax(int32_t* aScrollLeftMax) MOZ_FINAL \ +NS_IMETHOD GetScrollLeftMax(int32_t* aScrollLeftMax) MOZ_FINAL MOZ_OVERRIDE \ { \ *aScrollLeftMax = Element::ScrollLeftMax(); \ return NS_OK; \ } \ -NS_IMETHOD GetScrollTopMax(int32_t* aScrollTopMax) MOZ_FINAL \ +NS_IMETHOD GetScrollTopMax(int32_t* aScrollTopMax) MOZ_FINAL MOZ_OVERRIDE \ { \ *aScrollTopMax = Element::ScrollTopMax(); \ return NS_OK; \ } \ NS_IMETHOD MozMatchesSelector(const nsAString& selector, \ - bool* _retval) MOZ_FINAL \ + bool* _retval) MOZ_FINAL MOZ_OVERRIDE \ { \ mozilla::ErrorResult rv; \ *_retval = Element::MozMatchesSelector(selector, rv); \ return rv.ErrorCode(); \ } \ -NS_IMETHOD SetCapture(bool retargetToElement) MOZ_FINAL \ +NS_IMETHOD SetCapture(bool retargetToElement) MOZ_FINAL MOZ_OVERRIDE \ { \ Element::SetCapture(retargetToElement); \ return NS_OK; \ } \ -NS_IMETHOD ReleaseCapture(void) MOZ_FINAL \ +NS_IMETHOD ReleaseCapture(void) MOZ_FINAL MOZ_OVERRIDE \ { \ Element::ReleaseCapture(); \ return NS_OK; \ } \ -NS_IMETHOD MozRequestFullScreen(void) MOZ_FINAL \ +NS_IMETHOD MozRequestFullScreen(void) MOZ_FINAL MOZ_OVERRIDE \ { \ Element::MozRequestFullScreen(mozilla::dom::RequestFullscreenOptions()); \ return NS_OK; \ } \ -NS_IMETHOD MozRequestPointerLock(void) MOZ_FINAL \ +NS_IMETHOD MozRequestPointerLock(void) MOZ_FINAL MOZ_OVERRIDE \ { \ Element::MozRequestPointerLock(); \ return NS_OK; \ } \ using nsINode::QuerySelector; \ NS_IMETHOD QuerySelector(const nsAString& aSelector, \ - nsIDOMElement **aReturn) MOZ_FINAL \ + nsIDOMElement **aReturn) MOZ_FINAL MOZ_OVERRIDE \ { \ return nsINode::QuerySelector(aSelector, aReturn); \ } \ using nsINode::QuerySelectorAll; \ NS_IMETHOD QuerySelectorAll(const nsAString& aSelector, \ - nsIDOMNodeList **aReturn) MOZ_FINAL \ + nsIDOMNodeList **aReturn) MOZ_FINAL MOZ_OVERRIDE \ { \ return nsINode::QuerySelectorAll(aSelector, aReturn); \ } diff --git a/dom/base/EventSource.cpp b/dom/base/EventSource.cpp index cf650088c31..04647b070e5 100644 --- a/dom/base/EventSource.cpp +++ b/dom/base/EventSource.cpp @@ -500,7 +500,7 @@ public: NS_DECL_CYCLE_COLLECTION_CLASS(AsyncVerifyRedirectCallbackFwr) // nsIAsyncVerifyRedirectCallback implementation - NS_IMETHOD OnRedirectVerifyCallback(nsresult aResult) + NS_IMETHOD OnRedirectVerifyCallback(nsresult aResult) MOZ_OVERRIDE { nsresult rv = mEventSource->OnRedirectVerifyCallback(aResult); if (NS_FAILED(rv)) { diff --git a/dom/base/File.cpp b/dom/base/File.cpp index 294a1ad4867..910fe090fbe 100644 --- a/dom/base/File.cpp +++ b/dom/base/File.cpp @@ -1083,7 +1083,7 @@ public: NS_DECL_THREADSAFE_ISUPPORTS NS_IMETHOD CollectReports(nsIMemoryReporterCallback *aCallback, - nsISupports *aClosure, bool aAnonymize) + nsISupports *aClosure, bool aAnonymize) MOZ_OVERRIDE { typedef FileImplMemory::DataOwner DataOwner; diff --git a/dom/base/File.h b/dom/base/File.h index da4b665d7d8..4ebc3017ab1 100644 --- a/dom/base/File.h +++ b/dom/base/File.h @@ -439,7 +439,7 @@ public: return mIsFile && mLastModificationDate == UINT64_MAX; } - virtual bool IsFile() const + virtual bool IsFile() const MOZ_OVERRIDE { return mIsFile; } @@ -460,13 +460,13 @@ public: return false; } - virtual bool IsSizeUnknown() const + virtual bool IsSizeUnknown() const MOZ_OVERRIDE { return mLength == UINT64_MAX; } - virtual void Unlink() {} - virtual void Traverse(nsCycleCollectionTraversalCallback &aCb) {} + virtual void Unlink() MOZ_OVERRIDE {} + virtual void Traverse(nsCycleCollectionTraversalCallback &aCb) MOZ_OVERRIDE {} protected: virtual ~FileImplBase() {} diff --git a/dom/base/FragmentOrElement.h b/dom/base/FragmentOrElement.h index 503c05d0436..2ddfea66046 100644 --- a/dom/base/FragmentOrElement.h +++ b/dom/base/FragmentOrElement.h @@ -99,7 +99,7 @@ public: // nsIWeakReference NS_DECL_NSIWEAKREFERENCE - virtual size_t SizeOfOnlyThis(mozilla::MallocSizeOf aMallocSizeOf) const; + virtual size_t SizeOfOnlyThis(mozilla::MallocSizeOf aMallocSizeOf) const MOZ_OVERRIDE; void NoticeNodeDestruction() { diff --git a/dom/base/ImageEncoder.cpp b/dom/base/ImageEncoder.cpp index 4511e9cb231..62152ac98e6 100644 --- a/dom/base/ImageEncoder.cpp +++ b/dom/base/ImageEncoder.cpp @@ -82,7 +82,7 @@ public: , mFailed(false) {} - NS_IMETHOD Run() + NS_IMETHOD Run() MOZ_OVERRIDE { nsresult rv = NS_OK; MOZ_ASSERT(NS_IsMainThread()); @@ -190,7 +190,7 @@ public: return rv; } - NS_IMETHOD Run() + NS_IMETHOD Run() MOZ_OVERRIDE { uint64_t imgSize; void* imgData = nullptr; diff --git a/dom/base/PerformanceResourceTiming.h b/dom/base/PerformanceResourceTiming.h index b34525444b1..ad04e8b321b 100644 --- a/dom/base/PerformanceResourceTiming.h +++ b/dom/base/PerformanceResourceTiming.h @@ -33,9 +33,9 @@ public: virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE; - virtual DOMHighResTimeStamp StartTime() const; + virtual DOMHighResTimeStamp StartTime() const MOZ_OVERRIDE; - virtual DOMHighResTimeStamp Duration() const + virtual DOMHighResTimeStamp Duration() const MOZ_OVERRIDE { return ResponseEnd() - StartTime(); } diff --git a/dom/base/WebSocket.cpp b/dom/base/WebSocket.cpp index 5197d56967b..b0d6df18d48 100644 --- a/dom/base/WebSocket.cpp +++ b/dom/base/WebSocket.cpp @@ -1981,7 +1981,7 @@ public: return true; } - bool Suspend(JSContext* aCx) + bool Suspend(JSContext* aCx) MOZ_OVERRIDE { mWebSocketImpl->mWorkerShuttingDown = true; mWebSocketImpl->CloseConnection(nsIWebSocketChannel::CLOSE_GOING_AWAY); diff --git a/dom/base/nsContentIterator.cpp b/dom/base/nsContentIterator.cpp index 90026cfbb39..ebcc936ee4d 100644 --- a/dom/base/nsContentIterator.cpp +++ b/dom/base/nsContentIterator.cpp @@ -86,23 +86,23 @@ public: // nsIContentIterator interface methods ------------------------------ - virtual nsresult Init(nsINode* aRoot); + virtual nsresult Init(nsINode* aRoot) MOZ_OVERRIDE; - virtual nsresult Init(nsIDOMRange* aRange); + virtual nsresult Init(nsIDOMRange* aRange) MOZ_OVERRIDE; - virtual void First(); + virtual void First() MOZ_OVERRIDE; - virtual void Last(); + virtual void Last() MOZ_OVERRIDE; - virtual void Next(); + virtual void Next() MOZ_OVERRIDE; - virtual void Prev(); + virtual void Prev() MOZ_OVERRIDE; - virtual nsINode* GetCurrentNode(); + virtual nsINode* GetCurrentNode() MOZ_OVERRIDE; - virtual bool IsDone(); + virtual bool IsDone() MOZ_OVERRIDE; - virtual nsresult PositionAt(nsINode* aCurNode); + virtual nsresult PositionAt(nsINode* aCurNode) MOZ_OVERRIDE; protected: virtual ~nsContentIterator(); @@ -1113,21 +1113,21 @@ public: // nsContentIterator overrides ------------------------------ - virtual nsresult Init(nsINode* aRoot); + virtual nsresult Init(nsINode* aRoot) MOZ_OVERRIDE; - virtual nsresult Init(nsIDOMRange* aRange); + virtual nsresult Init(nsIDOMRange* aRange) MOZ_OVERRIDE; - virtual void Next(); + virtual void Next() MOZ_OVERRIDE; - virtual void Prev(); + virtual void Prev() MOZ_OVERRIDE; - virtual nsresult PositionAt(nsINode* aCurNode); + virtual nsresult PositionAt(nsINode* aCurNode) MOZ_OVERRIDE; // Must override these because we don't do PositionAt - virtual void First(); + virtual void First() MOZ_OVERRIDE; // Must override these because we don't do PositionAt - virtual void Last(); + virtual void Last() MOZ_OVERRIDE; protected: virtual ~nsContentSubtreeIterator() {} diff --git a/dom/base/nsContentUtils.cpp b/dom/base/nsContentUtils.cpp index 953b11cf75f..f2cb337bff8 100644 --- a/dom/base/nsContentUtils.cpp +++ b/dom/base/nsContentUtils.cpp @@ -339,7 +339,7 @@ public: NS_DECL_ISUPPORTS NS_IMETHOD CollectReports(nsIHandleReportCallback* aHandleReport, - nsISupports* aData, bool aAnonymize) + nsISupports* aData, bool aAnonymize) MOZ_OVERRIDE { // We don't measure the |EventListenerManager| objects pointed to by the // entries because those references are non-owning. @@ -411,7 +411,7 @@ class CharsetDetectionObserver MOZ_FINAL : public nsICharsetDetectionObserver public: NS_DECL_ISUPPORTS - NS_IMETHOD Notify(const char *aCharset, nsDetectionConfident aConf) + NS_IMETHOD Notify(const char *aCharset, nsDetectionConfident aConf) MOZ_OVERRIDE { mCharset = aCharset; return NS_OK; diff --git a/dom/base/nsDOMClassInfo.h b/dom/base/nsDOMClassInfo.h index e690f0049e9..6badc33ca0d 100644 --- a/dom/base/nsDOMClassInfo.h +++ b/dom/base/nsDOMClassInfo.h @@ -285,7 +285,7 @@ public: NS_IMETHOD HasInstance(nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, JS::Handle val, bool *bp, - bool *_retval); + bool *_retval) MOZ_OVERRIDE; static nsIClassInfo *doCreate(nsDOMClassInfoData* aData) { diff --git a/dom/base/nsDocument.cpp b/dom/base/nsDocument.cpp index 4c40ffebb19..d3a39dc3775 100644 --- a/dom/base/nsDocument.cpp +++ b/dom/base/nsDocument.cpp @@ -9697,7 +9697,7 @@ class StubCSSLoaderObserver MOZ_FINAL : public nsICSSLoaderObserver { ~StubCSSLoaderObserver() {} public: NS_IMETHOD - StyleSheetLoaded(CSSStyleSheet*, bool, nsresult) + StyleSheetLoaded(CSSStyleSheet*, bool, nsresult) MOZ_OVERRIDE { return NS_OK; } @@ -11837,7 +11837,7 @@ public: NS_DECL_ISUPPORTS_INHERITED NS_DECL_NSICONTENTPERMISSIONREQUEST - NS_IMETHOD Run() + NS_IMETHOD Run() MOZ_OVERRIDE { nsCOMPtr e = do_QueryReferent(mElement); nsCOMPtr d = do_QueryReferent(mDocument); diff --git a/dom/base/nsDocument.h b/dom/base/nsDocument.h index 9aba645c446..91e694193ed 100644 --- a/dom/base/nsDocument.h +++ b/dom/base/nsDocument.h @@ -991,23 +991,23 @@ public: int32_t aNamespaceID, nsIContent **aResult) MOZ_OVERRIDE; - virtual void Sanitize(); + virtual void Sanitize() MOZ_OVERRIDE; virtual void EnumerateSubDocuments(nsSubDocEnumFunc aCallback, - void *aData); + void *aData) MOZ_OVERRIDE; - virtual bool CanSavePresentation(nsIRequest *aNewRequest); - virtual void Destroy(); - virtual void RemovedFromDocShell(); - virtual already_AddRefed GetLayoutHistoryState() const; + virtual bool CanSavePresentation(nsIRequest *aNewRequest) MOZ_OVERRIDE; + virtual void Destroy() MOZ_OVERRIDE; + virtual void RemovedFromDocShell() MOZ_OVERRIDE; + virtual already_AddRefed GetLayoutHistoryState() const MOZ_OVERRIDE; - virtual void BlockOnload(); - virtual void UnblockOnload(bool aFireSync); + virtual void BlockOnload() MOZ_OVERRIDE; + virtual void UnblockOnload(bool aFireSync) MOZ_OVERRIDE; - virtual void AddStyleRelevantLink(mozilla::dom::Link* aLink); - virtual void ForgetLink(mozilla::dom::Link* aLink); + virtual void AddStyleRelevantLink(mozilla::dom::Link* aLink) MOZ_OVERRIDE; + virtual void ForgetLink(mozilla::dom::Link* aLink) MOZ_OVERRIDE; - void ClearBoxObjectFor(nsIContent* aContent); + virtual void ClearBoxObjectFor(nsIContent* aContent) MOZ_OVERRIDE; virtual already_AddRefed GetBoxObjectFor(mozilla::dom::Element* aElement, @@ -1016,31 +1016,31 @@ public: virtual Element* GetAnonymousElementByAttribute(nsIContent* aElement, nsIAtom* aAttrName, - const nsAString& aAttrValue) const; + const nsAString& aAttrValue) const MOZ_OVERRIDE; virtual Element* ElementFromPointHelper(float aX, float aY, bool aIgnoreRootScrollFrame, - bool aFlushLayout); + bool aFlushLayout) MOZ_OVERRIDE; virtual nsresult NodesFromRectHelper(float aX, float aY, float aTopSize, float aRightSize, float aBottomSize, float aLeftSize, bool aIgnoreRootScrollFrame, bool aFlushLayout, - nsIDOMNodeList** aReturn); + nsIDOMNodeList** aReturn) MOZ_OVERRIDE; - virtual void FlushSkinBindings(); + virtual void FlushSkinBindings() MOZ_OVERRIDE; - virtual nsresult InitializeFrameLoader(nsFrameLoader* aLoader); - virtual nsresult FinalizeFrameLoader(nsFrameLoader* aLoader); - virtual void TryCancelFrameLoaderInitialization(nsIDocShell* aShell); - virtual bool FrameLoaderScheduledToBeFinalized(nsIDocShell* aShell); + virtual nsresult InitializeFrameLoader(nsFrameLoader* aLoader) MOZ_OVERRIDE; + virtual nsresult FinalizeFrameLoader(nsFrameLoader* aLoader) MOZ_OVERRIDE; + virtual void TryCancelFrameLoaderInitialization(nsIDocShell* aShell) MOZ_OVERRIDE; + virtual bool FrameLoaderScheduledToBeFinalized(nsIDocShell* aShell) MOZ_OVERRIDE; virtual nsIDocument* RequestExternalResource(nsIURI* aURI, nsINode* aRequestingNode, - ExternalResourceLoad** aPendingLoad); + ExternalResourceLoad** aPendingLoad) MOZ_OVERRIDE; virtual void - EnumerateExternalResources(nsSubDocEnumFunc aCallback, void* aData); + EnumerateExternalResources(nsSubDocEnumFunc aCallback, void* aData) MOZ_OVERRIDE; nsTArray mHostObjectURIs; @@ -1049,7 +1049,7 @@ public: nsSMILAnimationController* GetAnimationController() MOZ_OVERRIDE; virtual mozilla::PendingPlayerTracker* - GetPendingPlayerTracker() MOZ_FINAL + GetPendingPlayerTracker() MOZ_FINAL MOZ_OVERRIDE { return mPendingPlayerTracker; } @@ -1135,9 +1135,9 @@ public: virtual void MozSetImageElement(const nsAString& aImageElementId, Element* aElement) MOZ_OVERRIDE; - virtual nsresult AddImage(imgIRequest* aImage); - virtual nsresult RemoveImage(imgIRequest* aImage, uint32_t aFlags); - virtual nsresult SetImageLockingState(bool aLocked); + virtual nsresult AddImage(imgIRequest* aImage) MOZ_OVERRIDE; + virtual nsresult RemoveImage(imgIRequest* aImage, uint32_t aFlags) MOZ_OVERRIDE; + virtual nsresult SetImageLockingState(bool aLocked) MOZ_OVERRIDE; // AddPlugin adds a plugin-related element to mPlugins when the element is // added to the tree. @@ -1312,25 +1312,25 @@ public: mozilla::ErrorResult& rv) MOZ_OVERRIDE; virtual void UseRegistryFromDocument(nsIDocument* aDocument) MOZ_OVERRIDE; - virtual nsIDocument* MasterDocument() + virtual nsIDocument* MasterDocument() MOZ_OVERRIDE { return mMasterDocument ? mMasterDocument.get() : this; } - virtual void SetMasterDocument(nsIDocument* master) + virtual void SetMasterDocument(nsIDocument* master) MOZ_OVERRIDE { MOZ_ASSERT(master); mMasterDocument = master; UseRegistryFromDocument(mMasterDocument); } - virtual bool IsMasterDocument() + virtual bool IsMasterDocument() MOZ_OVERRIDE { return !mMasterDocument; } - virtual mozilla::dom::ImportManager* ImportManager() + virtual mozilla::dom::ImportManager* ImportManager() MOZ_OVERRIDE { if (mImportManager) { MOZ_ASSERT(!mMasterDocument, "Only the master document has ImportManager set"); @@ -1349,22 +1349,22 @@ public: return mImportManager.get(); } - virtual bool HasSubImportLink(nsINode* aLink) + virtual bool HasSubImportLink(nsINode* aLink) MOZ_OVERRIDE { return mSubImportLinks.Contains(aLink); } - virtual uint32_t IndexOfSubImportLink(nsINode* aLink) + virtual uint32_t IndexOfSubImportLink(nsINode* aLink) MOZ_OVERRIDE { return mSubImportLinks.IndexOf(aLink); } - virtual void AddSubImportLink(nsINode* aLink) + virtual void AddSubImportLink(nsINode* aLink) MOZ_OVERRIDE { mSubImportLinks.AppendElement(aLink); } - virtual nsINode* GetSubImportLink(uint32_t aIdx) + virtual nsINode* GetSubImportLink(uint32_t aIdx) MOZ_OVERRIDE { return aIdx < mSubImportLinks.Length() ? mSubImportLinks[aIdx].get() : nullptr; @@ -1562,7 +1562,7 @@ public: // ex. ,