1 // Copyright 2014 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #include "third_party/blink/renderer/core/animation/css/css_transition_data.h" 6 7 #include "third_party/blink/renderer/core/animation/timing.h" 8 9 namespace blink { 10 CSSTransitionData()11CSSTransitionData::CSSTransitionData() { 12 property_list_.push_back(InitialProperty()); 13 } 14 15 CSSTransitionData::CSSTransitionData(const CSSTransitionData& other) = default; 16 TransitionsMatchForStyleRecalc(const CSSTransitionData & other) const17bool CSSTransitionData::TransitionsMatchForStyleRecalc( 18 const CSSTransitionData& other) const { 19 return property_list_ == other.property_list_ && 20 TimingMatchForStyleRecalc(other); 21 } 22 ConvertToTiming(size_t index) const23Timing CSSTransitionData::ConvertToTiming(size_t index) const { 24 DCHECK_LT(index, property_list_.size()); 25 // Note that the backwards fill part is required for delay to work. 26 Timing timing = CSSTimingData::ConvertToTiming(index); 27 timing.fill_mode = Timing::FillMode::BACKWARDS; 28 return timing; 29 } 30 31 } // namespace blink 32