From 2cbe207bfbeb06c7c0deabb0e59e54d86e6f81e9 Mon Sep 17 00:00:00 2001 From: Ed Morley Date: Tue, 25 Feb 2014 17:17:02 +0000 Subject: [PATCH] Backed out changeset a29e486e2214 (bug 958596) --- gfx/ipc/GfxMessageUtils.h | 4 +--- gfx/layers/FrameMetrics.h | 17 ----------------- gfx/layers/composite/APZCTreeManager.cpp | 5 ----- layout/base/nsDisplayList.cpp | 19 ------------------- modules/libpref/src/init/all.js | 3 --- 5 files changed, 1 insertion(+), 47 deletions(-) diff --git a/gfx/ipc/GfxMessageUtils.h b/gfx/ipc/GfxMessageUtils.h index d525c2e5ef57..0130e5845c28 100644 --- a/gfx/ipc/GfxMessageUtils.h +++ b/gfx/ipc/GfxMessageUtils.h @@ -623,7 +623,6 @@ struct ParamTraits WriteParam(aMsg, aParam.mDisableScrollingY); WriteParam(aMsg, aParam.mUpdateScrollOffset); WriteParam(aMsg, aParam.mScrollGeneration); - WriteParam(aMsg, aParam.mContentDescription); } static bool Read(const Message* aMsg, void** aIter, paramType* aResult) @@ -646,8 +645,7 @@ struct ParamTraits ReadParam(aMsg, aIter, &aResult->mDisableScrollingX) && ReadParam(aMsg, aIter, &aResult->mDisableScrollingY) && ReadParam(aMsg, aIter, &aResult->mUpdateScrollOffset) && - ReadParam(aMsg, aIter, &aResult->mScrollGeneration) && - ReadParam(aMsg, aIter, &aResult->mContentDescription)); + ReadParam(aMsg, aIter, &aResult->mScrollGeneration)); } }; diff --git a/gfx/layers/FrameMetrics.h b/gfx/layers/FrameMetrics.h index c60b7eeff0d9..f34299a0ca18 100644 --- a/gfx/layers/FrameMetrics.h +++ b/gfx/layers/FrameMetrics.h @@ -7,7 +7,6 @@ #define GFX_FRAMEMETRICS_H #include // for uint32_t, uint64_t -#include // for std::string #include "Units.h" // for CSSRect, CSSPixel, etc #include "mozilla/gfx/BasePoint.h" // for BasePoint #include "mozilla/gfx/Rect.h" // for RoundedIn @@ -71,8 +70,6 @@ public: bool operator==(const FrameMetrics& aOther) const { - // mContentDescription is not compared on purpose as it's only used - // for debugging. return mCompositionBounds.IsEqualEdges(aOther.mCompositionBounds) && mDisplayPort.IsEqualEdges(aOther.mDisplayPort) && mCriticalDisplayPort.IsEqualEdges(aOther.mCriticalDisplayPort) && @@ -339,16 +336,6 @@ public: return mScrollGeneration; } - const std::string& GetContentDescription() const - { - return mContentDescription; - } - - void SetContentDescription(const std::string& aContentDescription) - { - mContentDescription = aContentDescription; - } - private: // New fields from now on should be made private and old fields should // be refactored to be private. @@ -363,10 +350,6 @@ private: bool mUpdateScrollOffset; // The scroll generation counter used to acknowledge the scroll offset update. uint32_t mScrollGeneration; - - // A description of the content element corresponding to this frame. - // This is empty unless the apz.printtree pref is turned on. - std::string mContentDescription; }; /** diff --git a/gfx/layers/composite/APZCTreeManager.cpp b/gfx/layers/composite/APZCTreeManager.cpp index 716aadbf8b4e..e0cf9209d161 100644 --- a/gfx/layers/composite/APZCTreeManager.cpp +++ b/gfx/layers/composite/APZCTreeManager.cpp @@ -16,7 +16,6 @@ #include "mozilla/MouseEvents.h" #include "mozilla/mozalloc.h" // for operator new #include "mozilla/TouchEvents.h" -#include "mozilla/Preferences.h" // for Preferences #include "nsDebug.h" // for NS_WARNING #include "nsPoint.h" // for nsIntPoint #include "nsThreadUtils.h" // for NS_IsMainThread @@ -31,16 +30,12 @@ namespace layers { float APZCTreeManager::sDPI = 160.0; -// Pref that enables printing of the APZC tree for debugging. -static bool gPrintApzcTree = false; - APZCTreeManager::APZCTreeManager() : mTreeLock("APZCTreeLock"), mTouchCount(0) { MOZ_ASSERT(NS_IsMainThread()); AsyncPanZoomController::InitializeGlobalState(); - Preferences::AddBoolVarCache(&gPrintApzcTree, "apz.printtree", gPrintApzcTree); } APZCTreeManager::~APZCTreeManager() diff --git a/layout/base/nsDisplayList.cpp b/layout/base/nsDisplayList.cpp index e4e290401a11..b4a1014580d6 100644 --- a/layout/base/nsDisplayList.cpp +++ b/layout/base/nsDisplayList.cpp @@ -592,17 +592,6 @@ static void AdjustForScrollBars(ScreenIntRect& aToAdjust, nsIScrollableFrame* aS } } -static bool gPrintApzcTree = false; - -static bool GetApzcTreePrintPref() { - static bool initialized = false; - if (!initialized) { - Preferences::AddBoolVarCache(&gPrintApzcTree, "apz.printtree", gPrintApzcTree); - initialized = true; - } - return gPrintApzcTree; -} - static void RecordFrameMetrics(nsIFrame* aForFrame, nsIFrame* aScrollFrame, const nsIFrame* aReferenceFrame, @@ -744,14 +733,6 @@ static void RecordFrameMetrics(nsIFrame* aForFrame, AdjustForScrollBars(metrics.mCompositionBounds, scrollableFrame); } - if (GetApzcTreePrintPref()) { - if (nsIContent* content = frameForCompositionBoundsCalculation->GetContent()) { - nsAutoString contentDescription; - content->Describe(contentDescription); - metrics.SetContentDescription(NS_LossyConvertUTF16toASCII(contentDescription).get()); - } - } - metrics.mPresShellId = presShell->GetPresShellId(); // If the scroll frame's content is marked 'scrollgrab', record this diff --git a/modules/libpref/src/init/all.js b/modules/libpref/src/init/all.js index ea81d0130145..d1af2836ce41 100644 --- a/modules/libpref/src/init/all.js +++ b/modules/libpref/src/init/all.js @@ -304,9 +304,6 @@ pref("media.audio_data.enabled", false); // 2 = STICKY (Allow lock to be broken, with hysteresis) pref("apz.axis_lock_mode", 0); -// Whether to print the APZC tree for debugging -pref("apz.printtree", false); - #ifdef XP_MACOSX // Whether to run in native HiDPI mode on machines with "Retina"/HiDPI display; // <= 0 : hidpi mode disabled, display will just use pixel-based upscaling