Changeset 57770 in webkit
- Timestamp:
- Apr 16, 2010 7:04:50 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r57767 r57770 1 2010-04-16 No'am Rosenthal <noam.rosenthal@nokia.com> 2 3 Reviewed by Antti Koivisto. 4 5 [Qt] GraphicsLayer: support fill-modes 6 https://bugs.webkit.org/show_bug.cgi?id=36216 7 8 Remove LayoutTests/animations/fill-mode-transform.html from the skip list 9 10 * platform/qt/Skipped: 11 1 12 2010-04-16 Dmitry Titov <dimich@chromium.org> 2 13 -
trunk/LayoutTests/platform/qt/Skipped
r57713 r57770 5217 5217 fast/multicol/hit-test-above-or-below.html 5218 5218 5219 # https://bugs.webkit.org/show_bug.cgi?id=361915220 #[Qt] GraphicsLayer: fix test regressions5221 animations/fill-mode-transform.html5222 5219 animations/simultaneous-start-left.html 5223 5220 # https://bugs.webkit.org/show_bug.cgi?id=37381 -
trunk/WebCore/ChangeLog
r57769 r57770 1 2010-04-16 No'am Rosenthal <noam.rosenthal@nokia.com> 2 3 Reviewed by Antti Koivisto. 4 5 [Qt] GraphicsLayer: support fill-modes 6 https://bugs.webkit.org/show_bug.cgi?id=36216 7 Implement the CSS-animation "fill mode" concept in GraphicsLayerQt. The concept 8 enables a key-frame animation to go to the animation's starting point before the delay, 9 and/or to stay at the animation's ending point after its ended, without reverting to the default 10 value. 11 We do that by manually setting the value to keyframe-0 before the delay if fill-mode is backwards/both, 12 and manually modifying the default value to the animated value as we animate, with fill-mode forwards/both. 13 14 * platform/graphics/qt/GraphicsLayerQt.cpp: 15 (WebCore::AnimationQtBase::AnimationQtBase): 16 (WebCore::TransformAnimationQt::~TransformAnimationQt): 17 (WebCore::TransformAnimationQt::applyFrame): 18 (WebCore::GraphicsLayerQt::addAnimation): 19 1 20 2010-04-16 Gavin Barraclough <barraclough@apple.com> 2 21 -
trunk/WebCore/platform/graphics/qt/GraphicsLayerQt.cpp
r57744 r57770 996 996 , m_webkitAnimation(anim) 997 997 , m_keyframesName(name) 998 , m_fillsForwards(false) 998 999 { 999 1000 } … … 1019 1020 const Animation* m_webkitAnimation; 1020 1021 QString m_keyframesName; 1022 bool m_fillsForwards; 1021 1023 }; 1022 1024 … … 1103 1105 ~TransformAnimationQt() 1104 1106 { 1105 // this came up during the compositing/animation LayoutTests1106 // when the animation dies, the transform has to go back to default1107 if (m_layer)1108 m_layer.data()-> updateTransform();1107 if (m_fillsForwards) 1108 setCurrentTime(1); 1109 else 1110 m_layer.data()->setBaseTransform(m_layer.data()->m_layer->transform()); 1109 1111 } 1110 1112 … … 1145 1147 } 1146 1148 m_layer.data()->setBaseTransform(transformMatrix); 1149 if (m_fillsForwards) 1150 m_layer.data()->m_layer->setTransform(m_layer.data()->m_baseTransform); 1147 1151 } 1148 1152 … … 1174 1178 } 1175 1179 1180 ~OpacityAnimationQt() 1181 { 1182 if (m_fillsForwards) 1183 setCurrentTime(1); 1184 else 1185 m_layer.data()->setOpacity(m_layer.data()->m_layer->opacity()); 1186 } 1176 1187 virtual void applyFrame(const qreal& fromValue, const qreal& toValue, qreal progress) 1177 1188 { … … 1184 1195 1185 1196 m_layer.data()->setOpacity(opacity); 1197 if (m_fillsForwards) 1198 m_layer.data()->m_layer->setOpacity(opacity); 1186 1199 } 1187 1200 … … 1200 1213 return false; 1201 1214 1202 QAbstractAnimation* newAnim = 0;1215 AnimationQtBase* newAnim = 0; 1203 1216 1204 1217 // fixed: we might already have the Qt animation object associated with this WebCore::Animation object … … 1225 1238 // we make sure WebCore::Animation and QAnimation are on the same terms 1226 1239 newAnim->setLoopCount(anim->iterationCount()); 1240 newAnim->m_fillsForwards = anim->fillsForwards(); 1227 1241 m_impl->m_animations.append(QWeakPointer<QAbstractAnimation>(newAnim)); 1228 1242 QObject::connect(&m_impl->m_suspendTimer, SIGNAL(timeout()), newAnim, SLOT(resume())); … … 1231 1245 // flush now or flicker... 1232 1246 m_impl->flushChanges(false); 1247 1248 // when fill-mode is backwards/both, we set the value to 0 before the delay takes place 1249 if (anim->fillsBackwards()) 1250 newAnim->setCurrentTime(0); 1233 1251 1234 1252 if (anim->delay())
Note: See TracChangeset
for help on using the changeset viewer.