#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "third_party/blink/renderer/core/html/parser/html_tokenizer.h"
#include "third_party/blink/renderer/core/html/parser/html_entity_parser.h"
#include "third_party/blink/renderer/core/html/parser/html_parser_idioms.h"
#include "third_party/blink/renderer/core/html/parser/html_tree_builder.h"
#include "third_party/blink/renderer/core/html/parser/markup_tokenizer_inlines.h"
#include "third_party/blink/renderer/core/html_names.h"
#include "third_party/blink/renderer/core/html_tokenizer_names.h"
#include "third_party/blink/renderer/platform/wtf/text/ascii_ctype.h"
#include "third_party/blink/renderer/platform/wtf/text/unicode.h"
namespace blink {
#define INT_0_TO_127_LIST(V) …
enum class ScanFlags : uint16_t { … };
static constexpr uint16_t CreateScanFlags(UChar cc) { … }
#define kChildNodePartStartMarker …
#define kChildNodePartEndMarker …
#define kNodePartMarker …
#define kAttributePartMarker …
static constexpr const uint16_t character_scan_flags_[128] = …;
static inline UChar ToLowerCase(UChar cc) { … }
static inline bool CheckScanFlag(UChar cc, ScanFlags flag) { … }
static inline UChar ToLowerCaseIfAlpha(UChar cc) { … }
static inline bool VectorEqualsString(const LCharLiteralBuffer<32>& vector,
const String& string) { … }
#define HTML_BEGIN_STATE(stateName) …
#define HTML_BEGIN_STATE_NOLABEL(stateName) …
#define HTML_RECONSUME_IN(stateName) …
#define HTML_ADVANCE_TO(stateName) …
#define HTML_ADVANCE_PAST_NON_NEWLINE_TO(stateName) …
#define HTML_CONSUME(stateName) …
#define HTML_CONSUME_NON_NEWLINE(stateName) …
#define HTML_SWITCH_TO(stateName) …
HTMLTokenizer::HTMLTokenizer(const HTMLParserOptions& options)
: … { … }
HTMLTokenizer::~HTMLTokenizer() = default;
void HTMLTokenizer::Reset() { … }
inline bool HTMLTokenizer::ProcessEntity(SegmentedString& source) { … }
bool HTMLTokenizer::FlushBufferedEndTag(SegmentedString& source,
bool current_char_may_be_newline) { … }
#define FLUSH_AND_ADVANCE_TO(stateName, current_char_may_be_newline) …
#define FLUSH_AND_ADVANCE_TO_NO_NEWLINE(stateName) …
#define FLUSH_AND_ADVANCE_TO_MAY_CONTAIN_NEWLINE(stateName) …
#define ADVANCE_PAST_MULTIPLE_NO_NEWLINE(len, newState) …
bool HTMLTokenizer::FlushEmitAndResumeInDataState(SegmentedString& source) { … }
HTMLToken* HTMLTokenizer::NextToken(SegmentedString& source) { … }
bool HTMLTokenizer::NextTokenImpl(SegmentedString& source) { … }
bool HTMLTokenizer::SkipWhitespaces(SegmentedString& source, UChar& cc) { … }
bool HTMLTokenizer::SkipWhitespacesHelper(SegmentedString& source, UChar& cc) { … }
bool HTMLTokenizer::EmitData(SegmentedString& source, UChar cc) { … }
bool HTMLTokenizer::EmitPLAINTEXT(SegmentedString& source, UChar cc) { … }
String HTMLTokenizer::BufferedCharacters() const { … }
void HTMLTokenizer::UpdateStateFor(const HTMLToken& token) { … }
void HTMLTokenizer::UpdateStateFor(html_names::HTMLTag tag) { … }
std::optional<HTMLTokenizer::State> HTMLTokenizer::SpeculativeStateForTag(
html_names::HTMLTag tag) const { … }
inline bool HTMLTokenizer::TemporaryBufferIs(const String& expected_string) { … }
inline void HTMLTokenizer::AddToPossibleEndTag(LChar cc) { … }
inline bool HTMLTokenizer::IsAppropriateEndTag() { … }
inline void HTMLTokenizer::ParseError() { … }
}