зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1452170 - Remove RestyleLogging.h, RestyleTrackerInlines.h and related RESTYLE_LOGGING cruft. r=heycam
This commit is contained in:
Родитель
a595c4dca1
Коммит
782365b415
|
@ -1,48 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||
/* 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/. */
|
||||
|
||||
/**
|
||||
* Macros used to log restyle events.
|
||||
*/
|
||||
|
||||
#ifndef mozilla_RestyleLogging_h
|
||||
#define mozilla_RestyleLogging_h
|
||||
|
||||
#include "mozilla/AutoRestore.h"
|
||||
|
||||
#ifdef DEBUG
|
||||
#endif
|
||||
|
||||
#ifdef RESTYLE_LOGGING
|
||||
#define LOG_RESTYLE_VAR2(prefix_, suffix_) prefix_##suffix_
|
||||
#define LOG_RESTYLE_VAR(prefix_, suffix_) LOG_RESTYLE_VAR2(prefix_, suffix_)
|
||||
#define LOG_RESTYLE_DEPTH LOG_RESTYLE_VAR(restyle_depth_, __LINE__)
|
||||
#define LOG_RESTYLE_IF(object_, cond_, message_, ...) \
|
||||
PR_BEGIN_MACRO \
|
||||
if (object_->ShouldLogRestyle() && (cond_)) { \
|
||||
nsCString line; \
|
||||
for (int32_t LOG_RESTYLE_VAR(rs_depth_, __LINE__) = 0; \
|
||||
LOG_RESTYLE_VAR(rs_depth_, __LINE__) < object_->LoggingDepth(); \
|
||||
LOG_RESTYLE_VAR(rs_depth_, __LINE__)++) { \
|
||||
line.AppendLiteral(" "); \
|
||||
} \
|
||||
line.AppendPrintf(message_, ##__VA_ARGS__); \
|
||||
printf_stderr("%s\n", line.get()); \
|
||||
} \
|
||||
PR_END_MACRO
|
||||
#define LOG_RESTYLE(message_, ...) \
|
||||
LOG_RESTYLE_IF(this, true, message_, ##__VA_ARGS__)
|
||||
// Beware that LOG_RESTYLE_INDENT is two statements not wrapped in a block.
|
||||
#define LOG_RESTYLE_INDENT() \
|
||||
AutoRestore<int32_t> LOG_RESTYLE_VAR(ar_depth_, __LINE__)(LoggingDepth()); \
|
||||
++LoggingDepth();
|
||||
#else
|
||||
#define LOG_RESTYLE_IF(cond_, message_, ...) /* nothing */
|
||||
#define LOG_RESTYLE(message_, ...) /* nothing */
|
||||
#define LOG_RESTYLE_INDENT() /* nothing */
|
||||
#endif
|
||||
|
||||
#endif /* mozilla_RestyleLogging_h */
|
|
@ -7,6 +7,7 @@
|
|||
#ifndef mozilla_RestyleManager_h
|
||||
#define mozilla_RestyleManager_h
|
||||
|
||||
#include "mozilla/AutoRestore.h"
|
||||
#include "mozilla/EventStates.h"
|
||||
#include "mozilla/Maybe.h"
|
||||
#include "mozilla/OverflowChangedTracker.h"
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||
/* 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 mozilla_RestyleTrackerInlines_h
|
||||
#define mozilla_RestyleTrackerInlines_h
|
||||
|
||||
#ifdef RESTYLE_LOGGING
|
||||
bool
|
||||
mozilla::RestyleTracker::ShouldLogRestyle()
|
||||
{
|
||||
return mRestyleManager->ShouldLogRestyle();
|
||||
}
|
||||
|
||||
int32_t&
|
||||
mozilla::RestyleTracker::LoggingDepth()
|
||||
{
|
||||
return mRestyleManager->LoggingDepth();
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // !defined(mozilla_RestyleTrackerInlines_h)
|
|
@ -79,7 +79,6 @@ EXPORTS.mozilla += [
|
|||
'GeometryUtils.h',
|
||||
'OverflowChangedTracker.h',
|
||||
'PresShell.h',
|
||||
'RestyleLogging.h',
|
||||
'RestyleManager.h',
|
||||
'ShapeUtils.h',
|
||||
'StaticPresData.h',
|
||||
|
|
|
@ -265,9 +265,6 @@ nsPresContext::nsPresContext(nsIDocument* aDocument, nsPresContextType aType)
|
|||
mQuirkSheetAdded(false),
|
||||
mNeedsPrefUpdate(false),
|
||||
mHadNonBlankPaint(false)
|
||||
#ifdef RESTYLE_LOGGING
|
||||
, mRestyleLoggingEnabled(false)
|
||||
#endif
|
||||
#ifdef DEBUG
|
||||
, mInitialized(false)
|
||||
#endif
|
||||
|
@ -944,10 +941,6 @@ nsPresContext::Init(nsDeviceContext* aDeviceContext)
|
|||
|
||||
mEventManager->SetPresContext(this);
|
||||
|
||||
#ifdef RESTYLE_LOGGING
|
||||
mRestyleLoggingEnabled = GeckoRestyleManager::RestyleLoggingInitiallyEnabled();
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
mInitialized = true;
|
||||
#endif
|
||||
|
|
|
@ -43,7 +43,6 @@
|
|||
#include "nsThreadUtils.h"
|
||||
#include "ScrollbarStyles.h"
|
||||
#include "nsIMessageManager.h"
|
||||
#include "mozilla/RestyleLogging.h"
|
||||
#include "Units.h"
|
||||
#include "prenv.h"
|
||||
#include "mozilla/StaticPresData.h"
|
||||
|
@ -1259,14 +1258,6 @@ public:
|
|||
*/
|
||||
bool MayHavePaintEventListenerInSubDocument();
|
||||
|
||||
#ifdef RESTYLE_LOGGING
|
||||
// Controls for whether debug information about restyling in this
|
||||
// document should be output.
|
||||
bool RestyleLoggingEnabled() const { return mRestyleLoggingEnabled; }
|
||||
void StartRestyleLogging() { mRestyleLoggingEnabled = true; }
|
||||
void StopRestyleLogging() { mRestyleLoggingEnabled = false; }
|
||||
#endif
|
||||
|
||||
void InvalidatePaintedLayers();
|
||||
|
||||
protected:
|
||||
|
@ -1504,11 +1495,6 @@ protected:
|
|||
// Has NotifyNonBlankPaint been called on this PresContext?
|
||||
unsigned mHadNonBlankPaint : 1;
|
||||
|
||||
#ifdef RESTYLE_LOGGING
|
||||
// Should we output debug information about restyling for this document?
|
||||
unsigned mRestyleLoggingEnabled : 1;
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
unsigned mInitialized : 1;
|
||||
#endif
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
#include <algorithm>
|
||||
#include "mozilla/ArenaObjectID.h"
|
||||
#include "mozilla/Assertions.h"
|
||||
#include "mozilla/RestyleLogging.h"
|
||||
#include "mozilla/ServoTypes.h"
|
||||
#include "mozilla/ServoUtils.h"
|
||||
#include "mozilla/StyleComplexColor.h"
|
||||
|
|
Загрузка…
Ссылка в новой задаче