chromium/third_party/blink/renderer/core/css/resolver/style_builder_converter.cc

/*
 * Copyright (C) 2013 Google Inc. All rights reserved.
 *
 *     * Redistributions of source code must retain the above copyright
 * notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above
 * copyright notice, this list of conditions and the following disclaimer
 * in the documentation and/or other materials provided with the
 * distribution.
 *     * Neither the name of Google Inc. nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#include "third_party/blink/renderer/core/css/resolver/style_builder_converter.h"
#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/351564777): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include <algorithm>
#include <memory>
#include <utility>

#include "base/containers/adapters.h"
#include "base/notreached.h"
#include "build/build_config.h"
#include "third_party/blink/renderer/core/css/basic_shape_functions.h"
#include "third_party/blink/renderer/core/css/css_alternate_value.h"
#include "third_party/blink/renderer/core/css/css_axis_value.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_custom_ident_value.h"
#include "third_party/blink/renderer/core/css/css_dynamic_range_limit_mix_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_font_variation_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_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_palette_mix_value.h"
#include "third_party/blink/renderer/core/css/css_path_value.h"
#include "third_party/blink/renderer/core/css/css_pending_system_font_value.h"
#include "third_party/blink/renderer/core/css/css_primitive_value.h"
#include "third_party/blink/renderer/core/css/css_primitive_value_mappings.h"
#include "third_party/blink/renderer/core/css/css_quad_value.h"
#include "third_party/blink/renderer/core/css/css_ratio_value.h"
#include "third_party/blink/renderer/core/css/css_reflect_value.h"
#include "third_party/blink/renderer/core/css/css_relative_color_value.h"
#include "third_party/blink/renderer/core/css/css_shadow_value.h"
#include "third_party/blink/renderer/core/css/css_uri_value.h"
#include "third_party/blink/renderer/core/css/css_value_list.h"
#include "third_party/blink/renderer/core/css/parser/css_tokenizer.h"
#include "third_party/blink/renderer/core/css/properties/computed_style_utils.h"
#include "third_party/blink/renderer/core/css/properties/css_parsing_utils.h"
#include "third_party/blink/renderer/core/css/resolver/filter_operation_resolver.h"
#include "third_party/blink/renderer/core/css/resolver/transform_builder.h"
#include "third_party/blink/renderer/core/css/style_color.h"
#include "third_party/blink/renderer/core/css/style_engine.h"
#include "third_party/blink/renderer/core/css_value_keywords.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/frame/settings.h"
#include "third_party/blink/renderer/core/frame/web_feature.h"
#include "third_party/blink/renderer/core/style/computed_style_constants.h"
#include "third_party/blink/renderer/core/style/coord_box_offset_path_operation.h"
#include "third_party/blink/renderer/core/style/geometry_box_clip_path_operation.h"
#include "third_party/blink/renderer/core/style/offset_path_operation.h"
#include "third_party/blink/renderer/core/style/reference_clip_path_operation.h"
#include "third_party/blink/renderer/core/style/reference_offset_path_operation.h"
#include "third_party/blink/renderer/core/style/scoped_css_name.h"
#include "third_party/blink/renderer/core/style/scroll_start_data.h"
#include "third_party/blink/renderer/core/style/shape_clip_path_operation.h"
#include "third_party/blink/renderer/core/style/shape_offset_path_operation.h"
#include "third_party/blink/renderer/core/style/style_overflow_clip_margin.h"
#include "third_party/blink/renderer/core/style/style_svg_resource.h"
#include "third_party/blink/renderer/core/style/style_view_transition_group.h"
#include "third_party/blink/renderer/platform/fonts/font_palette.h"
#include "third_party/blink/renderer/platform/fonts/opentype/open_type_math_support.h"
#include "third_party/blink/renderer/platform/geometry/layout_unit.h"
#include "third_party/blink/renderer/platform/graphics/graphics_types.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/runtime_enabled_features.h"
#include "third_party/blink/renderer/platform/wtf/hash_map.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"

namespace blink {

const double kFinalStatePercentage =;
const double kMiddleStatePercentage =;

namespace {

Length ConvertGridTrackBreadth(const StyleResolverState& state,
                               const CSSValue& value) {}

Vector<AtomicString> ValueListToAtomicStringVector(
    const CSSValueList& value_list) {}

AtomicString FirstEntryAsAtomicString(const CSSValueList& value_list) {}

bool IsQuirkOrLinkOrFocusRingColor(CSSValueID value_id) {}

Color ResolveQuirkOrLinkOrFocusRingColor(
    CSSValueID value_id,
    const TextLinkColors& text_link_colors,
    mojom::blink::ColorScheme used_color_scheme,
    bool for_visited_link) {}

}  // namespace

scoped_refptr<StyleReflection> StyleBuilderConverter::ConvertBoxReflect(
    StyleResolverState& state,
    const CSSValue& value) {}

DynamicRangeLimit StyleBuilderConverter::ConvertDynamicRangeLimit(
    StyleResolverState& state,
    const CSSValue& value) {}

DynamicRangeLimit StyleBuilderConverterBase::ConvertDynamicRangeLimit(
    const CSSValue& value) {}

StyleSVGResource* StyleBuilderConverter::ConvertElementReference(
    StyleResolverState& state,
    const CSSValue& value) {}

LengthBox StyleBuilderConverter::ConvertClip(StyleResolverState& state,
                                             const CSSValue& value) {}

ClipPathOperation* StyleBuilderConverter::ConvertClipPath(
    StyleResolverState& state,
    const CSSValue& value) {}

FilterOperations StyleBuilderConverter::ConvertFilterOperations(
    StyleResolverState& state,
    const CSSValue& value,
    CSSPropertyID property_id) {}

FilterOperations StyleBuilderConverter::ConvertOffscreenFilterOperations(
    const CSSValue& value,
    const Font& font) {}

static FontDescription::GenericFamilyType ConvertGenericFamily(
    CSSValueID value_id) {}

static bool ConvertFontFamilyName(
    const CSSValue& value,
    FontDescription::GenericFamilyType& generic_family,
    AtomicString& family_name,
    FontBuilder* font_builder,
    const Document* document_for_count) {}

FontDescription::FamilyDescription StyleBuilderConverterBase::ConvertFontFamily(
    const CSSValue& value,
    FontBuilder* font_builder,
    const Document* document_for_count) {}

FontDescription::FamilyDescription StyleBuilderConverter::ConvertFontFamily(
    StyleResolverState& state,
    const CSSValue& value) {}

FontDescription::Kerning StyleBuilderConverter::ConvertFontKerning(
    StyleResolverState&,
    const CSSValue& value) {}

FontDescription::FontVariantPosition
StyleBuilderConverter::ConvertFontVariantPosition(StyleResolverState&,
                                                  const CSSValue& value) {}

FontVariantEmoji StyleBuilderConverter::ConvertFontVariantEmoji(
    StyleResolverState&,
    const CSSValue& value) {}

OpticalSizing StyleBuilderConverter::ConvertFontOpticalSizing(
    StyleResolverState&,
    const CSSValue& value) {}

scoped_refptr<FontFeatureSettings>
StyleBuilderConverter::ConvertFontFeatureSettings(StyleResolverState& state,
                                                  const CSSValue& value) {}

static bool CompareTags(FontVariationAxis a, FontVariationAxis b) {}

scoped_refptr<FontVariationSettings>
StyleBuilderConverter::ConvertFontVariationSettings(
    const StyleResolverState& state,
    const CSSValue& value) {}

scoped_refptr<FontPalette> StyleBuilderConverter::ConvertFontPalette(
    StyleResolverState& state,
    const CSSValue& value) {}

scoped_refptr<FontPalette> StyleBuilderConverterBase::ConvertPaletteMix(
    const CSSValue& value) {}

scoped_refptr<FontPalette> StyleBuilderConverterBase::ConvertFontPalette(
    const CSSValue& value) {}

float MathScriptScaleFactor(StyleResolverState& state) {}

static float ComputeFontSize(const CSSToLengthConversionData& conversion_data,
                             const CSSPrimitiveValue& primitive_value,
                             const FontDescription::Size& parent_size) {}

FontDescription::Size StyleBuilderConverterBase::ConvertFontSize(
    const CSSValue& value,
    const CSSToLengthConversionData& conversion_data,
    FontDescription::Size parent_size,
    const Document* document) {}

FontDescription::Size StyleBuilderConverter::ConvertFontSize(
    StyleResolverState& state,
    const CSSValue& value) {}

FontSizeAdjust StyleBuilderConverterBase::ConvertFontSizeAdjust(
    const StyleResolverState& state,
    const CSSValue& value) {}

FontSizeAdjust StyleBuilderConverter::ConvertFontSizeAdjust(
    StyleResolverState& state,
    const CSSValue& value) {}

std::optional<FontSelectionValue>
StyleBuilderConverter::ConvertFontStretchKeyword(const CSSValue& value) {}

FontSelectionValue StyleBuilderConverterBase::ConvertFontStretch(
    const CSSLengthResolver& length_resolver,
    const blink::CSSValue& value) {}

FontSelectionValue StyleBuilderConverter::ConvertFontStretch(
    blink::StyleResolverState& state,
    const blink::CSSValue& value) {}

FontSelectionValue StyleBuilderConverterBase::ConvertFontStyle(
    const CSSValue& value) {}

FontSelectionValue StyleBuilderConverter::ConvertFontStyle(
    StyleResolverState& state,
    const CSSValue& value) {}

FontSelectionValue StyleBuilderConverterBase::ConvertFontWeight(
    const CSSValue& value,
    FontSelectionValue parent_weight) {}

FontSelectionValue StyleBuilderConverter::ConvertFontWeight(
    StyleResolverState& state,
    const CSSValue& value) {}

FontDescription::FontVariantCaps
StyleBuilderConverterBase::ConvertFontVariantCaps(const CSSValue& value) {}

FontDescription::FontVariantCaps StyleBuilderConverter::ConvertFontVariantCaps(
    StyleResolverState&,
    const CSSValue& value) {}

FontDescription::VariantLigatures
StyleBuilderConverter::ConvertFontVariantLigatures(StyleResolverState&,
                                                   const CSSValue& value) {}

FontVariantNumeric StyleBuilderConverter::ConvertFontVariantNumeric(
    StyleResolverState&,
    const CSSValue& value) {}

scoped_refptr<FontVariantAlternates>
StyleBuilderConverter::ConvertFontVariantAlternates(StyleResolverState&,
                                                    const CSSValue& value) {}

FontVariantEastAsian StyleBuilderConverter::ConvertFontVariantEastAsian(
    StyleResolverState&,
    const CSSValue& value) {}

StyleSelfAlignmentData StyleBuilderConverter::ConvertSelfOrDefaultAlignmentData(
    StyleResolverState&,
    const CSSValue& value) {}

StyleContentAlignmentData StyleBuilderConverter::ConvertContentAlignmentData(
    StyleResolverState&,
    const CSSValue& value) {}

GridAutoFlow StyleBuilderConverter::ConvertGridAutoFlow(StyleResolverState&,
                                                        const CSSValue& value) {}

GridPosition StyleBuilderConverter::ConvertGridPosition(
    StyleResolverState& state,
    const CSSValue& value) {}

// static
ComputedGridTemplateAreas* StyleBuilderConverter::ConvertGridTemplateAreas(
    StyleResolverState&,
    const CSSValue& value) {}

GridTrackSize StyleBuilderConverter::ConvertGridTrackSize(
    StyleResolverState& state,
    const CSSValue& value) {}

static void ConvertGridLineNamesList(
    const CSSValue& value,
    wtf_size_t current_named_grid_line,
    NamedGridLinesMap& named_grid_lines,
    OrderedNamedGridLines& ordered_named_grid_lines,
    bool is_in_repeat = false,
    bool is_first_repeat = false) {}

NGGridTrackList StyleBuilderConverter::ConvertGridTrackSizeList(
    StyleResolverState& state,
    const CSSValue& value) {}

void StyleBuilderConverter::ConvertGridTrackList(
    const CSSValue& value,
    ComputedGridTrackList& computed_grid_track_list,
    StyleResolverState& state) {}

StyleHyphenateLimitChars StyleBuilderConverter::ConvertHyphenateLimitChars(
    StyleResolverState& state,
    const CSSValue& value) {}

int StyleBuilderConverter::ConvertBorderWidth(StyleResolverState& state,
                                              const CSSValue& value) {}

uint16_t StyleBuilderConverter::ConvertColumnRuleWidth(
    StyleResolverState& state,
    const CSSValue& value) {}

LayoutUnit StyleBuilderConverter::ConvertLayoutUnit(
    const StyleResolverState& state,
    const CSSValue& value) {}

std::optional<Length> StyleBuilderConverter::ConvertGapLength(
    const StyleResolverState& state,
    const CSSValue& value) {}

Length StyleBuilderConverter::ConvertLength(const StyleResolverState& state,
                                            const CSSValue& value) {}

UnzoomedLength StyleBuilderConverter::ConvertUnzoomedLength(
    StyleResolverState& state,
    const CSSValue& value) {}

float StyleBuilderConverter::ConvertZoom(const StyleResolverState& state,
                                         const CSSValue& value) {}

Length StyleBuilderConverter::ConvertLengthOrAuto(
    const StyleResolverState& state,
    const CSSValue& value) {}

ScrollStartData StyleBuilderConverter::ConvertScrollStart(
    const StyleResolverState& state,
    const CSSValue& value) {}

Length StyleBuilderConverter::ConvertLengthSizing(StyleResolverState& state,
                                                  const CSSValue& value) {}

Length StyleBuilderConverter::ConvertLengthMaxSizing(StyleResolverState& state,
                                                     const CSSValue& value) {}

TabSize StyleBuilderConverter::ConvertLengthOrTabSpaces(
    StyleResolverState& state,
    const CSSValue& value) {}

static CSSToLengthConversionData LineHeightToLengthConversionData(
    StyleResolverState& state) {}

Length StyleBuilderConverter::ConvertLineHeight(StyleResolverState& state,
                                                const CSSValue& value) {}

float StyleBuilderConverter::ConvertNumberOrPercentage(
    StyleResolverState& state,
    const CSSValue& value) {}

int StyleBuilderConverter::ConvertInteger(StyleResolverState& state,
                                          const CSSValue& value) {}

float StyleBuilderConverter::ConvertAlpha(StyleResolverState& state,
                                          const CSSValue& value) {}

ScopedCSSName* StyleBuilderConverter::ConvertNoneOrCustomIdent(
    StyleResolverState& state,
    const CSSValue& value) {}

ScopedCSSName* StyleBuilderConverter::ConvertNormalOrCustomIdent(
    StyleResolverState& state,
    const CSSValue& value) {}

ScopedCSSName* StyleBuilderConverter::ConvertCustomIdent(
    StyleResolverState& state,
    const CSSValue& value) {}

ScopedCSSName* StyleBuilderConverter::ConvertPositionAnchor(
    StyleResolverState& state,
    const CSSValue& value) {}

PositionVisibility StyleBuilderConverter::ConvertPositionVisibility(
    StyleResolverState& state,
    const CSSValue& value) {}

ScopedCSSNameList* StyleBuilderConverter::ConvertAnchorName(
    StyleResolverState& state,
    const CSSValue& value) {}

ScopedCSSNameList* StyleBuilderConverter::ConvertAnchorScope(
    StyleResolverState& state,
    const CSSValue& value) {}

StyleInitialLetter StyleBuilderConverter::ConvertInitialLetter(
    StyleResolverState& state,
    const CSSValue& value) {}

StyleOffsetRotation StyleBuilderConverter::ConvertOffsetRotate(
    StyleResolverState& state,
    const CSSValue& value) {}

StyleOffsetRotation StyleBuilderConverter::ConvertOffsetRotate(
    const CSSLengthResolver& length_resolver,
    const CSSValue& value) {}

LengthPoint StyleBuilderConverter::ConvertPosition(StyleResolverState& state,
                                                   const CSSValue& value) {}

LengthPoint StyleBuilderConverter::ConvertPositionOrAuto(
    StyleResolverState& state,
    const CSSValue& value) {}

LengthPoint StyleBuilderConverter::ConvertOffsetPosition(
    StyleResolverState& state,
    const CSSValue& value) {}

static float ConvertPerspectiveLength(
    StyleResolverState& state,
    const CSSPrimitiveValue& primitive_value) {}

float StyleBuilderConverter::ConvertPerspective(StyleResolverState& state,
                                                const CSSValue& value) {}

EPaintOrder StyleBuilderConverter::ConvertPaintOrder(
    StyleResolverState&,
    const CSSValue& css_paint_order) {}

Length StyleBuilderConverter::ConvertQuirkyLength(StyleResolverState& state,
                                                  const CSSValue& value) {}

scoped_refptr<QuotesData> StyleBuilderConverter::ConvertQuotes(
    StyleResolverState&,
    const CSSValue& value) {}

LengthSize StyleBuilderConverter::ConvertRadius(StyleResolverState& state,
                                                const CSSValue& value) {}

ShadowData StyleBuilderConverter::ConvertShadow(
    const CSSToLengthConversionData& conversion_data,
    StyleResolverState* state,
    const CSSValue& value) {}

ShadowList* StyleBuilderConverter::ConvertShadowList(StyleResolverState& state,
                                                     const CSSValue& value) {}

ShapeValue* StyleBuilderConverter::ConvertShapeValue(StyleResolverState& state,
                                                     const CSSValue& value) {}

float StyleBuilderConverter::ConvertSpacing(StyleResolverState& state,
                                            const CSSValue& value) {}

scoped_refptr<SVGDashArray> StyleBuilderConverter::ConvertStrokeDasharray(
    StyleResolverState& state,
    const CSSValue& value) {}

StyleViewTransitionGroup StyleBuilderConverter::ConvertViewTransitionGroup(
    StyleResolverState& state,
    const CSSValue& value) {}

ScopedCSSName* StyleBuilderConverter::ConvertViewTransitionName(
    StyleResolverState& state,
    const CSSValue& value) {}

ScopedCSSNameList* StyleBuilderConverter::ConvertViewTransitionClass(
    StyleResolverState& state,
    const CSSValue& value) {}

StyleColor ResolveColorValue(const CSSValue& value,
                             const TextLinkColors& text_link_colors,
                             mojom::blink::ColorScheme used_color_scheme,
                             const ui::ColorProvider* color_provider,
                             bool is_in_web_app_scope,
                             bool for_visited_link) {}

StyleColor StyleBuilderConverter::ConvertStyleColor(StyleResolverState& state,
                                                    const CSSValue& value,
                                                    bool for_visited_link) {}

StyleAutoColor StyleBuilderConverter::ConvertStyleAutoColor(
    StyleResolverState& state,
    const CSSValue& value,
    bool for_visited_link) {}

SVGPaint StyleBuilderConverter::ConvertSVGPaint(StyleResolverState& state,
                                                const CSSValue& value,
                                                bool for_visited_link) {}

// static
TextBoxEdge StyleBuilderConverter::ConvertTextBoxEdge(
    StyleResolverState& status,
    const CSSValue& value) {}

TextDecorationThickness StyleBuilderConverter::ConvertTextDecorationThickness(
    StyleResolverState& state,
    const CSSValue& value) {}

TextEmphasisPosition StyleBuilderConverter::ConvertTextTextEmphasisPosition(
    StyleResolverState& state,
    const CSSValue& value) {}

float StyleBuilderConverter::ConvertTextStrokeWidth(StyleResolverState& state,
                                                    const CSSValue& value) {}

TextSizeAdjust StyleBuilderConverter::ConvertTextSizeAdjust(
    StyleResolverState& state,
    const CSSValue& value) {}

TextUnderlinePosition StyleBuilderConverter::ConvertTextUnderlinePosition(
    StyleResolverState& state,
    const CSSValue& value) {}

Length StyleBuilderConverter::ConvertTextUnderlineOffset(
    StyleResolverState& state,
    const CSSValue& value) {}

TransformOperations StyleBuilderConverter::ConvertTransformOperations(
    StyleResolverState& state,
    const CSSValue& value) {}

TransformOrigin StyleBuilderConverter::ConvertTransformOrigin(
    StyleResolverState& state,
    const CSSValue& value) {}

cc::ScrollSnapType StyleBuilderConverter::ConvertSnapType(
    StyleResolverState&,
    const CSSValue& value) {}

cc::ScrollSnapAlign StyleBuilderConverter::ConvertSnapAlign(
    StyleResolverState&,
    const CSSValue& value) {}

TranslateTransformOperation* StyleBuilderConverter::ConvertTranslate(
    StyleResolverState& state,
    const CSSValue& value) {}

Rotation StyleBuilderConverter::ConvertRotation(
    const CSSLengthResolver& length_resolver,
    const CSSValue& value) {}

RotateTransformOperation* StyleBuilderConverter::ConvertRotate(
    StyleResolverState& state,
    const CSSValue& value) {}

ScaleTransformOperation* StyleBuilderConverter::ConvertScale(
    StyleResolverState& state,
    const CSSValue& value) {}

RespectImageOrientationEnum StyleBuilderConverter::ConvertImageOrientation(
    StyleResolverState& state,
    const CSSValue& value) {}

scoped_refptr<StylePath> StyleBuilderConverter::ConvertPathOrNone(
    StyleResolverState& state,
    const CSSValue& value) {}

namespace {

OffsetPathOperation* ConvertOffsetPathValueToOperation(
    StyleResolverState& state,
    const CSSValue& value,
    CoordBox coord_box) {}

}  // namespace

OffsetPathOperation* StyleBuilderConverter::ConvertOffsetPath(
    StyleResolverState& state,
    const CSSValue& value) {}

scoped_refptr<BasicShape> StyleBuilderConverter::ConvertObjectViewBox(
    StyleResolverState& state,
    const CSSValue& value) {}

static const CSSValue& ComputeColorValue(
    const CSSValue& color_value,
    const Document& document,
    mojom::blink::ColorScheme color_scheme) {}

static const CSSValue& ComputeRegisteredPropertyValue(
    const Document& document,
    const StyleResolverState* state,
    const CSSToLengthConversionData& css_to_length_conversion_data,
    const CSSValue& value,
    const CSSParserContext* context) {}

const CSSValue& StyleBuilderConverter::ConvertRegisteredPropertyInitialValue(
    Document& document,
    const CSSValue& value) {}

const CSSValue& StyleBuilderConverter::ConvertRegisteredPropertyValue(
    const StyleResolverState& state,
    const CSSValue& value,
    const CSSParserContext* parser_context) {}

// Registered properties need to substitute as absolute values. This means
// that 'em' units (for instance) are converted to 'px ' and calc()-expressions
// are resolved. This function creates new tokens equivalent to the computed
// value of the registered property.
//
// This is necessary to make things like font-relative units in inherited
// (and registered) custom properties work correctly.
//
// https://drafts.css-houdini.org/css-properties-values-api-1/#substitution
CSSVariableData* StyleBuilderConverter::ConvertRegisteredPropertyVariableData(
    const CSSValue& value,
    bool is_animation_tainted) {}

namespace {
gfx::SizeF GetRatioFromList(const CSSValueList& list) {}

bool ListHasAuto(const CSSValueList& list) {}
}  // namespace

StyleAspectRatio StyleBuilderConverter::ConvertAspectRatio(
    const StyleResolverState& state,
    const CSSValue& value) {}

bool StyleBuilderConverter::ConvertInternalAlignContentBlock(
    StyleResolverState&,
    const CSSValue& value) {}

bool StyleBuilderConverter::ConvertInternalEmptyLineHeight(
    StyleResolverState&,
    const CSSValue& value) {}

AtomicString StyleBuilderConverter::ConvertPage(StyleResolverState& state,
                                                const CSSValue& value) {}

RubyPosition StyleBuilderConverter::ConvertRubyPosition(
    StyleResolverState& state,
    const CSSValue& value) {}

StyleScrollbarColor* StyleBuilderConverter::ConvertScrollbarColor(
    StyleResolverState& state,
    const CSSValue& value) {}

ScrollbarGutter StyleBuilderConverter::ConvertScrollbarGutter(
    StyleResolverState& state,
    const CSSValue& value) {}

ScopedCSSNameList* StyleBuilderConverter::ConvertContainerName(
    StyleResolverState& state,
    const CSSValue& value) {}

StyleIntrinsicLength StyleBuilderConverter::ConvertIntrinsicDimension(
    const StyleResolverState& state,
    const CSSValue& value) {}

ColorSchemeFlags StyleBuilderConverter::ExtractColorSchemes(
    const Document& document,
    const CSSValueList& scheme_list,
    Vector<AtomicString>* color_schemes) {}

double StyleBuilderConverter::ConvertTimeValue(const StyleResolverState& state,
                                               const CSSValue& value) {}

std::optional<StyleOverflowClipMargin>
StyleBuilderConverter::ConvertOverflowClipMargin(StyleResolverState& state,
                                                 const CSSValue& value) {}

Vector<TimelineAxis> StyleBuilderConverter::ConvertViewTimelineAxis(
    StyleResolverState& state,
    const CSSValue& value) {}

TimelineInset StyleBuilderConverter::ConvertSingleTimelineInset(
    StyleResolverState& state,
    const CSSValue& value) {}

Vector<TimelineInset> StyleBuilderConverter::ConvertViewTimelineInset(
    StyleResolverState& state,
    const CSSValue& value) {}

ScopedCSSNameList* StyleBuilderConverter::ConvertViewTimelineName(
    StyleResolverState& state,
    const CSSValue& value) {}

ScopedCSSNameList* StyleBuilderConverter::ConvertTimelineScope(
    StyleResolverState& state,
    const CSSValue& value) {}

PositionArea StyleBuilderConverter::ConvertPositionArea(
    StyleResolverState& state,
    const CSSValue& value) {}

}  // namespace blink