#include "third_party/blink/renderer/core/animation/css_color_interpolation_type.h"
#include <memory>
#include <tuple>
#include <utility>
#include "third_party/blink/renderer/core/animation/color_property_functions.h"
#include "third_party/blink/renderer/core/animation/interpolable_color.h"
#include "third_party/blink/renderer/core/animation/interpolable_value.h"
#include "third_party/blink/renderer/core/css/css_color.h"
#include "third_party/blink/renderer/core/css/css_identifier_value.h"
#include "third_party/blink/renderer/core/css/resolver/style_resolver.h"
#include "third_party/blink/renderer/core/css/resolver/style_resolver_state.h"
#include "third_party/blink/renderer/core/style/computed_style.h"
namespace blink {
namespace {
Color ResolveCurrentColor(const StyleResolverState& state,
bool is_visited,
bool is_text_decoration) { … }
}
void CSSColorInterpolationType::EnsureInterpolableStyleColor(
InterpolableList& list,
wtf_size_t index) { … }
void CSSColorInterpolationType::EnsureCompatibleInterpolableColorTypes(
InterpolableList& list_a,
InterpolableList& list_b) { … }
InterpolableColor* CSSColorInterpolationType::CreateInterpolableColor(
const Color& color) { … }
InterpolableColor* CSSColorInterpolationType::CreateInterpolableColor(
CSSValueID keyword,
mojom::blink::ColorScheme color_scheme,
const ui::ColorProvider* color_provider) { … }
InterpolableColor* CSSColorInterpolationType::CreateInterpolableColor(
const StyleColor& color,
mojom::blink::ColorScheme color_scheme,
const ui::ColorProvider* color_provider) { … }
BaseInterpolableColor* CSSColorInterpolationType::CreateBaseInterpolableColor(
const StyleColor& color,
mojom::blink::ColorScheme color_scheme,
const ui::ColorProvider* color_provider) { … }
InterpolableColor* CSSColorInterpolationType::MaybeCreateInterpolableColor(
const CSSValue& value,
mojom::blink::ColorScheme color_scheme,
const ui::ColorProvider* color_provider) { … }
Color CSSColorInterpolationType::GetColor(const InterpolableValue& value) { … }
bool CSSColorInterpolationType::IsNonKeywordColor(
const InterpolableValue& value) { … }
Color CSSColorInterpolationType::ResolveInterpolableColor(
const InterpolableValue& value,
const StyleResolverState& state,
bool is_visited,
bool is_text_decoration) { … }
class InheritedColorChecker
: public CSSInterpolationType::CSSConversionChecker { … };
InterpolationValue CSSColorInterpolationType::MaybeConvertNeutral(
const InterpolationValue&,
ConversionCheckers&) const { … }
InterpolationValue CSSColorInterpolationType::MaybeConvertInitial(
const StyleResolverState& state,
ConversionCheckers& conversion_checkers) const { … }
InterpolationValue CSSColorInterpolationType::MaybeConvertInherit(
const StyleResolverState& state,
ConversionCheckers& conversion_checkers) const { … }
enum InterpolableColorPairIndex : unsigned { … };
InterpolationValue CSSColorInterpolationType::MaybeConvertValue(
const CSSValue& value,
const StyleResolverState* state,
ConversionCheckers& conversion_checkers) const { … }
PairwiseInterpolationValue CSSColorInterpolationType::MaybeMergeSingles(
InterpolationValue&& start,
InterpolationValue&& end) const { … }
InterpolationValue CSSColorInterpolationType::ConvertStyleColorPair(
const OptionalStyleColor& unvisited_color,
const OptionalStyleColor& visited_color,
mojom::blink::ColorScheme color_scheme,
const ui::ColorProvider* color_provider) { … }
InterpolationValue CSSColorInterpolationType::ConvertStyleColorPair(
const StyleColor& unvisited_color,
const StyleColor& visited_color,
mojom::blink::ColorScheme color_scheme,
const ui::ColorProvider* color_provider) { … }
InterpolationValue
CSSColorInterpolationType::MaybeConvertStandardPropertyUnderlyingValue(
const ComputedStyle& style) const { … }
void CSSColorInterpolationType::ApplyStandardPropertyValue(
const InterpolableValue& interpolable_value,
const NonInterpolableValue*,
StyleResolverState& state) const { … }
const CSSValue* CSSColorInterpolationType::CreateCSSValue(
const InterpolableValue& interpolable_value,
const NonInterpolableValue*,
const StyleResolverState& state) const { … }
void CSSColorInterpolationType::Composite(
UnderlyingValueOwner& underlying_value_owner,
double underlying_fraction,
const InterpolationValue& value,
double) const { … }
}