Files
ladybird/Libraries/LibWeb/Encoding/TextDecoderCommon.cpp
Andreas Kling e629e6a323 LibWeb: Extract TextDecoderCommon mixin into its own files
This mirrors the existing TextEncoderCommon split and lets a future
TextDecoderStream share the same encoding/fatal/ignoreBOM state with
TextDecoder. The state (decoder reference, encoding name, error mode,
ignore-BOM flag, and BOM-seen flag) all moves into a
TextDecoderCommonMixin base class so both interfaces can inherit it.
2026-04-28 19:17:09 +02:00

22 lines
507 B
C++

/*
* Copyright (c) 2026-present, the Ladybird developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibWeb/Encoding/TextDecoderCommon.h>
namespace Web::Encoding {
TextDecoderCommonMixin::TextDecoderCommonMixin(TextCodec::Decoder& decoder, FlyString encoding, ErrorMode error_mode, bool ignore_bom)
: m_decoder(decoder)
, m_encoding(move(encoding))
, m_error_mode(error_mode)
, m_ignore_bom(ignore_bom)
{
}
TextDecoderCommonMixin::~TextDecoderCommonMixin() = default;
}