Diff
Modified: trunk/Source/WebCore/ChangeLog (208032 => 208033)
--- trunk/Source/WebCore/ChangeLog 2016-10-28 05:28:55 UTC (rev 208032)
+++ trunk/Source/WebCore/ChangeLog 2016-10-28 05:34:34 UTC (rev 208033)
@@ -1,3 +1,31 @@
+2016-10-27 Simon Fraser <[email protected]>
+
+ Remove RenderStyle::isRunningAcceleratedAnimation()
+ https://bugs.webkit.org/show_bug.cgi?id=164109
+
+ Reviewed by David Hyatt.
+
+ RenderStyle::isRunningAcceleratedAnimation() was added in r40876 to handle interrupted
+ accelerated transitions, and to allow RenderLayer::currentTransform() to know when it
+ has to manually get the animated style.
+
+ The latter can now use isRunningAcceleratedAnimationOnRenderer(), and interrupting
+ accelerated transitions seems to work fine without it, so remove it.
+
+ * page/animation/ImplicitAnimation.cpp:
+ (WebCore::ImplicitAnimation::animate):
+ * page/animation/KeyframeAnimation.cpp:
+ (WebCore::KeyframeAnimation::animate):
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::currentTransform):
+ * rendering/style/RenderStyle.h:
+ (WebCore::RenderStyle::isRunningAcceleratedAnimation): Deleted.
+ (WebCore::RenderStyle::setIsRunningAcceleratedAnimation): Deleted.
+ * rendering/style/StyleRareNonInheritedData.cpp:
+ (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
+ (WebCore::StyleRareNonInheritedData::operator==):
+ * rendering/style/StyleRareNonInheritedData.h:
+
2016-10-27 Myles C. Maxfield <[email protected]>
Teach WebGL code about new buffer targets in WebGL2
Modified: trunk/Source/WebCore/page/animation/ImplicitAnimation.cpp (208032 => 208033)
--- trunk/Source/WebCore/page/animation/ImplicitAnimation.cpp 2016-10-28 05:28:55 UTC (rev 208032)
+++ trunk/Source/WebCore/page/animation/ImplicitAnimation.cpp 2016-10-28 05:34:34 UTC (rev 208033)
@@ -79,17 +79,9 @@
if (!animatedStyle)
animatedStyle = RenderStyle::clonePtr(*targetStyle);
- bool needsAnim = CSSPropertyAnimation::blendProperties(this, m_animatingProperty, animatedStyle.get(), m_fromStyle.get(), m_toStyle.get(), progress());
+ CSSPropertyAnimation::blendProperties(this, m_animatingProperty, animatedStyle.get(), m_fromStyle.get(), m_toStyle.get(), progress());
// FIXME: we also need to detect cases where we have to software animate for other reasons,
// such as a child using inheriting the transform. https://bugs.webkit.org/show_bug.cgi?id=23902
- if (!needsAnim) {
- // If we are running an accelerated animation, set a flag in the style which causes the style
- // to compare as different to any other style. This ensures that changes to the property
- // that is animating are correctly detected during the animation (e.g. when a transition
- // gets interrupted).
- // FIXME: still need this hack?
- animatedStyle->setIsRunningAcceleratedAnimation();
- }
// Fire the start timeout if needed
fireAnimationEventsIfNeeded();
Modified: trunk/Source/WebCore/page/animation/KeyframeAnimation.cpp (208032 => 208033)
--- trunk/Source/WebCore/page/animation/KeyframeAnimation.cpp 2016-10-28 05:28:55 UTC (rev 208032)
+++ trunk/Source/WebCore/page/animation/KeyframeAnimation.cpp 2016-10-28 05:34:34 UTC (rev 208033)
@@ -176,13 +176,7 @@
double progress = 0;
fetchIntervalEndpointsForProperty(propertyID, fromStyle, toStyle, progress);
- bool needsAnim = CSSPropertyAnimation::blendProperties(this, propertyID, animatedStyle.get(), fromStyle, toStyle, progress);
- if (!needsAnim)
- // If we are running an accelerated animation, set a flag in the style
- // to indicate it. This can be used to make sure we get an updated
- // style for hit testing, etc.
- // FIXME: still need this?
- animatedStyle->setIsRunningAcceleratedAnimation();
+ CSSPropertyAnimation::blendProperties(this, propertyID, animatedStyle.get(), fromStyle, toStyle, progress);
}
return state() != oldState;
Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (208032 => 208033)
--- trunk/Source/WebCore/rendering/RenderLayer.cpp 2016-10-28 05:28:55 UTC (rev 208032)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp 2016-10-28 05:34:34 UTC (rev 208033)
@@ -995,9 +995,8 @@
return TransformationMatrix();
RenderBox* box = renderBox();
- ASSERT(box);
- // FIXME: replace with call to AnimationController::isRunningAcceleratedAnimationOnRenderer() and remove RenderStyle::isRunningAcceleratedAnimation().
- if (renderer().style().isRunningAcceleratedAnimation()) {
+
+ if (renderer().animation().isRunningAcceleratedAnimationOnRenderer(renderer(), CSSPropertyTransform, AnimationBase::Running | AnimationBase::Paused)) {
TransformationMatrix currTransform;
FloatRect pixelSnappedBorderRect = snapRectToDevicePixels(box->borderBoxRect(), box->document().deviceScaleFactor());
std::unique_ptr<RenderStyle> style = renderer().animation().getAnimatedStyleForRenderer(renderer());
Modified: trunk/Source/WebCore/rendering/style/RenderStyle.h (208032 => 208033)
--- trunk/Source/WebCore/rendering/style/RenderStyle.h 2016-10-28 05:28:55 UTC (rev 208032)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.h 2016-10-28 05:34:34 UTC (rev 208033)
@@ -1120,9 +1120,6 @@
const LengthSize& pageSize() const { return rareNonInheritedData->m_pageSize; }
PageSizeType pageSizeType() const { return static_cast<PageSizeType>(rareNonInheritedData->m_pageSizeType); }
- // When set, this ensures that styles compare as different. Used during accelerated animations.
- bool isRunningAcceleratedAnimation() const { return rareNonInheritedData->m_runningAcceleratedAnimation; }
-
LineBoxContain lineBoxContain() const { return rareInheritedData->m_lineBoxContain; }
const LineClampValue& lineClamp() const { return rareNonInheritedData->lineClamp; }
const IntSize& initialLetter() const { return rareNonInheritedData->m_initialLetter; }
@@ -1694,8 +1691,6 @@
void setPageSizeType(PageSizeType t) { SET_VAR(rareNonInheritedData, m_pageSizeType, t); }
void resetPageSizeType() { SET_VAR(rareNonInheritedData, m_pageSizeType, PAGE_SIZE_AUTO); }
- void setIsRunningAcceleratedAnimation(bool b = true) { SET_VAR(rareNonInheritedData, m_runningAcceleratedAnimation, b); }
-
void setLineBoxContain(LineBoxContain c) { SET_VAR(rareInheritedData, m_lineBoxContain, c); }
void setLineClamp(LineClampValue c) { SET_VAR(rareNonInheritedData, lineClamp, c); }
Modified: trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp (208032 => 208033)
--- trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp 2016-10-28 05:28:55 UTC (rev 208032)
+++ trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp 2016-10-28 05:34:34 UTC (rev 208033)
@@ -96,7 +96,6 @@
, m_borderFit(RenderStyle::initialBorderFit())
, m_textCombine(RenderStyle::initialTextCombine())
, m_textDecorationStyle(RenderStyle::initialTextDecorationStyle())
- , m_runningAcceleratedAnimation(false)
, m_aspectRatioType(RenderStyle::initialAspectRatioType())
#if ENABLE(CSS_COMPOSITING)
, m_effectiveBlendMode(RenderStyle::initialBlendMode())
@@ -194,7 +193,6 @@
, m_borderFit(o.m_borderFit)
, m_textCombine(o.m_textCombine)
, m_textDecorationStyle(o.m_textDecorationStyle)
- , m_runningAcceleratedAnimation(o.m_runningAcceleratedAnimation)
, m_aspectRatioType(o.m_aspectRatioType)
#if ENABLE(CSS_COMPOSITING)
, m_effectiveBlendMode(o.m_effectiveBlendMode)
@@ -303,7 +301,6 @@
#if ENABLE(CSS_SCROLL_SNAP)
&& m_scrollSnapType == o.m_scrollSnapType
#endif
- && !m_runningAcceleratedAnimation && !o.m_runningAcceleratedAnimation
#if ENABLE(CSS_COMPOSITING)
&& m_effectiveBlendMode == o.m_effectiveBlendMode
&& m_isolation == o.m_isolation
Modified: trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.h (208032 => 208033)
--- trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.h 2016-10-28 05:28:55 UTC (rev 208032)
+++ trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.h 2016-10-28 05:34:34 UTC (rev 208033)
@@ -207,8 +207,6 @@
unsigned m_textDecorationStyle : 3; // TextDecorationStyle
- unsigned m_runningAcceleratedAnimation : 1;
-
unsigned m_aspectRatioType : 2;
#if ENABLE(CSS_COMPOSITING)