LibWeb/CSS: Return TransformationStyleValue values by reference

Avoid copying the vector when we read from it.
This commit is contained in:
Sam Atkins 2025-01-15 14:53:18 +00:00 committed by Andreas Kling
parent 6c6bf322ea
commit 01d782a5ca
Notes: github-actions[bot] 2025-01-17 09:15:50 +00:00

View file

@ -1,7 +1,7 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <andreas@ladybird.org>
* Copyright (c) 2021, Tobias Christiansen <tobyase@serenityos.org>
* Copyright (c) 2021-2023, Sam Atkins <atkinssj@serenityos.org>
* Copyright (c) 2021-2025, Sam Atkins <sam@ladybird.org>
* Copyright (c) 2022-2023, MacDue <macdue@dueutil.tech>
*
* SPDX-License-Identifier: BSD-2-Clause
@ -22,8 +22,8 @@ public:
}
virtual ~TransformationStyleValue() override = default;
CSS::TransformFunction transform_function() const { return m_properties.transform_function; }
StyleValueVector values() const { return m_properties.values; }
TransformFunction transform_function() const { return m_properties.transform_function; }
StyleValueVector const& values() const { return m_properties.values; }
virtual String to_string(SerializationMode) const override;