forked from mirrors/gecko-dev
Bug 1865668: Don't generate text node for pseudo-elements with empty string content. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D194094
This commit is contained in:
parent
068ce22bf9
commit
77bda756d8
1 changed files with 6 additions and 2 deletions
|
|
@ -1551,8 +1551,12 @@ void nsCSSFrameConstructor::CreateGeneratedContent(
|
||||||
}
|
}
|
||||||
|
|
||||||
case Type::String: {
|
case Type::String: {
|
||||||
RefPtr text = CreateGenConTextNode(
|
const auto string = item.AsString().AsString();
|
||||||
aState, NS_ConvertUTF8toUTF16(item.AsString().AsString()), nullptr);
|
if (string.IsEmpty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
RefPtr text =
|
||||||
|
CreateGenConTextNode(aState, NS_ConvertUTF8toUTF16(string), nullptr);
|
||||||
aAddChild(text);
|
aAddChild(text);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue