#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_HTML_PARSER_HTML_PARSER_IDIOMS_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_HTML_PARSER_HTML_PARSER_IDIOMS_H_
#include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/core/dom/qualified_name.h"
#include "third_party/blink/renderer/core/html/parser/literal_buffer.h"
#include "third_party/blink/renderer/platform/wtf/decimal.h"
#include "third_party/blink/renderer/platform/wtf/forward.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
#include "third_party/blink/renderer/platform/wtf/vector.h"
namespace WTF {
class TextEncoding;
}
namespace blink {
CORE_EXPORT String StripLeadingAndTrailingHTMLSpaces(const String&);
CORE_EXPORT Vector<String> SplitOnASCIIWhitespace(const String&);
String SerializeForNumberType(const Decimal&);
String SerializeForNumberType(double);
Decimal ParseToDecimalForNumberType(
const String&,
const Decimal& fallback_value = Decimal::Nan());
CORE_EXPORT double ParseToDoubleForNumberType(
const String&,
double fallback_value = std::numeric_limits<double>::quiet_NaN());
CORE_EXPORT bool ParseHTMLInteger(const String&, int&);
CORE_EXPORT bool ParseHTMLNonNegativeInteger(const String&, unsigned&);
bool ParseHTMLClampedNonNegativeInteger(const String&,
unsigned min,
unsigned max,
unsigned&);
CORE_EXPORT Vector<double> ParseHTMLListOfFloatingPointNumbers(const String&);
HTMLAttributeList;
WTF::TextEncoding EncodingFromMetaAttributes(const HTMLAttributeList&);
template <typename CharType>
inline bool IsHTMLSpace(CharType character) { … }
template <typename CharType>
ALWAYS_INLINE bool IsHTMLSpecialWhitespace(CharType character) { … }
template <typename CharType>
inline bool IsComma(CharType character) { … }
template <typename CharType>
inline bool IsColon(CharType character) { … }
template <typename CharType>
inline bool IsHTMLSpaceOrComma(CharType character) { … }
inline bool IsHTMLLineBreak(UChar character) { … }
template <typename CharType>
inline bool IsNotHTMLSpace(CharType character) { … }
template <typename CharType>
inline bool IsHTMLSpaceNotLineBreak(CharType character) { … }
bool ThreadSafeMatch(const QualifiedName&, const QualifiedName&);
bool ThreadSafeMatch(const String&, const QualifiedName&);
enum CharacterWidth { … };
String AttemptStaticStringCreation(const LChar*, wtf_size_t);
String AttemptStaticStringCreation(const UChar*, wtf_size_t, CharacterWidth);
template <wtf_size_t inlineCapacity>
inline static String AttemptStaticStringCreation(
const UCharLiteralBuffer<inlineCapacity>& vector) { … }
template <wtf_size_t inlineCapacity>
inline static String AttemptStaticStringCreation(
const Vector<UChar, inlineCapacity>& vector,
CharacterWidth width) { … }
inline static String AttemptStaticStringCreation(const String& str) { … }
}
#endif