Async image decoding should be disabled for snapshots, printing and preview
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 3 May 2017 19:43:42 +0000 (19:43 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 3 May 2017 19:43:42 +0000 (19:43 +0000)
commitf1fdbdd1b7c19c2ee230ccc9588e1ebb49ab8276
tree3058717b8c53b0f752e0ffe538e3b1aaf1d00d68
parent20a1405121993e7546386b8262f8171c0c960232
Async image decoding should be disabled for snapshots, printing and preview
https://bugs.webkit.org/show_bug.cgi?id=171467
Source/WebCore:

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

Asynchronous image decoding should only be used for window display where
RenderElements can be repainted and painted. For cases where there is only
one chance to draw the image, synchronous decoding should be used.

* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::paintIntoRect):

Tools:

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

Add a API test for snapshotting with large images. Ensure the images are
drawn correctly which implies they should have been synchronously decoded.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2/large-red-square-image.html: Added.
* TestWebKitAPI/Tests/WebKit2Cocoa/WKWebViewSnapshot.mm:
(TEST):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@216135 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderBoxModelObject.cpp
Source/WebCore/rendering/RenderImage.cpp
Tools/ChangeLog
Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
Tools/TestWebKitAPI/Tests/WebKit2/large-red-square-image.html [new file with mode: 0644]
Tools/TestWebKitAPI/Tests/WebKit2Cocoa/WKWebViewSnapshot.mm