mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-22 02:09:24 +00:00
LibWeb: Port CSS::Parser::Function to new Strings
This commit is contained in:
parent
86d23c63a4
commit
05c1b09621
Notes:
sideshowbarker
2024-07-18 05:37:06 +09:00
Author: https://github.com/AtkinsSJ
Commit: 05c1b09621
Pull-request: https://github.com/SerenityOS/serenity/pull/17478
Reviewed-by: https://github.com/trflynn89 ✅
5 changed files with 20 additions and 19 deletions
|
@ -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;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue