#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "third_party/blink/renderer/core/css/parser/css_property_parser.h"
#include "third_party/blink/renderer/core/css/css_pending_substitution_value.h"
#include "third_party/blink/renderer/core/css/css_unicode_range_value.h"
#include "third_party/blink/renderer/core/css/css_unparsed_declaration_value.h"
#include "third_party/blink/renderer/core/css/hash_tools.h"
#include "third_party/blink/renderer/core/css/parser/at_rule_descriptor_parser.h"
#include "third_party/blink/renderer/core/css/parser/css_parser_impl.h"
#include "third_party/blink/renderer/core/css/parser/css_parser_local_context.h"
#include "third_party/blink/renderer/core/css/parser/css_parser_mode.h"
#include "third_party/blink/renderer/core/css/parser/css_parser_save_point.h"
#include "third_party/blink/renderer/core/css/parser/css_parser_token_stream.h"
#include "third_party/blink/renderer/core/css/parser/css_variable_parser.h"
#include "third_party/blink/renderer/core/css/properties/css_parsing_utils.h"
#include "third_party/blink/renderer/core/css/properties/css_property.h"
#include "third_party/blink/renderer/core/css/properties/shorthand.h"
#include "third_party/blink/renderer/core/css/property_bitsets.h"
#include "third_party/blink/renderer/core/html/parser/html_parser_idioms.h"
#include "third_party/blink/renderer/core/style_property_shorthand.h"
#include "third_party/blink/renderer/platform/wtf/text/character_visitor.h"
namespace blink {
ConsumeIdent;
IsImplicitProperty;
ParseLonghand;
class CSSIdentifierValue;
namespace {
bool IsPropertyAllowedInRule(const CSSProperty& property,
StyleRule::RuleType rule_type) { … }
}
CSSPropertyParser::CSSPropertyParser(
CSSParserTokenStream& stream,
const CSSParserContext* context,
HeapVector<CSSPropertyValue, 64>* parsed_properties)
: … { … }
bool CSSPropertyParser::ParseValue(
CSSPropertyID unresolved_property,
bool allow_important_annotation,
CSSParserTokenStream& stream,
const CSSParserContext* context,
HeapVector<CSSPropertyValue, 64>& parsed_properties,
StyleRule::RuleType rule_type) { … }
const CSSValue* CSSPropertyParser::ParseSingleValue(
CSSPropertyID property,
CSSParserTokenStream& stream,
const CSSParserContext* context) { … }
StringView StripInitialWhitespace(StringView value) { … }
bool CSSPropertyParser::ParseValueStart(CSSPropertyID unresolved_property,
bool allow_important_annotation,
StyleRule::RuleType rule_type) { … }
static inline bool IsExposedInMode(const ExecutionContext* execution_context,
const CSSUnresolvedProperty& property,
CSSParserMode mode) { … }
static inline bool QuasiLowercaseIntoBuffer(const UChar* src,
unsigned length,
char* dst) { … }
static inline bool QuasiLowercaseIntoBuffer(const LChar* src,
unsigned length,
char* dst) { … }
static CSSPropertyID ExposedProperty(CSSPropertyID property_id,
const ExecutionContext* execution_context,
CSSParserMode mode) { … }
template <typename CharacterType>
static CSSPropertyID UnresolvedCSSPropertyID(
const ExecutionContext* execution_context,
const CharacterType* property_name,
unsigned length,
CSSParserMode mode) { … }
CSSPropertyID UnresolvedCSSPropertyID(const ExecutionContext* execution_context,
StringView string,
CSSParserMode mode) { … }
template <typename CharacterType>
static CSSValueID CssValueKeywordID(const CharacterType* value_keyword,
unsigned length) { … }
CSSValueID CssValueKeywordID(StringView string) { … }
const CSSValue* CSSPropertyParser::ConsumeCSSWideKeyword(
CSSParserTokenStream& stream,
bool allow_important_annotation,
bool& important) { … }
bool CSSPropertyParser::ParseCSSWideKeyword(CSSPropertyID unresolved_property,
bool allow_important_annotation) { … }
bool CSSPropertyParser::ParseFontFaceDescriptor(
CSSPropertyID resolved_property) { … }
}