| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 return target > reference; | 72 return target > reference; |
| 73 } | 73 } |
| 74 | 74 |
| 75 CSSPropertyID propertyForAnimation(CSSPropertyID property) | 75 CSSPropertyID propertyForAnimation(CSSPropertyID property) |
| 76 { | 76 { |
| 77 switch (property) { | 77 switch (property) { |
| 78 case CSSPropertyWebkitPerspective: | 78 case CSSPropertyWebkitPerspective: |
| 79 return CSSPropertyPerspective; | 79 return CSSPropertyPerspective; |
| 80 case CSSPropertyWebkitTransform: | 80 case CSSPropertyWebkitTransform: |
| 81 return CSSPropertyTransform; | 81 return CSSPropertyTransform; |
| 82 case CSSPropertyWebkitPerspectiveOriginX: |
| 83 case CSSPropertyWebkitPerspectiveOriginY: |
| 84 if (RuntimeEnabledFeatures::cssTransformsUnprefixedEnabled()) |
| 85 return CSSPropertyPerspectiveOrigin; |
| 86 break; |
| 82 case CSSPropertyWebkitTransformOriginX: | 87 case CSSPropertyWebkitTransformOriginX: |
| 83 case CSSPropertyWebkitTransformOriginY: | 88 case CSSPropertyWebkitTransformOriginY: |
| 84 case CSSPropertyWebkitTransformOriginZ: | 89 case CSSPropertyWebkitTransformOriginZ: |
| 85 if (RuntimeEnabledFeatures::cssTransformsUnprefixedEnabled()) | 90 if (RuntimeEnabledFeatures::cssTransformsUnprefixedEnabled()) |
| 86 return CSSPropertyTransformOrigin; | 91 return CSSPropertyTransformOrigin; |
| 87 break; | 92 break; |
| 88 default: | 93 default: |
| 89 break; | 94 break; |
| 90 } | 95 } |
| 91 return property; | 96 return property; |
| (...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 775 const Timing& timing = timedItem->specifiedTiming(); | 780 const Timing& timing = timedItem->specifiedTiming(); |
| 776 double elapsedTime = timing.iterationDuration; | 781 double elapsedTime = timing.iterationDuration; |
| 777 const AtomicString& eventType = EventTypeNames::transitionend; | 782 const AtomicString& eventType = EventTypeNames::transitionend; |
| 778 String pseudoElement = PseudoElement::pseudoElementNameForEvents(m_targe
t->pseudoId()); | 783 String pseudoElement = PseudoElement::pseudoElementNameForEvents(m_targe
t->pseudoId()); |
| 779 RefPtr<TransitionEvent> event = TransitionEvent::create(eventType, prope
rtyName, elapsedTime, pseudoElement); | 784 RefPtr<TransitionEvent> event = TransitionEvent::create(eventType, prope
rtyName, elapsedTime, pseudoElement); |
| 780 event->setTarget(m_target); | 785 event->setTarget(m_target); |
| 781 m_target->document().enqueueAnimationFrameEvent(event); | 786 m_target->document().enqueueAnimationFrameEvent(event); |
| 782 } | 787 } |
| 783 } | 788 } |
| 784 | 789 |
| 785 | |
| 786 bool CSSAnimations::isAnimatableProperty(CSSPropertyID property) | 790 bool CSSAnimations::isAnimatableProperty(CSSPropertyID property) |
| 787 { | 791 { |
| 788 switch (property) { | 792 switch (property) { |
| 789 case CSSPropertyBackgroundColor: | 793 case CSSPropertyBackgroundColor: |
| 790 case CSSPropertyBackgroundImage: | 794 case CSSPropertyBackgroundImage: |
| 791 case CSSPropertyBackgroundPositionX: | 795 case CSSPropertyBackgroundPositionX: |
| 792 case CSSPropertyBackgroundPositionY: | 796 case CSSPropertyBackgroundPositionY: |
| 793 case CSSPropertyBackgroundSize: | 797 case CSSPropertyBackgroundSize: |
| 794 case CSSPropertyBaselineShift: | 798 case CSSPropertyBaselineShift: |
| 795 case CSSPropertyBorderBottomColor: | 799 case CSSPropertyBorderBottomColor: |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 873 case CSSPropertyWebkitFilter: | 877 case CSSPropertyWebkitFilter: |
| 874 case CSSPropertyWebkitMaskBoxImageOutset: | 878 case CSSPropertyWebkitMaskBoxImageOutset: |
| 875 case CSSPropertyWebkitMaskBoxImageSlice: | 879 case CSSPropertyWebkitMaskBoxImageSlice: |
| 876 case CSSPropertyWebkitMaskBoxImageSource: | 880 case CSSPropertyWebkitMaskBoxImageSource: |
| 877 case CSSPropertyWebkitMaskBoxImageWidth: | 881 case CSSPropertyWebkitMaskBoxImageWidth: |
| 878 case CSSPropertyWebkitMaskImage: | 882 case CSSPropertyWebkitMaskImage: |
| 879 case CSSPropertyWebkitMaskPositionX: | 883 case CSSPropertyWebkitMaskPositionX: |
| 880 case CSSPropertyWebkitMaskPositionY: | 884 case CSSPropertyWebkitMaskPositionY: |
| 881 case CSSPropertyWebkitMaskSize: | 885 case CSSPropertyWebkitMaskSize: |
| 882 case CSSPropertyPerspective: | 886 case CSSPropertyPerspective: |
| 883 case CSSPropertyWebkitPerspectiveOriginX: | |
| 884 case CSSPropertyWebkitPerspectiveOriginY: | |
| 885 case CSSPropertyShapeOutside: | 887 case CSSPropertyShapeOutside: |
| 886 case CSSPropertyShapeMargin: | 888 case CSSPropertyShapeMargin: |
| 887 case CSSPropertyShapeImageThreshold: | 889 case CSSPropertyShapeImageThreshold: |
| 888 case CSSPropertyWebkitTextStrokeColor: | 890 case CSSPropertyWebkitTextStrokeColor: |
| 889 case CSSPropertyTransform: | 891 case CSSPropertyTransform: |
| 890 case CSSPropertyWidows: | 892 case CSSPropertyWidows: |
| 891 case CSSPropertyWidth: | 893 case CSSPropertyWidth: |
| 892 case CSSPropertyWordSpacing: | 894 case CSSPropertyWordSpacing: |
| 893 case CSSPropertyZIndex: | 895 case CSSPropertyZIndex: |
| 894 case CSSPropertyZoom: | 896 case CSSPropertyZoom: |
| 895 return true; | 897 return true; |
| 898 case CSSPropertyPerspectiveOrigin: |
| 896 case CSSPropertyTransformOrigin: | 899 case CSSPropertyTransformOrigin: |
| 897 return RuntimeEnabledFeatures::cssTransformsUnprefixedEnabled(); | 900 return RuntimeEnabledFeatures::cssTransformsUnprefixedEnabled(); |
| 901 case CSSPropertyWebkitPerspectiveOriginX: |
| 902 case CSSPropertyWebkitPerspectiveOriginY: |
| 898 case CSSPropertyWebkitTransformOriginX: | 903 case CSSPropertyWebkitTransformOriginX: |
| 899 case CSSPropertyWebkitTransformOriginY: | 904 case CSSPropertyWebkitTransformOriginY: |
| 900 case CSSPropertyWebkitTransformOriginZ: | 905 case CSSPropertyWebkitTransformOriginZ: |
| 901 return !RuntimeEnabledFeatures::cssTransformsUnprefixedEnabled(); | 906 return !RuntimeEnabledFeatures::cssTransformsUnprefixedEnabled(); |
| 902 default: | 907 default: |
| 903 return false; | 908 return false; |
| 904 } | 909 } |
| 905 } | 910 } |
| 906 | 911 |
| 907 const StylePropertyShorthand& CSSAnimations::animatableProperties() | 912 const StylePropertyShorthand& CSSAnimations::animatableProperties() |
| (...skipping 19 matching lines...) Expand all Loading... |
| 927 } | 932 } |
| 928 | 933 |
| 929 void CSSAnimationUpdate::trace(Visitor* visitor) | 934 void CSSAnimationUpdate::trace(Visitor* visitor) |
| 930 { | 935 { |
| 931 visitor->trace(m_newTransitions); | 936 visitor->trace(m_newTransitions); |
| 932 visitor->trace(m_activeInterpolationsForAnimations); | 937 visitor->trace(m_activeInterpolationsForAnimations); |
| 933 visitor->trace(m_activeInterpolationsForTransitions); | 938 visitor->trace(m_activeInterpolationsForTransitions); |
| 934 } | 939 } |
| 935 | 940 |
| 936 } // namespace WebCore | 941 } // namespace WebCore |
| OLD | NEW |