Commit 0d5684a3 authored by Cameron McCormack's avatar Cameron McCormack
Browse files

Bug 1639419 - Enable frame tree dumps whenever the layout debugger is enabled. r=TYLin,glandium

parent f9fa9d61
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@
#include "mozilla/RefPtr.h"
#include "mozilla/ReverseIterator.h"

#if defined(DEBUG) || defined(MOZ_DUMP_PAINTING)
#if defined(DEBUG) || defined(MOZ_DUMP_PAINTING) || defined(MOZ_LAYOUT_DEBUGGER)
// DEBUG_FRAME_DUMP enables nsIFrame::List and related methods.
// You can also define this in a non-DEBUG build if you need frame dumps.
#  define DEBUG_FRAME_DUMP 1
+0 −4
Original line number Diff line number Diff line
@@ -218,7 +218,6 @@ nsLayoutDebuggingTools::DumpContent() {
static void DumpFramesRecur(
    nsIDocShell* aDocShell, FILE* out,
    nsIFrame::ListFlags aFlags = nsIFrame::ListFlags()) {
#ifdef DEBUG_FRAME_DUMP
  if (aFlags.contains(nsIFrame::ListFlag::DisplayInCSSPixels)) {
    fprintf(out, "Frame tree in CSS pixels:\n");
  } else {
@@ -246,7 +245,6 @@ static void DumpFramesRecur(
      DumpFramesRecur(childAsShell, out, aFlags);
    }
  }
#endif
}

NS_IMETHODIMP
@@ -313,7 +311,6 @@ nsLayoutDebuggingTools::DumpStyleSheets() {

NS_IMETHODIMP nsLayoutDebuggingTools::DumpMatchedRules() {
  NS_ENSURE_TRUE(mDocShell, NS_ERROR_NOT_INITIALIZED);
#ifdef DEBUG_FRAME_DUMP
  FILE* out = stdout;
  if (PresShell* presShell = GetPresShell(mDocShell)) {
    nsIFrame* root = presShell->GetRootFrame();
@@ -323,7 +320,6 @@ NS_IMETHODIMP nsLayoutDebuggingTools::DumpMatchedRules() {
  } else {
    fputs("null pres shell\n", out);
  }
#endif
  return NS_OK;
}

+2 −1
Original line number Diff line number Diff line
@@ -1400,7 +1400,8 @@ option('--enable-layout-debugger',
       default=layout_debugger,
       help='{Enable|Disable} layout debugger')

set_config('MOZ_LAYOUT_DEBUGGER', depends_if('--enable-layout-debugger')(lambda _: True))
set_config('MOZ_LAYOUT_DEBUGGER', True, when='--enable-layout-debugger')
set_define('MOZ_LAYOUT_DEBUGGER', True, when='--enable-layout-debugger')


# Shader Compiler for Windows (and MinGW Cross Compile)
+0 −3
Original line number Diff line number Diff line
@@ -74,7 +74,4 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk':
    if CONFIG['MOZ_ENABLE_DBUS']:
        CXXFLAGS += CONFIG['MOZ_DBUS_GLIB_CFLAGS']

if CONFIG['MOZ_LAYOUT_DEBUGGER']:
    DEFINES['MOZ_LAYOUT_DEBUGGER'] = True

include('/ipc/chromium/chromium-config.mozbuild')