Changeset 170656 in webkit
- Timestamp:
- Jul 1, 2014 12:15:39 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r170646 r170656 1 2014-07-01 Simon Fraser <simon.fraser@apple.com> 2 3 [UI-side compositing] Bad spinner on news.google.com: animations need to be ordered 4 https://bugs.webkit.org/show_bug.cgi?id=134504 5 <rdar://problem/17507892> 6 7 Reviewed by Tim Horton. 8 9 Test that the transforms from the animation are applied in the correct order. 10 11 * compositing/animation/keyframe-order-expected.html: Added. 12 * compositing/animation/keyframe-order.html: Added. 13 1 14 2014-07-01 Zalan Bujtas <zalan@apple.com> 2 15 -
trunk/Source/WebKit2/ChangeLog
r170654 r170656 1 2014-07-01 Simon Fraser <simon.fraser@apple.com> 2 3 [UI-side compositing] Bad spinner on news.google.com: animations need to be ordered 4 https://bugs.webkit.org/show_bug.cgi?id=134504 5 <rdar://problem/17507892> 6 7 Reviewed by Tim Horton. 8 9 The layer's addedAnimations property needs to maintain order, since the order 10 in which transforms are applied is important. 11 12 * Shared/mac/RemoteLayerTreeTransaction.h: Use a Vector<pair<>> for addedAnimations. 13 * Shared/mac/RemoteLayerTreeTransaction.mm: 14 (WebKit::dumpChangedLayers): 15 * WebProcess/WebPage/mac/PlatformCAAnimationRemote.h: 16 * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm: 17 (WebKit::PlatformCAAnimationRemote::updateLayerAnimations): 18 * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp: 19 (WebKit::PlatformCALayerRemote::addAnimationForKey): If this is a new entry, we 20 can just append to addedAnimations, otherwise we have to find the existing one 21 and update its properties. 22 (WebKit::PlatformCALayerRemote::removeAnimationForKey): Do linear search to 23 find the animation to remove (this list will normally be short). 24 1 25 2014-07-01 Anders Carlsson <andersca@apple.com> 2 26 -
trunk/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.h
r170274 r170656 124 124 Vector<WebCore::GraphicsLayer::PlatformLayerID> children; 125 125 126 HashMap<String, PlatformCAAnimationRemote::Properties> addedAnimations;126 Vector<std::pair<String, PlatformCAAnimationRemote::Properties>> addedAnimations; 127 127 HashSet<String> keyPathsOfAnimationsToRemove; 128 128 -
trunk/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.mm
r170274 r170656 1104 1104 1105 1105 if (layerProperties.changedProperties & RemoteLayerTreeTransaction::AnimationsChanged) { 1106 for (const auto& key ValuePair : layerProperties.addedAnimations)1107 dumpProperty(ts, "animation " + key ValuePair.key, keyValuePair.value);1106 for (const auto& keyAnimationPair : layerProperties.addedAnimations) 1107 dumpProperty(ts, "animation " + keyAnimationPair.first, keyAnimationPair.second); 1108 1108 1109 1109 for (const auto& name : layerProperties.keyPathsOfAnimationsToRemove) -
trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCAAnimationRemote.h
r168901 r170656 295 295 const Properties& properties() const { return m_properties; } 296 296 297 typedef HashMap<String, Properties> AnimationsMap;298 static void updateLayerAnimations(CALayer *, RemoteLayerTreeHost*, const Animations Map& animationsToAdd, const HashSet<String>& animationsToRemove);297 typedef Vector<std::pair<String, Properties>> AnimationsList; 298 static void updateLayerAnimations(CALayer *, RemoteLayerTreeHost*, const AnimationsList& animationsToAdd, const HashSet<String>& animationsToRemove); 299 299 300 300 private: -
trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm
r169995 r170656 776 776 } 777 777 778 void PlatformCAAnimationRemote::updateLayerAnimations(CALayer *layer, RemoteLayerTreeHost* layerTreeHost, const Animations Map& animationsToAdd, const HashSet<String>& animationsToRemove)778 void PlatformCAAnimationRemote::updateLayerAnimations(CALayer *layer, RemoteLayerTreeHost* layerTreeHost, const AnimationsList& animationsToAdd, const HashSet<String>& animationsToRemove) 779 779 { 780 780 BEGIN_BLOCK_OBJC_EXCEPTIONS; … … 783 783 [layer removeAnimationForKey:value]; 784 784 785 for (const auto& key ValuePair : animationsToAdd)786 addAnimationToLayer(layer, layerTreeHost, key ValuePair.key, keyValuePair.value);785 for (const auto& keyAnimationPair : animationsToAdd) 786 addAnimationToLayer(layer, layerTreeHost, keyAnimationPair.first, keyAnimationPair.second); 787 787 788 788 END_BLOCK_OBJC_EXCEPTIONS; -
trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.cpp
r170274 r170656 302 302 void PlatformCALayerRemote::addAnimationForKey(const String& key, PlatformCAAnimation* animation) 303 303 { 304 m_animations.set(key, animation); 305 m_properties.addedAnimations.set(key, toPlatformCAAnimationRemote(animation)->properties()); 304 auto addResult = m_animations.set(key, animation); 305 if (addResult.isNewEntry) 306 m_properties.addedAnimations.append(std::pair<String, PlatformCAAnimationRemote::Properties>(key, toPlatformCAAnimationRemote(animation)->properties())); 307 else { 308 for (auto& keyAnimationPair : m_properties.addedAnimations) { 309 if (keyAnimationPair.first == key) { 310 keyAnimationPair.second = toPlatformCAAnimationRemote(animation)->properties(); 311 break; 312 } 313 } 314 } 315 306 316 m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::AnimationsChanged); 307 317 … … 312 322 void PlatformCALayerRemote::removeAnimationForKey(const String& key) 313 323 { 314 m_animations.remove(key); 315 m_properties.addedAnimations.remove(key); 324 if (m_animations.remove(key)) { 325 for (size_t i = 0; i < m_properties.addedAnimations.size(); ++i) { 326 if (m_properties.addedAnimations[i].first == key) { 327 m_properties.addedAnimations.remove(i); 328 break; 329 } 330 } 331 } 316 332 m_properties.keyPathsOfAnimationsToRemove.add(key); 317 333 m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::AnimationsChanged);
Note: See TracChangeset
for help on using the changeset viewer.