Bug 1381483 - Remove 'using namespace std' from RecordedEventImpl.h r=lsalzman
authorJeff Muizelaar <jmuizelaar@mozilla.com>
Mon, 17 Jul 2017 14:54:50 -0400
changeset 418082 43019e9b078e01aca1a9e963bd9936e7e6a56c9c
parent 418081 745cf0c90bd74416ea40ba62f6cad6ffa0f9a7a0
child 418083 30af079927c76456ba8959c7df19d181ff7bc393
push id7566
push usermtabara@mozilla.com
push dateWed, 02 Aug 2017 08:25:16 +0000
treeherdermozilla-beta@86913f512c3c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslsalzman
bugs1381483
milestone56.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1381483 - Remove 'using namespace std' from RecordedEventImpl.h r=lsalzman We don't want to have 'using' statements in headers.
gfx/2d/InlineTranslator.cpp
gfx/2d/RecordedEventImpl.h
--- a/gfx/2d/InlineTranslator.cpp
+++ b/gfx/2d/InlineTranslator.cpp
@@ -25,17 +25,17 @@ InlineTranslator::InlineTranslator(DrawT
 }
 
 bool
 InlineTranslator::TranslateRecording(char *aData, size_t aLen)
 {
   // an istream like class for reading from memory
   struct MemReader {
     MemReader(char *aData, size_t aLen) : mData(aData), mEnd(aData + aLen) {}
-    void read(char* s, streamsize n) {
+    void read(char* s, std::streamsize n) {
       if (n <= (mEnd - mData)) {
         memcpy(s, mData, n);
         mData += n;
       } else {
         // We've requested more data than is available
         // set the Reader into an eof state
         mData = mEnd + 1;
       }
--- a/gfx/2d/RecordedEventImpl.h
+++ b/gfx/2d/RecordedEventImpl.h
@@ -1199,19 +1199,16 @@ private:
   uint32_t mIndex;
   ReferencePtr mInputFilter;
   ReferencePtr mInputSurface;
 
   template<class S>
   MOZ_IMPLICIT RecordedFilterNodeSetInput(S &aStream);
 };
 
-
-using namespace std;
-
 static std::string NameFromBackend(BackendType aType)
 {
   switch (aType) {
   case BackendType::NONE:
     return "None";
   case BackendType::DIRECT2D:
     return "Direct2D";
   default:
@@ -1511,17 +1508,17 @@ RecordedDrawTargetCreation::RecordedDraw
       aStream.read((char*)dataSurf->GetData() + y * dataSurf->Stride(),
                     BytesPerPixel(mFormat) * mSize.width);
     }
     mExistingData = dataSurf;
   }
 }
 
 inline void
-RecordedDrawTargetCreation::OutputSimpleEventInfo(stringstream &aStringStream) const
+RecordedDrawTargetCreation::OutputSimpleEventInfo(std::stringstream &aStringStream) const
 {
   aStringStream << "[" << mRefPtr << "] DrawTarget Creation (Type: " << NameFromBackend(mBackendType) << ", Size: " << mSize.width << "x" << mSize.height << ")";
 }
 
 
 inline bool
 RecordedDrawTargetDestruction::PlayEvent(Translator *aTranslator) const
 {
@@ -1539,17 +1536,17 @@ RecordedDrawTargetDestruction::Record(S 
 template<class S>
 RecordedDrawTargetDestruction::RecordedDrawTargetDestruction(S &aStream)
   : RecordedEventDerived(DRAWTARGETDESTRUCTION)
 {
   ReadElement(aStream, mRefPtr);
 }
 
 inline void
-RecordedDrawTargetDestruction::OutputSimpleEventInfo(stringstream &aStringStream) const
+RecordedDrawTargetDestruction::OutputSimpleEventInfo(std::stringstream &aStringStream) const
 {
   aStringStream << "[" << mRefPtr << "] DrawTarget Destruction";
 }
 
 inline bool
 RecordedCreateSimilarDrawTarget::PlayEvent(Translator *aTranslator) const
 {
   RefPtr<DrawTarget> newDT =
@@ -1579,17 +1576,17 @@ RecordedCreateSimilarDrawTarget::Recorde
   : RecordedEventDerived(CREATESIMILARDRAWTARGET)
 {
   ReadElement(aStream, mRefPtr);
   ReadElement(aStream, mSize);
   ReadElement(aStream, mFormat);
 }
 
 inline void
-RecordedCreateSimilarDrawTarget::OutputSimpleEventInfo(stringstream &aStringStream) const
+RecordedCreateSimilarDrawTarget::OutputSimpleEventInfo(std::stringstream &aStringStream) const
 {
   aStringStream << "[" << mRefPtr << "] CreateSimilarDrawTarget (Size: " << mSize.width << "x" << mSize.height << ")";
 }
 
 struct GenericPattern
 {
   GenericPattern(const PatternStorage &aStorage, Translator *aTranslator)
     : mPattern(nullptr), mTranslator(aTranslator)
@@ -1678,17 +1675,17 @@ RecordedFillRect::RecordedFillRect(S &aS
   : RecordedDrawingEvent(FILLRECT, aStream)
 {
   ReadElement(aStream, mRect);
   ReadElement(aStream, mOptions);
   ReadPatternData(aStream, mPattern);
 }
 
 inline void
-RecordedFillRect::OutputSimpleEventInfo(stringstream &aStringStream) const
+RecordedFillRect::OutputSimpleEventInfo(std::stringstream &aStringStream) const
 {
   aStringStream << "[" << mDT << "] FillRect (" << mRect.x << ", " << mRect.y << " - " << mRect.width << " x " << mRect.height << ") ";
   OutputSimplePatternInfo(mPattern, aStringStream);
 }
 
 inline bool
 RecordedStrokeRect::PlayEvent(Translator *aTranslator) const
 {
@@ -1713,17 +1710,17 @@ RecordedStrokeRect::RecordedStrokeRect(S
 {
   ReadElement(aStream, mRect);
   ReadElement(aStream, mOptions);
   ReadPatternData(aStream, mPattern);
   ReadStrokeOptions(aStream, mStrokeOptions);
 }
 
 inline void
-RecordedStrokeRect::OutputSimpleEventInfo(stringstream &aStringStream) const
+RecordedStrokeRect::OutputSimpleEventInfo(std::stringstream &aStringStream) const
 {
   aStringStream << "[" << mDT << "] StrokeRect (" << mRect.x << ", " << mRect.y << " - " << mRect.width << " x " << mRect.height
                 << ") LineWidth: " << mStrokeOptions.mLineWidth << "px ";
   OutputSimplePatternInfo(mPattern, aStringStream);
 }
 
 inline bool
 RecordedStrokeLine::PlayEvent(Translator *aTranslator) const
@@ -1751,17 +1748,17 @@ RecordedStrokeLine::RecordedStrokeLine(S
   ReadElement(aStream, mBegin);
   ReadElement(aStream, mEnd);
   ReadElement(aStream, mOptions);
   ReadPatternData(aStream, mPattern);
   ReadStrokeOptions(aStream, mStrokeOptions);
 }
 
 inline void
-RecordedStrokeLine::OutputSimpleEventInfo(stringstream &aStringStream) const
+RecordedStrokeLine::OutputSimpleEventInfo(std::stringstream &aStringStream) const
 {
   aStringStream << "[" << mDT << "] StrokeLine (" << mBegin.x << ", " << mBegin.y << " - " << mEnd.x << ", " << mEnd.y
                 << ") LineWidth: " << mStrokeOptions.mLineWidth << "px ";
   OutputSimplePatternInfo(mPattern, aStringStream);
 }
 
 inline bool
 RecordedFill::PlayEvent(Translator *aTranslator) const
@@ -1785,17 +1782,17 @@ RecordedFill::Record(S &aStream) const
 {
   RecordedDrawingEvent::Record(aStream);
   WriteElement(aStream, mPath);
   WriteElement(aStream, mOptions);
   RecordPatternData(aStream, mPattern);
 }
 
 inline void
-RecordedFill::OutputSimpleEventInfo(stringstream &aStringStream) const
+RecordedFill::OutputSimpleEventInfo(std::stringstream &aStringStream) const
 {
   aStringStream << "[" << mDT << "] Fill (" << mPath << ") ";
   OutputSimplePatternInfo(mPattern, aStringStream);
 }
 
 inline
 RecordedFillGlyphs::~RecordedFillGlyphs()
 {
@@ -1832,17 +1829,17 @@ RecordedFillGlyphs::Record(S &aStream) c
   WriteElement(aStream, mScaledFont);
   WriteElement(aStream, mOptions);
   RecordPatternData(aStream, mPattern);
   WriteElement(aStream, mNumGlyphs);
   aStream.write((char*)mGlyphs, sizeof(Glyph) * mNumGlyphs);
 }
 
 inline void
-RecordedFillGlyphs::OutputSimpleEventInfo(stringstream &aStringStream) const
+RecordedFillGlyphs::OutputSimpleEventInfo(std::stringstream &aStringStream) const
 {
   aStringStream << "[" << mDT << "] FillGlyphs (" << mScaledFont << ") ";
   OutputSimplePatternInfo(mPattern, aStringStream);
 }
 
 inline bool
 RecordedMask::PlayEvent(Translator *aTranslator) const
 {
@@ -1865,17 +1862,17 @@ RecordedMask::Record(S &aStream) const
 {
   RecordedDrawingEvent::Record(aStream);
   WriteElement(aStream, mOptions);
   RecordPatternData(aStream, mSource);
   RecordPatternData(aStream, mMask);
 }
 
 inline void
-RecordedMask::OutputSimpleEventInfo(stringstream &aStringStream) const
+RecordedMask::OutputSimpleEventInfo(std::stringstream &aStringStream) const
 {
   aStringStream << "[" << mDT << "] Mask (Source: ";
   OutputSimplePatternInfo(mSource, aStringStream);
   aStringStream << " Mask: ";
   OutputSimplePatternInfo(mMask, aStringStream);
 }
 
 inline bool
@@ -1902,17 +1899,17 @@ RecordedStroke::RecordedStroke(S &aStrea
 {
   ReadElement(aStream, mPath);
   ReadElement(aStream, mOptions);
   ReadPatternData(aStream, mPattern);
   ReadStrokeOptions(aStream, mStrokeOptions);
 }
 
 inline void
-RecordedStroke::OutputSimpleEventInfo(stringstream &aStringStream) const
+RecordedStroke::OutputSimpleEventInfo(std::stringstream &aStringStream) const
 {
   aStringStream << "[" << mDT << "] Stroke ("<< mPath << ") LineWidth: " << mStrokeOptions.mLineWidth << "px ";
   OutputSimplePatternInfo(mPattern, aStringStream);
 }
 
 inline bool
 RecordedClearRect::PlayEvent(Translator *aTranslator) const
 {
@@ -1931,17 +1928,17 @@ RecordedClearRect::Record(S &aStream) co
 template<class S>
 RecordedClearRect::RecordedClearRect(S &aStream)
   : RecordedDrawingEvent(CLEARRECT, aStream)
 {
     ReadElement(aStream, mRect);
 }
 
 inline void
-RecordedClearRect::OutputSimpleEventInfo(stringstream &aStringStream) const
+RecordedClearRect::OutputSimpleEventInfo(std::stringstream &aStringStream) const
 {
   aStringStream << "[" << mDT<< "] ClearRect (" << mRect.x << ", " << mRect.y << " - " << mRect.width << " x " << mRect.height << ") ";
 }
 
 inline bool
 RecordedCopySurface::PlayEvent(Translator *aTranslator) const
 {
 	aTranslator->LookupDrawTarget(mDT)->CopySurface(aTranslator->LookupSourceSurface(mSourceSurface),
@@ -1964,17 +1961,17 @@ RecordedCopySurface::RecordedCopySurface
   : RecordedDrawingEvent(COPYSURFACE, aStream)
 {
   ReadElement(aStream, mSourceSurface);
   ReadElement(aStream, mSourceRect);
   ReadElement(aStream, mDest);
 }
 
 inline void
-RecordedCopySurface::OutputSimpleEventInfo(stringstream &aStringStream) const
+RecordedCopySurface::OutputSimpleEventInfo(std::stringstream &aStringStream) const
 {
   aStringStream << "[" << mDT<< "] CopySurface (" << mSourceSurface << ")";
 }
 
 inline bool
 RecordedPushClip::PlayEvent(Translator *aTranslator) const
 {
   aTranslator->LookupDrawTarget(mDT)->PushClip(aTranslator->LookupPath(mPath));
@@ -1992,17 +1989,17 @@ RecordedPushClip::Record(S &aStream) con
 template<class S>
 RecordedPushClip::RecordedPushClip(S &aStream)
   : RecordedDrawingEvent(PUSHCLIP, aStream)
 {
   ReadElement(aStream, mPath);
 }
 
 inline void
-RecordedPushClip::OutputSimpleEventInfo(stringstream &aStringStream) const
+RecordedPushClip::OutputSimpleEventInfo(std::stringstream &aStringStream) const
 {
   aStringStream << "[" << mDT << "] PushClip (" << mPath << ") ";
 }
 
 inline bool
 RecordedPushClipRect::PlayEvent(Translator *aTranslator) const
 {
   aTranslator->LookupDrawTarget(mDT)->PushClipRect(mRect);
@@ -2020,17 +2017,17 @@ RecordedPushClipRect::Record(S &aStream)
 template<class S>
 RecordedPushClipRect::RecordedPushClipRect(S &aStream)
   : RecordedDrawingEvent(PUSHCLIPRECT, aStream)
 {
   ReadElement(aStream, mRect);
 }
 
 inline void
-RecordedPushClipRect::OutputSimpleEventInfo(stringstream &aStringStream) const
+RecordedPushClipRect::OutputSimpleEventInfo(std::stringstream &aStringStream) const
 {
   aStringStream << "[" << mDT << "] PushClipRect (" << mRect.x << ", " << mRect.y << " - " << mRect.width << " x " << mRect.height << ") ";
 }
 
 inline bool
 RecordedPopClip::PlayEvent(Translator *aTranslator) const
 {
   aTranslator->LookupDrawTarget(mDT)->PopClip();
@@ -2046,17 +2043,17 @@ RecordedPopClip::Record(S &aStream) cons
 
 template<class S>
 RecordedPopClip::RecordedPopClip(S &aStream)
   : RecordedDrawingEvent(POPCLIP, aStream)
 {
 }
 
 inline void
-RecordedPopClip::OutputSimpleEventInfo(stringstream &aStringStream) const
+RecordedPopClip::OutputSimpleEventInfo(std::stringstream &aStringStream) const
 {
   aStringStream << "[" << mDT << "] PopClip";
 }
 
 inline bool
 RecordedPushLayer::PlayEvent(Translator *aTranslator) const
 {
   SourceSurface* mask = mMask ? aTranslator->LookupSourceSurface(mMask)
@@ -2087,17 +2084,17 @@ RecordedPushLayer::RecordedPushLayer(S &
   ReadElement(aStream, mOpacity);
   ReadElement(aStream, mMask);
   ReadElement(aStream, mMaskTransform);
   ReadElement(aStream, mBounds);
   ReadElement(aStream, mCopyBackground);
 }
 
 inline void
-RecordedPushLayer::OutputSimpleEventInfo(stringstream &aStringStream) const
+RecordedPushLayer::OutputSimpleEventInfo(std::stringstream &aStringStream) const
 {
   aStringStream << "[" << mDT << "] PushPLayer (Opaque=" << mOpaque <<
     ", Opacity=" << mOpacity << ", Mask Ref=" << mMask << ") ";
 }
 
 inline bool
 RecordedPopLayer::PlayEvent(Translator *aTranslator) const
 {
@@ -2114,17 +2111,17 @@ RecordedPopLayer::Record(S &aStream) con
 
 template<class S>
 RecordedPopLayer::RecordedPopLayer(S &aStream)
   : RecordedDrawingEvent(POPLAYER, aStream)
 {
 }
 
 inline void
-RecordedPopLayer::OutputSimpleEventInfo(stringstream &aStringStream) const
+RecordedPopLayer::OutputSimpleEventInfo(std::stringstream &aStringStream) const
 {
   aStringStream << "[" << mDT << "] PopLayer";
 }
 
 inline bool
 RecordedSetTransform::PlayEvent(Translator *aTranslator) const
 {
   aTranslator->LookupDrawTarget(mDT)->SetTransform(mTransform);
@@ -2142,17 +2139,17 @@ RecordedSetTransform::Record(S &aStream)
 template<class S>
 RecordedSetTransform::RecordedSetTransform(S &aStream)
   : RecordedDrawingEvent(SETTRANSFORM, aStream)
 {
   ReadElement(aStream, mTransform);
 }
 
 inline void
-RecordedSetTransform::OutputSimpleEventInfo(stringstream &aStringStream) const
+RecordedSetTransform::OutputSimpleEventInfo(std::stringstream &aStringStream) const
 {
   aStringStream << "[" << mDT << "] SetTransform [ " << mTransform._11 << " " << mTransform._12 << " ; " <<
     mTransform._21 << " " << mTransform._22 << " ; " << mTransform._31 << " " << mTransform._32 << " ]";
 }
 
 inline bool
 RecordedDrawSurface::PlayEvent(Translator *aTranslator) const
 {
@@ -2181,17 +2178,17 @@ RecordedDrawSurface::RecordedDrawSurface
   ReadElement(aStream, mRefSource);
   ReadElement(aStream, mDest);
   ReadElement(aStream, mSource);
   ReadElement(aStream, mDSOptions);
   ReadElement(aStream, mOptions);
 }
 
 inline void
-RecordedDrawSurface::OutputSimpleEventInfo(stringstream &aStringStream) const
+RecordedDrawSurface::OutputSimpleEventInfo(std::stringstream &aStringStream) const
 {
   aStringStream << "[" << mDT << "] DrawSurface (" << mRefSource << ")";
 }
 
 inline bool
 RecordedDrawFilter::PlayEvent(Translator *aTranslator) const
 {
   aTranslator->LookupDrawTarget(mDT)->
@@ -2217,17 +2214,17 @@ RecordedDrawFilter::RecordedDrawFilter(S
 {
   ReadElement(aStream, mNode);
   ReadElement(aStream, mSourceRect);
   ReadElement(aStream, mDestPoint);
   ReadElement(aStream, mOptions);
 }
 
 inline void
-RecordedDrawFilter::OutputSimpleEventInfo(stringstream &aStringStream) const
+RecordedDrawFilter::OutputSimpleEventInfo(std::stringstream &aStringStream) const
 {
   aStringStream << "[" << mDT << "] DrawFilter (" << mNode << ")";
 }
 
 inline bool
 RecordedDrawSurfaceWithShadow::PlayEvent(Translator *aTranslator) const
 {
   aTranslator->LookupDrawTarget(mDT)->
@@ -2257,17 +2254,17 @@ RecordedDrawSurfaceWithShadow::RecordedD
   ReadElement(aStream, mDest);
   ReadElement(aStream, mColor);
   ReadElement(aStream, mOffset);
   ReadElement(aStream, mSigma);
   ReadElement(aStream, mOp);
 }
 
 inline void
-RecordedDrawSurfaceWithShadow::OutputSimpleEventInfo(stringstream &aStringStream) const
+RecordedDrawSurfaceWithShadow::OutputSimpleEventInfo(std::stringstream &aStringStream) const
 {
   aStringStream << "[" << mDT << "] DrawSurfaceWithShadow (" << mRefSource << ") Color: (" <<
     mColor.r << ", " << mColor.g << ", " << mColor.b << ", " << mColor.a << ")";
 }
 
 inline
 RecordedPathCreation::RecordedPathCreation(PathRecording *aPath)
   : RecordedEventDerived(PATHCREATION), mRefPtr(aPath), mFillRule(aPath->mFillRule), mPathOps(aPath->mPathOps)
@@ -2358,17 +2355,17 @@ RecordedPathCreation::RecordedPathCreati
     }
 
     mPathOps.push_back(newPathOp);
   }
 
 }
 
 inline void
-RecordedPathCreation::OutputSimpleEventInfo(stringstream &aStringStream) const
+RecordedPathCreation::OutputSimpleEventInfo(std::stringstream &aStringStream) const
 {
   aStringStream << "[" << mRefPtr << "] Path created (OpCount: " << mPathOps.size() << ")";
 }
 inline bool
 RecordedPathDestruction::PlayEvent(Translator *aTranslator) const
 {
   aTranslator->RemovePath(mRefPtr);
   return true;
@@ -2384,17 +2381,17 @@ RecordedPathDestruction::Record(S &aStre
 template<class S>
 RecordedPathDestruction::RecordedPathDestruction(S &aStream)
   : RecordedEventDerived(PATHDESTRUCTION)
 {
   ReadElement(aStream, mRefPtr);
 }
 
 inline void
-RecordedPathDestruction::OutputSimpleEventInfo(stringstream &aStringStream) const
+RecordedPathDestruction::OutputSimpleEventInfo(std::stringstream &aStringStream) const
 {
   aStringStream << "[" << mRefPtr << "] Path Destroyed";
 }
 
 inline
 RecordedSourceSurfaceCreation::~RecordedSourceSurfaceCreation()
 {
   if (mDataOwned) {
@@ -2439,17 +2436,17 @@ RecordedSourceSurfaceCreation::RecordedS
   if (!mData) {
     gfxWarning() << "RecordedSourceSurfaceCreation failed to allocate data";
   } else {
     aStream.read((char*)mData, mSize.width * mSize.height * BytesPerPixel(mFormat));
   }
 }
 
 inline void
-RecordedSourceSurfaceCreation::OutputSimpleEventInfo(stringstream &aStringStream) const
+RecordedSourceSurfaceCreation::OutputSimpleEventInfo(std::stringstream &aStringStream) const
 {
   aStringStream << "[" << mRefPtr << "] SourceSurface created (Size: " << mSize.width << "x" << mSize.height << ")";
 }
 
 inline bool
 RecordedSourceSurfaceDestruction::PlayEvent(Translator *aTranslator) const
 {
   aTranslator->RemoveSourceSurface(mRefPtr);
@@ -2466,17 +2463,17 @@ RecordedSourceSurfaceDestruction::Record
 template<class S>
 RecordedSourceSurfaceDestruction::RecordedSourceSurfaceDestruction(S &aStream)
   : RecordedEventDerived(SOURCESURFACEDESTRUCTION)
 {
   ReadElement(aStream, mRefPtr);
 }
 
 inline void
-RecordedSourceSurfaceDestruction::OutputSimpleEventInfo(stringstream &aStringStream) const
+RecordedSourceSurfaceDestruction::OutputSimpleEventInfo(std::stringstream &aStringStream) const
 {
   aStringStream << "[" << mRefPtr << "] SourceSurface Destroyed";
 }
 
 inline
 RecordedFilterNodeCreation::~RecordedFilterNodeCreation()
 {
 }
@@ -2502,17 +2499,17 @@ template<class S>
 RecordedFilterNodeCreation::RecordedFilterNodeCreation(S &aStream)
   : RecordedEventDerived(FILTERNODECREATION)
 {
   ReadElement(aStream, mRefPtr);
   ReadElement(aStream, mType);
 }
 
 inline void
-RecordedFilterNodeCreation::OutputSimpleEventInfo(stringstream &aStringStream) const
+RecordedFilterNodeCreation::OutputSimpleEventInfo(std::stringstream &aStringStream) const
 {
   aStringStream << "[" << mRefPtr << "] FilterNode created (Type: " << int(mType) << ")";
 }
 
 inline bool
 RecordedFilterNodeDestruction::PlayEvent(Translator *aTranslator) const
 {
   aTranslator->RemoveFilterNode(mRefPtr);
@@ -2529,17 +2526,17 @@ RecordedFilterNodeDestruction::Record(S 
 template<class S>
 RecordedFilterNodeDestruction::RecordedFilterNodeDestruction(S &aStream)
   : RecordedEventDerived(FILTERNODEDESTRUCTION)
 {
   ReadElement(aStream, mRefPtr);
 }
 
 inline void
-RecordedFilterNodeDestruction::OutputSimpleEventInfo(stringstream &aStringStream) const
+RecordedFilterNodeDestruction::OutputSimpleEventInfo(std::stringstream &aStringStream) const
 {
   aStringStream << "[" << mRefPtr << "] FilterNode Destroyed";
 }
 
 inline
 RecordedGradientStopsCreation::~RecordedGradientStopsCreation()
 {
   if (mDataOwned) {
@@ -2574,17 +2571,17 @@ RecordedGradientStopsCreation::RecordedG
   ReadElement(aStream, mExtendMode);
   ReadElement(aStream, mNumStops);
   mStops = new GradientStop[mNumStops];
 
   aStream.read((char*)mStops, mNumStops * sizeof(GradientStop));
 }
 
 inline void
-RecordedGradientStopsCreation::OutputSimpleEventInfo(stringstream &aStringStream) const
+RecordedGradientStopsCreation::OutputSimpleEventInfo(std::stringstream &aStringStream) const
 {
   aStringStream << "[" << mRefPtr << "] GradientStops created (Stops: " << mNumStops << ")";
 }
 
 inline bool
 RecordedGradientStopsDestruction::PlayEvent(Translator *aTranslator) const
 {
   aTranslator->RemoveGradientStops(mRefPtr);
@@ -2601,17 +2598,17 @@ RecordedGradientStopsDestruction::Record
 template<class S>
 RecordedGradientStopsDestruction::RecordedGradientStopsDestruction(S &aStream)
   : RecordedEventDerived(GRADIENTSTOPSDESTRUCTION)
 {
   ReadElement(aStream, mRefPtr);
 }
 
 inline void
-RecordedGradientStopsDestruction::OutputSimpleEventInfo(stringstream &aStringStream) const
+RecordedGradientStopsDestruction::OutputSimpleEventInfo(std::stringstream &aStringStream) const
 {
   aStringStream << "[" << mRefPtr << "] GradientStops Destroyed";
 }
 
 inline bool
 RecordedIntoLuminanceSource::PlayEvent(Translator *aTranslator) const
 {
   RefPtr<SourceSurface> src = aTranslator->LookupDrawTarget(mDT)->IntoLuminanceSource(mLuminanceType, mOpacity);
@@ -2635,17 +2632,17 @@ RecordedIntoLuminanceSource::RecordedInt
 {
   ReadElement(aStream, mRefPtr);
   ReadElement(aStream, mDT);
   ReadElement(aStream, mLuminanceType);
   ReadElement(aStream, mOpacity);
 }
 
 inline void
-RecordedIntoLuminanceSource::OutputSimpleEventInfo(stringstream &aStringStream) const
+RecordedIntoLuminanceSource::OutputSimpleEventInfo(std::stringstream &aStringStream) const
 {
   aStringStream << "[" << mRefPtr << "] Into Luminance Source (DT: " << mDT << ")";
 }
 
 inline bool
 RecordedSnapshot::PlayEvent(Translator *aTranslator) const
 {
   RefPtr<SourceSurface> src = aTranslator->LookupDrawTarget(mDT)->Snapshot();
@@ -2665,17 +2662,17 @@ template<class S>
 RecordedSnapshot::RecordedSnapshot(S &aStream)
   : RecordedEventDerived(SNAPSHOT)
 {
   ReadElement(aStream, mRefPtr);
   ReadElement(aStream, mDT);
 }
 
 inline void
-RecordedSnapshot::OutputSimpleEventInfo(stringstream &aStringStream) const
+RecordedSnapshot::OutputSimpleEventInfo(std::stringstream &aStringStream) const
 {
   aStringStream << "[" << mRefPtr << "] Snapshot Created (DT: " << mDT << ")";
 }
 
 inline
 RecordedFontData::~RecordedFontData()
 {
   delete[] mData;
@@ -2704,17 +2701,17 @@ RecordedFontData::Record(S &aStream) con
 
   WriteElement(aStream, mType);
   WriteElement(aStream, mFontDetails.fontDataKey);
   WriteElement(aStream, mFontDetails.size);
   aStream.write((const char*)mData, mFontDetails.size);
 }
 
 inline void
-RecordedFontData::OutputSimpleEventInfo(stringstream &aStringStream) const
+RecordedFontData::OutputSimpleEventInfo(std::stringstream &aStringStream) const
 {
   aStringStream << "Font Data of size " << mFontDetails.size;
 }
 
 inline void
 RecordedFontData::SetFontData(const uint8_t *aData, uint32_t aSize, uint32_t aIndex)
 {
   mData = new uint8_t[aSize];
@@ -2778,17 +2775,17 @@ RecordedFontDescriptor::Record(S &aStrea
   MOZ_ASSERT(mHasDesc);
   WriteElement(aStream, mType);
   WriteElement(aStream, mRefPtr);
   WriteElement(aStream, (size_t)mData.size());
   aStream.write((char*)mData.data(), mData.size());
 }
 
 inline void
-RecordedFontDescriptor::OutputSimpleEventInfo(stringstream &aStringStream) const
+RecordedFontDescriptor::OutputSimpleEventInfo(std::stringstream &aStringStream) const
 {
   aStringStream << "[" << mRefPtr << "] Font Descriptor";
 }
 
 inline void
 RecordedFontDescriptor::SetFontDescriptor(const uint8_t* aData, uint32_t aSize)
 {
   mData.assign(aData, aData + aSize);
@@ -2830,17 +2827,17 @@ RecordedUnscaledFontCreation::Record(S &
   WriteElement(aStream, mRefPtr);
   WriteElement(aStream, mFontDataKey);
   WriteElement(aStream, mIndex);
   WriteElement(aStream, (size_t)mInstanceData.size());
   aStream.write((char*)mInstanceData.data(), mInstanceData.size());
 }
 
 inline void
-RecordedUnscaledFontCreation::OutputSimpleEventInfo(stringstream &aStringStream) const
+RecordedUnscaledFontCreation::OutputSimpleEventInfo(std::stringstream &aStringStream) const
 {
   aStringStream << "[" << mRefPtr << "] UnscaledFont Created";
 }
 
 inline void
 RecordedUnscaledFontCreation::SetFontInstanceData(const uint8_t *aData, uint32_t aSize)
 {
   mInstanceData.assign(aData, aData + aSize);
@@ -2877,17 +2874,17 @@ RecordedUnscaledFontDestruction::Record(
 template<class S>
 RecordedUnscaledFontDestruction::RecordedUnscaledFontDestruction(S &aStream)
   : RecordedEventDerived(UNSCALEDFONTDESTRUCTION)
 {
   ReadElement(aStream, mRefPtr);
 }
 
 inline void
-RecordedUnscaledFontDestruction::OutputSimpleEventInfo(stringstream &aStringStream) const
+RecordedUnscaledFontDestruction::OutputSimpleEventInfo(std::stringstream &aStringStream) const
 {
   aStringStream << "[" << mRefPtr << "] UnscaledFont Destroyed";
 }
 
 inline bool
 RecordedScaledFontCreation::PlayEvent(Translator *aTranslator) const
 {
   UnscaledFont* unscaledFont = aTranslator->LookupUnscaledFont(mUnscaledFont);
@@ -2910,17 +2907,17 @@ RecordedScaledFontCreation::Record(S &aS
   WriteElement(aStream, mRefPtr);
   WriteElement(aStream, mUnscaledFont);
   WriteElement(aStream, mGlyphSize);
   WriteElement(aStream, (size_t)mInstanceData.size());
   aStream.write((char*)mInstanceData.data(), mInstanceData.size());
 }
 
 inline void
-RecordedScaledFontCreation::OutputSimpleEventInfo(stringstream &aStringStream) const
+RecordedScaledFontCreation::OutputSimpleEventInfo(std::stringstream &aStringStream) const
 {
   aStringStream << "[" << mRefPtr << "] ScaledFont Created";
 }
 
 inline void
 RecordedScaledFontCreation::SetFontInstanceData(const uint8_t *aData, uint32_t aSize)
 {
   mInstanceData.assign(aData, aData + aSize);
@@ -2957,17 +2954,17 @@ RecordedScaledFontDestruction::Record(S 
 template<class S>
 RecordedScaledFontDestruction::RecordedScaledFontDestruction(S &aStream)
   : RecordedEventDerived(SCALEDFONTDESTRUCTION)
 {
   ReadElement(aStream, mRefPtr);
 }
 
 inline void
-RecordedScaledFontDestruction::OutputSimpleEventInfo(stringstream &aStringStream) const
+RecordedScaledFontDestruction::OutputSimpleEventInfo(std::stringstream &aStringStream) const
 {
   aStringStream << "[" << mRefPtr << "] ScaledFont Destroyed";
 }
 
 inline bool
 RecordedMaskSurface::PlayEvent(Translator *aTranslator) const
 {
   aTranslator->LookupDrawTarget(mDT)->
@@ -2994,17 +2991,17 @@ RecordedMaskSurface::RecordedMaskSurface
 {
   ReadPatternData(aStream, mPattern);
   ReadElement(aStream, mRefMask);
   ReadElement(aStream, mOffset);
   ReadElement(aStream, mOptions);
 }
 
 inline void
-RecordedMaskSurface::OutputSimpleEventInfo(stringstream &aStringStream) const
+RecordedMaskSurface::OutputSimpleEventInfo(std::stringstream &aStringStream) const
 {
   aStringStream << "[" << mDT << "] MaskSurface (" << mRefMask << ")  Offset: (" << mOffset.x << "x" << mOffset.y << ") Pattern: ";
   OutputSimplePatternInfo(mPattern, aStringStream);
 }
 
 template<typename T>
 void
 ReplaySetAttribute(FilterNode *aNode, uint32_t aIndex, T aValue)
@@ -3065,17 +3062,17 @@ RecordedFilterNodeSetAttribute::Recorded
   ReadElement(aStream, mArgType);
   uint64_t size;
   ReadElement(aStream, size);
   mPayload.resize(size_t(size));
   aStream.read((char*)&mPayload.front(), size);
 }
 
 inline void
-RecordedFilterNodeSetAttribute::OutputSimpleEventInfo(stringstream &aStringStream) const
+RecordedFilterNodeSetAttribute::OutputSimpleEventInfo(std::stringstream &aStringStream) const
 {
   aStringStream << "[" << mNode << "] SetAttribute (" << mIndex << ")";
 }
 
 inline bool
 RecordedFilterNodeSetInput::PlayEvent(Translator *aTranslator) const
 {
   if (mInputFilter) {
@@ -3105,17 +3102,17 @@ RecordedFilterNodeSetInput::RecordedFilt
 {
   ReadElement(aStream, mNode);
   ReadElement(aStream, mIndex);
   ReadElement(aStream, mInputFilter);
   ReadElement(aStream, mInputSurface);
 }
 
 inline void
-RecordedFilterNodeSetInput::OutputSimpleEventInfo(stringstream &aStringStream) const
+RecordedFilterNodeSetInput::OutputSimpleEventInfo(std::stringstream &aStringStream) const
 {
   aStringStream << "[" << mNode << "] SetAttribute (" << mIndex << ", ";
 
   if (mInputFilter) {
     aStringStream << "Filter: " << mInputFilter;
   } else {
     aStringStream << "Surface: " << mInputSurface;
   }