Bug 859749 - Fix building with --enable-dump-painting and --disable-debug. r=mattwoodrow
authorChris Lord <chrislord.net@gmail.com>
Wed, 10 Apr 2013 10:55:00 +0100
changeset 128320 afd9fc3d1c18b4153600396fc0ebe64bae0c4bb6
parent 128319 463440611ad649e888bdbc5763ccfd2c30cf8617
child 128321 d210097816a18eccd29fa17ad58b9324bcf8cc6e
push idunknown
push userunknown
push dateunknown
reviewersmattwoodrow
bugs859749
milestone23.0a1
Bug 859749 - Fix building with --enable-dump-painting and --disable-debug. r=mattwoodrow DisplayItemClip::ToString should be in a MOZ_DUMP_PAINTING #ifdef, rather than a generic DEBUG #ifdef.
layout/base/DisplayItemClip.cpp
layout/base/DisplayItemClip.h
--- a/layout/base/DisplayItemClip.cpp
+++ b/layout/base/DisplayItemClip.cpp
@@ -380,17 +380,17 @@ DisplayItemClip::NoClip()
 
 void
 DisplayItemClip::Shutdown()
 {
   delete gNoClip;
   gNoClip = nullptr;
 }
 
-#ifdef DEBUG
+#ifdef MOZ_DUMP_PAINTING
 nsCString
 DisplayItemClip::ToString() const
 {
   nsAutoCString str;
   if (mHaveClipRect) {
     str.AppendPrintf("%d,%d,%d,%d", mClipRect.x, mClipRect.y,
                      mClipRect.width, mClipRect.height);
     for (uint32_t i = 0; i < mRoundedClipRects.Length(); ++i) {
--- a/layout/base/DisplayItemClip.h
+++ b/layout/base/DisplayItemClip.h
@@ -148,17 +148,17 @@ public:
   const nsRect& GetClipRect() const
   {
     NS_ASSERTION(HasClip(), "No clip rect!");
     return mClipRect;
   }
 
   void MoveBy(nsPoint aPoint);
 
-#ifdef DEBUG
+#ifdef MOZ_DUMP_PAINTING
   nsCString ToString() const;
 #endif
 
   /**
    * Find the largest N such that the first N rounded rects in 'this' are
    * equal to the first N rounded rects in aOther, and N <= aMax.
    */
   uint32_t GetCommonRoundedRectCount(const DisplayItemClip& aOther,