[CG] Adding support for HEIF-sequence ('public.heics') images
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 14 May 2019 15:13:50 +0000 (15:13 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 14 May 2019 15:13:50 +0000 (15:13 +0000)
commit1ba6c9b8ca9145351ccb08a0147d843f0ac1ea0c
tree7e102ca0630eb365e6ca9f87fc0fadbe0fb7379a
parentc9c27a27a236b114ca4a79b733fa4e90efc78c4a
[CG] Adding support for HEIF-sequence ('public.heics') images
https://bugs.webkit.org/show_bug.cgi?id=197384

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2019-05-14
Reviewed by Simon Fraser.

Source/WebCore:

-- Get the image repetitionCount and the frame duration.
-- Add a new function setAdditionalSupportedImageTypesForTesting() which
   takes a delimited String.
-- Add internal APIs to retrive the image frame count and the frame
   duration.

Tests: fast/images/animated-heics-draw.html
       fast/images/animated-heics-verify.html

* platform/graphics/ImageSource.h:
* platform/graphics/cg/ImageDecoderCG.cpp:
(WebCore::animationPropertiesFromProperties):
(WebCore::animationHEICSPropertiesFromProperties):
(WebCore::ImageDecoderCG::repetitionCount const):
(WebCore::ImageDecoderCG::frameDurationAtIndex const):
* platform/graphics/cg/UTIRegistry.cpp:
(WebCore::setAdditionalSupportedImageTypesForTesting):
* platform/graphics/cg/UTIRegistry.h:
* testing/Internals.cpp:
(WebCore::Internals::imageFrameCount):
(WebCore::Internals::imageFrameDurationAtIndex):
* testing/Internals.h:
* testing/Internals.idl:
* testing/js/WebCoreTestSupport.cpp:
(WebCoreTestSupport::setAdditionalSupportedImageTypesForTesting):
* testing/js/WebCoreTestSupport.h:

Tools:

* DumpRenderTree/TestOptions.cpp:
(TestOptions::TestOptions):
* DumpRenderTree/TestOptions.h:
* DumpRenderTree/mac/DumpRenderTree.mm:
(resetWebViewToConsistentStateBeforeTesting):
Parse the new webkit-test-runner paramter: additionalSupportedImageTypes.
Make DRT call setAdditionalSupportedImageTypesForTesting() before starting
the test.

* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::stringForKey):
(WTR::InjectedBundle::beginTesting):
* WebKitTestRunner/InjectedBundle/InjectedBundle.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetStateToConsistentValues):
(WTR::updateTestOptionsFromTestHeader):
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::createTestSettingsDictionary):
* WebKitTestRunner/TestOptions.h:
(WTR::TestOptions::hasSameInitializationOptions const):
Parse the new webkit-test-runner paramter: additionalSupportedImageTypes.
Make WTR call setAdditionalSupportedImageTypesForTesting() before starting
the test.

LayoutTests:

Disable the tests for all ports and enable it only for [ Mojave+ WK2]
because of <rdar://problem/42625657>.

* TestExpectations:
* fast/images/animated-heics-draw-expected.txt: Added.
* fast/images/animated-heics-draw.html: Added.
* fast/images/animated-heics-verify-expected.txt: Added.
* fast/images/animated-heics-verify.html: Added.
* fast/images/resources/sea_animation.heics: Added.
* fast/images/resources/sticker.heics: Added.
* platform/mac-wk2/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245280 268f45cc-cd09-0410-ab3c-d52691b4dbfc
28 files changed:
LayoutTests/ChangeLog
LayoutTests/TestExpectations
LayoutTests/fast/images/animated-heics-draw-expected.txt [new file with mode: 0644]
LayoutTests/fast/images/animated-heics-draw.html [new file with mode: 0644]
LayoutTests/fast/images/animated-heics-verify-expected.txt [new file with mode: 0644]
LayoutTests/fast/images/animated-heics-verify.html [new file with mode: 0644]
LayoutTests/fast/images/resources/sea_animation.heics [new file with mode: 0644]
LayoutTests/fast/images/resources/sticker.heics [new file with mode: 0644]
LayoutTests/platform/mac-wk2/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/ImageSource.h
Source/WebCore/platform/graphics/cg/ImageDecoderCG.cpp
Source/WebCore/platform/graphics/cg/UTIRegistry.cpp
Source/WebCore/platform/graphics/cg/UTIRegistry.h
Source/WebCore/testing/Internals.cpp
Source/WebCore/testing/Internals.h
Source/WebCore/testing/Internals.idl
Source/WebCore/testing/js/WebCoreTestSupport.cpp
Source/WebCore/testing/js/WebCoreTestSupport.h
Tools/ChangeLog
Tools/DumpRenderTree/TestOptions.cpp
Tools/DumpRenderTree/TestOptions.h
Tools/DumpRenderTree/mac/DumpRenderTree.mm
Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp
Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.h
Tools/WebKitTestRunner/TestController.cpp
Tools/WebKitTestRunner/TestInvocation.cpp
Tools/WebKitTestRunner/TestOptions.h