WebKit Bugzilla
Attachment 358494 Details for
Bug 193195
: [Web Animations] Audit Web Animations classes for memory reduction
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-193195-20190107163914.patch (text/plain), 24.57 KB, created by
Antoine Quint
on 2019-01-07 07:39:15 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Antoine Quint
Created:
2019-01-07 07:39:15 PST
Size:
24.57 KB
patch
obsolete
>Subversion Revision: 239667 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 8c00641a45c657aa8d038db139ab69a77550f746..52e773fb294c4fa448fa2db665c94da676d83cc7 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,58 @@ >+2019-01-07 Antoine Quint <graouts@apple.com> >+ >+ [Web Animations] Audit Web Animations classes for memory reduction >+ https://bugs.webkit.org/show_bug.cgi?id=193195 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ The classes, enums and structs added to support Web Animations were not as memory-efficient as they could be. We now order >+ members in a way that reduces padding, use Markable<Seconds, ...> instead of Optional<Seconds>, declare enums as uint8_t >+ and removed unnecessary members. >+ >+ As a result, classes and structs have shrunk as follows: >+ >+ WebAnimation: 256 > 224 >+ DeclarativeAnimation: 392 > 352 >+ CSSAnimation: 416 > 376 >+ CSSTransition: 440 > 400 >+ AnimationEffect: 88 > 72 >+ KeyframeEffect: 208 > 184 >+ AnimationPlaybackEvent: 104 > 88 >+ EffectTiming: 72 > 64 >+ ComputedEffectTiming: 136 > 128 >+ AnimationTimeline: 264 > 248 >+ DocumentTimeline: 496 > 464 >+ OptionalEffectTiming: 112 > 104 >+ >+ * animation/AnimationEffect.h: Order members in decreasing size, except for m_fill and m_direction, which we put at the top to >+ save 8 bytes (2 bytes of padding instead of 4 before m_animation and saving 6 bytes of padding at the end). >+ * animation/AnimationPlaybackEvent.h: >+ * animation/AnimationTimeline.cpp: >+ (WebCore::AnimationTimeline::AnimationTimeline): >+ * animation/AnimationTimeline.h: We remove the m_classType member and instead make isDocumentTimeline() virtual. >+ (WebCore::AnimationTimeline::isDocumentTimeline const): >+ (): Deleted. >+ (WebCore::AnimationTimeline::classType const): Deleted. >+ * animation/CompositeOperation.h: >+ * animation/CompositeOperationOrAuto.h: >+ * animation/ComputedEffectTiming.h: >+ * animation/DeclarativeAnimation.cpp: >+ (WebCore::DeclarativeAnimation::DeclarativeAnimation): >+ * animation/DeclarativeAnimation.h: We keep m_wasPending and m_previousPhase to save some padding at the end. >+ * animation/DocumentTimeline.cpp: >+ (WebCore::DocumentTimeline::DocumentTimeline): >+ * animation/DocumentTimeline.h: >+ * animation/EffectTiming.h: >+ * animation/FillMode.h: >+ * animation/IterationCompositeOperation.h: >+ * animation/KeyframeEffect.cpp: >+ (WebCore::KeyframeEffect::create): >+ (WebCore::KeyframeEffect::KeyframeEffect): >+ * animation/KeyframeEffect.h: >+ * animation/OptionalEffectTiming.h: >+ * animation/PlaybackDirection.h: >+ * animation/WebAnimation.h: >+ > 2019-01-06 Zan Dobersek <zdobersek@igalia.com> > > [Nicosia] Take over CoordinatedGraphics-named implementation of async scrolling classes >diff --git a/Source/WebCore/animation/AnimationEffect.h b/Source/WebCore/animation/AnimationEffect.h >index 29d1abd1cc4f99164c359334977ae03474b7c492..0f9c4ea4320f739174dc756b3daddfc176e8e953 100644 >--- a/Source/WebCore/animation/AnimationEffect.h >+++ b/Source/WebCore/animation/AnimationEffect.h >@@ -95,29 +95,32 @@ public: > Optional<double> currentIteration() const; > Seconds activeDuration() const; > >- enum class Phase { Before, Active, After, Idle }; >+ enum class Phase : uint8_t { Before, Active, After, Idle }; > Phase phase() const; > > protected: > explicit AnimationEffect(); > > private: >- enum class ComputedDirection { Forwards, Reverse }; >+ enum class ComputedDirection : uint8_t { Forwards, Reverse }; > > Optional<double> overallProgress() const; > AnimationEffect::ComputedDirection currentDirection() const; > Optional<double> directedProgress() const; > Optional<double> transformedProgress() const; >- >- Seconds m_delay { 0_s }; >- Seconds m_endDelay { 0_s }; >+ > FillMode m_fill { FillMode::Auto }; >+ PlaybackDirection m_direction { PlaybackDirection::Normal }; >+ >+ WeakPtr<WebAnimation> m_animation; >+ RefPtr<TimingFunction> m_timingFunction; >+ > double m_iterationStart { 0 }; > double m_iterations { 1 }; >+ >+ Seconds m_delay { 0_s }; >+ Seconds m_endDelay { 0_s }; > Seconds m_iterationDuration { 0_s }; >- PlaybackDirection m_direction { PlaybackDirection::Normal }; >- RefPtr<TimingFunction> m_timingFunction; >- WeakPtr<WebAnimation> m_animation; > }; > > } // namespace WebCore >diff --git a/Source/WebCore/animation/AnimationPlaybackEvent.h b/Source/WebCore/animation/AnimationPlaybackEvent.h >index cb7fb885bcac239bc1e9ec7561845c4d59aa8851..ea88d14ed91fdfa62999c1e4c8cb53d7a3afd5c2 100644 >--- a/Source/WebCore/animation/AnimationPlaybackEvent.h >+++ b/Source/WebCore/animation/AnimationPlaybackEvent.h >@@ -25,8 +25,9 @@ > > #pragma once > >-#include "Event.h" > #include "AnimationPlaybackEventInit.h" >+#include "Event.h" >+#include <wtf/Markable.h> > > namespace WebCore { > >@@ -55,8 +56,8 @@ private: > AnimationPlaybackEvent(const AtomicString&, Optional<Seconds>, Optional<Seconds>); > AnimationPlaybackEvent(const AtomicString&, const AnimationPlaybackEventInit&, IsTrusted); > >- Optional<Seconds> m_currentTime; >- Optional<Seconds> m_timelineTime; >+ Markable<Seconds, Seconds::MarkableTraits> m_currentTime; >+ Markable<Seconds, Seconds::MarkableTraits> m_timelineTime; > }; > > } >diff --git a/Source/WebCore/animation/AnimationTimeline.cpp b/Source/WebCore/animation/AnimationTimeline.cpp >index 625d4f0f5740599f42cbfca32f70343879f90ef6..d79352e48d20f11a1d042c61df9c672c31018293 100644 >--- a/Source/WebCore/animation/AnimationTimeline.cpp >+++ b/Source/WebCore/animation/AnimationTimeline.cpp >@@ -46,8 +46,7 @@ > > namespace WebCore { > >-AnimationTimeline::AnimationTimeline(ClassType classType) >- : m_classType(classType) >+AnimationTimeline::AnimationTimeline() > { > } > >diff --git a/Source/WebCore/animation/AnimationTimeline.h b/Source/WebCore/animation/AnimationTimeline.h >index 1e15f1804b676307b0e833fcf24d4b95a9f5ce31..8b74511277d1b8194a583c26c0de537361dd5bb5 100644 >--- a/Source/WebCore/animation/AnimationTimeline.h >+++ b/Source/WebCore/animation/AnimationTimeline.h >@@ -32,6 +32,7 @@ > #include <wtf/Forward.h> > #include <wtf/HashMap.h> > #include <wtf/ListHashSet.h> >+#include <wtf/Markable.h> > #include <wtf/Optional.h> > #include <wtf/Ref.h> > #include <wtf/RefCounted.h> >@@ -46,7 +47,7 @@ class Element; > > class AnimationTimeline : public RefCounted<AnimationTimeline> { > public: >- bool isDocumentTimeline() const { return m_classType == DocumentTimelineClass; } >+ virtual bool isDocumentTimeline() const { return false; } > > void forgetAnimation(WebAnimation*); > virtual void animationTimingDidChange(WebAnimation&); >@@ -55,7 +56,7 @@ public: > Optional<double> bindingsCurrentTime(); > virtual Optional<Seconds> currentTime() { return m_currentTime; } > >- enum class Ordering { Sorted, Unsorted }; >+ enum class Ordering : uint8_t { Sorted, Unsorted }; > Vector<RefPtr<WebAnimation>> animationsForElement(Element&, Ordering ordering = Ordering::Unsorted) const; > void elementWasRemoved(Element&); > void removeAnimationsForElement(Element&); >@@ -73,13 +74,7 @@ public: > virtual ~AnimationTimeline(); > > protected: >- enum ClassType { >- DocumentTimelineClass >- }; >- >- ClassType classType() const { return m_classType; } >- >- explicit AnimationTimeline(ClassType); >+ explicit AnimationTimeline(); > > ListHashSet<WebAnimation*> m_allAnimations; > ListHashSet<RefPtr<WebAnimation>> m_animations; >@@ -90,13 +85,13 @@ private: > PropertyToTransitionMap& ensureRunningTransitionsByProperty(Element&); > void cancelDeclarativeAnimation(DeclarativeAnimation&); > >- ClassType m_classType; >- Optional<Seconds> m_currentTime; > ElementToAnimationsMap m_elementToAnimationsMap; > ElementToAnimationsMap m_elementToCSSAnimationsMap; > ElementToAnimationsMap m_elementToCSSTransitionsMap; > HashMap<Element*, HashMap<String, RefPtr<CSSAnimation>>> m_elementToCSSAnimationByName; > HashMap<Element*, PropertyToTransitionMap> m_elementToRunningCSSTransitionByCSSPropertyID; >+ >+ Markable<Seconds, Seconds::MarkableTraits> m_currentTime; > }; > > } // namespace WebCore >diff --git a/Source/WebCore/animation/CompositeOperation.h b/Source/WebCore/animation/CompositeOperation.h >index 209a5779306ceb639c9009ee6d589ab41eb9cd35..0f75e7415f3304b3d9aae8db4052df9e93ae436d 100644 >--- a/Source/WebCore/animation/CompositeOperation.h >+++ b/Source/WebCore/animation/CompositeOperation.h >@@ -27,6 +27,6 @@ > > namespace WebCore { > >-enum class CompositeOperation { Replace, Add, Accumulate }; >+enum class CompositeOperation : uint8_t { Replace, Add, Accumulate }; > > } // namespace WebCore >diff --git a/Source/WebCore/animation/CompositeOperationOrAuto.h b/Source/WebCore/animation/CompositeOperationOrAuto.h >index a27de4e3113b1cf65e0a91fe1f4513ad4ca26155..0279ca7fd8eed017a88b065241b3ae6dc4a8d5ea 100644 >--- a/Source/WebCore/animation/CompositeOperationOrAuto.h >+++ b/Source/WebCore/animation/CompositeOperationOrAuto.h >@@ -27,6 +27,6 @@ > > namespace WebCore { > >-enum class CompositeOperationOrAuto { Replace, Add, Accumulate, Auto }; >+enum class CompositeOperationOrAuto : uint8_t { Replace, Add, Accumulate, Auto }; > > } // namespace WebCore >diff --git a/Source/WebCore/animation/ComputedEffectTiming.h b/Source/WebCore/animation/ComputedEffectTiming.h >index 77cfdc01c97284909c48f68456d3fd8bbb872240..4833a2b2569a387118918c0f4646031fb8ca7b1c 100644 >--- a/Source/WebCore/animation/ComputedEffectTiming.h >+++ b/Source/WebCore/animation/ComputedEffectTiming.h >@@ -31,11 +31,11 @@ > namespace WebCore { > > struct ComputedEffectTiming : EffectTiming { >- double endTime; >- double activeDuration; > Optional<double> localTime; > Optional<double> progress; > Optional<double> currentIteration; >+ double endTime; >+ double activeDuration; > }; > > } // namespace WebCore >diff --git a/Source/WebCore/animation/DeclarativeAnimation.cpp b/Source/WebCore/animation/DeclarativeAnimation.cpp >index 76c83b42e4289673daa9400db49ce48602611de3..00ea72ef841b4c266a60d98487757906617f47a7 100644 >--- a/Source/WebCore/animation/DeclarativeAnimation.cpp >+++ b/Source/WebCore/animation/DeclarativeAnimation.cpp >@@ -38,9 +38,9 @@ namespace WebCore { > > DeclarativeAnimation::DeclarativeAnimation(Element& owningElement, const Animation& backingAnimation) > : WebAnimation(owningElement.document()) >+ , m_eventQueue(owningElement) > , m_owningElement(&owningElement) > , m_backingAnimation(const_cast<Animation&>(backingAnimation)) >- , m_eventQueue(owningElement) > { > } > >diff --git a/Source/WebCore/animation/DeclarativeAnimation.h b/Source/WebCore/animation/DeclarativeAnimation.h >index 931ed7632cd05fa555c21ba4cf34dc4261625ca3..e7ac80bf73fbddc6da7ae8acfa7fe9b18f3588a7 100644 >--- a/Source/WebCore/animation/DeclarativeAnimation.h >+++ b/Source/WebCore/animation/DeclarativeAnimation.h >@@ -83,12 +83,14 @@ private: > void resume() final; > void stop() final; > >- Element* m_owningElement; >- Ref<Animation> m_backingAnimation; > bool m_wasPending { false }; > AnimationEffect::Phase m_previousPhase { AnimationEffect::Phase::Idle }; >- double m_previousIteration; >+ > GenericEventQueue m_eventQueue; >+ >+ Element* m_owningElement; >+ Ref<Animation> m_backingAnimation; >+ double m_previousIteration; > }; > > } // namespace WebCore >diff --git a/Source/WebCore/animation/DocumentTimeline.cpp b/Source/WebCore/animation/DocumentTimeline.cpp >index fb445c1d868eb24c5c4fb920c5043f65f4f3df72..3018cbb2ccd2af8f77abb60bc6c239238cfaf4e2 100644 >--- a/Source/WebCore/animation/DocumentTimeline.cpp >+++ b/Source/WebCore/animation/DocumentTimeline.cpp >@@ -60,13 +60,13 @@ Ref<DocumentTimeline> DocumentTimeline::create(Document& document, DocumentTimel > } > > DocumentTimeline::DocumentTimeline(Document& document, Seconds originTime) >- : AnimationTimeline(DocumentTimelineClass) >- , m_document(&document) >- , m_originTime(originTime) >- , m_tickScheduleTimer(*this, &DocumentTimeline::scheduleAnimationResolutionIfNeeded) >+ : AnimationTimeline() > #if !USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR) > , m_animationResolutionTimer(*this, &DocumentTimeline::animationResolutionTimerFired) > #endif >+ , m_tickScheduleTimer(*this, &DocumentTimeline::scheduleAnimationResolutionIfNeeded) >+ , m_document(&document) >+ , m_originTime(originTime) > { > if (m_document && m_document->page() && !m_document->page()->isVisible()) > suspendAnimations(); >diff --git a/Source/WebCore/animation/DocumentTimeline.h b/Source/WebCore/animation/DocumentTimeline.h >index 1e880f516030bbf655b9132e06b470c572caefa8..7cc81c9af38f9e87baf69bf052599fc2df4c9c21 100644 >--- a/Source/WebCore/animation/DocumentTimeline.h >+++ b/Source/WebCore/animation/DocumentTimeline.h >@@ -29,6 +29,7 @@ > #include "DocumentTimelineOptions.h" > #include "GenericTaskQueue.h" > #include "Timer.h" >+#include <wtf/Markable.h> > #include <wtf/Ref.h> > > namespace WebCore { >@@ -43,6 +44,8 @@ public: > static Ref<DocumentTimeline> create(Document&, DocumentTimelineOptions&&); > ~DocumentTimeline(); > >+ bool isDocumentTimeline() const final { return true; } >+ > Vector<RefPtr<WebAnimation>> getAnimations() const; > > Document* document() const { return m_document.get(); } >@@ -100,23 +103,23 @@ private: > void transitionDidComplete(RefPtr<CSSTransition>); > void scheduleNextTick(); > >+#if !USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR) >+ void animationResolutionTimerFired(); >+ Timer m_animationResolutionTimer; >+#endif >+ >+ Timer m_tickScheduleTimer; >+ GenericTaskQueue<Timer> m_currentTimeClearingTaskQueue; >+ HashSet<RefPtr<WebAnimation>> m_acceleratedAnimationsPendingRunningStateChange; >+ HashSet<Element*> m_elementsWithRunningAcceleratedAnimations; >+ Vector<Ref<AnimationPlaybackEvent>> m_pendingAnimationEvents; > RefPtr<Document> m_document; >+ Markable<Seconds, Seconds::MarkableTraits> m_cachedCurrentTime; > Seconds m_originTime; >+ unsigned m_numberOfAnimationTimelineInvalidationsForTesting { 0 }; > bool m_isSuspended { false }; > bool m_waitingOnVMIdle { false }; > bool m_isUpdatingAnimations { false }; >- Optional<Seconds> m_cachedCurrentTime; >- GenericTaskQueue<Timer> m_currentTimeClearingTaskQueue; >- HashSet<RefPtr<WebAnimation>> m_acceleratedAnimationsPendingRunningStateChange; >- Vector<Ref<AnimationPlaybackEvent>> m_pendingAnimationEvents; >- unsigned m_numberOfAnimationTimelineInvalidationsForTesting { 0 }; >- HashSet<Element*> m_elementsWithRunningAcceleratedAnimations; >- Timer m_tickScheduleTimer; >- >-#if !USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR) >- void animationResolutionTimerFired(); >- Timer m_animationResolutionTimer; >-#endif > }; > > } // namespace WebCore >diff --git a/Source/WebCore/animation/EffectTiming.h b/Source/WebCore/animation/EffectTiming.h >index 7d67d160a7e13be1c8f14c0d21192ae8a3cfd51b..f5adf4c7b87768e73d21a17301d1e34f4e82f390 100644 >--- a/Source/WebCore/animation/EffectTiming.h >+++ b/Source/WebCore/animation/EffectTiming.h >@@ -33,14 +33,14 @@ > namespace WebCore { > > struct EffectTiming { >+ Variant<double, String> duration { "auto" }; > double delay { 0 }; > double endDelay { 0 }; >- FillMode fill { FillMode::Auto }; > double iterationStart { 0 }; > double iterations { 1 }; >- Variant<double, String> duration { "auto" }; >- PlaybackDirection direction { PlaybackDirection::Normal }; > String easing { "linear" }; >+ FillMode fill { FillMode::Auto }; >+ PlaybackDirection direction { PlaybackDirection::Normal }; > }; > > } // namespace WebCore >diff --git a/Source/WebCore/animation/FillMode.h b/Source/WebCore/animation/FillMode.h >index 6984af406a52495ebb8e65dd0688db2de1cf6912..1810ea11c0ef532e5d8129cfe3a4684d212b20ec 100644 >--- a/Source/WebCore/animation/FillMode.h >+++ b/Source/WebCore/animation/FillMode.h >@@ -27,6 +27,6 @@ > > namespace WebCore { > >-enum class FillMode { None, Forwards, Backwards, Both, Auto }; >+enum class FillMode : uint8_t { None, Forwards, Backwards, Both, Auto }; > > } // namespace WebCore >diff --git a/Source/WebCore/animation/IterationCompositeOperation.h b/Source/WebCore/animation/IterationCompositeOperation.h >index ded5f4efa8726fb2ef05cef3a90e3591042ae9b2..32ed2347f120f8bb7e1058473379d0f633b89dc5 100644 >--- a/Source/WebCore/animation/IterationCompositeOperation.h >+++ b/Source/WebCore/animation/IterationCompositeOperation.h >@@ -27,6 +27,6 @@ > > namespace WebCore { > >-enum class IterationCompositeOperation { Replace, Accumulate }; >+enum class IterationCompositeOperation : uint8_t { Replace, Accumulate }; > > } // namespace WebCore >diff --git a/Source/WebCore/animation/KeyframeEffect.cpp b/Source/WebCore/animation/KeyframeEffect.cpp >index 13dbcd0fd133979c92351cfb0460d98211a730c3..f486a39614b135c550a9dbd4332b942655ee751e 100644 >--- a/Source/WebCore/animation/KeyframeEffect.cpp >+++ b/Source/WebCore/animation/KeyframeEffect.cpp >@@ -472,14 +472,14 @@ ExceptionOr<Ref<KeyframeEffect>> KeyframeEffect::create(ExecState& state, Elemen > } else { > auto keyframeEffectOptions = WTF::get<KeyframeEffectOptions>(optionsValue); > timing = { >+ keyframeEffectOptions.duration, > keyframeEffectOptions.delay, > keyframeEffectOptions.endDelay, >- keyframeEffectOptions.fill, > keyframeEffectOptions.iterationStart, > keyframeEffectOptions.iterations, >- keyframeEffectOptions.duration, >- keyframeEffectOptions.direction, >- keyframeEffectOptions.easing >+ keyframeEffectOptions.easing, >+ keyframeEffectOptions.fill, >+ keyframeEffectOptions.direction > }; > } > >@@ -509,7 +509,6 @@ Ref<KeyframeEffect> KeyframeEffect::create(const Element& target) > > KeyframeEffect::KeyframeEffect(Element* target) > : m_target(target) >- , m_blendingKeyframes(emptyString()) > { > } > >diff --git a/Source/WebCore/animation/KeyframeEffect.h b/Source/WebCore/animation/KeyframeEffect.h >index 4f64ca4eade092e82548c743df5d1b7aaeac8a74..d8ae801351b238b296db9c312ccaca6a86c39273 100644 >--- a/Source/WebCore/animation/KeyframeEffect.h >+++ b/Source/WebCore/animation/KeyframeEffect.h >@@ -139,7 +139,7 @@ public: > private: > KeyframeEffect(Element*); > >- enum class AcceleratedAction { Play, Pause, Seek, Stop }; >+ enum class AcceleratedAction : uint8_t { Play, Pause, Seek, Stop }; > > void copyPropertiesFromSource(Ref<KeyframeEffect>&&); > ExceptionOr<void> processKeyframes(JSC::ExecState&, JSC::Strong<JSC::JSObject>&&); >@@ -157,14 +157,20 @@ private: > void setBlendingKeyframes(KeyframeList&); > void checkForMatchingTransformFunctionLists(); > void checkForMatchingFilterFunctionLists(); >+ void checkForMatchingColorFilterFunctionLists(); >+ bool checkForMatchingFilterFunctionLists(CSSPropertyID, const std::function<const FilterOperations& (const RenderStyle&)>&) const; > #if ENABLE(FILTERS_LEVEL_2) > void checkForMatchingBackdropFilterFunctionLists(); > #endif >- void checkForMatchingColorFilterFunctionLists(); > >- bool checkForMatchingFilterFunctionLists(CSSPropertyID, const std::function<const FilterOperations& (const RenderStyle&)>&) const; >+ KeyframeList m_blendingKeyframes { emptyString() }; >+ Vector<ParsedKeyframe> m_parsedKeyframes; >+ Vector<AcceleratedAction> m_pendingAcceleratedActions; >+ RefPtr<Element> m_target; > > AcceleratedAction m_lastRecordedAcceleratedAction { AcceleratedAction::Stop }; >+ IterationCompositeOperation m_iterationCompositeOperation { IterationCompositeOperation::Replace }; >+ CompositeOperation m_compositeOperation { CompositeOperation::Replace }; > bool m_shouldRunAccelerated { false }; > bool m_needsForcedLayout { false }; > bool m_triggersStackingContext { false }; >@@ -174,14 +180,6 @@ private: > bool m_backdropFilterFunctionListsMatch { false }; > #endif > bool m_colorFilterFunctionListsMatch { false }; >- >- RefPtr<Element> m_target; >- KeyframeList m_blendingKeyframes; >- Vector<ParsedKeyframe> m_parsedKeyframes; >- IterationCompositeOperation m_iterationCompositeOperation { IterationCompositeOperation::Replace }; >- CompositeOperation m_compositeOperation { CompositeOperation::Replace }; >- >- Vector<AcceleratedAction> m_pendingAcceleratedActions; > }; > > } // namespace WebCore >diff --git a/Source/WebCore/animation/OptionalEffectTiming.h b/Source/WebCore/animation/OptionalEffectTiming.h >index 6d911819c4e097b85e3dcf0b68d137eec3650f79..e49c59188aee725a1f9bc194c0ba3d82b0b97e0b 100644 >--- a/Source/WebCore/animation/OptionalEffectTiming.h >+++ b/Source/WebCore/animation/OptionalEffectTiming.h >@@ -33,14 +33,14 @@ > namespace WebCore { > > struct OptionalEffectTiming { >+ Optional<Variant<double, String>> duration; > Optional<double> delay; > Optional<double> endDelay; >- Optional<FillMode> fill; > Optional<double> iterationStart; > Optional<double> iterations; >- Optional<Variant<double, String>> duration; >- Optional<PlaybackDirection> direction; > String easing; >+ Optional<FillMode> fill; >+ Optional<PlaybackDirection> direction; > }; > > } // namespace WebCore >diff --git a/Source/WebCore/animation/PlaybackDirection.h b/Source/WebCore/animation/PlaybackDirection.h >index 4ba9ad63ef7f917b36f2d99b1254579e6b197da4..b834438acd8d6461ad47327cf2473ad58b7c5121 100644 >--- a/Source/WebCore/animation/PlaybackDirection.h >+++ b/Source/WebCore/animation/PlaybackDirection.h >@@ -27,6 +27,6 @@ > > namespace WebCore { > >-enum class PlaybackDirection { Normal, Reverse, Alternate, AlternateReverse }; >+enum class PlaybackDirection : uint8_t { Normal, Reverse, Alternate, AlternateReverse }; > > } // namespace WebCore >diff --git a/Source/WebCore/animation/WebAnimation.h b/Source/WebCore/animation/WebAnimation.h >index ae1b7abfaafe14a05a0fbc47550df3e72d5dfcc0..5c9390972bb5bd25563469d381bb11fab12d4b0a 100644 >--- a/Source/WebCore/animation/WebAnimation.h >+++ b/Source/WebCore/animation/WebAnimation.h >@@ -30,6 +30,7 @@ > #include "EventTarget.h" > #include "ExceptionOr.h" > #include <wtf/Forward.h> >+#include <wtf/Markable.h> > #include <wtf/Optional.h> > #include <wtf/Ref.h> > #include <wtf/RefCounted.h> >@@ -68,11 +69,11 @@ public: > Optional<Seconds> currentTime() const; > ExceptionOr<void> setCurrentTime(Optional<Seconds>); > >- enum class Silently { Yes, No }; >+ enum class Silently : uint8_t { Yes, No }; > double playbackRate() const { return m_playbackRate + 0; } > void setPlaybackRate(double); > >- enum class PlayState { Idle, Running, Paused, Finished }; >+ enum class PlayState : uint8_t { Idle, Running, Paused, Finished }; > PlayState playState() const; > > bool pending() const { return hasPendingPauseTask() || hasPendingPlayTask(); } >@@ -128,11 +129,11 @@ protected: > void stop() override; > > private: >- enum class DidSeek { Yes, No }; >- enum class SynchronouslyNotify { Yes, No }; >- enum class RespectHoldTime { Yes, No }; >- enum class AutoRewind { Yes, No }; >- enum class TimeToRunPendingTask { NotScheduled, ASAP, WhenReady }; >+ enum class DidSeek : uint8_t { Yes, No }; >+ enum class SynchronouslyNotify : uint8_t { Yes, No }; >+ enum class RespectHoldTime : uint8_t { Yes, No }; >+ enum class AutoRewind : uint8_t { Yes, No }; >+ enum class TimeToRunPendingTask : uint8_t { NotScheduled, ASAP, WhenReady }; > > void timingDidChange(DidSeek, SynchronouslyNotify); > void updateFinishedState(DidSeek, SynchronouslyNotify); >@@ -158,22 +159,25 @@ private: > double effectivePlaybackRate() const; > void applyPendingPlaybackRate(); > >- String m_id; >+ Optional<double> m_pendingPlaybackRate; >+ > RefPtr<AnimationEffect> m_effect; > RefPtr<AnimationTimeline> m_timeline; >- Optional<Seconds> m_previousCurrentTime; >- Optional<Seconds> m_startTime; >- Optional<Seconds> m_holdTime; >- int m_suspendCount { 0 }; >+ UniqueRef<ReadyPromise> m_readyPromise; >+ UniqueRef<FinishedPromise> m_finishedPromise; >+ Markable<Seconds, Seconds::MarkableTraits> m_previousCurrentTime; >+ Markable<Seconds, Seconds::MarkableTraits> m_startTime; >+ Markable<Seconds, Seconds::MarkableTraits> m_holdTime; > double m_playbackRate { 1 }; >- Optional<double> m_pendingPlaybackRate; >+ String m_id; >+ >+ int m_suspendCount { 0 }; >+ > bool m_isStopped { false }; > bool m_isSuspended { false }; > bool m_finishNotificationStepsMicrotaskPending; > bool m_isRelevant; > bool m_shouldSkipUpdatingFinishedStateWhenResolving; >- UniqueRef<ReadyPromise> m_readyPromise; >- UniqueRef<FinishedPromise> m_finishedPromise; > TimeToRunPendingTask m_timeToRunPendingPlayTask { TimeToRunPendingTask::NotScheduled }; > TimeToRunPendingTask m_timeToRunPendingPauseTask { TimeToRunPendingTask::NotScheduled }; >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 193195
:
358494
|
358696