blob: 86e5f28409ead28e16c6fb1cb992c3927c8b4ed0 [file] [log] [blame]
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CSSFontWeightInterpolationType_h
#define CSSFontWeightInterpolationType_h
#include "core/animation/CSSInterpolationType.h"
#include "platform/fonts/FontTraits.h"
namespace blink {
class CSSFontWeightInterpolationType : public CSSInterpolationType {
public:
CSSFontWeightInterpolationType(PropertyHandle property)
: CSSInterpolationType(property) {
DCHECK_EQ(cssProperty(), CSSPropertyFontWeight);
}
InterpolationValue maybeConvertStandardPropertyUnderlyingValue(
const ComputedStyle&) const final;
void applyStandardPropertyValue(const InterpolableValue&,
const NonInterpolableValue*,
StyleResolverState&) const final;
private:
InterpolationValue createFontWeightValue(FontWeight) const;
InterpolationValue maybeConvertNeutral(const InterpolationValue& underlying,
ConversionCheckers&) const final;
InterpolationValue maybeConvertInitial(const StyleResolverState&,
ConversionCheckers&) const final;
InterpolationValue maybeConvertInherit(const StyleResolverState&,
ConversionCheckers&) const final;
InterpolationValue maybeConvertValue(const CSSValue&,
const StyleResolverState*,
ConversionCheckers&) const final;
};
} // namespace blink
#endif // CSSFontWeightInterpolationType_h