WebKit Bugzilla
Attachment 372028 Details for
Bug 198819
: No content shows up for WKWebView while locked even with _canShowWhileLocked is YES
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-198819-20190613004041.patch (text/plain), 12.15 KB, created by
Tim Horton
on 2019-06-13 00:40:42 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Tim Horton
Created:
2019-06-13 00:40:42 PDT
Size:
12.15 KB
patch
obsolete
>Subversion Revision: 246373 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 660069ad68ac33ae97e920d6496f2a85822b041b..0a9f38db4fc18e822eb2748c717b2cb64677fc9d 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,37 @@ >+2019-06-13 Tim Horton <timothy_horton@apple.com> >+ >+ No content shows up for WKWebView while locked even with _canShowWhileLocked is YES >+ https://bugs.webkit.org/show_bug.cgi?id=198819 >+ <rdar://problem/51636240> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * UIProcess/Cocoa/WebPageProxyCocoa.mm: >+ (WebKit::WebPageProxy::didCreateContextForVisibilityPropagation): >+ * UIProcess/WebPageProxy.h: >+ (WebKit::WebPageProxy::contextIDForVisibilityPropagation const): >+ * UIProcess/WebPageProxy.messages.in: >+ * UIProcess/WebProcessProxy.h: >+ (WebKit::WebProcessProxy::contextIDForVisibilityPropagation): Deleted. >+ * UIProcess/WebProcessProxy.messages.in: >+ * UIProcess/ios/WKContentView.mm: >+ (-[WKContentView _setupVisibilityPropagationView]): >+ * UIProcess/ios/WebPageProxyIOS.mm: >+ (WebKit::WebPageProxy::didCreateContextForVisibilityPropagation): Deleted. >+ * UIProcess/ios/WebProcessProxyIOS.mm: >+ (WebKit::WebProcessProxy::didCreateContextForVisibilityPropagation): Deleted. >+ * WebProcess/WebPage/WebPage.cpp: >+ (WebKit::m_shrinkToFitContentTimer): >+ * WebProcess/WebPage/WebPage.h: >+ * WebProcess/WebProcess.h: >+ * WebProcess/cocoa/WebProcessCocoa.mm: >+ (WebKit::WebProcess::platformInitializeWebProcess): >+ Move the creation of the visibility propagation context to WebPage instead of WebProcess, >+ because canShowWhileLocked is per-page, not per-process. >+ >+ Also, pass canShowWhileLocked into the context creation function for the visibility >+ propagation context, not just RemoteLayerTree contexts. >+ > 2019-06-12 Brent Fulgham <bfulgham@apple.com> > > Unreviewed fix after rr246360. >diff --git a/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm b/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm >index 01d550739cc9c2426cb25e4119549d0e852d256b..a41cd3a004d33b1dad8b6f464f7c5b7b34a120bb 100644 >--- a/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm >+++ b/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm >@@ -291,4 +291,12 @@ void WebPageProxy::voicesDidChange() > } > #endif // ENABLE(SPEECH_SYNTHESIS) > >+#if HAVE(VISIBILITY_PROPAGATION_VIEW) >+void WebPageProxy::didCreateContextForVisibilityPropagation(LayerHostingContextID contextID) >+{ >+ m_contextIDForVisibilityPropagation = contextID; >+ pageClient().didCreateContextForVisibilityPropagation(contextID); >+} >+#endif >+ > } // namespace WebKit >diff --git a/Source/WebKit/UIProcess/WebPageProxy.h b/Source/WebKit/UIProcess/WebPageProxy.h >index d9791feebcadf5ec02067ae56e25d1f078c5e767..f54f67fe486ef1899b1328755cda0788f1cdb3da 100644 >--- a/Source/WebKit/UIProcess/WebPageProxy.h >+++ b/Source/WebKit/UIProcess/WebPageProxy.h >@@ -1078,6 +1078,7 @@ public: > > #if HAVE(VISIBILITY_PROPAGATION_VIEW) > void didCreateContextForVisibilityPropagation(LayerHostingContextID); >+ LayerHostingContextID contextIDForVisibilityPropagation() const { return m_contextIDForVisibilityPropagation; } > #endif > > virtual void enterAcceleratedCompositingMode(const LayerTreeContext&); >@@ -2518,6 +2519,10 @@ WEBPAGEPROXY_LOADOPTIMIZER_ADDITIONS_2 > std::unique_ptr<EditableImageController> m_editableImageController; > #endif > >+#if HAVE(VISIBILITY_PROPAGATION_VIEW) >+ LayerHostingContextID m_contextIDForVisibilityPropagation { 0 }; >+#endif >+ > HashMap<WebViewDidMoveToWindowObserver*, WeakPtr<WebViewDidMoveToWindowObserver>> m_webViewDidMoveToWindowObservers; > > mutable RefPtr<Logger> m_logger; >diff --git a/Source/WebKit/UIProcess/WebPageProxy.messages.in b/Source/WebKit/UIProcess/WebPageProxy.messages.in >index c008f2cbfc44e9e6f87bf4087f60d591a39b47ac..8bf98610978b7f0e67f2ef063de24cdf921584c3 100644 >--- a/Source/WebKit/UIProcess/WebPageProxy.messages.in >+++ b/Source/WebKit/UIProcess/WebPageProxy.messages.in >@@ -568,4 +568,8 @@ messages -> WebPageProxy { > #if PLATFORM(GTK) > ShowEmojiPicker(WebCore::IntRect caretRect) -> (String result) Async > #endif >+ >+#if HAVE(VISIBILITY_PROPAGATION_VIEW) >+ DidCreateContextForVisibilityPropagation(WebKit::LayerHostingContextID contextID); >+#endif > } >diff --git a/Source/WebKit/UIProcess/WebProcessProxy.h b/Source/WebKit/UIProcess/WebProcessProxy.h >index 063e861813e5c129eac186363eb8d60e9ae450bf..e790bc6b2b4bb5f129ad58023147ec9814e4470a 100644 >--- a/Source/WebKit/UIProcess/WebProcessProxy.h >+++ b/Source/WebKit/UIProcess/WebProcessProxy.h >@@ -301,10 +301,6 @@ public: > void unblockAccessibilityServerIfNeeded(); > #endif > >-#if HAVE(VISIBILITY_PROPAGATION_VIEW) >- LayerHostingContextID contextIDForVisibilityPropagation() { return m_contextIDForVisibilityPropagation; } >-#endif >- > #if PLATFORM(IOS_FAMILY) > void processWasUnexpectedlyUnsuspended(CompletionHandler<void()>&&); > #endif >@@ -351,10 +347,6 @@ private: > void didDeliverMessagePortMessages(uint64_t messageBatchIdentifier); > void didCheckProcessLocalPortForActivity(uint64_t callbackIdentifier, bool isLocallyReachable); > >-#if HAVE(VISIBILITY_PROPAGATION_VIEW) >- void didCreateContextForVisibilityPropagation(LayerHostingContextID); >-#endif >- > bool hasProvisionalPageWithID(WebCore::PageIdentifier) const; > bool isAllowedToUpdateBackForwardItem(WebBackForwardListItem&) const; > >@@ -461,10 +453,6 @@ private: > std::unique_ptr<WebCore::DeferrableOneShotTimer> m_unexpectedActivityTimer; > #endif > >-#if HAVE(VISIBILITY_PROPAGATION_VIEW) >- LayerHostingContextID m_contextIDForVisibilityPropagation { 0 }; >-#endif >- > HashMap<String, uint64_t> m_pageURLRetainCountMap; > > Optional<WebCore::RegistrableDomain> m_registrableDomain; >diff --git a/Source/WebKit/UIProcess/WebProcessProxy.messages.in b/Source/WebKit/UIProcess/WebProcessProxy.messages.in >index 1e0a67ccc33ca56c09e1d51b09d5aa92cb9a7cc3..f3d5e931e6dee902a4ac5e5fc5b10dd4615b15d0 100644 >--- a/Source/WebKit/UIProcess/WebProcessProxy.messages.in >+++ b/Source/WebKit/UIProcess/WebProcessProxy.messages.in >@@ -80,10 +80,6 @@ messages -> WebProcessProxy LegacyReceiver { > StopDisplayLink(unsigned observerID, uint32_t displayID) > #endif > >-#if HAVE(VISIBILITY_PROPAGATION_VIEW) >- DidCreateContextForVisibilityPropagation(WebKit::LayerHostingContextID contextID); >-#endif >- > #if PLATFORM(IOS_FAMILY) > ProcessWasUnexpectedlyUnsuspended() -> () Async > #endif >diff --git a/Source/WebKit/UIProcess/ios/WKContentView.mm b/Source/WebKit/UIProcess/ios/WKContentView.mm >index 29d3060a8770d23097462ec7bfc30432aed2a84d..fe54df8766c6426605558c8d0b8fc435e75dd513 100644 >--- a/Source/WebKit/UIProcess/ios/WKContentView.mm >+++ b/Source/WebKit/UIProcess/ios/WKContentView.mm >@@ -194,7 +194,7 @@ - (instancetype)_commonInitializationWithProcessPool:(WebKit::WebProcessPool&)pr > - (void)_setupVisibilityPropagationView > { > auto processIdentifier = _page->process().processIdentifier(); >- auto contextID = _page->process().contextIDForVisibilityPropagation(); >+ auto contextID = _page->contextIDForVisibilityPropagation(); > if (!processIdentifier || !contextID) > return; > >diff --git a/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm b/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm >index 49d0605d7b292802f4064f44fb0ffb0b212f44c2..2137afbb70a8dea32b530b5f139d4ad7c4486819 100644 >--- a/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm >+++ b/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm >@@ -84,13 +84,6 @@ String WebPageProxy::standardUserAgent(const String& applicationNameForUserAgent > return standardUserAgentWithApplicationName(applicationNameForUserAgent); > } > >-#if HAVE(VISIBILITY_PROPAGATION_VIEW) >-void WebPageProxy::didCreateContextForVisibilityPropagation(LayerHostingContextID contextID) >-{ >- pageClient().didCreateContextForVisibilityPropagation(contextID); >-} >-#endif >- > void WebPageProxy::getIsSpeaking(CompletionHandler<void(bool)>&& completionHandler) > { > notImplemented(); >diff --git a/Source/WebKit/UIProcess/ios/WebProcessProxyIOS.mm b/Source/WebKit/UIProcess/ios/WebProcessProxyIOS.mm >index 70ba162abfa949bd10d366b77e8766e941ea5416..4388087d1d32496581d3980a777d3c38ef1d4942 100644 >--- a/Source/WebKit/UIProcess/ios/WebProcessProxyIOS.mm >+++ b/Source/WebKit/UIProcess/ios/WebProcessProxyIOS.mm >@@ -62,15 +62,6 @@ void WebProcessProxy::unblockAccessibilityServerIfNeeded() > m_hasSentMessageToUnblockAccessibilityServer = true; > } > >-#if HAVE(VISIBILITY_PROPAGATION_VIEW) >-void WebProcessProxy::didCreateContextForVisibilityPropagation(LayerHostingContextID contextID) >-{ >- m_contextIDForVisibilityPropagation = contextID; >- for (auto& page : copyToVectorOf<RefPtr<WebPageProxy>>(m_pageMap.values())) >- page->didCreateContextForVisibilityPropagation(contextID); >-} >-#endif >- > } // namespace WebKit > > #endif // PLATFORM(IOS_FAMILY) >diff --git a/Source/WebKit/WebProcess/WebPage/WebPage.cpp b/Source/WebKit/WebProcess/WebPage/WebPage.cpp >index c0c2f2a791a35501497e4ea0ea8324071fc1d280..1c10ec15a0e75f8fd6ccb21b465801d1739388fb 100644 >--- a/Source/WebKit/WebProcess/WebPage/WebPage.cpp >+++ b/Source/WebKit/WebProcess/WebPage/WebPage.cpp >@@ -683,6 +683,14 @@ WebPage::WebPage(PageIdentifier pageID, WebPageCreationParameters&& parameters) > PlatformMediaSessionManager::setShouldDeactivateAudioSession(true); > #endif > >+#if HAVE(VISIBILITY_PROPAGATION_VIEW) >+ m_contextForVisibilityPropagation = LayerHostingContext::createForExternalHostingProcess({ >+ m_canShowWhileLocked >+ }); >+ RELEASE_LOG(Process, "Created context with ID %d for visibility propagation from UIProcess", m_contextForVisibilityPropagation->contextID()); >+ send(Messages::WebPageProxy::DidCreateContextForVisibilityPropagation(m_contextForVisibilityPropagation->contextID())); >+#endif >+ > updateThrottleState(); > } > >diff --git a/Source/WebKit/WebProcess/WebPage/WebPage.h b/Source/WebKit/WebProcess/WebPage/WebPage.h >index 87a3e64d42de4f2abfd1a4796220eb45a12d5f6b..aa73058f95883bbee08372c29f0ebe47ba2f497c 100644 >--- a/Source/WebKit/WebProcess/WebPage/WebPage.h >+++ b/Source/WebKit/WebProcess/WebPage/WebPage.h >@@ -1940,6 +1940,9 @@ private: > #if ENABLE(VIEWPORT_RESIZING) > WebCore::DeferrableOneShotTimer m_shrinkToFitContentTimer; > #endif >+#if HAVE(VISIBILITY_PROPAGATION_VIEW) >+ std::unique_ptr<LayerHostingContext> m_contextForVisibilityPropagation; >+#endif > }; > > } // namespace WebKit >diff --git a/Source/WebKit/WebProcess/WebProcess.h b/Source/WebKit/WebProcess/WebProcess.h >index 8b63f2947b573710df4b2a9fac934468bd24f2c2..c08a97caff22ecfb23268c4a8bb62d1aff2a904a 100644 >--- a/Source/WebKit/WebProcess/WebProcess.h >+++ b/Source/WebKit/WebProcess/WebProcess.h >@@ -528,9 +528,6 @@ private: > WebSQLiteDatabaseTracker m_webSQLiteDatabaseTracker; > ProcessTaskStateObserver m_taskStateObserver { *this }; > #endif >-#if HAVE(VISIBILITY_PROPAGATION_VIEW) >- std::unique_ptr<LayerHostingContext> m_contextForVisibilityPropagation; >-#endif > > enum PageMarkingLayersAsVolatileCounterType { }; > using PageMarkingLayersAsVolatileCounter = RefCounter<PageMarkingLayersAsVolatileCounterType>; >diff --git a/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm b/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm >index b9ce79d274c4127ba78f54a52f637e95e851f6ac..551e37a7d8eeefd4ebeab512ae295eb61ab07f12 100644 >--- a/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm >+++ b/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm >@@ -174,12 +174,6 @@ void WebProcess::platformInitializeWebProcess(WebProcessCreationParameters& para > > m_compositingRenderServerPort = WTFMove(parameters.acceleratedCompositingPort); > >-#if HAVE(VISIBILITY_PROPAGATION_VIEW) >- m_contextForVisibilityPropagation = LayerHostingContext::createForExternalHostingProcess(); >- RELEASE_LOG(Process, "Created context with ID %d for visibility propagation from UIProcess", m_contextForVisibilityPropagation->contextID()); >- parentProcessConnection()->send(Messages::WebProcessProxy::DidCreateContextForVisibilityPropagation(m_contextForVisibilityPropagation->contextID()), 0); >-#endif >- > WebCore::registerMemoryReleaseNotifyCallbacks(); > MemoryPressureHandler::ReliefLogger::setLoggingEnabled(parameters.shouldEnableMemoryPressureReliefLogging); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 198819
: 372028