summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/core/animation/css_size_list_interpolation_type.cc
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2019-05-24 11:40:17 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2019-05-24 12:42:11 +0000
commit5d87695f37678f96492b258bbab36486c59866b4 (patch)
treebe9783bbaf04fb930c4d74ca9c00b5e7954c8bc6 /chromium/third_party/blink/renderer/core/animation/css_size_list_interpolation_type.cc
parent6c11fb357ec39bf087b8b632e2b1e375aef1b38b (diff)
downloadqtwebengine-chromium-5d87695f37678f96492b258bbab36486c59866b4.tar.gz
BASELINE: Update Chromium to 75.0.3770.56
Change-Id: I86d2007fd27a45d5797eee06f4c9369b8b50ac4f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'chromium/third_party/blink/renderer/core/animation/css_size_list_interpolation_type.cc')
-rw-r--r--chromium/third_party/blink/renderer/core/animation/css_size_list_interpolation_type.cc31
1 files changed, 9 insertions, 22 deletions
diff --git a/chromium/third_party/blink/renderer/core/animation/css_size_list_interpolation_type.cc b/chromium/third_party/blink/renderer/core/animation/css_size_list_interpolation_type.cc
index ddeaef26ff2..181f65efd3c 100644
--- a/chromium/third_party/blink/renderer/core/animation/css_size_list_interpolation_type.cc
+++ b/chromium/third_party/blink/renderer/core/animation/css_size_list_interpolation_type.cc
@@ -21,17 +21,12 @@ namespace blink {
class UnderlyingSizeListChecker
: public CSSInterpolationType::CSSConversionChecker {
public:
- ~UnderlyingSizeListChecker() final = default;
+ explicit UnderlyingSizeListChecker(const NonInterpolableList& underlying_list)
+ : underlying_list_(&underlying_list) {}
- static std::unique_ptr<UnderlyingSizeListChecker> Create(
- const NonInterpolableList& underlying_list) {
- return base::WrapUnique(new UnderlyingSizeListChecker(underlying_list));
- }
+ ~UnderlyingSizeListChecker() final = default;
private:
- UnderlyingSizeListChecker(const NonInterpolableList& underlying_list)
- : underlying_list_(&underlying_list) {}
-
bool IsValid(const StyleResolverState&,
const InterpolationValue& underlying) const final {
const auto& underlying_list =
@@ -55,20 +50,12 @@ class UnderlyingSizeListChecker
class InheritedSizeListChecker
: public CSSInterpolationType::CSSConversionChecker {
public:
- ~InheritedSizeListChecker() final = default;
-
- static std::unique_ptr<InheritedSizeListChecker> Create(
- const CSSProperty& property,
- const SizeList& inherited_size_list) {
- return base::WrapUnique(
- new InheritedSizeListChecker(property, inherited_size_list));
- }
-
- private:
InheritedSizeListChecker(const CSSProperty& property,
const SizeList& inherited_size_list)
: property_(property), inherited_size_list_(inherited_size_list) {}
+ ~InheritedSizeListChecker() final = default;
+ private:
bool IsValid(const StyleResolverState& state,
const InterpolationValue&) const final {
return inherited_size_list_ == SizeListPropertyFunctions::GetSizeList(
@@ -100,7 +87,7 @@ InterpolationValue MaybeConvertCSSSizeList(const CSSValue& value) {
temp_list->Append(value);
list = temp_list;
} else {
- list = ToCSSValueList(&value);
+ list = To<CSSValueList>(&value);
}
// Flatten pairs of width/height into individual items, even for contain and
@@ -120,7 +107,7 @@ InterpolationValue CSSSizeListInterpolationType::MaybeConvertNeutral(
const auto& underlying_list =
ToNonInterpolableList(*underlying.non_interpolable_value);
conversion_checkers.push_back(
- UnderlyingSizeListChecker::Create(underlying_list));
+ std::make_unique<UnderlyingSizeListChecker>(underlying_list));
return ListInterpolationFunctions::CreateList(
underlying_list.length(), [&underlying_list](wtf_size_t index) {
return SizeInterpolationFunctions::CreateNeutralValue(
@@ -140,8 +127,8 @@ InterpolationValue CSSSizeListInterpolationType::MaybeConvertInherit(
ConversionCheckers& conversion_checkers) const {
SizeList inherited_size_list = SizeListPropertyFunctions::GetSizeList(
CssProperty(), *state.ParentStyle());
- conversion_checkers.push_back(
- InheritedSizeListChecker::Create(CssProperty(), inherited_size_list));
+ conversion_checkers.push_back(std::make_unique<InheritedSizeListChecker>(
+ CssProperty(), inherited_size_list));
return ConvertSizeList(inherited_size_list, state.Style()->EffectiveZoom());
}