mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 13:55:06 +00:00

We have a new, improved string type coming up in AK (OOM aware, no null state), and while it's going to use UTF-8, the name UTF8String is a mouthful - so let's free up the String name by renaming the existing class. Making the old one have an annoying name will hopefully also help with quick adoption :^)
33 lines
757 B
C++
33 lines
757 B
C++
/*
|
|
* Copyright (c) 2020-2021, the SerenityOS developers.
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/DeprecatedString.h>
|
|
#include <AK/Vector.h>
|
|
#include <LibWeb/CSS/CSSStyleDeclaration.h>
|
|
#include <LibWeb/CSS/Parser/ComponentValue.h>
|
|
|
|
namespace Web::CSS::Parser {
|
|
|
|
class Declaration {
|
|
public:
|
|
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_string() const;
|
|
|
|
private:
|
|
FlyString m_name;
|
|
Vector<ComponentValue> m_values;
|
|
Important m_important { Important::No };
|
|
};
|
|
|
|
}
|