diff --git a/accessible/src/atk/AccessibleWrap.cpp b/accessible/src/atk/AccessibleWrap.cpp
index 3ee028cb8b5..da124020e0e 100644
--- a/accessible/src/atk/AccessibleWrap.cpp
+++ b/accessible/src/atk/AccessibleWrap.cpp
@@ -954,6 +954,11 @@ AccessibleWrap::HandleAccEvent(AccEvent* aEvent)
Accessible* accessible = aEvent->GetAccessible();
NS_ENSURE_TRUE(accessible, NS_ERROR_FAILURE);
+ // The accessible can become defunct if we have an xpcom event listener
+ // which decides it would be fun to change the DOM and flush layout.
+ if (accessible->IsDefunct())
+ return NS_OK;
+
uint32_t type = aEvent->GetEventType();
AtkObject* atkObj = AccessibleWrap::GetAtkObject(accessible);
diff --git a/accessible/src/base/NotificationController.cpp b/accessible/src/base/NotificationController.cpp
index dbea1939fc6..f805b0454e6 100644
--- a/accessible/src/base/NotificationController.cpp
+++ b/accessible/src/base/NotificationController.cpp
@@ -151,6 +151,10 @@ NotificationController::WillRefresh(mozilla::TimeStamp aTime)
if (!mDocument)
return;
+ if (mObservingState == eRefreshProcessing ||
+ mObservingState == eRefreshProcessingForUpdate)
+ return;
+
// Any generic notifications should be queued if we're processing content
// insertions or generic notifications.
mObservingState = eRefreshProcessingForUpdate;
@@ -265,18 +269,20 @@ NotificationController::WillRefresh(mozilla::TimeStamp aTime)
mDocument->ProcessInvalidationList();
// If a generic notification occurs after this point then we may be allowed to
- // process it synchronously.
- mObservingState = eRefreshObserving;
+ // process it synchronously. However we do not want to reenter if fireing
+ // events causes script to run.
+ mObservingState = eRefreshProcessing;
ProcessEventQueue();
+ mObservingState = eRefreshObserving;
if (!mDocument)
return;
// Stop further processing if there are no new notifications of any kind or
// events and document load is processed.
- if (mContentInsertions.Length() == 0 && mNotifications.Length() == 0 &&
- mEvents.Length() == 0 && mTextHash.Count() == 0 &&
- mHangingChildDocuments.Length() == 0 &&
+ if (mContentInsertions.IsEmpty() && mNotifications.IsEmpty() &&
+ mEvents.IsEmpty() && mTextHash.Count() == 0 &&
+ mHangingChildDocuments.IsEmpty() &&
mDocument->HasLoadState(DocAccessible::eCompletelyLoaded) &&
mPresShell->RemoveRefreshObserver(this, Flush_Display)) {
mObservingState = eNotObservingRefresh;
diff --git a/accessible/src/base/NotificationController.h b/accessible/src/base/NotificationController.h
index 5e1b812c524..4b7dfbb7fb9 100644
--- a/accessible/src/base/NotificationController.h
+++ b/accessible/src/base/NotificationController.h
@@ -212,6 +212,7 @@ private:
enum eObservingState {
eNotObservingRefresh,
eRefreshObserving,
+ eRefreshProcessing,
eRefreshProcessingForUpdate
};
eObservingState mObservingState;
diff --git a/accessible/tests/mochitest/actions/test_link.html b/accessible/tests/mochitest/actions/test_link.html
index 0c46c57789b..49fc7d911b2 100644
--- a/accessible/tests/mochitest/actions/test_link.html
+++ b/accessible/tests/mochitest/actions/test_link.html
@@ -17,10 +17,6 @@
src="../actions.js">
diff --git a/content/media/test/crashtests/876207.html b/content/media/test/crashtests/876207.html
new file mode 100644
index 00000000000..ed44d1a11d7
--- /dev/null
+++ b/content/media/test/crashtests/876207.html
@@ -0,0 +1,30 @@
+
\ No newline at end of file
diff --git a/content/media/test/crashtests/876215.html b/content/media/test/crashtests/876215.html
new file mode 100644
index 00000000000..3ead4ae7287
--- /dev/null
+++ b/content/media/test/crashtests/876215.html
@@ -0,0 +1,14 @@
+
\ No newline at end of file
diff --git a/content/media/test/crashtests/crashtests.list b/content/media/test/crashtests/crashtests.list
index 03830dfea2f..733e0ab602b 100644
--- a/content/media/test/crashtests/crashtests.list
+++ b/content/media/test/crashtests/crashtests.list
@@ -22,6 +22,9 @@ load 874952.html
load 875144.html
load 875596.html
load 875911.html
+load 876118.html
+load 876207.html
+load 876215.html
load 876249.html
load 876252.html
load 876834.html
diff --git a/content/media/webaudio/AudioContext.cpp b/content/media/webaudio/AudioContext.cpp
index c4d8b131648..0d4ac1055d2 100644
--- a/content/media/webaudio/AudioContext.cpp
+++ b/content/media/webaudio/AudioContext.cpp
@@ -28,12 +28,6 @@
#include "WaveTable.h"
#include "nsNetUtil.h"
-// Note that this number is an arbitrary large value to protect against OOM
-// attacks.
-const unsigned MAX_SCRIPT_PROCESSOR_CHANNELS = 10000;
-const unsigned MAX_CHANNEL_SPLITTER_OUTPUTS = UINT16_MAX;
-const unsigned MAX_CHANNEL_MERGER_INPUTS = UINT16_MAX;
-
namespace mozilla {
namespace dom {
@@ -109,9 +103,13 @@ AudioContext::Constructor(const GlobalObject& aGlobal,
return nullptr;
}
- if (aSampleRate <= 0.0f || aSampleRate >= TRACK_RATE_MAX) {
+ if (aNumberOfChannels == 0 ||
+ aNumberOfChannels > WebAudioUtils::MaxChannelCount ||
+ aLength == 0 ||
+ aSampleRate <= 0.0f ||
+ aSampleRate >= TRACK_RATE_MAX) {
// The DOM binding protects us against infinity and NaN
- aRv.Throw(NS_ERROR_DOM_SYNTAX_ERR);
+ aRv.Throw(NS_ERROR_DOM_NOT_SUPPORTED_ERR);
return nullptr;
}
@@ -211,8 +209,8 @@ AudioContext::CreateScriptProcessor(uint32_t aBufferSize,
ErrorResult& aRv)
{
if ((aNumberOfInputChannels == 0 && aNumberOfOutputChannels == 0) ||
- aNumberOfInputChannels > MAX_SCRIPT_PROCESSOR_CHANNELS ||
- aNumberOfOutputChannels > MAX_SCRIPT_PROCESSOR_CHANNELS ||
+ aNumberOfInputChannels > WebAudioUtils::MaxChannelCount ||
+ aNumberOfOutputChannels > WebAudioUtils::MaxChannelCount ||
!IsValidBufferSize(aBufferSize)) {
aRv.Throw(NS_ERROR_DOM_INDEX_SIZE_ERR);
return nullptr;
@@ -269,7 +267,7 @@ already_AddRefed
AudioContext::CreateChannelSplitter(uint32_t aNumberOfOutputs, ErrorResult& aRv)
{
if (aNumberOfOutputs == 0 ||
- aNumberOfOutputs > MAX_CHANNEL_SPLITTER_OUTPUTS) {
+ aNumberOfOutputs > WebAudioUtils::MaxChannelCount) {
aRv.Throw(NS_ERROR_DOM_INDEX_SIZE_ERR);
return nullptr;
}
@@ -283,7 +281,7 @@ already_AddRefed
AudioContext::CreateChannelMerger(uint32_t aNumberOfInputs, ErrorResult& aRv)
{
if (aNumberOfInputs == 0 ||
- aNumberOfInputs > MAX_CHANNEL_MERGER_INPUTS) {
+ aNumberOfInputs > WebAudioUtils::MaxChannelCount) {
aRv.Throw(NS_ERROR_DOM_INDEX_SIZE_ERR);
return nullptr;
}
diff --git a/content/media/webaudio/AudioDestinationNode.cpp b/content/media/webaudio/AudioDestinationNode.cpp
index b8124331e70..0f61de55a4f 100644
--- a/content/media/webaudio/AudioDestinationNode.cpp
+++ b/content/media/webaudio/AudioDestinationNode.cpp
@@ -60,7 +60,10 @@ public:
// Record our input buffer
MOZ_ASSERT(mWriteIndex < mLength, "How did this happen?");
const uint32_t duration = std::min(WEBAUDIO_BLOCK_SIZE, mLength - mWriteIndex);
- for (uint32_t i = 0; i < mInputChannels.Length(); ++i) {
+ const uint32_t commonChannelCount = std::min(mInputChannels.Length(),
+ aInput.mChannelData.Length());
+ // First, copy as many channels in the input as we have
+ for (uint32_t i = 0; i < commonChannelCount; ++i) {
if (aInput.IsNull()) {
PodZero(mInputChannels[i] + mWriteIndex, duration);
} else {
@@ -80,6 +83,10 @@ public:
}
}
}
+ // Then, silence all of the remaining channels
+ for (uint32_t i = commonChannelCount; i < mInputChannels.Length(); ++i) {
+ PodZero(mInputChannels[i] + mWriteIndex, duration);
+ }
mWriteIndex += duration;
if (mWriteIndex == mLength) {
diff --git a/content/media/webaudio/AudioNode.h b/content/media/webaudio/AudioNode.h
index 1bf200eab98..723550c99e9 100644
--- a/content/media/webaudio/AudioNode.h
+++ b/content/media/webaudio/AudioNode.h
@@ -17,6 +17,7 @@
#include "AudioContext.h"
#include "AudioParamTimeline.h"
#include "MediaStreamGraph.h"
+#include "WebAudioUtils.h"
struct JSContext;
@@ -161,7 +162,8 @@ public:
uint32_t ChannelCount() const { return mChannelCount; }
void SetChannelCount(uint32_t aChannelCount, ErrorResult& aRv)
{
- if (aChannelCount == 0) {
+ if (aChannelCount == 0 ||
+ aChannelCount > WebAudioUtils::MaxChannelCount) {
aRv.Throw(NS_ERROR_DOM_NOT_SUPPORTED_ERR);
return;
}
diff --git a/content/media/webaudio/ReportDecodeResultTask.h b/content/media/webaudio/ReportDecodeResultTask.h
index 30d1d4795ec..40e58fef209 100644
--- a/content/media/webaudio/ReportDecodeResultTask.h
+++ b/content/media/webaudio/ReportDecodeResultTask.h
@@ -7,6 +7,7 @@
#ifndef ReportDecodeResultTask_h_
#define ReportDecodeResultTask_h_
+#include "mozilla/Attributes.h"
#include "MediaBufferDecoder.h"
namespace mozilla {
@@ -22,7 +23,7 @@ public:
MOZ_ASSERT(aFunction);
}
- NS_IMETHOD Run()
+ NS_IMETHOD Run() MOZ_OVERRIDE
{
MOZ_ASSERT(NS_IsMainThread());
diff --git a/content/media/webaudio/WebAudioUtils.h b/content/media/webaudio/WebAudioUtils.h
index 76c0a2c7d2a..7ca51d1aedd 100644
--- a/content/media/webaudio/WebAudioUtils.h
+++ b/content/media/webaudio/WebAudioUtils.h
@@ -21,6 +21,10 @@ class AudioNodeStream;
namespace dom {
struct WebAudioUtils {
+ // This is an arbitrary large number used to protect against OOMs.
+ // We can adjust it later if needed.
+ static const uint32_t MaxChannelCount = 10000;
+
static bool FuzzyEqual(float v1, float v2)
{
using namespace std;
diff --git a/content/media/webaudio/test/Makefile.in b/content/media/webaudio/test/Makefile.in
index 55dcb32549c..a21b1a6e890 100644
--- a/content/media/webaudio/test/Makefile.in
+++ b/content/media/webaudio/test/Makefile.in
@@ -23,6 +23,7 @@ MOCHITEST_FILES := \
test_bug867104.html \
test_bug867174.html \
test_bug867203.html \
+ test_bug875221.html \
test_bug875402.html \
test_analyserNode.html \
test_AudioBuffer.html \
@@ -61,6 +62,8 @@ MOCHITEST_FILES := \
test_mixingRules.html \
test_nodeToParamConnection.html \
test_OfflineAudioContext.html \
+ test_offlineDestinationChannelCountLess.html \
+ test_offlineDestinationChannelCountMore.html \
test_pannerNode.html \
test_scriptProcessorNode.html \
test_scriptProcessorNodeChannelCount.html \
diff --git a/content/media/webaudio/test/test_OfflineAudioContext.html b/content/media/webaudio/test/test_OfflineAudioContext.html
index e6c723506ff..d01f7ada4b9 100644
--- a/content/media/webaudio/test/test_OfflineAudioContext.html
+++ b/content/media/webaudio/test/test_OfflineAudioContext.html
@@ -25,10 +25,20 @@ addLoadEvent(function() {
expectException(function() {
new OfflineAudioContext(2, 100, 0);
- }, DOMException.SYNTAX_ERR);
+ }, DOMException.NOT_SUPPORTED_ERR);
expectException(function() {
new OfflineAudioContext(2, 100, -1);
- }, DOMException.SYNTAX_ERR);
+ }, DOMException.NOT_SUPPORTED_ERR);
+ expectException(function() {
+ new OfflineAudioContext(0, 100, 44100);
+ }, DOMException.NOT_SUPPORTED_ERR);
+ new OfflineAudioContext(10000, 100, 44100);
+ expectException(function() {
+ new OfflineAudioContext(10001, 100, 44100);
+ }, DOMException.NOT_SUPPORTED_ERR);
+ expectException(function() {
+ new OfflineAudioContext(2, 0, 44100);
+ }, DOMException.NOT_SUPPORTED_ERR);
var src = ctx.createBufferSource();
src.buffer = buf;
diff --git a/content/media/webaudio/test/test_bug875221.html b/content/media/webaudio/test/test_bug875221.html
new file mode 100644
index 00000000000..3f5d8557ad5
--- /dev/null
+++ b/content/media/webaudio/test/test_bug875221.html
@@ -0,0 +1,240 @@
+
+
+
+ Crashtest for bug 875221
+
+
+
+
+
+
+
+
+
diff --git a/content/media/webaudio/test/test_offlineDestinationChannelCountLess.html b/content/media/webaudio/test/test_offlineDestinationChannelCountLess.html
new file mode 100644
index 00000000000..fbf64c128d8
--- /dev/null
+++ b/content/media/webaudio/test/test_offlineDestinationChannelCountLess.html
@@ -0,0 +1,44 @@
+
+
+
+ Test OfflineAudioContext with a channel count less than the specified number
+
+
+
+
+
+
+
+
+
+
diff --git a/content/media/webaudio/test/test_offlineDestinationChannelCountMore.html b/content/media/webaudio/test/test_offlineDestinationChannelCountMore.html
new file mode 100644
index 00000000000..19ae8bd734a
--- /dev/null
+++ b/content/media/webaudio/test/test_offlineDestinationChannelCountMore.html
@@ -0,0 +1,48 @@
+
+
+
+ Test OfflineAudioContext with a channel count less than the specified number
+
+
+
+
+
+
+
+
+
+
diff --git a/content/media/webspeech/recognition/SpeechRecognition.h b/content/media/webspeech/recognition/SpeechRecognition.h
index e9b3f692e54..5d46c7886e1 100644
--- a/content/media/webspeech/recognition/SpeechRecognition.h
+++ b/content/media/webspeech/recognition/SpeechRecognition.h
@@ -6,6 +6,7 @@
#pragma once
+#include "mozilla/Attributes.h"
#include "nsCOMPtr.h"
#include "nsDOMEventTargetHelper.h"
#include "nsString.h"
@@ -280,7 +281,7 @@ public:
~SpeechEvent();
- NS_IMETHOD Run();
+ NS_IMETHOD Run() MOZ_OVERRIDE;
AudioSegment* mAudioSegment;
nsRefPtr mRecognitionResultList; // TODO: make this a session being passed which also has index and stuff
nsCOMPtr mError;
diff --git a/content/media/webspeech/recognition/SpeechStreamListener.h b/content/media/webspeech/recognition/SpeechStreamListener.h
index 428d9d24e89..8966615a5d0 100644
--- a/content/media/webspeech/recognition/SpeechStreamListener.h
+++ b/content/media/webspeech/recognition/SpeechStreamListener.h
@@ -27,9 +27,9 @@ public:
TrackRate aTrackRate,
TrackTicks aTrackOffset,
uint32_t aTrackEvents,
- const MediaSegment& aQueuedMedia);
+ const MediaSegment& aQueuedMedia) MOZ_OVERRIDE;
- void NotifyFinished(MediaStreamGraph* aGraph);
+ void NotifyFinished(MediaStreamGraph* aGraph) MOZ_OVERRIDE;
private:
template void ConvertAndDispatchAudioChunk(AudioChunk& aChunk);
diff --git a/content/media/webspeech/synth/ipc/SpeechSynthesisChild.h b/content/media/webspeech/synth/ipc/SpeechSynthesisChild.h
index a92f64151c1..c934797e7e6 100644
--- a/content/media/webspeech/synth/ipc/SpeechSynthesisChild.h
+++ b/content/media/webspeech/synth/ipc/SpeechSynthesisChild.h
@@ -4,6 +4,7 @@
#pragma once
+#include "mozilla/Attributes.h"
#include "mozilla/dom/PSpeechSynthesisChild.h"
#include "mozilla/dom/PSpeechSynthesisRequestChild.h"
#include "nsSpeechTask.h"
@@ -75,10 +76,10 @@ public:
SpeechTaskChild(SpeechSynthesisUtterance* aUtterance);
NS_IMETHOD Setup(nsISpeechTaskCallback* aCallback,
- uint32_t aChannels, uint32_t aRate, uint8_t argc);
+ uint32_t aChannels, uint32_t aRate, uint8_t argc) MOZ_OVERRIDE;
NS_IMETHOD SendAudio (const JS::Value& aData, const JS::Value& aLandmarks,
- JSContext* aCx);
+ JSContext* aCx) MOZ_OVERRIDE;
virtual void Pause();
diff --git a/content/smil/SMILBoolType.h b/content/smil/SMILBoolType.h
index 93dd6c67748..d67d4556107 100644
--- a/content/smil/SMILBoolType.h
+++ b/content/smil/SMILBoolType.h
@@ -6,6 +6,7 @@
#ifndef MOZILLA_SMILBOOLTYPE_H_
#define MOZILLA_SMILBOOLTYPE_H_
+#include "mozilla/Attributes.h"
#include "nsISMILType.h"
namespace mozilla {
@@ -19,20 +20,20 @@ public:
protected:
// nsISMILType Methods
// -------------------
- virtual void Init(nsSMILValue& aValue) const;
+ virtual void Init(nsSMILValue& aValue) const MOZ_OVERRIDE;
virtual void Destroy(nsSMILValue&) const;
- virtual nsresult Assign(nsSMILValue& aDest, const nsSMILValue& aSrc) const;
+ virtual nsresult Assign(nsSMILValue& aDest, const nsSMILValue& aSrc) const MOZ_OVERRIDE;
virtual nsresult Add(nsSMILValue& aDest, const nsSMILValue& aValueToAdd,
- uint32_t aCount) const;
+ uint32_t aCount) const MOZ_OVERRIDE;
virtual bool IsEqual(const nsSMILValue& aLeft,
- const nsSMILValue& aRight) const;
+ const nsSMILValue& aRight) const MOZ_OVERRIDE;
virtual nsresult ComputeDistance(const nsSMILValue& aFrom,
const nsSMILValue& aTo,
- double& aDistance) const;
+ double& aDistance) const MOZ_OVERRIDE;
virtual nsresult Interpolate(const nsSMILValue& aStartVal,
const nsSMILValue& aEndVal,
double aUnitDistance,
- nsSMILValue& aResult) const;
+ nsSMILValue& aResult) const MOZ_OVERRIDE;
private:
// Private constructor & destructor: prevent instances beyond my singleton,
diff --git a/content/smil/SMILEnumType.h b/content/smil/SMILEnumType.h
index f39a8202a9a..384646406bb 100644
--- a/content/smil/SMILEnumType.h
+++ b/content/smil/SMILEnumType.h
@@ -6,6 +6,7 @@
#ifndef MOZILLA_SMILENUMTYPE_H_
#define MOZILLA_SMILENUMTYPE_H_
+#include "mozilla/Attributes.h"
#include "nsISMILType.h"
namespace mozilla {
@@ -19,20 +20,20 @@ public:
protected:
// nsISMILType Methods
// -------------------
- virtual void Init(nsSMILValue& aValue) const;
+ virtual void Init(nsSMILValue& aValue) const MOZ_OVERRIDE;
virtual void Destroy(nsSMILValue&) const;
- virtual nsresult Assign(nsSMILValue& aDest, const nsSMILValue& aSrc) const;
+ virtual nsresult Assign(nsSMILValue& aDest, const nsSMILValue& aSrc) const MOZ_OVERRIDE;
virtual bool IsEqual(const nsSMILValue& aLeft,
- const nsSMILValue& aRight) const;
+ const nsSMILValue& aRight) const MOZ_OVERRIDE;
virtual nsresult Add(nsSMILValue& aDest, const nsSMILValue& aValueToAdd,
- uint32_t aCount) const;
+ uint32_t aCount) const MOZ_OVERRIDE;
virtual nsresult ComputeDistance(const nsSMILValue& aFrom,
const nsSMILValue& aTo,
- double& aDistance) const;
+ double& aDistance) const MOZ_OVERRIDE;
virtual nsresult Interpolate(const nsSMILValue& aStartVal,
const nsSMILValue& aEndVal,
double aUnitDistance,
- nsSMILValue& aResult) const;
+ nsSMILValue& aResult) const MOZ_OVERRIDE;
private:
// Private constructor & destructor: prevent instances beyond my singleton,
diff --git a/content/smil/SMILIntegerType.h b/content/smil/SMILIntegerType.h
index e196b052f25..4d342f5ef75 100644
--- a/content/smil/SMILIntegerType.h
+++ b/content/smil/SMILIntegerType.h
@@ -6,6 +6,7 @@
#ifndef MOZILLA_SMILINTEGERTYPE_H_
#define MOZILLA_SMILINTEGERTYPE_H_
+#include "mozilla/Attributes.h"
#include "nsISMILType.h"
namespace mozilla {
@@ -13,20 +14,20 @@ namespace mozilla {
class SMILIntegerType : public nsISMILType
{
public:
- virtual void Init(nsSMILValue& aValue) const;
+ virtual void Init(nsSMILValue& aValue) const MOZ_OVERRIDE;
virtual void Destroy(nsSMILValue&) const;
- virtual nsresult Assign(nsSMILValue& aDest, const nsSMILValue& aSrc) const;
+ virtual nsresult Assign(nsSMILValue& aDest, const nsSMILValue& aSrc) const MOZ_OVERRIDE;
virtual bool IsEqual(const nsSMILValue& aLeft,
- const nsSMILValue& aRight) const;
+ const nsSMILValue& aRight) const MOZ_OVERRIDE;
virtual nsresult Add(nsSMILValue& aDest, const nsSMILValue& aValueToAdd,
- uint32_t aCount) const;
+ uint32_t aCount) const MOZ_OVERRIDE;
virtual nsresult ComputeDistance(const nsSMILValue& aFrom,
const nsSMILValue& aTo,
- double& aDistance) const;
+ double& aDistance) const MOZ_OVERRIDE;
virtual nsresult Interpolate(const nsSMILValue& aStartVal,
const nsSMILValue& aEndVal,
double aUnitDistance,
- nsSMILValue& aResult) const;
+ nsSMILValue& aResult) const MOZ_OVERRIDE;
static SMILIntegerType sSingleton;
diff --git a/content/smil/SMILStringType.h b/content/smil/SMILStringType.h
index 77b217b7d0e..ebcbce09fd0 100644
--- a/content/smil/SMILStringType.h
+++ b/content/smil/SMILStringType.h
@@ -6,6 +6,7 @@
#ifndef MOZILLA_SMILSTRINGTYPE_H_
#define MOZILLA_SMILSTRINGTYPE_H_
+#include "mozilla/Attributes.h"
#include "nsISMILType.h"
namespace mozilla {
@@ -19,20 +20,20 @@ public:
protected:
// nsISMILType Methods
// -------------------
- virtual void Init(nsSMILValue& aValue) const;
+ virtual void Init(nsSMILValue& aValue) const MOZ_OVERRIDE;
virtual void Destroy(nsSMILValue&) const;
- virtual nsresult Assign(nsSMILValue& aDest, const nsSMILValue& aSrc) const;
+ virtual nsresult Assign(nsSMILValue& aDest, const nsSMILValue& aSrc) const MOZ_OVERRIDE;
virtual bool IsEqual(const nsSMILValue& aLeft,
- const nsSMILValue& aRight) const;
+ const nsSMILValue& aRight) const MOZ_OVERRIDE;
virtual nsresult Add(nsSMILValue& aDest, const nsSMILValue& aValueToAdd,
- uint32_t aCount) const;
+ uint32_t aCount) const MOZ_OVERRIDE;
virtual nsresult ComputeDistance(const nsSMILValue& aFrom,
const nsSMILValue& aTo,
- double& aDistance) const;
+ double& aDistance) const MOZ_OVERRIDE;
virtual nsresult Interpolate(const nsSMILValue& aStartVal,
const nsSMILValue& aEndVal,
double aUnitDistance,
- nsSMILValue& aResult) const;
+ nsSMILValue& aResult) const MOZ_OVERRIDE;
private:
// Private constructor & destructor: prevent instances beyond my singleton,
diff --git a/content/smil/nsSMILAnimationController.h b/content/smil/nsSMILAnimationController.h
index 647b9c309e4..ab98cd6a013 100644
--- a/content/smil/nsSMILAnimationController.h
+++ b/content/smil/nsSMILAnimationController.h
@@ -6,6 +6,7 @@
#ifndef NS_SMILANIMATIONCONTROLLER_H_
#define NS_SMILANIMATIONCONTROLLER_H_
+#include "mozilla/Attributes.h"
#include "nsAutoPtr.h"
#include "nsCOMPtr.h"
#include "nsTArray.h"
@@ -50,15 +51,15 @@ public:
void Disconnect();
// nsSMILContainer
- virtual void Pause(uint32_t aType);
- virtual void Resume(uint32_t aType);
- virtual nsSMILTime GetParentTime() const;
+ virtual void Pause(uint32_t aType) MOZ_OVERRIDE;
+ virtual void Resume(uint32_t aType) MOZ_OVERRIDE;
+ virtual nsSMILTime GetParentTime() const MOZ_OVERRIDE;
// nsARefreshObserver
- NS_IMETHOD_(nsrefcnt) AddRef();
- NS_IMETHOD_(nsrefcnt) Release();
+ NS_IMETHOD_(nsrefcnt) AddRef() MOZ_OVERRIDE;
+ NS_IMETHOD_(nsrefcnt) Release() MOZ_OVERRIDE;
- virtual void WillRefresh(mozilla::TimeStamp aTime);
+ virtual void WillRefresh(mozilla::TimeStamp aTime) MOZ_OVERRIDE;
// Methods for registering and enumerating animation elements
void RegisterAnimationElement(mozilla::dom::SVGAnimationElement* aAnimationElement);
@@ -145,7 +146,7 @@ protected:
void MaybeStartSampling(nsRefreshDriver* aRefreshDriver);
// Sample-related callbacks and implementation helpers
- virtual void DoSample();
+ virtual void DoSample() MOZ_OVERRIDE;
void DoSample(bool aSkipUnchangedContainers);
void RewindElements();
@@ -174,8 +175,8 @@ protected:
mozilla::dom::SVGAnimationElement* aAnimElem, nsSMILTargetIdentifier& aResult);
// Methods for adding/removing time containers
- virtual nsresult AddChild(nsSMILTimeContainer& aChild);
- virtual void RemoveChild(nsSMILTimeContainer& aChild);
+ virtual nsresult AddChild(nsSMILTimeContainer& aChild) MOZ_OVERRIDE;
+ virtual void RemoveChild(nsSMILTimeContainer& aChild) MOZ_OVERRIDE;
void FlagDocumentNeedsFlush();
diff --git a/content/smil/nsSMILCSSProperty.h b/content/smil/nsSMILCSSProperty.h
index 0c7d5f2599c..8098e51f9a8 100644
--- a/content/smil/nsSMILCSSProperty.h
+++ b/content/smil/nsSMILCSSProperty.h
@@ -8,6 +8,7 @@
#ifndef NS_SMILCSSPROPERTY_H_
#define NS_SMILCSSPROPERTY_H_
+#include "mozilla/Attributes.h"
#include "nsISMILAttr.h"
#include "nsIAtom.h"
#include "nsCSSProperty.h"
@@ -38,10 +39,10 @@ public:
virtual nsresult ValueFromString(const nsAString& aStr,
const mozilla::dom::SVGAnimationElement* aSrcElement,
nsSMILValue& aValue,
- bool& aPreventCachingOfSandwich) const;
- virtual nsSMILValue GetBaseValue() const;
- virtual nsresult SetAnimValue(const nsSMILValue& aValue);
- virtual void ClearAnimValue();
+ bool& aPreventCachingOfSandwich) const MOZ_OVERRIDE;
+ virtual nsSMILValue GetBaseValue() const MOZ_OVERRIDE;
+ virtual nsresult SetAnimValue(const nsSMILValue& aValue) MOZ_OVERRIDE;
+ virtual void ClearAnimValue() MOZ_OVERRIDE;
/**
* Utility method - returns true if the given property is supported for
diff --git a/content/smil/nsSMILFloatType.h b/content/smil/nsSMILFloatType.h
index f3a093bfe8a..0f21f2e6857 100644
--- a/content/smil/nsSMILFloatType.h
+++ b/content/smil/nsSMILFloatType.h
@@ -6,6 +6,7 @@
#ifndef NS_SMILFLOATTYPE_H_
#define NS_SMILFLOATTYPE_H_
+#include "mozilla/Attributes.h"
#include "nsISMILType.h"
class nsSMILFloatType : public nsISMILType
@@ -17,20 +18,20 @@ public:
protected:
// nsISMILType Methods
// -------------------
- virtual void Init(nsSMILValue& aValue) const;
+ virtual void Init(nsSMILValue& aValue) const MOZ_OVERRIDE;
virtual void Destroy(nsSMILValue&) const;
- virtual nsresult Assign(nsSMILValue& aDest, const nsSMILValue& aSrc) const;
+ virtual nsresult Assign(nsSMILValue& aDest, const nsSMILValue& aSrc) const MOZ_OVERRIDE;
virtual bool IsEqual(const nsSMILValue& aLeft,
- const nsSMILValue& aRight) const;
+ const nsSMILValue& aRight) const MOZ_OVERRIDE;
virtual nsresult Add(nsSMILValue& aDest, const nsSMILValue& aValueToAdd,
- uint32_t aCount) const;
+ uint32_t aCount) const MOZ_OVERRIDE;
virtual nsresult ComputeDistance(const nsSMILValue& aFrom,
const nsSMILValue& aTo,
- double& aDistance) const;
+ double& aDistance) const MOZ_OVERRIDE;
virtual nsresult Interpolate(const nsSMILValue& aStartVal,
const nsSMILValue& aEndVal,
double aUnitDistance,
- nsSMILValue& aResult) const;
+ nsSMILValue& aResult) const MOZ_OVERRIDE;
private:
// Private constructor & destructor: prevent instances beyond my singleton,
diff --git a/content/smil/nsSMILMappedAttribute.h b/content/smil/nsSMILMappedAttribute.h
index d1d17e62789..12fba29db0f 100644
--- a/content/smil/nsSMILMappedAttribute.h
+++ b/content/smil/nsSMILMappedAttribute.h
@@ -8,6 +8,7 @@
#ifndef NS_SMILMAPPEDATTRIBUTE_H_
#define NS_SMILMAPPEDATTRIBUTE_H_
+#include "mozilla/Attributes.h"
#include "nsSMILCSSProperty.h"
/* We'll use the empty-string atom |nsGkAtoms::_empty| as the key for storing
@@ -41,10 +42,10 @@ public:
virtual nsresult ValueFromString(const nsAString& aStr,
const mozilla::dom::SVGAnimationElement* aSrcElement,
nsSMILValue& aValue,
- bool& aPreventCachingOfSandwich) const;
- virtual nsSMILValue GetBaseValue() const;
- virtual nsresult SetAnimValue(const nsSMILValue& aValue);
- virtual void ClearAnimValue();
+ bool& aPreventCachingOfSandwich) const MOZ_OVERRIDE;
+ virtual nsSMILValue GetBaseValue() const MOZ_OVERRIDE;
+ virtual nsresult SetAnimValue(const nsSMILValue& aValue) MOZ_OVERRIDE;
+ virtual void ClearAnimValue() MOZ_OVERRIDE;
protected:
// Helper Methods
diff --git a/content/smil/nsSMILNullType.h b/content/smil/nsSMILNullType.h
index 62d8c0e56e5..8e4ca7e055b 100644
--- a/content/smil/nsSMILNullType.h
+++ b/content/smil/nsSMILNullType.h
@@ -6,6 +6,7 @@
#ifndef NS_SMILNULLTYPE_H_
#define NS_SMILNULLTYPE_H_
+#include "mozilla/Attributes.h"
#include "nsISMILType.h"
class nsSMILNullType : public nsISMILType
@@ -17,23 +18,23 @@ public:
protected:
// nsISMILType Methods
// -------------------
- virtual void Init(nsSMILValue& aValue) const {}
- virtual void Destroy(nsSMILValue& aValue) const {}
- virtual nsresult Assign(nsSMILValue& aDest, const nsSMILValue& aSrc) const;
+ virtual void Init(nsSMILValue& aValue) const MOZ_OVERRIDE {}
+ virtual void Destroy(nsSMILValue& aValue) const MOZ_OVERRIDE {}
+ virtual nsresult Assign(nsSMILValue& aDest, const nsSMILValue& aSrc) const MOZ_OVERRIDE;
// The remaining methods should never be called, so although they're very
// simple they don't need to be inline.
virtual bool IsEqual(const nsSMILValue& aLeft,
- const nsSMILValue& aRight) const;
+ const nsSMILValue& aRight) const MOZ_OVERRIDE;
virtual nsresult Add(nsSMILValue& aDest, const nsSMILValue& aValueToAdd,
- uint32_t aCount) const;
+ uint32_t aCount) const MOZ_OVERRIDE;
virtual nsresult ComputeDistance(const nsSMILValue& aFrom,
const nsSMILValue& aTo,
- double& aDistance) const;
+ double& aDistance) const MOZ_OVERRIDE;
virtual nsresult Interpolate(const nsSMILValue& aStartVal,
const nsSMILValue& aEndVal,
double aUnitDistance,
- nsSMILValue& aResult) const;
+ nsSMILValue& aResult) const MOZ_OVERRIDE;
private:
// Private constructor & destructor: prevent instances beyond my singleton,
diff --git a/content/smil/nsSMILSetAnimationFunction.h b/content/smil/nsSMILSetAnimationFunction.h
index 75e4bd1e45f..bf367ba4257 100644
--- a/content/smil/nsSMILSetAnimationFunction.h
+++ b/content/smil/nsSMILSetAnimationFunction.h
@@ -6,6 +6,7 @@
#ifndef NS_SMILSETANIMATIONFUNCTION_H_
#define NS_SMILSETANIMATIONFUNCTION_H_
+#include "mozilla/Attributes.h"
#include "nsSMILAnimationFunction.h"
//----------------------------------------------------------------------
@@ -31,7 +32,7 @@ public:
* attribute; false otherwise.
*/
virtual bool SetAttr(nsIAtom* aAttribute, const nsAString& aValue,
- nsAttrValue& aResult, nsresult* aParseResult = nullptr);
+ nsAttrValue& aResult, nsresult* aParseResult = nullptr) MOZ_OVERRIDE;
/*
* Unsets the given attribute.
diff --git a/content/smil/nsSMILTimeValueSpec.h b/content/smil/nsSMILTimeValueSpec.h
index 43c28814441..b420d7a6bd8 100644
--- a/content/smil/nsSMILTimeValueSpec.h
+++ b/content/smil/nsSMILTimeValueSpec.h
@@ -6,6 +6,7 @@
#ifndef NS_SMILTIMEVALUESPEC_H_
#define NS_SMILTIMEVALUESPEC_H_
+#include "mozilla/Attributes.h"
#include "nsSMILTimeValueSpecParams.h"
#include "nsReferencedElement.h"
#include "nsAutoPtr.h"
@@ -92,12 +93,12 @@ protected:
}
protected:
- virtual void ElementChanged(Element* aFrom, Element* aTo)
+ virtual void ElementChanged(Element* aFrom, Element* aTo) MOZ_OVERRIDE
{
nsReferencedElement::ElementChanged(aFrom, aTo);
mSpec->UpdateReferencedElement(aFrom, aTo);
}
- virtual bool IsPersistent() { return true; }
+ virtual bool IsPersistent() MOZ_OVERRIDE { return true; }
private:
nsSMILTimeValueSpec* mSpec;
};
diff --git a/content/svg/content/src/SVGAnimateElement.h b/content/svg/content/src/SVGAnimateElement.h
index f871cb1c58c..cd5aba4abbd 100644
--- a/content/svg/content/src/SVGAnimateElement.h
+++ b/content/svg/content/src/SVGAnimateElement.h
@@ -6,6 +6,7 @@
#ifndef mozilla_dom_SVGAnimateElement_h
#define mozilla_dom_SVGAnimateElement_h
+#include "mozilla/Attributes.h"
#include "mozilla/dom/SVGAnimationElement.h"
#include "nsSMILAnimationFunction.h"
@@ -30,7 +31,7 @@ protected:
public:
// nsIDOMNode
- virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
+ virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
// SVGAnimationElement
virtual nsSMILAnimationFunction& AnimationFunction();
diff --git a/content/svg/content/src/SVGAnimateMotionElement.h b/content/svg/content/src/SVGAnimateMotionElement.h
index 26abf6715bb..f099065ce5e 100644
--- a/content/svg/content/src/SVGAnimateMotionElement.h
+++ b/content/svg/content/src/SVGAnimateMotionElement.h
@@ -6,6 +6,7 @@
#ifndef mozilla_dom_SVGAnimateMotionElement_h
#define mozilla_dom_SVGAnimateMotionElement_h
+#include "mozilla/Attributes.h"
#include "mozilla/dom/SVGAnimationElement.h"
#include "SVGMotionSMILAnimationFunction.h"
@@ -30,7 +31,7 @@ protected:
public:
// nsIDOMNode specializations
- virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
+ virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
// SVGAnimationElement
virtual nsSMILAnimationFunction& AnimationFunction();
@@ -39,7 +40,7 @@ public:
virtual nsSMILTargetAttrType GetTargetAttributeType() const;
// nsSVGElement
- virtual nsIAtom* GetPathDataAttrName() const {
+ virtual nsIAtom* GetPathDataAttrName() const MOZ_OVERRIDE {
return nsGkAtoms::path;
}
diff --git a/content/svg/content/src/SVGAnimateTransformElement.h b/content/svg/content/src/SVGAnimateTransformElement.h
index 9440dbc6868..609a6b6675a 100644
--- a/content/svg/content/src/SVGAnimateTransformElement.h
+++ b/content/svg/content/src/SVGAnimateTransformElement.h
@@ -6,6 +6,7 @@
#ifndef mozilla_dom_SVGAnimateTransformElement_h
#define mozilla_dom_SVGAnimateTransformElement_h
+#include "mozilla/Attributes.h"
#include "mozilla/dom/SVGAnimationElement.h"
#include "nsSMILAnimationFunction.h"
@@ -30,13 +31,13 @@ protected:
public:
// nsIDOMNode specializations
- virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
+ virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
// Element specializations
bool ParseAttribute(int32_t aNamespaceID,
nsIAtom* aAttribute,
const nsAString& aValue,
- nsAttrValue& aResult);
+ nsAttrValue& aResult) MOZ_OVERRIDE;
// SVGAnimationElement
virtual nsSMILAnimationFunction& AnimationFunction();
diff --git a/content/svg/content/src/SVGAnimatedLength.h b/content/svg/content/src/SVGAnimatedLength.h
index aa7aa9f6fa1..54a92f6e521 100644
--- a/content/svg/content/src/SVGAnimatedLength.h
+++ b/content/svg/content/src/SVGAnimatedLength.h
@@ -6,6 +6,7 @@
#ifndef mozilla_dom_SVGAnimatedLength_h
#define mozilla_dom_SVGAnimatedLength_h
+#include "mozilla/Attributes.h"
#include "nsSVGElement.h"
#include "nsIDOMSVGAnimatedLength.h"
@@ -28,10 +29,10 @@ public:
~SVGAnimatedLength();
- NS_IMETHOD GetBaseVal(nsIDOMSVGLength **aBaseVal)
+ NS_IMETHOD GetBaseVal(nsIDOMSVGLength **aBaseVal) MOZ_OVERRIDE
{ *aBaseVal = BaseVal().get(); return NS_OK; }
- NS_IMETHOD GetAnimVal(nsIDOMSVGLength **aAnimVal)
+ NS_IMETHOD GetAnimVal(nsIDOMSVGLength **aAnimVal) MOZ_OVERRIDE
{ *aAnimVal = AnimVal().get(); return NS_OK; }
// WebIDL
diff --git a/content/svg/content/src/SVGAnimatedLengthList.h b/content/svg/content/src/SVGAnimatedLengthList.h
index a6733284418..863b38a9204 100644
--- a/content/svg/content/src/SVGAnimatedLengthList.h
+++ b/content/svg/content/src/SVGAnimatedLengthList.h
@@ -6,6 +6,7 @@
#ifndef MOZILLA_SVGANIMATEDLENGTHLIST_H__
#define MOZILLA_SVGANIMATEDLENGTHLIST_H__
+#include "mozilla/Attributes.h"
#include "nsAutoPtr.h"
#include "nsISMILAttr.h"
#include "SVGLengthList.h"
@@ -114,10 +115,10 @@ private:
virtual nsresult ValueFromString(const nsAString& aStr,
const dom::SVGAnimationElement* aSrcElement,
nsSMILValue& aValue,
- bool& aPreventCachingOfSandwich) const;
- virtual nsSMILValue GetBaseValue() const;
- virtual void ClearAnimValue();
- virtual nsresult SetAnimValue(const nsSMILValue& aValue);
+ bool& aPreventCachingOfSandwich) const MOZ_OVERRIDE;
+ virtual nsSMILValue GetBaseValue() const MOZ_OVERRIDE;
+ virtual void ClearAnimValue() MOZ_OVERRIDE;
+ virtual nsresult SetAnimValue(const nsSMILValue& aValue) MOZ_OVERRIDE;
};
};
diff --git a/content/svg/content/src/SVGAnimatedNumberList.h b/content/svg/content/src/SVGAnimatedNumberList.h
index 72ff037903e..09d72214b98 100644
--- a/content/svg/content/src/SVGAnimatedNumberList.h
+++ b/content/svg/content/src/SVGAnimatedNumberList.h
@@ -6,6 +6,7 @@
#ifndef MOZILLA_SVGANIMATEDNUMBERLIST_H__
#define MOZILLA_SVGANIMATEDNUMBERLIST_H__
+#include "mozilla/Attributes.h"
#include "nsAutoPtr.h"
#include "nsISMILAttr.h"
#include "SVGNumberList.h"
@@ -116,10 +117,10 @@ private:
virtual nsresult ValueFromString(const nsAString& aStr,
const dom::SVGAnimationElement* aSrcElement,
nsSMILValue& aValue,
- bool& aPreventCachingOfSandwich) const;
- virtual nsSMILValue GetBaseValue() const;
- virtual void ClearAnimValue();
- virtual nsresult SetAnimValue(const nsSMILValue& aValue);
+ bool& aPreventCachingOfSandwich) const MOZ_OVERRIDE;
+ virtual nsSMILValue GetBaseValue() const MOZ_OVERRIDE;
+ virtual void ClearAnimValue() MOZ_OVERRIDE;
+ virtual nsresult SetAnimValue(const nsSMILValue& aValue) MOZ_OVERRIDE;
};
};
diff --git a/content/svg/content/src/SVGAnimatedPathSegList.h b/content/svg/content/src/SVGAnimatedPathSegList.h
index e9f01e0c232..003f9777ca8 100644
--- a/content/svg/content/src/SVGAnimatedPathSegList.h
+++ b/content/svg/content/src/SVGAnimatedPathSegList.h
@@ -6,6 +6,7 @@
#ifndef MOZILLA_SVGANIMATEDPATHSEGLIST_H__
#define MOZILLA_SVGANIMATEDPATHSEGLIST_H__
+#include "mozilla/Attributes.h"
#include "nsAutoPtr.h"
#include "nsISMILAttr.h"
#include "SVGPathData.h"
@@ -116,10 +117,10 @@ private:
virtual nsresult ValueFromString(const nsAString& aStr,
const dom::SVGAnimationElement* aSrcElement,
nsSMILValue& aValue,
- bool& aPreventCachingOfSandwich) const;
- virtual nsSMILValue GetBaseValue() const;
- virtual void ClearAnimValue();
- virtual nsresult SetAnimValue(const nsSMILValue& aValue);
+ bool& aPreventCachingOfSandwich) const MOZ_OVERRIDE;
+ virtual nsSMILValue GetBaseValue() const MOZ_OVERRIDE;
+ virtual void ClearAnimValue() MOZ_OVERRIDE;
+ virtual nsresult SetAnimValue(const nsSMILValue& aValue) MOZ_OVERRIDE;
};
};
diff --git a/content/svg/content/src/SVGAnimatedPointList.h b/content/svg/content/src/SVGAnimatedPointList.h
index ba089de6378..74469887d4e 100644
--- a/content/svg/content/src/SVGAnimatedPointList.h
+++ b/content/svg/content/src/SVGAnimatedPointList.h
@@ -6,6 +6,7 @@
#ifndef MOZILLA_SVGANIMATEDPOINTLIST_H__
#define MOZILLA_SVGANIMATEDPOINTLIST_H__
+#include "mozilla/Attributes.h"
#include "nsAutoPtr.h"
#include "nsISMILAttr.h"
#include "SVGPointList.h"
@@ -116,10 +117,10 @@ private:
virtual nsresult ValueFromString(const nsAString& aStr,
const dom::SVGAnimationElement* aSrcElement,
nsSMILValue& aValue,
- bool& aPreventCachingOfSandwich) const;
- virtual nsSMILValue GetBaseValue() const;
- virtual void ClearAnimValue();
- virtual nsresult SetAnimValue(const nsSMILValue& aValue);
+ bool& aPreventCachingOfSandwich) const MOZ_OVERRIDE;
+ virtual nsSMILValue GetBaseValue() const MOZ_OVERRIDE;
+ virtual void ClearAnimValue() MOZ_OVERRIDE;
+ virtual nsresult SetAnimValue(const nsSMILValue& aValue) MOZ_OVERRIDE;
};
};
diff --git a/content/svg/content/src/SVGAnimatedPreserveAspectRatio.h b/content/svg/content/src/SVGAnimatedPreserveAspectRatio.h
index ca082917280..24b39b610af 100644
--- a/content/svg/content/src/SVGAnimatedPreserveAspectRatio.h
+++ b/content/svg/content/src/SVGAnimatedPreserveAspectRatio.h
@@ -104,10 +104,10 @@ public:
virtual nsresult ValueFromString(const nsAString& aStr,
const dom::SVGAnimationElement* aSrcElement,
nsSMILValue& aValue,
- bool& aPreventCachingOfSandwich) const;
- virtual nsSMILValue GetBaseValue() const;
- virtual void ClearAnimValue();
- virtual nsresult SetAnimValue(const nsSMILValue& aValue);
+ bool& aPreventCachingOfSandwich) const MOZ_OVERRIDE;
+ virtual nsSMILValue GetBaseValue() const MOZ_OVERRIDE;
+ virtual void ClearAnimValue() MOZ_OVERRIDE;
+ virtual nsresult SetAnimValue(const nsSMILValue& aValue) MOZ_OVERRIDE;
};
};
diff --git a/content/svg/content/src/SVGAnimationElement.h b/content/svg/content/src/SVGAnimationElement.h
index 4018cfbe1ae..bb276d3b7bb 100644
--- a/content/svg/content/src/SVGAnimationElement.h
+++ b/content/svg/content/src/SVGAnimationElement.h
@@ -6,6 +6,7 @@
#ifndef mozilla_dom_SVGAnimationElement_h
#define mozilla_dom_SVGAnimationElement_h
+#include "mozilla/Attributes.h"
#include "mozilla/dom/SVGTests.h"
#include "nsReferencedElement.h"
#include "nsSMILTimedElement.h"
@@ -41,21 +42,21 @@ public:
// nsIContent specializations
virtual nsresult BindToTree(nsIDocument* aDocument, nsIContent* aParent,
nsIContent* aBindingParent,
- bool aCompileEventHandlers);
- virtual void UnbindFromTree(bool aDeep, bool aNullParent);
+ bool aCompileEventHandlers) MOZ_OVERRIDE;
+ virtual void UnbindFromTree(bool aDeep, bool aNullParent) MOZ_OVERRIDE;
virtual nsresult UnsetAttr(int32_t aNamespaceID, nsIAtom* aAttribute,
- bool aNotify);
+ bool aNotify) MOZ_OVERRIDE;
- virtual bool IsNodeOfType(uint32_t aFlags) const;
+ virtual bool IsNodeOfType(uint32_t aFlags) const MOZ_OVERRIDE;
// Element specializations
virtual bool ParseAttribute(int32_t aNamespaceID,
nsIAtom* aAttribute,
const nsAString& aValue,
- nsAttrValue& aResult);
+ nsAttrValue& aResult) MOZ_OVERRIDE;
virtual nsresult AfterSetAttr(int32_t aNamespaceID, nsIAtom* aName,
- const nsAttrValue* aValue, bool aNotify);
+ const nsAttrValue* aValue, bool aNotify) MOZ_OVERRIDE;
bool PassesConditionalProcessingTests();
const nsAttrValue* GetAnimAttr(nsIAtom* aName) const;
@@ -99,14 +100,14 @@ public:
// We need to be notified when target changes, in order to request a
// sample (which will clear animation effects from old target and apply
// them to the new target) and update any event registrations.
- virtual void ElementChanged(Element* aFrom, Element* aTo) {
+ virtual void ElementChanged(Element* aFrom, Element* aTo) MOZ_OVERRIDE {
nsReferencedElement::ElementChanged(aFrom, aTo);
mAnimationElement->AnimationTargetChanged();
}
// We need to override IsPersistent to get persistent tracking (beyond the
// first time the target changes)
- virtual bool IsPersistent() { return true; }
+ virtual bool IsPersistent() MOZ_OVERRIDE { return true; }
private:
SVGAnimationElement* const mAnimationElement;
};
diff --git a/content/svg/content/src/SVGDescElement.h b/content/svg/content/src/SVGDescElement.h
index 09f7564481d..b01426127df 100644
--- a/content/svg/content/src/SVGDescElement.h
+++ b/content/svg/content/src/SVGDescElement.h
@@ -6,6 +6,7 @@
#ifndef mozilla_dom_SVGDescElement_h
#define mozilla_dom_SVGDescElement_h
+#include "mozilla/Attributes.h"
#include "nsSVGElement.h"
nsresult NS_NewSVGDescElement(nsIContent **aResult,
@@ -27,7 +28,7 @@ protected:
JS::Handle aScope) MOZ_OVERRIDE;
public:
- virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
+ virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
};
} // namespace dom
diff --git a/content/svg/content/src/SVGIRect.h b/content/svg/content/src/SVGIRect.h
index fa330e52347..3c4ec6740f3 100644
--- a/content/svg/content/src/SVGIRect.h
+++ b/content/svg/content/src/SVGIRect.h
@@ -32,7 +32,7 @@ public:
{
}
- JSObject* WrapObject(JSContext* aCx, JS::Handle aScope)
+ JSObject* WrapObject(JSContext* aCx, JS::Handle aScope) MOZ_OVERRIDE
{
return SVGRectBinding::Wrap(aCx, aScope, this);
}
diff --git a/content/svg/content/src/SVGIntegerPairSMILType.h b/content/svg/content/src/SVGIntegerPairSMILType.h
index 77108f95620..21591dbef03 100644
--- a/content/svg/content/src/SVGIntegerPairSMILType.h
+++ b/content/svg/content/src/SVGIntegerPairSMILType.h
@@ -6,6 +6,7 @@
#ifndef MOZILLA_SVGINTEGERPAIRSMILTYPE_H_
#define MOZILLA_SVGINTEGERPAIRSMILTYPE_H_
+#include "mozilla/Attributes.h"
#include "nsISMILType.h"
class nsSMILValue;
@@ -21,20 +22,20 @@ public:
protected:
// nsISMILType Methods
// -------------------
- virtual void Init(nsSMILValue& aValue) const;
+ virtual void Init(nsSMILValue& aValue) const MOZ_OVERRIDE;
virtual void Destroy(nsSMILValue&) const;
- virtual nsresult Assign(nsSMILValue& aDest, const nsSMILValue& aSrc) const;
+ virtual nsresult Assign(nsSMILValue& aDest, const nsSMILValue& aSrc) const MOZ_OVERRIDE;
virtual bool IsEqual(const nsSMILValue& aLeft,
- const nsSMILValue& aRight) const;
+ const nsSMILValue& aRight) const MOZ_OVERRIDE;
virtual nsresult Add(nsSMILValue& aDest, const nsSMILValue& aValueToAdd,
- uint32_t aCount) const;
+ uint32_t aCount) const MOZ_OVERRIDE;
virtual nsresult ComputeDistance(const nsSMILValue& aFrom,
const nsSMILValue& aTo,
- double& aDistance) const;
+ double& aDistance) const MOZ_OVERRIDE;
virtual nsresult Interpolate(const nsSMILValue& aStartVal,
const nsSMILValue& aEndVal,
double aUnitDistance,
- nsSMILValue& aResult) const;
+ nsSMILValue& aResult) const MOZ_OVERRIDE;
private:
// Private constructor & destructor: prevent instances beyond my singleton,
diff --git a/content/svg/content/src/SVGLengthList.h b/content/svg/content/src/SVGLengthList.h
index 578b50c26dc..a187b8a2956 100644
--- a/content/svg/content/src/SVGLengthList.h
+++ b/content/svg/content/src/SVGLengthList.h
@@ -321,6 +321,11 @@ public:
return (*mList)[aIndex].GetValueInUserUnits(mElement, mAxis);
}
+ bool HasPercentageValueAt(uint32_t aIndex) const {
+ const SVGLength& length = (*mList)[aIndex];
+ return length.GetUnit() == nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE;
+ }
+
private:
const SVGLengthList *mList;
nsSVGElement *mElement;
diff --git a/content/svg/content/src/SVGLengthListSMILType.h b/content/svg/content/src/SVGLengthListSMILType.h
index bb277d81c38..956d0cab0b8 100644
--- a/content/svg/content/src/SVGLengthListSMILType.h
+++ b/content/svg/content/src/SVGLengthListSMILType.h
@@ -6,6 +6,7 @@
#ifndef MOZILLA_SVGLENGTHLISTSMILTYPE_H_
#define MOZILLA_SVGLENGTHLISTSMILTYPE_H_
+#include "mozilla/Attributes.h"
#include "nsISMILType.h"
class nsSMILValue;
@@ -73,21 +74,21 @@ protected:
* from each sandwich layer are composited together, we could end up allowing
* animation between lists of different length when we should not!)
*/
- virtual void Init(nsSMILValue& aValue) const;
+ virtual void Init(nsSMILValue& aValue) const MOZ_OVERRIDE;
- virtual void Destroy(nsSMILValue& aValue) const;
- virtual nsresult Assign(nsSMILValue& aDest, const nsSMILValue& aSrc) const;
+ virtual void Destroy(nsSMILValue& aValue) const MOZ_OVERRIDE;
+ virtual nsresult Assign(nsSMILValue& aDest, const nsSMILValue& aSrc) const MOZ_OVERRIDE;
virtual bool IsEqual(const nsSMILValue& aLeft,
- const nsSMILValue& aRight) const;
+ const nsSMILValue& aRight) const MOZ_OVERRIDE;
virtual nsresult Add(nsSMILValue& aDest, const nsSMILValue& aValueToAdd,
- uint32_t aCount) const;
+ uint32_t aCount) const MOZ_OVERRIDE;
virtual nsresult ComputeDistance(const nsSMILValue& aFrom,
const nsSMILValue& aTo,
- double& aDistance) const;
+ double& aDistance) const MOZ_OVERRIDE;
virtual nsresult Interpolate(const nsSMILValue& aStartVal,
const nsSMILValue& aEndVal,
double aUnitDistance,
- nsSMILValue& aResult) const;
+ nsSMILValue& aResult) const MOZ_OVERRIDE;
private:
// Private constructor & destructor: prevent instances beyond my singleton,
diff --git a/content/svg/content/src/SVGMetadataElement.h b/content/svg/content/src/SVGMetadataElement.h
index a5d7d80118c..30593fd18f7 100644
--- a/content/svg/content/src/SVGMetadataElement.h
+++ b/content/svg/content/src/SVGMetadataElement.h
@@ -6,6 +6,7 @@
#ifndef mozilla_dom_SVGMetadataElement_h
#define mozilla_dom_SVGMetadataElement_h
+#include "mozilla/Attributes.h"
#include "nsSVGElement.h"
nsresult NS_NewSVGMetadataElement(nsIContent **aResult,
@@ -28,7 +29,7 @@ protected:
nsresult Init();
public:
- virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
+ virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
};
} // namespace dom
diff --git a/content/svg/content/src/SVGMotionSMILAttr.h b/content/svg/content/src/SVGMotionSMILAttr.h
index 2cf1797586a..e4d98773d47 100644
--- a/content/svg/content/src/SVGMotionSMILAttr.h
+++ b/content/svg/content/src/SVGMotionSMILAttr.h
@@ -8,6 +8,7 @@
#ifndef MOZILLA_SVGMOTIONSMILATTR_H_
#define MOZILLA_SVGMOTIONSMILATTR_H_
+#include "mozilla/Attributes.h"
#include "nsISMILAttr.h"
class nsIContent;
@@ -37,11 +38,11 @@ public:
virtual nsresult ValueFromString(const nsAString& aStr,
const dom::SVGAnimationElement* aSrcElement,
nsSMILValue& aValue,
- bool& aPreventCachingOfSandwich) const;
- virtual nsSMILValue GetBaseValue() const;
- virtual nsresult SetAnimValue(const nsSMILValue& aValue);
- virtual void ClearAnimValue();
- virtual const nsIContent* GetTargetNode() const;
+ bool& aPreventCachingOfSandwich) const MOZ_OVERRIDE;
+ virtual nsSMILValue GetBaseValue() const MOZ_OVERRIDE;
+ virtual nsresult SetAnimValue(const nsSMILValue& aValue) MOZ_OVERRIDE;
+ virtual void ClearAnimValue() MOZ_OVERRIDE;
+ virtual const nsIContent* GetTargetNode() const MOZ_OVERRIDE;
protected:
// Raw pointers are OK here because this SVGMotionSMILAttr is both
diff --git a/content/svg/content/src/SVGMotionSMILPathUtils.h b/content/svg/content/src/SVGMotionSMILPathUtils.h
index ef86f77c042..2735019452e 100644
--- a/content/svg/content/src/SVGMotionSMILPathUtils.h
+++ b/content/svg/content/src/SVGMotionSMILPathUtils.h
@@ -9,6 +9,7 @@
#ifndef MOZILLA_SVGMOTIONSMILPATHUTILS_H_
#define MOZILLA_SVGMOTIONSMILPATHUTILS_H_
+#include "mozilla/Attributes.h"
#include "gfxContext.h"
#include "gfxPlatform.h"
#include "nsCOMPtr.h"
@@ -78,7 +79,7 @@ public:
}
// nsSMILParserUtils::GenericValueParser interface
- virtual nsresult Parse(const nsAString& aValueStr);
+ virtual nsresult Parse(const nsAString& aValueStr) MOZ_OVERRIDE;
protected:
PathGenerator* mPathGenerator;
diff --git a/content/svg/content/src/SVGMotionSMILType.h b/content/svg/content/src/SVGMotionSMILType.h
index 0f15b010b37..561e8e017ae 100644
--- a/content/svg/content/src/SVGMotionSMILType.h
+++ b/content/svg/content/src/SVGMotionSMILType.h
@@ -8,6 +8,7 @@
#ifndef MOZILLA_SVGMOTIONSMILTYPE_H_
#define MOZILLA_SVGMOTIONSMILTYPE_H_
+#include "mozilla/Attributes.h"
#include "gfxMatrix.h"
#include "nsISMILType.h"
@@ -41,23 +42,23 @@ public:
protected:
// nsISMILType Methods
// -------------------
- virtual void Init(nsSMILValue& aValue) const;
- virtual void Destroy(nsSMILValue& aValue) const;
- virtual nsresult Assign(nsSMILValue& aDest, const nsSMILValue& aSrc) const;
+ virtual void Init(nsSMILValue& aValue) const MOZ_OVERRIDE;
+ virtual void Destroy(nsSMILValue& aValue) const MOZ_OVERRIDE;
+ virtual nsresult Assign(nsSMILValue& aDest, const nsSMILValue& aSrc) const MOZ_OVERRIDE;
virtual bool IsEqual(const nsSMILValue& aLeft,
- const nsSMILValue& aRight) const;
+ const nsSMILValue& aRight) const MOZ_OVERRIDE;
virtual nsresult Add(nsSMILValue& aDest,
const nsSMILValue& aValueToAdd,
- uint32_t aCount) const;
+ uint32_t aCount) const MOZ_OVERRIDE;
virtual nsresult SandwichAdd(nsSMILValue& aDest,
- const nsSMILValue& aValueToAdd) const;
+ const nsSMILValue& aValueToAdd) const MOZ_OVERRIDE;
virtual nsresult ComputeDistance(const nsSMILValue& aFrom,
const nsSMILValue& aTo,
- double& aDistance) const;
+ double& aDistance) const MOZ_OVERRIDE;
virtual nsresult Interpolate(const nsSMILValue& aStartVal,
const nsSMILValue& aEndVal,
double aUnitDistance,
- nsSMILValue& aResult) const;
+ nsSMILValue& aResult) const MOZ_OVERRIDE;
public:
// Used to generate a transform matrix from an nsSMILValue.
static gfxMatrix CreateMatrix(const nsSMILValue& aSMILVal);
diff --git a/content/svg/content/src/SVGNumberListSMILType.h b/content/svg/content/src/SVGNumberListSMILType.h
index 4d72e15891c..702da074521 100644
--- a/content/svg/content/src/SVGNumberListSMILType.h
+++ b/content/svg/content/src/SVGNumberListSMILType.h
@@ -6,6 +6,7 @@
#ifndef MOZILLA_SVGNUMBERLISTSMILTYPE_H_
#define MOZILLA_SVGNUMBERLISTSMILTYPE_H_
+#include "mozilla/Attributes.h"
#include "nsISMILType.h"
class nsSMILValue;
@@ -27,21 +28,21 @@ protected:
// nsISMILType Methods
// -------------------
- virtual void Init(nsSMILValue& aValue) const;
+ virtual void Init(nsSMILValue& aValue) const MOZ_OVERRIDE;
- virtual void Destroy(nsSMILValue& aValue) const;
- virtual nsresult Assign(nsSMILValue& aDest, const nsSMILValue& aSrc) const;
+ virtual void Destroy(nsSMILValue& aValue) const MOZ_OVERRIDE;
+ virtual nsresult Assign(nsSMILValue& aDest, const nsSMILValue& aSrc) const MOZ_OVERRIDE;
virtual bool IsEqual(const nsSMILValue& aLeft,
- const nsSMILValue& aRight) const;
+ const nsSMILValue& aRight) const MOZ_OVERRIDE;
virtual nsresult Add(nsSMILValue& aDest, const nsSMILValue& aValueToAdd,
- uint32_t aCount) const;
+ uint32_t aCount) const MOZ_OVERRIDE;
virtual nsresult ComputeDistance(const nsSMILValue& aFrom,
const nsSMILValue& aTo,
- double& aDistance) const;
+ double& aDistance) const MOZ_OVERRIDE;
virtual nsresult Interpolate(const nsSMILValue& aStartVal,
const nsSMILValue& aEndVal,
double aUnitDistance,
- nsSMILValue& aResult) const;
+ nsSMILValue& aResult) const MOZ_OVERRIDE;
private:
// Private constructor & destructor: prevent instances beyond my singleton,
diff --git a/content/svg/content/src/SVGNumberPairSMILType.h b/content/svg/content/src/SVGNumberPairSMILType.h
index 474d715f114..49ad774f74e 100644
--- a/content/svg/content/src/SVGNumberPairSMILType.h
+++ b/content/svg/content/src/SVGNumberPairSMILType.h
@@ -6,6 +6,7 @@
#ifndef MOZILLA_SVGNUMBERPAIRSMILTYPE_H_
#define MOZILLA_SVGNUMBERPAIRSMILTYPE_H_
+#include "mozilla/Attributes.h"
#include "nsISMILType.h"
class nsSMILValue;
@@ -21,20 +22,20 @@ public:
protected:
// nsISMILType Methods
// -------------------
- virtual void Init(nsSMILValue& aValue) const;
+ virtual void Init(nsSMILValue& aValue) const MOZ_OVERRIDE;
virtual void Destroy(nsSMILValue&) const;
- virtual nsresult Assign(nsSMILValue& aDest, const nsSMILValue& aSrc) const;
+ virtual nsresult Assign(nsSMILValue& aDest, const nsSMILValue& aSrc) const MOZ_OVERRIDE;
virtual bool IsEqual(const nsSMILValue& aLeft,
- const nsSMILValue& aRight) const;
+ const nsSMILValue& aRight) const MOZ_OVERRIDE;
virtual nsresult Add(nsSMILValue& aDest, const nsSMILValue& aValueToAdd,
- uint32_t aCount) const;
+ uint32_t aCount) const MOZ_OVERRIDE;
virtual nsresult ComputeDistance(const nsSMILValue& aFrom,
const nsSMILValue& aTo,
- double& aDistance) const;
+ double& aDistance) const MOZ_OVERRIDE;
virtual nsresult Interpolate(const nsSMILValue& aStartVal,
const nsSMILValue& aEndVal,
double aUnitDistance,
- nsSMILValue& aResult) const;
+ nsSMILValue& aResult) const MOZ_OVERRIDE;
private:
// Private constructor & destructor: prevent instances beyond my singleton,
diff --git a/content/svg/content/src/SVGOrientSMILType.h b/content/svg/content/src/SVGOrientSMILType.h
index 646a2f6c0b2..c011d52f848 100644
--- a/content/svg/content/src/SVGOrientSMILType.h
+++ b/content/svg/content/src/SVGOrientSMILType.h
@@ -6,6 +6,7 @@
#ifndef MOZILLA_SVGORIENTSMILTYPE_H_
#define MOZILLA_SVGORIENTSMILTYPE_H_
+#include "mozilla/Attributes.h"
#include "nsISMILType.h"
class nsSMILValue;
@@ -35,20 +36,20 @@ public:
protected:
// nsISMILType Methods
// -------------------
- virtual void Init(nsSMILValue& aValue) const;
+ virtual void Init(nsSMILValue& aValue) const MOZ_OVERRIDE;
virtual void Destroy(nsSMILValue&) const;
- virtual nsresult Assign(nsSMILValue& aDest, const nsSMILValue& aSrc) const;
+ virtual nsresult Assign(nsSMILValue& aDest, const nsSMILValue& aSrc) const MOZ_OVERRIDE;
virtual bool IsEqual(const nsSMILValue& aLeft,
- const nsSMILValue& aRight) const;
+ const nsSMILValue& aRight) const MOZ_OVERRIDE;
virtual nsresult Add(nsSMILValue& aDest, const nsSMILValue& aValueToAdd,
- uint32_t aCount) const;
+ uint32_t aCount) const MOZ_OVERRIDE;
virtual nsresult ComputeDistance(const nsSMILValue& aFrom,
const nsSMILValue& aTo,
- double& aDistance) const;
+ double& aDistance) const MOZ_OVERRIDE;
virtual nsresult Interpolate(const nsSMILValue& aStartVal,
const nsSMILValue& aEndVal,
double aUnitDistance,
- nsSMILValue& aResult) const;
+ nsSMILValue& aResult) const MOZ_OVERRIDE;
private:
// Private constructor & destructor: prevent instances beyond my singleton,
diff --git a/content/svg/content/src/SVGPathSegListSMILType.h b/content/svg/content/src/SVGPathSegListSMILType.h
index 653e22ee349..0085c0d2d11 100644
--- a/content/svg/content/src/SVGPathSegListSMILType.h
+++ b/content/svg/content/src/SVGPathSegListSMILType.h
@@ -6,6 +6,7 @@
#ifndef MOZILLA_SVGPATHSEGLISTSMILTYPE_H_
#define MOZILLA_SVGPATHSEGLISTSMILTYPE_H_
+#include "mozilla/Attributes.h"
#include "nsISMILType.h"
class nsSMILValue;
@@ -27,21 +28,21 @@ protected:
// nsISMILType Methods
// -------------------
- virtual void Init(nsSMILValue& aValue) const;
+ virtual void Init(nsSMILValue& aValue) const MOZ_OVERRIDE;
- virtual void Destroy(nsSMILValue& aValue) const;
- virtual nsresult Assign(nsSMILValue& aDest, const nsSMILValue& aSrc) const;
+ virtual void Destroy(nsSMILValue& aValue) const MOZ_OVERRIDE;
+ virtual nsresult Assign(nsSMILValue& aDest, const nsSMILValue& aSrc) const MOZ_OVERRIDE;
virtual bool IsEqual(const nsSMILValue& aLeft,
- const nsSMILValue& aRight) const;
+ const nsSMILValue& aRight) const MOZ_OVERRIDE;
virtual nsresult Add(nsSMILValue& aDest, const nsSMILValue& aValueToAdd,
- uint32_t aCount) const;
+ uint32_t aCount) const MOZ_OVERRIDE;
virtual nsresult ComputeDistance(const nsSMILValue& aFrom,
const nsSMILValue& aTo,
- double& aDistance) const;
+ double& aDistance) const MOZ_OVERRIDE;
virtual nsresult Interpolate(const nsSMILValue& aStartVal,
const nsSMILValue& aEndVal,
double aUnitDistance,
- nsSMILValue& aResult) const;
+ nsSMILValue& aResult) const MOZ_OVERRIDE;
private:
// Private constructor & destructor: prevent instances beyond my singleton,
diff --git a/content/svg/content/src/SVGPointListSMILType.h b/content/svg/content/src/SVGPointListSMILType.h
index a0768b6cc7c..36e3c053bab 100644
--- a/content/svg/content/src/SVGPointListSMILType.h
+++ b/content/svg/content/src/SVGPointListSMILType.h
@@ -6,6 +6,7 @@
#ifndef MOZILLA_SVGPOINTLISTSMILTYPE_H_
#define MOZILLA_SVGPOINTLISTSMILTYPE_H_
+#include "mozilla/Attributes.h"
#include "nsISMILType.h"
class nsSMILValue;
@@ -27,21 +28,21 @@ protected:
// nsISMILType Methods
// -------------------
- virtual void Init(nsSMILValue& aValue) const;
+ virtual void Init(nsSMILValue& aValue) const MOZ_OVERRIDE;
- virtual void Destroy(nsSMILValue& aValue) const;
- virtual nsresult Assign(nsSMILValue& aDest, const nsSMILValue& aSrc) const;
+ virtual void Destroy(nsSMILValue& aValue) const MOZ_OVERRIDE;
+ virtual nsresult Assign(nsSMILValue& aDest, const nsSMILValue& aSrc) const MOZ_OVERRIDE;
virtual bool IsEqual(const nsSMILValue& aLeft,
- const nsSMILValue& aRight) const;
+ const nsSMILValue& aRight) const MOZ_OVERRIDE;
virtual nsresult Add(nsSMILValue& aDest, const nsSMILValue& aValueToAdd,
- uint32_t aCount) const;
+ uint32_t aCount) const MOZ_OVERRIDE;
virtual nsresult ComputeDistance(const nsSMILValue& aFrom,
const nsSMILValue& aTo,
- double& aDistance) const;
+ double& aDistance) const MOZ_OVERRIDE;
virtual nsresult Interpolate(const nsSMILValue& aStartVal,
const nsSMILValue& aEndVal,
double aUnitDistance,
- nsSMILValue& aResult) const;
+ nsSMILValue& aResult) const MOZ_OVERRIDE;
private:
// Private constructor & destructor: prevent instances beyond my singleton,
diff --git a/content/svg/content/src/SVGPolygonElement.h b/content/svg/content/src/SVGPolygonElement.h
index a9f56741560..95652b02811 100644
--- a/content/svg/content/src/SVGPolygonElement.h
+++ b/content/svg/content/src/SVGPolygonElement.h
@@ -6,6 +6,7 @@
#ifndef mozilla_dom_SVGPolygonElement_h
#define mozilla_dom_SVGPolygonElement_h
+#include "mozilla/Attributes.h"
#include "nsSVGPolyElement.h"
nsresult NS_NewSVGPolygonElement(nsIContent **aResult,
@@ -27,8 +28,8 @@ protected:
public:
// nsSVGPathGeometryElement methods:
- virtual void GetMarkPoints(nsTArray *aMarks);
- virtual void ConstructPath(gfxContext *aCtx);
+ virtual void GetMarkPoints(nsTArray *aMarks) MOZ_OVERRIDE;
+ virtual void ConstructPath(gfxContext *aCtx) MOZ_OVERRIDE;
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
};
diff --git a/content/svg/content/src/SVGSetElement.h b/content/svg/content/src/SVGSetElement.h
index 1bf76029f58..fd8a049844f 100644
--- a/content/svg/content/src/SVGSetElement.h
+++ b/content/svg/content/src/SVGSetElement.h
@@ -6,6 +6,7 @@
#ifndef mozilla_dom_SVGSetElement_h
#define mozilla_dom_SVGSetElement_h
+#include "mozilla/Attributes.h"
#include "mozilla/dom/SVGAnimationElement.h"
#include "nsSMILSetAnimationFunction.h"
@@ -30,7 +31,7 @@ protected:
public:
// nsIDOMNode
- virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
+ virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
// SVGAnimationElement
virtual nsSMILAnimationFunction& AnimationFunction();
diff --git a/content/svg/content/src/SVGStyleElement.h b/content/svg/content/src/SVGStyleElement.h
index 2e8af9f6327..5124c3909c5 100644
--- a/content/svg/content/src/SVGStyleElement.h
+++ b/content/svg/content/src/SVGStyleElement.h
@@ -6,6 +6,7 @@
#ifndef mozilla_dom_SVGStyleElement_h
#define mozilla_dom_SVGStyleElement_h
+#include "mozilla/Attributes.h"
#include "nsSVGElement.h"
#include "nsStyleLinkElement.h"
#include "nsStubMutationObserver.h"
@@ -87,13 +88,13 @@ protected:
}
// nsStyleLinkElement overrides
- already_AddRefed GetStyleSheetURL(bool* aIsInline);
+ already_AddRefed GetStyleSheetURL(bool* aIsInline) MOZ_OVERRIDE;
void GetStyleSheetInfo(nsAString& aTitle,
nsAString& aType,
nsAString& aMedia,
bool* aIsScoped,
- bool* aIsAlternate);
+ bool* aIsAlternate) MOZ_OVERRIDE;
virtual CORSMode GetCORSMode() const MOZ_OVERRIDE;
/**
diff --git a/content/svg/content/src/SVGTitleElement.h b/content/svg/content/src/SVGTitleElement.h
index a383fa99f9c..df4a5dce6b9 100644
--- a/content/svg/content/src/SVGTitleElement.h
+++ b/content/svg/content/src/SVGTitleElement.h
@@ -6,6 +6,7 @@
#ifndef mozilla_dom_SVGTitleElement_h
#define mozilla_dom_SVGTitleElement_h
+#include "mozilla/Attributes.h"
#include "nsSVGElement.h"
#include "nsStubMutationObserver.h"
@@ -38,16 +39,16 @@ public:
NS_DECL_NSIMUTATIONOBSERVER_CONTENTINSERTED
NS_DECL_NSIMUTATIONOBSERVER_CONTENTREMOVED
- virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
+ virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
virtual nsresult BindToTree(nsIDocument *aDocument, nsIContent *aParent,
nsIContent *aBindingParent,
- bool aCompileEventHandlers);
+ bool aCompileEventHandlers) MOZ_OVERRIDE;
virtual void UnbindFromTree(bool aDeep = true,
- bool aNullParent = true);
+ bool aNullParent = true) MOZ_OVERRIDE;
- virtual void DoneAddingChildren(bool aHaveNotified);
+ virtual void DoneAddingChildren(bool aHaveNotified) MOZ_OVERRIDE;
private:
void SendTitleChangeEvent(bool aBound);
};
diff --git a/content/svg/content/src/SVGTransformListParser.h b/content/svg/content/src/SVGTransformListParser.h
index 0e7c6a2bac1..3537653161b 100644
--- a/content/svg/content/src/SVGTransformListParser.h
+++ b/content/svg/content/src/SVGTransformListParser.h
@@ -7,6 +7,7 @@
#ifndef MOZILLA_SVGTRANSFORMLISTPARSER_H__
#define MOZILLA_SVGTRANSFORMLISTPARSER_H__
+#include "mozilla/Attributes.h"
#include "nsSVGDataParser.h"
#include "nsTArray.h"
@@ -34,7 +35,7 @@ private:
nsTArray mTransforms;
// helpers
- virtual nsresult Match();
+ virtual nsresult Match() MOZ_OVERRIDE;
nsresult MatchNumberArguments(float *aResult,
uint32_t aMaxNum,
diff --git a/content/svg/content/src/SVGTransformListSMILType.h b/content/svg/content/src/SVGTransformListSMILType.h
index 7c6f31a33d9..280db7c2be9 100644
--- a/content/svg/content/src/SVGTransformListSMILType.h
+++ b/content/svg/content/src/SVGTransformListSMILType.h
@@ -6,6 +6,7 @@
#ifndef SVGTRANSFORMLISTSMILTYPE_H_
#define SVGTRANSFORMLISTSMILTYPE_H_
+#include "mozilla/Attributes.h"
#include "nsISMILType.h"
#include "nsTArray.h"
@@ -85,23 +86,23 @@ public:
protected:
// nsISMILType Methods
// -------------------
- virtual void Init(nsSMILValue& aValue) const;
- virtual void Destroy(nsSMILValue& aValue) const;
- virtual nsresult Assign(nsSMILValue& aDest, const nsSMILValue& aSrc) const;
+ virtual void Init(nsSMILValue& aValue) const MOZ_OVERRIDE;
+ virtual void Destroy(nsSMILValue& aValue) const MOZ_OVERRIDE;
+ virtual nsresult Assign(nsSMILValue& aDest, const nsSMILValue& aSrc) const MOZ_OVERRIDE;
virtual bool IsEqual(const nsSMILValue& aLeft,
- const nsSMILValue& aRight) const;
+ const nsSMILValue& aRight) const MOZ_OVERRIDE;
virtual nsresult Add(nsSMILValue& aDest,
const nsSMILValue& aValueToAdd,
- uint32_t aCount) const;
+ uint32_t aCount) const MOZ_OVERRIDE;
virtual nsresult SandwichAdd(nsSMILValue& aDest,
- const nsSMILValue& aValueToAdd) const;
+ const nsSMILValue& aValueToAdd) const MOZ_OVERRIDE;
virtual nsresult ComputeDistance(const nsSMILValue& aFrom,
const nsSMILValue& aTo,
- double& aDistance) const;
+ double& aDistance) const MOZ_OVERRIDE;
virtual nsresult Interpolate(const nsSMILValue& aStartVal,
const nsSMILValue& aEndVal,
double aUnitDistance,
- nsSMILValue& aResult) const;
+ nsSMILValue& aResult) const MOZ_OVERRIDE;
public:
// Transform array accessors
diff --git a/content/svg/content/src/SVGTransformableElement.h b/content/svg/content/src/SVGTransformableElement.h
index dc51b9527ed..1842ce459bd 100644
--- a/content/svg/content/src/SVGTransformableElement.h
+++ b/content/svg/content/src/SVGTransformableElement.h
@@ -6,6 +6,7 @@
#ifndef SVGTransformableElement_h
#define SVGTransformableElement_h
+#include "mozilla/Attributes.h"
#include "nsSVGAnimatedTransformList.h"
#include "nsSVGElement.h"
#include "gfxMatrix.h"
@@ -38,27 +39,27 @@ public:
ErrorResult& rv);
// nsIContent interface
- NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const;
+ NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const MOZ_OVERRIDE;
nsChangeHint GetAttributeChangeHint(const nsIAtom* aAttribute,
- int32_t aModType) const;
+ int32_t aModType) const MOZ_OVERRIDE;
virtual bool IsEventAttributeName(nsIAtom* aName) MOZ_OVERRIDE;
virtual gfxMatrix PrependLocalTransformsTo(const gfxMatrix &aMatrix,
- TransformTypes aWhich = eAllTransforms) const;
- virtual const gfxMatrix* GetAnimateMotionTransform() const;
- virtual void SetAnimateMotionTransform(const gfxMatrix* aMatrix);
+ TransformTypes aWhich = eAllTransforms) const MOZ_OVERRIDE;
+ virtual const gfxMatrix* GetAnimateMotionTransform() const MOZ_OVERRIDE;
+ virtual void SetAnimateMotionTransform(const gfxMatrix* aMatrix) MOZ_OVERRIDE;
virtual nsSVGAnimatedTransformList*
- GetAnimatedTransformList(uint32_t aFlags = 0);
- virtual nsIAtom* GetTransformListAttrName() const {
+ GetAnimatedTransformList(uint32_t aFlags = 0) MOZ_OVERRIDE;
+ virtual nsIAtom* GetTransformListAttrName() const MOZ_OVERRIDE {
return nsGkAtoms::transform;
}
- virtual bool IsTransformable() { return true; }
+ virtual bool IsTransformable() MOZ_OVERRIDE { return true; }
protected:
// nsSVGElement overrides
diff --git a/content/svg/content/src/SVGViewBoxSMILType.h b/content/svg/content/src/SVGViewBoxSMILType.h
index 1861eab7505..53d6229366b 100644
--- a/content/svg/content/src/SVGViewBoxSMILType.h
+++ b/content/svg/content/src/SVGViewBoxSMILType.h
@@ -6,6 +6,7 @@
#ifndef MOZILLA_SVGVIEWBOXSMILTYPE_H_
#define MOZILLA_SVGVIEWBOXSMILTYPE_H_
+#include "mozilla/Attributes.h"
#include "nsISMILType.h"
class nsSMILValue;
@@ -21,20 +22,20 @@ public:
protected:
// nsISMILType Methods
// -------------------
- virtual void Init(nsSMILValue& aValue) const;
+ virtual void Init(nsSMILValue& aValue) const MOZ_OVERRIDE;
virtual void Destroy(nsSMILValue&) const;
- virtual nsresult Assign(nsSMILValue& aDest, const nsSMILValue& aSrc) const;
+ virtual nsresult Assign(nsSMILValue& aDest, const nsSMILValue& aSrc) const MOZ_OVERRIDE;
virtual bool IsEqual(const nsSMILValue& aLeft,
- const nsSMILValue& aRight) const;
+ const nsSMILValue& aRight) const MOZ_OVERRIDE;
virtual nsresult Add(nsSMILValue& aDest, const nsSMILValue& aValueToAdd,
- uint32_t aCount) const;
+ uint32_t aCount) const MOZ_OVERRIDE;
virtual nsresult ComputeDistance(const nsSMILValue& aFrom,
const nsSMILValue& aTo,
- double& aDistance) const;
+ double& aDistance) const MOZ_OVERRIDE;
virtual nsresult Interpolate(const nsSMILValue& aStartVal,
const nsSMILValue& aEndVal,
double aUnitDistance,
- nsSMILValue& aResult) const;
+ nsSMILValue& aResult) const MOZ_OVERRIDE;
private:
// Private constructor & destructor: prevent instances beyond my singleton,
diff --git a/content/svg/content/src/nsSVGAngle.h b/content/svg/content/src/nsSVGAngle.h
index 29a928a296f..b68fa8c623e 100644
--- a/content/svg/content/src/nsSVGAngle.h
+++ b/content/svg/content/src/nsSVGAngle.h
@@ -118,10 +118,10 @@ public:
virtual nsresult ValueFromString(const nsAString& aStr,
const mozilla::dom::SVGAnimationElement* aSrcElement,
nsSMILValue& aValue,
- bool& aPreventCachingOfSandwich) const;
- virtual nsSMILValue GetBaseValue() const;
- virtual void ClearAnimValue();
- virtual nsresult SetAnimValue(const nsSMILValue& aValue);
+ bool& aPreventCachingOfSandwich) const MOZ_OVERRIDE;
+ virtual nsSMILValue GetBaseValue() const MOZ_OVERRIDE;
+ virtual void ClearAnimValue() MOZ_OVERRIDE;
+ virtual nsresult SetAnimValue(const nsSMILValue& aValue) MOZ_OVERRIDE;
};
};
diff --git a/content/svg/content/src/nsSVGAnimatedTransformList.h b/content/svg/content/src/nsSVGAnimatedTransformList.h
index d3818e442ed..d1737e2317f 100644
--- a/content/svg/content/src/nsSVGAnimatedTransformList.h
+++ b/content/svg/content/src/nsSVGAnimatedTransformList.h
@@ -7,6 +7,7 @@
#ifndef MOZILLA_SVGANIMATEDTRANSFORMLIST_H__
#define MOZILLA_SVGANIMATEDTRANSFORMLIST_H__
+#include "mozilla/Attributes.h"
#include "nsAutoPtr.h"
#include "nsISMILAttr.h"
#include "SVGTransformList.h"
@@ -118,10 +119,10 @@ private:
virtual nsresult ValueFromString(const nsAString& aStr,
const dom::SVGAnimationElement* aSrcElement,
nsSMILValue& aValue,
- bool& aPreventCachingOfSandwich) const;
- virtual nsSMILValue GetBaseValue() const;
- virtual void ClearAnimValue();
- virtual nsresult SetAnimValue(const nsSMILValue& aValue);
+ bool& aPreventCachingOfSandwich) const MOZ_OVERRIDE;
+ virtual nsSMILValue GetBaseValue() const MOZ_OVERRIDE;
+ virtual void ClearAnimValue() MOZ_OVERRIDE;
+ virtual nsresult SetAnimValue(const nsSMILValue& aValue) MOZ_OVERRIDE;
protected:
static void ParseValue(const nsAString& aSpec,
diff --git a/content/svg/content/src/nsSVGBoolean.h b/content/svg/content/src/nsSVGBoolean.h
index 504a79ca0ea..7cb140dbbe3 100644
--- a/content/svg/content/src/nsSVGBoolean.h
+++ b/content/svg/content/src/nsSVGBoolean.h
@@ -73,10 +73,10 @@ public:
virtual nsresult ValueFromString(const nsAString& aStr,
const mozilla::dom::SVGAnimationElement* aSrcElement,
nsSMILValue& aValue,
- bool& aPreventCachingOfSandwich) const;
- virtual nsSMILValue GetBaseValue() const;
- virtual void ClearAnimValue();
- virtual nsresult SetAnimValue(const nsSMILValue& aValue);
+ bool& aPreventCachingOfSandwich) const MOZ_OVERRIDE;
+ virtual nsSMILValue GetBaseValue() const MOZ_OVERRIDE;
+ virtual void ClearAnimValue() MOZ_OVERRIDE;
+ virtual nsresult SetAnimValue(const nsSMILValue& aValue) MOZ_OVERRIDE;
};
};
#endif //__NS_SVGBOOLEAN_H__
diff --git a/content/svg/content/src/nsSVGClass.h b/content/svg/content/src/nsSVGClass.h
index 408c8d19421..91d0e31cb8f 100644
--- a/content/svg/content/src/nsSVGClass.h
+++ b/content/svg/content/src/nsSVGClass.h
@@ -66,12 +66,12 @@ public:
nsSVGClass* mVal; // kept alive because it belongs to content
nsRefPtr mSVGElement;
- NS_IMETHOD GetBaseVal(nsAString& aResult)
+ NS_IMETHOD GetBaseVal(nsAString& aResult) MOZ_OVERRIDE
{ mVal->GetBaseValue(aResult, mSVGElement); return NS_OK; }
- NS_IMETHOD SetBaseVal(const nsAString& aValue)
+ NS_IMETHOD SetBaseVal(const nsAString& aValue) MOZ_OVERRIDE
{ mVal->SetBaseValue(aValue, mSVGElement, true); return NS_OK; }
- NS_IMETHOD GetAnimVal(nsAString& aResult);
+ NS_IMETHOD GetAnimVal(nsAString& aResult) MOZ_OVERRIDE;
};
struct SMILString : public nsISMILAttr
{
@@ -89,10 +89,10 @@ public:
virtual nsresult ValueFromString(const nsAString& aStr,
const mozilla::dom::SVGAnimationElement *aSrcElement,
nsSMILValue& aValue,
- bool& aPreventCachingOfSandwich) const;
- virtual nsSMILValue GetBaseValue() const;
- virtual void ClearAnimValue();
- virtual nsresult SetAnimValue(const nsSMILValue& aValue);
+ bool& aPreventCachingOfSandwich) const MOZ_OVERRIDE;
+ virtual nsSMILValue GetBaseValue() const MOZ_OVERRIDE;
+ virtual void ClearAnimValue() MOZ_OVERRIDE;
+ virtual nsresult SetAnimValue(const nsSMILValue& aValue) MOZ_OVERRIDE;
};
};
#endif //__NS_SVGCLASS_H__
diff --git a/content/svg/content/src/nsSVGElement.h b/content/svg/content/src/nsSVGElement.h
index 60f07578797..f6ddcf9de17 100644
--- a/content/svg/content/src/nsSVGElement.h
+++ b/content/svg/content/src/nsSVGElement.h
@@ -11,6 +11,7 @@
It implements all the common DOM interfaces and handles attributes.
*/
+#include "mozilla/Attributes.h"
#include "mozilla/css/StyleRule.h"
#include "nsAutoPtr.h"
#include "nsChangeHint.h"
@@ -74,7 +75,7 @@ protected:
public:
- virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const MOZ_MUST_OVERRIDE;
+ virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const MOZ_MUST_OVERRIDE MOZ_OVERRIDE;
typedef mozilla::SVGNumberList SVGNumberList;
typedef mozilla::SVGAnimatedNumberList SVGAnimatedNumberList;
@@ -280,11 +281,11 @@ public:
return nullptr;
}
- virtual nsISMILAttr* GetAnimatedAttr(int32_t aNamespaceID, nsIAtom* aName);
+ virtual nsISMILAttr* GetAnimatedAttr(int32_t aNamespaceID, nsIAtom* aName) MOZ_OVERRIDE;
void AnimationNeedsResample();
void FlushAnimations();
- virtual void RecompileScriptEventListeners();
+ virtual void RecompileScriptEventListeners() MOZ_OVERRIDE;
void GetStringBaseValue(uint8_t aAttrEnum, nsAString& aResult) const;
void SetStringBaseValue(uint8_t aAttrEnum, const nsAString& aValue);
@@ -299,7 +300,7 @@ public:
return nullptr;
}
- virtual nsIDOMNode* AsDOMNode() MOZ_FINAL { return this; }
+ virtual nsIDOMNode* AsDOMNode() MOZ_FINAL MOZ_OVERRIDE { return this; }
virtual bool IsTransformable() { return false; }
// WebIDL
diff --git a/content/svg/content/src/nsSVGEnum.h b/content/svg/content/src/nsSVGEnum.h
index 3fb16ebc469..a7c369014a6 100644
--- a/content/svg/content/src/nsSVGEnum.h
+++ b/content/svg/content/src/nsSVGEnum.h
@@ -84,14 +84,14 @@ public:
nsSVGEnum *mVal; // kept alive because it belongs to content
nsRefPtr mSVGElement;
- NS_IMETHOD GetBaseVal(uint16_t* aResult)
+ NS_IMETHOD GetBaseVal(uint16_t* aResult) MOZ_OVERRIDE
{ *aResult = mVal->GetBaseValue(); return NS_OK; }
- NS_IMETHOD SetBaseVal(uint16_t aValue)
+ NS_IMETHOD SetBaseVal(uint16_t aValue) MOZ_OVERRIDE
{ return mVal->SetBaseValue(aValue, mSVGElement); }
// Script may have modified animation parameters or timeline -- DOM getters
// need to flush any resample requests to reflect these modifications.
- NS_IMETHOD GetAnimVal(uint16_t* aResult)
+ NS_IMETHOD GetAnimVal(uint16_t* aResult) MOZ_OVERRIDE
{
mSVGElement->FlushAnimations();
*aResult = mVal->GetAnimValue();
@@ -115,10 +115,10 @@ public:
virtual nsresult ValueFromString(const nsAString& aStr,
const mozilla::dom::SVGAnimationElement* aSrcElement,
nsSMILValue& aValue,
- bool& aPreventCachingOfSandwich) const;
- virtual nsSMILValue GetBaseValue() const;
- virtual void ClearAnimValue();
- virtual nsresult SetAnimValue(const nsSMILValue& aValue);
+ bool& aPreventCachingOfSandwich) const MOZ_OVERRIDE;
+ virtual nsSMILValue GetBaseValue() const MOZ_OVERRIDE;
+ virtual void ClearAnimValue() MOZ_OVERRIDE;
+ virtual nsresult SetAnimValue(const nsSMILValue& aValue) MOZ_OVERRIDE;
};
};
diff --git a/content/svg/content/src/nsSVGFilters.h b/content/svg/content/src/nsSVGFilters.h
index 235fc65dc74..03cf27ffc11 100644
--- a/content/svg/content/src/nsSVGFilters.h
+++ b/content/svg/content/src/nsSVGFilters.h
@@ -6,6 +6,7 @@
#ifndef __NS_SVGFILTERSELEMENT_H__
#define __NS_SVGFILTERSELEMENT_H__
+#include "mozilla/Attributes.h"
#include "gfxImageSurface.h"
#include "gfxRect.h"
#include "nsIFrame.h"
@@ -134,14 +135,14 @@ public:
NS_DECL_ISUPPORTS_INHERITED
// nsIContent interface
- NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const;
+ NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const MOZ_OVERRIDE;
// nsSVGElement interface
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE = 0;
- virtual bool HasValidDimensions() const;
+ virtual bool HasValidDimensions() const MOZ_OVERRIDE;
- bool IsNodeOfType(uint32_t aFlags) const
+ bool IsNodeOfType(uint32_t aFlags) const MOZ_OVERRIDE
{ return !(aFlags & ~(eCONTENT | eFILTER)); }
virtual nsSVGString& GetResultImageName() = 0;
diff --git a/content/svg/content/src/nsSVGInteger.h b/content/svg/content/src/nsSVGInteger.h
index 2fc44ae98e0..5fb8b6661a7 100644
--- a/content/svg/content/src/nsSVGInteger.h
+++ b/content/svg/content/src/nsSVGInteger.h
@@ -81,14 +81,14 @@ public:
nsSVGInteger* mVal; // kept alive because it belongs to content
nsRefPtr mSVGElement;
- NS_IMETHOD GetBaseVal(int32_t* aResult)
+ NS_IMETHOD GetBaseVal(int32_t* aResult) MOZ_OVERRIDE
{ *aResult = mVal->GetBaseValue(); return NS_OK; }
- NS_IMETHOD SetBaseVal(int32_t aValue)
+ NS_IMETHOD SetBaseVal(int32_t aValue) MOZ_OVERRIDE
{ mVal->SetBaseValue(aValue, mSVGElement); return NS_OK; }
// Script may have modified animation parameters or timeline -- DOM getters
// need to flush any resample requests to reflect these modifications.
- NS_IMETHOD GetAnimVal(int32_t* aResult)
+ NS_IMETHOD GetAnimVal(int32_t* aResult) MOZ_OVERRIDE
{
mSVGElement->FlushAnimations();
*aResult = mVal->GetAnimValue();
@@ -112,10 +112,10 @@ public:
virtual nsresult ValueFromString(const nsAString& aStr,
const mozilla::dom::SVGAnimationElement* aSrcElement,
nsSMILValue& aValue,
- bool& aPreventCachingOfSandwich) const;
- virtual nsSMILValue GetBaseValue() const;
- virtual void ClearAnimValue();
- virtual nsresult SetAnimValue(const nsSMILValue& aValue);
+ bool& aPreventCachingOfSandwich) const MOZ_OVERRIDE;
+ virtual nsSMILValue GetBaseValue() const MOZ_OVERRIDE;
+ virtual void ClearAnimValue() MOZ_OVERRIDE;
+ virtual nsresult SetAnimValue(const nsSMILValue& aValue) MOZ_OVERRIDE;
};
};
diff --git a/content/svg/content/src/nsSVGIntegerPair.h b/content/svg/content/src/nsSVGIntegerPair.h
index f78e1fdcd24..e4c7d5fae8a 100644
--- a/content/svg/content/src/nsSVGIntegerPair.h
+++ b/content/svg/content/src/nsSVGIntegerPair.h
@@ -90,9 +90,9 @@ public:
nsRefPtr mSVGElement;
PairIndex mIndex; // are we the first or second integer
- NS_IMETHOD GetBaseVal(int32_t* aResult)
+ NS_IMETHOD GetBaseVal(int32_t* aResult) MOZ_OVERRIDE
{ *aResult = mVal->GetBaseValue(mIndex); return NS_OK; }
- NS_IMETHOD SetBaseVal(int32_t aValue)
+ NS_IMETHOD SetBaseVal(int32_t aValue) MOZ_OVERRIDE
{
mVal->SetBaseValue(aValue, mIndex, mSVGElement);
return NS_OK;
@@ -100,7 +100,7 @@ public:
// Script may have modified animation parameters or timeline -- DOM getters
// need to flush any resample requests to reflect these modifications.
- NS_IMETHOD GetAnimVal(int32_t* aResult)
+ NS_IMETHOD GetAnimVal(int32_t* aResult) MOZ_OVERRIDE
{
mSVGElement->FlushAnimations();
*aResult = mVal->GetAnimValue(mIndex);
@@ -124,10 +124,10 @@ public:
virtual nsresult ValueFromString(const nsAString& aStr,
const mozilla::dom::SVGAnimationElement* aSrcElement,
nsSMILValue& aValue,
- bool& aPreventCachingOfSandwich) const;
- virtual nsSMILValue GetBaseValue() const;
- virtual void ClearAnimValue();
- virtual nsresult SetAnimValue(const nsSMILValue& aValue);
+ bool& aPreventCachingOfSandwich) const MOZ_OVERRIDE;
+ virtual nsSMILValue GetBaseValue() const MOZ_OVERRIDE;
+ virtual void ClearAnimValue() MOZ_OVERRIDE;
+ virtual nsresult SetAnimValue(const nsSMILValue& aValue) MOZ_OVERRIDE;
};
};
diff --git a/content/svg/content/src/nsSVGLength2.h b/content/svg/content/src/nsSVGLength2.h
index 11737fc3841..5c9f182da99 100644
--- a/content/svg/content/src/nsSVGLength2.h
+++ b/content/svg/content/src/nsSVGLength2.h
@@ -6,6 +6,7 @@
#ifndef __NS_SVGLENGTH2_H__
#define __NS_SVGLENGTH2_H__
+#include "mozilla/Attributes.h"
#include "nsAutoPtr.h"
#include "nsCoord.h"
#include "nsCycleCollectionParticipant.h"
@@ -150,12 +151,12 @@ public:
nsSVGLength2* mVal; // kept alive because it belongs to mSVGElement
nsRefPtr mSVGElement;
- NS_IMETHOD GetUnitType(uint16_t* aResult)
+ NS_IMETHOD GetUnitType(uint16_t* aResult) MOZ_OVERRIDE
{ *aResult = mVal->mSpecifiedUnitType; return NS_OK; }
- NS_IMETHOD GetValue(float* aResult)
+ NS_IMETHOD GetValue(float* aResult) MOZ_OVERRIDE
{ *aResult = mVal->GetBaseValue(mSVGElement); return NS_OK; }
- NS_IMETHOD SetValue(float aValue)
+ NS_IMETHOD SetValue(float aValue) MOZ_OVERRIDE
{
if (!NS_finite(aValue)) {
return NS_ERROR_ILLEGAL_VALUE;
@@ -164,9 +165,9 @@ public:
return NS_OK;
}
- NS_IMETHOD GetValueInSpecifiedUnits(float* aResult)
+ NS_IMETHOD GetValueInSpecifiedUnits(float* aResult) MOZ_OVERRIDE
{ *aResult = mVal->mBaseVal; return NS_OK; }
- NS_IMETHOD SetValueInSpecifiedUnits(float aValue)
+ NS_IMETHOD SetValueInSpecifiedUnits(float aValue) MOZ_OVERRIDE
{
if (!NS_finite(aValue)) {
return NS_ERROR_ILLEGAL_VALUE;
@@ -175,18 +176,18 @@ public:
return NS_OK;
}
- NS_IMETHOD SetValueAsString(const nsAString& aValue)
+ NS_IMETHOD SetValueAsString(const nsAString& aValue) MOZ_OVERRIDE
{ return mVal->SetBaseValueString(aValue, mSVGElement, true); }
- NS_IMETHOD GetValueAsString(nsAString& aValue)
+ NS_IMETHOD GetValueAsString(nsAString& aValue) MOZ_OVERRIDE
{ mVal->GetBaseValueString(aValue); return NS_OK; }
NS_IMETHOD NewValueSpecifiedUnits(uint16_t unitType,
- float valueInSpecifiedUnits)
+ float valueInSpecifiedUnits) MOZ_OVERRIDE
{
return mVal->NewValueSpecifiedUnits(unitType, valueInSpecifiedUnits,
mSVGElement); }
- NS_IMETHOD ConvertToSpecifiedUnits(uint16_t unitType)
+ NS_IMETHOD ConvertToSpecifiedUnits(uint16_t unitType) MOZ_OVERRIDE
{ return mVal->ConvertToSpecifiedUnits(unitType, mSVGElement); }
};
@@ -204,34 +205,34 @@ public:
// Script may have modified animation parameters or timeline -- DOM getters
// need to flush any resample requests to reflect these modifications.
- NS_IMETHOD GetUnitType(uint16_t* aResult)
+ NS_IMETHOD GetUnitType(uint16_t* aResult) MOZ_OVERRIDE
{
mSVGElement->FlushAnimations();
*aResult = mVal->mSpecifiedUnitType;
return NS_OK;
}
- NS_IMETHOD GetValue(float* aResult)
+ NS_IMETHOD GetValue(float* aResult) MOZ_OVERRIDE
{
mSVGElement->FlushAnimations();
*aResult = mVal->GetAnimValue(mSVGElement);
return NS_OK;
}
- NS_IMETHOD SetValue(float aValue)
+ NS_IMETHOD SetValue(float aValue) MOZ_OVERRIDE
{ return NS_ERROR_DOM_NO_MODIFICATION_ALLOWED_ERR; }
- NS_IMETHOD GetValueInSpecifiedUnits(float* aResult)
+ NS_IMETHOD GetValueInSpecifiedUnits(float* aResult) MOZ_OVERRIDE
{
mSVGElement->FlushAnimations();
*aResult = mVal->mAnimVal;
return NS_OK;
}
- NS_IMETHOD SetValueInSpecifiedUnits(float aValue)
+ NS_IMETHOD SetValueInSpecifiedUnits(float aValue) MOZ_OVERRIDE
{ return NS_ERROR_DOM_NO_MODIFICATION_ALLOWED_ERR; }
- NS_IMETHOD SetValueAsString(const nsAString& aValue)
+ NS_IMETHOD SetValueAsString(const nsAString& aValue) MOZ_OVERRIDE
{ return NS_ERROR_DOM_NO_MODIFICATION_ALLOWED_ERR; }
- NS_IMETHOD GetValueAsString(nsAString& aValue)
+ NS_IMETHOD GetValueAsString(nsAString& aValue) MOZ_OVERRIDE
{
mSVGElement->FlushAnimations();
mVal->GetAnimValueString(aValue);
@@ -239,10 +240,10 @@ public:
}
NS_IMETHOD NewValueSpecifiedUnits(uint16_t unitType,
- float valueInSpecifiedUnits)
+ float valueInSpecifiedUnits) MOZ_OVERRIDE
{ return NS_ERROR_DOM_NO_MODIFICATION_ALLOWED_ERR; }
- NS_IMETHOD ConvertToSpecifiedUnits(uint16_t unitType)
+ NS_IMETHOD ConvertToSpecifiedUnits(uint16_t unitType) MOZ_OVERRIDE
{ return NS_ERROR_DOM_NO_MODIFICATION_ALLOWED_ERR; }
};
@@ -262,10 +263,10 @@ public:
virtual nsresult ValueFromString(const nsAString& aStr,
const mozilla::dom::SVGAnimationElement* aSrcElement,
nsSMILValue &aValue,
- bool& aPreventCachingOfSandwich) const;
- virtual nsSMILValue GetBaseValue() const;
- virtual void ClearAnimValue();
- virtual nsresult SetAnimValue(const nsSMILValue& aValue);
+ bool& aPreventCachingOfSandwich) const MOZ_OVERRIDE;
+ virtual nsSMILValue GetBaseValue() const MOZ_OVERRIDE;
+ virtual void ClearAnimValue() MOZ_OVERRIDE;
+ virtual nsresult SetAnimValue(const nsSMILValue& aValue) MOZ_OVERRIDE;
};
};
diff --git a/content/svg/content/src/nsSVGNumber2.h b/content/svg/content/src/nsSVGNumber2.h
index 310479f5772..36494956f6a 100644
--- a/content/svg/content/src/nsSVGNumber2.h
+++ b/content/svg/content/src/nsSVGNumber2.h
@@ -81,9 +81,9 @@ public:
nsSVGNumber2* mVal; // kept alive because it belongs to content
nsRefPtr mSVGElement;
- NS_IMETHOD GetBaseVal(float* aResult)
+ NS_IMETHOD GetBaseVal(float* aResult) MOZ_OVERRIDE
{ *aResult = mVal->GetBaseValue(); return NS_OK; }
- NS_IMETHOD SetBaseVal(float aValue)
+ NS_IMETHOD SetBaseVal(float aValue) MOZ_OVERRIDE
{
if (!NS_finite(aValue)) {
return NS_ERROR_ILLEGAL_VALUE;
@@ -94,7 +94,7 @@ public:
// Script may have modified animation parameters or timeline -- DOM getters
// need to flush any resample requests to reflect these modifications.
- NS_IMETHOD GetAnimVal(float* aResult)
+ NS_IMETHOD GetAnimVal(float* aResult) MOZ_OVERRIDE
{
mSVGElement->FlushAnimations();
*aResult = mVal->GetAnimValue();
@@ -118,10 +118,10 @@ public:
virtual nsresult ValueFromString(const nsAString& aStr,
const mozilla::dom::SVGAnimationElement* aSrcElement,
nsSMILValue& aValue,
- bool& aPreventCachingOfSandwich) const;
- virtual nsSMILValue GetBaseValue() const;
- virtual void ClearAnimValue();
- virtual nsresult SetAnimValue(const nsSMILValue& aValue);
+ bool& aPreventCachingOfSandwich) const MOZ_OVERRIDE;
+ virtual nsSMILValue GetBaseValue() const MOZ_OVERRIDE;
+ virtual void ClearAnimValue() MOZ_OVERRIDE;
+ virtual nsresult SetAnimValue(const nsSMILValue& aValue) MOZ_OVERRIDE;
};
};
diff --git a/content/svg/content/src/nsSVGNumberPair.h b/content/svg/content/src/nsSVGNumberPair.h
index b1bd60edfc5..81be0df1400 100644
--- a/content/svg/content/src/nsSVGNumberPair.h
+++ b/content/svg/content/src/nsSVGNumberPair.h
@@ -91,9 +91,9 @@ public:
nsRefPtr mSVGElement;
PairIndex mIndex; // are we the first or second number
- NS_IMETHOD GetBaseVal(float* aResult)
+ NS_IMETHOD GetBaseVal(float* aResult) MOZ_OVERRIDE
{ *aResult = mVal->GetBaseValue(mIndex); return NS_OK; }
- NS_IMETHOD SetBaseVal(float aValue)
+ NS_IMETHOD SetBaseVal(float aValue) MOZ_OVERRIDE
{
if (!NS_finite(aValue)) {
return NS_ERROR_ILLEGAL_VALUE;
@@ -104,7 +104,7 @@ public:
// Script may have modified animation parameters or timeline -- DOM getters
// need to flush any resample requests to reflect these modifications.
- NS_IMETHOD GetAnimVal(float* aResult)
+ NS_IMETHOD GetAnimVal(float* aResult) MOZ_OVERRIDE
{
mSVGElement->FlushAnimations();
*aResult = mVal->GetAnimValue(mIndex);
@@ -128,10 +128,10 @@ public:
virtual nsresult ValueFromString(const nsAString& aStr,
const mozilla::dom::SVGAnimationElement* aSrcElement,
nsSMILValue& aValue,
- bool& aPreventCachingOfSandwich) const;
- virtual nsSMILValue GetBaseValue() const;
- virtual void ClearAnimValue();
- virtual nsresult SetAnimValue(const nsSMILValue& aValue);
+ bool& aPreventCachingOfSandwich) const MOZ_OVERRIDE;
+ virtual nsSMILValue GetBaseValue() const MOZ_OVERRIDE;
+ virtual void ClearAnimValue() MOZ_OVERRIDE;
+ virtual nsresult SetAnimValue(const nsSMILValue& aValue) MOZ_OVERRIDE;
};
};
diff --git a/content/svg/content/src/nsSVGPathDataParser.h b/content/svg/content/src/nsSVGPathDataParser.h
index d334e9958a0..3e8363ce328 100644
--- a/content/svg/content/src/nsSVGPathDataParser.h
+++ b/content/svg/content/src/nsSVGPathDataParser.h
@@ -6,6 +6,7 @@
#ifndef __NS_SVGPATHDATAPARSER_H__
#define __NS_SVGPATHDATAPARSER_H__
+#include "mozilla/Attributes.h"
#include "gfxPoint.h"
#include "nsSVGDataParser.h"
@@ -38,7 +39,7 @@ protected:
virtual nsresult StoreEllipticalArc(bool absCoords, float x, float y,
float r1, float r2, float angle,
bool largeArcFlag, bool sweepFlag) = 0;
- virtual nsresult Match();
+ virtual nsresult Match() MOZ_OVERRIDE;
nsresult MatchCoordPair(float* aX, float* aY);
bool IsTokenCoordPairStarter();
@@ -133,22 +134,22 @@ public:
nsresult Parse(const nsAString &aValue);
protected:
- virtual nsresult StoreMoveTo(bool absCoords, float x, float y);
- virtual nsresult StoreClosePath();
- virtual nsresult StoreLineTo(bool absCoords, float x, float y);
- virtual nsresult StoreHLineTo(bool absCoords, float x);
- virtual nsresult StoreVLineTo(bool absCoords, float y);
+ virtual nsresult StoreMoveTo(bool absCoords, float x, float y) MOZ_OVERRIDE;
+ virtual nsresult StoreClosePath() MOZ_OVERRIDE;
+ virtual nsresult StoreLineTo(bool absCoords, float x, float y) MOZ_OVERRIDE;
+ virtual nsresult StoreHLineTo(bool absCoords, float x) MOZ_OVERRIDE;
+ virtual nsresult StoreVLineTo(bool absCoords, float y) MOZ_OVERRIDE;
virtual nsresult StoreCurveTo(bool absCoords, float x, float y,
- float x1, float y1, float x2, float y2);
+ float x1, float y1, float x2, float y2) MOZ_OVERRIDE;
virtual nsresult StoreSmoothCurveTo(bool absCoords, float x, float y,
- float x2, float y2);
+ float x2, float y2) MOZ_OVERRIDE;
virtual nsresult StoreQuadCurveTo(bool absCoords, float x, float y,
- float x1, float y1);
+ float x1, float y1) MOZ_OVERRIDE;
virtual nsresult StoreSmoothQuadCurveTo(bool absCoords,
- float x, float y);
+ float x, float y) MOZ_OVERRIDE;
virtual nsresult StoreEllipticalArc(bool absCoords, float x, float y,
float r1, float r2, float angle,
- bool largeArcFlag, bool sweepFlag);
+ bool largeArcFlag, bool sweepFlag) MOZ_OVERRIDE;
private:
mozilla::SVGPathData *mPathSegList;
diff --git a/content/svg/content/src/nsSVGPolyElement.h b/content/svg/content/src/nsSVGPolyElement.h
index c1af280d3df..baee9063d14 100644
--- a/content/svg/content/src/nsSVGPolyElement.h
+++ b/content/svg/content/src/nsSVGPolyElement.h
@@ -6,6 +6,7 @@
#ifndef NS_SVGPOLYELEMENT_H_
#define NS_SVGPOLYELEMENT_H_
+#include "mozilla/Attributes.h"
#include "nsSVGPathGeometryElement.h"
#include "SVGAnimatedPointList.h"
@@ -38,10 +39,10 @@ public:
}
// nsSVGPathGeometryElement methods:
- virtual bool AttributeDefinesGeometry(const nsIAtom *aName);
- virtual bool IsMarkable() { return true; }
- virtual void GetMarkPoints(nsTArray *aMarks);
- virtual void ConstructPath(gfxContext *aCtx);
+ virtual bool AttributeDefinesGeometry(const nsIAtom *aName) MOZ_OVERRIDE;
+ virtual bool IsMarkable() MOZ_OVERRIDE { return true; }
+ virtual void GetMarkPoints(nsTArray *aMarks) MOZ_OVERRIDE;
+ virtual void ConstructPath(gfxContext *aCtx) MOZ_OVERRIDE;
// WebIDL
already_AddRefed Points();
diff --git a/content/svg/content/src/nsSVGString.h b/content/svg/content/src/nsSVGString.h
index 849ecb4acfc..f5feabca031 100644
--- a/content/svg/content/src/nsSVGString.h
+++ b/content/svg/content/src/nsSVGString.h
@@ -65,12 +65,12 @@ public:
nsSVGString* mVal; // kept alive because it belongs to content
nsRefPtr mSVGElement;
- NS_IMETHOD GetBaseVal(nsAString & aResult)
+ NS_IMETHOD GetBaseVal(nsAString & aResult) MOZ_OVERRIDE
{ mVal->GetBaseValue(aResult, mSVGElement); return NS_OK; }
- NS_IMETHOD SetBaseVal(const nsAString & aValue)
+ NS_IMETHOD SetBaseVal(const nsAString & aValue) MOZ_OVERRIDE
{ mVal->SetBaseValue(aValue, mSVGElement, true); return NS_OK; }
- NS_IMETHOD GetAnimVal(nsAString & aResult)
+ NS_IMETHOD GetAnimVal(nsAString & aResult) MOZ_OVERRIDE
{
mSVGElement->FlushAnimations();
mVal->GetAnimValue(aResult, mSVGElement); return NS_OK;
@@ -93,10 +93,10 @@ public:
virtual nsresult ValueFromString(const nsAString& aStr,
const mozilla::dom::SVGAnimationElement *aSrcElement,
nsSMILValue& aValue,
- bool& aPreventCachingOfSandwich) const;
- virtual nsSMILValue GetBaseValue() const;
- virtual void ClearAnimValue();
- virtual nsresult SetAnimValue(const nsSMILValue& aValue);
+ bool& aPreventCachingOfSandwich) const MOZ_OVERRIDE;
+ virtual nsSMILValue GetBaseValue() const MOZ_OVERRIDE;
+ virtual void ClearAnimValue() MOZ_OVERRIDE;
+ virtual nsresult SetAnimValue(const nsSMILValue& aValue) MOZ_OVERRIDE;
};
};
#endif //__NS_SVGSTRING_H__
diff --git a/content/svg/content/src/nsSVGViewBox.h b/content/svg/content/src/nsSVGViewBox.h
index 6ddc6dd822c..ed44090821f 100644
--- a/content/svg/content/src/nsSVGViewBox.h
+++ b/content/svg/content/src/nsSVGViewBox.h
@@ -134,12 +134,12 @@ public:
return mVal->GetBaseValue().height;
}
- void SetX(float aX, mozilla::ErrorResult& aRv) MOZ_FINAL;
- void SetY(float aY, mozilla::ErrorResult& aRv) MOZ_FINAL;
- void SetWidth(float aWidth, mozilla::ErrorResult& aRv) MOZ_FINAL;
- void SetHeight(float aHeight, mozilla::ErrorResult& aRv) MOZ_FINAL;
+ void SetX(float aX, mozilla::ErrorResult& aRv) MOZ_FINAL MOZ_OVERRIDE;
+ void SetY(float aY, mozilla::ErrorResult& aRv) MOZ_FINAL MOZ_OVERRIDE;
+ void SetWidth(float aWidth, mozilla::ErrorResult& aRv) MOZ_FINAL MOZ_OVERRIDE;
+ void SetHeight(float aHeight, mozilla::ErrorResult& aRv) MOZ_FINAL MOZ_OVERRIDE;
- virtual nsIContent* GetParentObject() const
+ virtual nsIContent* GetParentObject() const MOZ_OVERRIDE
{
return mSVGElement;
}
@@ -186,27 +186,27 @@ public:
return mVal->GetAnimValue().height;
}
- void SetX(float aX, mozilla::ErrorResult& aRv) MOZ_FINAL
+ void SetX(float aX, mozilla::ErrorResult& aRv) MOZ_FINAL MOZ_OVERRIDE
{
aRv.Throw(NS_ERROR_DOM_NO_MODIFICATION_ALLOWED_ERR);
}
- void SetY(float aY, mozilla::ErrorResult& aRv) MOZ_FINAL
+ void SetY(float aY, mozilla::ErrorResult& aRv) MOZ_FINAL MOZ_OVERRIDE
{
aRv.Throw(NS_ERROR_DOM_NO_MODIFICATION_ALLOWED_ERR);
}
- void SetWidth(float aWidth, mozilla::ErrorResult& aRv) MOZ_FINAL
+ void SetWidth(float aWidth, mozilla::ErrorResult& aRv) MOZ_FINAL MOZ_OVERRIDE
{
aRv.Throw(NS_ERROR_DOM_NO_MODIFICATION_ALLOWED_ERR);
}
- void SetHeight(float aHeight, mozilla::ErrorResult& aRv) MOZ_FINAL
+ void SetHeight(float aHeight, mozilla::ErrorResult& aRv) MOZ_FINAL MOZ_OVERRIDE
{
aRv.Throw(NS_ERROR_DOM_NO_MODIFICATION_ALLOWED_ERR);
}
- virtual nsIContent* GetParentObject() const
+ virtual nsIContent* GetParentObject() const MOZ_OVERRIDE
{
return mSVGElement;
}
@@ -228,10 +228,10 @@ public:
virtual nsresult ValueFromString(const nsAString& aStr,
const mozilla::dom::SVGAnimationElement* aSrcElement,
nsSMILValue& aValue,
- bool& aPreventCachingOfSandwich) const;
- virtual nsSMILValue GetBaseValue() const;
- virtual void ClearAnimValue();
- virtual nsresult SetAnimValue(const nsSMILValue& aValue);
+ bool& aPreventCachingOfSandwich) const MOZ_OVERRIDE;
+ virtual nsSMILValue GetBaseValue() const MOZ_OVERRIDE;
+ virtual void ClearAnimValue() MOZ_OVERRIDE;
+ virtual nsresult SetAnimValue(const nsSMILValue& aValue) MOZ_OVERRIDE;
};
static nsSVGAttrTearoffTable
diff --git a/content/svg/document/src/SVGDocument.h b/content/svg/document/src/SVGDocument.h
index 6b71bb91acc..6e02cbeb577 100644
--- a/content/svg/document/src/SVGDocument.h
+++ b/content/svg/document/src/SVGDocument.h
@@ -6,6 +6,7 @@
#ifndef mozilla_dom_SVGDocument_h
#define mozilla_dom_SVGDocument_h
+#include "mozilla/Attributes.h"
#include "mozilla/dom/XMLDocument.h"
#include "nsIDOMSVGDocument.h"
@@ -36,7 +37,7 @@ public:
NS_FORWARD_NSIDOMNODE_TO_NSINODE
NS_DECL_ISUPPORTS_INHERITED
- virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
+ virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
// WebIDL API
void GetDomain(nsAString& aDomain, ErrorResult& aRv);
diff --git a/content/xbl/src/nsXBLContentSink.h b/content/xbl/src/nsXBLContentSink.h
index 8b06ddfefcc..75cd6dd851d 100644
--- a/content/xbl/src/nsXBLContentSink.h
+++ b/content/xbl/src/nsXBLContentSink.h
@@ -6,6 +6,7 @@
#ifndef nsXBLContentSink_h__
#define nsXBLContentSink_h__
+#include "mozilla/Attributes.h"
#include "nsXMLContentSink.h"
#include "nsXBLDocumentInfo.h"
#include "nsXBLPrototypeHandler.h"
@@ -69,32 +70,32 @@ public:
const PRUnichar **aAtts,
uint32_t aAttsCount,
int32_t aIndex,
- uint32_t aLineNumber);
+ uint32_t aLineNumber) MOZ_OVERRIDE;
- NS_IMETHOD HandleEndElement(const PRUnichar *aName);
+ NS_IMETHOD HandleEndElement(const PRUnichar *aName) MOZ_OVERRIDE;
NS_IMETHOD HandleCDataSection(const PRUnichar *aData,
- uint32_t aLength);
+ uint32_t aLength) MOZ_OVERRIDE;
protected:
// nsXMLContentSink overrides
- virtual void MaybeStartLayout(bool aIgnorePendingSheets);
+ virtual void MaybeStartLayout(bool aIgnorePendingSheets) MOZ_OVERRIDE;
bool OnOpenContainer(const PRUnichar **aAtts,
uint32_t aAttsCount,
int32_t aNameSpaceID,
nsIAtom* aTagName,
- uint32_t aLineNumber);
+ uint32_t aLineNumber) MOZ_OVERRIDE;
- bool NotifyForDocElement() { return false; }
+ bool NotifyForDocElement() MOZ_OVERRIDE { return false; }
nsresult CreateElement(const PRUnichar** aAtts, uint32_t aAttsCount,
nsINodeInfo* aNodeInfo, uint32_t aLineNumber,
nsIContent** aResult, bool* aAppendContent,
- mozilla::dom::FromParser aFromParser);
+ mozilla::dom::FromParser aFromParser) MOZ_OVERRIDE;
nsresult AddAttributes(const PRUnichar** aAtts,
- nsIContent* aContent);
+ nsIContent* aContent) MOZ_OVERRIDE;
#ifdef MOZ_XUL
nsresult AddAttributesToXULPrototype(const PRUnichar **aAtts,
@@ -114,13 +115,13 @@ protected:
// nsXMLContentSink overrides
- nsresult FlushText(bool aReleaseTextNode = true);
+ nsresult FlushText(bool aReleaseTextNode = true) MOZ_OVERRIDE;
// nsIExpatSink overrides
NS_IMETHOD ReportError(const PRUnichar* aErrorText,
const PRUnichar* aSourceText,
nsIScriptError *aError,
- bool *_retval);
+ bool *_retval) MOZ_OVERRIDE;
protected:
nsresult ReportUnexpectedElement(nsIAtom* aElementName, uint32_t aLineNumber);
diff --git a/content/xbl/src/nsXBLDocumentInfo.h b/content/xbl/src/nsXBLDocumentInfo.h
index f3bc35b3e2f..1f3507bff83 100644
--- a/content/xbl/src/nsXBLDocumentInfo.h
+++ b/content/xbl/src/nsXBLDocumentInfo.h
@@ -5,6 +5,7 @@
#ifndef nsXBLDocumentInfo_h__
#define nsXBLDocumentInfo_h__
+#include "mozilla/Attributes.h"
#include "nsCOMPtr.h"
#include "nsAutoPtr.h"
#include "nsIScriptGlobalObjectOwner.h"
@@ -48,7 +49,7 @@ public:
bool IsChrome() { return mIsChrome; }
// nsIScriptGlobalObjectOwner methods
- virtual nsIScriptGlobalObject* GetScriptGlobalObject();
+ virtual nsIScriptGlobalObject* GetScriptGlobalObject() MOZ_OVERRIDE;
void MarkInCCGeneration(uint32_t aGeneration);
diff --git a/content/xbl/src/nsXBLEventHandler.h b/content/xbl/src/nsXBLEventHandler.h
index 3f8d1cec744..83671b04737 100644
--- a/content/xbl/src/nsXBLEventHandler.h
+++ b/content/xbl/src/nsXBLEventHandler.h
@@ -6,6 +6,7 @@
#ifndef nsXBLEventHandler_h__
#define nsXBLEventHandler_h__
+#include "mozilla/Attributes.h"
#include "nsCOMPtr.h"
#include "nsIDOMEventListener.h"
#include "nsTArray.h"
@@ -42,7 +43,7 @@ public:
virtual ~nsXBLMouseEventHandler();
private:
- bool EventMatched(nsIDOMEvent* aEvent);
+ bool EventMatched(nsIDOMEvent* aEvent) MOZ_OVERRIDE;
};
class nsXBLKeyEventHandler : public nsIDOMEventListener
diff --git a/content/xbl/src/nsXBLProtoImplMethod.h b/content/xbl/src/nsXBLProtoImplMethod.h
index 59e745bd211..d2cde87bb64 100644
--- a/content/xbl/src/nsXBLProtoImplMethod.h
+++ b/content/xbl/src/nsXBLProtoImplMethod.h
@@ -6,6 +6,7 @@
#ifndef nsXBLProtoImplMethod_h__
#define nsXBLProtoImplMethod_h__
+#include "mozilla/Attributes.h"
#include "nsIAtom.h"
#include "nsString.h"
#include "jsapi.h"
@@ -89,15 +90,15 @@ public:
void SetLineNumber(uint32_t aLineNumber);
virtual nsresult InstallMember(JSContext* aCx,
- JS::Handle aTargetClassObject);
+ JS::Handle aTargetClassObject) MOZ_OVERRIDE;
virtual nsresult CompileMember(nsIScriptContext* aContext,
const nsCString& aClassStr,
- JS::Handle aClassObject);
+ JS::Handle aClassObject) MOZ_OVERRIDE;
- virtual void Trace(const TraceCallbacks& aCallbacks, void *aClosure);
+ virtual void Trace(const TraceCallbacks& aCallbacks, void *aClosure) MOZ_OVERRIDE;
nsresult Read(nsIScriptContext* aContext, nsIObjectInputStream* aStream);
- virtual nsresult Write(nsIScriptContext* aContext, nsIObjectOutputStream* aStream);
+ virtual nsresult Write(nsIScriptContext* aContext, nsIObjectOutputStream* aStream) MOZ_OVERRIDE;
bool IsCompiled() const
{
@@ -138,7 +139,7 @@ public:
// binding instantiations (though they may hang out in mMembers on the
// prototype implementation).
virtual nsresult InstallMember(JSContext* aCx,
- JS::Handle aTargetClassObject) {
+ JS::Handle aTargetClassObject) MOZ_OVERRIDE {
return NS_OK;
}
diff --git a/content/xbl/src/nsXBLProtoImplProperty.h b/content/xbl/src/nsXBLProtoImplProperty.h
index 087b2d1cddb..7d6ec03d961 100644
--- a/content/xbl/src/nsXBLProtoImplProperty.h
+++ b/content/xbl/src/nsXBLProtoImplProperty.h
@@ -6,6 +6,7 @@
#ifndef nsXBLProtoImplProperty_h__
#define nsXBLProtoImplProperty_h__
+#include "mozilla/Attributes.h"
#include "nsIAtom.h"
#include "nsString.h"
#include "jsapi.h"
@@ -33,18 +34,18 @@ public:
void SetSetterLineNumber(uint32_t aLineNumber);
virtual nsresult InstallMember(JSContext* aCx,
- JS::Handle aTargetClassObject);
+ JS::Handle aTargetClassObject) MOZ_OVERRIDE;
virtual nsresult CompileMember(nsIScriptContext* aContext,
const nsCString& aClassStr,
- JS::Handle aClassObject);
+ JS::Handle aClassObject) MOZ_OVERRIDE;
- virtual void Trace(const TraceCallbacks& aCallback, void *aClosure);
+ virtual void Trace(const TraceCallbacks& aCallback, void *aClosure) MOZ_OVERRIDE;
nsresult Read(nsIScriptContext* aContext,
nsIObjectInputStream* aStream,
XBLBindingSerializeDetails aType);
virtual nsresult Write(nsIScriptContext* aContext,
- nsIObjectOutputStream* aStream);
+ nsIObjectOutputStream* aStream) MOZ_OVERRIDE;
protected:
union {
diff --git a/content/xbl/src/nsXBLResourceLoader.h b/content/xbl/src/nsXBLResourceLoader.h
index 05098d8c914..d1af534f428 100644
--- a/content/xbl/src/nsXBLResourceLoader.h
+++ b/content/xbl/src/nsXBLResourceLoader.h
@@ -3,6 +3,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+#include "mozilla/Attributes.h"
#include "nsCOMPtr.h"
#include "nsICSSLoaderObserver.h"
#include "nsCOMArray.h"
@@ -27,7 +28,7 @@ public:
// nsICSSLoaderObserver
NS_IMETHOD StyleSheetLoaded(nsCSSStyleSheet* aSheet, bool aWasAlternate,
- nsresult aStatus);
+ nsresult aStatus) MOZ_OVERRIDE;
void LoadResources(bool* aResult);
void AddResource(nsIAtom* aResourceType, const nsAString& aSrc);
diff --git a/content/xml/content/src/CDATASection.h b/content/xml/content/src/CDATASection.h
index ab789040032..6d6ab82a2b1 100644
--- a/content/xml/content/src/CDATASection.h
+++ b/content/xml/content/src/CDATASection.h
@@ -6,6 +6,7 @@
#ifndef mozilla_dom_CDATASection_h
#define mozilla_dom_CDATASection_h
+#include "mozilla/Attributes.h"
#include "nsIDOMCDATASection.h"
#include "mozilla/dom/Text.h"
@@ -59,12 +60,12 @@ public:
virtual bool IsNodeOfType(uint32_t aFlags) const;
virtual nsGenericDOMDataNode* CloneDataNode(nsINodeInfo *aNodeInfo,
- bool aCloneText) const;
+ bool aCloneText) const MOZ_OVERRIDE;
- virtual nsIDOMNode* AsDOMNode() { return this; }
+ virtual nsIDOMNode* AsDOMNode() MOZ_OVERRIDE { return this; }
#ifdef DEBUG
- virtual void List(FILE* out, int32_t aIndent) const;
- virtual void DumpContent(FILE* out, int32_t aIndent,bool aDumpAll) const;
+ virtual void List(FILE* out, int32_t aIndent) const MOZ_OVERRIDE;
+ virtual void DumpContent(FILE* out, int32_t aIndent,bool aDumpAll) const MOZ_OVERRIDE;
#endif
protected:
diff --git a/content/xml/content/src/ProcessingInstruction.h b/content/xml/content/src/ProcessingInstruction.h
index 1ca1e120eb7..04fc8d383df 100644
--- a/content/xml/content/src/ProcessingInstruction.h
+++ b/content/xml/content/src/ProcessingInstruction.h
@@ -6,6 +6,7 @@
#ifndef mozilla_dom_ProcessingInstruction_h
#define mozilla_dom_ProcessingInstruction_h
+#include "mozilla/Attributes.h"
#include "nsIDOMProcessingInstruction.h"
#include "nsGenericDOMDataNode.h"
#include "nsAString.h"
@@ -37,14 +38,14 @@ public:
virtual bool IsNodeOfType(uint32_t aFlags) const;
virtual nsGenericDOMDataNode* CloneDataNode(nsINodeInfo *aNodeInfo,
- bool aCloneText) const;
+ bool aCloneText) const MOZ_OVERRIDE;
#ifdef DEBUG
- virtual void List(FILE* out, int32_t aIndent) const;
- virtual void DumpContent(FILE* out, int32_t aIndent, bool aDumpAll) const;
+ virtual void List(FILE* out, int32_t aIndent) const MOZ_OVERRIDE;
+ virtual void DumpContent(FILE* out, int32_t aIndent, bool aDumpAll) const MOZ_OVERRIDE;
#endif
- virtual nsIDOMNode* AsDOMNode() { return this; }
+ virtual nsIDOMNode* AsDOMNode() MOZ_OVERRIDE { return this; }
// WebIDL API
void GetTarget(nsString& aTarget)
diff --git a/content/xml/content/src/XMLStylesheetProcessingInstruction.h b/content/xml/content/src/XMLStylesheetProcessingInstruction.h
index 05e832fb124..42c675c7b9b 100644
--- a/content/xml/content/src/XMLStylesheetProcessingInstruction.h
+++ b/content/xml/content/src/XMLStylesheetProcessingInstruction.h
@@ -6,6 +6,7 @@
#ifndef mozilla_dom_XMLStylesheetProcessingInstruction_h
#define mozilla_dom_XMLStylesheetProcessingInstruction_h
+#include "mozilla/Attributes.h"
#include "mozilla/dom/ProcessingInstruction.h"
#include "nsStyleLinkElement.h"
@@ -46,32 +47,32 @@ public:
// nsIDOMNode
virtual void SetNodeValueInternal(const nsAString& aNodeValue,
- mozilla::ErrorResult& aError);
+ mozilla::ErrorResult& aError) MOZ_OVERRIDE;
// nsIContent
virtual nsresult BindToTree(nsIDocument* aDocument, nsIContent* aParent,
nsIContent* aBindingParent,
- bool aCompileEventHandlers);
+ bool aCompileEventHandlers) MOZ_OVERRIDE;
virtual void UnbindFromTree(bool aDeep = true,
- bool aNullParent = true);
+ bool aNullParent = true) MOZ_OVERRIDE;
// nsIStyleSheetLinkingElement
- virtual void OverrideBaseURI(nsIURI* aNewBaseURI);
+ virtual void OverrideBaseURI(nsIURI* aNewBaseURI) MOZ_OVERRIDE;
// nsStyleLinkElement
- NS_IMETHOD GetCharset(nsAString& aCharset);
+ NS_IMETHOD GetCharset(nsAString& aCharset) MOZ_OVERRIDE;
protected:
nsCOMPtr mOverriddenBaseURI;
- already_AddRefed GetStyleSheetURL(bool* aIsInline);
+ already_AddRefed GetStyleSheetURL(bool* aIsInline) MOZ_OVERRIDE;
void GetStyleSheetInfo(nsAString& aTitle,
nsAString& aType,
nsAString& aMedia,
bool* aIsScoped,
- bool* aIsAlternate);
+ bool* aIsAlternate) MOZ_OVERRIDE;
virtual nsGenericDOMDataNode* CloneDataNode(nsINodeInfo *aNodeInfo,
- bool aCloneText) const;
+ bool aCloneText) const MOZ_OVERRIDE;
};
} // namespace dom
diff --git a/content/xml/content/src/nsXMLElement.h b/content/xml/content/src/nsXMLElement.h
index b91174725ee..352aa2dae73 100644
--- a/content/xml/content/src/nsXMLElement.h
+++ b/content/xml/content/src/nsXMLElement.h
@@ -6,6 +6,7 @@
#ifndef nsXMLElement_h___
#define nsXMLElement_h___
+#include "mozilla/Attributes.h"
#include "nsIDOMElement.h"
#include "mozilla/dom/Element.h"
@@ -29,28 +30,28 @@ public:
NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
// nsINode interface methods
- virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
+ virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
- virtual nsXPCClassInfo* GetClassInfo();
+ virtual nsXPCClassInfo* GetClassInfo() MOZ_OVERRIDE;
- virtual nsIDOMNode* AsDOMNode() { return this; }
+ virtual nsIDOMNode* AsDOMNode() MOZ_OVERRIDE { return this; }
// nsIContent interface methods
- virtual nsIAtom *GetIDAttributeName() const;
- virtual nsIAtom* DoGetID() const;
+ virtual nsIAtom *GetIDAttributeName() const MOZ_OVERRIDE;
+ virtual nsIAtom* DoGetID() const MOZ_OVERRIDE;
virtual nsresult BindToTree(nsIDocument* aDocument, nsIContent* aParent,
nsIContent* aBindingParent,
- bool aCompileEventHandlers);
- virtual void UnbindFromTree(bool aDeep, bool aNullParent);
+ bool aCompileEventHandlers) MOZ_OVERRIDE;
+ virtual void UnbindFromTree(bool aDeep, bool aNullParent) MOZ_OVERRIDE;
virtual nsresult UnsetAttr(int32_t aNameSpaceID, nsIAtom* aAttribute,
- bool aNotify);
+ bool aNotify) MOZ_OVERRIDE;
virtual bool ParseAttribute(int32_t aNamespaceID,
nsIAtom* aAttribute,
const nsAString& aValue,
- nsAttrValue& aResult);
+ nsAttrValue& aResult) MOZ_OVERRIDE;
// Element overrides
- virtual void NodeInfoChanged(nsINodeInfo* aOldNodeInfo);
+ virtual void NodeInfoChanged(nsINodeInfo* aOldNodeInfo) MOZ_OVERRIDE;
protected:
virtual JSObject* WrapNode(JSContext *aCx,
diff --git a/content/xml/document/src/XMLDocument.h b/content/xml/document/src/XMLDocument.h
index b4683e15eba..e58c10c38e4 100644
--- a/content/xml/document/src/XMLDocument.h
+++ b/content/xml/document/src/XMLDocument.h
@@ -6,6 +6,7 @@
#ifndef mozilla_dom_XMLDocument_h
#define mozilla_dom_XMLDocument_h
+#include "mozilla/Attributes.h"
#include "nsDocument.h"
#include "nsIDOMXMLDocument.h"
#include "nsIScriptContext.h"
@@ -26,27 +27,27 @@ public:
NS_DECL_ISUPPORTS_INHERITED
- virtual void Reset(nsIChannel* aChannel, nsILoadGroup* aLoadGroup);
+ virtual void Reset(nsIChannel* aChannel, nsILoadGroup* aLoadGroup) MOZ_OVERRIDE;
virtual void ResetToURI(nsIURI *aURI, nsILoadGroup *aLoadGroup,
- nsIPrincipal* aPrincipal);
+ nsIPrincipal* aPrincipal) MOZ_OVERRIDE;
virtual nsresult StartDocumentLoad(const char* aCommand, nsIChannel* channel,
nsILoadGroup* aLoadGroup,
nsISupports* aContainer,
nsIStreamListener **aDocListener,
bool aReset = true,
- nsIContentSink* aSink = nullptr);
+ nsIContentSink* aSink = nullptr) MOZ_OVERRIDE;
- virtual void EndLoad();
+ virtual void EndLoad() MOZ_OVERRIDE;
// nsIDOMXMLDocument
NS_DECL_NSIDOMXMLDOCUMENT
- virtual nsresult Init();
+ virtual nsresult Init() MOZ_OVERRIDE;
- virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
+ virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
- virtual void DocSizeOfExcludingThis(nsWindowSizes* aWindowSizes) const;
+ virtual void DocSizeOfExcludingThis(nsWindowSizes* aWindowSizes) const MOZ_OVERRIDE;
// DocSizeOfIncludingThis is inherited from nsIDocument.
diff --git a/content/xml/document/src/nsXMLContentSink.h b/content/xml/document/src/nsXMLContentSink.h
index 140fb66be03..3b26f42e84b 100644
--- a/content/xml/document/src/nsXMLContentSink.h
+++ b/content/xml/document/src/nsXMLContentSink.h
@@ -6,6 +6,7 @@
#ifndef nsXMLContentSink_h__
#define nsXMLContentSink_h__
+#include "mozilla/Attributes.h"
#include "nsContentSink.h"
#include "nsIXMLContentSink.h"
#include "nsIExpatSink.h"
@@ -60,25 +61,25 @@ public:
NS_DECL_NSIEXPATSINK
// nsIContentSink
- NS_IMETHOD WillParse(void);
- NS_IMETHOD WillBuildModel(nsDTDMode aDTDMode);
- NS_IMETHOD DidBuildModel(bool aTerminated);
- NS_IMETHOD WillInterrupt(void);
- NS_IMETHOD WillResume(void);
- NS_IMETHOD SetParser(nsParserBase* aParser);
- virtual void FlushPendingNotifications(mozFlushType aType);
- NS_IMETHOD SetDocumentCharset(nsACString& aCharset);
- virtual nsISupports *GetTarget();
- virtual bool IsScriptExecuting();
- virtual void ContinueInterruptedParsingAsync();
+ NS_IMETHOD WillParse(void) MOZ_OVERRIDE;
+ NS_IMETHOD WillBuildModel(nsDTDMode aDTDMode) MOZ_OVERRIDE;
+ NS_IMETHOD DidBuildModel(bool aTerminated) MOZ_OVERRIDE;
+ NS_IMETHOD WillInterrupt(void) MOZ_OVERRIDE;
+ NS_IMETHOD WillResume(void) MOZ_OVERRIDE;
+ NS_IMETHOD SetParser(nsParserBase* aParser) MOZ_OVERRIDE;
+ virtual void FlushPendingNotifications(mozFlushType aType) MOZ_OVERRIDE;
+ NS_IMETHOD SetDocumentCharset(nsACString& aCharset) MOZ_OVERRIDE;
+ virtual nsISupports *GetTarget() MOZ_OVERRIDE;
+ virtual bool IsScriptExecuting() MOZ_OVERRIDE;
+ virtual void ContinueInterruptedParsingAsync() MOZ_OVERRIDE;
// nsITransformObserver
- NS_IMETHOD OnDocumentCreated(nsIDocument *aResultDocument);
- NS_IMETHOD OnTransformDone(nsresult aResult, nsIDocument *aResultDocument);
+ NS_IMETHOD OnDocumentCreated(nsIDocument *aResultDocument) MOZ_OVERRIDE;
+ NS_IMETHOD OnTransformDone(nsresult aResult, nsIDocument *aResultDocument) MOZ_OVERRIDE;
// nsICSSLoaderObserver
NS_IMETHOD StyleSheetLoaded(nsCSSStyleSheet* aSheet, bool aWasAlternate,
- nsresult aStatus);
+ nsresult aStatus) MOZ_OVERRIDE;
static bool ParsePIData(const nsString &aData, nsString &aHref,
nsString &aTitle, nsString &aMedia,
bool &aIsAlternate);
@@ -128,9 +129,9 @@ protected:
void PopContent();
bool HaveNotifiedForCurrentContent() const;
- nsresult FlushTags();
+ nsresult FlushTags() MOZ_OVERRIDE;
- void UpdateChildCounts();
+ void UpdateChildCounts() MOZ_OVERRIDE;
void DidAddContent()
{
@@ -145,7 +146,7 @@ protected:
bool aAlternate,
const nsSubstring& aTitle,
const nsSubstring& aType,
- const nsSubstring& aMedia);
+ const nsSubstring& aMedia) MOZ_OVERRIDE;
nsresult LoadXSLStyleSheet(nsIURI* aUrl);
diff --git a/content/xslt/src/xpath/nsXPathEvaluator.h b/content/xslt/src/xpath/nsXPathEvaluator.h
index 23bc407cf41..47a82ba0390 100644
--- a/content/xslt/src/xpath/nsXPathEvaluator.h
+++ b/content/xslt/src/xpath/nsXPathEvaluator.h
@@ -42,13 +42,13 @@ public:
NS_DECL_NSIDOMXPATHEVALUATOR
// nsIXPathEvaluatorInternal interface
- NS_IMETHOD SetDocument(nsIDOMDocument* aDocument);
+ NS_IMETHOD SetDocument(nsIDOMDocument* aDocument) MOZ_OVERRIDE;
NS_IMETHOD CreateExpression(const nsAString &aExpression,
nsIDOMXPathNSResolver *aResolver,
nsTArray *aNamespaceURIs,
nsTArray *aContractIDs,
nsCOMArray *aState,
- nsIDOMXPathExpression **aResult);
+ nsIDOMXPathExpression **aResult) MOZ_OVERRIDE;
// WebIDL API
JSObject* WrapObject(JSContext* aCx, JS::Handle aScope);
diff --git a/content/xslt/src/xpath/nsXPathResult.h b/content/xslt/src/xpath/nsXPathResult.h
index 9a4cbda7d69..9992580385e 100644
--- a/content/xslt/src/xpath/nsXPathResult.h
+++ b/content/xslt/src/xpath/nsXPathResult.h
@@ -63,9 +63,9 @@ public:
// nsIXPathResult interface
nsresult SetExprResult(txAExprResult *aExprResult, uint16_t aResultType,
- nsINode* aContextNode);
- nsresult GetExprResult(txAExprResult **aExprResult);
- nsresult Clone(nsIXPathResult **aResult);
+ nsINode* aContextNode) MOZ_OVERRIDE;
+ nsresult GetExprResult(txAExprResult **aExprResult) MOZ_OVERRIDE;
+ nsresult Clone(nsIXPathResult **aResult) MOZ_OVERRIDE;
void RemoveObserver();
private:
static bool isSnapshot(uint16_t aResultType)
diff --git a/content/xslt/src/xpath/txExpr.h b/content/xslt/src/xpath/txExpr.h
index c02662582ed..0dc8900af98 100644
--- a/content/xslt/src/xpath/txExpr.h
+++ b/content/xslt/src/xpath/txExpr.h
@@ -6,6 +6,7 @@
#ifndef TRANSFRMX_EXPR_H
#define TRANSFRMX_EXPR_H
+#include "mozilla/Attributes.h"
#include "nsAutoPtr.h"
#include "txExprResult.h"
#include "txCore.h"
@@ -285,8 +286,8 @@ public:
txIEvalContext* aContext);
TX_DECL_TOSTRING
- Expr* getSubExprAt(uint32_t aPos);
- void setSubExprAt(uint32_t aPos, Expr* aExpr);
+ Expr* getSubExprAt(uint32_t aPos) MOZ_OVERRIDE;
+ void setSubExprAt(uint32_t aPos, Expr* aExpr) MOZ_OVERRIDE;
protected:
@@ -442,7 +443,7 @@ public:
txNameTest(nsIAtom* aPrefix, nsIAtom* aLocalName, int32_t aNSID,
uint16_t aNodeType);
- NodeTestType getType();
+ NodeTestType getType() MOZ_OVERRIDE;
TX_DECL_NODE_TEST
@@ -487,7 +488,7 @@ public:
return mNodeType;
}
- NodeTestType getType();
+ NodeTestType getType() MOZ_OVERRIDE;
TX_DECL_NODE_TEST
diff --git a/content/xslt/src/xpath/txSingleNodeContext.h b/content/xslt/src/xpath/txSingleNodeContext.h
index 3c668dd6111..ed8c9d0af36 100644
--- a/content/xslt/src/xpath/txSingleNodeContext.h
+++ b/content/xslt/src/xpath/txSingleNodeContext.h
@@ -6,6 +6,7 @@
#ifndef __TX_XPATH_SINGLENODE_CONTEXT
#define __TX_XPATH_SINGLENODE_CONTEXT
+#include "mozilla/Attributes.h"
#include "txIXPathContext.h"
class txSingleNodeContext : public txIEvalContext
@@ -20,31 +21,31 @@ public:
}
nsresult getVariable(int32_t aNamespace, nsIAtom* aLName,
- txAExprResult*& aResult)
+ txAExprResult*& aResult) MOZ_OVERRIDE
{
NS_ASSERTION(mInner, "mInner is null!!!");
return mInner->getVariable(aNamespace, aLName, aResult);
}
- bool isStripSpaceAllowed(const txXPathNode& aNode)
+ bool isStripSpaceAllowed(const txXPathNode& aNode) MOZ_OVERRIDE
{
NS_ASSERTION(mInner, "mInner is null!!!");
return mInner->isStripSpaceAllowed(aNode);
}
- void* getPrivateContext()
+ void* getPrivateContext() MOZ_OVERRIDE
{
NS_ASSERTION(mInner, "mInner is null!!!");
return mInner->getPrivateContext();
}
- txResultRecycler* recycler()
+ txResultRecycler* recycler() MOZ_OVERRIDE
{
NS_ASSERTION(mInner, "mInner is null!!!");
return mInner->recycler();
}
- void receiveError(const nsAString& aMsg, nsresult aRes)
+ void receiveError(const nsAString& aMsg, nsresult aRes) MOZ_OVERRIDE
{
NS_ASSERTION(mInner, "mInner is null!!!");
#ifdef DEBUG
@@ -56,17 +57,17 @@ public:
#endif
}
- const txXPathNode& getContextNode()
+ const txXPathNode& getContextNode() MOZ_OVERRIDE
{
return mNode;
}
- uint32_t size()
+ uint32_t size() MOZ_OVERRIDE
{
return 1;
}
- uint32_t position()
+ uint32_t position() MOZ_OVERRIDE
{
return 1;
}
diff --git a/content/xslt/src/xslt/txMozillaXMLOutput.h b/content/xslt/src/xslt/txMozillaXMLOutput.h
index fb37da46957..0d35fbde154 100644
--- a/content/xslt/src/xslt/txMozillaXMLOutput.h
+++ b/content/xslt/src/xslt/txMozillaXMLOutput.h
@@ -39,7 +39,7 @@ public:
// nsICSSLoaderObserver
NS_IMETHOD StyleSheetLoaded(nsCSSStyleSheet* aSheet,
bool aWasAlternate,
- nsresult aStatus);
+ nsresult aStatus) MOZ_OVERRIDE;
void Init(nsITransformObserver* aObserver);
nsresult AddScriptElement(nsIScriptElement* aElement);
diff --git a/content/xslt/src/xslt/txMozillaXSLTProcessor.h b/content/xslt/src/xslt/txMozillaXSLTProcessor.h
index ec1b9080ff4..e7536578866 100644
--- a/content/xslt/src/xslt/txMozillaXSLTProcessor.h
+++ b/content/xslt/src/xslt/txMozillaXSLTProcessor.h
@@ -66,18 +66,18 @@ public:
NS_DECL_NSIXSLTPROCESSORPRIVATE
// nsIDocumentTransformer interface
- NS_IMETHOD Init(nsIPrincipal* aPrincipal);
- NS_IMETHOD SetTransformObserver(nsITransformObserver* aObserver);
- NS_IMETHOD LoadStyleSheet(nsIURI* aUri, nsILoadGroup* aLoadGroup);
- NS_IMETHOD SetSourceContentModel(nsIDOMNode* aSource);
- NS_IMETHOD CancelLoads() {return NS_OK;}
+ NS_IMETHOD Init(nsIPrincipal* aPrincipal) MOZ_OVERRIDE;
+ NS_IMETHOD SetTransformObserver(nsITransformObserver* aObserver) MOZ_OVERRIDE;
+ NS_IMETHOD LoadStyleSheet(nsIURI* aUri, nsILoadGroup* aLoadGroup) MOZ_OVERRIDE;
+ NS_IMETHOD SetSourceContentModel(nsIDOMNode* aSource) MOZ_OVERRIDE;
+ NS_IMETHOD CancelLoads() MOZ_OVERRIDE {return NS_OK;}
NS_IMETHOD AddXSLTParamNamespace(const nsString& aPrefix,
- const nsString& aNamespace);
+ const nsString& aNamespace) MOZ_OVERRIDE;
NS_IMETHOD AddXSLTParam(const nsString& aName,
const nsString& aNamespace,
const nsString& aSelect,
const nsString& aValue,
- nsIDOMNode* aContext);
+ nsIDOMNode* aContext) MOZ_OVERRIDE;
// nsIMutationObserver interface
NS_DECL_NSIMUTATIONOBSERVER_CHARACTERDATACHANGED
diff --git a/content/xslt/src/xslt/txRtfHandler.h b/content/xslt/src/xslt/txRtfHandler.h
index 3a3bb0c4c31..ec5bf0f6fa0 100644
--- a/content/xslt/src/xslt/txRtfHandler.h
+++ b/content/xslt/src/xslt/txRtfHandler.h
@@ -6,6 +6,7 @@
#ifndef txRtfHandler_h___
#define txRtfHandler_h___
+#include "mozilla/Attributes.h"
#include "txBufferingHandler.h"
#include "txExprResult.h"
#include "txXPathNode.h"
@@ -40,8 +41,8 @@ class txRtfHandler : public txBufferingHandler
public:
nsresult getAsRTF(txAExprResult** aResult);
- nsresult endDocument(nsresult aResult);
- nsresult startDocument();
+ nsresult endDocument(nsresult aResult) MOZ_OVERRIDE;
+ nsresult startDocument() MOZ_OVERRIDE;
};
#endif /* txRtfHandler_h___ */
diff --git a/content/xslt/src/xslt/txStylesheetCompiler.h b/content/xslt/src/xslt/txStylesheetCompiler.h
index f5a59282486..68eb39ebb2f 100644
--- a/content/xslt/src/xslt/txStylesheetCompiler.h
+++ b/content/xslt/src/xslt/txStylesheetCompiler.h
@@ -6,6 +6,7 @@
#ifndef TRANSFRMX_TXSTYLESHEETCOMPILER_H
#define TRANSFRMX_TXSTYLESHEETCOMPILER_H
+#include "mozilla/Attributes.h"
#include "txStack.h"
#include "txXSLTPatterns.h"
#include "txExpr.h"
@@ -120,10 +121,10 @@ public:
nsresult addVariable(const txExpandedName& aName);
// txIParseContext
- nsresult resolveNamespacePrefix(nsIAtom* aPrefix, int32_t& aID);
+ nsresult resolveNamespacePrefix(nsIAtom* aPrefix, int32_t& aID) MOZ_OVERRIDE;
nsresult resolveFunctionCall(nsIAtom* aName, int32_t aID,
- FunctionCall** aFunction);
- bool caseInsensitiveNameTests();
+ FunctionCall** aFunction) MOZ_OVERRIDE;
+ bool caseInsensitiveNameTests() MOZ_OVERRIDE;
/**
* Should the stylesheet be parsed in forwards compatible parsing mode.
@@ -133,7 +134,7 @@ public:
return mElementContext->mForwardsCompatibleParsing;
}
- void SetErrorOffset(uint32_t aOffset);
+ void SetErrorOffset(uint32_t aOffset) MOZ_OVERRIDE;
static void shutdown();
diff --git a/content/xslt/src/xslt/txXPathResultComparator.h b/content/xslt/src/xslt/txXPathResultComparator.h
index 7adcacf8ba3..8c7d8a5a8da 100644
--- a/content/xslt/src/xslt/txXPathResultComparator.h
+++ b/content/xslt/src/xslt/txXPathResultComparator.h
@@ -6,6 +6,7 @@
#ifndef TRANSFRMX_XPATHRESULTCOMPARATOR_H
#define TRANSFRMX_XPATHRESULTCOMPARATOR_H
+#include "mozilla/Attributes.h"
#include "txCore.h"
#include "nsCOMPtr.h"
#include "nsICollation.h"
@@ -46,9 +47,9 @@ public:
txResultStringComparator(bool aAscending, bool aUpperFirst,
const nsAFlatString& aLanguage);
- int compareValues(txObject* aVal1, txObject* aVal2);
+ int compareValues(txObject* aVal1, txObject* aVal2) MOZ_OVERRIDE;
nsresult createSortableValue(Expr *aExpr, txIEvalContext *aContext,
- txObject *&aResult);
+ txObject *&aResult) MOZ_OVERRIDE;
private:
nsCOMPtr mCollation;
nsresult init(const nsAFlatString& aLanguage);
@@ -78,9 +79,9 @@ class txResultNumberComparator : public txXPathResultComparator
public:
txResultNumberComparator(bool aAscending);
- int compareValues(txObject* aVal1, txObject* aVal2);
+ int compareValues(txObject* aVal1, txObject* aVal2) MOZ_OVERRIDE;
nsresult createSortableValue(Expr *aExpr, txIEvalContext *aContext,
- txObject *&aResult);
+ txObject *&aResult) MOZ_OVERRIDE;
private:
int mAscending;
diff --git a/content/xslt/src/xslt/txXSLTPatterns.h b/content/xslt/src/xslt/txXSLTPatterns.h
index e7f0da9402c..b34e3e8a51c 100644
--- a/content/xslt/src/xslt/txXSLTPatterns.h
+++ b/content/xslt/src/xslt/txXSLTPatterns.h
@@ -6,6 +6,7 @@
#ifndef TX_XSLT_PATTERNS_H
#define TX_XSLT_PATTERNS_H
+#include "mozilla/Attributes.h"
#include "txExpr.h"
#include "txXMLUtils.h"
@@ -135,7 +136,7 @@ public:
}
TX_DECL_PATTERN;
- Type getType();
+ Type getType() MOZ_OVERRIDE;
private:
txOwningArray mLocPathPatterns;
@@ -227,7 +228,7 @@ public:
}
TX_DECL_PATTERN;
- Type getType();
+ Type getType() MOZ_OVERRIDE;
txNodeTest* getNodeTest()
{
diff --git a/content/xul/content/src/nsXULElement.cpp b/content/xul/content/src/nsXULElement.cpp
index 73c6d07e631..f952a67851c 100644
--- a/content/xul/content/src/nsXULElement.cpp
+++ b/content/xul/content/src/nsXULElement.cpp
@@ -2387,7 +2387,8 @@ nsXULPrototypeScript::Serialize(nsIObjectOutputStream* aStream,
rv = aStream->Write32(mLangVersion);
if (NS_FAILED(rv)) return rv;
// And delegate the writing to the nsIScriptContext
- rv = context->Serialize(aStream, mScriptObject);
+ rv = context->Serialize(aStream,
+ JS::Handle::fromMarkedLocation(&mScriptObject));
if (NS_FAILED(rv)) return rv;
return NS_OK;
diff --git a/content/xul/content/src/nsXULElement.h b/content/xul/content/src/nsXULElement.h
index 89ea4c7f56f..5efa8c812d7 100644
--- a/content/xul/content/src/nsXULElement.h
+++ b/content/xul/content/src/nsXULElement.h
@@ -13,6 +13,7 @@
#define nsXULElement_h__
// XXX because nsEventListenerManager has broken includes
+#include "mozilla/Attributes.h"
#include "nsIDOMEvent.h"
#include "nsIServiceManager.h"
#include "nsIAtom.h"
@@ -158,11 +159,11 @@ public:
}
#ifdef NS_BUILD_REFCNT_LOGGING
- virtual const char* ClassName() { return "nsXULPrototypeElement"; }
- virtual uint32_t ClassSize() { return sizeof(*this); }
+ virtual const char* ClassName() MOZ_OVERRIDE { return "nsXULPrototypeElement"; }
+ virtual uint32_t ClassSize() MOZ_OVERRIDE { return sizeof(*this); }
#endif
- virtual void ReleaseSubtree()
+ virtual void ReleaseSubtree() MOZ_OVERRIDE
{
for (int32_t i = mChildren.Length() - 1; i >= 0; i--) {
if (mChildren[i].get())
@@ -174,11 +175,11 @@ public:
virtual nsresult Serialize(nsIObjectOutputStream* aStream,
nsIScriptGlobalObject* aGlobal,
- const nsCOMArray *aNodeInfos);
+ const nsCOMArray *aNodeInfos) MOZ_OVERRIDE;
virtual nsresult Deserialize(nsIObjectInputStream* aStream,
nsIScriptGlobalObject* aGlobal,
nsIURI* aDocumentURI,
- const nsCOMArray *aNodeInfos);
+ const nsCOMArray *aNodeInfos) MOZ_OVERRIDE;
nsresult SetAttrAt(uint32_t aPos, const nsAString& aValue, nsIURI* aDocumentURI);
@@ -211,19 +212,19 @@ public:
virtual ~nsXULPrototypeScript();
#ifdef NS_BUILD_REFCNT_LOGGING
- virtual const char* ClassName() { return "nsXULPrototypeScript"; }
- virtual uint32_t ClassSize() { return sizeof(*this); }
+ virtual const char* ClassName() MOZ_OVERRIDE { return "nsXULPrototypeScript"; }
+ virtual uint32_t ClassSize() MOZ_OVERRIDE { return sizeof(*this); }
#endif
virtual nsresult Serialize(nsIObjectOutputStream* aStream,
nsIScriptGlobalObject* aGlobal,
- const nsCOMArray *aNodeInfos);
+ const nsCOMArray *aNodeInfos) MOZ_OVERRIDE;
nsresult SerializeOutOfLine(nsIObjectOutputStream* aStream,
nsIScriptGlobalObject* aGlobal);
virtual nsresult Deserialize(nsIObjectInputStream* aStream,
nsIScriptGlobalObject* aGlobal,
nsIURI* aDocumentURI,
- const nsCOMArray *aNodeInfos);
+ const nsCOMArray *aNodeInfos) MOZ_OVERRIDE;
nsresult DeserializeOutOfLine(nsIObjectInputStream* aInput,
nsIScriptGlobalObject* aGlobal);
@@ -282,17 +283,17 @@ public:
}
#ifdef NS_BUILD_REFCNT_LOGGING
- virtual const char* ClassName() { return "nsXULPrototypeText"; }
- virtual uint32_t ClassSize() { return sizeof(*this); }
+ virtual const char* ClassName() MOZ_OVERRIDE { return "nsXULPrototypeText"; }
+ virtual uint32_t ClassSize() MOZ_OVERRIDE { return sizeof(*this); }
#endif
virtual nsresult Serialize(nsIObjectOutputStream* aStream,
nsIScriptGlobalObject* aGlobal,
- const nsCOMArray *aNodeInfos);
+ const nsCOMArray *aNodeInfos) MOZ_OVERRIDE;
virtual nsresult Deserialize(nsIObjectInputStream* aStream,
nsIScriptGlobalObject* aGlobal,
nsIURI* aDocumentURI,
- const nsCOMArray *aNodeInfos);
+ const nsCOMArray *aNodeInfos) MOZ_OVERRIDE;
nsString mValue;
};
@@ -310,17 +311,17 @@ public:
}
#ifdef NS_BUILD_REFCNT_LOGGING
- virtual const char* ClassName() { return "nsXULPrototypePI"; }
- virtual uint32_t ClassSize() { return sizeof(*this); }
+ virtual const char* ClassName() MOZ_OVERRIDE { return "nsXULPrototypePI"; }
+ virtual uint32_t ClassSize() MOZ_OVERRIDE { return sizeof(*this); }
#endif
virtual nsresult Serialize(nsIObjectOutputStream* aStream,
nsIScriptGlobalObject* aGlobal,
- const nsCOMArray *aNodeInfos);
+ const nsCOMArray *aNodeInfos) MOZ_OVERRIDE;
virtual nsresult Deserialize(nsIObjectInputStream* aStream,
nsIScriptGlobalObject* aGlobal,
nsIURI* aDocumentURI,
- const nsCOMArray *aNodeInfos);
+ const nsCOMArray *aNodeInfos) MOZ_OVERRIDE;
nsString mTarget;
nsString mData;
@@ -373,30 +374,30 @@ public:
// nsIContent
virtual nsresult BindToTree(nsIDocument* aDocument, nsIContent* aParent,
nsIContent* aBindingParent,
- bool aCompileEventHandlers);
- virtual void UnbindFromTree(bool aDeep, bool aNullParent);
- virtual void RemoveChildAt(uint32_t aIndex, bool aNotify);
- virtual void DestroyContent();
+ bool aCompileEventHandlers) MOZ_OVERRIDE;
+ virtual void UnbindFromTree(bool aDeep, bool aNullParent) MOZ_OVERRIDE;
+ virtual void RemoveChildAt(uint32_t aIndex, bool aNotify) MOZ_OVERRIDE;
+ virtual void DestroyContent() MOZ_OVERRIDE;
#ifdef DEBUG
- virtual void List(FILE* out, int32_t aIndent) const;
- virtual void DumpContent(FILE* out, int32_t aIndent,bool aDumpAll) const
+ virtual void List(FILE* out, int32_t aIndent) const MOZ_OVERRIDE;
+ virtual void DumpContent(FILE* out, int32_t aIndent,bool aDumpAll) const MOZ_OVERRIDE
{
}
#endif
virtual void PerformAccesskey(bool aKeyCausesActivation,
- bool aIsTrustedEvent);
+ bool aIsTrustedEvent) MOZ_OVERRIDE;
nsresult ClickWithInputSource(uint16_t aInputSource);
- virtual nsIContent *GetBindingParent() const;
- virtual bool IsNodeOfType(uint32_t aFlags) const;
- virtual bool IsFocusable(int32_t *aTabIndex = nullptr, bool aWithMouse = false);
+ virtual nsIContent *GetBindingParent() const MOZ_OVERRIDE;
+ virtual bool IsNodeOfType(uint32_t aFlags) const MOZ_OVERRIDE;
+ virtual bool IsFocusable(int32_t *aTabIndex = nullptr, bool aWithMouse = false) MOZ_OVERRIDE;
- NS_IMETHOD WalkContentStyleRules(nsRuleWalker* aRuleWalker);
+ NS_IMETHOD WalkContentStyleRules(nsRuleWalker* aRuleWalker) MOZ_OVERRIDE;
virtual nsChangeHint GetAttributeChangeHint(const nsIAtom* aAttribute,
- int32_t aModType) const;
- NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const;
+ int32_t aModType) const MOZ_OVERRIDE;
+ NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const MOZ_OVERRIDE;
// XUL element methods
/**
@@ -419,13 +420,13 @@ public:
// nsIDOMXULElement
NS_DECL_NSIDOMXULELEMENT
- virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
- virtual nsEventStates IntrinsicState() const;
+ virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
+ virtual nsEventStates IntrinsicState() const MOZ_OVERRIDE;
nsresult GetFrameLoader(nsIFrameLoader** aFrameLoader);
nsresult SwapFrameLoaders(nsIFrameLoaderOwner* aOtherOwner);
- virtual void RecompileScriptEventListeners();
+ virtual void RecompileScriptEventListeners() MOZ_OVERRIDE;
// This function should ONLY be used by BindToTree implementations.
// The function exists solely because XUL elements store the binding
@@ -435,7 +436,7 @@ public:
mBindingParent = aBindingParent;
}
- virtual nsIDOMNode* AsDOMNode() { return this; }
+ virtual nsIDOMNode* AsDOMNode() MOZ_OVERRIDE { return this; }
virtual bool IsEventAttributeName(nsIAtom* aName) MOZ_OVERRIDE;
@@ -628,7 +629,7 @@ protected:
nsRefPtr mFrameLoader;
};
- virtual nsINode::nsSlots* CreateSlots();
+ virtual nsINode::nsSlots* CreateSlots() MOZ_OVERRIDE;
nsresult LoadSrc();
@@ -645,19 +646,19 @@ protected:
virtual nsresult BeforeSetAttr(int32_t aNamespaceID, nsIAtom* aName,
const nsAttrValueOrString* aValue,
- bool aNotify);
+ bool aNotify) MOZ_OVERRIDE;
virtual nsresult AfterSetAttr(int32_t aNamespaceID, nsIAtom* aName,
- const nsAttrValue* aValue, bool aNotify);
+ const nsAttrValue* aValue, bool aNotify) MOZ_OVERRIDE;
- virtual void UpdateEditableState(bool aNotify);
+ virtual void UpdateEditableState(bool aNotify) MOZ_OVERRIDE;
virtual bool ParseAttribute(int32_t aNamespaceID,
nsIAtom* aAttribute,
const nsAString& aValue,
- nsAttrValue& aResult);
+ nsAttrValue& aResult) MOZ_OVERRIDE;
virtual nsEventListenerManager*
- GetEventListenerManagerForAttr(nsIAtom* aAttrName, bool* aDefer);
+ GetEventListenerManagerForAttr(nsIAtom* aAttrName, bool* aDefer) MOZ_OVERRIDE;
/**
* Add a listener for the specified attribute, if appropriate.
diff --git a/content/xul/document/src/XULDocument.h b/content/xul/document/src/XULDocument.h
index 1ec16af835c..5e11d04916b 100644
--- a/content/xul/document/src/XULDocument.h
+++ b/content/xul/document/src/XULDocument.h
@@ -99,9 +99,9 @@ public:
NS_DECL_NSISTREAMLOADEROBSERVER
// nsIDocument interface
- virtual void Reset(nsIChannel* aChannel, nsILoadGroup* aLoadGroup);
+ virtual void Reset(nsIChannel* aChannel, nsILoadGroup* aLoadGroup) MOZ_OVERRIDE;
virtual void ResetToURI(nsIURI *aURI, nsILoadGroup* aLoadGroup,
- nsIPrincipal* aPrincipal);
+ nsIPrincipal* aPrincipal) MOZ_OVERRIDE;
virtual nsresult StartDocumentLoad(const char* aCommand,
nsIChannel *channel,
@@ -109,11 +109,11 @@ public:
nsISupports* aContainer,
nsIStreamListener **aDocListener,
bool aReset = true,
- nsIContentSink* aSink = nullptr);
+ nsIContentSink* aSink = nullptr) MOZ_OVERRIDE;
- virtual void SetContentType(const nsAString& aContentType);
+ virtual void SetContentType(const nsAString& aContentType) MOZ_OVERRIDE;
- virtual void EndLoad();
+ virtual void EndLoad() MOZ_OVERRIDE;
// nsIMutationObserver interface
NS_DECL_NSIMUTATIONOBSERVER_CONTENTAPPENDED
@@ -124,17 +124,17 @@ public:
// nsIXULDocument interface
virtual void GetElementsForID(const nsAString& aID,
- nsCOMArray& aElements);
+ nsCOMArray& aElements) MOZ_OVERRIDE;
- NS_IMETHOD GetScriptGlobalObjectOwner(nsIScriptGlobalObjectOwner** aGlobalOwner);
- NS_IMETHOD AddSubtreeToDocument(nsIContent* aContent);
- NS_IMETHOD RemoveSubtreeFromDocument(nsIContent* aContent);
+ NS_IMETHOD GetScriptGlobalObjectOwner(nsIScriptGlobalObjectOwner** aGlobalOwner) MOZ_OVERRIDE;
+ NS_IMETHOD AddSubtreeToDocument(nsIContent* aContent) MOZ_OVERRIDE;
+ NS_IMETHOD RemoveSubtreeFromDocument(nsIContent* aContent) MOZ_OVERRIDE;
NS_IMETHOD SetTemplateBuilderFor(nsIContent* aContent,
- nsIXULTemplateBuilder* aBuilder);
+ nsIXULTemplateBuilder* aBuilder) MOZ_OVERRIDE;
NS_IMETHOD GetTemplateBuilderFor(nsIContent* aContent,
- nsIXULTemplateBuilder** aResult);
- NS_IMETHOD OnPrototypeLoadDone(bool aResumeWalk);
- bool OnDocumentParserError();
+ nsIXULTemplateBuilder** aResult) MOZ_OVERRIDE;
+ NS_IMETHOD OnPrototypeLoadDone(bool aResumeWalk) MOZ_OVERRIDE;
+ bool OnDocumentParserError() MOZ_OVERRIDE;
// nsINode interface overrides
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
@@ -154,7 +154,7 @@ public:
using nsIDocument::GetLocation;
// nsDocument interface overrides
- virtual Element* GetElementById(const nsAString & elementId);
+ virtual Element* GetElementById(const nsAString & elementId) MOZ_OVERRIDE;
// nsIDOMXULDocument interface
NS_DECL_NSIDOMXULDOCUMENT
@@ -162,17 +162,17 @@ public:
// nsICSSLoaderObserver
NS_IMETHOD StyleSheetLoaded(nsCSSStyleSheet* aSheet,
bool aWasAlternate,
- nsresult aStatus);
+ nsresult aStatus) MOZ_OVERRIDE;
- virtual void EndUpdate(nsUpdateType aUpdateType);
+ virtual void EndUpdate(nsUpdateType aUpdateType) MOZ_OVERRIDE;
- virtual bool IsDocumentRightToLeft();
+ virtual bool IsDocumentRightToLeft() MOZ_OVERRIDE;
- virtual void ResetDocumentDirection();
+ virtual void ResetDocumentDirection() MOZ_OVERRIDE;
- virtual int GetDocumentLWTheme();
+ virtual int GetDocumentLWTheme() MOZ_OVERRIDE;
- virtual void ResetDocumentLWTheme() { mDocLWTheme = Doc_Theme_Uninitialized; }
+ virtual void ResetDocumentLWTheme() MOZ_OVERRIDE { mDocLWTheme = Doc_Theme_Uninitialized; }
static bool
MatchAttribute(nsIContent* aContent,
@@ -225,7 +225,7 @@ protected:
friend nsresult
(::NS_NewXULDocument(nsIXULDocument** aResult));
- nsresult Init(void);
+ nsresult Init(void) MOZ_OVERRIDE;
nsresult StartLayout(void);
nsresult
@@ -508,8 +508,8 @@ protected:
virtual ~BroadcasterHookup();
- virtual Phase GetPhase() { return eHookup; }
- virtual Result Resolve();
+ virtual Phase GetPhase() MOZ_OVERRIDE { return eHookup; }
+ virtual Result Resolve() MOZ_OVERRIDE;
};
friend class BroadcasterHookup;
@@ -533,8 +533,8 @@ protected:
virtual ~OverlayForwardReference();
- virtual Phase GetPhase() { return eConstruction; }
- virtual Result Resolve();
+ virtual Phase GetPhase() MOZ_OVERRIDE { return eConstruction; }
+ virtual Result Resolve() MOZ_OVERRIDE;
};
friend class OverlayForwardReference;
@@ -548,8 +548,8 @@ protected:
TemplateBuilderHookup(nsIContent* aElement)
: mElement(aElement) {}
- virtual Phase GetPhase() { return eHookup; }
- virtual Result Resolve();
+ virtual Phase GetPhase() MOZ_OVERRIDE { return eHookup; }
+ virtual Result Resolve() MOZ_OVERRIDE;
};
friend class TemplateBuilderHookup;
diff --git a/content/xul/document/src/nsXULContentSink.h b/content/xul/document/src/nsXULContentSink.h
index f023c2acb89..d16768f329f 100644
--- a/content/xul/document/src/nsXULContentSink.h
+++ b/content/xul/document/src/nsXULContentSink.h
@@ -6,6 +6,7 @@
#ifndef nsXULContentSink_h__
#define nsXULContentSink_h__
+#include "mozilla/Attributes.h"
#include "nsIExpatSink.h"
#include "nsIXMLContentSink.h"
#include "nsAutoPtr.h"
@@ -35,15 +36,15 @@ public:
NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(XULContentSinkImpl, nsIXMLContentSink)
// nsIContentSink
- NS_IMETHOD WillParse(void) { return NS_OK; }
- NS_IMETHOD WillBuildModel(nsDTDMode aDTDMode);
- NS_IMETHOD DidBuildModel(bool aTerminated);
- NS_IMETHOD WillInterrupt(void);
- NS_IMETHOD WillResume(void);
- NS_IMETHOD SetParser(nsParserBase* aParser);
- virtual void FlushPendingNotifications(mozFlushType aType) { }
- NS_IMETHOD SetDocumentCharset(nsACString& aCharset);
- virtual nsISupports *GetTarget();
+ NS_IMETHOD WillParse(void) MOZ_OVERRIDE { return NS_OK; }
+ NS_IMETHOD WillBuildModel(nsDTDMode aDTDMode) MOZ_OVERRIDE;
+ NS_IMETHOD DidBuildModel(bool aTerminated) MOZ_OVERRIDE;
+ NS_IMETHOD WillInterrupt(void) MOZ_OVERRIDE;
+ NS_IMETHOD WillResume(void) MOZ_OVERRIDE;
+ NS_IMETHOD SetParser(nsParserBase* aParser) MOZ_OVERRIDE;
+ virtual void FlushPendingNotifications(mozFlushType aType) MOZ_OVERRIDE { }
+ NS_IMETHOD SetDocumentCharset(nsACString& aCharset) MOZ_OVERRIDE;
+ virtual nsISupports *GetTarget() MOZ_OVERRIDE;
/**
* Initialize the content sink, giving it an nsIDocument object
diff --git a/content/xul/document/src/nsXULPrototypeDocument.h b/content/xul/document/src/nsXULPrototypeDocument.h
index 54f2a2700db..6fe090507e9 100644
--- a/content/xul/document/src/nsXULPrototypeDocument.h
+++ b/content/xul/document/src/nsXULPrototypeDocument.h
@@ -6,6 +6,7 @@
#ifndef nsXULPrototypeDocument_h__
#define nsXULPrototypeDocument_h__
+#include "mozilla/Attributes.h"
#include "nsAutoPtr.h"
#include "nsCOMArray.h"
#include "nsCOMPtr.h"
@@ -114,7 +115,7 @@ public:
nsNodeInfoManager *GetNodeInfoManager();
// nsIScriptGlobalObjectOwner methods
- virtual nsIScriptGlobalObject* GetScriptGlobalObject();
+ virtual nsIScriptGlobalObject* GetScriptGlobalObject() MOZ_OVERRIDE;
void MarkInCCGeneration(uint32_t aCCGeneration)
{
diff --git a/content/xul/templates/src/nsContentTestNode.h b/content/xul/templates/src/nsContentTestNode.h
index 7d50686839e..bd94bcc8d22 100644
--- a/content/xul/templates/src/nsContentTestNode.h
+++ b/content/xul/templates/src/nsContentTestNode.h
@@ -6,6 +6,7 @@
#ifndef nsContentTestNode_h__
#define nsContentTestNode_h__
+#include "mozilla/Attributes.h"
#include "nscore.h"
#include "nsRuleNetwork.h"
#include "nsIAtom.h"
@@ -25,10 +26,10 @@ public:
nsIAtom* aContentVariable);
virtual nsresult FilterInstantiations(InstantiationSet& aInstantiations,
- bool* aCantHandleYet) const;
+ bool* aCantHandleYet) const MOZ_OVERRIDE;
nsresult
- Constrain(InstantiationSet& aInstantiations);
+ Constrain(InstantiationSet& aInstantiations) MOZ_OVERRIDE;
void SetTag(nsIAtom* aTag, nsIDOMDocument* aDocument)
{
diff --git a/content/xul/templates/src/nsInstantiationNode.h b/content/xul/templates/src/nsInstantiationNode.h
index 8de4d96aa6e..e3a2f656c54 100644
--- a/content/xul/templates/src/nsInstantiationNode.h
+++ b/content/xul/templates/src/nsInstantiationNode.h
@@ -6,6 +6,7 @@
#ifndef nsInstantiationNode_h__
#define nsInstantiationNode_h__
+#include "mozilla/Attributes.h"
#include "nsRuleNetwork.h"
#include "nsRDFQuery.h"
@@ -25,7 +26,7 @@ public:
// "downward" propagations
virtual nsresult Propagate(InstantiationSet& aInstantiations,
- bool aIsUpdate, bool& aMatched);
+ bool aIsUpdate, bool& aMatched) MOZ_OVERRIDE;
protected:
diff --git a/content/xul/templates/src/nsRDFConInstanceTestNode.h b/content/xul/templates/src/nsRDFConInstanceTestNode.h
index 5be69498151..e3c7c3d5d05 100644
--- a/content/xul/templates/src/nsRDFConInstanceTestNode.h
+++ b/content/xul/templates/src/nsRDFConInstanceTestNode.h
@@ -6,6 +6,7 @@
#ifndef nsRDFConInstanceTestNode_h__
#define nsRDFConInstanceTestNode_h__
+#include "mozilla/Attributes.h"
#include "nscore.h"
#include "nsRDFTestNode.h"
#include "nsIRDFResource.h"
@@ -28,18 +29,18 @@ public:
Test aEmpty);
virtual nsresult FilterInstantiations(InstantiationSet& aInstantiations,
- bool* aCantHandleYet) const;
+ bool* aCantHandleYet) const MOZ_OVERRIDE;
virtual bool
CanPropagate(nsIRDFResource* aSource,
nsIRDFResource* aProperty,
nsIRDFNode* aTarget,
- Instantiation& aInitialBindings) const;
+ Instantiation& aInitialBindings) const MOZ_OVERRIDE;
virtual void
Retract(nsIRDFResource* aSource,
nsIRDFResource* aProperty,
- nsIRDFNode* aTarget) const;
+ nsIRDFNode* aTarget) const MOZ_OVERRIDE;
class Element : public MemoryElement {
@@ -54,14 +55,14 @@ public:
virtual ~Element() { MOZ_COUNT_DTOR(nsRDFConInstanceTestNode::Element); }
- virtual const char* Type() const {
+ virtual const char* Type() const MOZ_OVERRIDE {
return "nsRDFConInstanceTestNode::Element"; }
- virtual PLHashNumber Hash() const {
+ virtual PLHashNumber Hash() const MOZ_OVERRIDE {
return mozilla::HashGeneric(mContainerTest, mEmptyTest, mContainer.get());
}
- virtual bool Equals(const MemoryElement& aElement) const {
+ virtual bool Equals(const MemoryElement& aElement) const MOZ_OVERRIDE {
if (aElement.Type() == Type()) {
const Element& element = static_cast(aElement);
return mContainer == element.mContainer
diff --git a/content/xul/templates/src/nsRDFConMemberTestNode.h b/content/xul/templates/src/nsRDFConMemberTestNode.h
index 5e7c95a56de..3b306935a06 100644
--- a/content/xul/templates/src/nsRDFConMemberTestNode.h
+++ b/content/xul/templates/src/nsRDFConMemberTestNode.h
@@ -6,6 +6,7 @@
#ifndef nsRDFConMemberTestNode_h__
#define nsRDFConMemberTestNode_h__
+#include "mozilla/Attributes.h"
#include "nscore.h"
#include "nsRDFTestNode.h"
#include "nsIRDFDataSource.h"
@@ -25,18 +26,18 @@ public:
nsIAtom* aMemberVariable);
virtual nsresult FilterInstantiations(InstantiationSet& aInstantiations,
- bool* aCantHandleYet) const;
+ bool* aCantHandleYet) const MOZ_OVERRIDE;
virtual bool
CanPropagate(nsIRDFResource* aSource,
nsIRDFResource* aProperty,
nsIRDFNode* aTarget,
- Instantiation& aInitialBindings) const;
+ Instantiation& aInitialBindings) const MOZ_OVERRIDE;
virtual void
Retract(nsIRDFResource* aSource,
nsIRDFResource* aProperty,
- nsIRDFNode* aTarget) const;
+ nsIRDFNode* aTarget) const MOZ_OVERRIDE;
class Element : public MemoryElement {
public:
@@ -48,14 +49,14 @@ public:
virtual ~Element() { MOZ_COUNT_DTOR(nsRDFConMemberTestNode::Element); }
- virtual const char* Type() const {
+ virtual const char* Type() const MOZ_OVERRIDE {
return "nsRDFConMemberTestNode::Element"; }
- virtual PLHashNumber Hash() const {
+ virtual PLHashNumber Hash() const MOZ_OVERRIDE {
return PLHashNumber(NS_PTR_TO_INT32(mContainer.get())) ^
(PLHashNumber(NS_PTR_TO_INT32(mMember.get())) >> 12); }
- virtual bool Equals(const MemoryElement& aElement) const {
+ virtual bool Equals(const MemoryElement& aElement) const MOZ_OVERRIDE {
if (aElement.Type() == Type()) {
const Element& element = static_cast(aElement);
return mContainer == element.mContainer && mMember == element.mMember;
diff --git a/content/xul/templates/src/nsRDFPropertyTestNode.h b/content/xul/templates/src/nsRDFPropertyTestNode.h
index bfacdc93213..600a039751e 100644
--- a/content/xul/templates/src/nsRDFPropertyTestNode.h
+++ b/content/xul/templates/src/nsRDFPropertyTestNode.h
@@ -6,6 +6,7 @@
#ifndef nsRDFPropertyTestNode_h__
#define nsRDFPropertyTestNode_h__
+#include "mozilla/Attributes.h"
#include "nscore.h"
#include "nsRDFTestNode.h"
#include "nsIRDFDataSource.h"
@@ -43,18 +44,18 @@ public:
nsIRDFNode* aTarget);
virtual nsresult FilterInstantiations(InstantiationSet& aInstantiations,
- bool* aCantHandleYet) const;
+ bool* aCantHandleYet) const MOZ_OVERRIDE;
virtual bool
CanPropagate(nsIRDFResource* aSource,
nsIRDFResource* aProperty,
nsIRDFNode* aTarget,
- Instantiation& aInitialBindings) const;
+ Instantiation& aInitialBindings) const MOZ_OVERRIDE;
virtual void
Retract(nsIRDFResource* aSource,
nsIRDFResource* aProperty,
- nsIRDFNode* aTarget) const;
+ nsIRDFNode* aTarget) const MOZ_OVERRIDE;
class Element : public MemoryElement {
@@ -69,14 +70,14 @@ public:
virtual ~Element() { MOZ_COUNT_DTOR(nsRDFPropertyTestNode::Element); }
- virtual const char* Type() const {
+ virtual const char* Type() const MOZ_OVERRIDE {
return "nsRDFPropertyTestNode::Element"; }
- virtual PLHashNumber Hash() const {
+ virtual PLHashNumber Hash() const MOZ_OVERRIDE {
return mozilla::HashGeneric(mSource.get(), mProperty.get(), mTarget.get());
}
- virtual bool Equals(const MemoryElement& aElement) const {
+ virtual bool Equals(const MemoryElement& aElement) const MOZ_OVERRIDE {
if (aElement.Type() == Type()) {
const Element& element = static_cast(aElement);
return mSource == element.mSource
diff --git a/content/xul/templates/src/nsRDFQuery.h b/content/xul/templates/src/nsRDFQuery.h
index d59c77b784b..68ba948db58 100644
--- a/content/xul/templates/src/nsRDFQuery.h
+++ b/content/xul/templates/src/nsRDFQuery.h
@@ -61,7 +61,7 @@ public:
void SetRoot(TestNode* aRoot) { mRoot = aRoot; }
- void GetQueryNode(nsIDOMNode** aQueryNode)
+ void GetQueryNode(nsIDOMNode** aQueryNode) MOZ_OVERRIDE
{
*aQueryNode = mQueryNode;
NS_IF_ADDREF(*aQueryNode);
@@ -86,14 +86,14 @@ public:
void UseCachedResults(nsISimpleEnumerator** aResults);
// clear the cached results
- void ClearCachedResults()
+ void ClearCachedResults() MOZ_OVERRIDE
{
mCachedResults = nullptr;
}
- nsXULTemplateQueryProcessorRDF* Processor() { return mProcessor; }
+ nsXULTemplateQueryProcessorRDF* Processor() MOZ_OVERRIDE { return mProcessor; }
- nsIAtom* GetMemberVariable() { return mMemberVariable; }
+ nsIAtom* GetMemberVariable() MOZ_OVERRIDE { return mMemberVariable; }
bool IsSimple() { return mSimple; }
diff --git a/content/xul/templates/src/nsRuleNetwork.h b/content/xul/templates/src/nsRuleNetwork.h
index 619fc2d0d96..80d804b3af3 100644
--- a/content/xul/templates/src/nsRuleNetwork.h
+++ b/content/xul/templates/src/nsRuleNetwork.h
@@ -28,6 +28,7 @@
#ifndef nsRuleNetwork_h__
#define nsRuleNetwork_h__
+#include "mozilla/Attributes.h"
#include "nsCOMPtr.h"
#include "nsCOMArray.h"
#include "nsIAtom.h"
@@ -797,7 +798,7 @@ public:
* aTakenInstantiations will be set properly even if an error occurs.
*/
virtual nsresult Propagate(InstantiationSet& aInstantiations,
- bool aIsUpdate, bool& aTakenInstantiations);
+ bool aIsUpdate, bool& aTakenInstantiations) MOZ_OVERRIDE;
/**
* This is called by a child node on its parent to allow the
diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp
index 12cb3c102b6..c04bb4410e2 100644
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -1969,35 +1969,33 @@ nsDocShell::SetCharset(const char* aCharset)
}
// set the charset override
- nsCOMPtr csAtom = do_GetAtom(aCharset);
- SetForcedCharset(csAtom);
+ nsCString charset(aCharset);
+ SetForcedCharset(charset);
return NS_OK;
-}
+}
-NS_IMETHODIMP nsDocShell::SetForcedCharset(nsIAtom * aCharset)
+NS_IMETHODIMP nsDocShell::SetForcedCharset(const nsACString& aCharset)
{
mForcedCharset = aCharset;
return NS_OK;
}
-NS_IMETHODIMP nsDocShell::GetForcedCharset(nsIAtom ** aResult)
+NS_IMETHODIMP nsDocShell::GetForcedCharset(nsACString& aResult)
{
- *aResult = mForcedCharset;
- if (mForcedCharset) NS_ADDREF(*aResult);
+ aResult = mForcedCharset;
return NS_OK;
}
-NS_IMETHODIMP nsDocShell::SetParentCharset(nsIAtom * aCharset)
+NS_IMETHODIMP nsDocShell::SetParentCharset(const nsACString& aCharset)
{
mParentCharset = aCharset;
return NS_OK;
}
-NS_IMETHODIMP nsDocShell::GetParentCharset(nsIAtom ** aResult)
+NS_IMETHODIMP nsDocShell::GetParentCharset(nsACString& aResult)
{
- *aResult = mParentCharset;
- if (mParentCharset) NS_ADDREF(*aResult);
+ aResult = mParentCharset;
return NS_OK;
}
@@ -3497,8 +3495,7 @@ nsDocShell::AddChild(nsIDocShellTreeItem * aChild)
// expose here.
// set the child's parentCharset
- nsCOMPtr parentCSAtom(do_GetAtom(parentCS));
- res = childAsDocShell->SetParentCharset(parentCSAtom);
+ res = childAsDocShell->SetParentCharset(parentCS);
if (NS_FAILED(res))
return NS_OK;
diff --git a/docshell/base/nsDocShell.h b/docshell/base/nsDocShell.h
index bd030815d88..55f0c3d8fa0 100644
--- a/docshell/base/nsDocShell.h
+++ b/docshell/base/nsDocShell.h
@@ -869,8 +869,8 @@ protected:
uint32_t mOwnOrContainingAppId;
private:
- nsCOMPtr mForcedCharset;
- nsCOMPtr mParentCharset;
+ nsCString mForcedCharset;
+ nsCString mParentCharset;
nsTObserverArray mPrivacyObservers;
int32_t mParentCharsetSource;
nsCString mOriginalUriString;
diff --git a/docshell/base/nsIDocShell.idl b/docshell/base/nsIDocShell.idl
index d2faf3443ac..29b5f858e0e 100644
--- a/docshell/base/nsIDocShell.idl
+++ b/docshell/base/nsIDocShell.idl
@@ -597,12 +597,12 @@ interface nsIDocShell : nsIDocShellTreeItem
*
* XXX Could this be replaced by a boolean?
*/
- attribute nsIAtom forcedCharset;
+ attribute ACString forcedCharset;
/**
* In a child docshell, this is the charset of the parent docshell
*/
- attribute nsIAtom parentCharset;
+ attribute ACString parentCharset;
/*
* In a child docshell, this is the source of parentCharset
diff --git a/docshell/test/unit/test_bug442584.js b/docshell/test/unit/test_bug442584.js
index 2e487201495..75df23ab4fc 100644
--- a/docshell/test/unit/test_bug442584.js
+++ b/docshell/test/unit/test_bug442584.js
@@ -14,12 +14,12 @@ function run_test() {
}
// Make sure the queue has items in it...
- var queue = prefetch.enumerateQueue(true, false);
+ var queue = prefetch.enumerateQueue();
do_check_true(queue.hasMoreElements());
// Now disable the pref to force the queue to empty...
prefs.setBoolPref("network.prefetch-next", false);
- queue = prefetch.enumerateQueue(true, false);
+ queue = prefetch.enumerateQueue();
do_check_false(queue.hasMoreElements());
// Now reenable the pref, and add more items to the queue.
@@ -28,7 +28,7 @@ function run_test() {
var uri = ios.newURI("http://localhost/" + i, null, null);
prefetch.prefetchURI(uri, uri, null, true);
}
- queue = prefetch.enumerateQueue(true, false);
+ queue = prefetch.enumerateQueue();
do_check_true(queue.hasMoreElements());
}
diff --git a/dom/base/DOMError.h b/dom/base/DOMError.h
index bcd6d012d8a..ab32772ff87 100644
--- a/dom/base/DOMError.h
+++ b/dom/base/DOMError.h
@@ -11,10 +11,9 @@
#include "mozilla/ErrorResult.h"
#include "mozilla/dom/BindingUtils.h"
#include "nsCycleCollectionParticipant.h"
+#include "nsPIDOMWindow.h"
#include "nsWrapperCache.h"
-class nsPIDOMWindow;
-
namespace mozilla {
namespace dom {
diff --git a/dom/base/Navigator.cpp b/dom/base/Navigator.cpp
index c4ac39ebb23..f3070a5809a 100644
--- a/dom/base/Navigator.cpp
+++ b/dom/base/Navigator.cpp
@@ -1437,8 +1437,9 @@ Navigator::EnsureMessagesManager()
NS_ENSURE_TRUE(gpi, NS_ERROR_FAILURE);
// We don't do anything with the return value.
- JS::Value prop_val = JSVAL_VOID;
- rv = gpi->Init(window, &prop_val);
+ AutoJSContext cx;
+ JS::Rooted prop_val(cx);
+ rv = gpi->Init(window, prop_val.address());
NS_ENSURE_SUCCESS(rv, rv);
mMessagesManager = messageManager.forget();
diff --git a/dom/base/nsDOMClassInfo.cpp b/dom/base/nsDOMClassInfo.cpp
index cebdfeac6d9..55e1e338118 100644
--- a/dom/base/nsDOMClassInfo.cpp
+++ b/dom/base/nsDOMClassInfo.cpp
@@ -1081,9 +1081,9 @@ WrapNativeParent(JSContext *cx, JS::Handle scope, nsISupports *native
JS::Rooted obj(cx, nativeWrapperCache->GetWrapper());
if (obj) {
#ifdef DEBUG
- jsval debugVal;
+ JS::Rooted debugVal(cx);
nsresult rv = WrapNative(cx, scope, native, nativeWrapperCache, false,
- &debugVal);
+ debugVal.address());
NS_ASSERTION(NS_SUCCEEDED(rv) && JSVAL_TO_OBJECT(debugVal) == obj,
"Unexpected object in nsWrapperCache");
#endif
@@ -2534,8 +2534,8 @@ nsDOMClassInfo::PostCreatePrototype(JSContext * cx, JSObject * aProto)
}
#ifdef DEBUG
- JSObject *proto2;
- JS_GetPrototype(cx, proto, &proto2);
+ JS::Rooted proto2(cx);
+ JS_GetPrototype(cx, proto, proto2.address());
NS_ASSERTION(proto2 && JS_GetClass(proto2) == sObjectClass,
"Hmm, somebody did something evil?");
#endif
@@ -3002,7 +3002,7 @@ nsWindowSH::InstallGlobalScopePolluter(JSContext *cx, JS::Handle obj)
struct ResolveGlobalNameClosure
{
JSContext* cx;
- JSObject* obj;
+ JS::Handle obj;
bool* retval;
};
@@ -3011,10 +3011,10 @@ ResolveGlobalName(const nsAString& aName, void* aClosure)
{
ResolveGlobalNameClosure* closure =
static_cast(aClosure);
- JS::Value dummy;
+ JS::Rooted dummy(closure->cx);
bool ok = JS_LookupUCProperty(closure->cx, closure->obj,
aName.BeginReading(), aName.Length(),
- &dummy);
+ dummy.address());
if (!ok) {
*closure->retval = false;
return PL_DHASH_STOP;
@@ -3152,8 +3152,9 @@ BaseStubConstructor(nsIWeakReference* aWeakOwner,
rooter.changeLength(i + 1);
}
- JS::Value frval;
- bool ret = JS_CallFunctionValue(cx, thisObject, funval, argc, argv, &frval);
+ JS::Rooted frval(cx);
+ bool ret = JS_CallFunctionValue(cx, thisObject, funval, argc, argv,
+ frval.address());
if (!ret) {
return NS_ERROR_FAILURE;
@@ -4813,10 +4814,10 @@ nsWindowSH::NewResolve(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
}
if (proto) {
JS::Rooted pobj(cx);
- jsval val;
+ JS::Rooted val(cx);
if (!::JS_LookupPropertyWithFlagsById(cx, proto, id, flags,
- pobj.address(), &val)) {
+ pobj.address(), val.address())) {
*_retval = JS_FALSE;
return NS_OK;
diff --git a/dom/base/nsDOMWindowUtils.cpp b/dom/base/nsDOMWindowUtils.cpp
index ed6f29cd6d4..6ee5eb55fe5 100644
--- a/dom/base/nsDOMWindowUtils.cpp
+++ b/dom/base/nsDOMWindowUtils.cpp
@@ -4,6 +4,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "mozilla/layers/CompositorParent.h"
+#include "mozilla/layers/PLayerTransactionChild.h"
#include "nsIDocShell.h"
#include "nsPresContext.h"
#include "nsDOMClassInfoID.h"
@@ -75,6 +76,9 @@
#include "nsIScriptError.h"
#include "nsIAppShell.h"
#include "nsWidgetsCID.h"
+#include "FrameLayerBuilder.h"
+#include "nsDisplayList.h"
+#include "nsROCSSPrimitiveValue.h"
#ifdef XP_WIN
#undef GetClassName
@@ -3364,3 +3368,58 @@ nsDOMWindowUtils::RunBeforeNextEvent(nsIRunnable *runnable)
return appShell->RunBeforeNextEvent(runnable);
}
+NS_IMETHODIMP
+nsDOMWindowUtils::GetOMTAOrComputedStyle(nsIDOMNode* aNode,
+ const nsAString& aProperty,
+ nsAString& aResult)
+{
+ aResult.Truncate();
+ ErrorResult rv;
+ nsCOMPtr element = do_QueryInterface(aNode);
+ if (!element) {
+ return NS_ERROR_INVALID_ARG;
+ }
+
+ nsRefPtr cssValue = nullptr;
+ nsIFrame* frame = element->GetPrimaryFrame();
+ if (frame) {
+ if (aProperty.EqualsLiteral("opacity")) {
+ Layer* layer = FrameLayerBuilder::GetDedicatedLayer(frame, nsDisplayItem::TYPE_OPACITY);
+ if (layer) {
+ float value;
+ ShadowLayerForwarder* forwarder = layer->Manager()->AsShadowForwarder();
+ if (forwarder) {
+ forwarder->GetShadowManager()->SendGetOpacity(layer->AsShadowableLayer()->GetShadow(), &value);
+ cssValue = new nsROCSSPrimitiveValue;
+ cssValue->SetNumber(value);
+ }
+ }
+ } else if (aProperty.EqualsLiteral("transform")) {
+ Layer* layer = FrameLayerBuilder::GetDedicatedLayer(frame, nsDisplayItem::TYPE_TRANSFORM);
+ if (layer) {
+ gfx3DMatrix matrix;
+ ShadowLayerForwarder* forwarder = layer->Manager()->AsShadowForwarder();
+ if (forwarder) {
+ forwarder->GetShadowManager()->SendGetTransform(layer->AsShadowableLayer()->GetShadow(), &matrix);
+ cssValue = nsComputedDOMStyle::MatrixToCSSValue(matrix);
+ }
+ }
+ }
+ }
+
+ if (cssValue) {
+ nsString text;
+ cssValue->GetCssText(text, rv);
+ aResult.Assign(text);
+ return rv.ErrorCode();
+ }
+
+ nsCOMPtr elem = do_QueryInterface(element);
+ nsCOMPtr style;
+ nsresult res = element->GetCurrentDoc()->GetWindow()->
+ GetComputedStyle(elem, aProperty, getter_AddRefs(style));
+ NS_ENSURE_SUCCESS(res, res);
+
+ return style->GetPropertyValue(aProperty, aResult);
+}
+
diff --git a/dom/base/nsIScriptContext.h b/dom/base/nsIScriptContext.h
index 2de1386c838..279d1a76869 100644
--- a/dom/base/nsIScriptContext.h
+++ b/dom/base/nsIScriptContext.h
@@ -186,7 +186,7 @@ public:
virtual void ScriptEvaluated(bool aTerminated) = 0;
virtual nsresult Serialize(nsIObjectOutputStream* aStream,
- JSScript* aScriptObject) = 0;
+ JS::Handle aScriptObject) = 0;
/* Deserialize a script from a stream.
*/
diff --git a/dom/base/nsJSEnvironment.cpp b/dom/base/nsJSEnvironment.cpp
index 784be19a1aa..945637557c8 100644
--- a/dom/base/nsJSEnvironment.cpp
+++ b/dom/base/nsJSEnvironment.cpp
@@ -1395,8 +1395,8 @@ nsJSContext::ExecuteScript(JSScript* aScriptObject_,
// The result of evaluation, used only if there were no errors. This need
// not be a GC root currently, provided we run the GC only from the
// operation callback or from ScriptEvaluated.
- JS::Value val;
- if (!JS_ExecuteScript(mContext, aScopeObject, aScriptObject, &val)) {
+ JS::Rooted val(mContext);
+ if (!JS_ExecuteScript(mContext, aScopeObject, aScriptObject, val.address())) {
ReportPendingException();
}
--mExecuteDepth;
@@ -1517,7 +1517,8 @@ nsJSContext::BindCompiledEventHandler(nsISupports* aTarget,
// serialization
nsresult
-nsJSContext::Serialize(nsIObjectOutputStream* aStream, JSScript* aScriptObject)
+nsJSContext::Serialize(nsIObjectOutputStream* aStream,
+ JS::Handle aScriptObject)
{
if (!aScriptObject)
return NS_ERROR_FAILURE;
diff --git a/dom/base/nsJSEnvironment.h b/dom/base/nsJSEnvironment.h
index b5da238b07d..d4679b9af63 100644
--- a/dom/base/nsJSEnvironment.h
+++ b/dom/base/nsJSEnvironment.h
@@ -90,7 +90,8 @@ public:
virtual void WillInitializeContext();
virtual void DidInitializeContext();
- virtual nsresult Serialize(nsIObjectOutputStream* aStream, JSScript* aScriptObject);
+ virtual nsresult Serialize(nsIObjectOutputStream* aStream,
+ JS::Handle aScriptObject);
virtual nsresult Deserialize(nsIObjectInputStream* aStream,
JS::MutableHandle aResult);
diff --git a/dom/bindings/BindingUtils.cpp b/dom/bindings/BindingUtils.cpp
index a0dc4b68c53..21c65a81d57 100644
--- a/dom/bindings/BindingUtils.cpp
+++ b/dom/bindings/BindingUtils.cpp
@@ -698,7 +698,7 @@ QueryInterface(JSContext* cx, unsigned argc, JS::Value* vp)
}
nsIJSID* iid;
- xpc_qsSelfRef iidRef;
+ SelfRef iidRef;
if (NS_FAILED(xpc_qsUnwrapArg(cx, argv[0], &iid, &iidRef.ptr,
&argv[0]))) {
return Throw(cx, NS_ERROR_XPC_BAD_CONVERT_JS);
@@ -1322,7 +1322,7 @@ MainThreadDictionaryBase::ParseJSON(JSContext *aCx,
}
return JS_ParseJSON(aCx,
static_cast(PromiseFlatString(aJSON).get()),
- aJSON.Length(), aVal.address());
+ aJSON.Length(), aVal);
}
static JSString*
@@ -1635,14 +1635,13 @@ GlobalObject::GlobalObject(JSContext* aCx, JSObject* aObject)
return;
}
- JS::Value val;
- val.setObject(*mGlobalJSObject);
+ JS::Rooted val(aCx, JS::ObjectValue(*mGlobalJSObject));
// Switch this to UnwrapDOMObjectToISupports once our global objects are
// using new bindings.
nsresult rv = xpc_qsUnwrapArg(aCx, val, &mGlobalObject,
static_cast(getter_AddRefs(mGlobalObjectRef)),
- &val);
+ val.address());
if (NS_FAILED(rv)) {
mGlobalObject = nullptr;
Throw(aCx, NS_ERROR_XPC_BAD_CONVERT_JS);
@@ -1732,6 +1731,17 @@ ReportLenientThisUnwrappingFailure(JSContext* cx, JS::Handle obj)
return true;
}
+bool
+RegisterForDeferredFinalization(DeferredFinalizeStartFunction start,
+ DeferredFinalizeFunction run)
+{
+ XPCJSRuntime *rt = nsXPConnect::GetRuntimeInstance();
+ NS_ENSURE_TRUE(rt, false);
+
+ rt->RegisterDeferredFinalize(start, run);
+ return true;
+}
+
// Date implementation methods
Date::Date() :
mMsecSinceEpoch(UnspecifiedNaN())
diff --git a/dom/bindings/BindingUtils.h b/dom/bindings/BindingUtils.h
index 511c2ee605f..8ee7cee3a42 100644
--- a/dom/bindings/BindingUtils.h
+++ b/dom/bindings/BindingUtils.h
@@ -27,9 +27,36 @@
class nsPIDOMWindow;
+extern nsresult
+xpc_qsUnwrapArgImpl(JSContext* cx, jsval v, const nsIID& iid, void** ppArg,
+ nsISupports** ppArgRef, jsval* vp);
+
namespace mozilla {
namespace dom {
+struct SelfRef
+{
+ SelfRef() : ptr(nullptr) {}
+ explicit SelfRef(nsISupports *p) : ptr(p) {}
+ ~SelfRef() { NS_IF_RELEASE(ptr); }
+
+ nsISupports* ptr;
+};
+
+/** Convert a jsval to an XPCOM pointer. */
+template
+inline nsresult
+UnwrapArg(JSContext* cx, jsval v, Interface** ppArg,
+ StrongRefType** ppArgRef, jsval* vp)
+{
+ nsISupports* argRef = *ppArgRef;
+ nsresult rv = xpc_qsUnwrapArgImpl(cx, v, NS_GET_TEMPLATE_IID(Interface),
+ reinterpret_cast(ppArg), &argRef,
+ vp);
+ *ppArgRef = static_cast(argRef);
+ return rv;
+}
+
bool
ThrowErrorMessage(JSContext* aCx, const ErrNum aErrorNumber, ...);
@@ -2001,6 +2028,10 @@ bool
GetWindowForJSImplementedObject(JSContext* cx, JS::Handle obj,
nsPIDOMWindow** window);
+bool
+RegisterForDeferredFinalization(DeferredFinalizeStartFunction start,
+ DeferredFinalizeFunction run);
+
} // namespace dom
} // namespace mozilla
diff --git a/dom/bindings/Bindings.conf b/dom/bindings/Bindings.conf
index 89aae18b085..45d2777c4eb 100644
--- a/dom/bindings/Bindings.conf
+++ b/dom/bindings/Bindings.conf
@@ -403,6 +403,8 @@ DOMInterfaces = {
'HTMLCollection': {
'nativeType': 'nsIHTMLCollection',
+ # nsContentList.h pulls in nsIHTMLCollection.h
+ 'headerFile': 'nsContentList.h',
'resultNotAddRefed': [ 'item' ]
},
diff --git a/dom/bindings/Codegen.py b/dom/bindings/Codegen.py
index c725a0bd3d4..4acdb938c9b 100644
--- a/dom/bindings/Codegen.py
+++ b/dom/bindings/Codegen.py
@@ -1006,23 +1006,17 @@ def finalizeHook(descriptor, hookName, context):
if descriptor.workers:
finalize += "self->Release();"
elif descriptor.nativeOwnership == 'nsisupports':
- finalize += """XPCJSRuntime *rt = nsXPConnect::GetRuntimeInstance();
-if (rt) {
- rt->DeferredRelease(reinterpret_cast(self));
-} else {
- NS_RELEASE(self);
-}"""
+ finalize += "xpc::DeferredRelease(reinterpret_cast(self));"
else:
smartPtr = DeferredFinalizeSmartPtr(descriptor)
finalize += """static bool registered = false;
if (!registered) {
- XPCJSRuntime *rt = nsXPConnect::GetRuntimeInstance();
- if (!rt) {
+ if (!RegisterForDeferredFinalization(GetDeferredFinalizePointers,
+ DeferredFinalize)) {
%(smartPtr)s dying;
Take(dying, self);
return;
}
- rt->RegisterDeferredFinalize(GetDeferredFinalizePointers, DeferredFinalize);
registered = true;
}
if (!sDeferredFinalizePointers) {
@@ -2312,9 +2306,9 @@ class CastableObjectUnwrapper():
# not.
self.substitution["codeOnFailure"] = CGIndenter(CGGeneric(string.Template(
"${type} *objPtr;\n"
- "xpc_qsSelfRef objRef;\n"
+ "SelfRef objRef;\n"
"JS::Rooted val(cx, JS::ObjectValue(*${source}));\n"
- "nsresult rv = xpc_qsUnwrapArg<${type}>(cx, val, &objPtr, &objRef.ptr, val.address());\n"
+ "nsresult rv = UnwrapArg<${type}>(cx, val, &objPtr, &objRef.ptr, val.address());\n"
"if (NS_FAILED(rv)) {\n"
"${codeOnFailure}\n"
"}\n"
@@ -3115,7 +3109,7 @@ for (uint32_t i = 0; i < length; ++i) {
templateBody += (
"JS::Rooted tmpVal(cx, ${val});\n" +
typePtr + " tmp;\n"
- "if (NS_FAILED(xpc_qsUnwrapArg<" + typeName + ">(cx, ${val}, &tmp, static_cast<" + typeName + "**>(getter_AddRefs(${holderName})), tmpVal.address()))) {\n")
+ "if (NS_FAILED(UnwrapArg<" + typeName + ">(cx, ${val}, &tmp, static_cast<" + typeName + "**>(getter_AddRefs(${holderName})), tmpVal.address()))) {\n")
templateBody += CGIndenter(onFailureBadType(failureCode,
descriptor.interface.identifier.name)).define()
templateBody += ("}\n"
@@ -3524,7 +3518,7 @@ for (uint32_t i = 0; i < length; ++i) {
template = (
"if (%s) {\n"
" ${declName}.SetNull();\n"
- "} else if (!ValueToPrimitive<%s, %s>(cx, ${val}, &%s)) {\n"
+ "} else if (!ValueToPrimitive<%s, %s>(cx, ${valHandle}, &%s)) {\n"
"%s\n"
"}" % (nullCondition, typeName, conversionBehavior,
writeLoc, exceptionCodeIndented.define()))
@@ -3534,7 +3528,7 @@ for (uint32_t i = 0; i < length; ++i) {
writeLoc = "${declName}"
readLoc = writeLoc
template = (
- "if (!ValueToPrimitive<%s, %s>(cx, ${val}, &%s)) {\n"
+ "if (!ValueToPrimitive<%s, %s>(cx, ${valHandle}, &%s)) {\n"
"%s\n"
"}" % (typeName, conversionBehavior, writeLoc,
exceptionCodeIndented.define()))
@@ -5377,9 +5371,9 @@ class CGStaticSetter(CGAbstractStaticBindingMethod):
nativeName = CGSpecializedSetter.makeNativeName(self.descriptor,
self.attr)
argv = CGGeneric("""JS::Value* argv = JS_ARGV(cx, vp);
-JS::Value undef = JS::UndefinedValue();
+JS::Rooted undef(cx, JS::UndefinedValue());
if (argc == 0) {
- argv = &undef;
+ argv = undef.address();
}""")
call = CGSetterCall(self.attr.type, nativeName, self.descriptor,
self.attr)
@@ -8213,6 +8207,8 @@ class CGBindingRoot(CGThing):
def descriptorHasChromeOnlyMembers(desc):
return any(isChromeOnly(a) for a in desc.interface.members)
hasChromeOnlyMembers = any(descriptorHasChromeOnlyMembers(d) for d in descriptors)
+ # XXXkhuey ugly hack but this is going away soon.
+ isEventTarget = webIDLFile.endswith("EventTarget.webidl")
hasWorkerStuff = len(config.getDescriptors(webIDLFile=webIDLFile,
workers=True)) != 0
mainDictionaries = config.getDictionaries(webIDLFile=webIDLFile,
@@ -8317,10 +8313,7 @@ class CGBindingRoot(CGThing):
['mozilla/dom/BindingUtils.h',
'mozilla/dom/Nullable.h',
'PrimitiveConversions.h',
- 'XPCQuickStubs.h',
- 'XPCWrapper.h',
'WrapperFactory.h',
- 'nsDOMQS.h',
# Have to include nsDOMQS.h to get fast arg unwrapping
# for old-binding things with castability.
'nsDOMQS.h'
@@ -8330,7 +8323,8 @@ class CGBindingRoot(CGThing):
+ (['mozilla/dom/NonRefcountedDOMObject.h'] if hasOwnedDescriptors else [])
+ (['nsContentUtils.h'] if requiresContentUtils else [])
+ (['nsCxPusher.h'] if requiresContentUtils else [])
- + (['AccessCheck.h'] if hasChromeOnlyMembers else []),
+ + (['AccessCheck.h'] if hasChromeOnlyMembers else [])
+ + (['xpcprivate.h'] if isEventTarget else []),
curr,
config,
jsImplemented)
diff --git a/dom/bindings/PrimitiveConversions.h b/dom/bindings/PrimitiveConversions.h
index 3104b5b96db..9ce36d0d1da 100644
--- a/dom/bindings/PrimitiveConversions.h
+++ b/dom/bindings/PrimitiveConversions.h
@@ -91,7 +91,8 @@ struct DisallowedConversion {
typedef int intermediateType;
private:
- static inline bool converter(JSContext* cx, JS::Value v, jstype* retval) {
+ static inline bool converter(JSContext* cx, JS::Handle v,
+ jstype* retval) {
MOZ_NOT_REACHED("This should never be instantiated!");
return false;
}
@@ -128,7 +129,8 @@ struct PrimitiveConversionTraits_smallInt {
// corresponding unsigned type.
typedef int32_t jstype;
typedef int32_t intermediateType;
- static inline bool converter(JSContext* cx, JS::Value v, jstype* retval) {
+ static inline bool converter(JSContext* cx, JS::Handle v,
+ jstype* retval) {
return JS::ToInt32(cx, v, retval);
}
};
@@ -157,7 +159,8 @@ template<>
struct PrimitiveConversionTraits {
typedef int64_t jstype;
typedef int64_t intermediateType;
- static inline bool converter(JSContext* cx, JS::Value v, jstype* retval) {
+ static inline bool converter(JSContext* cx, JS::Handle v,
+ jstype* retval) {
return JS::ToInt64(cx, v, retval);
}
};
@@ -166,7 +169,8 @@ template<>
struct PrimitiveConversionTraits {
typedef uint64_t jstype;
typedef uint64_t intermediateType;
- static inline bool converter(JSContext* cx, JS::Value v, jstype* retval) {
+ static inline bool converter(JSContext* cx, JS::Handle v,
+ jstype* retval) {
return JS::ToUint64(cx, v, retval);
}
};
@@ -206,7 +210,8 @@ struct PrimitiveConversionTraits_ToCheckedIntHelper {
typedef T jstype;
typedef T intermediateType;
- static inline bool converter(JSContext* cx, JS::Value v, jstype* retval) {
+ static inline bool converter(JSContext* cx, JS::Handle v,
+ jstype* retval) {
double intermediate;
if (!JS::ToNumber(cx, v, &intermediate)) {
return false;
@@ -303,7 +308,8 @@ template<>
struct PrimitiveConversionTraits {
typedef JSBool jstype;
typedef bool intermediateType;
- static inline bool converter(JSContext* /* unused */, JS::Value v, jstype* retval) {
+ static inline bool converter(JSContext* /* unused */, JS::Handle v,
+ jstype* retval) {
*retval = JS::ToBoolean(v);
return true;
}
@@ -319,7 +325,8 @@ struct PrimitiveConversionTraits : public DisallowedConversion v,
+ jstype* retval) {
return JS::ToNumber(cx, v, retval);
}
};
@@ -333,7 +340,7 @@ struct PrimitiveConversionTraits : PrimitiveConversionTraits_f
template
-bool ValueToPrimitive(JSContext* cx, JS::Value v, T* retval)
+bool ValueToPrimitive(JSContext* cx, JS::Handle v, T* retval)
{
typename PrimitiveConversionTraits::jstype t;
if (!PrimitiveConversionTraits::converter(cx, v, &t))
diff --git a/dom/bluetooth/BluetoothHfpManager.cpp b/dom/bluetooth/BluetoothHfpManager.cpp
index 2ae70796010..dfac773e1b3 100644
--- a/dom/bluetooth/BluetoothHfpManager.cpp
+++ b/dom/bluetooth/BluetoothHfpManager.cpp
@@ -538,7 +538,7 @@ BluetoothHfpManager::HandleVolumeChanged(const nsAString& aData)
return NS_OK;
}
- JS::Value val;
+ JS::Rooted val(cx);
if (!JS_ParseJSON(cx, aData.BeginReading(), aData.Length(), &val)) {
return JS_ReportPendingException(cx) ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
}
diff --git a/dom/bluetooth/BluetoothOppManager.cpp b/dom/bluetooth/BluetoothOppManager.cpp
index dc2dcc23fc5..6bd237b697d 100644
--- a/dom/bluetooth/BluetoothOppManager.cpp
+++ b/dom/bluetooth/BluetoothOppManager.cpp
@@ -461,6 +461,7 @@ BluetoothOppManager::AfterOppDisconnected()
mConnected = false;
mLastCommand = 0;
mPacketLeftLength = 0;
+ mDsFile = nullptr;
ClearQueue();
@@ -494,6 +495,7 @@ BluetoothOppManager::DeleteReceivedFile()
if (mDsFile && mDsFile->mFile) {
mDsFile->mFile->Remove(false);
+ mDsFile = nullptr;
}
}
diff --git a/dom/bluetooth/BluetoothService.cpp b/dom/bluetooth/BluetoothService.cpp
index ce79f47c4b8..64bc3284a64 100644
--- a/dom/bluetooth/BluetoothService.cpp
+++ b/dom/bluetooth/BluetoothService.cpp
@@ -555,7 +555,7 @@ BluetoothService::HandleSettingsChanged(const nsAString& aData)
return NS_OK;
}
- JS::Value val;
+ JS::Rooted val(cx);
if (!JS_ParseJSON(cx, aData.BeginReading(), aData.Length(), &val)) {
return JS_ReportPendingException(cx) ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
}
diff --git a/dom/browser-element/BrowserElementParent.h b/dom/browser-element/BrowserElementParent.h
index 8e50a127bd0..61e26dc2d7e 100644
--- a/dom/browser-element/BrowserElementParent.h
+++ b/dom/browser-element/BrowserElementParent.h
@@ -6,6 +6,8 @@
#define mozilla_BrowserElementHelpers_h
#include "nsAString.h"
+#include "mozilla/gfx/Point.h"
+#include "mozilla/gfx/Rect.h"
class nsIDOMWindow;
class nsIURI;
@@ -16,11 +18,6 @@ namespace dom {
class TabParent;
}
-namespace gfx{
-struct Rect;
-struct Size;
-}
-
/**
* BrowserElementParent implements a portion of the parent-process side of
*