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:
parent
a168cda4a7
commit
bee32b6cd2
4 changed files with 15 additions and 14 deletions
|
@ -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 };
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue