2015-12-17 Alex Christensen Build fix after r194250 * WebKit2.xcodeproj/project.pbxproj: Change target membership from all to WebKit. 2015-12-17 Alex Christensen Add types for DownloadID and TaskIdentifier https://bugs.webkit.org/show_bug.cgi?id=152401 Reviewed by Brady Eidson. DownloadID and TaskIdentifier used to both be just uint64_t's. It is confusing to distinguish between them, so now they both have names. We need a HashMap instead of a HashMap. * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::storageSession): (WebKit::NetworkConnectionToWebProcess::startDownload): (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload): * NetworkProcess/NetworkConnectionToWebProcess.h: * NetworkProcess/NetworkConnectionToWebProcess.messages.in: * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::deleteWebsiteDataForOrigins): (WebKit::NetworkProcess::downloadRequest): (WebKit::NetworkProcess::resumeDownload): (WebKit::NetworkProcess::cancelDownload): (WebKit::NetworkProcess::getNetworkProcessStatistics): (WebKit::NetworkProcess::logDiagnosticMessage): (WebKit::NetworkProcess::logDiagnosticMessageWithResult): (WebKit::NetworkProcess::logDiagnosticMessageWithValue): * NetworkProcess/NetworkProcess.h: * NetworkProcess/NetworkProcess.messages.in: * NetworkProcess/NetworkSession.h: * NetworkProcess/cocoa/NetworkSessionCocoa.mm: (WebKit::NetworkSession::createDataTaskWithRequest): (WebKit::NetworkSession::dataTaskForIdentifier): (WebKit::NetworkDataTask::resume): (WebKit::NetworkDataTask::taskIdentifier): Deleted. * Shared/Downloads/Download.cpp: (WebKit::Download::Download): (WebKit::Download::messageSenderDestinationID): * Shared/Downloads/Download.h: (WebKit::Download::downloadID): * Shared/Downloads/DownloadID.h: Added. (WebKit::DownloadID::DownloadID): (WebKit::DownloadID::operator==): (WebKit::DownloadID::downloadID): (IPC::ArgumentCoder::encode): (IPC::ArgumentCoder::decode): (WTF::DownloadIDHash::hash): (WTF::DownloadIDHash::equal): (WTF::HashTraits::emptyValue): (WTF::HashTraits::constructDeletedValue): (WTF::HashTraits::isDeletedValue): * Shared/Downloads/DownloadManager.cpp: (WebKit::DownloadManager::DownloadManager): (WebKit::DownloadManager::startDownload): (WebKit::DownloadManager::convertHandleToDownload): (WebKit::DownloadManager::resumeDownload): (WebKit::DownloadManager::cancelDownload): * Shared/Downloads/DownloadManager.h: (WebKit::DownloadManager::isDownloading): * UIProcess/API/C/WKDownload.cpp: (WKDownloadGetID): (WKDownloadCopyRequest): * UIProcess/Downloads/DownloadProxy.h: (WebKit::DownloadProxy::downloadID): (WebKit::DownloadProxy::request): (WebKit::DownloadProxy::resumeData): * UIProcess/Downloads/DownloadProxyMap.cpp: (WebKit::DownloadProxyMap::createDownloadProxy): (WebKit::DownloadProxyMap::downloadFinished): (WebKit::DownloadProxyMap::processDidClose): * UIProcess/Downloads/DownloadProxyMap.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::receivedPolicyDecision): (WebKit::WebPageProxy::frameDidBecomeFrameSet): (WebKit::WebPageProxy::decidePolicyForNavigationAction): (WebKit::WebPageProxy::decidePolicyForResponse): (WebKit::WebPageProxy::decidePolicyForResponseSync): * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * WebKit2.xcodeproj/project.pbxproj: * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse): (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): * WebProcess/WebPage/WebFrame.cpp: (WebKit::WebFrame::invalidatePolicyListener): (WebKit::WebFrame::didReceivePolicyDecision): (WebKit::WebFrame::startDownload): (WebKit::WebFrame::convertMainResourceLoadToDownload): * WebProcess/WebPage/WebFrame.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::setSessionID): (WebKit::WebPage::didReceivePolicyDecision): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: 2015-12-17 Simon Fraser Disable viewport "shrink to fit" outside of multitasking mode https://bugs.webkit.org/show_bug.cgi?id=152403 rdar://problem/23818102 Reviewed by Tim Horton. Plumb through a value that indicates whether the WKWebView is in split screen, and use it to conditionally enable shrink-to-fit mode only in split screen. * Shared/VisibleContentRectUpdateInfo.cpp: Added m_allowShrinkToFit, and sort the member variables, and encoding order, to optimize packing, with some initializers. (WebKit::VisibleContentRectUpdateInfo::encode): (WebKit::VisibleContentRectUpdateInfo::decode): * Shared/VisibleContentRectUpdateInfo.h: (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo): (WebKit::VisibleContentRectUpdateInfo::allowShrinkToFit): (WebKit::operator==): * UIProcess/API/Cocoa/WKWebView.mm: Add _allowsViewportShrinkToFit member variable, with getter and setter. (-[WKWebView _updateVisibleContentRects]): Unwrap the line. (-[WKWebView _setAllowsViewportShrinkToFit:]): (-[WKWebView _allowsViewportShrinkToFit]): * UIProcess/API/Cocoa/WKWebViewPrivate.h: _allowsViewportShrinkToFit SPI. * UIProcess/WebPageProxy.h: Pass allowShrinkToFit through. * UIProcess/ios/WKContentView.mm: Ditto. (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:]): * UIProcess/ios/WebPageProxyIOS.mm: (WebKit::WebPageProxy::updateVisibleContentRects): Padd allowShrinkToFit to the web process via the VisibleContentRectUpdateInfo. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): Store m_ignoreViewportScalingConstraints in a member variable since we can't get back to the prefs later. * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::updateVisibleContentRects): This is the behavior change: call setCanIgnoreScalingConstraints() on the viewport configuration, consulting the pref (via m_ignoreViewportScalingConstraints) and the new visibleContentRectUpdateInfo.allowShrinkToFit(). 2015-12-16 Simon Fraser ViewportConfiguration functions should return a bool to say if anything changed https://bugs.webkit.org/show_bug.cgi?id=152353 Reviewed by Tim Horton. Rather than callers all checking whether setting ViewportConfiguration values changes state, have its functions return a bool if the values change. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::mainFrameDidLayout): (WebKit::WebPage::didCommitLoad): * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::viewportPropertiesDidChange): (WebKit::WebPage::setViewportConfigurationMinimumLayoutSize): 2015-12-16 Alex Christensen Progress towards implementing downloads with NetworkSession https://bugs.webkit.org/show_bug.cgi?id=152371 Reviewed by Darin Adler. * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::downloadRequest): (WebKit::NetworkProcess::resumeDownload): (WebKit::NetworkProcess::cancelDownload): * NetworkProcess/NetworkProcess.h: * NetworkProcess/NetworkProcess.messages.in: * Shared/Authentication/AuthenticationManager.cpp: (WebKit::AuthenticationManager::didReceiveAuthenticationChallenge): * Shared/Authentication/AuthenticationManager.h: * Shared/Downloads/Download.cpp: (WebKit::Download::Download): (WebKit::Download::didReceiveAuthenticationChallenge): * Shared/Downloads/Download.h: * Shared/Downloads/DownloadManager.cpp: (WebKit::DownloadManager::startDownload): (WebKit::DownloadManager::convertHandleToDownload): (WebKit::DownloadManager::resumeDownload): (WebKit::DownloadManager::cancelDownload): (WebKit::DownloadManager::downloadFinished): (WebKit::DownloadManager::didCreateDownload): * Shared/Downloads/DownloadManager.h: * Shared/Downloads/cocoa: Added. * Shared/Downloads/cocoa/DownloadCocoa.mm: Added. (WebKit::Download::start): (WebKit::Download::resume): (WebKit::Download::cancel): (WebKit::Download::platformInvalidate): * Shared/Downloads/ios/DownloadIOS.mm: * Shared/Downloads/mac/DownloadMac.mm: (WebKit::Download::start): (WebKit::Download::startWithHandle): (WebKit::Download::resume): * UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::resumeDownload): * UIProcess/WebProcessPool.h: * WebKit2.xcodeproj/project.pbxproj: 2015-12-16 Simon Fraser ViewportConfiguration functions should return a bool to say if anything changed https://bugs.webkit.org/show_bug.cgi?id=152353 Reviewed by Tim Horton. Rather than callers all checking whether setting ViewportConfiguration values changes state, have its functions return a bool if the values change. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::mainFrameDidLayout): (WebKit::WebPage::didCommitLoad): * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::viewportPropertiesDidChange): (WebKit::WebPage::setViewportConfigurationMinimumLayoutSize): 2015-12-16 Tim Horton REGRESSION (r191299): Zoom gestures are enabled even if allowsMagnification=NO https://bugs.webkit.org/show_bug.cgi?id=152373 Reviewed by Simon Fraser. * UIProcess/Cocoa/WebViewImpl.mm: (WebKit::WebViewImpl::gestureEventWasNotHandledByWebCoreFromViewOnly): Don't pass the event on to ViewGestureController if we shouldn't handle it, just like we would have done in magnifyWithEvent before. 2015-12-16 Tim Horton REGRESSION (r194125): Crashes in touchesEndedWithEvent on occasion when interacting with the page https://bugs.webkit.org/show_bug.cgi?id=152366 Reviewed by Beth Dakin. * UIProcess/Cocoa/WebViewImpl.mm: (WebKit::WebViewImpl::touchesEndedWithEvent): (WebKit::WebViewImpl::touchesCancelledWithEvent): NSTouch identifiers aren't pointer-comparable. We need to use isEqual to compare them and find the ones to remove. 2015-12-16 Simon Fraser Simplify isOverlayScrollbar() logic https://bugs.webkit.org/show_bug.cgi?id=152357 Reviewed by Beth Dakin. Replace code that checks for isOverlayScrollbar() explicitly with calls to new occupiedWidth()/occupiedHeight() functions on Scrollbar, which do the overlay scrollbar check internally. Add ScrollableArea::scrollbarIntrusion() which returns an IntSize with the occupiedWidth and occupiedHeight of any scrollbars, and use it in a few places. * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm: (WebKit::PDFPlugin::updateScrollbars): (WebKit::PDFPlugin::maximumScrollPosition): 2015-12-16 Alex Christensen Build fix when using NETWORK_SESSION after r193972. Rubber-stamped by Joseph Pecoraro. Renamed NetworkSessionDelegate to WKNetworkSessionDelegate to conform to the newly-enforced style rule in check-for-inappropriate-objc-class-names. * NetworkProcess/NetworkSession.h: * NetworkProcess/cocoa/NetworkSessionCocoa.mm: (toNSURLSessionAuthChallengeDisposition): (-[WKNetworkSessionDelegate initWithNetworkSession:]): (WebKit::NetworkSession::NetworkSession): (-[NetworkSessionDelegate initWithNetworkSession:]): Deleted. 2015-12-16 Alex Christensen Implement Web Timing when using NETWORK_SESSION https://bugs.webkit.org/show_bug.cgi?id=152285 Reviewed by Darin Adler. * NetworkProcess/cocoa/NetworkSessionCocoa.mm: (-[NetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]): (WebKit::NetworkSession::NetworkSession): Use functions moved to ResourceLoadTiming.h. setCollectsTimingData is for Mavericks, _timingDataOptions is post-Mavericks. 2015-12-16 Youenn Fablet [Fetch API] Add fetch API compile time flag https://bugs.webkit.org/show_bug.cgi?id=152254 Reviewed by Darin Adler. * Configurations/FeatureDefines.xcconfig: 2015-12-15 Tim Horton [Mac] Gesture Events should not have negative scale https://bugs.webkit.org/show_bug.cgi?id=151065 Reviewed by Anders Carlsson. * Shared/NativeWebGestureEvent.h: * Shared/mac/NativeWebGestureEventMac.mm: (WebKit::distanceForTouches): (WebKit::NativeWebGestureEvent::NativeWebGestureEvent): Compute the distance between the two oldest touches, and use that as the scale (really the gesture diameter) on the event, instead of passing through AppKit's magnification (which is computed differently). This matches the documented behavior of the existing gesture events on iOS. * UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView touchesBeganWithEvent:]): (-[WKWebView touchesMovedWithEvent:]): (-[WKWebView touchesEndedWithEvent:]): (-[WKWebView touchesCancelledWithEvent:]): * UIProcess/API/mac/WKView.mm: (-[WKView touchesBeganWithEvent:]): (-[WKView touchesMovedWithEvent:]): (-[WKView touchesEndedWithEvent:]): (-[WKView touchesCancelledWithEvent:]): Plumb touch events through to WebViewImpl. * UIProcess/Cocoa/WebViewImpl.h: * UIProcess/Cocoa/WebViewImpl.mm: (WebKit::WebViewImpl::WebViewImpl): (WebKit::WebViewImpl::magnifyWithEvent): (WebKit::WebViewImpl::touchesOrderedByAge): (WebKit::WebViewImpl::touchesBeganWithEvent): (WebKit::WebViewImpl::touchesMovedWithEvent): (WebKit::WebViewImpl::touchesEndedWithEvent): (WebKit::WebViewImpl::touchesCancelledWithEvent): (WebKit::WebViewImpl::rotateWithEvent): Keep track of the most recent incoming touches, by identifier, in age order. Pass them through to NativeWebGestureEvent so it can determine the gesture diameter. 2015-12-15 Anders Carlsson Call DatabaseManager directly from WKBundle.cpp https://bugs.webkit.org/show_bug.cgi?id=152317 Reviewed by Tim Horton. This is in preparation for getting rid of some old database manager code. * WebProcess/InjectedBundle/API/c/WKBundle.cpp: (WKBundleClearAllDatabases): (WKBundleSetDatabaseQuota): * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::clearAllDatabases): Deleted. (WebKit::InjectedBundle::setDatabaseQuota): Deleted. * WebProcess/InjectedBundle/InjectedBundle.h: 2015-12-15 Daniel Bates Guard code that uses class LayerTreeHost with USE(COORDINATED_GRAPHICS) or USE(TEXTURE_MAPPER) https://bugs.webkit.org/show_bug.cgi?id=152265 Reviewed by Tim Horton. We neither make use of LayerTreeHost on Mac nor on iOS. We should guard code that makes use of this class as applicable. This also fixes the iOS Simulator build when using Apple Internal software. * WebProcess/WebCoreSupport/WebChromeClient.cpp: Guard code that used LayerTreeHost. * WebProcess/WebPage/LayerTreeHost.cpp: Guard contents of file with USE(COORDINATED_GRAPHICS) || USE(TEXTURE_MAPPER). * WebProcess/WebPage/LayerTreeHost.h: Ditto. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::scalePage): Ditto. (WebKit::WebPage::setDeviceScaleFactor): Ditto. * WebProcess/WebPage/WebPage.h: Substitute header LayerTreeContext.h for LayerTreeHost.h since we make use of the enum class LayerHostingMode. * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::updateVisibleContentRects): Remove unnecessary code; DrawingArea::layerTreeHost() always returns nullptr on iOS. 2015-12-15 Zan Dobersek [TexMap] Operate with a reference to the TextureMapper wherever possible https://bugs.webkit.org/show_bug.cgi?id=152118 Reviewed by Martin Robinson. Replace pointers to the TextureMapper object with references. * Shared/CoordinatedGraphics/CoordinatedBackingStore.cpp: (WebKit::CoordinatedBackingStoreTile::swapBuffers): (WebKit::CoordinatedBackingStore::paintTilesToTextureMapper): (WebKit::CoordinatedBackingStore::paintToTextureMapper): (WebKit::CoordinatedBackingStore::drawBorder): (WebKit::CoordinatedBackingStore::drawRepaintCounter): (WebKit::CoordinatedBackingStore::commitTileOperations): * Shared/CoordinatedGraphics/CoordinatedBackingStore.h: * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp: (WebKit::CoordinatedGraphicsScene::paintToCurrentGLContext): (WebKit::CoordinatedGraphicsScene::paintToGraphicsContext): (WebKit::CoordinatedGraphicsScene::commitPendingBackingStoreOperations): 2015-12-14 YongGeol Jung [Coordinated Graphics] CSS transition effect is not shown when transformed with "%" unit. https://bugs.webkit.org/show_bug.cgi?id=152278 Reviewed by Darin Adler. boxSize is encoded as FloatSize type but decoded as IntSize type. So boxSize gets invalid value after decoding. Due to this layer goes to out of screen during animation. * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp: (IPC::ArgumentCoder::decode): 2015-12-14 Dan Bernstein REGRESSION (r194022): Production builds of PluginProcess crash on launch when not installed in /System https://bugs.webkit.org/show_bug.cgi?id=152291 Reviewed by Darin Adler. * Configurations/PluginProcess.xcconfig: Added a FIXME. * UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::addDYLDEnvironmentAdditions): Set DYLD_LIBRARY_PATH to point to where the shims are. This is needed because starting in El Capitan, the processes’ main executables link directly against the shims, so the dynamic linker needs to be able to find them in the non-/System location. Also added a FIXME about not having to set DYLD_INSERT_LIBRARIES when the main executables link the them directly. 2015-12-14 Simon Fraser Dump some more data in the RemoteLayerTreeTransaction https://bugs.webkit.org/show_bug.cgi?id=152283 Reviewed by Dean Jackson. Dump some scale factors, viewport meta tag width and render tree size. * Shared/mac/RemoteLayerTreeTransaction.mm: (WebKit::RemoteLayerTreeTransaction::description): 2015-12-14 Tim Horton Frequent crash under -[WKPDFView web_setMinimumSize:]_block_invoke https://bugs.webkit.org/show_bug.cgi?id=152266 Reviewed by Simon Fraser. * UIProcess/ios/WKPDFView.mm: (-[WKPDFView web_setMinimumSize:]): We weren't retaining the UIScrollView, but depending on it surviving into this block's invocation. We don't need to do this asynchronously anymore because the referenced bug is fixed, so make it happen synchronously. This also fixes the crash because there's no opportunity for the scroll view to be released. 2015-12-14 Tim Horton TiledCoreAnimationDrawingAreaProxy::createFenceForGeometryUpdate() sets fence port on context twice https://bugs.webkit.org/show_bug.cgi?id=152239 Reviewed by Darin Adler. * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm: (WebKit::TiledCoreAnimationDrawingAreaProxy::createFenceForGeometryUpdate): No need to setFencePort; createFencePort also installs it on the creating context. 2015-12-12 Alex Christensen Use existing code for redirects when using NETWORK_SESSION https://bugs.webkit.org/show_bug.cgi?id=152207 rdar://problem/23860624 Reviewed by Darin Adler. This fixes http/tests/cookies/set-cookie-on-redirect.html when using NETWORK_SESSION. * NetworkProcess/NetworkLoad.cpp: (WebKit::NetworkLoad::continueWillSendRequest): (WebKit::NetworkLoad::convertTaskToDownload): (WebKit::NetworkLoad::willPerformHTTPRedirection): (WebKit::NetworkLoad::didReceiveChallenge): * NetworkProcess/NetworkLoad.h: * NetworkProcess/NetworkSession.h: 2015-12-13 Tim Horton Adopt CGIOSurfaceContextCreateImageReference to avoid unnecessary readback https://bugs.webkit.org/show_bug.cgi?id=150988 Reviewed by Darin Adler. * WebProcess/WebPage/WebFrame.cpp: (WebKit::WebFrame::createSelectionSnapshot): Adopt sinkIntoImage and drawConsumingImageBuffer in a few places. 2015-12-13 Dan Bernstein Another fix after r194018. * Configurations/BaseTarget.xcconfig: * Configurations/BaseXPCService.xcconfig: 2015-12-13 Dan Bernstein [Mac] Shims used by XPC services are installed inside legacy process bundles https://bugs.webkit.org/show_bug.cgi?id=152233 Reviewed by Sam Weinig. Have the shim dylibs installed in the framework’s Frameworks directory instead. * Configurations/BaseLegacyProcess.xcconfig: Simplified now that EXCLUDED_SHIM_FILE_NAME is no longer defined, because shims aren’t copied into legacy processes. * Configurations/NetworkProcess.xcconfig: Removed definition of EXCLUDED_SHIM_FILE_NAME. * Configurations/PluginProcess.xcconfig: Ditto. * Configurations/WebContentProcess.xcconfig: Ditto. * Configurations/Shim.xcconfig: Install the shims when building for OS X. Added definitions of INSTALL_PATH and DYLIB_INSTALL_NAME_BASE which are now common to all shims. * Configurations/PluginProcessShim.xcconfig: Removed definitions of INSTALL_PATH and DYLIB_INSTALL_NAME_BASE from here, now that they are defined for all shims in Shim.xcconfig. * Configurations/SecItemShim.xcconfig: Ditto. * Configurations/WebProcessShim.xcconfig: * Configurations/WebKit.xcconfig: Added the shims to EXCLUDED_SOURCE_FILE_NAMES for iOS. * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX-10.9-10.10.plist: Changed the value of DYLD_INSERT_LIBRARIES to point to the shim’s new location. * PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64-10.9-10.10.Info.plist: Ditto. * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX-10.9-10.10.plist: Ditto. * UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::computeProcessShimPath): Changed to return the new paths, which are all inside the framework’s Frameworks directory. * WebKit2.xcodeproj/project.pbxproj: - Removed references to WRAPPER_NAME from the “Copy XPC services for engineering builds” build phase in the All target, becase WRAPPER_NAME is empty in an aggregate target. - Removed the PlugInProcess target’s dependency on the PluginProcessShim target and its Copy Plug-in Process Shim build phase. - Removed the NetworkProcess target’s dependency on the SecItemShim target and its Copy Sec Item Shim build phase. - Removed the WebProcess target’s dependency on the WebProcessShim target and its Copy WebProcessShim build phase. - Made the WebKit target depend on the shim targets, and added to it a Copy Shims build phase that copies the shims into the framework’s Frameworks directory. 2015-12-13 Dan Bernstein Build fix. * Configurations/PluginProcess.xcconfig: 2015-12-13 Dan Bernstein [Mac] Shims aren’t inserted properly on Yosemite when building with the El Capitan SDK https://bugs.webkit.org/show_bug.cgi?id=152229 Reviewed by Darin Adler. * Configurations/BaseTarget.xcconfig: Defined WK_LINK_SHIM on OS X to YES or NO based on the target version. * Configurations/BaseXPCService.xcconfig: Define WK_XPC_SERVICE_INFOPLIST_SUFFIX to "-10.9-10.10" when targeting those OS X versions. * Configurations/NetworkService.xcconfig: Use WK_XPC_SERVICE_INFOPLIST_SUFFIX in the definition of INFOPLIST_FILE. Use WK_LINK_SHIM in the definition of OTHER_LDFLAGS. * Configurations/PluginProcess.xcconfig: Use WK_LINK_SHIM in the definition of LDFLAGS_SHIM_Production for OS X. * Configurations/PluginService.32.xcconfig: Use WK_XPC_SERVICE_INFOPLIST_SUFFIX in the definition of INFOPLIST_FILE. Use WK_LINK_SHIM in the definition of OTHER_LDFLAGS. * Configurations/PluginService.64.xcconfig: Ditto. * Configurations/WebContentService.xcconfig: Ditto. 2015-12-12 Katlyn Graff Safari background tabs should be fully suspended where possible. https://bugs.webkit.org/show_bug.cgi?id=150515 Reviewed by Ryosuke Niwa. Added a runtime flag enabling tab suspension, default off. * Shared/WebProcessCreationParameters.cpp: (WebKit::WebProcessCreationParameters::WebProcessCreationParameters): (WebKit::WebProcessCreationParameters::encode): (WebKit::WebProcessCreationParameters::decode): * Shared/WebProcessCreationParameters.h: * UIProcess/Cocoa/WebProcessPoolCocoa.mm: (WebKit::registerUserDefaultsIfNeeded): (WebKit::WebProcessPool::platformInitializeWebProcess): * WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::platformInitializeWebProcess): 2015-12-11 Eric Carlson [MediaStream] Add a setting to allow the mock media capture devices to be enabled and disabled https://bugs.webkit.org/show_bug.cgi?id=152197 Reviewed by Dean Jackson. * Shared/WebPreferencesDefinitions.h: * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetMockCaptureDevicesEnabled): (WKPreferencesGetMockCaptureDevicesEnabled): * UIProcess/API/C/WKPreferencesRefPrivate.h: * UIProcess/API/Cocoa/WKPreferences.mm: (-[WKPreferences _mockCaptureDevicesEnabled]): (-[WKPreferences _setMockCaptureDevicesEnabled:]): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): 2015-12-11 Joseph Pecoraro check-for-inappropriate-objc-class-names should check all class names, not just externally visible ones https://bugs.webkit.org/show_bug.cgi?id=152156 Reviewed by Dan Bernstein. * UIProcess/ios/WebVideoFullscreenManagerProxy.mm: (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID): * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h: * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm: (WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy): Rename internal classes with "_WK" prefix. 2015-12-10 Eric Carlson [MediaStream] Expose media capture devices persistent permissions to WebCore https://bugs.webkit.org/show_bug.cgi?id=152087 Reviewed by Chris Dumez. * CMakeLists.txt: Add UserMediaPermissionCheckProxy.cpp and WKUserMediaPermissionCheck.cpp. * Shared/API/APIObject.h: Define UserMediaPermissionCheck. * Shared/API/c/WKBase.h: Add WKUserMediaPermissionCheckRef typedef. * UIProcess/API/APIUIClient.h: (API::UIClient::checkUserMediaPermissionForOrigin): New. * UIProcess/API/C/WKAPICast.h: Add WKUserMediaPermissionCheckRef/UserMediaPermissionCheckProxy mapping. * UIProcess/API/C/WKPage.cpp: (WKPageSetPageUIClient): Implement checkUserMediaPermissionForOrigin. * UIProcess/API/C/WKPageUIClient.h: Add WKCheckUserMediaPermissionCallback typedef and add checkUserMediaPermissionForOrigin to WKPageUIClientV6. * UIProcess/API/C/WKUserMediaPermissionCheck.cpp: Added. (WKUserMediaPermissionCheckGetTypeID): (WKUserMediaPermissionCheckSetHasPermission): * UIProcess/API/C/WKUserMediaPermissionCheck.h: Added. * UIProcess/UserMediaPermissionCheckProxy.cpp: Added. (WebKit::UserMediaPermissionCheckProxy::UserMediaPermissionCheckProxy): (WebKit::UserMediaPermissionCheckProxy::setHasPermission): (WebKit::UserMediaPermissionCheckProxy::invalidate): * UIProcess/UserMediaPermissionCheckProxy.h: Added. (WebKit::UserMediaPermissionCheckProxy::create): * UIProcess/UserMediaPermissionRequestManagerProxy.cpp: (WebKit::UserMediaPermissionRequestManagerProxy::invalidateRequests): (WebKit::UserMediaPermissionRequestManagerProxy::createRequest): (WebKit::UserMediaPermissionRequestManagerProxy::didReceiveUserMediaPermissionDecision): (WebKit::UserMediaPermissionRequestManagerProxy::createUserMediaPermissionCheck): (WebKit::UserMediaPermissionRequestManagerProxy::didCompleteUserMediaPermissionCheck): * UIProcess/UserMediaPermissionRequestManagerProxy.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::requestUserMediaPermissionForFrame): (WebKit::WebPageProxy::checkUserMediaPermissionForFrame): (WebKit::WebPageProxy::requestNotificationPermission): * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * WebKit2.xcodeproj/project.pbxproj: Add UserMediaPermissionCheckProxy.*, and WKUserMediaPermissionCheck.*. * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp: (WebKit::UserMediaPermissionRequestManager::startUserMediaRequest): Renamed from startRequest. (WebKit::UserMediaPermissionRequestManager::cancelUserMediaRequest): Renamed from cancelRequest. (WebKit::UserMediaPermissionRequestManager::didReceiveUserMediaPermissionDecision): m_requestToIDMap -> m_userMediaRequestToIDMap.remove. (WebKit::UserMediaPermissionRequestManager::startUserMediaPermissionCheck): New, start the request. (WebKit::UserMediaPermissionRequestManager::cancelUserMediaPermissionCheck): New, cancel the request. (WebKit::UserMediaPermissionRequestManager::didCompleteUserMediaPermissionCheck): New, all the request completion method. (WebKit::UserMediaPermissionRequestManager::startRequest): Deleted. (WebKit::UserMediaPermissionRequestManager::cancelRequest): Deleted. * WebProcess/MediaStream/UserMediaPermissionRequestManager.h: * WebProcess/WebCoreSupport/WebUserMediaClient.cpp: (WebKit::WebUserMediaClient::requestUserMediaAccess): startRequest -> startUserMediaRequest. (WebKit::WebUserMediaClient::cancelUserMediaAccessRequest): cancelRequest -> cancelUserMediaRequest. (WebKit::WebUserMediaClient::checkUserMediaPermission): New. (WebKit::WebUserMediaClient::cancelUserMediaPermissionCheck): New. * WebProcess/WebCoreSupport/WebUserMediaClient.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::didCompleteUserMediaPermissionCheck): New. * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: Add DidCompleteUserMediaPermissionCheck. 2015-12-10 Joseph Pecoraro Remote Inspector: Verify the identity of the other side of XPC connections https://bugs.webkit.org/show_bug.cgi?id=152153 Reviewed by Brian Burg. * Shared/mac/SandboxUtilities.mm: * UIProcess/ApplicationStateTracker.mm: Use new header. 2015-12-10 Alex Christensen REGRESSION (r192796) WKBundlePageResourceLoadClient should be able to setHTTPBody in willSendRequestForFrame https://bugs.webkit.org/show_bug.cgi?id=152022 rdar://problem/23763584 Reviewed by Darin Adler. * Shared/API/c/WKURLRequest.cpp: (WKURLRequestCopyHTTPMethod): (WKURLRequestCopyWithHTTPBody): (WKURLRequestSetDefaultTimeoutInterval): * Shared/API/c/WKURLRequest.h: Make WKURLRequestCopyWithHTTPBody SPI for testing. * Shared/API/c/mac/WKURLRequestNS.mm: (WKURLRequestCreateWithNSURLRequest): Crash if someone tries to use an NSURLRequest with HTTPBodyStream, which will not work with the network process. * WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.cpp: (WebKit::InjectedBundlePageResourceLoadClient::willSendRequestForFrame): Use an HTTP body if the client's willSendRequestForFrame returned one. This is the functional change of this patch. 2015-12-10 Zan Dobersek [CoordinatedGraphics] Reserve capacity for the children vector in CoordinatedGraphicsScene::setLayerChildrenIfNeeded() https://bugs.webkit.org/show_bug.cgi?id=152117 Reviewed by Martin Robinson. * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp: (WebKit::CoordinatedGraphicsScene::setLayerChildrenIfNeeded): Reserve the capacity for the new Vector that will contain the same number of items as the Vector on the CoordinatedGraphicsLayerState object. 2015-12-09 Daniel Bates [iOS] Bail out if the page proxy is invalid when WebPageProxy::processWillBecome{Foreground, Suspended}() are called https://bugs.webkit.org/show_bug.cgi?id=151877 Reviewed by Darin Adler. We cannot assume that a WebPageProxy is in a valid state when WebPageProxy::processWillBecome{Foreground, Suspended}() are called because these callbacks may occur after the web process crashed and before a WebPageProxy attaches to a new web process (and hence is considered in a valid state). * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::processWillBecomeSuspended): Early return if the page proxy is invalid. (WebKit::WebPageProxy::processWillBecomeForeground): Ditto. 2015-12-09 Commit Queue Unreviewed, rolling out r193864. https://bugs.webkit.org/show_bug.cgi?id=152100 caused all inspector tests to assert in WK2 Debug (Requested by brrian on #webkit). Reverted changeset: "Web Inspector: reproducible debug ASSERT when inspecting the inspector (WK2)" https://bugs.webkit.org/show_bug.cgi?id=152080 http://trac.webkit.org/changeset/193864 2015-12-09 Brian Burg Web Inspector: reproducible debug ASSERT when inspecting the inspector (WK2) https://bugs.webkit.org/show_bug.cgi?id=152080 Reviewed by Timothy Hatcher. We hit an assert underneath ChildProcessProxy::addMessageReceiver because we tried to connect the inspector page and inspected page more than once. This relationship is already set up in the constructor of WebProcessProxy. * UIProcess/WebInspectorProxy.cpp: (WebKit::WebInspectorProxy::eagerlyCreateInspectorPage): 2015-12-09 Gyuyoung Kim [EFL] Need to change expectation result in ewk_settings_offline_web_application_cache_enabled API test https://bugs.webkit.org/show_bug.cgi?id=152063 Reviewed by Csaba Osztrogonác. Expect false initial value of ewk_settings_offline_web_application_cache_enabled_get() because r193812 didn't enable it by default. * UIProcess/API/efl/tests/test_ewk2_settings.cpp: (TEST_F): 2015-12-09 Gwang Yoon Hwang [ThreadedCompositor] Add support for HiDPI https://bugs.webkit.org/show_bug.cgi?id=152071 Reviewed by Carlos Garcia Campos. * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp: (WebKit::ThreadedCompositor::setDeviceScaleFactor): Added to receive the device scale factor from the layer tree host. (WebKit::ThreadedCompositor::renderLayerTree): Apply device scale factor before rendering the page. * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h: * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp: (WebKit::ThreadedCoordinatedLayerTreeHost::deviceOrPageScaleFactorChanged): Send a updated device scale factor to the compositing thread. 2015-12-09 Ryuan Choi [CoordinatedGraphics] Remove unnecessary guards in CoordinatedDrawingArea https://bugs.webkit.org/show_bug.cgi?id=152068 Reviewed by Gyuyoung Kim. CoordinatedDrawingArea is only for UI side compositor of CoordinatedGraphics. So, COORDINATED_GRAPHICS_MULTIPROCESS guards are not necessary. This patch also removes COORDINATED_GRAPHICS_MULTIPROCESS guards from DrawingAreaImpl because of same reason. * UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.cpp: (WebKit::CoordinatedDrawingAreaProxy::CoordinatedDrawingAreaProxy): Deleted. * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp: (WebKit::CoordinatedDrawingArea::CoordinatedDrawingArea): Deleted. * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.h: * WebProcess/WebPage/DrawingAreaImpl.h: 2015-12-09 Mario Sanchez Prada [GTK] Crash in WebProcess when loading large content with custom URI schemes https://bugs.webkit.org/show_bug.cgi?id=144262 Reviewed by Carlos Garcia Campos. Properly handle scenarios where errors happen after reading the first chunk of data coming from the GInputStream provided by the application. * UIProcess/API/gtk/WebKitWebContextPrivate.h: * UIProcess/API/gtk/WebKitWebContext.cpp: (webkitWebContextIsLoadingCustomProtocol): New, checks whether a load is still in progress, after the startLoading method has been called. * UIProcess/API/gtk/WebKitURISchemeRequest.cpp: (webkitURISchemeRequestReadCallback): Early return if the stream has been cancelled on finish_error, so that we make sure we don't keep on reading the GInputStream after that point. (webkit_uri_scheme_request_finish_error): Don't send a didFailWithError message to the Network process if the load is not longer in progress. * Shared/Network/CustomProtocols/soup/CustomProtocolManagerImpl.cpp: (WebKit::CustomProtocolManagerImpl::didFailWithError): Handle the case where an error is notified from the UI process after the first chunk has been read. (WebKit::CustomProtocolManagerImpl::didReceiveResponse): Handle the case where data might no longer be available if an error happened even before this point. * WebProcess/soup/WebKitSoupRequestInputStream.h: * WebProcess/soup/WebKitSoupRequestInputStream.cpp: (webkitSoupRequestInputStreamDidFailWithError): Notify the custom GInputStream that we no longer want to keep reading data in chunks due to a specific error. (webkitSoupRequestInputStreamReadAsync): Early finish the GTask with a specific error whenever webkitSoupRequestInputStreamDidFailWithError() has been called. 2015-12-09 Ryuan Choi [CoordinatedGraphics][EFL] Fix unhandled web process message when launching MiniBrowser https://bugs.webkit.org/show_bug.cgi?id=152048 Reviewed by Gyuyoung Kim. WebPage should be initialized before updating preferences. * UIProcess/API/C/CoordinatedGraphics/WKView.cpp: (WKViewInitialize): Deleted. * UIProcess/API/C/CoordinatedGraphics/WKView.h: * UIProcess/API/efl/EwkView.cpp: (EwkView::EwkView): Calls WKViewSetIsActive instead of WKViewInitialize not to change the behavior of EFL port. * UIProcess/CoordinatedGraphics/WebView.cpp: (WebKit::WebView::WebView): Initialize just before creating WebPage because there is not use case to separate initializing WebPage from creating in CoordinatedGraphics. (WebKit::WebView::initialize): Deleted. * UIProcess/CoordinatedGraphics/WebView.h: 2015-12-09 Carlos Garcia Campos [GTK] Add API to handle beforeunload events https://bugs.webkit.org/show_bug.cgi?id=139090 Reviewed by Gustavo Noronha Silva. beforeunload is fired when a page is about to be closed, to ask the user for confirmation. This happens when reloading a page, when navigating to another page or when the page is closed by a user action (a tab or window closed). In the first two cases, the event is automatically fired by WebCore, but in the case of a user action we need additional API to ensure the event is fired before the page is closed. A new script dialog type has been added to handle beforeunload events and webkit_web_view_try_close() to allow applications to try to close the page. * UIProcess/API/gtk/WebKitScriptDialog.cpp: (webkit_script_dialog_confirm_set_confirmed): BeforeUnloadConfirm dialogs can also be confirmed. * UIProcess/API/gtk/WebKitScriptDialog.h: Add WEBKIT_SCRIPT_DIALOG_BEFORE_UNLOAD_CONFIRM script dialog type. * UIProcess/API/gtk/WebKitUIClient.cpp: Implement canRunBeforeUnloadConfirmPanel() and runBeforeUnloadConfirmPanel(). * UIProcess/API/gtk/WebKitWebView.cpp: (webkitWebViewCreateJavaScriptDialog): Add secondaryText optional parameter for BeforeUnloadConfirm dialogs. Do not set the default response if the dialog was created without buttons. (webkitWebViewScriptDialog): Handle WEBKIT_SCRIPT_DIALOG_BEFORE_UNLOAD_CONFIRM script dialog type to create a message dialog for beforeunlos events. (webkit_web_view_class_init): Update documentation of WebKitWebView::close and WebKitWebView::script-dialog. (webkitWebViewRunJavaScriptBeforeUnloadConfirm): Emit WebKitWebView::script-dialog. (webkit_web_view_try_close): Try to close the page. * UIProcess/API/gtk/WebKitWebView.h: * UIProcess/API/gtk/WebKitWebViewPrivate.h: * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbol. 2015-12-09 Gyuyoung Kim [EFL] Missing to set ignoreTLSError to NetworkProcess https://bugs.webkit.org/show_bug.cgi?id=152047 Reviewed by Csaba Osztrogonác. NetworkProcess has been enabled for all ports since r192796 though, EFL port didn't send the ignoreTLSError value to NetworkProcess. This has caused failure of EFL API tests related with ssl feature. * UIProcess/efl/WebProcessPoolEfl.cpp: (WebKit::WebProcessPool::setIgnoreTLSErrors): 2015-12-09 Gyuyoung Kim [EFL] REGRESSION(r193616): WKPreferences test has been failed since r193616 https://bugs.webkit.org/show_bug.cgi?id=151942 Reviewed by Darin Adler. As wkpreference settings were moved from EwkView to WKPreferenceEfl, the offline-web-application-cache feature is enabled by default when running API test. It seems this option should be enabled by MiniBrowser. * UIProcess/efl/WebPreferencesEfl.cpp: (WebKit::WebPreferences::platformInitializeStore): Remove to enable web application cache feature here. 2015-12-09 Ryuan Choi [CoordinatedGraphics] layerTreeHost always exist in CoordinatedDrawingArea https://bugs.webkit.org/show_bug.cgi?id=151987 Reviewed by Darin Adler. CoordinatedGraphics using UI side compositor always forces accelerated compositing. This patch cleans up dead code for layerTreeHost which always exists. * UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.cpp: (WebKit::CoordinatedDrawingAreaProxy::paint): Deleted. (WebKit::CoordinatedDrawingAreaProxy::setBackingStoreIsDiscardable): Deleted. (WebKit::CoordinatedDrawingAreaProxy::update): Deleted. (WebKit::CoordinatedDrawingAreaProxy::didUpdateBackingStoreState): Deleted. (WebKit::CoordinatedDrawingAreaProxy::exitAcceleratedCompositingMode): Deleted. (WebKit::CoordinatedDrawingAreaProxy::incorporateUpdate): Deleted. (WebKit::CoordinatedDrawingAreaProxy::enterAcceleratedCompositingMode): Deleted. (WebKit::CoordinatedDrawingAreaProxy::discardBackingStoreSoon): Deleted. (WebKit::CoordinatedDrawingAreaProxy::discardBackingStore): Deleted. * UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.h: (WebKit::CoordinatedDrawingAreaProxy::setBackingStoreIsDiscardable): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp: (WebKit::CoordinatedDrawingArea::CoordinatedDrawingArea): Deleted. (WebKit::CoordinatedDrawingArea::layerHostDidFlushLayers): Deleted. (WebKit::CoordinatedDrawingArea::scheduleCompositingLayerFlush): Deleted. (WebKit::CoordinatedDrawingArea::didUpdate): Deleted. (WebKit::CoordinatedDrawingArea::enterAcceleratedCompositingMode): Deleted. (WebKit::CoordinatedDrawingArea::scheduleDisplay): Deleted. (WebKit::CoordinatedDrawingArea::displayTimerFired): Deleted. (WebKit::CoordinatedDrawingArea::display): Deleted. (WebKit::shouldPaintBoundsRect): Deleted. (WebKit::CoordinatedDrawingArea::attachViewOverlayGraphicsLayer): Deleted. * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.h: 2015-12-08 Alex Christensen Progress towards implementing downloads with NetworkSession https://bugs.webkit.org/show_bug.cgi?id=151883 Reviewed by Brady Eidson. * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload): * NetworkProcess/NetworkLoad.cpp: (WebKit::NetworkLoad::~NetworkLoad): (WebKit::NetworkLoad::continueDidReceiveResponse): (WebKit::NetworkLoad::convertTaskToDownload): (WebKit::NetworkLoad::willPerformHTTPRedirection): (WebKit::NetworkLoad::didReceiveChallenge): (WebKit::NetworkLoad::didReceiveResponse): (WebKit::NetworkLoad::didReceiveData): (WebKit::NetworkLoad::didCompleteWithError): (WebKit::NetworkLoad::didBecomeDownload): (WebKit::NetworkLoad::didReceiveResponseAsync): (WebKit::NetworkLoad::continueCanAuthenticateAgainstProtectionSpace): * NetworkProcess/NetworkLoad.h: * NetworkProcess/NetworkLoadClient.h: * NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::cleanup): (WebKit::NetworkResourceLoader::didConvertToDownload): (WebKit::NetworkResourceLoader::abort): (WebKit::NetworkResourceLoader::didConvertHandleToDownload): Deleted. * NetworkProcess/NetworkResourceLoader.h: * NetworkProcess/NetworkSession.h: (WebKit::NetworkSessionTaskClient::~NetworkSessionTaskClient): (WebKit::NetworkSession::~NetworkSession): Deleted. * NetworkProcess/cache/NetworkCacheSpeculativeLoad.h: * NetworkProcess/cocoa/NetworkSessionCocoa.mm: (-[NetworkSessionDelegate URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:]): (-[NetworkSessionDelegate URLSession:dataTask:didBecomeDownloadTask:]): (WebKit::NetworkSession::NetworkSession): (WebKit::NetworkSession::~NetworkSession): (WebKit::NetworkSession::createDataTaskWithRequest): * Shared/Downloads/Download.h: * Shared/Downloads/DownloadManager.h: (WebKit::DownloadManager::isDownloading): (WebKit::DownloadManager::activeDownloadCount): 2015-12-08 Joseph Pecoraro Create a Sandbox SPI header https://bugs.webkit.org/show_bug.cgi?id=151981 Reviewed by Andy Estes. * PluginProcess/mac/PluginProcessShim.mm: * Shared/ios/ChildProcessIOS.mm: * Shared/mac/ChildProcessMac.mm: * Shared/mac/SandboxUtilities.mm: 2015-12-08 Eric Carlson [MediaStream] Rename UserMediaClient and UserMediaController methods https://bugs.webkit.org/show_bug.cgi?id=152001 Reviewed by Brady Eidson. * WebProcess/WebCoreSupport/WebUserMediaClient.cpp: (WebKit::WebUserMediaClient::pageDestroyed): (WebKit::WebUserMediaClient::requestUserMediaAccess): (WebKit::WebUserMediaClient::cancelUserMediaAccessRequest): (WebKit::WebUserMediaClient::requestPermission): Deleted. (WebKit::WebUserMediaClient::cancelRequest): Deleted. * WebProcess/WebCoreSupport/WebUserMediaClient.h: 2015-12-08 Tomas Popela [GTK] Remove an unused variable from WebKitWebContext https://bugs.webkit.org/show_bug.cgi?id=151999 Reviewed by Carlos Garcia Campos. * UIProcess/API/gtk/WebKitWebContext.cpp: 2015-12-08 Chris Dumez Add diagnostic logging to measure speculative revalidation accuracy https://bugs.webkit.org/show_bug.cgi?id=151953 Reviewed by Darin Adler. We track the following: 1. Resources we knew about AND did not get requested A. We did not speculate (Good) B. We speculated but did not go to network (Bad) C. We speculated and went to network (Very bad) 2. Resources we did not know about (Neutral) 3. Resources we knew about AND got requested A. We did not speculate (Bad) B. We speculated but did not go to network (Good) C. We speculated and went to network (Very good) * NetworkProcess/cache/NetworkCache.cpp: (WebKit::NetworkCache::Cache::retrieve): * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp: (WebKit::NetworkCache::allSpeculativeLoadingDiagnosticMessages): (WebKit::NetworkCache::printSpeculativeLoadingDiagnosticMessageCounts): (WebKit::NetworkCache::logSpeculativeLoadingDiagnosticMessage): (WebKit::NetworkCache::SpeculativeLoadManager::ExpiringEntry::ExpiringEntry): (WebKit::NetworkCache::SpeculativeLoadManager::PreloadedEntry::PreloadedEntry): (WebKit::NetworkCache::SpeculativeLoadManager::PreloadedEntry::wasRevalidated): (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::markLoadAsCompleted): (WebKit::NetworkCache::SpeculativeLoadManager::retrieve): (WebKit::NetworkCache::SpeculativeLoadManager::addPreloadedEntry): (WebKit::NetworkCache::SpeculativeLoadManager::revalidateEntry): (WebKit::NetworkCache::SpeculativeLoadManager::preloadEntry): (WebKit::NetworkCache::SpeculativeLoadManager::startSpeculativeRevalidation): (WebKit::NetworkCache::makeSubresourcesKey): Deleted. (WebKit::NetworkCache::constructRevalidationRequest): Deleted. (WebKit::NetworkCache::responseNeedsRevalidation): Deleted. (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::saveToDiskIfReady): Deleted. (WebKit::NetworkCache::SpeculativeLoadManager::retrieveEntryFromStorage): Deleted. (WebKit::NetworkCache::SpeculativeLoadManager::satisfyPendingRequests): Deleted. * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.h: 2015-12-08 Csaba Osztrogonác [EFL] REGRESSION(r173394): MiniBrowser stucked in an infinite loop if NETWORK_CACHE is disabled https://bugs.webkit.org/show_bug.cgi?id=137692 Reviewed by Darin Adler. * WebProcess/Network/WebLoaderStrategy.cpp: (WebKit::maximumBufferingTime): Disable caching if NETWORK_CACHE is disabled. 2015-12-08 Ryuan Choi [EFL] Add API to provide preferences before creating ewk_view https://bugs.webkit.org/show_bug.cgi?id=151587 Reviewed by Gyuyoung Kim. This patch adds ewk_view_configuration_settings_get to provide preferences before createing ewk_view. * PlatformEfl.cmake: * UIProcess/API/efl/ewk_view_configuration.cpp: (EwkViewConfiguration::EwkViewConfiguration): (ewk_view_configuration_settings_get): * UIProcess/API/efl/ewk_view_configuration.h: * UIProcess/API/efl/ewk_view_configuration_private.h: (EwkViewConfiguration::pageGroup): * UIProcess/API/efl/tests/test_ewk2_view_configuration.cpp: (TEST_F): Added test case for ewk_view_configuration_settings_get(). 2015-12-07 Gustavo Noronha Silva [GTK] Notify WebCore when notification is clicked https://bugs.webkit.org/show_bug.cgi?id=151951 Reviewed by Carlos Garcia Campos. * UIProcess/API/gtk/WebKitNotification.cpp: (webkit_notification_class_init): new clicked signal. (webkit_notification_clicked): method to emit the clicked signal. * UIProcess/API/gtk/WebKitNotification.h: * UIProcess/API/gtk/WebKitNotificationProvider.cpp: (WebKitNotificationProvider::notificationClickedCallback): handle the clicked signal and tell WebProcess about the click. (WebKitNotificationProvider::show): connect to the clicked signal in addition to closed. * UIProcess/API/gtk/WebKitNotificationProvider.h: * UIProcess/API/gtk/WebKitWebView.cpp: (notifyNotificationClicked): handle the click on our libnotify notification. (webkitWebViewShowNotification): add the "default" action to our libnotify notification to be notified of the click. * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: 2015-12-07 Commit Queue Unreviewed, rolling out r193655. https://bugs.webkit.org/show_bug.cgi?id=151970 This change broke existing LayoutTests on mac-wk2 (Requested by ryanhaddad on #webkit). Reverted changeset: "UIProcess should determine AppNap state for WebPage" https://bugs.webkit.org/show_bug.cgi?id=151964 http://trac.webkit.org/changeset/193655 2015-12-05 Gavin Barraclough UIProcess should determine AppNap state for WebPage https://bugs.webkit.org/show_bug.cgi?id=151964 Reviewed by Anders Carlson. Step 1 in unifying this with the iOS process suppression mechanism is to move the decision out of the WebContent process. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::WebPageProxy): (WebKit::WebPageProxy::dispatchViewStateChange): (WebKit::WebPageProxy::setPageActivityState): (WebKit::WebPageProxy::updateActivityToken): (WebKit::WebPageProxy::preferencesDidChange): * UIProcess/WebPageProxy.h: (WebKit::WebPageProxy::isInWindow): (WebKit::WebPageProxy::didUpdateViewState): * UIProcess/WebPageProxy.messages.in: - WebPage now propagates PageActivityState to the WebPageProxy, for use determining the supression state of the WebProcess. * WebProcess/WebPage/WebPage.cpp: (WebKit::m_shouldDispatchFakeMouseMoveEvents): (WebKit::WebPage::setPageActivityState): (WebKit::WebPage::setUserActivityStarted): (WebKit::WebPage::setViewState): (WebKit::WebPage::updatePreferences): (WebKit::WebPage::updateUserActivity): Deleted. * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: - WebPage no longer determines when to update it's own UserActivity - instead, let the UI process do so. As such, no longer need to track whether process supression is enabled. Instead, add message to 2015-12-07 Chris Dumez [WK2] Regression(r187691): If a page is showing an auth pane in one tab, any new tabs with same page hang until credentials are entered in first tab https://bugs.webkit.org/show_bug.cgi?id=151960 Reviewed by Alex Christensen. After r187691, if a page is showing an auth pane in one tab, any new tabs with same page hang until credentials are entered in first tab. This is because we coalescing all authentication challenges from the same domain, no matter what tab they are for. This can be confusing so we now only coalesce authentication challenges within each tab, by leveraging the pageID (in addition to the domain). * Shared/Authentication/AuthenticationManager.cpp: (WebKit::AuthenticationManager::shouldCoalesceChallenge): (WebKit::AuthenticationManager::coalesceChallengesMatching): (WebKit::AuthenticationManager::didReceiveAuthenticationChallenge): * Shared/Authentication/AuthenticationManager.h: 2015-12-07 Beth Dakin Hook up request and show for typing candidates in WK1 https://bugs.webkit.org/show_bug.cgi?id=151831 -and corresponding- Reviewed by Enrica Casucci. Empty client for now. * WebProcess/WebCoreSupport/WebEditorClient.h: 2015-12-07 Philippe Normand [GTK][Mac] socketpair assertion failure https://bugs.webkit.org/show_bug.cgi?id=151293 Reviewed by Carlos Garcia Campos. * Platform/IPC/unix/ConnectionUnix.cpp: Don't use SEQPACKET sockets on Darwin. 2015-12-07 Gwang Yoon Hwang [ThreadedCompositor] Add support for PlatformLayer. https://bugs.webkit.org/show_bug.cgi?id=143299 Reviewed by Žan Doberšek. * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp: (WebKit::CoordinatedGraphicsScene::paintToCurrentGLContext): Swap pending buffers of TextureMapperPlatformLayerProxies before painting contents. (WebKit::CoordinatedGraphicsScene::syncPlatformLayerIfNeeded): In threaded compositor, CoordinatedGraphicsScence only cares about creation and deletion of platform layers. (WebKit::CoordinatedGraphicsScene::onNewBufferAvailable): Whenever new buffer comes via TextureMapperPlatformLayerProxy, CoordinatedGraphicsScene will update the scene if it is needed. 2015-12-07 Mario Sanchez Prada [GTK] Allow applications to force Accelerated Compositing mode https://bugs.webkit.org/show_bug.cgi?id=150558 Reviewed by Carlos Garcia Campos. Enable forcing Accelerated Compositing mode to be always on if a WEBKIT_FORCE_COMPOSITING_MODE environment variable is set. This can be useful for controlled environments where we know that AC always on works well enough, to get smoother animations. * UIProcess/gtk/WebPreferencesGtk.cpp: (WebKit::WebPreferences::platformInitializeStore): Set forceCompositingMode setting to true if the environment variable is found. 2015-12-07 Jon Forsberg [GTK] Add webkit_uri_request_get_http_method https://bugs.webkit.org/show_bug.cgi?id=151601 Reviewed by Martin Robinson. Add a method to get the HTTP method of a WebKitURIRequest. * UIProcess/API/gtk/WebKitURIRequest.cpp: (webkit_uri_request_get_http_method): * UIProcess/API/gtk/WebKitURIRequest.h: * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: 2015-12-07 Carlos Garcia Campos [GTK] Add WebKitWebPage::console-message-sent signal to Web Extensions API https://bugs.webkit.org/show_bug.cgi?id=79918 Reviewed by Gustavo Noronha Silva. Add WebKitConsoleMessage boxed type that is passed to the WebKitWebPage::console-message-sent signal with all the details about the message. * PlatformGTK.cmake: Add new files to compilation. * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: Add new symbols. * UIProcess/API/gtk/docs/webkit2gtk-4.0.types: Add webkit_console_message_get_type. * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add new section to the docs. * WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h: (API::InjectedBundle::PageUIClient::willAddMessageToConsole): Add paramaters for all console message details. * WebProcess/InjectedBundle/API/gtk/WebKitConsoleMessage.cpp: Added. (webkit_console_message_copy): (webkit_console_message_free): (webkit_console_message_get_source): (webkit_console_message_get_level): (webkit_console_message_get_text): (webkit_console_message_get_line): (webkit_console_message_get_source_id): * WebProcess/InjectedBundle/API/gtk/WebKitConsoleMessage.h: Added. * WebProcess/InjectedBundle/API/gtk/WebKitConsoleMessagePrivate.h: Added. (_WebKitConsoleMessage::_WebKitConsoleMessage): * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp: (webkitWebPageDidSendConsoleMessage): Emit the WebKitWebPage::console-message-sent signal. (didReceiveResponseForResource): Generate a console message in case of HTTP failure >= 400 for consistency with the inspector. (didFailLoadForResource): Generate a console message in case of resource load failure for consistency with the inspector. (webkit_web_page_class_init): Add WebKitWebPage::console-message-sent signal. (webkitWebPageCreate): Set custom UI client. * WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h: * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp: (WebKit::InjectedBundlePageUIClient::willAddMessageToConsole): * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h: * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::addMessageToConsole): Pass all the console message details to the ui client. 2015-12-07 Ryuan Choi [EFL] MiniBrowser doesn't exit when called ewk_view_try_close() https://bugs.webkit.org/show_bug.cgi?id=151934 Reviewed by Csaba Osztrogonác. * UIProcess/API/efl/ewk_view.cpp: (ewk_view_try_close): Called window_close callback immediately when WKPageTryClose returns true. * UIProcess/API/efl/tests/test_ewk2_view.cpp: (TEST_F): Improved test cases for try_close to test when content does not contain onbeforeunload callback. 2015-12-07 Jaehun Lim [EFL] Moving preference settings from EwkView to WebPreferencesEfl https://bugs.webkit.org/show_bug.cgi?id=151928 Reviewed by Gyuyoung Kim. It implements WebPreferences::platformInitializeStore() in WebPreferencesEfl.cpp. * UIProcess/API/efl/EwkView.cpp: (EwkView::EwkView): * UIProcess/efl/WebPreferencesEfl.cpp: (WebKit::WebPreferences::platformInitializeStore): 2015-12-04 Anders Carlsson Crash when secondary clicking on a link on yahoo.com https://bugs.webkit.org/show_bug.cgi?id=151900 rdar://problem/23765149 Reviewed by Beth Dakin. Don't use +[NSURL URLWithString:] since it doesn't handle invalid URLs as well as WebCore::URL. * UIProcess/mac/WebContextMenuProxyMac.mm: (WebKit::WebContextMenuProxyMac::createShareMenuItem): 2015-12-04 Beth Dakin Crash in clients using userData in _immediateActionAnimationControllerForHitTestResult https://bugs.webkit.org/show_bug.cgi?id=151887 Rubber-stamped by Anders Carlsson. Follow-up fix to handle null userData. * UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView _web_immediateActionAnimationControllerForHitTestResultInternal:withType:userData:]): 2015-12-04 Beth Dakin Crash in clients using userData in _immediateActionAnimationControllerForHitTestResult https://bugs.webkit.org/show_bug.cgi?id=151887 Reviewed by Sam Weinig. Cast this correctly. * UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView _web_immediateActionAnimationControllerForHitTestResultInternal:withType:userData:]): 2015-12-04 Gavin Barraclough Background state not being tracked correctly for PDFs on iOS https://bugs.webkit.org/show_bug.cgi?id=151886 Reviewed by Anders Carlson. The problem here is that when viewing a PDF we don't have an ApplicationStateTracker. (While we do have a content view - which normally holds the ApplicationStateTracker - the content view is not in a window, and only has an ApplicationStateTracker while in a window). For now, let's give the WKPDFView an ApplicationStateTracker of its very own. In the future we may want to refactor ownership of the ApplicationStateTracker up to the WKWebView. * UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView _isBackground]): - Added, checks background state of content/PDF view. * UIProcess/API/Cocoa/WKWebViewInternal.h: - expose _isBackground to PageClientImplIOS. * UIProcess/ApplicationStateTracker.h: (WebKit::ApplicationStateTracker::isInBackground): * UIProcess/ApplicationStateTracker.mm: (WebKit::isBackgroundState): (WebKit::ApplicationStateTracker::ApplicationStateTracker): - generalize WKContentView -> UIView, so this may now also be a WKPDFView. * UIProcess/ios/PageClientImplIOS.mm: (WebKit::PageClientImpl::isViewVisible): - check background state via the WKWebView. * UIProcess/ios/WKPDFView.h: * UIProcess/ios/WKPDFView.mm: (-[WKPDFView willMoveToWindow:]): (-[WKPDFView didMoveToWindow]): (-[WKPDFView isBackground]): (-[WKPDFView _applicationDidEnterBackground]): (-[WKPDFView _applicationWillEnterForeground]): - added methods to initialize ApplicationStateTracker, access background state, & callbacks to the page proxy. 2015-12-04 Antti Koivisto Rename WebResourceLoadScheduler to WebLoaderStrategy https://bugs.webkit.org/show_bug.cgi?id=151854 Reviewed by Anders Carlsson. It implements WebCore::LoaderStrategy and doesn't do any scheduling. * CMakeLists.txt: * WebKit2.xcodeproj/project.pbxproj: * WebProcess/Network/NetworkProcessConnection.cpp: (WebKit::NetworkProcessConnection::didReceiveMessage): * WebProcess/Network/WebLoaderStrategy.cpp: Copied from Source/WebKit2/WebProcess/Network/WebResourceLoadScheduler.cpp. (WebKit::WebLoaderStrategy::WebLoaderStrategy): (WebKit::WebLoaderStrategy::~WebLoaderStrategy): (WebKit::WebLoaderStrategy::loadResource): (WebKit::WebLoaderStrategy::schedulePluginStreamLoad): (WebKit::maximumBufferingTime): (WebKit::WebLoaderStrategy::scheduleLoad): (WebKit::WebLoaderStrategy::scheduleInternallyFailedLoad): (WebKit::WebLoaderStrategy::internallyFailedLoadTimerFired): (WebKit::WebLoaderStrategy::startLocalLoad): (WebKit::WebLoaderStrategy::remove): (WebKit::WebLoaderStrategy::setDefersLoading): (WebKit::WebLoaderStrategy::crossOriginRedirectReceived): (WebKit::WebLoaderStrategy::servePendingRequests): (WebKit::WebLoaderStrategy::suspendPendingRequests): (WebKit::WebLoaderStrategy::resumePendingRequests): (WebKit::WebLoaderStrategy::networkProcessCrashed): (WebKit::WebLoaderStrategy::loadResourceSynchronously): (WebKit::WebLoaderStrategy::createPingHandle): (WebKit::WebResourceLoadScheduler::WebResourceLoadScheduler): Deleted. (WebKit::WebResourceLoadScheduler::~WebResourceLoadScheduler): Deleted. (WebKit::WebResourceLoadScheduler::loadResource): Deleted. (WebKit::WebResourceLoadScheduler::schedulePluginStreamLoad): Deleted. (WebKit::WebResourceLoadScheduler::scheduleLoad): Deleted. (WebKit::WebResourceLoadScheduler::scheduleInternallyFailedLoad): Deleted. (WebKit::WebResourceLoadScheduler::internallyFailedLoadTimerFired): Deleted. (WebKit::WebResourceLoadScheduler::startLocalLoad): Deleted. (WebKit::WebResourceLoadScheduler::remove): Deleted. (WebKit::WebResourceLoadScheduler::setDefersLoading): Deleted. (WebKit::WebResourceLoadScheduler::crossOriginRedirectReceived): Deleted. (WebKit::WebResourceLoadScheduler::servePendingRequests): Deleted. (WebKit::WebResourceLoadScheduler::suspendPendingRequests): Deleted. (WebKit::WebResourceLoadScheduler::resumePendingRequests): Deleted. (WebKit::WebResourceLoadScheduler::networkProcessCrashed): Deleted. (WebKit::WebResourceLoadScheduler::loadResourceSynchronously): Deleted. (WebKit::WebResourceLoadScheduler::createPingHandle): Deleted. * WebProcess/Network/WebLoaderStrategy.h: Copied from Source/WebKit2/WebProcess/Network/WebResourceLoadScheduler.h. (WebKit::WebLoaderStrategy::webResourceLoaderForIdentifier): (WebKit::WebResourceLoadScheduler::webResourceLoaderForIdentifier): Deleted. * WebProcess/Network/WebResourceLoadScheduler.cpp: Removed. * WebProcess/Network/WebResourceLoadScheduler.h: Removed. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::Stream::start): (WebKit::PluginView::Stream::cancel): * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: (WebKit::WebPlatformStrategies::createLoaderStrategy): (WebKit::WebPlatformStrategies::createPasteboardStrategy): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::WebProcess): (WebKit::WebProcess::initializeWebProcess): (WebKit::WebProcess::networkProcessConnectionClosed): (WebKit::WebProcess::webLoaderStrategy): (WebKit::WebProcess::webResourceLoadScheduler): Deleted. * WebProcess/WebProcess.h: 2015-12-03 Simon Fraser Have layer memory use consult the backing store format https://bugs.webkit.org/show_bug.cgi?id=151827 rdar://problem/23746497 Reviewed by Dean Jackson. When computing the backing store memory size, take the pixel format into account, rather than assuming 4 bytes per pixel. * Shared/mac/RemoteLayerBackingStore.h: * Shared/mac/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::bytesPerPixel): * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp: (WebKit::PlatformCALayerRemote::backingStoreBytesPerPixel): * WebProcess/WebPage/mac/PlatformCALayerRemote.h: 2015-12-03 Jer Noble Expose WebCore's InvisibleAutoplayNotPermitted setting to WebKit & WebKit2 https://bugs.webkit.org/show_bug.cgi?id=151830 Reviewed by Anders Carlsson. Add a new, private WKWebViewConfiguration property _invisibleAutoplayNotPermitted. * Shared/WebPreferencesDefinitions.h: * UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView initWithFrame:configuration:]): * UIProcess/API/Cocoa/WKWebViewConfiguration.mm: (-[WKWebViewConfiguration init]): (-[WKWebViewConfiguration copyWithZone:]): (-[WKWebViewConfiguration _invisibleAutoplayNotPermitted]): (-[WKWebViewConfiguration _setInvisibleAutoplayNotPermitted:]): * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): 2015-12-03 Sam Weinig It should be possible to use version 6 of the WKPageUIClient without adopting the new createNewPage https://bugs.webkit.org/show_bug.cgi?id=151826 Reviewed by Anders Carlsson. * UIProcess/API/C/WKPage.cpp: (WKPageSetPageUIClient): Pick which variant of createNewPage to use based on which function pointer is available, not the version number. 2015-12-03 Anders Carlsson Remove Objective-C GC support https://bugs.webkit.org/show_bug.cgi?id=151819 rdar://problem/23746991 Reviewed by Dan Bernstein. * Configurations/Base.xcconfig: * Configurations/BaseLegacyProcess.xcconfig: * Configurations/BaseXPCService.xcconfig: * Shared/Cocoa/APIObject.mm: (API::Object::newObject): Deleted. 2015-12-03 Jer Noble Unreviewed build-fix; fix !HAVE(AVKIT) build after r193340. * UIProcess/ios/WebVideoFullscreenManagerProxy.mm: (WebKit::WebVideoFullscreenManagerProxy::applicationDidBecomeActive): 2015-12-03 Sam Weinig Need completionHandler-based WebKit C SPI for alert, confirm, and prompt https://bugs.webkit.org/show_bug.cgi?id=151708 (Add missing function definitions) * UIProcess/API/C/WKPage.cpp: (WKPageRunJavaScriptAlertResultListenerGetTypeID): (WKPageRunJavaScriptAlertResultListenerCall): (WKPageRunJavaScriptConfirmResultListenerGetTypeID): (WKPageRunJavaScriptConfirmResultListenerCall): (WKPageRunJavaScriptPromptResultListenerGetTypeID): (WKPageRunJavaScriptPromptResultListenerCall): 2015-12-03 Jer Noble [iOS] Fullscreen -> PiP should resume to Fullscreen, not inline https://bugs.webkit.org/show_bug.cgi?id=150906 Reviewed by Simon Fraser. Add methods to pass isVisible(), applicationDidBecomeActive(), and requestFullscreenMode() to and from models and interfaces. * UIProcess/ios/WebPageProxyIOS.mm: (WebKit::WebPageProxy::applicationDidBecomeActive): Notify the fullscreen manager, if preset. * UIProcess/ios/WebVideoFullscreenManagerProxy.mm: (WebKit::WebVideoFullscreenModelContext::requestFullscreenMode): Renamed from requestExitFullscreen(); takes a mode enum. (WebKit::WebVideoFullscreenModelContext::isVisible): Added. (WebKit::WebVideoFullscreenManagerProxy::applicationDidBecomeActive): Pass to all existing interfaces. (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID): Do not re-create the view if it already exists. (WebKit::WebVideoFullscreenManagerProxy::requestFullscreenMode): Renamed from requestExitFullscreen(); takes a mode enum. (WebKit::WebVideoFullscreenManagerProxy::isVisible): Added. Query Page::isVisible() and Page::isInWindow(), the latter because PiP will cause Page::isVisible() to be TRUE even when the containing tab is backgrounded. (WebKit::WebVideoFullscreenModelContext::requestExitFullscreen): Deleted. (WebKit::WebVideoFullscreenManagerProxy::requestExitFullscreen): Deleted. * WebProcess/ios/WebVideoFullscreenManager.mm: (WebKit::WebVideoFullscreenManager::enterVideoFullscreenForVideoElement): Only resize the view if we are not already in one of the fullscreen modes. (WebKit::WebVideoFullscreenManager::requestFullscreenMode): Renamed from requestExitFullscreen(). (WebKit::WebVideoFullscreenManager::requestExitFullscreen): Deleted. 2015-12-02 Antti Koivisto Move ResourceLoadScheduler to WebKit1 https://bugs.webkit.org/show_bug.cgi?id=151743 Reviewed by Alex Christensen. * NetworkProcess/NetworkProcessPlatformStrategies.cpp: (WebKit::NetworkProcessPlatformStrategies::createCookiesStrategy): (WebKit::NetworkProcessPlatformStrategies::createLoaderStrategy): (WebKit::NetworkProcessPlatformStrategies::createPasteboardStrategy): (WebKit::NetworkProcessPlatformStrategies::createPluginStrategy): (WebKit::NetworkProcessPlatformStrategies::createBlobRegistry): (WebKit::NetworkProcessPlatformStrategies::resourceLoadScheduler): Deleted. (WebKit::NetworkProcessPlatformStrategies::loadResourceSynchronously): Deleted. * NetworkProcess/NetworkProcessPlatformStrategies.h: * WebProcess/InjectedBundle/InjectedBundle.cpp: * WebProcess/Network/WebResourceLoadScheduler.cpp: (WebKit::WebResourceLoadScheduler::~WebResourceLoadScheduler): (WebKit::WebResourceLoadScheduler::loadResource): (WebKit::WebResourceLoadScheduler::resumePendingRequests): (WebKit::WebResourceLoadScheduler::networkProcessCrashed): (WebKit::WebResourceLoadScheduler::loadResourceSynchronously): (WebKit::WebResourceLoadScheduler::createPingHandle): (WebKit::WebResourceLoadScheduler::scheduleSubresourceLoad): Deleted. (WebKit::WebResourceLoadScheduler::setSerialLoadingEnabled): Deleted. * WebProcess/Network/WebResourceLoadScheduler.h: (WebKit::WebResourceLoadScheduler::webResourceLoaderForIdentifier): * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::Stream::start): (WebKit::PluginView::Stream::cancel): * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: (WebKit::WebPlatformStrategies::createLoaderStrategy): (WebKit::WebPlatformStrategies::createPasteboardStrategy): (WebKit::WebPlatformStrategies::createPluginStrategy): (WebKit::WebPlatformStrategies::createBlobRegistry): (WebKit::WebPlatformStrategies::cookiesForDOM): (WebKit::WebPlatformStrategies::deleteCookie): (WebKit::WebPlatformStrategies::refreshPlugins): (WebKit::WebPlatformStrategies::resourceLoadScheduler): Deleted. (WebKit::WebPlatformStrategies::loadResourceSynchronously): Deleted. (WebKit::WebPlatformStrategies::createPingHandle): Deleted. * WebProcess/WebCoreSupport/WebPlatformStrategies.h: 2015-12-02 Alex Christensen Fix authentication requests with NetworkSession and canHandleHTTPSServerTrustEvaluation true https://bugs.webkit.org/show_bug.cgi?id=151775 rdar://problem/23586265 Reviewed by Chris Dumez. In https://bugs.webkit.org/show_bug.cgi?id=150968 I copied functionality from NetworkLoad::canAuthenticateAgainstProtectionSpaceAsync into NetworkLoad::didReceiveChallenge but I overlooked the call to m_client.canAuthenticateAgainstProtectionSpaceAsync which is needed if canHandleHTTPSServerTrustEvaluation is true. This adds that call and moves what should happen after that to NetworkLoad::continueCanAuthenticateAgainstProtectionSpace. * NetworkProcess/NetworkLoad.cpp: (WebKit::NetworkLoad::didReceiveChallenge): (WebKit::NetworkLoad::didReceiveResponse): (WebKit::NetworkLoad::continueCanAuthenticateAgainstProtectionSpace): * NetworkProcess/NetworkLoad.h: * NetworkProcess/NetworkSession.h: * Shared/Authentication/AuthenticationManager.h: 2015-12-01 Hunseop Jeong Unreviewed, fix build after r192931. * CMakeLists.txt: Remove the WKOriginDataManager in CMakeLists.txt. 2015-12-01 Yusuke Suzuki [ES6] Implement LLInt/Baseline Support for ES6 Generators and enable this feature https://bugs.webkit.org/show_bug.cgi?id=150792 Reviewed by Saam Barati. * Configurations/FeatureDefines.xcconfig: 2015-12-01 Commit Queue Unreviewed, rolling out r192914. https://bugs.webkit.org/show_bug.cgi?id=151734 JSC tests for this change are failing on 32 and 64-bit bots (Requested by ryanhaddad on #webkit). Reverted changeset: "[ES6] Implement LLInt/Baseline Support for ES6 Generators and enable this feature" https://bugs.webkit.org/show_bug.cgi?id=150792 http://trac.webkit.org/changeset/192914 2015-12-01 Anders Carlsson Remove WKOriginDataManager https://bugs.webkit.org/show_bug.cgi?id=151723 Reviewed by Andy Estes. * UIProcess/API/C/WKOriginDataManager.cpp: Removed. (WKOriginDataManagerGetTypeID): Deleted. (WKOriginDataManagerGetOrigins): Deleted. (WKOriginDataManagerDeleteEntriesForOrigin): Deleted. (WKOriginDataManagerDeleteEntriesModifiedBetweenDates): Deleted. (WKOriginDataManagerDeleteAllEntries): Deleted. * UIProcess/API/C/WKOriginDataManager.h: Removed. * WebKit2.xcodeproj/project.pbxproj: 2015-12-01 Yusuke Suzuki [ES6] Implement LLInt/Baseline Support for ES6 Generators and enable this feature https://bugs.webkit.org/show_bug.cgi?id=150792 Reviewed by Saam Barati. * Configurations/FeatureDefines.xcconfig: 2015-12-01 Sam Weinig Need completionHandler-based WebKit C SPI for alert, confirm, and prompt https://bugs.webkit.org/show_bug.cgi?id=151708 Reviewed by Anders Carlsson. Add listener based versions of alert, confirm and prompt. * Shared/API/APIObject.h: * Shared/API/c/WKBase.h: * UIProcess/API/C/WKPage.cpp: (WebKit::RunJavaScriptAlertResultListener::create): (WebKit::RunJavaScriptAlertResultListener::~RunJavaScriptAlertResultListener): (WebKit::RunJavaScriptAlertResultListener::call): (WebKit::RunJavaScriptAlertResultListener::RunJavaScriptAlertResultListener): (WebKit::RunJavaScriptConfirmResultListener::create): (WebKit::RunJavaScriptConfirmResultListener::~RunJavaScriptConfirmResultListener): (WebKit::RunJavaScriptConfirmResultListener::call): (WebKit::RunJavaScriptConfirmResultListener::RunJavaScriptConfirmResultListener): (WebKit::RunJavaScriptPromptResultListener::create): (WebKit::RunJavaScriptPromptResultListener::~RunJavaScriptPromptResultListener): (WebKit::RunJavaScriptPromptResultListener::call): (WebKit::RunJavaScriptPromptResultListener::RunJavaScriptPromptResultListener): (WKPageSetPageUIClient): * UIProcess/API/C/WKPageUIClient.h: 2015-12-01 Anders Carlsson Remove WebKit2.framework https://bugs.webkit.org/show_bug.cgi?id=151715 Reviewed by Dan Bernstein. * Configurations/WebKit2.xcconfig: Removed. * UIProcess/API/Cocoa/WebKit2.h: Removed. * WebKit2.xcodeproj/project.pbxproj: * mac/Info-WebKit2.plist: Removed. * mac/MigrateHeadersToWebKit2.make: Removed. * mac/WebKit2.m: Removed. 2015-12-01 Alex Christensen Use Optional for matrix inverses https://bugs.webkit.org/show_bug.cgi?id=151575 Reviewed by Myles C. Maxfield. * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: (WebKit::NetscapePlugin::convertFromRootView): * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: (WebKit::NetscapePlugin::convertPoint): * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm: (WebKit::PDFPlugin::convertFromPDFViewToRootView): (WebKit::PDFPlugin::convertFromPDFViewToScreen): (WebKit::PDFPlugin::boundsOnScreen): (WebKit::PDFPlugin::geometryDidChange): * WebProcess/Plugins/PDF/PDFPlugin.mm: (WebKit::PDFPlugin::geometryDidChange): 2015-12-01 Tim Horton Remove swipe snapshot before main document load if scroll position is already restored https://bugs.webkit.org/show_bug.cgi?id=151224 Reviewed by Darin Adler. * UIProcess/Cocoa/WebViewImpl.h: * UIProcess/Cocoa/WebViewImpl.mm: (WebKit::WebViewImpl::didRestoreScrollPosition): * UIProcess/PageClient.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didRestoreScrollPosition): * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * UIProcess/mac/PageClientImpl.h: * UIProcess/mac/PageClientImpl.mm: (WebKit::PageClientImpl::didRestoreScrollPosition): * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::didRestoreScrollPosition): * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::didRestoreScrollPosition): * WebProcess/WebPage/WebPage.h: Plumb didRestoreScrollPosition through to ViewGestureController (yikes!). * UIProcess/ViewGestureController.cpp: (WebKit::ViewGestureController::didFirstVisuallyNonEmptyLayoutForMainFrame): Cancel waiting for any more loads if we get to firstVisuallyNonEmptyLayout. (WebKit::ViewGestureController::didReachMainFrameLoadTerminalState): Cancel waiting for scroll position restoration if we make it to main frame load, because there is a chance we won't be able to restore the old scroll position, and by main frame load time we've tried as hard as we're going to to restore it. * UIProcess/mac/ViewGestureControllerMac.mm: (WebKit::ViewGestureController::endSwipeGesture): Make some legacy-style-only code clearer that it's legacy-style-only. Wait for scroll position restoration. 2015-12-01 Carlos Garcia Campos REGRESSION(r192834): [GTK] Test /webkit2/WebKitWebView/editor-state/typing-attributes times out after r192834 https://bugs.webkit.org/show_bug.cgi?id=151699 Reviewed by Tim Horton. In r192834 the code to send EditorStateChanged message to the UI process from WebPage::didChangeSelection was removed for non-mac ports. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::didChangeSelection): Send EditorStateChanged message to the UI process also for non-mac ports, as before r192834. 2015-12-01 Carlos Garcia Campos Unreviewed. Fix timeouts in several HTTP layout tests in GTK+ after r192796. In r192796, the initialization of m_ignoreTLSErrors in WebProcessPool was removed by mistake, making all HTTP tests that use HTTPS fail due to invalid certificate errors. * UIProcess/WebProcessPool.h: Bring back m_ignoreTLSErrors initialization. 2015-12-01 Carlos Garcia Campos REGRESSION(r192247): [GTK] ASSERTION FAILED: type == WebCore::ActionType || type == WebCore::CheckableActionType || type == WebCore::SeparatorType https://bugs.webkit.org/show_bug.cgi?id=151513 Reviewed by Martin Robinson. This happens because we are using our own WebContextMenuItemGtk derived from WebContextMenuItemData, but using our own submenu items handling. We are using the non-submenu WebContextMenuItemData constructor to create our submenu items too, because WebContextMenuItemData always expect the submenu items to be passed to the constructor, but we have a set_submenu method in the public API. So we consider that a WebContextMenuItemGtk is SubmenuType if it has submenu items, but we use the action type internally. When converting a WebContextMenuItemGtk to a generic WebContextMenuItemData, we correctly set the type and pass the submenu items to the approriate constructor. * Shared/gtk/WebContextMenuItemGtk.cpp: (WebKit::WebContextMenuItemGtk::WebContextMenuItemGtk): When constructing from a WebContextMenuItemData, set the type as ActionType when it's a submenu type. * Shared/gtk/WebContextMenuItemGtk.h: (WebKit::WebContextMenuItemGtk::type): Return SubmenuType if submenu items vector is not empty, otherwise use the parent method. * UIProcess/API/gtk/WebKitContextMenuItem.cpp: (webkit_context_menu_item_new_with_submenu): Create the WebContextMenuItemGtk as ActionType. 2015-12-01 Carlos Garcia Campos Unreviewed. Add missing inspector files to the GTK+ build. * PlatformGTK.cmake: Add also Debug css files. 2015-11-30 Alexey Proskuryakov Build fix for some compiler versions. * UIProcess/ios/forms/WKAirPlayRoutePicker.mm: Disable deprecation warnings while processing SOFT_LINK_CLASS too. 2015-11-30 Jiewen Tan Null dereference loading Blink layout test http/tests/misc/detach-during-notifyDone.html https://bugs.webkit.org/show_bug.cgi?id=149309 Reviewed by Brent Fulgham. Callback of bundle clients could kill the documentloader. Therefore, make a copy of the navigationID before invoking the callback. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::dispatchDidChangeLocationWithinPage): (WebKit::WebFrameLoaderClient::dispatchDidPushStateWithinPage): (WebKit::WebFrameLoaderClient::dispatchDidReplaceStateWithinPage): (WebKit::WebFrameLoaderClient::dispatchDidPopStateWithinPage): (WebKit::WebFrameLoaderClient::dispatchDidFailLoad): (WebKit::WebFrameLoaderClient::dispatchDidFinishDocumentLoad): (WebKit::WebFrameLoaderClient::dispatchDidFinishLoad): 2015-11-30 Tim Horton Get rid of the !USE(ASYNC_NSTEXTINPUTCLIENT) codepath https://bugs.webkit.org/show_bug.cgi?id=151673 Reviewed by Anders Carlsson. * UIProcess/API/Cocoa/WKWebView.mm: * UIProcess/API/mac/WKView.mm: * UIProcess/Cocoa/WebViewImpl.h: * UIProcess/Cocoa/WebViewImpl.mm: (WebKit::WebViewImpl::resignFirstResponder): Deleted. (WebKit::WebViewImpl::interpretKeyEvent): Deleted. (WebKit::WebViewImpl::executeSavedKeypressCommands): Deleted. (WebKit::WebViewImpl::doCommandBySelector): Deleted. (WebKit::WebViewImpl::insertText): Deleted. (WebKit::WebViewImpl::inputContext): Deleted. (WebKit::WebViewImpl::selectedRange): Deleted. (WebKit::WebViewImpl::hasMarkedText): Deleted. (WebKit::WebViewImpl::unmarkText): Deleted. (WebKit::WebViewImpl::setMarkedText): Deleted. (WebKit::WebViewImpl::markedRange): Deleted. (WebKit::WebViewImpl::attributedSubstringForProposedRange): Deleted. (WebKit::WebViewImpl::characterIndexForPoint): Deleted. (WebKit::WebViewImpl::firstRectForCharacterRange): Deleted. (WebKit::WebViewImpl::performKeyEquivalent): Deleted. (WebKit::WebViewImpl::keyUp): Deleted. (WebKit::WebViewImpl::keyDown): Deleted. (WebKit::WebViewImpl::flagsChanged): Deleted. * UIProcess/PageClient.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::WebPageProxy): Deleted. (WebKit::WebPageProxy::resetStateAfterProcessExited): Deleted. * UIProcess/WebPageProxy.h: * UIProcess/mac/PageClientImpl.h: * UIProcess/mac/PageClientImpl.mm: (WebKit::PageClientImpl::notifyApplicationAboutInputContextChange): Deleted. * UIProcess/mac/WebPageProxyMac.mm: (WebKit::WebPageProxy::setComposition): Deleted. (WebKit::WebPageProxy::confirmComposition): Deleted. (WebKit::WebPageProxy::insertText): Deleted. (WebKit::WebPageProxy::insertDictatedText): Deleted. (WebKit::WebPageProxy::getMarkedRange): Deleted. (WebKit::WebPageProxy::getSelectedRange): Deleted. (WebKit::WebPageProxy::getAttributedSubstringFromRange): Deleted. (WebKit::WebPageProxy::characterIndexForPoint): Deleted. (WebKit::WebPageProxy::firstRectForCharacterRange): Deleted. (WebKit::WebPageProxy::executeKeypressCommands): Deleted. (WebKit::WebPageProxy::cancelComposition): Deleted. (WebKit::WebPageProxy::editorStateChanged): Deleted. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::didChangeSelection): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::setComposition): Deleted. (WebKit::WebPage::confirmComposition): Deleted. (WebKit::WebPage::insertText): Deleted. (WebKit::WebPage::insertDictatedText): Deleted. (WebKit::WebPage::getMarkedRange): Deleted. (WebKit::WebPage::getSelectedRange): Deleted. (WebKit::WebPage::getAttributedSubstringFromRange): Deleted. (WebKit::WebPage::characterIndexForPoint): Deleted. (WebKit::WebPage::firstRectForCharacterRange): Deleted. (WebKit::WebPage::executeKeypressCommands): Deleted. (WebKit::WebPage::cancelComposition): Deleted. 2015-11-30 Tim Horton Remove some unused synchronous drawing SPI https://bugs.webkit.org/show_bug.cgi?id=151672 Reviewed by Anders Carlsson. * UIProcess/API/Cocoa/WKViewPrivate.h: * UIProcess/API/mac/WKView.mm: (-[WKView forceAsyncDrawingAreaSizeUpdate:]): Deleted. (-[WKView waitForAsyncDrawingAreaSizeUpdate]): Deleted. * UIProcess/Cocoa/WebViewImpl.h: * UIProcess/Cocoa/WebViewImpl.mm: (WebKit::WebViewImpl::forceAsyncDrawingAreaSizeUpdate): Deleted. (WebKit::WebViewImpl::waitForAsyncDrawingAreaSizeUpdate): Deleted. 2015-11-30 Tim Horton Get rid of the legacy swipe shadow style https://bugs.webkit.org/show_bug.cgi?id=151671 Reviewed by Anders Carlsson. * UIProcess/mac/ViewGestureControllerMac.mm: (WebKit::ViewGestureController::beginSwipeGesture): Deleted. (WebKit::ViewGestureController::handleSwipeGesture): Deleted. (WebKit::ViewGestureController::removeSwipeSnapshot): Deleted. It is no longer needed. 2015-11-30 Tim Horton [iOS] Option-up and Option-down should scroll a little less than a full page https://bugs.webkit.org/show_bug.cgi?id=151538 Reviewed by Simon Fraser. * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView _scrollOffsetForEvent:]): (-[WKContentView _interpretKeyEvent:isCharEvent:]): Clean up the code a little, and adjust so that we *always* use pageStep instead of just scrolling by the unobscured rect when scrolling by a page. Previously, we did for the spacebar, but not for option-up and option-down. 2015-11-30 Brian Burg Web Inspector: using "Reload Web Inspector" when docked breaks dock-specific styles https://bugs.webkit.org/show_bug.cgi?id=151642 Reviewed by Timothy Hatcher. After a frontend loads, explicitly tell it about the current dock state. This is necessary for force-reloading the inspector, since the dock state isn't sent from UIProcess in this case. * WebProcess/WebPage/WebInspectorUI.cpp: (WebKit::WebInspectorUI::frontendLoaded): (WebKit::WebInspectorUI::setDockingUnavailable): * WebProcess/WebPage/WebInspectorUI.h: 2015-11-30 Alex Christensen Make ProcessModel always MultipleSecondaryProcesses https://bugs.webkit.org/show_bug.cgi?id=151662 Reviewed by Antti Koivisto. Single WebProcess behavior can still be achieved by setting the maximum number of WebProcesses to 1. * Shared/API/c/WKDeprecatedFunctions.cpp: (WKContextSetUsesNetworkProcess): (WKContextSetProcessModel): (WKContextGetProcessModel): (WKGraphicsContextGetCGContext): * UIProcess/API/APIProcessPoolConfiguration.cpp: (API::ProcessPoolConfiguration::createWithLegacyOptions): (API::ProcessPoolConfiguration::copy): * UIProcess/API/APIProcessPoolConfiguration.h: * UIProcess/API/C/WKAPICast.h: (WebKit::toAPI): (WebKit::toFontSmoothingLevel): (WebKit::toProcessModel): Deleted. * UIProcess/API/C/WKContext.cpp: (WKContextGetCacheModel): (WKContextSetMaximumNumberOfProcesses): (WKContextSetProcessModel): Deleted. (WKContextGetProcessModel): Deleted. * UIProcess/API/C/WKContext.h: * UIProcess/API/Cocoa/WKProcessGroup.mm: (-[WKProcessGroup initWithInjectedBundleURL:]): * UIProcess/API/Cocoa/WKProcessPool.mm: * UIProcess/API/efl/ewk_context.cpp: (EwkContext::cacheModel): (EwkContext::setProcessModel): (EwkContext::processModel): (EwkContext::clearResourceCache): (EwkContext::jsGlobalContext): (ewk_context_message_from_extensions_callback_set): (ewk_context_process_model_set): (ewk_context_process_model_get): (ewk_context_tls_error_policy_get): (toWKProcessModel): Deleted. (toEwkProcessModel): Deleted. * UIProcess/API/gtk/WebKitWebContext.cpp: * UIProcess/ProcessModel.h: Removed. * UIProcess/WebCookieManagerProxy.cpp: (WebKit::WebCookieManagerProxy::shouldTerminate): (WebKit::WebCookieManagerProxy::refWebContextSupplement): * UIProcess/WebInspectorProxy.cpp: (WebKit::WebInspectorProxy::inspectorProcessPool): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::reattachToWebProcess): * UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::create): (WebKit::WebProcessPool::setDownloadClient): (WebKit::WebProcessPool::setMaximumNumberOfProcesses): (WebKit::WebProcessPool::processDidCachePage): (WebKit::WebProcessPool::createNewWebProcess): (WebKit::WebProcessPool::disconnectProcess): (WebKit::WebProcessPool::createWebPage): (WebKit::WebProcessPool::postMessageToInjectedBundle): (WebKit::WebProcessPool::requestWebContentStatistics): (WebKit::WebProcessPool::requestNetworkingStatistics): (WebKit::WebProcessPool::setProcessModel): Deleted. (WebKit::WebProcessPool::ensureSharedWebProcess): Deleted. * UIProcess/WebProcessPool.h: (WebKit::WebProcessPool::sendToAllProcessesRelaunchingThemIfNecessary): (WebKit::WebProcessPool::sendToOneProcess): * WebKit2.xcodeproj/project.pbxproj: 2015-11-30 Chris Dumez [WK2][Cache] We should not speculatively revalidate transient resources https://bugs.webkit.org/show_bug.cgi?id=151402 Reviewed by Antti Koivisto. We should not speculatively revalidate transient resources. This patch adds a simple and conservative algorithm to detect that a subresource is transient and then ignores those when doing the speculative revalidation. The algorithm is question marks as transient all subresources that are not common to the 2 last loads of a main resource. This is not perfect as I see the number of non-speculative revalidations going up to 11-12 from 9 in the context of the warm PLT. However, it is best to be conservative at first and we can improve this later. * NetworkProcess/cache/NetworkCache.cpp: (WebKit::NetworkCache::Cache::retrieve): * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp: (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::create): (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::~PendingFrameLoad): (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::registerSubresource): (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::markLoadAsCompleted): (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::setExistingSubresourcesEntry): (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::PendingFrameLoad): (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::saveToDiskIfReady): (WebKit::NetworkCache::SpeculativeLoadManager::registerLoad): (WebKit::NetworkCache::SpeculativeLoadManager::startSpeculativeRevalidation): (WebKit::NetworkCache::SpeculativeLoadManager::retrieveSubresourcesEntry): (WebKit::NetworkCache::SpeculativeLoadManager::retrieve): Deleted. (WebKit::NetworkCache::SpeculativeLoadManager::revalidateEntry): Deleted. * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.h: * NetworkProcess/cache/NetworkCacheSubresourcesEntry.cpp: (WebKit::NetworkCache::SubresourcesEntry::encodeAsStorageRecord): (WebKit::NetworkCache::SubresourcesEntry::decodeStorageRecord): (WebKit::NetworkCache::SubresourcesEntry::SubresourcesEntry): (WebKit::NetworkCache::SubresourcesEntry::updateSubresourceKeys): * NetworkProcess/cache/NetworkCacheSubresourcesEntry.h: (WebKit::NetworkCache::SubresourcesEntry::SubresourceInfo::encode): (WebKit::NetworkCache::SubresourcesEntry::SubresourceInfo::decode): (WebKit::NetworkCache::SubresourcesEntry::SubresourceInfo::SubresourceInfo): (WebKit::NetworkCache::SubresourcesEntry::subresources): 2015-11-30 Brent Fulgham [Mac] Add font service permission to the sandbox profile https://bugs.webkit.org/show_bug.cgi?id=151509 Reviewed by Anders Carlsson. Update the sandbox profile for Mac WebKit to allow access to the "com.apple.fonts" service. * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb: * WebProcess/com.apple.WebProcess.sb.in: 2015-11-30 Alex Christensen Make usesNetworkProcess always true https://bugs.webkit.org/show_bug.cgi?id=151580 Reviewed by Darin Adler. * NetworkProcess/mac/RemoteNetworkingContext.mm: (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession): * Shared/API/c/WKDeprecatedFunctions.cpp: (WKInspectorToggleJavaScriptProfiling): (WKContextSetUsesNetworkProcess): (WKGraphicsContextGetCGContext): * Shared/Network/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm: (WebKit::CustomProtocolManager::initializeConnection): (WebKit::CustomProtocolManager::initialize): * Shared/Network/CustomProtocols/CustomProtocolManager.h: * Shared/Network/CustomProtocols/soup/CustomProtocolManagerSoup.cpp: (WebKit::CustomProtocolManager::initialize): * Shared/WebProcessCreationParameters.cpp: (WebKit::WebProcessCreationParameters::WebProcessCreationParameters): (WebKit::WebProcessCreationParameters::encode): (WebKit::WebProcessCreationParameters::decode): * Shared/WebProcessCreationParameters.h: * UIProcess/API/APIProcessPoolConfiguration.cpp: (API::ProcessPoolConfiguration::createWithLegacyOptions): (API::ProcessPoolConfiguration::copy): * UIProcess/API/APIProcessPoolConfiguration.h: * UIProcess/API/C/WKContext.cpp: (WKContextSetJavaScriptGarbageCollectorTimerEnabled): (WKContextUseTestingNetworkSession): (WKContextSetUsesNetworkProcess): Deleted. * UIProcess/API/C/WKContextPrivate.h: * UIProcess/API/Cocoa/WKProcessGroup.mm: (-[WKProcessGroup initWithInjectedBundleURL:]): * UIProcess/API/efl/ewk_context.cpp: (EwkContext::setProcessModel): * UIProcess/Cocoa/WebProcessPoolCocoa.mm: (WebKit::WebProcessPool::updateProcessSuppressionState): (WebKit::WebProcessPool::platformInitializeWebProcess): * UIProcess/Downloads/DownloadProxy.cpp: (WebKit::DownloadProxy::cancel): (WebKit::DownloadProxy::invalidate): * UIProcess/WebCookieManagerProxy.cpp: (WebKit::WebCookieManagerProxy::setHTTPCookieAcceptPolicy): (WebKit::WebCookieManagerProxy::getHTTPCookieAcceptPolicy): * UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::WebProcessPool): (WebKit::m_processSuppressionDisabledForPageCounter): (WebKit::WebProcessPool::networkingProcessConnection): (WebKit::WebProcessPool::languageChanged): (WebKit::WebProcessPool::textCheckerStateChanged): (WebKit::WebProcessPool::ensureNetworkProcess): (WebKit::WebProcessPool::setAnyPageGroupMightHavePrivateBrowsingEnabled): (WebKit::WebProcessPool::createNewWebProcess): (WebKit::WebProcessPool::download): (WebKit::WebProcessPool::resumeDownload): (WebKit::WebProcessPool::setCanHandleHTTPSServerTrustEvaluation): (WebKit::WebProcessPool::setCacheModel): (WebKit::WebProcessPool::createDownloadProxy): (WebKit::WebProcessPool::addMessageReceiver): (WebKit::WebProcessPool::allowSpecificHTTPSCertificateForHost): (WebKit::WebProcessPool::setHTTPPipeliningEnabled): (WebKit::WebProcessPool::requestNetworkingStatistics): (WebKit::WebProcessPool::setUsesNetworkProcess): Deleted. (WebKit::WebProcessPool::usesNetworkProcess): Deleted. * UIProcess/WebProcessPool.h: (WebKit::WebProcessPool::sendToNetworkingProcess): (WebKit::WebProcessPool::sendToNetworkingProcessRelaunchingIfNecessary): * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::shutDown): (WebKit::WebProcessProxy::removeWebPage): (WebKit::WebProcessProxy::canTerminateChildProcess): (WebKit::WebProcessProxy::updateTextCheckerState): (WebKit::WebProcessProxy::didSaveToPageCache): (WebKit::WebProcessProxy::didSetAssertionState): (WebKit::WebProcessProxy::createDownloadProxy): Deleted. * UIProcess/WebProcessProxy.h: * UIProcess/efl/WebProcessPoolEfl.cpp: (WebKit::WebProcessPool::platformInitializeWebProcess): (WebKit::WebProcessPool::setIgnoreTLSErrors): * WebProcess/FileAPI/BlobRegistryProxy.cpp: (WebKit::BlobRegistryProxy::registerFileBlobURL): (WebKit::BlobRegistryProxy::registerBlobURL): (WebKit::BlobRegistryProxy::unregisterBlobURL): (WebKit::BlobRegistryProxy::registerBlobURLForSlice): (WebKit::BlobRegistryProxy::blobSize): * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: (WebKit::WebPlatformStrategies::cookiesForDOM): (WebKit::WebPlatformStrategies::setCookiesFromDOM): (WebKit::WebPlatformStrategies::cookiesEnabled): (WebKit::WebPlatformStrategies::cookieRequestHeaderFieldValue): (WebKit::WebPlatformStrategies::getRawCookies): (WebKit::WebPlatformStrategies::deleteCookie): (WebKit::WebPlatformStrategies::resourceLoadScheduler): (WebKit::WebPlatformStrategies::loadResourceSynchronously): (WebKit::WebPlatformStrategies::createPingHandle): (WebKit::WebPlatformStrategies::createBlobRegistry): * WebProcess/WebPage/WebFrame.cpp: (WebKit::WebFrame::startDownload): (WebKit::WebFrame::convertMainResourceLoadToDownload): (WebKit::WebFrame::source): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::WebProcess): (WebKit::m_webSQLiteDatabaseTracker): (WebKit::WebProcess::initializeConnection): (WebKit::WebProcess::initializeWebProcess): (WebKit::WebProcess::ensureNetworkProcessConnection): (WebKit::WebProcess::destroyPrivateBrowsingSession): (WebKit::WebProcess::pluginProcessConnectionManager): (WebKit::WebProcess::shouldTerminate): (WebKit::WebProcess::setInjectedBundleParameters): (WebKit::WebProcess::networkConnection): (WebKit::WebProcess::setEnhancedAccessibility): (WebKit::WebProcess::prefetchDNS): (WebKit::WebProcess::didCreateDownload): Deleted. (WebKit::WebProcess::didDestroyDownload): Deleted. (WebKit::WebProcess::downloadProxyConnection): Deleted. (WebKit::WebProcess::downloadsAuthenticationManager): Deleted. (WebKit::WebProcess::downloadManager): Deleted. (WebKit::WebProcess::usesNetworkProcess): Deleted. (WebKit::WebProcess::downloadRequest): Deleted. (WebKit::WebProcess::resumeDownload): Deleted. (WebKit::WebProcess::cancelDownload): Deleted. * WebProcess/WebProcess.h: (WebKit::WebProcess::textCheckerState): (WebKit::WebProcess::eventDispatcher): * WebProcess/WebProcess.messages.in: * WebProcess/soup/WebProcessSoup.cpp: (WebKit::WebProcess::platformSetCacheModel): (WebKit::WebProcess::platformClearResourceCaches): (WebKit::WebProcess::platformInitializeWebProcess): (WebKit::WebProcess::platformTerminate): (WebKit::getCacheDiskFreeSize): Deleted. (WebKit::setSoupSessionAcceptLanguage): Deleted. (WebKit::languageChanged): Deleted. (WebKit::WebProcess::setIgnoreTLSErrors): Deleted. (WebKit::WebProcess::allowSpecificHTTPSCertificateForHost): Deleted. 2015-11-30 Carlos Garcia Campos [GTK] UI process crash when the screensaver DBus proxy is being created while the web view is destroyed https://bugs.webkit.org/show_bug.cgi?id=151653 Reviewed by Martin Robinson. We correctly cancel the proxy creation, but when the async ready callback is called, the view could be destroyed already. In that case g_dbus_proxy_new_for_bus_finish() will return nullptr and fail with cancelled error, but we are using the passed web view without checking first if the creation failed or not. * UIProcess/API/gtk/WebKitWebViewBase.cpp: (screenSaverProxyCreatedCallback): 2015-11-28 Tim Horton Stop unnecessarily copying WKWebViewConfiguration in a few places https://bugs.webkit.org/show_bug.cgi?id=151639 Reviewed by Dan Bernstein. * UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView initWithFrame:configuration:]): (-[WKWebView dealloc]): (-[WKWebView _contentProviderRegistry]): (-[WKWebView _selectionGranularity]): (-[WKWebView _setHasCustomContentView:loadedMIMEType:]): * UIProcess/API/Cocoa/WKWebViewInternal.h: * UIProcess/ios/PageClientImplIOS.mm: (WebKit::PageClientImpl::mimeTypesWithCustomContentProviders): * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView setupInteraction]): (-[WKContentView _stopAssistingKeyboard]): Looking at allocation traces I noticed that we were making way more WKWebViewConfigurations than made sense; looking at backtraces I found a few internal callers of -[WKWebView configuration], which copies the configuration. There's no reason for these internal callers to make such a copy, though. I'm not exactly sure what the usual approach is here, but I added getters so WKContentViewInteraction and PageClientImplIOS can get to the values they're looking for without using the configuration property. 2015-11-27 Brady Eidson Modern IDB: Class-ify IDBGetResult making it impossible to get the data members wrong. https://bugs.webkit.org/show_bug.cgi?id=151627 Reviewed by Alexey Proskuryakov. * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp: (WebKit::UniqueIDBDatabase::getRecordFromBackingStore): * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h: * DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h: * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp: (WebKit::UniqueIDBDatabaseBackingStoreSQLite::getIndexRecord): * Shared/WebCoreArgumentCoders.cpp: (IPC::ArgumentCoder::encode): (IPC::ArgumentCoder::decode): * Shared/WebCoreArgumentCoders.h: * WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in: 2015-11-27 Carlos Garcia Campos [GTK] Remove the remaining uses of GMainLoopSource https://bugs.webkit.org/show_bug.cgi?id=151632 Reviewed by Žan Doberšek. * UIProcess/API/gtk/WebKitWebViewBase.cpp: (_WebKitWebViewBasePrivate::_WebKitWebViewBasePrivate): (_WebKitWebViewBasePrivate::clearRedirectedWindowSoonTimerFired): (webkitWebViewBaseClearRedirectedWindowSoon): (webkitWebViewBaseEnterAcceleratedCompositingMode): 2015-11-23 Carlos Garcia Campos [GTK] Use the network process unconditionally https://bugs.webkit.org/show_bug.cgi?id=151541 Reviewed by Alex Christensen. Make the shared secondary process model become multiple secondary process model with a limit of 1 web process. Use the same options when creating a context with legacy configuration (unit tests and inspector proxy). * NetworkProcess/gtk/NetworkProcessMainGtk.cpp: * UIProcess/API/APIProcessPoolConfiguration.cpp: (API::ProcessPoolConfiguration::createWithLegacyOptions): * UIProcess/API/gtk/WebKitWebContext.cpp: (webkitWebContextConstructed): (webkit_web_context_set_process_model): (webkit_web_context_get_process_model): (webkit_web_context_set_web_process_count_limit): (webkit_web_context_get_web_process_count_limit): (toWebKitProcessModel): Deleted. * UIProcess/gtk/WebInspectorProxyGtk.cpp: * UIProcess/gtk/WebProcessPoolGtk.cpp: (WebKit::WebProcessPool::setIgnoreTLSErrors): (WebKit::WebProcessPool::platformInitializeWebProcess): 2015-11-23 Brian Burg Web Inspector: inspector settings should not be shared between different inspection levels https://bugs.webkit.org/show_bug.cgi?id=151151 Reviewed by Timothy Hatcher. In WebKit2, we already track the inspection level of WebPages in order to give inspectors different page groups. Send the inspection level to WebInspectorUI WebProcess when establishing a connection from the UIProcess. Use this number in the FrontendClient. * UIProcess/WebInspectorProxy.cpp: (WebKit::WebInspectorProxy::inspectionLevel): Renamed from inspectorLevel to be consistent. (WebKit::WebInspectorProxy::inspectorPageGroupIdentifier): (WebKit::WebInspectorProxy::didRelaunchInspectorPageProcess): (WebKit::WebInspectorProxy::eagerlyCreateInspectorPage): (WebKit::WebInspectorProxy::createInspectorPage): (WebKit::WebInspectorProxy::inspectorLevel): Deleted. * UIProcess/WebInspectorProxy.h: * UIProcess/mac/WebInspectorProxyMac.mm: (WebKit::WebInspectorProxy::updateInspectorWindowTitle): * WebProcess/WebPage/WebInspectorUI.cpp: (WebKit::WebInspectorUI::establishConnection): * WebProcess/WebPage/WebInspectorUI.h: * WebProcess/WebPage/WebInspectorUI.messages.in: 2015-11-23 Gyuyoung Kim REGRESSION(r188206): [EFL] Missing to adjust scrollbar size to ewk_view_contents_size_get API test https://bugs.webkit.org/show_bug.cgi?id=148735 Reviewed by Csaba Osztrogonác. r189256 missed to adjust scrollbar size to other tests in ewk_view_contents_size_get() API test. In this case we need to apply scrollbar size to both width and height unlike previous fix. Because horizontal scrollbar is also shown since device pixel ratio(= 2.0) is adjusted. * UIProcess/API/efl/tests/test_ewk2_view.cpp: (TEST_F): 2015-11-23 Alex Christensen Fix crash in ~WebProcessPool when using Geolocation with useNetworkProcess=true https://bugs.webkit.org/show_bug.cgi?id=151532 Reviewed by Benjamin Poulain. * UIProcess/WebGeolocationManagerProxy.cpp: (WebKit::WebGeolocationManagerProxy::processPoolDestroyed): (WebKit::WebGeolocationManagerProxy::processDidClose): When a WebProcessPool is destroyed, only call stopUpdating if m_updateRequesters.clear() stopped the updating, like we do in WebGeolocationManagerProxy::removeRequester. Otherwise, call setEnableHighAccuracy if needed, also like we do in WebGeolocationManagerProxy::removeRequester. 2015-11-23 Brian Burg Web Inspector: when inspecting the inspector, add the inspection level to the title bar https://bugs.webkit.org/show_bug.cgi?id=151555 Reviewed by Timothy Hatcher. If the inspection level says we are inspecting an inspector, include the level in the title bar to easily disambiguate it from the base level inspector. * UIProcess/mac/WebInspectorProxyMac.mm: (WebKit::WebInspectorProxy::updateInspectorWindowTitle): 2015-11-23 Csaba Osztrogonác Unreviewed speculative buildfix after r192701. * PlatformMac.cmake: 2015-11-23 Carlos Garcia Campos Unreviewed. Update OptionsGTK.cmake and NEWS for 2.11.2 release. * gtk/NEWS: Add release notes for 2.11.2. 2015-11-22 Carlos Garcia Campos Unreviewed. Add missing inspector file to GTK+ compilation. * PlatformGTK.cmake: == Rolled over to ChangeLog-2015-11-21 ==