Always handle "avif" in FileExtensionToImageType()
Always handle "avif" in FileExtensionToImageType(), whether the "AVIF" feature is enabled or not. The file-scope internal function FileExtensionToImageType() is only called on the return value of the virtual method ImageDecoder::FilenameExtension(). Therefore, the only way the image_extension argument is equal to "avif" is that AVIFImageDecoder::FilenameExtension() is called. So it does not need to check if the AVIF feature is enabled, because we still want to run AVIFImageDecoder unit tests when the AVIF feature is disabled. Test: blink_platform_unittests --enable-features=AVIF --gtest_filter=*AVIF* blink_platform_unittests --disable-features=AVIF --gtest_filter=*AVIF* Bug: 1116502 Change-Id: I17e0290fef25a508c4e87cbdc07a27ef0dac73b7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2357957Reviewed-by:Peter Kasting <pkasting@chromium.org> Commit-Queue: Wan-Teh Chang <wtc@google.com> Cr-Commit-Position: refs/heads/master@{#798384}
Showing
Please register or sign in to comment