RESOLVED FIXED 234957
Expose iterators on AnimationList
https://bugs.webkit.org/show_bug.cgi?id=234957
Summary Expose iterators on AnimationList
Antoine Quint
Reported 2022-01-07 07:42:17 PST
Expose iterators on AnimationList
Attachments
Patch (9.57 KB, patch)
2022-01-07 07:43 PST, Antoine Quint
koivisto: review+
Antoine Quint
Comment 1 2022-01-07 07:43:08 PST
Darin Adler
Comment 2 2022-01-07 09:12:17 PST
Comment on attachment 448589 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=448589&action=review > Source/WebCore/platform/animation/AnimationList.h:63 > + using const_reverse_iterator = Vector<Ref<Animation>>::const_reverse_iterator; > + const_reverse_iterator rbegin() const { return m_animations.rbegin(); } > + const_reverse_iterator rend() const { return m_animations.rend(); } Pretty sure you can just use auto: auto rbegin() const { return m_animations.rbegin(); }
Antoine Quint
Comment 3 2022-01-07 10:48:56 PST
Radar WebKit Bug Importer
Comment 4 2022-01-07 10:49:30 PST
Antoine Quint
Comment 5 2022-01-07 11:11:19 PST
(In reply to Darin Adler from comment #2) > Comment on attachment 448589 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=448589&action=review > > > Source/WebCore/platform/animation/AnimationList.h:63 > > + using const_reverse_iterator = Vector<Ref<Animation>>::const_reverse_iterator; > > + const_reverse_iterator rbegin() const { return m_animations.rbegin(); } > > + const_reverse_iterator rend() const { return m_animations.rend(); } > > Pretty sure you can just use auto: > > auto rbegin() const { return m_animations.rbegin(); } Sadly, not possible, see https://webkit.slack.com/archives/C01ARTA5TDM/p1641565899019200?thread_ts=1641557977.011000&cid=C01ARTA5TDM.
Note You need to log in before you can comment on or make changes to this bug.