diff options
author | Sam Atkins <atkinssj@serenityos.org> | 2023-02-13 13:57:40 +0000 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2023-02-13 14:35:40 +0000 |
commit | 7fc72d383855d4252bddfdf9feaf5bb19261b1dd (patch) | |
tree | 6061f023911726f9501fd2771e66679dc07140f2 /Userland/Libraries/LibWeb/CSS/Parser/Token.h | |
parent | 09f7682febab19b0a320d315fc96cc29ba8569f9 (diff) | |
download | serenity-7fc72d383855d4252bddfdf9feaf5bb19261b1dd.zip |
LibWeb: Convert CSS Token value to new FlyString
Diffstat (limited to 'Userland/Libraries/LibWeb/CSS/Parser/Token.h')
-rw-r--r-- | Userland/Libraries/LibWeb/CSS/Parser/Token.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/Parser/Token.h b/Userland/Libraries/LibWeb/CSS/Parser/Token.h index 776d383e5e..ee6b842588 100644 --- a/Userland/Libraries/LibWeb/CSS/Parser/Token.h +++ b/Userland/Libraries/LibWeb/CSS/Parser/Token.h @@ -7,8 +7,8 @@ #pragma once -#include <AK/DeprecatedFlyString.h> #include <AK/DeprecatedString.h> +#include <AK/FlyString.h> #include <AK/Utf8View.h> #include <LibWeb/CSS/Number.h> @@ -63,37 +63,37 @@ public: StringView ident() const { VERIFY(m_type == Type::Ident); - return m_value.view(); + return m_value.bytes_as_string_view(); } StringView function() const { VERIFY(m_type == Type::Function); - return m_value.view(); + return m_value.bytes_as_string_view(); } u32 delim() const { VERIFY(m_type == Type::Delim); - return *Utf8View(m_value.view()).begin(); + return *Utf8View(m_value.bytes_as_string_view()).begin(); } StringView string() const { VERIFY(m_type == Type::String); - return m_value.view(); + return m_value.bytes_as_string_view(); } StringView url() const { VERIFY(m_type == Type::Url); - return m_value.view(); + return m_value.bytes_as_string_view(); } StringView at_keyword() const { VERIFY(m_type == Type::AtKeyword); - return m_value.view(); + return m_value.bytes_as_string_view(); } HashType hash_type() const @@ -104,7 +104,7 @@ public: StringView hash_value() const { VERIFY(m_type == Type::Hash); - return m_value.view(); + return m_value.bytes_as_string_view(); } Number const& number() const @@ -126,7 +126,7 @@ public: StringView dimension_unit() const { VERIFY(m_type == Type::Dimension); - return m_value.view(); + return m_value.bytes_as_string_view(); } float dimension_value() const { @@ -151,7 +151,7 @@ public: Position const& start_position() const { return m_start_position; } Position const& end_position() const { return m_end_position; } - static Token of_string(DeprecatedFlyString str) + static Token of_string(FlyString str) { Token token; token.m_type = Type::String; @@ -178,7 +178,7 @@ public: private: Type m_type { Type::Invalid }; - DeprecatedFlyString m_value; + FlyString m_value; Number m_number_value; HashType m_hash_type { HashType::Unrestricted }; |