LibWeb: Avoid unnecessary copies in CSS Parser
This commit is contained in:
parent
a211c06e99
commit
c64a5ccf29
Notes:
sideshowbarker
2024-07-17 06:44:05 +09:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/SerenityOS/serenity/commit/c64a5ccf29 Pull-request: https://github.com/SerenityOS/serenity/pull/15187
2 changed files with 3 additions and 3 deletions
|
@ -2740,7 +2740,7 @@ auto Parser::extract_properties(Vector<DeclarationOrAtRule> const& declarations_
|
|||
return result;
|
||||
}
|
||||
|
||||
PropertyOwningCSSStyleDeclaration* Parser::convert_to_style_declaration(Vector<DeclarationOrAtRule> declarations_and_at_rules)
|
||||
PropertyOwningCSSStyleDeclaration* Parser::convert_to_style_declaration(Vector<DeclarationOrAtRule> const& declarations_and_at_rules)
|
||||
{
|
||||
auto [properties, custom_properties] = extract_properties(declarations_and_at_rules);
|
||||
return PropertyOwningCSSStyleDeclaration::create(m_context.window_object(), move(properties), move(custom_properties));
|
||||
|
@ -5409,7 +5409,7 @@ RefPtr<StyleValue> Parser::parse_transform_origin_value(Vector<ComponentValue> c
|
|||
return {};
|
||||
};
|
||||
|
||||
auto make_list = [](NonnullRefPtr<StyleValue> x_value, NonnullRefPtr<StyleValue> y_value) -> NonnullRefPtr<StyleValueList> {
|
||||
auto make_list = [](NonnullRefPtr<StyleValue> const& x_value, NonnullRefPtr<StyleValue> const& y_value) -> NonnullRefPtr<StyleValueList> {
|
||||
NonnullRefPtrVector<StyleValue> values;
|
||||
values.append(x_value);
|
||||
values.append(y_value);
|
||||
|
|
|
@ -240,7 +240,7 @@ private:
|
|||
Vector<FontFace::Source> parse_font_face_src(TokenStream<ComponentValue>&);
|
||||
|
||||
CSSRule* convert_to_rule(NonnullRefPtr<Rule>);
|
||||
PropertyOwningCSSStyleDeclaration* convert_to_style_declaration(Vector<DeclarationOrAtRule> declarations);
|
||||
PropertyOwningCSSStyleDeclaration* convert_to_style_declaration(Vector<DeclarationOrAtRule> const& declarations);
|
||||
Optional<StyleProperty> convert_to_style_property(Declaration const&);
|
||||
|
||||
class Dimension {
|
||||
|
|
Loading…
Add table
Reference in a new issue