Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(276)

Side by Side Diff: Source/core/animation/css/CSSAnimations.cpp

Issue 212483003: CSS Transforms: Implement transform-origin (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase. Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 CSSPropertyWebkitTransformOriginX:
83 case CSSPropertyWebkitTransformOriginY:
84 case CSSPropertyWebkitTransformOriginZ:
85 if (RuntimeEnabledFeatures::cssTransformsUnprefixedEnabled())
86 return CSSPropertyTransformOrigin;
87 break;
82 default: 88 default:
83 break; 89 break;
84 } 90 }
85 return property; 91 return property;
86 } 92 }
87 93
88 static void resolveKeyframes(StyleResolver* resolver, Element* element, const El ement& parentElement, const RenderStyle& style, RenderStyle* parentStyle, const AtomicString& name, TimingFunction* defaultTimingFunction, 94 static void resolveKeyframes(StyleResolver* resolver, Element* element, const El ement& parentElement, const RenderStyle& style, RenderStyle* parentStyle, const AtomicString& name, TimingFunction* defaultTimingFunction,
89 WillBeHeapVector<KeyframeEffectModel::KeyframeVector>& resolvedKeyframes) 95 WillBeHeapVector<KeyframeEffectModel::KeyframeVector>& resolvedKeyframes)
90 { 96 {
91 // When the element is null, use its parent for scoping purposes. 97 // When the element is null, use its parent for scoping purposes.
(...skipping 782 matching lines...) Expand 10 before | Expand all | Expand 10 after
874 case CSSPropertyWebkitMaskPositionY: 880 case CSSPropertyWebkitMaskPositionY:
875 case CSSPropertyWebkitMaskSize: 881 case CSSPropertyWebkitMaskSize:
876 case CSSPropertyPerspective: 882 case CSSPropertyPerspective:
877 case CSSPropertyWebkitPerspectiveOriginX: 883 case CSSPropertyWebkitPerspectiveOriginX:
878 case CSSPropertyWebkitPerspectiveOriginY: 884 case CSSPropertyWebkitPerspectiveOriginY:
879 case CSSPropertyShapeInside: 885 case CSSPropertyShapeInside:
880 case CSSPropertyShapeOutside: 886 case CSSPropertyShapeOutside:
881 case CSSPropertyShapeMargin: 887 case CSSPropertyShapeMargin:
882 case CSSPropertyShapeImageThreshold: 888 case CSSPropertyShapeImageThreshold:
883 case CSSPropertyWebkitTextStrokeColor: 889 case CSSPropertyWebkitTextStrokeColor:
884 case CSSPropertyWebkitTransformOriginX:
885 case CSSPropertyWebkitTransformOriginY:
886 case CSSPropertyWebkitTransformOriginZ:
887 case CSSPropertyTransform: 890 case CSSPropertyTransform:
888 case CSSPropertyWidows: 891 case CSSPropertyWidows:
889 case CSSPropertyWidth: 892 case CSSPropertyWidth:
890 case CSSPropertyWordSpacing: 893 case CSSPropertyWordSpacing:
891 case CSSPropertyZIndex: 894 case CSSPropertyZIndex:
892 case CSSPropertyZoom: 895 case CSSPropertyZoom:
893 return true; 896 return true;
897 case CSSPropertyTransformOrigin:
898 return RuntimeEnabledFeatures::cssTransformsUnprefixedEnabled();
899 case CSSPropertyWebkitTransformOriginX:
900 case CSSPropertyWebkitTransformOriginY:
901 case CSSPropertyWebkitTransformOriginZ:
902 return !RuntimeEnabledFeatures::cssTransformsUnprefixedEnabled();
894 default: 903 default:
895 return false; 904 return false;
896 } 905 }
897 } 906 }
898 907
899 const StylePropertyShorthand& CSSAnimations::animatableProperties() 908 const StylePropertyShorthand& CSSAnimations::animatableProperties()
900 { 909 {
901 DEFINE_STATIC_LOCAL(Vector<CSSPropertyID>, properties, ()); 910 DEFINE_STATIC_LOCAL(Vector<CSSPropertyID>, properties, ());
902 DEFINE_STATIC_LOCAL(StylePropertyShorthand, propertyShorthand, ()); 911 DEFINE_STATIC_LOCAL(StylePropertyShorthand, propertyShorthand, ());
903 if (properties.isEmpty()) { 912 if (properties.isEmpty()) {
(...skipping 15 matching lines...) Expand all
919 } 928 }
920 929
921 void CSSAnimationUpdate::trace(Visitor* visitor) 930 void CSSAnimationUpdate::trace(Visitor* visitor)
922 { 931 {
923 visitor->trace(m_newTransitions); 932 visitor->trace(m_newTransitions);
924 visitor->trace(m_activeInterpolationsForAnimations); 933 visitor->trace(m_activeInterpolationsForAnimations);
925 visitor->trace(m_activeInterpolationsForTransitions); 934 visitor->trace(m_activeInterpolationsForTransitions);
926 } 935 }
927 936
928 } // namespace WebCore 937 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/animation/css/CSSAnimatableValueFactory.cpp ('k') | Source/core/animation/css/CSSPropertyEquality.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698