Bug 131325 - [iOS WebKit2] WKPDFView fades in tiles, PDFs load very flashily
Summary: [iOS WebKit2] WKPDFView fades in tiles, PDFs load very flashily
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tim Horton
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-04-07 16:11 PDT by Tim Horton
Modified: 2014-04-07 17:08 PDT (History)
3 users (show)

See Also:


Attachments
patch (8.83 KB, patch)
2014-04-07 16:32 PDT, Tim Horton
andersca: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Horton 2014-04-07 16:11:12 PDT
We should add and remove views as we scroll, and use a backing layer to avoid flashiness.

<rdar://problem/16382960>
Comment 1 Tim Horton 2014-04-07 16:32:09 PDT
Created attachment 228769 [details]
patch
Comment 2 Anders Carlsson 2014-04-07 16:39:01 PDT
Comment on attachment 228769 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=228769&action=review

> Source/WebKit2/UIProcess/Cocoa/WKWebViewContentProvider.h:38
>  // FIXME: This should be API.

I think you should extend this FIXME to say that we should come up with a solution for the UIScrollViewDelegate “problem”.

> Source/WebKit2/UIProcess/ios/WKPDFView.mm:134
> +        if (CGRectIntersectsRect(pageInfo.frame, targetRect)) {

Please change this to

if (!CGRectIntersectsRect(pageInfo.frame, targetRect)) {
    [pageInfo.view removeFromSuperview];
    pageInfo.view = nullptr;
    continue;
}
Comment 3 Anders Carlsson 2014-04-07 16:39:33 PDT
Comment on attachment 228769 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=228769&action=review

> Source/WebKit2/UIProcess/ios/WKPDFView.mm:171
> +        pageInfo.view = nullptr;

No need to initialize view here since it's a RetainPtr.
Comment 4 Tim Horton 2014-04-07 17:08:24 PDT
http://trac.webkit.org/changeset/166896