Bug 962505. Put the scroll frame and the scrolled frame in the display list dump for scroll layer items. r=mats
authorTimothy Nikkel <tnikkel@gmail.com>
Sun, 26 Jan 2014 16:09:06 -0600
changeset 181283 bd61bfb42d02d62796e27269a83b41935b868122
parent 181282 b7f02d5459888e5c1d8c7c958c591f5e5e8fb1d5
child 181284 39ca54c48ec46cc33a2abe2514246a48275527c7
push id3343
push userffxbld
push dateMon, 17 Mar 2014 21:55:32 +0000
treeherdermozilla-beta@2f7d3415f79f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmats
bugs962505
milestone29.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 962505. Put the scroll frame and the scrolled frame in the display list dump for scroll layer items. r=mats
layout/base/nsDisplayList.cpp
layout/base/nsDisplayList.h
--- a/layout/base/nsDisplayList.cpp
+++ b/layout/base/nsDisplayList.cpp
@@ -1595,17 +1595,17 @@ nsDisplaySolidColor::Paint(nsDisplayList
   aCtx->SetColor(mColor);
   aCtx->FillRect(mVisibleRect);
 }
 
 #ifdef MOZ_DUMP_PAINTING
 void
 nsDisplaySolidColor::WriteDebugInfo(nsACString& aTo)
 {
-  aTo += nsPrintfCString("(rgba %d,%d,%d,%d)",
+  aTo += nsPrintfCString(" (rgba %d,%d,%d,%d)",
                  NS_GET_R(mColor), NS_GET_G(mColor),
                  NS_GET_B(mColor), NS_GET_A(mColor));
 }
 #endif
 
 static void
 RegisterThemeGeometry(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame)
 {
@@ -2269,17 +2269,17 @@ nsDisplayThemedBackground::~nsDisplayThe
   MOZ_COUNT_DTOR(nsDisplayThemedBackground);
 #endif
 }
 
 #ifdef MOZ_DUMP_PAINTING
 void
 nsDisplayThemedBackground::WriteDebugInfo(nsACString& aTo)
 {
-  aTo += nsPrintfCString("(themed, appearance:%d) ", mAppearance);
+  aTo += nsPrintfCString(" (themed, appearance:%d)", mAppearance);
 }
 #endif
 
 void
 nsDisplayThemedBackground::HitTest(nsDisplayListBuilder* aBuilder,
                                   const nsRect& aRect,
                                   HitTestState* aState,
                                   nsTArray<nsIFrame*> *aOutFrames)
@@ -2456,17 +2456,17 @@ nsDisplayBackgroundColor::HitTest(nsDisp
 
   aOutFrames->AppendElement(mFrame);
 }
 
 #ifdef MOZ_DUMP_PAINTING
 void
 nsDisplayBackgroundColor::WriteDebugInfo(nsACString& aTo)
 {
-  aTo += nsPrintfCString("(rgba %d,%d,%d,%d)", 
+  aTo += nsPrintfCString(" (rgba %d,%d,%d,%d)", 
           NS_GET_R(mColor), NS_GET_G(mColor),
           NS_GET_B(mColor), NS_GET_A(mColor));
 }
 #endif
 
 nsRect
 nsDisplayOutline::GetBounds(nsDisplayListBuilder* aBuilder, bool* aSnap) {
   *aSnap = false;
@@ -3215,17 +3215,17 @@ bool nsDisplayOpacity::TryMerge(nsDispla
   MergeFromTrackingMergedFrames(static_cast<nsDisplayOpacity*>(aItem));
   return true;
 }
 
 #ifdef MOZ_DUMP_PAINTING
 void
 nsDisplayOpacity::WriteDebugInfo(nsACString& aTo)
 {
-  aTo += nsPrintfCString("(opacity %f)", mFrame->StyleDisplay()->mOpacity);
+  aTo += nsPrintfCString(" (opacity %f)", mFrame->StyleDisplay()->mOpacity);
 }
 #endif
 
 nsDisplayMixBlendMode::nsDisplayMixBlendMode(nsDisplayListBuilder* aBuilder,
                                              nsIFrame* aFrame, nsDisplayList* aList,
                                              uint32_t aFlags)
 : nsDisplayWrapList(aBuilder, aFrame, aList) {
   MOZ_COUNT_CTOR(nsDisplayMixBlendMode);
@@ -3723,16 +3723,25 @@ nsDisplayScrollLayer::GetScrollLayerCoun
   // that it is processed last.
   NS_ABORT_IF_FALSE(hasCount, "nsDisplayScrollLayer should always be defined");
   return result;
 #else
   return reinterpret_cast<intptr_t>(props.Get(nsIFrame::ScrollLayerCount()));
 #endif
 }
 
+#ifdef MOZ_DUMP_PAINTING
+void
+nsDisplayScrollLayer::WriteDebugInfo(nsACString& aTo)
+{
+  aTo += nsPrintfCString(" (scrollframe %p scrolledframe %p)",
+                         mScrollFrame, mScrolledFrame);
+}
+#endif
+
 nsDisplayScrollInfoLayer::nsDisplayScrollInfoLayer(
   nsDisplayListBuilder* aBuilder,
   nsIFrame* aScrolledFrame,
   nsIFrame* aScrollFrame)
   : nsDisplayScrollLayer(aBuilder, aScrollFrame, aScrolledFrame, aScrollFrame)
 {
 #ifdef NS_BUILD_REFCNT_LOGGING
   MOZ_COUNT_CTOR(nsDisplayScrollInfoLayer);
--- a/layout/base/nsDisplayList.h
+++ b/layout/base/nsDisplayList.h
@@ -2818,16 +2818,20 @@ public:
 
   // Get the number of nsDisplayScrollLayers for a scroll frame. Note that this
   // number does not include nsDisplayScrollInfoLayers. If this number is not 1
   // after merging, all the nsDisplayScrollLayers should flatten away.
   intptr_t GetScrollLayerCount();
 
   virtual nsIFrame* GetScrolledFrame() { return mScrolledFrame; }
 
+#ifdef MOZ_DUMP_PAINTING
+  virtual void WriteDebugInfo(nsACString& aTo) MOZ_OVERRIDE;
+#endif
+
 protected:
   nsIFrame* mScrollFrame;
   nsIFrame* mScrolledFrame;
 };
 
 /**
  * Like nsDisplayScrollLayer, but only has metadata on the scroll frame. This
  * creates a layer that has no Thebes child layer, but still allows the