Changeset 245183 in webkit
- Timestamp:
- May 10, 2019 11:52:05 AM (5 years ago)
- Location:
- trunk/Source
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/PAL/ChangeLog
r245161 r245183 1 2019-05-10 Chris Dumez <cdumez@apple.com> 2 3 Add WKWebViewConfiguration._canShowWhileLocked SPI 4 https://bugs.webkit.org/show_bug.cgi?id=197777 5 <rdar://problem/50065100> 6 7 Reviewed by Tim Horton. 8 9 * pal/spi/cocoa/QuartzCoreSPI.h: 10 1 11 2019-05-09 Daniel Bates <dabates@apple.com> 2 12 -
trunk/Source/WebCore/PAL/pal/spi/cocoa/QuartzCoreSPI.h
r237266 r245183 239 239 240 240 #if PLATFORM(IOS_FAMILY) 241 extern NSString * const kCAContextSecure; 241 242 extern NSString * const kCAContentsFormatRGBA10XR; 242 243 #endif -
trunk/Source/WebKit/ChangeLog
r245179 r245183 1 2019-05-10 Chris Dumez <cdumez@apple.com> 2 3 Add WKWebViewConfiguration._canShowWhileLocked SPI 4 https://bugs.webkit.org/show_bug.cgi?id=197777 5 <rdar://problem/50065100> 6 7 Reviewed by Tim Horton. 8 9 * Platform/mac/LayerHostingContext.h: 10 * Platform/mac/LayerHostingContext.mm: 11 (WebKit::LayerHostingContext::createForExternalHostingProcess): 12 * Shared/WebPageCreationParameters.cpp: 13 (WebKit::WebPageCreationParameters::encode const): 14 (WebKit::WebPageCreationParameters::decode): 15 * Shared/WebPageCreationParameters.h: 16 * UIProcess/API/APIPageConfiguration.cpp: 17 (API::PageConfiguration::copy const): 18 * UIProcess/API/APIPageConfiguration.h: 19 (API::PageConfiguration::canShowWhileLocked const): 20 (API::PageConfiguration::setCanShowWhileLocked): 21 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm: 22 (-[WKWebViewConfiguration _setCanShowWhileLocked:]): 23 (-[WKWebViewConfiguration _canShowWhileLocked]): 24 * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h: 25 * UIProcess/WebPageProxy.cpp: 26 (WebKit::WebPageProxy::creationParameters): 27 * WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemoteCustom.mm: 28 (WebKit::PlatformCALayerRemoteCustom::PlatformCALayerRemoteCustom): 29 * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeContext.h: 30 * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeContext.mm: 31 (WebKit::RemoteLayerTreeContext::canShowWhileLocked const): 32 * WebProcess/WebPage/WebPage.cpp: 33 (WebKit::m_canShowWhileLocked): 34 (WebKit::m_shrinkToFitContentTimer): Deleted. 35 * WebProcess/WebPage/WebPage.h: 36 (WebKit::WebPage::canShowWhileLocked const): 37 1 38 2019-05-10 Michael Catanzaro <mcatanzaro@igalia.com> 2 39 -
trunk/Source/WebKit/Platform/mac/LayerHostingContext.h
r244085 r245183 41 41 42 42 using LayerHostingContextID = uint32_t; 43 44 struct LayerHostingContextOptions { 45 #if PLATFORM(IOS_FAMILY) 46 bool canShowWhileLocked { false }; 47 #endif 48 }; 43 49 44 50 class LayerHostingContext { … … 46 52 public: 47 53 static std::unique_ptr<LayerHostingContext> createForPort(const WTF::MachSendRight& serverPort); 54 48 55 #if HAVE(OUT_OF_PROCESS_LAYER_HOSTING) 49 static std::unique_ptr<LayerHostingContext> createForExternalHostingProcess(); 56 static std::unique_ptr<LayerHostingContext> createForExternalHostingProcess(const LayerHostingContextOptions& = { }); 57 50 58 #if PLATFORM(MAC) 51 59 static std::unique_ptr<LayerHostingContext> createForExternalPluginHostingProcess(); 52 60 #endif 53 #endif 61 62 #endif // HAVE(OUT_OF_PROCESS_LAYER_HOSTING) 54 63 55 64 LayerHostingContext(); -
trunk/Source/WebKit/Platform/mac/LayerHostingContext.mm
r244085 r245183 51 51 52 52 #if HAVE(OUT_OF_PROCESS_LAYER_HOSTING) 53 std::unique_ptr<LayerHostingContext> LayerHostingContext::createForExternalHostingProcess( )53 std::unique_ptr<LayerHostingContext> LayerHostingContext::createForExternalHostingProcess(const LayerHostingContextOptions& options) 54 54 { 55 55 auto layerHostingContext = std::make_unique<LayerHostingContext>(); … … 60 60 // without being explicitly parented. See <rdar://problem/16089267> for details. 61 61 layerHostingContext->m_context = [CAContext remoteContextWithOptions:@{ 62 kCAContextSecure: @(options.canShowWhileLocked), 62 63 #if HAVE(CORE_ANIMATION_RENDER_SERVER) 63 64 kCAContextIgnoresHitTest : @YES, … … 67 68 #elif !PLATFORM(IOSMAC) && ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING) 68 69 [CAContext setAllowsCGSConnections:NO]; 69 layerHostingContext->m_context = [CAContext remoteContextWithOptions:@{kCAContextCIFilterBehavior : @"ignore"}]; 70 layerHostingContext->m_context = [CAContext remoteContextWithOptions:@{ 71 kCAContextCIFilterBehavior : @"ignore", 72 }]; 70 73 #else 71 layerHostingContext->m_context = [CAContext contextWithCGSConnection:CGSMainConnectionID() options:@{ kCAContextCIFilterBehavior : @"ignore" }]; 74 layerHostingContext->m_context = [CAContext contextWithCGSConnection:CGSMainConnectionID() options:@{ 75 kCAContextCIFilterBehavior : @"ignore", 76 }]; 72 77 #endif 73 78 -
trunk/Source/WebKit/Shared/WebPageCreationParameters.cpp
r245072 r245183 97 97 encoder << deviceOrientation; 98 98 encoder << keyboardIsAttached; 99 encoder << canShowWhileLocked; 99 100 encoder << overrideViewportArguments; 100 101 #endif … … 284 285 if (!decoder.decode(parameters.keyboardIsAttached)) 285 286 return WTF::nullopt; 287 if (!decoder.decode(parameters.canShowWhileLocked)) 288 return WTF::nullopt; 286 289 287 290 Optional<Optional<WebCore::ViewportArguments>> overrideViewportArguments; -
trunk/Source/WebKit/Shared/WebPageCreationParameters.h
r245072 r245183 156 156 int32_t deviceOrientation { 0 }; 157 157 bool keyboardIsAttached { false }; 158 bool canShowWhileLocked { false }; 158 159 Optional<WebCore::ViewportArguments> overrideViewportArguments; 159 160 #endif -
trunk/Source/WebKit/UIProcess/API/APIPageConfiguration.cpp
r243787 r245183 73 73 #if PLATFORM(IOS_FAMILY) 74 74 copy->m_alwaysRunsAtForegroundPriority = this->m_alwaysRunsAtForegroundPriority; 75 copy->m_canShowWhileLocked = this->m_canShowWhileLocked; 75 76 #endif 76 77 copy->m_initialCapitalizationEnabled = this->m_initialCapitalizationEnabled; -
trunk/Source/WebKit/UIProcess/API/APIPageConfiguration.h
r243787 r245183 95 95 #if PLATFORM(IOS_FAMILY) 96 96 bool alwaysRunsAtForegroundPriority() { return m_alwaysRunsAtForegroundPriority; } 97 void setAlwaysRunsAtForegroundPriority(bool alwaysRunsAtForegroundPriority) { m_alwaysRunsAtForegroundPriority = alwaysRunsAtForegroundPriority; } 97 void setAlwaysRunsAtForegroundPriority(bool alwaysRunsAtForegroundPriority) { m_alwaysRunsAtForegroundPriority = alwaysRunsAtForegroundPriority; } 98 99 bool canShowWhileLocked() const { return m_canShowWhileLocked; } 100 void setCanShowWhileLocked(bool canShowWhileLocked) { m_canShowWhileLocked = canShowWhileLocked; } 98 101 #endif 99 102 bool initialCapitalizationEnabled() { return m_initialCapitalizationEnabled; } … … 148 151 #if PLATFORM(IOS_FAMILY) 149 152 bool m_alwaysRunsAtForegroundPriority { false }; 153 bool m_canShowWhileLocked { false }; 150 154 #endif 151 155 bool m_initialCapitalizationEnabled { true }; -
trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfiguration.mm
r244955 r245183 772 772 } 773 773 774 - (void)_setCanShowWhileLocked:(BOOL)value 775 { 776 _pageConfiguration->setCanShowWhileLocked(value); 777 } 778 779 - (BOOL)_canShowWhileLocked 780 { 781 return _pageConfiguration->canShowWhileLocked(); 782 } 783 774 784 #endif // PLATFORM(IOS_FAMILY) 775 785 -
trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h
r243682 r245183 84 84 @property (nonatomic, setter=_setSystemPreviewEnabled:) BOOL _systemPreviewEnabled WK_API_AVAILABLE(ios(12.0)); 85 85 @property (nonatomic, setter=_setShouldDecidePolicyBeforeLoadingQuickLookPreview:) BOOL _shouldDecidePolicyBeforeLoadingQuickLookPreview WK_API_AVAILABLE(ios(WK_IOS_TBA)); 86 @property (nonatomic, setter=_setCanShowWhileLocked:) BOOL _canShowWhileLocked WK_API_AVAILABLE(ios(WK_IOS_TBA)); 86 87 #else 87 88 @property (nonatomic, setter=_setShowsURLsInToolTips:) BOOL _showsURLsInToolTips WK_API_AVAILABLE(macos(10.12)); -
trunk/Source/WebKit/UIProcess/WebPageProxy.cpp
r245079 r245183 7127 7127 parameters.keyboardIsAttached = isInHardwareKeyboardMode(); 7128 7128 parameters.overrideViewportArguments = m_overrideViewportArguments; 7129 parameters.canShowWhileLocked = m_configuration->canShowWhileLocked(); 7129 7130 #endif 7130 7131 -
trunk/Source/WebKit/WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemoteCustom.mm
r244704 r245183 60 60 #if HAVE(OUT_OF_PROCESS_LAYER_HOSTING) 61 61 case LayerHostingMode::OutOfProcess: 62 m_layerHostingContext = LayerHostingContext::createForExternalHostingProcess(); 62 m_layerHostingContext = LayerHostingContext::createForExternalHostingProcess({ 63 #if PLATFORM(IOS_FAMILY) 64 context.canShowWhileLocked() 65 #endif 66 }); 63 67 #if PLATFORM(IOS_FAMILY) 64 68 if (layerType == LayerTypeAVPlayerLayer) { -
trunk/Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeContext.h
r241899 r245183 78 78 79 79 void adoptLayersFromContext(RemoteLayerTreeContext&); 80 81 #if PLATFORM(IOS_FAMILY) 82 bool canShowWhileLocked() const; 83 #endif 80 84 81 85 private: -
trunk/Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeContext.mm
r241899 r245183 78 78 return m_webPage.layerHostingMode(); 79 79 } 80 81 #if PLATFORM(IOS_FAMILY) 82 bool RemoteLayerTreeContext::canShowWhileLocked() const 83 { 84 return m_webPage.canShowWhileLocked(); 85 } 86 #endif 80 87 81 88 void RemoteLayerTreeContext::layerDidEnterContext(PlatformCALayerRemote& layer, PlatformCALayer::LayerType type) -
trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp
r245144 r245183 415 415 , m_deviceOrientation(parameters.deviceOrientation) 416 416 , m_keyboardIsAttached(parameters.keyboardIsAttached) 417 , m_canShowWhileLocked(parameters.canShowWhileLocked) 417 418 #endif 418 419 , m_layerVolatilityTimer(*this, &WebPage::layerVolatilityTimerFired) -
trunk/Source/WebKit/WebProcess/WebPage/WebPage.h
r245079 r245183 959 959 960 960 void updateStringForFind(const String&); 961 962 bool canShowWhileLocked() const { return m_canShowWhileLocked; } 961 963 #endif 962 964 … … 1830 1832 int32_t m_deviceOrientation { 0 }; 1831 1833 bool m_keyboardIsAttached { false }; 1834 bool m_canShowWhileLocked { false }; 1832 1835 bool m_inDynamicSizeUpdate { false }; 1833 1836 HashMap<std::pair<WebCore::IntSize, double>, WebCore::IntPoint> m_dynamicSizeUpdateHistory;
Note: See TracChangeset
for help on using the changeset viewer.