blob: b5273fbefd38b09d3acf3dc04feccd62d2db4790 [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 CSSVisibilityInterpolationType_h
#define CSSVisibilityInterpolationType_h
#include "core/animation/CSSInterpolationType.h"
#include "core/style/ComputedStyleConstants.h"
namespace blink {
class CSSVisibilityInterpolationType : public CSSInterpolationType {
public:
CSSVisibilityInterpolationType(PropertyHandle property)
: CSSInterpolationType(property) {
DCHECK_EQ(cssProperty(), CSSPropertyVisibility);
}
InterpolationValue maybeConvertStandardPropertyUnderlyingValue(
const StyleResolverState&) const final;
PairwiseInterpolationValue maybeMergeSingles(
InterpolationValue&& start,
InterpolationValue&& end) const final;
void composite(UnderlyingValueOwner&,
double underlyingFraction,
const InterpolationValue&,
double interpolationFraction) const final;
void applyStandardPropertyValue(const InterpolableValue&,
const NonInterpolableValue*,
StyleResolverState&) const final;
private:
InterpolationValue createVisibilityValue(EVisibility) 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 // CSSVisibilityInterpolationType_h