mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 13:55:43 +00:00
Bug 1100773 patch 3 - Add an aListDescendants boolean to nsStyleContext::List. r=heycam
This commit is contained in:
parent
714a5547a4
commit
3003f87cf7
@ -858,7 +858,7 @@ nsStyleContext::Mark()
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
void nsStyleContext::List(FILE* out, int32_t aIndent)
|
||||
void nsStyleContext::List(FILE* out, int32_t aIndent, bool aListDescendants)
|
||||
{
|
||||
nsAutoCString str;
|
||||
// Indent
|
||||
@ -895,19 +895,21 @@ void nsStyleContext::List(FILE* out, int32_t aIndent)
|
||||
fprintf_stderr(out, "%s{}\n", str.get());
|
||||
}
|
||||
|
||||
if (nullptr != mChild) {
|
||||
nsStyleContext* child = mChild;
|
||||
do {
|
||||
child->List(out, aIndent + 1);
|
||||
child = child->mNextSibling;
|
||||
} while (mChild != child);
|
||||
}
|
||||
if (nullptr != mEmptyChild) {
|
||||
nsStyleContext* child = mEmptyChild;
|
||||
do {
|
||||
child->List(out, aIndent + 1);
|
||||
child = child->mNextSibling;
|
||||
} while (mEmptyChild != child);
|
||||
if (aListDescendants) {
|
||||
if (nullptr != mChild) {
|
||||
nsStyleContext* child = mChild;
|
||||
do {
|
||||
child->List(out, aIndent + 1, aListDescendants);
|
||||
child = child->mNextSibling;
|
||||
} while (mChild != child);
|
||||
}
|
||||
if (nullptr != mEmptyChild) {
|
||||
nsStyleContext* child = mEmptyChild;
|
||||
do {
|
||||
child->List(out, aIndent + 1, aListDescendants);
|
||||
child = child->mNextSibling;
|
||||
} while (mEmptyChild != child);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -395,7 +395,7 @@ public:
|
||||
void ClearCachedInheritedStyleDataOnDescendants(uint32_t aStructs);
|
||||
|
||||
#ifdef DEBUG
|
||||
void List(FILE* out, int32_t aIndent);
|
||||
void List(FILE* out, int32_t aIndent, bool aListDescendants = true);
|
||||
static void AssertStyleStructMaxDifferenceValid();
|
||||
static const char* StructName(nsStyleStructID aSID);
|
||||
static bool LookupStruct(const nsACString& aName, nsStyleStructID& aResult);
|
||||
|
Loading…
Reference in New Issue
Block a user