author Cameron McCormack <>
Thu, 25 Sep 2014 13:13:14 +1000
changeset 207108 c0c410aed86fee0501e1f6fdb996e9c43200687e
child 388808 905239391e05483e8fb221378dd2092c5a0df8b7
permissions -rw-r--r--
Bug 979133 - Add facility to log the restyle process. r=dbaron Set the MOZ_DEBUG_RESTYLE environment variable and every restyle will have detailed logging printed to stderr. By default, restyles for animations are not logged; you can include them by also setting MOZ_DEBUG_RESTYLE_ANIMATIONS. If you wish to limit restyle logging to a particular change, you can call nsPresContext::StartRestyleLogging() and nsPresContext::StopRestyleLogging() at appropriate points. (You might want to add a couple of helper methods temporarily on nsIDocument and then expose them to your page with Web IDL to make them easier to call.) You do not need to have set MOZ_DEBUG_RESTYLE for this to work.

/* -*- 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 */

#ifndef mozilla_RestyleTrackerInlines_h
#define mozilla_RestyleTrackerInlines_h

  return mRestyleManager->ShouldLogRestyle();

  return mRestyleManager->LoggingDepth();

#endif // !defined(mozilla_RestyleTrackerInlines_h)