Closed Bug 1429645 Opened 2 years ago Closed 2 years ago

make EXTENDED_DEBUG_PRINTING compile again

Categories

(Core :: Layout, enhancement)

enhancement
Not set

Tracking

()

RESOLVED FIXED
mozilla59
Tracking Status
firefox59 --- fixed

People

(Reporter: dbaron, Assigned: dbaron)

Details

Attachments

(1 file, 1 obsolete file)

I wanted to use a piece of it, and it turned out that making EXTENDED_DEBUG_PRINTING compile again was a slightly deeper rabbit hole than I expected.  However, I've made it compile.  I make no guarantees that it will work, though...
MozReview-Commit-ID: B0JIbPpl8LW
MozReview-Commit-ID: B0JIbPpl8LW
Attachment #8941677 - Flags: review?(jwatt)
Attachment #8941675 - Attachment is obsolete: true
Attachment #8941675 - Flags: review?(jwatt)
Comment on attachment 8941677 [details] [diff] [review]
Make EXTENDED_DEBUG_PRINTING compile again

Review of attachment 8941677 [details] [diff] [review]:
-----------------------------------------------------------------

Nice. The changes look good. Just some line wrapping nits if you care to address them (feel free to ignore and spend the time on more important stuff).

::: layout/printing/nsPrintJob.cpp
@@ +167,2 @@
>  static void DumpPrintObjectsTree(nsPrintObject * aPO, int aLevel= 0, FILE* aFD = nullptr);
> +static void DumpPrintObjectsTreeLayout(const UniquePtr<nsPrintObject>& aPO,nsDeviceContext * aDC, int aLevel= 0, FILE * aFD = nullptr);

Nit: some wrapping here would be nice if you care to do that.

@@ +610,3 @@
>  static void DumpPrintObjectsTree(nsPrintObject * aPO, int aLevel, FILE* aFD);
> +static void DumpPrintObjectsList(const nsTArray<nsPrintObject*>& aDocList);
> +static void RootFrameList(nsPresContext* aPresContext, FILE* out, const char* aPrefix);

and here for RootFrameList

@@ +3642,5 @@
>  
>  /** ---------------------------------------------------
>   *  Dumps Frames for Printing
>   */
> +static void RootFrameList(nsPresContext* aPresContext, FILE* out, const char* aPrefix)

and here

@@ +3841,3 @@
>      NS_ASSERTION(po, "nsPrintObject can't be null!");
>      for (int32_t k=0;k<aLevel;k++) fprintf(fd, "  ");
> +    fprintf(fd, "%s %p %p\n", types[po->mFrameType], po.get(), po->mDocShell.get());

and here

@@ +3883,5 @@
>      if (aPO->mPresShell) {
>        rootFrame = aPO->mPresShell->FrameManager()->GetRootFrame();
>      }
>      for (int32_t k=0;k<aLevel;k++) fprintf(fd, "  ");
> +    fprintf(fd, "%s %p %p\n", types[aPO->mFrameType], aPO.get(), aPO->mDocShell.get());

and here

@@ +3903,5 @@
>    }
>  }
>  
>  //-------------------------------------------------------------
> +static void DumpPrintObjectsListStart(const char * aStr, const nsTArray<nsPrintObject*> & aDocList)

and here
Attachment #8941677 - Flags: review?(jwatt) → review+
I fixed the whitespace, and I also removed one chunk that I realized wasn't inside of EXTENDED_DEBUG_PRINTING (and didn't need to be changed).
https://hg.mozilla.org/mozilla-central/rev/f20af1b96e11
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
You need to log in before you can comment on or make changes to this bug.