mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
c0ef33a810
This is a bit awkward. We lazily set mName to the transition property and then return it. The reasons for this approach are: * We don't really want to eagerly fill in mName for all transitions since in 99% of cases we'll never use it and this will lead to wasted allocations. * The signature of Name() returns a const nsString reference. This is because Name() is used when building CSS Animations (to compare different copies of the same animation when updating). For that case we don't really want to generate unnecessary copies of nsString objects so we return a reference. However, that means for transitions as well we need to return a reference so we can't just generate a temporary string on-demand. As a result we also have to const-cast ourselves so we can update the mName member. We could make mName mutable but seeing as it's only set once, the const_cast seems more appropriate. |
||
---|---|---|
.. | ||
test | ||
Animation.cpp | ||
Animation.h | ||
AnimationEffect.cpp | ||
AnimationEffect.h | ||
AnimationPlayer.cpp | ||
AnimationPlayer.h | ||
AnimationTimeline.cpp | ||
AnimationTimeline.h | ||
AnimationUtils.h | ||
DocumentTimeline.cpp | ||
DocumentTimeline.h | ||
moz.build | ||
PendingPlayerTracker.cpp | ||
PendingPlayerTracker.h |