Changeset 214939 in webkit
- Timestamp:
- Apr 5, 2017 3:09:11 AM (7 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r214937 r214939 1 2017-04-05 Miguel Gomez <magomez@igalia.com> 2 3 [GTK+] PNG animations that should run once are not played at all 4 https://bugs.webkit.org/show_bug.cgi?id=170499 5 6 Reviewed by Carlos Garcia Campos. 7 8 The repetition count reported bu the PNGImageDecoder is wrong. It's returning m_playCount - 1, which 9 means 0 for the animations that need to be played once. Change it to return an appropriate value. 10 11 Covered by existent tests. 12 13 * platform/image-decoders/png/PNGImageDecoder.cpp: 14 (WebCore::PNGImageDecoder::repetitionCount): 15 * platform/image-decoders/png/PNGImageDecoder.h: 16 1 17 2017-04-05 Andy Estes <aestes@apple.com> 2 18 -
trunk/Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp
r206481 r214939 228 228 } 229 229 230 #if ENABLE(APNG) 231 RepetitionCount PNGImageDecoder::repetitionCount() const 232 { 233 // APNG format uses 0 to indicate that an animation must play indefinitely. But 234 // the RepetitionCount enumeration uses RepetitionCountInfinite, so we need to adapt this. 235 if (!m_playCount) 236 return RepetitionCountInfinite; 237 238 return m_playCount; 239 } 240 #endif 241 230 242 bool PNGImageDecoder::isSizeAvailable() 231 243 { -
trunk/Source/WebCore/platform/image-decoders/png/PNGImageDecoder.h
r206481 r214939 45 45 #if ENABLE(APNG) 46 46 size_t frameCount() const override { return m_frameCount; } 47 RepetitionCount repetitionCount() const override { return m_playCount-1; }47 RepetitionCount repetitionCount() const override; 48 48 #endif 49 49 bool isSizeAvailable() override;
Note: See TracChangeset
for help on using the changeset viewer.