Summary: | Expose iterators on AnimationList | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Antoine Quint <graouts> | ||||
Component: | Animations | Assignee: | Antoine Quint <graouts> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | darin, dino, esprehn+autocc, ews-watchlist, glenn, graouts, gyuyoung.kim, koivisto, macpherson, menard, webkit-bug-importer | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | WebKit Nightly Build | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Antoine Quint
2022-01-07 07:42:17 PST
Created attachment 448589 [details]
Patch
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(); } Committed r287762 (245825@trunk): <https://commits.webkit.org/245825@trunk> (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. |