зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1543304 - Add MOZ_DBG support for nsCSSPropertyID and nsCSSPropertyIDSet; r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D26856 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
ab20b9cbd4
Коммит
86cd66683b
|
@ -35,6 +35,9 @@ $property_ids
|
|||
eCSSPropertyExtra_variable,
|
||||
};
|
||||
|
||||
// MOZ_DBG support is defined in nsCSSProps.h since it depends on
|
||||
// nsCSSProps::GetStringValue
|
||||
|
||||
const nsCSSPropertyID
|
||||
eCSSProperty_COUNT_no_shorthands = $longhand_count;
|
||||
const nsCSSPropertyID
|
||||
|
|
|
@ -7,15 +7,16 @@
|
|||
#ifndef nsCSSPropertyIDSet_h__
|
||||
#define nsCSSPropertyIDSet_h__
|
||||
|
||||
#include "mozilla/ArrayUtils.h"
|
||||
|
||||
#include "nsCSSPropertyID.h"
|
||||
#include <limits.h> // for CHAR_BIT
|
||||
#include <initializer_list>
|
||||
#include <limits.h> // for CHAR_BIT
|
||||
#include <ostream>
|
||||
|
||||
#include "mozilla/ArrayUtils.h"
|
||||
// For COMPOSITOR_ANIMATABLE_PROPERTY_LIST and
|
||||
// COMPOSITOR_ANIMATABLE_PROPERTY_LIST_LENGTH
|
||||
#include "mozilla/CompositorAnimatableProperties.h"
|
||||
#include "nsCSSProps.h" // For operator<< for nsCSSPropertyID
|
||||
#include "nsCSSPropertyID.h"
|
||||
|
||||
/**
|
||||
* nsCSSPropertyIDSet maintains a set of non-shorthand CSS properties. In
|
||||
|
@ -270,4 +271,15 @@ class nsCSSPropertyIDSet {
|
|||
property_set_type mProperties[kChunkCount];
|
||||
};
|
||||
|
||||
// MOZ_DBG support
|
||||
|
||||
inline std::ostream& operator<<(std::ostream& aOut,
|
||||
const nsCSSPropertyIDSet& aPropertySet) {
|
||||
AutoTArray<nsCSSPropertyID, 16> properties;
|
||||
for (nsCSSPropertyID property : aPropertySet) {
|
||||
properties.AppendElement(property);
|
||||
}
|
||||
return aOut << properties;
|
||||
}
|
||||
|
||||
#endif /* !defined(nsCSSPropertyIDSet_h__) */
|
||||
|
|
|
@ -13,7 +13,9 @@
|
|||
#define nsCSSProps_h___
|
||||
|
||||
#include <limits>
|
||||
#include <ostream>
|
||||
#include <type_traits>
|
||||
|
||||
#include "nsString.h"
|
||||
#include "nsCSSPropertyID.h"
|
||||
#include "nsStyleStructFwd.h"
|
||||
|
@ -312,4 +314,10 @@ class nsCSSProps {
|
|||
static const KTableEntry kVerticalAlignKTable[];
|
||||
};
|
||||
|
||||
// MOZ_DBG support for nsCSSPropertyID
|
||||
|
||||
inline std::ostream& operator<<(std::ostream& aOut, nsCSSPropertyID aProperty) {
|
||||
return aOut << nsCSSProps::GetStringValue(aProperty);
|
||||
}
|
||||
|
||||
#endif /* nsCSSProps_h___ */
|
||||
|
|
Загрузка…
Ссылка в новой задаче