зеркало из https://github.com/mozilla/gecko-dev.git
Fix formatting of some macros; no bug.
This commit is contained in:
Родитель
01583602a9
Коммит
76e33ef061
|
@ -66,12 +66,12 @@ using std::min;
|
||||||
using namespace mozilla;
|
using namespace mozilla;
|
||||||
using namespace mozilla::dom;
|
using namespace mozilla::dom;
|
||||||
|
|
||||||
#define NS_SET_IMAGE_REQUEST(method_, context_, request_) \
|
#define NS_SET_IMAGE_REQUEST(method_, context_, request_) \
|
||||||
if ((context_)->PresContext()->IsDynamic()) { \
|
if ((context_)->PresContext()->IsDynamic()) { \
|
||||||
method_(request_); \
|
method_(request_); \
|
||||||
} else { \
|
} else { \
|
||||||
RefPtr<imgRequestProxy> req = nsContentUtils::GetStaticRequest(request_); \
|
RefPtr<imgRequestProxy> req = nsContentUtils::GetStaticRequest(request_); \
|
||||||
method_(req); \
|
method_(req); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define NS_SET_IMAGE_REQUEST_WITH_DOC(method_, context_, requestgetter_) \
|
#define NS_SET_IMAGE_REQUEST_WITH_DOC(method_, context_, requestgetter_) \
|
||||||
|
@ -2595,9 +2595,9 @@ nsRuleNode::SetDefaultOnRoot(const nsStyleStructID aSID, nsStyleContext* aContex
|
||||||
nsStyle##type_* data_ = nullptr; \
|
nsStyle##type_* data_ = nullptr; \
|
||||||
mozilla::Maybe<nsStyle##type_> maybeFakeParentData; \
|
mozilla::Maybe<nsStyle##type_> maybeFakeParentData; \
|
||||||
const nsStyle##type_* parentdata_ = nullptr; \
|
const nsStyle##type_* parentdata_ = nullptr; \
|
||||||
RuleNodeCacheConditions conditions = aConditions; \
|
RuleNodeCacheConditions conditions = aConditions; \
|
||||||
\
|
\
|
||||||
/* If |conditions.Cacheable()| might be true by the time we're done, we */ \
|
/* If |conditions.Cacheable()| might be true by the time we're done, we */ \
|
||||||
/* can't call parentContext->Style##type_() since it could recur into */ \
|
/* can't call parentContext->Style##type_() since it could recur into */ \
|
||||||
/* setting the same struct on the same rule node, causing a leak. */ \
|
/* setting the same struct on the same rule node, causing a leak. */ \
|
||||||
if (aRuleDetail != eRuleFullReset && \
|
if (aRuleDetail != eRuleFullReset && \
|
||||||
|
@ -2624,7 +2624,7 @@ nsRuleNode::SetDefaultOnRoot(const nsStyleStructID aSID, nsStyleContext* aContex
|
||||||
if (aRuleDetail != eRuleFullMixed && aRuleDetail != eRuleFullReset) { \
|
if (aRuleDetail != eRuleFullMixed && aRuleDetail != eRuleFullReset) { \
|
||||||
/* No question. We will have to inherit. Go ahead and init */ \
|
/* No question. We will have to inherit. Go ahead and init */ \
|
||||||
/* with inherited vals from parent. */ \
|
/* with inherited vals from parent. */ \
|
||||||
conditions.SetUncacheable(); \
|
conditions.SetUncacheable(); \
|
||||||
if (parentdata_) \
|
if (parentdata_) \
|
||||||
data_ = new (mPresContext) nsStyle##type_(*parentdata_); \
|
data_ = new (mPresContext) nsStyle##type_(*parentdata_); \
|
||||||
else \
|
else \
|
||||||
|
@ -2668,7 +2668,7 @@ nsRuleNode::SetDefaultOnRoot(const nsStyleStructID aSID, nsStyleContext* aContex
|
||||||
else \
|
else \
|
||||||
data_ = new (mPresContext) nsStyle##type_ ctorargs_; \
|
data_ = new (mPresContext) nsStyle##type_ ctorargs_; \
|
||||||
\
|
\
|
||||||
/* If |conditions.Cacheable()| might be true by the time we're done, we */ \
|
/* If |conditions.Cacheable()| might be true by the time we're done, we */ \
|
||||||
/* can't call parentContext->Style##type_() since it could recur into */ \
|
/* can't call parentContext->Style##type_() since it could recur into */ \
|
||||||
/* setting the same struct on the same rule node, causing a leak. */ \
|
/* setting the same struct on the same rule node, causing a leak. */ \
|
||||||
mozilla::Maybe<nsStyle##type_> maybeFakeParentData; \
|
mozilla::Maybe<nsStyle##type_> maybeFakeParentData; \
|
||||||
|
@ -2692,13 +2692,13 @@ nsRuleNode::SetDefaultOnRoot(const nsStyleStructID aSID, nsStyleContext* aContex
|
||||||
* @param data_ Variable holding the result of this function.
|
* @param data_ Variable holding the result of this function.
|
||||||
*/
|
*/
|
||||||
#define COMPUTE_END_INHERITED(type_, data_) \
|
#define COMPUTE_END_INHERITED(type_, data_) \
|
||||||
NS_POSTCONDITION(!conditions.CacheableWithoutDependencies() || \
|
NS_POSTCONDITION(!conditions.CacheableWithoutDependencies() || \
|
||||||
aRuleDetail == eRuleFullReset || \
|
aRuleDetail == eRuleFullReset || \
|
||||||
(aStartStruct && aRuleDetail == eRulePartialReset), \
|
(aStartStruct && aRuleDetail == eRulePartialReset), \
|
||||||
"conditions.CacheableWithoutDependencies() must be false " \
|
"conditions.CacheableWithoutDependencies() must be false " \
|
||||||
"for inherited structs unless all properties have been " \
|
"for inherited structs unless all properties have been " \
|
||||||
"specified with values other than inherit"); \
|
"specified with values other than inherit"); \
|
||||||
if (conditions.CacheableWithoutDependencies()) { \
|
if (conditions.CacheableWithoutDependencies()) { \
|
||||||
/* We were fully specified and can therefore be cached right on the */ \
|
/* We were fully specified and can therefore be cached right on the */ \
|
||||||
/* rule node. */ \
|
/* rule node. */ \
|
||||||
if (!aHighestNode->mStyleData.mInheritedData) { \
|
if (!aHighestNode->mStyleData.mInheritedData) { \
|
||||||
|
@ -2728,14 +2728,14 @@ nsRuleNode::SetDefaultOnRoot(const nsStyleStructID aSID, nsStyleContext* aContex
|
||||||
* @param data_ Variable holding the result of this function.
|
* @param data_ Variable holding the result of this function.
|
||||||
*/
|
*/
|
||||||
#define COMPUTE_END_RESET(type_, data_) \
|
#define COMPUTE_END_RESET(type_, data_) \
|
||||||
NS_POSTCONDITION(!conditions.CacheableWithoutDependencies() || \
|
NS_POSTCONDITION(!conditions.CacheableWithoutDependencies() || \
|
||||||
aRuleDetail == eRuleNone || \
|
aRuleDetail == eRuleNone || \
|
||||||
aRuleDetail == eRulePartialReset || \
|
aRuleDetail == eRulePartialReset || \
|
||||||
aRuleDetail == eRuleFullReset, \
|
aRuleDetail == eRuleFullReset, \
|
||||||
"conditions.CacheableWithoutDependencies() must be false " \
|
"conditions.CacheableWithoutDependencies() must be false " \
|
||||||
"for reset structs if any properties were specified as " \
|
"for reset structs if any properties were specified as " \
|
||||||
"inherit"); \
|
"inherit"); \
|
||||||
if (conditions.CacheableWithoutDependencies()) { \
|
if (conditions.CacheableWithoutDependencies()) { \
|
||||||
/* We were fully specified and can therefore be cached right on the */ \
|
/* We were fully specified and can therefore be cached right on the */ \
|
||||||
/* rule node. */ \
|
/* rule node. */ \
|
||||||
if (!aHighestNode->mStyleData.mResetData) { \
|
if (!aHighestNode->mStyleData.mResetData) { \
|
||||||
|
|
Загрузка…
Ссылка в новой задаче