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