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:
@@ -1551,8 +1551,12 @@ void nsCSSFrameConstructor::CreateGeneratedContent(
|
||||
}
|
||||
|
||||
case Type::String: {
|
||||
RefPtr text = CreateGenConTextNode(
|
||||
aState, NS_ConvertUTF8toUTF16(item.AsString().AsString()), nullptr);
|
||||
const auto string = item.AsString().AsString();
|
||||
if (string.IsEmpty()) {
|
||||
return;
|
||||
}
|
||||
RefPtr text =
|
||||
CreateGenConTextNode(aState, NS_ConvertUTF8toUTF16(string), nullptr);
|
||||
aAddChild(text);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user