summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/blink/renderer/core/animation/css_interpolation_environment.cc
blob: d0a2bb7fd056d93c061b0a074ecf70ecb2690d05 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Copyright 2020 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.

#include "third_party/blink/renderer/core/animation/css_interpolation_environment.h"

#include "third_party/blink/renderer/core/animation/property_handle.h"
#include "third_party/blink/renderer/core/css/resolver/cascade_resolver.h"
#include "third_party/blink/renderer/core/css/resolver/style_cascade.h"

namespace blink {

const CSSValue* CSSInterpolationEnvironment::Resolve(
    const PropertyHandle& property,
    const CSSValue* value) const {
  DCHECK(cascade_);
  DCHECK(cascade_resolver_);
  if (!value)
    return value;
  return cascade_->Resolve(property.GetCSSPropertyName(), *value,
                           CascadeOrigin::kAnimation, *cascade_resolver_);
}

}  // namespace blink