WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
190529
[Cocoa] Snapshot of WKWebView after Presentation Updates
https://bugs.webkit.org/show_bug.cgi?id=190529
Summary
[Cocoa] Snapshot of WKWebView after Presentation Updates
Jeffrey Deng
Reported
2018-10-12 11:18:46 PDT
The current implementation of WKWebView's take snapshot, - (void)takeSnapshotWithConfiguration:(nullable WKSnapshotConfiguration *)snapshotConfiguration completionHandler:(void (^)(UIImage * _Nullable snapshotImage, NSError * _Nullable error))completionHandler WK_API_AVAILABLE(ios(11.0));, does not allow us to wait for any presentation updates that may be pending before it takes the snapshot of the WKWebView. This causes certain snapshots to render blank or incorrect if taken at an inappropriate time. For example, when you take a snapshot after receiving `didFinishNavigation` the snapshot will result in a white image. A potential solution is to queue the take snapshot function via WKWebView's do after next presentation update function, - (void)_doAfterNextPresentationUpdate:(void (^)(void))updateBlock WK_API_AVAILABLE(macosx(10.13.4));
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2018-10-12 14:58:33 PDT
<
rdar://problem/45238525
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug