Changeset 40876 in webkit
- Timestamp:
- Feb 11, 2009 3:18:56 PM (15 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r40875 r40876 1 2009-02-11 Simon Fraser <simon.fraser@apple.com> 2 3 Reviewed by Dave Hyatt 4 5 https://bugs.webkit.org/show_bug.cgi?id=23862 6 7 Add a bit on RenderStyle that gets set when running accelerated 8 transitions of transform or opacity. These ensure that styles 9 compare as different during the transition, so that interruption 10 can be detected reliably. 11 12 * page/animation/ImplicitAnimation.cpp: 13 (WebCore::ImplicitAnimation::animate): 14 * rendering/style/RenderStyle.h: 15 (WebCore::InheritedFlags::isRunningAcceleratedAnimation): 16 (WebCore::InheritedFlags::setIsRunningAcceleratedAnimation): 17 * rendering/style/StyleRareNonInheritedData.cpp: 18 (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): 19 (WebCore::StyleRareNonInheritedData::operator==): 20 * rendering/style/StyleRareNonInheritedData.h: 21 1 22 2009-02-11 David Hyatt <hyatt@apple.com> 2 23 -
trunk/WebCore/page/animation/ImplicitAnimation.cpp
r40843 r40876 80 80 81 81 bool needsAnim = blendProperties(this, m_animatingProperty, animatedStyle.get(), m_fromStyle.get(), m_toStyle.get(), progress(1, 0, 0)); 82 // FIXME: we also need to detect cases where we have to software animate for other reasons, 83 // such as a child using inheriting the transform. https://bugs.webkit.org/show_bug.cgi?id=23902 82 84 if (needsAnim) 83 85 setAnimating(); 86 else { 87 #if USE(ACCELERATED_COMPOSITING) 88 // If we are running an accelerated animation, set a flag in the style which causes the style 89 // to compare as different to any other style. This ensures that changes to the property 90 // that is animating are correctly detected during the animation (e.g. when a transition 91 // gets interrupted). 92 animatedStyle->setIsRunningAcceleratedAnimation(); 93 #endif 94 } 84 95 85 96 // Fire the start timeout if needed -
trunk/WebCore/rendering/style/RenderStyle.h
r40868 r40876 658 658 // return the first found Animation (including 'all' transitions) 659 659 const Animation* transitionForProperty(int property) const; 660 661 #if USE(ACCELERATED_COMPOSITING) 662 // When set, this ensures that styles compare as different. Used during accelerated animations. 663 bool isRunningAcceleratedAnimation() const { return rareNonInheritedData->m_runningAcceleratedAnimation; } 664 #endif 660 665 661 666 int lineClamp() const { return rareNonInheritedData->lineClamp; } … … 953 958 void adjustAnimations(); 954 959 void adjustTransitions(); 960 961 #if USE(ACCELERATED_COMPOSITING) 962 void setIsRunningAcceleratedAnimation(bool b = true) { SET_VAR(rareNonInheritedData, m_runningAcceleratedAnimation, b); } 963 #endif 955 964 956 965 void setLineClamp(int c) { SET_VAR(rareNonInheritedData, lineClamp, c); } -
trunk/WebCore/rendering/style/StyleRareNonInheritedData.cpp
r40734 r40876 43 43 , m_appearance(RenderStyle::initialAppearance()) 44 44 , m_borderFit(RenderStyle::initialBorderFit()) 45 #if USE(ACCELERATED_COMPOSITING) 46 , m_runningAcceleratedAnimation(false) 47 #endif 45 48 , m_boxShadow(0) 46 49 , m_animations(0) … … 70 73 , m_appearance(o.m_appearance) 71 74 , m_borderFit(o.m_borderFit) 75 #if USE(ACCELERATED_COMPOSITING) 76 , m_runningAcceleratedAnimation(o.m_runningAcceleratedAnimation) 77 #endif 72 78 , m_boxShadow(o.m_boxShadow ? new ShadowData(*o.m_boxShadow) : 0) 73 79 , m_boxReflect(o.m_boxReflect) … … 118 124 && m_appearance == o.m_appearance 119 125 && m_borderFit == o.m_borderFit 126 #if USE(ACCELERATED_COMPOSITING) 127 && !m_runningAcceleratedAnimation && !o.m_runningAcceleratedAnimation 128 #endif 120 129 && shadowDataEquivalent(o) 121 130 && reflectionDataEquivalent(o) -
trunk/WebCore/rendering/style/StyleRareNonInheritedData.h
r40734 r40876 98 98 unsigned m_appearance : 6; // EAppearance 99 99 unsigned m_borderFit : 1; // EBorderFit 100 #if USE(ACCELERATED_COMPOSITING) 101 bool m_runningAcceleratedAnimation : 1; 102 #endif 100 103 OwnPtr<ShadowData> m_boxShadow; // For box-shadow decorations. 101 104
Note: See TracChangeset
for help on using the changeset viewer.