Home | History | Annotate | Download | only in css
      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 "config.h"
      6 #include "core/animation/css/CSSTransitionData.h"
      7 
      8 #include "core/animation/Timing.h"
      9 
     10 namespace WebCore {
     11 
     12 CSSTransitionData::CSSTransitionData()
     13 {
     14     m_propertyList.append(initialProperty());
     15 }
     16 
     17 CSSTransitionData::CSSTransitionData(const CSSTransitionData& other)
     18     : CSSTimingData(other)
     19     , m_propertyList(other.m_propertyList)
     20 {
     21 }
     22 
     23 bool CSSTransitionData::transitionsMatchForStyleRecalc(const CSSTransitionData& other) const
     24 {
     25     return m_propertyList == other.m_propertyList;
     26 }
     27 
     28 Timing CSSTransitionData::convertToTiming(size_t index) const
     29 {
     30     ASSERT(index < m_propertyList.size());
     31     // Note that the backwards fill part is required for delay to work.
     32     Timing timing = CSSTimingData::convertToTiming(index);
     33     timing.fillMode = Timing::FillModeBoth;
     34     return timing;
     35 }
     36 
     37 } // namespace WebCore
     38