Attachment #802695: 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). for bug #907396

View | Details | Raw Unified | Return to bug 907396
Collapse All | Expand All

(-)a/layout/generic/nsFrame.cpp (+10 lines)
Line     Link Here 
 Lines 5342-5357   nsIFrame::ListGeneric(FILE* out, int32_t Link Here 
5342
  fprintf(out, " [sc=%p", static_cast<void*>(mStyleContext));
5342
  fprintf(out, " [sc=%p", static_cast<void*>(mStyleContext));
5343
  if (mStyleContext) {
5343
  if (mStyleContext) {
5344
    nsIAtom* pseudoTag = mStyleContext->GetPseudo();
5344
    nsIAtom* pseudoTag = mStyleContext->GetPseudo();
5345
    if (pseudoTag) {
5345
    if (pseudoTag) {
5346
      nsAutoString atomString;
5346
      nsAutoString atomString;
5347
      pseudoTag->ToString(atomString);
5347
      pseudoTag->ToString(atomString);
5348
      fprintf(out, "%s", NS_LossyConvertUTF16toASCII(atomString).get());
5348
      fprintf(out, "%s", NS_LossyConvertUTF16toASCII(atomString).get());
5349
    }
5349
    }
5350
    if (!mStyleContext->GetParent() ||
5351
        (GetParent() && GetParent()->StyleContext() != mStyleContext->GetParent())) {
5352
      printf("^%p", mStyleContext->GetParent());
5353
      if (mStyleContext->GetParent()) {
5354
        printf("^%p", mStyleContext->GetParent()->GetParent());
5355
        if (mStyleContext->GetParent()->GetParent()) {
5356
          printf("^%p", mStyleContext->GetParent()->GetParent()->GetParent());
5357
        }
5358
      }
5359
    }
5350
  }
5360
  }
5351
  fputs("]", out);
5361
  fputs("]", out);
5352
}
5362
}
5353
5363
5354
void
5364
void
5355
nsIFrame::List(FILE* out, int32_t aIndent, uint32_t aFlags) const
5365
nsIFrame::List(FILE* out, int32_t aIndent, uint32_t aFlags) const
5356
{
5366
{
5357
  ListGeneric(out, aIndent, aFlags);
5367
  ListGeneric(out, aIndent, aFlags);

Return to bug 907396