| OLD | NEW |
| 1 /* | 1 /* |
| 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) | 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) |
| 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 4 * Copyright (C) 2013 Intel Corporation. All rights reserved. | 4 * Copyright (C) 2013 Intel Corporation. All rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 CSSPropertyAnimationDelay, CSSPropertyAnimationIterationCount, | 38 CSSPropertyAnimationDelay, CSSPropertyAnimationIterationCount, |
| 39 CSSPropertyAnimationDirection, CSSPropertyAnimationFillMode, | 39 CSSPropertyAnimationDirection, CSSPropertyAnimationFillMode, |
| 40 CSSPropertyAnimationPlayState, CSSPropertyAnimationName}; | 40 CSSPropertyAnimationPlayState, CSSPropertyAnimationName}; |
| 41 DEFINE_STATIC_LOCAL(StylePropertyShorthand, | 41 DEFINE_STATIC_LOCAL(StylePropertyShorthand, |
| 42 webkitAnimationLonghandsForParsing, | 42 webkitAnimationLonghandsForParsing, |
| 43 (CSSPropertyAnimation, animationPropertiesForParsing, | 43 (CSSPropertyAnimation, animationPropertiesForParsing, |
| 44 WTF_ARRAY_LENGTH(animationPropertiesForParsing))); | 44 WTF_ARRAY_LENGTH(animationPropertiesForParsing))); |
| 45 return webkitAnimationLonghandsForParsing; | 45 return webkitAnimationLonghandsForParsing; |
| 46 } | 46 } |
| 47 | 47 |
| 48 // Similar to animations, we have property after timing-function and delay after
duration | 48 // Similar to animations, we have property after timing-function and delay after |
| 49 // duration |
| 49 const StylePropertyShorthand& transitionShorthandForParsing() { | 50 const StylePropertyShorthand& transitionShorthandForParsing() { |
| 50 static const CSSPropertyID transitionProperties[] = { | 51 static const CSSPropertyID transitionProperties[] = { |
| 51 CSSPropertyTransitionDuration, CSSPropertyTransitionTimingFunction, | 52 CSSPropertyTransitionDuration, CSSPropertyTransitionTimingFunction, |
| 52 CSSPropertyTransitionDelay, CSSPropertyTransitionProperty}; | 53 CSSPropertyTransitionDelay, CSSPropertyTransitionProperty}; |
| 53 DEFINE_STATIC_LOCAL(StylePropertyShorthand, transitionLonghands, | 54 DEFINE_STATIC_LOCAL(StylePropertyShorthand, transitionLonghands, |
| 54 (CSSPropertyTransition, transitionProperties, | 55 (CSSPropertyTransition, transitionProperties, |
| 55 WTF_ARRAY_LENGTH(transitionProperties))); | 56 WTF_ARRAY_LENGTH(transitionProperties))); |
| 56 return transitionLonghands; | 57 return transitionLonghands; |
| 57 } | 58 } |
| 58 | 59 |
| 59 bool isShorthandProperty(CSSPropertyID id) { | 60 bool isShorthandProperty(CSSPropertyID id) { |
| 60 return shorthandForProperty(id).length(); | 61 return shorthandForProperty(id).length(); |
| 61 } | 62 } |
| 62 | 63 |
| 63 unsigned indexOfShorthandForLonghand( | 64 unsigned indexOfShorthandForLonghand( |
| 64 CSSPropertyID shorthandID, | 65 CSSPropertyID shorthandID, |
| 65 const Vector<StylePropertyShorthand, 4>& shorthands) { | 66 const Vector<StylePropertyShorthand, 4>& shorthands) { |
| 66 for (unsigned i = 0; i < shorthands.size(); ++i) { | 67 for (unsigned i = 0; i < shorthands.size(); ++i) { |
| 67 if (shorthands.at(i).id() == shorthandID) | 68 if (shorthands.at(i).id() == shorthandID) |
| 68 return i; | 69 return i; |
| 69 } | 70 } |
| 70 ASSERT_NOT_REACHED(); | 71 ASSERT_NOT_REACHED(); |
| 71 return 0; | 72 return 0; |
| 72 } | 73 } |
| 73 | 74 |
| 74 } // namespace blink | 75 } // namespace blink |
| OLD | NEW |