#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "third_party/blink/renderer/core/css/properties/css_parsing_utils.h"
#include <cmath>
#include <memory>
#include <utility>
#include "third_party/blink/renderer/core/css/counter_style_map.h"
#include "third_party/blink/renderer/core/css/css_appearance_auto_base_select_value_pair.h"
#include "third_party/blink/renderer/core/css/css_axis_value.h"
#include "third_party/blink/renderer/core/css/css_basic_shape_values.h"
#include "third_party/blink/renderer/core/css/css_border_image.h"
#include "third_party/blink/renderer/core/css/css_bracketed_value_list.h"
#include "third_party/blink/renderer/core/css/css_color.h"
#include "third_party/blink/renderer/core/css/css_color_mix_value.h"
#include "third_party/blink/renderer/core/css/css_content_distribution_value.h"
#include "third_party/blink/renderer/core/css/css_crossfade_value.h"
#include "third_party/blink/renderer/core/css/css_custom_ident_value.h"
#include "third_party/blink/renderer/core/css/css_font_family_value.h"
#include "third_party/blink/renderer/core/css/css_font_feature_value.h"
#include "third_party/blink/renderer/core/css/css_font_style_range_value.h"
#include "third_party/blink/renderer/core/css/css_function_value.h"
#include "third_party/blink/renderer/core/css/css_gradient_value.h"
#include "third_party/blink/renderer/core/css/css_grid_auto_repeat_value.h"
#include "third_party/blink/renderer/core/css/css_grid_integer_repeat_value.h"
#include "third_party/blink/renderer/core/css/css_grid_template_areas_value.h"
#include "third_party/blink/renderer/core/css/css_identifier_value.h"
#include "third_party/blink/renderer/core/css/css_image_set_option_value.h"
#include "third_party/blink/renderer/core/css/css_image_set_type_value.h"
#include "third_party/blink/renderer/core/css/css_image_set_value.h"
#include "third_party/blink/renderer/core/css/css_image_value.h"
#include "third_party/blink/renderer/core/css/css_inherited_value.h"
#include "third_party/blink/renderer/core/css/css_initial_value.h"
#include "third_party/blink/renderer/core/css/css_light_dark_value_pair.h"
#include "third_party/blink/renderer/core/css/css_math_expression_node.h"
#include "third_party/blink/renderer/core/css/css_math_function_value.h"
#include "third_party/blink/renderer/core/css/css_numeric_literal_value.h"
#include "third_party/blink/renderer/core/css/css_paint_value.h"
#include "third_party/blink/renderer/core/css/css_palette_mix_value.h"
#include "third_party/blink/renderer/core/css/css_path_value.h"
#include "third_party/blink/renderer/core/css/css_primitive_value.h"
#include "third_party/blink/renderer/core/css/css_property_names.h"
#include "third_party/blink/renderer/core/css/css_property_value.h"
#include "third_party/blink/renderer/core/css/css_ratio_value.h"
#include "third_party/blink/renderer/core/css/css_ray_value.h"
#include "third_party/blink/renderer/core/css/css_revert_layer_value.h"
#include "third_party/blink/renderer/core/css/css_revert_value.h"
#include "third_party/blink/renderer/core/css/css_scroll_value.h"
#include "third_party/blink/renderer/core/css/css_shadow_value.h"
#include "third_party/blink/renderer/core/css/css_string_value.h"
#include "third_party/blink/renderer/core/css/css_timing_function_value.h"
#include "third_party/blink/renderer/core/css/css_unset_value.h"
#include "third_party/blink/renderer/core/css/css_uri_value.h"
#include "third_party/blink/renderer/core/css/css_value.h"
#include "third_party/blink/renderer/core/css/css_value_list.h"
#include "third_party/blink/renderer/core/css/css_value_pair.h"
#include "third_party/blink/renderer/core/css/css_variable_data.h"
#include "third_party/blink/renderer/core/css/css_view_value.h"
#include "third_party/blink/renderer/core/css/parser/css_parser_context.h"
#include "third_party/blink/renderer/core/css/parser/css_parser_fast_paths.h"
#include "third_party/blink/renderer/core/css/parser/css_parser_idioms.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.h"
#include "third_party/blink/renderer/core/css/parser/css_parser_token_range.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_color_function_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/longhand.h"
#include "third_party/blink/renderer/core/css/style_color.h"
#include "third_party/blink/renderer/core/css_value_keywords.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/frame/deprecation/deprecation.h"
#include "third_party/blink/renderer/core/frame/web_feature.h"
#include "third_party/blink/renderer/core/inspector/console_message.h"
#include "third_party/blink/renderer/core/page/chrome_client.h"
#include "third_party/blink/renderer/core/page/page.h"
#include "third_party/blink/renderer/core/style_property_shorthand.h"
#include "third_party/blink/renderer/core/svg/svg_parsing_error.h"
#include "third_party/blink/renderer/core/svg/svg_path_utilities.h"
#include "third_party/blink/renderer/platform/animation/timing_function.h"
#include "third_party/blink/renderer/platform/fonts/font_selection_types.h"
#include "third_party/blink/renderer/platform/graphics/color.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/instrumentation/use_counter.h"
#include "third_party/blink/renderer/platform/loader/fetch/fetch_initiator_type_names.h"
#include "third_party/blink/renderer/platform/runtime_enabled_features.h"
#include "third_party/blink/renderer/platform/wtf/text/string_builder.h"
#include "ui/gfx/animation/keyframe/timing_function.h"
#include "ui/gfx/color_utils.h"
namespace blink {
CSSBracketedValueList;
CSSFontFeatureValue;
namespace css_parsing_utils {
namespace {
const char kTwoDashes[] = …;
bool IsLeftOrRightKeyword(CSSValueID id) { … }
bool IsAuto(CSSValueID id) { … }
bool IsNormalOrStretch(CSSValueID id) { … }
bool IsContentDistributionKeyword(CSSValueID id) { … }
bool IsOverflowKeyword(CSSValueID id) { … }
bool IsIdent(const CSSValue& value, CSSValueID id) { … }
CSSIdentifierValue* ConsumeOverflowPositionKeyword(
CSSParserTokenStream& stream) { … }
CSSValueID GetBaselineKeyword(CSSValue& value) { … }
CSSValue* ConsumeFirstBaseline(CSSParserTokenStream& stream) { … }
CSSValue* ConsumeBaseline(CSSParserTokenStream& stream) { … }
std::optional<cssvalue::CSSLinearStop> ConsumeLinearStop(
CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
CSSValue* ConsumeLinear(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
CSSValue* ConsumeSteps(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
CSSValue* ConsumeCubicBezier(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
CSSIdentifierValue* ConsumeBorderImageRepeatKeyword(
CSSParserTokenStream& stream) { … }
bool ConsumeCSSValueId(CSSParserTokenStream& stream, CSSValueID& value) { … }
CSSValue* ConsumeShapeRadius(CSSParserTokenStream& args,
const CSSParserContext& context) { … }
cssvalue::CSSBasicShapeCircleValue* ConsumeBasicShapeCircle(
CSSParserTokenStream& args,
const CSSParserContext& context) { … }
cssvalue::CSSBasicShapeEllipseValue* ConsumeBasicShapeEllipse(
CSSParserTokenStream& args,
const CSSParserContext& context) { … }
cssvalue::CSSBasicShapePolygonValue* ConsumeBasicShapePolygon(
CSSParserTokenStream& args,
const CSSParserContext& context) { … }
template <class U>
bool ConsumeBorderRadiusCommon(CSSParserTokenStream& args,
const CSSParserContext& context,
U* shape) { … }
cssvalue::CSSBasicShapeInsetValue* ConsumeBasicShapeInset(
CSSParserTokenStream& args,
const CSSParserContext& context) { … }
cssvalue::CSSBasicShapeRectValue* ConsumeBasicShapeRect(
CSSParserTokenStream& args,
const CSSParserContext& context) { … }
cssvalue::CSSBasicShapeXYWHValue* ConsumeBasicShapeXYWH(
CSSParserTokenStream& args,
const CSSParserContext& context) { … }
bool ConsumeNumbers(CSSParserTokenStream& stream,
const CSSParserContext& context,
CSSFunctionValue*& transform_value,
unsigned number_of_arguments) { … }
bool ConsumeNumbersOrPercents(CSSParserTokenStream& stream,
const CSSParserContext& context,
CSSFunctionValue*& transform_value,
unsigned number_of_arguments) { … }
bool ConsumePerspective(CSSParserTokenStream& stream,
const CSSParserContext& context,
CSSFunctionValue*& transform_value,
bool use_legacy_parsing) { … }
bool ConsumeTranslate3d(CSSParserTokenStream& stream,
const CSSParserContext& context,
CSSFunctionValue*& transform_value) { … }
CSSFunctionValue* ConsumeFilterFunction(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
template <typename Func>
CSSLightDarkValuePair* ConsumeLightDark(Func consume_value,
CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
CSSAppearanceAutoBaseSelectValuePair* ConsumeAppearanceAutoBaseSelectColor(
CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
bool IsTokenAllowedForAnyValue(const CSSParserToken& token) { … }
bool IsGeneratedImage(const CSSValueID id) { … }
bool IsImageSet(const CSSValueID id) { … }
}
void Complete4Sides(CSSValue* side[4]) { … }
bool ConsumeCommaIncludingWhitespace(CSSParserTokenRange& range) { … }
bool ConsumeCommaIncludingWhitespace(CSSParserTokenStream& stream) { … }
bool ConsumeSlashIncludingWhitespace(CSSParserTokenRange& range) { … }
bool ConsumeSlashIncludingWhitespace(CSSParserTokenStream& stream) { … }
CSSParserTokenRange ConsumeFunction(CSSParserTokenRange& range) { … }
CSSParserTokenRange ConsumeFunction(CSSParserTokenStream& stream) { … }
bool ConsumeAnyValue(CSSParserTokenRange& range) { … }
namespace {
bool ConsumeAnyComponentValue(CSSParserTokenStream& stream) { … }
}
void ConsumeAnyValue(CSSParserTokenStream& stream) { … }
template <class T = CSSParserTokenRange>
requires std::is_same_v<T, CSSParserTokenStream> ||
std::is_same_v<T, CSSParserTokenRange>
class MathFunctionParser { … };
template <class T>
requires std::is_same_v<T, CSSParserTokenStream> ||
std::is_same_v<T, CSSParserTokenRange>
CSSPrimitiveValue* ConsumeIntegerInternal(T& range,
const CSSParserContext& context,
double minimum_value,
const bool is_percentage_allowed) { … }
CSSPrimitiveValue* ConsumeInteger(CSSParserTokenRange& range,
const CSSParserContext& context,
double minimum_value,
const bool is_percentage_allowed) { … }
CSSPrimitiveValue* ConsumeInteger(CSSParserTokenStream& stream,
const CSSParserContext& context,
double minimum_value,
const bool is_percentage_allowed) { … }
CSSPrimitiveValue* ConsumeIntegerOrNumberCalc(
CSSParserTokenStream& stream,
const CSSParserContext& context,
CSSPrimitiveValue::ValueRange value_range) { … }
CSSPrimitiveValue* ConsumePositiveInteger(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
bool ConsumeNumberRaw(CSSParserTokenStream& stream,
const CSSParserContext& context,
double& result) { … }
CSSPrimitiveValue* ConsumeNumber(CSSParserTokenRange& range,
const CSSParserContext& context,
CSSPrimitiveValue::ValueRange value_range) { … }
CSSPrimitiveValue* ConsumeNumber(CSSParserTokenStream& stream,
const CSSParserContext& context,
CSSPrimitiveValue::ValueRange value_range) { … }
inline bool ShouldAcceptUnitlessLength(double value,
CSSParserMode css_parser_mode,
UnitlessQuirk unitless) { … }
template <class T>
requires std::is_same_v<T, CSSParserTokenStream> ||
std::is_same_v<T, CSSParserTokenRange>
CSSPrimitiveValue* ConsumeLengthInternal(
T& range,
const CSSParserContext& context,
CSSPrimitiveValue::ValueRange value_range,
UnitlessQuirk unitless) { … }
CSSPrimitiveValue* ConsumeLength(CSSParserTokenRange& range,
const CSSParserContext& context,
CSSPrimitiveValue::ValueRange value_range,
UnitlessQuirk unitless) { … }
CSSPrimitiveValue* ConsumeLength(CSSParserTokenStream& stream,
const CSSParserContext& context,
CSSPrimitiveValue::ValueRange value_range,
UnitlessQuirk unitless) { … }
template <class T>
requires std::is_same_v<T, CSSParserTokenStream> ||
std::is_same_v<T, CSSParserTokenRange>
CSSPrimitiveValue* ConsumePercentInternal(
T& range,
const CSSParserContext& context,
CSSPrimitiveValue::ValueRange value_range) { … }
CSSPrimitiveValue* ConsumePercent(CSSParserTokenRange& range,
const CSSParserContext& context,
CSSPrimitiveValue::ValueRange value_range) { … }
CSSPrimitiveValue* ConsumePercent(CSSParserTokenStream& stream,
const CSSParserContext& context,
CSSPrimitiveValue::ValueRange value_range) { … }
CSSPrimitiveValue* ConsumeNumberOrPercent(
CSSParserTokenStream& stream,
const CSSParserContext& context,
CSSPrimitiveValue::ValueRange value_stream) { … }
CSSPrimitiveValue* ConsumeAlphaValue(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
bool CanConsumeCalcValue(CalculationResultCategory category,
CSSParserMode css_parser_mode) { … }
template <class T>
requires std::is_same_v<T, CSSParserTokenStream> ||
std::is_same_v<T, CSSParserTokenRange>
CSSPrimitiveValue* ConsumeLengthOrPercentInternal(
T& range,
const CSSParserContext& context,
CSSPrimitiveValue::ValueRange value_range,
UnitlessQuirk unitless,
CSSAnchorQueryTypes allowed_anchor_queries,
AllowCalcSize allow_calc_size) { … }
CSSPrimitiveValue* ConsumeLengthOrPercent(
CSSParserTokenRange& range,
const CSSParserContext& context,
CSSPrimitiveValue::ValueRange value_range,
UnitlessQuirk unitless,
CSSAnchorQueryTypes allowed_anchor_queries,
AllowCalcSize allow_calc_size) { … }
CSSPrimitiveValue* ConsumeLengthOrPercent(
CSSParserTokenStream& stream,
const CSSParserContext& context,
CSSPrimitiveValue::ValueRange value_range,
UnitlessQuirk unitless,
CSSAnchorQueryTypes allowed_anchor_queries,
AllowCalcSize allow_calc_size) { … }
namespace {
bool IsNonZeroUserUnitsValue(const CSSPrimitiveValue* value) { … }
}
CSSPrimitiveValue* ConsumeSVGGeometryPropertyLength(
CSSParserTokenStream& stream,
const CSSParserContext& context,
CSSPrimitiveValue::ValueRange value_range) { … }
CSSPrimitiveValue* ConsumeGradientLengthOrPercent(
CSSParserTokenStream& stream,
const CSSParserContext& context,
CSSPrimitiveValue::ValueRange value_range,
UnitlessQuirk unitless) { … }
template <class T>
requires std::is_same_v<T, CSSParserTokenStream> ||
std::is_same_v<T, CSSParserTokenRange>
static CSSPrimitiveValue* ConsumeNumericLiteralAngle(
T& range,
const CSSParserContext& context,
std::optional<WebFeature> unitless_zero_feature) { … }
template <class T>
requires std::is_same_v<T, CSSParserTokenStream> ||
std::is_same_v<T, CSSParserTokenRange>
static CSSPrimitiveValue* ConsumeMathFunctionAngle(
T& range,
const CSSParserContext& context,
double minimum_value,
double maximum_value) { … }
template <class T>
requires std::is_same_v<T, CSSParserTokenStream> ||
std::is_same_v<T, CSSParserTokenRange>
static CSSPrimitiveValue* ConsumeMathFunctionAngle(
T& range,
const CSSParserContext& context) { … }
CSSPrimitiveValue* ConsumeAngle(CSSParserTokenStream& stream,
const CSSParserContext& context,
std::optional<WebFeature> unitless_zero_feature,
double minimum_value,
double maximum_value) { … }
CSSPrimitiveValue* ConsumeAngle(CSSParserTokenRange& range,
const CSSParserContext& context,
std::optional<WebFeature> unitless_zero_feature,
double minimum_value,
double maximum_value) { … }
CSSPrimitiveValue* ConsumeAngle(
CSSParserTokenRange& range,
const CSSParserContext& context,
std::optional<WebFeature> unitless_zero_feature) { … }
CSSPrimitiveValue* ConsumeAngle(
CSSParserTokenStream& stream,
const CSSParserContext& context,
std::optional<WebFeature> unitless_zero_feature) { … }
CSSPrimitiveValue* ConsumeTime(CSSParserTokenStream& stream,
const CSSParserContext& context,
CSSPrimitiveValue::ValueRange value_range) { … }
template <typename T>
requires std::is_same_v<T, CSSParserTokenStream> ||
std::is_same_v<T, CSSParserTokenRange>
CSSPrimitiveValue* ConsumeResolution(T& range,
const CSSParserContext& context) { … }
template CSSPrimitiveValue* ConsumeResolution(CSSParserTokenRange& range,
const CSSParserContext& context);
template CSSPrimitiveValue* ConsumeResolution(CSSParserTokenStream& range,
const CSSParserContext& context);
CSSValue* ConsumeRatio(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
CSSIdentifierValue* ConsumeIdent(CSSParserTokenRange& range) { … }
CSSIdentifierValue* ConsumeIdent(CSSParserTokenStream& stream) { … }
CSSIdentifierValue* ConsumeIdentRange(CSSParserTokenRange& range,
CSSValueID lower,
CSSValueID upper) { … }
CSSIdentifierValue* ConsumeIdentRange(CSSParserTokenStream& stream,
CSSValueID lower,
CSSValueID upper) { … }
CSSCustomIdentValue* ConsumeCustomIdent(CSSParserTokenRange& range,
const CSSParserContext& context) { … }
CSSCustomIdentValue* ConsumeCustomIdent(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
template <typename T>
requires std::is_same_v<T, CSSParserTokenStream> ||
std::is_same_v<T, CSSParserTokenRange>
CSSCustomIdentValue* ConsumeDashedIdent(T& stream,
const CSSParserContext& context) { … }
template CSSCustomIdentValue* ConsumeDashedIdent(CSSParserTokenStream&,
const CSSParserContext&);
template CSSCustomIdentValue* ConsumeDashedIdent(CSSParserTokenRange&,
const CSSParserContext&);
CSSStringValue* ConsumeString(CSSParserTokenStream& stream) { … }
String ConsumeStringAsString(CSSParserTokenStream& stream) { … }
namespace {
bool IsFetchRestricted(StringView url, const CSSParserContext& context) { … }
CSSUrlData CollectUrlData(const StringView& url,
const CSSParserContext& context) { … }
}
CSSParserToken ConsumeUrlAsToken(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
cssvalue::CSSURIValue* ConsumeUrl(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
static bool ConsumeColorInterpolationSpace(
CSSParserTokenStream& stream,
Color::ColorSpace& color_space,
Color::HueInterpolationMethod& hue_interpolation) { … }
namespace {
CSSValue* ConsumeColorInternal(CSSParserTokenStream&,
const CSSParserContext&,
bool accept_quirky_colors,
AllowedColors);
}
static CSSValue* ConsumeColorMixFunction(CSSParserTokenStream& stream,
const CSSParserContext& context,
AllowedColors allowed_colors) { … }
template <class T>
requires std::is_same_v<T, CSSParserTokenStream> ||
std::is_same_v<T, CSSParserTokenRange>
static bool ParseHexColor(T& range, Color& result, bool accept_quirky_colors) { … }
namespace {
Color ResolveColor(CSSValue* value,
const ui::ColorProvider* color_provider,
bool is_in_web_app_scope) { … }
}
CSSValue* ConsumeColorContrast(CSSParserTokenStream& stream,
const CSSParserContext& context,
AllowedColors allowed_colors) { … }
namespace {
bool SystemAccentColorAllowed(const CSSParserContext& context) { … }
CSSValue* ConsumeColorInternal(CSSParserTokenStream& stream,
const CSSParserContext& context,
bool accept_quirky_colors,
AllowedColors allowed_colors) { … }
}
CSSValue* ConsumeColorMaybeQuirky(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
CSSValue* ConsumeColor(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
CSSValue* ConsumeAbsoluteColor(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
CSSValue* ConsumeLineWidth(CSSParserTokenStream& stream,
const CSSParserContext& context,
UnitlessQuirk unitless) { … }
template <typename T>
requires std::is_same_v<T, CSSParserTokenStream> ||
std::is_same_v<T, CSSParserTokenRange>
static CSSValue* ConsumePositionComponent(T& stream,
const CSSParserContext& context,
UnitlessQuirk unitless,
bool& horizontal_edge,
bool& vertical_edge) { … }
static bool IsHorizontalPositionKeywordOnly(const CSSValue& value) { … }
static bool IsVerticalPositionKeywordOnly(const CSSValue& value) { … }
static void PositionFromOneValue(CSSValue* value,
CSSValue*& result_x,
CSSValue*& result_y) { … }
static void PositionFromTwoValues(CSSValue* value1,
CSSValue* value2,
CSSValue*& result_x,
CSSValue*& result_y) { … }
static void PositionFromThreeOrFourValues(CSSValue** values,
CSSValue*& result_x,
CSSValue*& result_y) { … }
bool ConsumePosition(CSSParserTokenStream& stream,
const CSSParserContext& context,
UnitlessQuirk unitless,
std::optional<WebFeature> three_value_position,
CSSValue*& result_x,
CSSValue*& result_y) { … }
CSSValuePair* ConsumePosition(CSSParserTokenStream& stream,
const CSSParserContext& context,
UnitlessQuirk unitless,
std::optional<WebFeature> three_value_position) { … }
bool ConsumeOneOrTwoValuedPosition(CSSParserTokenStream& stream,
const CSSParserContext& context,
UnitlessQuirk unitless,
CSSValue*& result_x,
CSSValue*& result_y) { … }
bool ConsumeBorderShorthand(CSSParserTokenStream& stream,
const CSSParserContext& context,
const CSSParserLocalContext& local_context,
const CSSValue*& result_width,
const CSSValue*& result_style,
const CSSValue*& result_color) { … }
static CSSPrimitiveValue* ConsumeDeprecatedGradientPoint(
CSSParserTokenStream& stream,
const CSSParserContext& context,
bool horizontal) { … }
static CSSValue* ConsumeDeprecatedGradientStopColor(
CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
static bool ConsumeDeprecatedGradientColorStop(
CSSParserTokenStream& stream,
cssvalue::CSSGradientColorStop& stop,
const CSSParserContext& context) { … }
static CSSValue* ConsumeDeprecatedGradient(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
static CSSPrimitiveValue* ConsumeGradientAngleOrPercent(
CSSParserTokenStream& stream,
const CSSParserContext& context,
CSSPrimitiveValue::ValueRange value_range,
UnitlessQuirk) { … }
PositionFunctor;
static bool ConsumeGradientColorStops(CSSParserTokenStream& stream,
const CSSParserContext& context,
cssvalue::CSSGradientValue* gradient,
PositionFunctor consume_position_func) { … }
static CSSValue* ConsumeDeprecatedRadialGradient(
CSSParserTokenStream& stream,
const CSSParserContext& context,
cssvalue::CSSGradientRepeat repeating) { … }
static CSSValue* ConsumeRadialGradient(CSSParserTokenStream& stream,
const CSSParserContext& context,
cssvalue::CSSGradientRepeat repeating) { … }
static CSSValue* ConsumeLinearGradient(
CSSParserTokenStream& stream,
const CSSParserContext& context,
cssvalue::CSSGradientRepeat repeating,
cssvalue::CSSGradientType gradient_type) { … }
static CSSValue* ConsumeConicGradient(CSSParserTokenStream& stream,
const CSSParserContext& context,
cssvalue::CSSGradientRepeat repeating) { … }
CSSValue* ConsumeImageOrNone(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
CSSValue* ConsumeAxis(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
CSSValue* ConsumeIntrinsicSizeLonghand(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
static CSSValue* ConsumeDeprecatedWebkitCrossFade(
CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
static CSSValue* ConsumeCrossFade(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
static CSSValue* ConsumePaint(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
static CSSValue* ConsumeGeneratedImage(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
static CSSImageValue* CreateCSSImageValueWithReferrer(
const StringView& uri,
const CSSParserContext& context) { … }
static CSSImageSetTypeValue* ConsumeImageSetType(CSSParserTokenStream& stream) { … }
static CSSImageSetOptionValue* ConsumeImageSetOption(
CSSParserTokenStream& stream,
const CSSParserContext& context,
ConsumeGeneratedImagePolicy generated_image_policy) { … }
static CSSValue* ConsumeImageSet(
CSSParserTokenStream& stream,
const CSSParserContext& context,
ConsumeGeneratedImagePolicy generated_image_policy =
ConsumeGeneratedImagePolicy::kAllow) { … }
CSSValue* ConsumeImage(
CSSParserTokenStream& stream,
const CSSParserContext& context,
const ConsumeGeneratedImagePolicy generated_image_policy,
const ConsumeStringUrlImagePolicy string_url_image_policy,
const ConsumeImageSetImagePolicy image_set_image_policy) { … }
CSSIdentifierValue* ConsumeShapeBox(CSSParserTokenStream& stream) { … }
CSSIdentifierValue* ConsumeVisualBox(CSSParserTokenStream& range) { … }
template <class T>
requires std::is_same_v<T, CSSParserTokenStream> ||
std::is_same_v<T, CSSParserTokenRange>
CSSIdentifierValue* ConsumeCoordBoxInternal(T& range) { … }
CSSIdentifierValue* ConsumeCoordBox(CSSParserTokenRange& range) { … }
CSSIdentifierValue* ConsumeCoordBox(CSSParserTokenStream& stream) { … }
CSSIdentifierValue* ConsumeGeometryBox(CSSParserTokenStream& stream) { … }
void AddProperty(CSSPropertyID resolved_property,
CSSPropertyID current_shorthand,
const CSSValue& value,
bool important,
IsImplicitProperty implicit,
HeapVector<CSSPropertyValue, 64>& properties) { … }
CSSValue* ConsumeTransformValue(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
CSSValue* ConsumeTransformList(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
CSSValue* ConsumeFilterFunctionList(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
void CountKeywordOnlyPropertyUsage(CSSPropertyID property,
const CSSParserContext& context,
CSSValueID value_id) { … }
void WarnInvalidKeywordPropertyUsage(CSSPropertyID property,
const CSSParserContext& context,
CSSValueID value_id) { … }
const CSSValue* ParseLonghand(CSSPropertyID unresolved_property,
CSSPropertyID current_shorthand,
const CSSParserContext& context,
CSSParserTokenStream& stream) { … }
bool ConsumeShorthandVia2Longhands(
const StylePropertyShorthand& shorthand,
bool important,
const CSSParserContext& context,
CSSParserTokenStream& stream,
HeapVector<CSSPropertyValue, 64>& properties) { … }
bool ConsumeShorthandVia4Longhands(
const StylePropertyShorthand& shorthand,
bool important,
const CSSParserContext& context,
CSSParserTokenStream& stream,
HeapVector<CSSPropertyValue, 64>& properties) { … }
bool ConsumeShorthandGreedilyViaLonghands(
const StylePropertyShorthand& shorthand,
bool important,
const CSSParserContext& context,
CSSParserTokenStream& stream,
HeapVector<CSSPropertyValue, 64>& properties,
bool use_initial_value_function) { … }
void AddExpandedPropertyForValue(CSSPropertyID property,
const CSSValue& value,
bool important,
HeapVector<CSSPropertyValue, 64>& properties) { … }
bool IsBaselineKeyword(CSSValueID id) { … }
bool IsSelfPositionKeyword(CSSValueID id) { … }
bool IsSelfPositionOrLeftOrRightKeyword(CSSValueID id) { … }
bool IsContentPositionKeyword(CSSValueID id) { … }
bool IsContentPositionOrLeftOrRightKeyword(CSSValueID id) { … }
bool IsCSSWideKeyword(CSSValueID id) { … }
bool IsCSSWideKeyword(StringView keyword) { … }
bool IsRevertKeyword(StringView keyword) { … }
bool IsDefaultKeyword(StringView keyword) { … }
bool IsHashIdentifier(const CSSParserToken& token) { … }
bool IsDashedIdent(const CSSParserToken& token) { … }
CSSValue* ConsumeCSSWideKeyword(CSSParserTokenStream& stream) { … }
bool IsTimelineName(const CSSParserToken& token) { … }
CSSValue* ConsumeSelfPositionOverflowPosition(
CSSParserTokenStream& stream,
IsPositionKeyword is_position_keyword) { … }
CSSValue* ConsumeContentDistributionOverflowPosition(
CSSParserTokenStream& stream,
IsPositionKeyword is_position_keyword) { … }
CSSValue* ConsumeAnimationIterationCount(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
CSSValue* ConsumeAnimationName(CSSParserTokenStream& stream,
const CSSParserContext& context,
bool allow_quoted_name) { … }
CSSValue* ConsumeScrollFunction(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
CSSValue* ConsumeViewFunction(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
CSSValue* ConsumeAnimationTimeline(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
CSSValue* ConsumeAnimationTimingFunction(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
CSSValue* ConsumeAnimationDuration(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
CSSValue* ConsumeTimelineRangeName(CSSParserTokenStream& stream) { … }
CSSValue* ConsumeTimelineRangeName(CSSParserTokenRange& range) { … }
template <typename T>
requires std::is_same_v<T, CSSParserTokenStream> ||
std::is_same_v<T, CSSParserTokenRange>
CSSValue* ConsumeTimelineRangeNameAndPercent(T& stream,
const CSSParserContext& context) { … }
template CSSValue* ConsumeTimelineRangeNameAndPercent(
CSSParserTokenRange& stream,
const CSSParserContext& context);
CSSValue* ConsumeAnimationDelay(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
CSSValue* ConsumeAnimationRange(CSSParserTokenStream& stream,
const CSSParserContext& context,
double default_offset_percent) { … }
bool ConsumeAnimationShorthand(
const StylePropertyShorthand& shorthand,
HeapVector<Member<CSSValueList>, kMaxNumAnimationLonghands>& longhands,
ConsumeAnimationItemValue consumeLonghandItem,
IsResetOnlyFunction is_reset_only,
CSSParserTokenStream& stream,
const CSSParserContext& context,
bool use_legacy_parsing) { … }
CSSValue* ConsumeSingleTimelineAxis(CSSParserTokenStream& stream) { … }
CSSValue* ConsumeSingleTimelineName(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
namespace {
CSSValue* ConsumeSingleTimelineInsetSide(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
}
CSSValue* ConsumeSingleTimelineInset(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
const CSSValue* GetSingleValueOrMakeList(
CSSValue::ValueListSeparator list_separator,
HeapVector<Member<const CSSValue>, 4> values) { … }
CSSValue* ConsumeBackgroundAttachment(CSSParserTokenStream& stream) { … }
CSSValue* ConsumeBackgroundBlendMode(CSSParserTokenStream& stream) { … }
CSSValue* ConsumeBackgroundBox(CSSParserTokenStream& stream) { … }
CSSValue* ConsumeBackgroundBoxOrText(CSSParserTokenStream& stream) { … }
CSSValue* ConsumeMaskComposite(CSSParserTokenStream& stream) { … }
CSSValue* ConsumePrefixedMaskComposite(CSSParserTokenStream& stream) { … }
CSSValue* ConsumeMaskMode(CSSParserTokenStream& stream) { … }
CSSPrimitiveValue* ConsumeLengthOrPercentCountNegative(
CSSParserTokenRange& range,
const CSSParserContext& context,
std::optional<WebFeature> negative_size) { … }
CSSPrimitiveValue* ConsumeLengthOrPercentCountNegative(
CSSParserTokenStream& stream,
const CSSParserContext& context,
std::optional<WebFeature> negative_size) { … }
CSSValue* ConsumeBackgroundSize(CSSParserTokenRange& range,
const CSSParserContext& context,
std::optional<WebFeature> negative_size,
ParsingStyle parsing_style) { … }
CSSValue* ConsumeBackgroundSize(CSSParserTokenStream& stream,
const CSSParserContext& context,
std::optional<WebFeature> negative_size,
ParsingStyle parsing_style) { … }
static void SetAllowsNegativePercentageReference(CSSValue* value) { … }
bool ConsumeBackgroundPosition(CSSParserTokenStream& stream,
const CSSParserContext& context,
UnitlessQuirk unitless,
std::optional<WebFeature> three_value_position,
const CSSValue*& result_x,
const CSSValue*& result_y) { … }
CSSValue* ConsumePrefixedBackgroundBox(CSSParserTokenStream& stream,
AllowTextValue allow_text_value) { … }
CSSValue* ParseBackgroundBox(CSSParserTokenStream& stream,
const CSSParserLocalContext& local_context,
AllowTextValue alias_allow_text_value) { … }
CSSValue* ParseBackgroundSize(CSSParserTokenStream& stream,
const CSSParserContext& context,
const CSSParserLocalContext& local_context,
std::optional<WebFeature> negative_size) { … }
CSSValue* ParseMaskSize(CSSParserTokenStream& stream,
const CSSParserContext& context,
const CSSParserLocalContext& local_context,
std::optional<WebFeature> negative_size) { … }
CSSValue* ConsumeCoordBoxOrNoClip(CSSParserTokenStream& stream) { … }
namespace {
CSSValue* ConsumeBackgroundComponent(CSSPropertyID resolved_property,
CSSParserTokenStream& stream,
const CSSParserContext& context,
bool use_alias_parsing) { … }
}
bool ParseBackgroundOrMask(bool important,
CSSParserTokenStream& stream,
const CSSParserContext& context,
const CSSParserLocalContext& local_context,
HeapVector<CSSPropertyValue, 64>& properties) { … }
CSSIdentifierValue* ConsumeRepeatStyleIdent(CSSParserTokenStream& stream) { … }
CSSRepeatStyleValue* ConsumeRepeatStyleValue(CSSParserTokenStream& range) { … }
CSSValueList* ParseRepeatStyle(CSSParserTokenStream& stream) { … }
CSSValue* ConsumeWebkitBorderImage(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
bool ConsumeBorderImageComponents(CSSParserTokenStream& stream,
const CSSParserContext& context,
CSSValue*& source,
CSSValue*& slice,
CSSValue*& width,
CSSValue*& outset,
CSSValue*& repeat,
DefaultFill default_fill) { … }
CSSValue* ConsumeBorderImageRepeat(CSSParserTokenStream& stream) { … }
CSSValue* ConsumeBorderImageSlice(CSSParserTokenStream& stream,
const CSSParserContext& context,
DefaultFill default_fill) { … }
CSSValue* ConsumeBorderImageWidth(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
CSSValue* ConsumeBorderImageOutset(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
CSSValue* ParseBorderRadiusCorner(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
CSSValue* ParseBorderWidthSide(CSSParserTokenStream& stream,
const CSSParserContext& context,
const CSSParserLocalContext& local_context) { … }
const CSSValue* ParseBorderStyleSide(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
CSSValue* ConsumeShadow(CSSParserTokenStream& stream,
const CSSParserContext& context,
AllowInsetAndSpread inset_and_spread) { … }
CSSShadowValue* ParseSingleShadow(CSSParserTokenStream& range,
const CSSParserContext& context,
AllowInsetAndSpread inset_and_spread) { … }
CSSValue* ConsumeColumnCount(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
CSSValue* ConsumeColumnWidth(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
bool ConsumeColumnWidthOrCount(CSSParserTokenStream& stream,
const CSSParserContext& context,
CSSValue*& column_width,
CSSValue*& column_count) { … }
CSSValue* ConsumeGapLength(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
CSSValue* ConsumeCounter(CSSParserTokenStream& stream,
const CSSParserContext& context,
int default_value) { … }
CSSValue* ConsumeMathDepth(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
CSSValue* ConsumeFontSize(CSSParserTokenStream& stream,
const CSSParserContext& context,
UnitlessQuirk unitless) { … }
CSSValue* ConsumeLineHeight(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
CSSValue* ConsumePaletteMixFunction(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
CSSValue* ConsumeFontPalette(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
CSSValueList* ConsumeFontFamily(CSSParserTokenStream& stream) { … }
CSSValueList* ConsumeNonGenericFamilyNameList(CSSParserTokenStream& stream) { … }
CSSValue* ConsumeGenericFamily(CSSParserTokenStream& stream) { … }
CSSValue* ConsumeFamilyName(CSSParserTokenStream& range) { … }
String ConcatenateFamilyName(CSSParserTokenStream& range) { … }
CSSValueList* CombineToRangeList(const CSSPrimitiveValue* range_start,
const CSSPrimitiveValue* range_end) { … }
bool IsAngleWithinLimits(CSSPrimitiveValue* angle) { … }
CSSValue* ConsumeFontStyle(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
CSSIdentifierValue* ConsumeFontStretchKeywordOnly(
CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
CSSValue* ConsumeFontStretch(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
CSSValue* ConsumeFontWeight(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
CSSValue* ConsumeFontFeatureSettings(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
CSSFontFeatureValue* ConsumeFontFeatureTag(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
CSSIdentifierValue* ConsumeFontVariantCSS21(CSSParserTokenStream& stream) { … }
CSSIdentifierValue* ConsumeFontTechIdent(CSSParserTokenStream& stream) { … }
CSSIdentifierValue* ConsumeFontFormatIdent(CSSParserTokenStream& stream) { … }
CSSValueID FontFormatToId(String font_format) { … }
bool IsSupportedKeywordTech(CSSValueID keyword) { … }
bool IsSupportedKeywordFormat(CSSValueID keyword) { … }
Vector<String> ParseGridTemplateAreasColumnNames(const String& grid_row_names) { … }
CSSValue* ConsumeGridBreadth(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
CSSValue* ConsumeFitContent(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
bool IsGridBreadthFixedSized(const CSSValue& value) { … }
bool IsGridTrackFixedSized(const CSSValue& value) { … }
CSSValue* ConsumeGridTrackSize(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
CSSCustomIdentValue* ConsumeCustomIdentForGridLine(
CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
CSSBracketedValueList* ConsumeGridLineNames(
CSSParserTokenStream& stream,
const CSSParserContext& context,
bool is_subgrid_track_list,
CSSBracketedValueList* line_names = nullptr) { … }
bool AppendLineNames(CSSParserTokenStream& stream,
const CSSParserContext& context,
bool is_subgrid_track_list,
CSSValueList* values) { … }
bool ConsumeGridTrackRepeatFunction(CSSParserTokenStream& stream,
const CSSParserContext& context,
bool is_subgrid_track_list,
CSSValueList& list,
bool& is_auto_repeat,
bool& all_tracks_are_fixed_sized) { … }
bool ConsumeGridTemplateRowsAndAreasAndColumns(
bool important,
CSSParserTokenStream& stream,
const CSSParserContext& context,
const CSSValue*& template_rows,
const CSSValue*& template_columns,
const CSSValue*& template_areas) { … }
CSSValue* ConsumeGridLine(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
CSSValue* ConsumeGridTrackList(CSSParserTokenStream& stream,
const CSSParserContext& context,
TrackListType track_list_type) { … }
bool ParseGridTemplateAreasRow(const String& grid_row_names,
NamedGridAreaMap& grid_area_map,
const wtf_size_t row_count,
wtf_size_t& column_count) { … }
CSSValue* ConsumeGridTemplatesRowsOrColumns(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
bool ConsumeGridItemPositionShorthand(bool important,
CSSParserTokenStream& stream,
const CSSParserContext& context,
CSSValue*& start_value,
CSSValue*& end_value) { … }
bool ConsumeGridTemplateShorthand(bool important,
CSSParserTokenStream& stream,
const CSSParserContext& context,
const CSSValue*& template_rows,
const CSSValue*& template_columns,
const CSSValue*& template_areas) { … }
CSSValue* ConsumeHyphenateLimitChars(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
bool ConsumeFromPageBreakBetween(CSSParserTokenStream& stream,
CSSValueID& value) { … }
bool ConsumeFromColumnBreakBetween(CSSParserTokenStream& stream,
CSSValueID& value) { … }
bool ConsumeFromColumnOrPageBreakInside(CSSParserTokenStream& stream,
CSSValueID& value) { … }
bool ValidWidthOrHeightKeyword(CSSValueID id, const CSSParserContext& context) { … }
std::unique_ptr<SVGPathByteStream> ConsumePathStringArg(
CSSParserTokenStream& args) { … }
cssvalue::CSSPathValue* ConsumeBasicShapePath(CSSParserTokenStream& args) { … }
CSSValue* ConsumePathFunction(CSSParserTokenStream& stream,
EmptyPathStringHandling empty_handling) { … }
CSSValue* ConsumeRay(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
CSSValue* ConsumeMaxWidthOrHeight(CSSParserTokenStream& stream,
const CSSParserContext& context,
UnitlessQuirk unitless) { … }
CSSValue* ConsumeWidthOrHeight(CSSParserTokenStream& stream,
const CSSParserContext& context,
UnitlessQuirk unitless) { … }
CSSValue* ConsumeMarginOrOffset(CSSParserTokenStream& stream,
const CSSParserContext& context,
UnitlessQuirk unitless,
CSSAnchorQueryTypes allowed_anchor_queries) { … }
CSSValue* ConsumeScrollPadding(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
CSSValue* ConsumeScrollStart(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
CSSValue* ConsumeScrollStartTarget(CSSParserTokenStream& stream) { … }
CSSValue* ConsumeOffsetPath(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
CSSValue* ConsumePathOrNone(CSSParserTokenStream& stream) { … }
CSSValue* ConsumeOffsetRotate(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
CSSValue* ConsumeInitialLetter(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
bool ConsumeRadii(CSSValue* horizontal_radii[4],
CSSValue* vertical_radii[4],
CSSParserTokenStream& stream,
const CSSParserContext& context,
bool use_legacy_parsing) { … }
CSSValue* ConsumeBasicShape(CSSParserTokenStream& stream,
const CSSParserContext& context,
AllowPathValue allow_path,
AllowBasicShapeRectValue allow_rect,
AllowBasicShapeXYWHValue allow_xywh) { … }
CSSValue* ConsumeTextDecorationLine(CSSParserTokenStream& stream) { … }
CSSValue* ConsumeTextBoxEdge(CSSParserTokenStream& stream) { … }
CSSValue* ConsumeTextBoxTrim(CSSParserTokenStream& stream) { … }
CSSValue* ConsumeAutospace(CSSParserTokenStream& stream) { … }
CSSValue* ConsumeSpacingTrim(CSSParserTokenStream& stream) { … }
CSSValue* ConsumeTransformValue(CSSParserTokenStream& stream,
const CSSParserContext& context,
bool use_legacy_parsing) { … }
CSSValue* ConsumeTransformList(CSSParserTokenStream& stream,
const CSSParserContext& context,
const CSSParserLocalContext& local_context) { … }
CSSValue* ConsumeTransitionProperty(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
bool IsValidPropertyList(const CSSValueList& value_list) { … }
bool IsValidTransitionBehavior(const CSSValueID& value) { … }
bool IsValidTransitionBehaviorList(const CSSValueList& value_list) { … }
CSSValue* ConsumeBorderColorSide(CSSParserTokenStream& stream,
const CSSParserContext& context,
const CSSParserLocalContext& local_context) { … }
CSSValue* ConsumeBorderWidth(CSSParserTokenStream& stream,
const CSSParserContext& context,
UnitlessQuirk unitless) { … }
CSSValue* ParseSpacing(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
template <typename T>
requires std::is_same_v<T, CSSParserTokenStream> ||
std::is_same_v<T, CSSParserTokenRange>
CSSValue* ConsumeSingleContainerName(T& stream,
const CSSParserContext& context) { … }
template CSSValue* ConsumeSingleContainerName(CSSParserTokenRange& stream,
const CSSParserContext& context);
CSSValue* ConsumeContainerName(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
CSSValue* ConsumeContainerType(CSSParserTokenStream& stream) { … }
CSSValue* ConsumeSVGPaint(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
UnitlessQuirk UnitlessUnlessShorthand(
const CSSParserLocalContext& local_context) { … }
bool ShouldLowerCaseCounterStyleNameOnParse(const AtomicString& name,
const CSSParserContext& context) { … }
CSSCustomIdentValue* ConsumeCounterStyleName(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
AtomicString ConsumeCounterStyleNameInPrelude(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
CSSValue* ConsumeFontSizeAdjust(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
namespace {
bool ConsumeFlipsInto(CSSParserTokenStream& stream, CSSValue* (&flips)[3]) { … }
CSSValue* ConsumeDashedIdentOrTactic(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
CSSValue* ConsumePositionAreaFunction(CSSParserTokenStream& stream) { … }
}
CSSValue* ConsumeSinglePositionTryFallback(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
CSSValue* ConsumePositionTryFallbacks(CSSParserTokenStream& stream,
const CSSParserContext& context) { … }
namespace {
struct PositionAreaKeyword { … };
std::optional<PositionAreaKeyword> ConsumePositionAreaKeyword(
CSSParserTokenStream& stream) { … }
}
CSSValue* ConsumePositionArea(CSSParserTokenStream& stream) { … }
bool IsRepeatedPositionAreaValue(CSSValueID value_id) { … }
bool MaybeConsumeImportant(CSSParserTokenStream& stream,
bool allow_important_annotation) { … }
}
}