Title: [216358] releases/WebKitGTK/webkit-2.16/Source/WebCore
- Revision
- 216358
- Author
- [email protected]
- Date
- 2017-05-08 00:33:57 -0700 (Mon, 08 May 2017)
Log Message
Merge r214939 - [GTK+] PNG animations that should run once are not played at all
https://bugs.webkit.org/show_bug.cgi?id=170499
Reviewed by Carlos Garcia Campos.
The repetition count reported bu the PNGImageDecoder is wrong. It's returning m_playCount - 1, which
means 0 for the animations that need to be played once. Change it to return an appropriate value.
Covered by existent tests.
* platform/image-decoders/png/PNGImageDecoder.cpp:
(WebCore::PNGImageDecoder::repetitionCount):
* platform/image-decoders/png/PNGImageDecoder.h:
Modified Paths
Diff
Modified: releases/WebKitGTK/webkit-2.16/Source/WebCore/ChangeLog (216357 => 216358)
--- releases/WebKitGTK/webkit-2.16/Source/WebCore/ChangeLog 2017-05-08 07:32:11 UTC (rev 216357)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/ChangeLog 2017-05-08 07:33:57 UTC (rev 216358)
@@ -1,3 +1,19 @@
+2017-04-05 Miguel Gomez <[email protected]>
+
+ [GTK+] PNG animations that should run once are not played at all
+ https://bugs.webkit.org/show_bug.cgi?id=170499
+
+ Reviewed by Carlos Garcia Campos.
+
+ The repetition count reported bu the PNGImageDecoder is wrong. It's returning m_playCount - 1, which
+ means 0 for the animations that need to be played once. Change it to return an appropriate value.
+
+ Covered by existent tests.
+
+ * platform/image-decoders/png/PNGImageDecoder.cpp:
+ (WebCore::PNGImageDecoder::repetitionCount):
+ * platform/image-decoders/png/PNGImageDecoder.h:
+
2017-04-14 Zalan Bujtas <[email protected]>
text-align start / end failure in table cells
Modified: releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp (216357 => 216358)
--- releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp 2017-05-08 07:32:11 UTC (rev 216357)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp 2017-05-08 07:33:57 UTC (rev 216358)
@@ -227,6 +227,18 @@
{
}
+#if ENABLE(APNG)
+RepetitionCount PNGImageDecoder::repetitionCount() const
+{
+ // APNG format uses 0 to indicate that an animation must play indefinitely. But
+ // the RepetitionCount enumeration uses RepetitionCountInfinite, so we need to adapt this.
+ if (!m_playCount)
+ return RepetitionCountInfinite;
+
+ return m_playCount;
+}
+#endif
+
bool PNGImageDecoder::isSizeAvailable()
{
if (!ImageDecoder::isSizeAvailable())
Modified: releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/image-decoders/png/PNGImageDecoder.h (216357 => 216358)
--- releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/image-decoders/png/PNGImageDecoder.h 2017-05-08 07:32:11 UTC (rev 216357)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/image-decoders/png/PNGImageDecoder.h 2017-05-08 07:33:57 UTC (rev 216358)
@@ -44,7 +44,7 @@
String filenameExtension() const override { return "png"; }
#if ENABLE(APNG)
size_t frameCount() const override { return m_frameCount; }
- RepetitionCount repetitionCount() const override { return m_playCount-1; }
+ RepetitionCount repetitionCount() const override;
#endif
bool isSizeAvailable() override;
bool setSize(const IntSize&) override;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes