mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:47:45 +00:00
LibWeb: Make StyleValue::to_string() infallible
This commit is contained in:
parent
ccfe197e5a
commit
7fe97ee6c5
112 changed files with 425 additions and 430 deletions
|
@ -30,18 +30,18 @@ ValueComparingNonnullRefPtr<GridAreaShorthandStyleValue> GridAreaShorthandStyleV
|
|||
GridTrackPlacementStyleValue::create(column_end)));
|
||||
}
|
||||
|
||||
ErrorOr<String> GridAreaShorthandStyleValue::to_string() const
|
||||
String GridAreaShorthandStyleValue::to_string() const
|
||||
{
|
||||
StringBuilder builder;
|
||||
if (!m_properties.row_start->as_grid_track_placement().grid_track_placement().is_auto())
|
||||
TRY(builder.try_appendff("{}", m_properties.row_start->as_grid_track_placement().grid_track_placement().to_string()));
|
||||
builder.appendff("{}", m_properties.row_start->as_grid_track_placement().grid_track_placement().to_string());
|
||||
if (!m_properties.column_start->as_grid_track_placement().grid_track_placement().is_auto())
|
||||
TRY(builder.try_appendff(" / {}", m_properties.column_start->as_grid_track_placement().grid_track_placement().to_string()));
|
||||
builder.appendff(" / {}", m_properties.column_start->as_grid_track_placement().grid_track_placement().to_string());
|
||||
if (!m_properties.row_end->as_grid_track_placement().grid_track_placement().is_auto())
|
||||
TRY(builder.try_appendff(" / {}", m_properties.row_end->as_grid_track_placement().grid_track_placement().to_string()));
|
||||
builder.appendff(" / {}", m_properties.row_end->as_grid_track_placement().grid_track_placement().to_string());
|
||||
if (!m_properties.column_end->as_grid_track_placement().grid_track_placement().is_auto())
|
||||
TRY(builder.try_appendff(" / {}", m_properties.column_end->as_grid_track_placement().grid_track_placement().to_string()));
|
||||
return builder.to_string();
|
||||
builder.appendff(" / {}", m_properties.column_end->as_grid_track_placement().grid_track_placement().to_string());
|
||||
return MUST(builder.to_string());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue