#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "third_party/blink/renderer/core/html/parser/html_parser_idioms.h"
#include "third_party/blink/renderer/core/html_names.h"
#include "third_party/blink/renderer/platform/wtf/math_extras.h"
#include "third_party/blink/renderer/platform/wtf/text/atomic_string.h"
#include "third_party/blink/renderer/platform/wtf/text/character_visitor.h"
#include "third_party/blink/renderer/platform/wtf/text/parsing_utilities.h"
#include "third_party/blink/renderer/platform/wtf/text/string_hash.h"
#include "third_party/blink/renderer/platform/wtf/text/string_to_number.h"
#include "third_party/blink/renderer/platform/wtf/text/text_encoding.h"
#include <limits>
namespace blink {
String StripLeadingAndTrailingHTMLSpaces(const String& string) { … }
Vector<String> SplitOnASCIIWhitespace(const String& input) { … }
String SerializeForNumberType(const Decimal& number) { … }
String SerializeForNumberType(double number) { … }
Decimal ParseToDecimalForNumberType(const String& string,
const Decimal& fallback_value) { … }
static double CheckDoubleValue(double value,
bool valid,
double fallback_value) { … }
double ParseToDoubleForNumberType(const String& string, double fallback_value) { … }
template <typename CharacterType>
static bool ParseHTMLIntegerInternal(const CharacterType* position,
const CharacterType* end,
int& value) { … }
bool ParseHTMLInteger(const String& input, int& value) { … }
static WTF::NumberParsingResult ParseHTMLNonNegativeIntegerInternal(
const String& input,
unsigned& value) { … }
bool ParseHTMLNonNegativeInteger(const String& input, unsigned& value) { … }
bool ParseHTMLClampedNonNegativeInteger(const String& input,
unsigned min,
unsigned max,
unsigned& value) { … }
template <typename CharacterType>
static bool IsSpaceOrDelimiter(CharacterType c) { … }
template <typename CharacterType>
static bool IsNotSpaceDelimiterOrNumberStart(CharacterType c) { … }
template <typename CharacterType>
static Vector<double> ParseHTMLListOfFloatingPointNumbersInternal(
const CharacterType* position,
const CharacterType* end) { … }
Vector<double> ParseHTMLListOfFloatingPointNumbers(const String& input) { … }
static const char kCharsetString[] = …;
static const size_t kCharsetLength = …;
String ExtractCharset(const String& value) { … }
enum class MetaAttribute { … };
WTF::TextEncoding EncodingFromMetaAttributes(
const HTMLAttributeList& attributes) { … }
static bool ThreadSafeEqual(const StringImpl* a, const StringImpl* b) { … }
bool ThreadSafeMatch(const QualifiedName& a, const QualifiedName& b) { … }
bool ThreadSafeMatch(const String& local_name, const QualifiedName& q_name) { … }
template <typename CharType>
inline StringImpl* FindStringIfStatic(const CharType* characters,
unsigned length) { … }
String AttemptStaticStringCreation(const LChar* characters, wtf_size_t size) { … }
String AttemptStaticStringCreation(const UChar* characters,
wtf_size_t size,
CharacterWidth width) { … }
}