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 |
88 static inline IntSize blendFunc(const AnimationBase* anim, const IntSize& from,
const IntSize& to, double progress) | 93 static inline IntSize blendFunc(const AnimationBase* anim, const IntSize& from,
const IntSize& to, double progress) |
89 { | 94 { |
90 return IntSize(blendFunc(anim, from.width(), to.width(), progress), | 95 return IntSize(blendFunc(anim, from.width(), to.width(), progress), |
91 blendFunc(anim, from.height(), to.height(), progress)); | 96 blendFunc(anim, from.height(), to.height(), progress)); |
92 } | 97 } |
93 | 98 |
94 static inline ShadowStyle blendFunc(const AnimationBase* anim, ShadowStyle from,
ShadowStyle to, double progress) | 99 static inline ShadowStyle blendFunc(const AnimationBase* anim, ShadowStyle from,
ShadowStyle to, double progress) |
95 { | 100 { |
96 if (from == to) | 101 if (from == to) |
97 return to; | 102 return to; |
(...skipping 1005 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1103 | 1108 |
1104 gPropertyWrappers->append(new FillLayersPropertyWrapper(CSSPropertyBackgroun
dPositionX, &RenderStyle::backgroundLayers, &RenderStyle::accessBackgroundLayers
)); | 1109 gPropertyWrappers->append(new FillLayersPropertyWrapper(CSSPropertyBackgroun
dPositionX, &RenderStyle::backgroundLayers, &RenderStyle::accessBackgroundLayers
)); |
1105 gPropertyWrappers->append(new FillLayersPropertyWrapper(CSSPropertyBackgroun
dPositionY, &RenderStyle::backgroundLayers, &RenderStyle::accessBackgroundLayers
)); | 1110 gPropertyWrappers->append(new FillLayersPropertyWrapper(CSSPropertyBackgroun
dPositionY, &RenderStyle::backgroundLayers, &RenderStyle::accessBackgroundLayers
)); |
1106 gPropertyWrappers->append(new FillLayersPropertyWrapper(CSSPropertyBackgroun
dSize, &RenderStyle::backgroundLayers, &RenderStyle::accessBackgroundLayers)); | 1111 gPropertyWrappers->append(new FillLayersPropertyWrapper(CSSPropertyBackgroun
dSize, &RenderStyle::backgroundLayers, &RenderStyle::accessBackgroundLayers)); |
1107 gPropertyWrappers->append(new FillLayersPropertyWrapper(CSSPropertyWebkitBac
kgroundSize, &RenderStyle::backgroundLayers, &RenderStyle::accessBackgroundLayer
s)); | 1112 gPropertyWrappers->append(new FillLayersPropertyWrapper(CSSPropertyWebkitBac
kgroundSize, &RenderStyle::backgroundLayers, &RenderStyle::accessBackgroundLayer
s)); |
1108 | 1113 |
1109 gPropertyWrappers->append(new FillLayersPropertyWrapper(CSSPropertyWebkitMas
kPositionX, &RenderStyle::maskLayers, &RenderStyle::accessMaskLayers)); | 1114 gPropertyWrappers->append(new FillLayersPropertyWrapper(CSSPropertyWebkitMas
kPositionX, &RenderStyle::maskLayers, &RenderStyle::accessMaskLayers)); |
1110 gPropertyWrappers->append(new FillLayersPropertyWrapper(CSSPropertyWebkitMas
kPositionY, &RenderStyle::maskLayers, &RenderStyle::accessMaskLayers)); | 1115 gPropertyWrappers->append(new FillLayersPropertyWrapper(CSSPropertyWebkitMas
kPositionY, &RenderStyle::maskLayers, &RenderStyle::accessMaskLayers)); |
1111 gPropertyWrappers->append(new FillLayersPropertyWrapper(CSSPropertyWebkitMas
kSize, &RenderStyle::maskLayers, &RenderStyle::accessMaskLayers)); | 1116 gPropertyWrappers->append(new FillLayersPropertyWrapper(CSSPropertyWebkitMas
kSize, &RenderStyle::maskLayers, &RenderStyle::accessMaskLayers)); |
1112 | 1117 |
| 1118 gPropertyWrappers->append(new PropertyWrapper<LengthPoint>(CSSPropertyObject
Position, &RenderStyle::objectPosition, &RenderStyle::setObjectPosition)); |
| 1119 |
1113 gPropertyWrappers->append(new PropertyWrapper<float>(CSSPropertyFontSize, | 1120 gPropertyWrappers->append(new PropertyWrapper<float>(CSSPropertyFontSize, |
1114 // Must pass a specified size to setFontSize if Text Autosizing is enabl
ed, but a computed size | 1121 // Must pass a specified size to setFontSize if Text Autosizing is enabl
ed, but a computed size |
1115 // if text zoom is enabled (if neither is enabled it's irrelevant as the
y're probably the same). | 1122 // if text zoom is enabled (if neither is enabled it's irrelevant as the
y're probably the same). |
1116 // FIXME: Should we introduce an option to pass the computed font size h
ere, allowing consumers to | 1123 // FIXME: Should we introduce an option to pass the computed font size h
ere, allowing consumers to |
1117 // enable text zoom rather than Text Autosizing? See http://crbug.com/22
7545. | 1124 // enable text zoom rather than Text Autosizing? See http://crbug.com/22
7545. |
1118 &RenderStyle::specifiedFontSize, | 1125 &RenderStyle::specifiedFontSize, |
1119 &RenderStyle::setFontSize)); | 1126 &RenderStyle::setFontSize)); |
1120 gPropertyWrappers->append(new PropertyWrapper<unsigned short>(CSSPropertyWeb
kitColumnRuleWidth, &RenderStyle::columnRuleWidth, &RenderStyle::setColumnRuleWi
dth)); | 1127 gPropertyWrappers->append(new PropertyWrapper<unsigned short>(CSSPropertyWeb
kitColumnRuleWidth, &RenderStyle::columnRuleWidth, &RenderStyle::setColumnRuleWi
dth)); |
1121 gPropertyWrappers->append(new PropertyWrapper<float>(CSSPropertyWebkitColumn
Gap, &RenderStyle::columnGap, &RenderStyle::setColumnGap)); | 1128 gPropertyWrappers->append(new PropertyWrapper<float>(CSSPropertyWebkitColumn
Gap, &RenderStyle::columnGap, &RenderStyle::setColumnGap)); |
1122 gPropertyWrappers->append(new PropertyWrapper<unsigned short>(CSSPropertyWeb
kitColumnCount, &RenderStyle::columnCount, &RenderStyle::setColumnCount)); | 1129 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... |
1263 } | 1270 } |
1264 | 1271 |
1265 int CSSPropertyAnimation::getNumProperties() | 1272 int CSSPropertyAnimation::getNumProperties() |
1266 { | 1273 { |
1267 ensurePropertyMap(); | 1274 ensurePropertyMap(); |
1268 | 1275 |
1269 return gPropertyWrappers->size(); | 1276 return gPropertyWrappers->size(); |
1270 } | 1277 } |
1271 | 1278 |
1272 } | 1279 } |
OLD | NEW |