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

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

This commit is contained in:
Sam Atkins 2023-02-15 11:28:23 +00:00 committed by Tim Flynn
parent a168cda4a7
commit bee32b6cd2
4 changed files with 15 additions and 14 deletions

View file

@ -1,12 +1,13 @@
/*
* Copyright (c) 2020-2021, the SerenityOS developers.
* Copyright (c) 2022-2023, Sam Atkins <atkinssj@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/DeprecatedString.h>
#include <AK/FlyString.h>
#include <AK/Vector.h>
#include <LibWeb/CSS/CSSStyleDeclaration.h>
#include <LibWeb/CSS/Parser/ComponentValue.h>
@ -15,17 +16,17 @@ namespace Web::CSS::Parser {
class Declaration {
public:
Declaration(DeprecatedFlyString name, Vector<ComponentValue> values, Important);
Declaration(FlyString name, Vector<ComponentValue> values, Important);
~Declaration();
StringView name() const { return m_name; }
Vector<ComponentValue> const& values() const { return m_values; }
Important importance() const { return m_important; }
DeprecatedString to_deprecated_string() const;
ErrorOr<String> to_string() const;
private:
DeprecatedFlyString m_name;
FlyString m_name;
Vector<ComponentValue> m_values;
Important m_important { Important::No };
};