diff --git a/Libraries/LibWeb/CSS/Parser/Parser.cpp b/Libraries/LibWeb/CSS/Parser/Parser.cpp index 48465b44ca1..7b16548e2b8 100644 --- a/Libraries/LibWeb/CSS/Parser/Parser.cpp +++ b/Libraries/LibWeb/CSS/Parser/Parser.cpp @@ -43,18 +43,6 @@ Parser::Parser(ParsingContext const& context, Vector tokens) { } -Parser::Parser(Parser&& other) - : m_context(other.m_context) - , m_tokens(move(other.m_tokens)) - , m_token_stream(m_tokens) -{ - // Moving the TokenStream directly from `other` would break it, because TokenStream holds - // a reference to the Vector, so it would be pointing at the old Parser's tokens. - // So instead, we create a new TokenStream from this Parser's tokens, and then tell it to - // copy the other TokenStream's state. This is quite hacky. - m_token_stream.copy_state({}, other.m_token_stream); -} - // https://drafts.csswg.org/css-syntax/#parse-stylesheet template Parser::ParsedStyleSheet Parser::parse_a_stylesheet(TokenStream& input, Optional location) diff --git a/Libraries/LibWeb/CSS/Parser/TokenStream.h b/Libraries/LibWeb/CSS/Parser/TokenStream.h index 0db0d3231e2..8bce7eba33c 100644 --- a/Libraries/LibWeb/CSS/Parser/TokenStream.h +++ b/Libraries/LibWeb/CSS/Parser/TokenStream.h @@ -189,11 +189,6 @@ public: } } - void copy_state(Badge, TokenStream const& other) - { - m_index = other.m_index; - } - private: // https://drafts.csswg.org/css-syntax/#token-stream-tokens Span m_tokens;