Bug 1275831 - part6: remove unused block layout debug flag. draft
authorJeremy Chen <jeremychen@mozilla.com>
Fri, 27 May 2016 16:06:27 +0800
changeset 372038 3e43e23804037fe17efe062a0fabb6ac36de3695
parent 372037 244455107eefe0c1531e0b5f82218e5dce8506cf
child 522073 e26ff0845ce4321b5b827bc74459c78aef8ce151
push id19415
push userjichen@mozilla.com
push dateFri, 27 May 2016 08:08:56 +0000
bugs1275831
milestone49.0a1
Bug 1275831 - part6: remove unused block layout debug flag. 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. The chunk of REALLY_NOISY_REFLOW_CHILD seems dead for long time, so make it alive by moving it 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