Changeset 208033 in webkit
- Timestamp:
- Oct 27, 2016 10:34:34 PM (8 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r208032 r208033 1 2016-10-27 Simon Fraser <simon.fraser@apple.com> 2 3 Remove RenderStyle::isRunningAcceleratedAnimation() 4 https://bugs.webkit.org/show_bug.cgi?id=164109 5 6 Reviewed by David Hyatt. 7 8 RenderStyle::isRunningAcceleratedAnimation() was added in r40876 to handle interrupted 9 accelerated transitions, and to allow RenderLayer::currentTransform() to know when it 10 has to manually get the animated style. 11 12 The latter can now use isRunningAcceleratedAnimationOnRenderer(), and interrupting 13 accelerated transitions seems to work fine without it, so remove it. 14 15 * page/animation/ImplicitAnimation.cpp: 16 (WebCore::ImplicitAnimation::animate): 17 * page/animation/KeyframeAnimation.cpp: 18 (WebCore::KeyframeAnimation::animate): 19 * rendering/RenderLayer.cpp: 20 (WebCore::RenderLayer::currentTransform): 21 * rendering/style/RenderStyle.h: 22 (WebCore::RenderStyle::isRunningAcceleratedAnimation): Deleted. 23 (WebCore::RenderStyle::setIsRunningAcceleratedAnimation): Deleted. 24 * rendering/style/StyleRareNonInheritedData.cpp: 25 (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): 26 (WebCore::StyleRareNonInheritedData::operator==): 27 * rendering/style/StyleRareNonInheritedData.h: 28 1 29 2016-10-27 Myles C. Maxfield <mmaxfield@apple.com> 2 30 -
trunk/Source/WebCore/page/animation/ImplicitAnimation.cpp
r205818 r208033 80 80 animatedStyle = RenderStyle::clonePtr(*targetStyle); 81 81 82 bool needsAnim =CSSPropertyAnimation::blendProperties(this, m_animatingProperty, animatedStyle.get(), m_fromStyle.get(), m_toStyle.get(), progress());82 CSSPropertyAnimation::blendProperties(this, m_animatingProperty, animatedStyle.get(), m_fromStyle.get(), m_toStyle.get(), progress()); 83 83 // FIXME: we also need to detect cases where we have to software animate for other reasons, 84 84 // such as a child using inheriting the transform. https://bugs.webkit.org/show_bug.cgi?id=23902 85 if (!needsAnim) {86 // If we are running an accelerated animation, set a flag in the style which causes the style87 // to compare as different to any other style. This ensures that changes to the property88 // that is animating are correctly detected during the animation (e.g. when a transition89 // gets interrupted).90 // FIXME: still need this hack?91 animatedStyle->setIsRunningAcceleratedAnimation();92 }93 85 94 86 // Fire the start timeout if needed -
trunk/Source/WebCore/page/animation/KeyframeAnimation.cpp
r208025 r208033 177 177 fetchIntervalEndpointsForProperty(propertyID, fromStyle, toStyle, progress); 178 178 179 bool needsAnim = CSSPropertyAnimation::blendProperties(this, propertyID, animatedStyle.get(), fromStyle, toStyle, progress); 180 if (!needsAnim) 181 // If we are running an accelerated animation, set a flag in the style 182 // to indicate it. This can be used to make sure we get an updated 183 // style for hit testing, etc. 184 // FIXME: still need this? 185 animatedStyle->setIsRunningAcceleratedAnimation(); 179 CSSPropertyAnimation::blendProperties(this, propertyID, animatedStyle.get(), fromStyle, toStyle, progress); 186 180 } 187 181 -
trunk/Source/WebCore/rendering/RenderLayer.cpp
r208025 r208033 996 996 997 997 RenderBox* box = renderBox(); 998 ASSERT(box); 999 // FIXME: replace with call to AnimationController::isRunningAcceleratedAnimationOnRenderer() and remove RenderStyle::isRunningAcceleratedAnimation(). 1000 if (renderer().style().isRunningAcceleratedAnimation()) { 998 999 if (renderer().animation().isRunningAcceleratedAnimationOnRenderer(renderer(), CSSPropertyTransform, AnimationBase::Running | AnimationBase::Paused)) { 1001 1000 TransformationMatrix currTransform; 1002 1001 FloatRect pixelSnappedBorderRect = snapRectToDevicePixels(box->borderBoxRect(), box->document().deviceScaleFactor()); -
trunk/Source/WebCore/rendering/style/RenderStyle.h
r208026 r208033 1121 1121 PageSizeType pageSizeType() const { return static_cast<PageSizeType>(rareNonInheritedData->m_pageSizeType); } 1122 1122 1123 // When set, this ensures that styles compare as different. Used during accelerated animations.1124 bool isRunningAcceleratedAnimation() const { return rareNonInheritedData->m_runningAcceleratedAnimation; }1125 1126 1123 LineBoxContain lineBoxContain() const { return rareInheritedData->m_lineBoxContain; } 1127 1124 const LineClampValue& lineClamp() const { return rareNonInheritedData->lineClamp; } … … 1695 1692 void resetPageSizeType() { SET_VAR(rareNonInheritedData, m_pageSizeType, PAGE_SIZE_AUTO); } 1696 1693 1697 void setIsRunningAcceleratedAnimation(bool b = true) { SET_VAR(rareNonInheritedData, m_runningAcceleratedAnimation, b); }1698 1699 1694 void setLineBoxContain(LineBoxContain c) { SET_VAR(rareInheritedData, m_lineBoxContain, c); } 1700 1695 void setLineClamp(LineClampValue c) { SET_VAR(rareNonInheritedData, lineClamp, c); } -
trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp
r208026 r208033 97 97 , m_textCombine(RenderStyle::initialTextCombine()) 98 98 , m_textDecorationStyle(RenderStyle::initialTextDecorationStyle()) 99 , m_runningAcceleratedAnimation(false)100 99 , m_aspectRatioType(RenderStyle::initialAspectRatioType()) 101 100 #if ENABLE(CSS_COMPOSITING) … … 195 194 , m_textCombine(o.m_textCombine) 196 195 , m_textDecorationStyle(o.m_textDecorationStyle) 197 , m_runningAcceleratedAnimation(o.m_runningAcceleratedAnimation)198 196 , m_aspectRatioType(o.m_aspectRatioType) 199 197 #if ENABLE(CSS_COMPOSITING) … … 304 302 && m_scrollSnapType == o.m_scrollSnapType 305 303 #endif 306 && !m_runningAcceleratedAnimation && !o.m_runningAcceleratedAnimation307 304 #if ENABLE(CSS_COMPOSITING) 308 305 && m_effectiveBlendMode == o.m_effectiveBlendMode -
trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.h
r208026 r208033 208 208 unsigned m_textDecorationStyle : 3; // TextDecorationStyle 209 209 210 unsigned m_runningAcceleratedAnimation : 1;211 212 210 unsigned m_aspectRatioType : 2; 213 211
Note: See TracChangeset
for help on using the changeset viewer.