mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 14:18:48 +00:00
de52ef4061
- Bug 1181920. Persist XUL attributes off a scriptrunner. r=peterv (4b29b8efa) - Bug 1156100 - Mark XULDocument::CachedChromeStreamListener::mDocument as an nsRefPtr; r=baku (0a5b7bd5b) - Bug 1168823 - Repair XML syntax highlighting. r=jst (83fd915e3) - Bug 1157059 - Avoid calling AddRef on the pointer enclosed in an nsCOMPtr in nsBindingManager::DoProcessAttachedQueue(); r=baku (6e13d9beb) - Bug 1177816 - Dump a message when the service worker for test_request_context receives an unexpected context value; r=baku (b44d39184) - Bug 1168903 part 1: Give nsSMILValue a move constructor & move reassignment operator. r=birtles (ba7ee0bed) - Bug 1168903 part 2: Use Move() instead of nsSMILValue::Swap() to populate outparams from temp variables in SMIL functions. r=birtles (a4858c958) - Bug 1180048 - Switch warning about having a zero length axis to a LAYOUT_WARNING. r=dholbert (19d405908) - Bug 1175289 - Part 1: Add LAYOUT_WARNING. r=mats (fd4d1bdd9) - Bug 1175289 - Part 2: Disable "Subdocument container has no frame" warning by default. r=mats (8ce582bf5)
65 lines
2.2 KiB
C++
65 lines
2.2 KiB
C++
/* -*- 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 LayoutLogging_h
|
|
#define LayoutLogging_h
|
|
|
|
#include "mozilla/Logging.h"
|
|
|
|
/**
|
|
* Retrieves the log module to use for layout logging.
|
|
*/
|
|
PRLogModuleInfo* GetLayoutLog();
|
|
|
|
/**
|
|
* Use the layout log to warn if a given condition is false.
|
|
*
|
|
* This is only enabled in debug builds and the logging is only displayed if
|
|
* the environmental variable NSPR_LOG_MODULES includes "layout:2" (or higher).
|
|
*/
|
|
#ifdef DEBUG
|
|
#define LAYOUT_WARN_IF_FALSE(_cond, _msg) \
|
|
PR_BEGIN_MACRO \
|
|
if (MOZ_LOG_TEST(GetLayoutLog(), mozilla::LogLevel::Warning) && \
|
|
!(_cond)) { \
|
|
mozilla::detail::LayoutLogWarning(_msg, #_cond, __FILE__, __LINE__); \
|
|
} \
|
|
PR_END_MACRO
|
|
#else
|
|
#define LAYOUT_WARN_IF_FALSE(_cond, _msg) \
|
|
PR_BEGIN_MACRO \
|
|
PR_END_MACRO
|
|
#endif
|
|
|
|
/**
|
|
* Use the layout log to emit a warning with the same format as NS_WARNING.
|
|
*
|
|
* This is only enabled in debug builds and the logging is only displayed if
|
|
* the environmental variable NSPR_LOG_MODULES includes "layout:2" (or higher).
|
|
*/
|
|
#ifdef DEBUG
|
|
#define LAYOUT_WARNING(_msg) \
|
|
PR_BEGIN_MACRO \
|
|
if (MOZ_LOG_TEST(GetLayoutLog(), mozilla::LogLevel::Warning)) { \
|
|
mozilla::detail::LayoutLogWarning(_msg, nullptr, __FILE__, __LINE__); \
|
|
} \
|
|
PR_END_MACRO
|
|
#else
|
|
#define LAYOUT_WARNING(_msg) \
|
|
PR_BEGIN_MACRO \
|
|
PR_END_MACRO
|
|
#endif
|
|
|
|
namespace mozilla {
|
|
namespace detail {
|
|
|
|
void LayoutLogWarning(const char* aStr, const char* aExpr,
|
|
const char* aFile, int32_t aLine);
|
|
|
|
} // namespace detail
|
|
} // namespace mozilla
|
|
|
|
#endif // LayoutLogging_h
|