Bug 907396 - DEBUG only; make frame tree dumps print up to 2 style context parents in the unusual case when they are not the parent frame's style context (e.g. display:contents). r=bzbarsky

This commit is contained in:
Mats Palmgren 2014-11-20 18:24:10 +00:00
parent 8300e75160
commit 9356c910b1

View File

@ -5579,8 +5579,15 @@ nsIFrame::ListGeneric(nsACString& aTo, const char* aPrefix, uint32_t aFlags) con
pseudoTag->ToString(atomString);
aTo += nsPrintfCString("%s", NS_LossyConvertUTF16toASCII(atomString).get());
}
if (GetParent() && mStyleContext->GetParent() != GetParent()->StyleContext()) {
aTo += nsPrintfCString(",parent=%p", mStyleContext->GetParent());
if (!mStyleContext->GetParent() ||
(GetParent() && GetParent()->StyleContext() != mStyleContext->GetParent())) {
aTo += nsPrintfCString("^%p", mStyleContext->GetParent());
if (mStyleContext->GetParent()) {
aTo += nsPrintfCString("^%p", mStyleContext->GetParent()->GetParent());
if (mStyleContext->GetParent()->GetParent()) {
aTo += nsPrintfCString("^%p", mStyleContext->GetParent()->GetParent()->GetParent());
}
}
}
}
aTo += "]";