OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved. |
3 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. | 3 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 { | 78 { |
79 return to.blend(from, narrowPrecisionToFloat(progress)); | 79 return to.blend(from, narrowPrecisionToFloat(progress)); |
80 } | 80 } |
81 | 81 |
82 static inline LengthSize blendFunc(const AnimationBase* anim, const LengthSize&
from, const LengthSize& to, double progress) | 82 static inline LengthSize blendFunc(const AnimationBase* anim, const LengthSize&
from, const LengthSize& to, double progress) |
83 { | 83 { |
84 return LengthSize(blendFunc(anim, from.width(), to.width(), progress), | 84 return LengthSize(blendFunc(anim, from.width(), to.width(), progress), |
85 blendFunc(anim, from.height(), to.height(), progress)); | 85 blendFunc(anim, from.height(), to.height(), progress)); |
86 } | 86 } |
87 | 87 |
88 static inline LengthPoint blendFunc(const AnimationBase* anim, const LengthPoint
& from, const LengthPoint& to, double progress) | |
89 { | |
90 return LengthPoint(blendFunc(anim, from.x(), to.x(), progress), blendFunc(an
im, from.y(), to.y(), progress)); | |
91 } | |
92 | |
93 static inline IntSize blendFunc(const AnimationBase* anim, const IntSize& from,
const IntSize& to, double progress) | 88 static inline IntSize blendFunc(const AnimationBase* anim, const IntSize& from,
const IntSize& to, double progress) |
94 { | 89 { |
95 return IntSize(blendFunc(anim, from.width(), to.width(), progress), | 90 return IntSize(blendFunc(anim, from.width(), to.width(), progress), |
96 blendFunc(anim, from.height(), to.height(), progress)); | 91 blendFunc(anim, from.height(), to.height(), progress)); |
97 } | 92 } |
98 | 93 |
99 static inline ShadowStyle blendFunc(const AnimationBase* anim, ShadowStyle from,
ShadowStyle to, double progress) | 94 static inline ShadowStyle blendFunc(const AnimationBase* anim, ShadowStyle from,
ShadowStyle to, double progress) |
100 { | 95 { |
101 if (from == to) | 96 if (from == to) |
102 return to; | 97 return to; |
(...skipping 1005 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1108 | 1103 |
1109 gPropertyWrappers->append(new FillLayersPropertyWrapper(CSSPropertyBackgroun
dPositionX, &RenderStyle::backgroundLayers, &RenderStyle::accessBackgroundLayers
)); | 1104 gPropertyWrappers->append(new FillLayersPropertyWrapper(CSSPropertyBackgroun
dPositionX, &RenderStyle::backgroundLayers, &RenderStyle::accessBackgroundLayers
)); |
1110 gPropertyWrappers->append(new FillLayersPropertyWrapper(CSSPropertyBackgroun
dPositionY, &RenderStyle::backgroundLayers, &RenderStyle::accessBackgroundLayers
)); | 1105 gPropertyWrappers->append(new FillLayersPropertyWrapper(CSSPropertyBackgroun
dPositionY, &RenderStyle::backgroundLayers, &RenderStyle::accessBackgroundLayers
)); |
1111 gPropertyWrappers->append(new FillLayersPropertyWrapper(CSSPropertyBackgroun
dSize, &RenderStyle::backgroundLayers, &RenderStyle::accessBackgroundLayers)); | 1106 gPropertyWrappers->append(new FillLayersPropertyWrapper(CSSPropertyBackgroun
dSize, &RenderStyle::backgroundLayers, &RenderStyle::accessBackgroundLayers)); |
1112 gPropertyWrappers->append(new FillLayersPropertyWrapper(CSSPropertyWebkitBac
kgroundSize, &RenderStyle::backgroundLayers, &RenderStyle::accessBackgroundLayer
s)); | 1107 gPropertyWrappers->append(new FillLayersPropertyWrapper(CSSPropertyWebkitBac
kgroundSize, &RenderStyle::backgroundLayers, &RenderStyle::accessBackgroundLayer
s)); |
1113 | 1108 |
1114 gPropertyWrappers->append(new FillLayersPropertyWrapper(CSSPropertyWebkitMas
kPositionX, &RenderStyle::maskLayers, &RenderStyle::accessMaskLayers)); | 1109 gPropertyWrappers->append(new FillLayersPropertyWrapper(CSSPropertyWebkitMas
kPositionX, &RenderStyle::maskLayers, &RenderStyle::accessMaskLayers)); |
1115 gPropertyWrappers->append(new FillLayersPropertyWrapper(CSSPropertyWebkitMas
kPositionY, &RenderStyle::maskLayers, &RenderStyle::accessMaskLayers)); | 1110 gPropertyWrappers->append(new FillLayersPropertyWrapper(CSSPropertyWebkitMas
kPositionY, &RenderStyle::maskLayers, &RenderStyle::accessMaskLayers)); |
1116 gPropertyWrappers->append(new FillLayersPropertyWrapper(CSSPropertyWebkitMas
kSize, &RenderStyle::maskLayers, &RenderStyle::accessMaskLayers)); | 1111 gPropertyWrappers->append(new FillLayersPropertyWrapper(CSSPropertyWebkitMas
kSize, &RenderStyle::maskLayers, &RenderStyle::accessMaskLayers)); |
1117 | 1112 |
1118 gPropertyWrappers->append(new PropertyWrapper<LengthPoint>(CSSPropertyObject
Position, &RenderStyle::objectPosition, &RenderStyle::setObjectPosition)); | |
1119 | |
1120 gPropertyWrappers->append(new PropertyWrapper<float>(CSSPropertyFontSize, | 1113 gPropertyWrappers->append(new PropertyWrapper<float>(CSSPropertyFontSize, |
1121 // Must pass a specified size to setFontSize if Text Autosizing is enabl
ed, but a computed size | 1114 // Must pass a specified size to setFontSize if Text Autosizing is enabl
ed, but a computed size |
1122 // if text zoom is enabled (if neither is enabled it's irrelevant as the
y're probably the same). | 1115 // if text zoom is enabled (if neither is enabled it's irrelevant as the
y're probably the same). |
1123 // FIXME: Should we introduce an option to pass the computed font size h
ere, allowing consumers to | 1116 // FIXME: Should we introduce an option to pass the computed font size h
ere, allowing consumers to |
1124 // enable text zoom rather than Text Autosizing? See http://crbug.com/22
7545. | 1117 // enable text zoom rather than Text Autosizing? See http://crbug.com/22
7545. |
1125 &RenderStyle::specifiedFontSize, | 1118 &RenderStyle::specifiedFontSize, |
1126 &RenderStyle::setFontSize)); | 1119 &RenderStyle::setFontSize)); |
1127 gPropertyWrappers->append(new PropertyWrapper<unsigned short>(CSSPropertyWeb
kitColumnRuleWidth, &RenderStyle::columnRuleWidth, &RenderStyle::setColumnRuleWi
dth)); | 1120 gPropertyWrappers->append(new PropertyWrapper<unsigned short>(CSSPropertyWeb
kitColumnRuleWidth, &RenderStyle::columnRuleWidth, &RenderStyle::setColumnRuleWi
dth)); |
1128 gPropertyWrappers->append(new PropertyWrapper<float>(CSSPropertyWebkitColumn
Gap, &RenderStyle::columnGap, &RenderStyle::setColumnGap)); | 1121 gPropertyWrappers->append(new PropertyWrapper<float>(CSSPropertyWebkitColumn
Gap, &RenderStyle::columnGap, &RenderStyle::setColumnGap)); |
1129 gPropertyWrappers->append(new PropertyWrapper<unsigned short>(CSSPropertyWeb
kitColumnCount, &RenderStyle::columnCount, &RenderStyle::setColumnCount)); | 1122 gPropertyWrappers->append(new PropertyWrapper<unsigned short>(CSSPropertyWeb
kitColumnCount, &RenderStyle::columnCount, &RenderStyle::setColumnCount)); |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1270 } | 1263 } |
1271 | 1264 |
1272 int CSSPropertyAnimation::getNumProperties() | 1265 int CSSPropertyAnimation::getNumProperties() |
1273 { | 1266 { |
1274 ensurePropertyMap(); | 1267 ensurePropertyMap(); |
1275 | 1268 |
1276 return gPropertyWrappers->size(); | 1269 return gPropertyWrappers->size(); |
1277 } | 1270 } |
1278 | 1271 |
1279 } | 1272 } |
OLD | NEW |