mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
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:
committed by
Sam Atkins
parent
c6809eb53d
commit
a066ee720e
Notes:
github-actions[bot]
2026-03-31 12:50:19 +00:00
Author: https://github.com/shannonbooth Commit: https://github.com/LadybirdBrowser/ladybird/commit/a066ee720ed Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/8694 Reviewed-by: https://github.com/AtkinsSJ ✅ Reviewed-by: https://github.com/gmta ✅
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user