1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 18:28:12 +00:00

LibWeb: Always move (Nonnull)RefPtr parameters into StyleValues

This is done for consistency rather than any performance concerns.
This commit is contained in:
MacDue 2023-02-16 18:40:11 +00:00 committed by Sam Atkins
parent ac3af6624b
commit e2691fcdf2
2 changed files with 34 additions and 21 deletions

View file

@ -300,7 +300,17 @@ BackgroundStyleValue::BackgroundStyleValue(
NonnullRefPtr<StyleValue> origin,
NonnullRefPtr<StyleValue> clip)
: StyleValueWithDefaultOperators(Type::Background)
, m_properties { .color = color, .image = image, .position = position, .size = size, .repeat = repeat, .attachment = attachment, .origin = origin, .clip = clip, .layer_count = 0 }
, m_properties {
.color = move(color),
.image = move(image),
.position = move(position),
.size = move(size),
.repeat = move(repeat),
.attachment = move(attachment),
.origin = move(origin),
.clip = move(clip),
.layer_count = 0
}
{
auto layer_count = [](auto style_value) -> size_t {
if (style_value->is_value_list())