diff options
Diffstat (limited to 'meta/recipes-rp/wpewebkit/wpewebkit/Do-not-detect-the-stopped-animations.patch')
-rw-r--r-- | meta/recipes-rp/wpewebkit/wpewebkit/Do-not-detect-the-stopped-animations.patch | 98 |
1 files changed, 98 insertions, 0 deletions
diff --git a/meta/recipes-rp/wpewebkit/wpewebkit/Do-not-detect-the-stopped-animations.patch b/meta/recipes-rp/wpewebkit/wpewebkit/Do-not-detect-the-stopped-animations.patch new file mode 100644 index 00000000000..8ff2645ea21 --- /dev/null +++ b/meta/recipes-rp/wpewebkit/wpewebkit/Do-not-detect-the-stopped-animations.patch @@ -0,0 +1,98 @@ +Upstream-Status: Pending + +Patch from https://trac.webkit.org/changeset/254680/webkit + +diff --git a/Source/WebCore/platform/graphics/nicosia/NicosiaAnimation.cpp b/Source/WebCore/platform/graphics/nicosia/NicosiaAnimation.cpp +index e44966440ea..7789eddc3cb 100644 +--- a/Source/WebCore/platform/graphics/nicosia/NicosiaAnimation.cpp ++++ b/Source/WebCore/platform/graphics/nicosia/NicosiaAnimation.cpp +@@ -223,8 +223,8 @@ Animation& Animation::operator=(const Animation& other) + + void Animation::apply(ApplicationResult& applicationResults, MonotonicTime time) + { +- if (!isActive()) +- return; ++ // Even when m_state == AnimationState::Stopped && !m_fillsForwards, we should calculate the last value to avoid a flash. ++ // CoordinatedGraphicsScene will soon remove the stopped animation and update the value instead of this function. + + Seconds totalRunningTime = computeTotalRunningTime(time); + double normalizedValue = normalizedAnimationValue(totalRunningTime.seconds(), m_duration, m_direction, m_iterationCount); +@@ -232,8 +232,7 @@ void Animation::apply(ApplicationResult& applicationResults, MonotonicTime time) + if (m_iterationCount != WebCore::Animation::IterationCountInfinite && totalRunningTime.seconds() >= m_duration * m_iterationCount) { + m_state = AnimationState::Stopped; + m_pauseTime = 0_s; +- if (m_fillsForwards) +- normalizedValue = normalizedAnimationValueForFillsForwards(m_iterationCount, m_direction); ++ normalizedValue = normalizedAnimationValueForFillsForwards(m_iterationCount, m_direction); + } + + applicationResults.hasRunningAnimations |= (m_state == AnimationState::Playing); +@@ -308,11 +307,6 @@ Seconds Animation::computeTotalRunningTime(MonotonicTime time) + return m_totalRunningTime; + } + +-bool Animation::isActive() const +-{ +- return m_state != AnimationState::Stopped || m_fillsForwards; +-} +- + void Animation::applyInternal(ApplicationResult& applicationResults, const AnimationValue& from, const AnimationValue& to, float progress) + { + switch (m_keyframes.property()) { +@@ -390,7 +384,7 @@ bool Animations::hasActiveAnimationsOfType(AnimatedPropertyID type) const + { + return std::any_of(m_animations.begin(), m_animations.end(), + [&type](const Animation& animation) { +- return animation.isActive() && animation.keyframes().property() == type; ++ return animation.keyframes().property() == type; + }); + } + +@@ -402,14 +396,4 @@ bool Animations::hasRunningAnimations() const + }); + } + +-Animations Animations::getActiveAnimations() const +-{ +- Animations active; +- for (auto& animation : m_animations) { +- if (animation.isActive()) +- active.add(animation); +- } +- return active; +-} +- + } // namespace Nicosia +diff --git a/Source/WebCore/platform/graphics/nicosia/NicosiaAnimation.h b/Source/WebCore/platform/graphics/nicosia/NicosiaAnimation.h +index 24ffe9dab5c..d8cd1dc1c10 100644 +--- a/Source/WebCore/platform/graphics/nicosia/NicosiaAnimation.h ++++ b/Source/WebCore/platform/graphics/nicosia/NicosiaAnimation.h +@@ -53,7 +53,6 @@ public: + void applyKeepingInternalState(ApplicationResult&, MonotonicTime); + void pause(Seconds); + void resume(); +- bool isActive() const; + + const String& name() const { return m_name; } + const WebCore::KeyframeValueList& keyframes() const { return m_keyframes; } +@@ -101,7 +100,6 @@ public: + + bool hasRunningAnimations() const; + bool hasActiveAnimationsOfType(WebCore::AnimatedPropertyID type) const; +- Animations getActiveAnimations() const; + + private: + Vector<Animation> m_animations; +diff --git a/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp b/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp +index bd690e5c351..b28a907173a 100644 +--- a/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp ++++ b/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp +@@ -874,7 +874,7 @@ void CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly() + if (localDelta.filtersChanged) + state.filters = filters(); + if (localDelta.animationsChanged) +- state.animations = m_animations.getActiveAnimations(); ++ state.animations = m_animations; + + if (localDelta.childrenChanged) { + state.children = WTF::map(children(), |