LibWeb/CSS: Remove redundant has_alt_text() from ContentStyleValue

Replace the has_alt_text() / alt_text() calls by directly null
checking on the returned pointer from alt_text().
This commit is contained in:
Shannon Booth
2026-03-31 01:39:19 +02:00
committed by Sam Atkins
parent c6809eb53d
commit a066ee720e
Notes: github-actions[bot] 2026-03-31 12:50:19 +00:00
3 changed files with 4 additions and 5 deletions

View File

@@ -15,9 +15,9 @@ namespace Web::CSS {
void ContentStyleValue::serialize(StringBuilder& builder, SerializationMode mode) const
{
m_properties.content->serialize(builder, mode);
if (has_alt_text()) {
if (auto alt_text = m_properties.alt_text) {
builder.append(" / "sv);
m_properties.alt_text->serialize(builder, mode);
alt_text->serialize(builder, mode);
}
}