summaryrefslogtreecommitdiffstats
path: root/layout
diff options
context:
space:
mode:
Diffstat (limited to 'layout')
-rw-r--r--layout/base/nsLayoutDebugger.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/layout/base/nsLayoutDebugger.cpp b/layout/base/nsLayoutDebugger.cpp
index 22c313c72..6ce629bc9 100644
--- a/layout/base/nsLayoutDebugger.cpp
+++ b/layout/base/nsLayoutDebugger.cpp
@@ -126,8 +126,10 @@ PrintDisplayItemTo(nsDisplayListBuilder* aBuilder, nsDisplayItem* aItem,
contentData.AppendLiteral(" id:");
contentData.Append(tmp);
}
- if (content->GetClasses()) {
- content->GetClasses()->ToString(tmp);
+ const nsAttrValue* classes = content->IsElement() ?
+ content->AsElement()->GetClasses() : nullptr;
+ if (classes) {
+ classes->ToString(tmp);
contentData.AppendLiteral(" class:");
contentData.Append(tmp);
}