Bug 1275831 - part6: remove unused flags. draft
authorJeremy Chen <jeremychen@mozilla.com>
Thu, 26 May 2016 17:13:03 +0800
changeset 371276 cf5fd181e11f80b04d4b29b65733d0fd6c569cf5
parent 371275 de6c0432c0ad437d6038e001437746bbd8d900d4
child 371277 d3041f73ef9c9a689043c5c5800af7470180ba40
push id19288
push userjichen@mozilla.com
push dateThu, 26 May 2016 09:13:56 +0000
bugs1275831
milestone49.0a1
Bug 1275831 - part6: remove unused flags. 1.Remove NOISY_FIRST_LINE, NOISY_MAX_ELEMENT_SIZE ,NOISY_MAXIMUM_WIDTH. 2.Remove REALLY_NOISY_FIRST_LINE. Only one static function, which has no caller, but defined under this flag. 3.Move REALLY_NOISY_REFLOW_CHILD into REALLY_NOISY_REFLOW. We don't have REALLY_NOISY_REFLOW_CHILD anymore, so move this under REALLY_NOISY_REFLOW. MozReview-Commit-ID: E7IW0qStdck
layout/generic/nsBlockDebugFlags.h
layout/generic/nsBlockFrame.cpp
--- a/layout/generic/nsBlockDebugFlags.h
+++ b/layout/generic/nsBlockDebugFlags.h
@@ -1,21 +1,17 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
 #ifndef nsBlockDebugFlags_h__
 #define nsBlockDebugFlags_h__
 
-#undef NOISY_FIRST_LINE           // enables debug output for first-line specific layout
-#undef REALLY_NOISY_FIRST_LINE    // enables extra debug output for first-line specific layout
 #undef NOISY_FIRST_LETTER         // enables debug output for first-letter specific layout
-#undef NOISY_MAX_ELEMENT_SIZE     // enables debug output for max element size computation
-#undef NOISY_MAXIMUM_WIDTH        // enables debug output for max width computation
 #undef NOISY_FLOAT                // enables debug output for float reflow (the in/out metrics for the floated block)
 #undef NOISY_FLOAT_CLEARING
 #undef NOISY_FINAL_SIZE           // enables debug output for desired width/height computation, once all children have been reflowed
 #undef NOISY_REMOVE_FRAME
 #undef NOISY_COMBINED_AREA        // enables debug output for combined area computation
 #undef NOISY_BLOCK_DIR_MARGINS
 #undef NOISY_REFLOW_REASON        // gives a little info about why each reflow was requested
 #undef REFLOW_STATUS_COVERAGE     // I think this is most useful for printing, to see which frames return "incomplete"
--- a/layout/generic/nsBlockFrame.cpp
+++ b/layout/generic/nsBlockFrame.cpp
@@ -226,34 +226,16 @@ const char* nsBlockFrame::kReflowCommand
   "ContentChanged",
   "StyleChanged",
   "ReflowDirty",
   "Timeout",
   "UserDefined",
 };
 #endif
 
-#ifdef REALLY_NOISY_FIRST_LINE
-static void
-DumpStyleGeneaology(nsIFrame* aFrame, const char* gap)
-{
-  fputs(gap, stdout);
-  nsFrame::ListTag(stdout, aFrame);
-  printf(": ");
-  nsStyleContext* sc = aFrame->StyleContext();
-  while (nullptr != sc) {
-    nsStyleContext* psc;
-    printf("%p ", sc);
-    psc = sc->GetParent();
-    sc = psc;
-  }
-  printf("\n");
-}
-#endif
-
 #ifdef REFLOW_STATUS_COVERAGE
 static void
 RecordReflowStatus(bool aChildIsBlock, nsReflowStatus aFrameReflowStatus)
 {
   static uint32_t record[2];
 
   // 0: child-is-block
   // 1: child-is-inline
@@ -4104,17 +4086,17 @@ nsBlockFrame::ReflowInlineFrame(nsBlockR
   nsReflowStatus frameReflowStatus;
   bool           pushedFrame;
   aLineLayout.ReflowFrame(aFrame, frameReflowStatus, nullptr, pushedFrame);
 
   if (frameReflowStatus & NS_FRAME_REFLOW_NEXTINFLOW) {
     aLineLayout.SetDirtyNextLine();
   }
 
-#ifdef REALLY_NOISY_REFLOW_CHILD
+#ifdef REALLY_NOISY_REFLOW
   nsFrame::ListTag(stdout, aFrame);
   printf(": status=%x\n", frameReflowStatus);
 #endif
 
 #if defined(REFLOW_STATUS_COVERAGE)
   RecordReflowStatus(false, frameReflowStatus);
 #endif