[webkit-reviews] review granted: [Bug 193195] [Web Animations] Audit Web Animations classes for memory reduction : [Attachment 358696] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jan 9 23:40:44 PST 2019


Yusuke Suzuki <yusukesuzuki at slowstart.org> has granted Antoine Quint
<graouts at apple.com>'s request for review:
Bug 193195: [Web Animations] Audit Web Animations classes for memory reduction
https://bugs.webkit.org/show_bug.cgi?id=193195

Attachment 358696: Patch

https://bugs.webkit.org/attachment.cgi?id=358696&action=review




--- Comment #7 from Yusuke Suzuki <yusukesuzuki at slowstart.org> ---
Comment on attachment 358696
  --> https://bugs.webkit.org/attachment.cgi?id=358696
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=358696&action=review

r=me with some suggestions.

> Source/WebCore/animation/FillMode.h:34
> +typedef Markable<FillMode, EnumMarkableTraits<FillMode, 5>>
OptionalFillMode;

Use `using` instead.
And you can omit this `5`.
EnumMarkableTraits automatically selects 255 for the empty mark since the
underlying type is uint8_t and it picks the maximum value of the underlying
type.
So,

using OptionalFillMode = Markable<FillMode, EnumMarkableTraits<FillMode>>;

works.

> Source/WebCore/animation/PlaybackDirection.h:34
> +typedef Markable<PlaybackDirection, EnumMarkableTraits<PlaybackDirection,
4>> OptionalPlaybackDirection;

Use `using` instead.
And you can omit `4` here.

> Source/WebCore/animation/WebAnimationUtilities.h:61
> +typedef Markable<double, WebAnimationsMarkableDoubleTraits> MarkableDouble;

Use `using` instead.


More information about the webkit-reviews mailing list