1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 11:57:34 +00:00

LibWeb: Port CSS::Parser::Function to new Strings

This commit is contained in:
Sam Atkins 2023-02-14 18:55:59 +00:00 committed by Tim Flynn
parent 86d23c63a4
commit 05c1b09621
5 changed files with 20 additions and 19 deletions

View file

@ -1,15 +1,15 @@
/*
* Copyright (c) 2020-2021, the SerenityOS developers.
* Copyright (c) 2021-2022, Sam Atkins <atkinssj@serenityos.org>
* Copyright (c) 2021-2023, Sam Atkins <atkinssj@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/DeprecatedFlyString.h>
#include <AK/DeprecatedString.h>
#include <AK/FlyString.h>
#include <AK/RefCounted.h>
#include <AK/String.h>
#include <AK/Vector.h>
#include <LibWeb/CSS/Parser/ComponentValue.h>
#include <LibWeb/Forward.h>
@ -18,7 +18,7 @@ namespace Web::CSS::Parser {
class Function : public RefCounted<Function> {
public:
static NonnullRefPtr<Function> create(DeprecatedFlyString name, Vector<ComponentValue>&& values)
static NonnullRefPtr<Function> create(FlyString name, Vector<ComponentValue>&& values)
{
return adopt_ref(*new Function(move(name), move(values)));
}
@ -28,12 +28,12 @@ public:
StringView name() const { return m_name; }
Vector<ComponentValue> const& values() const { return m_values; }
DeprecatedString to_deprecated_string() const;
ErrorOr<String> to_string() const;
private:
Function(DeprecatedFlyString name, Vector<ComponentValue>&& values);
Function(FlyString name, Vector<ComponentValue>&& values);
DeprecatedFlyString m_name;
FlyString m_name;
Vector<ComponentValue> m_values;
};
}