[Webkit-unassigned] [Bug 145493] New: PDFs always think they're visible on iOS.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat May 30 14:16:29 PDT 2015


https://bugs.webkit.org/show_bug.cgi?id=145493

            Bug ID: 145493
           Summary: PDFs always think they're visible on iOS.
    Classification: Unclassified
           Product: WebKit
           Version: 528+ (Nightly build)
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebKit2
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: barraclough at apple.com

The problem here is that WKContentView is currently responsible for notifying the WebPageProxy that the visibility may have changed, but when a PDF isn't showing the WKContentView isn't in the view hierarchy and doesn't receive the didMoveToWindow notifications – and the WKPDFView (which is in the view hierarchy) does not listen for these events.

Visibility of the page should really just track the visibility of the WKWebView (and when actually assessing the visibility it largely does - the page client checks the web view's visibility, bar a FIXME, and the foreground/background check, which needs to change). So notifications should really just come from the WKWebView.

The WKWebView already listens for the didMoveToWindow notification, it just was only updating the IsInWindow flag. Instead just update all flags, and the call to viewStateDidChange from WKContentView can just be removed.

There is one problem with this in that it would reverse the order of the calls to viewStateDidChange & _updateForScreen:, which would mean the the view would become visible before updating the screen pixel density. To fix this, moving the call to _updateForScreen: to willMoveToWindow:, to ensure it occurs before the page becomes visible.

This will also change behavior on Mac for WKWebView clients, in coalescing all view state changes within the didMoveToWindow call. This is the direction we intended to go in anyway (the plan is to remove the mayHaveChanged argument from viewStateDidChange - we're currently adding unnecessary IPC traffic).

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150530/8ca49f13/attachment.html>


More information about the webkit-unassigned mailing list