HTML - implement the labels attribute (follow up)

This commit is contained in:
janekptacijarabaci 2017-08-18 13:39:37 +02:00 committed by Roy Tam
commit b9e802f497
20 changed files with 87 additions and 77 deletions

View file

@ -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);
}