haikuwebkit/Source/WebKit/ChangeLog-2015-11-21

62905 lines
2.7 MiB
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

2015-11-20 Simon Fraser <simon.fraser@apple.com>
More deviceRGB color cleanup
https://bugs.webkit.org/show_bug.cgi?id=151523
<rdar://problem/23638597>
Reviewed by Tim Horton.
Replace calls to deviceRGBColorSpaceRef() with sRGBColorSpaceRef(), and use
sRGBColorSpaceRef() in a few places that were manually creating the colorspace.
Also use cachedCGColor() in a more places that were manually constructing CGColorRefs
from Colors.
* Shared/cg/ShareableBitmapCG.cpp:
(WebKit::ShareableBitmap::createGraphicsContext):
(WebKit::ShareableBitmap::createCGImage):
* Shared/mac/RemoteLayerTreePropertyApplier.mm:
(WebKit::cgColorFromColor):
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::initializeDebugIndicator):
2015-11-20 Geoffrey Garen <ggaren@apple.com>
A window with a hung tab waits 5s before becoming active
https://bugs.webkit.org/show_bug.cgi?id=151426
Reviewed by Sam Weinig.
This patch adds an optimization to skip the synchronous web process
message to check for a legacy scrollbar when we know that legacy
scrollbars are not enabled.
(Note that legacy scrollbars don't work quite right, due to
<rdar://problem/23585420> and <rdar://problem/23605296>. Still, I verified
with logging that we do the synchronous message when legacy scrollbars
are enabled.)
A consequence of this change is that we will no longer support
click-to-scroll-while-inactive behavior for scrollbars with custom looks
on systems with modern scrollbars. I spoke with Beth and Dan, and they
agreed that this is a reasonable change to make, since we don't support
click-to-scroll-while-inactive behavior for fully custom scrollbars either,
and since systems with modern scrollbars typically use swipe to scroll.
* UIProcess/Cocoa/WebViewImpl.h: Added some helper functions to explain
the behaviors we're checking for.
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::mightBeginDragWhileInactive): Factored out from
shouldDelayWindowOrderingForEvent.
(WebKit::WebViewImpl::mightBeginScrollWhileInactive): New function.
(WebKit::WebViewImpl::acceptsFirstMouse): Moved this function next to
shouldDelayWindowOrderingForEvent because their responsibilities are
very similar. Added a fast path check for when we know that we will
not accept first mouse because we can't start a drag or scroll by
clicking while inactive.
(WebKit::WebViewImpl::shouldDelayWindowOrderingForEvent): Refactored
to use the helper function. Behavior unchanged.
2015-11-20 Geoffrey Garen <ggaren@apple.com>
A hung webpage pretends to be responsive if you scroll
https://bugs.webkit.org/show_bug.cgi?id=151518
Reviewed by Sam Weinig.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::sendWheelEvent):
(WebKit::WebPageProxy::didReceiveEvent): Don't treat wheel events as
starting or stopping the responsiveness timer. Wheel events usually
process on the event dispatch thread, which responds even if the main
thread is hung.
Instead, send an out-of-band ping to the main thread to verify that
it is still responsive and we'll be able to paint and respond to clicks
after scrolling.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::sendMainThreadPing):
(WebKit::WebProcessProxy::didReceiveMainThreadPing):
* UIProcess/WebProcessProxy.h:
* UIProcess/WebProcessProxy.messages.in: UI process support for pinging
the main thread in the web process.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::mainThreadPing):
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in: Web process support for responding
to pings.
2015-11-20 Simon Fraser <simon.fraser@apple.com>
Allow more buffer formats in the IOSurface pool
https://bugs.webkit.org/show_bug.cgi?id=151516
Reviewed by Tim Horton.
Have RemoteLayerBackingStore go through a static function on IOSurface to return
a surface to the pool, rather than knowing about IOSurfacePool directly.
* Shared/mac/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::Buffer::discard):
2015-11-20 Alex Christensen <achristensen@webkit.org>
Remove NETWORK_PROCESS compile flag
https://bugs.webkit.org/show_bug.cgi?id=151512
Reviewed by Tim Horton.
* CMakeLists.txt:
* NetworkProcess/EntryPoint/mac/LegacyProcess/NetworkProcessMain.mm:
(NetworkProcessMain):
* NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
(NetworkServiceInitializer):
* NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
(WebKit::NetworkBlobRegistry::filesInBlob):
* NetworkProcess/FileAPI/NetworkBlobRegistry.h:
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::blobSize):
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* NetworkProcess/NetworkLoad.cpp:
* NetworkProcess/NetworkLoad.h:
* NetworkProcess/NetworkLoadClient.h:
* NetworkProcess/NetworkLoadParameters.cpp:
(WebKit::NetworkLoadParameters::NetworkLoadParameters):
* NetworkProcess/NetworkLoadParameters.h:
* NetworkProcess/NetworkProcess.cpp:
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in:
* NetworkProcess/NetworkResourceLoader.cpp:
* NetworkProcess/NetworkResourceLoader.h:
* NetworkProcess/NetworkResourceLoader.messages.in:
* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::clearDiskCache):
* NetworkProcess/efl/NetworkProcessMainEfl.cpp:
(WebKit::NetworkProcessMainUnix):
* NetworkProcess/gtk/NetworkProcessMainGtk.cpp:
(WebKit::NetworkProcessMainUnix):
* NetworkProcess/ios/NetworkProcessIOS.mm:
* NetworkProcess/mac/NetworkLoadMac.mm:
* NetworkProcess/mac/NetworkProcessMac.mm:
* NetworkProcess/mac/NetworkResourceLoaderMac.mm:
(WebKit::NetworkResourceLoader::willCacheResponseAsync):
* NetworkProcess/soup/NetworkProcessSoup.cpp:
(WebKit::NetworkProcess::platformTerminate):
* NetworkProcess/soup/RemoteNetworkingContextSoup.cpp:
(WebKit::RemoteNetworkingContext::storageSession):
* Shared/Authentication/AuthenticationManager.cpp:
(WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):
* Shared/Network/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm:
(WebKit::CustomProtocolManager::initialize):
(WebKit::CustomProtocolManager::addCustomProtocol):
* Shared/Network/CustomProtocols/CustomProtocolManager.h:
* Shared/Network/CustomProtocols/soup/CustomProtocolManagerSoup.cpp:
(WebKit::CustomProtocolManager::supplementName):
(WebKit::CustomProtocolManager::initialize):
(WebKit::CustomProtocolManager::registerScheme):
* Shared/Network/NetworkProcessCreationParameters.cpp:
(WebKit::NetworkProcessCreationParameters::decode):
* Shared/Network/NetworkProcessCreationParameters.h:
* Shared/Network/NetworkProcessSupplement.h:
(WebKit::NetworkProcessSupplement::initialize):
* Shared/Network/NetworkResourceLoadParameters.cpp:
(WebKit::NetworkResourceLoadParameters::decode):
* Shared/Network/NetworkResourceLoadParameters.h:
* Shared/ProcessExecutablePath.h:
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* Shared/efl/ProcessExecutablePathEfl.cpp:
(WebKit::executablePathOfPluginProcess):
(WebKit::executablePathOfNetworkProcess):
(WebKit::executablePathOfDatabaseProcess):
* Shared/gtk/ProcessExecutablePathGtk.cpp:
(WebKit::executablePathOfPluginProcess):
(WebKit::executablePathOfNetworkProcess):
(WebKit::executablePathOfDatabaseProcess):
* Shared/mac/CookieStorageShim.h:
* Shared/mac/CookieStorageShim.mm:
(-[WKNSURLSessionLocal _getCookieHeadersForTask:completionHandler:]):
* Shared/mac/CookieStorageShimLibrary.cpp:
* Shared/mac/CookieStorageShimLibrary.h:
* UIProcess/API/APISession.cpp:
(API::Session::~Session):
* UIProcess/API/C/mac/WKContextPrivateMac.mm:
(WKContextGetNetworkProcessIdentifier):
* UIProcess/API/efl/ewk_context.cpp:
(ewk_context_process_model_set):
(ewk_context_process_model_get):
(ewk_context_tls_error_policy_get):
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::updateProcessSuppressionState):
(WebKit::WebProcessPool::platformInitializeWebProcess):
(WebKit::WebProcessPool::platformInitializeNetworkProcess):
(WebKit::WebProcessPool::platformInvalidateContext):
* UIProcess/Downloads/DownloadProxy.cpp:
(WebKit::DownloadProxy::cancel):
* UIProcess/Launcher/ProcessLauncher.cpp:
(WebKit::ProcessLauncher::processTypeAsString):
(WebKit::ProcessLauncher::getProcessTypeFromString):
* UIProcess/Launcher/ProcessLauncher.h:
* UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
(WebKit::ProcessLauncher::launchProcess):
* UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
(WebKit::ProcessLauncher::launchProcess):
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::computeProcessShimPath):
(WebKit::serviceName):
(WebKit::shouldLeakBoost):
(WebKit::createProcess):
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::setIsHoldingLockedFiles):
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/Network/NetworkProcessProxy.messages.in:
* UIProcess/Network/mac/NetworkProcessProxyMac.mm:
(WebKit::NetworkProcessProxy::platformGetLaunchOptions):
* UIProcess/Network/soup/NetworkProcessProxySoup.cpp:
(WebKit::NetworkProcessProxy::platformGetLaunchOptions):
* UIProcess/WebCookieManagerProxy.cpp:
(WebKit::WebCookieManagerProxy::setHTTPCookieAcceptPolicy):
(WebKit::WebCookieManagerProxy::getHTTPCookieAcceptPolicy):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::setSessionID):
(WebKit::WebPageProxy::initializeWebPage):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::WebProcessPool):
(WebKit::WebProcessPool::~WebProcessPool):
(WebKit::WebProcessPool::initializeClient):
(WebKit::WebProcessPool::networkingProcessConnection):
(WebKit::WebProcessPool::languageChanged):
(WebKit::WebProcessPool::setUsesNetworkProcess):
(WebKit::WebProcessPool::usesNetworkProcess):
(WebKit::WebProcessPool::ensureNetworkProcess):
(WebKit::WebProcessPool::getNetworkProcessConnection):
(WebKit::WebProcessPool::ensureDatabaseProcess):
(WebKit::WebProcessPool::setAnyPageGroupMightHavePrivateBrowsingEnabled):
(WebKit::WebProcessPool::createNewWebProcess):
(WebKit::WebProcessPool::download):
(WebKit::WebProcessPool::resumeDownload):
(WebKit::WebProcessPool::setAdditionalPluginsDirectory):
(WebKit::WebProcessPool::networkProcessIdentifier):
(WebKit::WebProcessPool::setAlwaysUsesComplexTextCodePath):
(WebKit::WebProcessPool::setCanHandleHTTPSServerTrustEvaluation):
(WebKit::WebProcessPool::registerURLSchemeAsLocal):
(WebKit::WebProcessPool::setCacheModel):
(WebKit::WebProcessPool::setDefaultRequestTimeoutInterval):
(WebKit::WebProcessPool::createDownloadProxy):
(WebKit::WebProcessPool::useTestingNetworkSession):
(WebKit::WebProcessPool::allowSpecificHTTPSCertificateForHost):
(WebKit::WebProcessPool::requestNetworkingStatistics):
(WebKit::WebProcessPool::handleMessage):
* UIProcess/WebProcessPool.h:
(WebKit::WebProcessPool::sendToNetworkingProcess):
(WebKit::WebProcessPool::sendToNetworkingProcessRelaunchingIfNecessary):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::getPluginProcessConnection):
(WebKit::WebProcessProxy::getNetworkProcessConnection):
(WebKit::WebProcessProxy::getDatabaseProcessConnection):
(WebKit::WebProcessProxy::createDownloadProxy):
(WebKit::WebProcessProxy::didCancelProcessSuspension):
(WebKit::WebProcessProxy::reinstateNetworkProcessAssertionState):
(WebKit::WebProcessProxy::didSetAssertionState):
* UIProcess/WebProcessProxy.h:
(WebKit::WebProcessProxy::throttler):
* UIProcess/WebProcessProxy.messages.in:
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::~WebsiteDataStore):
(WebKit::WebsiteDataStore::cloneSessionData):
* UIProcess/gtk/WebProcessPoolGtk.cpp:
(WebKit::initInspectorServer):
(WebKit::WebProcessPool::setIgnoreTLSErrors):
* UIProcess/soup/WebProcessPoolSoup.cpp:
(WebKit::WebProcessPool::platformInitializeNetworkProcess):
* WebKit2Prefix.h:
* WebProcess/FileAPI/BlobRegistryProxy.cpp:
(WebKit::BlobRegistryProxy::blobSize):
* WebProcess/FileAPI/BlobRegistryProxy.h:
* WebProcess/Network/NetworkProcessConnection.cpp:
* WebProcess/Network/NetworkProcessConnection.h:
* WebProcess/Network/NetworkProcessConnection.messages.in:
* WebProcess/Network/WebResourceLoadScheduler.cpp:
(WebKit::WebResourceLoadScheduler::networkProcessCrashed):
* WebProcess/Network/WebResourceLoadScheduler.h:
* WebProcess/Network/WebResourceLoader.cpp:
* WebProcess/Network/WebResourceLoader.h:
* WebProcess/Network/WebResourceLoader.messages.in:
* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
(WebKit::initializeBrowserFuncs):
(WebKit::netscapeBrowserFuncs):
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::registerRedirect):
(WebKit::NetscapePlugin::urlRedirectResponse):
* 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::createBlobRegistry):
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::startDownload):
(WebKit::WebFrame::convertMainResourceLoadToDownload):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess):
(WebKit::WebProcess::initializeWebProcess):
(WebKit::WebProcess::ensureNetworkProcessConnection):
(WebKit::WebProcess::registerURLSchemeAsEmptyDocument):
(WebKit::WebProcess::usesNetworkProcess):
(WebKit::WebProcess::networkConnection):
(WebKit::WebProcess::webResourceLoadScheduler):
(WebKit::WebProcess::webToDatabaseProcessConnectionClosed):
(WebKit::WebProcess::prefetchDNS):
* WebProcess/WebProcess.h:
* config.h:
2015-11-19 Simon Fraser <simon.fraser@apple.com>
Back-buffer to front-buffer copy fails for some buffer formats
https://bugs.webkit.org/show_bug.cgi?id=151475
rdar://problem/23617899
Reviewed by Tim Horton.
When displaying RemoteLayerBackingStore, we copy the back buffer to the front
buffer before painting the updated regions. For buffers using Format::RGB10A8,
the CGImage-based copy fails, so in this case, use IOSurface::copyToSurface().
Reorganized RemoteLayerBackingStore::drawInContext() to make this a bit easier
to understand. First, we either copy the entire surface over, or paint the backImage.
Then we clip to the dirty rects, and clear them, then paint the layer contents.
* Shared/mac/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::display):
(WebKit::RemoteLayerBackingStore::drawInContext):
2015-11-19 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r192667 and r192668.
https://bugs.webkit.org/show_bug.cgi?id=151476
broke api tests (Requested by alexchristensen on #webkit).
Reverted changesets:
"Remove the non-NetworkProcess configurations"
https://bugs.webkit.org/show_bug.cgi?id=151418
http://trac.webkit.org/changeset/192667
"Fix GTK Build after r192667."
http://trac.webkit.org/changeset/192668
2015-11-19 Alex Christensen <achristensen@webkit.org>
Fix GTK Build after r192667.
* UIProcess/API/gtk/WebKitWebContext.cpp:
(webkitWebContextConstructed):
(webkit_web_context_set_process_model):
(webkit_web_context_get_process_model):
(toWebKitProcessModel): Deleted.
(injectedBundleDirectory): Deleted.
2015-11-19 Alex Christensen <achristensen@webkit.org>
Remove the non-NetworkProcess configurations
https://bugs.webkit.org/show_bug.cgi?id=151418
Reviewed by Geoffrey Garen.
This patch assumes ENABLE(NETWORK_PROCESS) is always 1, usesNetworkProcess is always true,
and ProcessModel is always ProcessModelMultipleSecondaryProcesses. It does this by removing
the checks and the code that would be executed with other configurations.
* CMakeLists.txt:
* NetworkProcess/EntryPoint/mac/LegacyProcess/NetworkProcessMain.mm:
(NetworkProcessMain):
* NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
(NetworkServiceInitializer):
* NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
(WebKit::NetworkBlobRegistry::filesInBlob):
* NetworkProcess/FileAPI/NetworkBlobRegistry.h:
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::blobSize):
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* NetworkProcess/NetworkLoad.cpp:
* NetworkProcess/NetworkLoad.h:
* NetworkProcess/NetworkLoadClient.h:
* NetworkProcess/NetworkLoadParameters.cpp:
(WebKit::NetworkLoadParameters::NetworkLoadParameters):
* NetworkProcess/NetworkLoadParameters.h:
* NetworkProcess/NetworkProcess.cpp:
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in:
* NetworkProcess/NetworkResourceLoader.cpp:
* NetworkProcess/NetworkResourceLoader.h:
* NetworkProcess/NetworkResourceLoader.messages.in:
* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::clearDiskCache):
* NetworkProcess/efl/NetworkProcessMainEfl.cpp:
(WebKit::NetworkProcessMainUnix):
* NetworkProcess/gtk/NetworkProcessMainGtk.cpp:
(WebKit::NetworkProcessMainUnix):
* NetworkProcess/ios/NetworkProcessIOS.mm:
* NetworkProcess/mac/NetworkLoadMac.mm:
* NetworkProcess/mac/NetworkProcessMac.mm:
* NetworkProcess/mac/NetworkResourceLoaderMac.mm:
* NetworkProcess/soup/NetworkProcessSoup.cpp:
(WebKit::NetworkProcess::platformTerminate):
* NetworkProcess/soup/RemoteNetworkingContextSoup.cpp:
(WebKit::RemoteNetworkingContext::storageSession):
* Shared/API/c/WKDeprecatedFunctions.cpp:
(WKInspectorToggleJavaScriptProfiling):
(WKContextSetProcessModel):
(WKContextGetProcessModel):
(WKContextSetUsesNetworkProcess):
(WKGraphicsContextGetCGContext):
* Shared/Authentication/AuthenticationManager.cpp:
(WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):
* Shared/Network/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm:
(WebKit::CustomProtocolManager::initialize):
(WebKit::CustomProtocolManager::addCustomProtocol):
* Shared/Network/CustomProtocols/CustomProtocolManager.h:
* Shared/Network/CustomProtocols/soup/CustomProtocolManagerSoup.cpp:
(WebKit::CustomProtocolManager::supplementName):
(WebKit::CustomProtocolManager::initialize):
(WebKit::CustomProtocolManager::registerScheme):
* Shared/Network/NetworkProcessCreationParameters.cpp:
(WebKit::NetworkProcessCreationParameters::decode):
* Shared/Network/NetworkProcessCreationParameters.h:
* Shared/Network/NetworkProcessSupplement.h:
(WebKit::NetworkProcessSupplement::initialize):
* Shared/Network/NetworkResourceLoadParameters.cpp:
(WebKit::NetworkResourceLoadParameters::decode):
* Shared/Network/NetworkResourceLoadParameters.h:
* Shared/ProcessExecutablePath.h:
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* Shared/efl/ProcessExecutablePathEfl.cpp:
(WebKit::executablePathOfPluginProcess):
(WebKit::executablePathOfNetworkProcess):
(WebKit::executablePathOfDatabaseProcess):
* Shared/gtk/ProcessExecutablePathGtk.cpp:
(WebKit::executablePathOfPluginProcess):
(WebKit::executablePathOfNetworkProcess):
(WebKit::executablePathOfDatabaseProcess):
* Shared/mac/CookieStorageShim.h:
* Shared/mac/CookieStorageShim.mm:
(-[WKNSURLSessionLocal _getCookieHeadersForTask:completionHandler:]):
* Shared/mac/CookieStorageShimLibrary.cpp:
* Shared/mac/CookieStorageShimLibrary.h:
* UIProcess/API/APIProcessPoolConfiguration.cpp:
(API::ProcessPoolConfiguration::createWithLegacyOptions):
(API::ProcessPoolConfiguration::copy):
* UIProcess/API/APIProcessPoolConfiguration.h:
* UIProcess/API/APISession.cpp:
(API::Session::~Session):
* UIProcess/API/C/WKAPICast.h:
(WebKit::toAPI):
(WebKit::toFontSmoothingLevel):
(WebKit::toProcessModel): Deleted.
* UIProcess/API/C/WKContext.cpp:
(WKContextGetCacheModel):
(WKContextSetMaximumNumberOfProcesses):
(WKContextSetJavaScriptGarbageCollectorTimerEnabled):
(WKContextUseTestingNetworkSession):
(WKContextSetProcessModel): Deleted.
(WKContextGetProcessModel): Deleted.
(WKContextSetUsesNetworkProcess): Deleted.
* UIProcess/API/C/WKContext.h:
* UIProcess/API/C/mac/WKContextPrivateMac.mm:
(WKContextGetNetworkProcessIdentifier):
* UIProcess/API/Cocoa/WKProcessGroup.mm:
(-[WKProcessGroup initWithInjectedBundleURL:]):
* UIProcess/API/Cocoa/WKProcessPool.mm:
* UIProcess/API/efl/ewk_context.cpp:
(ewk_context_process_model_set):
(ewk_context_process_model_get):
(ewk_context_tls_error_policy_get):
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::updateProcessSuppressionState):
(WebKit::WebProcessPool::platformInitializeWebProcess):
(WebKit::WebProcessPool::platformInitializeNetworkProcess):
(WebKit::WebProcessPool::platformInvalidateContext):
* UIProcess/Downloads/DownloadProxy.cpp:
(WebKit::DownloadProxy::cancel):
(WebKit::DownloadProxy::invalidate):
* UIProcess/Launcher/ProcessLauncher.cpp:
(WebKit::ProcessLauncher::processTypeAsString):
(WebKit::ProcessLauncher::getProcessTypeFromString):
* UIProcess/Launcher/ProcessLauncher.h:
* UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
(WebKit::ProcessLauncher::launchProcess):
* UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
(WebKit::ProcessLauncher::launchProcess):
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::computeProcessShimPath):
(WebKit::serviceName):
(WebKit::shouldLeakBoost):
(WebKit::createProcess):
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::setIsHoldingLockedFiles):
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/Network/NetworkProcessProxy.messages.in:
* UIProcess/Network/mac/NetworkProcessProxyMac.mm:
(WebKit::NetworkProcessProxy::platformGetLaunchOptions):
* UIProcess/Network/soup/NetworkProcessProxySoup.cpp:
(WebKit::NetworkProcessProxy::platformGetLaunchOptions):
* UIProcess/ProcessModel.h: Removed.
* UIProcess/WebCookieManagerProxy.cpp:
(WebKit::WebCookieManagerProxy::shouldTerminate):
(WebKit::WebCookieManagerProxy::refWebContextSupplement):
(WebKit::WebCookieManagerProxy::setHTTPCookieAcceptPolicy):
(WebKit::WebCookieManagerProxy::getHTTPCookieAcceptPolicy):
* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::inspectorProcessPool):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::reattachToWebProcess):
(WebKit::WebPageProxy::setSessionID):
(WebKit::WebPageProxy::initializeWebPage):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::create):
(WebKit::WebProcessPool::WebProcessPool):
(WebKit::WebProcessPool::~WebProcessPool):
(WebKit::WebProcessPool::initializeClient):
(WebKit::WebProcessPool::setDownloadClient):
(WebKit::WebProcessPool::setMaximumNumberOfProcesses):
(WebKit::WebProcessPool::networkingProcessConnection):
(WebKit::WebProcessPool::languageChanged):
(WebKit::WebProcessPool::textCheckerStateChanged):
(WebKit::WebProcessPool::ensureNetworkProcess):
(WebKit::WebProcessPool::getNetworkProcessConnection):
(WebKit::WebProcessPool::ensureDatabaseProcess):
(WebKit::WebProcessPool::setAnyPageGroupMightHavePrivateBrowsingEnabled):
(WebKit::WebProcessPool::processDidCachePage):
(WebKit::WebProcessPool::createNewWebProcess):
(WebKit::WebProcessPool::disconnectProcess):
(WebKit::WebProcessPool::createWebPage):
(WebKit::WebProcessPool::download):
(WebKit::WebProcessPool::resumeDownload):
(WebKit::WebProcessPool::postMessageToInjectedBundle):
(WebKit::WebProcessPool::setAdditionalPluginsDirectory):
(WebKit::WebProcessPool::networkProcessIdentifier):
(WebKit::WebProcessPool::setAlwaysUsesComplexTextCodePath):
(WebKit::WebProcessPool::setCanHandleHTTPSServerTrustEvaluation):
(WebKit::WebProcessPool::registerURLSchemeAsLocal):
(WebKit::WebProcessPool::setCacheModel):
(WebKit::WebProcessPool::setDefaultRequestTimeoutInterval):
(WebKit::WebProcessPool::createDownloadProxy):
(WebKit::WebProcessPool::addMessageReceiver):
(WebKit::WebProcessPool::useTestingNetworkSession):
(WebKit::WebProcessPool::allowSpecificHTTPSCertificateForHost):
(WebKit::WebProcessPool::requestWebContentStatistics):
(WebKit::WebProcessPool::requestNetworkingStatistics):
(WebKit::WebProcessPool::handleMessage):
(WebKit::WebProcessPool::setProcessModel): Deleted.
(WebKit::WebProcessPool::setUsesNetworkProcess): Deleted.
(WebKit::WebProcessPool::usesNetworkProcess): Deleted.
(WebKit::WebProcessPool::ensureSharedWebProcess): Deleted.
* UIProcess/WebProcessPool.h:
(WebKit::WebProcessPool::sendToNetworkingProcess):
(WebKit::WebProcessPool::sendToNetworkingProcessRelaunchingIfNecessary):
(WebKit::WebProcessPool::sendToAllProcessesRelaunchingThemIfNecessary):
(WebKit::WebProcessPool::sendToOneProcess):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::removeWebPage):
(WebKit::WebProcessProxy::getPluginProcessConnection):
(WebKit::WebProcessProxy::getNetworkProcessConnection):
(WebKit::WebProcessProxy::getDatabaseProcessConnection):
(WebKit::WebProcessProxy::updateTextCheckerState):
(WebKit::WebProcessProxy::didSaveToPageCache):
(WebKit::WebProcessProxy::didCancelProcessSuspension):
(WebKit::WebProcessProxy::reinstateNetworkProcessAssertionState):
(WebKit::WebProcessProxy::didSetAssertionState):
(WebKit::WebProcessProxy::createDownloadProxy): Deleted.
* UIProcess/WebProcessProxy.h:
(WebKit::WebProcessProxy::throttler):
* UIProcess/WebProcessProxy.messages.in:
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::~WebsiteDataStore):
(WebKit::WebsiteDataStore::cloneSessionData):
* UIProcess/gtk/WebProcessPoolGtk.cpp:
(WebKit::initInspectorServer):
(WebKit::WebProcessPool::platformInitializeWebProcess):
(WebKit::WebProcessPool::setIgnoreTLSErrors):
* UIProcess/soup/WebProcessPoolSoup.cpp:
(WebKit::WebProcessPool::platformInitializeNetworkProcess):
* WebKit2.xcodeproj/project.pbxproj:
* WebKit2Prefix.h:
* WebProcess/FileAPI/BlobRegistryProxy.cpp:
(WebKit::BlobRegistryProxy::registerFileBlobURL):
(WebKit::BlobRegistryProxy::registerBlobURL):
(WebKit::BlobRegistryProxy::unregisterBlobURL):
(WebKit::BlobRegistryProxy::registerBlobURLForSlice):
(WebKit::BlobRegistryProxy::blobSize):
* WebProcess/FileAPI/BlobRegistryProxy.h:
* WebProcess/Network/NetworkProcessConnection.cpp:
* WebProcess/Network/NetworkProcessConnection.h:
* WebProcess/Network/NetworkProcessConnection.messages.in:
* WebProcess/Network/WebResourceLoadScheduler.cpp:
(WebKit::WebResourceLoadScheduler::networkProcessCrashed):
* WebProcess/Network/WebResourceLoadScheduler.h:
* WebProcess/Network/WebResourceLoader.cpp:
* WebProcess/Network/WebResourceLoader.h:
* WebProcess/Network/WebResourceLoader.messages.in:
* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
(WebKit::initializeBrowserFuncs):
(WebKit::netscapeBrowserFuncs):
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::registerRedirect):
(WebKit::NetscapePlugin::urlRedirectResponse):
* 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/WebCoreSupport/WebPlatformStrategies.h:
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::startDownload):
(WebKit::WebFrame::convertMainResourceLoadToDownload):
(WebKit::WebFrame::source):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess):
(WebKit::WebProcess::initializeConnection):
(WebKit::WebProcess::initializeWebProcess):
(WebKit::WebProcess::ensureNetworkProcessConnection):
(WebKit::WebProcess::registerURLSchemeAsEmptyDocument):
(WebKit::WebProcess::destroyPrivateBrowsingSession):
(WebKit::WebProcess::pluginProcessConnectionManager):
(WebKit::WebProcess::shouldTerminate):
(WebKit::WebProcess::setInjectedBundleParameters):
(WebKit::WebProcess::networkConnection):
(WebKit::WebProcess::webResourceLoadScheduler):
(WebKit::WebProcess::webToDatabaseProcessConnectionClosed):
(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::WebProcess::setIgnoreTLSErrors):
(WebKit::WebProcess::allowSpecificHTTPSCertificateForHost):
(WebKit::getCacheDiskFreeSize): Deleted.
(WebKit::setSoupSessionAcceptLanguage): Deleted.
(WebKit::languageChanged): Deleted.
* config.h:
2015-11-19 Csaba Osztrogonác <ossy@webkit.org>
[EFL] Fix Wreturn-type clang warning in EWK2UnitTestBase.cpp
https://bugs.webkit.org/show_bug.cgi?id=151444
Reviewed by Darin Adler.
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
(EWK2UnitTest::EWK2UnitTestBase::waitUntilTitleChangedTo):
2015-11-19 Csaba Osztrogonác <ossy@webkit.org>
[EFL] Fix -Winconsistent-missing-override clang warnings
https://bugs.webkit.org/show_bug.cgi?id=151443
Reviewed by Darin Adler.
* Shared/CoordinatedGraphics/CoordinatedBackingStore.h:
* UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
* UIProcess/CoordinatedGraphics/WebView.h:
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.h:
(WebKit::CoordinatedDrawingArea::layerTreeStateIsFrozen):
(WebKit::CoordinatedDrawingArea::layerTreeHost):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
(WebKit::CoordinatedLayerTreeHost::layerTreeContext):
(WebKit::CoordinatedLayerTreeHost::pauseRendering):
(WebKit::CoordinatedLayerTreeHost::resumeRendering):
2015-11-18 Alex Christensen <achristensen@webkit.org>
Progress towards implementing Downloads with NETWORK_SESSION
https://bugs.webkit.org/show_bug.cgi?id=151414
Reviewed begrudgingly by Brady Eidson.
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::storageSession):
(WebKit::NetworkConnectionToWebProcess::startDownload):
(WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* NetworkProcess/NetworkLoad.cpp:
(WebKit::NetworkLoad::NetworkLoad):
(WebKit::NetworkLoad::didReceiveChallenge):
(WebKit::NetworkLoad::didReceiveResponse):
(WebKit::NetworkLoad::didReceiveData):
* NetworkProcess/NetworkLoad.h:
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
(WebKit::NetworkProcess::downloadRequest):
(WebKit::NetworkProcess::resumeDownload):
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in:
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::cleanup):
(WebKit::NetworkResourceLoader::didConvertHandleToDownload):
(WebKit::NetworkResourceLoader::abort):
* NetworkProcess/NetworkResourceLoader.h:
* NetworkProcess/NetworkSession.h:
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(toNSURLSessionResponseDisposition):
(-[NetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
(-[NetworkSessionDelegate URLSession:dataTask:didReceiveData:]):
(-[NetworkSessionDelegate URLSession:downloadTask:didFinishDownloadingToURL:]):
(-[NetworkSessionDelegate URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:]):
(-[NetworkSessionDelegate URLSession:downloadTask:didResumeAtOffset:expectedTotalBytes:]):
(-[NetworkSessionDelegate URLSession:dataTask:didBecomeDownloadTask:]):
* Shared/Authentication/AuthenticationManager.cpp:
(WebKit::AuthenticationManager::useCredentialForSingleChallenge):
(WebKit::AuthenticationManager::continueWithoutCredentialForSingleChallenge):
(WebKit::AuthenticationManager::cancelSingleChallenge):
(WebKit::AuthenticationManager::performDefaultHandlingForSingleChallenge):
(WebKit::AuthenticationManager::rejectProtectionSpaceAndContinueForSingleChallenge):
* Shared/Downloads/Download.h:
* Shared/Downloads/DownloadManager.cpp:
(WebKit::DownloadManager::DownloadManager):
(WebKit::DownloadManager::startDownload):
(WebKit::DownloadManager::convertHandleToDownload):
(WebKit::DownloadManager::resumeDownload):
(WebKit::DownloadManager::cancelDownload):
(WebKit::DownloadManager::downloadFinished):
(WebKit::DownloadManager::didCreateDownload):
* Shared/Downloads/DownloadManager.h:
(WebKit::DownloadManager::isDownloading):
(WebKit::DownloadManager::activeDownloadCount):
* Shared/Downloads/mac/DownloadMac.mm:
(WebKit::Download::start):
(WebKit::Download::startWithHandle):
(WebKit::Download::resume):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::download):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::canCachePage):
(WebKit::WebFrameLoaderClient::convertMainResourceLoadToDownload):
(WebKit::WebFrameLoaderClient::createFrame):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::startDownload):
(WebKit::WebFrame::convertMainResourceLoadToDownload):
(WebKit::WebFrame::source):
* WebProcess/WebPage/WebFrame.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::downloadRequest):
(WebKit::WebProcess::resumeDownload):
(WebKit::WebProcess::releasePageCache):
(WebKit::WebProcess::fetchWebsiteData):
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:
2015-11-18 Chris Dumez <cdumez@apple.com>
Clean up / optimize NetworkCacheSubresourcesEntry
https://bugs.webkit.org/show_bug.cgi?id=151405
Reviewed by Antti Koivisto.
Clean up / optimize NetworkCacheSubresourcesEntry:
- Remove m_sourceStorageRecord data member
- Avoid copying the Key when constructing it
* NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
(WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::encodeAsSubresourcesRecord):
* NetworkProcess/cache/NetworkCacheSubresourcesEntry.cpp:
(WebKit::NetworkCache::SubresourcesEntry::SubresourcesEntry):
* NetworkProcess/cache/NetworkCacheSubresourcesEntry.h:
2015-11-18 Jer Noble <jer.noble@apple.com>
Expose WebCore's AudioPlaybackRequiresUserGesture setting to WebKit & WebKit2
https://bugs.webkit.org/show_bug.cgi?id=151274
Reviewed by Anders Carlsson.
Add a new, private, WKWebViewConfiguration property, _requiresUserActionForAudioPlayback,
and use that configuration property to set WebCore's AudioPlaybackRequiresUserGesture setting
during page creation.
* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetAudioPlaybackRequiresUserGesture): Add legacy C API for setting this new WK preference.
(WKPreferencesGetAudioPlaybackRequiresUserGesture): Ditto.
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]): Set the page configuration value from preferences.
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration init]): Default the value of the new configuration property to YES for iOS.
(-[WKWebViewConfiguration copyWithZone:]): Copy the value across.
(-[WKWebViewConfiguration _requiresUserActionForAudioPlayback]): Simple getter.
(-[WKWebViewConfiguration _setRequiresUserActionForAudioPlayback:]): Simple setter.
* UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences): Set WebCore's audioPlaybackRequiresUserGesture Setting.
2015-11-18 Daniel Bates <dabates@apple.com>
[iOS] ASSERTION FAILED: temporaryFilePath.last() == '/' in WebCore::openTemporaryFile()
https://bugs.webkit.org/show_bug.cgi?id=151392
<rdar://problem/23595341>
Reviewed by Alexey Proskuryakov.
Workaround <rdar://problem/23579077> where confstr(_CS_DARWIN_USER_TEMP_DIR, ..., ...) retrieves
the path to the user temporary directory without a trailing slash in the iOS simulator.
* Shared/mac/SandboxExtensionMac.mm:
(WebKit::SandboxExtension::createHandleForTemporaryFile): Add a path separator (/) between the directory path and filename.
2015-11-17 Geoffrey Garen <ggaren@apple.com>
A window with a hung tab waits 5s before closing
https://bugs.webkit.org/show_bug.cgi?id=151319
Reviewed by Anders Carlsson.
I manually tested that I did not break unload events upon window close
by running run-webkit-httpd and invoking a 1x1 image load of
http://127.0.0.1:8000/navigation/resources/save-Ping.php from an unload
handler.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::tryClose): Use the sudden termination bit to
close without waiting for a response.
* UIProcess/WebProcessProxy.h:
(WebKit::WebProcessProxy::isSuddenTerminationEnabled): Expose the bit.
2015-11-17 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Web Process crashes on reparenting a WebView with AC mode on
https://bugs.webkit.org/show_bug.cgi?id=151139
Reviewed by Mario Sanchez Prada.
When the web view is reparented, the widget is first unrealized,
and then realized again when added to the new parent. In the
second realize, the old redirected XComposite window is destroyed
and a new one is created, but the web process is still using the
old redirected window ID. As soon as the redirected window is
destroyed and the web process tries to use the window ID, it
crashes due to a BadDrawable X error. We have to notify the web
process as soon as the web view is unrealized to stop using the
current window ID and exit accelerated compositing mode until a
new window ID is given. This notification needs to be synchronous,
because the window can be destroyed in the UI process before the
message is received in the web process.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseRealize): Add an assert to ensure we never have
a redirected window when the view is realized. Also check drawing
area is not nullptr, since it can be destroyed at any time if the
web process crashes.
(webkitWebViewBaseUnrealize): Call
DrawingAreaProxyImpl::destroyNativeSurfaceHandleForCompositing()
and destroy the redirected XComposite window.
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::destroyNativeSurfaceHandleForCompositing):
Send DestroyNativeSurfaceHandleForCompositing synchronous messsage
to the web process.
* UIProcess/DrawingAreaProxyImpl.h:
* WebProcess/WebPage/DrawingArea.h:
* WebProcess/WebPage/DrawingArea.messages.in: Add
DestroyNativeSurfaceHandleForCompositing message.
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::destroyNativeSurfaceHandleForCompositing):
Set the native surface handler for compositing to 0 to reset it.
* WebProcess/WebPage/DrawingAreaImpl.h:
* WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
(WebKit::LayerTreeHostGtk::makeContextCurrent): Return false
early always when layer tree context ID is 0, even if we already
have a context.
(WebKit::LayerTreeHostGtk::setNativeSurfaceHandleForCompositing):
Cancel any pending layer flush when setting a new handler.
2015-11-16 Alex Christensen <achristensen@webkit.org>
Fix CMake build and make PluginProcess executable
https://bugs.webkit.org/show_bug.cgi?id=151332
Reviewed by Tim Horton.
* PlatformMac.cmake:
2015-11-16 Tim Horton <timothy_horton@apple.com>
Multi-WKWebView find completes after the first view
https://bugs.webkit.org/show_bug.cgi?id=151325
Reviewed by Anders Carlsson.
* UIProcess/mac/WKTextFinderClient.mm:
(-[WKTextFinderClient findMatchesForString:relativeToMatch:findOptions:maxResults:resultCollector:]):
Update progress before calling the completion handler; NSTextFinder assumes
that if the progress doesn't change, the search is complete.
2015-11-16 Ryuan Choi <ryuan.choi@navercorp.com>
WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction calls an std::function after it's been moved from
https://bugs.webkit.org/show_bug.cgi?id=151248
Reviewed by Darin Adler.
Like r188287, calling an empty std::function results in a std::bad_function_call
exception being thrown when sendSync is failed.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
2015-11-16 Beth Dakin <bdakin@apple.com>
Add SPI for handling inline link navigation for peek/pop
https://bugs.webkit.org/show_bug.cgi?id=151270
-and corresponding-
rdar://problem/22233739
Reviewed by Darin Adler.
This patch adds three new SPI methods. If a client wants to disable previews
entirely for the given element, they should return NO in
shouldPreviewElement:. Returning NO in shouldPreviewElement will prevent the
other methods from being invoked. The client can provide a custom preview by
returning their own UIViewController from
previewingViewControllerForElement:defaultActions:. Returning nil will result
in the default preview behavior for that element. This will allow clients to
implement this method to handle http link navigation inline, but still opt
into UIKits built-in DataDetectors behaviors for DD links once we start
supporting DD links in WK2.
* UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
Added linkURL to _WKElementInfo. linkURL will be nil for elements that are
not links.
* UIProcess/API/Cocoa/_WKElementInfo.h:
* UIProcess/API/Cocoa/_WKElementInfo.mm:
(-[_WKElementInfo copyWithZone:]):
(-[_WKElementInfo linkURL]):
* UIProcess/API/Cocoa/_WKElementInfoInternal.h: Added.
_WKPreviewingElementInfo inherits from _WKElementInfo. Added a constructor.
* UIProcess/API/Cocoa/_WKPreviewElementInfo.h: Added.
* UIProcess/API/Cocoa/_WKPreviewElementInfo.mm: Added.
(-[_WKPreviewElementInfo _initWithLinkURL:]):
* UIProcess/API/Cocoa/_WKPreviewElementInfoInternal.h: Added.
Invoke shouldPreviewElement:.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
Invoke previewingViewControllerForElement: for all potentially preview-able
elements that have a default implementations, which will be limited to links
at this time.
(-[WKContentView _presentedViewControllerForPreviewItemController:]):
Invoke commitPreviewingViewController:
(-[WKContentView _previewItemController:commitPreview:]):
* WebKit2.xcodeproj/project.pbxproj:
2015-11-16 Anders Carlsson <andersca@apple.com>
Add identifier strings for a bunch of context menu items
https://bugs.webkit.org/show_bug.cgi?id=151272
Reviewed by Dan Bernstein.
* UIProcess/API/Cocoa/WKMenuItemIdentifiers.mm: Added.
* UIProcess/API/Cocoa/WKMenuItemIdentifiersPrivate.h: Added.
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::menuItemIdentifier):
(WebKit::WebContextMenuProxyMac::createShareMenuItem):
(WebKit::WebContextMenuProxyMac::createContextMenuItem):
* WebKit2.xcodeproj/project.pbxproj:
2015-11-16 Simon Fraser <simon.fraser@apple.com>
Sort the Xcode project files.
* WebKit2.xcodeproj/project.pbxproj:
2015-11-13 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r192445, r192451, and r192452.
https://bugs.webkit.org/show_bug.cgi?id=151291
Broke Mavericks build (and thus EWS) (Requested by ap on
#webkit).
Reverted changesets:
"Add identifier strings for a bunch of context menu items"
https://bugs.webkit.org/show_bug.cgi?id=151272
http://trac.webkit.org/changeset/192445
"Try to fix the 32-bit build"
http://trac.webkit.org/changeset/192451
"Try to fix the 32-bit build"
http://trac.webkit.org/changeset/192452
2015-11-13 Timothy Horton <timothy_horton@apple.com>
Try to fix the 32-bit build
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::createShareMenuItem):
2015-11-13 Timothy Horton <timothy_horton@apple.com>
Try to fix the 32-bit build
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::menuItemIdentifier):
2015-11-13 Wenson Hsieh <wenson_hsieh@apple.com>
WK2 iOS interaction tests in LayoutTests/fast/events/ios are flaky
https://bugs.webkit.org/show_bug.cgi?id=151199
<rdar://problem/23518459>
Reviewed by Tim Horton.
While transforming touch positions from document to global coordinates, HIDEventGenerator
sometimes uses an old scale of the webview in computing the transformed position. This happens
in spite of how we force the UI script to run after the UI process receives a layer tree commit
because we invoke the callback before calling WebPageProxy::didCommitLayerTree, which is where
we actually use the layer transaction information to update the WKWebView.
To fix this, we run the drawing-ensured callbacks after committing the layer tree, so the
callbacks will have updated information about the web view's scale and dimensions.
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
2015-11-13 Tim Horton <timothy_horton@apple.com>
Support printing in WKWebView
https://bugs.webkit.org/show_bug.cgi?id=151276
<rdar://problem/23525715>
Reviewed by Beth Dakin.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _printOperationWithPrintInfo:]):
(-[WKWebView _printOperationWithPrintInfo:forFrame:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
Expose SPI similar to what we have on WKView.
2015-11-13 Joseph Pecoraro <pecoraro@apple.com>
Follow-up to r192437. Add availability macros.
Reviewed by Tim Horton.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
2015-11-13 Anders Carlsson <andersca@apple.com>
Add identifier strings for a bunch of context menu items
https://bugs.webkit.org/show_bug.cgi?id=151272
Reviewed by Dan Bernstein.
* UIProcess/API/Cocoa/WKMenuItemIdentifiers.mm: Added.
* UIProcess/API/Cocoa/WKMenuItemIdentifiersPrivate.h: Added.
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::menuItemIdentifier):
(WebKit::WebContextMenuProxyMac::createShareMenuItem):
(WebKit::WebContextMenuProxyMac::createContextMenuItem):
* WebKit2.xcodeproj/project.pbxproj:
2015-11-13 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Provide a way to override the WKWebView remote inspector name
https://bugs.webkit.org/show_bug.cgi?id=151075
Reviewed by Tim Horton.
* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _remoteInspectionNameOverride]):
(-[WKWebView _setRemoteInspectionNameOverride:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setRemoteInspectionNameOverride):
(WebKit::WebPageProxy::creationParameters):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::remoteInspectionNameOverride):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::m_shouldDispatchFakeMouseMoveEvents):
(WebKit::WebPage::setRemoteInspectionNameOverride):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
2015-11-13 Tim Horton <timothy_horton@apple.com>
Hardware keyboard spacebar scrolls too far on iOS
https://bugs.webkit.org/show_bug.cgi?id=151227
<rdar://problem/23500681>
Reviewed by Simon Fraser.
There were two bugs conspiring here to make spacebar scrolling very wrong on iOS:
1) Incoming key events were being handled twice
- fix this by only propagating the event to super if we don't
end up handling the event ourselves
2) _scrollByOffset was not converting the offset delta out of content coordinates
- fix this by doing the relevant conversion and renaming the function
to make it more clear exactly what it does
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _scrollByContentOffset:]):
(-[WKWebView _scrollByOffset:]): Deleted.
* UIProcess/API/Cocoa/WKWebViewInternal.h:
Rename to _scrollByContentOffset to make it clear that this is
in content coordinates, and do the conversion from content coordinates
(apply the scale) so that we scroll by the right amount.
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::doneWithKeyEvent):
Pass whether the event was handled through to WKContentView.
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKWebEvent dealloc]):
Add WKWebEvent, which is a WebEvent and retains a reference to the UIEvent
from which it came.
(-[WKContentView _handleKeyUIEvent:]):
Only pass the event to super immediately if we don't try to handle it.
We'll re-send it to super asynchronously if we decide not to handle it.
(-[WKContentView handleKeyEvent:]):
If we're in the middle of resending an event we didn't handle the first
time, just ignore it.
Make a WKWebEvent and store the UIEvent on it.
(-[WKContentView _didHandleKeyEvent:eventWasHandled:]):
If the event wasn't handled, and is one of our special events with a
wrapped UIEvent, resend it to super. We'll ignore it as noted above.
(-[WKContentView _interpretKeyEvent:isCharEvent:]):
Factor out unobscured content rect retrieval.
Make use of Scrollbar::pageStep to match the Mac behavior of not
scrolling quite a whole page when scrolling with the spacebar.
2015-11-12 Ryuan Choi <ryuan.choi@navercorp.com>
[EFL] Fix wrong test case for window_create since r192196
https://bugs.webkit.org/show_bug.cgi?id=151247
Reviewed by Gyuyoung Kim.
r192196 introduces new test cases for window_create but there are typos which hide bug
This patch fixes typos and split ewk_view_create_window test case.
* UIProcess/API/efl/tests/test_ewk2_view.cpp:
(TEST_F):
2015-11-12 Anders Carlsson <andersca@apple.com>
Add a context menu delegate method that takes a userInfo parameter
https://bugs.webkit.org/show_bug.cgi?id=151232
Reviewed by Tim Horton.
* UIProcess/API/APIContextMenuClient.h:
(API::ContextMenuClient::menuFromProposedMenu):
* UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
* UIProcess/Cocoa/UIDelegate.h:
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::setDelegate):
(WebKit::UIDelegate::ContextMenuClient::menuFromProposedMenu):
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::showContextMenu):
2015-11-12 Anders Carlsson <andersca@apple.com>
ContextMenuAction and WebMenuItemTag shouldn't have to be in sync
https://bugs.webkit.org/show_bug.cgi?id=151226
Reviewed by Tim Horton.
* Shared/API/c/WKSharedAPICast.h:
(WebKit::toAPI):
(WebKit::toImpl):
Remove ContextMenuItemTagOpenLinkInThisWindow.
2015-11-12 Anders Carlsson <andersca@apple.com>
ContextMenuController::contextMenuItemSelected only needs the action and title, not the full item
https://bugs.webkit.org/show_bug.cgi?id=151217
Reviewed by Joseph Pecoraro.
* WebProcess/WebPage/WebContextMenu.cpp:
(WebKit::WebContextMenu::itemSelected):
2015-11-12 Anders Carlsson <andersca@apple.com>
Remove an unused function
https://bugs.webkit.org/show_bug.cgi?id=151215
Reviewed by Joseph Pecoraro.
* WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
(WebKit::WebContextMenuClient::contextMenuItemSelected): Deleted.
* WebProcess/WebCoreSupport/WebContextMenuClient.h:
2015-11-11 Anders Carlsson <andersca@apple.com>
Enable cross-platform context menus by default
https://bugs.webkit.org/show_bug.cgi?id=151173
Reviewed by Tim Horton.
* Shared/WebContextMenuItemData.cpp:
(WebKit::WebContextMenuItemData::WebContextMenuItemData): Deleted.
* WebProcess/WebPage/WebContextMenu.cpp:
(WebKit::WebContextMenu::menuItemsWithUserData): Deleted.
2015-11-12 Dan Bernstein <mitz@apple.com>
Fixed the build.
* PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm:
(PluginServiceInitializer):
2015-11-12 Csaba Osztrogonác <ossy@webkit.org>
Remove ENABLE(SATURATED_LAYOUT_ARITHMETIC) guards
https://bugs.webkit.org/show_bug.cgi?id=150972
Reviewed by Darin Adler.
* Configurations/FeatureDefines.xcconfig:
2015-11-11 Gyuyoung Kim <gyuyoung.kim@webkit.org>
Print result of memory sampler more readable
https://bugs.webkit.org/show_bug.cgi?id=151085
Reviewed by Darin Adler.
Current memory sampler prints result of memory sample horizontally. It makes us hard to read
the result at a glance. To improve readability of the memory sampler result, this patch prints it
vertically.
* Shared/WebMemorySampler.cpp:
(WebKit::WebMemorySampler::appendCurrentMemoryUsageToFile):
(WebKit::WebMemorySampler::writeHeaders):
2015-11-11 Geoffrey Garen <ggaren@apple.com>
Rename handle.*Event to dispatch.*Event
https://bugs.webkit.org/show_bug.cgi?id=151168
Reviewed by Chris Dumez.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache):
(WebKit::WebFrameLoaderClient::dispatchDidDispatchOnloadEvents):
(WebKit::WebFrameLoaderClient::dispatchDidHandleOnloadEvents): Deleted.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2015-11-11 Anders Carlsson <andersca@apple.com>
Fix builds.
* WebProcess/WebCoreSupport/efl/WebContextMenuClientEfl.cpp:
(WebKit::WebContextMenuClient::shareMenuItem): Deleted.
* WebProcess/WebCoreSupport/gtk/WebContextMenuClientGtk.cpp:
(WebKit::WebContextMenuClient::shareMenuItem): Deleted.
2015-11-11 Anders Carlsson <andersca@apple.com>
REGRESSION (r191407): Context menus are missing Services
https://bugs.webkit.org/show_bug.cgi?id=151167
rdar://problem/23500769
Reviewed by Tim Horton.
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::showContextMenu):
Use contentsToRootView to better indicate which coordinate system we're using.
* WebProcess/WebPage/WebContextMenu.cpp:
(WebKit::WebContextMenu::show):
Use +[NSMenu popUpContextMenu:withEvent:forView:] so we'll get service menus where applicable.
2015-11-11 Anders Carlsson <andersca@apple.com>
Remove more dead context menu code
https://bugs.webkit.org/show_bug.cgi?id=151163
Reviewed by Tim Horton.
* WebProcess/WebCoreSupport/WebContextMenuClient.h:
* WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
(WebKit::WebContextMenuClient::shareMenuItem): Deleted.
2015-11-11 Tim Horton <timothy_horton@apple.com>
Remove an unnecessary zero-delay timer from swipe snapshot removal
https://bugs.webkit.org/show_bug.cgi?id=151161
Reviewed by Anders Carlsson.
* WebProcess/WebPage/ViewGestureGeometryCollector.cpp:
(WebKit::ViewGestureGeometryCollector::mainFrameDidLayout):
(WebKit::ViewGestureGeometryCollector::ViewGestureGeometryCollector): Deleted.
(WebKit::ViewGestureGeometryCollector::renderTreeSizeNotificationTimerFired): Deleted.
* WebProcess/WebPage/ViewGestureGeometryCollector.h:
There's no discernable reason for this zero-delay timer, and it dates back
to the original swipe patch with no explanation given. My only theory
is that I was depending on spinning the runloop to ensure we've painted,
but we have other mechanisms to do that now, on both platforms.
This also was a surprising waste of time in some cases where the web
process was very slow.
2015-11-11 Chris Dumez <cdumez@apple.com>
Unreviewed attempt to fix the Mac CMake build.
* CMakeLists.txt:
2015-11-11 Chris Dumez <cdumez@apple.com>
[WK2] Add initial support for speculative resource revalidation to the WebKit disk cache
https://bugs.webkit.org/show_bug.cgi?id=150856
<rdar://problem/23092196>
Reviewed by Antti Koivisto.
Add initial support for speculative resource revalidation to the WebKit
disk cache. When a main resource is requested by WebCore, we look up its
list of subresources in the cache and speculatively warm them up before
WebCore asks for them, in order to improve page load time. In this
context, warming it up means:
1. If the cached resource is usable (has not expired), keep it around
in a memory for a limited amount of time (10 seconds).
2. If the resource has expired, do a speculative revalidation of the
resource and then keep it in memory for a while as well (10 seconds).
The feature is currently behind a compile-time flag that is only enabled
on COCOA. Also, it is currently disabled at run-time until it is mature
enough.
Initial results show that speculative revalidation gives a ~5%
progression on throttled warm PLT on iPhone 5s.
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::start):
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::retrieve):
(WebKit::NetworkCache::Cache::store):
(WebKit::NetworkCache::Cache::update):
* NetworkProcess/cache/NetworkCache.h:
* NetworkProcess/cache/NetworkCacheEntry.cpp:
(WebKit::NetworkCache::Entry::Entry):
* NetworkProcess/cache/NetworkCacheEntry.h:
* NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp: Added.
(WebKit::NetworkCache::SpeculativeLoad::SpeculativeLoad):
(WebKit::NetworkCache::SpeculativeLoad::~SpeculativeLoad):
(WebKit::NetworkCache::SpeculativeLoad::willSendRedirectedRequest):
(WebKit::NetworkCache::SpeculativeLoad::didReceiveBuffer):
(WebKit::NetworkCache::SpeculativeLoad::didFinishLoading):
(WebKit::NetworkCache::SpeculativeLoad::didFailLoading):
(WebKit::NetworkCache::SpeculativeLoad::didComplete):
* NetworkProcess/cache/NetworkCacheSpeculativeLoad.h: Added.
* NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
(WebKit::NetworkCache::constructRevalidationRequest):
(WebKit::NetworkCache::responseNeedsRevalidation):
(WebKit::NetworkCache::SpeculativeLoadManager::PreloadedEntry::PreloadedEntry):
(WebKit::NetworkCache::SpeculativeLoadManager::PreloadedEntry::takeCacheEntry):
(WebKit::NetworkCache::SpeculativeLoadManager::PreloadedEntry::lifetimeTimerFired):
(WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::PendingFrameLoad):
(WebKit::NetworkCache::SpeculativeLoadManager::retrieve):
(WebKit::NetworkCache::SpeculativeLoadManager::registerLoad):
(WebKit::NetworkCache::SpeculativeLoadManager::addPreloadedEntry):
(WebKit::NetworkCache::SpeculativeLoadManager::retrieveEntryFromStorage):
(WebKit::NetworkCache::SpeculativeLoadManager::satisfyPendingRequests):
(WebKit::NetworkCache::SpeculativeLoadManager::revalidateEntry):
(WebKit::NetworkCache::SpeculativeLoadManager::preloadEntry):
(WebKit::NetworkCache::SpeculativeLoadManager::startSpeculativeRevalidation):
(WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::registerSubresource): Deleted.
(WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::encodeAsSubresourcesRecord): Deleted.
* NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.h:
* WebKit2.xcodeproj/project.pbxproj:
2015-11-11 Anders Carlsson <andersca@apple.com>
_WKRemoteObjectInterface should handle specifying allowed classes for reply block arguments
https://bugs.webkit.org/show_bug.cgi?id=151144
Reviewed by Tim Horton.
* Shared/API/Cocoa/_WKRemoteObjectInterface.h:
* Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
(classesForSelectorArgument):
(-[_WKRemoteObjectInterface classesForSelector:argumentIndex:ofReply:]):
(-[_WKRemoteObjectInterface setClasses:forSelector:argumentIndex:ofReply:]):
(-[_WKRemoteObjectInterface classesForSelector:argumentIndex:]):
(-[_WKRemoteObjectInterface setClasses:forSelector:argumentIndex:]):
2015-11-11 Tim Horton <timothy_horton@apple.com>
Add some font-related preferences to the modern API
https://bugs.webkit.org/show_bug.cgi?id=151138
<rdar://problem/23492636>
Reviewed by Anders Carlsson.
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _defaultFontSize]):
(-[WKPreferences _setDefaultFontSize:]):
(-[WKPreferences _defaultFixedPitchFontSize]):
(-[WKPreferences _setDefaultFixedPitchFontSize:]):
(-[WKPreferences _fixedPitchFontFamily]):
(-[WKPreferences _setFixedPitchFontFamily:]):
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:
2015-11-11 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Runtime critical warnings when closing a page containing windowed plugins
https://bugs.webkit.org/show_bug.cgi?id=151132
Reviewed by Martin Robinson.
This is because our plugin widget, that is a GtkPlug (derived from
GtkWindow), can receive the delete-event signal before
NetscapePlugin::platformDestroy is called. The delete-event
signal, by default, destroys the window when the signal is not
handled. So, after the delete-event the GtkPlug is destroyed, but
our pointer hasn't been reset. We can handle the delete-event
using gtk_widget_hide_on_delete as callback, so that the plugin
widget is hidden instead of destroyed.
* WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
(WebKit::NetscapePlugin::platformPostInitializeWindowed):
2015-11-11 Carlos Garcia Campos <cgarcia@igalia.com>
REGRESSION(r191856): [GTK] SOCK_SEQPACKET no longer used after r191856
https://bugs.webkit.org/show_bug.cgi?id=151129
Reviewed by Martin Robinson.
r191856 unconditionally disabled SOCK_SEQPACKET for GTK port.
* Platform/IPC/unix/ConnectionUnix.cpp: Use always SOCK_SEQPACKET
when available.
2015-11-10 Alex Christensen <achristensen@webkit.org>
Implement authentication challenge handling when using NETWORK_SESSION
https://bugs.webkit.org/show_bug.cgi?id=150968
Reviewed by Antti Koivisto.
* NetworkProcess/NetworkLoad.cpp:
(WebKit::NetworkLoad::didReceiveChallenge):
Copy functionality from NetworkLoad::canAuthenticateAgainstProtectionSpaceAsync (which is used when we don't use NETWORK_SESSION)
because there is no canAuthenticateAgainstProtectionSpace delegate callback when using NSURLSession, according to
https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/URLLoadingSystem/Articles/AuthenticationChallenges.html
Instead, all authentication challenge callbacks go to URLSession:task:didReceiveChallenge:completionHandler:
because we do not implement URLSession:didReceiveChallenge:completionHandler:
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(-[NetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
(-[NetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
(-[NetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
Make a block copy of the completion handlers so we can copy the std::functions that wrap them into HashMaps and call them later,
in this case we call the completion handler after the UIProcess gives us credentials for an authentication challenge.
* Shared/Authentication/AuthenticationManager.cpp:
(WebKit::AuthenticationManager::AuthenticationManager):
(WebKit::AuthenticationManager::addChallengeToChallengeMap):
(WebKit::AuthenticationManager::shouldCoalesceChallenge):
(WebKit::AuthenticationManager::coalesceChallengesMatching):
(WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):
Fix an existing bug that caused multiple calls to addChallengeToChallengeMap for one challenge. This caused too many calls to
the AuthenticationClient methods, which did not cause a problem because they were not one-time-use block copies of completion handlers before.
(WebKit::AuthenticationManager::useCredentialForSingleChallenge):
(WebKit::AuthenticationManager::continueWithoutCredentialForChallenge):
(WebKit::AuthenticationManager::continueWithoutCredentialForSingleChallenge):
(WebKit::AuthenticationManager::cancelChallenge):
(WebKit::AuthenticationManager::cancelSingleChallenge):
(WebKit::AuthenticationManager::performDefaultHandling):
(WebKit::AuthenticationManager::performDefaultHandlingForSingleChallenge):
(WebKit::AuthenticationManager::rejectProtectionSpaceAndContinue):
(WebKit::AuthenticationManager::rejectProtectionSpaceAndContinueForSingleChallenge):
Call completion handlers which we stored in a HashMap before doing IPC if we are using NETWORK_SESSION,
which has completion handlers instead of continueSomething client calls.
* Shared/Authentication/AuthenticationManager.h:
(WebKit::AuthenticationManager::outstandingAuthenticationChallengeCount):
* Shared/Downloads/Download.cpp:
(WebKit::Download::didReceiveAuthenticationChallenge):
(WebKit::Download::didReceiveResponse):
* Shared/Downloads/DownloadAuthenticationClient.cpp:
(WebKit::DownloadAuthenticationClient::receivedChallengeRejection):
* Shared/Downloads/DownloadAuthenticationClient.h:
Add ifdefs for code related to downloading I will implement later.
2015-11-10 Simon Fraser <simon.fraser@apple.com>
Use different pixel formats for displays that support them
https://bugs.webkit.org/show_bug.cgi?id=151122
rdar://problem/22846841
Reviewed by Tim Horton.
New the new IOSurface formats when appropriate for the properties of the
display.
* Shared/mac/RemoteLayerBackingStore.mm:
(WebKit::bufferFormat):
(WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer):
2015-11-10 Tim Horton <timothy_horton@apple.com>
Adopt formal protocols for CA delegates
https://bugs.webkit.org/show_bug.cgi?id=151121
<rdar://problem/6739193>
Reviewed by Anders Carlsson.
* UIProcess/API/Cocoa/WKWebView.mm:
* UIProcess/Cocoa/WebViewImpl.mm:
* UIProcess/mac/WKTextFinderClient.mm:
* UIProcess/mac/WebPageProxyMac.mm:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/cocoa/WebProcessCocoa.mm:
Adapt to the split out SPI headers.
* WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
Conform!
2015-11-10 Dan Bernstein <mitz@apple.com>
Fixed the build.
* DatabaseProcess/EntryPoint/mac/XPCService/DatabaseServiceEntryPoint.mm:
(DatabaseServiceInitializer):
* NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
(NetworkServiceInitializer):
* WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:
(WebContentServiceInitializer):
2015-11-10 Chris Dumez <cdumez@apple.com>
[WK2][NetworkCache] Rename SpeculativeLoader to SpeculativeLoadManager
https://bugs.webkit.org/show_bug.cgi?id=151110
Reviewed by Alex Christensen.
Rename SpeculativeLoader to SpeculativeLoadManager for clarity, as it
manages all speculative loads.
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::initialize):
(WebKit::NetworkCache::Cache::retrieve):
* NetworkProcess/cache/NetworkCache.h:
* NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp: Renamed from Source/WebKit2/NetworkProcess/cache/NetworkCacheSpeculativeLoader.cpp.
(WebKit::NetworkCache::subresourcesType):
(WebKit::NetworkCache::makeSubresourcesKey):
(WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::PendingFrameLoad):
(WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::registerSubresource):
(WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::encodeAsSubresourcesRecord):
(WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::markAsCompleted):
(WebKit::NetworkCache::SpeculativeLoadManager::SpeculativeLoadManager):
(WebKit::NetworkCache::SpeculativeLoadManager::~SpeculativeLoadManager):
(WebKit::NetworkCache::SpeculativeLoadManager::registerLoad):
* NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.h: Renamed from Source/WebKit2/NetworkProcess/cache/NetworkCacheSpeculativeLoader.h.
* WebKit2.xcodeproj/project.pbxproj:
2015-11-10 Tim Horton <timothy_horton@apple.com>
Add WKWebViewConfiguration SPI for a variety of different ex-preferences
https://bugs.webkit.org/show_bug.cgi?id=151070
<rdar://problem/23020454>
Reviewed by Anders Carlsson.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration init]):
(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration _setRespectsImageOrientation:]):
(-[WKWebViewConfiguration _respectsImageOrientation]):
(-[WKWebViewConfiguration _setPrintsBackgrounds:]):
(-[WKWebViewConfiguration _printsBackgrounds]):
(-[WKWebViewConfiguration _setIncrementalRenderingSuppressionTimeout:]):
(-[WKWebViewConfiguration _incrementalRenderingSuppressionTimeout]):
(-[WKWebViewConfiguration _setAllowsJavaScriptMarkup:]):
(-[WKWebViewConfiguration _allowsJavaScriptMarkup]):
(-[WKWebViewConfiguration _setConvertsPositionStyleOnCopy:]):
(-[WKWebViewConfiguration _convertsPositionStyleOnCopy]):
(-[WKWebViewConfiguration _setAllowsMetaRefresh:]):
(-[WKWebViewConfiguration _allowsMetaRefresh]):
(-[WKWebViewConfiguration _setShowsURLsInToolTips:]):
(-[WKWebViewConfiguration _showsURLsInToolTips]):
(-[WKWebViewConfiguration _setServiceControlsEnabled:]):
(-[WKWebViewConfiguration _serviceControlsEnabled]):
(-[WKWebViewConfiguration _setImageControlsEnabled:]):
(-[WKWebViewConfiguration _imageControlsEnabled]):
* UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
Plumb some configuration SPI for various clients.
2015-11-10 Chris Dumez <cdumez@apple.com>
[WK2][iOS] Update WebContent sandbox profile to allow loading injected bundles again
https://bugs.webkit.org/show_bug.cgi?id=151102
<rdar://problem/23442311>
Reviewed by Dan Bernstein.
Update WebContent sandbox profile to allow loading injected bundles again.
* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2015-11-10 Carlos Garcia Campos <cgarcia@igalia.com>
[UNIX] Environment variable should take precedence over directories in plugin search path
https://bugs.webkit.org/show_bug.cgi?id=151096
Reviewed by Martin Robinson.
Otherwise you can't override the directories using the env vars
for plugins already installed.
* Shared/Plugins/unix/PluginSearchPath.cpp:
(WebKit::pluginsDirectories):
2015-11-10 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Use CROSS_PLATFORM_CONTEXT_MENUS
https://bugs.webkit.org/show_bug.cgi?id=150642
Reviewed by Martin Robinson.
Use CROSS_PLATFORM_CONTEXT_MENUS. Since we can't just use
WebContextMenuItemData, because we need to bind a GtkAction to the
menu items, this patch adds WebContextMenuItemGtk that derives
from WebContextMenuItemData and adds the GtkAction and its own
handling of submenu items. WebKitContextMenu and
WebKitContextMenuItem no longer deal with the widgets (GtkMenu and
GtkMenuItem), that are now created by WebContextMenuProxy when
building the popup menu.
This patch also removes the support for input methods submenu,
since it has been deprecated (and disabled by default) in GTK+ for
long time, it has never actually worked (because the menu items
don't have a GtkAction associated) and it makes the code more
complicated for no benefit.
* PlatformGTK.cmake:
* Shared/gtk/WebContextMenuItemGtk.cpp: Added.
(WebKit::gtkStockIDFromContextMenuAction):
(WebKit::WebContextMenuItemGtk::WebContextMenuItemGtk):
(WebKit::WebContextMenuItemGtk::~WebContextMenuItemGtk):
(WebKit::WebContextMenuItemGtk::createGtkActionIfNeeded):
* Shared/gtk/WebContextMenuItemGtk.h: Copied from Source/WebKit2/UIProcess/gtk/WebContextMenuProxyGtk.h.
(WebKit::WebContextMenuItemGtk::gtkAction):
(WebKit::WebContextMenuItemGtk::submenuItems):
* UIProcess/API/gtk/WebKitContextMenu.cpp:
(webkitContextMenuPopulate):
(webkitContextMenuCreate): Deleted.
(webkitContextMenuSetParentItem): Deleted.
* UIProcess/API/gtk/WebKitContextMenuActions.cpp:
(webkitContextMenuActionGetForContextMenuItem):
* UIProcess/API/gtk/WebKitContextMenuActionsPrivate.h:
* UIProcess/API/gtk/WebKitContextMenuItem.cpp:
(webkitContextMenuItemSetSubMenu):
(webkitContextMenuItemCreate):
(webkitContextMenuItemToWebContextMenuItemGtk):
(webkitContextMenuItemToWebContextMenuItemData):
(webkit_context_menu_item_new):
(webkit_context_menu_item_new_from_stock_action):
(webkit_context_menu_item_new_from_stock_action_with_label):
(webkit_context_menu_item_new_with_submenu):
(webkit_context_menu_item_new_separator):
(webkit_context_menu_item_get_action):
(webkit_context_menu_item_get_stock_action):
(webkit_context_menu_item_is_separator): Deleted.
* UIProcess/API/gtk/WebKitContextMenuItemPrivate.h:
* UIProcess/API/gtk/WebKitContextMenuPrivate.h:
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewPopulateContextMenu):
(contextMenuDismissed): Deleted.
(webkitWebViewSubmitFormRequest): Deleted.
(webkitWebViewHandleAuthenticationChallenge): Deleted.
(webkitWebViewInsecureContentDetected): Deleted.
(webkitWebViewEmitRunColorChooser): Deleted.
(webkitWebViewRequestInstallMissingMediaPlugins): Deleted.
* UIProcess/gtk/WebContextMenuProxyGtk.cpp:
(WebKit::contextMenuItemActivatedCallback):
(WebKit::WebContextMenuProxyGtk::append):
(WebKit::WebContextMenuProxyGtk::populate):
(WebKit::WebContextMenuProxyGtk::show):
(WebKit::WebContextMenuProxyGtk::WebContextMenuProxyGtk):
(WebKit::WebContextMenuProxyGtk::~WebContextMenuProxyGtk):
* UIProcess/gtk/WebContextMenuProxyGtk.h:
(WebKit::WebContextMenuProxyGtk::gtkMenu):
* WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
2015-11-09 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix GTK+ build after r192184.
* WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
(WebKit::LayerTreeHostGtk::initialize):
(WebKit::LayerTreeHostGtk::pageBackgroundTransparencyChanged):
2015-11-09 Eric Carlson <eric.carlson@apple.com>
[Mac] Add a mock AppleTV device for testing
https://bugs.webkit.org/show_bug.cgi?id=148912
<rdar://problem/22596272>
Reviewed by Tim Horton.
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<MediaPlaybackTargetContext>::encode): Update for MediaPlaybackTargetContext changes.
(IPC::ArgumentCoder<MediaPlaybackTargetContext>::decode): Ditto.
* Shared/WebCoreArgumentCoders.h:
* Shared/mac/WebCoreArgumentCodersMac.mm:
(IPC::ArgumentCoder<MediaPlaybackTargetContext>::encodePlatformData): Ditto.
(IPC::ArgumentCoder<MediaPlaybackTargetContext>::decodePlatformData): Ditto.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setMockMediaPlaybackTargetPickerEnabled): New.
(WebKit::WebPageProxy::setMockMediaPlaybackTargetPickerState): Ditto.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in: Add SetMockMediaPlaybackTargetPickerEnabled and
SetMockMediaPlaybackTargetPickerState.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::setMockMediaPlaybackTargetPickerEnabled): New.
(WebKit::WebChromeClient::setMockMediaPlaybackTargetPickerState): Ditto.
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebPage/WebPage.h: MediaPlaybackTargetContext is a class, not a struct.
* WebProcess/WebPage/WebPage.messages.in: Ditto.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::playbackTargetSelected): Support mock target.
2015-11-09 Ryuan Choi <ryuan.choi@navercorp.com>
[EFL] Crash while opening child webview with EWK_PROCESS_MODEL_MULTIPLE_SECONDARY
https://bugs.webkit.org/show_bug.cgi?id=145924
Reviewed by Gyuyoung Kim.
There are some crashes when we clicked the link that opens child window
via window.open or <a> tag with _blank target if process model is multiple
secondary.
It's because multiple secondary process model tries to assign new webprocess
if related page is null. In order to keep the child window in same process
with opener, we should pass related page when we create WebPageProxy.
This patch adds ewk_view_configuration object and ewk_view_add_configuration()
to pass related page to WebPageProxy.
* PlatformEfl.cmake:
* UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
(WKViewCreate):
* UIProcess/API/C/CoordinatedGraphics/WKView.h:
* UIProcess/API/efl/EWebKit2.h.in:
* UIProcess/API/efl/EwkView.cpp:
(EwkView::createNewPage):
* UIProcess/API/efl/ewk_view_configuration.cpp: Added.
* UIProcess/API/efl/ewk_view_configuration.h: Added.
* UIProcess/API/efl/ewk_view_configuration_private.h: Added.
* UIProcess/API/efl/ewk_view.cpp:
(EWKViewCreate):
(ewk_view_smart_add):
(ewk_view_add_with_configuration): Added to pass configuration.
(ewk_view_add_with_context):
* UIProcess/API/efl/ewk_view.h:
* UIProcess/API/efl/ewk_view_private.h:
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
(EWK2UnitTest::EWK2UnitTestBase::waitUntilTitleChangedTo):
(EWK2UnitTest::EWK2UnitTestBase::waitUntilNotNull):
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h:
* UIProcess/API/efl/tests/test_ewk2_view.cpp: Added test cases to test window_create smart method.
(windowCreateCallback):
(TEST_F):
(EWK2ViewTestNewWindowWithMultipleProcesses::EWK2ViewTestNewWindowWithMultipleProcesses):
* UIProcess/API/efl/tests/test_ewk2_window_features.cpp:
(EWK2WindowFeaturesTest::createDefaultWindow):
(EWK2WindowFeaturesTest::createWindow):
* UIProcess/CoordinatedGraphics/WebView.cpp:
(WebKit::WebView::WebView):
* UIProcess/CoordinatedGraphics/WebView.h:
* UIProcess/efl/WebInspectorProxyEfl.cpp:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
* UIProcess/efl/WebViewEfl.cpp:
(WebKit::WebView::create):
(WebKit::WebViewEfl::WebViewEfl):
* UIProcess/efl/WebViewEfl.h:
2015-11-09 Anders Carlsson <andersca@apple.com>
Don't call Vector::uncheckedAppend on a vector that we haven't reserved the capacity for
https://bugs.webkit.org/show_bug.cgi?id=151069
rdar://problem/23473435
Reviewed by Tim Horton.
* Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
(initializeMethod):
2015-11-09 Anders Carlsson <andersca@apple.com>
Fix 32-bit build.
* Shared/API/Cocoa/RemoteObjectRegistry.mm:
(WebKit::RemoteObjectRegistry::callReplyBlock):
2015-11-09 Anders Carlsson <andersca@apple.com>
Add reply blocks to _WKRemoteObjectInterface similar to NSXPCConnection
https://bugs.webkit.org/show_bug.cgi?id=151056
rdar://problem/23222609
Reviewed by Tim Horton.
* Platform/spi/Cocoa/NSInvocationSPI.h:
Add NSBlockInvocation declaration.
* Shared/API/Cocoa/RemoteObjectInvocation.mm:
(WebKit::RemoteObjectInvocation::encode):
Encode true if we have a reply ID.
* Shared/API/Cocoa/RemoteObjectRegistry.h:
Add new members.
* Shared/API/Cocoa/RemoteObjectRegistry.messages.in:
Add new CallReplyBlock message.
* Shared/API/Cocoa/RemoteObjectRegistry.mm:
(WebKit::RemoteObjectRegistry::sendReplyBlock):
Just send the CallReplyBlock message.
(WebKit::RemoteObjectRegistry::callReplyBlock):
Call through to _WKRemoteObjectRegistry.
* Shared/API/Cocoa/WKRemoteObjectCoder.h:
Pass an optional reply selector.
* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(encodeInvocationArguments):
Don't hard-code the first argument index.
(encodeInvocation):
Encode block invocations.
(-[WKRemoteObjectDecoder initWithInterface:rootObjectDictionary:replyToSelector:]):
Initialize _replyToSelector.
(validateClass):
NSBlockInvocation doesn't need to conform to NSSecureCoding.
(decodeInvocationArguments):
Don't hard-code the first argument, take it as a parameter instead.
(decodeInvocation):
Decode NSBlockInvocations (reply block invocations).
(decodeObject):
Check for NSBlockInvocation.
* Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
(-[_WKRemoteObjectInterface _methodSignatureForSelector:]):
Return null if we can't find the method.
(-[_WKRemoteObjectInterface _methodSignatureForReplyBlockOfSelector:]):
Look up the reply block signature and return it.
(-[_WKRemoteObjectInterface _allowedArgumentClassesForReplyBlockOfSelector:]):
Look up the allowed reply argument classes and return them.
* Shared/API/Cocoa/_WKRemoteObjectInterfaceInternal.h:
Add new methods.
* Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:
(PendingReply::PendingReply):
Add new object that represents a pending reply.
(-[_WKRemoteObjectRegistry _sendInvocation:interface:]):
If the invocation has a reply block, add a pending reply to our map.
(-[_WKRemoteObjectRegistry _invokeMethod:]):
If the method we're about to invoke has a reply block, construct a special reply block that calls us back with an invocation.
Encode this invocation and send it back across the wire.
(-[_WKRemoteObjectRegistry _callReplyWithID:blockInvocation:]):
Find the pending reply, decode the reply block invocation and call it.
* Shared/API/Cocoa/_WKRemoteObjectRegistryInternal.h:
Add new methods.
2015-11-09 Tim Horton <timothy_horton@apple.com>
Add drawsBackground SPI to WKWebView, and get rid of drawsTransparentBackground from WebKit2
https://bugs.webkit.org/show_bug.cgi?id=151054
<rdar://problem/22907994>
Reviewed by Simon Fraser.
* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode): Deleted.
(WebKit::WebPageCreationParameters::decode): Deleted.
* Shared/WebPageCreationParameters.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView setDrawsTransparentBackground:]):
(-[WKView drawsTransparentBackground]):
* UIProcess/Cocoa/WebViewImpl.h:
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::updateLayer):
(WebKit::WebViewImpl::setDrawsTransparentBackground): Deleted.
(WebKit::WebViewImpl::drawsTransparentBackground): Deleted.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy): Deleted.
(WebKit::WebPageProxy::setDrawsTransparentBackground): Deleted.
(WebKit::WebPageProxy::creationParameters): Deleted.
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::drawsTransparentBackground): Deleted.
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage): Deleted.
(WebKit::m_shouldDispatchFakeMouseMoveEvents): Deleted.
(WebKit::WebPage::setDrawsTransparentBackground): Deleted.
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::drawsTransparentBackground): Deleted.
* WebProcess/WebPage/WebPage.messages.in:
Get rid of drawsTransparentBackground. It doesn't seem like there's any observable
difference in a layer-backed world. WKView's (set)drawsTransparentBackground
will just forward to drawsBackground (inverted).
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _webProcessIsResponsive]):
Move _webProcessIsResponsive up with the other cross-platform SPI methods, instead
of below all of the platform-specific SPI methods.
(-[WKWebView _drawsBackground]):
(-[WKWebView _setDrawsBackground:]):
Added.
(-[WKWebView _drawsTransparentBackground]):
(-[WKWebView _setDrawsTransparentBackground:]):
Deleted.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
Replace drawsTransparentBackground with drawsBackground.
2015-11-09 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: REGRESSION: 2nd level inspector should not be able to dock to first
https://bugs.webkit.org/show_bug.cgi?id=151050
Reviewed by Brian Burg.
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformCanAttach):
Check now that the inspected view can be a WKWebView.
2015-11-09 Anders Carlsson <andersca@apple.com>
Introspect reply block types as well
https://bugs.webkit.org/show_bug.cgi?id=151048
Reviewed by Tim Horton.
* Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
(initializeMethod):
(initializeMethods):
(-[_WKRemoteObjectInterface debugDescription]):
2015-11-09 Anders Carlsson <andersca@apple.com>
Implement -[_WKRemoteObjectInterface debugDescription] and have it look like the NSXPCInterface equivalent
https://bugs.webkit.org/show_bug.cgi?id=151044
Reviewed by Tim Horton.
* Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
(-[_WKRemoteObjectInterface debugDescription]):
(-[_WKRemoteObjectInterface description]): Deleted.
2015-11-06 Anders Carlsson <andersca@apple.com>
Rework the way allowed argument classes are stored
https://bugs.webkit.org/show_bug.cgi?id=150992
Reviewed by Darin Adler.
Add a separate MethodInfo class so we have someplace to store the reply block arguments.
Use HashSet<Class> instead of NSSet. No functionality change intended.
* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(-[WKRemoteObjectDecoder decodeValueOfObjCType:at:]):
(decodeObjectFromObjectStream):
(checkIfClassIsAllowed):
(decodeInvocationArguments):
(decodeObject):
(-[WKRemoteObjectDecoder decodeObjectOfClasses:forKey:]):
(-[WKRemoteObjectDecoder allowedClasses]):
* Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
(isContainerClass):
(propertyListClasses):
(initializeMethod):
(initializeMethods):
(-[_WKRemoteObjectInterface initWithProtocol:identifier:]):
(classesForSelectorArgument):
(-[_WKRemoteObjectInterface classesForSelector:argumentIndex:]):
(-[_WKRemoteObjectInterface setClasses:forSelector:argumentIndex:]):
(-[_WKRemoteObjectInterface _allowedArgumentClassesForSelector:]):
(allowedArgumentClassesForMethod): Deleted.
(initializeAllowedArgumentClasses): Deleted.
* Shared/API/Cocoa/_WKRemoteObjectInterfaceInternal.h:
2015-11-09 Csaba Osztrogonác <ossy@webkit.org>
Unreviewed CMake buildfix after r192113.
* PlatformMac.cmake: New file added.
2015-11-09 Csaba Osztrogonác <ossy@webkit.org>
Unreviewed speculative CMake buildfix after r192111.
* CMakeLists.txt: New files added.
2015-11-08 Gyuyoung Kim <gyuyoung.kim@webkit.org>
[EFL] Add UserAgentEFl.cpp|h
https://bugs.webkit.org/show_bug.cgi?id=151007
Reviewed by Darin Adler.
As other ports EFL port starts to have UserAgentEfl class in order to support more detailed
UA.
* UIProcess/efl/WebPageProxyEfl.cpp:
(WebKit::WebPageProxy::standardUserAgent): Call WebCore::standardUserAgent().
2015-11-07 Simon Fraser <simon.fraser@apple.com>
Remove ColorSpace argument to all the drawing calls
https://bugs.webkit.org/show_bug.cgi?id=150967
Reviewed by Darin Adler.
* Shared/API/c/cg/WKImageCG.cpp:
(WKImageCreateFromCGImage):
* Shared/ContextMenuContextData.cpp:
(WebKit::ContextMenuContextData::ContextMenuContextData):
* Shared/WebCoreArgumentCoders.cpp:
(IPC::encodeImage):
* Shared/mac/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::drawInContext):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _updateScrollViewBackground]):
* UIProcess/WKInspectorHighlightView.mm:
(-[WKInspectorHighlightView _layoutForNodeHighlight:offset:]):
(-[WKInspectorHighlightView _layoutForRectsHighlight:]):
* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _updateTapHighlight]):
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::drawRect):
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::createSelectionSnapshot):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::snapshotAtSize):
* WebProcess/WebPage/ios/FindControllerIOS.mm:
(WebKit::FindIndicatorOverlayClientIOS::drawRect):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getPositionInformation):
* WebProcess/ios/WebVideoFullscreenManager.mm:
(WebKit::WebVideoFullscreenManager::didSetupFullscreen):
2015-11-07 Simon Fraser <simon.fraser@apple.com>
Use ColorSpaceSRGB for image buffers everywhere
https://bugs.webkit.org/show_bug.cgi?id=150990
Reviewed by Zalan Bujtas.
ColorSpaceSRGB and ColorSpaceDeviceRGB are equivalent now, so convert
code that creates image buffers tagged with ColorSpaceDeviceRGB to use ColorSpaceSRGB.
* Shared/mac/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::decode):
(WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _takeViewSnapshot]):
(-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
2015-11-06 Brady Eidson <beidson@apple.com>
Modern IDB: Make the result data for a "get" request be an IDBGetResult.
https://bugs.webkit.org/show_bug.cgi?id=150985
Reviewed by Alex Christensen.
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<IDBGetResult>::encode):
(IPC::ArgumentCoder<IDBGetResult>::decode):
2015-11-06 Tim Horton <timothy_horton@apple.com>
Add preliminary (SPI) support for NSTextFinder on WKWebView
https://bugs.webkit.org/show_bug.cgi?id=150907
<rdar://problem/19171624>
Reviewed by Darin Adler.
New API test: WebKit2.FindInPage
* Platform/spi/mac/AppKitSPI.h:
Add some SPI.
* UIProcess/API/APIFindClient.h:
(API::FindClient::didFindString):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageFindClient):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didFindString):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/Cocoa/FindClient.h:
* UIProcess/Cocoa/FindClient.mm:
(WebKit::FindClient::didFindString):
Make didFindString return the match rects like didFindStringMatches does.
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::updateFindUIAfterPageScroll):
(WebKit::FindController::findString):
Keep the most recent find match around for incremental find just like we do
for the non-incremental version. This way, getImageForFindMatch and selectFindMatch
will work for incremental find too!
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _ensureTextFinderClient]):
(-[WKWebView findMatchesForString:relativeToMatch:findOptions:maxResults:resultCollector:]):
(-[WKWebView documentContainerView]):
(-[WKWebView getSelectedText:]):
(-[WKWebView selectFindMatch:completionHandler:]):
Implement NSTextFinder's async client protocol and forward to the new WKTextFinderClient.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
Privately note our conformance to the aformentioned protocol.
* UIProcess/mac/WKTextFinderClient.h: Added.
* UIProcess/mac/WKTextFinderClient.mm: Added.
(WebKit::TextFinderFindClient::TextFinderFindClient):
(-[WKTextFinderMatch initWithClient:view:index:rects:]):
(-[WKTextFinderMatch containingView]):
(-[WKTextFinderMatch textRects]):
(-[WKTextFinderMatch generateTextImage:]):
(-[WKTextFinderMatch index]):
(-[WKTextFinderClient initWithPage:view:]):
(-[WKTextFinderClient willDestroyView:]):
(-[WKTextFinderClient findMatchesForString:relativeToMatch:findOptions:maxResults:resultCollector:]):
(-[WKTextFinderClient getSelectedText:]):
(-[WKTextFinderClient selectFindMatch:completionHandler:]):
(-[WKTextFinderClient didFindStringMatches:rects:index:]):
(-[WKTextFinderClient didGetImageForMatchResult:index:]):
(-[WKTextFinderClient didFindString:rects:index:]):
(-[WKTextFinderClient didFailToFindString:]):
(-[WKTextFinderClient getImageForMatchResult:completionHandler:]):
* WebKit2.xcodeproj/project.pbxproj:
Add WKTextFinderClient. It installs itself as the FindClient and FindMatchesClient,
so you can only use one mechanism or the other.
2015-11-06 Chris Dumez <cdumez@apple.com>
[WK2][SpeculativeRevalidation] Save to disk cache relationship between resources
https://bugs.webkit.org/show_bug.cgi?id=150951
<rdar://problem/23092196>
Reviewed by Darin Adler.
This patch is a first step towards speculative revalidation support in
the WebKit network cache. It maps sub-resources to the main resource
that caused them to be requested. We then write this information to the
network cache, as a list of subresource keys for each main resource,
even if the main resource is not cacheable.
To map sub-resources to main resources, we track the loads happening
in each frame and store the key of the main resource for the frame,
as well as the key of each sub-resource later loaded in the frame. We
use a HysteresisActivity to detect when loads settle down in each frame
(no loads happen for a while) and we then write the information to the
disk. If a new main resource is loaded in a frame where we were already
tracking a load, we save the data to disk before tracking the new load,
instead of waiting for the HysteresisActivity to detect the end of the
load.
The feature is currently behind a compile-time flag that is enabled on
Mac and iOS only. It is also behind a runtime flag (NSUserDefaults)
that is disabled by default.
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::start):
Pass frameID in addition to the pageID. We need to globally identify
frames (using <pageID, frameID> pair) to be able to track loads in
each frame.
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::initialize):
Only initialize the SpeculativeLoader if the
enableNetworkCacheSpeculativeRevalidation run-time flag is set.
(WebKit::NetworkCache::Cache::retrieve):
Register the load with the SpeculativeLoader.
* NetworkProcess/cache/NetworkCacheKey.h:
(WebKit::NetworkCache::Key::Key):
(WebKit::NetworkCache::Key::isHashTableDeletedValue):
(WebKit::NetworkCache::Key::range):
(WTF::NetworkCacheKeyHash::hash):
(WTF::NetworkCacheKeyHash::equal):
(WTF::HashTraits<WebKit::NetworkCache::Key>::isEmptyValue):
Add needed HashTraits for NetworkCache::Key so it can be used as key in
HashMap / HashSet.
* NetworkProcess/cache/NetworkCacheSpeculativeLoader.cpp: Added.
* NetworkProcess/cache/NetworkCacheSpeculativeLoader.h: Added.
Add new NetworkCacheSpeculativeLoader class that takes care of tracking
loads in each frame to map subresources to main resources and then write
this information to the network disk cache. In the future, this class we
also take care of triggering speculative revalidations, thus the naming.
* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
* NetworkProcess/soup/NetworkProcessSoup.cpp:
(WebKit::NetworkProcess::platformInitializeNetworkProcess):
* Shared/Network/NetworkProcessCreationParameters.cpp:
(WebKit::NetworkProcessCreationParameters::encode):
(WebKit::NetworkProcessCreationParameters::decode):
* Shared/Network/NetworkProcessCreationParameters.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::registerUserDefaultsIfNeeded):
(WebKit::WebProcessPool::platformInitializeNetworkProcess):
Add new NetworkProcess parameter to control at runtime if speculative loading
should be enabled or not. It is disabled by default.
* WebKit2.xcodeproj/project.pbxproj:
Add new files to XCode project.
* config.h:
Add ENABLE_NETWORK_CACHE_SPECULATIVE_REVALIDATION build flag for the new
feature that is enable by default on COCOA.
2015-11-06 Chris Dumez <cdumez@apple.com>
Unreviewed, remove empty #if block landed by mistake in r192038.
* NetworkProcess/NetworkLoad.cpp:
2015-11-06 Philip Chimento <philip.chimento@gmail.com>
[GTK] Fails to link libwebkit2gtkinjectedbundle.so on OSX
https://bugs.webkit.org/show_bug.cgi?id=144785
Reviewed by Philippe Normand.
* PlatformGTK.cmake: Add missing WebKit2 library to list of
libraries to link with. Required for OSX build.
2015-11-05 Nikos Andronikos <nikos.andronikos-webkit@cisra.canon.com.au>
Add runtime and compile time flags for enabling Web Animations API and model.
https://bugs.webkit.org/show_bug.cgi?id=150914
Reviewed by Benjamin Poulain.
Add ENABLE_WEB_ANIMATIONS compile time flag, runtime flag webAnimationsEnabled and Expose WK2 preference for runtime flag.
* Configurations/FeatureDefines.xcconfig:
* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetWebAnimationsEnabled):
(WKPreferencesGetWebAnimationsEnabled):
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
(WebKit::InjectedBundle::setWebAnimationsEnabled):
* WebProcess/InjectedBundle/InjectedBundle.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
2015-11-05 Ryuan Choi <ryuan.choi@navercorp.com>
[EFL] Separate beforeunload confirm callback from confirm callback
https://bugs.webkit.org/show_bug.cgi?id=150964
Reviewed by Gyuyoung Kim.
Browser may need to distinguish between beforeunload confirm panel and general confirm panel.
For example, browser may want to modify the message or show different buttons from confirm panel
such as "Stay Page | Leave Page".
* UIProcess/API/efl/EwkView.cpp:
(EwkView::requestJSBeforeUnloadConfirmPopup):
* UIProcess/API/efl/EwkView.h:
* UIProcess/API/efl/ewk_view.h:
* UIProcess/API/efl/tests/test_ewk2_view.cpp:
(TEST_F):
* UIProcess/efl/PageUIClientEfl.cpp:
(WebKit::PageUIClientEfl::runBeforeUnloadConfirmPanel):
2015-11-05 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r192089.
https://bugs.webkit.org/show_bug.cgi?id=150966
This change broke an existing layout test on Yosemite and
Mavericks (Requested by ryanhaddad on #webkit).
Reverted changeset:
"Preview on apple.com/contact with all text selected shows a
map"
https://bugs.webkit.org/show_bug.cgi?id=150963
http://trac.webkit.org/changeset/192089
2015-11-05 Tim Horton <timothy_horton@apple.com>
Preview on apple.com/contact with all text selected shows a map
https://bugs.webkit.org/show_bug.cgi?id=150963
<rdar://problem/23421750>
Reviewed by Beth Dakin.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performDictionaryLookupForSelection):
In this case, we don't know where we hit, so pass a null VisiblePosition.
2015-11-05 Geoffrey Garen <ggaren@apple.com>
_WKObservablePageState's _webProcessIsResponsive property isn't set to YES when an unresponsive page is reloaded
https://bugs.webkit.org/show_bug.cgi?id=150953
Reviewed by Anders Carlsson.
* UIProcess/ResponsivenessTimer.cpp:
(WebKit::ResponsivenessTimer::processTerminated): Call stop() to
indicate that we are responsive again. This gives the client a chance
to remove the SPOD cursor, among other things.
* UIProcess/ResponsivenessTimer.h:
(WebKit::ResponsivenessTimer::processTerminated): Anders told me to do this!
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::resetStateAfterProcessExited): Be sure to reset
the responsiveness timer too, or it will continue thinking we are
unresponsive after a crash or a forced load or reload.
2015-11-05 Anders Carlsson <andersca@apple.com>
Move invocation argument encoding out to a separate function
https://bugs.webkit.org/show_bug.cgi?id=150950
Reviewed by Tim Horton.
* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(encodeInvocationArguments):
(encodeInvocation):
2015-11-05 Chris Dumez <cdumez@apple.com>
[WK2] Clean up / Modernize NetworkResourceLoader
https://bugs.webkit.org/show_bug.cgi?id=150922
Reviewed by Andreas Kling.
Clean up / Modernize NetworkResourceLoader.
* NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
(WebKit::NetworkBlobRegistry::filesInBlob):
* NetworkProcess/FileAPI/NetworkBlobRegistry.h:
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::scheduleResourceLoad):
(WebKit::NetworkConnectionToWebProcess::performSynchronousLoad):
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::SynchronousLoadData::SynchronousLoadData):
(WebKit::sendReplyToSynchronousRequest):
(WebKit::NetworkResourceLoader::NetworkResourceLoader):
(WebKit::NetworkResourceLoader::startNetworkLoad):
(WebKit::NetworkResourceLoader::didFinishLoading):
(WebKit::NetworkResourceLoader::willSendRedirectedRequest):
(WebKit::NetworkResourceLoader::bufferingTimerFired):
(WebKit::NetworkResourceLoader::sendBufferMaybeAborting):
(WebKit::NetworkResourceLoader::validateCacheEntry):
(WebKit::NetworkResourceLoader::messageSenderConnection):
(WebKit::NetworkResourceLoader::invalidateSandboxExtensions):
(WebKit::NetworkResourceLoader::~NetworkResourceLoader): Deleted.
(WebKit::NetworkResourceLoader::didReceiveBuffer): Deleted.
(WebKit::NetworkResourceLoader::didRetrieveCacheEntry): Deleted.
(WebKit::NetworkResourceLoader::consumeSandboxExtensions): Deleted.
(WebKit::NetworkResourceLoader::sendAbortingOnFailure): Deleted.
* NetworkProcess/NetworkResourceLoader.h:
* NetworkProcess/mac/NetworkDiskCacheMonitor.h:
2015-11-05 Chris Dumez <cdumez@apple.com>
Regression(r192038): Safari cannot load any pages
https://bugs.webkit.org/show_bug.cgi?id=150937
<rdar://problem/23413859>
Reviewed by Alex Christensen.
Make sure we use the current "defersLoading" state instead of the
original one when constructing / initializing the NetworkLoad.
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::startNetworkLoad):
2015-11-05 Ryuan Choi <ryuan.choi@navercorp.com>
[EFL] Add try_close API to handle beforeunload event
https://bugs.webkit.org/show_bug.cgi?id=150705
Reviewed by Gyuyoung Kim.
This patch adds ewk_view_try_close to have a chance to call confirm callback
for beforeunload event while destryoing webview.
* UIProcess/API/efl/ewk_view.cpp:
(ewk_view_try_close):
* UIProcess/API/efl/ewk_view.h:
* UIProcess/API/efl/tests/test_ewk2_view.cpp:
(EWK2ViewTest::beforeUnloadCallback):
(EWK2ViewTest::windowCloseCallback):
(TEST_F): Added test case for ewk_view_try_close.
2015-11-04 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Epiphany with Debug mode compiled WebKitGtk+ 2.10.3 hits ASSERT_ARG on willEnterAcceleratedCompositingMode
https://bugs.webkit.org/show_bug.cgi?id=150620
Reviewed by Mario Sanchez Prada.
WillEnterAcceleratedCompositingMode message is sent when the
LayerTreeHost is created in the Web Process. This can happen while
there's still a DidUpdateBackingStoreState pending, in which case
we are receiving the new backingStoreStateID, but the current one
hasn't been updated yet.
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::willEnterAcceleratedCompositingMode):
Fix the ASSERT to check the given ID is alt least the next one,
and remove the early return since it's valid to not enter AC mode
in the end after the WillEnter message.
2015-11-04 Tim Horton <timothy_horton@apple.com>
REGRESSION (r191499): 100% repro crash under _prepareForMoveToWindow:
https://bugs.webkit.org/show_bug.cgi?id=150912
<rdar://problem/23402116>
Reviewed by Simon Fraser.
* UIProcess/API/mac/WKView.mm:
(-[WKView _prepareForMoveToWindow:withCompletionHandler:]):
2015-11-04 Chris Dumez <cdumez@apple.com>
Regression(r192038): Crash in ~SandboxExtension()
https://bugs.webkit.org/show_bug.cgi?id=150898
Reviewed by Alex Christensen.
We are seeing a couple of crashes under ~SandboxExtension() on the bots
after ~SandboxExtension(). The reason is that the SandBoxExtension is
still in use (useCount > 0) when destroyed. This happens due to a bug
in setDefersLoading() that could cause the load to get started more
than once and thus the SandboxExtension to be consumed more than once.
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::setDefersLoading):
(WebKit::NetworkResourceLoader::consumeSandboxExtensions):
2015-11-04 Chris Dumez <cdumez@apple.com>
[WK2] Extract networking code out of NetworkResourceLoader class to improve reusability
https://bugs.webkit.org/show_bug.cgi?id=150898
Reviewed by Alex Christensen.
Extract networking code out of NetworkResourceLoader class to improve
reusability (will be used for speculative revalidation) and simplify
the NetworkResourceLoader.
* CMakeLists.txt:
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
* NetworkProcess/NetworkLoad.cpp: Added.
* NetworkProcess/NetworkLoad.h: Added.
* NetworkProcess/NetworkLoadClient.h: Added.
* NetworkProcess/NetworkLoadParameters.cpp: Added.
* NetworkProcess/NetworkLoadParameters.h: Added.
* NetworkProcess/NetworkResourceLoader.cpp:
* NetworkProcess/NetworkResourceLoader.h:
* NetworkProcess/mac/NetworkLoadMac.mm: Added.
* NetworkProcess/mac/NetworkResourceLoaderMac.mm:
(WebKit::NetworkResourceLoader::willCacheResponseAsync):
* WebKit2.xcodeproj/project.pbxproj:
2015-11-04 Beth Dakin <bdakin@apple.com>
Link preview doesn't work on XHTML pages with Content-Type header as
`application/xhtml+xml`
https://bugs.webkit.org/show_bug.cgi?id=150740
-and corresponding-
rdar://problem/23063585
Reviewed by Darin Adler.
My original fix for this bug was incorrect in the presence of non-HTML
elements that happen to have the same local name as HTML elements. Since it
seems silly to have all of this logic in the UI process to determine whether
to treat something as a link or an image, this patch fixes the bug by adding
isLink and isImage to InteractionInformationAtPosition in order to simplify
everything. The only remaining uses of clickableElementName just use it to
compare against isNull and isEmpty, so that can be a bool too.
Add isLink and isImage, and turn clickableElementName into isClickableElement
* Shared/InteractionInformationAtPosition.cpp:
(WebKit::InteractionInformationAtPosition::encode):
(WebKit::InteractionInformationAtPosition::decode):
* Shared/InteractionInformationAtPosition.h:
Use the new isLink, isImage, and isClickableElement
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _actionForLongPress]):
(-[WKContentView gestureRecognizerShouldBegin:]):
(-[WKContentView _highlightLongPressRecognized:]):
(-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
(-[WKContentView _dataForPreviewItemController:atPosition:type:]):
Set everything correctly.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getPositionInformation):
2015-11-04 Wenson Hsieh <wenson_hsieh@apple.com>
Fix crashing fast-clicking WK2 tests on iOS
https://bugs.webkit.org/show_bug.cgi?id=150896
<rdar://problem/23344491>
Reviewed by Simon Fraser.
In order for the modified fast-clicking tests to pass, we can't allow hit-testing to
find the tap highlight view. See the Radar for more UIKit-specific descriptions.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _showTapHighlight]):
2015-11-03 Anders Carlsson <andersca@apple.com>
PageLoadState::will/didChangeProcessIsResponsive should call observers
https://bugs.webkit.org/show_bug.cgi?id=150870
Reviewed by Dan Bernstein.
* UIProcess/PageLoadState.cpp:
(WebKit::PageLoadState::willChangeProcessIsResponsive):
(WebKit::PageLoadState::didChangeProcessIsResponsive):
2015-11-04 Ryan Haddad <ryanhaddad@apple.com>
Speculative build fix. Missed the checkin for the changelog with r192029.
* UIProcess/API/Cocoa/WKWebView.mm:
2015-11-03 Andy Estes <aestes@apple.com>
[Cocoa] Add SPI to warm an initial web process
https://bugs.webkit.org/show_bug.cgi?id=150886
Reviewed by Dan Bernstein.
* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _warmInitialProcess]):
* UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
2015-11-03 Andy Estes <aestes@apple.com>
[Cocoa] Adopt WKWebViewAdditions
https://bugs.webkit.org/show_bug.cgi?id=150885
Reviewed by Dan Bernstein.
* UIProcess/API/Cocoa/WKWebView.mm:
2015-11-03 Tim Horton <timothy_horton@apple.com>
Duplicate validateUserInterfaceItem in WKWebView
https://bugs.webkit.org/show_bug.cgi?id=150873
Reviewed by Anders Carlsson.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView changeFont:]):
(-[WKWebView startSpeaking:]):
(-[WKWebView validateUserInterfaceItem:]):
(-[WKWebView goBack:]):
2015-11-03 Geoffrey Garen <ggaren@apple.com>
Provide a way to turn off const in WebKit2.
Reviewed by Sam Weinig.
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):
2015-11-03 Alex Christensen <achristensen@webkit.org>
Create a NetworkSession for each SessionID
https://bugs.webkit.org/show_bug.cgi?id=150857
Reviewed by Anders Carlsson.
This patch renames SessionTracker::session to storageSession and makes a parallel
structure for NetworkSessions. NetworkSession and NetworkStorageSession should eventually
become the same class in WebCore. Because not everybody uses NetworkSessions yet,
we keep them separate but created, destroyed, and managed together.
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::storageSession):
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::fetchWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::startNetworkLoad):
(WebKit::NetworkResourceLoader::abort):
* NetworkProcess/NetworkResourceLoader.h:
* NetworkProcess/NetworkSession.h:
(WebKit::NetworkSessionTaskClient::~NetworkSessionTaskClient):
(WebKit::NetworkDataTask::client):
(WebKit::NetworkDataTask::clearClient):
(WebKit::NetworkingDataTask::client): Deleted.
(WebKit::NetworkingDataTask::clearClient): Deleted.
(WebKit::NetworkSession::~NetworkSession): Deleted.
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(WebKit::configurationForType):
(WebKit::defaultNetworkSession):
(WebKit::NetworkSession::defaultSession):
(WebKit::NetworkSession::NetworkSession):
(WebKit::NetworkSession::~NetworkSession):
(WebKit::NetworkSession::createDataTaskWithRequest):
(WebKit::NetworkSession::dataTaskForIdentifier):
(WebKit::NetworkDataTask::NetworkDataTask):
(WebKit::NetworkDataTask::~NetworkDataTask):
(WebKit::NetworkDataTask::cancel):
(WebKit::NetworkDataTask::resume):
(WebKit::NetworkDataTask::taskIdentifier):
(WebKit::NetworkSession::create): Deleted.
(WebKit::NetworkSession::singleton): Deleted.
(WebKit::NetworkingDataTask::NetworkingDataTask): Deleted.
(WebKit::NetworkingDataTask::~NetworkingDataTask): Deleted.
(WebKit::NetworkingDataTask::suspend): Deleted.
(WebKit::NetworkingDataTask::resume): Deleted.
(WebKit::NetworkingDataTask::taskIdentifier): Deleted.
* NetworkProcess/mac/RemoteNetworkingContext.mm:
(WebKit::RemoteNetworkingContext::storageSession):
(WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
* Shared/SessionTracker.cpp:
(WebKit::staticStorageSessionMap):
(WebKit::identifierBase):
(WebKit::SessionTracker::storageSessionMap):
(WebKit::SessionTracker::getIdentifierBase):
(WebKit::SessionTracker::storageSession):
(WebKit::staticSessionMap):
(WebKit::SessionTracker::networkSession):
(WebKit::SessionTracker::sessionID):
(WebKit::SessionTracker::setSession):
(WebKit::SessionTracker::destroySession):
(WebKit::SessionTracker::sessionMap): Deleted.
(WebKit::SessionTracker::session): Deleted.
* Shared/SessionTracker.h:
* WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
(WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
(WebKit::WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts):
(WebKit::WebFrameNetworkingContext::storageSession):
* WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
(WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
(WebKit::WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts):
(WebKit::WebFrameNetworkingContext::storageSession):
2015-11-03 Ryuan Choi <ryuan.choi@navercorp.com>
[CoordinatedGraphics] invisible webview should not paint the content
https://bugs.webkit.org/show_bug.cgi?id=150662
Reviewed by Darin Adler.
Suspend or resume the painting instead of just initializing m_isPaintingSuspended
for invisible webview not to paint the content until visibility is changed.
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp:
(WebKit::CoordinatedDrawingArea::CoordinatedDrawingArea):
2015-11-03 Anders Carlsson <andersca@apple.com>
Simplify -[_WKRemoteObjectRegistry _invokeMethod:]
https://bugs.webkit.org/show_bug.cgi?id=150844
Reviewed by Tim Horton.
* Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:
(-[_WKRemoteObjectRegistry _invokeMethod:]):
(-[_WKRemoteObjectRegistry _invokeMessageWithInterfaceIdentifier:encodedInvocation:]): Deleted.
* Shared/API/Cocoa/_WKRemoteObjectRegistryInternal.h:
2015-11-02 Anders Carlsson <andersca@apple.com>
CTTE the responsiveness timer getter
https://bugs.webkit.org/show_bug.cgi?id=150825
Reviewed by Daniel Bates.
* UIProcess/API/C/mac/WKPagePrivateMac.mm:
(-[WKObservablePageState _webProcessIsResponsive]):
* UIProcess/API/Cocoa/WKBrowsingContextController.mm:
(-[WKBrowsingContextController _webProcessIsResponsive]):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _webProcessIsResponsive]):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::reattachToWebProcessForReload):
(WebKit::WebPageProxy::reattachToWebProcessWithItem):
(WebKit::WebPageProxy::tryClose):
(WebKit::WebPageProxy::loadRequest):
(WebKit::WebPageProxy::loadFile):
(WebKit::WebPageProxy::loadData):
(WebKit::WebPageProxy::loadHTMLString):
(WebKit::WebPageProxy::loadAlternateHTMLString):
(WebKit::WebPageProxy::loadPlainTextString):
(WebKit::WebPageProxy::loadWebArchiveData):
(WebKit::WebPageProxy::navigateToPDFLinkWithSimulatedClick):
(WebKit::WebPageProxy::stopLoading):
(WebKit::WebPageProxy::reload):
(WebKit::WebPageProxy::goForward):
(WebKit::WebPageProxy::goBack):
(WebKit::WebPageProxy::goToBackForwardItem):
(WebKit::WebPageProxy::dispatchViewStateChange):
(WebKit::WebPageProxy::handleMouseEvent):
(WebKit::WebPageProxy::sendWheelEvent):
(WebKit::WebPageProxy::handleKeyboardEvent):
(WebKit::WebPageProxy::handleGestureEvent):
(WebKit::WebPageProxy::handleTouchEventSynchronously):
(WebKit::WebPageProxy::handleTouchEvent):
(WebKit::WebPageProxy::closePage):
(WebKit::WebPageProxy::runJavaScriptAlert):
(WebKit::WebPageProxy::runJavaScriptConfirm):
(WebKit::WebPageProxy::runJavaScriptPrompt):
(WebKit::WebPageProxy::runBeforeUnloadConfirmPanel):
(WebKit::WebPageProxy::runOpenPanel):
(WebKit::WebPageProxy::showPopupMenu):
(WebKit::WebPageProxy::internalShowContextMenu):
(WebKit::WebPageProxy::didReceiveEvent):
(WebKit::WebPageProxy::stopResponsivenessTimer):
(WebKit::WebPageProxy::runModal):
(WebKit::WebPageProxy::updateBackingStoreDiscardableState):
* UIProcess/WebProcessProxy.h:
(WebKit::WebProcessProxy::responsivenessTimer):
2015-11-03 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Update OptionsGTK.cmake and NEWS for 2.11.1 release.
* gtk/NEWS: Add release notes for 2.11.1.
2015-11-03 Alex Christensen <achristensen@webkit.org>
Use the same cookie storage as WebCore when using NETWORK_SESSION
https://bugs.webkit.org/show_bug.cgi?id=150833
Reviewed by Antti Koivisto.
This fixes 12 tests when using NETWORK_SESSION.
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(WebKit::NetworkSession::NetworkSession):
2015-11-03 Alex Christensen <achristensen@webkit.org>
Clean up NETWORK_SESSION code after r191848
https://bugs.webkit.org/show_bug.cgi?id=150829
Reviewed by Darin Adler.
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::didReceiveData):
(WebKit::NetworkResourceLoader::didCompleteWithError):
* NetworkProcess/NetworkSession.h:
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(WebKit::NetworkSession::NetworkSession):
(WebKit::NetworkSession::createDataTaskWithRequest):
(WebKit::NetworkSession::dataTaskForIdentifier):
2015-11-02 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix GTK+ build after r191924.
* UIProcess/API/gtk/WebKitWebView.cpp:
2015-11-02 Alex Christensen <achristensen@webkit.org>
Fix CMake build after r191922.
* PlatformMac.cmake:
2015-11-02 Andy Estes <aestes@apple.com>
Try again to fix the iOS build.
* Shared/mac/PDFKitImports.mm:
2015-11-02 Tim Horton <timothy_horton@apple.com>
Try to fix the iOS build
* Shared/mac/PDFKitImports.h:
2015-11-02 Tim Horton <timothy_horton@apple.com>
Address a misssed review comment in r191922
* WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
(WebKit::PDFPlugin::nextMatchForString):
2015-11-02 Anders Carlsson <andersca@apple.com>
Add KVO-compliant _webProcessIsResponsive property to WKWebView and _WKObservablePageState
https://bugs.webkit.org/show_bug.cgi?id=150818
rdar://problem/22372131
Reviewed by Tim Horton.
* UIProcess/API/C/mac/WKPagePrivateMac.h:
* UIProcess/API/C/mac/WKPagePrivateMac.mm:
(-[WKObservablePageState _webProcessIsResponsive]):
* UIProcess/API/Cocoa/PageLoadStateObserver.h:
* UIProcess/API/Cocoa/WKBrowsingContextController.mm:
(-[WKBrowsingContextController _webProcessIsResponsive]):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _webProcessIsResponsive]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::willChangeWebProcessIsResponsive):
(WebKit::NavigationState::didChangeWebProcessIsResponsive):
* UIProcess/PageLoadState.cpp:
(WebKit::PageLoadState::willChangeProcessIsResponsive):
(WebKit::PageLoadState::didChangeProcessIsResponsive):
* UIProcess/PageLoadState.h:
* UIProcess/ResponsivenessTimer.cpp:
(WebKit::ResponsivenessTimer::ResponsivenessTimer):
(WebKit::ResponsivenessTimer::timerFired):
(WebKit::ResponsivenessTimer::stop):
* UIProcess/ResponsivenessTimer.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::willChangeProcessIsResponsive):
(WebKit::WebPageProxy::didChangeProcessIsResponsive):
* UIProcess/WebPageProxy.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::WebProcessProxy):
(WebKit::WebProcessProxy::didBecomeUnresponsive):
(WebKit::WebProcessProxy::didBecomeResponsive):
(WebKit::WebProcessProxy::willChangeIsResponsive):
(WebKit::WebProcessProxy::didChangeIsResponsive):
* UIProcess/WebProcessProxy.h:
2015-11-02 Tim Horton <timothy_horton@apple.com>
PDFPlugin should take advantage of threaded scrolling
https://bugs.webkit.org/show_bug.cgi?id=150037
Reviewed by Anders Carlsson.
Duplicate PDFPlugin, creating PDFPlugin (the modern version), and
DeprecatedPDFPlugin (containing the code that used to be in PDFPlugin
prior to this patch).
The new PDFPlugin differs from the old one in a few significant ways,
and we need to keep both alive for the time being. Significant differences
include:
- PDFPlugin is no longer a ScrollableArea
- PDFPlugin no longer hosts layers owned by PDFKit; instead, it draws
into the page tiles, allowing WebCore's threaded scrolling to do its job
- PDFPlugin now resizes itself to the size of the document
- PDFPlugin doesn't handle zooming itself, it just delegates to the page
- PDFLayerController has large and incompatible API changes
- PDFPlugin now implements more of the HUD behavior, but it's still
painted by PDFLayerController (into a view-relative PageOverlay)
[ File list elided because it's long and useless. ]
2015-11-02 Andy Estes <aestes@apple.com>
[Cocoa] Add tvOS and watchOS to SUPPORTED_PLATFORMS
https://bugs.webkit.org/show_bug.cgi?id=150819
Reviewed by Dan Bernstein.
This tells Xcode to include these platforms in its Devices dropdown, making it possible to build in the IDE.
* Configurations/Base.xcconfig:
2015-11-02 Anders Carlsson <andersca@apple.com>
Begin work on supporting reply blocks in _WKRemoteObjectRegistry
https://bugs.webkit.org/show_bug.cgi?id=150739
Reviewed by Tim Horton.
* Platform/spi/Cocoa/BlockSPI.h:
Add SPI header.
* Shared/API/Cocoa/RemoteObjectInvocation.h:
(WebKit::RemoteObjectInvocation::ReplyInfo::ReplyInfo):
(WebKit::RemoteObjectInvocation::replyInfo):
* Shared/API/Cocoa/RemoteObjectInvocation.mm:
(WebKit::RemoteObjectInvocation::RemoteObjectInvocation):
(WebKit::RemoteObjectInvocation::encode):
(WebKit::RemoteObjectInvocation::decode):
Add an optional ReplyInfo struct to RemoteObjectInvocation.
* Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:
(generateReplyIdentifier):
Helper function to generate a reply identifier.
(-[_WKRemoteObjectRegistry _sendInvocation:interface:]):
Do some block parameter validation.
* WebKit2.xcodeproj/project.pbxproj:
2015-11-02 Brent Fulgham <bfulgham@apple.com>
[iOS] Another unreviewed sandbox update.
* Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb: Change copyright.
2015-11-02 Brent Fulgham <bfulgham@apple.com>
[iOS] Unreviewed sandbox update.
Correcting copyright information.
* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2015-11-02 Tim Horton <timothy_horton@apple.com>
Get rid of WKWebView's inner WKView (WKView being inside WKWebView leads to weird API issues)
https://bugs.webkit.org/show_bug.cgi?id=150174
Reviewed by Anders Carlsson.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
(-[WKWebView dealloc]):
(-[WKWebView allowsLinkPreview]):
(-[WKWebView setAllowsLinkPreview:]):
(-[WKWebView acceptsFirstResponder]):
(-[WKWebView becomeFirstResponder]):
(-[WKWebView resignFirstResponder]):
(-[WKWebView viewWillStartLiveResize]):
(-[WKWebView viewDidEndLiveResize]):
(-[WKWebView isFlipped]):
(-[WKWebView intrinsicContentSize]):
(-[WKWebView prepareContentInRect:]):
(-[WKWebView setFrameSize:]):
(-[WKWebView renewGState]):
(-[WKWebView writeSelectionToPasteboard:types:]):
(-[WKWebView centerSelectionInVisibleArea:]):
(-[WKWebView validRequestorForSendType:returnType:]):
(-[WKWebView readSelectionFromPasteboard:]):
(-[WKWebView changeFont:]):
(-[WKWebView validateUserInterfaceItem:]):
(-[WKWebView startSpeaking:]):
(-[WKWebView stopSpeaking:]):
(-[WKWebView showGuessPanel:]):
(-[WKWebView checkSpelling:]):
(-[WKWebView changeSpelling:]):
(-[WKWebView toggleContinuousSpellChecking:]):
(-[WKWebView isGrammarCheckingEnabled]):
(-[WKWebView setGrammarCheckingEnabled:]):
(-[WKWebView toggleGrammarChecking:]):
(-[WKWebView toggleAutomaticSpellingCorrection:]):
(-[WKWebView orderFrontSubstitutionsPanel:]):
(-[WKWebView toggleSmartInsertDelete:]):
(-[WKWebView isAutomaticQuoteSubstitutionEnabled]):
(-[WKWebView setAutomaticQuoteSubstitutionEnabled:]):
(-[WKWebView toggleAutomaticQuoteSubstitution:]):
(-[WKWebView isAutomaticDashSubstitutionEnabled]):
(-[WKWebView setAutomaticDashSubstitutionEnabled:]):
(-[WKWebView toggleAutomaticDashSubstitution:]):
(-[WKWebView isAutomaticLinkDetectionEnabled]):
(-[WKWebView setAutomaticLinkDetectionEnabled:]):
(-[WKWebView toggleAutomaticLinkDetection:]):
(-[WKWebView isAutomaticTextReplacementEnabled]):
(-[WKWebView setAutomaticTextReplacementEnabled:]):
(-[WKWebView toggleAutomaticTextReplacement:]):
(-[WKWebView uppercaseWord:]):
(-[WKWebView lowercaseWord:]):
(-[WKWebView capitalizeWord:]):
(-[WKWebView _wantsKeyDownForEvent:]):
(-[WKWebView scrollWheel:]):
(-[WKWebView swipeWithEvent:]):
(-[WKWebView mouseMoved:]):
(-[WKWebView mouseDown:]):
(-[WKWebView mouseUp:]):
(-[WKWebView mouseDragged:]):
(-[WKWebView mouseEntered:]):
(-[WKWebView mouseExited:]):
(-[WKWebView otherMouseDown:]):
(-[WKWebView otherMouseDragged:]):
(-[WKWebView otherMouseUp:]):
(-[WKWebView rightMouseDown:]):
(-[WKWebView rightMouseDragged:]):
(-[WKWebView rightMouseUp:]):
(-[WKWebView pressureChangeWithEvent:]):
(-[WKWebView acceptsFirstMouse:]):
(-[WKWebView shouldDelayWindowOrderingForEvent:]):
(-[WKWebView doCommandBySelector:]):
(-[WKWebView insertText:]):
(-[WKWebView insertText:replacementRange:]):
(-[WKWebView inputContext]):
(-[WKWebView performKeyEquivalent:]):
(-[WKWebView keyUp:]):
(-[WKWebView keyDown:]):
(-[WKWebView flagsChanged:]):
(-[WKWebView setMarkedText:selectedRange:replacementRange:]):
(-[WKWebView unmarkText]):
(-[WKWebView selectedRange]):
(-[WKWebView hasMarkedText]):
(-[WKWebView markedRange]):
(-[WKWebView attributedSubstringForProposedRange:actualRange:]):
(-[WKWebView characterIndexForPoint:]):
(-[WKWebView firstRectForCharacterRange:actualRange:]):
(-[WKWebView selectedRangeWithCompletionHandler:]):
(-[WKWebView markedRangeWithCompletionHandler:]):
(-[WKWebView hasMarkedTextWithCompletionHandler:]):
(-[WKWebView attributedSubstringForProposedRange:completionHandler:]):
(-[WKWebView firstRectForCharacterRange:completionHandler:]):
(-[WKWebView characterIndexForPoint:completionHandler:]):
(-[WKWebView validAttributesForMarkedText]):
(-[WKWebView draggedImage:endedAt:operation:]):
(-[WKWebView draggingEntered:]):
(-[WKWebView draggingUpdated:]):
(-[WKWebView draggingExited:]):
(-[WKWebView prepareForDragOperation:]):
(-[WKWebView performDragOperation:]):
(-[WKWebView _hitTest:dragTypes:]):
(-[WKWebView _windowResizeMouseLocationIsInVisibleScrollerThumb:]):
(-[WKWebView viewWillMoveToWindow:]):
(-[WKWebView viewDidMoveToWindow]):
(-[WKWebView drawRect:]):
(-[WKWebView isOpaque]):
(-[WKWebView mouseDownCanMoveWindow]):
(-[WKWebView viewDidHide]):
(-[WKWebView viewDidUnhide]):
(-[WKWebView viewDidChangeBackingProperties]):
(-[WKWebView _activeSpaceDidChange:]):
(-[WKWebView accessibilityFocusedUIElement]):
(-[WKWebView accessibilityIsIgnored]):
(-[WKWebView accessibilityHitTest:]):
(-[WKWebView accessibilityAttributeValue:]):
(-[WKWebView hitTest:]):
(-[WKWebView conversationIdentifier]):
(-[WKWebView quickLookWithEvent:]):
(-[WKWebView addTrackingRect:owner:userData:assumeInside:]):
(-[WKWebView _addTrackingRect:owner:userData:assumeInside:useTrackingNum:]):
(-[WKWebView _addTrackingRects:owner:userDataList:assumeInsideList:trackingNums:count:]):
(-[WKWebView removeTrackingRect:]):
(-[WKWebView _removeTrackingRects:count:]):
(-[WKWebView view:stringForToolTip:point:userData:]):
(-[WKWebView pasteboardChangedOwner:]):
(-[WKWebView pasteboard:provideDataForType:]):
(-[WKWebView namesOfPromisedFilesDroppedAtDestination:]):
(-[WKWebView wantsUpdateLayer]):
(-[WKWebView updateLayer]):
(-[WKWebView setAllowsBackForwardNavigationGestures:]):
(-[WKWebView allowsBackForwardNavigationGestures]):
(-[WKWebView smartMagnifyWithEvent:]):
(-[WKWebView setMagnification:centeredAtPoint:]):
(-[WKWebView setMagnification:]):
(-[WKWebView magnification]):
(-[WKWebView setAllowsMagnification:]):
(-[WKWebView allowsMagnification]):
(-[WKWebView magnifyWithEvent:]):
(-[WKWebView rotateWithEvent:]):
(-[WKWebView _web_superInputContext]):
(-[WKWebView _web_superQuickLookWithEvent:]):
(-[WKWebView _web_superSwipeWithEvent:]):
(-[WKWebView _web_superMagnifyWithEvent:]):
(-[WKWebView _web_superSmartMagnifyWithEvent:]):
(-[WKWebView _web_superRemoveTrackingRect:]):
(-[WKWebView _web_superAccessibilityAttributeValue:]):
(-[WKWebView _web_superDoCommandBySelector:]):
(-[WKWebView _web_superPerformKeyEquivalent:]):
(-[WKWebView _web_superKeyDown:]):
(-[WKWebView _web_superHitTest:]):
(-[WKWebView _web_immediateActionAnimationControllerForHitTestResultInternal:withType:userData:]):
(-[WKWebView _web_prepareForImmediateActionAnimation]):
(-[WKWebView _web_cancelImmediateActionAnimation]):
(-[WKWebView _web_completeImmediateActionAnimation]):
(-[WKWebView _web_didChangeContentSize:]):
(-[WKWebView _web_dismissContentRelativeChildWindows]):
(-[WKWebView _web_dismissContentRelativeChildWindowsWithAnimation:]):
(-[WKWebView _web_gestureEventWasNotHandledByWebCore:]):
(-[WKWebView _setEditable:]):
(-[WKWebView _remoteObjectRegistry]):
(-[WKWebView _layoutMode]):
(-[WKWebView _setLayoutMode:]):
(-[WKWebView _setViewScale:]):
(-[WKWebView _drawsTransparentBackground]):
(-[WKWebView _setDrawsTransparentBackground:]):
(-[WKWebView _inspectorAttachmentView]):
(-[WKWebView _setInspectorAttachmentView:]):
(-[WKWebView _windowOcclusionDetectionEnabled]):
(-[WKWebView _setWindowOcclusionDetectionEnabled:]):
(-[WKWebView _setOverrideDeviceScaleFactor:]):
(-[WKWebView _overrideDeviceScaleFactor]):
(-[WKWebView _setTopContentInset:]):
(-[WKWebView _topContentInset]):
(-[WKWebView _pageExtendedBackgroundColor]):
(-[WKWebView _immediateActionAnimationControllerForHitTestResult:withType:userData:]):
(-[WKWebView _setAutomaticallyAdjustsContentInsets:]):
(-[WKWebView _automaticallyAdjustsContentInsets]):
(-[WKWebView _setMinimumLayoutWidth:]):
(-[WKWebView resizeSubviewsWithOldSize:]): Deleted.
(-[WKWebView _ignoresNonWheelEvents]): Deleted.
(-[WKWebView _setIgnoresNonWheelEvents:]): Deleted.
(-[WKWebView _setIntrinsicContentSize:]): Deleted.
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView _web_superInputContext]):
(-[WKView _web_superQuickLookWithEvent:]):
(-[WKView _web_superSwipeWithEvent:]):
(-[WKView _web_superMagnifyWithEvent:]):
(-[WKView _web_superSmartMagnifyWithEvent:]):
(-[WKView _web_superRemoveTrackingRect:]):
(-[WKView _web_superAccessibilityAttributeValue:]):
(-[WKView _web_superDoCommandBySelector:]):
(-[WKView _web_superPerformKeyEquivalent:]):
(-[WKView _web_superKeyDown:]):
(-[WKView _web_superHitTest:]):
(-[WKView _web_immediateActionAnimationControllerForHitTestResultInternal:withType:userData:]):
(-[WKView _web_prepareForImmediateActionAnimation]):
(-[WKView _web_cancelImmediateActionAnimation]):
(-[WKView _web_completeImmediateActionAnimation]):
(-[WKView _web_didChangeContentSize:]):
(-[WKView _web_dismissContentRelativeChildWindows]):
(-[WKView _web_dismissContentRelativeChildWindowsWithAnimation:]):
(-[WKView _web_gestureEventWasNotHandledByWebCore:]):
(-[WKView _superInputContext]): Deleted.
(-[WKView _superQuickLookWithEvent:]): Deleted.
(-[WKView _superSwipeWithEvent:]): Deleted.
(-[WKView _superMagnifyWithEvent:]): Deleted.
(-[WKView _superSmartMagnifyWithEvent:]): Deleted.
(-[WKView _superRemoveTrackingRect:]): Deleted.
(-[WKView _superAccessibilityAttributeValue:]): Deleted.
(-[WKView _superDoCommandBySelector:]): Deleted.
(-[WKView _superPerformKeyEquivalent:]): Deleted.
(-[WKView _superKeyDown:]): Deleted.
(-[WKView _superHitTest:]): Deleted.
(-[WKView _addFontPanelObserver]): Deleted.
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/Cocoa/WebViewImpl.h:
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::hitTest):
(WebKit::WebViewImpl::updateSecureInputState):
(WebKit::WebViewImpl::notifyInputContextAboutDiscardedComposition):
(WebKit::WebViewImpl::executeSavedCommandBySelector):
(WebKit::WebViewImpl::dismissContentRelativeChildWindowsWithAnimation):
(WebKit::WebViewImpl::dismissContentRelativeChildWindowsWithAnimationFromViewOnly):
(WebKit::WebViewImpl::quickLookWithEvent):
(WebKit::WebViewImpl::prepareForImmediateActionAnimation):
(WebKit::WebViewImpl::cancelImmediateActionAnimation):
(WebKit::WebViewImpl::completeImmediateActionAnimation):
(WebKit::WebViewImpl::didChangeContentSize):
(WebKit::WebViewImpl::accessibilityAttributeValue):
(WebKit::WebViewImpl::removeTrackingRect):
(WebKit::WebViewImpl::swipeWithEvent):
(WebKit::WebViewImpl::magnifyWithEvent):
(WebKit::WebViewImpl::smartMagnifyWithEvent):
(WebKit::WebViewImpl::gestureEventWasNotHandledByWebCore):
(WebKit::WebViewImpl::doCommandBySelector):
(WebKit::WebViewImpl::inputContext):
(WebKit::WebViewImpl::performKeyEquivalent):
(WebKit::WebViewImpl::keyDown):
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::setDragImage):
(WebKit::PageClientImpl::intrinsicContentSizeDidChange): Deleted.
(WebKit::PageClientImpl::immediateActionAnimationControllerForHitTestResult): Deleted.
Plop.
2015-11-02 Anders Carlsson <andersca@apple.com>
Remove unused API client callback code
https://bugs.webkit.org/show_bug.cgi?id=150813
Reviewed by Tim Horton.
* UIProcess/API/APILoaderClient.h:
(API::LoaderClient::interactionOccurredWhileProcessUnresponsive): Deleted.
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageLoaderClient): Deleted.
* UIProcess/ResponsivenessTimer.cpp:
(WebKit::ResponsivenessTimer::timerFired):
* UIProcess/ResponsivenessTimer.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::interactionOccurredWhileProcessUnresponsive): Deleted.
* UIProcess/WebPageProxy.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::interactionOccurredWhileUnresponsive): Deleted.
* UIProcess/WebProcessProxy.h:
2015-10-31 Andy Estes <aestes@apple.com>
Replace iOS-only WebKitSystemInterface calls with SPI
https://bugs.webkit.org/show_bug.cgi?id=150763
Reviewed by Darin Adler.
* Platform/ios/AccessibilityIOS.h: Added.
* Platform/ios/AccessibilityIOS.mm: Added.
(WebKit::newAccessibilityRemoteToken): Upstreamed the implementation of WKAXRemoteToken() from WebKitSystemInterface.
* Shared/WebPreferencesDefinitions.h: Used Settings::defaultMinimumZoomFontSize() instead of WKGetMinimumZoomFontSize().
* Shared/WebPreferencesStore.cpp:
* UIProcess/API/Cocoa/WKWebView.mm:
(shouldAllowPictureInPictureMediaPlayback): Used dyld_get_program_sdk_version() instead of iosExecutableWasLinkedOnOrAfterVersion().
(-[WKWebView _takeViewSnapshot]): Used screenScaleFactor() instead of WKGetScreenScaleFactor().
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration init]): Used deviceClass() instead of WKGetDeviceClass().
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _commonInitializationWithProcessPool:configuration:]): Used screenScaleFactor() instead of WKGetScaleFactorForScreen().
(-[WKContentView _updateForScreen:]): Ditto.
(storeAccessibilityRemoteConnectionInformation): Upstreamed the implementation of WKAXStoreRemoteConnectionInformation() from WebKitSystemInterface.
(-[WKContentView _accessibilityRegisterUIProcessTokens]): Used newAccessibilityRemoteToken() and storeAccessibilityRemoteConnectionInformation() instead of WKAXRemoteToken() and WKAXStoreRemoteConnectionInformation().
* UIProcess/ios/WKContentViewInteraction.mm:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::screenSize): Used screenSize() instead of WKGetScreenSize().
(WebKit::WebPageProxy::availableScreenSize): Used availableScreenSize() instead of WKGetAvailableScreenSize().
(WebKit::WebPageProxy::textAutosizingWidth): Used screenSize() instead of WKGetScreenSize().
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface): Deleted.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::platformInitializeAccessibility): Used newAccessibilityRemoteToken() instead of WKAXRemoteToken().
2015-11-02 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r191902.
https://bugs.webkit.org/show_bug.cgi?id=150811
This change broke iOS builders (Requested by ryanhaddad on
#webkit).
Reverted changeset:
"Replace iOS-only WebKitSystemInterface calls with SPI"
https://bugs.webkit.org/show_bug.cgi?id=150763
http://trac.webkit.org/changeset/191902
2015-10-31 Andy Estes <aestes@apple.com>
Replace iOS-only WebKitSystemInterface calls with SPI
https://bugs.webkit.org/show_bug.cgi?id=150763
Reviewed by Darin Adler.
* Platform/ios/AccessibilityIOS.h: Added.
* Platform/ios/AccessibilityIOS.mm: Added.
(WebKit::newAccessibilityRemoteToken): Upstreamed the implementation of WKAXRemoteToken() from WebKitSystemInterface.
* Shared/WebPreferencesDefinitions.h: Used Settings::defaultMinimumZoomFontSize() instead of WKGetMinimumZoomFontSize().
* Shared/WebPreferencesStore.cpp:
* UIProcess/API/Cocoa/WKWebView.mm:
(shouldAllowPictureInPictureMediaPlayback): Used dyld_get_program_sdk_version() instead of iosExecutableWasLinkedOnOrAfterVersion().
(-[WKWebView _takeViewSnapshot]): Used screenScaleFactor() instead of WKGetScreenScaleFactor().
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration init]): Used deviceClass() instead of WKGetDeviceClass().
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _commonInitializationWithProcessPool:configuration:]): Used screenScaleFactor() instead of WKGetScaleFactorForScreen().
(-[WKContentView _updateForScreen:]): Ditto.
(storeAccessibilityRemoteConnectionInformation): Upstreamed the implementation of WKAXStoreRemoteConnectionInformation() from WebKitSystemInterface.
(-[WKContentView _accessibilityRegisterUIProcessTokens]): Used newAccessibilityRemoteToken() and storeAccessibilityRemoteConnectionInformation() instead of WKAXRemoteToken() and WKAXStoreRemoteConnectionInformation().
* UIProcess/ios/WKContentViewInteraction.mm:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::screenSize): Used screenSize() instead of WKGetScreenSize().
(WebKit::WebPageProxy::availableScreenSize): Used availableScreenSize() instead of WKGetAvailableScreenSize().
(WebKit::WebPageProxy::textAutosizingWidth): Used screenSize() instead of WKGetScreenSize().
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface): Deleted.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::platformInitializeAccessibility): Used newAccessibilityRemoteToken() instead of WKAXRemoteToken().
2015-11-02 Yongjun Zhang <yongjun_zhang@apple.com>
Add objC delegate callback for webProcessDidBecomeResponsive and webProcessDidBecomeUnresponsive.
https://bugs.webkit.org/show_bug.cgi?id=150778
Add methods into WKNavigationDelegatePrivate to notify WebKit client when web process becomes unresponsive
or responsive, which is reported by WebKit::ResponsivenessTimer.
Reviewed by Darin Adler.
* UIProcess/API/APINavigationClient.h: Add two new method processDidBecomeResponsive and processDidBecomeUnresponsive
to NavigationClient; they are called when WebKit::ResponsivenessTimer update its client's state.
(API::NavigationClient::processDidBecomeResponsive):
(API::NavigationClient::processDidBecomeUnresponsive):
* UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Add two new delegate method to WKNavigationDelegatePrivate:
_webViewWebProcessDidBecomeResponsive: and _webViewWebProcessDidBecomeUnresponsive:
* UIProcess/Cocoa/NavigationState.h: Add new overriding methods processDidBecomeResponsive and processDidBecomeUnresponsive.
Also add a bool member for each method to indicate if the delegate has implement the related method.
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::setNavigationDelegate): Update the new bool members based on the delegate.
(WebKit::NavigationState::NavigationClient::processDidBecomeResponsive): Send the delegate message to navigationDelegate
if _webViewWebProcessDidBecomeResponsive: is implemented.
(WebKit::NavigationState::NavigationClient::processDidBecomeUnresponsive): Ditto.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::processDidBecomeUnresponsive): Call navigationClient's processDidBecomeUnresponsive if the page proxy
has navigationClient.
(WebKit::WebPageProxy::processDidBecomeResponsive): Call navigationClient's processDidBecomeResponsive if the page proxy
has navigationClient.
2015-11-02 Beth Dakin <bdakin@apple.com>
Tapping and holding a link should have a share option
https://bugs.webkit.org/show_bug.cgi?id=150693
Reviewed by Dan Bernstein.
This is a follow-up to the original change. This change fixes non-ascii URLs.
They should maintain their non-ascii characters when they are shared.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView actionSheetAssistant:shareElementWithURL:rect:]):
* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView actionSheetAssistant:shareElementWithURL:rect:]):
2015-11-02 Youenn Fablet <youenn.fablet@crf.canon.fr>
Rename JSDOMWrapper.impl to JSDOMWrapper.wrapped
https://bugs.webkit.org/show_bug.cgi?id=150613
Reviewed by Darin Adler.
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::frameForContext): Renaming impl() to wrapped().
(WebKit::WebFrame::counterValue): Ditto.
2015-11-02 Carlos Garcia Campos <cgarcia@igalia.com>
[GLIB] Remove support for GSocket main loop sources from GMainLoopSource
https://bugs.webkit.org/show_bug.cgi?id=150772
Reviewed by Žan Doberšek.
Add GSocketMonitor class to be used by Connection to monitor the
availability of the socket file descriptor instead of using a
GMainLoopSource.
* Platform/IPC/Connection.h:
* Platform/IPC/glib/GSocketMonitor.cpp: Added.
(IPC::GSocketMonitor::~GSocketMonitor):
(IPC::GSocketMonitor::socketSourceCallback):
(IPC::GSocketMonitor::start):
(IPC::GSocketMonitor::stop):
* Platform/IPC/glib/GSocketMonitor.h: Added.
* Platform/IPC/unix/ConnectionUnix.cpp:
(IPC::Connection::platformInvalidate):
(IPC::Connection::open):
* PlatformGTK.cmake:
2015-11-01 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Use RunLoop in WorkQueue implementation
https://bugs.webkit.org/show_bug.cgi?id=150770
Reviewed by Darin Adler.
* Platform/IPC/unix/ConnectionUnix.cpp:
(IPC::Connection::open): Get the main context from the WorkQueue Runloop.
2015-11-01 Yusuke Suzuki <utatane.tea@gmail.com>
[ES6] Support Generator Syntax
https://bugs.webkit.org/show_bug.cgi?id=150769
Reviewed by Geoffrey Garen.
Added ENABLE_ES6_GENERATORS flag.
* Configurations/FeatureDefines.xcconfig:
2015-11-01 Brent Fulgham <bfulgham@apple.com>
Use convenience function in sandbox profile
https://bugs.webkit.org/show_bug.cgi?id=150732
<rdar://problem/23287894>
Reviewed by Alexey Proskuryakov.
* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: Switch to
the 'awd-log-directory' convenience function.
2015-11-01 Joonghun Park <jh718.park@samsung.com>
[EFL] Fix inappropriate move semantics use in parseAndRemoveEnvironments function
https://bugs.webkit.org/show_bug.cgi?id=150544
Reviewed by Darin Adler.
In parseAndRemoveEnvironments function, it declares its paramerter type as rvalue.
But in ProcessLauncher::launchProcess(), the argument of
parseAndRemoveEnvironments still be used after the call of the function.
Currently the rvalue is not assigned to any other variable in parseAndRemoveEnvironments,
so it doesn't lead to runtime error but use of move semantic
is not appropriate semantically in this case.
* UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
(WebKit::parseAndRemoveEnvironments):
(WebKit::ProcessLauncher::launchProcess):
2015-11-01 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r191831.
https://bugs.webkit.org/show_bug.cgi?id=150774
The new test fails (Requested by ap on #webkit).
Reverted changeset:
"Begin work on supporting reply blocks in
_WKRemoteObjectRegistry"
https://bugs.webkit.org/show_bug.cgi?id=150739
http://trac.webkit.org/changeset/191831
2015-11-01 Philip Chimento <philip.chimento@gmail.com>
[GTK] Fix combinations of PLATFORM(GTK) and OS(DARWIN)
https://bugs.webkit.org/show_bug.cgi?id=144560
Reviewed by Darin Adler.
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::createNetworkConnectionToWebProcess):
Change order of OS(DARWIN) and USE(UNIX_DOMAIN_SOCKETS) checks,
so that we can use Unix domain sockets even on Darwin for the GTK
platform.
* Platform/IPC/Attachment.cpp: Add USE(UNIX_DOMAIN_SOCKETS) check
to OS(DARWIN) check, in order to support GTK platform on OSX.
* Platform/IPC/Attachment.h: Change order of OS(DARWIN) and
USE(UNIX_DOMAIN_SOCKETS) checks throughout.
(IPC::Attachment::size):
(IPC::Attachment::releaseFileDescriptor):
(IPC::Attachment::fileDescriptor):
(IPC::Attachment::disposition):
(IPC::Attachment::port):
* Platform/IPC/Connection.h: Ditto.
(IPC::Connection::identifierIsNull):
(IPC::Connection::Identifier::Identifier):
(IPC::Connection::xpcConnection):
* Platform/IPC/unix/ConnectionUnix.cpp: Only use SOCK_SEQPACKET
if the platform is not GTK, because otherwise the PLATFORM(GTK)
check below is never reached.
* Platform/SharedMemory.h: Change order of OS(DARWIN) and
USE(UNIX_DOMAIN_SOCKETS) checks.
* PluginProcess/PluginProcess.cpp: Ditto.
(WebKit::PluginProcess::createWebProcessConnection):
* Shared/API/c/WKBase.h: Don't include WKBaseMac.h if building
GTK.
* UIProcess/API/C/WKNativeEvent.h: Don't use Apple API if
building GTK.
* UIProcess/Launcher/ProcessLauncher.cpp: Change to
OS(DARWIN) && !PLATFORM(GTK), in the absence of a better platform
macro such as USE(MACH).
(WebKit::ProcessLauncher::didFinishLaunchingProcess):
* UIProcess/Launcher/ProcessLauncher.h: Ditto.
* UIProcess/Network/NetworkProcessProxy.cpp: Change order of
OS(DARWIN) and PLATFORM(GTK) checks.
(WebKit::NetworkProcessProxy::networkProcessCrashedOrFailedToLaunch):
(WebKit::NetworkProcessProxy::didCreateNetworkConnectionToWebProcess):
* UIProcess/Plugins/PluginProcessProxy.cpp: Ditto.
(WebKit::PluginProcessProxy::pluginProcessCrashedOrFailedToLaunch):
(WebKit::PluginProcessProxy::didCreateWebProcessConnection):
* WebProcess/Plugins/PluginProcessConnectionManager.cpp: Ditto.
(WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
* WebProcess/WebPage/WebInspector.cpp: Ditto.
(WebKit::WebInspector::createInspectorPage):
* WebProcess/WebPage/WebInspectorUI.cpp: Ditto.
(WebKit::WebInspectorUI::establishConnection):
* WebProcess/WebProcess.cpp: Ditto.
(WebKit::WebProcess::ensureNetworkProcessConnection):
2015-11-01 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Use RunLoop::Timer in PluginInfoCache
https://bugs.webkit.org/show_bug.cgi?id=150757
Reviewed by Darin Adler.
Use RunLoop::Timer instead of GMainLoopSource to save the cache
contents in an idle. Also remove the mutex, since RunLoop::Timer
is thread safe and saveToFile() is private and only called by the
main thread loop. Also removed the code to save the file in the
destructor since PluginInfoCache is a singleton and never
destroyed. It's very unlikely that the program finished before the
cache is saved, but even if that happens it would be harmless, the
cache will be saved at some point the next time.
* UIProcess/Plugins/gtk/PluginInfoCache.cpp:
(WebKit::PluginInfoCache::PluginInfoCache):
(WebKit::PluginInfoCache::updatePluginInfo):
(WebKit::PluginInfoCache::~PluginInfoCache):
(WebKit::PluginInfoCache::saveToFile):
* UIProcess/Plugins/gtk/PluginInfoCache.h:
2015-11-01 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Use a RunLoop::Timer to schedule rendering frames in accelerated compositing mode
https://bugs.webkit.org/show_bug.cgi?id=150756
Reviewed by Darin Adler.
Use a RunLoop::Timer instead of a GMainLoopSource for the
accelerated compositing render loop to improve the performance,
since RunLoop::Timer uses a persistent source.
All the logic to schedule rames has been moved to a helper
internal class RenderFrameScheduler.
* WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
(WebKit::LayerTreeHostGtk::RenderFrameScheduler::RenderFrameScheduler):
(WebKit::LayerTreeHostGtk::RenderFrameScheduler::~RenderFrameScheduler):
(WebKit::LayerTreeHostGtk::RenderFrameScheduler::start):
(WebKit::LayerTreeHostGtk::RenderFrameScheduler::stop):
(WebKit::shouldSkipNextFrameBecauseOfContinousImmediateFlushes):
(WebKit::LayerTreeHostGtk::RenderFrameScheduler::nextFrame):
(WebKit::LayerTreeHostGtk::RenderFrameScheduler::renderFrame):
(WebKit::LayerTreeHostGtk::LayerTreeHostGtk):
(WebKit::LayerTreeHostGtk::renderFrame):
(WebKit::LayerTreeHostGtk::scheduleLayerFlush):
(WebKit::LayerTreeHostGtk::cancelPendingLayerFlush):
(WebKit::LayerTreeHostGtk::layerFlushTimerFired): Deleted.
* WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
2015-10-31 Andreas Kling <akling@apple.com>
Add a debug overlay with information about web process resource usage.
<https://webkit.org/b/150599>
Reviewed by Darin Adler.
Add WK2 preferences SPI for showing/hiding the resource usage overlay.
* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetResourceUsageOverlayVisible):
(WKPreferencesGetResourceUsageOverlayVisible):
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _resourceUsageOverlayVisible]):
(-[WKPreferences _setResourceUsageOverlayVisible:]):
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
2015-10-31 Alex Christensen <achristensen@webkit.org>
Share more code between NETWORK_SESSION and non-NETWORK_SESSION NetworkResourceLoaders
https://bugs.webkit.org/show_bug.cgi?id=150742
Reviewed by Darin Adler.
r191457 added enough code to NetworkResourceLoader to load most resources successfully if there are no errors.
It passed about 80% of LayoutTests/http and crashed sometimes.
This passes about 95% of LayoutTests/http and does not crash on any of the LayoutTests/http.
It should not change behavior of the non-NETWORK_SESSION code which is currently the default in trunk.
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::abort):
(WebKit::NetworkResourceLoader::sharedDidReceiveResponse):
(WebKit::NetworkResourceLoader::sharedDidReceiveBuffer):
(WebKit::NetworkResourceLoader::sharedDidFinishLoading):
(WebKit::NetworkResourceLoader::sharedDidFail):
(WebKit::NetworkResourceLoader::sharedWillSendRedirectedRequest):
(WebKit::NetworkResourceLoader::willPerformHTTPRedirection):
(WebKit::NetworkResourceLoader::didReceiveChallenge):
(WebKit::NetworkResourceLoader::didReceiveResponse):
(WebKit::NetworkResourceLoader::didReceiveData):
(WebKit::NetworkResourceLoader::didCompleteWithError):
(WebKit::NetworkResourceLoader::didReceiveResponseAsync):
(WebKit::NetworkResourceLoader::didReceiveBuffer):
(WebKit::NetworkResourceLoader::didFinishLoading):
(WebKit::NetworkResourceLoader::didFail):
(WebKit::NetworkResourceLoader::willSendRequestAsync):
* NetworkProcess/NetworkResourceLoader.h:
* NetworkProcess/NetworkSession.h:
(WebKit::NetworkSessionTaskClient::~NetworkSessionTaskClient):
2015-10-28 Wenson Hsieh <wenson_hsieh@apple.com>
Inner height behavior when the keyboard is shown should match on WKWebView and MobileSafari
https://bugs.webkit.org/show_bug.cgi?id=150634
<rdar://problem/23202254>
Reviewed by Benjamin Poulain.
Make WKWebView match behavior in Safari by not firing resize events and changing the inner height when showing
or hiding the keyboard. Previously, the WKWebView would do both of the above because we use the scroll view's
contentInset property when no unobscured insets are explicitly set for the WKWebView. To fix this, when updating
the visible content rect of a WKWebView for computing the inner height, we readjust the computed bottom inset
to not take the keyboard height into account. To know how much we need to readjust the inset by, we store the
total amount by which the scroll view's bottom inset has been adjusted due to the keyboard.
We perform this readjustment in _updateVisibleContentRects rather than in _computedContentInset since some users
of _computedContentInset may still expect the bottom inset to account for the keyboard height. However, when
updating visible content rects, we should not account for the keyboard height since we don't want the inner height
to change when showing or hiding the keyboard.
Lastly, while calling _adjustForAutomaticKeyboardInfo, we may end up calling _updateVisibleContentRects. This call
is unnecessary since we call it again immediately after _adjustForAutomaticKeyboardInfo, and it also complicates
the readjustment logic, so it makes sense to prevent the update from happening altogether while we are adjusting
the scroll view's insets due to keyboard changes. Altogether, these changes mean that the computed inner height
will no longer be adjusted for the keyboard height on WKWebViews, matching the behavior observed on mobile Safari.
Test: LayoutTests/fast/events/ios/keyboard-should-not-trigger-resize.html
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _updateVisibleContentRects]):
(-[WKWebView _keyboardChangedWithInfo:adjustScrollView:]):
2015-10-30 Anders Carlsson <andersca@apple.com>
Begin work on supporting reply blocks in _WKRemoteObjectRegistry
https://bugs.webkit.org/show_bug.cgi?id=150739
Reviewed by Tim Horton.
* Platform/spi/Cocoa/BlockSPI.h:
Add SPI header.
* Shared/API/Cocoa/RemoteObjectInvocation.h:
(WebKit::RemoteObjectInvocation::ReplyInfo::ReplyInfo):
(WebKit::RemoteObjectInvocation::replyInfo):
* Shared/API/Cocoa/RemoteObjectInvocation.mm:
(WebKit::RemoteObjectInvocation::RemoteObjectInvocation):
(WebKit::RemoteObjectInvocation::encode):
(WebKit::RemoteObjectInvocation::decode):
Add an optional ReplyInfo struct to RemoteObjectInvocation.
* Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:
(generateReplyIdentifier):
Helper function to generate a reply identifier.
(-[_WKRemoteObjectRegistry _sendInvocation:interface:]):
Do some block parameter validation.
* WebKit2.xcodeproj/project.pbxproj:
2015-10-30 Beth Dakin <bdakin@apple.com>
Link preview doesn't work on XHTML pages with Content-Type header as
application/xhtml+xml
https://bugs.webkit.org/show_bug.cgi?id=150740
-and corresponding-
rdar://problem/23063585
Reviewed by Tim Horton.
For XHTML pages, the element names are lowercase. This patch uses
equalIgnoringCase to fix the bug.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _actionForLongPress]):
(-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
(-[WKContentView _dataForPreviewItemController:atPosition:type:]):
2015-10-30 Tim Horton <timothy_horton@apple.com>
WKView being inside WKWebView leads to weird API issues
https://bugs.webkit.org/show_bug.cgi?id=150174
Reviewed by Anders Carlsson.
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:processGroup:browsingContextGroup:relatedToView:]):
(-[WKView prepareContentInRect:]):
(-[WKView initWithFrame:processPool:configuration:webView:]):
(-[WKView pageRef]):
(-[WKView _web_immediateActionAnimationControllerForHitTestResultInternal:withType:userData:]):
(-[WKView dealloc]): Deleted.
* UIProcess/Cocoa/WebViewImpl.h:
(WebKit::WebViewImpl::page):
* UIProcess/Cocoa/WebViewImpl.mm:
(-[WKWindowVisibilityObserver initWithView:impl:]):
(-[WKWindowVisibilityObserver dealloc]):
(-[WKWindowVisibilityObserver _activeSpaceDidChange:]):
(WebKit::WebViewImpl::WebViewImpl):
(WebKit::WebViewImpl::~WebViewImpl):
(WebKit::WebViewImpl::setDrawsBackground):
(WebKit::WebViewImpl::drawsBackground):
(WebKit::WebViewImpl::setDrawsTransparentBackground):
(WebKit::WebViewImpl::drawsTransparentBackground):
(WebKit::WebViewImpl::isOpaque):
(WebKit::WebViewImpl::acceptsFirstMouse):
(WebKit::WebViewImpl::becomeFirstResponder):
(WebKit::WebViewImpl::resignFirstResponder):
(WebKit::WebViewImpl::viewWillStartLiveResize):
(WebKit::WebViewImpl::viewDidEndLiveResize):
(WebKit::WebViewImpl::updateWindowAndViewFrames):
(WebKit::WebViewImpl::setFixedLayoutSize):
(WebKit::WebViewImpl::fixedLayoutSize):
(WebKit::WebViewImpl::isUsingUISideCompositing):
(WebKit::WebViewImpl::setDrawingAreaSize):
(WebKit::WebViewImpl::forceAsyncDrawingAreaSizeUpdate):
(WebKit::WebViewImpl::waitForAsyncDrawingAreaSizeUpdate):
(WebKit::WebViewImpl::updateLayer):
(WebKit::WebViewImpl::drawRect):
(WebKit::WebViewImpl::dispatchSetTopContentInset):
(WebKit::WebViewImpl::prepareContentInRect):
(WebKit::WebViewImpl::updateViewExposedRect):
(WebKit::WebViewImpl::setMinimumSizeForAutoLayout):
(WebKit::WebViewImpl::minimumSizeForAutoLayout):
(WebKit::WebViewImpl::setShouldExpandToViewHeightForAutoLayout):
(WebKit::WebViewImpl::shouldExpandToViewHeightForAutoLayout):
(WebKit::WebViewImpl::setIntrinsicContentSize):
(WebKit::WebViewImpl::setViewScale):
(WebKit::WebViewImpl::viewScale):
(WebKit::WebViewImpl::supportsArbitraryLayoutModes):
(WebKit::WebViewImpl::setOverrideDeviceScaleFactor):
(WebKit::WebViewImpl::windowDidOrderOffScreen):
(WebKit::WebViewImpl::windowDidOrderOnScreen):
(WebKit::WebViewImpl::windowDidBecomeKey):
(WebKit::WebViewImpl::windowDidResignKey):
(WebKit::WebViewImpl::windowDidMiniaturize):
(WebKit::WebViewImpl::windowDidDeminiaturize):
(WebKit::WebViewImpl::windowDidChangeBackingProperties):
(WebKit::WebViewImpl::windowDidChangeScreen):
(WebKit::WebViewImpl::windowDidChangeLayerHosting):
(WebKit::WebViewImpl::windowDidChangeOcclusionState):
(WebKit::WebViewImpl::shouldDelayWindowOrderingForEvent):
(WebKit::WebViewImpl::windowResizeMouseLocationIsInVisibleScrollerThumb):
(WebKit::WebViewImpl::viewDidMoveToWindow):
(WebKit::WebViewImpl::viewDidChangeBackingProperties):
(WebKit::WebViewImpl::viewDidHide):
(WebKit::WebViewImpl::viewDidUnhide):
(WebKit::WebViewImpl::activeSpaceDidChange):
(WebKit::WebViewImpl::postFakeMouseMovedEventForFlagsChangedEvent):
(WebKit::WebViewImpl::setUnderlayColor):
(WebKit::WebViewImpl::underlayColor):
(WebKit::WebViewImpl::pageExtendedBackgroundColor):
(WebKit::WebViewImpl::setOverlayScrollbarStyle):
(WebKit::WebViewImpl::overlayScrollbarStyle):
(WebKit::WebViewImpl::endDeferringViewInWindowChanges):
(WebKit::WebViewImpl::endDeferringViewInWindowChangesSync):
(WebKit::WebViewImpl::prepareForMoveToWindow):
(WebKit::WebViewImpl::updateSecureInputState):
(WebKit::WebViewImpl::setPluginComplexTextInputState):
(WebKit::WebViewImpl::handlePluginComplexTextInputKeyDown):
(WebKit::WebViewImpl::handleAcceptedAlternativeText):
(WebKit::WebViewImpl::pressureChangeWithEvent):
(WebKit::WebViewImpl::isEditable):
(WebKit::WebViewImpl::executeEditCommandForSelector):
(WebKit::WebViewImpl::writeSelectionToPasteboard):
(WebKit::WebViewImpl::readSelectionFromPasteboard):
(WebKit::WebViewImpl::validRequestorForSendAndReturnTypes):
(WebKit::WebViewImpl::centerSelectionInVisibleArea):
(WebKit::WebViewImpl::updateFontPanelIfNeeded):
(WebKit::WebViewImpl::changeFontFromFontPanel):
(WebKit::WebViewImpl::validateUserInterfaceItem):
(WebKit::WebViewImpl::startSpeaking):
(WebKit::WebViewImpl::showGuessPanel):
(WebKit::WebViewImpl::checkSpelling):
(WebKit::WebViewImpl::changeSpelling):
(WebKit::WebViewImpl::toggleContinuousSpellChecking):
(WebKit::WebViewImpl::setGrammarCheckingEnabled):
(WebKit::WebViewImpl::toggleGrammarChecking):
(WebKit::WebViewImpl::toggleAutomaticSpellingCorrection):
(WebKit::WebViewImpl::toggleSmartInsertDelete):
(WebKit::WebViewImpl::setAutomaticQuoteSubstitutionEnabled):
(WebKit::WebViewImpl::toggleAutomaticQuoteSubstitution):
(WebKit::WebViewImpl::setAutomaticDashSubstitutionEnabled):
(WebKit::WebViewImpl::toggleAutomaticDashSubstitution):
(WebKit::WebViewImpl::setAutomaticLinkDetectionEnabled):
(WebKit::WebViewImpl::toggleAutomaticLinkDetection):
(WebKit::WebViewImpl::setAutomaticTextReplacementEnabled):
(WebKit::WebViewImpl::toggleAutomaticTextReplacement):
(WebKit::WebViewImpl::uppercaseWord):
(WebKit::WebViewImpl::lowercaseWord):
(WebKit::WebViewImpl::capitalizeWord):
(WebKit::WebViewImpl::preferencesDidChange):
(WebKit::WebViewImpl::dismissContentRelativeChildWindowsFromViewOnly):
(WebKit::WebViewImpl::quickLookWithEvent):
(WebKit::WebViewImpl::immediateActionAnimationControllerForHitTestResult):
(WebKit::WebViewImpl::didChangeContentSize):
(WebKit::WebViewImpl::setIgnoresNonWheelEvents):
(WebKit::WebViewImpl::updateRemoteAccessibilityRegistration):
(WebKit::WebViewImpl::accessibilityRegisterUIProcessTokens):
(WebKit::WebViewImpl::stringForToolTip):
(WebKit::WebViewImpl::setInspectorAttachmentView):
(WebKit::WebViewImpl::remoteObjectRegistry):
(WebKit::WebViewImpl::browsingContextController):
(WebKit::WebViewImpl::draggedImage):
(WebKit::WebViewImpl::draggingEntered):
(WebKit::WebViewImpl::draggingUpdated):
(WebKit::WebViewImpl::draggingExited):
(WebKit::WebViewImpl::performDragOperation):
(WebKit::WebViewImpl::takeViewSnapshot):
(WebKit::WebViewImpl::saveBackForwardSnapshotForCurrentItem):
(WebKit::WebViewImpl::saveBackForwardSnapshotForItem):
(WebKit::WebViewImpl::setAllowsBackForwardNavigationGestures):
(WebKit::WebViewImpl::setMagnification):
(WebKit::WebViewImpl::magnification):
(WebKit::WebViewImpl::scrollWheel):
(WebKit::WebViewImpl::swipeWithEvent):
(WebKit::WebViewImpl::magnifyWithEvent):
(WebKit::WebViewImpl::rotateWithEvent):
(WebKit::WebViewImpl::doCommandBySelector):
(WebKit::WebViewImpl::insertText):
(WebKit::WebViewImpl::selectedRangeWithCompletionHandler):
(WebKit::WebViewImpl::markedRangeWithCompletionHandler):
(WebKit::WebViewImpl::hasMarkedTextWithCompletionHandler):
(WebKit::WebViewImpl::attributedSubstringForProposedRange):
(WebKit::WebViewImpl::firstRectForCharacterRange):
(WebKit::WebViewImpl::characterIndexForPoint):
(WebKit::WebViewImpl::inputContext):
(WebKit::WebViewImpl::unmarkText):
(WebKit::WebViewImpl::setMarkedText):
(WebKit::WebViewImpl::performKeyEquivalent):
(WebKit::WebViewImpl::keyUp):
(WebKit::WebViewImpl::keyDown):
(WebKit::WebViewImpl::flagsChanged):
(WebKit::WebViewImpl::executeSavedKeypressCommands):
(WebKit::WebViewImpl::selectedRange):
(WebKit::WebViewImpl::hasMarkedText):
(WebKit::WebViewImpl::markedRange):
(WebKit::WebViewImpl::setContentPreparationRect): Deleted.
(WebKit::WebViewImpl::immediateActionAnimationControllerForHitTestResultFromViewOnly): Deleted.
(WebKit::WebViewImpl::destroyRemoteObjectRegistry): Deleted.
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::scrollPinningBehavior):
(WebKit::WebPageProxy::overlayScrollbarStyle):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::createWebPage):
* UIProcess/WebProcessPool.h:
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::PageClientImpl):
(WebKit::PageClientImpl::createDrawingAreaProxy):
(WebKit::PageClientImpl::viewSize):
(WebKit::PageClientImpl::activeView):
(WebKit::PageClientImpl::activeWindow):
(WebKit::PageClientImpl::isViewFocused):
(WebKit::PageClientImpl::makeFirstResponder):
(WebKit::PageClientImpl::isViewVisible):
(WebKit::PageClientImpl::colorSpace):
(WebKit::PageClientImpl::processDidExit):
(WebKit::PageClientImpl::pageClosed):
(WebKit::PageClientImpl::didRelaunchProcess):
(WebKit::PageClientImpl::preferencesDidChange):
(WebKit::PageClientImpl::toolTipChanged):
(WebKit::PageClientImpl::didCommitLoadForMainFrame):
(WebKit::PageClientImpl::didChangeContentSize):
(WebKit::PageClientImpl::setCursor):
(WebKit::PageClientImpl::registerEditCommand):
(WebKit::PageClientImpl::registerInsertionUndoGrouping):
(WebKit::PageClientImpl::clearAllEditCommands):
(WebKit::PageClientImpl::canUndoRedo):
(WebKit::PageClientImpl::executeUndoRedo):
(WebKit::PageClientImpl::setDragImage):
(WebKit::PageClientImpl::setPromisedDataForImage):
(WebKit::PageClientImpl::setPromisedDataForAttachment):
(WebKit::PageClientImpl::updateSecureInputState):
(WebKit::PageClientImpl::resetSecureInputState):
(WebKit::PageClientImpl::notifyInputContextAboutDiscardedComposition):
(WebKit::PageClientImpl::convertToDeviceSpace):
(WebKit::PageClientImpl::convertToUserSpace):
(WebKit::PageClientImpl::screenToRootView):
(WebKit::PageClientImpl::rootViewToScreen):
(WebKit::PageClientImpl::doneWithKeyEvent):
(WebKit::PageClientImpl::createPopupMenuProxy):
(WebKit::PageClientImpl::createContextMenuProxy):
(WebKit::PageClientImpl::createColorPicker):
(WebKit::PageClientImpl::setTextIndicator):
(WebKit::PageClientImpl::clearTextIndicator):
(WebKit::PageClientImpl::setTextIndicatorAnimationProgress):
(WebKit::PageClientImpl::accessibilityWebProcessTokenReceived):
(WebKit::PageClientImpl::enterAcceleratedCompositingMode):
(WebKit::PageClientImpl::exitAcceleratedCompositingMode):
(WebKit::PageClientImpl::updateAcceleratedCompositingMode):
(WebKit::PageClientImpl::setAcceleratedCompositingRootLayer):
(WebKit::PageClientImpl::acceleratedCompositingRootLayer):
(WebKit::PageClientImpl::takeViewSnapshot):
(WebKit::PageClientImpl::selectionDidChange):
(WebKit::PageClientImpl::wheelEventWasNotHandledByWebCore):
(WebKit::PageClientImpl::gestureEventWasNotHandledByWebCore):
(WebKit::PageClientImpl::pluginFocusOrWindowFocusChanged):
(WebKit::PageClientImpl::setPluginComplexTextInputState):
(WebKit::PageClientImpl::didPerformDictionaryLookup):
(WebKit::PageClientImpl::dismissContentRelativeChildWindows):
(WebKit::PageClientImpl::showCorrectionPanel):
(WebKit::PageClientImpl::recordAutocorrectionResponse):
(WebKit::PageClientImpl::recommendedScrollbarStyleDidChange):
(WebKit::PageClientImpl::intrinsicContentSizeDidChange):
(WebKit::PageClientImpl::executeSavedCommandBySelector):
(WebKit::PageClientImpl::showDictationAlternativeUI):
(WebKit::PageClientImpl::closeFullScreenManager):
(WebKit::PageClientImpl::isFullScreen):
(WebKit::PageClientImpl::enterFullScreen):
(WebKit::PageClientImpl::exitFullScreen):
(WebKit::PageClientImpl::beganEnterFullScreen):
(WebKit::PageClientImpl::beganExitFullScreen):
(WebKit::PageClientImpl::didFirstVisuallyNonEmptyLayoutForMainFrame):
(WebKit::PageClientImpl::didFinishLoadForMainFrame):
(WebKit::PageClientImpl::didFailLoadForMainFrame):
(WebKit::PageClientImpl::didSameDocumentNavigationForMainFrame):
(WebKit::PageClientImpl::removeNavigationGestureSnapshot):
(WebKit::PageClientImpl::boundsOfLayerInLayerBackedWindowCoordinates):
(WebKit::PageClientImpl::didPerformImmediateActionHitTest):
(WebKit::PageClientImpl::immediateActionAnimationControllerForHitTestResult):
(WebKit::PageClientImpl::showPlatformContextMenu):
(WebKit::PageClientImpl::refView):
(WebKit::PageClientImpl::derefView):
(WebKit::PageClientImpl::startWindowDrag):
(WebKit::PageClientImpl::platformWindow):
(WebKit::PageClientImpl::inspectorAttachmentView):
(WebKit::PageClientImpl::remoteObjectRegistry):
* UIProcess/mac/WebColorPickerMac.h:
* UIProcess/mac/WebColorPickerMac.mm:
(WebKit::WebColorPickerMac::create):
(WebKit::WebColorPickerMac::WebColorPickerMac):
(-[WKColorPopoverMac initWithFrame:inView:]):
* UIProcess/mac/WebContextMenuProxyMac.h:
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::WebContextMenuProxyMac):
* UIProcess/mac/WebPopupMenuProxyMac.h:
(WebKit::WebPopupMenuProxyMac::create):
* UIProcess/mac/WebPopupMenuProxyMac.mm:
(WebKit::WebPopupMenuProxyMac::WebPopupMenuProxyMac):
Move ownership of WebPageProxy and PageClientImpl to WebViewImpl.
2015-10-30 Alex Christensen <achristensen@webkit.org>
Fix Mac CMake build after rr191810.
* PlatformMac.cmake:
Add RemoteObjectInvocation.mm.
2015-10-30 Anders Carlsson <andersca@apple.com>
Add a separate object that represents a remote object invocation
https://bugs.webkit.org/show_bug.cgi?id=150639
Reviewed by Tim Horton.
* Shared/API/Cocoa/RemoteObjectInvocation.h: Copied from Source/WebKit2/Shared/API/Cocoa/RemoteObjectRegistry.h.
(WebKit::RemoteObjectInvocation::interfaceIdentifier):
(WebKit::RemoteObjectInvocation::encodedInvocation):
* Shared/API/Cocoa/RemoteObjectInvocation.mm: Copied from Source/WebKit2/Shared/API/Cocoa/RemoteObjectRegistry.mm.
(WebKit::RemoteObjectInvocation::RemoteObjectInvocation):
(WebKit::RemoteObjectInvocation::encode):
(WebKit::RemoteObjectInvocation::decode):
* Shared/API/Cocoa/RemoteObjectRegistry.h:
* Shared/API/Cocoa/RemoteObjectRegistry.messages.in:
* Shared/API/Cocoa/RemoteObjectRegistry.mm:
(WebKit::RemoteObjectRegistry::sendInvocation):
(WebKit::RemoteObjectRegistry::invokeMethod):
* Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:
(-[_WKRemoteObjectRegistry _sendInvocation:interface:]):
(-[_WKRemoteObjectRegistry _invokeMethod:]):
* Shared/API/Cocoa/_WKRemoteObjectRegistryInternal.h:
* WebKit2.xcodeproj/project.pbxproj:
2015-10-30 Beth Dakin <bdakin@apple.com>
Another speculative build fix.
* UIProcess/API/Cocoa/_WKElementAction.h:
2015-10-30 Beth Dakin <bdakin@apple.com>
Speculative build fix.
* Platform/spi/ios/UIKitSPI.h:
* UIProcess/ios/WKContentViewInteraction.mm:
2015-10-30 Tim Horton <timothy_horton@apple.com>
WKView being inside WKWebView leads to weird API issues
https://bugs.webkit.org/show_bug.cgi?id=150174
Reviewed by Anders Carlsson.
* UIProcess/API/mac/WKView.mm:
(-[WKView mouseMoved:]):
(-[WKView mouseDown:]):
(-[WKView mouseUp:]):
(-[WKView mouseDragged:]):
(-[WKView mouseEntered:]):
(-[WKView mouseExited:]):
(-[WKView otherMouseDown:]):
(-[WKView otherMouseDragged:]):
(-[WKView otherMouseUp:]):
(-[WKView rightMouseDown:]):
(-[WKView rightMouseDragged:]):
(-[WKView rightMouseUp:]):
(-[WKView _updateViewExposedRect]): Deleted.
* UIProcess/Cocoa/WebViewImpl.h:
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::mouseMoved):
(WebKit::WebViewImpl::mouseDown):
(WebKit::WebViewImpl::mouseUp):
(WebKit::WebViewImpl::mouseDragged):
Move mouse event handling.
2015-10-30 Beth Dakin <bdakin@apple.com>
Tapping and holding a link should have a share option
https://bugs.webkit.org/show_bug.cgi?id=150693
-and corresponding-
rdar://problem/21319702
Reviewed by Tim Horton.
New _WKElementActionType called _WKElementActionTypeShare.
* UIProcess/API/Cocoa/_WKElementAction.h:
* UIProcess/API/Cocoa/_WKElementAction.mm:
(+[_WKElementAction _elementActionWithType:customTitle:assistant:]):
_WKElementActionTypeShare is part of the default actions for links.
* UIProcess/ios/WKActionSheetAssistant.h:
* UIProcess/ios/WKActionSheetAssistant.mm:
(-[WKActionSheetAssistant defaultActionsForLinkSheet:]):
Handle the sharing part!
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView actionSheetAssistant:shareElementWithURL:rect:]):
To support this in PDF, PDF need to create a _webSelectionAssistant.
* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView web_initWithFrame:webView:]):
(-[WKPDFView actionSheetAssistant:openElementAtLocation:]):
(-[WKPDFView actionSheetAssistant:shareElementWithURL:rect:]):
(-[WKPDFView actionSheetAssistant:shouldIncludeAppLinkActionsForElement:]):
2015-10-30 Tim Horton <timothy_horton@apple.com>
WKView being inside WKWebView leads to weird API issues
https://bugs.webkit.org/show_bug.cgi?id=150174
Reviewed by Anders Carlsson.
* UIProcess/API/mac/WKView.mm:
(-[WKView _wantsKeyDownForEvent:]):
(-[WKView acceptsFirstMouse:]):
(-[WKView shouldDelayWindowOrderingForEvent:]):
(-[WKView validAttributesForMarkedText]):
(-[WKView _windowResizeMouseLocationIsInVisibleScrollerThumb:]):
(-[WKView drawRect:]):
(-[WKView isOpaque]):
(-[WKView mouseDownCanMoveWindow]):
(-[WKView viewDidHide]):
(-[WKView viewDidUnhide]):
(-[WKView _activeSpaceDidChange:]):
(-[WKView hitTest:]):
(-[WKView wantsUpdateLayer]):
(-[WKView canChangeFrameLayout:]):
(-[WKView printOperationWithPrintInfo:forFrame:]):
(+[WKView hideWordDefinitionWindow]):
* UIProcess/Cocoa/WebViewImpl.h:
(WebKit::WebViewImpl::wantsUpdateLayer):
(WebKit::WebViewImpl::mouseDownCanMoveWindow):
(WebKit::WebViewImpl::wantsKeyDownForEvent):
(WebKit::WebViewImpl::layerHostingView): Deleted.
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::isOpaque):
(WebKit::WebViewImpl::acceptsFirstMouse):
(WebKit::WebViewImpl::drawRect):
(WebKit::WebViewImpl::canChangeFrameLayout):
(WebKit::WebViewImpl::printOperationWithPrintInfo):
(WebKit::WebViewImpl::shouldDelayWindowOrderingForEvent):
(WebKit::WebViewImpl::windowResizeMouseLocationIsInVisibleScrollerThumb):
(WebKit::WebViewImpl::viewDidHide):
(WebKit::WebViewImpl::viewDidUnhide):
(WebKit::WebViewImpl::activeSpaceDidChange):
(WebKit::WebViewImpl::hitTest):
(WebKit::WebViewImpl::hideWordDefinitionWindow):
(WebKit::WebViewImpl::validAttributesForMarkedText):
Printing and random bits.
2015-10-30 Anders Carlsson <andersca@apple.com>
REGRESSION (r191691): Unexpected "Share" context menu when right clicking around inspector
https://bugs.webkit.org/show_bug.cgi?id=150699
rdar://problem/23324522
Reviewed by Tim Horton.
Don't create a share menu item if we have nothing to share.
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::createShareMenuItem):
2015-10-30 Tim Horton <timothy_horton@apple.com>
Initialize some new WebViewImpl members
* UIProcess/Cocoa/WebViewImpl.h:
Oh well.
2015-10-30 Tim Horton <timothy_horton@apple.com>
Fix the build
* UIProcess/API/mac/WKView.mm:
2015-10-30 Tim Horton <timothy_horton@apple.com>
Fix the build
* UIProcess/Cocoa/WebViewImpl.h:
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::collectKeyboardLayoutCommandsForEvent):
2015-10-30 Tim Horton <timothy_horton@apple.com>
WKView being inside WKWebView leads to weird API issues
https://bugs.webkit.org/show_bug.cgi?id=150174
Reviewed by Darin Adler.
* UIProcess/API/mac/WKView.mm:
(-[WKView doCommandBySelector:]):
(-[WKView insertText:]):
(-[WKView insertText:replacementRange:]):
(-[WKView inputContext]):
(-[WKView performKeyEquivalent:]):
(-[WKView keyUp:]):
(-[WKView keyDown:]):
(-[WKView flagsChanged:]):
(-[WKView setMarkedText:selectedRange:replacementRange:]):
(-[WKView unmarkText]):
(-[WKView selectedRange]):
(-[WKView hasMarkedText]):
(-[WKView markedRange]):
(-[WKView attributedSubstringForProposedRange:actualRange:]):
(-[WKView characterIndexForPoint:]):
(-[WKView firstRectForCharacterRange:actualRange:]):
(-[WKView selectedRangeWithCompletionHandler:]):
(-[WKView markedRangeWithCompletionHandler:]):
(-[WKView hasMarkedTextWithCompletionHandler:]):
(-[WKView attributedSubstringForProposedRange:completionHandler:]):
(-[WKView firstRectForCharacterRange:completionHandler:]):
(-[WKView characterIndexForPoint:completionHandler:]):
(-[WKView _superPerformKeyEquivalent:]):
(-[WKView _superKeyDown:]):
(extractUnderlines): Deleted.
(-[WKView _collectKeyboardLayoutCommandsForEvent:to:]): Deleted.
(-[WKView _interpretKeyEvent:completionHandler:]): Deleted.
(-[WKView NO_RETURN_DUE_TO_ASSERT]): Deleted.
(-[WKView _interpretKeyEvent:savingCommandsTo:]): Deleted.
(-[WKView _executeSavedKeypressCommands]): Deleted.
(-[WKView _doneWithKeyEvent:eventWasHandled:]): Deleted.
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/Cocoa/WebViewImpl.h:
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::doneWithKeyEvent):
(WebKit::extractUnderlines):
(WebKit::WebViewImpl::collectKeyboardLayoutCommandsForEvent):
(WebKit::WebViewImpl::interpretKeyEvent):
(WebKit::WebViewImpl::doCommandBySelector):
(WebKit::WebViewImpl::insertText):
(WebKit::WebViewImpl::selectedRangeWithCompletionHandler):
(WebKit::WebViewImpl::markedRangeWithCompletionHandler):
(WebKit::WebViewImpl::hasMarkedTextWithCompletionHandler):
(WebKit::WebViewImpl::attributedSubstringForProposedRange):
(WebKit::WebViewImpl::firstRectForCharacterRange):
(WebKit::WebViewImpl::characterIndexForPoint):
(WebKit::WebViewImpl::inputContext):
(WebKit::WebViewImpl::unmarkText):
(WebKit::WebViewImpl::setMarkedText):
(WebKit::WebViewImpl::selectedRange):
(WebKit::WebViewImpl::hasMarkedText):
(WebKit::WebViewImpl::markedRange):
(WebKit::WebViewImpl::performKeyEquivalent):
(WebKit::WebViewImpl::keyUp):
(WebKit::WebViewImpl::keyDown):
(WebKit::WebViewImpl::flagsChanged):
(WebKit::WebViewImpl::executeSavedKeypressCommands):
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::doneWithKeyEvent):
Move NSTextInputClient implementation.
2015-10-30 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Move the socket polling off the WorkQueue
https://bugs.webkit.org/show_bug.cgi?id=150593
Reviewed by Anders Carlsson.
Create the socket poll source in Connection::open and attach it to
the connection work queue context.
* Platform/IPC/Connection.h:
* Platform/IPC/unix/ConnectionUnix.cpp:
(IPC::Connection::platformInvalidate):
(IPC::Connection::open):
2015-10-30 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Use RunLoop::Timer instead of GMainLoopSource
https://bugs.webkit.org/show_bug.cgi?id=150592
Reviewed by Žan Doberšek.
* Shared/Downloads/soup/DownloadSoup.cpp:
(WebKit::DownloadClient::DownloadClient):
(WebKit::DownloadClient::didReceiveData):
(WebKit::DownloadClient::handleResponseLater):
* UIProcess/gtk/GestureController.cpp:
(WebKit::GestureController::DragGesture::begin):
(WebKit::GestureController::DragGesture::update):
(WebKit::GestureController::DragGesture::end):
(WebKit::GestureController::DragGesture::longPressFired):
(WebKit::GestureController::DragGesture::DragGesture):
(WebKit::GestureController::ZoomGesture::scaleChanged):
(WebKit::GestureController::ZoomGesture::ZoomGesture):
* UIProcess/gtk/GestureController.h:
2015-10-29 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Use a persistent main loop source in RunLoop glib implementation
https://bugs.webkit.org/show_bug.cgi?id=150590
Reviewed by Žan Doberšek.
Use RunLoop::dispatch() instead of
GMainLoopSource::scheduleAndDeleteOnDestroy in a couple of simple
cases.
* NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
(WebKit::NetworkCache::runTaskInQueue):
* UIProcess/gtk/DragAndDropHandler.cpp:
(WebKit::DragAndDropHandler::dragLeave):
2015-10-29 Alex Christensen <achristensen@webkit.org>
Make WebCore a framework in Mac CMake build
https://bugs.webkit.org/show_bug.cgi?id=150702
Reviewed by Geoffrey Garen.
* PlatformMac.cmake:
2015-10-29 Alex Christensen <achristensen@webkit.org>
EFL build fix after r191749
* CMakeLists.txt:
Only Mac should include the Cocoa directory.
2015-10-29 Tim Horton <timothy_horton@apple.com>
WKView being inside WKWebView leads to weird API issues
https://bugs.webkit.org/show_bug.cgi?id=150174
Reviewed by Anders Carlsson.
* Platform/spi/mac/AppKitSPI.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView validRequestorForSendType:returnType:]):
(-[WKView readSelectionFromPasteboard:]):
(-[WKView changeFont:]):
(-[WKView startSpeaking:]):
(-[WKView stopSpeaking:]):
(-[WKView showGuessPanel:]):
(-[WKView checkSpelling:]):
(-[WKView changeSpelling:]):
(-[WKView toggleContinuousSpellChecking:]):
(-[WKView isGrammarCheckingEnabled]):
(-[WKView setGrammarCheckingEnabled:]):
(-[WKView toggleGrammarChecking:]):
(-[WKView toggleAutomaticSpellingCorrection:]):
(-[WKView orderFrontSubstitutionsPanel:]):
(-[WKView toggleSmartInsertDelete:]):
(-[WKView isAutomaticQuoteSubstitutionEnabled]):
(-[WKView setAutomaticQuoteSubstitutionEnabled:]):
(-[WKView toggleAutomaticQuoteSubstitution:]):
(-[WKView isAutomaticDashSubstitutionEnabled]):
(-[WKView setAutomaticDashSubstitutionEnabled:]):
(-[WKView toggleAutomaticDashSubstitution:]):
(-[WKView isAutomaticLinkDetectionEnabled]):
(-[WKView setAutomaticLinkDetectionEnabled:]):
(-[WKView toggleAutomaticLinkDetection:]):
(-[WKView isAutomaticTextReplacementEnabled]):
(-[WKView setAutomaticTextReplacementEnabled:]):
(-[WKView toggleAutomaticTextReplacement:]):
(-[WKView uppercaseWord:]):
(-[WKView lowercaseWord:]):
(-[WKView capitalizeWord:]):
* UIProcess/Cocoa/WebViewImpl.h:
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::readSelectionFromPasteboard):
(WebKit::WebViewImpl::validRequestorForSendAndReturnTypes):
(WebKit::WebViewImpl::changeFontFromFontPanel):
(WebKit::WebViewImpl::startSpeaking):
(WebKit::WebViewImpl::stopSpeaking):
(WebKit::WebViewImpl::showGuessPanel):
(WebKit::WebViewImpl::checkSpelling):
(WebKit::WebViewImpl::changeSpelling):
(WebKit::WebViewImpl::toggleContinuousSpellChecking):
(WebKit::WebViewImpl::isGrammarCheckingEnabled):
(WebKit::WebViewImpl::setGrammarCheckingEnabled):
(WebKit::WebViewImpl::toggleGrammarChecking):
(WebKit::WebViewImpl::toggleAutomaticSpellingCorrection):
(WebKit::WebViewImpl::orderFrontSubstitutionsPanel):
(WebKit::WebViewImpl::toggleSmartInsertDelete):
(WebKit::WebViewImpl::isAutomaticQuoteSubstitutionEnabled):
(WebKit::WebViewImpl::setAutomaticQuoteSubstitutionEnabled):
(WebKit::WebViewImpl::toggleAutomaticQuoteSubstitution):
(WebKit::WebViewImpl::isAutomaticDashSubstitutionEnabled):
(WebKit::WebViewImpl::setAutomaticDashSubstitutionEnabled):
(WebKit::WebViewImpl::toggleAutomaticDashSubstitution):
(WebKit::WebViewImpl::isAutomaticLinkDetectionEnabled):
(WebKit::WebViewImpl::setAutomaticLinkDetectionEnabled):
(WebKit::WebViewImpl::toggleAutomaticLinkDetection):
(WebKit::WebViewImpl::setAutomaticTextReplacementEnabled):
(WebKit::WebViewImpl::toggleAutomaticTextReplacement):
(WebKit::WebViewImpl::uppercaseWord):
(WebKit::WebViewImpl::lowercaseWord):
(WebKit::WebViewImpl::capitalizeWord):
Move spellcheck and related bits.
2015-10-29 Eric Carlson <eric.carlson@apple.com>
Revert inadvertent changes
https://bugs.webkit.org/show_bug.cgi?id=150694
Reviewed by Tim Horton.
* WebProcess/com.apple.WebProcess.sb.in:
2015-10-29 Alex Christensen <achristensen@webkit.org>
CMake build fix.
* CMakeLists.txt:
* PlatformMac.cmake:
I mistakenly added some mac-specific files to the shared CMakeLists.txt. This puts them in the right place.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::viewWillStartLiveResize):
(WebKit::WebPageProxy::viewDidLeaveWindow):
(WebKit::WebPageProxy::didEndColorPicker):
Add preprocessor enable checks.
2015-10-29 Tim Horton <timothy_horton@apple.com>
WKView being inside WKWebView leads to weird API issues
https://bugs.webkit.org/show_bug.cgi?id=150174
Reviewed by Darin Adler.
* UIProcess/API/mac/WKView.mm:
(-[WKView browsingContextController]):
(-[WKView validateUserInterfaceItem:]):
(-[WKView saveBackForwardSnapshotForCurrentItem]):
(-[WKView saveBackForwardSnapshotForItem:]):
(-[WKView updateLayer]):
(-[WKView minimumSizeForAutoLayout]):
(-[WKView setMinimumSizeForAutoLayout:]):
(-[WKView shouldExpandToViewHeightForAutoLayout]):
(-[WKView setShouldExpandToViewHeightForAutoLayout:]):
(-[WKView underlayColor]):
(-[WKView setUnderlayColor:]):
(-[WKView _setOverlayScrollbarStyle:]):
(-[WKView _overlayScrollbarStyle]):
(-[WKView _pageExtendedBackgroundColor]):
(-[WKView forceAsyncDrawingAreaSizeUpdate:]):
(-[WKView waitForAsyncDrawingAreaSizeUpdate]):
(-[WKView isUsingUISideCompositing]):
(createSelectorExceptionMap): Deleted.
(commandNameForSelector): Deleted.
(menuItem): Deleted.
(toolbarItem): Deleted.
(-[WKView _setUserInterfaceItemState:enabled:state:]): Deleted.
* UIProcess/Cocoa/WebViewImpl.h:
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::createDrawingAreaProxy):
(WebKit::WebViewImpl::isUsingUISideCompositing):
(WebKit::WebViewImpl::forceAsyncDrawingAreaSizeUpdate):
(WebKit::WebViewImpl::waitForAsyncDrawingAreaSizeUpdate):
(WebKit::WebViewImpl::updateLayer):
(WebKit::WebViewImpl::setMinimumSizeForAutoLayout):
(WebKit::WebViewImpl::minimumSizeForAutoLayout):
(WebKit::WebViewImpl::setShouldExpandToViewHeightForAutoLayout):
(WebKit::WebViewImpl::shouldExpandToViewHeightForAutoLayout):
(WebKit::WebViewImpl::setUnderlayColor):
(WebKit::WebViewImpl::underlayColor):
(WebKit::WebViewImpl::pageExtendedBackgroundColor):
(WebKit::WebViewImpl::setOverlayScrollbarStyle):
(WebKit::WebViewImpl::overlayScrollbarStyle):
(WebKit::createSelectorExceptionMap):
(WebKit::commandNameForSelector):
(WebKit::WebViewImpl::executeSavedCommandBySelector):
(WebKit::WebViewImpl::executeEditCommandForSelector):
(WebKit::menuItem):
(WebKit::toolbarItem):
(WebKit::WebViewImpl::validateUserInterfaceItem):
(WebKit::WebViewImpl::setUserInterfaceItemState):
(WebKit::WebViewImpl::browsingContextController):
(WebKit::WebViewImpl::saveBackForwardSnapshotForCurrentItem):
(WebKit::WebViewImpl::saveBackForwardSnapshotForItem):
(WebKit::WebViewImpl::executeEditCommand): Deleted.
Move UI validation and a grab-bag of other things.
2015-10-29 Alex Christensen <achristensen@webkit.org>
Fix Mac CMake build
https://bugs.webkit.org/show_bug.cgi?id=150686
Reviewed by Filip Pizlo.
* CMakeLists.txt:
* PlatformMac.cmake:
2015-10-29 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r191728.
https://bugs.webkit.org/show_bug.cgi?id=150668
Caused a lot of timeouts in layout tests (Requested by KaL on
#webkit).
Reverted changeset:
"[GTK] Use a persistent main loop source in RunLoop glib
implementation"
https://bugs.webkit.org/show_bug.cgi?id=150590
http://trac.webkit.org/changeset/191728
2015-10-29 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Use a persistent main loop source in RunLoop glib implementation
https://bugs.webkit.org/show_bug.cgi?id=150590
Reviewed by Žan Doberšek.
Use RunLoop::dispatch() instead of
GMainLoopSource::scheduleAndDeleteOnDestroy in a couple of simple
cases.
* NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
(WebKit::NetworkCache::runTaskInQueue):
* UIProcess/gtk/DragAndDropHandler.cpp:
(WebKit::DragAndDropHandler::dragLeave):
2015-10-28 Tim Horton <timothy_horton@apple.com>
Fix the build
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::startWindowDrag):
(WebKit::PageClientImpl::platformWindow):
2015-10-28 Tim Horton <timothy_horton@apple.com>
WKView being inside WKWebView leads to weird API issues
https://bugs.webkit.org/show_bug.cgi?id=150174
Reviewed by Anders Carlsson.
* UIProcess/API/C/mac/WKPagePrivateMac.mm:
(WKPageGetObjectRegistry):
* UIProcess/API/Cocoa/WKBrowsingContextController.mm:
(-[WKBrowsingContextController _remoteObjectRegistry]):
* UIProcess/API/mac/WKView.mm:
(-[WKView dealloc]):
(-[WKView _inspectorAttachmentView]):
(-[WKView _setInspectorAttachmentView:]):
(-[WKView windowOcclusionDetectionEnabled]):
(-[WKView setWindowOcclusionDetectionEnabled:]):
(-[WKView _setTotalHeightOfBanners:]):
(-[WKView _totalHeightOfBanners]):
(-[WKView initWithFrame:processPool:configuration:webView:]): Deleted.
(-[WKView _remoteObjectRegistry]): Deleted.
(-[WKView _startWindowDrag]): Deleted.
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/Cocoa/WebViewImpl.h:
(WebKit::WebViewImpl::setWindowOcclusionDetectionEnabled):
(WebKit::WebViewImpl::windowOcclusionDetectionEnabled):
(WebKit::WebViewImpl::setTotalHeightOfBanners):
(WebKit::WebViewImpl::totalHeightOfBanners):
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::window):
(WebKit::WebViewImpl::setInspectorAttachmentView):
(WebKit::WebViewImpl::inspectorAttachmentView):
(WebKit::WebViewImpl::remoteObjectRegistry):
(WebKit::WebViewImpl::destroyRemoteObjectRegistry):
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.h:
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::isViewVisible):
(WebKit::PageClientImpl::createColorPicker):
(WebKit::PageClientImpl::startWindowDrag):
(WebKit::PageClientImpl::platformWindow):
(WebKit::PageClientImpl::inspectorAttachmentView):
(WebKit::PageClientImpl::remoteObjectRegistry):
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
(WebKit::WebInspectorProxy::platformCanAttach):
(WebKit::WebInspectorProxy::platformBringToFront):
(WebKit::WebInspectorProxy::inspectedViewFrameDidChange):
(WebKit::WebInspectorProxy::platformInspectedWindowHeight):
(WebKit::WebInspectorProxy::platformInspectedWindowWidth):
(WebKit::WebInspectorProxy::platformAttach):
(WebKit::WebInspectorProxy::platformDetach):
(WebKit::WebInspectorProxy::platformStartWindowDrag):
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::startWindowDrag):
(WebKit::WebPageProxy::platformWindow):
(WebKit::WebPageProxy::inspectorAttachmentView):
(WebKit::WebPageProxy::remoteObjectRegistry):
(WebKit::WebPageProxy::wkView): Deleted.
Get rid of the wkView() getters on PageClientImpl and WebPageProxy, because
those can't be a thing in the brave new world. Instead, plumb the four
callers through PageClient to WebViewImpl.
Also, move a few more things (banners, window occlusion).
2015-10-27 Anders Carlsson <andersca@apple.com>
Stub out more of the context menu SPI
https://bugs.webkit.org/show_bug.cgi?id=150606
Reviewed by Dan Bernstein.
Add a delegate method that will allow the client to modify the menu. Also,
add an empty _WKContextMenuElementInfo class and its _WKElementInfo superclass.
* UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
* UIProcess/API/Cocoa/_WKContextMenuElementInfo.h: Added.
* UIProcess/API/Cocoa/_WKContextMenuElementInfo.mm: Added.
* UIProcess/API/Cocoa/_WKElementInfo.h: Added.
* UIProcess/API/Cocoa/_WKElementInfo.mm: Added.
* UIProcess/Cocoa/UIDelegate.h:
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::setDelegate):
(WebKit::UIDelegate::ContextMenuClient::menuFromProposedMenu):
(WebKit::UIDelegate::UIClient::createNewPage):
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::showContextMenu):
* WebKit2.xcodeproj/project.pbxproj:
2015-10-28 Anders Carlsson <andersca@apple.com>
Stop using ContextMenuItem::shareMenuItem in the UI process
https://bugs.webkit.org/show_bug.cgi?id=150578
Reviewed by Tim Horton.
* UIProcess/mac/WebContextMenuProxyMac.h:
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::createShareMenuItem):
(WebKit::WebContextMenuProxyMac::createContextMenuItem):
(WebKit::WebContextMenuProxyMac::shareMenuItem): Deleted.
2015-10-28 Tim Horton <timothy_horton@apple.com>
WKView being inside WKWebView leads to weird API issues
https://bugs.webkit.org/show_bug.cgi?id=150174
Reviewed by Anders Carlsson.
* UIProcess/API/mac/WKView.mm:
(-[WKView _superDoCommandBySelector:]):
(-[WKView _createDrawingAreaProxy]): Deleted.
(-[WKView _processDidExit]): Deleted.
(-[WKView _pageClosed]): Deleted.
(-[WKView _didRelaunchProcess]): Deleted.
(-[WKView _convertToDeviceSpace:]): Deleted.
(-[WKView _convertToUserSpace:]): Deleted.
(-[WKView _executeSavedCommandBySelector:]): Deleted.
(-[WKResponderChainSink initWithResponderChain:]): Deleted.
(-[WKResponderChainSink detach]): Deleted.
(-[WKResponderChainSink didReceiveUnhandledCommand]): Deleted.
(-[WKResponderChainSink noResponderFor:]): Deleted.
(-[WKResponderChainSink doCommandBySelector:]): Deleted.
(-[WKResponderChainSink tryToPerform:with:]): Deleted.
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/Cocoa/WebViewImpl.h:
* UIProcess/Cocoa/WebViewImpl.mm:
(-[WKResponderChainSink initWithResponderChain:]):
(-[WKResponderChainSink detach]):
(-[WKResponderChainSink didReceiveUnhandledCommand]):
(-[WKResponderChainSink noResponderFor:]):
(-[WKResponderChainSink doCommandBySelector:]):
(-[WKResponderChainSink tryToPerform:with:]):
(WebKit::WebViewImpl::createDrawingAreaProxy):
(WebKit::WebViewImpl::processDidExit):
(WebKit::WebViewImpl::pageClosed):
(WebKit::WebViewImpl::didRelaunchProcess):
(WebKit::WebViewImpl::executeSavedCommandBySelector):
(WebKit::WebViewImpl::resetGestureController): Deleted.
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::createDrawingAreaProxy):
(WebKit::PageClientImpl::processDidExit):
(WebKit::PageClientImpl::pageClosed):
(WebKit::PageClientImpl::didRelaunchProcess):
(WebKit::PageClientImpl::convertToDeviceSpace):
(WebKit::PageClientImpl::convertToUserSpace):
(WebKit::PageClientImpl::executeSavedCommandBySelector):
Move most of the rest of WKViewInternal.h's methods to WebViewImpl.
2015-10-28 Alex Christensen <achristensen@webkit.org>
Compile and link with CMake on Mac
https://bugs.webkit.org/show_bug.cgi?id=150632
Reviewed by Tim Horton.
* CMakeLists.txt:
* PlatformEfl.cmake:
* PlatformGTK.cmake:
* PlatformMac.cmake:
2015-10-27 Anders Carlsson <andersca@apple.com>
Stub out more of the context menu SPI
https://bugs.webkit.org/show_bug.cgi?id=150606
Reviewed by Dan Bernstein.
Add a delegate method that will allow the client to modify the menu. Also,
add an empty _WKContextMenuElementInfo class and its _WKElementInfo superclass.
* UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
* UIProcess/API/Cocoa/_WKContextMenuElementInfo.h: Added.
* UIProcess/API/Cocoa/_WKContextMenuElementInfo.mm: Added.
* UIProcess/API/Cocoa/_WKElementInfo.h: Added.
* UIProcess/API/Cocoa/_WKElementInfo.mm: Added.
* UIProcess/Cocoa/UIDelegate.h:
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::setDelegate):
(WebKit::UIDelegate::ContextMenuClient::menuFromProposedMenu):
(WebKit::UIDelegate::UIClient::createNewPage):
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::showContextMenu):
* WebKit2.xcodeproj/project.pbxproj:
2015-10-28 Chris Dumez <cdumez@apple.com>
Use RunLoopTimer in DataURLDecoder to avoid issues related to runloops
https://bugs.webkit.org/show_bug.cgi?id=150609
<rdar://problem/22702894>
Reviewed by Antti Koivisto.
Move addSchedulePair() call to Page::platformInitialize() so that
RunLoopTimer can be used by any Page, even those that don't have
a WebPage wrapper.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::platformInitialize): Deleted.
2015-10-27 Tim Horton <timothy_horton@apple.com>
Fix the 32-bit build.
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::dragImageForView):
2015-10-27 Tim Horton <timothy_horton@apple.com>
Fix the build.
* UIProcess/Cocoa/WebViewImpl.mm:
2015-10-27 Tim Horton <timothy_horton@apple.com>
WKView being inside WKWebView leads to weird API issues
https://bugs.webkit.org/show_bug.cgi?id=150174
Reviewed by Anders Carlsson.
* UIProcess/API/mac/WKView.mm:
(-[WKView mouseDown:]):
(-[WKView mouseUp:]):
(-[WKView acceptsFirstMouse:]):
(-[WKView shouldDelayWindowOrderingForEvent:]):
(-[WKView pasteboardChangedOwner:]):
(-[WKView pasteboard:provideDataForType:]):
(-[WKView namesOfPromisedFilesDroppedAtDestination:]):
(-[WKView _startWindowDrag]):
(-[WKView _setMouseDownEvent:]): Deleted.
(-[WKView _colorSpace]): Deleted.
(-[WKView _dragImageForView:withImage:at:linkDrag:]): Deleted.
(matchesExtensionOrEquivalent): Deleted.
(-[WKView _setFileAndURLTypes:withExtension:withTitle:withURL:withVisibleURL:forPasteboard:]): Deleted.
(-[WKView _setPromisedDataForImage:withFileName:withExtension:withTitle:withURL:withVisibleURL:withArchive:forPasteboard:]): Deleted.
(-[WKView _setPromisedDataForAttachment:withExtension:withTitle:withURL:withVisibleURL:forPasteboard:]): Deleted.
(fileExists): Deleted.
(pathWithUniqueFilenameForPath): Deleted.
(-[WKView spellCheckerDocumentTag]): Deleted.
(-[WKView handleAcceptedAlternativeText:]): Deleted.
(-[WKView initWithFrame:processPool:configuration:webView:]): Deleted.
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/Cocoa/WebViewImpl.h:
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::handleAcceptedAlternativeText):
(WebKit::WebViewImpl::spellCheckerDocumentTag):
(WebKit::WebViewImpl::startWindowDrag):
(WebKit::WebViewImpl::dragImageForView):
(WebKit::matchesExtensionOrEquivalent):
(WebKit::WebViewImpl::setFileAndURLTypes):
(WebKit::WebViewImpl::setPromisedDataForImage):
(WebKit::WebViewImpl::setPromisedDataForAttachment):
(WebKit::WebViewImpl::pasteboardChangedOwner):
(WebKit::WebViewImpl::provideDataForPasteboard):
(WebKit::fileExists):
(WebKit::pathWithUniqueFilenameForPath):
(WebKit::WebViewImpl::namesOfPromisedFilesDroppedAtDestination):
(WebKit::WebViewImpl::setLastMouseDownEvent):
* UIProcess/mac/CorrectionPanel.h:
* UIProcess/mac/CorrectionPanel.mm:
(WebKit::CorrectionPanel::show):
(WebKit::CorrectionPanel::recordAutocorrectionResponse):
(WebKit::CorrectionPanel::handleAcceptedReplacement):
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::colorSpace):
(WebKit::PageClientImpl::setDragImage):
(WebKit::PageClientImpl::setPromisedDataForImage):
(WebKit::PageClientImpl::setPromisedDataForAttachment):
(WebKit::PageClientImpl::showCorrectionPanel):
(WebKit::PageClientImpl::recordAutocorrectionResponse):
(WebKit::PageClientImpl::showDictationAlternativeUI):
Move some pasteboard and spellcheck code.
2015-10-27 Wenson Hsieh <wenson_hsieh@apple.com>
Implement viewport-width-based fast-click heuristic
https://bugs.webkit.org/show_bug.cgi?id=150604
<rdar://problem/23267308>
Reviewed by Simon Fraser.
Implement a new fast-click heuristic that applies to viewports with width = device-width. The basic rules are
as follows: when a page has viewport width = device-width and is at initial zoom scale, we disable double-tapping
in favor of fast-clicking. However, if the viewport scale is not the initial scale, we allow double tapping. For
fast-clicking to remain useful after the user pinch-zooms, we change our double-tap to zoom out behavior to zoom
to the initial scale rather than the minimum scale. For unscalable viewports, we default to fast-clicking behavior,
and for all other viewports not at device-width, we double-tap to zoom and scroll as normal.
This patch removes some logic previously used for our scroll- and zoom-based fast-clicking heuristic, and adds
information about the viewport width and initial scale to RemoteLayerTreeTransactions. This information is then
used by the UI process to determine whether double tapping should be disabled or enabled.
The fast-click heuristic can be turned off through user default preferences, and a tap highlight for debugging
fast-clicking can also be enabled through a user default preference. A red highlight indicates that a single-
tap was slow, whereas a green highlight indicates a fast single-tap.
* Shared/mac/RemoteLayerTreeTransaction.h:
(WebKit::RemoteLayerTreeTransaction::initialScaleFactor):
(WebKit::RemoteLayerTreeTransaction::setInitialScaleFactor):
(WebKit::RemoteLayerTreeTransaction::viewportMetaTagWidth):
(WebKit::RemoteLayerTreeTransaction::setViewportMetaTagWidth):
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::encode):
(WebKit::RemoteLayerTreeTransaction::decode):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
(-[WKWebView _processDidExit]):
(-[WKWebView _didCommitLayerTree:]):
(-[WKWebView _zoomToInitialScaleWithOrigin:animated:]):
(-[WKWebView _allowsDoubleTapGestures]):
(-[WKWebView _setViewportMetaTagWidth:]): Deleted.
(-[WKWebView _contentZoomScale]): Deleted.
(-[WKWebView _viewportMetaTagWidth]): Deleted.
(-[WKWebView _viewportIsUserScalable]): Deleted.
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::disableDoubleTapGesturesDuringTapIfNecessary):
(WebKit::PageClientImpl::didChangeViewportMetaTagWidth): Deleted.
(WebKit::PageClientImpl::disableDoubleTapGesturesUntilTapIsFinishedIfNecessary): Deleted.
* UIProcess/ios/SmartMagnificationController.h:
* UIProcess/ios/SmartMagnificationController.mm:
(WebKit::SmartMagnificationController::didCollectGeometryForSmartMagnificationGesture):
* UIProcess/ios/WKContentView.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _zoomToInitialScaleWithOrigin:]):
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView setupInteraction]):
(-[WKContentView _showTapHighlight]):
(-[WKContentView _didGetTapHighlightForRequest:color:quads:topLeftRadius:topRightRadius:bottomLeftRadius:bottomRightRadius:]):
(-[WKContentView _mayDisableDoubleTapGesturesDuringSingleTap]):
(-[WKContentView _disableDoubleTapGesturesDuringTapIfNecessary:]):
(-[WKContentView _finishInteraction]):
(-[WKContentView _endPotentialTapAndEnableDoubleTapGesturesIfNecessary]):
(-[WKContentView _tapHighlightColorForFastClick:]):
(-[WKContentView _setDoubleTapGesturesEnabled:]):
(-[WKContentView _fastClickZoomThreshold]): Deleted.
(-[WKContentView _allowDoubleTapToZoomForCurrentZoomScale:andTargetZoomScale:]): Deleted.
(-[WKContentView _disableDoubleTapGesturesUntilTapIsFinishedIfNecessary:allowsDoubleTapZoom:targetRect:isReplaced:minimumScale:maximumScale:]): Deleted.
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::disableDoubleTapGesturesDuringTapIfNecessary):
(WebKit::WebPageProxy::viewportMetaTagWidthDidChange): Deleted.
(WebKit::WebPageProxy::disableDoubleTapGesturesUntilTapIsFinishedIfNecessary): Deleted.
* WebProcess/WebPage/ViewGestureGeometryCollector.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::willCommitLayerTree):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::potentialTapAtPosition):
(WebKit::WebPage::viewportPropertiesDidChange): Deleted.
2015-10-27 Tim Horton <timothy_horton@apple.com>
WKView being inside WKWebView leads to weird API issues
https://bugs.webkit.org/show_bug.cgi?id=150174
Reviewed by Anders Carlsson.
* UIProcess/API/mac/WKView.mm:
(-[WKView _superAccessibilityAttributeValue:]):
(-[WKView accessibilityFocusedUIElement]):
(-[WKView accessibilityIsIgnored]):
(-[WKView accessibilityHitTest:]):
(-[WKView accessibilityAttributeValue:]):
(-[WKView _processDidExit]):
(-[WKView _pageClosed]):
(-[WKView _updateRemoteAccessibilityRegistration:]): Deleted.
(-[WKView enableAccessibilityIfNecessary]): Deleted.
(-[WKView _toolTipChangedFrom:to:]): Deleted.
(-[WKView _setAccessibilityWebProcessToken:]): Deleted.
(-[WKView _hasFullScreenWindowController]): Deleted.
(-[WKView _fullScreenWindowController]): Deleted.
(-[WKView _closeFullScreenWindowController]): Deleted.
(-[WKView _setSuppressVisibilityUpdates:]): Deleted.
(-[WKView _suppressVisibilityUpdates]): Deleted.
(-[WKView _primaryTrackingArea]): Deleted.
(-[WKView _setPrimaryTrackingArea:]): Deleted.
(-[WKView initWithFrame:processPool:configuration:webView:]): Deleted.
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/Cocoa/WebViewImpl.h:
(WebKit::WebViewImpl::accessibilityIsIgnored):
(WebKit::WebViewImpl::primaryTrackingArea):
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::trackingAreaOptions):
(WebKit::WebViewImpl::WebViewImpl):
(WebKit::WebViewImpl::setAccessibilityWebProcessToken):
(WebKit::WebViewImpl::updateRemoteAccessibilityRegistration):
(WebKit::WebViewImpl::accessibilityFocusedUIElement):
(WebKit::WebViewImpl::accessibilityHitTest):
(WebKit::WebViewImpl::enableAccessibilityIfNecessary):
(WebKit::WebViewImpl::accessibilityAttributeValue):
(WebKit::WebViewImpl::setPrimaryTrackingArea):
(WebKit::WebViewImpl::toolTipChanged):
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::toolTipChanged):
(WebKit::PageClientImpl::accessibilityWebProcessTokenReceived):
(WebKit::PageClientImpl::recommendedScrollbarStyleDidChange):
(WebKit::PageClientImpl::closeFullScreenManager):
(WebKit::PageClientImpl::isFullScreen):
(WebKit::PageClientImpl::enterFullScreen):
(WebKit::PageClientImpl::exitFullScreen):
(WebKit::PageClientImpl::beganEnterFullScreen):
(WebKit::PageClientImpl::beganExitFullScreen):
Move accessibility code, and fold in some internal-only methods.
2015-10-27 Tim Horton <timothy_horton@apple.com>
WKView being inside WKWebView leads to weird API issues
https://bugs.webkit.org/show_bug.cgi?id=150174
Reviewed by Anders Carlsson.
* UIProcess/API/mac/WKView.mm:
(-[WKView scrollWheel:]):
(-[WKView swipeWithEvent:]):
(-[WKView _superSwipeWithEvent:]):
(-[WKView _superMagnifyWithEvent:]):
(-[WKView _superSmartMagnifyWithEvent:]):
(-[WKView _processDidExit]):
(-[WKView setAllowsBackForwardNavigationGestures:]):
(-[WKView allowsBackForwardNavigationGestures]):
(-[WKView setAllowsMagnification:]):
(-[WKView allowsMagnification]):
(-[WKView magnifyWithEvent:]):
(-[WKView rotateWithEvent:]):
(-[WKView _gestureEventWasNotHandledByWebCore:]):
(-[WKView smartMagnifyWithEvent:]):
(-[WKView setMagnification:centeredAtPoint:]):
(-[WKView setMagnification:]):
(-[WKView magnification]):
(-[WKView _setCustomSwipeViews:]):
(-[WKView _setCustomSwipeViewsTopContentInset:]):
(-[WKView _tryToSwipeWithEvent:ignoringPinnedState:]):
(-[WKView _setDidMoveSwipeSnapshotCallback:]):
(-[WKView _ensureGestureController]): Deleted.
(takeWindowSnapshot): Deleted.
(-[WKView _takeViewSnapshot]): Deleted.
(-[WKView _wheelEventWasNotHandledByWebCore:]): Deleted.
(-[WKView _didFirstVisuallyNonEmptyLayoutForMainFrame]): Deleted.
(-[WKView _didFinishLoadForMainFrame]): Deleted.
(-[WKView _didFailLoadForMainFrame]): Deleted.
(-[WKView _didSameDocumentNavigationForMainFrame:]): Deleted.
(-[WKView _removeNavigationGestureSnapshot]): Deleted.
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/Cocoa/WebViewImpl.h:
(WebKit::WebViewImpl::gestureController):
(WebKit::WebViewImpl::allowsBackForwardNavigationGestures):
(WebKit::WebViewImpl::allowsMagnification):
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::takeWindowSnapshot):
(WebKit::WebViewImpl::takeViewSnapshot):
(WebKit::WebViewImpl::ensureGestureController):
(WebKit::WebViewImpl::resetGestureController):
(WebKit::WebViewImpl::setAllowsBackForwardNavigationGestures):
(WebKit::WebViewImpl::setAllowsMagnification):
(WebKit::WebViewImpl::setMagnification):
(WebKit::WebViewImpl::magnification):
(WebKit::WebViewImpl::setCustomSwipeViews):
(WebKit::WebViewImpl::setCustomSwipeViewsTopContentInset):
(WebKit::WebViewImpl::tryToSwipeWithEvent):
(WebKit::WebViewImpl::setDidMoveSwipeSnapshotCallback):
(WebKit::WebViewImpl::scrollWheel):
(WebKit::WebViewImpl::swipeWithEvent):
(WebKit::WebViewImpl::magnifyWithEvent):
(WebKit::WebViewImpl::smartMagnifyWithEvent):
(WebKit::WebViewImpl::rotateWithEvent):
(WebKit::WebViewImpl::gestureEventWasNotHandledByWebCore):
(WebKit::WebViewImpl::gestureEventWasNotHandledByWebCoreFromViewOnly):
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::takeViewSnapshot):
(WebKit::PageClientImpl::wheelEventWasNotHandledByWebCore):
(WebKit::PageClientImpl::didFirstVisuallyNonEmptyLayoutForMainFrame):
(WebKit::PageClientImpl::didFinishLoadForMainFrame):
(WebKit::PageClientImpl::didFailLoadForMainFrame):
(WebKit::PageClientImpl::didSameDocumentNavigationForMainFrame):
(WebKit::PageClientImpl::removeNavigationGestureSnapshot):
Move swipe, zoom, rotate, and snapshotting code.
2015-10-27 Zhuo Li <zachli@apple.com>
Add WebKit API to clear data type Search Field Recent Searches.
https://bugs.webkit.org/show_bug.cgi?id=150019.
Reviewed by Anders Carlsson.
* Shared/WebsiteData/WebsiteDataTypes.h: Add data type Search Field Recent Searches.
* UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
(dataTypesToString): Ditto.
* UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
(WebKit::toWebsiteDataTypes): Ditto.
(WebKit::toWKWebsiteDataTypes): Ditto.
* UIProcess/API/Cocoa/WKWebsiteDataRecordPrivate.h: Ditto.
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::removeData): Handle the case when data type is Search
Field Recent Searches.
* UIProcess/WebsiteData/WebsiteDataStore.h: Add a private function for removing
recent searches based on time.
* UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
(WebKit::WebsiteDataStoreCocoa::platformRemoveRecentSearches): Call the removing
recent searches logic in WebCore.
* UIProcess/efl/WebPageProxyEfl.cpp:
(WebKit::WebsiteDataStore::platformRemoveRecentSearches): Not implemented.
* UIProcess/gtk/WebPageProxyGtk.cpp:
(WebKit::WebsiteDataStore::platformRemoveRecentSearches): Not implemented.
2015-10-26 Brady Eidson <beidson@apple.com>
Make IDBKeyData from a struct to a class.
https://bugs.webkit.org/show_bug.cgi?id=150576
Reviewed by Alex Christensen.
* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in:
* DatabaseProcess/IndexedDB/IDBSerialization.h:
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::putRecordInBackingStore):
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
* DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
* DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
(WebKit::buildIndexStatement):
(WebKit::buildObjectStoreStatement):
(WebKit::SQLiteIDBCursor::establishStatement):
(WebKit::SQLiteIDBCursor::createSQLiteStatement):
(WebKit::SQLiteIDBCursor::resetAndRebindStatement):
(WebKit::SQLiteIDBCursor::iterate):
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::createIndex):
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
(WebKit::WebIDBServerConnection::didPutRecord):
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in:
2015-10-26 Philip Chimento <philip.chimento@gmail.com>
[GTK] [Stable] InstallMissingMediaPluginsPermissionRequest not defined when building without GStreamer
https://bugs.webkit.org/show_bug.cgi?id=148607
Unreviewed, build fix.
* UIProcess/gstreamer/InstallMissingMediaPluginsPermissionRequest.h:
Add a stub for the InstallMissingMediaPluginsPermissionRequest class
for the case when video is disabled or not using GStreamer. It's OK
that this class does nothing, because the associated C API contains
an assert_not_reached if video is disabled. We just need to define
the symbol so that the function signature will compile.
2015-10-26 Anders Carlsson <andersca@apple.com>
Pipe custom context menu handling through to the UIDelegate object
https://bugs.webkit.org/show_bug.cgi?id=150572
Reviewed by Tim Horton.
* UIProcess/API/APIContextMenuClient.h:
(API::ContextMenuClient::menuFromProposedMenu):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView setUIDelegate:]):
* UIProcess/Cocoa/UIDelegate.h:
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::createContextMenuClient):
(WebKit::UIDelegate::ContextMenuClient::ContextMenuClient):
(WebKit::UIDelegate::ContextMenuClient::~ContextMenuClient):
(WebKit::UIDelegate::ContextMenuClient::menuFromProposedMenu):
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::showContextMenu):
2015-10-26 Tim Horton <timothy_horton@apple.com>
WKView being inside WKWebView leads to weird API issues
https://bugs.webkit.org/show_bug.cgi?id=150174
Reviewed by Anders Carlsson.
* UIProcess/API/mac/WKView.mm:
(-[WKView mouseDown:]):
(-[WKView mouseDragged:]):
(-[WKView draggedImage:endedAt:operation:]):
(-[WKView draggingEntered:]):
(-[WKView draggingUpdated:]):
(-[WKView draggingExited:]):
(-[WKView prepareForDragOperation:]):
(-[WKView performDragOperation:]):
(-[WKView _hitTest:dragTypes:]):
(-[WKView initWithFrame:processPool:configuration:webView:]):
(-[WKView applicationFlags:]): Deleted.
(maybeCreateSandboxExtensionFromPasteboard): Deleted.
(createSandboxExtensionsForFileUpload): Deleted.
(-[WKView _registerDraggedTypes]): Deleted.
* UIProcess/Cocoa/WebViewImpl.h:
(WebKit::WebViewImpl::ignoresMouseDraggedEvents):
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::setIgnoresMouseDraggedEvents):
(WebKit::WebViewImpl::draggedImage):
(WebKit::applicationFlagsForDrag):
(WebKit::WebViewImpl::draggingEntered):
(WebKit::WebViewImpl::draggingUpdated):
(WebKit::WebViewImpl::draggingExited):
(WebKit::WebViewImpl::prepareForDragOperation):
(WebKit::maybeCreateSandboxExtensionFromPasteboard):
(WebKit::createSandboxExtensionsForFileUpload):
(WebKit::WebViewImpl::performDragOperation):
(WebKit::WebViewImpl::hitTestForDragTypes):
(WebKit::WebViewImpl::registerDraggedTypes):
Move some drag-related things to WebViewImpl.
2015-10-26 Anders Carlsson <andersca@apple.com>
Pipe custom context menu handling through to the UIDelegate object
https://bugs.webkit.org/show_bug.cgi?id=150572
Reviewed by Tim Horton.
* UIProcess/API/APIContextMenuClient.h:
(API::ContextMenuClient::menuFromProposedMenu):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView setUIDelegate:]):
* UIProcess/Cocoa/UIDelegate.h:
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::createContextMenuClient):
(WebKit::UIDelegate::ContextMenuClient::ContextMenuClient):
(WebKit::UIDelegate::ContextMenuClient::~ContextMenuClient):
(WebKit::UIDelegate::ContextMenuClient::menuFromProposedMenu):
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::showContextMenu):
2015-10-26 Alex Christensen <achristensen@webkit.org>
Build fix when using NETWORK_SESSION after r191457.
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(-[NetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
Use resourceResponse.
2015-10-26 Anders Carlsson <andersca@apple.com>
Remove more dead context menu code
https://bugs.webkit.org/show_bug.cgi?id=150569
Reviewed by Tim Horton.
* UIProcess/API/APIContextMenuClient.h:
(API::ContextMenuClient::contextMenuDismissed): Deleted.
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageContextMenuClient): Deleted.
2015-10-26 Anders Carlsson <andersca@apple.com>
Remove dead context menu code
https://bugs.webkit.org/show_bug.cgi?id=150567
Reviewed by Tim Horton.
* WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
(WebKit::WebContextMenuClient::getCustomMenuFromDefaultItems): Deleted.
* WebProcess/WebCoreSupport/WebContextMenuClient.h:
2015-10-26 Tim Horton <timothy_horton@apple.com>
Don't expose the whitelist/blacklist in _WKUserStyleSheet
https://bugs.webkit.org/show_bug.cgi?id=150566
Reviewed by Anders Carlsson.
* UIProcess/API/Cocoa/_WKUserStyleSheet.h:
* UIProcess/API/Cocoa/_WKUserStyleSheet.mm:
(-[_WKUserStyleSheet initWithSource:forMainFrameOnly:]):
(toWTFStrings): Deleted.
(-[_WKUserStyleSheet initWithSource:whitelistedURLPatterns:blacklistedURLPatterns:forMainFrameOnly:]): Deleted.
(-[_WKUserStyleSheet whitelistedURLPatterns]): Deleted.
(-[_WKUserStyleSheet blacklistedURLPatterns]): Deleted.
2015-10-25 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix GTK+ build after r191543.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkit_web_view_run_javascript):
(resourcesStreamReadCallback):
2015-10-24 Tim Horton <timothy_horton@apple.com>
Add a way to add user style sheets to WKUserContentController
https://bugs.webkit.org/show_bug.cgi?id=150531
<rdar://problem/23191691>
Reviewed by Darin Adler.
* Shared/API/APIObject.h:
* Shared/Cocoa/APIObject.mm:
(API::Object::newObject):
Boilerplate for a new API::UserStyleSheet.
* UIProcess/API/APIUserStyleSheet.cpp: Added.
(API::generateIdentifier):
(API::UserStyleSheet::generateUniqueURL):
* UIProcess/API/APIUserStyleSheet.h: Added.
Added API::UserStyleSheet, borrowing URL generation code from API::UserScript.
* UIProcess/API/Cocoa/WKUserContentController.mm:
(-[WKUserContentController _addUserStyleSheet:]):
(-[WKUserContentController _removeAllUserStyleSheets]):
Forward add and remove-all to WebUserContentControllerProxy.
* UIProcess/API/Cocoa/WKUserContentControllerPrivate.h:
* UIProcess/API/Cocoa/_WKUserStyleSheet.h: Added.
* UIProcess/API/Cocoa/_WKUserStyleSheet.mm: Added.
(toWTFStrings):
(-[_WKUserStyleSheet initWithSource:whitelistedURLPatterns:blacklistedURLPatterns:forMainFrameOnly:]):
(-[_WKUserStyleSheet source]):
(-[_WKUserStyleSheet isForMainFrameOnly]):
(-[_WKUserStyleSheet copyWithZone:]):
(-[_WKUserStyleSheet _apiObject]):
* UIProcess/API/Cocoa/_WKUserStyleSheetInternal.h: Added.
(API::wrapper):
* WebKit2.xcodeproj/project.pbxproj:
Add the new modern API object (as SPI for now).
2015-10-24 Tim Horton <timothy_horton@apple.com>
Expose more information about the exception in WKErrorJavaScriptExceptionOccurred errors
https://bugs.webkit.org/show_bug.cgi?id=150525
Reviewed by Darin Adler.
* Scripts/webkit/messages.py:
(headers_for_type):
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<ExceptionDetails>::encode):
(IPC::ArgumentCoder<ExceptionDetails>::decode):
* Shared/WebCoreArgumentCoders.h:
Learn how to en/decode ExceptionDetails.
* UIProcess/API/C/WKPage.cpp:
(WKPageRunJavaScriptInMainFrame):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::runJavaScriptInMainFrame):
(WebKit::WebPageProxy::scriptValueCallback):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::runJavaScriptInMainFrame):
Plumb ExceptionDetails back through runJavaScriptInMainFrame, across the
process boundary.
* UIProcess/API/Cocoa/WKError.mm:
(localizedDescriptionForErrorCode):
* UIProcess/API/Cocoa/WKErrorInternal.h:
* UIProcess/API/Cocoa/WKErrorPrivate.h:
Expose localizedDescriptionForErrorCode so that WKWebView can do special
things with its error.
Add new private userInfo keys for exception info.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView evaluateJavaScript:completionHandler:]):
Fill in the NSError userInfo with the exception info.
2015-10-24 Gyuyoung Kim <gyuyoung.kim@webkit.org>
[EFL] Fix a wrong enum variable use
https://bugs.webkit.org/show_bug.cgi?id=150522
Reviewed by Csaba Osztrogonác.
* UIProcess/API/efl/EwkView.cpp:
(EwkView::requestPopupMenu):
Use kWKPopupItemTextDirectionLTR instead of EWK_TEXT_DIRECTION_LEFT_TO_RIGHT.
2015-10-24 Dan Bernstein <mitz@apple.com>
[Cocoa] _WKFormInputSession should provide access to the focused element info
https://bugs.webkit.org/show_bug.cgi?id=150512
Reviewed by Tim Horton.
* UIProcess/API/Cocoa/_WKFormInputSession.h: Added focusedElementInfo property to the
protocol.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKFormInputSession initWithContentView:focusedElementInfo:userObject:]): Added the
focusedElementInfo argument, used to initialize a new ivar.
(-[WKFormInputSession focusedElementInfo]): Added this getter for the new
_WKFormInputSession property.
(-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]):
Create the WKFocusedElementInfo unconditionally and pass it to the new WKFormInputSession
initializer.
2015-10-24 Dan Bernstein <mitz@apple.com>
[iOS] Allow clients to specify a custom input view to be used for a form input session
https://bugs.webkit.org/show_bug.cgi?id=150395
Reviewed by Tim Horton.
* UIProcess/API/Cocoa/_WKFormInputSession.h: Added customInputView property to the protocol.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKFormInputSession customInputView]): Added this getter.
(-[WKFormInputSession setCustomInputView:]): Added this setter, which reloads the input
views when the custom input view changes.
(-[WKContentView inputView]): Changed to return the custom view from the input session if
there is one.
2015-10-23 Alex Christensen <achristensen@webkit.org>
Fix CMake compile error and add correct null check
https://bugs.webkit.org/show_bug.cgi?id=150520
Reviewed by Simon Fraser.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _doAfterNextPresentationUpdate:]):
2015-10-23 Alex Christensen <achristensen@webkit.org>
Progress towards CMake on Mac
https://bugs.webkit.org/show_bug.cgi?id=150517
Reviewed by Tim Horton.
* CMakeLists.txt:
* PlatformEfl.cmake:
* PlatformGTK.cmake:
* PlatformMac.cmake:
* WebProcess/Cookies/cf/WebCookieManagerCFNet.cpp: Removed.
* WebProcess/Cookies/curl/WebCookieManagerCurl.cpp: Removed.
2015-10-23 Tim Horton <timothy_horton@apple.com>
WKView being inside WKWebView leads to weird API issues
https://bugs.webkit.org/show_bug.cgi?id=150174
* UIProcess/Cocoa/WebViewImpl.h:
Whoops.
2015-10-23 Tim Horton <timothy_horton@apple.com>
WKView being inside WKWebView leads to weird API issues
https://bugs.webkit.org/show_bug.cgi?id=150174
Reviewed by Anders Carlsson.
* UIProcess/API/mac/WKView.mm:
(-[WKView hitTest:]):
(-[WKView _processDidExit]):
(-[WKView _setThumbnailView:]):
(-[WKView _thumbnailView]):
(-[WKFlippedView isFlipped]): Deleted.
(-[WKView dealloc]): Deleted.
(-[WKView _setAcceleratedCompositingModeRootLayer:]): Deleted.
(-[WKView _acceleratedCompositingModeRootLayer]): Deleted.
(-[WKView _updateThumbnailViewLayer]): Deleted.
(-[WKView _reparentLayerTreeInThumbnailView]): Deleted.
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/Cocoa/WebViewImpl.h:
(WebKit::WebViewImpl::acceleratedCompositingRootLayer):
(WebKit::WebViewImpl::layerHostingView):
(WebKit::WebViewImpl::thumbnailView):
* UIProcess/Cocoa/WebViewImpl.mm:
(-[WKFlippedView isFlipped]):
(WebKit::WebViewImpl::~WebViewImpl):
(WebKit::WebViewImpl::setAcceleratedCompositingRootLayer):
(WebKit::WebViewImpl::setThumbnailView):
(WebKit::WebViewImpl::reparentLayerTreeInThumbnailView):
(WebKit::WebViewImpl::updateThumbnailViewLayer):
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::enterAcceleratedCompositingMode):
(WebKit::PageClientImpl::exitAcceleratedCompositingMode):
(WebKit::PageClientImpl::updateAcceleratedCompositingMode):
(WebKit::PageClientImpl::setAcceleratedCompositingRootLayer):
(WebKit::PageClientImpl::acceleratedCompositingRootLayer):
Move accelerated compositing and thumbnail view code.
2015-10-23 Tim Horton <timothy_horton@apple.com>
WKView being inside WKWebView leads to weird API issues
https://bugs.webkit.org/show_bug.cgi?id=150174
Reviewed by Anders Carlsson.
* UIProcess/API/mac/WKView.mm:
(-[WKView _superRemoveTrackingRect:]):
(-[WKView addTrackingRect:owner:userData:assumeInside:]):
(-[WKView _addTrackingRect:owner:userData:assumeInside:useTrackingNum:]):
(-[WKView _addTrackingRects:owner:userDataList:assumeInsideList:trackingNums:count:]):
(-[WKView removeTrackingRect:]):
(-[WKView _removeTrackingRects:count:]):
(-[WKView view:stringForToolTip:point:userData:]):
(-[WKView _toolTipChangedFrom:to:]):
(-[WKView _setAcceleratedCompositingModeRootLayer:]): Deleted.
(-[WKView _acceleratedCompositingModeRootLayer]): Deleted.
(takeWindowSnapshot): Deleted.
* UIProcess/Cocoa/WebViewImpl.h:
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::addTrackingRect):
(WebKit::WebViewImpl::addTrackingRectWithTrackingNum):
(WebKit::WebViewImpl::addTrackingRectsWithTrackingNums):
(WebKit::WebViewImpl::removeTrackingRect):
(WebKit::WebViewImpl::removeTrackingRects):
(WebKit::WebViewImpl::sendToolTipMouseExited):
(WebKit::WebViewImpl::sendToolTipMouseEntered):
(WebKit::WebViewImpl::stringForToolTip):
(WebKit::WebViewImpl::toolTipChanged):
Move tooltip code.
2015-10-23 Tim Horton <timothy_horton@apple.com>
WKView being inside WKWebView leads to weird API issues
https://bugs.webkit.org/show_bug.cgi?id=150174
Reviewed by Anders Carlsson.
* UIProcess/API/mac/WKView.mm:
(-[WKView _interpretKeyEvent:completionHandler:]):
(-[WKView inputContext]):
(-[WKView performKeyEquivalent:]):
(-[WKView keyDown:]):
(-[WKView _doneWithKeyEvent:eventWasHandled:]):
(-[WKView _setPluginComplexTextInputState:]): Deleted.
(-[WKView _disableComplexTextInputIfNecessary]): Deleted.
(-[WKView _handlePluginComplexTextInputKeyDown:]): Deleted.
(-[WKView _tryHandlePluginComplexTextInputKeyDown:]): Deleted.
(-[WKView _tryPostProcessPluginComplexTextInputKeyDown:]): Deleted.
(-[WKView _pluginFocusOrWindowFocusChanged:pluginComplexTextInputIdentifier:]): Deleted.
(-[WKView _setPluginComplexTextInputState:pluginComplexTextInputIdentifier:]): Deleted.
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/Cocoa/WebViewImpl.h:
(WebKit::WebViewImpl::pluginComplexTextInputState):
(WebKit::WebViewImpl::pluginComplexTextInputIdentifier):
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::setPluginComplexTextInputState):
(WebKit::WebViewImpl::setPluginComplexTextInputStateAndIdentifier):
(WebKit::WebViewImpl::disableComplexTextInputIfNecessary):
(WebKit::WebViewImpl::handlePluginComplexTextInputKeyDown):
(WebKit::WebViewImpl::tryHandlePluginComplexTextInputKeyDown):
(WebKit::WebViewImpl::pluginFocusOrWindowFocusChanged):
(WebKit::WebViewImpl::tryPostProcessPluginComplexTextInputKeyDown):
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::pluginFocusOrWindowFocusChanged):
(WebKit::PageClientImpl::setPluginComplexTextInputState):
Move a few more methods.
2015-10-23 Eric Carlson <eric.carlson@apple.com>
[MediaStream] Fix UserMediaPermissionRequestProxy::invalidate
https://bugs.webkit.org/show_bug.cgi?id=150503
<rdar://problem/23235386>
Reviewed by Dean Jackson.
* UIProcess/UserMediaPermissionRequestProxy.cpp:
(WebKit::UserMediaPermissionRequestProxy::UserMediaPermissionRequestProxy): m_manager is a pointer.
(WebKit::UserMediaPermissionRequestProxy::allow): Return early if m_manager is null, clear it after
calling the manager.
(WebKit::UserMediaPermissionRequestProxy::deny): Ditto.
(WebKit::UserMediaPermissionRequestProxy::invalidate): Clear m_manager.
* UIProcess/UserMediaPermissionRequestProxy.h: Change m_manager from a reference to a
pointer so it can be cleared.
2015-10-23 Claudio Saavedra <csaavedra@igalia.com>
[GTK] Minor web editor fixes
https://bugs.webkit.org/show_bug.cgi?id=150501
Reviewed by Carlos Garcia Campos.
* UIProcess/gtk/KeyBindingTranslator.cpp: Remove
"MoveParagraphForward/Backward" as these commands do not exist in
WebKit (anymore?).
* WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
(WebKit::WebEditorClient::executePendingEditorCommands):
Editor::Command can take a String, no need to convert to a C char.
2015-10-23 Timothy Horton <timothy_horton@apple.com>
Fix the build by unapplying review comments.
* UIProcess/Cocoa/WebViewImpl.h:
2015-10-23 Tim Horton <timothy_horton@apple.com>
WKView being inside WKWebView leads to weird API issues
https://bugs.webkit.org/show_bug.cgi?id=150174
Reviewed by Anders Carlsson.
* UIProcess/API/mac/WKView.mm:
(-[WKView renewGState]):
(-[WKView writeSelectionToPasteboard:types:]):
(-[WKView centerSelectionInVisibleArea:]):
(-[WKView scrollWheel:]):
(-[WKView swipeWithEvent:]):
(-[WKView mouseMoved:]):
(-[WKView mouseDown:]):
(-[WKView mouseUp:]):
(-[WKView mouseDragged:]):
(-[WKView pressureChangeWithEvent:]):
(-[WKView acceptsFirstMouse:]):
(-[WKView shouldDelayWindowOrderingForEvent:]):
(-[WKView performKeyEquivalent:]):
(-[WKView keyUp:]):
(-[WKView keyDown:]):
(-[WKView flagsChanged:]):
(-[WKView _superQuickLookWithEvent:]):
(-[WKView _addFontPanelObserver]):
(-[WKView viewWillMoveToWindow:]):
(-[WKView viewDidMoveToWindow]):
(-[WKView viewDidChangeBackingProperties]):
(-[WKView enableAccessibilityIfNecessary]):
(-[WKView quickLookWithEvent:]):
(-[WKView _colorSpace]):
(-[WKView _didRelaunchProcess]):
(-[WKView _setTextIndicator:]):
(-[WKView _setTextIndicator:withLifetime:]):
(-[WKView _clearTextIndicatorWithAnimation:]):
(-[WKView _setTextIndicatorAnimationProgress:]):
(-[WKView initWithFrame:processPool:configuration:webView:]):
(-[WKView _didPerformImmediateActionHitTest:contentPreventsDefault:userData:]):
(-[WKView _internalImmediateActionAnimationControllerForHitTestResult:withType:userData:]):
(-[WKView _internalPrepareForImmediateActionAnimation]):
(-[WKView _internalCancelImmediateActionAnimation]):
(-[WKView _internalCompleteImmediateActionAnimation]):
(-[WKView _internalDismissContentRelativeChildWindowsWithAnimation:]):
(-[WKView beginDeferringViewInWindowChanges]):
(-[WKView endDeferringViewInWindowChanges]):
(-[WKView endDeferringViewInWindowChangesSync]):
(-[WKView _prepareForMoveToWindow:withCompletionHandler:]):
(-[WKView isDeferringViewInWindowChanges]):
(-[WKView allowsLinkPreview]):
(-[WKView setAllowsLinkPreview:]):
(-[WKView _setIgnoresAllEvents:]):
(-[WKView _setIgnoresNonWheelMouseEvents:]):
(-[WKView _setIgnoresNonWheelEvents:]):
(-[WKView _ignoresNonWheelEvents]):
(-[WKView _ignoresAllEvents]):
(-[WKView _setOverrideDeviceScaleFactor:]):
(-[WKView _overrideDeviceScaleFactor]):
(-[WKView _setTopContentInset:]):
(-[WKView _topContentInset]):
(-[WKView _dismissContentRelativeChildWindows]):
(-[WKView _dismissContentRelativeChildWindowsWithAnimation:]):
(-[WKView _setAutomaticallyAdjustsContentInsets:]):
(-[WKView _automaticallyAdjustsContentInsets]):
(-[WKWindowVisibilityObserver initWithView:]): Deleted.
(-[WKWindowVisibilityObserver startObserving:]): Deleted.
(-[WKWindowVisibilityObserver stopObserving:]): Deleted.
(-[WKWindowVisibilityObserver _windowDidOrderOnScreen:]): Deleted.
(-[WKWindowVisibilityObserver _windowDidOrderOffScreen:]): Deleted.
(-[WKView dealloc]): Deleted.
(-[WKView _updateWindowAndViewFrames]): Deleted.
(-[WKView updateFontPanelIfNeeded]): Deleted.
(-[WKView _selectionChanged]): Deleted.
(-[WKView addWindowObserversForWindow:]): Deleted.
(-[WKView removeWindowObservers]): Deleted.
(-[WKView doWindowDidChangeScreen]): Deleted.
(-[WKView _windowDidBecomeKey:]): Deleted.
(-[WKView _windowDidChangeScreen:]): Deleted.
(-[WKView _windowDidChangeLayerHosting:]): Deleted.
(-[WKView _windowDidResignKey:]): Deleted.
(-[WKView _windowDidMiniaturize:]): Deleted.
(-[WKView _windowDidDeminiaturize:]): Deleted.
(-[WKView _windowDidMove:]): Deleted.
(-[WKView _windowDidResize:]): Deleted.
(-[WKView _windowDidOrderOffScreen:]): Deleted.
(-[WKView _windowDidOrderOnScreen:]): Deleted.
(-[WKView _windowDidChangeBackingProperties:]): Deleted.
(-[WKView _windowDidChangeOcclusionState:]): Deleted.
(-[WKView _prepareForDictionaryLookup]): Deleted.
(-[WKView _dictionaryLookupPopoverWillClose:]): Deleted.
(-[WKView _accessibilityRegisterUIProcessTokens]): Deleted.
(-[WKView _postFakeMouseMovedEventForFlagsChangedEvent:]): Deleted.
(-[WKView _intrinsicDeviceScaleFactor]): Deleted.
(-[WKView _preferencesDidChange]): Deleted.
(-[WKView _targetWindowForMovePreparation]): Deleted.
(-[WKView _updateContentInsetsIfAutomatic]): Deleted.
(-[WKView observeValueForKeyPath:ofObject:change:context:]): Deleted.
(-[WKView _dispatchSetTopContentInset]): Deleted.
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/Cocoa/WebViewImpl.h:
(WebKit::WebViewImpl::automaticallyAdjustsContentInsets):
(WebKit::WebViewImpl::topContentInset):
(WebKit::WebViewImpl::overrideDeviceScaleFactor):
(WebKit::WebViewImpl::isDeferringViewInWindowChanges):
(WebKit::WebViewImpl::targetWindowForMovePreparation):
(WebKit::WebViewImpl::lastPressureEvent):
(WebKit::WebViewImpl::allowsLinkPreview):
(WebKit::WebViewImpl::ignoresNonWheelEvents):
(WebKit::WebViewImpl::ignoresAllEvents):
(WebKit::WebViewImpl::createWeakPtr):
* UIProcess/Cocoa/WebViewImpl.mm:
(SOFT_LINK_CONSTANT_MAY_FAIL):
(-[WKWindowVisibilityObserver initWithView:impl:]):
(-[WKWindowVisibilityObserver dealloc]):
(-[WKWindowVisibilityObserver startObserving:]):
(-[WKWindowVisibilityObserver stopObserving:]):
(-[WKWindowVisibilityObserver startObservingFontPanel]):
(-[WKWindowVisibilityObserver startObservingLookupDismissal]):
(-[WKWindowVisibilityObserver _windowDidOrderOnScreen:]):
(-[WKWindowVisibilityObserver _windowDidOrderOffScreen:]):
(-[WKWindowVisibilityObserver _windowDidBecomeKey:]):
(-[WKWindowVisibilityObserver _windowDidResignKey:]):
(-[WKWindowVisibilityObserver _windowDidMiniaturize:]):
(-[WKWindowVisibilityObserver _windowDidDeminiaturize:]):
(-[WKWindowVisibilityObserver _windowDidMove:]):
(-[WKWindowVisibilityObserver _windowDidResize:]):
(-[WKWindowVisibilityObserver _windowDidChangeBackingProperties:]):
(-[WKWindowVisibilityObserver _windowDidChangeScreen:]):
(-[WKWindowVisibilityObserver _windowDidChangeLayerHosting:]):
(-[WKWindowVisibilityObserver _windowDidChangeOcclusionState:]):
(-[WKWindowVisibilityObserver observeValueForKeyPath:ofObject:change:context:]):
(-[WKWindowVisibilityObserver _dictionaryLookupPopoverWillClose:]):
(-[WKEditCommandObjC initWithWebEditCommandProxy:]):
(-[WKEditCommandObjC command]):
(-[WKEditorUndoTargetObjC undoEditing:]):
(-[WKEditorUndoTargetObjC redoEditing:]):
(WebKit::WebViewImpl::WebViewImpl):
(WebKit::WebViewImpl::~WebViewImpl):
(WebKit::WebViewImpl::becomeFirstResponder):
(WebKit::WebViewImpl::resignFirstResponder):
(WebKit::WebViewImpl::renewGState):
(WebKit::WebViewImpl::updateWindowAndViewFrames):
(WebKit::WebViewImpl::setAutomaticallyAdjustsContentInsets):
(WebKit::WebViewImpl::updateContentInsetsIfAutomatic):
(WebKit::WebViewImpl::setTopContentInset):
(WebKit::WebViewImpl::dispatchSetTopContentInset):
(WebKit::WebViewImpl::setOverrideDeviceScaleFactor):
(WebKit::WebViewImpl::intrinsicDeviceScaleFactor):
(WebKit::WebViewImpl::windowDidOrderOffScreen):
(WebKit::WebViewImpl::windowDidOrderOnScreen):
(WebKit::WebViewImpl::windowDidBecomeKey):
(WebKit::WebViewImpl::windowDidResignKey):
(WebKit::WebViewImpl::windowDidMiniaturize):
(WebKit::WebViewImpl::windowDidDeminiaturize):
(WebKit::WebViewImpl::windowDidMove):
(WebKit::WebViewImpl::windowDidResize):
(WebKit::WebViewImpl::windowDidChangeBackingProperties):
(WebKit::WebViewImpl::windowDidChangeScreen):
(WebKit::WebViewImpl::windowDidChangeLayerHosting):
(WebKit::WebViewImpl::windowDidChangeOcclusionState):
(WebKit::WebViewImpl::viewWillMoveToWindow):
(WebKit::WebViewImpl::viewDidMoveToWindow):
(WebKit::WebViewImpl::viewDidChangeBackingProperties):
(WebKit::WebViewImpl::postFakeMouseMovedEventForFlagsChangedEvent):
(WebKit::WebViewImpl::colorSpace):
(WebKit::WebViewImpl::beginDeferringViewInWindowChanges):
(WebKit::WebViewImpl::endDeferringViewInWindowChanges):
(WebKit::WebViewImpl::endDeferringViewInWindowChangesSync):
(WebKit::WebViewImpl::prepareForMoveToWindow):
(WebKit::WebViewImpl::pressureChangeWithEvent):
(WebKit::WebViewImpl::isEditable):
(WebKit::WebViewImpl::executeEditCommand):
(WebKit::WebViewImpl::registerEditCommand):
(WebKit::WebViewImpl::clearAllEditCommands):
(WebKit::WebViewImpl::writeSelectionToPasteboard):
(WebKit::WebViewImpl::centerSelectionInVisibleArea):
(WebKit::WebViewImpl::selectionDidChange):
(WebKit::WebViewImpl::startObservingFontPanel):
(WebKit::WebViewImpl::updateFontPanelIfNeeded):
(WebKit::WebViewImpl::preferencesDidChange):
(WebKit::WebViewImpl::setTextIndicator):
(WebKit::WebViewImpl::clearTextIndicatorWithAnimation):
(WebKit::WebViewImpl::setTextIndicatorAnimationProgress):
(WebKit::WebViewImpl::dismissContentRelativeChildWindows):
(WebKit::WebViewImpl::quickLookWithEvent):
(WebKit::WebViewImpl::prepareForDictionaryLookup):
(WebKit::WebViewImpl::setAllowsLinkPreview):
(WebKit::WebViewImpl::immediateActionAnimationControllerForHitTestResult):
(WebKit::WebViewImpl::prepareForImmediateActionAnimation):
(WebKit::WebViewImpl::cancelImmediateActionAnimation):
(WebKit::WebViewImpl::completeImmediateActionAnimation):
(WebKit::WebViewImpl::setIgnoresNonWheelEvents):
(WebKit::WebViewImpl::setIgnoresAllEvents):
(WebKit::WebViewImpl::accessibilityRegisterUIProcessTokens):
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::activeWindow):
(WebKit::PageClientImpl::preferencesDidChange):
(WebKit::PageClientImpl::registerEditCommand):
(WebKit::PageClientImpl::clearAllEditCommands):
(WebKit::PageClientImpl::selectionDidChange):
(WebKit::PageClientImpl::didPerformDictionaryLookup):
(-[WKEditCommandObjC initWithWebEditCommandProxy:]): Deleted.
(-[WKEditCommandObjC command]): Deleted.
(-[WKEditorUndoTargetObjC undoEditing:]): Deleted.
(-[WKEditorUndoTargetObjC redoEditing:]): Deleted.
(WebKit::PageClientImpl::PageClientImpl): Deleted.
Move more things to WebViewImpl.
This also introduces an unfortunate pattern that is required for things which
clients override on WKView, where we have a flow like this:
- somebody (PageClient, etc.) calls WebViewImpl::x
- WebViewImpl::x does nothing except call [WKView _x]
- [WKView _x] calls WebViewImpl::xFromViewOnly, which does the real work
As long as no clients call the -FromViewOnly variant, this will mean that
all callers are bottlenecked through the overridable WKView method.
How this works with WKWebView, I am not sure yet.
* UIProcess/mac/WKImmediateActionController.h:
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController initWithPage:view:viewImpl:recognizer:]):
(-[WKImmediateActionController willDestroyView:]):
(-[WKImmediateActionController immediateActionRecognizerWillPrepare:]):
(-[WKImmediateActionController immediateActionRecognizerDidCancelAnimation:]):
(-[WKImmediateActionController immediateActionRecognizerDidCompleteAnimation:]):
(-[WKImmediateActionController menuItem:viewAtScreenPoint:]):
(-[WKImmediateActionController menuItem:previewItemAtPoint:]):
(-[WKImmediateActionController menuItem:itemFrameForPoint:]):
(-[WKImmediateActionController menuItem:maxSizeForPoint:]):
(-[WKImmediateActionController _animationControllerForDataDetectedText]):
(-[WKImmediateActionController _animationControllerForDataDetectedLink]):
(-[WKImmediateActionController _animationControllerForText]):
(-[WKImmediateActionController initWithPage:view:recognizer:]): Deleted.
Keep a generic NSView, use the WebViewImpl for WK*View related things.
2015-10-22 Joonghun Park <jh718.park@samsung.com>
[GTK] Fix build break since r191471
https://bugs.webkit.org/show_bug.cgi?id=150487
Reviewed by Žan Doberšek.
* UIProcess/API/gtk/WebKitContextMenuClient.cpp:
* UIProcess/gtk/WebContextMenuProxyGtk.cpp:
(WebKit::WebContextMenuProxyGtk::populate):
2015-10-22 Gyuyoung Kim <gyuyoung.kim@webkit.org>
[EFL] Build break since r191472 and r191473
https://bugs.webkit.org/show_bug.cgi?id=150485
Unreviewed build fix.
* CMakeLists.txt: Remove icu include path and move page include path.
2015-10-22 Sam Weinig <sam@webkit.org>
Navigations on the same host (but with different schemes and ports) should not trigger universal links
<rdar://problem/22811325>
https://bugs.webkit.org/show_bug.cgi?id=150481
Reviewed by Dan Bernstein.
Update the policy for following universal links to only take host into consideration.
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageUIClient):
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::UIClient::createNewPage):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::decidePolicyForNewWindowAction):
(WebKit::WebPageProxy::createNewPage):
(WebKit::WebPageProxy::showPage):
2015-10-22 Anders Carlsson <andersca@apple.com>
Simplify menu creation
https://bugs.webkit.org/show_bug.cgi?id=150476
Reviewed by Tim Horton.
Instead of creating vectors of NSMenuItem objects, just simply build the menu recursively.
* UIProcess/mac/WebContextMenuProxyMac.h:
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::createContextMenuFromItems):
(WebKit::WebContextMenuProxyMac::createContextMenuItem):
(WebKit::WebContextMenuProxyMac::showContextMenu):
(WebKit::populateNSMenu): Deleted.
(WebKit::nsMenuItem): Deleted.
(WebKit::nsMenuItemVector): Deleted.
2015-10-22 Carlos Garcia Campos <cgarcia@igalia.com>
ERROR: Unhandled web process message 'StorageAreaMap:DispatchStorageEvent'
https://bugs.webkit.org/show_bug.cgi?id=150315
Reviewed by Andreas Kling.
It was introduced in r184930, that keeps the session storage area
maps alive in the UI process when they are destroyed by the web
process. The problem is that we also keep the listeners, so that
events are also dispatched to the listeners of destroyed areas,
and the message handlers were removed in the web process.
* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::createTransientLocalStorageMap): Add a
listener for the new storage map ID when the map is reused.
(WebKit::StorageManager::destroyStorageMap): Always remove
listeners of destroyed maps.
2015-10-22 Tim Horton <timothy_horton@apple.com>
Add a SPI variant of loadData that accepts user data to WKWebView
https://bugs.webkit.org/show_bug.cgi?id=150475
Reviewed by Anders Carlsson.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _loadData:MIMEType:characterEncodingName:baseURL:userData:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
2015-10-22 Alex Christensen <achristensen@webkit.org>
Progress towards CMake on Mac
https://bugs.webkit.org/show_bug.cgi?id=150466
Reviewed by Chris Dumez.
* CMakeLists.txt:
* PlatformMac.cmake:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2015-10-22 Anders Carlsson <andersca@apple.com>
NativeContextMenuItem isn't needed anymore, remove it
https://bugs.webkit.org/show_bug.cgi?id=150473
Reviewed by Tim Horton.
* PlatformEfl.cmake:
* PlatformGTK.cmake:
* Shared/NativeContextMenuItem.h: Removed.
(WebKit::NativeContextMenuItem::~NativeContextMenuItem): Deleted.
(WebKit::NativeContextMenuItem::nsMenuItem): Deleted.
* Shared/WebContextMenuItem.cpp:
(WebKit::WebContextMenuItem::WebContextMenuItem): Deleted.
* Shared/WebContextMenuItem.h:
(WebKit::WebContextMenuItem::create): Deleted.
(WebKit::WebContextMenuItem::nativeContextMenuItem): Deleted.
* Shared/efl/NativeContextMenuItemEfl.cpp: Removed.
(WebKit::NativeContextMenuItem::NativeContextMenuItem): Deleted.
* Shared/gtk/NativeContextMenuItemGtk.cpp: Removed.
(WebKit::NativeContextMenuItem::NativeContextMenuItem): Deleted.
* Shared/mac/NativeContextMenuItem.mm: Removed.
(WebKit::NativeContextMenuItem::NativeContextMenuItem): Deleted.
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::nsMenuItem): Deleted.
* WebKit2.xcodeproj/project.pbxproj:
2015-10-22 Anders Carlsson <andersca@apple.com>
CTTE WebContextMenuItemData
https://bugs.webkit.org/show_bug.cgi?id=150471
Reviewed by Tim Horton.
* Shared/API/c/WKContextMenuItem.cpp:
(WKContextMenuItemGetTag):
(WKContextMenuItemGetType):
(WKContextMenuItemCopyTitle):
(WKContextMenuItemGetEnabled):
(WKContextMenuItemGetChecked):
* Shared/WebContextMenuItem.cpp:
(WebKit::WebContextMenuItem::create):
* Shared/WebContextMenuItem.h:
(WebKit::WebContextMenuItem::data):
* UIProcess/API/C/WKPage.cpp:
(WKPageSelectContextMenuItem):
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::nsMenuItem):
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageClickMenuItem):
* WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
(WebKit::InjectedBundlePageContextMenuClient::getCustomMenuFromDefaultItems):
2015-10-22 Anders Carlsson <andersca@apple.com>
Handle nil menu items.
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::nsMenuItemVector):
2015-10-22 Anders Carlsson <andersca@apple.com>
Wait to convert the share menu item to a real share menu until after calling out to the client
https://bugs.webkit.org/show_bug.cgi?id=150465
Reviewed by Tim Horton.
This will let us simplify more code in upcoming patches.
* UIProcess/mac/WebContextMenuProxyMac.h:
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::nsMenuItem):
(WebKit::nsMenuItemVector):
(WebKit::WebContextMenuProxyMac::showContextMenu):
2015-10-22 Myles C. Maxfield <mmaxfield@apple.com>
[Cocoa] Migrate WKSetPatternPhaseInUserSpace() and WKGetUserToBaseCTM() from WKSI
https://bugs.webkit.org/show_bug.cgi?id=150460
Reviewed by Tim Horton.
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface): Deleted.
2015-10-22 Alex Christensen <achristensen@webkit.org>
Initial NSURLSession WebResourceLoader implementation
https://bugs.webkit.org/show_bug.cgi?id=150355
Reviewed by Antti Koivisto.
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
(WebKit::NetworkConnectionToWebProcess::cookiesForDOM):
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::~NetworkResourceLoader):
(WebKit::NetworkResourceLoader::startNetworkLoad):
(WebKit::NetworkResourceLoader::setDefersLoading):
(WebKit::NetworkResourceLoader::cleanup):
(WebKit::NetworkResourceLoader::didConvertHandleToDownload):
(WebKit::NetworkResourceLoader::abort):
(WebKit::NetworkResourceLoader::willPerformHTTPRedirection):
(WebKit::NetworkResourceLoader::didReceiveChallenge):
(WebKit::NetworkResourceLoader::didReceiveResponse):
(WebKit::NetworkResourceLoader::didReceiveData):
(WebKit::NetworkResourceLoader::didCompleteWithError):
(WebKit::NetworkResourceLoader::didReceiveResponseAsync):
(WebKit::NetworkResourceLoader::willSendRequestAsync):
(WebKit::NetworkResourceLoader::continueWillSendRequest):
(WebKit::NetworkResourceLoader::continueDidReceiveResponse):
(WebKit::NetworkResourceLoader::didSendData):
(WebKit::NetworkResourceLoader::receivedCancellation):
(WebKit::NetworkResourceLoader::startBufferingTimerIfNeeded):
(WebKit::NetworkResourceLoader::bufferingTimerFired):
(WebKit::NetworkResourceLoader::validateCacheEntry):
(WebKit::NetworkResourceLoader::sendAbortingOnFailure):
(WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpaceAsync):
(WebKit::NetworkResourceLoader::continueCanAuthenticateAgainstProtectionSpace):
(WebKit::NetworkResourceLoader::supportsDataArray):
* NetworkProcess/NetworkResourceLoader.h:
(WebKit::NetworkResourceLoader::create):
(WebKit::NetworkResourceLoader::currentRequest):
(WebKit::NetworkResourceLoader::handle):
* NetworkProcess/NetworkSession.h: Added.
(WebKit::NetworkSessionTaskClient::~NetworkSessionTaskClient):
(WebKit::NetworkingDataTask::client):
(WebKit::NetworkingDataTask::clearClient):
(WebKit::NetworkSession::~NetworkSession):
* NetworkProcess/cocoa/NetworkSessionCocoa.mm: Added.
(toNSURLSessionResponseDisposition):
(toNSURLSessionAuthChallengeDisposition):
(-[NetworkSessionDelegate initWithNetworkSession:]):
(-[NetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
(-[NetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
(-[NetworkSessionDelegate URLSession:task:didCompleteWithError:]):
(-[NetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
(-[NetworkSessionDelegate URLSession:dataTask:didReceiveData:]):
(WebKit::NetworkSession::create):
(WebKit::NetworkSession::singleton):
(WebKit::configurationForType):
(WebKit::NetworkSession::NetworkSession):
(WebKit::NetworkSession::createDataTaskWithRequest):
(WebKit::NetworkSession::dataTaskForIdentifier):
(WebKit::NetworkingDataTask::NetworkingDataTask):
(WebKit::NetworkingDataTask::~NetworkingDataTask):
(WebKit::NetworkingDataTask::suspend):
(WebKit::NetworkingDataTask::resume):
(WebKit::NetworkingDataTask::taskIdentifier):
* NetworkProcess/mac/NetworkResourceLoaderMac.mm:
(WebKit::NetworkResourceLoader::willCacheResponseAsync):
* WebKit2.xcodeproj/project.pbxproj:
* config.h:
2015-10-22 Philippe Normand <pnormand@igalia.com>
Unreviewed, GTK build fix for disabled redirected XComposite window support.
* UIProcess/API/gtk/WebKitWebViewBase.cpp: Add USE(REDIRECTED_XCOMPOSITE_WINDOW) guards.
* UIProcess/DrawingAreaProxyImpl.h: Mark virtual methods as override to avoid compilation warnings.
2015-10-22 Wenson Hsieh <wenson_hsieh@apple.com>
Implement touch-action: manipulation; for iOS
https://bugs.webkit.org/show_bug.cgi?id=149854
<rdar://problem/23017145>
Reviewed by Benjamin Poulain.
Implements the manipulation value for the CSS property touch-action. Performs hit-testing upon receiving a potential
tap to determine whether to disable double-tap gesture recognition over the duration of the tap. If so, sends a message
from the web process to the UI process indicating that double-tapping should be disabled, allowing single taps to
avoid the delay.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::potentialTapAtPosition):
2015-10-22 Ryosuke Niwa <rniwa@webkit.org>
REGRESSION (r181972): Scroll position changes to top of youtube page when switching tabs
https://bugs.webkit.org/show_bug.cgi?id=150428
Reviewed by Antti Koivisto.
Call updateFocusAppearance with RevealMode::DoNotReveal to avoid revealing the focused element.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::restoreSelectionInFocusedEditableElement):
2015-10-22 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix a crash in GTk+ after r191402.
Since r191402 WebContextMenuProxy is no longer refcounted, and
std::unique_ptr is used instead. This means that when we show the
context menu for the second time in a web view, a new
WebContextMenuProxy is created and the previous one is
destroyed. We were setting the active context menu of the WebView
in the constructor of WebContextMenuProxy, and unsetting it in the
destructor. Now the constructor of the new WebContextMenuProxy
happens before the destructor of the current one that unsets the
WebView active context menu. This patch simply makes the web view
unset its active context menu when it's unmapped and a new one
hasn't been set.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(activeContextMenuUnmapped):
(webkitWebViewBaseSetActiveContextMenuProxy):
* UIProcess/gtk/WebContextMenuProxyGtk.cpp:
(WebKit::WebContextMenuProxyGtk::~WebContextMenuProxyGtk):
2015-10-22 Hunseop Jeong <hs85.jeong@samsung.com>
[GTK] Try to fix the build after r191402.
https://bugs.webkit.org/show_bug.cgi?id=150435
Reviewed by Carlos Garcia Campos.
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::createPopupMenuProxy):
(WebKit::PageClientImpl::createContextMenuProxy):
(WebKit::PageClientImpl::createColorPicker):
* UIProcess/API/gtk/PageClientImpl.h:
* UIProcess/gtk/WebContextMenuProxyGtk.cpp:
(WebKit::WebContextMenuProxyGtk::populate):
(WebKit::WebContextMenuProxyGtk::show):
(WebKit::WebContextMenuProxyGtk::WebContextMenuProxyGtk):
(WebKit::WebContextMenuProxyGtk::~WebContextMenuProxyGtk):
(WebKit::WebContextMenuProxyGtk::menuPositionFunction):
(WebKit::WebContextMenuProxyGtk::showContextMenu): Deleted.
(WebKit::WebContextMenuProxyGtk::hideContextMenu): Deleted.
(WebKit::WebContextMenuProxyGtk::cancelTracking): Deleted.
* UIProcess/gtk/WebContextMenuProxyGtk.h:
(WebKit::WebContextMenuProxyGtk::gtkMenu):
(WebKit::WebContextMenuProxyGtk::create): Deleted.
2015-10-21 Gyuyoung Kim <gyuyoung.kim@webkit.org>
Unreviewed EFL build fix. Remove customizeMenu implementation.
* WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
(WebKit::WebContextMenuClient::customizeMenu): Deleted.
2015-10-21 Alex Christensen <achristensen@webkit.org>
Speculative EFL build fix.
* WebProcess/WebCoreSupport/WebContextMenuClient.h:
Remove another customizeMenu call.
2015-10-21 Gyuyoung Kim <gyuyoung.kim@webkit.org>
[EFL][GTK][WK2] Fix build break since r191402, r191401
https://bugs.webkit.org/show_bug.cgi?id=150432
Unreviewed EFL and GTK build fix.
* CMakeLists.txt:
* UIProcess/CoordinatedGraphics/WebView.cpp:
(WebKit::WebView::createContextMenuProxy):
* UIProcess/CoordinatedGraphics/WebView.h:
* UIProcess/efl/WebContextMenuProxyEfl.cpp:
(WebKit::WebContextMenuProxyEfl::show):
* UIProcess/efl/WebContextMenuProxyEfl.h:
(WebKit::WebContextMenuProxyEfl::create): Deleted.
* UIProcess/efl/WebViewEfl.cpp:
(WebKit::WebViewEfl::createContextMenuProxy):
* UIProcess/efl/WebViewEfl.h:
* WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
(WebKit::WebContextMenuClient::customizeMenu):
* WebProcess/WebCoreSupport/WebContextMenuClient.h:
2015-10-21 Anders Carlsson <andersca@apple.com>
Get rid of WebContextMenuClient::customizeMenu, it's no longer used
https://bugs.webkit.org/show_bug.cgi?id=150427
Reviewed by Tim Horton.
* WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
(WebKit::WebContextMenuClient::customizeMenu): Deleted.
* WebProcess/WebCoreSupport/WebContextMenuClient.h:
2015-10-21 Tim Horton <timothy_horton@apple.com>
API-ify the FindMatches client
https://bugs.webkit.org/show_bug.cgi?id=150422
Reviewed by Anders Carlsson.
* UIProcess/API/APIFindMatchesClient.h: Renamed from Source/WebKit2/UIProcess/WebFindClient.h.
(API::FindMatchesClient::~FindMatchesClient):
(API::FindMatchesClient::didFindStringMatches):
(API::FindMatchesClient::didGetImageForMatchResult):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageFindMatchesClient):
* UIProcess/WebFindClient.cpp: Removed.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::setFindMatchesClient):
(WebKit::WebPageProxy::close):
(WebKit::WebPageProxy::didGetImageForFindMatch):
(WebKit::WebPageProxy::didFindStringMatches):
(WebKit::WebPageProxy::initializeFindMatchesClient): Deleted.
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::findMatchesClient):
* WebKit2.xcodeproj/project.pbxproj:
2015-10-21 Enrica Casucci <enrica@apple.com>
WebProcess crashes when accessibility bundle is not found.
https://bugs.webkit.org/show_bug.cgi?id=150414
Reviewed by Dan Bernstein.
The uninitialized pointer to NSError causes the print function to crash.
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::registerWithAccessibility):
2015-10-21 Anders Carlsson <andersca@apple.com>
Move services menu handling out into a separate function
https://bugs.webkit.org/show_bug.cgi?id=150420
Reviewed by Tim Horton.
* UIProcess/mac/WebContextMenuProxyMac.h:
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::showServicesMenu):
(WebKit::WebContextMenuProxyMac::show):
(WebKit::WebContextMenuProxyMac::showContextMenu):
(WebKit::WebContextMenuProxyMac::populate): Deleted.
2015-10-21 Wenson Hsieh <wenson_hsieh@apple.com>
Single tapping clickable elements in unscalable pages should show a tap highlight
https://bugs.webkit.org/show_bug.cgi?id=150382
Reviewed by Simon Fraser.
When the double tap gesture recognizer is disabled ahead of time (as in the case of unscalable pages) the tap is
committed before the geometries come in. To fix this, we introduce a flag that allows the single tap to be
committed before the tap highlight arrives. This allows the tap highlight to be immediately animated when receiving
the tap highlight geometries only in the case where double tapping is disabled when recognizing the single tap.
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView setupInteraction]):
(-[WKContentView cleanupInteraction]):
(-[WKContentView _didGetTapHighlightForRequest:color:quads:topLeftRadius:topRightRadius:bottomLeftRadius:bottomRightRadius:]):
(-[WKContentView _singleTapRecognized:]):
(-[WKContentView _singleTapCommited:]):
2015-10-21 Anders Carlsson <andersca@apple.com>
Get rid of useBinaryEncoding from WKPageGetContentsAsMHTMLData
https://bugs.webkit.org/show_bug.cgi?id=150417
Reviewed by Tim Horton.
The useBinaryEncoding parameter is always false, so just get rid of it.
* UIProcess/API/C/WKPage.cpp:
(WKPageGetContentsAsMHTMLData):
* UIProcess/API/C/WKPage.h:
* UIProcess/API/efl/ewk_view.cpp:
(ewk_view_page_contents_get):
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkit_web_view_save):
(webkit_web_view_save_to_file):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::getContentsAsMHTMLData):
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::getContentsAsMHTMLData):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
2015-10-21 Anders Carlsson <andersca@apple.com>
WebContextMenuProxyMac::setupServicesMenu doesn't need to take a context parameter
https://bugs.webkit.org/show_bug.cgi?id=150418
Reviewed by Tim Horton.
* UIProcess/mac/WebContextMenuProxyMac.h:
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::setupServicesMenu):
(WebKit::WebContextMenuProxyMac::populate):
2015-10-21 Anders Carlsson <andersca@apple.com>
WebContextMenuProxy doesn't have to be ref-counted
https://bugs.webkit.org/show_bug.cgi?id=150415
Reviewed by Tim Horton.
Change WebContextMenuProxy to not inherit from RefCounted. Instead of using RefPtr, use std::unique_ptr.
Get rid of cancelTracking and hideContextMenu and dismiss the menu whenever the menu proxy is destroyed.
Also, rename showContextMenu to show.
* UIProcess/PageClient.h:
* UIProcess/WebContextMenuProxy.h:
(WebKit::WebContextMenuProxy::cancelTracking): Deleted.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::close):
(WebKit::WebPageProxy::internalShowContextMenu):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::createContextMenuProxy):
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::createContextMenuProxy):
* UIProcess/mac/WebContextMenuProxyMac.h:
(WebKit::WebContextMenuProxyMac::create): Deleted.
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::~WebContextMenuProxyMac):
(WebKit::WebContextMenuProxyMac::show):
(WebKit::WebContextMenuProxyMac::showContextMenu): Deleted.
(WebKit::WebContextMenuProxyMac::hideContextMenu): Deleted.
(WebKit::WebContextMenuProxyMac::cancelTracking): Deleted.
2015-10-21 Anders Carlsson <andersca@apple.com>
Stop using a popup menu button cell(!) for context menus
https://bugs.webkit.org/show_bug.cgi?id=150413
Reviewed by Tim Horton.
Just use a regular NSMenu. Also, have the service menu code path store the service menu
in the same member variable.
* UIProcess/mac/WebContextMenuProxyMac.h:
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::setupServicesMenu):
(WebKit::WebContextMenuProxyMac::clearServicesMenu):
(WebKit::WebContextMenuProxyMac::populate):
(WebKit::WebContextMenuProxyMac::showContextMenu):
(WebKit::WebContextMenuProxyMac::hideContextMenu):
(WebKit::WebContextMenuProxyMac::cancelTracking):
(WebKit::WebContextMenuProxyMac::~WebContextMenuProxyMac): Deleted.
2015-10-21 Chris Dumez <cdumez@apple.com>
Add assertions to NetworkCache::Entry constructor to make sure a key's type is "resource"
https://bugs.webkit.org/show_bug.cgi?id=150369
Reviewed by Antti Koivisto.
Add assertions to NetworkCache::Entry constructor to make sure a key's
type is "resource" now that the NetworkCache storage supports other
types of entries.
* NetworkProcess/cache/NetworkCacheEntry.cpp:
(WebKit::NetworkCache::Entry::Entry):
2015-10-21 Carlos Garcia Campos <cgarcia@igalia.com>
NetworkProcess: DNS prefetch happens in the Web Process
https://bugs.webkit.org/show_bug.cgi?id=147824
Reviewed by Chris Dumez.
DNS prefetch requests started in the WebProcess should be sent to
the network process when it's enabled.
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::prefetchDNS): Use NetworkProcess::prefetchDNS().
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in: Add
PrefetchDNS message.
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::prefetchDNS): Do the actual DNS prefetch.
* NetworkProcess/NetworkProcess.h:
* WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp:
(webkitWebExtensionDidReceiveMessage): Use WebProcess::prefetchDNS().
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::prefetchDNS): Use WebProcess::prefetchDNS().
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::sendTapHighlightForNodeIfNecessary): Use
FrameLoaderClient to do the DNS prefetch.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess): Initialize the DNS prefetched
hosts cleanup hysteresis activity. Clear the cache of DNS
prefetched when hysteresis activity stopped.
(WebKit::WebProcess::prefetchDNS): Send the request to the network
process if it's enabled, otherwise do the actual DNS prefetch.
* WebProcess/WebProcess.h:
2015-10-20 Chris Dumez <cdumez@apple.com>
[WK2] Generalize NetworkCacheStorage API so it can store different types of metadata
https://bugs.webkit.org/show_bug.cgi?id=150221
<rdar://problem/23149771>
Reviewed by Darin Adler and Antti Koivisto.
Generalize NetworkCacheStorage API so it can store different types of
metadata alongside the network resources. This is a pre-requirement to
making our NetworkCache smarter by storing information about the
resources.
To keep the code simple, the entry type is now part of the entry key and
we store records of a specific type in a 'type' subfolder. The cache
structure looks like so:
- WebKitCache/Version 5/[Partition]/[Type]/[Hash]
- WebKitCache/Version 5/[Partition]/[Type]/[Hash]-blob (Optional)
Existing cache entries now that the 'resource' type as these are network
resources.
* NetworkProcess/cache/NetworkCache.cpp:
* NetworkProcess/cache/NetworkCacheKey.cpp:
* NetworkProcess/cache/NetworkCacheKey.h:
* NetworkProcess/cache/NetworkCacheStatistics.cpp:
* NetworkProcess/cache/NetworkCacheStorage.cpp:
* NetworkProcess/cache/NetworkCacheStorage.h:
2015-10-20 Hunseop Jeong <hs85.jeong@samsung.com>
[EFL] ContextMenu doesn't work correctly on MiniBrowser after r191194.
https://bugs.webkit.org/show_bug.cgi?id=150311
Reviewed by Gyuyoung Kim.
Restore the test_ewk2_context_menu API test to check the context menu whether it works correctly.
* PlatformEfl.cmake:
2015-10-13 Conrad Shultz <conrad_shultz@apple.com>
_WKThumbnailView should support a snapshot-only mode
https://bugs.webkit.org/show_bug.cgi?id=150106
Reviewed by Tim Horton.
Add a new property to _WKThumbnailView, exclusivelyUsesSnapshot, which causes _WKThumbnailView
to bypass both layer tree reparenting and event suppression on the associated WKView.
Add a new method, -requestSnapshot, which clients can use to force _WKThumbnailView to refresh
on demand.
* UIProcess/API/Cocoa/_WKThumbnailView.h:
* UIProcess/API/Cocoa/_WKThumbnailView.mm:
(-[_WKThumbnailView requestSnapshot]):
Extracted from -_requestSnapshotIfNeeded:.
(-[_WKThumbnailView _viewWasUnparented]):
(-[_WKThumbnailView _viewWasParented]):
(-[_WKThumbnailView _requestSnapshotIfNeeded]):
2015-10-20 Alexey Proskuryakov <ap@apple.com>
Build fix.
* UIProcess/ios/forms/WKAirPlayRoutePicker.mm:
* UIProcess/ios/forms/WKFileUploadPanel.mm:
2015-10-20 Joseph Pecoraro <pecoraro@apple.com>
ASSERT when right clicking on SVG Image generating Share menu - can break Web Inspector
https://bugs.webkit.org/show_bug.cgi?id=150374
Reviewed by Brian Burg.
When there is no absolute URL or downloadable media URL no system share
menu is created, but we were still appending the null context menu to
the list of context menu items.
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::shareMenuItem):
Bail early if the context menu is null.
(WebKit::WebContextMenuProxyMac::showContextMenu):
Only append the share context menu item if it is non-null.
This matches ContextMenuController.cpp in WebCore.
2015-10-20 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r191306.
https://bugs.webkit.org/show_bug.cgi?id=150371
"May have caused a significant warm PLT regression" (Requested
by cdumez_ on #webkit).
Reverted changeset:
"[WK2] Generalize NetworkCacheStorage API so it can store
different types of metadata"
https://bugs.webkit.org/show_bug.cgi?id=150221
http://trac.webkit.org/changeset/191306
2015-10-20 Tim Horton <timothy_horton@apple.com>
Try to fix the build by disabling MAC_GESTURE_EVENTS on 10.9 and 10.10
* Configurations/FeatureDefines.xcconfig:
2015-10-20 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r191333.
https://bugs.webkit.org/show_bug.cgi?id=150362
Caused assertions on regression tests (Requested by ap on
#webkit).
Reverted changeset:
"ERROR: Unhandled web process message
'StorageAreaMap:DispatchStorageEvent'"
https://bugs.webkit.org/show_bug.cgi?id=150315
http://trac.webkit.org/changeset/191333
2015-10-20 Carlos Garcia Campos <cgarcia@igalia.com>
[UNIX] ASSERTION FAILED: m_shouldWaitForSyncReplies in Connection::connectionDidClose()
https://bugs.webkit.org/show_bug.cgi?id=150361
Reviewed by Martin Robinson.
It doesn't always happen because it depends on how sockets are
closed, and the state of the threads. The problem is that we are
not handling the case when the read fails because we closed the
connection. In that case we log the error and call
Connection::connectionDidClose(). But it was connectionDidClose()
the one closing the socket. So, in this particular case it's not an
error but a normal termination, and we shouldn't try to close the
connection again. Something similar can happen while sending a
message, and we get a broken pipe error, but in that case we are
only printing the error, so it's harmless.
* Platform/IPC/unix/ConnectionUnix.cpp:
(IPC::Connection::readyReadHandler): Only print error and call
connectionDidClose() if we are still connected when read fails.
(IPC::Connection::sendOutgoingMessage): Only print error if we are
still connected when send fails.
2015-10-20 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Graphics corruption when entering/leaving AC mode quickly
https://bugs.webkit.org/show_bug.cgi?id=150323
Reviewed by Mario Sanchez Prada.
The UI process is notified when entering accelerated compositing
mode after the layers have been flushed and rendered to avoid
flickering. However, this is producing flickering in the GTK+
port, because we use an offscreen redirected window that is
resized to a minimium size to save memory when not in AC mode. The
web process always uses the current size of the redirected window,
so when entering AC mode, contents are rendered into the 1x1
window, then the UI process is notified, the redirected window is
resized to its actual size, and we force a resize to ask the web
process to render again, now at the correct size. Rendering at 1x1
and then resizing the window is what produces the flickering when
entering AC mode, but it's also inefficient, since we need to
render again after the redirected window is resized. So, this
patch adds a WillEnterAcceleratedCompositing message that is sent
to the UI process when the layer tree host is created but before
the contents have been composited and rendered. This is
implemented by the GTK+ port to prepare for entering AC mode, by
resizing the redirected window. When we actually enter AC mode,
the contents have already been rendered in the web process at the
correct size, so we can just use the redirected window surface
instead of the drawing area one, and paint in the web view without
any flickering. We no longer need the forceResize either.
When leaving accelerated compositing mode, we now clear the redirected
window resources after a short delay. This ensures that we have
already rendered the update sent in the ExitAcceleratedCompositingMode
message, but also that entering/leaving AC mode quickly doesn't
produce any redirected window resize.
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::willEnterAcceleratedCompositingMode):
* UIProcess/API/gtk/PageClientImpl.h:
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseClearRedirectedWindowSoon):
(webkitWebViewBaseWillEnterAcceleratedCompositingMode):
(webkitWebViewBaseEnterAcceleratedCompositingMode):
(webkitWebViewBaseExitAcceleratedCompositingMode):
* UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
* UIProcess/CoordinatedGraphics/WebView.h:
* UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::willEnterAcceleratedCompositingMode):
* UIProcess/DrawingAreaProxy.messages.in:
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::willEnterAcceleratedCompositingMode):
* UIProcess/DrawingAreaProxyImpl.h:
(WebKit::DrawingAreaProxyImpl::forceResize): Deleted.
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::willEnterAcceleratedCompositingMode):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::willEnterAcceleratedCompositingMode):
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::willEnterAcceleratedCompositingMode):
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode):
2015-10-20 Sergio Villar Senin <svillar@igalia.com>
[GTK] Fix build for ENABLE_PLUGIN_PROCESS_GTK2=OFF
https://bugs.webkit.org/show_bug.cgi?id=150086
Reviewed by Darin Adler.
* UIProcess/cairo/BackingStoreCairo.cpp:
(WebKit::BackingStore::createBackend):
2015-10-20 Yoav Weiss <yoav@yoav.ws>
Rename the PICTURE_SIZES flag to CURRENTSRC
https://bugs.webkit.org/show_bug.cgi?id=150275
Reviewed by Dean Jackson.
* Configurations/FeatureDefines.xcconfig:
2015-10-19 Carlos Garcia Campos <cgarcia@igalia.com>
ERROR: Unhandled web process message 'StorageAreaMap:DispatchStorageEvent'
https://bugs.webkit.org/show_bug.cgi?id=150315
Reviewed by Andreas Kling.
It was introduced in r184930, that keeps the session storage area
maps alive in the UI process when they are destroyed by the web
process. The problem is that we also keep the listeners, so that
events are also dispatched to the listeners of destroyed areas,
and the message handlers were removed in the web process.
* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::createTransientLocalStorageMap): Add a
listener for the new storage map ID when the map is reused.
(WebKit::StorageManager::destroyStorageMap): Always remove
listeners of destroyed maps.
2015-10-19 Tim Horton <timothy_horton@apple.com>
Remove unused support for long presses from WebKit
https://bugs.webkit.org/show_bug.cgi?id=150345
Reviewed by Beth Dakin.
* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/APIUIClient.h:
(API::UIClient::didBeginTrackingPotentialLongMousePress): Deleted.
(API::UIClient::didRecognizeLongMousePress): Deleted.
(API::UIClient::didCancelTrackingPotentialLongMousePress): Deleted.
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageUIClient): Deleted.
* UIProcess/API/C/WKPageUIClient.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesGetLongMousePressEnabled):
(WKPreferencesSetLongMousePressEnabled): Deleted.
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didBeginTrackingPotentialLongMousePress): Deleted.
(WebKit::WebPageProxy::didRecognizeLongMousePress): Deleted.
(WebKit::WebPageProxy::didCancelTrackingPotentialLongMousePress): Deleted.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h:
(API::InjectedBundle::PageUIClient::didBeginTrackingPotentialLongMousePress): Deleted.
(API::InjectedBundle::PageUIClient::didRecognizeLongMousePress): Deleted.
(API::InjectedBundle::PageUIClient::didCancelTrackingPotentialLongMousePress): Deleted.
* WebProcess/InjectedBundle/API/c/WKBundlePageUIClient.h:
* WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
(WebKit::InjectedBundlePageUIClient::didBeginTrackingPotentialLongMousePress): Deleted.
(WebKit::InjectedBundlePageUIClient::didRecognizeLongMousePress): Deleted.
(WebKit::InjectedBundlePageUIClient::didCancelTrackingPotentialLongMousePress): Deleted.
* WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::didBeginTrackingPotentialLongMousePress): Deleted.
(WebKit::WebChromeClient::didRecognizeLongMousePress): Deleted.
(WebKit::WebChromeClient::didCancelTrackingPotentialLongMousePress): Deleted.
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences): Deleted.
2015-10-19 Chris Dumez <cdumez@apple.com>
Make sure development Safari does not delete the stable Safari cache storage.
https://bugs.webkit.org/show_bug.cgi?id=150343
Reviewed by Antti Koivisto.
Make sure development Safari does not delete the stable Safari disk cache
storage. Development Safari now uses Version 5, while the last stable
Safari uses Version 4. Since the 2 versions can co-exist, it is best not
to drop the old cache version (4) at this point.
* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::Storage::deleteOldVersions):
2015-10-19 Tim Horton <timothy_horton@apple.com>
WKView being inside WKWebView leads to weird API issues
https://bugs.webkit.org/show_bug.cgi?id=150174
Reviewed by Darin Adler.
* UIProcess/API/mac/WKView.mm:
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/Cocoa/WebViewImpl.h: Added.
* UIProcess/Cocoa/WebViewImpl.mm: Added.
(WebKit::WebViewImpl::WebViewImpl):
(WebKit::WebViewImpl::~WebViewImpl):
(WebKit::WebViewImpl::setDrawsBackground):
(WebKit::WebViewImpl::drawsBackground):
(WebKit::WebViewImpl::setDrawsTransparentBackground):
(WebKit::WebViewImpl::drawsTransparentBackground):
(WebKit::WebViewImpl::acceptsFirstResponder):
(WebKit::WebViewImpl::becomeFirstResponder):
(WebKit::WebViewImpl::resignFirstResponder):
(WebKit::WebViewImpl::isFocused):
(WebKit::WebViewImpl::viewWillStartLiveResize):
(WebKit::WebViewImpl::viewDidEndLiveResize):
(WebKit::WebViewImpl::setFrameSize):
(WebKit::WebViewImpl::disableFrameSizeUpdates):
(WebKit::WebViewImpl::enableFrameSizeUpdates):
(WebKit::WebViewImpl::frameSizeUpdatesDisabled):
(WebKit::WebViewImpl::setFrameAndScrollBy):
(WebKit::WebViewImpl::setFixedLayoutSize):
(WebKit::WebViewImpl::fixedLayoutSize):
(WebKit::WebViewImpl::setDrawingAreaSize):
(WebKit::WebViewImpl::setContentPreparationRect):
(WebKit::WebViewImpl::updateViewExposedRect):
(WebKit::WebViewImpl::setClipsToVisibleRect):
(WebKit::WebViewImpl::setIntrinsicContentSize):
(WebKit::WebViewImpl::intrinsicContentSize):
(WebKit::WebViewImpl::setViewScale):
(WebKit::WebViewImpl::viewScale):
(WebKit::WebViewImpl::layoutMode):
(WebKit::WebViewImpl::setLayoutMode):
(WebKit::WebViewImpl::supportsArbitraryLayoutModes):
(WebKit::WebViewImpl::updateSupportsArbitraryLayoutModes):
(WebKit::WebViewImpl::updateSecureInputState):
(WebKit::WebViewImpl::resetSecureInputState):
(WebKit::WebViewImpl::notifyInputContextAboutDiscardedComposition):
(WebKit::WebViewImpl::hasFullScreenWindowController):
(WebKit::WebViewImpl::fullScreenWindowController):
(WebKit::WebViewImpl::closeFullScreenWindowController):
(WebKit::WebViewImpl::fullScreenPlaceholderView):
(WebKit::WebViewImpl::createFullScreenWindow):
Move the actual implementation of a number of WKView methods into a
C++ class, WebViewImpl, which WKView calls directly into.
Eventually, we will move all of the logic of WKView into WebViewImpl,
and then duplicate the necessary forwarding in WKWebView and remove
WKWebView's inner WKView.
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::isViewFocused):
(WebKit::PageClientImpl::didCommitLoadForMainFrame):
(WebKit::PageClientImpl::updateSecureInputState):
(WebKit::PageClientImpl::resetSecureInputState):
(WebKit::PageClientImpl::notifyInputContextAboutDiscardedComposition):
(WebKit::PageClientImpl::beganEnterFullScreen):
(WebKit::PageClientImpl::beganExitFullScreen):
For now, forward PageClient requests that can be answered by WebViewImpl
to WebViewImpl. Eventually, we'll probably fold PageClientImpl and WebViewImpl
together into one class, and these things will collapse down.
* UIProcess/mac/WKFullScreenWindowController.h:
* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController initWithWindow:webView:page:]):
(-[WKFullScreenWindowController enterFullScreen:]):
(-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
(-[WKFullScreenWindowController exitFullScreen]):
(-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
(-[WKFullScreenWindowController completeFinishExitFullScreenAnimationAfterRepaint]):
(-[WKFullScreenWindowController _manager]):
(-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]):
(-[WKFullScreenWindowController _startExitFullScreenAnimationWithDuration:]):
(-[WKFullScreenWindowController initWithWindow:webView:]): Deleted.
(-[WKFullScreenWindowController _page]): Deleted.
* UIProcess/mac/WKViewLayoutStrategy.h:
* UIProcess/mac/WKViewLayoutStrategy.mm:
(+[WKViewLayoutStrategy layoutStrategyWithPage:view:viewImpl:mode:]):
(-[WKViewLayoutStrategy initWithPage:view:viewImpl:mode:]):
(-[WKViewLayoutStrategy invalidate]):
(-[WKViewLayoutStrategy didChangeFrameSize]):
(-[WKViewViewSizeLayoutStrategy initWithPage:view:viewImpl:mode:]):
(-[WKViewFixedSizeLayoutStrategy initWithPage:view:viewImpl:mode:]):
(-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy initWithPage:view:viewImpl:mode:]):
(-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy updateLayout]):
(-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy didChangeFrameSize]):
(-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy initWithPage:view:viewImpl:mode:]):
(+[WKViewLayoutStrategy layoutStrategyWithPage:view:mode:]): Deleted.
(-[WKViewLayoutStrategy initWithPage:view:mode:]): Deleted.
(-[WKViewLayoutStrategy willDestroyView:]): Deleted.
(-[WKViewViewSizeLayoutStrategy initWithPage:view:mode:]): Deleted.
(-[WKViewFixedSizeLayoutStrategy initWithPage:view:mode:]): Deleted.
(-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy initWithPage:view:mode:]): Deleted.
(-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy initWithPage:view:mode:]): Deleted.
Make WKViewLayoutStrategy and WKFullScreenWindowController operate in terms of generic
NSViews instead of WKView, so that eventually they will be able to work for either
WKView or WKWebView, and so that they can sit underneath WebViewImpl.
* WebKit2.xcodeproj/project.pbxproj:
2015-10-19 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r191307.
https://bugs.webkit.org/show_bug.cgi?id=150338
broke lots of API tests, need time to figure out whats up
(Requested by thorton on #webkit).
Reverted changeset:
"WKView being inside WKWebView leads to weird API issues"
https://bugs.webkit.org/show_bug.cgi?id=150174
http://trac.webkit.org/changeset/191307
2015-10-19 Tim Horton <timothy_horton@apple.com>
Try again to fix the 32-bit build.
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::setupServicesMenu):
2015-10-17 Wenson Hsieh <wenson_hsieh@apple.com>
Extend fast-clicking behavior to trigger on elements that have negligible zoom
https://bugs.webkit.org/show_bug.cgi?id=150248
<rdar://problem/23140069>
Reviewed by Simon Fraser.
Currently, fast-clicking only triggers on pages that have unscalable viewports. To allow more websites to benefit from fast-clicking
behavior, we generalize fast-clicking to also occur when tapping on elements for which double-tap-to-zoom would zoom the element in
or out by an insignificant amount. We define an insignificant amount of zoom to mean that zooming would increase the viewport scale
by less than a configurable threshold, or decrease the viewport scale by more than a configurable threshold. We accomplish this by
temporarily disabling the double tap gesture recognizer for the duration of the tap. This patch refactors some logic used to compute
zoomed viewports to make it possible to predict the change in viewport scale when double tapping to zoom. See the changes in
SmartMagnificationController and ViewGestureGeometryCollector for more details.
There are no new tests, since this patch does not change existing behavior. Instead, this patch adds the machinery needed for zoom-
dependent fast-clicking: by setting the preferences WebKitFastClickingEnabled and WebKitFastClickZoomThreshold, we will be able to tweak
the behavior dynamically.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didCommitLayerTree:]):
(-[WKWebView _contentZoomScale]):
(-[WKWebView _targetContentZoomScaleForRect:currentScale:fitEntireRect:minimumScale:maximumScale:]):
(-[WKWebView _zoomToRect:withOrigin:fitEntireRect:minimumScale:maximumScale:minimumScrollDistance:]):
(-[WKWebView _viewportIsUserScalable]):
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::disableDoubleTapGesturesUntilTapIsFinishedIfNecessary):
* UIProcess/ios/SmartMagnificationController.h:
* UIProcess/ios/SmartMagnificationController.mm:
(WebKit::SmartMagnificationController::adjustSmartMagnificationTargetRectAndZoomScales):
(WebKit::SmartMagnificationController::didCollectGeometryForSmartMagnificationGesture):
(WebKit::SmartMagnificationController::magnify):
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _didGetTapHighlightForRequest:color:quads:topLeftRadius:topRightRadius:bottomLeftRadius:bottomRightRadius:]):
(-[WKContentView _fastClickZoomThreshold]):
(-[WKContentView _allowDoubleTapToZoomForCurrentZoomScale:andTargetZoomScale:]):
(-[WKContentView _disableDoubleTapGesturesUntilTapIsFinishedIfNecessary:allowsDoubleTapZoom:targetRect:isReplaced:minimumScale:maximumScale:]):
(-[WKContentView _highlightLongPressRecognized:]):
(-[WKContentView _endPotentialTapAndEnableDoubleTapGesturesIfNecessary]):
(-[WKContentView _singleTapRecognized:]):
(cancelPotentialTapIfNecessary):
(-[WKContentView _singleTapCommited:]):
(-[WKContentView webSelectionRects]): Deleted.
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::disableDoubleTapGesturesUntilTapIsFinishedIfNecessary):
* WebProcess/WebPage/ViewGestureGeometryCollector.cpp:
(WebKit::ViewGestureGeometryCollector::collectGeometryForSmartMagnificationGesture):
(WebKit::ViewGestureGeometryCollector::computeZoomInformationForNode):
* WebProcess/WebPage/ViewGestureGeometryCollector.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::potentialTapAtPosition):
2015-10-19 Tim Horton <timothy_horton@apple.com>
WKView being inside WKWebView leads to weird API issues
https://bugs.webkit.org/show_bug.cgi?id=150174
Reviewed by Darin Adler.
* UIProcess/API/mac/WKView.mm:
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/Cocoa/WebViewImpl.h: Added.
* UIProcess/Cocoa/WebViewImpl.mm: Added.
(WebKit::WebViewImpl::WebViewImpl):
(WebKit::WebViewImpl::~WebViewImpl):
(WebKit::WebViewImpl::setDrawsBackground):
(WebKit::WebViewImpl::drawsBackground):
(WebKit::WebViewImpl::setDrawsTransparentBackground):
(WebKit::WebViewImpl::drawsTransparentBackground):
(WebKit::WebViewImpl::acceptsFirstResponder):
(WebKit::WebViewImpl::becomeFirstResponder):
(WebKit::WebViewImpl::resignFirstResponder):
(WebKit::WebViewImpl::isFocused):
(WebKit::WebViewImpl::viewWillStartLiveResize):
(WebKit::WebViewImpl::viewDidEndLiveResize):
(WebKit::WebViewImpl::setFrameSize):
(WebKit::WebViewImpl::disableFrameSizeUpdates):
(WebKit::WebViewImpl::enableFrameSizeUpdates):
(WebKit::WebViewImpl::frameSizeUpdatesDisabled):
(WebKit::WebViewImpl::setFrameAndScrollBy):
(WebKit::WebViewImpl::setFixedLayoutSize):
(WebKit::WebViewImpl::fixedLayoutSize):
(WebKit::WebViewImpl::setDrawingAreaSize):
(WebKit::WebViewImpl::setContentPreparationRect):
(WebKit::WebViewImpl::updateViewExposedRect):
(WebKit::WebViewImpl::setClipsToVisibleRect):
(WebKit::WebViewImpl::setIntrinsicContentSize):
(WebKit::WebViewImpl::intrinsicContentSize):
(WebKit::WebViewImpl::setViewScale):
(WebKit::WebViewImpl::viewScale):
(WebKit::WebViewImpl::layoutMode):
(WebKit::WebViewImpl::setLayoutMode):
(WebKit::WebViewImpl::supportsArbitraryLayoutModes):
(WebKit::WebViewImpl::updateSupportsArbitraryLayoutModes):
(WebKit::WebViewImpl::updateSecureInputState):
(WebKit::WebViewImpl::resetSecureInputState):
(WebKit::WebViewImpl::notifyInputContextAboutDiscardedComposition):
(WebKit::WebViewImpl::hasFullScreenWindowController):
(WebKit::WebViewImpl::fullScreenWindowController):
(WebKit::WebViewImpl::closeFullScreenWindowController):
(WebKit::WebViewImpl::fullScreenPlaceholderView):
(WebKit::WebViewImpl::createFullScreenWindow):
Move the actual implementation of a number of WKView methods into a
C++ class, WebViewImpl, which WKView calls directly into.
Eventually, we will move all of the logic of WKView into WebViewImpl,
and then duplicate the necessary forwarding in WKWebView and remove
WKWebView's inner WKView.
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::isViewFocused):
(WebKit::PageClientImpl::didCommitLoadForMainFrame):
(WebKit::PageClientImpl::updateSecureInputState):
(WebKit::PageClientImpl::resetSecureInputState):
(WebKit::PageClientImpl::notifyInputContextAboutDiscardedComposition):
(WebKit::PageClientImpl::beganEnterFullScreen):
(WebKit::PageClientImpl::beganExitFullScreen):
For now, forward PageClient requests that can be answered by WebViewImpl
to WebViewImpl. Eventually, we'll probably fold PageClientImpl and WebViewImpl
together into one class, and these things will collapse down.
* UIProcess/mac/WKFullScreenWindowController.h:
* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController initWithWindow:webView:page:]):
(-[WKFullScreenWindowController enterFullScreen:]):
(-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
(-[WKFullScreenWindowController exitFullScreen]):
(-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
(-[WKFullScreenWindowController completeFinishExitFullScreenAnimationAfterRepaint]):
(-[WKFullScreenWindowController _manager]):
(-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]):
(-[WKFullScreenWindowController _startExitFullScreenAnimationWithDuration:]):
(-[WKFullScreenWindowController initWithWindow:webView:]): Deleted.
(-[WKFullScreenWindowController _page]): Deleted.
* UIProcess/mac/WKViewLayoutStrategy.h:
* UIProcess/mac/WKViewLayoutStrategy.mm:
(+[WKViewLayoutStrategy layoutStrategyWithPage:view:viewImpl:mode:]):
(-[WKViewLayoutStrategy initWithPage:view:viewImpl:mode:]):
(-[WKViewLayoutStrategy invalidate]):
(-[WKViewLayoutStrategy didChangeFrameSize]):
(-[WKViewViewSizeLayoutStrategy initWithPage:view:viewImpl:mode:]):
(-[WKViewFixedSizeLayoutStrategy initWithPage:view:viewImpl:mode:]):
(-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy initWithPage:view:viewImpl:mode:]):
(-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy updateLayout]):
(-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy didChangeFrameSize]):
(-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy initWithPage:view:viewImpl:mode:]):
(+[WKViewLayoutStrategy layoutStrategyWithPage:view:mode:]): Deleted.
(-[WKViewLayoutStrategy initWithPage:view:mode:]): Deleted.
(-[WKViewLayoutStrategy willDestroyView:]): Deleted.
(-[WKViewViewSizeLayoutStrategy initWithPage:view:mode:]): Deleted.
(-[WKViewFixedSizeLayoutStrategy initWithPage:view:mode:]): Deleted.
(-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy initWithPage:view:mode:]): Deleted.
(-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy initWithPage:view:mode:]): Deleted.
Make WKViewLayoutStrategy and WKFullScreenWindowController operate in terms of generic
NSViews instead of WKView, so that eventually they will be able to work for either
WKView or WKWebView, and so that they can sit underneath WebViewImpl.
* WebKit2.xcodeproj/project.pbxproj:
2015-10-19 Chris Dumez <cdumez@apple.com>
[WK2] Generalize NetworkCacheStorage API so it can store different types of metadata
https://bugs.webkit.org/show_bug.cgi?id=150221
<rdar://problem/23149771>
Reviewed by Darin Adler and Antti Koivisto.
Generalize NetworkCacheStorage API so it can store different types of
metadata alongside the network resources. This is a pre-requirement to
making our NetworkCache smarter by storing information about the
resources.
To keep the code simple, the entry type is now part of the entry key and
we store records of a specific type in a 'type' subfolder. The cache
structure looks like so:
- WebKitCache/Version 5/[Partition]/[Type]/[Hash]
- WebKitCache/Version 5/[Partition]/[Type]/[Hash]-blob (Optional)
Existing cache entries now that the 'resource' type as these are network
resources.
* NetworkProcess/cache/NetworkCache.cpp:
* NetworkProcess/cache/NetworkCacheKey.cpp:
* NetworkProcess/cache/NetworkCacheKey.h:
* NetworkProcess/cache/NetworkCacheStatistics.cpp:
* NetworkProcess/cache/NetworkCacheStorage.cpp:
* NetworkProcess/cache/NetworkCacheStorage.h:
2015-10-19 Tim Horton <timothy_horton@apple.com>
Try to fix the iOS build
* Configurations/FeatureDefines.xcconfig:
2015-10-19 Tim Horton <timothy_horton@apple.com>
Try to fix the 32-bit build.
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::setupServicesMenu):
2015-10-16 Anders Carlsson <andersca@apple.com>
Fix image service menus somewhat
https://bugs.webkit.org/show_bug.cgi?id=150265
Reviewed by Tim Horton.
* Shared/ContextMenuContextData.cpp:
(WebKit::ContextMenuContextData::ContextMenuContextData):
It's a service menu if we have a controlled image.
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::setupServicesMenu):
Use an item provider.
2015-10-19 Tim Horton <timothy_horton@apple.com>
Add magnify and rotate gesture event support for Mac
https://bugs.webkit.org/show_bug.cgi?id=150179
<rdar://problem/8036240>
Reviewed by Darin Adler.
* Configurations/FeatureDefines.xcconfig:
New feature flag.
* Shared/NativeWebGestureEvent.h: Added.
(WebKit::NativeWebGestureEvent::nativeEvent):
* Shared/WebEvent.h:
* Shared/WebEventConversion.cpp:
(WebKit::WebKit2PlatformGestureEvent::WebKit2PlatformGestureEvent):
(WebKit::platform):
* Shared/WebEventConversion.h:
* Shared/mac/NativeWebGestureEventMac.mm: Added.
(WebKit::webEventTypeForNSEvent):
(WebKit::pointForEvent):
(WebKit::NativeWebGestureEvent::NativeWebGestureEvent):
Add and plumb a new native event that wraps a NSEvent of type
NSEventTypeMagnify or NSEventTypeRotate (gesture events).
* Shared/mac/WebGestureEvent.cpp: Added.
(WebKit::WebGestureEvent::encode):
(WebKit::WebGestureEvent::decode):
(WebKit::WebGestureEvent::isGestureEventType):
* Shared/mac/WebGestureEvent.h: Added.
(WebKit::WebGestureEvent::WebGestureEvent):
(WebKit::WebGestureEvent::position):
(WebKit::WebGestureEvent::gestureScale):
(WebKit::WebGestureEvent::gestureRotation):
Add IPC plumbing for WebGestureEvent, which becomes a WebCore::PlatformGestureEvent.
* UIProcess/API/Cocoa/WKViewPrivate.h:
Remove unnecessary iPhone-only WKView code.
Add _gestureEventWasNotHandledByWebCore, SPI which can be overridden
to react when WebCore decides not to handle a gesture event.
* UIProcess/API/mac/WKView.mm:
(-[WKView magnifyWithEvent:]):
Route magnification gesture events to the page, unless we're already
in an active view zoom gesture, in which case we'll bypass the page
and send the event straight to ViewGestureController.
(-[WKView rotateWithEvent:]):
Route rotation gesture events to the page.
(-[WKView _gestureEventWasNotHandledByWebCore:]):
Let ViewGestureController know that WebCore didn't handle a gesture event.
We always give WebCore the first crack at the event if we're not in a zoom,
because it could preventDefault() on the Begin phase event, and that should
prevent pinch-zoom from starting.
* UIProcess/PageClient.h:
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::gestureEventWasNotHandledByWebCore):
Plumb gestureEventWasNotHandledByWebCore back from WebPageProxy to WKView.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::handleGestureEvent):
(WebKit::WebPageProxy::didReceiveEvent):
* UIProcess/WebPageProxy.h:
Forward gesture events to EventDispatcher, and let WKView know when WebCore
passes on handling them.
* UIProcess/mac/ViewGestureController.h:
(WebKit::ViewGestureController::hasActiveMagnificationGesture):
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::gestureEventWasNotHandledByWebCore):
(WebKit::ViewGestureController::handleMagnificationGestureEvent):
Don't try to start a zoom with anything other than a Begin phase event.
Try to start a zoom with any events that WebCore doesn't handle.
Move dispatch of endMagnificationGesture into ViewGestureController;
there is no reason for that to be in WKView anymore.
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebPage/EventDispatcher.cpp:
(WebKit::EventDispatcher::gestureEvent):
(WebKit::EventDispatcher::dispatchGestureEvent):
* WebProcess/WebPage/EventDispatcher.h:
* WebProcess/WebPage/EventDispatcher.messages.in:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::handleGestureEvent):
(WebKit::WebPage::gestureEvent):
* WebProcess/WebPage/WebPage.h:
Dispatch to the main thread and hand off the gesture event to WebCore,
asynchronously informing the UI process of whether the event was handled or not.
2015-10-19 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] ASSERTION FAILED: parent in WebInspectorProxy::platformDetach()
https://bugs.webkit.org/show_bug.cgi?id=150319
Reviewed by Žan Doberšek.
This happens when the inspector is shown/closed very
quickly. Since we start the inspector attached by default, when
the web inspector is created m_isAttached is set to true, so that
when opened, it's attached to the view. If the inspector is closed
before it has been actually attached, the inspector view doesn't
have a parent, even if the m_isAttached is true. So, we should
handle this case instead of asserting. This is what happens in
test http/tests/xmlhttprequest/access-control-repeated-failed-preflight-crash.html.
* UIProcess/gtk/WebInspectorProxyGtk.cpp:
(WebKit::WebInspectorProxy::platformDetach): Remove the view from
its parent container if it was actually attached.
2015-10-19 Hunseop Jeong <hs85.jeong@samsung.com>
[EFL] Implement WebContextMenuProxyEfl::showContextMenu after r191194
https://bugs.webkit.org/show_bug.cgi?id=150310
Reviewed by Gyuyoung Kim.
showContextMenu() doesn't work correctly after r191194 in EFL port.
This patch implements WebContextMenuProxyEfl::showContextMenu.
* UIProcess/efl/WebContextMenuProxyEfl.cpp:
(WebKit::WebContextMenuProxyEfl::WebContextMenuProxyEfl):
(WebKit::WebContextMenuProxyEfl::showContextMenu):
(WebKit::WebContextMenuProxyEfl::hideContextMenu):
* UIProcess/efl/WebContextMenuProxyEfl.h:
2015-10-18 Csaba Osztrogonác <ossy@webkit.org>
[WK2] Simplify unused return warning in WKRetainPtr.h
https://bugs.webkit.org/show_bug.cgi?id=150173
Reviewed by Darin Adler.
* UIProcess/API/cpp/WKRetainPtr.h:
(WebKit::__attribute__):
(WebKit::adoptWK): Deleted.
2015-10-18 Csaba Osztrogonác <ossy@webkit.org>
Fix the ENABLE(SECCOMP_FILTERS) build after r187030
https://bugs.webkit.org/show_bug.cgi?id=150172
Reviewed by Alexey Proskuryakov.
* Shared/linux/SeccompFilters/Syscall.cpp:
(WebKit::reportUnexpectedSyscall):
2015-10-18 Joonghun Park <jh718.park@samsung.com>
[GTK] Remove WebKitContextMenu related missing annotation warnings
https://bugs.webkit.org/show_bug.cgi?id=150299
Reviewed by Darin Adler.
The warnings occur currently because when executing g-ir-scanner,
it doesn't consider WebKitContextMenu related .cpp files,
but only .h files.
* PlatformGTK.cmake: Add WebKitContextMenu related cpp files.
2015-10-18 Myles C. Maxfield <mmaxfield@apple.com>
Stop honoring the user default "WebKitKerningAndLigaturesEnabledByDefault"
https://bugs.webkit.org/show_bug.cgi?id=150287
Reviewed by Simon Fraser.
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::WebProcessCreationParameters): Deleted.
(WebKit::WebProcessCreationParameters::encode): Deleted.
(WebKit::WebProcessCreationParameters::decode): Deleted.
* Shared/WebProcessCreationParameters.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::registerUserDefaultsIfNeeded): Deleted.
(WebKit::WebProcessPool::platformInitializeWebProcess): Deleted.
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess): Deleted.
2015-10-18 Yusuke Suzuki <utatane.tea@gmail.com>
[GTK] Implement WebContextMenuProxyGtk::showContextMenu after r191194
https://bugs.webkit.org/show_bug.cgi?id=150276
Reviewed by Carlos Garcia Campos.
After r191194, showContextMenu signature becomes changed, and the implementation
is moved from the generic file to the Mac port. It poses the compile error in GTK port.
This patch implements WebContextMenuProxyGtk::showContextMenu. The logic is the same
to the old one except for dropping SERVICE_CONTROLS support. This is because
SERVICE_CONTROLS is not related to GTK.
* UIProcess/gtk/WebContextMenuProxyGtk.cpp:
(WebKit::WebContextMenuProxyGtk::showContextMenu):
* UIProcess/gtk/WebContextMenuProxyGtk.h:
2015-10-18 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r191250 and r191253.
https://bugs.webkit.org/show_bug.cgi?id=150296
Broke all the tests on Windows (Requested by ap on #webkit).
Reverted changesets:
"Stop honoring the user default
"WebKitKerningAndLigaturesEnabledByDefault""
https://bugs.webkit.org/show_bug.cgi?id=150287
http://trac.webkit.org/changeset/191250
"Build fix after r191250"
http://trac.webkit.org/changeset/191253
2015-10-17 Myles C. Maxfield <mmaxfield@apple.com>
Stop honoring the user default "WebKitKerningAndLigaturesEnabledByDefault"
https://bugs.webkit.org/show_bug.cgi?id=150287
Reviewed by Simon Fraser.
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::WebProcessCreationParameters): Deleted.
(WebKit::WebProcessCreationParameters::encode): Deleted.
(WebKit::WebProcessCreationParameters::decode): Deleted.
* Shared/WebProcessCreationParameters.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::registerUserDefaultsIfNeeded): Deleted.
(WebKit::WebProcessPool::platformInitializeWebProcess): Deleted.
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess): Deleted.
2015-10-17 Dan Bernstein <mitz@apple.com>
[Cocoa] Stop using WKAXRegisterRemoteApp
https://bugs.webkit.org/show_bug.cgi?id=150283
Reviewed by Alexey Proskuryakov.
* Platform/spi/mac: Added.
* Platform/spi/mac/AppKitSPI.h: Added. Includes declaration of
+[NSAccessibilityRemoteUIElement setRemoteUIApp:].
* WebKit2.xcodeproj/project.pbxproj: Added reference to new header. Also changed the path of
the Platform/spi/Cocoa group to the corresponding path in the source tree.
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::registerWithAccessibility): Added.
(WebKit::WebProcess::platformInitializeProcess): Use new registerWithAccessibility instead
of WKAXRegisterRemoteApp.
2015-10-16 Simon Fraser <simon.fraser@apple.com>
Enhance TextStream for logging, remove subclasses, log more things
https://bugs.webkit.org/show_bug.cgi?id=150269
Reviewed by Zalan Bujtas.
Remove the various TextStream subclasses that only existed to support indenting,
and output additional types. Add output for more WebCore and WebKit2 types, and
just use TextStream everywhere.
TextStream is enhance to support grouping (open paren and intent), with a
stack-based class to open/end a group.
Remove some SVG-specific duplicate output functions.
Outdent namespace contents of GraphicsTypes.h.
* Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
(WebKit::dump):
(WebKit::recursiveDumpNodes):
(WebKit::RemoteScrollingCoordinatorTransaction::description):
(WebKit::RemoteScrollingTreeTextStream::RemoteScrollingTreeTextStream): Deleted.
(WebKit::RemoteScrollingTreeTextStream::increaseIndent): Deleted.
(WebKit::RemoteScrollingTreeTextStream::decreaseIndent): Deleted.
(WebKit::RemoteScrollingTreeTextStream::writeIndent): Deleted.
(WebKit::dumpProperty): Deleted.
(WebKit::RemoteScrollingTreeTextStream::operator<<): Deleted.
(WebKit::RemoteScrollingTreeTextStream::dump): Deleted.
(WebKit::RemoteScrollingTreeTextStream::recursiveDumpNodes): Deleted.
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::operator<<):
(WebKit::dumpChangedLayers):
(WebKit::RemoteLayerTreeTransaction::description):
(WebKit::RemoteLayerTreeTextStream::RemoteLayerTreeTextStream): Deleted.
(WebKit::RemoteLayerTreeTextStream::increaseIndent): Deleted.
(WebKit::RemoteLayerTreeTextStream::decreaseIndent): Deleted.
(WebKit::dumpProperty): Deleted.
(WebKit::RemoteLayerTreeTextStream::operator<<): Deleted.
(WebKit::RemoteLayerTreeTextStream::writeIndent): Deleted.
* WebProcess/WebPage/mac/PlatformCAAnimationRemote.h:
* WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
(WebKit::operator<<):
2015-10-17 Hunseop Jeong <hs85.jeong@samsung.com>
URTBF after r191194 to fix EFL build.
https://bugs.webkit.org/show_bug.cgi?id=150272
Reviewed by Csaba Osztrogonác.
* UIProcess/efl/WebContextMenuProxyEfl.cpp:
(WebKit::WebContextMenuProxyEfl::showContextMenu):
* UIProcess/efl/WebContextMenuProxyEfl.h:
2015-10-16 Wenson Hsieh <wenson_hsieh@apple.com>
Add a WKWebView input delegate SPI
https://bugs.webkit.org/show_bug.cgi?id=149646
Reviewed by Dan Bernstein.
Renames the existing _WKFormDelegate to _WKInputDelegate and adds a new delegate SPI method
-[_WKInputDelegate _webView:focusShouldStartInputSession:] that allows clients to allow or
disallow showing up the keyboard. To make this decision, clients are given a
_WKFocusedElementInfo, which contains information about the focused element prior to the
keyboard showing up so the client will be able to override default assistance behavior.
While the information contained in a _WKFocusedElementInfo currently seems like overkill for
_webView:focusShouldStartInputSession, our intentions are to give WebKit clients control over more
details of how node assistance works, such as being able to use a custom editor for certain
types of nodes.
* Shared/API/Cocoa/WebKitPrivate.h: Added new header _WKFocusedElementInfo.h.
* UIProcess/API/Cocoa/WKWebView.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _inputDelegate]):
(-[WKWebView _formDelegate]):
(-[WKWebView _setInputDelegate:]):
(-[WKWebView _setFormDelegate:]):
(-[WKWebView initWithFrame:configuration:]): Deleted canAssistOnProgrammaticFocus flag.
(-[WKWebView canAssistOnProgrammaticFocus]): Ditto.
(-[WKWebView setCanAssistOnProgrammaticFocus:]): Ditto.
* UIProcess/API/Cocoa/WKWebViewConfiguration.h:
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration init]): Deleted.
(-[WKWebViewConfiguration _canAssistOnProgrammaticFocus]): Deleted canAssistOnProgrammaticFocus flag.
(-[WKWebViewConfiguration _setCanAssistOnProgrammaticFocus:]): Ditto.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/API/Cocoa/_WKFocusedElementInfo.h: Added.
* UIProcess/API/Cocoa/_WKFormDelegate.h:
* UIProcess/API/Cocoa/_WKInputDelegate.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKFormDelegate.h.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKFocusedElementInfo initWithAssistedNodeInformation:isInteracting:]):
(-[WKFocusedElementInfo type]):
(-[WKFocusedElementInfo value]):
(-[WKFocusedElementInfo isUserInitiated]):
(-[WKContentView accessoryAutoFill]):
(-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]): If the input delegate responds to
shouldStartInputSession, consult it to see if we should bring up the keyboard; otherwise, use our default behavior.
* WebKit2.xcodeproj/project.pbxproj:
2015-10-16 Simon Fraser <simon.fraser@apple.com>
Make TextStream the canonical way to log classes in WebCore
https://bugs.webkit.org/show_bug.cgi?id=150256
Reviewed by Sam Weinig.
We vacillated between PrintStream and TextStream as being the canonical way
to stringify WebCore data structures. This patch solidifies TextStream
as the solution, since it has convenient stream syntax, and is what we
use for render tree dumps.
Remove TextStream member functions that output non-simple structs
(sizes, points and rects), replacing them with free operator<< functions
in the .cpp file for the relevant class. Formatting is currently consistent
with RenderTreeAsText output, to avoid breaking tests.
Remove custom FloatRect outputting in SVG and RemoteLayerTreeTransaction.
* Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
(WebKit::RemoteScrollingTreeTextStream::operator<<): Deleted.
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTextStream::operator<<): Deleted.
2015-10-16 Anders Carlsson <andersca@apple.com>
Remove some dead menu code
https://bugs.webkit.org/show_bug.cgi?id=150247
Reviewed by Andreas Kling.
* Shared/WebContextMenuItemData.cpp:
(WebKit::WebContextMenuItemData::WebContextMenuItemData):
(WebKit::WebContextMenuItemData::encode): Deleted.
* Shared/WebContextMenuItemData.h:
(WebKit::WebContextMenuItemData::selectionHandler): Deleted.
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::nsMenuItem):
2015-10-16 Anders Carlsson <andersca@apple.com>
Move more code to WebContextMenuProxyMac
https://bugs.webkit.org/show_bug.cgi?id=150240
Reviewed by Tim Horton.
* UIProcess/WebContextMenuProxy.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::internalShowContextMenu):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::contextMenuClient):
* UIProcess/mac/WebContextMenuProxyMac.h:
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::initializeShareMenuItem):
(WebKit::WebContextMenuProxyMac::showContextMenu):
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::platformInitializeShareMenuItem): Deleted.
2015-10-16 Tim Horton <timothy_horton@apple.com>
Hook up autolayout intrinsic sizing for WKWebView
https://bugs.webkit.org/show_bug.cgi?id=150219
<rdar://problem/20016905>
Reviewed by Simon Fraser.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
(-[WKWebView intrinsicContentSize]):
(-[WKWebView _setIntrinsicContentSize:]):
(-[WKWebView _minimumLayoutWidth]):
(-[WKWebView _setMinimumLayoutWidth:]):
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
Add a simple SPI to specify the minimum width that a WKWebView will attempt
to lay out to, similar to WKView except just a width, not a size, and
with no option to force the height to the view size. Similar behavior can
be achieved by clients by setting custom autolayout constraints on the view.
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::intrinsicContentSizeDidChange):
Forward intrinsic content size changes to the WKWebView, not its inner WKView,
if we have one.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
Only set the autosizing fixed minimum height if we're using that behavior;
otherwise, setting it to the view's height will end up accidentally
turning on that behavior (which involves an extra layout per resize!).
2015-10-15 Anders Carlsson <andersca@apple.com>
Use the ShowContextMenu message for service menus as well
https://bugs.webkit.org/show_bug.cgi?id=150206
Reviewed by Tim Horton.
* Shared/ContextMenuContextData.cpp:
(WebKit::ContextMenuContextData::ContextMenuContextData):
(WebKit::ContextMenuContextData::encode):
(WebKit::ContextMenuContextData::decode):
* Shared/ContextMenuContextData.h:
(WebKit::ContextMenuContextData::type):
(WebKit::ContextMenuContextData::ContextMenuContextData):
(WebKit::ContextMenuContextData::isServicesMenu):
(WebKit::ContextMenuContextData::needsServicesMenu): Deleted.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::showContextMenu):
(WebKit::WebPageProxy::internalShowContextMenu):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::populate):
(WebKit::WebContextMenuProxyMac::showContextMenu):
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::showSelectionServiceMenu): Deleted.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::handleSelectionServiceClick):
2015-10-16 Hunseop Jeong <hs85.jeong@samsung.com>
[GTK] Try to fix the build after r191137
https://bugs.webkit.org/show_bug.cgi?id=150222
Reviewed by Carlos Garcia Campos.
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::doneWithKeyEvent):
(WebKit::PageClientImpl::createPopupMenuProxy):
(WebKit::PageClientImpl::createContextMenuProxy):
(WebKit::PageClientImpl::createColorPicker):
* UIProcess/API/gtk/PageClientImpl.h:
* UIProcess/gtk/WebContextMenuProxyGtk.cpp:
(WebKit::WebContextMenuProxyGtk::populate):
(WebKit::WebContextMenuProxyGtk::showContextMenu):
(WebKit::WebContextMenuProxyGtk::hideContextMenu):
(WebKit::WebContextMenuProxyGtk::WebContextMenuProxyGtk):
* UIProcess/gtk/WebContextMenuProxyGtk.h:
(WebKit::WebContextMenuProxyGtk::create):
(WebKit::WebContextMenuProxyGtk::gtkMenu):
* UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
(WebKit::WebPopupMenuProxyGtk::WebPopupMenuProxyGtk):
* UIProcess/gtk/WebPopupMenuProxyGtk.h:
(WebKit::WebPopupMenuProxyGtk::create):
(WebKit::WebPopupMenuProxyGtk::setCurrentlySelectedMenuItem):
2015-10-15 Gyuyoung Kim <gyuyoung.kim@webkit.org>
EFL build fix since r191137
Unreviewed EFL build fix.
* UIProcess/CoordinatedGraphics/WebView.cpp: Removed.
2015-10-15 Myles C. Maxfield <mmaxfield@apple.com>
Migrate to CGContextSetBaseCTM() and CGContextResetClip() from WKSI
https://bugs.webkit.org/show_bug.cgi?id=150155
Reviewed by Tim Horton.
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface): Deleted.
2015-10-15 Dean Jackson <dino@apple.com>
Fix the iOS build. And hopefully not breaking the other builds
at the same time.
* UIProcess/PageClient.h:
* UIProcess/WebContextMenuProxy.cpp:
* UIProcess/WebContextMenuProxy.h:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
2015-10-15 Anders Carlsson <andersca@apple.com>
Use the context inside WebContextMenuProxyMac
https://bugs.webkit.org/show_bug.cgi?id=150196
Reviewed by Tim Horton.
* UIProcess/WebContextMenuProxy.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::internalShowContextMenu):
* UIProcess/mac/WebContextMenuProxyMac.h:
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::populate):
(WebKit::WebContextMenuProxyMac::showContextMenu):
2015-10-15 Anders Carlsson <andersca@apple.com>
Use the context menu location that's stored in the context data
https://bugs.webkit.org/show_bug.cgi?id=150194
Reviewed by Tim Horton.
* UIProcess/WebContextMenuProxy.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::internalShowContextMenu):
* UIProcess/mac/WebContextMenuProxyMac.h:
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::showContextMenu):
2015-10-15 Anders Carlsson <andersca@apple.com>
Store the context menu data and user data in the WebContextMenuProxy object
https://bugs.webkit.org/show_bug.cgi?id=150191
Reviewed by Tim Horton.
* UIProcess/PageClient.h:
* UIProcess/WebContextMenuProxy.cpp:
(WebKit::WebContextMenuProxy::WebContextMenuProxy):
* UIProcess/WebContextMenuProxy.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::internalShowContextMenu):
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::createContextMenuProxy):
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::createContextMenuProxy):
* UIProcess/mac/WebContextMenuProxyMac.h:
(WebKit::WebContextMenuProxyMac::create):
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::WebContextMenuProxyMac):
2015-10-15 Dan Bernstein <mitz@apple.com>
[Cocoa] Stop using WKSetNSURLConnectionDefersCallbacks
https://bugs.webkit.org/show_bug.cgi?id=150189
Reviewed by Anders Carlsson.
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface): Removed initialization.
2015-10-15 Anders Carlsson <andersca@apple.com>
Fix build.
* UIProcess/API/APIFrameInfo.cpp:
(API::FrameInfo::~FrameInfo):
* UIProcess/API/APIFrameInfo.h:
* UIProcess/API/Cocoa/WKUserContentController.mm:
2015-10-15 Anders Carlsson <andersca@apple.com>
CTTE menu proxies
https://bugs.webkit.org/show_bug.cgi?id=150187
Reviewed by Tim Horton.
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::showPopupMenu):
(WebKit::WebPageProxy::internalShowContextMenu):
* UIProcess/WebPopupMenuProxy.h:
(WebKit::WebPopupMenuProxy::WebPopupMenuProxy):
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::createPopupMenuProxy):
(WebKit::PageClientImpl::createContextMenuProxy): Deleted.
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::createPopupMenuProxy):
(WebKit::PageClientImpl::createContextMenuProxy):
* UIProcess/mac/WebContextMenuProxyMac.h:
(WebKit::WebContextMenuProxyMac::create):
(WebKit::WebContextMenuProxyMac::page):
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::WebContextMenuProxyMac):
(WebKit::WebContextMenuProxyMac::~WebContextMenuProxyMac):
(WebKit::WebContextMenuProxyMac::contextMenuItemSelected):
* UIProcess/mac/WebPopupMenuProxyMac.h:
(WebKit::WebPopupMenuProxyMac::create):
* UIProcess/mac/WebPopupMenuProxyMac.mm:
(WebKit::WebPopupMenuProxyMac::WebPopupMenuProxyMac):
2015-10-15 Anders Carlsson <andersca@apple.com>
Add -[WKFrameInfo _handle]
https://bugs.webkit.org/show_bug.cgi?id=150185
rdar://problem/23132371
Reviewed by Tim Horton.
* UIProcess/API/APIFrameInfo.cpp:
(API::FrameInfo::FrameInfo):
* UIProcess/API/APIFrameInfo.h:
* UIProcess/API/Cocoa/WKFrameInfo.mm:
(-[WKFrameInfo _handle]):
* UIProcess/API/Cocoa/WKFrameInfoInternal.h:
* UIProcess/API/Cocoa/WKFrameInfoPrivate.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKFrameInfoInternal.h.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::showPopupMenu):
(WebKit::WebPageProxy::internalShowContextMenu):
* UIProcess/WebPopupMenuProxy.h:
(WebKit::WebPopupMenuProxy::WebPopupMenuProxy):
* WebKit2.xcodeproj/project.pbxproj:
2015-10-15 Anders Carlsson <andersca@apple.com>
The menu location and menu items should be part of ContextMenuContextData
https://bugs.webkit.org/show_bug.cgi?id=150182
Reviewed by Andreas Kling.
* Shared/ContextMenuContextData.cpp:
(WebKit::ContextMenuContextData::ContextMenuContextData):
(WebKit::ContextMenuContextData::encode):
(WebKit::ContextMenuContextData::decode):
* Shared/ContextMenuContextData.h:
(WebKit::ContextMenuContextData::menuLocation):
(WebKit::ContextMenuContextData::menuItems):
(WebKit::ContextMenuContextData::ContextMenuContextData):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::showContextMenu):
(WebKit::WebPageProxy::internalShowContextMenu):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::showSelectionServiceMenu):
* WebProcess/WebPage/WebContextMenu.cpp:
(WebKit::WebContextMenu::show):
2015-10-15 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Test WebKit2.RestoreSessionStateContainingFormData fails
https://bugs.webkit.org/show_bug.cgi?id=84960
Reviewed by Žan Doberšek.
Add a cross-platform implementation to LegacySessionStateCodingNone
using the new SessionState, so that non mac ports can make unit
tests that use the legacy session state coding pass.
* UIProcess/LegacySessionStateCodingNone.cpp:
(WebKit::encodeLegacySessionState):
(WebKit::decodeLegacySessionState):
(WebKit::encodeLegacySessionHistoryEntryData): Deleted.
(WebKit::decodeLegacySessionHistoryEntryData): Deleted.
2015-10-15 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix wrong #ifdef added in r190615.
This disabled accelerated compositing unconditionally.
* UIProcess/gtk/WebPreferencesGtk.cpp:
(WebKit::WebPreferences::platformInitializeStore):
2015-10-14 Zhuo Li <zachli@apple.com>
Augment <input type=search>s recent search history with the time each entry was added,
in order to allow time-based clearing of search history.
https://bugs.webkit.org/show_bug.cgi?id=148388.
Reviewed by Darin Adler.
Replace Vector<String> with Vector<RecentSearch>, where RecentSearch is a struct
that consists search string and time, for recent searches in order to store additional time
information.
All these new RecentSearches are stored in a plist in which the structure looks like:
Root {
"items": {
autosave name: {
"searches": [
{ "searchString": searchString, "date": date },
...
]
}
}
}
* Scripts/webkit/messages.py:
(headers_for_type):
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<RecentSearch>::encode): Encode the new struct RecentSearch
(IPC::ArgumentCoder<RecentSearch>::decode): Decode the new struct RecentSearch
* Shared/WebCoreArgumentCoders.h:
* UIProcess/Cocoa/WebPageProxyCocoa.mm:
(WebKit::WebPageProxy::saveRecentSearches): Call saveRecentSearches in WebCore::SearchPopupMenuCocoa.
(WebKit::WebPageProxy::loadRecentSearches): Call loadRecentSearches in WebCore::SearchPopupMenuCocoa.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/efl/WebPageProxyEfl.cpp:
(WebKit::WebPageProxy::saveRecentSearches):
(WebKit::WebPageProxy::loadRecentSearches):
* UIProcess/gtk/WebPageProxyGtk.cpp:
(WebKit::WebPageProxy::saveRecentSearches):
(WebKit::WebPageProxy::loadRecentSearches):
* WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp:
(WebKit::WebSearchPopupMenu::saveRecentSearches):
(WebKit::WebSearchPopupMenu::loadRecentSearches):
* WebProcess/WebCoreSupport/WebSearchPopupMenu.h:
2015-10-14 Wenson Hsieh <wenson_hsieh@apple.com>
Web pages with unscalable viewports shouldn't have a single tap delay
https://bugs.webkit.org/show_bug.cgi?id=149968
<rdar://problem/23054453>
Reviewed by Simon Fraser.
When a viewport is unscalable (specified through the meta viewport tag) we
do not add a delay to our single tap gesture recognizer. We do this by
disabling or reinitializing the WKContentView's double tap gesture recognizer
when the viewport becomes unscalable or scalable, respectively. A viewport is
deemed unscalable when it has user-scalable = no, or when the minimum scale is
greater than or equal to the maximum scale.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didCommitLayerTree:]):
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _createAndConfigureDoubleTapGestureRecognizer]): Pulled logic
for initializing a double tap gesture recognizer out into a helper function.
(-[WKContentView setupInteraction]):
(-[WKContentView _setDoubleTapGesturesEnabled:]): Turns gesture recognition for double
taps on or off.
2015-10-14 Anders Carlsson <andersca@apple.com>
Remove a message that isn't used by anyone
https://bugs.webkit.org/show_bug.cgi?id=150136
Reviewed by Andreas Kling.
* UIProcess/API/APILoaderClient.h:
(API::LoaderClient::didRemoveFrameFromHierarchy): Deleted.
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageLoaderClient): Deleted.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didRemoveFrameFromHierarchy): Deleted.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::detachedFromParent2): Deleted.
2015-10-14 Alex Christensen <achristensen@webkit.org>
Add SPI for reloading without content blockers
https://bugs.webkit.org/show_bug.cgi?id=150058
rdar://problem/22742222
Reviewed by Sam Weinig.
* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
* UIProcess/API/C/WKPage.cpp:
(WKPageReload):
(WKPageReloadWithoutContentBlockers):
(WKPageReloadFromOrigin):
(WKPageTryClose):
(WKPageSetUserContentExtensionsEnabled):
(WKPageSupportsTextEncoding):
* UIProcess/API/C/WKPage.h:
* UIProcess/API/Cocoa/WKBrowsingContextController.mm:
(-[WKBrowsingContextController reload]):
(-[WKBrowsingContextController reloadFromOrigin]):
(-[WKBrowsingContextController applicationNameForUserAgent]):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView reload]):
(-[WKWebView reloadFromOrigin]):
(-[WKWebView _setUserContentExtensionsEnabled:]):
(-[WKWebView _userContentExtensionsEnabled]):
(-[WKWebView _webProcessIdentifier]):
(-[WKWebView _killWebContentProcess]):
(-[WKWebView _reloadWithoutContentBlockers]):
(-[WKWebView _killWebContentProcessAndResetState]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkit_web_view_reload):
(webkit_web_view_reload_bypass_cache):
* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::didHandleContentFilterUnblockNavigation):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::stopLoading):
(WebKit::WebPageProxy::reload):
(WebKit::WebPageProxy::creationParameters):
(WebKit::WebPageProxy::setShouldScaleViewToFitDocument):
(WebKit::WebPageProxy::setUserContentExtensionsEnabled): Deleted.
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::userContentExtensionsEnabled): Deleted.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::m_shouldDispatchFakeMouseMoveEvents):
(WebKit::WebPage::setDefersLoading):
(WebKit::WebPage::reload):
(WebKit::WebPage::goForward):
(WebKit::WebPage::createDocumentLoader):
(WebKit::WebPage::setShouldScaleViewToFitDocument):
(WebKit::WebPage::imageOrMediaDocumentSizeChanged):
(WebKit::WebPage::setUserContentExtensionsEnabled): Deleted.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
2015-10-14 Simon Fraser <simon.fraser@apple.com>
Change GraphicsContext image-drawing functions to take references
https://bugs.webkit.org/show_bug.cgi?id=150108
Reviewed by Tim Horton and Sam Weinig.
Change GraphicsContext::drawImage(), drawTiledImage(), drawImageBuffer(), clipToImageBuffer()
and isCompatibleWithBuffer() to take references, and adjust calling code, adding
null-checks where necessary.
* Shared/ContextMenuContextData.cpp:
(WebKit::ContextMenuContextData::ContextMenuContextData):
* Shared/WebCoreArgumentCoders.cpp:
(IPC::encodeImage):
(IPC::encodeOptionalImage):
(IPC::ArgumentCoder<Cursor>::encode):
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::createSelectionSnapshot):
2015-10-14 Anders Carlsson <andersca@apple.com>
Change the bundle app cache APIs to take a page
https://bugs.webkit.org/show_bug.cgi?id=150123
Reviewed by Sam Weinig.
This is another step towards getting rid of ApplicationCacheStorage::singleton().
Ideally the WKTR tests that use this should be converted to API tests.
* WebProcess/InjectedBundle/API/c/WKBundle.cpp:
(WKBundleClearApplicationCache): Deleted.
(WKBundleClearApplicationCacheForOrigin): Deleted.
(WKBundleSetAppCacheMaximumSize): Deleted.
(WKBundleGetAppCacheUsageForOrigin): Deleted.
(WKBundleSetApplicationCacheOriginQuota): Deleted.
(WKBundleResetApplicationCacheOriginQuota): Deleted.
(WKBundleCopyOriginsWithApplicationCache): Deleted.
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageClearApplicationCache):
(WKBundlePageClearApplicationCacheForOrigin):
(WKBundlePageSetAppCacheMaximumSize):
(WKBundlePageGetAppCacheUsageForOrigin):
(WKBundlePageSetApplicationCacheOriginQuota):
(WKBundlePageResetApplicationCacheOriginQuota):
(WKBundlePageCopyOriginsWithApplicationCache):
* WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
* WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::clearApplicationCache): Deleted.
(WebKit::InjectedBundle::clearApplicationCacheForOrigin): Deleted.
(WebKit::InjectedBundle::setAppCacheMaximumSize): Deleted.
(WebKit::InjectedBundle::appCacheUsageForOrigin): Deleted.
(WebKit::InjectedBundle::setApplicationCacheOriginQuota): Deleted.
(WebKit::InjectedBundle::resetApplicationCacheOriginQuota): Deleted.
(WebKit::InjectedBundle::originsWithApplicationCache): Deleted.
* WebProcess/InjectedBundle/InjectedBundle.h:
2015-10-14 Joonghun Park <jh718.park@samsung.com>
[EFL] Fix the problem in which environment variable included in webprocess-cmd-prefix can't be parsed
https://bugs.webkit.org/show_bug.cgi?id=148616
Reviewed by Gyuyoung Kim.
This patch fixes the problem in which environment variable in web process-cmd-prefix can't be parsed.
process-cmd-prefix option doesn't work in two cases.
1. When executing run-layout-tests,
2. When executing MiniBrowser with web process-cmd-prefix environment variable.
* UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
(WebKit::parseAndRemoveEnvironments):
(WebKit::ProcessLauncher::launchProcess):
2015-10-13 Yongjun Zhang <yongjun_zhang@apple.com>
Use the correct notification strings for view service applications state change.
https://bugs.webkit.org/show_bug.cgi?id=150107
Use the correct notification names "_UIViewServiceHostDidEnterBackgroundNotification" and
"_UIViewServiceHostWillEnterForegroundNotification" to listen to view service application state changes.
Reviewed by Gavin Barraclough.
* UIProcess/ApplicationStateTracker.mm:
(WebKit::ApplicationStateTracker::ApplicationStateTracker):
2015-10-13 Myles C. Maxfield <mmaxfield@apple.com>
Split TypesettingFeatures into kerning and ligatures bools
https://bugs.webkit.org/show_bug.cgi?id=150074
Reviewed by Simon Fraser.
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):
2015-10-13 Dean Jackson <dino@apple.com>
Fix iOS-family builds.
* UIProcess/API/C/mac/WKPagePrivateMac.mm:
(WKPageGetObjectRegistry):
* UIProcess/API/Cocoa/WKBrowsingContextController.mm:
(-[WKBrowsingContextController _remoteObjectRegistry]):
* UIProcess/API/mac/WKViewInternal.h:
2015-10-13 Anders Carlsson <andersca@apple.com>
Fix 32-bit build.
* UIProcess/API/C/mac/WKPagePrivateMac.mm:
(WKPageGetObjectRegistry):
2015-10-13 Anders Carlsson <andersca@apple.com>
Add and implement WKPageGetObjectRegistry
https://bugs.webkit.org/show_bug.cgi?id=150102
Reviewed by Tim Horton.
Put the _WKObjectRegistry used by WKPageRef and WKBrowsingContextController on the WKView for now.
If we decide to share more code between WKView and WKWebView, the object registry could live in an object that would be shared
between WKView and WKWebView.
* UIProcess/API/C/mac/WKPagePrivateMac.h:
* UIProcess/API/C/mac/WKPagePrivateMac.mm:
(WKPageGetObjectRegistry):
* UIProcess/API/Cocoa/WKBrowsingContextController.mm:
(-[WKBrowsingContextController _remoteObjectRegistry]):
(-[WKBrowsingContextController dealloc]): Deleted.
* UIProcess/API/mac/WKView.mm:
(-[WKView dealloc]):
(-[WKView _remoteObjectRegistry]):
* UIProcess/API/mac/WKViewInternal.h:
2015-10-13 Chris Dumez <cdumez@apple.com>
Avoid useless copies in range-loops that are using 'auto'
https://bugs.webkit.org/show_bug.cgi?id=150091
Reviewed by Sam Weinig.
Avoid useless copies in range-loops that are using 'auto'. Also use
'auto*' instead of 'auto' when range values are pointers for clarity.
* UIProcess/VisitedLinkStore.cpp:
(WebKit::VisitedLinkStore::pendingVisitedLinksTimerFired):
(WebKit::VisitedLinkStore::resizeTable):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::releaseRemainingIconsForPageURLs):
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::fetchData):
(WebKit::WebsiteDataStore::removeData):
(WebKit::WebsiteDataStore::plugins):
2015-10-13 Said Abou-Hallawa <sabouhallawa@apple.com>
Add debug settings for using giant tiles (4096x4096)
https://bugs.webkit.org/show_bug.cgi?id=149977
<rdar://problem/23017093>
Reviewed by Tim Horton.
* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetUseGiantTiles):
(WKPreferencesGetUseGiantTiles):
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
2015-10-13 Brent Fulgham <bfulgham@apple.com>
[iOS] Avoid crash due to invalid screen bounds
https://bugs.webkit.org/show_bug.cgi?id=150048
<rdar://problem/22112664>
Reviewed by Jer Noble.
Check for an invalid bounds, and reset it to a known state before
attempting to use it.
* WebProcess/ios/WebVideoFullscreenManager.mm:
(WebKit::WebVideoFullscreenManager::setVideoLayerFrameFenced):
2015-10-13 Sergio Villar Senin <svillar@igalia.com>
[GTK] Fix build for ENABLE_TOUCH_EVENTS=OFF
https://bugs.webkit.org/show_bug.cgi?id=150085
Reviewed by Carlos Garcia Campos.
* Shared/gtk/NativeWebTouchEventGtk.cpp:
* Shared/gtk/WebEventFactory.cpp:
* Shared/gtk/WebEventFactory.h:
* UIProcess/API/gtk/PageClientImpl.cpp:
* UIProcess/API/gtk/PageClientImpl.h:
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkit_web_view_base_class_init):
2015-10-13 Chris Dumez <cdumez@apple.com>
Avoid useless copying of Key::HashType in loops in NetworkCache::Storage::synchronize()
https://bugs.webkit.org/show_bug.cgi?id=150061
Reviewed by Carlos Garcia Campos.
Avoid useless copying of Key::HashType in loops in NetworkCache::Storage::synchronize().
Key::HashType is currently a SHA1::Digest, which is a std::array<uint8_t, 20>.
* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::Storage::synchronize):
2015-10-12 Philip Chimento <philip.chimento@gmail.com>
[GTK] OSX linker doesn't understand --whole-archive
https://bugs.webkit.org/show_bug.cgi?id=144557
Reviewed by Martin Robinson.
* PlatformGTK.cmake: Link with extra libraries on Darwin, since
we don't have the --whole-archive linker option.
2015-10-09 Anders Carlsson <andersca@apple.com>
Don't allow plug-ins to override image types for <embed> elements
https://bugs.webkit.org/show_bug.cgi?id=149979
Reviewed by Tim Horton.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::objectContentType):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2015-10-12 Gyuyoung Kim <gyuyoung.kim@webkit.org>
[EFL] Bump Version/X in user agent
https://bugs.webkit.org/show_bug.cgi?id=150013
Reviewed by Csaba Osztrogonác.
EFL port needs to ensure maximum compatibility with existing web sites.
Thus version number needs to be bumped from 5.0 to 8.0 as GTK port.
* UIProcess/efl/WebPageProxyEfl.cpp:
(WebKit::WebPageProxy::standardUserAgent):
2015-10-10 Dan Bernstein <mitz@apple.com>
[iOS] Remove unnecessary iOS version checks
https://bugs.webkit.org/show_bug.cgi?id=150002
Reviewed by Alexey Proskuryakov.
* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
* Platform/IPC/mac/ConnectionMac.mm:
(IPC::AccessibilityProcessSuspendedNotification):
* Platform/spi/ios/SafariServicesSPI.h:
* Platform/spi/ios/UIKitSPI.h:
* Shared/Network/NetworkProcessCreationParameters.cpp:
(WebKit::NetworkProcessCreationParameters::encode):
(WebKit::NetworkProcessCreationParameters::decode):
* Shared/Network/NetworkProcessCreationParameters.h:
* Shared/Plugins/PluginProcessCreationParameters.cpp:
(WebKit::PluginProcessCreationParameters::encode):
(WebKit::PluginProcessCreationParameters::decode):
* Shared/Plugins/PluginProcessCreationParameters.h:
* Shared/WebEventConversion.cpp:
(WebKit::WebKit2PlatformTouchPoint::WebKit2PlatformTouchPoint):
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* Shared/ios/NativeWebTouchEventIOS.mm:
(WebKit::NativeWebTouchEvent::extractWebTouchPoint):
(WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
* Shared/ios/WebPlatformTouchPointIOS.cpp:
(WebKit::WebPlatformTouchPoint::encode):
(WebKit::WebPlatformTouchPoint::decode):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _mayAutomaticallyShowVideoPictureInPicture]):
(shouldAllowPictureInPictureMediaPlayback):
(-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
(WebKit::WebProcessPool::platformInitializeNetworkProcess):
* UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
(WebKit::PluginProcessProxy::platformInitializePluginProcess):
* UIProcess/ios/ViewGestureControllerIOS.mm:
(-[WKSwipeTransitionController gestureRecognizerForInteractiveTransition:WithTarget:action:]):
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView setupInteraction]):
(-[WKContentView _ensureFormAccessoryView]):
(-[WKContentView webSelectionAssistant]):
(-[WKContentView selectionInteractionAssistant]):
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::create):
* UIProcess/ios/forms/WKFileUploadPanel.mm:
(photoLibraryIcon):
(cameraIcon):
(fallbackIconForFile):
(iconForImageFile):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::flushLayers):
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::flushLayers):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):
2015-10-10 Dan Bernstein <mitz@apple.com>
[iOS] Remove project support for iOS 8
https://bugs.webkit.org/show_bug.cgi?id=149993
Reviewed by Alexey Proskuryakov.
* Configurations/Base.xcconfig:
* Configurations/BaseLegacyProcess.xcconfig:
* Configurations/BaseXPCService.xcconfig:
* Configurations/PluginProcessShim.xcconfig:
* Configurations/SecItemShim.xcconfig:
* Configurations/WebKit.xcconfig:
* Configurations/WebKit2.xcconfig:
* Configurations/WebProcessShim.xcconfig:
2015-10-09 Myles C. Maxfield <mmaxfield@apple.com>
Unreviewed, rolling out r190689
https://bugs.webkit.org/show_bug.cgi?id=149992
Fixed in other repository.
Reverted changesets:
"Unreviewed, rolling out r190572, r190593, r190594, and r190639."
https://bugs.webkit.org/show_bug.cgi?id=149897
2015-10-09 Beth Dakin <bdakin@apple.com>
Rubber-stamped by Anders Carlsson.
Remove unnecessary includes.
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/Plugins/Plugin.h:
* WebProcess/Plugins/PluginProxy.h:
* WebProcess/Plugins/PluginView.h:
* WebProcess/WebPage/mac/WebPageMac.mm:
2015-10-09 Beth Dakin <bdakin@apple.com>
Build fix.
* CMakeLists.txt:
* Shared/API/APIHitTestResult.cpp: Removed.
* Shared/API/APIHitTestResult.h: Removed.
* WebKit2.xcodeproj/project.pbxproj:
2015-10-09 Beth Dakin <bdakin@apple.com>
Build fix.
* UIProcess/API/APIHitTestResult.cpp: Copied from Shared/API/APIHitTestResult.cpp.
* UIProcess/API/APIHitTestResult.h: Copied from Shared/API/APIHitTestResult.h.
* UIProcess/mac/PageClientImpl.mm:
2015-10-09 Beth Dakin <bdakin@apple.com>
WKWebView needs SPI to customize immediate actions
https://bugs.webkit.org/show_bug.cgi?id=149939
-and corresponding-
rdar://problem/20016849
Reviewed by Anders Carlsson.
This patch breaks WebHitTestResult into two files. WebHiTestResultData
continues to live in the WebKit namespace and contains the old
WebHitTestResult::Data struct. The rest of WebHitTestResult is now
API::HitTestResult. The patch also adds _WKHitTestResult as Obj-C API to wrap
API::HitTestResult.
Attempt to keep other ports happy with new files.
* CMakeLists.txt:
WebKit::WebHitTestResult no longer contains the Data struct and is now called
API::HitTestResult.
* Shared/API/APIHitTestResult.cpp: Copied from Shared/WebHitTestResult.cpp.
(API::HitTestResult::create):
(WebKit::WebHitTestResult::create): Deleted.
(WebKit::WebHitTestResult::Data::Data): Deleted.
(WebKit::WebHitTestResult::Data::~Data): Deleted.
(WebKit::WebHitTestResult::Data::encode): Deleted.
(WebKit::WebHitTestResult::Data::decode): Deleted.
(WebKit::WebHitTestResult::Data::platformEncode): Deleted.
(WebKit::WebHitTestResult::Data::platformDecode): Deleted.
(WebKit::WebHitTestResult::Data::elementBoundingBoxInWindowCoordinates): Deleted.
* Shared/API/APIHitTestResult.h: Copied from Shared/WebHitTestResult.h.
(API::HitTestResult::absoluteImageURL):
(API::HitTestResult::absolutePDFURL):
(API::HitTestResult::absoluteLinkURL):
(API::HitTestResult::absoluteMediaURL):
(API::HitTestResult::linkLabel):
(API::HitTestResult::linkTitle):
(API::HitTestResult::lookupText):
(API::HitTestResult::isContentEditable):
(API::HitTestResult::isDownloadableMedia):
(API::HitTestResult::HitTestResult):
(WebKit::WebHitTestResult::absoluteImageURL): Deleted.
(WebKit::WebHitTestResult::absolutePDFURL): Deleted.
(WebKit::WebHitTestResult::absoluteLinkURL): Deleted.
(WebKit::WebHitTestResult::absoluteMediaURL): Deleted.
(WebKit::WebHitTestResult::linkLabel): Deleted.
(WebKit::WebHitTestResult::linkTitle): Deleted.
(WebKit::WebHitTestResult::lookupText): Deleted.
(WebKit::WebHitTestResult::isContentEditable): Deleted.
(WebKit::WebHitTestResult::isDownloadableMedia): Deleted.
(WebKit::WebHitTestResult::WebHitTestResult): Deleted.
This is a new obj-c object that we can use for the modern immediate action
API.
* Shared/API/Cocoa/_WKHitTestResult.h: Added.
* Shared/API/Cocoa/_WKHitTestResult.mm: Added.
(-[_WKHitTestResult dealloc]):
(-[_WKHitTestResult absoluteImageURL]):
(-[_WKHitTestResult absolutePDFURL]):
(-[_WKHitTestResult absoluteLinkURL]):
(-[_WKHitTestResult absoluteMediaURL]):
(-[_WKHitTestResult linkLabel]):
(-[_WKHitTestResult linkTitle]):
(-[_WKHitTestResult lookupText]):
(-[_WKHitTestResult isContentEditable]):
(-[_WKHitTestResult elementBoundingBox]):
(-[_WKHitTestResult copyWithZone:]):
(-[_WKHitTestResult _apiObject]):
_WKHitTestResult wraps API::HitTestResult.
* Shared/API/Cocoa/_WKHitTestResultInternal.h: Added.
(API::wrapper):
* Shared/Cocoa/APIObject.mm:
(API::Object::newObject):
Since we want to use the same enum name for the new enum, use a #define instead of a typedef in the old C SPI. This should keep old clients working in the meantime.
* Shared/API/c/WKImmediateActionTypes.h:
WebHitTestResult::Data is now WebHitTestResultData.
* Shared/ContextMenuContextData.h:
(WebKit::ContextMenuContextData::webHitTestResultData):
(WebKit::ContextMenuContextData::selectedText):
Remove WebHitTestResult, and add WebHitTestResultData for the Data struct.
* Shared/WebHitTestResult.cpp: Removed.
* Shared/WebHitTestResult.h: Removed.
* Shared/WebHitTestResultData.cpp: Added.
(WebKit::WebHitTestResultData::WebHitTestResultData):
(WebKit::WebHitTestResultData::~WebHitTestResultData):
(WebKit::WebHitTestResultData::encode):
(WebKit::WebHitTestResultData::decode):
(WebKit::WebHitTestResultData::platformEncode):
(WebKit::WebHitTestResultData::platformDecode):
(WebKit::WebHitTestResultData::elementBoundingBoxInWindowCoordinates):
* Shared/WebHitTestResultData.h: Added.
* Shared/mac/WebHitTestResult.mm: Removed.
* Shared/mac/WebHitTestResultData.mm: Copied from Shared/mac/WebHitTestResult.mm.
(WebKit::WebHitTestResultData::platformEncode):
(WebKit::WebHitTestResultData::platformDecode):
(WebKit::WebHitTestResult::Data::platformEncode): Deleted.
(WebKit::WebHitTestResult::Data::platformDecode): Deleted.
WebHitTestResult::Data is now WebHitTestResultData.
* UIProcess/API/APIContextMenuClient.h:
(API::ContextMenuClient::~ContextMenuClient):
(API::ContextMenuClient::getContextMenuFromProposedMenu):
(API::ContextMenuClient::customContextMenuItemSelected):
(API::ContextMenuClient::contextMenuDismissed):
(API::ContextMenuClient::showContextMenu):
WebHitTestResult is now WebHitTestResult
* UIProcess/API/APIUIClient.h:
(API::UIClient::runJavaScriptPrompt):
(API::UIClient::setStatusText):
(API::UIClient::mouseDidMoveOverElement):
(API::UIClient::unavailablePluginButtonClicked):
(API::UIClient::pinnedStateDidChange):
(API::UIClient::didBeginTrackingPotentialLongMousePress):
(API::UIClient::didRecognizeLongMousePress):
(API::UIClient::didCancelTrackingPotentialLongMousePress):
* UIProcess/API/C/WKAPICast.h:
* UIProcess/API/C/WKHitTestResult.cpp:
(WKHitTestResultGetTypeID):
(WKHitTestResultCopyAbsoluteImageURL):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageContextMenuClient):
(WKPageSetPageUIClient):
New WKWebView SPI _immediateActionAnimationControllerForHitTestResult
* UIProcess/API/Cocoa/WKViewPrivate.h:
* UIProcess/API/Cocoa/WKWebView.mm:
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
Attempts to keep other ports happy with the re-name.
* UIProcess/API/efl/WebAccessibility.cpp:
* UIProcess/API/gtk/WebKitContextMenuClient.cpp:
* UIProcess/API/gtk/WebKitHitTestResult.cpp:
(webkit_hit_test_result_class_init):
(webkitHitTestResultCreate):
(stringIsEqualToCString):
(webkitHitTestResultCompare):
* UIProcess/API/gtk/WebKitHitTestResultPrivate.h:
* UIProcess/API/gtk/WebKitUIClient.cpp:
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewMakePermissionRequest):
(webkitWebViewMouseTargetChanged):
(contextMenuDismissed):
(webkitWebViewPopulateContextMenu):
* UIProcess/API/gtk/WebKitWebViewPrivate.h:
Re-name, and just use uint32_t for the old SPI.
* UIProcess/API/mac/WKView.mm:
(-[WKView _didPerformImmediateActionHitTest:contentPreventsDefault:userData:]):
(-[WKView _setDidMoveSwipeSnapshotCallback:]):
(-[WKView _immediateActionAnimationControllerForHitTestResult:withType:userData:]):
* UIProcess/API/mac/WKViewInternal.h:
PageClient will figure out whether to call into WKWebView or WKView for this
SPI.
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::immediateActionAnimationControllerForHitTestResult):
* UIProcess/WebPageProxy.h:
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::immediateActionAnimationControllerForHitTestResult):
WebKit::WebHitTestResult::Data is now WebKit::WebHitTestResultData.
* UIProcess/WebPageProxy.messages.in:
WKImmediateActionController calls through to WebPageProxy which calls to
PageClient, which figures out which API to call. Also cache the type as a
uint32_t
* UIProcess/mac/WKImmediateActionController.h:
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController _updateImmediateActionItem]):
WebHitTestResult::Data is now WebHitTestResultData.
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::platformInitializeShareMenuItem):
New files!
* WebKit2.xcodeproj/project.pbxproj:
Deal with the #define situation for the enum.
* WebKit2Prefix.h:
New names for things. WebHitTestResult::Data -> WebHitTestResultData
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/Plugins/PDF/PDFPlugin.h:
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::pointInLayoutSpaceForPointInWindowSpace):
(WebKit::PDFPlugin::lookupTextAtLocation):
* WebProcess/Plugins/Plugin.h:
* WebProcess/Plugins/PluginProxy.h:
* WebProcess/Plugins/PluginView.h:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::mouseDidMoveOverElement):
(WebKit::WebChromeClient::didBeginTrackingPotentialLongMousePress):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performImmediateActionHitTestAtLocation):
2015-10-09 Anders Carlsson <andersca@apple.com>
Remove two unused WKFrame functions
https://bugs.webkit.org/show_bug.cgi?id=149958
Reviewed by Dan Bernstein.
* UIProcess/API/C/WKFrame.cpp:
(WKFrameCopyChildFrames): Deleted.
(WKFrameGetParentFrame): Deleted.
* UIProcess/API/C/WKFrame.h:
2015-10-08 Michael Catanzaro <mcatanzaro@igalia.com>
Format string issues in NetworkCache.cpp
https://bugs.webkit.org/show_bug.cgi?id=149867
Reviewed by Csaba Osztrogonác.
Cast enums to ints before printing them to placate GCC's -Wformat.
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::retrieve):
(WebKit::NetworkCache::Cache::store):
2015-10-08 Michael Catanzaro <mcatanzaro@igalia.com>
Format string issue in WebResourceLoadScheduler.cpp
https://bugs.webkit.org/show_bug.cgi?id=149868
Reviewed by Csaba Osztrogonác.
Cast enums to ints before printing them to placate GCC's -Wformat.
* WebProcess/Network/WebResourceLoadScheduler.cpp:
(WebKit::WebResourceLoadScheduler::scheduleLoad):
2015-10-08 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Stop using a nested main loop for popup menus
https://bugs.webkit.org/show_bug.cgi?id=149920
Reviewed by Sergio Villar Senin.
WebPageProxy used to expect the popup menus to run in a nested
main loop and invalidated the menu right after showing it. But
this is no longer the case, so there's no reason to keep using
the nested main loop.
* UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
(WebKit::WebPopupMenuProxyGtk::~WebPopupMenuProxyGtk):
(WebKit::WebPopupMenuProxyGtk::cancelTracking):
(WebKit::WebPopupMenuProxyGtk::menuItemActivated):
(WebKit::WebPopupMenuProxyGtk::WebPopupMenuProxyGtk): Deleted.
(WebKit::WebPopupMenuProxyGtk::showPopupMenu): Deleted.
(WebKit::WebPopupMenuProxyGtk::shutdownRunLoop): Deleted.
(WebKit::WebPopupMenuProxyGtk::menuUnmapped): Deleted.
* UIProcess/gtk/WebPopupMenuProxyGtk.h:
(WebKit::WebPopupMenuProxyGtk::setActiveItem): Deleted.
2015-10-07 Anders Carlsson <andersca@apple.com>
Add API for getting a group identifier from a bundle page
https://bugs.webkit.org/show_bug.cgi?id=149902
Reviewed by Tim Horton.
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageCopyGroupIdentifier):
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:
2015-10-07 Csaba Osztrogonác <ossy@webkit.org>
URTBF after r190678 to fix GTK and EFL builds.
* WebProcess/InjectedBundle/efl/InjectedBundleEfl.cpp:
(WebKit::InjectedBundle::setBundleParameters):
* WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp:
(WebKit::InjectedBundle::setBundleParameters):
2015-10-07 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r190572, r190593, r190594, and
r190639.
https://bugs.webkit.org/show_bug.cgi?id=149897
Breaks Mavericks build (Requested by litherum on #webkit).
Reverted changesets:
"Allow WKRetainPtrs to be used as keys in hashing data
structures"
https://bugs.webkit.org/show_bug.cgi?id=149762
http://trac.webkit.org/changeset/190572
"REGRESSION(189668?): http/tests/notifications/events.html
flakily asserts or times out"
https://bugs.webkit.org/show_bug.cgi?id=149218
http://trac.webkit.org/changeset/190593
"Prospective Mavericks build fix."
http://trac.webkit.org/changeset/190594
"Post-review cleanup after r190572."
http://trac.webkit.org/changeset/190639
2015-10-07 Anders Carlsson <andersca@apple.com>
Provide a way to get a WKFrameInfoRef from a WKFrameRef
https://bugs.webkit.org/show_bug.cgi?id=149896
rdar://problem/23016081
Reviewed by Dan Bernstein.
* UIProcess/API/C/WKFrame.cpp:
(WKFrameCreateFrameInfo):
* UIProcess/API/C/WKFrame.h:
2015-10-07 Anders Carlsson <andersca@apple.com>
Add unreachable URL to _WKObservablePageState
https://bugs.webkit.org/show_bug.cgi?id=149893
<rdar://problem/23017235>
Reviewed by Dan Bernstein.
* UIProcess/API/C/mac/WKPagePrivateMac.h:
* UIProcess/API/C/mac/WKPagePrivateMac.mm:
(-[WKObservablePageState unreachableURL]):
2015-10-07 Anders Carlsson <andersca@apple.com>
Add -[WKProcessPool _setObjectsForBundleParametersWithDictionary:]
https://bugs.webkit.org/show_bug.cgi?id=149887
Reviewed by Tim Horton.
* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _setObjectsForBundleParametersWithDictionary:]):
Copy the dictionary, archive it, and set the values on the UI side bundle parameter data struct.
* UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
Add new SPI.
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.h:
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.mm:
(-[WKWebProcessBundleParameters setParameter:forKey:]):
We can just call setValue:forKey: on the dictionary; it will do the right thing if value is nil.
(-[WKWebProcessBundleParameters setParametersForKeyWithDictionary:]):
Enumerate the dictionary and call setValue:forKey: on each key/value pair.
* WebProcess/InjectedBundle/InjectedBundle.h:
* WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
(WebKit::InjectedBundle::setBundleParameter):
If we fail to unarchive a parameter, don't set it to null.
(WebKit::InjectedBundle::setBundleParameters):
Unarchive the dictionary and update the bundle parameters.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::setInjectedBundleParameters):
Call the injected bundle.
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:
Add new message.
2015-10-06 Anders Carlsson <andersca@apple.com>
Expose the bundle parameter object on WKBundleRef
https://bugs.webkit.org/show_bug.cgi?id=149860
Reviewed by Tim Horton.
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.mm:
(-[WKWebProcessBundleParameters description]):
Add a description that includes the parameters.
* WebProcess/InjectedBundle/API/c/mac/WKBundleMac.h:
* WebProcess/InjectedBundle/API/c/mac/WKBundleMac.mm:
(WKBundleGetParameters):
Add getter.
* WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
(WebKit::InjectedBundle::initialize):
Make sure to decode the bundle parameters before calling out to the bundle.
2015-10-06 Michael Catanzaro <mcatanzaro@igalia.com>
[GTK] Add autocleanups
https://bugs.webkit.org/show_bug.cgi?id=149588
Reviewed by Darin Adler.
* PlatformGTK.cmake:
* UIProcess/API/gtk/WebKitAutocleanups.h: Added.
* UIProcess/API/gtk/webkit2.h:
* WebProcess/InjectedBundle/API/gtk/WebKitWebExtensionAutocleanups.h: Added.
* WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h:
2015-10-06 Anders Carlsson <andersca@apple.com>
Try to fix the 32-bit build.
* UIProcess/API/C/mac/WKPagePrivateMac.mm:
2015-10-06 Anders Carlsson <andersca@apple.com>
WKPage needs to expose a KVO-compliant object, similar to WKWebView
https://bugs.webkit.org/show_bug.cgi?id=149851
rdar://problem/22382022
Reviewed by Dan Bernstein.
Move the PageLoadStateObserver object from WKBrowsingContextController out into a separate file and make it
work with any Objective-C object. Use it in WKObservablePageState and add a WKPageCreateObservableState function.
* UIProcess/API/C/mac/WKPagePrivateMac.h:
* UIProcess/API/C/mac/WKPagePrivateMac.mm: Renamed from Source/WebKit2/UIProcess/API/C/mac/WKPagePrivateMac.cpp.
(-[WKObservablePageState initWithPage:]):
(-[WKObservablePageState dealloc]):
(-[WKObservablePageState isLoading]):
(-[WKObservablePageState title]):
(-[WKObservablePageState URL]):
(-[WKObservablePageState hasOnlySecureContent]):
(-[WKObservablePageState estimatedProgress]):
(WKPageCreateObservableState):
(WKPageGetProcessIdentifier):
(WKPageIsURLKnownHSTSHost):
* UIProcess/API/Cocoa/PageLoadStateObserver.h: Added.
(WebKit::PageLoadStateObserver::PageLoadStateObserver):
* UIProcess/API/Cocoa/WKBrowsingContextController.mm:
(PageLoadStateObserver::PageLoadStateObserver): Deleted.
* WebKit2.xcodeproj/project.pbxproj:
2015-10-06 Daniel Bates <dbates@webkit.org>
Enable XSLT when building WebKit for iOS using the public iOS SDK
https://bugs.webkit.org/show_bug.cgi?id=149827
Reviewed by Alexey Proskuryakov.
* Configurations/FeatureDefines.xcconfig:
2015-10-06 Emanuele Aina <emanuele.aina@collabora.com>
Fix ENABLE_OPENGL=OFF builds
https://bugs.webkit.org/show_bug.cgi?id=146511
Reviewed by Darin Adler.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseRealize):
(webkitWebViewBaseDraw):
(webkitWebViewBaseDidRelaunchWebProcess):
Replace USE(TEXTURE_MAPPER_GL) with USE(TEXTURE_MAPPER) around
webkitWebViewRenderAcceleratedCompositingResults()
* UIProcess/DrawingAreaProxyImpl.cpp:
* UIProcess/DrawingAreaProxyImpl.h:
* WebProcess/WebPage/DrawingArea.cpp:
(WebKit::DrawingArea::DrawingArea):
* WebProcess/WebPage/DrawingArea.h:
* WebProcess/WebPage/LayerTreeHost.h:
Replace USE(TEXTURE_MAPPER_GL) with USE(TEXTURE_MAPPER) around
setNativeSurfaceHandleForCompositing().
* UIProcess/gtk/WebPreferencesGtk.cpp:
(WebKit::WebPreferences::platformInitializeStore):
Default to no AC if no GL support has been built.
* WebProcess/WebPage/DrawingArea.messages.in:
Replace USE(TEXTURE_MAPPER_GL) with USE(TEXTURE_MAPPER) around
SetNativeSurfaceHandleForCompositing.
* WebProcess/WebPage/DrawingAreaImpl.h:
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode):
Replace USE(TEXTURE_MAPPER_GL) with USE(TEXTURE_MAPPER) around
setNativeSurfaceHandleForCompositing().
(WebKit::DrawingAreaImpl::setNativeSurfaceHandleForCompositing):
Force setAcceleratedCompositingEnabled() only if a LayerTreeHost
implementation is available, to avoid crashing when building without
any GL support.
2015-10-06 Csaba Osztrogonác <ossy@webkit.org>
URTBF after r190611.
* CMakeLists.txt:
2015-10-06 Alex Christensen <achristensen@webkit.org>
Report error when main resource is blocked by content blocker
https://bugs.webkit.org/show_bug.cgi?id=149719
rdar://problem/21970595
Reviewed by Brady Eidson.
* Shared/API/c/WKErrorRef.h:
* WebProcess/WebCoreSupport/WebErrors.h:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::blockedError):
(WebKit::WebFrameLoaderClient::blockedByContentBlockerError):
(WebKit::WebFrameLoaderClient::cannotShowURLError):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
* WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp:
(WebKit::blockedError):
(WebKit::blockedByContentBlockerError):
(WebKit::cannotShowURLError):
* WebProcess/WebCoreSupport/gtk/WebErrorsGtk.cpp:
(WebKit::blockedError):
(WebKit::blockedByContentBlockerError):
(WebKit::cannotShowURLError):
* WebProcess/WebCoreSupport/mac/WebErrorsMac.mm:
(WebKit::blockedError):
(WebKit::blockedByContentBlockerError):
(WebKit::cannotShowURLError):
Make a new error type for loads that were blocked by a content blocker.
2015-10-05 Jer Noble <jer.noble@apple.com>
[iOS] REGRESSION(r190434): Media continues to play when locking screen
https://bugs.webkit.org/show_bug.cgi?id=149822
Reviewed by Brent Fulgham.
Pass through isSuspendedUnderLock when notifying the WebPage that the
applicationWillEnterForeground, and pass that boolean in the userInfo of the
WebUIApplicationWillEnterForegroundNotification.
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::applicationWillEnterForeground):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::applicationWillEnterForeground):
2015-10-05 Anders Carlsson <andersca@apple.com>
Get rid of some dead code
https://bugs.webkit.org/show_bug.cgi?id=149825
Reviewed by Tim Horton.
* UIProcess/API/APIUIClient.h:
(API::UIClient::didDraw): Deleted.
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageUIClient): Deleted.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didDraw): Deleted.
* UIProcess/WebPageProxy.h:
2015-10-05 Myles C. Maxfield <mmaxfield@apple.com>
Prospective Mavericks build fix.
Unreviewed.
* UIProcess/API/cpp/WKRetainPtr.h:
2015-10-05 Beth Dakin <bdakin@apple.com>
Compress snapshots on iOS
https://bugs.webkit.org/show_bug.cgi?id=149814
-and corresponding-
rdar://problem/22976230
Reviewed by Simon Fraser.
Compress the snapshot.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _takeViewSnapshot]):
Since the snapshots are converted to YUV asynchronously, it is possible to
get here and have a snapshot that does not yet have an image, so we have to
relax this constraint.
* UIProcess/mac/ViewSnapshotStore.mm:
(WebKit::ViewSnapshotStore::recordSnapshot):
2015-10-05 Myles C. Maxfield <mmaxfield@apple.com>
Allow WKRetainPtrs to be used as keys in hashing data structures
https://bugs.webkit.org/show_bug.cgi?id=149762
Reviewed by Anders Carlsson.
Use RefPtr as a model.
* UIProcess/API/cpp/WKRetainPtr.h:
(WebKit::WKRetainPtr::WKRetainPtr):
(WebKit::WKRetainPtr::isHashTableDeletedValue):
(WebKit::WKRetainPtr::hashTableDeletedValue):
(WTF::HashTraits<WKRetainPtr<P>>::emptyValue):
(WTF::HashTraits<WKRetainPtr<P>>::peek):
2015-10-05 Enrica Casucci <enrica@apple.com>
Cannot select certain text on Wikipedia homepage even when zoomed in.
https://bugs.webkit.org/show_bug.cgi?id=149758
rdar://problem/22407947
Reviewed by Dan Bernstein.
Several functions that handle gestures for text selection are used for both
editable and non editable content. When used on editable content, the point
where the gesture occurs needs to be constrained within the boundaries of the
editable element. In the WebProcess we decide whether to constrain the point or not only based
on the presence of the assisted node.
That unfortunately does not guarantee that the user is actually editing the element,
but only that the element is focused. Since the knowledge about the interaction exists reliably
in the UI process, this patch adds a parameter to each gesture handler that tries to clip
the point, to indicate whether the user is actually interacting with the element so that
in the WebProcess the assisted node information can be used to constrain the point.
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::deviceOrientation):
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _isInteractingWithAssistedNode]):
(-[WKContentView changeSelectionWithGestureAt:withGesture:withState:]):
(-[WKContentView selectPositionAtPoint:completionHandler:]):
(-[WKContentView selectPositionAtBoundary:inDirection:fromPoint:completionHandler:]):
(-[WKContentView selectTextWithGranularity:atPoint:completionHandler:]):
(-[WKContentView updateSelectionWithExtentPoint:completionHandler:]):
(-[WKContentView updateSelectionWithExtentPoint:withBoundary:completionHandler:]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::selectWithGesture):
(WebKit::WebPageProxy::selectTextWithGranularityAtPoint):
(WebKit::WebPageProxy::selectPositionAtBoundaryWithDirection):
(WebKit::WebPageProxy::selectPositionAtPoint):
(WebKit::WebPageProxy::updateSelectionWithExtentPoint):
(WebKit::WebPageProxy::updateSelectionWithExtentPointAndBoundary):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::selectWithGesture):
(WebKit::WebPage::visiblePositionInFocusedNodeForPoint):
(WebKit::WebPage::selectPositionAtPoint):
(WebKit::WebPage::selectPositionAtBoundaryWithDirection):
(WebKit::WebPage::rangeForGranularityAtPoint):
(WebKit::WebPage::selectTextWithGranularityAtPoint):
(WebKit::WebPage::updateSelectionWithExtentPointAndBoundary):
(WebKit::WebPage::updateSelectionWithExtentPoint):
2015-10-05 Antti Koivisto <antti@apple.com>
Remove CancelResourceLoader message
https://bugs.webkit.org/show_bug.cgi?id=149801
Reviewed by Andreas Kling.
It has no clients.
* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::messageSenderDestinationID):
(WebKit::WebResourceLoader::detachFromCoreLoader):
(WebKit::WebResourceLoader::cancelResourceLoader): Deleted.
* WebProcess/Network/WebResourceLoader.h:
* WebProcess/Network/WebResourceLoader.messages.in:
2015-10-03 Ricky Mondello <rmondello@apple.com>
"Plug-in is blocked" message doesn't draw correctly
https://bugs.webkit.org/show_bug.cgi?id=149741
<rdar://problem/22920949>
Patch by Conrad Shultz and Ricky Mondello.
Reviewed by Anders Carlsson.
If a WebKit client sets plug-in X to not be visible to the web, that doesn't mean we shouldn't consult
that plug-in when determining what kind of object type an object is. Properly classifying a non-web-visible
Netscape plug-in as such allows its bounds to properly measured, allowing it to be drawn properly.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::objectContentType): Use PluginData's supportsMimeType, rather than its
supportsWebVisibleMimeType, when determining the ObjectContentType for a MIME type on a url.
2015-10-02 Enrica Casucci <enrica@apple.com>
Text selection is inaccurate in Wikipedia pages when starting navigation from wikipedia.org.
https://bugs.webkit.org/show_bug.cgi?id=149756
rdar://problem/22332409
Reviewed by Tim Horton.
When loading a new document into the same WebPage object, we need
to clear the assisted node, since there is no guarantee that the
node will be blurred. The bug is caused by the use of a stale
assisted node to constrain the point where the gesture occurs.
A fix for this problem was landed in http://trac.webkit.org/changeset/179885
where the cleanup was added when FrameLoaderClient::detach2 was called.
This method doesn't seem to be called any longer for the main frame,
so the correct solution is to add the cleanup to didCommitLoad in WebPage.
I've also added some checks to webSelectionsRects and selectedTextRange to avoid
the use of postLayoutData when the selection is none.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView webSelectionRects]):
(-[WKContentView selectedTextRange]):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::detachedFromParent2): Removed call to resetAssistedNodeForFrame.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didCommitLoad): Added call to resetAssistedNodeForFrame.
2015-10-02 Alex Christensen <achristensen@webkit.org>
Reloading without content blockers doesn't apply to resource loads after the main frame finishes
https://bugs.webkit.org/show_bug.cgi?id=149430
rdar://problem/22742222
Reviewed by Geoffrey Garen.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::createDocumentLoader):
Copy the state of whether content extensions are disabled from the Page to the DocumentLoader
when making a DocumentLoader.
2015-10-02 Antoine Quint <graouts@apple.com>
popstate is fired at the wrong time on load
https://bugs.webkit.org/show_bug.cgi?id=94265
Reviewed by Darin Adler.
Ensure we have a valid page before trying to get to its drawingArea as this could lead
to a crash as observed with fast/loader/stateobjects/pushstate-object-types.html.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::restoreViewState):
2015-10-01 Antti Koivisto <antti@apple.com>
Network cache: Subresource referer header wrong after cached redirect
https://bugs.webkit.org/show_bug.cgi?id=149709
rdar://problem/22917174
Reviewed by Chris Dumez.
If a main resource is loaded from a cache entry that involved redirects the document
will end up setting the Referer-headers of the subresources to the request URL not the redirected URL
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::didRetrieveCacheEntry):
If a cache entry involved a redirect synthesize a minimal willSendRequest message so that WebCore side
runs through the same code paths as when receiving a redirect from network.
2015-10-01 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Websites with invalid auth header keep loading forever
https://bugs.webkit.org/show_bug.cgi?id=149710
Reviewed by Martin Robinson.
Do not show the remember credentials checkbutton in the auth
dialog if the realm is empty.
* UIProcess/API/gtk/WebKitAuthenticationDialog.cpp:
(webkitAuthenticationDialogInitialize):
2015-09-30 Chris Dumez <cdumez@apple.com>
Unreviewed, roll out r188331: "NetworkProcess: DNS prefetch happens in the Web Process"
<rdar://problem/22560715>
Speculative roll out of r188331 as we had a ~2.5% PLT regression around
the time it landed and it seems the most likely culprit. I'll reland if
the perf bots do not recover after the roll out.
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::storageSession): Deleted.
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp:
(webkitWebExtensionDidReceiveMessage):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::sendTapHighlightForNodeIfNecessary):
* WebProcess/WebProcess.cpp:
* WebProcess/WebProcess.h:
2015-09-30 Timothy Horton <timothy_horton@apple.com>
Compute document marker rects at use time instead of paint time
https://bugs.webkit.org/show_bug.cgi?id=149643
Reviewed by Darin Adler.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::didInvalidateDocumentMarkerRects):
* WebProcess/WebCoreSupport/WebChromeClient.h:
Plumb the notification about invalidated document marker rects through to FindController.
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::updateFindUIAfterPageScroll):
Make a document-relative PageOverlay, so that we get fast scrolling.
(WebKit::FindController::rectsForTextMatchesInRect):
Return find hole rects in main-FrameView content coordinates, to
match the document-relative page overlay.
We'll only return rects that intersect the passed-in rect, which
comes from the dirty rect passed to drawRect.
(WebKit::FindController::drawRect):
Inflate the dirty rect by the border width so that we hit all relevant
markers in each tile. Otherwise, we would end up missing the border of a marker
that touched the edge of a tile.
(WebKit::FindController::didInvalidateDocumentMarkerRects):
Repaint (for now, the entire overlay) when document marker rects change.
* WebProcess/WebPage/FindController.h:
2015-09-30 Carlos Alberto Lopez Perez <clopez@igalia.com>
[GTK] Build error with -DENABLE_SPELLCHECK=OFF
https://bugs.webkit.org/show_bug.cgi?id=146904
Reviewed by Carlos Garcia Campos.
Add ifdef guards to allow building when SPELLCHECK is not enabled.
* UIProcess/gtk/TextCheckerGtk.cpp:
(WebKit::TextChecker::isContinuousSpellCheckingAllowed):
(WebKit::TextChecker::setContinuousSpellCheckingEnabled):
(WebKit::TextChecker::setGrammarCheckingEnabled):
(WebKit::TextChecker::continuousSpellCheckingEnabledStateChanged):
(WebKit::TextChecker::grammarCheckingEnabledStateChanged):
(WebKit::TextChecker::checkSpellingOfString):
(WebKit::TextChecker::getGuessesForWord):
(WebKit::TextChecker::learnWord):
(WebKit::TextChecker::ignoreWord):
(WebKit::TextChecker::requestCheckingOfString):
(WebKit::TextChecker::checkTextOfParagraph):
(WebKit::TextChecker::setSpellCheckingLanguages):
(WebKit::TextChecker::loadedSpellCheckingLanguages):
2015-09-30 Gwang Yoon Hwang <yoon@igalia.com>
[GTK] Support HiDPI Properly in WebKitGtk+ with the TextureMapper
https://bugs.webkit.org/show_bug.cgi?id=141782
Reviewed by Carlos Garcia Campos.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
* UIProcess/gtk/RedirectedXCompositeWindow.cpp:
Modified to create scaled size of window.
* WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
(WebKit::LayerTreeHostGtk::initialize):
(WebKit::LayerTreeHostGtk::deviceOrPageScaleFactorChanged):
We should apply device scale factor to the root layer to apply
the scale matrix before applying other transform matrices.
(WebKit::LayerTreeHostGtk::deviceScaleFactor): Added.
(WebKit::LayerTreeHostGtk::pageScaleFactor): Added.
2015-09-29 Daniel Bates <dabates@apple.com>
Make WebKit for iOS Simulator build with the public iOS 9 SDK
https://bugs.webkit.org/show_bug.cgi?id=149652
Reviewed by Simon Fraser.
* Platform/spi/ios/SafariServicesSPI.h: Add definition for SFSafariViewController.
* Platform/spi/ios/UIKitSPI.h: Add more SPI.
* WebProcess/cocoa/WebProcessCocoa.mm: Include header pthreadSPI.h.
2015-09-29 Brady Eidson <beidson@apple.com>
Followup to "Move WebKit2 AsyncTask to WebCore CrossThreadTask."
https://bugs.webkit.org/show_bug.cgi?id=149651
Rubberstamped by Alex Christensen.
* DatabaseProcess/DatabaseProcess.h: CrossThreadTask is in the WebCore namespace, not WebKit.
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.h: Ditto.
2015-09-29 Brady Eidson <beidson@apple.com>
Move WebKit2 AsyncTask to WebCore CrossThreadTask.
https://bugs.webkit.org/show_bug.cgi?id=149651
Reviewed by Alex Christensen.
* DatabaseProcess/DatabaseProcess.cpp:
(WebKit::DatabaseProcess::ensureIndexedDatabaseRelativePathExists):
(WebKit::DatabaseProcess::postDatabaseTask):
(WebKit::DatabaseProcess::performNextDatabaseTask):
(WebKit::DatabaseProcess::fetchWebsiteData):
(WebKit::DatabaseProcess::deleteWebsiteData):
(WebKit::DatabaseProcess::deleteWebsiteDataForOrigins):
* DatabaseProcess/DatabaseProcess.h:
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::shutdown):
(WebKit::UniqueIDBDatabase::shutdownBackingStore):
(WebKit::UniqueIDBDatabase::getOrEstablishIDBDatabaseMetadata):
(WebKit::UniqueIDBDatabase::openBackingStoreAndReadMetadata):
(WebKit::UniqueIDBDatabase::openTransaction):
(WebKit::UniqueIDBDatabase::beginTransaction):
(WebKit::UniqueIDBDatabase::commitTransaction):
(WebKit::UniqueIDBDatabase::resetTransaction):
(WebKit::UniqueIDBDatabase::rollbackTransaction):
(WebKit::UniqueIDBDatabase::postTransactionOperation):
(WebKit::UniqueIDBDatabase::changeDatabaseVersion):
(WebKit::UniqueIDBDatabase::createObjectStore):
(WebKit::UniqueIDBDatabase::deleteObjectStore):
(WebKit::UniqueIDBDatabase::clearObjectStore):
(WebKit::UniqueIDBDatabase::createIndex):
(WebKit::UniqueIDBDatabase::deleteIndex):
(WebKit::UniqueIDBDatabase::putRecord):
(WebKit::UniqueIDBDatabase::getRecord):
(WebKit::UniqueIDBDatabase::openCursor):
(WebKit::UniqueIDBDatabase::cursorAdvance):
(WebKit::UniqueIDBDatabase::cursorIterate):
(WebKit::UniqueIDBDatabase::count):
(WebKit::UniqueIDBDatabase::deleteRange):
(WebKit::UniqueIDBDatabase::openBackingStoreTransaction):
(WebKit::UniqueIDBDatabase::beginBackingStoreTransaction):
(WebKit::UniqueIDBDatabase::commitBackingStoreTransaction):
(WebKit::UniqueIDBDatabase::resetBackingStoreTransaction):
(WebKit::UniqueIDBDatabase::rollbackBackingStoreTransaction):
(WebKit::UniqueIDBDatabase::changeDatabaseVersionInBackingStore):
(WebKit::UniqueIDBDatabase::createObjectStoreInBackingStore):
(WebKit::UniqueIDBDatabase::deleteObjectStoreInBackingStore):
(WebKit::UniqueIDBDatabase::clearObjectStoreInBackingStore):
(WebKit::UniqueIDBDatabase::createIndexInBackingStore):
(WebKit::UniqueIDBDatabase::deleteIndexInBackingStore):
(WebKit::UniqueIDBDatabase::putRecordInBackingStore):
(WebKit::UniqueIDBDatabase::getRecordFromBackingStore):
(WebKit::UniqueIDBDatabase::openCursorInBackingStore):
(WebKit::UniqueIDBDatabase::advanceCursorInBackingStore):
(WebKit::UniqueIDBDatabase::iterateCursorInBackingStore):
(WebKit::UniqueIDBDatabase::countInBackingStore):
(WebKit::UniqueIDBDatabase::deleteRangeInBackingStore):
(WebKit::UniqueIDBDatabase::postMainThreadTask):
(WebKit::UniqueIDBDatabase::performNextMainThreadTask):
(WebKit::UniqueIDBDatabase::postDatabaseTask):
(WebKit::UniqueIDBDatabase::performNextDatabaseTask):
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
* WebKit2.xcodeproj/project.pbxproj:
2015-09-29 Chris Dumez <cdumez@apple.com>
Memory cache revalidations should refresh the network disk cache
https://bugs.webkit.org/show_bug.cgi?id=149606
Reviewed by Darin Adler.
Previously, resource revalidations triggered by the memory cache would
bypass the disk cache entirely because the requests are conditional. As
a result, when the server responds with a 304, we were unable to update
the headers (e.g. new expiration date) of the corresponding entry in
the disk cache.
This patch updates our disk cache implementation to not bypass the disk
cache when the request is conditional. Instead, we look up the cached
entry and force its revalidation from the network. If the server then
returns a 304, we are now able to update the headers of this cached
entry. In such case though, we let the 304 response through to WebCore
unlike revalidations triggered by the disk cache.
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::didReceiveResponseAsync):
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::makeUseDecision):
(WebKit::NetworkCache::makeRetrieveDecision):
2015-09-16 Carlos Garcia Campos <cgarcia@igalia.com>
printing does not use minimum page zoom factor
https://bugs.webkit.org/show_bug.cgi?id=108507
Reviewed by Darin Adler.
Add kWKSnapshotOptionsPrinting flag to indicate the snapshot
should be generated in printing mode.
* Shared/API/c/WKImage.h:
* Shared/API/c/WKSharedAPICast.h:
(WebKit::toSnapshotOptions):
* Shared/ImageOptions.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::numberOfPages): Pass the frame as a
reference instead of a pointer.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::scaledSnapshotWithOptions): In case of printing,
calculate the bitmap height based on the number of pages.
(WebKit::WebPage::snapshotAtSize): In case of printing, use
PrintContext::spoolAllPagesWithBoundaries() and return.
2015-09-28 Brent Fulgham <bfulgham@apple.com>
Expose 'geometryFlipped' state for debugging/logging purposes
https://bugs.webkit.org/show_bug.cgi?id=149557
Reviewed by Simon Fraser.
* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::geometryFlipped): Added.
* WebProcess/WebPage/mac/PlatformCALayerRemote.h:
2015-09-28 Brady Eidson <beidson@apple.com>
Add an IDB Server that can roundtrip a request back to the client.
https://bugs.webkit.org/show_bug.cgi?id=149603
Reviewed by Alex Christensen.
* WebProcess/Databases/WebDatabaseProvider.h:
2015-09-28 Beth Dakin <bdakin@apple.com>
Heavy taps on links are sometimes interpreted as the preview gesture
https://bugs.webkit.org/show_bug.cgi?id=149304
-and corresponding-
rdar://problem/22689258
Rubber-stamped by Tim Horton.
Rolling out this patch. We should try to fix this at the UIKit-level.
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
(-[WKContentView _interactionStoppedFromPreviewItemController:]):
2015-09-27 Wenson Hsieh <wenson_hsieh@apple.com>
Expose a WKWebView API for allowing programmatic focus to trigger node assistance
https://bugs.webkit.org/show_bug.cgi?id=149567
Reviewed by Darin Adler.
Adds an API method to WKWebView that allows clients to override the default iOS behavior of not
starting node assistance when programmatically focusing. Also fixes a bug caused by naively
introducing the flag where the autofocus attribute could trigger node assistance before layout
occurs, causing an ASSERT to fail in EditorState::postLayoutData.
I fixed this issue by not assisting the node if the editor state is missing post layout data,
instead deferring node assistance until layout has occurred.
* UIProcess/API/Cocoa/WKWebView.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]): Initializes the new node assistance flag to NO, which
is the current default behavior.
(-[WKWebView canAssistOnProgrammaticFocus]):
(-[WKWebView setCanAssistOnProgrammaticFocus:]): New API method that allows clients to set node
assistance behavior upon programmatic focus.
* UIProcess/API/Cocoa/WKWebViewConfiguration.h:
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration init]): Added new node assistance flag to configuration.
(-[WKWebViewConfiguration _canAssistOnProgrammaticFocus]):
(-[WKWebViewConfiguration _setCanAssistOnProgrammaticFocus:]):
* UIProcess/WebPageProxy.h: Added NodeAssistanceArguments struct.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]): Do not return
early if the node assistance flag is set to allow programmatic focus.
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::didCommitLayerTree): After committing the layer tree, if we have deferred
starting node assistance, immediately trigger node assistance.
(WebKit::WebPageProxy::startAssistingNode): Defer starting node assistance if we have not yet repainted.
(WebKit::WebPageProxy::stopAssistingNode): Also cancel any deferred node assistance.
2015-09-26 Carlos Garcia Campos <cgarcia@igalia.com>
REGRESSION(r188639): [GTK] Several inspector tests started to time out in GTK+ bots after r188639
https://bugs.webkit.org/show_bug.cgi?id=148569
Reviewed by Darin Adler.
* PlatformGTK.cmake: Add missing inspector files required for
layout tests.
2015-09-25 Eric Carlson <eric.carlson@apple.com>
Clean up user media request internal API
https://bugs.webkit.org/show_bug.cgi?id=149527
Reviewed by Tim Horton.
* UIProcess/API/C/WKUserMediaPermissionRequest.cpp:
(WKUserMediaPermissionRequestVideoDeviceUIDs): New, renamed from WKUserMediaPermissionRequestDeviceNamesVideo.
(WKUserMediaPermissionRequestAudioDeviceUIDs): New, renamed from WKUserMediaPermissionRequestDeviceNamesAudio.
(WKUserMediaPermissionRequestAllowBest): Deleted.
(WKUserMediaPermissionRequestDeviceNamesVideo): Deleted.
(WKUserMediaPermissionRequestDeviceNamesAudio): Deleted.
(WKUserMediaPermissionRequestFirstVideoDeviceUID): Deleted.
(WKUserMediaPermissionRequestFirstAudioDeviceUID): Deleted.
* UIProcess/API/C/WKUserMediaPermissionRequest.h:
* UIProcess/API/gtk/WebKitUserMediaPermissionRequest.cpp:
(webkitUserMediaPermissionRequestAllow): Update for UserMediaRequest API change.
* UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
(WebKit::UserMediaPermissionRequestManagerProxy::createRequest): Get rid of the bool parameters.
Switch audio/video parameter order to be consistent with everywhere else.
(WebKit::UserMediaPermissionRequestManagerProxy::didReceiveUserMediaPermissionDecision): Ditto.
* UIProcess/UserMediaPermissionRequestManagerProxy.h:
* UIProcess/UserMediaPermissionRequestProxy.cpp:
(WebKit::UserMediaPermissionRequestProxy::UserMediaPermissionRequestProxy): Get rid of the bool parameters.
Switch audio/video parameter order to be consistent with everywhere else.
(WebKit::UserMediaPermissionRequestProxy::allow): Switch audio/video parameter order.
(WebKit::UserMediaPermissionRequestProxy::getDeviceNameForUID): Deleted.
* UIProcess/UserMediaPermissionRequestProxy.h:
(WebKit::UserMediaPermissionRequestProxy::create):
(WebKit::UserMediaPermissionRequestProxy::videoDeviceUIDs):
(WebKit::UserMediaPermissionRequestProxy::audioDeviceUIDs):
(WebKit::UserMediaPermissionRequestProxy::firstAudioDeviceUID):
(WebKit::UserMediaPermissionRequestProxy::requiresAudio): Deleted.
(WebKit::UserMediaPermissionRequestProxy::requiresVideo): Deleted.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::requestUserMediaPermissionForFrame): Get rid of the bool parameters.
Switch audio/video parameter order to be consistent with everywhere else.
* UIProcess/WebPageProxy.h: Ditto.
* UIProcess/WebPageProxy.messages.in: Ditto.
* WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
(WebKit::UserMediaPermissionRequestManager::startRequest): Get rid of bool params, the device
vectors have the same information.
(WebKit::UserMediaPermissionRequestManager::didReceiveUserMediaPermissionDecision): Switch audio/video
parameter order to be consistent with everywhere else. deviceUIDVideo -> videoDeviceUID,
deviceUIDAudio -> audioDeviceUID.
* WebProcess/MediaStream/UserMediaPermissionRequestManager.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didReceiveUserMediaPermissionDecision): Switch audio/video parameter order.
* WebProcess/WebPage/WebPage.h:
2015-09-25 Simon Fraser <simon.fraser@apple.com>
[iOS WK2] Add viewport tests and fix runUIScript() timing issues
https://bugs.webkit.org/show_bug.cgi?id=149577
Reviewed by Tim Horton.
When calling testRunner.runUIScript() from a page load event, the script could run
in the UI process before the current remote layer tree transaction had been handled
there. This meant that runUIScript() could query state which was about to change.
Fix by delaying the execution of the UI script until a layer tree transaction has
been handled by the UI process, leveraging the existing DrawingAreaProxy::dispatchAfterEnsuringDrawing().
This is done using a new C SPI function WKPageCallAfterNextPresentationUpdate(),
which is mirrored in the Obj-C SPI as -_doAfterNextPresentationUpdate:.
Move WKWebView SPI which is testing-related into a WKTesting category. It is expected
that this will grow significantly.
* UIProcess/API/C/WKPage.cpp:
(WKPageCallAfterNextPresentationUpdate):
* UIProcess/API/C/WKPagePrivate.h:
* UIProcess/API/Cocoa/WKWebView.mm:
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::callAfterNextPresentationUpdate):
* UIProcess/WebPageProxy.h:
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
(WebKit::TiledCoreAnimationDrawingAreaProxy::dispatchAfterEnsuringDrawing):
2015-09-25 Alexey Proskuryakov <ap@apple.com>
[Mac] Media tests start to time out after a few days of bot uptime
https://bugs.webkit.org/show_bug.cgi?id=149468
Reviewed by Darin Adler.
Make the fix work with WebKit2, and avoid touching user's media cache for WebKit1.
When UI process is not sandboxed, inherit DIRHELPER_USER_DIR_SUFFIX from it.
This means that during testing, WebContent uses a temporary directory of the form
/private/var/folders/.../T/WebKitTestRunner-VKjmz0/com.apple.WebKit.WebContent.Development,
instead of /private/var/folders/.../T/com.apple.WebKit.WebContent.Development+WebKitTestRunner.
WebKit1 now also better respects a temporary directory of the form
/private/var/folders/.../T/DumpRenderTree-VKjmz0, instead of the default, which
makes CoreMedia put its cache inside it.
As a result, almost everything is isolated per testing process, and deleted at the end.
Same with cache directories. The only outliers that I know of are plug-in directories,
which are per-process, but are not under the testing root, and thus aren't deleted.
* PluginProcess/mac/PluginProcessMac.mm:
(WebKit::PluginProcess::initializeSandbox):
* Shared/ChildProcessProxy.cpp:
(WebKit::ChildProcessProxy::fromConnection):
(WebKit::ChildProcessProxy::getLaunchOptions):
(WebKit::ChildProcessProxy::connect):
* Shared/ChildProcessProxy.h:
* Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
(WebKit::XPCServiceInitializerDelegate::getExtraInitializationData):
* Shared/SandboxInitializationParameters.h:
(WebKit::SandboxInitializationParameters::sandboxProfile):
(WebKit::SandboxInitializationParameters::setUserDirectorySuffix):
(WebKit::SandboxInitializationParameters::userDirectorySuffix):
(WebKit::SandboxInitializationParameters::setSystemDirectorySuffix): Deleted.
(WebKit::SandboxInitializationParameters::systemDirectorySuffix): Deleted.
* Shared/ios/ChildProcessIOS.mm:
(WebKit::ChildProcess::initializeSandbox):
* Shared/mac/ChildProcessMac.mm:
(WebKit::ChildProcess::initializeSandbox):
* UIProcess/Databases/DatabaseProcessProxy.cpp:
(WebKit::DatabaseProcessProxy::getLaunchOptions):
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::getLaunchOptions):
* UIProcess/Plugins/PluginProcessProxy.cpp:
(WebKit::PluginProcessProxy::getLaunchOptions):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::getLaunchOptions):
2015-09-25 Beth Dakin <bdakin@apple.com>
Clicking on a data detected item inside a form control always pops up a map
on force touch trackpad
https://bugs.webkit.org/show_bug.cgi?id=149559
-and corresponding-
rdar://problem/22826796
Reviewed by Tim Horton.
Look for Data Detected text for text nodes and HitTestResults that are over
text inside form controls.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performImmediateActionHitTestAtLocation):
2015-09-25 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] ASSERTION FAILED: !m_inUpdateBackingStoreState in DrawingAreaImpl::display() after DrawingAreaImpl::forceRepaint()
https://bugs.webkit.org/show_bug.cgi?id=148956
Reviewed by Žan Doberšek.
This is because those tests call notifyDone in the onresize event
handler. InjectedBundlePage::dump() always calls WKBundlePageForceRepaint()
before dumping. When the view is resized DrawingAreaImpl::updateBackingStoreState()
is called, so if the size has changed the FrameView::resize()
method is called and all children are resized, so the onresize
handlers happen at that point, before the
m_inUpdateBackingStoreState is set to false again. For WTR we
could probably just return early from froceReapaint() when
m_inUpdateBackingStoreState is true, because in that case we know
the layout is updated because of the resize and the actual display
is not really needed. But the UI process can also request a force
repaint, so we could wait until the backing store update is done
and then force the repaint. For WTR it will happen after the
dump, but it shouldn't be a problem.
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::forceRepaint):
(WebKit::DrawingAreaImpl::updateBackingStoreState):
* WebProcess/WebPage/DrawingAreaImpl.h:
2015-09-24 Tim Horton <timothy_horton@apple.com>
Find hole drawn at subframe's 0x0 when a subframe find match is not rendered
https://bugs.webkit.org/show_bug.cgi?id=149543
Reviewed by Beth Dakin.
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::rectsForTextMatches):
Don't add empty rects to the list. Later code will just inflate them
and end up drawing a nonsensical find hole.
2015-09-24 Chris Dumez <cdumez@apple.com>
Drop XPATH_NAMESPACE_NODE from Node::NodeType enum
https://bugs.webkit.org/show_bug.cgi?id=149532
Reviewed by Ryosuke Niwa.
Drop XPATH_NAMESPACE_NODE from Node::NodeType enum as there is currently
no way to construct such Node in WebKit. This avoid having to handle this
Node type everywhere.
* WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm:
(WebKit::WKDOMNodeClass): Deleted.
2015-09-24 Ryosuke Niwa <rniwa@webkit.org>
Ran sort-Xcode-project-file.
* WebKit2.xcodeproj/project.pbxproj:
2015-09-23 Timothy Horton <timothy_horton@apple.com>
Link highlight rect is too rounded on blocks with border-radius
https://bugs.webkit.org/show_bug.cgi?id=149511
Reviewed by Dan Bernstein.
* UIProcess/ios/WKContentViewInteraction.mm:
(nsSizeForTapHighlightBorderRadius):
(-[WKContentView _updateTapHighlight]):
Scale the border radius from content to view coordinates, just like
we do for the rects that WebKit returns us.
2015-09-22 Gyuyoung Kim <gyuyoung.kim@webkit.org>
Add a file of pointer-lock to cmake ports
https://bugs.webkit.org/show_bug.cgi?id=149453
Reviewed by Csaba Osztrogonác.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::navigateToPDFLinkWithSimulatedClick): Fix a build break.
2015-09-22 Anders Carlsson <andersca@apple.com>
URL of page visited in private browsing still appears in Activity Monitor after page is closed
https://bugs.webkit.org/show_bug.cgi?id=149475
rdar://problem/22684521
Reviewed by Dan Bernstein.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::close):
Make sure to call updateActivePages after removing the page from the page map.
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::updateActivePages):
Don't include pages that have private browsing enabled.
2015-09-22 Tim Horton <timothy_horton@apple.com>
Make it more obvious when using an unaccelerated image buffer, and fix a few callers who do
https://bugs.webkit.org/show_bug.cgi?id=149428
Reviewed by Simon Fraser and Darin Adler.
* Shared/CoordinatedGraphics/threadedcompositor/ThreadSafeCoordinatedSurface.cpp:
(WebKit::ThreadSafeCoordinatedSurface::create):
2015-09-22 Andreas Kling <akling@apple.com>
[WK2][NetworkCache] New entry bodies remain in dirty memory after being written to disk.
<https://webkit.org/b/149463>
Reviewed by Antti Koivisto.
Call msync(MS_ASYNC) on cache entry bodies after writing their data to a
memory-mapped file. This turns the previously dirty memory into clean memory,
reducing our effective footprint.
I previously believed this would happen automatically when the kernel finds
itself under memory pressure, around the same time as it starts dropping
volatile pages. Turns out that's not the case. Even under considerable pressure,
we never flush this memory to file. So let's take care of it ourselves.
If this ends up generating more IO activity than we're comfortable with on some
scenario, we can look at throttling.
* NetworkProcess/cache/NetworkCacheData.cpp:
(WebKit::NetworkCache::Data::mapToFile):
2015-09-22 Chris Dumez <cdumez@apple.com>
Drop support for legacy EntityReference DOM Node type
https://bugs.webkit.org/show_bug.cgi?id=149348
Reviewed by Darin Adler.
Drop handling EntityReference Nodes.
* WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm:
(WebKit::WKDOMNodeClass): Deleted.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::isAssistableElement):
2015-09-22 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r189616.
https://bugs.webkit.org/show_bug.cgi?id=149456
suspected cause of multiple regressions (Requested by kling on
#webkit).
Reverted changeset:
"[JSC] Weak should only accept cell pointees."
https://bugs.webkit.org/show_bug.cgi?id=148955
http://trac.webkit.org/changeset/189616
2015-09-21 Timothy Horton <timothy_horton@apple.com>
Allow DataDetectors to pre-filter telephone number menu items
https://bugs.webkit.org/show_bug.cgi?id=149444
<rdar://problem/19286320>
Reviewed by Sam Weinig.
* Platform/mac/MenuUtilities.mm:
(WebKit::menuItemForTelephoneNumber):
(WebKit::menuForTelephoneNumber):
Let DataDetectors know what kind of items we want, so that they can avoid
some unnecessary work in cases where we were just going to throw away the items anyway.
2015-09-21 Gwang Yoon Hwang <yoon@igalia.com>
[Threaded Compositor] Modified to use reference of GraphicsContext instead of pointer
https://bugs.webkit.org/show_bug.cgi?id=149399
Reviewed by Darin Adler.
This fixes build failure after r189144
* Shared/CoordinatedGraphics/threadedcompositor/ThreadSafeCoordinatedSurface.cpp:
(WebKit::ThreadSafeCoordinatedSurface::paintToSurface):
(WebKit::ThreadSafeCoordinatedSurface::beginPaint):
(WebKit::ThreadSafeCoordinatedSurface::endPaint):
* Shared/CoordinatedGraphics/threadedcompositor/ThreadSafeCoordinatedSurface.h:
2015-09-21 Simon Fraser <simon.fraser@apple.com>
Add the ability for tests to run script in the UI process in WebKitTestRunner
https://bugs.webkit.org/show_bug.cgi?id=149356
Reviewed by Tim Horton.
Expose a few private functions for testing.
* UIProcess/API/Cocoa/WKWebView.mm:
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
2015-09-21 Tim Horton <timothy_horton@apple.com>
Layout milestones aren't synchronized with UI-side compositing transactions
https://bugs.webkit.org/show_bug.cgi?id=149362
Reviewed by Anders Carlsson.
Because layout milestones are primarily used to synchronize things with
the displayed layout/rendering of the page, they should fire at the same
time as the contents of the view change.
However, with UI-side compositing, the layer tree transaction will
most likely come in *after* the layout milestones associated with its
contents fire, breaking this synchronization.
Instead, put the layout milestones inside the transaction and fire them
immediately after it is committed in the UI process.
* Shared/mac/RemoteLayerTreeTransaction.h:
(WebKit::RemoteLayerTreeTransaction::setCallbackIDs):
(WebKit::RemoteLayerTreeTransaction::newlyReachedLayoutMilestones):
(WebKit::RemoteLayerTreeTransaction::setNewlyReachedLayoutMilestones):
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::RemoteLayerTreeTransaction):
(WebKit::RemoteLayerTreeTransaction::encode):
(WebKit::RemoteLayerTreeTransaction::decode):
Add LayoutMilestones to the transaction.
* UIProcess/API/APILoaderClient.h:
(API::LoaderClient::didLayout):
* UIProcess/API/APINavigationClient.h:
(API::NavigationClient::renderingProgressDidChange):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageLoaderClient):
(WKPageSetPageNavigationClient):
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::NavigationClient::renderingProgressDidChange):
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::didCommitLayerTree):
Remove the UserData parameter from didLayout/renderingProgressDidChange,
except for at the API level where we'll always pass null.
Nobody uses UserData on didLayout, and we'll assert if any client sets it
(and it won't get passed through to the UI process).
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didLayoutForCustomContentProvider):
Just call didLayout with the relevant milestones instead of reimplementing it.
(WebKit::WebPageProxy::didLayout):
* UIProcess/WebPageProxy.h:
Make didLayout public.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidLayout):
Let WebPage handle dispatching didLayout.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::dispatchDidLayout):
* WebProcess/WebPage/WebPage.h:
Let the DrawingArea handle dispatching didLayout.
If it doesn't want to handle it, we'll just do the normal thing
and dispatch an async message.
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
If we reach a new layout milestone, dispatch didLayout client/delegate callbacks.
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::dispatchDidLayout):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::flushLayers):
(WebKit::RemoteLayerTreeDrawingArea::dispatchDidLayout):
Queue up milestones as we reach them, and send them in the transaction.
2015-09-20 Youenn Fablet <youenn.fablet@crf.canon.fr>
Remove XHR_TIMEOUT compilation guard
https://bugs.webkit.org/show_bug.cgi?id=149260
Reviewed by Benjamin Poulain.
* Configurations/FeatureDefines.xcconfig:
2015-09-19 Michael Catanzaro <mcatanzaro@igalia.com>
[GTK] WebEditorClient::supportsGlobalSelection returns true under Wayland
https://bugs.webkit.org/show_bug.cgi?id=149375
Reviewed by Darin Adler.
WebEditorClient::supportsGlobalSelection should return false when running under Wayland,
since Wayland does not have any equivalent for PRIMARY or the concept of a global selection.
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::supportsGlobalSelection):
2015-09-19 Dan Bernstein <mitz@apple.com>
Attempted build fix.
* mac/postprocess-framework-headers.sh: Fixed an overzealous regular expression.
2015-09-18 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r189908.
https://bugs.webkit.org/show_bug.cgi?id=149368
Broke run-webkit-tests --pixel (Requested by ap on #webkit).
Reverted changeset:
"printing does not use minimum page zoom factor"
https://bugs.webkit.org/show_bug.cgi?id=108507
http://trac.webkit.org/changeset/189908
2015-09-18 Andy Estes <aestes@apple.com>
[iOS] did{Start,Finish}LoadForQuickLookDocumentInMainFrame is never called on WKNavigationDelegate
https://bugs.webkit.org/show_bug.cgi?id=149360
Reviewed by Tim Horton.
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::didStartLoadForQuickLookDocumentInMainFrame): Called on m_navigationDelegate if non-null.
(WebKit::WebPageProxy::didFinishLoadForQuickLookDocumentInMainFrame): Ditto.
2015-09-18 Beth Dakin <bdakin@apple.com>
Snapshots broken on iOS
https://bugs.webkit.org/show_bug.cgi?id=149354
Reviewed by Tim Horton.
We need to send the IOSurface to ViewSnapshot::create() for this to work.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _takeViewSnapshot]):
2015-09-18 Chris Dumez <cdumez@apple.com>
Drop support for Entity Node type
https://bugs.webkit.org/show_bug.cgi?id=149239
Reviewed by Darin Adler.
Stop handling the Entity node type.
* WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm:
2015-09-17 Brian Burg <bburg@apple.com>
ASSERT(!m_frontendRouter->hasLocalFrontend()) when running Web Inspector tests
https://bugs.webkit.org/show_bug.cgi?id=149006
<rdar://problem/22654257>
<rdar://problem/22631369>
Reviewed by Joseph Pecoraro.
Stop using InspectorController to close the frontend page. Go through
the FrontendClient instead. Reduce redundant code paths.
This change seems to fix some recent crashes that were seen when
closing Safari with Web Inspector open. These were caused by the frontend
channel not being disconnected at the right time.
* WebProcess/WebCoreSupport/WebInspectorClient.cpp:
(WebKit::WebInspectorClient::inspectedPageDestroyed):
(WebKit::WebInspectorClient::closeLocalFrontend): Deleted.
* WebProcess/WebCoreSupport/WebInspectorClient.h:
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::close):
* WebProcess/WebPage/WebInspectorUI.cpp:
(WebKit::WebInspectorUI::establishConnection):
Save a pointer to the frontend's InspectorController since we may
need to use it while the page is being destructed and its getter
is no longer accessible.
(WebKit::WebInspectorUI::closeWindow):
Explicitly remove the frontend client when closing the frontend.
* WebProcess/WebPage/WebInspectorUI.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::inspector):
Allow clients to specify whether an inspector should be eagerly created.
Without this, we may accidentally create an instance during teardown.
* WebProcess/WebPage/WebPage.h:
2015-09-18 Emanuele Aina <emanuele.aina@collabora.com>
Fix build with --no-indexed-database after r189831
https://bugs.webkit.org/show_bug.cgi?id=149342
Reviewed by Csaba Osztrogonác.
* WebProcess/Databases/WebDatabaseProvider.h:
Add ENABLE(INDEXED_DATABASE) guard around supportsModernIDB().
2015-09-17 Beth Dakin <bdakin@apple.com>
Heavy taps on links are sometimes interpreted as the preview gesture
https://bugs.webkit.org/show_bug.cgi?id=149304
-and corresponding-
rdar://problem/22689258
Reviewed by Tim Horton.
If the preview gesture starts and stop and less than 250 milliseconds have
passed, then call _attemptClickAtLocation to treat it as a normal tap.
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
(-[WKContentView _interactionStartedFromPreviewItemController:]):
(-[WKContentView _interactionStoppedFromPreviewItemController:]):
2015-09-17 Tim Horton <timothy_horton@apple.com>
After restoring tabs, swipes back to fast loading pages hang for 3 seconds
https://bugs.webkit.org/show_bug.cgi?id=148764
<rdar://problem/22568860>
Reviewed by Beth Dakin.
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::endSwipeGesture):
Don't wait for the render tree size threshold if we don't have one.
2015-09-17 Timothy Horton <timothy_horton@apple.com>
REGRESSION (r189287): 2.5% PLT regression
https://bugs.webkit.org/show_bug.cgi?id=149277
<rdar://problem/22657219>
Reviewed by Anders Carlsson.
* UIProcess/API/mac/WKView.mm:
(-[WKView _takeViewSnapshot]):
Don't take an extra unused snapshot.
2015-09-17 Michael Catanzaro <mcatanzaro@igalia.com>
[GTK] Crash in WebKit::BackingStore::createBackend running under Wayland
https://bugs.webkit.org/show_bug.cgi?id=147453
Reviewed by Carlos Garcia Campos.
Except when running on X11, this function always crashes if called before the web view is
realized, as gdk_window_create_similar_surface will return null in that case. Avoid this by
simply realizing the widget before calling that.
Thanks to Carlos Garnacho for some debugging help.
* UIProcess/cairo/BackingStoreCairo.cpp:
(WebKit::BackingStore::createBackend):
2015-09-16 Carlos Garcia Campos <cgarcia@igalia.com>
printing does not use minimum page zoom factor
https://bugs.webkit.org/show_bug.cgi?id=108507
Reviewed by Darin Adler.
Add kWKSnapshotOptionsPrinting flag to indicate the snapshot
should be generated in printing mode.
* Shared/API/c/WKImage.h:
* Shared/API/c/WKSharedAPICast.h:
(WebKit::toSnapshotOptions):
* Shared/ImageOptions.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::numberOfPages): Pass the frame as a
reference instead of a pointer.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::scaledSnapshotWithOptions): In case of printing,
calculate the bitmap height based on the number of pages.
(WebKit::WebPage::snapshotAtSize): In case of printing, use
PrintContext::spoolAllPagesWithBoundaries() and return.
2015-09-16 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Fix common typo "supress" => "suppress"
https://bugs.webkit.org/show_bug.cgi?id=149199
Reviewed by Gyuyoung Kim.
* PluginProcess/mac/PluginProcessMac.mm:
(WebKit::PluginProcess::platformInitializeProcess):
2015-09-16 Dan Bernstein <mitz@apple.com>
[iOS] Inline implementation of -[WKImagePreviewViewController previewActions]
https://bugs.webkit.org/show_bug.cgi?id=149224
Reviewed by Tim Horton.
* Platform/spi/ios/UIKitSPI.h: Declare UIViewControllerPreviewAction and its factory method.
* UIProcess/WKImagePreviewViewController.mm:
(-[WKImagePreviewViewController previewActions]): Moved here.
2015-09-16 Alexey Proskuryakov <ap@apple.com>
[Mac] Allow reading from SubmitDiagInfo.domains in Networking process
https://bugs.webkit.org/show_bug.cgi?id=149176
rdar://problem/22483680
Reviewed by Darin Adler.
* NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
2015-09-16 Dan Bernstein <mitz@apple.com>
[iOS] Unifiy WebKit2PlatformTouchPoint definition
https://bugs.webkit.org/show_bug.cgi?id=149221
Reviewed by Darin Adler.
* Shared/WebEventConversion.cpp:
(WebKit::touchEventType):
(WebKit::WebKit2PlatformTouchPoint::WebKit2PlatformTouchPoint):
2015-09-16 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Web Process crash recovery no longer works
https://bugs.webkit.org/show_bug.cgi?id=149064
Reviewed by Žan Doberšek.
After a web process crash the new DrawingArea is never resized, so
nothing is rendered into the web view.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseDidRelaunchWebProcess): Queue a widget resize to ensure
the new DrawingAreaProxy is resized.
2015-09-15 Ryosuke Niwa <rniwa@webkit.org>
Add ShadowRoot interface and Element.prototype.attachShadow
https://bugs.webkit.org/show_bug.cgi?id=149187
Reviewed by Antti Koivisto.
* Configurations/FeatureDefines.xcconfig:
2015-09-15 Brady Eidson <beidson@apple.com>
Add empty IDBFactory implementation for Modern IDB.
https://bugs.webkit.org/show_bug.cgi?id=149191
Reviewed by Jer Noble.
* WebProcess/Databases/WebDatabaseProvider.h:
2015-09-15 Brady Eidson <beidson@apple.com>
Move most IDB object encoding/decoding from WebKit2 to WebCore.
https://bugs.webkit.org/show_bug.cgi?id=149152
Reviewed by Alex Christensen.
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<IDBDatabaseMetadata>::encode): Deleted.
(IPC::ArgumentCoder<IDBDatabaseMetadata>::decode): Deleted.
(IPC::ArgumentCoder<IDBIndexMetadata>::encode): Deleted.
(IPC::ArgumentCoder<IDBIndexMetadata>::decode): Deleted.
(IPC::ArgumentCoder<IDBKeyData>::encode): Deleted.
(IPC::ArgumentCoder<IDBKeyData>::decode): Deleted.
(IPC::ArgumentCoder<IDBKeyPath>::encode): Deleted.
(IPC::ArgumentCoder<IDBKeyPath>::decode): Deleted.
(IPC::ArgumentCoder<IDBKeyRangeData>::encode): Deleted.
(IPC::ArgumentCoder<IDBKeyRangeData>::decode): Deleted.
(IPC::ArgumentCoder<IDBObjectStoreMetadata>::encode): Deleted.
(IPC::ArgumentCoder<IDBObjectStoreMetadata>::decode): Deleted.
* Shared/WebCoreArgumentCoders.h:
2015-09-14 Brady Eidson <beidson@apple.com>
Make the enum IDBKey::Type into a utility enum class.
https://bugs.webkit.org/show_bug.cgi?id=149149
Reviewed by Alex Christensen.
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::putRecordInBackingStore):
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<IDBKeyData>::encode):
(IPC::ArgumentCoder<IDBKeyData>::decode):
2015-09-14 Wenson Hsieh <wenson_hsieh@apple.com>
WKWebView scroll deceleration rate is not being set properly
https://bugs.webkit.org/show_bug.cgi?id=149145
<rdar://problem/22064071>
Reviewed by Simon Fraser.
We are not currently setting the web view's deceleration rate to the correct preferred value because we
are setting the decelerationRate property of the scrollView, which snaps input values to the closer of
two predefined UIKit constants, UIScrollViewDecelerationRateFast and UIScrollViewDecelerationRateNormal.
To fix this, we directly set the horizontal and vertical scroll deceleration factors to the preferred
value.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView scrollViewWillBeginDragging:]): Directly set the scroll view's deceleration factor without
going through the decelerationRate property.
2015-09-14 Dan Bernstein <mitz@apple.com>
Consolidate touch event code dealing with force.
Reviewed by Beth Dakin.
* Shared/WebEvent.h:
(WebKit::WebPlatformTouchPoint::state):
(WebKit::WebPlatformTouchPoint::setForce):
(WebKit::WebPlatformTouchPoint::force):
* Shared/ios/NativeWebTouchEventIOS.mm:
(WebKit::positionForCGPoint):
(WebKit::NativeWebTouchEvent::extractWebTouchPoint):
(WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
* Shared/ios/WebPlatformTouchPointIOS.cpp:
(WebKit::WebPlatformTouchPoint::encode):
(WebKit::WebPlatformTouchPoint::decode):
2015-09-14 Alex Christensen <achristensen@webkit.org>
Progress towards CMake on Mac.
https://bugs.webkit.org/show_bug.cgi?id=149123
Reviewed by Chris Dumez.
* PlatformMac.cmake:
Added some more sources.
2015-09-14 Dan Bernstein <mitz@apple.com>
[iOS] Stop importing WebKitAdditions/WKContentViewInteraction.mm
https://bugs.webkit.org/show_bug.cgi?id=149127
Reviewed by Beth Dakin.
* Platform/spi/ios/UIKitSPI.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView setupInteraction]):
2015-09-14 Brady Eidson <beidson@apple.com>
Rename current concrete IDB implementation to "Legacy".
https://bugs.webkit.org/show_bug.cgi?id=149118
Reviewed by Alex Christensen.
* CMakeLists.txt:
2015-09-14 Gyuyoung Kim <gyuyoung.kim@webkit.org>
[EFL] Remove create() factory function in EvasGLContext and EvasGLSurface
https://bugs.webkit.org/show_bug.cgi?id=149110
Reviewed by Csaba Osztrogonác.
It is not good implementation we support both create() factory function and public constructor.
In EvasGLContext and EvasGLSurface cases, those have supported both. However create() factory is only
used by EwkView. Thus let's remove the create() function, then EwkView creates EvasGLContext using
std::make_unique<> directly.
* UIProcess/API/efl/EwkView.cpp:
(EwkView::EwkView):
(EwkView::createGLSurface):
2015-09-13 Gyuyoung Kim <gyuyoung.kim@webkit.org>
Remove all uses of PassRefPtr in crypto, storage, and history
https://bugs.webkit.org/show_bug.cgi?id=149091
Reviewed by Andreas Kling.
* WebProcess/Storage/StorageNamespaceImpl.cpp:
(WebKit::StorageNamespaceImpl::storageArea):
* WebProcess/Storage/StorageNamespaceImpl.h:
2015-09-13 Dan Bernstein <mitz@apple.com>
Define HAVE_LINK_PREVIEW in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=149099
Reviewed by Sam Weinig.
* Platform/spi/ios/UIKitSPI.h:
* UIProcess/WKImagePreviewViewController.mm:
* config.h:
2015-09-12 Myles C. Maxfield <mmaxfield@apple.com>
[Cocoa] Allow testing with the system language
https://bugs.webkit.org/show_bug.cgi?id=148671
Reviewed by Anders Carlsson and Alexey Proskuryakov.
This patch adds two new SPI functions for setting and retrieving a vector of
override languages to/from the WKContextConfiguration. The implementation of
these functions holds state inside WebProcessPoolConfiguration. Then, when
we launch a process, the WebProcessProxy will inject these override languages
into the ProcessLauncher::LaunchOptions so that the ProcessLauncher can
inject these languages into the XPC Bootstrap message. Then, in the Web
Process's main(), the XPC Boostrap message is read, and the platform
languages are set via NSUserDefaults setting a volatile domain.
* Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
(main): Set the volatile domain with NSUserDefaults.
* UIProcess/API/APIProcessPoolConfiguration.cpp:
(API::ProcessPoolConfiguration::copy):
* UIProcess/API/APIProcessPoolConfiguration.h: Hold state for the override
languages.
* UIProcess/API/C/WKContextConfigurationRef.cpp:
(WKContextConfigurationCopyOverrideLanguages): SPI.
(WKContextConfigurationSetOverrideLanguages): Ditto.
* UIProcess/API/C/WKContextConfigurationRef.h:
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::connectToService): Inject the languages into the XPC Bootstrap
message.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::getLaunchOptions): Inject the override languages
into the ProcessLauncher::LaunchOptions.
2015-09-12 Alexey Proskuryakov <ap@apple.com>
[iOS] Allow UDP networking
https://bugs.webkit.org/show_bug.cgi?id=149081
rdar://problem/22291743
Reviewed by Sam Weinig.
* Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2015-09-12 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Extract InspectorFrontendAPI dispatching from WebInspectorUI
https://bugs.webkit.org/show_bug.cgi?id=149089
Reviewed by Brian Burg.
* CMakeLists.txt:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebPage/WebInspectorFrontendAPIDispatcher.cpp: Added.
(WebKit::WebInspectorFrontendAPIDispatcher::WebInspectorFrontendAPIDispatcher):
(WebKit::WebInspectorFrontendAPIDispatcher::reset):
(WebKit::WebInspectorFrontendAPIDispatcher::frontendLoaded):
(WebKit::WebInspectorFrontendAPIDispatcher::dispatchCommand):
(WebKit::WebInspectorFrontendAPIDispatcher::dispatchMessageAsync):
(WebKit::WebInspectorFrontendAPIDispatcher::evaluateExpressionOnLoad):
* WebProcess/WebPage/WebInspectorFrontendAPIDispatcher.h: Added.
* WebProcess/WebPage/WebInspectorUI.cpp:
(WebKit::WebInspectorUI::WebInspectorUI):
(WebKit::WebInspectorUI::establishConnection):
(WebKit::WebInspectorUI::frontendLoaded):
(WebKit::WebInspectorUI::setDockSide):
(WebKit::WebInspectorUI::setDockingUnavailable):
(WebKit::WebInspectorUI::showConsole):
(WebKit::WebInspectorUI::showResources):
(WebKit::WebInspectorUI::showMainResourceForFrame):
(WebKit::WebInspectorUI::startPageProfiling):
(WebKit::WebInspectorUI::stopPageProfiling):
(WebKit::WebInspectorUI::didSave):
(WebKit::WebInspectorUI::didAppend):
(WebKit::WebInspectorUI::sendMessageToFrontend):
(WebKit::WebInspectorUI::evaluateCommandOnLoad): Deleted.
(WebKit::WebInspectorUI::evaluateExpressionOnLoad): Deleted.
(WebKit::WebInspectorUI::evaluatePendingExpressions): Deleted.
* WebProcess/WebPage/WebInspectorUI.h:
(WebKit::WebInspectorUI::evaluateCommandOnLoad): Deleted.
2015-09-12 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Move Already Generic Inspector Page Context Menu to Generic Setup
https://bugs.webkit.org/show_bug.cgi?id=149088
Reviewed by Brian Burg.
* UIProcess/WebInspectorProxy.cpp:
(WebKit::getContextMenuFromProposedMenu):
(WebKit::WebInspectorProxy::eagerlyCreateInspectorPage):
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::getContextMenuFromProposedMenu): Deleted.
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
2015-09-12 Brian Burg <bburg@apple.com>
Web Inspector: disambiguate inspected/frontend controllers and pages in backend code
https://bugs.webkit.org/show_bug.cgi?id=149071
Reviewed by Joseph Pecoraro.
* WebProcess/WebCoreSupport/WebInspectorClient.cpp:
(WebKit::WebInspectorClient::inspectedPageDestroyed): Renamed.
(WebKit::WebInspectorClient::openLocalFrontend): Renamed.
(WebKit::WebInspectorClient::closeLocalFrontend): Renamed.
(WebKit::WebInspectorClient::inspectorDestroyed): Deleted.
(WebKit::WebInspectorClient::openInspectorFrontend): Deleted.
(WebKit::WebInspectorClient::closeInspectorFrontend): Deleted.
* WebProcess/WebCoreSupport/WebInspectorClient.h:
2015-09-11 Beth Dakin <bdakin@apple.com>
Another build fix.
* UIProcess/mac/ViewSnapshotStore.h:
(WebKit::ViewSnapshot::size):
(WebKit::ViewSnapshot::imageSizeInBytes):
2015-09-11 Beth Dakin <bdakin@apple.com>
Still need view snapshotting code for non-IOSurface for the sim
https://bugs.webkit.org/show_bug.cgi?id=149077
Reviewed by Tim Horton.
This fixes the simulator build.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _takeViewSnapshot]):
(-[WKWebView _zoomToPoint:atScale:animated:]):
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
(WebKit::ViewGestureController::removeSwipeSnapshot):
* UIProcess/mac/ViewSnapshotStore.h:
(WebKit::ViewSnapshot::setDeviceScaleFactor):
(WebKit::ViewSnapshot::deviceScaleFactor):
(WebKit::ViewSnapshot::surface):
(WebKit::ViewSnapshot::imageSizeInBytes):
(WebKit::ViewSnapshot::size):
* UIProcess/mac/ViewSnapshotStore.mm:
(WebKit::ViewSnapshotStore::singleton):
(WebKit::ViewSnapshotStore::snapshottingContext):
(WebKit::ViewSnapshotStore::didAddImageToSnapshot):
(WebKit::ViewSnapshotStore::discardSnapshotImages):
(WebKit::ViewSnapshot::create):
(WebKit::ViewSnapshot::ViewSnapshot):
(WebKit::ViewSnapshot::~ViewSnapshot):
(WebKit::ViewSnapshot::setSurface):
(WebKit::ViewSnapshot::hasImage):
(WebKit::ViewSnapshot::clearImage):
(WebKit::ViewSnapshot::asLayerContents):
2015-09-11 Beth Dakin <bdakin@apple.com>
Build fix
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
(WebKit::ViewGestureController::removeSwipeSnapshot):
2015-09-11 Beth Dakin <bdakin@apple.com>
Should use CARenderServerRenderLayerWithTransform for snapshots on iOS
https://bugs.webkit.org/show_bug.cgi?id=149069
-and corresponding-
rdar://problem/19726953
Reviewed by Tim Horton.
This will let us own the backing IOSurface, which will let us share more code
with Mac.
Use CARenderServerRenderLayerWithTransform
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _takeViewSnapshot]):
(-[WKWebView _zoomToPoint:atScale:animated:]):
We can eliminate things needed for the slot-based API.
* UIProcess/mac/ViewSnapshotStore.h:
(WebKit::ViewSnapshot::setDeviceScaleFactor):
(WebKit::ViewSnapshot::deviceScaleFactor):
(WebKit::ViewSnapshot::surface):
(WebKit::ViewSnapshot::imageSizeInBytes):
(WebKit::ViewSnapshot::size):
* UIProcess/mac/ViewSnapshotStore.mm:
(WebKit::ViewSnapshotStore::singleton):
(WebKit::ViewSnapshotStore::didAddImageToSnapshot):
(WebKit::ViewSnapshotStore::discardSnapshotImages):
(WebKit::ViewSnapshot::create):
(WebKit::ViewSnapshot::ViewSnapshot):
(WebKit::ViewSnapshot::~ViewSnapshot):
(WebKit::ViewSnapshot::setSurface):
(WebKit::ViewSnapshot::hasImage):
(WebKit::ViewSnapshot::clearImage):
(WebKit::ViewSnapshot::asLayerContents):
(WebKit::ViewSnapshotStore::snapshottingContext): Deleted.
2015-09-11 Andreas Kling <akling@apple.com>
[JSC] Weak should only accept cell pointees.
<https://webkit.org/b/148955>
Reviewed by Geoffrey Garen.
* WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
(WebKit::NPRuntimeObjectMap::finalize):
* WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h:
2015-09-10 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Remove unused files
https://bugs.webkit.org/show_bug.cgi?id=149049
Reviewed by Brian Burg.
* WebProcess/WebPage/efl/WebInspectorEfl.cpp: Removed.
* WebProcess/WebPage/gtk/WebInspectorGtk.cpp: Removed.
2015-09-10 Joseph Pecoraro <pecoraro@apple.com>
WebInspectorUI should have a WebPage reference
https://bugs.webkit.org/show_bug.cgi?id=149046
Reviewed by Geoffrey Garen.
* WebProcess/WebPage/WebInspectorUI.cpp:
* WebProcess/WebPage/WebInspectorUI.h:
(WebKit::WebInspectorUI::page): Deleted.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::inspectorUI):
2015-09-10 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: WebInspectorUI does not need to be an API::Object
https://bugs.webkit.org/show_bug.cgi?id=149045
Reviewed by Timothy Hatcher.
* Shared/API/APIObject.h:
* WebProcess/WebPage/WebInspectorUI.h:
2015-09-10 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Remove unused member in WebPage
https://bugs.webkit.org/show_bug.cgi?id=149040
Reviewed by Brian Burg.
* WebProcess/WebPage/WebPage.cpp:
* WebProcess/WebPage/WebPage.h:
2015-09-10 Daniel Bates <dabates@apple.com>
sendProcessWillSuspendImminently uses a wrong message flag
https://bugs.webkit.org/show_bug.cgi?id=148995
Reviewed by Alexey Proskuryakov.
Remove use of flag IPC::InterruptWaitingIfSyncMessageArrives as it does not make
sense when sending a sync message.
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::sendProcessWillSuspendImminently):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::sendProcessWillSuspendImminently):
2015-09-10 Joseph Pecoraro <pecoraro@apple.com>
Unreviewed build fix after r189572.
* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::inspectorPageURL):
(WebKit::WebInspectorProxy::inspectorTestPageURL):
(WebKit::WebInspectorProxy::inspectorBaseURL):
Remove the const on the now static methods.
2015-09-10 Chris Dumez <cdumez@apple.com>
Node.appendChild(null) / replaceChild(null, null) / removeChild(null) / insertBefore(null, ref) should throw a TypeError
https://bugs.webkit.org/show_bug.cgi?id=148971
<rdar://problem/22560883>
<rdar://problem/22559225>
Reviewed by Ryosuke Niwa.
ContainerNode::appendChild() now takes a Ref<Node>&& parameter so we
need to update the call sites.
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::PDFPlugin):
* WebProcess/Plugins/PDF/PDFPluginAnnotation.mm:
(WebKit::PDFPluginAnnotation::attach):
(WebKit::PDFPluginAnnotation::~PDFPluginAnnotation):
* WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm:
(WebKit::PDFPluginChoiceAnnotation::createAnnotationElement):
2015-09-10 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Make WebInspectorProxy inspectorURL path methods static
https://bugs.webkit.org/show_bug.cgi?id=149021
Reviewed by Brian Burg.
* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::didRelaunchInspectorPageProcess):
(WebKit::isMainOrTestInspectorPage):
(WebKit::decidePolicyForNavigationAction):
(WebKit::WebInspectorProxy::eagerlyCreateInspectorPage):
(WebKit::WebInspectorProxy::createInspectorPage):
* UIProcess/WebInspectorProxy.h:
* UIProcess/efl/WebInspectorProxyEfl.cpp:
(WebKit::WebInspectorProxy::inspectorPageURL):
(WebKit::WebInspectorProxy::inspectorTestPageURL):
(WebKit::WebInspectorProxy::inspectorBaseURL):
* UIProcess/gtk/WebInspectorProxyGtk.cpp:
(WebKit::WebInspectorProxy::inspectorPageURL):
(WebKit::WebInspectorProxy::inspectorTestPageURL):
(WebKit::WebInspectorProxy::inspectorBaseURL):
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::inspectorPageURL):
(WebKit::WebInspectorProxy::inspectorTestPageURL):
(WebKit::WebInspectorProxy::inspectorBaseURL):
2015-09-09 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Remove dead WebInspectorProxy related code
https://bugs.webkit.org/show_bug.cgi?id=149019
Reviewed by Timothy Hatcher.
* UIProcess/API/C/mac/WKInspectorPrivateMac.h:
* UIProcess/WebInspectorProxy.cpp:
* UIProcess/WebInspectorProxy.h:
* UIProcess/mac/WebInspectorProxyMac.mm:
(-[WKWebInspectorProxyObjCAdapter attachRight:]): Deleted.
(-[WKWebInspectorProxyObjCAdapter attachBottom:]): Deleted.
2015-09-09 Anders Carlsson <andersca@apple.com>
Remove an unused NSString SPI constant
https://bugs.webkit.org/show_bug.cgi?id=149009
Reviewed by Dan Bernstein.
* UIProcess/API/Cocoa/WKWebView.mm:
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
2015-09-09 Dan Bernstein <mitz@apple.com>
Updated availability annotations for iOS 9 and OS X El Capitan.
Rubber-stamped by Anders Carlsson.
* Shared/API/Cocoa/_WKRenderingProgressEvents.h:
* UIProcess/API/Cocoa/WKError.h:
* UIProcess/API/Cocoa/WKErrorPrivate.h:
* UIProcess/API/Cocoa/WKFrameInfo.h:
* UIProcess/API/Cocoa/WKNavigationActionPrivate.h:
* UIProcess/API/Cocoa/WKNavigationDelegate.h:
* UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:
* UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
* UIProcess/API/Cocoa/WKSecurityOrigin.h:
* UIProcess/API/Cocoa/WKUIDelegate.h:
* UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
* UIProcess/API/Cocoa/WKUserContentControllerPrivate.h:
* UIProcess/API/Cocoa/WKViewPrivate.h:
* UIProcess/API/Cocoa/WKWebView.h:
* UIProcess/API/Cocoa/WKWebViewConfiguration.h:
* UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
* UIProcess/API/Cocoa/WKWebsiteDataRecordPrivate.h:
* UIProcess/API/Cocoa/WKWebsiteDataStore.h:
* UIProcess/API/Cocoa/_WKDiagnosticLoggingDelegate.h:
* UIProcess/API/Cocoa/_WKElementAction.h:
* UIProcess/API/Cocoa/_WKLayoutMode.h:
* UIProcess/API/Cocoa/_WKOverlayScrollbarStyle.h:
* UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
* UIProcess/API/Cocoa/_WKUserContentExtensionStore.h:
* UIProcess/API/Cocoa/_WKUserContentFilter.h:
* UIProcess/API/Cocoa/_WKWebsiteDataRecord.h:
* UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.h:
2015-09-09 Alexey Proskuryakov <ap@apple.com>
fast/dom/rtl-scroll-to-leftmost-and-resize.html is a flaky timeout - IPC drops messages
https://bugs.webkit.org/show_bug.cgi?id=148951
Reviewed by Anders Carlsson.
* Platform/IPC/Connection.cpp:
(IPC::Connection::waitForMessage): Don't modify m_waitingForMessage without holding
a lock. This is not part of this fix, but seems necessary for correctness.
(IPC::Connection::processIncomingMessage): Don't interrupt a wait that has already succeeded.
2015-09-08 Daniel Bates <dabates@apple.com>
[Mac] Expose Enable/Disable Accelerated Drawing in MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=148980
Reviewed by Alexey Proskuryakov.
Expose SPI web preference to enable/disable- and query the state of- accelerated drawing
so that we can toggle this setting in MiniBrowser on Mac.
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _acceleratedDrawingEnabled]): Added.
(-[WKPreferences _setAcceleratedDrawingEnabled:]): Added.
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:
2015-09-08 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Remove unused file: WebInspectorFrontendClient.h
https://bugs.webkit.org/show_bug.cgi?id=148979
Reviewed by Brian Burg.
* WebProcess/WebCoreSupport/WebInspectorFrontendClient.h: Removed.
Unused now. WebInspectorUI subclasses InspectorFrontendClient itself.
2015-09-07 Andy Estes <aestes@apple.com>
[Mac] DebugRelease builds should link against libWebKitSystemInterfaceElCapitan.a on 10.11
https://bugs.webkit.org/show_bug.cgi?id=148946
<rdar://problem/22603981>
Reviewed by Dan Bernstein.
* Configurations/DebugRelease.xcconfig:
2015-09-05 Michael Catanzaro <mcatanzaro@igalia.com>
Leak in WebContextInjectedBundleClient::getInjectedBundleInitializationUserData
https://bugs.webkit.org/show_bug.cgi?id=148769
Fix suggested by Zan Dobersek.
Reviewed by Darin Adler.
* UIProcess/WebContextInjectedBundleClient.cpp:
(WebKit::WebContextInjectedBundleClient::getInjectedBundleInitializationUserData):
2015-09-04 Brian Burg <bburg@apple.com>
Web Inspector: agents should send messages through FrontendRouter instead of FrontendChannel
https://bugs.webkit.org/show_bug.cgi?id=148492
Reviewed by Joseph Pecoraro.
Stop using InspectorForwarding.h.
* WebProcess/WebPage/WebInspector.h:
* WebProcess/WebPage/WebInspectorUI.h:
2015-09-04 Brian Burg <bburg@apple.com>
Web Inspector: InspectorController should support multiple frontend channels
https://bugs.webkit.org/show_bug.cgi?id=148538
Reviewed by Joseph Pecoraro.
Explicitly disconnect the frontend channel when closing the frontend.
Rename createInspectorPage/closeFrontend to the symmetric and unambiguous
{open,close}FrontendConnection in the WebInspector class.
* WebProcess/WebCoreSupport/WebInspectorClient.cpp:
(WebKit::WebInspectorClient::openInspectorFrontend):
(WebKit::WebInspectorClient::closeInspectorFrontend):
* WebProcess/WebCoreSupport/WebInspectorClient.h: Stop using a forwarded type.
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::openFrontendConnection):
(WebKit::WebInspector::closeFrontendConnection):
(WebKit::WebInspector::remoteFrontendConnected):
(WebKit::WebInspector::remoteFrontendDisconnected):
(WebKit::WebInspector::createInspectorPage): Deleted.
(WebKit::WebInspector::closeFrontend): Deleted.
* WebProcess/WebPage/WebInspector.h:
2015-09-04 Dan Bernstein <mitz@apple.com>
[iOS] Disable backspace key navigation by default
https://bugs.webkit.org/show_bug.cgi?id=148808
Reviewed by Tim Horton.
* Shared/WebPreferencesDefinitions.h: Defined DEFAULT_BACKSPACE_KEY_NAVIGATION_ENABLED as
false on iOS, true elsewhere, and made it the default value of the
backspaceKeyNavigationEnabled preference key.
2015-09-04 Beth Dakin <bdakin@apple.com>
Need to be able to test default behaviors on force click
https://bugs.webkit.org/show_bug.cgi?id=148758
Reviewed by Tim Horton.
The hit test seems to return synchronously in WKTR, so we need to do the hit
test last before we clear state otherwise we will trample the hit test
result.
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController immediateActionRecognizerWillPrepare:]):
(-[WKImmediateActionController immediateActionRecognizerWillBeginAnimation:]):
2015-09-03 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r189338.
https://bugs.webkit.org/show_bug.cgi?id=148785
Caused tons of crashes (Requested by cdumez on #webkit).
Reverted changeset:
"Web Inspector: InspectorController should support multiple
frontend channels"
https://bugs.webkit.org/show_bug.cgi?id=148538
http://trac.webkit.org/changeset/189338
2015-09-03 Brian Burg <bburg@apple.com>
Web Inspector: InspectorController should support multiple frontend channels
https://bugs.webkit.org/show_bug.cgi?id=148538
Reviewed by Joseph Pecoraro.
Explicitly disconnect the frontend channel when closing the frontend.
Rename createInspectorPage/closeFrontend to the symmetric and unambiguous
{open,close}FrontendConnection in the WebInspector class.
* WebProcess/WebCoreSupport/WebInspectorClient.cpp:
(WebKit::WebInspectorClient::openInspectorFrontend):
(WebKit::WebInspectorClient::closeInspectorFrontend):
* WebProcess/WebCoreSupport/WebInspectorClient.h: Stop using a forwarded type.
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::openFrontendConnection):
(WebKit::WebInspector::closeFrontendConnection):
(WebKit::WebInspector::remoteFrontendConnected):
(WebKit::WebInspector::remoteFrontendDisconnected):
(WebKit::WebInspector::createInspectorPage): Deleted.
(WebKit::WebInspector::closeFrontend): Deleted.
* WebProcess/WebPage/WebInspector.h:
2015-09-03 Timothy Hatcher <timothy@apple.com>
Web Inspector: Closing the Safari window when the Web Inspector is one of the other windows in split screen mode can cause the entire screen to go black
https://bugs.webkit.org/show_bug.cgi?id=148777
Reviewed by Brian Burg.
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformDidClose):
(WebKit::WebInspectorProxy::platformHide):
(WebKit::WebInspectorProxy::platformAttach):
Call close instead of orderOut: to make fullscreen and tile modes with Web Inspector work as expected.
2015-09-03 Brady Eidson <beidson@apple.com>
Move SecurityOriginData from WK2 to WebCore.
https://bugs.webkit.org/show_bug.cgi?id=148739
Reviewed by Tim Horton.
This will be needed for upcoming IndexedDB work.
* CMakeLists.txt:
* DatabaseProcess/DatabaseProcess.h:
* DatabaseProcess/DatabaseProcess.messages.in:
* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in:
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
* DatabaseProcess/IndexedDB/UniqueIDBDatabaseIdentifier.cpp:
* DatabaseProcess/IndexedDB/UniqueIDBDatabaseIdentifier.h:
* NetworkProcess/NetworkProcess.cpp:
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in:
* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
* Shared/WebCrossThreadCopier.cpp:
* Shared/WebCrossThreadCopier.h:
* Shared/WebsiteData/WebsiteData.cpp:
* UIProcess/API/APINavigationClient.h:
* UIProcess/API/APIUIClient.h:
* UIProcess/API/C/WKPage.cpp:
* UIProcess/API/Cocoa/WKUserContentController.mm:
* UIProcess/API/gtk/WebKitUIClient.cpp:
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
* UIProcess/Cocoa/UIDelegate.h:
* UIProcess/Cocoa/UIDelegate.mm:
* UIProcess/Storage/StorageManager.cpp:
* UIProcess/Storage/StorageManager.h:
* UIProcess/Storage/StorageManager.messages.in:
* UIProcess/UserContent/WebScriptMessageHandler.h:
* UIProcess/UserContent/WebUserContentControllerProxy.cpp:
* UIProcess/UserContent/WebUserContentControllerProxy.h:
* UIProcess/UserContent/WebUserContentControllerProxy.messages.in:
* UIProcess/WebCookieManagerProxy.cpp:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
* WebProcess/MediaCache/WebMediaKeyStorageManager.cpp:
* WebProcess/MediaCache/WebMediaKeyStorageManager.h:
* WebProcess/Storage/StorageAreaMap.cpp:
* WebProcess/UserContent/WebUserContentController.cpp:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
* WebProcess/WebProcess.cpp:
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:
2015-09-03 Tim Horton <timothy_horton@apple.com>
[Mac] Add support for testing swipes
https://bugs.webkit.org/show_bug.cgi?id=148700
Reviewed by Beth Dakin.
* UIProcess/API/mac/WKView.mm:
(takeWindowSnapshot):
(-[WKView _takeViewSnapshot]):
Fall back to the non-hardware snapshotting path if the hardware path fails,
which usually happens if the view is fully off-screen (as in the case
of WebKitTestRunner).
2015-09-02 Tim Horton <timothy_horton@apple.com>
Add a modern API way to know that the navigation gesture snapshot was removed, for WebKitTestRunner
https://bugs.webkit.org/show_bug.cgi?id=148693
Reviewed by Anders Carlsson.
* UIProcess/API/APINavigationClient.h:
(API::NavigationClient::didRemoveNavigationGestureSnapshot):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageNavigationClient):
* UIProcess/API/C/WKPageNavigationClient.h:
* UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::setNavigationDelegate):
(WebKit::NavigationState::navigationGestureSnapshotWasRemoved):
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::navigationGestureDidEnd):
(WebKit::WebPageProxy::navigationGestureSnapshotWasRemoved):
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::didRemoveNavigationGestureSnapshot):
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::didRemoveNavigationGestureSnapshot):
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::didRemoveNavigationGestureSnapshot):
* UIProcess/API/gtk/PageClientImpl.h:
* UIProcess/CoordinatedGraphics/WebView.h:
Add a callback for WKTR when the swipe snapshot is removed.
2015-09-02 Andreas Kling <akling@apple.com>
ScrollbarThemes should be returned by reference.
<https://webkit.org/b/147551>
Reviewed by Zalan Bujtas.
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::paintControlForLayerInContext):
2015-09-02 Gyuyoung Kim <gyuyoung.kim@webkit.org>
REGRESSION(r188206): [EFL] Adjust scrollbar width to ewk_view_contents_size_get API test
https://bugs.webkit.org/show_bug.cgi?id=148701
Reviewed by Csaba Osztrogonác.
r188206 applied to use non-overlay scrollbar on EFL minibrowser. So we need to
adjust scrollwidth to ewk_view_contents_size_get API test as well.
* UIProcess/API/efl/tests/test_ewk2_view.cpp:
(TEST_F):
2015-09-02 Emanuele Aina <emanuele.aina@collabora.com>
Fix build with ENABLE(DATABASE_PROCESS) and !ENABLE(INDEXED_DATABASE)
https://bugs.webkit.org/show_bug.cgi?id=146550
Reviewed by Brady Eidson.
Given that INDEXED_DATABASE at the moment is the only user of
DATABASE_PROCESS, their guards got inevitably mixed up with various
levels of consistency. Since the --no-indexed-database flag from
build-webkit leaves DATABASE_PROCESS enabled, this resulted in build
failures.
* DatabaseProcess/DatabaseProcess.cpp:
* DatabaseProcess/DatabaseToWebProcessConnection.cpp:
* Shared/Databases/DatabaseProcessCreationParameters.cpp:
* Shared/Databases/DatabaseProcessCreationParameters.h:
* UIProcess/WebProcessPool.cpp:
* WebProcess/Databases/WebToDatabaseProcessConnection.cpp:
* WebProcess/Databases/WebToDatabaseProcessConnection.h:
Add missing ENABLE(INDEXED_DATABASE) guards and moved the
misplaced ones.
* DatabaseProcess/DatabaseProcess.h:
Ditto, and also add a forward declaration for SecurityOriginData since
with INDEXED_DATABASE off SecurityOriginData.h is no longer included
by way of UniqueIDBDatabaseIdentifier.h.
2015-09-01 Brian Burg <bburg@apple.com>
Web Inspector: opt the Inspector process out of page visibility-based process suppression when running tests
https://bugs.webkit.org/show_bug.cgi?id=148686
Reviewed by Timothy Hatcher.
This may be the cause of debug test timeouts and high execution time variance
that have been plaguing the bots. Process suppression shouldn't happen for
inspector process during tests anyway, so it shouldn't hurt to flip this.
* UIProcess/API/C/WKPreferencesRefPrivate.h:
The stated default here is incorrect, the default value is true.
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _pageVisibilityBasedProcessSuppressionEnabled]): Added.
(-[WKPreferences _setPageVisibilityBasedProcessSuppressionEnabled:]): Added.
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
2015-09-01 Alexey Proskuryakov <ap@apple.com>
Update sandbox after r179367
https://bugs.webkit.org/show_bug.cgi?id=148683
rdar://problem/21767401
Reviewed by Darin Adler.
* Resources/PlugInSandboxProfiles/com.apple.ist.ds.appleconnect.webplugin.sb:
2015-08-26 Andy Estes <aestes@apple.com>
[Content Filtering] Determine navigation and content policy before continuing to filter a load
https://bugs.webkit.org/show_bug.cgi?id=148506
Reviewed by Brady Eidson.
Deleted parts of r188486 and r188851.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::convertMainResourceLoadToDownload):
2015-08-31 Chris Dumez <cdumez@apple.com>
Range.detach() / NodeIterator.detach() should be no-ops as per the latest DOM specification
https://bugs.webkit.org/show_bug.cgi?id=148454
Reviewed by Ryosuke Niwa.
Update Range API call sites to reflect changes.
* WebProcess/InjectedBundle/API/mac/WKDOMRange.mm:
(-[WKDOMRange collapse:]):
(-[WKDOMRange startContainer]):
(-[WKDOMRange startOffset]):
(-[WKDOMRange endContainer]):
(-[WKDOMRange endOffset]):
(-[WKDOMRange isCollapsed]):
(-[WKDOMRange text]): Deleted.
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::getImageForFindMatch):
(WebKit::FindController::selectFindMatch):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::targetFrameForEditing):
(WebKit::WebPage::firstRectForCharacterRangeAsync): Deleted.
* WebProcess/WebPage/efl/WebPageEfl.cpp:
(WebKit::targetFrameForEditing):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::rangeForWebSelectionAtPosition):
(WebKit::WebPage::rangeForBlockAtPoint):
(WebKit::containsRange):
(WebKit::unionDOMRanges):
(WebKit::WebPage::contractedRangeFromHandle):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::dictionaryPopupInfoForRange):
(WebKit::WebPage::firstRectForCharacterRange): Deleted.
2015-08-31 Tim Horton <timothy_horton@apple.com>
iOS WebKit2 find-in-page doesn't support multi-line results, is often blank
https://bugs.webkit.org/show_bug.cgi?id=148599
<rdar://problem/17914031>
Reviewed by Beth Dakin.
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::findString):
(WebKit::FindController::didFindString):
* WebProcess/WebPage/FindController.h:
Add didFindString() for FindControllerIOS.
* WebProcess/WebPage/ios/FindControllerIOS.mm:
(WebKit::FindIndicatorOverlayClientIOS::drawRect):
(WebKit::FindController::updateFindIndicator):
(WebKit::setCompositionSelectionChangeEnabledInAllFrames):
(WebKit::FindController::willFindString):
(WebKit::FindController::didFindString):
(WebKit::FindController::didFailToFindString):
(WebKit::FindController::didHideFindIndicator):
* WebProcess/WebPage/ios/FindIndicatorOverlayClientIOS.h:
(WebKit::FindIndicatorOverlayClientIOS::FindIndicatorOverlayClientIOS):
Adopt TextIndicator and shrink-wrapping.
We'll re-create the indicator if the device/page scale factor change;
this is the only case in which a TextIndicator sticks around when
page scale changes -- we should come up with a better model!
2015-08-31 Antti Koivisto <antti@apple.com>
Network Cache: Stale content after back navigation
https://bugs.webkit.org/show_bug.cgi?id=148634
Reviewed by Chris Dumez.
It is possible to get an older version of the previous page when navigating back. This can happen
if the main resource load has not completed before navigating away from the page.
Network cache entry is normally updated when the load completes. In case of cancellation we would leave
any existing entry as-is. However we render incrementally and user might have seen some content from
the partial load already. Navigating back to the cached page could show older version of the content.
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::abort):
If a network load is canceled by the client after receiving response but before the load has completed
remove any existing cache entry for it.
2015-08-28 Myles C. Maxfield <mmaxfield@apple.com>
Migrate GraphicsContexts from pointers to references
https://bugs.webkit.org/show_bug.cgi?id=148561
Reviewed by Tim Horton.
* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::paint):
* Shared/cairo/ShareableBitmapCairo.cpp:
(WebKit::ShareableBitmap::paint):
* WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
(WebKit::imageForRect):
* WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
(WebKit::InjectedBundleRangeHandle::renderedImage):
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::paint):
(WebKit::NetscapePlugin::snapshot):
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/Plugins/Netscape/NetscapePluginNone.cpp:
(WebKit::NetscapePlugin::platformPaint):
* WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
(WebKit::NetscapePlugin::platformPaint):
* WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
(WebKit::NetscapePlugin::platformPaint):
* WebProcess/Plugins/PDF/PDFPlugin.h:
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::updateControlTints):
(WebKit::PDFPlugin::paintControlForLayerInContext):
* WebProcess/Plugins/Plugin.cpp:
(WebKit::Plugin::updateControlTints):
* WebProcess/Plugins/Plugin.h:
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::paint):
* WebProcess/Plugins/PluginProxy.h:
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::paint):
* WebProcess/Plugins/PluginView.h:
* WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:
(WebKit::convertCairoSurfaceToShareableBitmap):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::drawRect):
(WebKit::WebPage::snapshotAtSize):
(WebKit::WebPage::snapshotNode):
* WebProcess/WebPage/ios/FindControllerIOS.mm:
(WebKit::FindIndicatorOverlayClientIOS::drawRect):
2015-08-28 Eric Carlson <eric.carlson@apple.com>
[Mac] Restructure WebMediaSessionManager for testing
https://bugs.webkit.org/show_bug.cgi?id=148593
Reviewed by Jer Noble.
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::mediaSessionManager): Call WebMediaSessionManager::singleton, not
WebMediaSessionManagerMac::singleton.
2015-08-28 Jer Noble <jer.noble@apple.com>
[iOS] Add WebKit/WebKit2 settings to control automatic data loading
https://bugs.webkit.org/show_bug.cgi?id=148579
Reviewed by Anders Carlsson.
Add a property to WKWebViewConfiguration to control whether clients are allowed
to load media data automatically. Pass this configuration on through to WebCore.
* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration init]):
(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration _mediaDataLoadsAutomatically]):
(-[WKWebViewConfiguration _setMediaDataLoadsAutomatically:]):
* UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
2015-08-28 Jer Noble <jer.noble@apple.com>
[iOS] Make the AllowsInlineMediaPlayback preference work in WebKit / WebKit2.
https://bugs.webkit.org/show_bug.cgi?id=147512
Reviewed by Anders Carlsson.
Default the value of allowsInlineMediaPlayback to YES on iPad and NO on iPhone and iPod.
Add a new configuration property, _inlineMediaPlaybackRequiresPlaysInlineAttribute, which
defaults to NO on iPad and YES on iPhone and iPad.
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration init]):
* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetInlineMediaPlaybackRequiresPlaysInlineAttribute):
(WKPreferencesGetInlineMediaPlaybackRequiresPlaysInlineAttribute):
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration init]):
(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration _inlineMediaPlaybackRequiresPlaysInlineAttribute]):
(-[WKWebViewConfiguration _setInlineMediaPlaybackRequiresPlaysInlineAttribute:]):
* UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
2015-08-28 Timothy Horton <timothy_horton@apple.com>
Add navigation gesture callbacks to WKPageNavigationClient
https://bugs.webkit.org/show_bug.cgi?id=148568
<rdar://problem/22371346>
Reviewed by Anders Carlsson.
* UIProcess/API/APINavigationClient.h:
(API::NavigationClient::didBeginNavigationGesture):
(API::NavigationClient::willEndNavigationGesture):
(API::NavigationClient::didEndNavigationGesture):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageNavigationClient):
* UIProcess/API/C/WKPageNavigationClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::navigationGestureDidBegin):
(WebKit::WebPageProxy::navigationGestureWillEnd):
(WebKit::WebPageProxy::navigationGestureDidEnd):
2015-08-28 Timothy Horton <timothy_horton@apple.com>
Get rid of the DynamicSizeWithMinimumViewSize layout mode
https://bugs.webkit.org/show_bug.cgi?id=148554
Reviewed by Anders Carlsson.
* UIProcess/API/C/WKLayoutMode.h:
* UIProcess/API/Cocoa/WKViewPrivate.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _layoutMode]):
(-[WKWebView _setLayoutMode:]):
(-[WKWebView _setMinimumViewSize:]): Deleted.
(-[WKWebView _minimumViewSize]): Deleted.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/API/Cocoa/_WKLayoutMode.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView _setMinimumViewSize:]): Deleted.
(-[WKView _minimumViewSize]): Deleted.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::scaleViewAndUpdateGeometryFenced): Deleted.
* UIProcess/WebPageProxy.h:
* UIProcess/mac/WKViewLayoutStrategy.mm:
(+[WKViewLayoutStrategy layoutStrategyWithPage:view:mode:]):
(-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy initWithPage:view:mode:]): Deleted.
(-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy _updateTransientScale:]): Deleted.
(-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy updateLayout]): Deleted.
(-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy didChangeMinimumViewSize]): Deleted.
(-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy willStartLiveResize]): Deleted.
(-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy didEndLiveResize]): Deleted.
(-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy didChangeFrameSize]): Deleted.
(-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy willChangeLayoutStrategy]): Deleted.
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::replyWithFenceAfterNextFlush): Deleted.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::scaleViewAndUpdateGeometryFenced): Deleted.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::replyWithFenceAfterNextFlush): Deleted.
2015-08-28 Timothy Horton <timothy_horton@apple.com>
[Mac] Right-clicking on GIFs spins the UI process for a while
https://bugs.webkit.org/show_bug.cgi?id=148566
<rdar://problem/22460854>
Reviewed by Brady Eidson.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::internalShowContextMenu):
(WebKit::WebPageProxy::platformInitializeShareMenuItem):
* UIProcess/WebPageProxy.h:
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::platformInitializeShareMenuItem):
Move all of the code to make a Share menuitem into platformInitializeShareMenuItem.
Make an NSImage directly from the image data if possible.
2015-08-28 Michael Catanzaro <mcatanzaro@igalia.com>
[CMake] LIBSECCOMP_INCLUDE_DIRS should be added to WebKit2_SYSTEM_INCLUDE_DIRECTORIES
https://bugs.webkit.org/show_bug.cgi?id=148552
Reviewed by Žan Doberšek.
LIBSECCOMP_INCLUDE_DIRS should be added to WebKit2_SYSTEM_INCLUDE_DIRECTORIES, not
WebKit2_INCLUDE_DIRECTORIES. (So that warnings from libseccomp headers are suppressed. Not
that there are any right now.)
* PlatformGTK.cmake:
2015-08-28 Michael Catanzaro <mcatanzaro@igalia.com>
Minor fixes in reportUnexpectedSyscall
https://bugs.webkit.org/show_bug.cgi?id=148551
Reviewed by Žan Doberšek.
There is an off-by-one in the static assert.
Also, an unsigned long long is passed in, but the parameter is an int. Then it's passed to
writeUnsignedInt, which takes an unsigned int. Let's use unsigned int instead. (The value
is a syscall number, so it's safe to truncate regardless -- it never be anywhere near as
large as an int, unless the input is malicious, in which case truncating it is the right
thing to do anyway -- so this is just a matter of style.)
* Shared/linux/SeccompFilters/Syscall.cpp:
(WebKit::reportUnexpectedSyscall):
2015-08-28 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Simplify the internal API to create a WebView
https://bugs.webkit.org/show_bug.cgi?id=148570
Reviewed by Žan Doberšek.
Now that all the information required to create a WebView is in
API::PageConfiguration, we can simplify the internal API to
receive only the configuration instead of receiving a long list of
parameters that we use to build a new API::PageConfiguration.
* UIProcess/API/C/gtk/WKView.cpp:
(WKViewCreate):
* UIProcess/API/C/gtk/WKView.h:
* UIProcess/API/gtk/WebKitWebContext.cpp:
(webkitWebContextCreatePageForWebView):
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseCreate):
(webkitWebViewBaseCreateWebPage):
* UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
* UIProcess/gtk/WebInspectorProxyGtk.cpp:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
2015-08-27 Timothy Horton <timothy_horton@apple.com>
Video full-screen shouldn't use the DynamicSizeWithMinimumViewSize layout mode
https://bugs.webkit.org/show_bug.cgi?id=148553
Reviewed by Zalan Bujtas.
* UIProcess/API/mac/WKView.mm:
(-[WKView _supportsArbitraryLayoutModes]):
(-[WKView _updateSupportsArbitraryLayoutModes]):
(-[WKView _didCommitLoadForMainFrame]):
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::beganEnterFullScreen):
(WebKit::PageClientImpl::beganExitFullScreen):
* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): Deleted.
(-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): Deleted.
It's not OK to just randomly change the layout mode, because the client
can change it or its properties out from under us, and also because we
weren't resetting it to whatever the client had specified.
I recently implemented a better way to override layout modes, for PDF,
so use that here. Also, we shouldn't use DynamicSizeWithMinimumViewSize,
we should just use the "normal" mode (ViewSize), since we've already ensured
a minimum size by setting contentMinSize.
2015-08-27 Alexey Proskuryakov <ap@apple.com>
pluginInfo.clientLoadPolicy is used uninitialized in WebContent process
https://bugs.webkit.org/show_bug.cgi?id=148550
Reviewed by Tim Horton.
This fixes flakiness on plugins/plugin-javascript-access.html.
* Shared/WebCoreArgumentCoders.cpp: (IPC::ArgumentCoder<PluginInfo>::decode):
2015-08-27 Timothy Horton <timothy_horton@apple.com>
Factor out Lookup invocation
https://bugs.webkit.org/show_bug.cgi?id=148509
Reviewed by Anders Carlsson.
* Shared/DictionaryPopupInfo.cpp: Removed.
* Shared/DictionaryPopupInfo.h: Removed.
Moved to WebCore.
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<DictionaryPopupInfo>::encode):
(IPC::ArgumentCoder<DictionaryPopupInfo>::decode):
Add encode/decoders for DictionaryPopupInfo now that it's in WebCore.
* Shared/WebCoreArgumentCoders.h:
* Shared/WebHitTestResult.h:
* Shared/mac/ArgumentCodersMac.h:
* UIProcess/API/mac/WKView.mm:
(+[WKView hideWordDefinitionWindow]):
(-[WKView _dismissContentRelativeChildWindows]):
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::didPerformDictionaryLookup):
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController _animationControllerForText]):
* UIProcess/mac/WebPageProxyMac.mm:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::showDefinitionForAttributedString):
(WebKit::PDFPlugin::lookupTextAtLocation):
* WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performDictionaryLookupAtLocation):
(WebKit::WebPage::performDictionaryLookupForSelection):
(WebKit::WebPage::dictionaryPopupInfoForRange):
(WebKit::WebPage::dictionaryPopupInfoForSelectionInPDFPlugin):
(WebKit::WebPage::lookupTextAtLocation):
Adjust to new names and move stuff to WebCore.
2015-08-27 Brian Burg <bburg@apple.com>
Web Inspector: FrontendChannel should know its own connection type
https://bugs.webkit.org/show_bug.cgi?id=148482
Reviewed by Joseph Pecoraro.
* WebProcess/WebPage/WebInspector.h: add connectionType().
2015-08-27 Csaba Osztrogonác <ossy@webkit.org>
[EFL] REGRESSION: 50+ layout tests crash
https://bugs.webkit.org/show_bug.cgi?id=148471
Reviewed by Gyuyoung Kim.
* UIProcess/CoordinatedGraphics/WebView.cpp:
(WebKit::WebView::WebView):
2015-08-27 Zan Dobersek <zdobersek@igalia.com>
Fix WKMutableArray creations in WKUserMediaPermissionRequest
https://bugs.webkit.org/show_bug.cgi?id=148489
Reviewed by Carlos Garcia Campos.
Call WKMutableArrayCreate() to create the WKMutableArray objects.
WKMutableArrayRef type is a pointer, so calling 'WKMutableArrayRef()'
just sets a null value to the variable that is then returned and
queried for size in WebKitTestRunner's TestController, resulting
in a crash.
* UIProcess/API/C/WKUserMediaPermissionRequest.cpp:
(WKUserMediaPermissionRequestDeviceNamesVideo):
(WKUserMediaPermissionRequestDeviceNamesAudio):
2015-08-26 Emanuele Aina <emanuele.aina@collabora.com>
[ThreadedCompositor] Use WTF::Condition together with WTF::Lock
https://bugs.webkit.org/show_bug.cgi?id=148493
Reviewed by Gyuyoung Kim.
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
Replace ThreadCondition::signal() calls with Condition::notifyOne().
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
Replace ThreadCondition usage with Condition.
2015-08-26 Wenson Hsieh <wenson_hsieh@apple.com>
Fix crash due to animationDidEnd called on deallocated RemoteLayerTreeHost
https://bugs.webkit.org/show_bug.cgi?id=148442
<rdar://problem/21609257>
Reviewed by Tim Horton.
A PlatformCAAnimationRemote's backpointer to a deallocated RemoteLayerTreeHost is not
invalidated when its host removes its reference to it.
* UIProcess/mac/RemoteLayerTreeHost.mm:
(WebKit::RemoteLayerTreeHost::layerWillBeRemoved): Invalidate a backpointer from the
PlatformCAAnimationRemotes to the RemoteLayerTreeHost.
2015-08-26 Beth Dakin <bdakin@apple.com>
REGRESSION: Safari navigates after a cancelled force click
https://bugs.webkit.org/show_bug.cgi?id=148491
-and corresponding-
rdar://problem/22394323
Reviewed by Tim Horton.
Use the current stage to determine which type of cancel this is.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::immediateActionDidCancel):
2015-08-26 Eric Carlson <eric.carlson@apple.com>
Media Session: make MediaSessionMetadata a class
https://bugs.webkit.org/show_bug.cgi?id=148486
Reviewed by Jer Noble.
* Shared/WebCoreArgumentCoders.h: struct MediaSessionMetadata -> class MediaSessionMetadata.
* UIProcess/WebPageProxy.h: Ditto.
2015-08-26 Zan Dobersek <zdobersek@igalia.com>
Unreviewed.
Fix the crashes in GTK+'s WebKitTestRunner by setting the process pool
on the API::PageConfiguration object in webkitWebViewBaseCreate().
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseCreate):
2015-08-25 Beth Dakin <bdakin@apple.com>
Speculative build fix.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView setupInteraction]):
2015-08-25 Beth Dakin <bdakin@apple.com>
Long press gesture recognizer should adjust delay based on other recognizers
https://bugs.webkit.org/show_bug.cgi?id=148402
-and corresponding-
rdar://problem/22278723
Reviewed by Tim Horton.
Call _setAdjustsDelayBasedOnOtherRecognizers with a value of YES.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView setupInteraction]):
2015-08-24 Gyuyoung Kim <gyuyoung.kim@webkit.org>
Unreviewed, EFL and GTK build fix since r188895.
* CMakeLists.txt: Rename Rename VisitedLinkProvider to VisitedLinkStore.
2015-08-24 Anders Carlsson <andersca@apple.com>
Rename VisitedLinkProvider to VisitedLinkStore
https://bugs.webkit.org/show_bug.cgi?id=148406
Reviewed by Tim Horton.
* DerivedSources.make:
* Shared/API/APIObject.h:
* Shared/Cocoa/APIObject.mm:
(API::Object::newObject):
* UIProcess/API/APIPageConfiguration.cpp:
(API::PageConfiguration::copy):
(API::PageConfiguration::visitedLinkStore):
(API::PageConfiguration::setVisitedLinkStore):
(API::PageConfiguration::visitedLinkProvider): Deleted.
(API::PageConfiguration::setVisitedLinkProvider): Deleted.
* UIProcess/API/APIPageConfiguration.h:
* UIProcess/API/C/WKContext.cpp:
(WKContextAddVisitedLink):
(WKContextClearVisitedLinks):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
* UIProcess/API/Cocoa/_WKVisitedLinkStore.mm:
(-[_WKVisitedLinkStore init]):
(-[_WKVisitedLinkStore dealloc]):
(-[_WKVisitedLinkStore addVisitedLinkWithURL:]):
(-[_WKVisitedLinkStore removeAll]):
(-[_WKVisitedLinkStore _apiObject]):
* UIProcess/API/Cocoa/_WKVisitedLinkStoreInternal.h:
(WebKit::wrapper):
* UIProcess/VisitedLinkProvider.cpp:
(WebKit::generateIdentifier): Deleted.
(WebKit::VisitedLinkProvider::create): Deleted.
(WebKit::VisitedLinkProvider::~VisitedLinkProvider): Deleted.
(WebKit::VisitedLinkProvider::VisitedLinkProvider): Deleted.
(WebKit::VisitedLinkProvider::addProcess): Deleted.
(WebKit::VisitedLinkProvider::removeProcess): Deleted.
(WebKit::VisitedLinkProvider::addVisitedLinkHash): Deleted.
(WebKit::VisitedLinkProvider::removeAll): Deleted.
(WebKit::VisitedLinkProvider::webProcessWillOpenConnection): Deleted.
(WebKit::VisitedLinkProvider::webProcessDidCloseConnection): Deleted.
(WebKit::VisitedLinkProvider::addVisitedLinkHashFromPage): Deleted.
(WebKit::nextPowerOf2): Deleted.
(WebKit::tableSizeForKeyCount): Deleted.
(WebKit::VisitedLinkProvider::pendingVisitedLinksTimerFired): Deleted.
(WebKit::VisitedLinkProvider::resizeTable): Deleted.
(WebKit::VisitedLinkProvider::sendTable): Deleted.
* UIProcess/VisitedLinkStore.cpp: Renamed from Source/WebKit2/UIProcess/VisitedLinkProvider.cpp.
(WebKit::generateIdentifier):
(WebKit::VisitedLinkStore::create):
(WebKit::VisitedLinkStore::~VisitedLinkStore):
(WebKit::VisitedLinkStore::VisitedLinkStore):
(WebKit::VisitedLinkStore::addProcess):
(WebKit::VisitedLinkStore::removeProcess):
(WebKit::VisitedLinkStore::addVisitedLinkHash):
(WebKit::VisitedLinkStore::removeAll):
(WebKit::VisitedLinkStore::webProcessWillOpenConnection):
(WebKit::VisitedLinkStore::webProcessDidCloseConnection):
(WebKit::VisitedLinkStore::addVisitedLinkHashFromPage):
(WebKit::nextPowerOf2):
(WebKit::tableSizeForKeyCount):
(WebKit::VisitedLinkStore::pendingVisitedLinksTimerFired):
(WebKit::VisitedLinkStore::resizeTable):
(WebKit::VisitedLinkStore::sendTable):
* UIProcess/VisitedLinkStore.h: Renamed from Source/WebKit2/UIProcess/VisitedLinkProvider.h.
* UIProcess/VisitedLinkStore.messages.in: Renamed from Source/WebKit2/UIProcess/VisitedLinkProvider.messages.in.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::processDidFinishLaunching):
(WebKit::WebPageProxy::creationParameters):
* UIProcess/WebPageProxy.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::WebProcessPool):
(WebKit::WebProcessPool::createWebPage):
* UIProcess/WebProcessPool.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::shutDown):
(WebKit::WebProcessProxy::addVisitedLinkStore):
(WebKit::WebProcessProxy::didDestroyVisitedLinkStore):
(WebKit::WebProcessProxy::addVisitedLinkProvider): Deleted.
(WebKit::WebProcessProxy::didDestroyVisitedLinkProvider): Deleted.
* UIProcess/WebProcessProxy.h:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebPage/VisitedLinkTableController.cpp:
(WebKit::VisitedLinkTableController::addVisitedLink):
2015-08-24 Tim Horton <timothy_horton@apple.com>
(Finally...) get rid of WKViewIOS
https://bugs.webkit.org/show_bug.cgi?id=148404
Reviewed by Anders Carlsson.
* UIProcess/API/Cocoa/WKView.h:
* UIProcess/API/ios/WKViewIOS.mm: Removed.
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::PageClientImpl): Deleted.
(WebKit::PageClientImpl::didRelaunchProcess): Deleted.
(WebKit::PageClientImpl::refView): Deleted.
(WebKit::PageClientImpl::derefView): Deleted.
* UIProcess/ios/WKContentView.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView initWithFrame:processPool:configuration:wkView:]): Deleted.
* WebKit2.xcodeproj/project.pbxproj:
Get rid of WKViewIOS and references to it.
* DatabaseProcess/ios/DatabaseProcessIOS.mm:
(WebKit::DatabaseProcess::initializeSandbox):
* NetworkProcess/ios/NetworkProcessIOS.mm:
(WebKit::NetworkProcess::initializeSandbox):
* Shared/Plugins/mac/PluginSandboxProfile.mm:
(WebKit::pluginSandboxProfileDirectory):
* Shared/ios/ChildProcessIOS.mm:
(WebKit::ChildProcess::initializeSandbox):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::initializeSandbox):
Look for WKWebView instead of WKView if we have it.
2015-08-24 Anders Carlsson <andersca@apple.com>
Rename _WKVisitedLinkProvider to _WKVisitedLinkStore for consistency
https://bugs.webkit.org/show_bug.cgi?id=148398
Reviewed by Tim Horton.
We'd like to call the abstract classes providers and the concrete classes stores in WebKit. Begin by renaming
_WKVisitedLinkProvider to _WKVisitedLinkStore, but keep the former around as a deprecated class.
* Shared/API/Cocoa/WebKitPrivate.h:
* Shared/Cocoa/APIObject.mm:
(API::Object::newObject):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration _visitedLinkStore]):
(-[WKWebViewConfiguration _setVisitedLinkStore:]):
(-[WKWebViewConfiguration _visitedLinkProvider]):
(-[WKWebViewConfiguration _setVisitedLinkProvider:]):
(-[WKWebViewConfiguration _validate]):
* UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
* UIProcess/API/Cocoa/_WKVisitedLinkProvider.h:
* UIProcess/API/Cocoa/_WKVisitedLinkProvider.mm:
(-[_WKVisitedLinkProvider init]): Deleted.
(-[_WKVisitedLinkProvider dealloc]): Deleted.
(-[_WKVisitedLinkProvider addVisitedLinkWithURL:]): Deleted.
(-[_WKVisitedLinkProvider removeAll]): Deleted.
(-[_WKVisitedLinkProvider _apiObject]): Deleted.
* UIProcess/API/Cocoa/_WKVisitedLinkStore.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKVisitedLinkProvider.h.
* UIProcess/API/Cocoa/_WKVisitedLinkStore.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKVisitedLinkProvider.mm.
(-[_WKVisitedLinkStore init]):
(-[_WKVisitedLinkStore dealloc]):
(-[_WKVisitedLinkStore addVisitedLinkWithURL:]):
(-[_WKVisitedLinkStore removeAll]):
(-[_WKVisitedLinkStore _apiObject]):
* UIProcess/API/Cocoa/_WKVisitedLinkStoreInternal.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/_WKVisitedLinkProviderInternal.h.
(WebKit::wrapper):
* WebKit2.xcodeproj/project.pbxproj:
2015-08-24 Wenson Hsieh <wenson_hsieh@apple.com>
Use _NSScrollingPredominantAxisFilter for wheel event filtering on Mac
https://bugs.webkit.org/show_bug.cgi?id=147320
Reviewed by Simon Fraser.
Refactored to use a predominant axis filter instead of a predominant axis tracker. This allows us to
employ AppKit's _NSScrollingPredominantAxisFilter when possible, and use the wheel event delta tracker
as a fallback. Here, we refactor EventDispatcher to use the new filters for mainframe scrolling.
No new tests, since this change does not add new functionality.
* WebProcess/WebPage/EventDispatcher.cpp: Include WheelEventDeltaFilterMac.h when necessary.
(WebKit::EventDispatcher::EventDispatcher): Initialize a WheelEventDeltaFilterMac when possible. Otherwise,
fall back to a BasicWheelEventDeltaFilter.
(WebKit::EventDispatcher::wheelEvent): Use filtered deltas to initialize the platform wheel event instead
of zeroing out non-predominant axes.
* WebProcess/WebPage/EventDispatcher.h: Replace m_recentWheelEventDeltaTracker with m_recentWheelEventDeltaFilter.
2015-08-23 Andy Estes <aestes@apple.com>
[Content Filtering] REGRESSION (r182356): Provisional URL is incorrect in didReceiveServerRedirectForProvisionalLoadForFrame when Content Filtering is enabled
https://bugs.webkit.org/show_bug.cgi?id=147872
rdar://problem/22044000
Reviewed by Dan Bernstein.
The provisional DocumentLoader request URL does not reflect redirects when content filtering is enabled, but
the URL argument passed to dispatchDidReceiveServerRedirectForProvisionalLoad() does, so use it intead.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
Sent DidReceiveServerRedirectForProvisionalLoadForFrame using the URL argument.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2015-08-23 Csaba Osztrogonác <ossy@webkit.org>
Typo fix after r188842.
* CMakeLists.txt:
2015-08-23 Csaba Osztrogonác <ossy@webkit.org>
Speculative buildfix after r188828.
* CMakeLists.txt:
2015-08-22 Tim Horton <timothy_horton@apple.com>
Factor out and add logging to swipe-start hysteresis code
https://bugs.webkit.org/show_bug.cgi?id=148361
Reviewed by Darin Adler.
* UIProcess/ViewGestureController.cpp:
(WebKit::ViewGestureController::ViewGestureController):
* UIProcess/mac/ViewGestureController.h:
(WebKit::ViewGestureController::wheelEventWasNotHandledByWebCore):
(WebKit::ViewGestureController::shouldIgnorePinnedState):
(WebKit::ViewGestureController::setShouldIgnorePinnedState):
(WebKit::ViewGestureController::PendingSwipeTracker::PendingSwipeTracker):
(WebKit::ViewGestureController::PendingSwipeTracker::shouldIgnorePinnedState):
(WebKit::ViewGestureController::PendingSwipeTracker::setShouldIgnorePinnedState):
Move pending-swipe members into PendingSwipeTracker.
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::scrollEventCanInfluenceSwipe):
(WebKit::deltaShouldCancelSwipe):
(WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanBecomeSwipe):
(WebKit::ViewGestureController::handleScrollWheelEvent):
(WebKit::ViewGestureController::PendingSwipeTracker::handleEvent):
(WebKit::ViewGestureController::PendingSwipeTracker::eventWasNotHandledByWebCore):
(WebKit::ViewGestureController::PendingSwipeTracker::tryToStartSwipe):
(WebKit::ViewGestureController::PendingSwipeTracker::reset):
(WebKit::ViewGestureController::trackSwipeGesture):
(WebKit::ViewGestureController::setDidMoveSwipeSnapshotCallback):
Move pending-swipe methods into PendingSwipeTracker.
Clean up the logic a bit.
Add some logging.
2015-08-22 Timothy Horton <timothy_horton@apple.com>
WebKitTestRunner should use WKWebView on OS X and iOS
https://bugs.webkit.org/show_bug.cgi?id=143743
<rdar://problem/16947123>
Reviewed by Anders Carlsson.
Patch by Enrica Casucci and myself.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _windowOcclusionDetectionEnabled]):
(-[WKWebView _setWindowOcclusionDetectionEnabled:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
Add SPI to disable window occlusion detection, for WebKitTestRunner's use.
* Shared/WebPreferencesDefinitions.h:
Remove a completely unused WebPreference. It is a WebCore Setting,
but in the API it's exposed as a WKPage setter and WKView and WKWebView property
instead of as a WKPreference, so there's no need for the WebPreference.
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageAddUserScript):
(WKBundlePageAddUserStyleSheet):
(WKBundlePageRemoveAllUserContent):
* WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::addUserScript):
(WebKit::WebPage::addUserStyleSheet):
(WebKit::WebPage::removeAllUserContent):
* WebProcess/WebPage/WebPage.h:
Add WKBundlePage functions for user script and style sheet manipulation.
These use the WebPage's WebUserContentController instead of the WebPageGroupProxy's
(used by the WKBundle functions), so they work correctly with the modern API.
2015-08-22 Michael Catanzaro <mcatanzaro@igalia.com>
Unreviewed, attempt to fix GTK build after r188718
* CMakeLists.txt: Build WKPageConfigurationRef.cpp
* PlatformEfl.cmake: Don't build WKPageConfigurationRef.cpp
2015-08-22 Antti Koivisto <antti@apple.com>
Decode data URLs in web process
https://bugs.webkit.org/show_bug.cgi?id=148128
Reviewed by Darin Adler.
* WebProcess/Network/WebResourceLoadScheduler.cpp:
(WebKit::WebResourceLoadScheduler::scheduleLoad):
Don't send data: loads to the network process, handle them locally.
(WebKit::WebResourceLoadScheduler::startLocalLoad):
Call ResourceLoder::start() directly.
2015-08-21 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r188807, r188813, and r188815.
https://bugs.webkit.org/show_bug.cgi?id=148349
lots of 32-bit build problems, better to resolve separately
and try again (Requested by thorton on #webkit).
Reverted changesets:
"WebKitTestRunner should use WKWebView on OS X and iOS"
https://bugs.webkit.org/show_bug.cgi?id=143743
http://trac.webkit.org/changeset/188807
"Stop building WebKitTestRunner for 32-bit platforms"
https://bugs.webkit.org/show_bug.cgi?id=143743
http://trac.webkit.org/changeset/188813
"Stop building WebKitTestRunner for 32-bit platforms"
https://bugs.webkit.org/show_bug.cgi?id=143743
http://trac.webkit.org/changeset/188815
2015-08-21 Timothy Horton <timothy_horton@apple.com>
WebKitTestRunner should use WKWebView on OS X and iOS
https://bugs.webkit.org/show_bug.cgi?id=143743
<rdar://problem/16947123>
Reviewed by Anders Carlsson.
Patch by Enrica Casucci and myself.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _windowOcclusionDetectionEnabled]):
(-[WKWebView _setWindowOcclusionDetectionEnabled:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
Add SPI to disable window occlusion detection, for WebKitTestRunner's use.
* Shared/WebPreferencesDefinitions.h:
Remove a completely unused WebPreference. It is a WebCore Setting,
but in the API it's exposed as a WKPage setter and WKView and WKWebView property
instead of as a WKPreference, so there's no need for the WebPreference.
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageAddUserScript):
(WKBundlePageAddUserStyleSheet):
(WKBundlePageRemoveAllUserContent):
* WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::addUserScript):
(WebKit::WebPage::addUserStyleSheet):
(WebKit::WebPage::removeAllUserContent):
* WebProcess/WebPage/WebPage.h:
Add WKBundlePage functions for user script and style sheet manipulation.
These use the WebPage's WebUserContentController instead of the WebPageGroupProxy's
(used by the WKBundle functions), so they work correctly with the modern API.
2015-08-21 Alexey Proskuryakov <ap@apple.com>
Improve how UI events are dispatched by WebKitTestRunner
https://bugs.webkit.org/show_bug.cgi?id=148326
Reviewed by Anders Carlsson.
Added "fully synchronous mode for testing", in which all messages are dispatched
synchronously.
When an async message is sent in this mode, it is wrapped into a sync one automatically.
A client must opt in, either by using WKBundlePagePostSynchronousMessageForTesting(),
or by calling WKContextConfigurationAllowFullySynchronousModeForTesting().
This makes sure that we don't increase potential for IPC misuse.
* WebProcess/WebPage/WebPage.messages.in: Yay, fewer messages!
* UIProcess/API/C/WKPage.cpp:
(WKPageSetShouldSendEventsSynchronously): Deleted.
* UIProcess/API/C/WKPagePrivate.h:
We no longer need WKPageSetShouldSendEventsSynchronously and associated custom messages.
* WebProcess/WebPage/EventDispatcher.cpp:
(WebKit::EventDispatcher::wheelEvent):
(WebKit::updateWheelEventTestTriggersIfNeeded): Deleted.
Removed code that was only needed to support pseudo-syncronous scrolling in tests.
* Platform/IPC/Connection.cpp:
(IPC::Connection::sendMessage):
(IPC::Connection::dispatchSyncMessage):
(IPC::Connection::dispatchMessage):
* Platform/IPC/Connection.h:
(IPC::Connection::allowFullySynchronousModeForTesting):
(IPC::Connection::sendSync):
* Platform/IPC/MessageDecoder.cpp:
(IPC::MessageDecoder::shouldDispatchMessageWhenWaitingForSyncReply):
(IPC::MessageDecoder::shouldUseFullySynchronousModeForTesting):
(IPC::MessageDecoder::setImportanceAssertion):
(IPC::MessageDecoder::unwrapForTesting):
* Platform/IPC/MessageDecoder.h:
(IPC::MessageDecoder::UUID):
* Platform/IPC/MessageEncoder.cpp:
(IPC::MessageEncoder::setShouldDispatchMessageWhenWaitingForSyncReply):
(IPC::MessageEncoder::setFullySynchronousModeForTesting):
(IPC::MessageEncoder::wrapForTesting):
* Platform/IPC/MessageEncoder.h:
(IPC::MessageEncoder::UUID):
* Platform/IPC/MessageFlags.h:
* UIProcess/API/APIProcessPoolConfiguration.cpp:
(API::ProcessPoolConfiguration::copy):
* UIProcess/API/APIProcessPoolConfiguration.h:
* UIProcess/API/C/WKContextConfigurationRef.cpp:
(WKContextConfigurationSetMediaKeysStorageDirectory):
(WKContextConfigurationAllowFullySynchronousModeForTesting):
* UIProcess/API/C/WKContextConfigurationRef.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::handleMouseEvent):
(WebKit::WebPageProxy::sendWheelEvent):
(WebKit::WebPageProxy::handleKeyboardEvent):
(WebKit::WebPageProxy::handleTouchEvent):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::renderTreeSize):
(WebKit::WebPageProxy::setShouldSendEventsSynchronously): Deleted.
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::processDidFinishLaunching):
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePagePostMessage):
(WKBundlePagePostSynchronousMessageForTesting):
(WKBundlePagePostSynchronousMessage): Deleted.
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::mouseEvent):
(WebKit::handleWheelEvent):
(WebKit::WebPage::wheelEvent):
(WebKit::handleKeyEvent):
(WebKit::WebPage::keyEvent):
(WebKit::WebPage::validateCommand):
(WebKit::WebPage::touchEvent):
(WebKit::WebPage::scroll):
(WebKit::WebPage::postMessage):
(WebKit::WebPage::postSynchronousMessageForTesting):
(WebKit::WebPage::mouseEventSyncForTesting): Deleted.
(WebKit::WebPage::wheelEventSyncForTesting): Deleted.
(WebKit::WebPage::keyEventSyncForTesting): Deleted.
(WebKit::WebPage::touchEventSyncForTesting): Deleted.
(WebKit::WebPage::postSynchronousMessage): Deleted.
* WebProcess/WebPage/WebPage.h:
2015-08-20 Matt Rajca <mrajca@apple.com>
Media Session: let UI clients change the volume of the focused media element
https://bugs.webkit.org/show_bug.cgi?id=148289
Reviewed by Tim Horton.
* UIProcess/API/C/WKMediaSessionFocusManager.cpp:
(WKMediaSessionFocusManagerSetVolumeOfFocusedMediaElement):
* UIProcess/API/C/WKMediaSessionFocusManager.h:
* UIProcess/WebMediaSessionFocusManager.cpp:
(WebKit::WebMediaSessionFocusManager::updatePlaybackAttribute):
(WebKit::WebMediaSessionFocusManager::setVolumeOfFocusedMediaElement):
* UIProcess/WebMediaSessionFocusManager.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setVolumeOfMediaElement):
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setVolumeOfMediaElement):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
2015-08-21 Anders Carlsson <andersca@apple.com>
Get rid of uses of the old callOnMainThread function that takes a function ptr + context
https://bugs.webkit.org/show_bug.cgi?id=148324
Reviewed by Tim Horton.
* UIProcess/mac/WKPrintingView.mm:
(prepareDataForPrintingOnSecondaryThread):
(-[WKPrintingView knowsPageRange:]):
2015-08-21 Chris Dumez <cdumez@apple.com>
Regression(r188698): http/tests/cache/disk-cache/disk-cache-revalidation-new-expire-header.html is very flaky
https://bugs.webkit.org/show_bug.cgi?id=148205
Reviewed by Antti Koivisto.
After r188640, successful revalidation of resources in the memory cache
would cause us to drop the corresponding resource in the disk cache.
This patch addresses the issue by not removing the cache entry if the
response is a successful revalidation (i.e. status code == 304).
Longer term, we should probably update the entry in the disk cache (if
it exists) when it is revalidated by the memory cache. Currently,
revalidation by the memory cache bypasses the disk cache and goes
straight to the network. Then, when the response comes back as a 304,
we try and store the response in the cache. However, a 304 status code
is not cacheable so the cache rejects it.
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::store):
2015-08-20 Joonghun Park <jh718.park@samsung.com>
[EFL] Revise PlatformWebView ctor according to r188718
https://bugs.webkit.org/show_bug.cgi?id=148282
Reviewed by Gyuyoung Kim.
* PlatformEfl.cmake:
2015-08-20 Alex Christensen <achristensen@webkit.org>
GTK build fix after r188693.
* UIProcess/API/gtk/PageClientImpl.h:
Delete mediaDocumentNaturalSizeChanged which could be renamed to imageOrMediaDocumentSizeChanged,
but there's no reason to have an empty function overriding another virtual function that is also empty.
2015-08-20 Joonghun Park <jh718.park@samsung.com>
[EFL] Fix build error since r188693
https://bugs.webkit.org/show_bug.cgi?id=148279
Reviewed by Gyuyoung Kim.
* UIProcess/efl/WebViewEfl.h:
2015-08-20 Anders Carlsson <andersca@apple.com>
Use WKPageConfigurationRef in WebKitTestRunner
https://bugs.webkit.org/show_bug.cgi?id=147996
Reviewed by Tim Horton.
* UIProcess/API/ios/WKViewIOS.mm:
(-[WKView _commonInitializationWithConfigurationRef:]):
(-[WKView initWithFrame:configurationRef:]):
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:configurationRef:]):
Make sure to copy the configuration, matching what we do in the modern API.
2015-08-20 Beth Dakin <bdakin@apple.com>
Standalone image documents should send their size to the UIClient just like
standalone media documents
https://bugs.webkit.org/show_bug.cgi?id=148195
-and corresponding-
rdar://problem/21951253
Reviewed by Tim Horton.
This patch re-names mediaDocumentNaturalSizeChanged() to
imageOrMediaDocumentSizeChanged(), and, as the new name implies, uses the
function for both media documents and images.
* UIProcess/API/APIUIClient.h:
(API::UIClient::didClickAutoFillButton):
(API::UIClient::imageOrMediaDocumentSizeChanged):
(API::UIClient::mediaDocumentNaturalSizeChanged): Deleted.
* UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
The WKWebView and PageClient implementations of this function were actually
not being used, so this patch removes them and just keeps the UIClient stuff.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView performDragOperation:]):
(-[WKWebView _mediaDocumentNaturalSizeChanged:]): Deleted.
* UIProcess/API/Cocoa/WKWebViewInternal.h:
More re-naming.
* UIProcess/Cocoa/UIDelegate.h:
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::setDelegate):
(WebKit::UIDelegate::UIClient::UIClient):
(WebKit::UIDelegate::UIClient::didNotHandleTapAsClick):
(WebKit::UIDelegate::UIClient::imageOrMediaDocumentSizeChanged):
(WebKit::UIDelegate::UIClient::mediaDocumentNaturalSizeChanged): Deleted.
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::installViewStateChangeCompletionHandler):
(WebKit::WebPageProxy::imageOrMediaDocumentSizeChanged):
(WebKit::WebPageProxy::setShouldDispatchFakeMouseMoveEvents):
(WebKit::WebPageProxy::mediaDocumentNaturalSizeChanged): Deleted.
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::useFixedLayoutDidChange):
(WebKit::WebPageProxy::fixedLayoutSizeDidChange):
* UIProcess/WebPageProxy.messages.in:
The WKWebView and PageClient implementations of this function were actually
not being used, so this patch removes them and just keeps the UIClient stuff.
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::mediaDocumentNaturalSizeChanged): Deleted.
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::mediaDocumentNaturalSizeChanged): Deleted.
More re-naming.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::imageOrMediaDocumentSizeChanged):
(WebKit::WebChromeClient::mediaDocumentNaturalSizeChanged): Deleted.
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::imageOrMediaDocumentSizeChanged):
(WebKit::WebPage::mediaDocumentNaturalSizeChanged): Deleted.
* WebProcess/WebPage/WebPage.h:
2015-08-19 Eric Carlson <eric.carlson@apple.com>
Remove ENABLE_WEBVTT_REGIONS
https://bugs.webkit.org/show_bug.cgi?id=148184
Reviewed by Jer Noble.
* Configurations/FeatureDefines.xcconfig: Remove ENABLE_WEBVTT_REGIONS.
2015-08-18 Dean Jackson <dino@apple.com>
Support CSS filters without webkit prefix
https://bugs.webkit.org/show_bug.cgi?id=148138
<rdar://problem/22331434>
Reviewed by Sam Weinig.
Rename WebkitFilter to Filter.
* Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
(IPC::ArgumentCoder<TextureMapperAnimation>::encode):
(IPC::ArgumentCoder<TextureMapperAnimation>::decode):
2015-08-19 Alex Christensen <achristensen@webkit.org>
Build TestWTF on Mac with CMake.
https://bugs.webkit.org/show_bug.cgi?id=147972
Reviewed by Tim Horton.
* PlatformMac.cmake:
Make more forwarding headers.
2015-08-18 Filip Pizlo <fpizlo@apple.com>
Replace all uses of std::mutex/std::condition_variable with WTF::Lock/WTF::Condition
https://bugs.webkit.org/show_bug.cgi?id=148140
Reviewed by Geoffrey Garen.
* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::Storage::traverse):
* Platform/IPC/Connection.cpp:
(IPC::Connection::SyncMessageState::processIncomingMessage):
(IPC::Connection::SyncMessageState::dispatchMessages):
(IPC::Connection::SyncMessageState::dispatchMessageAndResetDidScheduleDispatchMessagesForConnection):
(IPC::Connection::sendMessage):
(IPC::Connection::waitForMessage):
(IPC::Connection::processIncomingMessage):
(IPC::Connection::installIncomingSyncMessageCallback):
(IPC::Connection::uninstallIncomingSyncMessageCallback):
(IPC::Connection::hasIncomingSyncMessage):
(IPC::Connection::connectionDidClose):
(IPC::Connection::sendOutgoingMessages):
(IPC::Connection::enqueueIncomingMessage):
(IPC::Connection::dispatchOneMessage):
* Platform/IPC/Connection.h:
* Shared/BlockingResponseMap.h:
(BlockingResponseMap::waitForResponse):
(BlockingResponseMap::didReceiveResponse):
(BlockingResponseMap::cancel):
* UIProcess/Plugins/gtk/PluginInfoCache.cpp:
(WebKit::PluginInfoCache::saveToFile):
(WebKit::PluginInfoCache::updatePluginInfo):
* UIProcess/Plugins/gtk/PluginInfoCache.h:
* UIProcess/mac/WKPrintingView.h:
* UIProcess/mac/WKPrintingView.mm:
(-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]):
(prepareDataForPrintingOnSecondaryThread):
(-[WKPrintingView knowsPageRange:]):
2015-08-19 Chris Dumez <cdumez@apple.com>
WebKit may keep outdated entry in the disk cache after a reload
https://bugs.webkit.org/show_bug.cgi?id=148137
<rdar://problem/22299547>
Reviewed by Antti Koivisto.
WebKit would keep outdated entry in the disk cache after a reload
in the following scenario:
1. We have an entry in the cache
2. The user reloads
3. We get a fresh resource from the network but this one is not cacheable
In this case, we now remove the stale entry from the cache to make sure
it is not served to following requests (e.g. history navigations).
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::didFinishLoading):
Remove the entry from the cache if its redirection is no longer
cacheable.
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::store):
If we make the decision not to store the response, then remove the
entry in the cache for this resource if it exists.
(WebKit::NetworkCache::Cache::remove):
* NetworkProcess/cache/NetworkCache.h:
Add new remove() overload taking a ResourceRequest argument so the
call site does not have the compute the key.
* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::Storage::removeFromPendingWriteOperations):
(WebKit::NetworkCache::Storage::remove):
* NetworkProcess/cache/NetworkCacheStorage.h:
When we're asked to remove an entry with a given key, also remove
it from the pending write operations. This pre-existing bug would
prevent the new layout test from passing.
2015-08-18 Zan Dobersek <zdobersek@igalia.com>
[GLib] GMainLoopSource should receive the std::function<> objects through rvalue references
https://bugs.webkit.org/show_bug.cgi?id=147981
Reviewed by Carlos Garcia Campos.
* NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
(WebKit::NetworkCache::runTaskInQueue): Move the std::function<> into the scheduling call.
2015-08-18 Dan Bernstein <mitz@apple.com>
[iOS] Safaris Web Content process crashes when decoding an NSError containing an identity
https://bugs.webkit.org/show_bug.cgi?id=148135
Reviewed by Sam Weinig.
* Configurations/WebContent-iOS.entitlements: Added the com.apple.identities keychain
access group. The Networking process already has it since r169655.
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitialize): Always allow the UI process to decode keys.
2015-08-18 Jincheol Jo <jincheol.jo@navercorp.com>
[EFL] Web Inspector: make to use StringBuilder in inspectorBaseURL
https://bugs.webkit.org/show_bug.cgi?id=148126
Reviewed by Gyuyoung Kim.
* UIProcess/efl/WebInspectorProxyEfl.cpp:
(WebKit::WebInspectorProxy::inspectorBaseURL):
(WebKit::WebInspectorProxy::platformInspectedWindowHeight):
2015-08-18 Anders Carlsson <andersca@apple.com>
Fix build, and fix the version check.
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageUIClient):
2015-08-18 Anders Carlsson <andersca@apple.com>
REGRESSION: Playing audio causes near-instant crash
https://bugs.webkit.org/show_bug.cgi?id=148059
rdar://problem/22282680
Reviewed by Sam Weinig.
The version of WebKit that Safari 6.2.8, 7.1.8 and 8.0.8 built against
had an ABI incompatible WKPageUIClientV4 struct. Thankfully we're not going to ship any
versions of Safari that use the "normal" WKPageUIClientV4 struct so just assume that it's always the
broken one and fix it up by converting it to a WKPageUIClientV5 struct and setting that as the page UI client.
* UIProcess/API/C/WKPage.cpp:
(fixUpBotchedPageUIClient):
(WKPageSetPageUIClient):
2015-08-17 Filip Pizlo <fpizlo@apple.com>
Replace all remaining uses of WTF::Mutex with WTF::Lock
https://bugs.webkit.org/show_bug.cgi?id=148089
Reviewed by Geoffrey Garen.
* DatabaseProcess/DatabaseProcess.cpp:
(WebKit::DatabaseProcess::postDatabaseTask):
(WebKit::DatabaseProcess::performNextDatabaseTask):
* DatabaseProcess/DatabaseProcess.h:
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::shutdown):
(WebKit::UniqueIDBDatabase::postMainThreadTask):
(WebKit::UniqueIDBDatabase::performNextMainThreadTask):
(WebKit::UniqueIDBDatabase::postDatabaseTask):
(WebKit::UniqueIDBDatabase::performNextDatabaseTask):
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
* Platform/IPC/Connection.cpp:
(IPC::Connection::sendSyncMessage):
(IPC::Connection::sendSyncMessageFromSecondaryThread):
(IPC::Connection::waitForSyncReply):
(IPC::Connection::processIncomingSyncReply):
(IPC::Connection::connectionDidClose):
* Platform/IPC/Connection.h:
* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
(WebKit::CoordinatedGraphicsScene::appendUpdate):
* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
(WebKit::ThreadedCompositor::createCompositingThread):
(WebKit::ThreadedCompositor::runCompositingThread):
(WebKit::ThreadedCompositor::terminateCompositingThread):
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
* Shared/Network/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm:
(WebKit::CustomProtocolManager::addCustomProtocol):
(WebKit::CustomProtocolManager::removeCustomProtocol):
(WebKit::CustomProtocolManager::registerScheme):
(WebKit::CustomProtocolManager::unregisterScheme):
(WebKit::CustomProtocolManager::supportsScheme):
(WebKit::CustomProtocolManager::protocolForID):
* Shared/Network/CustomProtocols/CustomProtocolManager.h:
* Shared/linux/SeccompFilters/SeccompBroker.cpp:
* WebProcess/Plugins/PluginProcessConnectionManager.cpp:
(WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
(WebKit::PluginProcessConnectionManager::removePluginProcessConnection):
(WebKit::PluginProcessConnectionManager::pluginProcessCrashed):
* WebProcess/Plugins/PluginProcessConnectionManager.h:
* WebProcess/WebPage/EventDispatcher.cpp:
(WebKit::EventDispatcher::addScrollingTreeForPage):
(WebKit::EventDispatcher::removeScrollingTreeForPage):
(WebKit::EventDispatcher::wheelEvent):
* WebProcess/WebPage/EventDispatcher.h:
* WebProcess/soup/WebKitSoupRequestInputStream.cpp:
(webkitSoupRequestInputStreamReadAsync):
(webkitSoupRequestInputStreamAddData):
2015-08-17 Alex Christensen <achristensen@webkit.org>
Speculative GTK build fix after r188553
* CMakeLists.txt:
Added new files.
2015-08-17 Myles C. Maxfield <mmaxfield@apple.com>
Implement IntegerHasher
https://bugs.webkit.org/show_bug.cgi?id=147866
Reviewed by Darin Adler and Anders Carlsson.
Use new #include.
* DatabaseProcess/IndexedDB/IDBIdentifier.h:
* Platform/IPC/StringReference.cpp:
2015-08-13 Anders Carlsson <andersca@apple.com>
Add WKWindowFeaturesRef and a new modern createNewPage UI client callback
https://bugs.webkit.org/show_bug.cgi?id=147989
Reviewed by Tim Horton.
Re-land this and make sure we actually allocate a WKWindowFeatures object.
* Platform/IPC/mac/ConnectionMac.mm:
* Shared/API/APIObject.h:
* Shared/API/c/WKBase.h:
* UIProcess/API/APIWindowFeatures.cpp: Added.
* UIProcess/API/APIWindowFeatures.h: Added.
* UIProcess/API/C/WKAPICast.h:
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageUIClient):
* UIProcess/API/C/WKPageUIClient.h:
* UIProcess/API/C/WKWindowFeaturesRef.cpp: Added.
(WKWindowFeaturesGetTypeID):
* UIProcess/API/C/WKWindowFeaturesRef.h: Added.
* UIProcess/API/Cocoa/WKWindowFeatures.mm:
(-[WKWindowFeatures dealloc]):
(-[WKWindowFeatures menuBarVisibility]):
(-[WKWindowFeatures statusBarVisibility]):
(-[WKWindowFeatures toolbarsVisibility]):
(-[WKWindowFeatures allowsResizing]):
(-[WKWindowFeatures x]):
(-[WKWindowFeatures y]):
(-[WKWindowFeatures width]):
(-[WKWindowFeatures height]):
(-[WKWindowFeatures _apiObject]):
(-[WKWindowFeatures _initWithWindowFeatures:]): Deleted.
* UIProcess/API/Cocoa/WKWindowFeaturesInternal.h:
(WebKit::wrapper):
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::UIClient::createNewPage):
* WebKit2.xcodeproj/project.pbxproj:
2015-08-17 Sam Weinig <sam@webkit.org>
API::PageConfiguration's sessionID needs to be set whenever the API::WebsiteDataStore is set
https://bugs.webkit.org/show_bug.cgi?id=148097
Reviewed by Anders Carlsson.
We were getting an empty SessionID set on the WebPageProxy (and crashing asserting down the line)
when using a WKPageConfiguration with a WKWebsiteDataStore set on it.
Tests:
WebKit2.WKPageConfigurationBasicWithDataStore
WebKit2.WKPageConfigurationBasicWithNonPersistentDataStore
* UIProcess/API/APIPageConfiguration.cpp:
(API::PageConfiguration::setWebsiteDataStore):
Set the sessionID member whenever changing the WebsiteDataStore.
* UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
(WKWebsiteDataStoreGetDefaultDataStore):
(WKWebsiteDataStoreCreateNonPersistentDataStore):
* UIProcess/API/C/WKWebsiteDataStoreRef.h:
Expose functions for getting default and new non-persistent data stores via the C-SPI. Useful
for testing and transitioning users of the C-SPI to the new model.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
Remove explicit setting of the sessionID. This is handled by the above call to setWebsiteDataStore().
2015-08-17 Wenson Hsieh <wenson_hsieh@apple.com>
Cannot change WKWebView scrollView deceleration rate
https://bugs.webkit.org/show_bug.cgi?id=148086
<rdar://problem/21893685>
Reviewed by Simon Fraser.
Updates the preferred scroll deceleration factor when the scrollView's decelerationRate is explicitly set by the
user, so when snap scrolling is inactive and [WKWebView scrollViewWillBeginDragging] sets its scrollView's
decelerationRate to the preferred decelerationRate, it will be set to the updated value.
* UIProcess/ios/WKScrollView.mm:
(-[WKScrollView setDecelerationRate:]): Overrides setDecelerationRate to update _preferredScrollDecelerationFactor.
2015-08-17 Timothy Horton <timothy_horton@apple.com>
Adopt shrink-wrapping for TextIndicators on Mac
https://bugs.webkit.org/show_bug.cgi?id=148064
Reviewed by Beth Dakin.
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<TextIndicatorData>::encode): Deleted.
(IPC::ArgumentCoder<TextIndicatorData>::decode): Deleted.
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::updateFindIndicator):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getPositionInformation):
Use the new option, TextIndicatorOptionIncludeMarginIfRangeMatchesSelection,
for iOS and FindController, because we can keep the margins in these cases
because we don't have to animate to/from the blue highlight.
2015-08-16 Timothy Horton <timothy_horton@apple.com>
Refactor ViewGestureController swipe snapshot removal to be more platform-independent
https://bugs.webkit.org/show_bug.cgi?id=148062
Reviewed by Dan Bernstein.
* Platform/Logging.h:
Add a ViewGestures logging channel.
* UIProcess/ViewGestureController.cpp: Added.
(viewGestureControllersForAllPages):
(WebKit::ViewGestureController::ViewGestureController):
(WebKit::ViewGestureController::~ViewGestureController):
(WebKit::ViewGestureController::gestureControllerForPage):
(WebKit::ViewGestureController::didFirstVisuallyNonEmptyLayoutForMainFrame):
(WebKit::ViewGestureController::didRepaintAfterNavigation):
(WebKit::ViewGestureController::didHitRenderTreeSizeThreshold):
(WebKit::ViewGestureController::didRestoreScrollPosition):
(WebKit::ViewGestureController::didReachMainFrameLoadTerminalState):
(WebKit::ViewGestureController::didSameDocumentNavigationForMainFrame):
(WebKit::ViewGestureController::checkForActiveLoads):
(WebKit::ViewGestureController::SnapshotRemovalTracker::eventsDescription):
(WebKit::ViewGestureController::SnapshotRemovalTracker::SnapshotRemovalTracker):
(WebKit::ViewGestureController::SnapshotRemovalTracker::log):
(WebKit::ViewGestureController::SnapshotRemovalTracker::start):
(WebKit::ViewGestureController::SnapshotRemovalTracker::reset):
(WebKit::ViewGestureController::SnapshotRemovalTracker::eventOccurred):
(WebKit::ViewGestureController::SnapshotRemovalTracker::cancelOutstandingEvent):
(WebKit::ViewGestureController::SnapshotRemovalTracker::fireRemovalCallbackIfPossible):
(WebKit::ViewGestureController::SnapshotRemovalTracker::fireRemovalCallbackImmediately):
(WebKit::ViewGestureController::SnapshotRemovalTracker::watchdogTimerFired):
(WebKit::ViewGestureController::SnapshotRemovalTracker::startWatchdog):
Build a platform-independent SnapshotRemovalTracker, which keeps track of
various events that we wait for before removing the snapshot. This
is constructed from the union of ViewGestureController{IOS, Mac}'s snapshot
removal code, and each platform ViewGestureController can specify which
events to wait for (because this currently differs slightly).
Add logging to SnapshotRemovalTracker to make debugging snapshot removal
issues much easier.
* UIProcess/mac/ViewGestureController.h:
(WebKit::ViewGestureController::backgroundColorForCurrentSnapshot):
(WebKit::ViewGestureController::didFinishLoadForMainFrame):
(WebKit::ViewGestureController::didFailLoadForMainFrame):
* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::platformTeardown):
(WebKit::ViewGestureController::beginSwipeGesture):
(WebKit::ViewGestureController::endSwipeGesture):
(WebKit::ViewGestureController::setRenderTreeSize):
(WebKit::ViewGestureController::willCommitPostSwipeTransitionLayerTree):
(WebKit::ViewGestureController::removeSwipeSnapshot):
(viewGestureControllersForAllPages): Deleted.
(WebKit::ViewGestureController::ViewGestureController): Deleted.
(WebKit::ViewGestureController::~ViewGestureController): Deleted.
(WebKit::ViewGestureController::didRestoreScrollPosition): Deleted.
(WebKit::ViewGestureController::mainFrameLoadDidReachTerminalState): Deleted.
(WebKit::ViewGestureController::didSameDocumentNavigationForMainFrame): Deleted.
(WebKit::ViewGestureController::activeLoadMonitoringTimerFired): Deleted.
(WebKit::ViewGestureController::swipeSnapshotWatchdogTimerFired): Deleted.
(WebKit::ViewGestureController::removeSwipeSnapshotIfReady): Deleted.
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::platformTeardown):
(WebKit::ViewGestureController::endSwipeGesture):
(WebKit::ViewGestureController::forceRepaintIfNeeded):
(WebKit::ViewGestureController::removeSwipeSnapshot):
(WebKit::ViewGestureController::ViewGestureController): Deleted.
(WebKit::ViewGestureController::~ViewGestureController): Deleted.
(WebKit::ViewGestureController::beginSwipeGesture): Deleted.
(WebKit::ViewGestureController::didHitRenderTreeSizeThreshold): Deleted.
(WebKit::ViewGestureController::didFirstVisuallyNonEmptyLayoutForMainFrame): Deleted.
(WebKit::ViewGestureController::mainFrameLoadDidReachTerminalState): Deleted.
(WebKit::ViewGestureController::didSameDocumentNavigationForMainFrame): Deleted.
(WebKit::ViewGestureController::activeLoadMonitoringTimerFired): Deleted.
(WebKit::ViewGestureController::swipeSnapshotWatchdogTimerFired): Deleted.
(WebKit::ViewGestureController::removeSwipeSnapshotAfterRepaint): Deleted.
Move shareable snapshot removal code to a new platform-independent ViewGestureController file.
Move the ViewGestureController constructor/destructor to the platform-independent file.
* UIProcess/mac/ViewGestureController.messages.in:
* WebKit2.xcodeproj/project.pbxproj:
2015-08-11 Andy Estes <aestes@apple.com>
[Cocoa] Add redirect support to CustomProtocolManager
https://bugs.webkit.org/show_bug.cgi?id=147871
Reviewed by Dan Bernstein.
NSURLProtocols have the ability to generate redirect responses. This change teaches CustomProtocolManager how to handle them.
* Shared/Network/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm:
(WebKit::CustomProtocolManager::wasRedirectedToRequest): Called -URLProtocol:wasRedirectedToRequest:redirectResponse: on the NSURLProtocolClient.
* Shared/Network/CustomProtocols/CustomProtocolManager.h:
* Shared/Network/CustomProtocols/CustomProtocolManager.messages.in: Defined WasRedirectedToRequest.
* Shared/Network/CustomProtocols/soup/CustomProtocolManagerSoup.cpp:
(WebKit::CustomProtocolManager::wasRedirectedToRequest): Defined empty function.
* UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm:
(-[WKCustomProtocolLoader connection:willSendRequest:redirectResponse:]): If a redirect response is received, send WasRedirectedToRequest and return nil to ignore the redirect.
2015-08-13 Andy Estes <aestes@apple.com>
[Cocoa] Downloads do not start if policy decision is made asynchronously
https://bugs.webkit.org/show_bug.cgi?id=147985
Reviewed by Brady Eidson.
* WebProcess/Network/WebResourceLoader.cpp: Updated to include SubresourceLoader.h.
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::convertMainResourceLoadToDownload): Started a new download if the main resource loader is not calling didReceiveResponse.
2015-08-14 Simon Fraser <simon.fraser@apple.com>
Speculative fix for iOS build failure.
* Shared/mac/RemoteLayerTreeTransaction.h:
2015-08-14 Philippe Normand <pnormand@igalia.com>
Unreviewed, remove dead code after r188385.
* UIProcess/API/gtk/WebKitUserMediaPermissionRequest.cpp:
(webkitUserMediaPermissionRequestAllow): Deleted.
2015-08-14 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix the build with !ENABLE(MEDIA_STREAM) after r188385.
* UIProcess/API/C/WKUserMediaPermissionRequest.cpp:
(WKUserMediaPermissionRequestDeviceNamesVideo):
(WKUserMediaPermissionRequestDeviceNamesAudio):
2015-08-14 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix GTK+ build after r188386.
* UIProcess/API/gtk/WebKitWindowProperties.cpp:
(webkitWindowPropertiesUpdateFromWebWindowFeatures):
2015-08-13 Tim Horton <timothy_horton@apple.com>
Performing a Lookup on wrapped text puts the popover arrow in the wrong place (off to the right)
https://bugs.webkit.org/show_bug.cgi?id=148012
<rdar://problem/19238094>
Reviewed by Simon Fraser.
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::didPerformDictionaryLookup):
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController _animationControllerForText]):
Adopt the new SPI, handing it the first text rect, instead of having it
guess where to put the popover.
2015-08-13 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r188418.
https://bugs.webkit.org/show_bug.cgi?id=148017
Fix EFL after the rollout of r188404 (Requested by smfr on
#webkit).
Reverted changeset:
"[CMake] Unreviewed build fix after r188404"
http://trac.webkit.org/changeset/188418
2015-08-13 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r188404.
https://bugs.webkit.org/show_bug.cgi?id=148014
Broke 4 API tests (Requested by smfr on #webkit).
Reverted changeset:
"Add WKWindowFeaturesRef and a new modern createNewPage UI
client callback"
https://bugs.webkit.org/show_bug.cgi?id=147989
http://trac.webkit.org/changeset/188404
2015-08-13 Tim Horton <timothy_horton@apple.com>
Try to fix the Gtk/EFL build.
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::updateFindIndicator):
2015-08-13 Tim Horton <timothy_horton@apple.com>
Refactor and improve TextIndicator to prepare for tests
https://bugs.webkit.org/show_bug.cgi?id=147622
Reviewed by Simon Fraser.
* Shared/WebCoreArgumentCoders.cpp:
(IPC::encodeOptionalImage):
(IPC::decodeOptionalImage):
(IPC::ArgumentCoder<TextIndicatorData>::encode):
(IPC::ArgumentCoder<TextIndicatorData>::decode):
Move encode/decodeOptionalImage to their own functions to avoid duplication.
* UIProcess/API/mac/WKView.mm:
(-[WKView _dictionaryLookupPopoverWillClose:]):
(-[WKView _setTextIndicator:]):
(-[WKView _setTextIndicator:withLifetime:]):
(-[WKView _clearTextIndicatorWithAnimation:]):
(-[WKView _dismissContentRelativeChildWindows]):
(-[WKView _dismissContentRelativeChildWindowsWithAnimation:]):
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setTextIndicator):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::setTextIndicator):
(WebKit::PageClientImpl::clearTextIndicator):
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::setTextIndicator):
(WebKit::PageClientImpl::clearTextIndicator):
(WebKit::PageClientImpl::didPerformDictionaryLookup):
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController _animationControllerForText]):
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::updateFindIndicator):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getPositionInformation):
(WebKit::shouldUseTextIndicatorForLink): Deleted.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::dictionaryPopupInfoForRange):
(WebKit::WebPage::performImmediateActionHitTestAtLocation):
Adopt TextIndicatorOptions.
Adjust to Range method renames.
2015-08-13 Jaehun Lim <ljaehun.lim@samsung.com>
[CMake] Unreviewed build fix after r188404
* CMakeLists.txt: Add UIProcess/API/APIWindowFeatures.cpp, UIProcess/API/C/WKWindowFeaturesRef.cpp
2015-08-13 Wenson Hsieh <wenson_hsieh@apple.com>
A focused node should not be assisted when handling touch events synchronously
https://bugs.webkit.org/show_bug.cgi?id=147836
<rdar://problem/22204108>
Reviewed by Enrica Casucci.
Makes interaction with touch handlers no longer assist the currently focused element in the
general case. Added plumbing to reassist a currently focused node when dispatching touch events,
so that an input that programmatically focuses itself and prevents default on a touch event will
be properly assisted when it has been programmatically focused (either through Javascript or the
autofocus attribute) prior to receiving the touch event. This patch also removes the now
unnecessary special-casing of the Gmail settings app that currently makes the keyboard deploy
upon autofocus.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]): Removed
special case to avoid the early return for Gmail Add Account.
* WebProcess/WebCoreSupport/WebChromeClient.h: Added a handler for refocusing an element.
* WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
(WebKit::WebChromeClient::elementDidRefocus): Makes refocusing an element trigger input
assistance on iOS.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::dispatchTouchEvent): Removes logic to focus the currently focused element upon
receiving a touch event.
2015-08-13 Anders Carlsson <andersca@apple.com>
Add WKWindowFeaturesRef and a new modern createNewPage UI client callback
https://bugs.webkit.org/show_bug.cgi?id=147989
Reviewed by Tim Horton.
* Platform/IPC/mac/ConnectionMac.mm:
* Shared/API/APIObject.h:
* Shared/API/c/WKBase.h:
* UIProcess/API/APIWindowFeatures.cpp: Added.
* UIProcess/API/APIWindowFeatures.h: Added.
* UIProcess/API/C/WKAPICast.h:
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageUIClient):
* UIProcess/API/C/WKPageUIClient.h:
* UIProcess/API/C/WKWindowFeaturesRef.cpp: Added.
(WKWindowFeaturesGetTypeID):
* UIProcess/API/C/WKWindowFeaturesRef.h: Added.
* UIProcess/API/Cocoa/WKWindowFeatures.mm:
(-[WKWindowFeatures dealloc]):
(-[WKWindowFeatures menuBarVisibility]):
(-[WKWindowFeatures statusBarVisibility]):
(-[WKWindowFeatures toolbarsVisibility]):
(-[WKWindowFeatures allowsResizing]):
(-[WKWindowFeatures x]):
(-[WKWindowFeatures y]):
(-[WKWindowFeatures width]):
(-[WKWindowFeatures height]):
(-[WKWindowFeatures _apiObject]):
(-[WKWindowFeatures _initWithWindowFeatures:]): Deleted.
* UIProcess/API/Cocoa/WKWindowFeaturesInternal.h:
(WebKit::wrapper):
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::UIClient::createNewPage):
* WebKit2.xcodeproj/project.pbxproj:
2015-08-13 Simon Fraser <simon.fraser@apple.com>
FilterOperation.h should not include FilterEffect.h
https://bugs.webkit.org/show_bug.cgi?id=147970
Reviewed by Daniel Bates.
FilterEffect.h pulls in lots of JSC goop via runtime/Uint8ClampedArray.h,
so move its include to FilterOperation.cpp.
Causes include bloat because FilterOperation.h is pulled in via RenderStyle.h.
* UIProcess/ios/WebVideoFullscreenManagerProxy.h:
2015-08-12 Anders Carlsson <andersca@apple.com>
Use WTF::Optional in WindowFeatures
https://bugs.webkit.org/show_bug.cgi?id=147956
Reviewed by Sam Weinig.
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<WindowFeatures>::encode): Deleted.
(IPC::ArgumentCoder<WindowFeatures>::decode): Deleted.
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageUIClient):
* UIProcess/API/Cocoa/WKWindowFeatures.mm:
(-[WKWindowFeatures _initWithWindowFeatures:]):
2015-08-13 Matthew Daiter <mdaiter@apple.com>
Linking device query ability from WebKit2 to clients
https://bugs.webkit.org/show_bug.cgi?id=147263
<rdar://problem/21983345>
Reviewed by Jer Noble.
* Platform/mac/LayerHostingContext.mm:
(WebKit::LayerHostingContext::setColorMatchUntaggedContent):
(WebKit::LayerHostingContext::colorMatchUntaggedContent):
* UIProcess/API/C/WKUserMediaPermissionRequest.cpp:
(WKUserMediaPermissionRequestAllow):
(WKUserMediaPermissionRequestDeviceNamesVideo):
(WKUserMediaPermissionRequestDeviceNamesAudio):
* UIProcess/API/C/WKUserMediaPermissionRequest.h:
* UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
(WebKit::UserMediaPermissionRequestManagerProxy::didReceiveUserMediaPermissionDecision): Deleted.
* UIProcess/UserMediaPermissionRequestManagerProxy.h:
* UIProcess/UserMediaPermissionRequestProxy.cpp:
(WebKit::UserMediaPermissionRequestProxy::allow):
(WebKit::UserMediaPermissionRequestProxy::deny):
* UIProcess/UserMediaPermissionRequestProxy.h:
* WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
(WebKit::UserMediaPermissionRequestManager::didReceiveUserMediaPermissionDecision):
2015-08-12 Alexey Proskuryakov <ap@apple.com>
[Mac] WebKit processes should have access to com.apple.nesessionmanager.flow-divert-token
https://bugs.webkit.org/show_bug.cgi?id=147949
rdar://problem/22254920
Reviewed by Anders Carlsson.
* NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
* WebProcess/com.apple.WebProcess.sb.in:
2015-08-12 Brian Burg <bburg@apple.com>
Web Inspector: CRASH under WebInspector::closeFrontend for some protocol tests
https://bugs.webkit.org/show_bug.cgi?id=147948
Reviewed by Joseph Pecoraro.
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::closeFrontend): Don't invalidate the channel if it's null.
* WebProcess/WebPage/WebInspector.h: Add default member variable values.
2015-08-12 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Not receiving responses for async request IndexedDB.requestDatabaseNames
https://bugs.webkit.org/show_bug.cgi?id=147844
Reviewed by Brian Burg.
* WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
(WebKit::WebIDBFactoryBackend::getDatabaseNames):
This method should not return without calling either the success
or error callbacks. In this case, it can succeed with an empty list.
2015-08-12 Enrica Casucci <enrica@apple.com>
Element interaction should not be canceled when the menu is already being shown.
https://bugs.webkit.org/show_bug.cgi?id=147945
rdar://problem/22206433
Reviewed by Beth Dakin.
When preview is canceled by the action menu gesture, we should not stop interacting
with the element, since the information about the element is used for the menu actions.
We now expose a new method in the action sheet assistant to know if the action sheed is
being shown and we use this as an indication that we should not stop the interaction
with the element.
* UIProcess/ios/WKActionSheetAssistant.h:
* UIProcess/ios/WKActionSheetAssistant.mm:
(-[WKActionSheetAssistant isShowingSheet]): Added.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _interactionStoppedFromPreviewItemController:]): Do not stop
the interaction if the sheet is being shown.
2015-08-12 Matt Rajca <mrajca@apple.com>
Fixed the Release build when MEDIA_SESSION is enabled.
* UIProcess/API/C/WKPage.cpp:
(WKPageHandleMediaEvent):
2015-08-07 Matt Rajca <mrajca@apple.com>
Media Session: notify the UI process when media controls are enabled/disabled
https://bugs.webkit.org/show_bug.cgi?id=147802
Reviewed by Eric Carlson.
* UIProcess/WebMediaSessionFocusManager.cpp:
(WebKit::WebMediaSessionFocusManager::playbackAttributeDidChange): Generalized to take different attributes.
(WebKit::WebMediaSessionFocusManager::mediaElementIsPlayingDidChange): Deleted.
* UIProcess/WebMediaSessionFocusManager.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::isPlayingMediaDidChange): Process new attributes for enabling/disabling media controls.
2015-08-12 Devin Rousso <drousso@apple.com>
Web Inspector: Implement selector highlighting for iOS
https://bugs.webkit.org/show_bug.cgi?id=147919
Reviewed by Timothy Hatcher.
* UIProcess/WKInspectorHighlightView.mm:
(-[WKInspectorHighlightView _layoutForNodeHighlight:offset:]):
Added offset parameter to start drawing the highlight at that index of the highlight quad list.
(-[WKInspectorHighlightView _layoutForNodeListHighlight:]):
Loops through the highlight quads and draws a new highlight for every 4 highlight quad objects.
(-[WKInspectorHighlightView update:]):
Now uses the light highlighting for both nodes and lists of nodes.
2015-08-11 Carlos Garcia Campos <cgarcia@igalia.com>
NetworkProcess: DNS prefetch happens in the Web Process
https://bugs.webkit.org/show_bug.cgi?id=147824
Reviewed by Alexey Proskuryakov.
DNS prefetch requests started in the WebProcess should be sent to
the network process when it's enabled.
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::prefetchDNS): Do the
actual DNS prefetch.
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in: Add
PrefetchDNS message.
* WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp:
(webkitWebExtensionDidReceiveMessage): Use WebProcess::prefetchDNS().
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::prefetchDNS): Ditto.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::sendTapHighlightForNodeIfNecessary): Use
FrameLoaderClient to do the DNS prefetch.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::prefetchDNS): Send the request to the network
process if it's enabled, otherwise do the actual DNS prefetch.
* WebProcess/WebProcess.h:
2015-08-11 Hunseop Jeong <hs85.jeong@samsung.com>
Try to fix the EFL build after r188279
https://bugs.webkit.org/show_bug.cgi?id=147917
Reviewed by Gyuyoung Kim.
Replaced the WKPageLoaderClient with variable name because it is removed in r188279.
* UIProcess/efl/PageLoadClientEfl.cpp:
(WebKit::PageLoadClientEfl::PageLoadClientEfl):
* UIProcess/efl/PagePolicyClientEfl.cpp:
(WebKit::PagePolicyClientEfl::PagePolicyClientEfl):
2015-08-11 Andy Estes <aestes@apple.com>
Tried again to fix the iOS build.
* UIProcess/ios/WKGeolocationProviderIOS.mm:
(-[WKGeolocationProviderIOS initWithProcessPool:]):
2015-08-11 Dan Bernstein <mitz@apple.com>
Tried to fix the iOS build.
* UIProcess/ios/WKGeolocationProviderIOS.mm:
(-[WKGeolocationProviderIOS initWithProcessPool:]):
2015-08-11 Andy Estes <aestes@apple.com>
WebFrameLoaderClient::dispatchDecidePolicyForResponse() calls an std::function after it's been moved from
https://bugs.webkit.org/show_bug.cgi?id=147873
Reviewed by Alexey Proskuryakov.
I noticed during code inspection that we were calling an std::function after WTF::move() has been called on it.
Calling an empty std::function results in a C++ exception being thrown. I don't know how to make a sync IPC
message fail, so I'm not sure how to test this.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse): Called didReceivePolicyDecision instead.
2015-08-11 Beth Dakin <bdakin@apple.com>
REGRESSION (r188053): Sometimes unable to save an image from Google Search/
imgur via long press
https://bugs.webkit.org/show_bug.cgi?id=147896
Reviewed by Enrica Casucci.
http://trac.webkit.org/changeset/188053 added code to call cleanupSheet when
the long press gesture is cancelled. However, the gesture will be called with
the cancelled state when then user taps an item in the action sheet (such as
“save image”), and sometimes the “cancel” comes in before the image has been
saved. That is a problem because we need to avoid cleaning up the sheet until
after the image is saved. Before that patch, we never cleaned up the sheet on
cancel, so this patch goes back to that behavior. We also have to remove some
assertions that assume that everything will be totally cleaned up when a new
sheet is created, but that is not necessarily true due to interactions
between the preview gesture and the long press gesture.
Remove assertions.
* UIProcess/ios/WKActionSheetAssistant.mm:
(-[WKActionSheetAssistant _createSheetWithElementActions:showLinkTitle:]):
(-[WKActionSheetAssistant showImageSheet]):
(-[WKActionSheetAssistant showLinkSheet]):
(-[WKActionSheetAssistant showDataDetectorsSheet]):
Revert the part of Enricas patch that called cleanupSheet when the gesture
is cancelled.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _longPressRecognized:]):
2015-08-11 Anders Carlsson <andersca@apple.com>
Remove unversioned client structs from the C SPI
https://bugs.webkit.org/show_bug.cgi?id=147894
Reviewed by Dan Bernstein.
* Shared/API/c/WKConnectionRef.h:
* UIProcess/API/C/WKContext.h:
* UIProcess/API/C/WKContextConnectionClient.h:
* UIProcess/API/C/WKContextDownloadClient.h:
* UIProcess/API/C/WKContextHistoryClient.h:
* UIProcess/API/C/WKContextInjectedBundleClient.h:
* UIProcess/API/C/WKCookieManager.h:
* UIProcess/API/C/WKDatabaseManager.h:
* UIProcess/API/C/WKGeolocationManager.h:
* UIProcess/API/C/WKIconDatabase.h:
* UIProcess/API/C/WKNotificationProvider.h:
* UIProcess/API/C/WKPageContextMenuClient.h:
* UIProcess/API/C/WKPageDiagnosticLoggingClient.h:
* UIProcess/API/C/WKPageFindClient.h:
* UIProcess/API/C/WKPageFindMatchesClient.h:
* UIProcess/API/C/WKPageFormClient.h:
* UIProcess/API/C/WKPageLoaderClient.h:
* UIProcess/API/C/WKPagePolicyClient.h:
* UIProcess/API/C/WKPageUIClient.h:
* WebProcess/InjectedBundle/API/c/WKBundle.h:
* WebProcess/InjectedBundle/API/c/WKBundlePageBanner.h:
* WebProcess/InjectedBundle/API/c/WKBundlePageContextMenuClient.h:
* WebProcess/InjectedBundle/API/c/WKBundlePageDiagnosticLoggingClient.h:
* WebProcess/InjectedBundle/API/c/WKBundlePageEditorClient.h:
* WebProcess/InjectedBundle/API/c/WKBundlePageFormClient.h:
* WebProcess/InjectedBundle/API/c/WKBundlePageFullScreenClient.h:
* WebProcess/InjectedBundle/API/c/WKBundlePageLoaderClient.h:
* WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h:
* WebProcess/InjectedBundle/API/c/WKBundlePagePolicyClient.h:
* WebProcess/InjectedBundle/API/c/WKBundlePageResourceLoadClient.h:
* WebProcess/InjectedBundle/API/c/WKBundlePageUIClient.h:
2015-08-11 Dan Bernstein <mitz@apple.com>
Reverted r188255, because it turned out that delegates do nonot need this information.
* UIProcess/API/APIUIClient.h:
(API::UIClient::footerHeight):
(API::UIClient::drawHeader):
(API::UIClient::drawFooter):
(API::UIClient::printFrame):
(API::UIClient::canRunModal):
(API::UIClient::runModal):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageUIClient):
* UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
* UIProcess/Cocoa/UIDelegate.h:
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::UIDelegate):
(WebKit::UIDelegate::setDelegate):
(WebKit::UIDelegate::UIClient::reachedApplicationCacheOriginQuota):
(WebKit::UIDelegate::UIClient::printFrame):
(WebKit::UIDelegate::UIClient::close):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::runOpenPanel):
(WebKit::WebPageProxy::printFrame):
(WebKit::WebPageProxy::printMainFrame):
(WebKit::WebPageProxy::setMediaVolume):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::setShouldSendEventsSynchronously):
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::print):
(WebKit::WebChromeClient::exceededDatabaseQuota):
2015-08-11 Dan Bernstein <mitz@apple.com>
[Cocoa] The UI delegate can't tell if printing was user-initiated
https://bugs.webkit.org/show_bug.cgi?id=147869
Reviewed by Sam Weinig.
* UIProcess/API/APIUIClient.h:
(API::UIClient::printFrame): Added processingUserGesture argument.
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageUIClient): Updated for new client function signature.
* UIProcess/API/Cocoa/WKUIDelegatePrivate.h: Added userInitiated boolean argument to
-_webView:printFrame:.
* UIProcess/Cocoa/UIDelegate.h: Added bool to m_delegateMethods for the new method.
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::UIDelegate):
(WebKit::UIDelegate::setDelegate): Initialized new bool.
(WebKit::UIDelegate::UIClient::printFrame): Pass processingUserGesture as the delegates
userInitiated argument.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::printFrame): Added processingUserGesture argument, passing it along
to the client.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in: Added processingUserGesture argument to printFrame.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::print): Pass new argument.
2015-08-10 Matthew Daiter <mdaiter@apple.com>
Add MediaDeviceIdentifier to WebsiteDataTypes
https://bugs.webkit.org/show_bug.cgi?id=147853
Reviewed by Jer Noble.
* Shared/WebsiteData/WebsiteDataTypes.h:
2015-08-10 Sam Weinig <sam@webkit.org>
Try to fix the 32-bit build.
* UIProcess/API/mac/WKViewInternal.h:
2015-08-08 Sam Weinig <sam@webkit.org>
Replace WebPageConfiguration with API::PageConfiguration and expose a C-SPI accessor for it
https://bugs.webkit.org/show_bug.cgi?id=147811
Reviewed by Darin Adler.
- Adds the missing pieces from WebPageConfiguration into API::PageConfiguration.
- Adds C-SPI to set and get the WebsiteDataStore on the WKPageConfigurationRef.
- Uses API::PageConfiguration to pass configuration information from WKWebView/WKView
to WebPageProxy.
- Stores the API::PageConfiguration on the WebPageProxy and exposes a new C-SPI function,
WKPageCopyPageConfiguration, to get a copy of it.
* UIProcess/API/APIPageConfiguration.cpp:
(API::PageConfiguration::create):
(API::PageConfiguration::PageConfiguration):
(API::PageConfiguration::~PageConfiguration):
(API::PageConfiguration::copy):
(API::PageConfiguration::processPool):
(API::PageConfiguration::setRelatedPage):
(API::PageConfiguration::visitedLinkProvider):
(API::PageConfiguration::setVisitedLinkProvider):
(API::PageConfiguration::websiteDataStore):
(API::PageConfiguration::setWebsiteDataStore):
(API::PageConfiguration::sessionID):
(API::PageConfiguration::setSessionID):
(API::PageConfiguration::webPageConfiguration): Deleted.
* UIProcess/API/APIPageConfiguration.h:
(API::PageConfiguration::preferenceValues):
(API::PageConfiguration::treatsSHA1SignedCertificatesAsInsecure):
(API::PageConfiguration::setTreatsSHA1SignedCertificatesAsInsecure):
(API::PageConfiguration::alwaysRunsAtForegroundPriority):
(API::PageConfiguration::setAlwaysRunsAtForegroundPriority):
(API::PageConfiguration::create): Deleted.
* UIProcess/API/C/WKPage.cpp:
(WKPageGetPageGroup):
(WKPageCopyPageConfiguration):
(WKPageLoadURL):
* UIProcess/API/C/WKPage.h:
* UIProcess/API/C/WKPageConfigurationRef.cpp:
(WKPageConfigurationSetRelatedPage):
(WKPageConfigurationGetWebsiteDataStore):
(WKPageConfigurationSetWebsiteDataStore):
* UIProcess/API/C/WKPageConfigurationRef.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
* UIProcess/API/ios/WKViewIOS.mm:
(-[WKView _commonInitializationWithContextRef:pageGroupRef:relatedToPage:]):
* UIProcess/API/mac/WKView.mm:
(-[WKView _setPrimaryTrackingArea:]):
(-[WKView initWithFrame:processPool:configuration:webView:]):
(-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]):
(-[WKView initWithFrame:configurationRef:]):
(-[WKView wantsUpdateLayer]):
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::create):
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::~WebPageProxy):
(WebKit::WebPageProxy::configuration):
(WebKit::WebPageProxy::processIdentifier):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::pageID):
(WebKit::WebPageProxy::sessionID):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::createNewWebProcessRespectingProcessCountLimit):
(WebKit::WebProcessPool::createWebPage):
(WebKit::WebProcessPool::download):
* UIProcess/WebProcessPool.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::webPage):
(WebKit::WebProcessProxy::createWebPage):
* UIProcess/WebProcessProxy.h:
(WebKit::WebProcessProxy::processPool):
* UIProcess/ios/WKContentView.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _commonInitializationWithProcessPool:configuration:]):
(-[WKContentView initWithFrame:processPool:configuration:webView:]):
(-[WKContentView initWithFrame:processPool:configuration:wkView:]):
(-[WKContentView dealloc]):
2015-08-10 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r187131 and r187286.
https://bugs.webkit.org/show_bug.cgi?id=147839
Causing mroe frequent crashes with invalid layer bounds
(rdar://problem/21465328) (Requested by smfr on #webkit).
Reverted changesets:
"[iOS] Menu drop down such as on nike.com does not stay"
https://bugs.webkit.org/show_bug.cgi?id=147047
http://trac.webkit.org/changeset/187131
"[iOS] REGRESSION (187131): Loading CuteOverload zooms in to
the top left corner."
https://bugs.webkit.org/show_bug.cgi?id=147251
http://trac.webkit.org/changeset/187286
2015-08-07 Matt Rajca <mrajca@apple.com>
Media Session: generalize isFocusedContentMediaElementPlaying so it works with other playback attributes
https://bugs.webkit.org/show_bug.cgi?id=147797
Reviewed by Simon Fraser.
* UIProcess/API/C/WKMediaSessionFocusManager.cpp:
(WKMediaSessionFocusManagerValueForPlaybackAttribute):
(WKMediaSessionFocusManagerIsFocusedContentMediaElementPlaying): Deleted.
* UIProcess/API/C/WKMediaSessionFocusManager.h:
* UIProcess/WebMediaSessionFocusManager.cpp:
(WebKit::WebMediaSessionFocusManager::valueForPlaybackAttribute):
(WebKit::WebMediaSessionFocusManager::mediaControlIsEnabledDidChange):
(WebKit::WebMediaSessionFocusManager::isFocusedContentMediaElementPlaying): Deleted.
(WebKit::WebMediaSessionFocusManager::mediaElementIsPlayingDidChange): Deleted.
* UIProcess/WebMediaSessionFocusManager.h:
2015-08-10 Zan Dobersek <zdobersek@igalia.com>
[CoordinatedGraphics] Fix forward declarations of CoordinatedGraphicsLayerState, ViewportAttributes
https://bugs.webkit.org/show_bug.cgi?id=147823
Reviewed by Carlos Garcia Campos.
* WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
* WebProcess/WebPage/LayerTreeHost.h:
2015-08-10 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Crash when the web view is destroyed while the screensaver DBUs proxy is being created
https://bugs.webkit.org/show_bug.cgi?id=147780
Reviewed by Sergio Villar Senin.
We should cancel the screenSaverInhibitCancellable on
dispose. Also use adoptGRef() when creating the cancellable object
to not leak it.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseDispose):
(webkitWebViewBaseSendInhibitMessageToScreenSaver):
(webkitWebViewBaseInhibitScreenSaver):
2015-08-09 Chris Dumez <cdumez@apple.com>
Follow-up nit fixes after r187691.
https://bugs.webkit.org/show_bug.cgi?id=128006
Reviewed by Gavin Barraclough.
Use modern for-loops instead of explicit iterators.
* Shared/Authentication/AuthenticationManager.cpp:
(WebKit::AuthenticationManager::shouldCoalesceChallenge):
(WebKit::AuthenticationManager::coalesceChallengesMatching):
2015-08-07 Filip Pizlo <fpizlo@apple.com>
Lightweight locks should be adaptive
https://bugs.webkit.org/show_bug.cgi?id=147545
Reviewed by Geoffrey Garen.
* WebProcess/WebPage/EventDispatcher.cpp:
(WebKit::EventDispatcher::clearQueuedTouchEventsForPage):
(WebKit::EventDispatcher::getQueuedTouchEventsForPage):
(WebKit::EventDispatcher::touchEvent):
(WebKit::EventDispatcher::dispatchTouchEvents):
* WebProcess/WebPage/EventDispatcher.h:
* WebProcess/WebPage/ViewUpdateDispatcher.cpp:
(WebKit::ViewUpdateDispatcher::visibleContentRectUpdate):
(WebKit::ViewUpdateDispatcher::dispatchVisibleContentRectUpdate):
* WebProcess/WebPage/ViewUpdateDispatcher.h:
2015-08-07 Wenson Hsieh <wenson_hsieh@apple.com>
Temporarily allow programmatic input assistance for adding Gmail account
https://bugs.webkit.org/show_bug.cgi?id=147792
Reviewed by Enrica Casucci.
<rdar://problem/22126518>
Temporary fix for keyboard input sliding out and immediately back in upon user interaction
in the Gmail 2-factor authentication page.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]): Early
return no longer triggers due to lack of user interaction when adding a new Gmail account
through Settings.
2015-08-07 Brady Eidson <beidson@apple.com>
Move concrete KeyedDecoder/Encoder implementations to WebCore.
https://bugs.webkit.org/show_bug.cgi?id=147757.
Rubberstamped by Andy Estes.
* DatabaseProcess/IndexedDB/IDBSerialization.cpp:
(WebKit::serializeIDBKeyPath):
(WebKit::deserializeIDBKeyPath):
(WebKit::serializeIDBKeyData):
(WebKit::deserializeIDBKeyData):
* PlatformEfl.cmake:
* PlatformGTK.cmake:
* WebKit2.xcodeproj/project.pbxproj:
2015-08-07 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix GTK+ compile warning also introduced in r188121.
* UIProcess/API/gtk/WebKitInstallMissingMediaPluginsPermissionRequest.cpp:
(webkit_install_missing_media_plugins_permission_request_get_description):
2015-08-07 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix GTK+ debug build after r188121.
* UIProcess/API/gtk/WebKitInstallMissingMediaPluginsPermissionRequest.cpp:
(webkit_install_missing_media_plugins_permission_request_get_description):
2015-08-07 Carlos Garcia Campos <cgarcia@igalia.com>
[GStreamer] Do not automatically show PackageKit codec installation notifications
https://bugs.webkit.org/show_bug.cgi?id=135973
Reviewed by Philippe Normand.
Add InstallMissingMediaPluginsPermissionRequest to ask the API
layer whether to allow or deny the installation of missing media
plugins. And add a GTK+ implementation based on current permission
request API. Replace the
PageClientImpl::createGstInstallPluginsContext() with
decicePolicyForInstallMissingMediaPluginsPermissionRequest() that
passes the InstallMissingMediaPluginsPermissionRequest object to
the API layer. The allow method receives the
GstInstallPluginsContext now, so that it can be created by the API implementation.
* PlatformEfl.cmake:
* PlatformGTK.cmake:
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::decicePolicyForInstallMissingMediaPluginsPermissionRequest):
* UIProcess/API/gtk/PageClientImpl.h:
* UIProcess/API/gtk/WebKitInstallMissingMediaPluginsPermissionRequest.cpp: Added.
(createGstInstallPluginsContext):
(webkitInstallMissingMediaPluginsPermissionRequestAllow):
(webkitInstallMissingMediaPluginsPermissionRequestDeny):
(webkit_permission_request_interface_init):
(webkitInstallMissingMediaPluginsPermissionRequestDispose):
(webkit_install_missing_media_plugins_permission_request_class_init):
(webkitInstallMissingMediaPluginsPermissionRequestCreate):
(webkit_install_missing_media_plugins_permission_request_get_description):
* UIProcess/API/gtk/WebKitInstallMissingMediaPluginsPermissionRequest.h: Added.
* UIProcess/API/gtk/WebKitInstallMissingMediaPluginsPermissionRequestPrivate.h: Added.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewRequestInstallMissingMediaPlugins):
* UIProcess/API/gtk/WebKitWebViewPrivate.h:
* UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
* UIProcess/API/gtk/docs/webkit2gtk-4.0.types:
* UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
* UIProcess/API/gtk/webkit2.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/efl/WebViewEfl.h:
* UIProcess/gstreamer/InstallMissingMediaPluginsPermissionRequest.cpp: Copied from Source/WebKit2/UIProcess/gstreamer/WebPageProxyGStreamer.cpp.
(WebKit::InstallMissingMediaPluginsPermissionRequest::InstallMissingMediaPluginsPermissionRequest):
(WebKit::InstallMissingMediaPluginsPermissionRequest::~InstallMissingMediaPluginsPermissionRequest):
(WebKit::InstallMissingMediaPluginsPermissionRequest::allow):
(WebKit::InstallMissingMediaPluginsPermissionRequest::deny):
(WebKit::InstallMissingMediaPluginsPermissionRequest::didEndRequestInstallMissingMediaPlugins):
* UIProcess/gstreamer/InstallMissingMediaPluginsPermissionRequest.h: Copied from Source/WebKit2/WebProcess/WebPage/gstreamer/WebPageGStreamer.cpp.
(WebKit::InstallMissingMediaPluginsPermissionRequest::create):
(WebKit::InstallMissingMediaPluginsPermissionRequest::page):
(WebKit::InstallMissingMediaPluginsPermissionRequest::details):
(WebKit::InstallMissingMediaPluginsPermissionRequest::description):
* UIProcess/gstreamer/WebPageProxyGStreamer.cpp:
(WebKit::WebPageProxy::requestInstallMissingMediaPlugins):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::requestInstallMissingMediaPlugins):
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/gstreamer/WebPageGStreamer.cpp:
(WebKit::WebPage::requestInstallMissingMediaPlugins):
2015-08-06 Beth Dakin <bdakin@apple.com>
TextIndicator can have stale contentImage data and crash
https://bugs.webkit.org/show_bug.cgi?id=147770
-and corresponding-
rdar://problem/22181735
Reviewed by Tim Horton.
If there is no contentImage or contentImageWithHighlight, set them to
nullptr.
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<TextIndicatorData>::decode):
2015-08-06 Dan Bernstein <mitz@apple.com>
Fixed all the builds after trying to fix the non-HAVE(LINK_PREVIEW) build.
* UIProcess/ios/WKContentViewInteraction.mm:
2015-08-06 Dan Bernstein <mitz@apple.com>
Fixed the non-HAVE(LINK_PREVIEW) build.
* UIProcess/ios/WKContentViewInteraction.mm:
2015-08-06 Enrica Casucci <enrica@apple.com>
Cleanup action sheet only when long press is canceled (non ended).
https://bugs.webkit.org/show_bug.cgi?id=147766
rdar://problem/22181842
Reviewed by Tim Horton.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _longPressRecognized:]):
2015-08-06 Matt Rajca <mrajca@apple.com>
Media Session: notify focus manager clients when the playing state of the focused media element changes
https://bugs.webkit.org/show_bug.cgi?id=147745
Reviewed by Tim Horton.
Added plumbing to allow focus manager's clients to be notified when the focused Content media element begins
playing or is paused.
* UIProcess/API/C/WKMediaSessionFocusManager.cpp:
(WKMediaSessionFocusManagerSetClient):
* UIProcess/API/C/WKMediaSessionFocusManager.h:
* UIProcess/WebMediaSessionFocusManager.cpp:
(WebKit::WebMediaSessionFocusManager::initializeClient):
(WebKit::WebMediaSessionFocusManager::mediaElementIsPlayingDidChange):
* UIProcess/WebMediaSessionFocusManager.h:
* UIProcess/WebMediaSessionFocusManagerClient.cpp:
(WebKit::WebMediaSessionFocusManagerClient::didChangePlaybackAttribute):
* UIProcess/WebMediaSessionFocusManagerClient.h:
* WebKit2.xcodeproj/project.pbxproj:
2015-08-06 Alex Christensen <achristensen@webkit.org>
Make CMake usable on Mac.
https://bugs.webkit.org/show_bug.cgi?id=147756
Reviewed by Tim Horton.
* PlatformMac.cmake:
DatabaseProcess_SOURCES needs something in order to not have errors when generating build systems from CMake.
This doesn't fix everything, but it can now be used to build jsc again.
2015-08-06 Enrica Casucci <enrica@apple.com>
Build fix for iOS after http://trac.webkit.org/changeset/188053.
Unreviewed.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _registerPreview]):
2015-08-06 Enrica Casucci <enrica@apple.com>
Allow long press to cancel link preview.
https://bugs.webkit.org/show_bug.cgi?id=147743
rdar://problem/22128839
Reviewed by Tim Horton.
We should be able to show the context menu at the beginnig of link preview.
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _removeDefaultGestureRecognizers]):
(-[WKContentView _addDefaultGestureRecognizers]):
(-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
(-[WKContentView _longPressRecognized:]):
(-[WKContentView _singleTapRecognized:]):
(-[WKContentView _registerPreview]):
(-[WKContentView _unregisterPreview]):
2015-08-06 Matt Rajca <mrajca@apple.com>
Media Session: rename isFocusedContentMediaElementPaused and get rid of callback
https://bugs.webkit.org/show_bug.cgi?id=147726
Reviewed by Simon Fraser.
- isFocusedContentMediaElementPaused should be renamed to isFocusedContentMediaElementPlaying to match recent
refactoring work.
- isFocusedContentMediaElementPlaying itself does not need a callback anymore because the value can be returned
directly.
* UIProcess/API/C/WKMediaSessionFocusManager.cpp:
(WKMediaSessionFocusManagerIsFocusedContentMediaElementPlaying): Removed callback and renamed from...
(WKMediaSessionFocusManagerIsFocusedContentMediaElementPaused): Deleted.
* UIProcess/API/C/WKMediaSessionFocusManager.h:
* UIProcess/WebMediaSessionFocusManager.cpp:
(WebKit::WebMediaSessionFocusManager::isFocusedContentMediaElementPlaying): Removed callback and renamed from...
(WebKit::WebMediaSessionFocusManager::isFocusedContentMediaElementPaused): Deleted.
* UIProcess/WebMediaSessionFocusManager.h:
2015-08-06 Csaba Osztrogonác <ossy@webkit.org>
[EFL] Bump EFL version to 1.15.0
https://bugs.webkit.org/show_bug.cgi?id=147450
Reviewed by Gyuyoung Kim.
* PlatformEfl.cmake:
2015-08-06 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Crash closing a page when a context menu is open
https://bugs.webkit.org/show_bug.cgi?id=147682
Reviewed by Sergio Villar Senin.
Implement WebContextMenuProxy::cancelTracking() to clear the
internal menu when the web page is closed.
* UIProcess/gtk/WebContextMenuProxyGtk.cpp:
(WebKit::WebContextMenuProxyGtk::cancelTracking):
(WebKit::WebContextMenuProxyGtk::~WebContextMenuProxyGtk): Deleted.
* UIProcess/gtk/WebContextMenuProxyGtk.h:
2015-08-04 Matt Rajca <mrajca@apple.com>
Media Session: push paused state to the media session focus manager instead of polling
https://bugs.webkit.org/show_bug.cgi?id=147633
Reviewed by Simon Fraser.
* UIProcess/WebMediaSessionFocusManager.cpp:
(WebKit::WebMediaSessionFocusManager::isFocusedContentMediaElementPaused): Report whether the focused media
element is currently playing. The callback is no longer necessary and will be removed in a future patch in
favor of returning a value directly.
(WebKit::WebMediaSessionFocusManager::mediaElementIsPlayingDidChange): Keep track of whether the focused media
element is currently playing.
* UIProcess/WebMediaSessionFocusManager.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::isPlayingMediaDidChange): If the focused media element begins/ends playing, keep track
of its playing state.
(WebKit::WebPageProxy::isMediaElementPaused): Deleted. We now push media playback state changes instead of
polling.
* UIProcess/WebPageProxy.h: isPlayingMediaDidChange is now passed the ID of the media element that triggered
the 'playing' state change. This can be used in conjunction with the IsSourcePlaying media flag to identify
whether the source element begin/ended playing.
* UIProcess/WebPageProxy.messages.in: Ditto.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::setPluginIsPlayingAudio): Since a media element did not trigger this, pass in 0 for the
source media element.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::isPlayingMediaDidChange): isPlayingMediaDidChange is now passed the ID of the media
element that triggered the 'playing' state change.
* WebProcess/WebCoreSupport/WebChromeClient.h: Ditto.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::isMediaElementPaused): Deleted. We now push media playback state changes instead of polling.
* WebProcess/WebPage/WebPage.h: Ditto.
* WebProcess/WebPage/WebPage.messages.in: Ditto.
2015-08-05 Tim Horton <timothy_horton@apple.com>
PDFPlugins are clipped in link previews (and remain so when opened)
https://bugs.webkit.org/show_bug.cgi?id=147708
<rdar://problem/22055130>
Reviewed by Simon Fraser.
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:processPool:configuration:webView:]):
(-[WKView _supportsArbitraryLayoutModes]):
(-[WKView _didCommitLoadForMainFrame]):
(-[WKView _setLayoutMode:]):
(-[WKView _setViewScale:]):
Avoid using any layout mode other than "ViewSize" for main frame PluginDocuments,
because they will often end up behaving incorrectly (especially with PDFPlugin,
which is even more special in that it takes over application of page scale).
Save any incoming changes to the viewScale and layoutMode, and re-apply
them once we load something in the main frame that is *not* a PluginDocument.
* UIProcess/API/mac/WKViewInternal.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::scalePage):
Make sure to reset WebCore's page scale if the main frame contains a
PluginDocument that takes care of page scale itself.
(WebKit::WebPage::didCommitLoad):
Do the same thing as what we do in WKView _didCommitLoadForMainFrame,
but without the UI process round-trip, to avoid an ugly flash.
* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::didCommitLoad):
* UIProcess/WebFrameProxy.h:
(WebKit::WebFrameProxy::containsPluginDocument):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didCommitLoadForFrame):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::didCommitLoadForMainFrame):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
Plumb and keep track of whether the main frame contains a PluginDocument or not.
2015-08-05 Filip Pizlo <fpizlo@apple.com>
Unreviewed, roll out http://trac.webkit.org/changeset/187972.
* DatabaseProcess/DatabaseProcess.cpp:
(WebKit::DatabaseProcess::postDatabaseTask):
(WebKit::DatabaseProcess::performNextDatabaseTask):
* DatabaseProcess/DatabaseProcess.h:
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::shutdown):
(WebKit::UniqueIDBDatabase::postMainThreadTask):
(WebKit::UniqueIDBDatabase::performNextMainThreadTask):
(WebKit::UniqueIDBDatabase::postDatabaseTask):
(WebKit::UniqueIDBDatabase::performNextDatabaseTask):
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
* Platform/IPC/Connection.cpp:
(IPC::Connection::sendSyncMessage):
(IPC::Connection::sendSyncMessageFromSecondaryThread):
(IPC::Connection::waitForSyncReply):
(IPC::Connection::processIncomingSyncReply):
(IPC::Connection::connectionDidClose):
* Platform/IPC/Connection.h:
* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
(WebKit::CoordinatedGraphicsScene::appendUpdate):
* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
(WebKit::ThreadedCompositor::createCompositingThread):
(WebKit::ThreadedCompositor::runCompositingThread):
(WebKit::ThreadedCompositor::terminateCompositingThread):
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
* Shared/Network/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm:
(WebKit::CustomProtocolManager::addCustomProtocol):
(WebKit::CustomProtocolManager::removeCustomProtocol):
(WebKit::CustomProtocolManager::registerScheme):
(WebKit::CustomProtocolManager::unregisterScheme):
(WebKit::CustomProtocolManager::supportsScheme):
(WebKit::CustomProtocolManager::protocolForID):
* Shared/Network/CustomProtocols/CustomProtocolManager.h:
* Shared/linux/SeccompFilters/SeccompBroker.cpp:
* WebProcess/Plugins/PluginProcessConnectionManager.cpp:
(WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
(WebKit::PluginProcessConnectionManager::removePluginProcessConnection):
(WebKit::PluginProcessConnectionManager::pluginProcessCrashed):
* WebProcess/Plugins/PluginProcessConnectionManager.h:
* WebProcess/WebPage/EventDispatcher.cpp:
(WebKit::EventDispatcher::addScrollingTreeForPage):
(WebKit::EventDispatcher::removeScrollingTreeForPage):
(WebKit::EventDispatcher::wheelEvent):
* WebProcess/WebPage/EventDispatcher.h:
* WebProcess/soup/WebKitSoupRequestInputStream.cpp:
(webkitSoupRequestInputStreamReadAsync):
(webkitSoupRequestInputStreamAddData):
2015-08-05 Ryosuke Niwa <rniwa@webkit.org>
WebInspectorProxy should make WKWebView first responder
https://bugs.webkit.org/show_bug.cgi?id=147676
Reviewed by Timothy Hatcher.
Revert r181927 now that WKWebView forwards the first responder role to WKView as needed.
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformBringToFront):
(WebKit::WebInspectorProxy::platformAttach):
2015-08-04 Filip Pizlo <fpizlo@apple.com>
Rename Mutex to DeprecatedMutex
https://bugs.webkit.org/show_bug.cgi?id=147675
Reviewed by Geoffrey Garen.
* DatabaseProcess/DatabaseProcess.cpp:
(WebKit::DatabaseProcess::postDatabaseTask):
(WebKit::DatabaseProcess::performNextDatabaseTask):
* DatabaseProcess/DatabaseProcess.h:
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::shutdown):
(WebKit::UniqueIDBDatabase::postMainThreadTask):
(WebKit::UniqueIDBDatabase::performNextMainThreadTask):
(WebKit::UniqueIDBDatabase::postDatabaseTask):
(WebKit::UniqueIDBDatabase::performNextDatabaseTask):
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
* Platform/IPC/Connection.cpp:
(IPC::Connection::sendSyncMessage):
(IPC::Connection::sendSyncMessageFromSecondaryThread):
(IPC::Connection::waitForSyncReply):
(IPC::Connection::processIncomingSyncReply):
(IPC::Connection::connectionDidClose):
* Platform/IPC/Connection.h:
* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
(WebKit::CoordinatedGraphicsScene::appendUpdate):
* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
(WebKit::ThreadedCompositor::createCompositingThread):
(WebKit::ThreadedCompositor::runCompositingThread):
(WebKit::ThreadedCompositor::terminateCompositingThread):
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
* Shared/Network/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm:
(WebKit::CustomProtocolManager::addCustomProtocol):
(WebKit::CustomProtocolManager::removeCustomProtocol):
(WebKit::CustomProtocolManager::registerScheme):
(WebKit::CustomProtocolManager::unregisterScheme):
(WebKit::CustomProtocolManager::supportsScheme):
(WebKit::CustomProtocolManager::protocolForID):
* Shared/Network/CustomProtocols/CustomProtocolManager.h:
* Shared/linux/SeccompFilters/SeccompBroker.cpp:
* WebProcess/Plugins/PluginProcessConnectionManager.cpp:
(WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
(WebKit::PluginProcessConnectionManager::removePluginProcessConnection):
(WebKit::PluginProcessConnectionManager::pluginProcessCrashed):
* WebProcess/Plugins/PluginProcessConnectionManager.h:
* WebProcess/WebPage/EventDispatcher.cpp:
(WebKit::EventDispatcher::addScrollingTreeForPage):
(WebKit::EventDispatcher::removeScrollingTreeForPage):
(WebKit::EventDispatcher::wheelEvent):
* WebProcess/WebPage/EventDispatcher.h:
* WebProcess/soup/WebKitSoupRequestInputStream.cpp:
(webkitSoupRequestInputStreamReadAsync):
(webkitSoupRequestInputStreamAddData):
2015-08-05 Daniel Bates <dabates@apple.com>
REGRESSION (r185111): Clicking phone numbers doesn't prompt to call sometimes
https://bugs.webkit.org/show_bug.cgi?id=147678
<rdar://problem/21827815>
Reviewed by Brady Eidson.
Teach WebKit to save and restore the "should open external URLs" policy.
* Shared/SessionState.cpp:
(WebKit::isValidEnum): Added.
(WebKit::PageState::encode): Modified to encode the "should open external URLs" policy.
(WebKit::PageState::decode): Modified to decode the "should open external URLs" policy.
* Shared/SessionState.h: Added ShouldOpenExternalURLsPolicy to PageState (defaults to WebCore::ShouldOpenExternalURLsPolicy::ShouldNotAllow).
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _killWebContentProcessAndResetState]): Added; used in the unit test TestWebKitAPI/Tests/WebKit2Cocoa/ShouldOpenExternalURLsInNewWindowActions.mm.
* UIProcess/API/Cocoa/WKWebViewPrivate.h: Declare -[WKWebView _killWebContentProcessAndResetState].
* UIProcess/mac/LegacySessionStateCoding.cpp: Defined constant sessionHistoryEntryShouldOpenExternalURLsPolicyKey.
(WebKit::encodeSessionHistory): Modified to encode the "should open external URLs" policy.
(WebKit::decodeSessionHistoryEntry): Modified to decode the "should open external URLs" policy.
* WebProcess/WebCoreSupport/SessionStateConversion.cpp:
(WebKit::toPageState): Copy "should open external URLs" policy from specified history item.
(WebKit::toHistoryItem): Apply "should open external URLs" policy from PageState to HistoryItem.
2015-08-04 Antti Koivisto <antti@apple.com>
Network cache fetches should have timeout
https://bugs.webkit.org/show_bug.cgi?id=147631
Reviewed by Andreas Kling.
System might be under heavy I/O pressure. If it takes long time to get data from disk we should load from network instead.
This patch introduces 1.5s timeout for disk reads. If the last dispatched cache read takes longer than that we cancel all
active and pending reads and just load those resources from network.
* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::Storage::ReadOperation::ReadOperation):
(WebKit::NetworkCache::Storage::ReadOperation::cancel):
(WebKit::NetworkCache::Storage::ReadOperation::finish):
Factor to functions.
(WebKit::NetworkCache::Storage::Storage):
(WebKit::NetworkCache::Storage::updateFileModificationTime):
(WebKit::NetworkCache::Storage::dispatchReadOperation):
(WebKit::NetworkCache::Storage::finishReadOperation):
(WebKit::NetworkCache::Storage::cancelAllReadOperations):
(WebKit::NetworkCache::Storage::dispatchPendingReadOperations):
(WebKit::NetworkCache::Storage::dispatchPendingWriteOperations):
Also make dispatch functions transfer the operation ownership.
(WebKit::NetworkCache::shouldStoreBodyAsBlob):
(WebKit::NetworkCache::Storage::dispatchWriteOperation):
* NetworkProcess/cache/NetworkCacheStorage.h:
2015-08-04 Matt Rajca <mrajca@apple.com>
Media Session: add a focus manager that WebKit clients can use to access the focused media element
https://bugs.webkit.org/show_bug.cgi?id=147629
Reviewed by Tim Horton.
* Shared/API/APIObject.h: Added a new type for the focus manager.
* Shared/API/c/WKBase.h: Added a new type for the focus manager.
* UIProcess/API/C/WKAPICast.h: Added a new type for the focus manager.
* UIProcess/API/C/WKContext.cpp: The "global" focus manager is accessed via WKContext.
(WKContextGetMediaSessionFocusManager):
* UIProcess/API/C/WKContext.h:
* UIProcess/API/C/WKMediaSessionFocusManager.cpp: Added C wrapper for WebMediaSessionFocusManager.
(WKMediaSessionFocusManagerGetTypeID):
(WKMediaSessionFocusManagerIsFocusedContentMediaElementPaused):
* UIProcess/API/C/WKMediaSessionFocusManager.h: Added C wrapper for WebMediaSessionFocusManager.
* UIProcess/WebMediaSessionFocusManager.cpp: Added to keep track of the focused media element in the UI process and let clients query this state.
(WebKit::WebMediaSessionFocusManager::supplementName):
(WebKit::WebMediaSessionFocusManager::create):
(WebKit::WebMediaSessionFocusManager::WebMediaSessionFocusManager):
(WebKit::WebMediaSessionFocusManager::refWebContextSupplement):
(WebKit::WebMediaSessionFocusManager::derefWebContextSupplement):
(WebKit::WebMediaSessionFocusManager::isFocusedContentMediaElementPaused): Check if the media element on the focused page is paused.
(WebKit::WebMediaSessionFocusManager::setFocusedMediaElement): Keep track of the focused page / media element pair.
(WebKit::WebMediaSessionFocusManager::clearFocusedMediaElement): Reset the focused page / media element pair.
* UIProcess/WebMediaSessionFocusManager.h: Added.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::isMediaElementPaused): Updated to take a UnsignedCallback.
(WebKit::WebPageProxy::focusedContentMediaElementDidChange): Store the focused media element in the focus manager.
* UIProcess/WebPageProxy.h:
* UIProcess/WebProcessPool.cpp: Added WebMediaSessionFocusManager as a supplement.
* UIProcess/WebProcessPool.h: WebMediaSessionFocusManager is a supplement, so include its header.
* WebKit2.xcodeproj/project.pbxproj: Added new sources and ran sort-xcode-project.
2015-08-04 Anders Carlsson <andersca@apple.com>
Get rid of ReasonForCallingAllowPlugins since it's not used anywhere
https://bugs.webkit.org/show_bug.cgi?id=147648
Reviewed by Andreas Kling.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::objectContentType):
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::getPluginInfo):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::createPlugin):
(WebKit::WebPage::canPluginHandleResponse):
(WebKit::WebPage::canShowMIMEType):
2015-08-04 Alexey Proskuryakov <ap@apple.com>
Implement NPAPI redirect handling
https://bugs.webkit.org/show_bug.cgi?id=138675
rdar://problem/15779101
Patch by Jeffrey Pfau, updated and tweaked by me.
Reviewed by Anders Carlsson.
* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::loadURL):
(WebKit::PluginControllerProxy::continueStreamLoad):
(WebKit::PluginControllerProxy::cancelStreamLoad):
(WebKit::PluginControllerProxy::didEvaluateJavaScript):
(WebKit::PluginControllerProxy::streamWillSendRequest):
(WebKit::PluginControllerProxy::streamDidReceiveResponse):
* PluginProcess/PluginControllerProxy.h:
* PluginProcess/PluginControllerProxy.messages.in:
* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::willSendRequest):
* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
(WebKit::NPN_ConvertPoint):
(WebKit::NPN_URLRedirectResponse):
(WebKit::initializeBrowserFuncs):
(WebKit::netscapeBrowserFuncs):
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::getAuthenticationInfo):
(WebKit::NetscapePlugin::registerRedirect):
(WebKit::NetscapePlugin::urlRedirectResponse):
(WebKit::NetscapePlugin::setIsPlayingAudio):
(WebKit::NetscapePlugin::NPP_URLNotify):
(WebKit::NetscapePlugin::NPP_URLRedirectNotify):
(WebKit::NetscapePlugin::NPP_GetValue):
(WebKit::NetscapePlugin::didEvaluateJavaScript):
(WebKit::NetscapePlugin::streamWillSendRequest):
(WebKit::NetscapePlugin::streamDidReceiveResponse):
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
(WebKit::NetscapePluginStream::~NetscapePluginStream):
(WebKit::NetscapePluginStream::willSendRequest):
(WebKit::NetscapePluginStream::didReceiveResponse):
(WebKit::NetscapePluginStream::stop):
(WebKit::NetscapePluginStream::setURL):
(WebKit::NetscapePluginStream::cancel):
* WebProcess/Plugins/Netscape/NetscapePluginStream.h:
(WebKit::NetscapePluginStream::streamID):
(WebKit::NetscapePluginStream::npStream):
* WebProcess/Plugins/PDF/PDFPlugin.h:
* WebProcess/Plugins/Plugin.h:
* WebProcess/Plugins/PluginController.h:
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::didEvaluateJavaScript):
(WebKit::PluginProxy::streamWillSendRequest):
(WebKit::PluginProxy::streamDidReceiveResponse):
(WebKit::PluginProxy::setPluginIsPlayingAudio):
(WebKit::PluginProxy::continueStreamLoad):
(WebKit::PluginProxy::cancelStreamLoad):
* WebProcess/Plugins/PluginProxy.h:
* WebProcess/Plugins/PluginProxy.messages.in:
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::Stream::streamID):
(WebKit::PluginView::Stream::Stream):
(WebKit::PluginView::Stream::cancel):
(WebKit::PluginView::Stream::continueLoad):
(WebKit::buildHTTPHeaders):
(WebKit::lastModifiedDateMS):
(WebKit::PluginView::Stream::willSendRequest):
(WebKit::PluginView::Stream::didReceiveResponse):
(WebKit::PluginView::cancelStreamLoad):
(WebKit::PluginView::continueStreamLoad):
(WebKit::PluginView::cancelManualStreamLoad):
* WebProcess/Plugins/PluginView.h:
2015-08-04 Chris Dumez <cdumez@apple.com>
Unreviewed, rolling out r187812.
This is not safe
Reverted changeset:
"[WK2] Reserve Vector capacity in VectorArgumentCoder<false,
T, inlineCapacity>::decode()"
https://bugs.webkit.org/show_bug.cgi?id=147619
http://trac.webkit.org/changeset/187812
2015-08-03 Chris Dumez <cdumez@apple.com>
[WK2] Reserve Vector capacity in VectorArgumentCoder<false, T, inlineCapacity>::decode()
https://bugs.webkit.org/show_bug.cgi?id=147619
Reviewed by Andreas Kling.
Reserve Vector capacity in VectorArgumentCoder<false, T, inlineCapacity>::decode()
as we know the size of the Vector in advance.
* Platform/IPC/ArgumentCoders.h:
2015-08-03 Gyuyoung Kim <gyuyoung.kim@webkit.org>
[CoordinatedGraphics] Rearrange uses of USE_COORDINATED_GRAPHICS_MULTIPROCESS
https://bugs.webkit.org/show_bug.cgi?id=147256
Reviewed by Benjamin Poulain.
Reduce uses of USE_COORDINATED_GRAPHICS_MULTIPROCESS guard in order to fix build
breaks when USE_COORDINATED_GRAPHICS_MULTIPROCESS is off. This is first step to switch
between multiprocess model to thread model.
* PlatformEfl.cmake:
* Shared/DrawingAreaInfo.h:
* UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
(WKViewFindZoomableAreaForRect):
* UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.cpp:
(WebKit::CoordinatedDrawingAreaProxy::CoordinatedDrawingAreaProxy):
* UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
(WebKit::CoordinatedLayerTreeHostProxy::commitCoordinatedGraphicsState):
* UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
* UIProcess/CoordinatedGraphics/PageViewportController.cpp:
(WebKit::PageViewportController::pageTransitionViewportReady):
* UIProcess/CoordinatedGraphics/WebPageProxyCoordinatedGraphics.cpp:
* UIProcess/CoordinatedGraphics/WebView.cpp:
* UIProcess/CoordinatedGraphics/WebView.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::commitPageTransitionViewport):
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp:
(WebKit::CoordinatedDrawingArea::CoordinatedDrawingArea):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.h:
* WebProcess/WebPage/CoordinatedGraphics/WebPageCoordinatedGraphics.cpp:
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::DrawingAreaImpl):
* WebProcess/WebPage/DrawingAreaImpl.h:
* WebProcess/WebPage/LayerTreeHost.cpp:
(WebKit::LayerTreeHost::create):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::sendViewportAttributesChanged):
(WebKit::WebPage::pageDidRequestScroll):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
2015-08-03 Matt Rajca <mrajca@apple.com>
Media Session: let UI clients query whether a media element is paused
https://bugs.webkit.org/show_bug.cgi?id=147588
Reviewed by Tim Horton.
Added plumbing to determine if a page's media element is paused.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::isMediaElementPaused):
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::isMediaElementPaused):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
2015-08-03 Chris Dumez <cdumez@apple.com>
Make sure error handling code APIUserContentExtensionStore closes open file descriptors
https://bugs.webkit.org/show_bug.cgi?id=147562
Reviewed by Alex Christensen.
Make sure error handling code APIUserContentExtensionStore closes open
file descriptors to avoid leaking them.
* NetworkProcess/cache/NetworkCacheData.cpp:
(WebKit::NetworkCache::adoptAndMapFile):
* UIProcess/API/APIUserContentExtensionStore.cpp:
(API::compiledToFile):
2015-08-03 Beth Dakin <bdakin@apple.com>
Need WKWebView API to enable/disable link preview
https://bugs.webkit.org/show_bug.cgi?id=147573
-and corresponding-
rdar://problem/22077836
Reviewed by Dan Bernstein.
WKView implementation.
* UIProcess/API/Cocoa/WKViewPrivate.h:
New API. Call into WKView to handle Mac.
* UIProcess/API/Cocoa/WKWebView.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
(-[WKWebView allowsLinkPreview]):
(-[WKWebView setAllowsLinkPreview:]):
Remove the SPI declaration from WKWebViewPrivate in order to make this API.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
Handle the Mac side.
* UIProcess/API/mac/WKView.mm:
(-[WKView viewDidMoveToWindow]):
(-[WKView initWithFrame:processPool:configuration:webView:]):
(-[WKView allowsBackForwardNavigationGestures]):
(-[WKView allowsLinkPreview]):
(-[WKView setAllowsLinkPreview:]):
Dont register previews when link preview is prevented.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _registerPreview]):
2015-08-03 Tim Horton <timothy_horton@apple.com>
[iOS] Link previews sometimes don't hide the link highlight
https://bugs.webkit.org/show_bug.cgi?id=147585
<rdar://problem/22119648>
Reviewed by Beth Dakin.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _interactionStartedFromPreviewItemController:]):
(-[WKContentView _interactionStoppedFromPreviewItemController:]):
(-[WKContentView _previewItemController:didDismissPreview:committing:]):
(-[WKContentView _previewItemController:willPresentPreview:forPosition:inSourceView:]): Deleted.
Use interactionStarted/Stopped, which are always called, instead of didDismiss/willPresent,
which are only called if we return a custom view controller from _presentedViewControllerForPreviewItemController.
We continue using didDismiss to inform clients of dismissal because they'll
only care if they customized the view controller.
2015-08-03 Chris Dumez <cdumez@apple.com>
[WK2][NetworkCache] Do not munmap() on the main thread
https://bugs.webkit.org/show_bug.cgi?id=147569
Reviewed by Geoffrey Garen.
Do not munmap() on the main thread for performance reasons and
consistency as we already make sure to mmap() on another thread.
* NetworkProcess/cache/NetworkCacheDataCocoa.mm:
(WebKit::NetworkCache::Data::adoptMap):
2015-08-03 Wenson Hsieh <wenson_hsieh@apple.com>
Inputs with the autofocus attribute cause the keyboard to not deploy
https://bugs.webkit.org/show_bug.cgi?id=147555
<rdar://problem/22018044>
Reviewed by Andreas Kling.
Upon submitting a form by pressing "Go" on the keyboard, an <input> on the next page with the
autofocus attribute may become non-interactible. When attempting to tap on the input, nothing
seems to happen. This is because the state of WebPage upon invoking WebPage::elementDidFocus
indicates (incorrectly) that the input element is already focused, and therefore hits an early
return. To solve this, we explicitly reset m_hasFocusedDueToUserInteraction upon transitioning
to a new page.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didStartPageTransition): On iOS, resets m_hasFocusedDueToUserInteraction as
well. It was previously thought that this would be handled by blur() called on the assisted
element when submitting a form. However, pressing "Go" on the iOS keyboard is an implicit
submission and does not trigger a blur event.
2015-08-03 Chris Dumez <cdumez@apple.com>
Fix error handling case in Cache::dumpContentsToFile()
https://bugs.webkit.org/show_bug.cgi?id=147567
Reviewed by Andreas Kling.
Cache::dumpContentsToFile() was expecting openFile() to return 0 in case
of error. However, it returns invalidPlatformFileHandle, which is -1 on
Unix.
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::dumpContentsToFile):
2015-08-03 Chris Dumez <cdumez@apple.com>
Make sure WebMemorySampler doesn't leak file descriptor
https://bugs.webkit.org/show_bug.cgi?id=147564
Reviewed by Anders Carlsson.
WebMemorySampler was opening files but never closing them.
* Shared/WebMemorySampler.cpp:
(WebKit::WebMemorySampler::stop):
* Shared/WebMemorySampler.h:
2015-08-03 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Update OptionsGTK.cmake and NEWS for 2.9.5 release.
* gtk/NEWS: Add release notes for 2.9.5.
2015-07-27 Matt Rajca <mrajca@apple.com>
Media Session: inform the UI process when the focused Content media element changes
https://bugs.webkit.org/show_bug.cgi?id=147323
Reviewed by Tim Horton.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::isPlayingMediaDidChange):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::focusedContentMediaElementDidChange):
* WebProcess/WebCoreSupport/WebChromeClient.h:
2015-07-31 Chris Dumez <cdumez@apple.com>
Drop dummy Timer callbacks
https://bugs.webkit.org/show_bug.cgi?id=147516
Reviewed by Alexey Proskuryakov.
Drop dummy Timer callbacks in the code base. A lot of Timer callbacks
do nothing else beside calling a particular method. In such case, we
can use the called method as Timer callback instead.
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
(WebKit::RemoteLayerTreeDrawingArea::layerFlushTimerFired): Deleted.
2015-07-31 Chris Dumez <cdumez@apple.com>
[WK2][NetworkCache] Drop HTTP method from NetworkCache::Key
https://bugs.webkit.org/show_bug.cgi?id=143348
Reviewed by Antti Koivisto.
Drop HTTP method from NetworkCache::Key as we only cache GET responses
for now. Even when we start caching HEAD responses, we likely will not
want the method to be part of the key because:
- A HEAD response can be used to update the headers of a previously cached response to GET
- A cached GET response may be used to satisfy subsequent HEAD requests
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::makeCacheKey):
* NetworkProcess/cache/NetworkCacheKey.cpp:
(WebKit::NetworkCache::Key::Key):
(WebKit::NetworkCache::Key::operator==):
(WebKit::NetworkCache::Key::decode):
(WebKit::NetworkCache::Key::operator=): Deleted.
(WebKit::NetworkCache::Key::computeHash): Deleted.
(WebKit::NetworkCache::Key::encode): Deleted.
* NetworkProcess/cache/NetworkCacheKey.h:
(WebKit::NetworkCache::Key::method): Deleted.
2015-07-31 Chris Dumez <cdumez@apple.com>
Coalesce concurrent authentication challenges for the same ProtectionSpace
https://bugs.webkit.org/show_bug.cgi?id=147496
<rdar://problem/16839069>
Reviewed by Alexey Proskuryakov.
Coalesce concurrent authentication challenges for the same ProtectionSpace.
Ideally, this would be done in the network layer but short term, this will
make sure the user no longer gets repeating authentication dialogs for the
same protection space.
This gets rid of a long-standing bug in WebKit / Safari where visiting a
site using HTTP authentication would pop up one authentication dialog for
each subresource being loaded from the network (especially when the main
resource is loaded from the cache).
* Shared/Authentication/AuthenticationManager.cpp:
(WebKit::canCoalesceChallenge):
(WebKit::AuthenticationManager::addChallengeToChallengeMap):
(WebKit::AuthenticationManager::shouldCoalesceChallenge):
(WebKit::AuthenticationManager::coalesceChallengesMatching):
(WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):
(WebKit::AuthenticationManager::useCredentialForChallenge):
(WebKit::AuthenticationManager::useCredentialForSingleChallenge):
(WebKit::AuthenticationManager::continueWithoutCredentialForChallenge):
(WebKit::AuthenticationManager::continueWithoutCredentialForSingleChallenge):
(WebKit::AuthenticationManager::cancelChallenge):
(WebKit::AuthenticationManager::cancelSingleChallenge):
(WebKit::AuthenticationManager::performDefaultHandling):
(WebKit::AuthenticationManager::performDefaultHandlingForSingleChallenge):
(WebKit::AuthenticationManager::rejectProtectionSpaceAndContinue):
(WebKit::AuthenticationManager::rejectProtectionSpaceAndContinueForSingleChallenge):
(WebKit::AuthenticationManager::AuthenticationManager): Deleted.
* Shared/Authentication/AuthenticationManager.h:
2015-07-31 Joseph Pecoraro <pecoraro@apple.com>
Unreviewed parameter name typo fix.
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _setHiddenPageDOMTimerThrottlingEnabled:]):
2015-07-31 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] NPAPI code crashes on Wayland
https://bugs.webkit.org/show_bug.cgi?id=147297
Reviewed by Žan Doberšek.
Do not crete NPAPI plugins when runing on Wayland, since they are
not supported. ENABLE_NETSCAPE_PLUGIN_API option used to be
incompatible with building with the Wayland target, but now that
we allow to build X11 and Wayland targets at the same time, we
need runtime checks to avoid creating NPAPI plugins in Wayland.
* UIProcess/API/gtk/WebKitSettings.cpp:
(webkit_settings_set_enable_plugins): Do not allow to change the
setting when running in Wayland.
* UIProcess/gtk/WebPreferencesGtk.cpp:
(WebKit::WebPreferences::platformInitializeStore): Initialize
EnablePlugins preference to false when running in Wayland.
2015-07-30 Joseph Pecoraro <pecoraro@apple.com>
LayoutTests/inspector frequently run slow and timeout when run in WebKit2 but not WebKit1
https://bugs.webkit.org/show_bug.cgi?id=147456
Reviewed by Timothy Hatcher.
By default, WebKit2 WebPage's on PLATFORM(COCOA) enabling DOM Timer
throttling. Under testing, this ends up impacting Web Inspector
tests that create their own WKWebView which never gets displayed
and so gets throttled. Disable throttling on the Inspector's view
during testing.
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _hiddenPageDOMTimerThrottlingEnabled]):
(-[WKPreferences _setHiddenPageDOMTimerThrottlingEnabled:]):
SPI to toggle DOM timer throttling.
* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::createInspectorPage):
* UIProcess/WebInspectorProxy.h:
(WebKit::WebInspectorProxy::isUnderTest):
Provide a way to get if we are under test, and set it before
calling into the platform method.
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
When testing, disable timer throttling.
2015-07-30 Eric Carlson <eric.carlson@apple.com>
[iOS] Set AirPlay discovery mode to disabled when page is hidden
https://bugs.webkit.org/show_bug.cgi?id=147455
Reviewed by Enrica Casucci.
* UIProcess/ios/forms/WKAirPlayRoutePicker.mm:
(-[WKAirPlayRoutePicker _dismissAirPlayRoutePickerIPad]): Set discovery mode to disabled after
the picker has been closed.
(-[WKAirPlayRoutePicker showAirPlayPickerIPhone:]): Ditto.
2015-07-29 Dean Jackson <dino@apple.com>
Don't use (Details) when exposing SPI
https://bugs.webkit.org/show_bug.cgi?id=147426
<rdar://problem/22062407>
Reviewed by Dan Bernstein.
If we are declaring the interface without any implementation,
we should use class extensions.
* Platform/spi/ios/AssertionServicesSPI.h:
* Platform/spi/ios/CorePDFSPI.h:
* Platform/spi/ios/DataDetectorsUISPI.h:
* Platform/spi/ios/ManagedConfigurationSPI.h:
* Platform/spi/ios/UIKitSPI.h:
* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
* Shared/Network/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm:
* UIProcess/_WKWebViewPrintFormatter.mm:
* UIProcess/mac/WebPageProxyMac.mm:
2015-07-30 Chris Dumez <cdumez@apple.com>
[WK2][NetworkCache] Stop closing files on the main thread
https://bugs.webkit.org/show_bug.cgi?id=147410
Reviewed by Andreas Kling.
After r186510, we no longer open cache files on the main thread.
However, we still close them on the main thread. This patch makes
sure we close the files on another thread instead.
* NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
(WebKit::NetworkCache::IOChannel::IOChannel):
2015-07-30 Simon Fraser <simon.fraser@apple.com>
Convert Path applier to use std::function
https://bugs.webkit.org/show_bug.cgi?id=147368
Reviewed by Sam Weinig.
Use std::function for Path::apply().
* Shared/WebCoreArgumentCoders.cpp:
(IPC::pathEncodeApplierFunction):
(IPC::ArgumentCoder<Path>::encode):
(IPC::pathPointCountApplierFunction): Deleted.
2015-07-30 Joonghun Park <jh718.park@samsung.com>
[EFL] Enable IndexedDB based on DatabaseProcess
https://bugs.webkit.org/show_bug.cgi?id=147221
Reviewed by Csaba Osztrogonác.
* DatabaseProcess/efl/DatabaseProcessMainEfl.cpp: Add ecore_init().
Without this call, it leads to crash when launching DatabaseProcess.
* PlatformEfl.cmake: Add missing include_directory.
* Shared/efl/ProcessExecutablePathEfl.cpp:
(WebKit::executablePathOfDatabaseProcess):
* UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
(WebKit::ProcessLauncher::launchProcess):
* UIProcess/efl/WebProcessPoolEfl.cpp:
(WebKit::WebProcessPool::legacyPlatformDefaultIndexedDBDatabaseDirectory):
Add default path for indexedDB sqlite3 db file.
2015-07-30 Chris Dumez <cdumez@apple.com>
Minimize children vector capacity changes in PlatformCALayerRemote::recursiveBuildTransaction()
https://bugs.webkit.org/show_bug.cgi?id=147446
Reviewed by Simon Fraser.
Minimize children vector capacity changes in PlatformCALayerRemote::recursiveBuildTransaction()
by leveraging the fact that we know in advance how many layer IDs are going to be added. We
now set the Vector size from the start, instead of clearing it and then growing the vector
capacity when appending the layer IDs one by one.
* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::recursiveBuildTransaction):
2015-07-30 Chris Dumez <cdumez@apple.com>
Mark more classes as fast allocated
https://bugs.webkit.org/show_bug.cgi?id=147440
Reviewed by Sam Weinig.
Mark more classes as fast allocated for performance. We heap-allocate
objects of those types throughout the code base.
* NetworkProcess/cache/NetworkCacheStorage.cpp:
* NetworkProcess/cache/NetworkCacheStorage.h:
* Platform/IPC/MessageRecorder.h:
* Platform/mac/LayerHostingContext.h:
2015-07-29 Andy VanWagoner <thetalecrafter@gmail.com>
Implement basic types for ECMAScript Internationalization API
https://bugs.webkit.org/show_bug.cgi?id=146926
Reviewed by Benjamin Poulain.
* Configurations/FeatureDefines.xcconfig: Enabled INTL.
2015-07-29 Chris Dumez <cdumez@apple.com>
[WK2] Use FastMalloc in IPC::MessageDecoder
https://bugs.webkit.org/show_bug.cgi?id=147425
Reviewed by Sam Weinig.
Use FastMalloc in IPC::MessageDecoder instead of system malloc, for
performance reasons and consistency.
* Platform/IPC/ArgumentDecoder.cpp:
(IPC::ArgumentDecoder::~ArgumentDecoder):
(IPC::ArgumentDecoder::initialize):
2015-07-29 Enrica Casucci <enrica@apple.com>
Preview should not start if touch handler prevents default.
https://bugs.webkit.org/show_bug.cgi?id=147423
rdar://problem/22061043
Reviewed by Tim Horton.
We need to check if _highlightLongPressCanClick has not been reset before
we allow the preview. It can be reset by a touch handler preventing default.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
2015-07-29 Chris Fleizach <cfleizach@apple.com>
AX: iOS: VoiceOver hangs indefinitely when an JS alert appears
https://bugs.webkit.org/show_bug.cgi?id=147386
Reviewed by Dan Bernstein.
Make sure this also builds on iOS8.
* Platform/IPC/mac/ConnectionMac.mm:
2015-07-29 Michael Catanzaro <mcatanzaro@igalia.com>
[Seccomp] Further improvements to default web process policy
https://bugs.webkit.org/show_bug.cgi?id=142987
Provide various helper functions to allow more flexible construction of
filesystem access policies.
Reviewed by Žan Doberšek.
Improve the policy. Also, remove ifdefs to reduce potential for breakage in non-default
configurations.
* Shared/linux/SeccompFilters/SyscallPolicy.cpp:
(WebKit::SyscallPolicy::addDefaultWebProcessPolicy):
2015-07-29 Chris Dumez <cdumez@apple.com>
Avoid unnecessarily constructing PlatformMediaSessionManager on Document destruction
https://bugs.webkit.org/show_bug.cgi?id=147398
Reviewed by Jer Noble.
Only call PlatformMediaSessionManager::stopAllMediaPlaybackForProcess() in
destructors if an PlatformMediaSessionManager instance already exists, to
avoid constructing one unecessarily at that point.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::didClose):
2015-07-28 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add API to set the maximum number of web processes per WebKitWebContext
https://bugs.webkit.org/show_bug.cgi?id=147108
Reviewed by Gustavo Noronha Silva.
* UIProcess/API/gtk/WebKitWebContext.cpp:
(webkit_web_context_set_web_process_count_limit):
(webkit_web_context_get_web_process_count_limit):
* UIProcess/API/gtk/WebKitWebContext.h:
* UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
2015-07-28 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Fix empty space in popup menus when first item is selected
https://bugs.webkit.org/show_bug.cgi?id=147358
Reviewed by Martin Robinson.
It happens when one of the first elements are selected, because we
try to center the current selection on the combo element. When the
menu is large enough to make the element centered we need to leave
empty space at the beginning. This can be fixed by not scrolling
to center the selected item when it's above the combo
element. This ensure the selected item will always be visible,
even if it's not centered. If the selected item is already
centered or below the combo element, the behaviour doesn't change
and we scroll to center it.
* UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
(WebKit::WebPopupMenuProxyGtk::showPopupMenu):
2015-07-28 Jincheol Jo <jincheol.jo@navercorp.com>
[EFL] Fix typos in ewk_extension.cpp
https://bugs.webkit.org/show_bug.cgi?id=147396
Reviewed by Gyuyoung Kim.
Fix from toEwkExtendion to toEwkExtension.
* WebProcess/InjectedBundle/API/efl/ewk_extension.cpp:
(toEwkExtension):
(EwkExtension::didCreatePage):
(EwkExtension::willDestroyPage):
(EwkExtension::didReceiveMessage):
(toEwkExtendion): Deleted.
2015-07-28 Alexey Proskuryakov <ap@apple.com>
Clean up usesAsyncCallbacks handling in ResourceHandle
https://bugs.webkit.org/show_bug.cgi?id=147342
Reviewed by Darin Adler.
Update for a renaming in WebCore.
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::cleanup):
* Shared/Downloads/soup/DownloadSoup.cpp:
(WebKit::Download::platformInvalidate):
2015-07-28 Chris Fleizach <cfleizach@apple.com>
AX: iOS: VoiceOver hangs indefinitely when an JS alert appears
https://bugs.webkit.org/show_bug.cgi?id=147386
Reviewed by Anders Carlsson.
Support the iOS platform API to notify accessibility clients when the WebProcess is about to suspend (because of some modal dialog).
Luckily, we did all the hardwork for OSX a few years ago to support this paradigm.
* Platform/IPC/mac/ConnectionMac.mm:
(IPC::AccessibilityProcessSuspendedNotification):
(IPC::Connection::willSendSyncMessage):
(IPC::Connection::didReceiveSyncReply):
2015-07-28 Yusuke Suzuki <utatane.tea@gmail.com>
[ES6] Add ENABLE_ES6_MODULES compile time flag with the default value "false"
https://bugs.webkit.org/show_bug.cgi?id=147350
Reviewed by Sam Weinig.
* Configurations/FeatureDefines.xcconfig:
2015-07-28 Said Abou-Hallawa <sabouhallawa@apple.com>
[iOS] REGRESSION(r168075): Fullscreen web video doesn't pause on screen lock
https://bugs.webkit.org/show_bug.cgi?id=147269
Reviewed by Andreas Kling.
Media elements should pause when the application is going to EnterBackground
under lock regardless whether it is in full screen or not.
* Platform/spi/ios/UIKitSPI.h: Forward declare [UIApplication isSuspendedUnderLock].
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::applicationDidEnterBackground):
[UIApp isSuspendedUnderLock] can only be called in the UIProcess. We need
to call it here and pass it to the WebPage in the WebProcess as part of the
ApplicationDidEnterBackground message.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in: Add the new parameter:
'isSuspendedUnderLock' to the ApplicationDidEnterBackground message.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::applicationDidEnterBackground): On iOS, the WebPage needs
to notify the MediaSessionManagerIOS that it received the message
ApplicationDidEnterBackground.
2015-07-28 Yongjun Zhang <yongjun_zhang@apple.com>
Bounds in InteractionInformationAtPosition should be always in main frame coordinate space.
https://bugs.webkit.org/show_bug.cgi?id=147372
When we prepare the bounds for InteractionInformationAtPosition, we should convert the rect to
main frame space since WKContent in UIProcess expects it to be in the web view space.
Reviewed by Tim Horton.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getPositionInformation): Convert the bounding rect to main frame space if the element is inside a sub-frame.
2015-07-27 Simon Fraser <simon.fraser@apple.com>
PathApplierFunction should take a reference to a PathElement
https://bugs.webkit.org/show_bug.cgi?id=147337
Reviewed by Dan Bates.
Convert PathApplierFunction to take a const PathElement&, since it can never be null.
* Shared/WebCoreArgumentCoders.cpp:
(IPC::pathPointCountApplierFunction):
(IPC::pathEncodeApplierFunction):
2015-07-28 Jer Noble <jer.noble@apple.com>
[iOS] Notify fullscreen controller in UIProcess whether external playback is allowed
https://bugs.webkit.org/show_bug.cgi?id=147343
Reviewed by Brady Eidson.
Pass the boolean property wirelessVideoPlaybackDisabled across the UIProcess/WebProcess boundary.
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::setWirelessVideoPlaybackDisabled):
* WebProcess/ios/WebVideoFullscreenManager.mm:
(WebKit::WebVideoFullscreenInterfaceContext::setWirelessVideoPlaybackDisabled):
(WebKit::WebVideoFullscreenManager::WebVideoFullscreenManager):
(WebKit::WebVideoFullscreenManager::setWirelessVideoPlaybackDisabled):
2015-07-28 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Use fastMalloc instead of g_slice
https://bugs.webkit.org/show_bug.cgi?id=147357
Reviewed by Sergio Villar Senin.
The use of g_slice is no longer encouraged by glib developers.
* UIProcess/API/gtk/WebKitCredential.cpp:
(webkitCredentialCreate):
(webkit_credential_free):
* UIProcess/API/gtk/WebKitJavascriptResult.cpp:
(webkitJavascriptResultCreate):
(webkit_javascript_result_unref):
* UIProcess/API/gtk/WebKitMimeInfo.cpp:
(webkitMimeInfoCreate):
(webkit_mime_info_unref):
* UIProcess/API/gtk/WebKitNavigationAction.cpp:
(webkitNavigationActionCreate):
(webkit_navigation_action_copy):
(webkit_navigation_action_free):
* UIProcess/API/gtk/WebKitPrivate.h:
* UIProcess/API/gtk/WebKitScriptDialog.cpp:
(webkitScriptDialogCopy):
(webkitScriptDialogFree):
* UIProcess/API/gtk/WebKitUserContent.cpp:
(webkit_user_style_sheet_unref):
(webkit_user_style_sheet_new):
(webkit_user_script_unref):
(webkit_user_script_new):
2015-07-27 Dan Bernstein <mitz@apple.com>
[iOS] REGRESSION (r187376): Form editing buttons are missing from the Shortcut Bar
https://bugs.webkit.org/show_bug.cgi?id=147351
Reviewed by Adele Peterson.
We were relying on -[WKContentView inputAccessoryView] getting called to initialize the form
accessory view, even when that method would always return nil, as it does on iPad. After
r187376, that method changed to initializing the view only when returning it, which caused
this bug.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _displayFormNodeInputView]): Call the new -_ensureFormAccessoryView from
here, when we are going to need the view.
(-[WKContentView _ensureFormAccessoryView]): Moved initialization code from
-inputAccessoryView here, and removed outdated +instancesRespondToSelector: check.
(-[WKContentView inputAccessoryView]): Now calls through -formAccessoryView.
(-[WKContentView formAccessoryView]): Added call to -_ensureFormAccessoryView here.
2015-07-27 Andreas Kling <akling@apple.com>
WebsiteDataStore should clean up its storage in the network process when destroyed.
<https://webkit.org/b/147349>
<rdar://problem/21838764>
Reviewed by Darin Adler.
Have ~WebsiteDataStore() send a DestroyPrivateBrowsingSession message to all networking processes
for ephemeral sessions. This plugs a NetworkStorageSession leak that could retain a large
CFNetwork object graph.
This complements r187115 which did the same for network process storage owned by
API::Session objects.
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::~WebsiteDataStore):
2015-07-27 Tim Horton <timothy_horton@apple.com>
First in-window viewStateChange synchronously blocks despite not previously being in-window
https://bugs.webkit.org/show_bug.cgi?id=147344
<rdar://problem/22021772>
Reviewed by Simon Fraser.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::updateViewState):
(WebKit::WebPageProxy::dispatchViewStateChange):
The whole point of m_viewWasEverInWindow was so that we would not
synchronously wait when a view was added to a window for the first time,
only all subsequent times.
However, since m_viewWasEverInWindow was being set *before* being
checked in dispatchViewStateChange, we were always blocking. This is
a huge waste of main-thread time, because there's no reason to wait
for the first paint if you've never seen the view before (and shouldn't
expect it to have content).
Instead, set the flag after dispatching a view state change, so it becomes
"have we ever sent a view state with IsInWindow set" instead.
2015-07-27 Tim Horton <timothy_horton@apple.com>
[iOS] Long press or link click can sometimes trigger during/after a preview
https://bugs.webkit.org/show_bug.cgi?id=147338
<rdar://problem/22020770>
Reviewed by Enrica Casucci.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _longPressRecognized:]):
Bail if we're previewing.
(-[WKContentView _dataForPreviewItemController:atPosition:type:]):
(-[WKContentView _presentedViewControllerForPreviewItemController:]):
Always avoid allowing clicks and start interaction when previewing a link.
2015-07-27 Andreas Kling <akling@apple.com>
[iOS] Occasional crashes in WebPage::elementDidBlur()'s async block.
<https://webkit.org/b/147281>
<rdar://problem/21701858>
Reviewed by Anders Carlsson.
Protect the WebPage object until the dispatch_async block has finished.
I have no way to repro this, but there's evidence of some crashing here.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::elementDidBlur):
2015-07-27 Michael Catanzaro <mcatanzaro@igalia.com>
[Seccomp] Set appropriate filters when trapping syscalls by default
https://bugs.webkit.org/show_bug.cgi?id=142983
If we trap syscalls by default, we must not set separate filters to trap
anything here, since it will fail causing us to crash.
But also, there are some things we must allow unconditionally even when
trapping by default. sigreturn, obviously. Also, let's whitelist brk
here instead of in platform-specific code.
Reviewed by Žan Doberšek.
* Shared/linux/SeccompFilters/SeccompBroker.cpp:
(WebKit::SeccompBroker::launchProcess): Don't trap sigprocmask or sigaction unless allow is
the default action. Also, allow sigreturn and brk is allow is not the default.
* Shared/linux/SeccompFilters/SeccompFilters.cpp: Added
(WebKit::SeccompFilters::defaultAction):
* Shared/linux/SeccompFilters/SeccompFilters.h: Added defaultAction
2015-07-27 Matthew Daiter <mdaiter@apple.com>
Renamed duplicate vectors inside UserMediaPermissionRequestProxy
https://bugs.webkit.org/show_bug.cgi?id=147321
<rdar://problem/22011290>
Reviewed by Eric Carlson.
* UIProcess/UserMediaPermissionRequestProxy.cpp:
(WebKit::UserMediaPermissionRequestProxy::UserMediaPermissionRequestProxy):
* UIProcess/UserMediaPermissionRequestProxy.h:
(WebKit::UserMediaPermissionRequestProxy::videoDeviceUIDs):
(WebKit::UserMediaPermissionRequestProxy::audioDeviceUIDs):
(WebKit::UserMediaPermissionRequestProxy::deviceUIDsVideo): Deleted.
(WebKit::UserMediaPermissionRequestProxy::deviceUIDsAudio): Deleted.
* WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
(WebKit::UserMediaPermissionRequestManager::startRequest):
2015-07-27 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Pass a GstInstallPluginsContext to gst_install_plugins_async
https://bugs.webkit.org/show_bug.cgi?id=147103
Reviewed by Philippe Normand.
This allows PackageKit to properly position the window and make it
transient to the web view window.
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::setCursor): Disambiguate Cursor now that
we include gtkx.h.
(WebKit::PageClientImpl::createGstInstallPluginsContext): Create a
new GstInstallPluginsContext and set the web view window XID when
running on X11.
* UIProcess/API/gtk/PageClientImpl.h:
* UIProcess/PageClient.h:
* UIProcess/efl/WebViewEfl.h:
* UIProcess/gstreamer/WebPageProxyGStreamer.cpp:
(WebKit::WebPageProxy::requestInstallMissingMediaPlugins): Use
PageClient::createGstInstallPluginsContext() to create a new
GstInstallPluginsContext and pass it to gst_install_plugins_async().
2015-07-26 Gwang Yoon Hwang <yoon@igalia.com>
[ThreadedCompositor] Unreviewed build fix after r186059
https://bugs.webkit.org/show_bug.cgi?id=147315
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
(WebKit::ThreadedCompositor::glContext):
Explicitly cast u_int64 to GLNativeWindowType.
* WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
(WebKit::ThreadedCoordinatedLayerTreeHost::create):
Update declaration to match with modified definition.
2015-07-26 Chris Dumez <cdumez@apple.com>
[WK2][iOS] WebContent process main thread should have fixed priority
https://bugs.webkit.org/show_bug.cgi?id=147313
<rdar://problem/22003112>
Reviewed by Darin Adler.
WebContent process main thread should have fixed priority on iOS 9.
Priority decay regresses PLT and fixing the main thread's priority
gives up a ~3% progression on warm PLT (tested on iPhone 5s).
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):
2015-07-26 Dan Bernstein <mitz@apple.com>
Suppressed an Xcode 7 warning about including a nib in an iOS build product.
* Configurations/BaseLegacyProcess.xcconfig: Exclude xib files on iOS.
* Configurations/BaseXPCService.xcconfig: Ditto.
2015-07-24 Ryosuke Niwa <rniwa@webkit.org>
iOS 8 build fix attempt after r187215.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]): Deleted.
2015-07-24 Yongjun Zhang <yongjun_zhang@apple.com>
Don't create UIWebFormAccessory if we don't require accessory view.
https://bugs.webkit.org/show_bug.cgi?id=147283
Don't try to intialize _formAccessoryView if requiresAccessoryView returns false since we don't
need it yet.
Reviewed by Dan Bernstein.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView inputAccessoryView]):
2015-07-24 Anders Carlsson <andersca@apple.com>
WKWebsiteDataStore remove methods don't properly delete cookies
https://bugs.webkit.org/show_bug.cgi?id=147282
rdar://problem/21948230
Reviewed by Sam Weinig.
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
Call deleteCookiesForHostnames instead of iterating over each hostname.
* WebProcess/Cookies/WebCookieManager.cpp:
(WebKit::WebCookieManager::deleteCookiesForHostname):
Call deleteCookiesForHostnames.
2015-07-24 Anders Carlsson <andersca@apple.com>
Networking process crash in NetworkConnectionToWebProcess::convertMainResourceLoadToDownload while attempting to download a blob
https://bugs.webkit.org/show_bug.cgi?id=147276
rdar://problem/21423353
Reviewed by Andreas Kling.
We currently don't support downloading blobs, so for now just bail if we encounter a null loader inside
convertMainResourceLoadToDownload (which happens when trying to download a blob URL).
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::didCleanupResourceLoader):
Rewrite the assertion to be more clear - it's fine to do an extra hash lookup in debug builds.
(WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
Bail if loader is null.
2015-07-24 Yusuke Suzuki <utatane.tea@gmail.com>
Remove runtime flags for symbols
https://bugs.webkit.org/show_bug.cgi?id=147246
Reviewed by Alex Christensen.
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:
2015-07-24 Yusuke Suzuki <utatane.tea@gmail.com>
Object.getOwnPropertySymbols on large list takes very long
https://bugs.webkit.org/show_bug.cgi?id=146137
Reviewed by Mark Lam.
* WebProcess/Plugins/Netscape/NPJSObject.cpp:
(WebKit::NPJSObject::enumerate):
2015-07-24 Simon Fraser <simon.fraser@apple.com>
Recode.net gets into a continual resize loop in split fullscreen
https://bugs.webkit.org/show_bug.cgi?id=147266
rdar://problem/21409047
Reviewed by Tim Horton.
In split fullscreen, we use fixed layout and scale to shrink pages down to
fit a given width. This is re-evaluated every time the document width changes.
However some pages, like recode.net, end up continually resizing because
when laid out unconstrained they use a narrower width than when laid out with
a fixed layout size. In fixed layout, they actually use more width than the fixed
layout size.
Detect and break this cycle by just not re-scaling when we've done one fixed layout,
and the document is now taking more width than the fixed layout width.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded):
2015-07-24 Carlos Garcia Campos <cgarcia@igalia.com>
[GStreamer] Crashes during plugin installation
https://bugs.webkit.org/show_bug.cgi?id=144099
Reviewed by Philippe Normand.
Move the missing plugins installation to the UI process, ensuring
there's a single installer running and cancelling the request when
the page is closed or the media player is deleted.
* PlatformEfl.cmake: Add new files to compilation.
* PlatformGTK.cmake: Ditto.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in: Add
RequestInstallMissingMediaPlugins message.
* UIProcess/gstreamer/WebPageProxyGStreamer.cpp: Added.
(WebKit::WebPageProxy::requestInstallMissingMediaPlugins): Call
gst_install_plugins_async() and send
DidEndRequestInstallMissingMediaPlugins message back to the web
process when done.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::requestInstallMissingMediaPlugins): Call
WebPage::requestInstallMissingMediaPlugins().
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::close): Invalidate the install missing plugins
request callback.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in: Add
DidEndRequestInstallMissingMediaPlugins message.
* WebProcess/WebPage/gstreamer/WebPageGStreamer.cpp: Added.
(WebKit::WebPage::requestInstallMissingMediaPlugins): Send
RequestInstallMissingMediaPlugins to the UI process or complete
the request early if there's already a request in progress.
(WebKit::WebPage::didEndRequestInstallMissingMediaPlugins):
Complete the request.
2015-07-24 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix the build with MEDIA_STREAM disabled after r187282.
RealtimeMediaSource is only defined when MEDIA_STREAM is enabled.
* UIProcess/UserMediaPermissionRequestProxy.cpp:
* UIProcess/UserMediaPermissionRequestProxy.h:
2015-07-24 Carlos Garcia Campos <cgarcia@igalia.com>
REGRESSION(r187100): [GTK] ASSERTION FAILED: Attempt to access post layout data before receiving it when typing backspace
https://bugs.webkit.org/show_bug.cgi?id=147196
Reviewed by Žan Doberšek.
Do not try to use the PostLayoutData from EditorState when
isMissingPostLayoutData is true. That happens when there's a
layout pending, and EditorStateChanged is sent again after that
layout with the post layout data. So we can just return early and
wait until the second message.
* UIProcess/API/gtk/WebKitEditorState.cpp:
(webkitEditorStateChanged):
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseUpdateTextInputState):
2015-07-23 Alex Christensen <achristensen@webkit.org>
Fix 32-bit build after r187272.
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::mediaDocumentNaturalSizeChanged):
Added some WK_API_ENABLED.
2015-07-23 Dan Bernstein <mitz@apple.com>
<rdar://problem/21929532> REGRESSION (r184026): Safari AutoFill with Contact info for phone number is broken
https://bugs.webkit.org/show_bug.cgi?id=147249
Reviewed by Sam Weinig.
* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(encodeObject): Use encodeString only for strings that encode as NSString or
NSMutableString. It cant encode arbitrary NSString subclasses.
(decodeObject): Use decodeString for NSMutableString as well.
2015-07-23 Zalan Bujtas <zalan@apple.com>
[iOS] REGRESSION (187131): Loading CuteOverload zooms in to the top left corner.
https://bugs.webkit.org/show_bug.cgi?id=147251
rdar://problem/21953359
Calling zoomToRect() should result in essentially the same zoom scale as if we
called setZoomScale with the new page scale factor.
Reviewed by Benjamin Poulain.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didCommitLayerTree:]):
2015-07-23 Matthew Daiter <mdaiter@apple.com>
Linking WebKit2 to be able to grab media sources from a UID
https://bugs.webkit.org/show_bug.cgi?id=147202
<rdar://problem/21947608>
Reviewed by Brent Fulgham.
* UIProcess/UserMediaPermissionRequestProxy.cpp:
(WebKit::UserMediaPermissionRequestProxy::getDeviceNameForUID):
* UIProcess/UserMediaPermissionRequestProxy.h:
2015-07-23 Alex Christensen <achristensen@webkit.org>
Remove compile and runtime flags for promises.
https://bugs.webkit.org/show_bug.cgi?id=147244
Reviewed by Yusuke Suzuki.
* Configurations/FeatureDefines.xcconfig:
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:
2015-07-21 Jer Noble <jer.noble@apple.com>
Notify the UI delegate when a MediaDocument's natural size changes
https://bugs.webkit.org/show_bug.cgi?id=147182
Reviewed by Simon Fraser.
Pipe notifications of media document natural size changes up from the chrome client, through
to the UIProcess, through the page client, through the WKWebView, to the UIDelegate.
* UIProcess/API/APIUIClient.h:
(API::UIClient::mediaDocumentNaturalSizeChanged):
* UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _mediaDocumentNaturalSizeChanged:]):
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/Cocoa/UIDelegate.h:
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::setDelegate):
(WebKit::UIDelegate::UIClient::mediaDocumentNaturalSizeChanged):
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::mediaDocumentNaturalSizeChanged):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::mediaDocumentNaturalSizeChanged):
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::mediaDocumentNaturalSizeChanged):
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::mediaDocumentNaturalSizeChanged):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::mediaDocumentNaturalSizeChanged):
* WebProcess/WebPage/WebPage.h:
* UIProcess/API/gtk/PageClientImpl.h: Add default, empty implementation of new pure-virtual method.
* UIProcess/efl/WebViewEfl.h: Ditto.
2015-07-23 Enrica Casucci <enrica@apple.com>
Removing one incorrect annotation from the previous change.
Unreviewed.
* UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
2015-07-23 Enrica Casucci <enrica@apple.com>
[iOS] Add another preview delegate for didDismissPreview.
https://bugs.webkit.org/show_bug.cgi?id=147241
rdar://problem/21664211
Reviewed by Tim Horton and Yongjun Zhang.
* UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _previewItemController:didDismissPreview:committing:]):
2015-07-23 Dan Bernstein <mitz@apple.com>
<rdar://problem/21910578> Second pass at [iOS] Keyboard shortcuts that take focus away from the web view end up typing a letter into the newly focused field
https://bugs.webkit.org/show_bug.cgi?id=146732
Reviewed by Darin Adler.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _interpretKeyEvent:isCharEvent:]): Rather than checking if the view is
first responder, which it might still be when the Web Content processes invokes this
callback, check if we are in editable content before forwarding the event to the keyboard.
2015-07-23 Jer Noble <jer.noble@apple.com>
Unreviewed build fix after r187251; rename flag -> allows.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setAllowsMediaDocumentInlinePlayback):
2015-07-23 Alex Christensen <achristensen@webkit.org>
[iOS] Unreviewed build fix after r187251.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setAllowsMediaDocumentInlinePlayback):
Use the correct name for the boolean to pass along to SetAllowsMediaDocumentInlinePlayback.
2015-07-23 Enrica Casucci <enrica@apple.com>
One more iOS build fix.
Unreviewed.
* Platform/spi/ios/UIKitSPI.h:
* UIProcess/ios/WKContentViewInteraction.h:
2015-07-23 Matthew Daiter <mdaiter@apple.com>
Bridged passing lists of devices between the UIProcess and the WebProcess
https://bugs.webkit.org/show_bug.cgi?id=147056
<rdar://problem/21883094>
Reviewed by Brent Fulgham.
* UIProcess/UserMediaPermissionRequestManagerProxy.cpp: Modified file
to reflect changes made to the header in the .messages.in file
(WebKit::UserMediaPermissionRequestManagerProxy::createRequest): Ditto
(WebKit::UserMediaPermissionRequestManagerProxy::didReceiveUserMediaPermissionDecision):
* UIProcess/UserMediaPermissionRequestManagerProxy.h: Ditto
* UIProcess/UserMediaPermissionRequestProxy.cpp: Ditto
(WebKit::UserMediaPermissionRequestProxy::UserMediaPermissionRequestProxy):
* UIProcess/UserMediaPermissionRequestProxy.h:
(WebKit::UserMediaPermissionRequestProxy::create):
(WebKit::UserMediaPermissionRequestProxy::deviceUIDsVideo):
(WebKit::UserMediaPermissionRequestProxy::deviceUIDsAudio):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::requestUserMediaPermissionForFrame):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in: Changed heading
* WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
(WebKit::UserMediaPermissionRequestManager::startRequest):
(WebKit::UserMediaPermissionRequestManager::didReceiveUserMediaPermissionDecision):
* WebProcess/MediaStream/UserMediaPermissionRequestManager.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didReceiveUserMediaPermissionDecision):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in: Changed heading
2015-07-23 Yongjun Zhang <yongjun_zhang@apple.com>
Adopt the new _previewItemControllerDidCancelPreview delegate method.
https://bugs.webkit.org/show_bug.cgi?id=147238
Don't allow hightlight long press to trigger tap if the link preview is cancelled because
the link is not preview-able.
Reviewed by Beth Dakin.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _previewItemControllerDidCancelPreview:]):
2015-07-23 Enrica Casucci <enrica@apple.com>
iOS build fix after http://trac.webkit.org/changeset/187238.
Unreviewed.
* Platform/spi/ios/UIKitSPI.h:
2015-07-23 Jer Noble <jer.noble@apple.com>
[WK2] Add a WKWebView property for whether the view is displaying a media document
https://bugs.webkit.org/show_bug.cgi?id=147233
Reviewed by Beth Dakin.
Add a _isDisplayingStandaloneMediaDocument property, which queries the frame for whether
the current MIME type is one which our media engines support.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _isDisplayingStandaloneMediaDocument]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::isDisplayingStandaloneMediaDocument):
* UIProcess/WebFrameProxy.h:
2015-07-21 Jer Noble <jer.noble@apple.com>
[iOS] Add an explicit API to allow media documents to (temporarily) play inline
https://bugs.webkit.org/show_bug.cgi?id=147181
Reviewed by Beth Dakin.
Add a WKWebView(Private) API which allows MediaDocuments loaded by the view to play their contents inline, regardless
of whether inline playback is restricted on the current device.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _setRequiresUserActionForMediaPlayback:]): Added. Pass through to WebPageProxy.
(-[WKWebView _allowsMediaDocumentInlinePlayback]): Ditto.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::allowsMediaDocumentInlinePlayback): Simple getter.
(WebKit::WebPageProxy::setAllowsMediaDocumentInlinePlayback): Set, and conditionally pass the new value to WebPage.
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setAllowsMediaDocumentInlinePlayback): Set, and conditionally notify WebCore page of the change.
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::allowsMediaDocumentInlinePlayback): Simple getter.
* WebProcess/WebPage/WebPage.messages.in: Add new messages.
2015-07-23 Beth Dakin <bdakin@apple.com>
Should not allow previews of 1x1 images
https://bugs.webkit.org/show_bug.cgi?id=147237
-and corresponding-
rdar://problem/21968460
Reviewed by Tim Horton.
1x1 images are used on some sites to cover actual images, which leads to a
misleading preview experience. There is not any reason why you would really
want to preview an image this small nor any reason to believe that the
preview would result in anything useful.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getPositionInformation):
2015-07-23 Brady Eidson <beidson@apple.com>
Crash in WebPlatformStrategies::createPingHandle - Deref a null NetworkingContext.
<rdar://problem/21949735> and https://bugs.webkit.org/show_bug.cgi?id=147227
Reviewed by Alexey Proskuryakov.
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::createPingHandle): Skip it if there's a null NetworkingContext.
2015-07-23 Tim Horton <timothy_horton@apple.com>
Remove some files that should have been removed with WebKit2 Windows
https://bugs.webkit.org/show_bug.cgi?id=147223
Reviewed by Csaba Osztrogonác.
* Shared/API/c/cf/WKURLRequestCF.cpp: Removed.
* Shared/API/c/cf/WKURLRequestCF.h: Removed.
* Shared/API/c/cf/WKURLResponseCF.cpp: Removed.
* Shared/API/c/cf/WKURLResponseCF.h: Removed.
2015-07-23 Timothy Horton <timothy_horton@apple.com>
Fix the build
* Platform/spi/ios/UIKitSPI.h:
2015-07-23 Tim Horton <timothy_horton@apple.com>
Remove files that were meant to be removed in r173929
* WebProcess/WebPage/mac/WebInspectorMac.mm: Removed.
2015-07-23 Tim Horton <timothy_horton@apple.com>
Remove files that were meant to be removed in r168213
* UIProcess/API/Cocoa/WKErrorRecoveryAttempting.h: Removed.
2015-07-23 Tim Horton <timothy_horton@apple.com>
Remove files that were meant to be removed in r168229
* UIProcess/API/Cocoa/WKSession.h: Removed.
* UIProcess/API/Cocoa/WKSession.mm: Removed.
* UIProcess/API/Cocoa/WKSessionInternal.h: Removed.
2015-07-23 Tim Horton <timothy_horton@apple.com>
Remove files that were meant to be removed in r165014
* WebProcess/WebPage/mac/WKAccessibilityWebPageObject.h: Removed.
* WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm: Removed.
2015-07-23 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add API to allow executing editing commands that require an argument
https://bugs.webkit.org/show_bug.cgi?id=146781
Reviewed by Gustavo Noronha Silva.
Commands like InsertImage or CreateLink receive an argument, but
we only have webkit_web_view_execute_editing_command() that
doesn't receive any argument. This patch adds
webkit_web_view_execute_editing_command_with_argument() for those
commands. It also adds WEBKIT_EDITING_COMMAND_INSERT_IMAGE and
WEBKIT_EDITING_COMMAND_CREATE_LINK to the predefined editing commands.
* UIProcess/API/gtk/WebKitEditingCommands.h: Add
WEBKIT_EDITING_COMMAND_INSERT_IMAGE and WEBKIT_EDITING_COMMAND_CREATE_LINK.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkit_web_view_execute_editing_command_with_argument):
* UIProcess/API/gtk/WebKitWebView.h:
* UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: Add new symbols.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::executeEditCommand): Pass also the argument
to the message.
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::executeEditCommand): Add the argument parameter
to the message handler.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in: Add argument parameter
to ExecuteEditCommand message.
2015-07-22 Sukolsak Sakshuwong <sukolsak@gmail.com>
Add ENABLE_WEBASSEMBLY feature flag for WebAssembly
https://bugs.webkit.org/show_bug.cgi?id=147212
Reviewed by Filip Pizlo.
* Configurations/FeatureDefines.xcconfig:
2015-07-22 James Savage <james.savage@apple.com>
Use updated CoreAnimation snapshot SPI.
https://bugs.webkit.org/show_bug.cgi?id=147197
<rdar://problem/21032083>
Reviewed by Tim Horton.
Patch by James Savage.
* Platform/spi/ios/UIKitSPI.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
2015-07-22 Timothy Horton <timothy_horton@apple.com>
Fix the build
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView setupInteraction]):
(-[WKContentView cleanupInteraction]):
2015-07-22 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r187196.
https://bugs.webkit.org/show_bug.cgi?id=147213
broke all the iOS builds (Requested by thorton on #webkit).
Reverted changeset:
"Use updated CoreAnimation snapshot SPI."
https://bugs.webkit.org/show_bug.cgi?id=147197
http://trac.webkit.org/changeset/187196
2015-07-22 Tim Horton <timothy_horton@apple.com>
Fix the build
* UIProcess/ios/WKContentViewInteraction.h:
2015-07-22 Tim Horton <timothy_horton@apple.com>
[iOS] Adjust the preview architecture
https://bugs.webkit.org/show_bug.cgi?id=147203
<rdar://problem/21945775>
Reviewed by Simon Fraser.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _dataForPreviewItemController:atPosition:type:]):
Link previews should win over image previews if both are possible.
2015-07-22 James Savage <james.savage@apple.com>
Use updated CoreAnimation snapshot SPI.
https://bugs.webkit.org/show_bug.cgi?id=147197
Reviewed by Tim Horton.
* Platform/spi/ios/UIKitSPI.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
2015-07-22 Tim Horton <timothy_horton@apple.com>
[iOS] Adjust the preview architecture
https://bugs.webkit.org/show_bug.cgi?id=147203
<rdar://problem/21945775>
Reviewed by Beth Dakin.
* Platform/spi/ios/UIKitSPI.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _setAllowsLinkPreview:]): Deleted.
* UIProcess/ios/WKContentView.mm:
(-[WKContentView willMoveToWindow:]): Deleted.
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView setupInteraction]):
(-[WKContentView cleanupInteraction]):
(-[WKContentView _registerPreview]):
(-[WKContentView _unregisterPreview]):
(-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
(-[WKContentView _dataForPreviewItemController:atPosition:type:]):
(-[WKContentView _presentationRectForPreviewItemController:]):
(-[WKContentView _presentedViewControllerForPreviewItemController:]):
(-[WKContentView _previewItemController:commitPreview:]):
(-[WKContentView _previewItemController:willPresentPreview:forPosition:inSourceView:]):
(-[WKContentView _previewItemController:didDismissPreview:committing:]):
(-[WKContentView _presentationSnapshotForPreviewItemController:]):
(-[WKContentView _presentationRectsForPreviewItemController:]):
(-[WKContentView gestureRecognizerShouldBegin:]): Deleted.
(-[WKContentView _registerPreviewInWindow:]): Deleted.
(-[WKContentView _unregisterPreviewInWindow:]): Deleted.
(-[WKContentView previewViewControllerForPosition:inSourceView:]): Deleted.
(-[WKContentView commitPreviewViewController:]): Deleted.
(-[WKContentView willPresentPreviewViewController:forPosition:inSourceView:]): Deleted.
(-[WKContentView didDismissPreviewViewController:committing:]): Deleted.
Register and unregister in setup/cleanupInteraction instead of when moving between windows.
Implement 'shouldBegin' instead of interacting directly with the recognizer.
Make use of system enums instead of our own.
Let UIPreviewItemController handle shrink-wrapping and the indicator view.
2015-07-22 Gyuyoung Kim <gyuyoung.kim@webkit.org>
[EFL] Support indexeddb for WK2
https://bugs.webkit.org/show_bug.cgi?id=145867
Reviewed by Csaba Osztrogonác.
Add stub implementation for indexeddb. Move KeyedDecoder and KeyedEncoder from gtk to glib
in order to share it between GTK and EFL ports.
* DatabaseProcess/EntryPoint/unix/DatabaseProcessMain.cpp:
* DatabaseProcess/efl/DatabaseProcessMainEfl.cpp: Copied from Source/WebKit2/DatabaseProcess/EntryPoint/unix/DatabaseProcessMain.cpp.
(WebKit::DatabaseProcessMainUnix):
* PlatformEfl.cmake:
* PlatformGTK.cmake:
* Shared/glib/KeyedDecoder.cpp: Renamed from Source/WebKit2/Shared/gtk/KeyedDecoder.cpp.
(WebKit::KeyedDecoder::KeyedDecoder):
(WebKit::KeyedDecoder::~KeyedDecoder):
(WebKit::KeyedDecoder::dictionaryFromGVariant):
(WebKit::KeyedDecoder::decodeBytes):
(WebKit::KeyedDecoder::decodeSimpleValue):
(WebKit::KeyedDecoder::decodeBool):
(WebKit::KeyedDecoder::decodeUInt32):
(WebKit::KeyedDecoder::decodeInt32):
(WebKit::KeyedDecoder::decodeInt64):
(WebKit::KeyedDecoder::decodeFloat):
(WebKit::KeyedDecoder::decodeDouble):
(WebKit::KeyedDecoder::decodeString):
(WebKit::KeyedDecoder::beginObject):
(WebKit::KeyedDecoder::endObject):
(WebKit::KeyedDecoder::beginArray):
(WebKit::KeyedDecoder::beginArrayElement):
(WebKit::KeyedDecoder::endArrayElement):
(WebKit::KeyedDecoder::endArray):
* Shared/glib/KeyedDecoder.h: Renamed from Source/WebKit2/Shared/gtk/KeyedDecoder.h.
* Shared/glib/KeyedEncoder.cpp: Renamed from Source/WebKit2/Shared/gtk/KeyedEncoder.cpp.
(WebKit::KeyedEncoder::KeyedEncoder):
(WebKit::KeyedEncoder::~KeyedEncoder):
(WebKit::KeyedEncoder::encodeBytes):
(WebKit::KeyedEncoder::encodeBool):
(WebKit::KeyedEncoder::encodeUInt32):
(WebKit::KeyedEncoder::encodeInt32):
(WebKit::KeyedEncoder::encodeInt64):
(WebKit::KeyedEncoder::encodeFloat):
(WebKit::KeyedEncoder::encodeDouble):
(WebKit::KeyedEncoder::encodeString):
(WebKit::KeyedEncoder::beginObject):
(WebKit::KeyedEncoder::endObject):
(WebKit::KeyedEncoder::beginArray):
(WebKit::KeyedEncoder::beginArrayElement):
(WebKit::KeyedEncoder::endArrayElement):
(WebKit::KeyedEncoder::endArray):
(WebKit::KeyedEncoder::finishEncoding):
* Shared/glib/KeyedEncoder.h: Renamed from Source/WebKit2/Shared/gtk/KeyedEncoder.h.
* UIProcess/Databases/efl/DatabaseProcessProxyEfl.cpp: Copied from Source/WebKit2/DatabaseProcess/EntryPoint/unix/DatabaseProcessMain.cpp.
(WebKit::DatabaseProcessProxy::platformGetLaunchOptions):
2015-07-22 Michael Catanzaro <mcatanzaro@igalia.com>
[Seccomp] Canonicalize filesystem path when whitelisting it
https://bugs.webkit.org/show_bug.cgi?id=142986
Reviewed by Žan Doberšek.
* Shared/linux/SeccompFilters/SyscallPolicy.cpp:
(WebKit::canonicalizeFileName):
(WebKit::SyscallPolicy::addFilePermission):
(WebKit::SyscallPolicy::addDirectoryPermission):
2015-07-21 Simon Fraser <simon.fraser@apple.com>
Add logging for TiledCoreAnimationDrawingArea resizing
https://bugs.webkit.org/show_bug.cgi?id=147180
Reviewed by Tim Horton.
Add a "Resize" log channel for WebKit2, and use it to log data in scaleViewToFitDocumentIfNeeded().
* Platform/Logging.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded):
2015-07-22 Sam Weinig <sam@webkit.org>
Encode/Decode underlying errors when serializing NSErrors
<rdar://problem/21818117>
https://bugs.webkit.org/show_bug.cgi?id=147199
Reviewed by Anders Carlsson.
* Shared/mac/WebCoreArgumentCodersMac.mm:
(IPC::ArgumentCoder<CertificateInfo>::decode):
(IPC::encodeNSError):
(IPC::ArgumentCoder<ResourceError>::encodePlatformData):
(IPC::decodeNSError):
(IPC::ArgumentCoder<ResourceError>::decodePlatformData):
Break out encoding/decoding of the NSErrors into a helpers so they can be called
for the underlying error.
2015-07-22 Beth Dakin <bdakin@apple.com>
Animated images should animate in previews
https://bugs.webkit.org/show_bug.cgi?id=147173
-and corresponding-
rdar://problem/21637698
Reviewed by Dan Bernstein.
InteractionInformationAtPosition needs to know if its an animated image.
* Shared/InteractionInformationAtPosition.cpp:
(WebKit::InteractionInformationAtPosition::encode):
(WebKit::InteractionInformationAtPosition::decode):
* Shared/InteractionInformationAtPosition.h:
New delegate method to create a link preview view controller for animated
images.
* UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
Treat animated images more like link previews.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView previewViewControllerForPosition:inSourceView:]):
Set info.isAnimatedImage
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getPositionInformation):
2015-07-22 Michael Catanzaro <mcatanzaro@igalia.com>
[Seccomp Filters] Add helpers to get XDG base directory locations
https://bugs.webkit.org/show_bug.cgi?id=142982
Reviewed by Zan Dobersek.
* PlatformEfl.cmake:
* PlatformGTK.cmake:
* Shared/linux/SeccompFilters/XDGBaseDirectory.h: Added.
* Shared/linux/SeccompFilters/XDGBaseDirectoryGLib.cpp: Added.
(WebKit::userHomeDirectory):
(WebKit::userCacheDirectory):
(WebKit::userConfigDirectory):
(WebKit::userDataDirectory):
(WebKit::userRuntimeDirectory):
2015-07-22 Gyuyoung Kim <gyuyoung.kim@webkit.org>
[EFL][WK2] EWK2ContextTestMultipleProcesses.ewk_context_network_process_model fails to pass
https://bugs.webkit.org/show_bug.cgi?id=142967
Reviewed by Csaba Osztrogonác.
Though processIdentifier() can return 0 when a page is not closed, ewk_context_network_process_model has
not been considered process id can be 0. This patch adds a protection logic which doesn't test when process
id is 0 at the moment.
* UIProcess/API/efl/tests/test_ewk2_context.cpp:
(TEST_F):
2015-07-22 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix some warnings when generating GTK+ HTML API docs.
* UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add
WebKitWebsiteDataManager and WebKitWebEditor.
2015-07-21 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Update OptionsGTK.cmake and NEWS for 2.9.4 release.
* gtk/NEWS: Add release notes for 2.9.4.
2015-07-21 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: [Mac] "Open Image In New Window" context menu item does nothing on an image
https://bugs.webkit.org/show_bug.cgi?id=147175
Reviewed by Timothy Hatcher.
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::getContextMenuFromProposedMenu):
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
Remove default context menus that won't work in the inspector page.
2015-07-21 Benjamin Poulain <benjamin@webkit.org>
[Content Extensions] Use a jump table when consecutive transitions have different targets
https://bugs.webkit.org/show_bug.cgi?id=147099
Reviewed by Alex Christensen.
* UIProcess/API/APIUserContentExtensionStore.h:
2015-07-21 Daniel Bates <dabates@apple.com>
Fix the build following <https://trac.webkit.org/changeset/187129>
(https://bugs.webkit.org/show_bug.cgi?id=147112)
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::reinstateNetworkProcessAssertionState): Guard implementation with PLATFORM(IOS)
since this logic is specific to the iOS port.
2015-07-21 Simon Fraser <simon.fraser@apple.com>
Rename the 'View' log channel to 'Printing'
https://bugs.webkit.org/show_bug.cgi?id=147172
Reviewed by Zalan Bujtas.
"View" was a terrible name for a log channel that was all about printing.
Sort the log channels.
* Platform/Logging.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView drawRect:]):
(-[WKView printOperationWithPrintInfo:forFrame:]):
* UIProcess/mac/WKPrintingView.mm:
(-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]):
(pageDidComputePageRects):
(-[WKPrintingView knowsPageRange:]):
(-[WKPrintingView drawRect:]):
(-[WKPrintingView rectForPage:]):
(-[WKPrintingView beginDocument]):
(-[WKPrintingView endDocument]):
2015-07-21 Zalan Bujtas <zalan@apple.com>
[iOS] Menu drop down such as on nike.com does not stay
https://bugs.webkit.org/show_bug.cgi?id=147047
rdar://problem/21046961
Reviewed by Benjamin Poulain.
This is a workaround for unintended scrolling while scaling.
(Based on Benjamin Poulain's WIP patch for webkit.org/b/136904)
In certain cases when scaling would result in moving the scrollview (which would trigger
a scroll event on WebCore side), zoomRect is called instead of setZoomScale to ensure
that the scroll position stays intact.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didCommitLayerTree:]):
2015-07-21 Daniel Bates <dabates@apple.com>
WTFCrash() in WebKit::WebProcess::networkConnection()
https://bugs.webkit.org/show_bug.cgi?id=147112
<rdar://problem/18477459>
Reviewed by Gavin Barraclough.
Fixes an issue where a newly launched network process may be jetsam'd because it has not
taken a process assertion between the time it was launched and the time when a web process
makes use of it.
Initially a network process does not have a process assertion. A process assertion is taken
(if one has not been taken) for the network process when a process assertion is taken for at
least one web process. When the network process crashes a WebProcess may ultimately launch a
new network process in WebProcess::networkConnection(). The new network process may be jetsam'd
immediately when the system is under some measure pressure because it has a low jetsam priority,
0 (since it does not have a process assertion and higher priority implies that a process is less
likely to be jetsam'd). And the logic in WebProcess::networkConnection() explicitly calls
CRASH() if the newly launched network process crashes immediately. Towards preventing the newly
launched network process from being jetsam'd we should obtain a process assertion for it.
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::WebProcessPool): Initialize m_didNetworkProcessCrash to false.
(WebKit::WebProcessPool::ensureNetworkProcess): If the network process crashed (m_didNetworkProcessCrash == true)
then tell each process in the pool to reinstate their network activity token for the new network process.
(WebKit::WebProcessPool::networkProcessCrashed): Set m_didNetworkProcessCrash to true when the
network process crashed.
* UIProcess/WebProcessPool.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::reinstateNetworkProcessAssertionState): Added.
(WebKit::WebProcessProxy::didSetAssertionState): Add assert to ensure we never have both
a background- and foreground- activity token for the network process.
* UIProcess/WebProcessProxy.h:
2015-07-21 Daniel Bates <dabates@apple.com>
ASSERT(m_suspendMessageCount >= 0) fails in ProcessThrottler::didCancelProcessSuspension()
when WebContent process crashes; Network process may never voluntarily suspend
https://bugs.webkit.org/show_bug.cgi?id=147122
<rdar://problem/21906759>
Reviewed by Chris Dumez.
Fixes an issue where the network process may never voluntarily release its process assertion.
Currently the network process always sends both a ProcessReadyToSuspend and CancelPrepareToSuspend
message in response to receiving a PrepareToSuspend message and CancelPrepareToSuspend message,
respectively. The process throttler expects to receive either a ProcessReadyToSuspend message
or a CancelPrepareToSuspend message (and not both) in response to sending the message sequence
PrepareToSuspend, CancelPrepareToSuspend. When a process throttler receives both messages in
response to this sequence then its internal message count becomes imbalanced and it will
never release the process assertion it manages. One user interaction that can cause such an
imbalance, in the process throttler held by NetworkProcessProxy, is switching tabs.
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::cancelPrepareToSuspend): Do not send message NetworkProcessProxy::DidCancelProcessSuspension.
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::didCancelProcessSuspension): Deleted.
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/Network/NetworkProcessProxy.messages.in: Remove message NetworkProcessProxy::DidCancelProcessSuspension.
2015-07-21 Matthew Daiter <mdaiter@apple.com>
Make sure to invalidate requests for user media after webpage reset
https://bugs.webkit.org/show_bug.cgi?id=147155
<rdar://problem/21924174>
Reviewed by Brent Fulgham.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::resetState): Added user media reset
2015-07-21 Tim Horton <timothy_horton@apple.com>
[iOS] Avoid using a TextIndicator if there are non-text things to indicate
https://bugs.webkit.org/show_bug.cgi?id=147152
<rdar://problem/21921061>
Reviewed by Beth Dakin.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView willPresentPreviewViewController:forPosition:inSourceView:]):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::shouldUseTextIndicatorForLink):
(WebKit::WebPage::getPositionInformation):
Fall back to a rectangular area instead of a TextIndicator if there are any
non-inline elements inside the link.
2015-07-21 Andreas Kling <akling@apple.com>
API::Session should clean up its storage in the network process when destroyed.
<https://webkit.org/b/147139>
<rdar://problem/21838764>
Reviewed by Anders Carlsson.
Have ~Session() send a DestroyPrivateBrowsingSession message to all networking processes
for ephemeral sessions. This plugs a NetworkStorageSession leak that could retain a large
CFNetwork object graph.
* UIProcess/API/APISession.cpp:
(API::Session::~Session):
2015-07-21 Sungmann Cho <sungmann.cho@navercorp.com>
Make PluginProxy::handleMouseEvent() asynchronous.
https://bugs.webkit.org/show_bug.cgi?id=146142
Reviewed by Anders Carlsson.
PluginProxy::handleMouseEvent() forwards the generated mouse event to PluginControllerProxy
using a synchronous message, but the recipient always reply immediately with the same value("true")
even before handling the received message. So I think PluginProxy::handleMouseEvent() is perfectly
OK to process its messages asynchronously.
* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::handleMouseEvent):
* PluginProcess/PluginControllerProxy.h:
* PluginProcess/PluginControllerProxy.messages.in:
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::handleMouseEvent):
2015-07-20 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add API to be notified about editor state changes
https://bugs.webkit.org/show_bug.cgi?id=145875
Reviewed by Gustavo Noronha Silva.
Add WebKitEditorState object, that is created on demand by the
WebKitWebView and can be used to get the typing attributes of the
editor at the current position or selection.
* PlatformGTK.cmake:
* Shared/EditorState.cpp: Use part of the PostLayoutData struct
for the GTK port too.
(WebKit::EditorState::encode): Encode PostLayoutData for GTK and
remove our custom cursorRect.
(WebKit::EditorState::decode): Decode PostLayoutData for GTK and
remove our custom cursorRect.
(WebKit::EditorState::PostLayoutData::encode): Reorder it to
reduce the amonut of ifdefs.
(WebKit::EditorState::PostLayoutData::decode): Ditto.
* Shared/EditorState.h: Add AttributeStrikeThrough to
TypingAttributes enum.
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::selectionDidChange): Rename
updateTextInputState() to selectionDidChange() and also notify the
WebKitWebView.
* UIProcess/API/gtk/PageClientImpl.h:
* UIProcess/API/gtk/WebKitEditorState.cpp: Added.
(webkitEditorStateGetProperty):
(webkit_editor_state_class_init):
(webkitEditorStateSetTypingAttributes):
(webkitEditorStateCreate):
(webkitEditorStateChanged):
(webkit_editor_state_get_typing_attributes):
* UIProcess/API/gtk/WebKitEditorState.h: Added.
* UIProcess/API/gtk/WebKitEditorStatePrivate.h: Added.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewSelectionDidChange): Notify the WebKitEditorState if
it has already been created.
(webkit_web_view_get_editor_state): Ensure a WebKitEditorState and
return it.
* UIProcess/API/gtk/WebKitWebView.h:
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseUpdateTextInputState): Get the caret cursor rect
from PostLayoutData.
* UIProcess/API/gtk/WebKitWebViewPrivate.h:
* UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: Add new symbols.
* UIProcess/API/gtk/docs/webkit2gtk-4.0.types: Add webkit_editor_state_get_type.
* UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add new section for WebKitEditorState.
* UIProcess/API/gtk/webkit2.h: Include WebKitEditorState.h.
* UIProcess/PageClient.h:
* UIProcess/gtk/WebPageProxyGtk.cpp:
(WebKit::WebPageProxy::editorStateChanged): Call PageClientImpl::selectionDidChange().
* WebProcess/WebPage/gtk/WebPageGtk.cpp:
(WebKit::WebPage::platformEditorState): Add typing attributes to EditorState.
2015-07-20 Simon Fraser <simon.fraser@apple.com>
Fix the iOS build.
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
2015-07-20 Simon Fraser <simon.fraser@apple.com>
Facebook in tiled fullscreen is slow
https://bugs.webkit.org/show_bug.cgi?id=147134
rdar://problem/21823349
Reviewed by Tim Horton.
TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded() could cause a page to toggle
between two fixed layout sizes differing by a pixel, because of rounding. This would cause
lots of extra layouts and painting.
This happened because the the fixed layout size was computed using ceil(m_webPage.size().width() / viewScale)
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded):
2015-07-20 Wenson Hsieh <wenson_hsieh@apple.com>
Fix crash due to RemoteLayerTreeDisplayRefreshMonitor outliving RemoteLayerTreeDrawingArea
https://bugs.webkit.org/show_bug.cgi?id=147124
<rdar://problem/21582858>
Reviewed by Simon Fraser.
Refactors RemoteLayerTreeDisplayRefreshMonitor to use a weak pointer rather than a reference
to its RemoteLayerTreeDrawingArea, since the drawing area may be deallocated before the monitor
in some rare cases. This rarely caused pages using requestAnimationFrame to crash on iOS. However,
this should not be the case: logically, a RemoteLayerTreeDrawingArea should always outlive its
refresh monitors. Refer to https://bugs.webkit.org/show_bug.cgi?id=147128 for more details.
* WebProcess/WebPage/Cocoa/RemoteLayerTreeDisplayRefreshMonitor.h:
* WebProcess/WebPage/Cocoa/RemoteLayerTreeDisplayRefreshMonitor.mm:
(WebKit::RemoteLayerTreeDisplayRefreshMonitor::RemoteLayerTreeDisplayRefreshMonitor):
(WebKit::RemoteLayerTreeDisplayRefreshMonitor::~RemoteLayerTreeDisplayRefreshMonitor): On destruction, checks
first to see whether or not the drawing area has been deallocated before telling it to update its monitors.
(WebKit::RemoteLayerTreeDisplayRefreshMonitor::requestRefreshCallback):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
(WebKit::RemoteLayerTreeDrawingArea::createWeakPtr): Creates and returns a new weak pointer to itself.
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
2015-07-20 Alex Christensen <achristensen@webkit.org>
[Content Extensions] Cache actions with domains that match everything
https://bugs.webkit.org/show_bug.cgi?id=147050
Reviewed by Benjamin Poulain.
* UIProcess/API/APIUserContentExtensionStore.h:
2015-07-20 Gordon Sheridan <gordon_sheridan@apple.com>
Support blocking a plug-in for non-security reasons
https://bugs.webkit.org/show_bug.cgi?id=145009
Reviewed by Anders Carlsson.
* Shared/Plugins/PluginModuleInfo.h:
Replace PluginModuleBlocked with separate enum values for blocking for security and compatibility.
* UIProcess/API/C/WKAPICast.h:
(WebKit::toWKPluginLoadPolicy):
Modify to handle change to PluginModuleBlocked enum.
(WebKit::toPluginModuleLoadPolicy):
Ditto.
* UIProcess/API/C/WKPluginLoadPolicy.h:
Added enum value for blocking a plugin for compatibility reasons.
* UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
(WebKit::shouldBlockPlugin):
Check load policy for both reasons a plugin may be blocked.
(WebKit::WKPlugInModuleLoadPolicyToPluginModuleLoadPolicy):
Added function to convert between load policy enum types.
(WebKit::PluginInfoStore::defaultLoadPolicyForPlugin):
Modified to call WKLoadPolicyForPluginVersion() which can distinguish between blocked for security or compatibility.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::findPlugin):
Updated to recognize both PluginModuleBlocked enum values that indicate a plugin is blocked.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::createPlugin):
Ditto.
(WebKit::WebPage::canPluginHandleResponse):
Ditto.
2015-07-20 Antti Koivisto <antti@apple.com>
NSURLCache fallback does not work on iOS due to sandboxing
https://bugs.webkit.org/show_bug.cgi?id=146314
<rdar://problem/21433691>
Reviewed by Anders Carlsson.
This broke with earlier cache path computation changes.
* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
NSURLCache path is relative to the container cache path so "." is sufficient.
This puts the cache files under
<container>/Library/Caches/com.apple.WebKit.Networking/
2015-07-20 Jeremy Jones <jeremyj@apple.com>
Adopt AVPlayerLayerView
https://bugs.webkit.org/show_bug.cgi?id=146862
Reviewed by Simon Fraser.
The CALayerHost is replaced with WebLayerHostView to be compatible with UIView animations.
videoLayerFrame and videoLayerGravity no longer need to be stored because they are stored
where they are used in the interface. Some animation is improved in the conversion.
* UIProcess/ios/WebVideoFullscreenManagerProxy.h:
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
(+[WebLayerHostView layerClass]): Add class WebLayerHostView.
(-[WebLayerHostView contextID]):
(-[WebLayerHostView setContextID:]):
(-[WebLayerHostView layerHost]):
(WebKit::WebVideoFullscreenManagerProxy::invalidate): layer -> view
(WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID):
Apply the hostingDeviceScaleFactor transform to -sublayerTransform instead of to
-transform. This more directly inverts the tranform WebProcess and allows -transform
to be used for animation in the UIProcess. This is important because UIView's actions
animate -transform, but not -sublayerTrasform.
(WebKit::WebVideoFullscreenManagerProxy::didCleanupFullscreen): layer -> view
(WebKit::WebVideoFullscreenModelContext::setVideoLayerFrame): Deleted.
(WebKit::WebVideoFullscreenModelContext::videoLayerFrame): Deleted.
(WebKit::WebVideoFullscreenModelContext::setVideoLayerGravity): Deleted.
(WebKit::WebVideoFullscreenModelContext::videoLayerGravity): Deleted.
* WebProcess/ios/WebVideoFullscreenManager.mm:
(WebKit::WebVideoFullscreenManager::enterVideoFullscreenForVideoElement):
Set initial video layer frame to fix start point of animation.
(WebKit::WebVideoFullscreenManager::didSetupFullscreen):
dispatch_async allows the CATransaction to complete before continuing with the animation.
This prevents a flash during animation.
2015-07-20 Tim Horton <timothy_horton@apple.com>
REGRESSION (r174287): Flash of black when opening a new web view or navigating to a new page
https://bugs.webkit.org/show_bug.cgi?id=147127
<rdar://problem/21474317>
Reviewed by Simon Fraser.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::snapshotAtSize):
Avoid using an invalid documentBackgroundColor, fall back to baseBackgroundColor
like we did before r174287.
2015-07-20 Michael Catanzaro <mcatanzaro@igalia.com>
[Seccomp] Should be easier to debug blocked syscalls
https://bugs.webkit.org/show_bug.cgi?id=142980
These should be printed even when not running in debug mode. There is no
value in hiding errors from release build users.
Reviewed by Žan Doberšek.
* Shared/linux/SeccompFilters/SeccompBroker.cpp:
(WebKit::SeccompBroker::runLoop): Don't close stderr et. al. in release builds.
* Shared/linux/SeccompFilters/Syscall.cpp:
(WebKit::write_uint): Added.
(WebKit::reportUnexpectedSyscall): Added.
(WebKit::Syscall::createFromContext): Call reportUnexpectedSyscall. Also, no need to crash
here in release builds.
* Shared/linux/SeccompFilters/SyscallPolicy.cpp:
(WebKit::SyscallPolicy::hasPermissionForPath): Print a warning when access is denied.
(WebKit::SyscallPolicy::permissionToString): Added.
* Shared/linux/SeccompFilters/SyscallPolicy.h: Add permissionToString.
2015-07-20 Csaba Osztrogonác <ossy@webkit.org>
Fix the !ENABLE(VIDEO) build after r186396
https://bugs.webkit.org/show_bug.cgi?id=147116
Reviewed by Brent Fulgham.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::didClose):
2015-07-20 Tomas Popela <tpopela@redhat.com>
[GTK] Add selection-changed signal to the WebKit2 API
https://bugs.webkit.org/show_bug.cgi?id=137116
Reviewed by Carlos Garcia Campos.
Add a new object WebKitWebEditor where the editing capabilities of a
WebPage will be grouped and exposed. Add the selection-changed signal
there (we used the same name as in WK1 API).
* PlatformGTK.cmake:
* UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
* WebProcess/InjectedBundle/API/gtk/WebKitWebEditor.cpp: Added.
(didChangeSelection):
(webkitWebEditorCreate):
(webkit_web_editor_get_page):
* WebProcess/InjectedBundle/API/gtk/WebKitWebEditor.h: Added.
* WebProcess/InjectedBundle/API/gtk/WebKitWebEditorPrivate.h: Added.
* WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
(webkitWebPageGetPage):
(webkit_web_page_get_editor):
* WebProcess/InjectedBundle/API/gtk/WebKitWebPage.h:
* WebProcess/InjectedBundle/API/gtk/WebKitWebPagePrivate.h:
* WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h:
2015-07-16 Anders Carlsson <andersca@apple.com>
WebsiteDataStore operations need to grab background assertions
https://bugs.webkit.org/show_bug.cgi?id=147015
rdar://problem/21799011
Reviewed by Sam Weinig.
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::fetchWebsiteData):
(WebKit::NetworkProcessProxy::deleteWebsiteData):
(WebKit::NetworkProcessProxy::deleteWebsiteDataForOrigins):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::fetchWebsiteData):
(WebKit::WebProcessProxy::deleteWebsiteData):
(WebKit::WebProcessProxy::deleteWebsiteDataForOrigins):
2015-07-19 Michael Catanzaro <mcatanzaro@igalia.com>
Unreviewed, placate -Wmismatched-tags after r187011
It's basically bug #146990 again. Oops.
* WebProcess/gtk/SeccompFiltersWebProcessGtk.h:
2015-07-19 Michael Catanzaro <mcatanzaro@igalia.com>
[GTK] Add seccomp filters support
https://bugs.webkit.org/show_bug.cgi?id=110014
Reviewed by Žan Doberšek.
Allow building with ENABLE_SECCOMP_FILTERS=ON. Based on work by Thiago Marcos P. Santos.
* PlatformGTK.cmake: Support ENABLE_SECCOMP_FILTERS build option.
* WebProcess/gtk/SeccompFiltersWebProcessGtk.cpp: Added.
(WebKit::SeccompFiltersWebProcessGtk::SeccompFiltersWebProcessGtk):
(WebKit::SeccompFiltersWebProcessGtk::platformInitialize):
* WebProcess/gtk/SeccompFiltersWebProcessGtk.h: Added.
* WebProcess/soup/WebProcessSoup.cpp:
(WebKit::WebProcess::platformInitializeWebProcess): Initialize default
GTK+ web process seccomp filters.
2015-07-18 Gyuyoung Kim <gyuyoung.kim@webkit.org>
Reduce PassRefPtr in WebKit2 - 3
https://bugs.webkit.org/show_bug.cgi?id=146995
Reviewed by Daniel Bates.
To remove PassRefPtr, this patch reduces use of PassRefPtr in WebKit2.
Because some uses depend on WebCore, WebCore, WK1 ports are modified as well.
* DatabaseProcess/DatabaseProcess.cpp:
(WebKit::DatabaseProcess::getOrCreateUniqueIDBDatabase):
* DatabaseProcess/DatabaseProcess.h:
* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::takeInitializationReply):
* PluginProcess/PluginControllerProxy.h:
* Shared/CoordinatedGraphics/CoordinatedBackingStore.cpp:
(WebKit::CoordinatedBackingStore::texture):
* Shared/CoordinatedGraphics/CoordinatedBackingStore.h:
(WebKit::CoordinatedBackingStore::create):
* Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp:
(WebKit::WebCoordinatedSurface::create):
(WebKit::WebCoordinatedSurface::createWithSurface):
* Shared/CoordinatedGraphics/WebCoordinatedSurface.h:
* UIProcess/API/APILoaderClient.h:
(API::LoaderClient::webCryptoMasterKey):
* UIProcess/API/APINavigationClient.h:
(API::NavigationClient::webCryptoMasterKey):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageLoaderClient):
(WKPageSetPageNavigationClient):
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::createPopupMenuProxy):
(WebKit::PageClientImpl::createContextMenuProxy):
(WebKit::PageClientImpl::createColorPicker):
* UIProcess/API/gtk/PageClientImpl.h:
* UIProcess/Authentication/WebCredential.h:
* UIProcess/Authentication/WebProtectionSpace.h:
* UIProcess/AutoCorrectionCallback.h:
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::NavigationClient::webCryptoMasterKey):
* UIProcess/CoordinatedGraphics/WebView.cpp:
(WebKit::WebView::createPopupMenuProxy):
(WebKit::WebView::createContextMenuProxy):
(WebKit::WebView::createColorPicker):
* UIProcess/CoordinatedGraphics/WebView.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.h:
* UIProcess/efl/WebViewEfl.cpp:
(WebKit::WebViewEfl::createPopupMenuProxy):
(WebKit::WebViewEfl::createContextMenuProxy):
(WebKit::WebViewEfl::createColorPicker):
* UIProcess/efl/WebViewEfl.h:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::createPopupMenuProxy):
(WebKit::PageClientImpl::createContextMenuProxy):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::dataSelectionForPasteboard):
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::createPopupMenuProxy):
(WebKit::PageClientImpl::createContextMenuProxy):
(WebKit::PageClientImpl::createColorPicker):
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::dataSelectionForPasteboard):
* WebProcess/Network/WebResourceLoadScheduler.cpp:
(WebKit::WebResourceLoadScheduler::scheduleSubresourceLoad):
(WebKit::WebResourceLoadScheduler::schedulePluginStreamLoad):
* WebProcess/Network/WebResourceLoadScheduler.h:
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::fromNPP):
(WebKit::NetscapePlugin::snapshot):
(WebKit::NetscapePlugin::liveResourceData):
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/Plugins/Plugin.h:
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::snapshot):
(WebKit::PluginProxy::liveResourceData):
* WebProcess/Plugins/PluginProxy.h:
* WebProcess/Storage/StorageNamespaceImpl.cpp:
(WebKit::StorageNamespaceImpl::storageArea):
(WebKit::StorageNamespaceImpl::copy):
* WebProcess/Storage/StorageNamespaceImpl.h:
* WebProcess/WebCoreSupport/SessionStateConversion.cpp:
(WebKit::toHistoryItem):
* WebProcess/WebCoreSupport/SessionStateConversion.h:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::createPopupMenu):
(WebKit::WebChromeClient::createSearchPopupMenu):
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::createDocumentLoader):
(WebKit::WebFrameLoaderClient::createFrame):
(WebKit::WebFrameLoaderClient::createPlugin):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::create):
(WebKit::WebPage::createDocumentLoader):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::lookupTextAtLocation):
2015-07-18 Simon Fraser <simon.fraser@apple.com>
Scroll position jumps when scrolling scaling pages down in split view
https://bugs.webkit.org/show_bug.cgi?id=147072
rdar://problem/21769577
Reviewed by Sam Weinig.
When apple.com/music is in Split View at a reduced scale, scrolling the page
can cause unwanted scroll jumps. This happened because we'd enter
TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded() with a pending
layout, so run the autosizing logic. When scrolled near the bottom, the unconstrained
layout resulted in a shorter document, which truncated the scroll position. The
scaled layout then restored the longer document, but it also restored that
truncated scroll position.
Forcing a layout is sufficient to fix the bug for this page, and doing a single
layout (which will happen anyway) is preferable to running the autosize logic
if layout happens to be dirty.
I was not able to make a test to reproduce the problem. Entering
scaleViewToFitDocumentIfNeeded() with pending layout was triggerable
using a transform transition, but I was not able to reproduce incorrect
scroll position restoration.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded):
2015-07-17 Andy Estes <aestes@apple.com>
[iOS] Further tighten the sandbox around pages fetched with Content-Disposition: attachment
https://bugs.webkit.org/show_bug.cgi?id=147044
rdar://problem/21567820
Reviewed by Brady Eidson.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage): Enabled Content-Disposition: attachment sandbox on iOS.
2015-07-17 Tim Horton <timothy_horton@apple.com>
[iOS] TextIndicator has a large forehead when line-height > 1
https://bugs.webkit.org/show_bug.cgi?id=147058
<rdar://problem/21643094>
Reviewed by Dean Jackson.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getPositionInformation):
Apply a review comment that I left myself and then forgot about.
2015-07-17 Enrica Casucci <enrica@apple.com>
[iOS] Implement selectionInteractionAssistant accessor.
https://bugs.webkit.org/show_bug.cgi?id=147054
rdar://problem/20864286
Reviewed by Tim Horton.
One more change to adopt the new selection interaction
model on iOS.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView selectionInteractionAssistant]):
2015-07-17 Dan Bernstein <mitz@apple.com>
REGRESSION (r186964): Crash in WebKit2.CloseFromWithinCreatePage
https://bugs.webkit.org/show_bug.cgi?id=147055
Reviewed by Alex Christensen.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::createNewPage): Grab the main frames URL before calling out to the
client, who may destroy the frame.
2015-07-17 Dan Bernstein <mitz@apple.com>
WebKit2 part of <rdar://problem/21803781> The external URL policy is not reported correctly in navigation actions that create new windows
https://bugs.webkit.org/show_bug.cgi?id=147040
Reviewed by Dean Jackson.
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::UIClient::createNewPage): Disallow App Links if the new page is for the
same protocol, host and port as the main frame of this page.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::decidePolicyForNavigationAction): Disallow App Links if
m_shouldSuppressAppLinksInNextNavigationPolicyDecision is set, and reset it. See below for
when we set it.
(WebKit::WebPageProxy::decidePolicyForNewWindowAction): Disallow App Links if the new window
is for the same protocol, host and port as the main frame of this page.
(WebKit::WebPageProxy::createNewPage): Make the new page disallow App Links in the first
policy decision if it is for the same protocol, host and port as the main frame of this
page.
* UIProcess/WebPageProxy.h: Added m_shouldSuppressAppLinksInNextNavigationPolicyDecision
member variable.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::createWindow): Pass the shouldOpenExternalURLsPolicy.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction): Ditto.
2015-07-17 Tim Horton <timothy_horton@apple.com>
iOS TextIndicators include text that is not supposed to be indicated
https://bugs.webkit.org/show_bug.cgi?id=147028
<rdar://problem/21643094>
Reviewed by Sam Weinig.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::shouldCreateTransientPaintingSnapshot):
2015-07-17 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Cleanup PasteboardHelper
https://bugs.webkit.org/show_bug.cgi?id=147035
Reviewed by Žan Doberšek.
Use PasteboardHelper::singleton() instead of
PasteboardHelper::defaultPasteboardHelper().
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseConstructed):
* UIProcess/gtk/DragAndDropHandler.cpp:
(WebKit::DragAndDropHandler::startDrag):
(WebKit::DragAndDropHandler::fillDragData):
(WebKit::DragAndDropHandler::dataObjectForDropData):
(WebKit::DragAndDropHandler::requestDragData):
2015-07-16 Matt Baker <mattbaker@apple.com>
[Mac] Web Inspector toolbar can be covered by the Safari tab bar when docked to the right
https://bugs.webkit.org/show_bug.cgi?id=146994
Reviewed by Timothy Hatcher.
WebInspectorProxy contained logic which ignored the next frame change notification from the inspected view,
whenever it updated the frames of both the Inspector view and inspected view. This patch removes that logic,
as it prevented the Inspector's frame from being adjusted after changes to the browser's top content inset.
* UIProcess/mac/WebInspectorProxyMac.mm:
(-[WKWebInspectorProxyObjCAdapter ignoreNextInspectedViewFrameDidChange]): Deleted.
(-[WKWebInspectorProxyObjCAdapter inspectedViewFrameDidChange:]): Deleted.
(WebKit::WebInspectorProxy::inspectedViewFrameDidChange): Deleted.
2015-07-16 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: [Mac] Save dialog not working when inspector is docked
https://bugs.webkit.org/show_bug.cgi?id=146991
Reviewed by Sam Weinig.
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::runOpenPanel):
(WebKit::WebInspectorProxy::platformSave):
When the window is nil (docked) use a non-window version of running the dialog.
2015-07-16 Tim Horton <timothy_horton@apple.com>
Add shrink-wrapped link highlights
https://bugs.webkit.org/show_bug.cgi?id=147021
<rdar://problem/21643094>
Reviewed by Enrica Casucci.
* Shared/InteractionInformationAtPosition.cpp:
(WebKit::InteractionInformationAtPosition::encode):
(WebKit::InteractionInformationAtPosition::decode):
* Shared/InteractionInformationAtPosition.h:
Add a TextIndicator to InteractionInformationAtPosition.
Make use of some new C++ features.
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView willPresentPreviewViewController:forPosition:inSourceView:]):
(-[WKContentView didDismissPreviewViewController:committing:]):
Make use of the TextIndicator (if we have one) to show a shrink-wrapped
snapshot of the link.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getPositionInformation):
Build a TextIndicator for the link if possible.
2015-07-16 Matt Rajca <mrajca@apple.com>
Media Session: remove plumbing for delivering start/end-of-interruption events
https://bugs.webkit.org/show_bug.cgi?id=147005
Reviewed by Eric Carlson.
Instead of receiving interruptions through WebKit, we will provide platform-specific implementations in WebCore
so the same behavior is available to all clients.
* UIProcess/API/C/WKPage.cpp:
* UIProcess/API/C/WKPagePrivate.h:
* UIProcess/WebPageProxy.cpp:
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.cpp:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
2015-07-16 Michael Catanzaro <mcatanzaro@igalia.com>
REGRESSION(r186464): [SOUP] ASSERTION FAILED: !m_messageReceiverMapCount when closing any tab
https://bugs.webkit.org/show_bug.cgi?id=147006
Reviewed by Anders Carlsson.
Remove the message receiver before it is deallocated.
* UIProcess/Network/CustomProtocols/soup/CustomProtocolManagerProxySoup.cpp:
(WebKit::CustomProtocolManagerProxy::~CustomProtocolManagerProxy):
2015-07-16 Brady Eidson <beidson@apple.com>
Review feedback followup for:
REGRESSION(r186088): Crash under WebKit::WebPageProxy::didFailLoadForFrame
<rdar://problem/21692212> and https://bugs.webkit.org/show_bug.cgi?id=146988
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::refView): CFRetain instead of Obj-C retain.
(WebKit::PageClientImpl::derefView): CFRelease instead of Obj-C release.
2015-07-16 Michael Catanzaro <mcatanzaro@igalia.com>
[Linux] Seccomp: fix -Wmismatched-tags
https://bugs.webkit.org/show_bug.cgi?id=146990
Reviewed by Žan Doberšek.
WebProcessCreationParameters is a struct nowadays, not a class, so declare it appropriately.
* Shared/linux/SeccompFilters/SyscallPolicy.h:
2015-07-16 Carlos Garcia Campos <cgarcia@igalia.com>
REGRESSION(r185415): [GTK] Browsers crash when an input method is enabled
https://bugs.webkit.org/show_bug.cgi?id=146639
Reviewed by Žan Doberšek.
In r185415 I assumed that preedit signals were always emitted
after a keypress was handled by the WebView. However, some input
methods handle the keyboard events before the WebView, and preedit
signals are emitted but no key event has been handled by the
WebView. So, instead of asserting when filter key event completion
handler is nullptr, we should check whether the current event was
generated for a WebView filter request or not. In case the
completion handler is nullptr, we send the event directly to the
page, instead of going through the WebView, since there won't be
editing commands for those events anyway.
* UIProcess/gtk/InputMethodFilter.cpp:
(WebKit::InputMethodFilter::handleKeyboardEvent):
(WebKit::InputMethodFilter::handleKeyboardEventWithCompositionResults):
2015-07-15 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Follow up to r186887 for GTK+.
Add GTK+ implementation of PageClientImpl::refView/derefView.
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::refView):
(WebKit::PageClientImpl::derefView):
* UIProcess/API/gtk/PageClientImpl.h:
2015-07-15 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Input method filter is always enabled when the view is focused
https://bugs.webkit.org/show_bug.cgi?id=146965
Reviewed by Martin Robinson.
It should only be enabled when the view is focused and there's an
editable element focused. In r138544, when input methods were
implemented, the message SetInputMethodState was added, but it was
never used. Instead, the notifyFocusIn method of the IM filter
enables the input method unconditionally. We should actually use
the SetInputMethodState message to enable/disable input methods
when editable elements are focused/unfocused.
* UIProcess/gtk/InputMethodFilter.cpp:
(WebKit::InputMethodFilter::setEnabled): Call notifyFocusedIn/Out
when inputs methods are enabled/disabled instead of notifying the
IM context directly.
(WebKit::InputMethodFilter::setCursorRect): Do not update the
cursor position if input methods are didabled.
(WebKit::InputMethodFilter::notifyFocusedIn): Do nothing when
input methods are disabled. Do not enable input methods
uncontionally here.
(WebKit::InputMethodFilter::notifyFocusedOut): Do not disable
input methods uncontionally here.
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::setInputMethodState): Call
WebPage::setInputMethodState() for GTK platform.
* WebProcess/WebPage/WebPage.h: Add setInputMethodState() for GTK platform.
* WebProcess/WebPage/gtk/WebPageGtk.cpp:
(WebKit::WebPage::setInputMethodState): Update input method state
and send SetInputMethodState message to the UI process if state changed.
2015-07-15 Brady Eidson <beidson@apple.com>
REGRESSION(r186088): Crash under WebKit::WebPageProxy::didFailLoadForFrame
<rdar://problem/21692212> and https://bugs.webkit.org/show_bug.cgi?id=146988
Reviewed by Sam Weinig.
When a loader delegate callback results in the WKView getting deallocated, then the PageClient
is also destroyed.
WebPageProxy then (often) turns around and uses the PageClient anyways.
Tried to write a TestWebKitAPI test for this, but only didFailLoadForFrame appears to obviously
be vulnerable, and there seems to be no way to reproduce that failure case under TestWebKitAPI.
* UIProcess/PageClient.h: Add ref/derefView.
* UIProcess/API/gtk/PageClientImpl.h: Stub them out.
* UIProcess/efl/WebViewEfl.h: Stub them out.
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::refView): [m_wkView retain]
(WebKit::PageClientImpl::derefView): [m_wkView release]
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::refView): Retain all 3 views.
(WebKit::PageClientImpl::derefView): Release all 3 views.
* UIProcess/WebPageProxy.cpp:
(WebKit::PageClientProtector::PageClientProtector): Calls refView() on the PageClient.
(WebKit::PageClientProtector::~PageClientProtector): Calls derefView() on the PageClient.
(WebKit::WebPageProxy::didChangeBackForwardList): All methods that make m_loaderClient or
m_pageClient callouts get a protector at their head.
(WebKit::WebPageProxy::willGoToBackForwardListItem):
(WebKit::WebPageProxy::shouldKeepCurrentBackForwardListItemInList):
(WebKit::WebPageProxy::findPlugin):
(WebKit::WebPageProxy::didCreateMainFrame):
(WebKit::WebPageProxy::didCreateSubframe):
(WebKit::WebPageProxy::didStartProgress):
(WebKit::WebPageProxy::didChangeProgress):
(WebKit::WebPageProxy::didFinishProgress):
(WebKit::WebPageProxy::didDestroyNavigation):
(WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
(WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
(WebKit::WebPageProxy::didChangeProvisionalURLForFrame):
(WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
(WebKit::WebPageProxy::didCommitLoadForFrame):
(WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
(WebKit::WebPageProxy::didFinishLoadForFrame):
(WebKit::WebPageProxy::didFailLoadForFrame):
(WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
(WebKit::WebPageProxy::didReceiveTitleForFrame):
(WebKit::WebPageProxy::didFirstLayoutForFrame):
(WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame):
(WebKit::WebPageProxy::didLayoutForCustomContentProvider):
(WebKit::WebPageProxy::didLayout):
(WebKit::WebPageProxy::didRemoveFrameFromHierarchy):
(WebKit::WebPageProxy::didDisplayInsecureContentForFrame):
(WebKit::WebPageProxy::didRunInsecureContentForFrame):
(WebKit::WebPageProxy::didDetectXSSForFrame):
(WebKit::WebPageProxy::frameDidBecomeFrameSet):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::decidePolicyForNewWindowAction):
(WebKit::WebPageProxy::decidePolicyForResponse):
(WebKit::WebPageProxy::decidePolicyForResponseSync):
(WebKit::WebPageProxy::unableToImplementPolicy):
(WebKit::WebPageProxy::didNavigateWithNavigationData):
(WebKit::WebPageProxy::didPerformClientRedirect):
(WebKit::WebPageProxy::didPerformServerRedirect):
(WebKit::WebPageProxy::didUpdateHistoryTitle):
(WebKit::WebPageProxy::wrapCryptoKey):
(WebKit::WebPageProxy::unwrapCryptoKey):
(WebKit::WebPageProxy::navigationGestureDidBegin):
(WebKit::WebPageProxy::navigationGestureWillEnd):
(WebKit::WebPageProxy::navigationGestureDidEnd):
(WebKit::WebPageProxy::willRecordNavigationSnapshot):
2015-07-15 Sam Weinig <sam@webkit.org>
Color match plug-ins
<rdar://problem/21758722>
https://bugs.webkit.org/show_bug.cgi?id=146987
Reviewed by Dean Jackson.
* Platform/mac/LayerHostingContext.h:
* Platform/mac/LayerHostingContext.mm:
(WebKit::LayerHostingContext::setColorMatchUntaggedContent):
(WebKit::LayerHostingContext::colorMatchUntaggedContent):
Add setter/getter for color matching untagged content.
* PluginProcess/mac/PluginControllerProxyMac.mm:
(WebKit::PluginControllerProxy::updateLayerHostingContext):
Have plug-ins CAContext's color match untagged colors into sRGB.
2015-07-15 Michael Catanzaro <mcatanzaro@igalia.com>
[GTK] Rename PACKAGE_LOCALE_DIR to LOCALEDIR
https://bugs.webkit.org/show_bug.cgi?id=146975
Reviewed by Martin Robinson.
* PlatformGTK.cmake:
* UIProcess/API/gtk/WebKitWebContext.cpp:
(webkit_web_context_class_init):
* WebProcess/gtk/WebProcessMainGtk.cpp:
2015-07-15 Michael Catanzaro <mcatanzaro@igalia.com>
[GTK] Rename LIBEXECDIR to PKGLIBEXECDIR
https://bugs.webkit.org/show_bug.cgi?id=140070
Reviewed by Martin Robinson.
The path that's currently stored in LIBEXECDIR is one level lower than
the real LIBEXECDIR, which we are going to need. Introduce PKGLIBEXECDIR
so that we can use LIBEXECDIR for the real LIBEXECDIR in the future.
* PlatformGTK.cmake:
* Shared/gtk/ProcessExecutablePathGtk.cpp:
(WebKit::findWebKitProcess):
2015-07-15 Daniel Bates <dabates@apple.com>
[Mac][WK2] Videos should only have access to cookies when -[NSURLRequest HTTPShouldHandleCookies] is YES
https://bugs.webkit.org/show_bug.cgi?id=146763
<rdar://problem/21736994>
Reviewed by Darin Adler.
We should only fetch cookies from the Network process when -[NSURLRequest HTTPShouldHandleCookies] is YES.
This makes us more closely match the behavior of the CFNetwork implementation of
-[__NSURLSessionLocal {_copyCookiesForRequestUsingAllAppropriateStorageSemantics, _getCookieHeadersForTask:completionHandler}].
* Shared/mac/CookieStorageShim.mm:
(-[WKNSURLSessionLocal _copyCookiesForRequestUsingAllAppropriateStorageSemantics:]):
(-[WKNSURLSessionLocal _getCookieHeadersForTask:completionHandler:]):
2015-07-14 Enrica Casucci <enrica@apple.com>
[iOS] Add support for updateSelectionWithExtentPoint:withBoundary.
https://bugs.webkit.org/show_bug.cgi?id=146951
rdar://problem/20864286
Reviewed by Tim Horton.
Add implementation for new method used by text selection
engine on iOS. The new function modifies the selection near the given point
and snaps it at the boundary of the specified granularity.
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView updateSelectionWithExtentPoint:completionHandler:]):
(-[WKContentView updateSelectionWithExtentPoint:withBoundary:completionHandler:]):
(-[WKContentView _characterBeforeCaretSelection]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::updateSelectionWithExtentPoint):
(WebKit::WebPageProxy::updateSelectionWithExtentPointAndBoundary):
(WebKit::WebPageProxy::requestDictationContext):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::rangeForGranularityAtPoint):
(WebKit::WebPage::selectTextWithGranularityAtPoint):
(WebKit::WebPage::updateSelectionWithExtentPointAndBoundary):
2015-07-15 Michael Catanzaro <mcatanzaro@igalia.com>
[Linux] SeccompBrokerClient should cache arbitrary file descriptors
https://bugs.webkit.org/show_bug.cgi?id=140068
Reviewed by Žan Doberšek.
If malloc() attempts to open /proc/sys/vm/overcommit_memory in a SIGSYS
signal handler, the SeccompBroker will attempt to recursively broker the
open() syscall. Generalize the existing code that already handles the
similar case where malloc() opens /sys/devices/system/cpu/online to
handle this situation as well.
* Shared/linux/SeccompFilters/SeccompBroker.cpp:
(WebKit::SIGSYSHandler):
(WebKit::SeccompBrokerClient::SeccompBrokerClient):
(WebKit::SeccompBrokerClient::~SeccompBrokerClient):
(WebKit::SeccompBrokerClient::handleIfOpeningCachedFile):
(WebKit::SeccompBrokerClient::cacheFile):
(WebKit::SeccompBrokerClient::handleIfOpeningOnlineCPUCount): Deleted.
2015-07-15 ChangSeok Oh <changseok.oh@collabora.com>
[GTK] Accelerated compositing is enabled by MiniBrowser in Wayland
https://bugs.webkit.org/show_bug.cgi?id=146827
Reviewed by Žan Doberšek.
WebKit2Gtk+ does not currently support accelerated compositing. For the reason,
we forcedly disable it in webkitWebViewBaseCreateWebPage. However, when we launch
MiniBrowser in wayland, the unsupported feature is re-enabled since the existing
setting is overwritten by a newly created one. Here the default value for
accelerated compositing is true. We can fix this by moving the code disabling
accelerated composition to WebPreferences::platformInitializeStore() so that
we make sure the accelerated compositing is always disabled for wayland.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseCreateWebPage): Deleted.
* UIProcess/gtk/WebPreferencesGtk.cpp:
(WebKit::WebPreferences::platformInitializeStore):
2015-07-15 Dan Bernstein <mitz@apple.com>
Fixed build fix.
* Platform/spi/ios/SafariServicesSPI.h:
2015-07-14 Ryuan Choi <ryuan.choi@navercorp.com>
[CoordinatedGraphics] Possible wrong rendering with scrolling
https://bugs.webkit.org/show_bug.cgi?id=146958
Reviewed by Gyuyoung Kim.
While r174261 fixing build break, there is some mistake that flushes contents layer
instead of overlay layer.
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
(WebKit::CoordinatedLayerTreeHost::didFlushRootLayer):
2015-07-14 Dan Bernstein <mitz@apple.com>
Attempted build fixes.
* Platform/spi/ios/SafariServicesSPI.h:
2015-07-14 Dan Bernstein <mitz@apple.com>
Attempted build fixes.
* Platform/spi/ios/SafariServicesSPI.h:
2015-07-14 Anders Carlsson <andersca@apple.com>
Remove wkPopupMenu from WebCoreSystemInterface; it's not called from WebCore
https://bugs.webkit.org/show_bug.cgi?id=146945
Reviewed by Tim Horton.
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface): Deleted.
2015-07-14 Anders Carlsson <andersca@apple.com>
Release assert under StyleResolver::loadPendingImages() caused by MemoryPressureHandler
https://bugs.webkit.org/show_bug.cgi?id=146940
rdar://problem/21605505
Reviewed by Sam Weinig.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::processWillSuspendImminently):
2015-07-14 Sam Weinig <sam@webkit.org>
WebKit needs to serialize numeric values in NSError userInfo
<rdar://problem/21818117>
https://bugs.webkit.org/show_bug.cgi?id=146936
Reviewed by Anders Carlsson.
* Shared/mac/WebCoreArgumentCodersMac.mm:
(IPC::ArgumentCoder<ResourceError>::encodePlatformData):
Encode userInfo values that are NSNumbers in addition to NSStrings and NSURLs. Decoding
is already handled.
2015-07-14 Michael Catanzaro <mcatanzaro@igalia.com>
[Linux] SeccompFilters: whitelist all NPAPI plugin directories
https://bugs.webkit.org/show_bug.cgi?id=140067
Reviewed by Žan Doberšek.
* PlatformEfl.cmake: Build PluginSearchPath.cpp
* PlatformGTK.cmake: Build PluginSearchPath.cpp
* Shared/Plugins/unix/PluginSearchPath.cpp: Added.
(WebKit::pluginsDirectories): Moved from PluginInfoStoreUnix.cpp.
* Shared/Plugins/unix/PluginSearchPath.h: Added.
* Shared/linux/SeccompFilters/SyscallPolicy.cpp:
(WebKit::SyscallPolicy::addDefaultWebProcessPolicy): Add the entire
plugin search path to the whitelist.
* UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp:
(WebKit::PluginInfoStore::pluginsDirectories): Now gets plugins
directories from PluginSearchPath.cpp
2015-07-14 Yongjun Zhang <yongjun_zhang@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=146917
iOS WebKit doesn't build.
rdar://problem/21801544
Fix the build - don't use deprecated methods.
Reviewed by Dan Bernstein.
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _registerPreviewInWindow:]):
(-[WKContentView _unregisterPreviewInWindow:]):
2015-07-14 Yongjun Zhang <yongjun_zhang@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=146909
Add actions for default link preview that uses SFSafariViewController.
Use the new private properties to prepare actions for the default link preview controller.
Reviewed by Dan Bernstein.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView previewViewControllerForPosition:inSourceView:]):
2015-07-14 Michael Catanzaro <mcatanzaro@igalia.com>
[Linux] SeccompFilters: whitelist source directory on all ports
https://bugs.webkit.org/show_bug.cgi?id=140066
Reviewed by Žan Doberšek.
Move this from EFL to port-independent code.
* Shared/linux/SeccompFilters/SyscallPolicy.cpp:
(WebKit::SyscallPolicy::addDefaultWebProcessPolicy):
* WebProcess/efl/SeccompFiltersWebProcessEfl.cpp:
(WebKit::SeccompFiltersWebProcessEfl::platformInitialize):
2015-07-14 Zan Dobersek <zdobersek@igalia.com>
[GTK] Add a runtime check for X11 display in webkitWebViewBaseExitAcceleratedCompositingMode()
https://bugs.webkit.org/show_bug.cgi?id=146711
Reviewed by Carlos Garcia Campos.
webkitWebViewBaseExitAcceleratedCompositingMode() is already guarded with
X11 build guards, but it should also do a runtime check that the program
is running under an X11 display before proceeding.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseDidRelaunchWebProcess):
2015-07-13 Matt Rajca <mrajca@apple.com>
Media Session: add plumbing for delivering start/end-of-interruption events
https://bugs.webkit.org/show_bug.cgi?id=146837
Reviewed by Tim Horton.
* UIProcess/API/C/WKPage.cpp:
(WKPageHandleMediaSessionInterruptionEvent):
* UIProcess/API/C/WKPagePrivate.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::handleMediaSessionInterruptionEvent):
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::handleMediaSessionInterruptionEvent):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
2015-07-13 Simon Fraser <simon.fraser@apple.com>
[iOS WK2] When choosing an initial viewport scale, take overflow on the <body> into account
https://bugs.webkit.org/show_bug.cgi?id=146918
rdar://problem/9222837
Reviewed by Tim Horton.
Use as input to the viewport scaling algorithm a contents size from the FrameView
that takes overflow on the viewport renderer into account. This prevents unexpected
viewports scaling on pages that have content that overflows their expressed contents size,
but apply overflow to the <body>.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::mainFrameDidLayout): Use contentsSizeRespectingOverflow(),
rather than raw contentsSize(), to determine scaling.
2015-07-13 Dan Bernstein <mitz@apple.com>
Fixed the build.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _registerPreviewInWindow:]):
(-[WKContentView _unregisterPreviewInWindow:]):
2015-07-13 Dan Bernstein <mitz@apple.com>
Removed now-unused SPI -[WKWebView _loadRequest:withOptions:].
Rubber-stamped by Anders Carlsson.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _loadRequest:withOptions:]): Deleted.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
2015-07-13 Anders Carlsson <andersca@apple.com>
Apps linked with a deployment target of iOS 7.x or earlier crash when using modern WebKit API
https://bugs.webkit.org/show_bug.cgi?id=146913
rdar://problem/21789252
Reviewed by Dan Bernstein.
Make a top-level symlink from /System/Library/PrivateFrameworks/WebKit.framework to
/System/Library/Frameworks/WebKit.framework.
* WebKit2.xcodeproj/project.pbxproj:
2015-07-13 Anders Carlsson <andersca@apple.com>
Silverlight causes tabs to hang
https://bugs.webkit.org/show_bug.cgi?id=146912
rdar://problem/21686508
Reviewed by Sam Weinig.
Make sure to link production builds of the legacy plug-in process against the shim on 10.11 and newer.
* Configurations/PluginProcess.xcconfig:
2015-07-13 Michael Catanzaro <mcatanzaro@igalia.com>
[Linux] SeccompFilters: handle alternate install prefixes
https://bugs.webkit.org/show_bug.cgi?id=140065
Reviewed by Žan Doberšek.
If the install prefix is something other than /usr, e.g. /usr/local or
~/jhbuild/install, then we want to make sure to allow libraries and data
from that prefix.
* PlatformEfl.cmake:
* Shared/linux/SeccompFilters/SyscallPolicy.cpp:
(WebKit::SyscallPolicy::addDefaultWebProcessPolicy):
2015-07-13 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Contents not correctly laid out when the web view is not realized
https://bugs.webkit.org/show_bug.cgi?id=142532
Reviewed by Darin Adler.
The problem is that we are not reporting any size until the web
view is realized, so any web view loaded in a separate tab in the
browser, will report 0x0 as the window.innerWidth,
window.innerHeight until the view is realized. Websites that use
the window.innerWidth/innerHeight during the page load to decide
how to lay out the contents will be rendered wrongly.
I haven't been able to reproduce this with unit tests, as this
requires the particular case of same window but different web
views using tabs for example.
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::viewSize): Always report the drawing area
size to make usre it's in sync with the WebProcess page size.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseSizeAllocate): Remove the optimization of only
report the size when it has changed, since both the redirected
window and the drawing area already do that check. Also remove the
optimization of waiting until the view is mapped to report its
size, since that's often too late for websites using the window
size during load.
(webkitWebViewBaseMap): Never report size on map, it should have
already been reported by size-allocate.
2015-07-11 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Inspector should be able to be docked to the bottom of a narrow window
https://bugs.webkit.org/show_bug.cgi?id=146871
Reviewed by Timothy Hatcher.
* UIProcess/WebInspectorProxy.cpp:
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformCanAttach):
* WebProcess/WebPage/WebInspector.cpp:
2015-07-11 Joseph Pecoraro <pecoraro@apple.com>
Allow clients to opt-out of default app link link actions
https://bugs.webkit.org/show_bug.cgi?id=146883
<rdar://problem/21221902>
Reviewed by Dan Bernstein.
* UIProcess/API/APIUIClient.h:
(API::UIClient::shouldIncludeAppLinkActionsForElement):
* UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
* UIProcess/Cocoa/UIDelegate.h:
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::setDelegate):
(WebKit::UIDelegate::UIClient::shouldIncludeAppLinkActionsForElement):
Plumbing for a new delegate message to ask the client if they
would like app link actions or not. Default is yes.
* UIProcess/ios/WKActionSheetAssistant.h:
* UIProcess/ios/WKActionSheetAssistant.mm:
(-[WKActionSheetAssistant showImageSheet]):
(-[WKActionSheetAssistant showLinkSheet]):
(-[WKActionSheetAssistant defaultActionsForLinkSheet:]):
(-[WKActionSheetAssistant defaultActionsForImageSheet:]):
Pass elementInfo into methods generating default actions.
(-[WKActionSheetAssistant _appendOpenActionsForURL:actions:elementInfo:]):
When generating open actions, if the process has AppLink capabilities
ask the client if they want to include AppLink actions or fall back
to the basic Open action.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView actionSheetAssistant:shouldIncludeAppLinkActionsForElement:]):
(-[WKContentView previewViewControllerForPosition:inSourceView:]):
* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView actionSheetAssistant:shouldIncludeAppLinkActionsForElement:]):
Assistant delegate implementations forward to the UIDelegate.
2015-07-11 Joseph Pecoraro <pecoraro@apple.com>
Update default link action sheets for app links
https://bugs.webkit.org/show_bug.cgi?id=146658
<rdar://problem/21221902>
Reviewed by Dan Bernstein.
* Shared/mac/SandboxUtilities.h:
* Shared/mac/SandboxUtilities.mm: Renamed from Source/WebKit2/Shared/mac/SandboxUtilities.cpp.
(WebKit::processHasEntitlement):
* UIProcess/ApplicationStateTracker.mm:
(WebKit::applicationType):
(WebKit::hasEntitlement): Deleted.
* WebKit2.xcodeproj/project.pbxproj:
Share a helper for checking if the current process has an entitlement.
* UIProcess/API/Cocoa/_WKElementAction.h:
* UIProcess/API/Cocoa/_WKElementAction.mm:
(+[_WKElementAction _elementActionWithType:title:actionHandler:]):
(+[_WKElementAction _elementActionWithType:customTitle:assistant:]):
* UIProcess/API/Cocoa/_WKElementActionInternal.h:
Add an internal way to make an element action with a standard type and regular handler.
We use this for the new standard types that don't have a default implementation.
* UIProcess/ios/WKActionSheetAssistant.mm:
(applicationHasAppLinkEntitlements):
(appLinkForURL):
Helpers checking access to app links and fetching app links.
(-[WKActionSheetAssistant _appendOpenActionsForURL:actions:]):
(-[WKActionSheetAssistant defaultActionsForLinkSheet]):
(-[WKActionSheetAssistant defaultActionsForImageSheet]):
Create "Open in Safari" and "Open in 'App'" default actions for AppLinks,
otherwise add the normal default "Open" action.
2015-07-11 Enrica Casucci <enrica@apple.com>
Remove incorrect overriding of inputAssistantItem in WKContentView.
https://bugs.webkit.org/show_bug.cgi?id=146863
rdar://problem/21507154
Reviewed by Sam Weinig.
Correction to the patch in r186713.
We need to provide the inputAssistantItem from the responder.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView inputAccessoryView]):
2015-07-11 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r186689 and r186710.
https://bugs.webkit.org/show_bug.cgi?id=146880
May have caused a PLT regression and broken a layout test
(Requested by cdumez on #webkit).
Reverted changesets:
"[WK2] Increase the QoS of some of our WorkQueues to match the
one of our processes"
https://bugs.webkit.org/show_bug.cgi?id=146855
http://trac.webkit.org/changeset/186689
"REGRESSION (r186689?): fast/frames/frame-limit.html timeout
on Mavericks {Release,Debug} WK2 bots"
https://bugs.webkit.org/show_bug.cgi?id=146876
http://trac.webkit.org/changeset/186710
2015-07-10 Enrica Casucci <enrica@apple.com>
Remove incorrect overriding of inputAssistantItem in WKContentView.
https://bugs.webkit.org/show_bug.cgi?id=146863
rdar://problem/21507154
Reviewed by Dan Bernstein.
Removing implementation of inputAssistantItem and moving initialization
of formAccessoryView to inputAccessoryView to avoid interfering with
the keyboard handling of the assistant bar.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView inputAccessoryView]):
(-[WKContentView inputAssistantItem]): Deleted.
(-[WKContentView _inputAssistantItem]): Deleted.
2015-07-10 Simon Fraser <simon.fraser@apple.com>
[iOS WK2] Scrolling issues on horizontally scrollable RTL pages
https://bugs.webkit.org/show_bug.cgi?id=146872
rdar://problem/7569416
Reviewed by Sam Weinig.
Horizontally scrollable RTL pages in WebKit2 had a variety of issues: they had
a gap down the right edge, and unreachable content on the left side, focussing
form fields scrolled to the wrong location, and programmatic scrolls scrolled
to the wrong place.
Fix by plumbing the WebCore notion of scrollOrigin through to the UI process,
and using it in various places. There are three main aspects to the patch:
1. scroll origin is included in RemoteLayerTreeTransaction, and plumbed through
to -[WKWebView _scrollToContentOffset:] for correct programmatic scrolling,
including zooming to focused form elements. The WKContentView's boundsOrigin
is set to the scroll origin so that the view coordinates match document coordinates.
2. WebPageProxy::computeCustomFixedPositionRect() uses the actual documentRect()
rather than just conjuring up a rect with a zero origin, which makes position:fixed
work correctly.
3. _interactionViewsContainerView (which hosts tap highlights) is positioned to
coincide with the origin of the documentRect (i.e. at the scroll origin, which
may not be top-left). This allows tap highlights to show in the correct location.
4. ScrollView::unobscuredContentRect() is fixed to take scroll origin into account;
if the returned rect is wrong, RenderLayer::hitTest() incorrectly clips the hit
testing area.
* Shared/mac/RemoteLayerTreeTransaction.h:
(WebKit::RemoteLayerTreeTransaction::scrollOrigin):
(WebKit::RemoteLayerTreeTransaction::setScrollOrigin):
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::encode):
(WebKit::RemoteLayerTreeTransaction::decode):
(WebKit::RemoteLayerTreeTransaction::description): Dump some more info.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _scrollToContentOffset:scrollOrigin:]):
(-[WKWebView _scrollToContentOffset:]): Deleted.
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::requestScroll):
* UIProcess/API/gtk/PageClientImpl.h:
* UIProcess/CoordinatedGraphics/WebView.cpp:
(WebKit::WebView::requestScroll):
* UIProcess/CoordinatedGraphics/WebView.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::requestScroll):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::requestScroll):
(WebKit::PageClientImpl::documentRect):
(WebKit::PageClientImpl::contentsSize): Deleted.
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _didCommitLayerTree:]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::computeCustomFixedPositionRect):
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::requestScroll):
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::willCommitLayerTree):
2015-07-10 Chris Dumez <cdumez@apple.com>
[WK2] Diagnostic logging messages are causing too much IPC
https://bugs.webkit.org/show_bug.cgi?id=146873
<rdar://problem/21779205>
Reviewed by Ryosuke Niwa.
Diagnostic logging messages are causing too much IPC. To address the
problem, we now do the sampling of the senders' side (WebContent
process and Networking process) instead of the receiver's side
(UIProcess).
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::logDiagnosticMessage):
(WebKit::NetworkProcess::logDiagnosticMessageWithResult):
(WebKit::NetworkProcess::logDiagnosticMessageWithValue):
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::logSampledDiagnosticMessage):
(WebKit::NetworkProcessProxy::logSampledDiagnosticMessageWithResult):
(WebKit::NetworkProcessProxy::logSampledDiagnosticMessageWithValue):
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/Network/NetworkProcessProxy.messages.in:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::logDiagnosticMessage):
(WebKit::WebPageProxy::logDiagnosticMessageWithResult):
(WebKit::WebPageProxy::logDiagnosticMessageWithValue):
(WebKit::WebPageProxy::logSampledDiagnosticMessage):
(WebKit::WebPageProxy::logSampledDiagnosticMessageWithResult):
(WebKit::WebPageProxy::logSampledDiagnosticMessageWithValue):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
(WebKit::WebDiagnosticLoggingClient::logDiagnosticMessage):
(WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithResult):
(WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithValue):
2015-07-10 Dean Jackson <dino@apple.com>
Airplay button and placeholder are missing in inline controls
https://bugs.webkit.org/show_bug.cgi?id=146869
<rdar://problem/21555051>
Reviewed by Simon Fraser.
Fix a typo in the ENABLE that was causing the Airplay
setting (allowsAirPlayForMediaPlayback, which becomes
webkitWirelessVideoPlaybackDisabled) to default to false.
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration init]): Change WIRELESS_TARGET_PLAYBACK
to WIRELESS_PLAYBACK_TARGET.
2015-07-10 Tim Horton <timothy_horton@apple.com>
Use CoreAnimation fences instead of synchronous IPC to synchronize resize
https://bugs.webkit.org/show_bug.cgi?id=146294
<rdar://problem/21090193>
Reviewed by Anders Carlsson.
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
(WebKit::TiledCoreAnimationDrawingAreaProxy::createFenceForGeometryUpdate):
Tiny followup; don't touch Connection if the connection isn't valid.
2015-07-10 Chris Dumez <cdumez@apple.com>
[WK2] Increase the QoS of some of our WorkQueues to match the one of our processes
https://bugs.webkit.org/show_bug.cgi?id=146855
Reviewed by Anders Carlsson.
Increase the QoS of some of our WorkQueues to match the one of our processes. For
e.g., even though the WebContent and the Networking processes have USER_UNITIATED
QoS, the IPC between them is using a WorkQueue with DEFAULT QoS. Similarly, the
WorkQueue used for network cache reads has DEFAULT QoS.
* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::Storage::Storage):
* Platform/IPC/Connection.cpp:
(IPC::Connection::Connection):
2015-07-10 Zalan Bujtas <zalan@apple.com>
Crash at WebCore::WebPage::innerFrameQuad.
https://bugs.webkit.org/show_bug.cgi?id=146843
rdar://problem/21501819
Reviewed by Andreas Kling.
We may end up with a null rootEditableElement() after calling Document::updateLayout().
Speculative fix. Not reproducible.
* WebProcess/WebPage/WebPage.h: Some const cleanup.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::innerFrameQuad): null check assistedNode.rootEditableElement()
(WebKit::constrainPoint):
(WebKit::WebPage::selectWithGesture):
(WebKit::WebPage::visiblePositionInFocusedNodeForPoint):
(WebKit::WebPage::selectPositionAtPoint):
(WebKit::WebPage::selectPositionAtBoundaryWithDirection):
(WebKit::WebPage::selectTextWithGranularityAtPoint):
(WebKit::WebPage::updateSelectionWithExtentPoint):
(WebKit::WebPage::getPositionInformation):
2015-07-09 Jon Honeycutt <jhoneycutt@apple.com>
[iOS] Document picker has overlapping icons on iPad
https://bugs.webkit.org/show_bug.cgi?id=146808
<rdar://problem/21251875>
Reviewed by Sam Weinig.
* UIProcess/ios/forms/WKFileUploadPanel.mm:
(-[WKFileUploadPanel documentMenu:didPickDocumentPicker:]):
Don't show this UI as a popover on iPad; the default is a full screen
form sheet.
2015-07-09 Dan Bernstein <mitz@apple.com>
WebKit2 part of Track and expose policies for external URL schemes and App Links separately
https://bugs.webkit.org/show_bug.cgi?id=146822
Reviewed by Anders Carlsson.
* Shared/NavigationActionData.cpp:
(WebKit::NavigationActionData::encode):
(WebKit::NavigationActionData::decode):
* Shared/NavigationActionData.h:
Replaced the shouldOpenExternalURLsPolicy boolean member with a
shouldOpenExternalURLsPolicy member whose type is ShouldOpenExternalURLsPolicy, and
updated encoding and decoding:
* UIProcess/API/APINavigationAction.h:
Added shouldOpenAppLinks boolean to NavigationAction::create and the constructor. It
augments the policy in the NavigationActionData with a valude decided in the UI process.
Replaced shouldOpenExternalURLs() with shouldOpenExternalSchemes() and
shouldOpenAppLinks() which check the policy and the new m_shouldOpenAppLinks boolean.
* UIProcess/API/Cocoa/WKNavigationAction.mm:
(-[WKNavigationAction _shouldOpenExternalSchemes]): Getter for new property, calls through
to the NavigationAction.
(-[WKNavigationAction _shouldOpenAppLinks]): Ditto.
(-[WKNavigationAction _shouldOpenExternalURLs]): Now deprecated and returns the
_shouldOpenExternalSchemes value.
* UIProcess/API/Cocoa/WKNavigationActionPrivate.h: Declared new properties for the two
policies and deprecated old property.
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::tryAppLink): Changed to use NavigationAction::shouldOpenAppLinks, which
encapsulates logic that used to be here.
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::UIClient::createNewPage): Allow App Links (if already allowed by policy).
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::decidePolicyForNavigationAction): Moved logic from tryAppLink in
NavigationState.mm here and pass the result to NavigationAction::create.
(WebKit::WebPageProxy::decidePolicyForNewWindowAction): Allow App Links (if already allowed
by policy).
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::loadRequest): Changed the default policy to not allow App Links (but
still allow external schemes).
* WebProcess/InjectedBundle/API/c/WKBundleNavigationAction.cpp:
(WKBundleNavigationActionGetShouldTryAppLinks): Added this getter.
* WebProcess/InjectedBundle/API/c/WKBundleNavigationActionPrivate.h:
* WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp:
(WebKit::InjectedBundleNavigationAction::InjectedBundleNavigationAction):
* WebProcess/InjectedBundle/InjectedBundleNavigationAction.h:
Added m_shouldTryAppLinks boolean member, initialized from the policy. Updated the
initialization of m_shouldOpenExternalURLs to account for the new policy.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): Pass the policy
in the navigation data.
2015-07-09 Tim Horton <timothy_horton@apple.com>
Use CoreAnimation fences instead of synchronous IPC to synchronize resize
https://bugs.webkit.org/show_bug.cgi?id=146294
<rdar://problem/21090193>
Reviewed by Anders Carlsson.
Because of changes in underlying frameworks, we can no longer depend on
blocking the UI process main thread to be sufficient to synchronize
UI process CA commits with commits coming from the Web process.
Instead, we have to use CoreAnimation fences to perform this synchronization.
Instead of blocking inside waitForAndDispatchImmediately, we'll end up
blocking during the CA commit.
* Platform/mac/LayerHostingContext.mm:
Use HAVE(COREANIMATION_FENCES).
* Platform/IPC/Connection.cpp:
(IPC::Connection::Connection):
(IPC::Connection::processIncomingMessage):
(IPC::Connection::installIncomingSyncMessageCallback):
(IPC::Connection::uninstallIncomingSyncMessageCallback):
Keep track of a set of incoming sync message callbacks, and fire them
(on another queue) when a sync message arrives.
(IPC::Connection::hasIncomingSyncMessage):
* Platform/IPC/Connection.h:
Add a way to check if there are any sync messages in the queue.
* UIProcess/API/mac/WKView.mm:
(-[WKView forceAsyncDrawingAreaSizeUpdate:]):
(-[WKView waitForAsyncDrawingAreaSizeUpdate]):
These are no longer used; do nothing on 10.10+.
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::sendUpdateGeometry):
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::updateGeometry):
* WebProcess/WebPage/DrawingArea.messages.in:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::scaleViewAndUpdateGeometryFenced):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::updateGeometry):
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
Add a MachSendRight parameter to UpdateGeometry, so that we can send along
a fence port with the geometry update if needed.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
Apply the incoming fence so that geometry changes will be synchronized between processes.
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
(WebKit::TiledCoreAnimationDrawingAreaProxy::waitForPossibleGeometryUpdate):
Don't wait for DidUpdateGeometry to come in if we're using fences to achieve the same thing.
(WebKit::TiledCoreAnimationDrawingAreaProxy::sendUpdateGeometry):
Create and block us on a fence and send it along with the geometry update.
If a sync message is in the incoming message queue, don't create the fence;
if a sync message comes in at any point after we've installed the fence (but
before the relevant commit completes), invalidate the fence, so that we won't
end up temorarily deadlocked waiting for the fence timeout.
2015-07-09 Michael Catanzaro <mcatanzaro@igalia.com>
[GTK] Crash when spell checker returns no guesses
https://bugs.webkit.org/show_bug.cgi?id=146805
Reviewed by Martin Robinson.
Properly handle ContextMenuItemTagNoGuessesFound in the switch statement.
* UIProcess/API/gtk/WebKitContextMenuActions.cpp:
(webkitContextMenuActionGetForContextMenuItem):
2015-07-09 Alex Christensen <achristensen@webkit.org>
[Content Extensions] Add 3 byte jump size.
https://bugs.webkit.org/show_bug.cgi?id=146425
Reviewed by Darin Adler.
* UIProcess/API/APIUserContentExtensionStore.h:
Increment CurrentContentExtensionFileVersion because of change in the bytecode.
2015-07-09 Anders Carlsson <andersca@apple.com>
SafariViewController loads partial webpage or entirely blank webpage
https://bugs.webkit.org/show_bug.cgi?id=146815
rdar://problem/21734757
Reviewed by Dan Bernstein.
* Platform/spi/ios/UIKitSPI.h:
Add _hostProcessIdentifier getter.
* UIProcess/ApplicationStateTracker.h:
Change ApplicationStateTracker to hold on to a WKContentView instead of a UIView.
* UIProcess/ApplicationStateTracker.mm:
(WebKit::applicationType):
Add a helper function that returns the type of application the web view is hosted by (regular
application, view service or extension).
(WebKit::ApplicationStateTracker::ApplicationStateTracker):
Register notifications and update m_isInBackground. For regular applications, just listen for UIApplication notifications.
For view services, walk the view controller hierarchy and find the service view controller and listen for notifications and use
BKS to find the background state of the host application. For extensions, just use BKSApplicationStateMonitor directly.
(WebKit::isViewService): Deleted.
* UIProcess/ios/WKContentView.mm:
(-[WKContentView willMoveToWindow:]):
If we're moving out of a window, null out the state tracker.
(-[WKContentView didMoveToWindow]):
If we moved to a window, create a new state tracker.
(-[WKContentView isBackground]):
Handle a null application state.
(-[WKContentView _commonInitializationWithProcessPool:configuration:]): Deleted.
Don't create the application state here.
2015-07-09 Dan Bernstein <mitz@apple.com>
[Cocoa] Report the first paint after committing a load as a rendering progress event
https://bugs.webkit.org/show_bug.cgi?id=146765
Reviewed by Tim Horton.
* Shared/API/Cocoa/_WKRenderingProgressEvents.h: Added _WKRenderingProgressEventFirstPaint.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didCommitLayerTree:]): If this is the first layer tree commit since the load
was committed, and the delegate is observing _WKRenderingProgressEventFirstPaint, call
NavigationState::didFirstPaint.
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::didFirstPaint): Added. Calls -_webView:renderingProgressDidChange:
with _WKRenderingProgressEventFirstPaint.
2015-07-08 Jinwoo Song <jinwoo7.song@samsung.com>
[EFL] When closing inspector window, EwkView is not released properly.
https://bugs.webkit.org/show_bug.cgi?id=146716
Reviewed by Gyuyoung Kim.
It's because inspector window could not be deleted by remaining reference
from inspector view(evas object). This patch deletes the inspector window
after finishing the evas object smart call.
* UIProcess/efl/WebInspectorProxyEfl.cpp:
(WebKit::destroyInspectorWindow):
(WebKit::WebInspectorProxy::platformDidClose):
2015-07-08 Hyungwook Lee <hyungwook.lee@navercorp.com>
Fix ASSERTION FAILED: !m_pendingNavigationID in WebPage::reload().
https://bugs.webkit.org/show_bug.cgi?id=146546
Reviewed by Darin Adler.
We did't reset pendingNavigationID value when request url is empty.
Hence we need to ignore ASSERT check in this case.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::reload):
2015-07-08 Gyuyoung Kim <gyuyoung.kim@webkit.org>
Use Ref/RefPtr instead of PassRefPtr in WebKit2 - 2
https://bugs.webkit.org/show_bug.cgi?id=146591
Reviewed by Darin Adler.
Following patch in order to reduce use of PassRefPtr.
* Shared/BlobDataFileReferenceWithSandboxExtension.h:
* Shared/Cocoa/CompletionHandlerCallChecker.h:
* Shared/Cocoa/CompletionHandlerCallChecker.mm:
(WebKit::CompletionHandlerCallChecker::create):
* Shared/Downloads/DownloadAuthenticationClient.h:
(WebKit::DownloadAuthenticationClient::create):
* Shared/SandboxExtension.h:
* Shared/ShareableResource.cpp:
(WebKit::ShareableResource::create):
* Shared/ShareableResource.h:
* Shared/mac/ObjCObjectGraph.h:
(WebKit::ObjCObjectGraph::create):
* Shared/mac/SandboxExtensionMac.mm:
(WebKit::SandboxExtension::create):
* UIProcess/API/Cocoa/WKProcessGroup.mm:
(getInjectedBundleInitializationUserData):
* UIProcess/WebPreferences.cpp:
(WebKit::WebPreferences::create):
* UIProcess/WebPreferences.h:
* WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
(WKBundlePageOverlayCreate):
* WebProcess/InjectedBundle/API/c/mac/WKBundlePageBannerMac.mm:
(WKBundlePageBannerCreateBannerWithCALayer):
* WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp:
(WebKit::InjectedBundleDOMWindowExtension::create):
* WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.h:
* WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
(WebKit::InjectedBundleHitTestResult::create):
* WebProcess/InjectedBundle/InjectedBundleHitTestResult.h:
* WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp:
(WebKit::InjectedBundleNavigationAction::create):
* WebProcess/InjectedBundle/InjectedBundleNavigationAction.h:
* WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
(WebKit::InjectedBundlePageContextMenuClient::getCustomMenuFromDefaultItems):
(WebKit::InjectedBundlePageContextMenuClient::prepareForImmediateAction):
* WebProcess/InjectedBundle/InjectedBundleScriptWorld.cpp:
(WebKit::InjectedBundleScriptWorld::create):
* WebProcess/InjectedBundle/InjectedBundleScriptWorld.h:
* WebProcess/Network/NetworkProcessConnection.h:
(WebKit::NetworkProcessConnection::create):
* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::create):
* WebProcess/Network/WebResourceLoader.h:
* WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
(WebKit::NotificationPermissionRequestManager::create):
* WebProcess/Notifications/NotificationPermissionRequestManager.h:
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::create):
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/Plugins/Netscape/NetscapePluginStream.h:
(WebKit::NetscapePluginStream::create):
* WebProcess/Plugins/PDF/PDFPlugin.h:
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::create):
* WebProcess/Plugins/PDF/PDFPluginAnnotation.h:
(WebKit::PDFPluginAnnotation::PDFPluginAnnotationEventListener::create):
* WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.h:
* WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm:
(WebKit::PDFPluginChoiceAnnotation::create):
* WebProcess/Plugins/PDF/PDFPluginPasswordField.h:
* WebProcess/Plugins/PDF/PDFPluginPasswordField.mm:
(WebKit::PDFPluginPasswordField::create):
* WebProcess/Plugins/PDF/PDFPluginTextAnnotation.h:
* WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
(WebKit::PDFPluginTextAnnotation::create):
* WebProcess/Plugins/PluginProcessConnection.h:
(WebKit::PluginProcessConnection::create):
* WebProcess/Plugins/PluginProcessConnectionManager.cpp:
(WebKit::PluginProcessConnectionManager::create):
* WebProcess/Plugins/PluginProcessConnectionManager.h:
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::create):
* WebProcess/Plugins/PluginProxy.h:
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::URLRequest::create):
(WebKit::PluginView::Stream::create):
(WebKit::PluginView::create):
* WebProcess/Plugins/PluginView.h:
* WebProcess/Scrolling/RemoteScrollingCoordinator.h:
(WebKit::RemoteScrollingCoordinator::create):
* WebProcess/Storage/StorageAreaImpl.cpp:
(WebKit::StorageAreaImpl::create):
* WebProcess/Storage/StorageAreaImpl.h:
* WebProcess/Storage/StorageAreaMap.cpp:
(WebKit::StorageAreaMap::create):
* WebProcess/Storage/StorageAreaMap.h:
* WebProcess/WebConnectionToUIProcess.cpp:
(WebKit::WebConnectionToUIProcess::create):
* WebProcess/WebConnectionToUIProcess.h:
* WebProcess/WebCoreSupport/WebPopupMenu.cpp:
(WebKit::WebPopupMenu::create):
* WebProcess/WebCoreSupport/WebPopupMenu.h:
* WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp:
(WebKit::WebSearchPopupMenu::create):
* WebProcess/WebCoreSupport/WebSearchPopupMenu.h:
* WebProcess/WebCoreSupport/ios/WebQuickLookHandleClient.h:
* WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
(WebKit::WebFrameNetworkingContext::create):
* WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h:
(WebKit::WebFrameNetworkingContext::create):
* WebProcess/WebPage/Cocoa/RemoteLayerTreeDisplayRefreshMonitor.h:
(WebKit::RemoteLayerTreeDisplayRefreshMonitor::create):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
(WebKit::CoordinatedLayerTreeHost::create):
* WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
(WebKit::ThreadedCoordinatedLayerTreeHost::create):
* WebProcess/WebPage/EventDispatcher.cpp:
(WebKit::EventDispatcher::create):
* WebProcess/WebPage/EventDispatcher.h:
* WebProcess/WebPage/PageBanner.h:
* WebProcess/WebPage/WebBackForwardListProxy.h:
(WebKit::WebBackForwardListProxy::create):
* WebProcess/WebPage/WebContextMenu.h:
(WebKit::WebContextMenu::create):
* WebProcess/WebPage/WebDocumentLoader.h:
(WebKit::WebDocumentLoader::create):
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::create):
* WebProcess/WebPage/WebInspector.h:
* WebProcess/WebPage/WebInspectorUI.cpp:
(WebKit::WebInspectorUI::create):
* WebProcess/WebPage/WebInspectorUI.h:
* WebProcess/WebPage/WebOpenPanelResultListener.cpp:
(WebKit::WebOpenPanelResultListener::create):
* WebProcess/WebPage/WebOpenPanelResultListener.h:
* WebProcess/WebPage/WebPageOverlay.cpp:
(WebKit::WebPageOverlay::create):
* WebProcess/WebPage/WebPageOverlay.h:
* WebProcess/WebPage/WebUndoStep.cpp:
(WebKit::WebUndoStep::create):
* WebProcess/WebPage/WebUndoStep.h:
* WebProcess/WebPage/mac/PageBannerMac.mm:
(WebKit::PageBanner::create):
* WebProcess/WebPage/mac/PlatformCAAnimationRemote.h:
* WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
(WebKit::PlatformCAAnimationRemote::create):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::create):
* WebProcess/ios/WebVideoFullscreenManager.h:
* WebProcess/ios/WebVideoFullscreenManager.mm:
(WebKit::WebVideoFullscreenManager::create):
2015-07-08 Anders Carlsson <andersca@apple.com>
WKSecurityOrigin.h has wrong availability info
https://bugs.webkit.org/show_bug.cgi?id=146761
rdar://problem/21735802
Reviewed by Dan Bernstein.
* UIProcess/API/Cocoa/WKSecurityOrigin.h:
2015-07-08 Andreas Kling <akling@apple.com>
[iOS] Scrolling is laggy when the keyboard is up and a form element is focused.
<https://webkit.org/b/146735>
<rdar://problem/21151033>
Reviewed by Enrica Casucci.
Every touch on the page causes us to call elementDidFocus(), since we may need to bring
up a keyboard if the node had previously been programmatically focused. This was causing
little lag spikes during scrolling every time you'd put your finger to the screen.
Have WebPage::elementDidFocus() return early if the node already has focus, and we've
started an input session in response to non-programmatic focus already.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::elementDidFocus):
(WebKit::WebPage::elementDidBlur):
2015-07-08 Matt Rajca <mrajca@apple.com>
Media Session: indicate to clients whether a media session has active media elements
https://bugs.webkit.org/show_bug.cgi?id=146742
Reviewed by Tim Horton.
* UIProcess/API/C/WKPage.cpp:
(WKPageHasMediaSessionWithActiveMediaElements):
* UIProcess/API/C/WKPagePrivate.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::hasMediaSessionWithActiveMediaElementsDidChange):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::hasMediaSessionWithActiveMediaElementsDidChange):
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::hasMediaSessionWithActiveMediaElementsDidChange):
* WebProcess/WebCoreSupport/WebChromeClient.h:
2015-07-07 Matt Rajca <mrajca@apple.com>
Media Session: propagate artwork URL with metadata to UI clients
https://bugs.webkit.org/show_bug.cgi?id=146698
Reviewed by Tim Horton.
* Shared/WebMediaSessionMetadata.h:
(WebKit::WebMediaSessionMetadata::artworkURL):
* UIProcess/API/C/WKMediaSessionMetadata.cpp:
(WKMediaSessionMetadataCopyArtworkURL):
* UIProcess/API/C/WKMediaSessionMetadata.h:
2015-07-08 Yongjun Zhang <yongjun_zhang@apple.com>
Don't allow page scroll when previewing a link or image.
https://bugs.webkit.org/show_bug.cgi?id=146741
rdar://problem/21733053
Reviewed by Beth Dakin.
Don't let preview gesture and scroll panning gesture or zooming gesture recognize at the same time.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView gestureRecognizer:canPreventGestureRecognizer:]):
2015-07-08 Tim Horton <timothy_horton@apple.com>
Snapshots can be misplaced when custom swipe views are offset from the window origin
https://bugs.webkit.org/show_bug.cgi?id=146744
<rdar://problem/20942120>
Reviewed by Dean Jackson.
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
Keep swipeArea in window coordinates; it was already in window coordinates
when using custom swipe views, but not in the non-custom case.
Convert from window coordinates to parent-of-m_swipeLayer coordinates when
determining m_swipeLayer's frame.
2015-07-07 Andy Estes <aestes@apple.com>
[iOS][WK2] Ignore synthetic clicks in subframes initiated on a previous page
https://bugs.webkit.org/show_bug.cgi?id=146712
Reviewed by Benjamin Poulain.
r178980 fixed an issue where, if a main frame navigation occurs in response to a touch event, a synthetic click
event could fire on the navigated-to page. This change extends this fix to apply to subframes.
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::WebFrame):
* WebProcess/WebPage/WebFrame.h:
(WebKit::WebFrame::firstLayerTreeTransactionIDAfterDidCommitLoad):
(WebKit::WebFrame::setFirstLayerTreeTransactionIDAfterDidCommitLoad):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didCommitLoad): Stored the next layer tree transaction ID, and called cancelPotentialTapInFrame(), for the committed frame.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::handleTap): Determined the first post-commit layer tree transaction ID from the tap target node's frame.
(WebKit::WebPage::commitPotentialTap): Ditto.
(WebKit::WebPage::cancelPotentialTap): Called cancelPotentialTapInFrame(), passing m_mainFrame.
(WebKit::WebPage::cancelPotentialTapInFrame): Taught to only cancel a potential tap whose target node is a descendant of the given frame.
(WebKit::WebPage::updateVisibleContentRects): Updated to use the main frame's first post-commit layer tree transaction ID.
2015-07-08 Brady Eidson <beidson@apple.com>
Move PingLoaders to the NetworkingProcess.
<rdar://problem/18860263> and https://bugs.webkit.org/show_bug.cgi?id=146710
Reviewed by Tim Horton.
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::loadPing): Create a PingHandle and then return.
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::createPingHandle): If the Network process is enabled,
compile the appropriate load parameters and then message to it.
Otherwise, use the default in-process PingHandle.
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:
2015-07-08 Beth Dakin <bdakin@apple.com>
Only support image previews for clients that implement commitPreviewedImageWithURL
delegate
https://bugs.webkit.org/show_bug.cgi?id=146739
-and corresponding-
rdar://problem/21692929
Reviewed by Tim Horton.
We should only support image previews for clients that implement
commitPreviewedImageWithURL delegate since there is no default commit action.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView previewViewControllerForPosition:inSourceView:]):
2015-07-08 Anders Carlsson <andersca@apple.com>
Make ApplicationStateTracker be per view instead of being a singleton
https://bugs.webkit.org/show_bug.cgi?id=146737
Reviewed by Andreas Kling.
* UIProcess/ApplicationStateTracker.h:
Update to be per view instead of a singleton.
* UIProcess/ApplicationStateTracker.mm:
(WebKit::ApplicationStateTracker::ApplicationStateTracker):
Change to take a view + selectors.
(WebKit::ApplicationStateTracker::~ApplicationStateTracker):
Invalidate the state monitor and remove the listeners.
(WebKit::ApplicationStateTracker::applicationDidEnterBackground):
Just call the single background method.
(WebKit::ApplicationStateTracker::applicationWillEnterForeground):
Just call the single foreground method.
(WebKit::ApplicationStateTracker::singleton): Deleted.
(WebKit::ApplicationStateTracker::addListener): Deleted.
(WebKit::ApplicationStateTracker::invokeListeners): Deleted.
(WebKit::ApplicationStateTracker::pruneListeners): Deleted.
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _commonInitializationWithProcessPool:configuration:]):
Create the ApplicationStateTracker here.
(-[WKContentView isBackground]):
Get the ivar instead of the singleton.
2015-07-08 Beth Dakin <bdakin@apple.com>
InteractionInformationAtPosition bounds seem wrong on many sites, affects
apple.com
https://bugs.webkit.org/show_bug.cgi?id=146736
-and corresponding-
rdar://problem/21655549
Reviewed by Tim Horton.
http://trac.webkit.org/changeset/186132/ changed the bounds for
InteractionInformationAtPosition. The image-related changes are good, but the
link-related changes feel wrong on many sites. We should revert the change for now
and just use the absoluteBoundingBoxRect() for non-images.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getPositionInformation):
2015-07-08 Beth Dakin <bdakin@apple.com>
Add actions to image previews
https://bugs.webkit.org/show_bug.cgi?id=146702
-and corresponding-
<rdar://problem/21642654>
Reviewed by Sam Weinig.
Add an array of actions and _WKActivatedElementInfo in order to properly invoke
the actions.
* UIProcess/WKImagePreviewViewController.h:
* UIProcess/WKImagePreviewViewController.mm:
(-[WKImagePreviewViewController loadView]):
(-[WKImagePreviewViewController initWithCGImage:defaultActions:elementInfo:]):
(_scaleSizeWithinSize):
(-[WKImagePreviewViewController initWithCGImage:]): Deleted.
Re-factor defaultActionsForImageSheet into a stand-alone function so that it can
be invoked for previews as well as for the action sheet.
* UIProcess/ios/WKActionSheetAssistant.h:
* UIProcess/ios/WKActionSheetAssistant.mm:
(-[WKActionSheetAssistant showImageSheet]):
(-[WKActionSheetAssistant defaultActionsForLinkSheet]):
(-[WKActionSheetAssistant defaultActionsForImageSheet]):
(-[WKActionSheetAssistant showLinkSheet]):
WKImagePreviewViewController initializer now takes the default actions and
_WKActivatedElementInfo.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView previewViewControllerForPosition:inSourceView:]):
2015-07-08 Dan Bernstein <mitz@apple.com>
<rdar://problem/21669397> [iOS] Keyboard shortcuts that take focus away from the web view end up typing a letter into the newly focused field
https://bugs.webkit.org/show_bug.cgi?id=146732
Reviewed by Sam Weinig.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _interpretKeyEvent:isCharEvent:]): Bail out if we are no longer the first
responder.
2015-07-07 Anders Carlsson <andersca@apple.com>
Always begin a background task when needed, not just when we go into the background
https://bugs.webkit.org/show_bug.cgi?id=146704
Reviewed by Gavin Barraclough.
The system let background code run for the same amount of time regardless of whether the assertion was grabbed
when the app is in the foreground or being backgrounded, so remove the background/foreground tracking code.
* UIProcess/ios/ProcessAssertionIOS.mm:
(-[WKProcessAssertionBackgroundTaskManager _updateBackgroundTask]):
(-[WKProcessAssertionBackgroundTaskManager init]): Deleted.
(-[WKProcessAssertionBackgroundTaskManager _applicationWillEnterForeground]): Deleted.
(-[WKProcessAssertionBackgroundTaskManager _applicationDidEnterBackground]): Deleted.
2015-07-08 Antti Koivisto <antti@apple.com>
Network Cache: Don't open files in main thread
https://bugs.webkit.org/show_bug.cgi?id=146722
Follow-up.
* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::Storage::dispatchReadOperation):
Accessing m_bodyFilter is technically not thread safe so keep it in main thread.
2015-07-08 Antti Koivisto <antti@apple.com>
Network Cache: Don't open files in main thread
https://bugs.webkit.org/show_bug.cgi?id=146722
Reviewed by Chris Dumez.
While we use open() with O_NONBLOCK profiling indicates that we still may block up to 5ms under the syscall in some case.
* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::Storage::dispatchReadOperation):
Dispatch read operation to a concurrent queue.
With this we can also eliminate the separate dispatch() for body blob read.
2015-07-08 Sungmann Cho <sungmann.cho@navercorp.com>
[Unix] Remove unused local variable from Connection::sendOutgoingMessage().
https://bugs.webkit.org/show_bug.cgi?id=146713
Reviewed by Csaba Osztrogonác.
* Platform/IPC/unix/ConnectionUnix.cpp:
(IPC::Connection::sendOutgoingMessage):
2015-07-07 Tim Horton <timothy_horton@apple.com>
Occasional null deref in the CA callback in flushLayers()
https://bugs.webkit.org/show_bug.cgi?id=146700
<rdar://problem/21668754>
Reviewed by Simon Fraser.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::flushLayers):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::flushLayers):
Make sure we keep the WebPage alive, and null-check the potentially null
WebCore objects (Page and Frame).
2015-07-06 Matt Rajca <mrajca@apple.com>
Media Session: propagate metadata changes to UI clients
https://bugs.webkit.org/show_bug.cgi?id=146660
Reviewed by Tim Horton.
* CMakeLists.txt: Added WebMediaSessionMetadata and WKMediaSessionMetadata.
* Shared/API/APIObject.h: Added a media session metadata type.
* Shared/API/c/WKBase.h:
* Shared/WebMediaSessionMetadata.cpp: Added API adapter for WebCore::MediaSessionMetadata.
(WebKit::WebMediaSessionMetadata::create):
(WebKit::WebMediaSessionMetadata::WebMediaSessionMetadata):
(WebKit::WebMediaSessionMetadata::~WebMediaSessionMetadata):
* Shared/WebMediaSessionMetadata.h: Added API adapter for WebCore::MediaSessionMetadata.
(WebKit::WebMediaSessionMetadata::title):
(WebKit::WebMediaSessionMetadata::artist):
(WebKit::WebMediaSessionMetadata::album):
* UIProcess/API/APIUIClient.h: Added 'mediaSessionMetadataDidChange' interface.
(API::UIClient::mediaSessionMetadataDidChange):
* UIProcess/API/C/WKAPICast.h:
* UIProcess/API/C/WKMediaSessionMetadata.cpp: Added C wrapper for WebMediaSessionMetadata.
(WKMediaSessionMetadataGetTypeID):
(WKMediaSessionMetadataCopyTitle):
(WKMediaSessionMetadataCopyArtist):
(WKMediaSessionMetadataCopyAlbum):
* UIProcess/API/C/WKMediaSessionMetadata.h: Added C wrapper for WebMediaSessionMetadata.
* UIProcess/API/C/WKPage.cpp: Forward 'mediaSessionMetadataDidChange' to client.
(WKPageSetPageUIClient):
* UIProcess/API/C/WKPageUIClient.h: Added 'mediaSessionMetadataDidChange' callback.
* UIProcess/WebPageProxy.cpp: Forward 'mediaSessionMetadataDidChange' to UI client.
(WebKit::WebPageProxy::mediaSessionMetadataDidChange):
* WebKit2.xcodeproj/project.pbxproj: Added WebMediaSessionMetadata and WKMediaSessionMetadata.
2015-07-07 Brady Eidson <beidson@apple.com>
HTTP Auth cached after disabling private browsing/reset.
<rdar://problem/8293055> and https://bugs.webkit.org/show_bug.cgi?id=146654
Reviewed by Tim Horton.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::getAuthenticationInfo):
2015-07-07 Anders Carlsson <andersca@apple.com>
Make sure to remove the download message receiver before freeing it
https://bugs.webkit.org/show_bug.cgi?id=146687
Reviewed by Simon Fraser.
* UIProcess/Downloads/DownloadProxyMap.cpp:
(WebKit::DownloadProxyMap::downloadFinished):
2015-07-07 Chris Dumez <cdumez@apple.com>
Unreviewed, Fix non-Mac build after r186464.
* UIProcess/Network/CustomProtocols/soup/CustomProtocolManagerProxySoup.cpp:
(WebKit::CustomProtocolManagerProxy::~CustomProtocolManagerProxy):
2015-07-06 Anders Carlsson <andersca@apple.com>
Make sure to remove message receivers before they are deallocated
https://bugs.webkit.org/show_bug.cgi?id=146666
rdar://problem/21331118
Reviewed by Tim Horton.
Add code so we can assert that there are no message receiver maps pointing to a message receiver
when it's being destroyed. Fix all the assertions by calling removeMessageReceiver in the right places.
* Platform/IPC/MessageReceiver.h:
(IPC::MessageReceiver::~MessageReceiver):
(IPC::MessageReceiver::willBeAddedToMessageReceiverMap):
(IPC::MessageReceiver::willBeRemovedFromMessageReceiverMap):
* Platform/IPC/MessageReceiverMap.cpp:
(IPC::MessageReceiverMap::addMessageReceiver):
(IPC::MessageReceiverMap::removeMessageReceiver):
(IPC::MessageReceiverMap::invalidate):
* Shared/ChildProcess.cpp:
(WebKit::ChildProcess::removeMessageReceiver):
* Shared/ChildProcess.h:
* Shared/ChildProcessProxy.cpp:
(WebKit::ChildProcessProxy::removeMessageReceiver):
* Shared/ChildProcessProxy.h:
* UIProcess/API/Cocoa/WKBrowsingContextController.mm:
(-[WKBrowsingContextController dealloc]):
* UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h:
* UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm:
(WebKit::CustomProtocolManagerProxy::~CustomProtocolManagerProxy):
* UIProcess/UserContent/WebUserContentControllerProxy.cpp:
(WebKit::WebUserContentControllerProxy::~WebUserContentControllerProxy):
* UIProcess/WebConnectionToWebProcess.cpp:
(WebKit::WebConnectionToWebProcess::invalidate):
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(-[WKWebProcessPlugInBrowserContextController dealloc]):
* WebProcess/WebConnectionToUIProcess.cpp:
(WebKit::WebConnectionToUIProcess::invalidate):
2015-07-06 Brent Fulgham <bfulgham@apple.com>
Ensure media playback is stopped during page close
https://bugs.webkit.org/show_bug.cgi?id=146554
<rdar://problem/18033944>
Reviewed by Brady Eidson.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::didClose): Make sure to clean up any running media sessions when
the process is being shut down.
2015-07-06 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r186385.
https://bugs.webkit.org/show_bug.cgi?id=146668
crashes 3 webaudio tests in debug builds (Requested by
alexchristensen on #webkit).
Reverted changeset:
"Ensure media playback is stopped during page close"
https://bugs.webkit.org/show_bug.cgi?id=146554
http://trac.webkit.org/changeset/186385
2015-07-06 Brent Fulgham <bfulgham@apple.com>
Ensure media playback is stopped during page close
https://bugs.webkit.org/show_bug.cgi?id=146554
<rdar://problem/18033944>
Reviewed by Brady Eidson.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::didClose): Make sure to clean up any running media sessions when
the process is being shut down.
2015-07-06 Yongjun Zhang <yongjun_zhang@apple.com>
Allow UIDelegate to customize link actions in preview.
https://bugs.webkit.org/show_bug.cgi?id=146567
Add a new UIDelegate method to pass the defaultActions and elementInfo to client to allow
the client customize the actions based on the element. Also add a new SPI runActionWithElementInfo:
to _WKElementAction and make it aware of the WKActionSheetAssistant that creates it, so that
the client can run the action without knowing WKActionSheetAssistant.
Reviewed by Beth Dakin.
* UIProcess/API/Cocoa/WKUIDelegatePrivate.h: Add delegate method _webView:previewViewControllerForURL:defaultActions:elementInfo:.
* UIProcess/API/Cocoa/_WKElementAction.h: Add a SPI runActionWithElementInfo:.
* UIProcess/API/Cocoa/_WKElementAction.mm:
(-[_WKElementAction _initWithTitle:actionHandler:type:assistant:]): Modified initializer, also initialize _defaultActionSheetAssistant
iVar if the caller provides that.
(+[_WKElementAction elementActionWithTitle:actionHandler:]): Use the new initializer.
(+[_WKElementAction _elementActionWithType:customTitle:assistant:]): A new helper method to create _WKElementAction with assistant.
(+[_WKElementAction _elementActionWithType:assistant:]):
(+[_WKElementAction elementActionWithType:customTitle:]):
(-[_WKElementAction runActionWithElementInfo:]):
* UIProcess/API/Cocoa/_WKElementActionInternal.h:
* UIProcess/ios/WKActionSheetAssistant.h: Add a method defaultActionsForLinkSheet.
* UIProcess/ios/WKActionSheetAssistant.mm:
(-[WKActionSheetAssistant defaultActionsForLinkSheet]): Get default actions for current link that is activated.
(-[WKActionSheetAssistant showLinkSheet]): Use defaultActionsForLinkSheet.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView previewViewControllerForPosition:inSourceView:]): Pass defaultActions and elementInfo to UIDelegate when querying
for preview view controller.
(-[WKContentView didDismissPreviewViewController:committing:]):
2015-07-06 Brady Eidson <beidson@apple.com>
ShouldOpenExternalURLsPolicy should default to "Allow" for WK2 API loads.
<rdar://problem/21640050> and https://bugs.webkit.org/show_bug.cgi?id=146563
Reviewed by Geoff Garen.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView loadRequest:]): Move _loadRequest:withOptions: logic back here, just without options.
(-[WKWebView _loadRequest:withOptions:]): This SPI is now unneeded, but must remain inactive.
* UIProcess/WebPageProxy.h:
2015-07-06 Csaba Osztrogonác <ossy@webkit.org>
URTBF after r186357 to fix non Cocoa platforms.
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::deleteWebsiteData):
2015-07-06 Antti Koivisto <antti@apple.com>
With multipart/replaced (e.g. motion JPEG), m_bufferedDataForCache grows unbounded in Networking process
https://bugs.webkit.org/show_bug.cgi?id=146630
<rdar://problem/21677340>
Follow-up.
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::didReceiveBuffer):
Typo 1014 -> 1024
2015-07-06 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r185896.
https://bugs.webkit.org/show_bug.cgi?id=146647
Caused by a refcounting error in GTK+; it's actually legal for
the event to be null, just the gi annotations were wrong.
(Requested by mcatanzaro on #webkit).
Reverted changeset:
"[GTK] Crash performing drag-and-drop"
https://bugs.webkit.org/show_bug.cgi?id=146267
http://trac.webkit.org/changeset/185896
2015-07-06 Anders Carlsson <andersca@apple.com>
Provide API to clear the HSTS cache
https://bugs.webkit.org/show_bug.cgi?id=146565
rdar://problem/20023805
Reviewed by Tim Horton.
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::deleteWebsiteData):
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::clearHSTSCache):
* Shared/WebsiteData/WebsiteDataTypes.h:
* UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
(dataTypesToString):
* UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
(WebKit::toWebsiteDataTypes):
(WebKit::toWKWebsiteDataTypes):
* UIProcess/API/Cocoa/WKWebsiteDataRecordPrivate.h:
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::computeNetworkProcessAccessTypeForDataRemoval):
2015-07-06 Antti Koivisto <antti@apple.com>
With multipart/replaced (e.g. motion JPEG), m_bufferedDataForCache grows unbounded in Networking process
https://bugs.webkit.org/show_bug.cgi?id=146630
<rdar://problem/21677340>
Reviewed by Chris Dumez.
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::didReceiveResponseAsync):
Don't buffer multipart/x-mixed-replace. We never want to cache these.
(WebKit::NetworkResourceLoader::didReceiveBuffer):
Limit the maximum size of the cache buffer to 10MB. This prevents unbounded memory growth if the resource
keeps streaming. It also prevents giant entries from pushing other data out of the cache.
(WebKit::NetworkResourceLoader::didFinishLoading):
2015-07-06 Zan Dobersek <zdobersek@igalia.com>
[GTK] Guard X11-specific code in webkitWebViewBaseDidRelaunchWebProcess()
https://bugs.webkit.org/show_bug.cgi?id=146627
Reviewed by Carlos Garcia Campos.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseDidRelaunchWebProcess):
Guard calls to DrawingAreaImpl::setNativeSurfaceHandleForCompositing()
that pass in an X11 Window ID with the PLATFORM(X11) build guards.
2015-07-05 Chris Dumez <cdumez@apple.com>
[WK2] Current page's scroll position is lost when transferring sessionState from one view to another
https://bugs.webkit.org/show_bug.cgi?id=146625
<rdar://problem/21585268>
Reviewed by Gavin Barraclough.
The current page's scroll position was lost when transferring the
sessionState from one view to another. This is because we only update
the current WebBackForwardListItem after navigating away.
However, when the client swaps WebViews for navigating, we don't detect
this as navigating away and the current WebBackForwardListItem is not
updated with the current page's state (including the scroll position).
This means that the information is not transferred via the sessionState
and the scroll position (among other things) ends up being lost when
navigating back in the new WebView.
Retrieving the session state is a synchronous API and we want to avoid
doing a synchronous IPC between the UIProcess and the WebProcess to
retrieve the current page's state. Therefore, the approach chosen in
this patch is to detect when the user is done scrolling the main frame
(using a HystererisActivity) and then update the scroll position on the
current HistoryItem. This way, the current WebBackForwardListItem
normally has an up-to-date scroll position for the main frame when the
sessionState is queried by the client.
The solution is not perfect as we don't keep the whole page state
up-to-date for the current WebBackForwardListItem, only the main frame
state. However, the proposed solution is cheap, avoid synchronous IPC
and provides a much better user experience in most cases.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::pageDidScroll):
(WebKit::WebPage::pageStoppedScrolling):
* WebProcess/WebPage/WebPage.h:
2015-07-05 Timothy Hatcher <timothy@apple.com>
Crash when closing the web inspector
https://bugs.webkit.org/show_bug.cgi?id=146620
Reviewed by Darin Adler.
* WebProcess/WebPage/WebInspectorUI.cpp:
(WebKit::WebInspectorUI::closeWindow): Null check the connection, like it is
in other places where it is used.
2015-07-04 Chris Dumez <cdumez@apple.com>
Drop RefPtr::clear() method
https://bugs.webkit.org/show_bug.cgi?id=146556
Reviewed by Brady Eidson.
Drop RefPtr::clear() method in favor of "= nullptr;" pattern.
2015-07-03 Dan Bernstein <mitz@apple.com>
[Xcode] Update some build settings as recommended by Xcode 7
https://bugs.webkit.org/show_bug.cgi?id=146597
Reviewed by Sam Weinig.
* Configurations/Base.xcconfig: Enabled CLANG_WARN_UNREACHABLE_CODE and
GCC_NO_COMMON_BLOCKS. Removed GCC_MODEL_TUNING.
* WebKit2.xcodeproj/project.pbxproj: Updated LastUpgradeCheck.
2015-07-03 Carlos Garcia Campos <cgarcia@igalia.com>
REGRESSION(r186025): [SOUP] NetworkCache gets blocked in traverse since r186025
https://bugs.webkit.org/show_bug.cgi?id=146545
Reviewed by Sergio Villar Senin.
In r186025 the readSync method used when traversing the cache
files was removed in favor of using parallel async reads to speed
up the traverse. The approach used doesn't work for soup, because
the IO operations are async, but run their callbacks in the
current thread. The network cache now runs up to 5 async reads in
the io work queue thread, and waits for them to finish, and those
asycn reads never finish for the soup backend because the thread
is blocked waiting for them. We need to use a different thread to
run those reads.
* NetworkProcess/cache/NetworkCacheIOChannel.h: Add
readSyncInThread private method.
* NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
(WebKit::NetworkCache::IOChannel::read): When not called in the
main thread, call readSyncInThread() instead.
(WebKit::NetworkCache::IOChannel::readSyncInThread): Run the read
operation synchronously in a different thread, since the current
thread might be blocked waiting for us.
2015-07-02 Przemek Piorkowski <piorkowskiprzemyslaw@gmail.com>
[EFL] test_ewk2_application_cache_manager has been failed since r185527
https://bugs.webkit.org/show_bug.cgi?id=146016
Reviewed by Gyuyoung Kim.
In order to handle properly WebApplicationCacheManagerProxy implementation which use
WebsiteDataRecord it is necessary to enable PUBLIC_SUFFIX_LIST for EFL.
Implementation of PUBLIC_SUFFIX_LIST already exists for soup so EFL can use it as well.
* UIProcess/API/efl/tests/test_ewk2_application_cache_manager.cpp:
(TEST_F): enable ewk_application_cache_manager as it is passing now.
2015-07-02 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r186247 and r186250.
https://bugs.webkit.org/show_bug.cgi?id=146572
Broke the build on Mavericks bots (Requested by cdumez on
#webkit).
Reverted changesets:
"Provide API to clear the HSTS cache"
https://bugs.webkit.org/show_bug.cgi?id=146565
http://trac.webkit.org/changeset/186247
"Unreviewed build fix for non-COCOA ports after r186247."
http://trac.webkit.org/changeset/186250
2015-07-02 Jinwoo Song <jinwoo7.song@samsung.com>
Unreviewed build fix for non-COCOA ports after r186247.
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::deleteWebsiteData): Add PLATFORM(COCOA) guard.
2015-07-02 Anders Carlsson <andersca@apple.com>
Provide API to clear the HSTS cache
https://bugs.webkit.org/show_bug.cgi?id=146565
rdar://problem/20023805
Reviewed by Tim Horton.
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::deleteWebsiteData):
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::clearHSTSCache):
* Shared/WebsiteData/WebsiteDataTypes.h:
* UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
(dataTypesToString):
* UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
(WebKit::toWebsiteDataTypes):
(WebKit::toWKWebsiteDataTypes):
* UIProcess/API/Cocoa/WKWebsiteDataRecordPrivate.h:
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::computeNetworkProcessAccessTypeForDataRemoval):
2015-07-02 Mark Lam <mark.lam@apple.com>
Gardening: fix broken 32-bit build..
https://bugs.webkit.org/show_bug.cgi?id=146416
Not reviewed.
* UIProcess/API/Cocoa/APISerializedScriptValueCocoa.mm:
(API::SerializedScriptValue::deserialize):
2015-07-02 Brent Fulgham <bfulgham@apple.com>
Correct *another* typo in r186238.
* UIProcess/API/Cocoa/WKUIDelegatePrivate.h: Fix parameter name scrolView -> scrollView.
2015-07-02 Brent Fulgham <bfulgham@apple.com>
Correct typo in r186238.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView scrollViewWillEndDragging:withVelocity:targetContentOffset:]):
2015-07-02 Brent Fulgham <bfulgham@apple.com>
Provide delegate SPI for clients to notify WebKit about content inset changes
https://bugs.webkit.org/show_bug.cgi?id=146482
<rdar://problem/21602741>
Reviewed by Darin Adler.
Provide a new SPI for WebKit client applications to use to inform WebKit of planned
adjustments to the edge insets of the view.
* UIProcess/API/Cocoa/WKUIDelegatePrivate.h: Add new optional delegate method.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView scrollViewWillEndDragging:withVelocity:targetContentOffset:]): If the new delegate
method exists, use the specified content insets, rather than the current state of the view.
2015-07-02 Beth Dakin <bdakin@apple.com>
Allow the UIDelegate to customize an image preview
https://bugs.webkit.org/show_bug.cgi?id=146557
-and corresponding-
rdar://problem/21657424
Reviewed by Tim Horton.
Add imageURL to InteractionInformationAtPosition.
* Shared/InteractionInformationAtPosition.cpp:
(WebKit::InteractionInformationAtPosition::encode):
(WebKit::InteractionInformationAtPosition::decode):
* Shared/InteractionInformationAtPosition.h:
Two new delegate methods.
* UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
Call the delegate methods at the appropriate time.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView previewViewControllerForPosition:inSourceView:]):
(-[WKContentView commitPreviewViewController:]):
Include the imageURL in InteractionInformationAtPosition.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getPositionInformation):
2015-07-02 Anders Carlsson <andersca@apple.com>
Instead of requiring ToT UIKIt, check that UI_WEB_TOUCH_EVENT_HAS_IS_POTENTIAL_TAP is defined to 1
https://bugs.webkit.org/show_bug.cgi?id=146558
Reviewed by Beth Dakin.
* Shared/ios/NativeWebTouchEventIOS.mm:
(WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
2015-07-02 Brady Eidson <beidson@apple.com>
Remove change I accidentally committed in r186232
* UIProcess/WebsiteData/WebsiteDataStore.h:
2015-07-02 Alex Christensen <achristensen@webkit.org>
Fix EWS build after r186182.
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::userMediaPermissionRequestManager):
Don't export a function defined in a header, or it will generate a weak external symbol.
2015-07-02 Brady Eidson <beidson@apple.com>
Add preference to disable all http-equiv.
<rdar://problem/9091261> and https://bugs.webkit.org/show_bug.cgi?id=146553
Reviewed by Sam Weinig.
* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetMetaRefreshEnabled): Still expose this SPI, but have it affect
the "httpEquivEnabled" setting.
(WKPreferencesGetMetaRefreshEnabled): Ditto
(WKPreferencesSetHTTPEquivEnabled):
(WKPreferencesGetHTTPEquivEnabled):
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
2015-07-02 Mark Lam <mark.lam@apple.com>
WKWebView evaluateJavaScript:completionHandler: should reuse its JSContext instance.
https://bugs.webkit.org/show_bug.cgi?id=146416
Reviewed by Anders Carlsson.
The core issue here is that we need to be able to deserialized an
API::SerializedScriptValue instance into an ObjC object graph. We'll solve this
by introducing a API::SerializedScriptValue::deserialize() functions that does
the job. The deserialize() function will will use a SharedJSContext to provide
the needed JSContext for doing this work.
Also updated ScriptMessageHandlerDelegate::didPostMessage() to use this new
deserialize() function.
* Shared/API/APISerializedScriptValue.h:
(API::SerializedScriptValue::deserialize):
(API::SerializedScriptValue::internalRepresentation):
- Changed to return a WebCore::SerializedScriptValue*. This makes it friendlier
to use in the 2 places that need it.
* UIProcess/API/Cocoa/APISerializedScriptValueCocoa.mm: Added.
(API::SharedJSContext::SharedJSContext):
(API::SharedJSContext::ensureContext):
(API::SharedJSContext::releaseContext):
(API::SerializedScriptValue::deserialize):
* UIProcess/API/Cocoa/WKUserContentController.mm:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView evaluateJavaScript:completionHandler:]):
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewRunJavaScriptCallback):
- Removed a now unnecessary cast.
* WebKit2.xcodeproj/project.pbxproj:
2015-07-02 Dan Bernstein <mitz@apple.com>
<rdar://problem/21429613> [iOS] Stop making symlinks from PrivateFrameworks to Frameworks
https://bugs.webkit.org/show_bug.cgi?id=146542
Reviewed by Sam Weinig.
* WebKit2.xcodeproj/project.pbxproj: Removed the build phase that makes the directory of
symlinks.
2015-07-02 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] WebSQL doesn't work because openDatabase always fails with DOM Exception 18
https://bugs.webkit.org/show_bug.cgi?id=146234
Reviewed by Sergio Villar Senin.
This is because we don't provide any quota, and 0 is used by
default, so there's never enough quota and openDatabase fails. We
should expose this in the API, but for now, we could use a default
quota of 5MB like WTR does.
* UIProcess/API/gtk/WebKitUIClient.cpp: Override
exceededDatabaseQuota and return always the default quota.
* UIProcess/gtk/WebInspectorProxyGtk.cpp:
(WebKit::exceededDatabaseQuota): Return the quota based on the
expected usage and current database usabe like mac does.
(WebKit::WebInspectorProxy::platformCreateInspectorPage): Add
custom UI client to implement exceededDatabaseQuota.
2015-07-02 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r185704.
https://bugs.webkit.org/show_bug.cgi?id=146544
Didn't fix the problem (Requested by anttik on #webkit).
Reverted changeset:
"~4% Membuster regression after WebKit r185452"
https://bugs.webkit.org/show_bug.cgi?id=146112
http://trac.webkit.org/changeset/185704
2015-07-02 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Accelerated Compositing stops working after a web process crash
https://bugs.webkit.org/show_bug.cgi?id=146508
Reviewed by Martin Robinson.
The problem is that we don't send the window ID again to the new
web process.
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::didRelaunchProcess): Call
webkitWebViewBaseDidRelaunchWebProcess().
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseDidRelaunchWebProcess): Set the window ID to
the new drawing area.
* UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
2015-07-01 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: [Mac] InspectorFrontendHost.beep() doesn't play a sound, sandbox warnings
https://bugs.webkit.org/show_bug.cgi?id=146525
Reviewed by Timothy Hatcher.
* WebProcess/com.apple.WebProcess.sb.in:
Get NSBeep working without any sandbox warnings.
2015-07-01 Anders Carlsson <andersca@apple.com>
Remove code to recompute rounded window corners
https://bugs.webkit.org/show_bug.cgi?id=146534
Reviewed by Simon Fraser.
This code is no longer needed since we're always layer-backed now.
* UIProcess/API/mac/WKView.mm:
(-[WKView displayIfNeeded]): Deleted.
(-[WKView _cacheWindowBottomCornerRect]): Deleted.
* UIProcess/API/mac/WKViewInternal.h:
2015-07-01 Yongjun Zhang <yongjun_zhang@apple.com>
Web page doesn't update its loading state when web process becomes suspended if there are pending network requests (XHR).
https://bugs.webkit.org/show_bug.cgi?id=146439
When web page is loading, we hold a background activity token in NavigationState and we release the token when the page done
loading. A web page can start loading subresources (like XHR) after the page is loaded, and WebPageProxy will update its
_networkRequestsInProgress state which will notify the client there is network actvity on-going. Since we don't hold
the background activity token after page is loaded, the WebContent process could become suspended without notifying the client
and the client will lose track of the loading state.
The first thought was to hold another background activity when _networkRequestsInProgress flag is set in NavigationState.
However, this could result in side-effect that a WebContent process can stay active for too long if there is a long lasting
XHR resquest.
This patch fix this by notifying the client that network activity is stopped when WebContent process is going to be suspended.
We also cache the networkRequestsInProgress state for suspended process, so that when it becomes foreground, we can tell
the client the correct state of network activity.
Reviewed by Dan Bernstein.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy): Initialize m_hasNetworkRequestsOnSuspended.
(WebKit::WebPageProxy::processWillBecomeSuspended): If there is pending requests on suspend, cache the network activity state
and notify the client.
(WebKit::WebPageProxy::processWillBecomeForground): Restore the network activity state when the process becomes foreground.
(WebKit::WebPageProxy::resetState):
* UIProcess/WebPageProxy.h: Add a data member m_hasNetworkRequestsOnSuspended to cache the network activity state on process
suspend.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::didSetAssertionState):
2015-07-01 Dean Jackson <dino@apple.com>
Disable the experimental WebGL2 implementation
https://bugs.webkit.org/show_bug.cgi?id=146526
<rdar://problem/21641235>
Reviewed by Myles Maxfield.
Add (and disable) an ENABLE_WEBGL2 flag.
* Configurations/FeatureDefines.xcconfig:
2015-07-01 Brady Eidson <beidson@apple.com>
Never try to pass URLs to LaunchServices when they're the same domain as the current URL.
<rdar://problem/20731429> and https://bugs.webkit.org/show_bug.cgi?id=146521
Reviewed by Alex Christensen.
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::tryAppLink): Compare the proposed URL to the current URL to see if theyre in the same domain.
(WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
2015-07-01 Tim Horton <timothy_horton@apple.com>
WKWebView snapshots have the wrong scale after rotation
https://bugs.webkit.org/show_bug.cgi?id=146476
<rdar://problem/18345247>
Reviewed by Anders Carlsson.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didCommitLayerTree:]):
"Coordinate" -> "Coordinates".
(-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
Defer any snapshotting that happens during a resize until after
the resize completes. This will ensure that (in the case of an IOSurface
snapshot) the tiles are up to date, and (in the case of a software snapshot)
that our understanding of the scale and scroll offset of the WKContentView
are up to date, so that we can correctly convert from view to content coordinates
in the UI process.
(-[WKWebView _endAnimatedResize]):
Perform the deferred snapshotting after the resize completes.
2015-07-01 Beth Dakin <bdakin@apple.com>
This is a quick follow-on to http://trac.webkit.org/changeset/186132
Rubber-stamped by Darin Adler.
Make this a one-liner.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getPositionInformation):
2015-07-01 Matthew Daiter <mdaiter@apple.com>
Enable MEDIA_STREAM flag
https://bugs.webkit.org/show_bug.cgi?id=145947
<rdar://problem/21365829>
Reviewed by Eric Carlson.
* Configurations/FeatureDefines.xcconfig: Add MEDIA_STREAM flag
* WebKit2.xcodeproj/project.pbxproj: Changed some project to private
declarations of headers
* WebProcess/WebCoreSupport/WebUserMediaClient.cpp:
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::userMediaPermissionRequestManager):
2015-07-01 Brady Eidson <beidson@apple.com>
Check shouldOpenExternalURLs instead of isProcessingUserGesture before passing URL to LaunchServices.
<rdar://problem/20577859> and https://bugs.webkit.org/show_bug.cgi?id=146513
Reviewed by Darin Adler.
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::tryAppLink): The expected value of isProcessingUserGesture is lost over redirects.
shouldOpenExternalURLs actually fits this role perfectly.
2015-07-01 Michael Catanzaro <mcatanzaro@igalia.com>
[GTK] [Wayland] Build broken with ENABLE_WAYLAND_TARGET=ON
https://bugs.webkit.org/show_bug.cgi?id=146512
Unreviewed, fix build with ENABLE_WAYLAND_TARGET=ON after r185949.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseCreateWebPage):
2015-06-30 Martin Robinson <mrobinson@igalia.com>
[GTK] REGRESSION(r183936): Test /webkit2/WebKitWebContext/spell-checker fails since r183936
https://bugs.webkit.org/show_bug.cgi?id=144828
Reviewed by Carlos Garcia Campos.
Instead of setting spell checking languages unconditionally when building int
developer mode, add some C API that allows setting them in WebKitTestRunner.
* PlatformGTK.cmake: Add the new C API file to the source list.
* UIProcess/API/C/gtk/WKTextCheckerGtk.cpp:
(WKTextCheckerSetSpellCheckingLanguages): Added this function which allows settings
the spell checking languages from the C API.
* UIProcess/API/C/gtk/WKTextCheckerGtk.h: Added.
* UIProcess/gtk/TextCheckerGtk.cpp:
(WebKit::enchantTextChecker): Remove the hack which sets the spell checking languages automatically
for development builds.
2015-07-01 Joseph Pecoraro <pecoraro@apple.com>
[Mac] Numerous CGColor leaks in swipe gestures
https://bugs.webkit.org/show_bug.cgi?id=146501
Reviewed by Tim Horton.
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
2015-07-01 Joseph Pecoraro <pecoraro@apple.com>
[Mac] Confusing RetainPtr use in TiledCoreAnimationDrawingArea
https://bugs.webkit.org/show_bug.cgi?id=146503
Reviewed by Tim Horton.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):
Simplify adoption into a new RetainPtr.
2015-06-30 Simon Fraser <simon.fraser@apple.com>
Fix CoordinatedGraphics.
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
(WebKit::CoordinatedLayerTreeHost::didFlushRootLayer):
2015-06-30 Simon Fraser <simon.fraser@apple.com>
More Gtk/EFL fixing.
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
(WebKit::CoordinatedLayerTreeHost::didFlushRootLayer):
* WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
(WebKit::LayerTreeHostGtk::flushPendingLayerChanges):
2015-06-30 Andy VanWagoner <thetalecrafter@gmail.com>
Implement ECMAScript Internationalization API
https://bugs.webkit.org/show_bug.cgi?id=90906
Reviewed by Benjamin Poulain.
* Configurations/FeatureDefines.xcconfig: add ENABLE_INTL flag
2015-06-30 Simon Fraser <simon.fraser@apple.com>
Fix Mac and Windows builds.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::flushLayers):
2015-06-30 Simon Fraser <simon.fraser@apple.com>
[iOS] Missing tiles inside position:fixed on scrolling
https://bugs.webkit.org/show_bug.cgi?id=146485
rdar://problem/21226861
Reviewed by Tim Horton.
Layer flushing adjusts the coverage rect for tiled layers, but does so at times
when position:fixed layers are moved around by the scrolling tree. The computed
coverage rect then doesn't reflect the layer's on-screen position, causing missing
tiles.
Fix by pushing the notion of being in a "stable state" onto FrameView, and passing
that state into the layer flush. When not in a stable state, flushing doesn't change
the visible and coverage rects for layers that are viewport-constrained.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::updateVisibleContentRects):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::flushLayers):
2015-06-30 Hyungwook Lee <hyungwook.lee@navercorp.com>
[EFL] Implement ewk_favicon_database_clear() API.
https://bugs.webkit.org/show_bug.cgi?id=146337
Reviewed by Gyuyoung Kim.
We need to provide way to clear favicon data.
* UIProcess/API/efl/ewk_favicon_database.cpp:
(EwkFaviconDatabase::getIconSurfaceSynchronously):
(EwkFaviconDatabase::clearFaviconDatabase):
(EwkFaviconDatabase::iconDataReadyForPageURL):
(ewk_favicon_database_icon_change_callback_del):
(ewk_favicon_database_clear):
* UIProcess/API/efl/ewk_favicon_database.h:
* UIProcess/API/efl/ewk_favicon_database_private.h:
* UIProcess/API/efl/tests/test_ewk2_favicon_database.cpp:
(TEST_F):
2015-06-30 Andreas Kling <akling@apple.com>
[iOS] Ignore viewport rect changes during zoom bouncing.
<https://webkit.org/b/146480>
Reviewed by Benjamin Poulain.
When the user has pinch-zoomed past the maximum zoom scale and lets go of the screen,
we animate a bounce back to the maximum scale.
Suppress viewport rect updates during this bounce animation since we don't need them
anyway. This fixes an issue where we'd sometimes get a weird rect during the animation
and if could send that to the web process, causing it to generate tiles for a part of
the page that's not actually exposed.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _updateVisibleContentRects]):
2015-06-30 Enrica Casucci <enrica@apple.com>
<rdar://problem/20655729> WebKit should heuristically exclude scrolling touch events from the user gesture category
Reviewed by Benjamin Poulain.
* Platform/spi/ios/UIKitSPI.h:
* Shared/WebEvent.h:
(WebKit::WebTouchEvent::WebTouchEvent):
(WebKit::WebTouchEvent::position):
(WebKit::WebTouchEvent::isPotentialTap):
(WebKit::WebTouchEvent::isGesture):
(WebKit::WebTouchEvent::gestureScale):
(WebKit::WebTouchEvent::gestureRotation):
* Shared/WebEventConversion.cpp:
(WebKit::WebKit2PlatformTouchEvent::WebKit2PlatformTouchEvent):
* Shared/ios/NativeWebTouchEventIOS.mm:
(WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
* Shared/ios/WebTouchEventIOS.cpp:
(WebKit::WebTouchEvent::encode):
(WebKit::WebTouchEvent::decode):
Pipe isPotentialTap through.
2015-06-30 Carlos Alberto Lopez Perez <clopez@igalia.com>
[GTK] [EFL] Unreviewed build fix after r186118.
Add if PLATFORM(COCOA) back.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::nonVisibleProcessCleanupTimerFired):
* WebProcess/WebProcess.h:
2015-06-30 Simon Fraser <simon.fraser@apple.com>
Crash under _layoutForNodeHighlight: when inspecting espn.com
https://bugs.webkit.org/show_bug.cgi?id=146422
Reviewed by Joseph Pecoraro.
When inspecting espn.com, MobileSafari sometimes crashes, because
highlight.quads is empty. I was not able to quickly determine why.
Fix by bailing in this case.
* UIProcess/WKInspectorHighlightView.mm:
(-[WKInspectorHighlightView _layoutForNodeHighlight:]):
2015-06-30 Matt Baker <mattbaker@apple.com>
Web Inspector: Reduce rendering frames "Other" time by instrumenting compositing
https://bugs.webkit.org/show_bug.cgi?id=146168
Reviewed by Brian Burg.
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::flushLayers):
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::flushLayers):
Added CA transaction post-commit handlers to instrument end of composite.
2015-06-30 Beth Dakin <bdakin@apple.com>
The bounds on InteractionInformationAtPosition should be more precise
https://bugs.webkit.org/show_bug.cgi?id=146468
-and corresponding-
rdar://problem/20739834
Reviewed by Enrica Casucci and Simon Fraser.
For links, get the TextQuads from the Range, and for images, look at the
absoluteContentQuad(). All other items can continue to use absoluteBoundingBox.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getPositionInformation):
2015-06-30 Anders Carlsson <andersca@apple.com>
Disable Spintracer when getting the list of plug-ins
https://bugs.webkit.org/show_bug.cgi?id=146467
rdar://problem/21616640
Reviewed by Tim Horton.
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::populatePluginCache):
2015-06-30 Anders Carlsson <andersca@apple.com>
Java Plugin cannot launch JavaUpdater.app after renaming
https://bugs.webkit.org/show_bug.cgi?id=146464
rdar://problem/19747153
Reviewed by Tim Horton.
Check for both "JavaUpdater.app" and "Java Updater.app".
* UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
(WebKit::isJavaUpdaterURL):
2015-06-30 Chris Dumez <cdumez@apple.com>
[WK2] Avoid taking a useless / blank navigation snapshot when navigating after restoring sessionState
https://bugs.webkit.org/show_bug.cgi?id=146446
<rdar://problem/21584231>
Reviewed by Darin Adler.
We currently take a useless / blank navigation snapshot when navigating
after restoring the back / forward list from a sessionState object.
This is because we get a current HistoryItem from the sessionState
which we have never really navigated to. We then take a navigation
snapshot for the current HistoryItem when navigating away as we usually
do. However, in this case, the HistoryItem was imported and there is
nothing to snapshot.
Taking this snapshot is not only wasteful, it can also potentially
overwrite the snapshot that was set by the client using
WKWebView._saveBackForwardSnapshotForItem() SPI.
To address the problem, this patch suppresses navigation snapshotting
after restoring the back / forward list from a session state and until
the next load is committed.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::recordNavigationSnapshot):
(WebKit::WebPageProxy::restoreFromSessionState):
(WebKit::WebPageProxy::didCommitLoadForFrame):
* UIProcess/WebPageProxy.h:
2015-06-29 Anders Carlsson <andersca@apple.com>
Get rid of unused WKSI functions
https://bugs.webkit.org/show_bug.cgi?id=146443
Reviewed by Tim Horton.
* UIProcess/API/Cocoa/WKWebView.mm:
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface): Deleted.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::nonVisibleProcessCleanupTimerFired):
* WebProcess/WebProcess.h:
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::destroyRenderingResources):
2015-06-29 Gyuyoung Kim <gyuyoung.kim@webkit.org>
[GTK] Unreviewed GTK build fix since r186088 and r186095.
https://bugs.webkit.org/show_bug.cgi?id=146449
* PlatformGTK.cmake:
* UIProcess/API/gtk/PageClientImpl.h:
2015-06-29 Gyuyoung Kim <gyuyoung.kim@webkit.org>
Unreviewed EFL build fix since r186088 and r186095.
* CMakeLists.txt: Remove ConnectionStack.cpp.
* UIProcess/CoordinatedGraphics/WebView.h: Override virtual didFailLoadForMainFrame().
2015-06-29 Brady Eidson <beidson@apple.com>
Flag sync XHRs from the network process so they can be handled appropriately.
<rdar://problem/21579162> and https://bugs.webkit.org/show_bug.cgi?id=146441
Reviewed by Darin Adler.
* NetworkProcess/NetworkResourceLoader.h:
(WebKit::NetworkResourceLoader::loadingSynchronousXHR): Return isSynchronous().
2015-06-29 Anders Carlsson <andersca@apple.com>
Remove an empty group from the Xcode project.
* WebKit2.xcodeproj/project.pbxproj:
2015-06-29 Anders Carlsson <andersca@apple.com>
Get rid of ConnectionStack
https://bugs.webkit.org/show_bug.cgi?id=146437
Reviewed by Andreas Kling.
Just use a TemporaryChange and a static variable instead.
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
* PluginProcess/WebProcessConnection.cpp:
(WebKit::WebProcessConnection::setGlobalException):
(WebKit::WebProcessConnection::didReceiveMessage):
(WebKit::WebProcessConnection::didReceiveSyncMessage):
* Shared/ConnectionStack.cpp: Removed.
(WebKit::ConnectionStack::singleton): Deleted.
* Shared/ConnectionStack.h: Removed.
(WebKit::ConnectionStack::current): Deleted.
(WebKit::ConnectionStack::CurrentConnectionPusher::CurrentConnectionPusher): Deleted.
(WebKit::ConnectionStack::CurrentConnectionPusher::~CurrentConnectionPusher): Deleted.
* WebKit2.xcodeproj/project.pbxproj:
2015-06-29 Tim Horton <timothy_horton@apple.com>
Fix the build.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didFailLoadForMainFrame]):
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::didFailLoadForMainFrame):
2015-06-29 Dean Jackson <dino@apple.com>
Temporarily disable PICTURE_SIZES
https://bugs.webkit.org/show_bug.cgi?id=146435
<rdar://problem/21087013>
Temporarily disable PICTURE_SIZES because it causes problems with out
of date <picture> polyfills.
Temporarily disable PICTURE_SIZES until Safari branches.
* Configurations/FeatureDefines.xcconfig:
2015-06-29 Anders Carlsson <andersca@apple.com>
Don't try to access a possibly deallocated WebFrameProxy object
https://bugs.webkit.org/show_bug.cgi?id=146428
rdar://problem/21446364
Reviewed by Tim Horton.
Make sure to call isMainFrame before calling out to the client inside
WebPageProxy::didFailLoadForFrame, matching what we do for WebPageProxy::didFinishLoadForFrame.
Also, add a ViewGestureController::didFailLoadForMainFrame function and call that instead of
calling didFinishLoadForMainFrame in the failure case.
* UIProcess/API/mac/WKView.mm:
(-[WKView _didFailLoadForMainFrame]):
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didFailLoadForFrame):
* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::mainFrameLoadDidReachTerminalState):
(WebKit::ViewGestureController::didFinishLoadForMainFrame): Deleted.
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::didFailLoadForMainFrame):
* UIProcess/mac/ViewGestureController.h:
(WebKit::ViewGestureController::didFinishLoadForMainFrame):
(WebKit::ViewGestureController::didFailLoadForMainFrame):
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::mainFrameLoadDidReachTerminalState):
(WebKit::ViewGestureController::didFinishLoadForMainFrame): Deleted.
2015-06-29 Yongjun Zhang <yongjun_zhang@apple.com>
Disable default gesture recognizers on preview.
https://bugs.webkit.org/show_bug.cgi?id=146424
rdar://problem/21572828
We should disable default gesture recognizers on preview, to avoid activating links or
triggering touch events accidentally. We can enable them after preview finishes.
Reviewed by Beth Dakin.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView willPresentPreviewViewController:forPosition:inSourceView:]):
(-[WKContentView didDismissPreviewViewController:committing:]):
2015-06-27 Ryosuke Niwa <rniwa@webkit.org>
Font panel doesn't get updated when bolding text via cmd+b in Mail on OS X
https://bugs.webkit.org/show_bug.cgi?id=146379
Reviewed by Darin Adler.
Since font panel doesn't open in WebKit2 at the moment, just add an empty implementation of didApplyStyle
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::didApplyStyle):
* WebProcess/WebCoreSupport/WebEditorClient.h:
* WebProcess/WebPage/WebPage.h:
2015-06-29 Dean Jackson <dino@apple.com>
Setting to enable/disable media controls sizing on page zoom
https://bugs.webkit.org/show_bug.cgi?id=146423
<rdar://problem/18379634>
Reviewed by Eric Carlson.
Add a new setting "MediaControlsScaleWithPageZoom" that can disable
the behaviour we currently implement on iOS, where the media controls
attempt to remain at a fixed size independent of page zoom.
* Shared/WebPreferencesDefinitions.h: Initialize to false on iOS, true otherwise.
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetMediaControlsScaleWithPageZoom):
(WKPreferencesGetMediaControlsScaleWithPageZoom):
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
2015-06-29 Chris Dumez <cdumez@apple.com>
[WK2][iOS] Swipe gesture snapshot stays up for 3 seconds when swiping back after top-hit navigation
https://bugs.webkit.org/show_bug.cgi?id=146415
<rdar://problem/21595801>
Reviewed by Tim Horton.
Swipe gesture snapshot previously stayed up for 3 seconds when swiping
back after a top-hit navigation. This is because we do not restore the
scroll position in this case and the ViewGestureController was waiting
for the scroll position to be restored before taking down the snapshot.
This patch adds a fail-safe mechanism so that the WebProcess can let
the UIProcess know (via a CouldNotRestorePageState IPC) that the page
state (including scroll position) could not be restored so that it can
let the ViewGestureController it should not wait for the scroll
position to be restored.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _couldNotRestorePageState]):
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::couldNotRestorePageState):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::couldNotRestorePageState):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::restorePageState):
2015-06-29 Chris Dumez <cdumez@apple.com>
[WK2][iOS] Add WKWebView private API to save a back/forward snapshot
https://bugs.webkit.org/show_bug.cgi?id=146398
<rdar://problem/21584231>
Reviewed by Dan Bernstein.
Add WKWebView private API to save a back/forward snapshot so that the
client can make sure a back/forward snapshot is available even when
swapping WKWebView upon navigation.
This matches the WKView.saveBackForwardSnapshotForItem API we have on
Mac.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView saveBackForwardSnapshotForItem:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
2015-06-29 Anders Carlsson <andersca@apple.com>
Use DISPATCH_SOURCE_TYPE_MEMORYPRESSURE instead of DISPATCH_SOURCE_TYPE_MEMORYSTATUS
https://bugs.webkit.org/show_bug.cgi?id=146413
Reviewed by Andreas Kling.
Replace SPI with API.
* UIProcess/ios/WebMemoryPressureHandlerIOS.mm:
(WebKit::WebMemoryPressureHandler::WebMemoryPressureHandler):
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface): Deleted.
2015-06-29 Enrica Casucci <enrica@apple.com>
[iOS] Hardware Keyboard: All combinations of arrow keys and space key do not scroll the view.
https://bugs.webkit.org/show_bug.cgi?id=146290
rdar://problem/18466015
We don't normally get called by the keyboard to handle the event if we are not
interacting with editable content. In order to receive all the hardware keyboard events
we need to implement _handleKeyUIEvent which is called for every key event
when the view is first responder. This gives us the opportunity to send each keystroke
to the WebProcess to let any Javascript handler intercept it and then perform the default
action for the key combination.
Unfortunately this mechanism does not provide key repeat, which is implemented in the
keyboard layer. In order to have it at least for the arrow keys, we use the keyCommands
mechanism only for those.
Reviewed by Darin Adler.
* Platform/spi/ios/UIKitSPI.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _scrollByOffset:]):
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView canPerformAction:withSender:]):
(-[WKContentView keyCommands]):
(-[WKContentView _arrowKey:]):
(-[WKContentView _handleKeyUIEvent:]):
(-[WKContentView handleKeyEvent:]):
(-[WKContentView handleKeyWebEvent:]):
(-[WKContentView _interpretKeyEvent:isCharEvent:]):
2015-06-28 Dan Bernstein <mitz@apple.com>
Fixed the iOS 8.x build after r186066.
* UIProcess/ios/WebVideoFullscreenManagerProxy.h:
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::create):
2015-06-28 Dan Bernstein <mitz@apple.com>
Fixed the iOS build after r186059.
* UIProcess/ios/WebVideoFullscreenManagerProxy.h:
2015-06-28 Chris Fleizach <cfleizach@apple.com>
AX: iOS: Crash at accessibilityObjectForMainFramePlugin()
https://bugs.webkit.org/show_bug.cgi?id=146399
Reviewed by Darin Adler.
Could not reproduce issue, but the invalid address seems to indicate this is a nullptr access is happening when we try to get the plugin of the m_page variable when
it has not been initialized.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::accessibilityObjectForMainFramePlugin):
2015-06-28 Gyuyoung Kim <gyuyoung.kim@webkit.org>
Use Ref/RefPtr instead of PassRefPtr in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=146190
Reviewed by Darin Adler.
As a step to remove PassRefPtr, this patch reduces use of PassRefPtr in WebKit2.
* Shared/API/c/WKContextMenuItem.cpp:
(WKContextMenuItemCreateAsAction):
(WKContextMenuItemCreateAsCheckableAction):
* Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp:
(WebKit::WebCoordinatedSurface::create):
* Shared/CoordinatedGraphics/WebCoordinatedSurface.h:
* Shared/CoordinatedGraphics/threadedcompositor/ThreadSafeCoordinatedSurface.cpp:
(WebKit::ThreadSafeCoordinatedSurface::create):
* Shared/CoordinatedGraphics/threadedcompositor/ThreadSafeCoordinatedSurface.h:
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
(WebKit::ThreadedCompositor::create):
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
* Shared/Plugins/NPRemoteObjectMap.cpp:
(WebKit::NPRemoteObjectMap::create):
* Shared/Plugins/NPRemoteObjectMap.h:
* Shared/WebBatteryStatus.h:
(WebKit::WebBatteryStatus::create):
* Shared/WebCertificateInfo.h:
(WebKit::WebCertificateInfo::create):
* Shared/WebContextMenuItem.h:
(WebKit::WebContextMenuItem::create):
* Shared/WebRenderObject.cpp:
(WebKit::WebRenderObject::create):
* Shared/WebRenderObject.h:
(WebKit::WebRenderObject::create):
* UIProcess/API/APINavigationData.h:
(API::NavigationData::create):
* UIProcess/API/APISession.cpp:
(API::Session::createEphemeral):
* UIProcess/API/APISession.h:
* UIProcess/API/APISessionState.cpp:
(API::SessionState::create):
* UIProcess/API/APISessionState.h:
* UIProcess/API/APIUserScript.h:
* UIProcess/API/APIWebsiteDataStore.cpp:
(API::WebsiteDataStore::createNonPersistentDataStore):
(API::WebsiteDataStore::create):
* UIProcess/API/APIWebsiteDataStore.h:
* UIProcess/API/C/WKCredential.cpp:
(WKCredentialCreate):
(WKCredentialCreateWithCertificateInfo):
* UIProcess/API/C/WKPage.cpp:
(WKPageCopySessionState):
(WKPageSetPageContextMenuClient):
* UIProcess/API/C/WKSessionStateRef.cpp:
(WKSessionStateCreateFromData):
* UIProcess/API/C/WKUserScriptRef.cpp:
(WKUserScriptCreateWithSource):
* UIProcess/API/Cocoa/WKNSURLAuthenticationChallenge.mm:
(-[WKNSURLAuthenticationChallengeSender useCredential:forAuthenticationChallenge:]):
* UIProcess/API/Cocoa/WKProcessGroup.mm:
(-[WKProcessGroup _setAllowsSpecificHTTPSCertificate:forHost:]):
* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _setAllowsSpecificHTTPSCertificate:forHost:]):
* UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
(+[WKWebsiteDataStore nonPersistentDataStore]):
* UIProcess/API/efl/ewk_auth_request_private.h:
(EwkAuthRequest::create):
* UIProcess/API/efl/ewk_back_forward_list_item_private.h:
(EwkBackForwardListItem::create):
* UIProcess/API/efl/ewk_context.cpp:
(EwkContext::create):
* UIProcess/API/efl/ewk_context_menu_private.h:
(EwkContextMenu::create):
* UIProcess/API/efl/ewk_download_job_private.h:
(EwkDownloadJob::create):
* UIProcess/API/efl/ewk_file_chooser_request_private.h:
(EwkFileChooserRequest::create):
* UIProcess/API/efl/ewk_form_submission_request_private.h:
(EwkFormSubmissionRequest::create):
* UIProcess/API/efl/ewk_navigation_data_private.h:
(EwkNavigationData::create):
* UIProcess/API/efl/ewk_security_origin_private.h:
(EwkSecurityOrigin::create):
* UIProcess/Authentication/AuthenticationChallengeProxy.h:
(WebKit::AuthenticationChallengeProxy::create):
* UIProcess/Authentication/AuthenticationDecisionListener.h:
(WebKit::AuthenticationDecisionListener::create):
* UIProcess/Authentication/WebCredential.h:
(WebKit::WebCredential::create):
* UIProcess/Authentication/WebProtectionSpace.h:
(WebKit::WebProtectionSpace::create):
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::HistoryClient::didNavigateWithNavigationData):
* UIProcess/Databases/DatabaseProcessProxy.cpp:
(WebKit::DatabaseProcessProxy::create):
* UIProcess/Databases/DatabaseProcessProxy.h:
* UIProcess/Launcher/ProcessLauncher.h:
(WebKit::ProcessLauncher::create):
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
* UIProcess/Notifications/WebNotificationManagerProxy.cpp:
(WebKit::WebNotificationManagerProxy::create):
* UIProcess/Notifications/WebNotificationManagerProxy.h:
* UIProcess/Plugins/PluginProcessProxy.cpp:
(WebKit::PluginProcessProxy::create):
* UIProcess/Plugins/PluginProcessProxy.h:
* UIProcess/Scrolling/RemoteScrollingTree.cpp:
(WebKit::RemoteScrollingTree::create):
* UIProcess/Scrolling/RemoteScrollingTree.h:
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::create):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::WebProcessPool):
* UIProcess/efl/WebPopupMenuListenerEfl.h:
(WebKit::WebPopupMenuListenerEfl::create):
* UIProcess/efl/WebViewEfl.cpp:
(WebKit::WebView::create):
* UIProcess/ios/WebVideoFullscreenManagerProxy.h:
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::create):
2015-06-28 Dan Bernstein <mitz@apple.com>
[Cocoa] Remove _WKSecurityOrigin.{h,mm}
https://bugs.webkit.org/show_bug.cgi?id=146402
Reviewed by Sam Weinig.
* UIProcess/API/Cocoa/WKSecurityOrigin.mm: Declare and define _WKSecurityOrigin here.
(-[WKSecurityOrigin methodSignatureForSelector:]): Moved into a WKBinaryCompatibility
category.
(-[WKSecurityOrigin forwardInvocation:]): Ditto.
* UIProcess/API/Cocoa/_WKSecurityOrigin.h: Removed.
* UIProcess/API/Cocoa/_WKSecurityOrigin.mm: Removed.
* WebKit2.xcodeproj/project.pbxproj: Removed references to _WKSecurityOrigin.{h,mm}.
2015-06-28 Dan Bernstein <mitz@apple.com>
Tried to fix the EFL buid after r186046.
* UIProcess/efl/PageUIClientEfl.cpp:
(WebKit::PageUIClientEfl::PageUIClientEfl):
2015-06-28 Dan Bernstein <mitz@apple.com>
<rdar://problem/21581792> REGRESSION (r185915): Source-incompatible change in WKPageUIClient
https://bugs.webkit.org/show_bug.cgi?id=146396
Reviewed by Anders Carlsson.
* UIProcess/API/C/WKPageUIClient.h: Renamed
runJavaScript{Alert,Confirm,Prompt}_deprecatedForUseWithV0 back to runJavaScript{Alert,Confirm,Prompt}
in client versions prior to V5.
2015-06-28 Tim Horton <timothy_horton@apple.com>
REGRESSION: Page footers are displayed above the bottom of the WebView due to tiled scaling
https://bugs.webkit.org/show_bug.cgi?id=146393
<rdar://problem/21113217>
Reviewed by Sam Weinig.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded):
Don't include the top content inset in the layout size.
2015-06-26 Antti Koivisto <antti@apple.com>
Make NetworkCache::traverse faster
https://bugs.webkit.org/show_bug.cgi?id=146354
Reviewed by Anders Carlsson.
* NetworkProcess/cache/NetworkCacheIOChannel.h:
(WebKit::NetworkCache::IOChannel::path):
(WebKit::NetworkCache::IOChannel::type):
* NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
(WebKit::NetworkCache::IOChannel::open):
(WebKit::NetworkCache::IOChannel::read):
(WebKit::NetworkCache::IOChannel::write):
(WebKit::NetworkCache::IOChannel::readSync): Deleted.
Not needed anymore.
* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::Storage::WriteOperation::WriteOperation):
(WebKit::NetworkCache::Storage::TraverseOperation::TraverseOperation):
Add TraverseOperation, similar to Read/Write.
(WebKit::NetworkCache::Storage::open):
(WebKit::NetworkCache::Storage::traverse):
Use async I/O.
Use condition variable to allow maximum 5 parallel file reads.
* NetworkProcess/cache/NetworkCacheStorage.h:
2015-06-27 Carlos Garcia Campos <cgarcia@igalia.com>
[SOUP] NetworkCache: Make NetworkProcess::clearDiskCache actually clear the the resources depending on the date
https://bugs.webkit.org/show_bug.cgi?id=146316
Reviewed by Sergio Villar Senin.
And make sure the completion handler is called, as well. This
functionality is already implemented in Storage::clear(), so we
just need to pass the time point and completion handler to Cache::clear().
* NetworkProcess/soup/NetworkProcessSoup.cpp:
(WebKit::NetworkProcess::clearDiskCache):
2015-06-26 Beth Dakin <bdakin@apple.com>
Rubber-stamped by Tim Horton.
As Dan pointed out in https://bugs.webkit.org/show_bug.cgi?id=146350 , this way of
getting the screen size was problematic on multiple counts. Fixed here by using
UIScreen.
* UIProcess/WKImagePreviewViewController.mm:
(-[WKImagePreviewViewController initWithCGImage:]):
2015-06-26 Beth Dakin <bdakin@apple.com>
WebPage::getPositionInformation() should not copy an image that is larger than the
screen
https://bugs.webkit.org/show_bug.cgi?id=146367
Reviewed by Tim Horton.
Maintain aspectRatio, but scale down the buffer size if the image is larger than
the screen.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getPositionInformation):
2015-06-26 Mark Lam <mark.lam@apple.com>
Re-instating the #import and assertion removed in r186014.
https://bugs.webkit.org/show_bug.cgi?id=146358
Not reviewed.
* UIProcess/API/Cocoa/WKUserContentController.mm:
- Speculative fix: should have used <wtf/MainThread.h> instead of <WTF/MainThread.h>.
2015-06-26 Mark Lam <mark.lam@apple.com>
Gardening: remove an assertion and a #import to green the bot.
https://bugs.webkit.org/show_bug.cgi?id=146358
Not reviewed.
* UIProcess/API/Cocoa/WKUserContentController.mm:
- Not sure why the <WTF/MainThread.h> cannot be found on some bots, but I'm
removing it (and the assertion that needed it) for now while I investigate
further.
2015-06-26 Mark Lam <mark.lam@apple.com>
ScriptMessageHandlerDelegate::didPostMessage() should reuse its JSContext instance.
https://bugs.webkit.org/show_bug.cgi?id=146358
Reviewed by Anders Carlsson.
Currently, ScriptMessageHandlerDelegate::didPostMessage() creates a new JSContext each
time it is called. This JSContext is used only once to deserialized a JSON object
and then destroyed. We will change ScriptMessageHandlerDelegate to cache the JSContext
and reuse it in all subsequent calls to didPostMessage().
Also added a @autoreleasepool scope in didPostMessage() so that transient ObjC objects
will be release sooner.
* UIProcess/API/Cocoa/WKUserContentController.mm:
2015-06-26 Beth Dakin <bdakin@apple.com>
Add support for image previews
https://bugs.webkit.org/show_bug.cgi?id=146350
-and corresponding-
rdar://problem/20640234
Reviewed by Tim Horton.
For images, use the actual image instead of a snapshot.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getPositionInformation):
ViewController for image preview.
* UIProcess/WKImagePreviewViewController.h: Added.
* UIProcess/WKImagePreviewViewController.mm: Added.
(-[WKImagePreviewViewController loadView]):
(-[WKImagePreviewViewController initWithCGImage:]):
(-[WKImagePreviewViewController viewDidLayoutSubviews]):
(_scaleSizeWithinSize):
New enum and member variable to keep track of preview type.
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
Only apply the http restriction to non-image links since we can still preview the
image of a non-http image link.
(-[WKContentView gestureRecognizerShouldBegin:]):
Handle links and images.
(-[WKContentView previewViewControllerForPosition:inSourceView:]):
Return early for non-link previews.
(-[WKContentView commitPreviewViewController:]):
New files.
* WebKit2.xcodeproj/project.pbxproj:
Just use the actual image in the PositionInformation for image elements rather
than taking a screen shot.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getPositionInformation):
2015-06-26 Matt Rajca <mrajca@apple.com>
Wireless Playback Target-related #import should be a #include
https://bugs.webkit.org/show_bug.cgi?id=146283
Reviewed by Eric Carlson.
* Shared/WebCoreArgumentCoders.cpp:
2015-06-25 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Add Support for OS X Full Screen Mode
https://bugs.webkit.org/show_bug.cgi?id=123510
Reviewed by Timothy Hatcher.
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::createInspectorWindow):
Allow full screen.
2015-06-25 Hyungwook Lee <hyungwook.lee@navercorp.com>
[EFL] Make send / receive messages to communicate the Web and UI Processes using Injected Bundle.
https://bugs.webkit.org/show_bug.cgi?id=145685
Reviewed by Gyuyoung Kim.
To have extensible port specific API facility using Injected Bundle,
we need to load libewebkit_extension_manager.so in default that is same as what gtk port does.
* UIProcess/API/efl/ewk_context.cpp:
(EwkContext::EwkContext):
(EwkContext::findOrCreateWrapper):
(bundlePathForExtension):
(EwkContext::create):
(EwkContext::allowSpecificHTTPSCertificateForHost):
(EwkContext::isDefaultBundle):
(ewk_context_default_get):
* UIProcess/API/efl/ewk_context_private.h:
* WebProcess/efl/ExtensionManagerEfl.cpp:
(WebKit::ExtensionManagerEfl::initialize):
2015-06-25 Simon Fraser <simon.fraser@apple.com>
[iOS WK2] Swiping back just after scrolling can cause some tiles to disappear
https://bugs.webkit.org/show_bug.cgi?id=146329
rdar://problem/21233010
Reviewed by Tim Horton.
When doing a back swipe, views interposed between the WKWebView and the WKContentView
get positions and animations for the swipe. This -_updateVisibleContentRects to
compute bad visible and unobscured rects, so we lose tiles.
Fix by "freezing" the visible and unobscured content rects in the view being
swiped for the duration of the navigation gesture. When swiping the main view,
we just plumb through navigationGestureDidEnd(). When Reader is showing and the
swiped view is different from the navigating view, use the new navigationGestureDidEnd()
override which takes no arguments.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _updateVisibleContentRects]):
(-[WKWebView _navigationGestureDidBegin]):
(-[WKWebView _navigationGestureDidEnd]):
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::navigationGestureDidEnd):
* UIProcess/API/gtk/PageClientImpl.h:
* UIProcess/CoordinatedGraphics/WebView.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::navigationGestureDidEnd):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::navigationGestureDidBegin):
(WebKit::PageClientImpl::navigationGestureDidEnd):
* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
(WebKit::ViewGestureController::endSwipeGesture):
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::navigationGestureDidEnd):
2015-06-25 Joseph Pecoraro <pecoraro@apple.com>
[Mac] Web Inspector: Window dragging on toolbar should behave more like native window dragging
https://bugs.webkit.org/show_bug.cgi?id=146324
Reviewed by Timothy Hatcher.
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView _startWindowDrag]):
Add a way to start a window drag from a WKView using the most
recent mouse down event.
* WebProcess/WebPage/WebInspectorUI.h:
* WebProcess/WebPage/WebInspectorUI.cpp:
(WebKit::WebInspectorUI::startWindowDrag):
Send a message that we should start a window drag.
* UIProcess/WebInspectorProxy.messages.in:
* UIProcess/WebInspectorProxy.h:
* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::startWindowDrag):
(WebKit::WebInspectorProxy::platformStartWindowDrag):
* UIProcess/efl/WebInspectorProxyEfl.cpp:
(WebKit::WebInspectorProxy::platformStartWindowDrag):
* UIProcess/gtk/WebInspectorProxyGtk.cpp:
(WebKit::WebInspectorProxy::platformStartWindowDrag):
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformStartWindowDrag):
Let the platform start a window drag. Only implemented by Mac.
2015-06-25 Tim Horton <timothy_horton@apple.com>
[iOS] When using the back swipe gesture in Safari, the previous webpage will flash for a second
https://bugs.webkit.org/show_bug.cgi?id=146326
<rdar://problem/17811304>
Reviewed by Dean Jackson.
* UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::hideContentUntilPendingUpdate):
(WebKit::DrawingAreaProxy::hideContentUntilAnyUpdate):
(WebKit::DrawingAreaProxy::hideContentUntilNextUpdate): Deleted.
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
(WebKit::RemoteLayerTreeDrawingAreaProxy::hideContentUntilPendingUpdate):
(WebKit::RemoteLayerTreeDrawingAreaProxy::hideContentUntilAnyUpdate):
(WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy): Deleted.
(WebKit::RemoteLayerTreeDrawingAreaProxy::hideContentUntilNextUpdate): Deleted.
Make it possible to distinguish between hiding the content until *any* commit
comes in (for example, when we're coming back from being suspended and don't want
to show anything until we are sure all the layers are valid) and hiding the content
until the currently pending commit corresponding to the current state in the UI process
has arrived (which is what we want when e.g. hiding content after a gesture navigation
and not showing it until the commit including the navigation lands).
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _hideContentUntilNextUpdate]):
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _applicationWillEnterForeground]):
Make use of "hideContentUntilAnyUpdate".
* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::endSwipeGesture):
Make use of "hideContentUntilPendingUpdate".
2015-06-25 Tim Horton <timothy_horton@apple.com>
Viewport units are wrong when scaled in 2-up mode, cause content to hop around on apple.com/music
https://bugs.webkit.org/show_bug.cgi?id=146322
<rdar://problem/21413884>
Reviewed by Simon Fraser.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded):
Inflate the fixed layout height (by the viewScale) so that it's the size of the view.
2015-06-25 Chris Dumez <cdumez@apple.com>
[WK2][iOS] Drop WebKitNetworkCacheTemporarilyDisabledForTesting NSUserDefaults
https://bugs.webkit.org/show_bug.cgi?id=146323
<rdar://problem/21552370>
Reviewed by Antti Koivisto.
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::isNetworkCacheEnabled):
2015-06-25 Tim Horton <timothy_horton@apple.com>
Crash in ViewGestureController::didRestoreScrollPosition() running WKWebView.LoadAlternateHTMLStringFromProvisionalLoadError test
https://bugs.webkit.org/show_bug.cgi?id=146309
<rdar://problem/21476651>
Reviewed by Dan Bernstein.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didCommitLayerTree:]):
Null-check. _gestureController can be null if allowsBackForwardNavigationGestures is NO.
2015-06-25 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add initial WebKitWebsiteDataManager API for process configuration options
https://bugs.webkit.org/show_bug.cgi?id=146149
Reviewed by Sergio Villar Senin.
Add WebKitWebsiteDataManager to replace the different ways we have
to configure data store
directories. WebKitWebContext:indexed-db-directory property has
been removed, since it was added only in trunk, and
WebKitWebContext:local-storage-directory has been deprecated. The
method webkit_web_context_set_disk_cache_directory() has been
deprecated too in favor of WebKitWebsiteDataManager.
* PlatformGTK.cmake: Add new files to compilation.
* UIProcess/API/gtk/WebKitPrivate.h: Move networkCacheSubdirectory
definition here.
* UIProcess/API/gtk/WebKitWebContext.cpp:
(webkitWebContextGetProperty): Replace indexed-db-directory getter
with website-data-manager one.
(webkitWebContextSetProperty): Replace indexed-db-directory setter
with website-data-manager one.
(webkitWebContextConstructed): Use the user provided
WebKitWebsiteDataManager to configure the context or create a
default WebKitWebsiteDataManager if not provided.
(webkit_web_context_class_init): Replace indexed-db-directory
property with website-data-manager.
(webkit_web_context_new_with_website_data_manager):
(webkit_web_context_get_website_data_manager):
(webkitWebContextCreatePageForWebView): Get the WebsiteDataStore
from the WebKitWebsiteDataManager.
* UIProcess/API/gtk/WebKitWebContext.h:
* UIProcess/API/gtk/WebKitWebsiteDataManager.cpp: Added.
(webkitWebsiteDataManagerGetProperty):
(webkitWebsiteDataManagerSetProperty):
(webkit_website_data_manager_class_init):
(webkitWebsiteDataManagerCreate):
(webkitWebsiteDataManagerGetDataStore):
(webkit_website_data_manager_new):
(webkit_website_data_manager_get_local_storage_directory):
(webkit_website_data_manager_get_disk_cache_directory):
(webkit_website_data_manager_get_offline_application_cache_directory):
(webkit_website_data_manager_get_indexeddb_directory):
(webkit_website_data_manager_get_websql_directory):
* UIProcess/API/gtk/WebKitWebsiteDataManager.h: Added.
* UIProcess/API/gtk/WebKitWebsiteDataManagerPrivate.h: Added.
* UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: Add new symbols.
* UIProcess/API/gtk/docs/webkit2gtk-4.0.types: Add webkit_website_data_manager_get_type.
* UIProcess/API/gtk/webkit2.h: Include WebKitWebsiteDataManager.h.
2015-06-25 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Do not use legacy data store options in WebKit2 GTK+ API
https://bugs.webkit.org/show_bug.cgi?id=146145
Reviewed by Gustavo Noronha Silva.
Use a custom WebsiteDataStore in WebKitWebContext, configured with
the context options, and passed to every page created. This is in
preparation for exposing WebsiteDataStore in the public API.
* PlatformGTK.cmake: Add APIWebsiteDataStore.cpp to compilation.
* UIProcess/API/APIWebsiteDataStore.cpp:
* UIProcess/API/gtk/APIWebsiteDataStoreGtk.cpp:
(API::WebsiteDataStore::defaultApplicationCacheDirectory):
(API::WebsiteDataStore::defaultNetworkCacheDirectory):
(API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory):
(API::WebsiteDataStore::defaultLocalStorageDirectory):
(API::WebsiteDataStore::defaultMediaKeysStorageDirectory):
(API::WebsiteDataStore::defaultWebSQLDatabaseDirectory):
(API::WebsiteDataStore::cacheDirectoryFileSystemRepresentation):
(API::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation):
(API::WebsiteDataStore::defaultDataStoreConfiguration):
* UIProcess/API/gtk/WebKitWebContext.cpp:
(websiteDataStoreConfigurationForWebProcessPoolConfiguration):
Helper function to create the WebsiteDataStore configuration with
the WebProcessPool configuration options.
(webkitWebContextConstructed): Do not create a
WebProcessPoolConfiguration with legacy options and create a WebsiteDataStore.
(webkitWebContextCreatePageForWebView): Set the WebsiteDataStore
and session ID in web page configuration.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseCreate): Create a WebPageConfiguration for the
given options and pass it to webkitWebViewBaseCreateWebPage.
(webkitWebViewBaseCreateWebPage): It receives now a
WebPageConfiguration, instead of creating it based on the given parameters.
* UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
* UIProcess/gtk/WebProcessPoolGtk.cpp: Use WebsiteDataStore default configuration.
(WebKit::WebProcessPool::legacyPlatformDefaultApplicationCacheDirectory):
(WebKit::WebProcessPool::legacyPlatformDefaultWebSQLDatabaseDirectory):
(WebKit::WebProcessPool::legacyPlatformDefaultIndexedDBDatabaseDirectory):
(WebKit::WebProcessPool::legacyPlatformDefaultLocalStorageDirectory):
(WebKit::WebProcessPool::legacyPlatformDefaultMediaKeysStorageDirectory):
(WebKit::WebProcessPool::legacyPlatformDefaultNetworkCacheDirectory):
2015-06-24 Anders Carlsson <andersca@apple.com>
Detect view services by using the "com.apple.UIKit.vends-view-services" entitlement
https://bugs.webkit.org/show_bug.cgi?id=146301
Reviewed by Tim Horton.
* UIProcess/ApplicationStateTracker.mm:
(WebKit::hasEntitlement):
(WebKit::isViewService):
2015-06-24 Anders Carlsson <andersca@apple.com>
WebContent process is unreponsive/idle when WKWebView is inside a view service.
https://bugs.webkit.org/show_bug.cgi?id=146296
Reviewed by Tim Horton.
* Platform/spi/ios/AssertionServicesSPI.h: Renamed from Source/WebKit2/Platform/spi/ios/BKSProcessAssertionSPI.h.
Rename this and add SPI for BKSApplicationStateMonitor.
* Platform/spi/ios/UIKitSPI.h:
Add _UIApplicationIsExtension SPI.
* UIProcess/ApplicationStateTracker.mm:
(WebKit::isViewService):
Return whether we're an extension or the safari view controller service.
(WebKit::isBackgroundState):
Helper function that returns whether a given BKSApplicationState is a background state.
(WebKit::ApplicationStateTracker::ApplicationStateTracker):
If we're a view service, create a BKSApplicationStateMonitor and listen for state changes for our pid.
* UIProcess/ios/ProcessAssertionIOS.mm:
Update #import.
* WebKit2.xcodeproj/project.pbxproj:
Update for rename.
2015-06-24 Matt Rajca <mrajca@apple.com>
MediaSession: propagate MediaSessionMetadata to WebPageProxy
https://bugs.webkit.org/show_bug.cgi?id=146282
Reviewed by Darin Adler and Tim Horton.
* Shared/WebCoreArgumentCoders.cpp: Added ArgumentEncoder support for MediaSessionMetadata so we can send it
through the web page proxy.
(IPC::ArgumentCoder<MediaSessionMetadata>::encode):
(IPC::ArgumentCoder<MediaSessionMetadata>::decode):
* Shared/WebCoreArgumentCoders.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::mediaSessionMetadataDidChange):
* UIProcess/WebPageProxy.h: Receive mediaSessionMetadataDidChange in the web page proxy.
* UIProcess/WebPageProxy.messages.in: Added a new MediaSessionMetadataDidChange message.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::mediaSessionMetadataDidChange): Push a mediaSessionMetadataDidChange message through the web page proxy.
* WebProcess/WebCoreSupport/WebChromeClient.h:
2015-06-24 Said Abou-Hallawa <sabouhallawa@apple.com>
[Mac] A checkmark is briefly visible next to the webpage context menu items when they're clicked
https://bugs.webkit.org/show_bug.cgi?id=146284
<rdar://problem/20297182>
Reviewed by Darin Adler.
The default value of [NSPopUpButtonCell altersStateOfSelectedItem] is YES.
This makes the popup menu items checkable by default. We need to change the
value of this attribute to NO when creating the popup menu, so the items
are uncheckable. The value of this property needs to change back to YES
if context menu is about selecting an option and not executing a command.
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::populate):
2015-06-24 Brady Eidson <beidson@apple.com>
Update JavaScript dialog delegates to include a WKSecurityOriginRef argument.
<rdar://problem/21269187> and https://bugs.webkit.org/show_bug.cgi?id=146249
Reviewed by Alex Christensen.
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageUIClient): Call the new signature if the client has it set.
Otherwise fall back to the old signature.
* UIProcess/API/C/WKPageUIClient.h: Deprecate the old method signature, and add the new
one to the newest V5 client structure.
2015-06-24 Ryuan Choi <ryuan.choi@navercorp.com>
Remove some dead code from Download
https://bugs.webkit.org/show_bug.cgi?id=146268
Reviewed by Darin Adler.
retrieveDestinationWithSuggestedFilename() was introduced for DownloadCFNetWin.cpp since r77585.
didDecideDestination and others are also introduced for WebKit2 Windows port since r77055.
Since WebKit2 Windows port is dropped, no one uses them now.
* Shared/Downloads/Download.cpp:
(WebKit::Download::decideDestinationWithSuggestedFilename):
(WebKit::Download::retrieveDestinationWithSuggestedFilename): Deleted.
* Shared/Downloads/Download.h:
(WebKit::Download::destination): Deleted.
* Shared/Downloads/ios/DownloadIOS.mm:
(WebKit::Download::didDecideDestination): Deleted.
* Shared/Downloads/mac/DownloadMac.mm:
(WebKit::Download::didDecideDestination): Deleted.
* Shared/Downloads/soup/DownloadSoup.cpp:
(WebKit::Download::didDecideDestination): Deleted.
2015-06-23 Anders Carlsson <andersca@apple.com>
Fix build.
* UIProcess/ios/ProcessAssertionIOS.mm:
(-[WKProcessAssertionBackgroundTaskManager init]):
2015-06-23 Michael Catanzaro <mcatanzaro@igalia.com>
[GTK] Crash performing drag-and-drop
https://bugs.webkit.org/show_bug.cgi?id=146267
Reviewed by Darin Adler.
Return early if gtk_get_current_event() returns null to avoid a crash. Note that this does
not fix drag-and-drop. Note also this prevents the web process from forcing the UI process
to crash by sending fake startDrag messages.
* UIProcess/gtk/DragAndDropHandler.cpp:
(WebKit::DragAndDropHandler::startDrag):
2015-06-23 Anders Carlsson <andersca@apple.com>
Add a class that tracks whether we're a background or foreground application
https://bugs.webkit.org/show_bug.cgi?id=146259
rdar://problem/19833808
Reviewed by Darin Adler.
First step towards being able to send out these notifications for view services.
* UIProcess/ApplicationStateTracker.h: Added.
(WebKit::ApplicationStateTracker::isInBackground):
* UIProcess/ApplicationStateTracker.mm: Added.
(WebKit::ApplicationStateTracker::singleton):
(WebKit::ApplicationStateTracker::ApplicationStateTracker):
(WebKit::ApplicationStateTracker::addListener):
(WebKit::ApplicationStateTracker::applicationDidEnterBackground):
(WebKit::ApplicationStateTracker::applicationWillEnterForeground):
(WebKit::ApplicationStateTracker::invokeListeners):
(WebKit::ApplicationStateTracker::pruneListeners):
* UIProcess/ios/ProcessAssertionIOS.mm:
(-[WKProcessAssertionBackgroundTaskManager init]):
(-[WKProcessAssertionBackgroundTaskManager _updateBackgroundTask]):
(-[WKProcessAssertionBackgroundTaskManager _applicationWillEnterForeground]):
(-[WKProcessAssertionBackgroundTaskManager _applicationDidEnterBackground]):
(-[WKProcessAssertionBackgroundTaskManager dealloc]): Deleted.
(-[WKProcessAssertionBackgroundTaskManager _applicationWillEnterForeground:]): Deleted.
(-[WKProcessAssertionBackgroundTaskManager _applicationDidEnterBackground:]): Deleted.
* UIProcess/ios/WKContentView.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _commonInitializationWithProcessPool:configuration:]):
(-[WKContentView isBackground]):
(-[WKContentView _applicationDidEnterBackground]):
(-[WKContentView _applicationWillEnterForeground]):
(-[WKContentView _applicationDidEnterBackground:]): Deleted.
(-[WKContentView _applicationWillEnterForeground:]): Deleted.
* WebKit2.xcodeproj/project.pbxproj:
2015-06-23 Anders Carlsson <andersca@apple.com>
Remove windowResizerRect code, nobody is using it anymore
https://bugs.webkit.org/show_bug.cgi?id=146265
Reviewed by Beth Dakin.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::windowResizerRect): Deleted.
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::windowResizerRect): Deleted.
* WebProcess/WebPage/WebPage.h:
2015-06-23 Dan Bernstein <mitz@apple.com>
Restore binary compatibility with iOS 8 Safari after r185877
https://bugs.webkit.org/show_bug.cgi?id=146263
Reviewed by Anders Carlsson.
* Platform/spi/Cocoa: Added.
* Platform/spi/Cocoa/NSInvocationSPI.h: Added.
* UIProcess/API/Cocoa/WKSecurityOrigin.mm:
(-[WKSecurityOrigin methodSignatureForSelector:]): Override to check _WKSecurityOrigin for
possible category methods with the specified selector.
(-[WKSecurityOrigin forwardInvocation:]): Invoke using the implementation of the
_WKSecurityOrigin category method.
* WebKit2.xcodeproj/project.pbxproj:
2015-06-23 Anders Carlsson <andersca@apple.com>
Add operator! and copy/move constructors to WeakObjCPtr
https://bugs.webkit.org/show_bug.cgi?id=146255
Reviewed by Andreas Kling.
* Shared/mac/WeakObjCPtr.h:
(WebKit::WeakObjCPtr::WeakObjCPtr):
(WebKit::WeakObjCPtr::operator!):
2015-06-23 Antti Koivisto <antti@apple.com>
CrashTracer: com.apple.WebKit.Networking at JavaScriptCore: WTF::String::isolatedCopy const &
https://bugs.webkit.org/show_bug.cgi?id=146236
rdar://problem/21380700
Reviewed by Andreas Kling.
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::clear):
Don't crash if this is called with network cache disabled.
2015-06-23 Simon Fraser <simon.fraser@apple.com>
Expose some more rendering progress events, and have MiniBrowser log for each of them
https://bugs.webkit.org/show_bug.cgi?id=146227
Reviewed by Darin Adler.
Add _WKRenderingProgressEventFirstLayoutAfterSuppressedIncrementalRendering and
_WKRenderingProgressEventFirstPaintAfterSuppressedIncrementalRendering to the private
header, and convert them to/from WebCore milestones.
* Shared/API/Cocoa/_WKRenderingProgressEvents.h:
* Shared/API/Cocoa/_WKRenderingProgressEventsInternal.h:
(renderingProgressEvents):
* UIProcess/API/Cocoa/WKWebView.mm:
(layoutMilestones):
2015-06-23 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix GTK+ build after r185876 and r185877.
* UIProcess/API/gtk/WebKitUIClient.cpp:
* UIProcess/API/gtk/WebKitUserContentManager.cpp:
* UIProcess/API/gtk/WebKitWebView.cpp:
2015-06-23 Anders Carlsson <andersca@apple.com>
Get rid of the window resizer size
https://bugs.webkit.org/show_bug.cgi?id=146240
Reviewed by Darin Adler.
This code was only used by older versions of GTK+, so get rid of it.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseNotifyResizerSize): Deleted.
(toplevelWindowResizeGripVisibilityChanged): Deleted.
(webkitWebViewBaseSetToplevelOnScreenWindow): Deleted.
(resizeWebKitWebViewBaseFromAllocation): Deleted.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setWindowResizerSize): Deleted.
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::windowResizerRect):
(WebKit::WebPage::setWindowResizerSize): Deleted.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
2015-06-23 Brady Eidson <beidson@apple.com>
WKFrameInfo should have an accessor for the Frame's current security origin.
https://bugs.webkit.org/show_bug.cgi?id=146162
Reviewed by Dan Bernstein.
This patch:
- Promotes _WKSecurityOrigin to API.
- Makes the WKSecurityOrigin Cocoa API object work with API::SecurityOrigin.
- Adds a WKSecurityOrigin accessor to WKFrameInfo.
- Changes IPC messaging so every handler that calls out with a WKFrameInfo object
gets a relevant SecurityOrigin to wrap.
* Shared/API/APISecurityOrigin.h:
(API::SecurityOrigin::create):
(API::SecurityOrigin::SecurityOrigin):
* Shared/API/Cocoa/WebKit.h:
* Shared/API/c/WKSharedAPICast.h:
(WebKit::toCopiedAPI):
* Shared/Cocoa/APIObject.mm:
(API::Object::newObject):
* Shared/SecurityOriginData.cpp:
(WebKit::SecurityOriginData::fromFrame):
* Shared/SecurityOriginData.h:
* UIProcess/API/APIFrameInfo.cpp:
(API::FrameInfo::FrameInfo):
* UIProcess/API/APIFrameInfo.h:
* UIProcess/API/APINavigationClient.h:
(API::NavigationClient::didFailProvisionalLoadInSubframeWithError):
* UIProcess/API/APIUIClient.h:
(API::UIClient::createNewPage):
(API::UIClient::runJavaScriptAlert):
(API::UIClient::runJavaScriptConfirm):
(API::UIClient::runJavaScriptPrompt):
* UIProcess/API/C/WKApplicationCacheManager.cpp:
(WKApplicationCacheManagerGetApplicationCacheOrigins):
* UIProcess/API/C/WKKeyValueStorageManager.cpp:
(WKKeyValueStorageManagerGetKeyValueStorageOrigins):
* UIProcess/API/C/WKOriginDataManager.cpp:
(WKOriginDataManagerGetOrigins):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageUIClient):
(WKPageSetPageNavigationClient):
* UIProcess/API/C/WKResourceCacheManager.cpp:
(WKResourceCacheManagerGetCacheOrigins):
* UIProcess/API/Cocoa/WKFrameInfo.h:
* UIProcess/API/Cocoa/WKFrameInfo.mm:
(-[WKFrameInfo securityOrigin]):
* UIProcess/API/Cocoa/WKSecurityOrigin.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKSecurityOrigin.h.
* UIProcess/API/Cocoa/WKSecurityOrigin.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKSecurityOrigin.mm.
(-[WKSecurityOrigin dealloc]):
(-[WKSecurityOrigin description]):
(-[WKSecurityOrigin protocol]):
(-[WKSecurityOrigin host]):
(-[WKSecurityOrigin port]):
(-[WKSecurityOrigin _apiObject]):
* UIProcess/API/Cocoa/WKSecurityOriginInternal.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/_WKSecurityOriginInternal.h.
(API::wrapper):
* UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
* UIProcess/API/Cocoa/WKUserContentController.mm:
* UIProcess/API/Cocoa/_WKSecurityOrigin.h:
* UIProcess/API/Cocoa/_WKSecurityOrigin.mm:
(-[_WKSecurityOrigin _initWithSecurityOrigin:]): Deleted.
(-[_WKSecurityOrigin protocol]): Deleted.
(-[_WKSecurityOrigin host]): Deleted.
(-[_WKSecurityOrigin port]): Deleted.
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::NavigationClient::didFailProvisionalLoadInSubframeWithError):
* UIProcess/Cocoa/UIDelegate.h:
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::UIClient::createNewPage):
(WebKit::UIDelegate::UIClient::runJavaScriptAlert):
(WebKit::UIDelegate::UIClient::runJavaScriptConfirm):
(WebKit::UIDelegate::UIClient::runJavaScriptPrompt):
(WebKit::UIDelegate::UIClient::exceededDatabaseQuota):
(WebKit::UIDelegate::UIClient::reachedApplicationCacheOriginQuota):
* UIProcess/UserContent/WebScriptMessageHandler.h:
* UIProcess/UserContent/WebUserContentControllerProxy.cpp:
(WebKit::WebUserContentControllerProxy::didPostMessage):
* UIProcess/UserContent/WebUserContentControllerProxy.h:
* UIProcess/UserContent/WebUserContentControllerProxy.messages.in:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::decidePolicyForNewWindowAction):
(WebKit::WebPageProxy::decidePolicyForResponse):
(WebKit::WebPageProxy::decidePolicyForResponseSync):
(WebKit::WebPageProxy::createNewPage):
(WebKit::WebPageProxy::runJavaScriptAlert):
(WebKit::WebPageProxy::runJavaScriptConfirm):
(WebKit::WebPageProxy::runJavaScriptPrompt):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/UserContent/WebUserContentController.cpp:
(WebKit::WebUserMessageHandlerDescriptorProxy::didPostMessage):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::createWindow):
(WebKit::WebChromeClient::runJavaScriptAlert):
(WebKit::WebChromeClient::runJavaScriptConfirm):
(WebKit::WebChromeClient::runJavaScriptPrompt):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
2015-06-23 Dan Bernstein <mitz@apple.com>
<rdar://problem/21342465> Make -[WKWebView _certificateChain] public.
https://bugs.webkit.org/show_bug.cgi?id=145886
Reviewed by Sam Weinig.
* Shared/WebCertificateInfo.h:
(WebKit::WebCertificateInfo::create): Changed to return a Ref rather than a PassRefPtr.
* UIProcess/API/Cocoa/WKBrowsingContextController.mm: Added no-op overrides of new
PageLoadState::Observer functions to PageLoadStateObserver.
* UIProcess/API/Cocoa/WKProcessGroup.mm:
(-[WKProcessGroup _setAllowsSpecificHTTPSCertificate:forHost:]): Updated for change to
WebCertificateInfo::create.
* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _setAllowsSpecificHTTPSCertificate:forHost:]): Ditto.
* UIProcess/API/Cocoa/WKWebView.h: Declared new certificateChain property on WKWebView.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView certificateChain]): Added. Returns the certificate chain from the page load
state, or an empty array if there is no certificate chain.
* UIProcess/API/Cocoa/WKWebViewPrivate.h: Deprecated _certificateChain.
* UIProcess/Cocoa/NavigationState.h: Declared overrides of new PageLoadState::Observer
functions.
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::willChangeCertificateInfo): Override to call
-willChangeValueForKey:.
(WebKit::NavigationState::didChangeCertificateInfo): Override to call
-didChangeValueForKey:.
* UIProcess/PageLoadState.cpp:
(WebKit::PageLoadState::commitChanges): Call the new observer functions
willChangeCertificateInfo and didChangeCertificateInfo.
(WebKit::PageLoadState::didCommitLoad): Added new certificateInfo parameter, which is stored
in the uncommitted state.
* UIProcess/PageLoadState.h:
(WebKit::PageLoadState::certificateInfo): Added this getter.
* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::didCommitLoad): Changed the parameter type from
WebCore::CertificateInfo to WebCertificateInfo.
* UIProcess/WebFrameProxy.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didCommitLoadForFrame): Pass the certificate info to
PageLoadState::didCommitLoad.
2015-06-22 Gyuyoung Kim <gyuyoung.kim@webkit.org>
[EFL][CustomProtocol] Do not add duplicated custom scheme
https://bugs.webkit.org/show_bug.cgi?id=146199
Reviewed by Carlos Garcia Campos.
WebSoupCustomProtocolRequestManager::registerSchemeForCustomProtocol generates
a crash when duplicated scheme is registered on debug mode, or just registers it on release mode.
However application can register duplicate scheme by mistake or on purpose. Thus it would be good
if we don't register it instead of registering it or generating a crash when trying to regiseter
duplicated scheme.
EFL port want to allow user to change registered callback, thus EWK2ContextTest::ewk_context_url_scheme_register()
is modified to test it.
Test: ewk_context_url_scheme_register() in test_ewk2_context.cpp.
* UIProcess/API/efl/ewk_context.h: Added a comment to replace registered callback.
* UIProcess/API/efl/tests/test_ewk2_context.cpp:
(EWK2ContextTest::schemeRequestCallback1):
(EWK2ContextTest::schemeRequestCallback2):
(TEST_F):
(EWK2ContextTest::schemeRequestCallback): Deleted.
* UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.cpp:
(WebKit::WebSoupCustomProtocolRequestManager::registerSchemeForCustomProtocol):
2015-06-22 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Update OptionsGTK.cmake and NEWS for 2.9.3 release.
* gtk/NEWS: Add release notes for 2.9.3.
2015-06-22 Dan Bernstein <mitz@apple.com>
Part 2 of [Xcode] Fold the WebKit2SandboxProfiles-IOSOverride target into the Sandbox Profiles target
https://bugs.webkit.org/show_bug.cgi?id=146197
Rubber-stamped by Anders Carlsson.
* WebKit2.xcodeproj/project.pbxproj: Deleted the WebKit2SandboxProfiles-IOSOverride target.
2015-06-22 Dean Jackson <dino@apple.com>
Rename PlatformCA*Mac to PlatformCA*Cocoa
https://bugs.webkit.org/show_bug.cgi?id=146224
<rdar://problem/21497182>
Reviewed by Simon Fraser.
Rename PlatformCALayerMac and related files in platform/graphics/ca/mac
to the more accurate Cocoa suffix.
* WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::filtersCanBeComposited):
* WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
(WebKit::PlatformCALayerRemoteCustom::create):
* WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):
2015-06-22 Anders Carlsson <andersca@apple.com>
Simplify Connection::SyncMessageState
https://bugs.webkit.org/show_bug.cgi?id=146213
Reviewed by Andreas Kling.
Since we no longer support Connections dispatching to multiple threads, we can make SyncMessageState
into a singleton and get rid of the RunLoop -> SyncMessageState hash map.
* Platform/IPC/Connection.cpp:
(IPC::Connection::SyncMessageState::singleton):
(IPC::Connection::SyncMessageState::SyncMessageState):
(IPC::Connection::SyncMessageState::processIncomingMessage):
(IPC::Connection::SyncMessageState::dispatchMessages):
(IPC::Connection::waitForSyncReply):
(IPC::Connection::processIncomingSyncReply):
(IPC::Connection::processIncomingMessage):
(IPC::Connection::connectionDidClose):
(IPC::Connection::SyncMessageState::syncMessageStateMap): Deleted.
(IPC::Connection::SyncMessageState::syncMessageStateMapMutex): Deleted.
(IPC::Connection::SyncMessageState::getOrCreate): Deleted.
(IPC::Connection::SyncMessageState::~SyncMessageState): Deleted.
(IPC::Connection::Connection): Deleted.
* Platform/IPC/Connection.h:
2015-06-20 Alex Christensen <achristensen@webkit.org>
[Content Extensions] Add SPI to reload without content blocking.
https://bugs.webkit.org/show_bug.cgi?id=146128
rdar://problem/20351903
Reviewed by Sam Weinig.
* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
* UIProcess/API/C/WKPage.cpp:
(WKPageSetCustomUserAgent):
(WKPageSetUserContentExtensionsEnabled):
(WKPageSupportsTextEncoding):
* UIProcess/API/C/WKPage.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _customUserAgent]):
(-[WKWebView _setUserContentExtensionsEnabled:]):
(-[WKWebView _userContentExtensionsEnabled]):
(-[WKWebView _setCustomUserAgent:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::creationParameters):
(WebKit::WebPageProxy::setShouldScaleViewToFitDocument):
(WebKit::WebPageProxy::setUserContentExtensionsEnabled):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::userContentExtensionsEnabled):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::reinitializeWebPage):
(WebKit::WebPage::setShouldScaleViewToFitDocument):
(WebKit::WebPage::setUserContentExtensionsEnabled):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
Pass a boolean from the API to WebCore.
2015-06-22 Anders Carlsson <andersca@apple.com>
Remove m_clientRunLoop from IPC::Connection
https://bugs.webkit.org/show_bug.cgi?id=146212
Reviewed by Sam Weinig.
We only ever create connections whose messages are dispatched to the main run loop, so we can
vastly simplify the code by only allowing messages to be dispatched there.
* DatabaseProcess/DatabaseToWebProcessConnection.cpp:
(WebKit::DatabaseToWebProcessConnection::DatabaseToWebProcessConnection):
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::NetworkConnectionToWebProcess):
* Platform/IPC/Connection.cpp:
(IPC::Connection::createServerConnection):
(IPC::Connection::createClientConnection):
(IPC::Connection::Connection):
(IPC::Connection::addWorkQueueMessageReceiver):
(IPC::Connection::removeWorkQueueMessageReceiver):
(IPC::Connection::waitForMessage):
(IPC::Connection::sendSyncMessage):
(IPC::Connection::sendSyncMessageFromSecondaryThread):
(IPC::Connection::processIncomingMessage):
(IPC::Connection::connectionDidClose):
(IPC::Connection::dispatchDidReceiveInvalidMessage):
(IPC::Connection::enqueueIncomingMessage):
(IPC::Connection::wakeUpRunLoop):
* Platform/IPC/Connection.h:
* Platform/IPC/mac/ConnectionMac.mm:
(IPC::Connection::receiveSourceEventHandler):
* PluginProcess/WebProcessConnection.cpp:
(WebKit::WebProcessConnection::WebProcessConnection):
* Shared/ChildProcess.cpp:
(WebKit::ChildProcess::initialize):
* Shared/ChildProcessProxy.cpp:
(WebKit::ChildProcessProxy::didFinishLaunching):
* UIProcess/Plugins/PluginProcessProxy.cpp:
(WebKit::PluginProcessProxy::didFinishLaunching):
* WebProcess/Databases/WebToDatabaseProcessConnection.cpp:
(WebKit::WebToDatabaseProcessConnection::WebToDatabaseProcessConnection):
* WebProcess/Network/NetworkProcessConnection.cpp:
(WebKit::NetworkProcessConnection::NetworkProcessConnection):
* WebProcess/Plugins/PluginProcessConnection.cpp:
(WebKit::PluginProcessConnection::PluginProcessConnection):
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::createInspectorPage):
* WebProcess/WebPage/WebInspectorUI.cpp:
(WebKit::WebInspectorUI::establishConnection):
2015-06-22 Anders Carlsson <andersca@apple.com>
Crashes in hit testing under WebPage::acceptsFirstMouse() while handling sync message in plug-in teardown
https://bugs.webkit.org/show_bug.cgi?id=146211
rdar://problem/17180615
Reviewed by Sam Weinig.
If we're inside a sendSync message when we're being called, just bail.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::acceptsFirstMouse):
2015-06-22 Dan Bernstein <mitz@apple.com>
Part 1 of [Xcode] Fold the WebKit2SandboxProfiles-IOSOverride target into the Sandbox Profiles target
https://bugs.webkit.org/show_bug.cgi?id=146197
Reviewed by Anders Carlsson.
* Configurations/SandboxProfiles.xcconfig: Added. Defines INSTALL_PATH based on the value
of WK_INSTALL_OVERRIDE_SANDBOX_PROFILES.
* WebKit2.xcodeproj/project.pbxproj: Use SandboxProfiles.xcconfig for the Sandbox Profiles
target, and change the destination path in its Copy Files build phase to INSTALL_PATH.
2015-06-22 Antti Koivisto <antti@apple.com>
Crash replacing TabDocument in MobileSafari at WebKit: -[WKWebView(WKPrivate) _beginAnimatedResizeWithUpdates:]
https://bugs.webkit.org/show_bug.cgi?id=146201
Reviewed by Dan Bernstein.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _beginAnimatedResizeWithUpdates:]):
No repro but if for some reason [_contentView bounds] width is zero we'll compute +Inf targetScale
and then NaN contentOffset.x. Verified in lldb that this gives the exact crash signature seen.
Fix by checking that [_contentView bounds] is not empty like is done with other inputs.
2015-06-22 Carlos Garcia Campos <cgarcia@igalia.com>
REGRESSION(r182303): [GTK] Context menu API is broken since r182303
https://bugs.webkit.org/show_bug.cgi?id=146202
Reviewed by Žan Doberšek.
The problem is that ContextMenuclient API changed in r182303, but
we didn't notice it either, and the default handler for
getContextMenuFromProposedMenu was executed. An override keyword
would have caught this.
* UIProcess/API/gtk/WebKitContextMenuClient.cpp: Build a Vector of
WebContextMenuItemData as expected by our API, and add add
override keyword to ensure this doesn't happen again.
2015-06-22 Zan Dobersek <zdobersek@igalia.com>
[WK2] ConnectionUnix should use FastMalloc to allocate on-heap resources
https://bugs.webkit.org/show_bug.cgi?id=146143
Reviewed by Carlos Garcia Campos.
IPC handling in Unix-specific IPC::Connection implementation should use
FastMalloc to allocate on-heap resources, instead of allocating via the
system allocator.
The AttachmentInfo class is marked as allocatable through FastMalloc.
That way it can be allocated through FastMalloc while still handled
through std::unique_ptr<>.
The char[] arrays in readBytesFromSocket() and Connection::sendOutgoingMessage()
are now handled through a MallocPtr<> object.
In Connection::sendOutgoingMessage(), both the AttachmentInfo[] and char[]
arrays are now only allocated if there are actual attachments contained
in the message. The code that's conditioned with a non-empty attachments
Vector is now also grouped together, in a single branch.
* Platform/IPC/unix/ConnectionUnix.cpp:
(IPC::readBytesFromSocket):
(IPC::Connection::sendOutgoingMessage):
2015-06-22 Gyuyoung Kim <gyuyoung.kim@webkit.org>
[EFL] test_ewk2_application_cache_manager has been failed since r185527
https://bugs.webkit.org/show_bug.cgi?id=146016
Reviewed by Csaba Osztrogonác.
* UIProcess/API/efl/tests/test_ewk2_application_cache_manager.cpp:
(TEST_F): Disable this test for now. This test will be enabled again.
2015-06-16 Gavin Barraclough <barraclough@apple.com>
Page load performance regression due to bugs.webkit.org/show_bug.cgi?id=145542
https://bugs.webkit.org/show_bug.cgi?id=146198
Unreviewed rollout.
* UIProcess/API/gtk/WebKitWebContext.cpp:
(webkit_web_context_prefetch_dns):
2015-06-21 Hyungwook Lee <hyungwook.lee@navercorp.com>
WKApplicationCacheManagerDeleteEntriesForOrigin() has wrong WebsiteDataTypes.
https://bugs.webkit.org/show_bug.cgi?id=146180
Reviewed by Sam Weinig.
Modify to use correct WebsiteDataTypes in WKApplicationCacheManagerDeleteEntriesForOrigin()
* UIProcess/API/C/WKApplicationCacheManager.cpp:
(WKApplicationCacheManagerDeleteEntriesForOrigin):
2015-06-21 Dan Bernstein <mitz@apple.com>
<rdar://problem/21444762> REGRESSION (r184215): Plug-in services crash on launch on Yosemite
https://bugs.webkit.org/show_bug.cgi?id=146195
Reviewed by Sam Weinig.
* Configurations/PluginService.32.xcconfig: Changed the Yosemite definition of
INFOPLIST_FILE such that it would also apply to the macosx10.10.internal SDK.
* Configurations/PluginService.64.xcconfig: Ditto.
2015-06-21 Dan Bernstein <mitz@apple.com>
Build fix.
* Shared/API/Cocoa/WKFoundation.h: Dont use generics if the SDK doesnt support them.
2015-06-21 Michael Catanzaro <mcatanzaro@igalia.com>
[SOUP] Use GTask in WebKitSoupRequestInputStream
https://bugs.webkit.org/show_bug.cgi?id=146184
Reviewed by Carlos Garcia Campos.
Replace deprecated use of GSimpleAsyncResult with GTask.
* WebProcess/soup/WebKitSoupRequestInputStream.cpp:
(AsyncReadData::AsyncReadData):
(webkitSoupRequestInputStreamReadAsyncResultComplete):
(webkitSoupRequestInputStreamPendingReadAsyncComplete):
(webkitSoupRequestInputStreamReadAsync):
(webkitSoupRequestInputStreamReadFinish):
2015-06-21 Michael Catanzaro <mcatanzaro@igalia.com>
Fix format strings in NetworkCache.cpp and NetworkCacheStatistics.cpp and WebIDBServerConnection.cpp
https://bugs.webkit.org/show_bug.cgi?id=146172
Reviewed by Darin Adler.
Use the correct %"PRIu64" and %"PRIi64" for uint64_t and int64_t, instead of %llu and %lli.
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::retrieve):
* NetworkProcess/cache/NetworkCacheStatistics.cpp:
(WebKit::NetworkCache::Statistics::initialize):
(WebKit::NetworkCache::Statistics::recordNotUsingCacheForRequest):
(WebKit::NetworkCache::Statistics::recordRetrievalFailure):
(WebKit::NetworkCache::Statistics::recordRetrievedCachedEntry):
(WebKit::NetworkCache::Statistics::recordRevalidationSuccess):
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
(WebKit::WebIDBServerConnection::deleteDatabase):
(WebKit::WebIDBServerConnection::didDeleteDatabase):
(WebKit::WebIDBServerConnection::getOrEstablishIDBDatabaseMetadata):
(WebKit::WebIDBServerConnection::didGetOrEstablishIDBDatabaseMetadata):
(WebKit::WebIDBServerConnection::openTransaction):
(WebKit::WebIDBServerConnection::didOpenTransaction):
(WebKit::WebIDBServerConnection::beginTransaction):
(WebKit::WebIDBServerConnection::didBeginTransaction):
(WebKit::WebIDBServerConnection::commitTransaction):
(WebKit::WebIDBServerConnection::didCommitTransaction):
(WebKit::WebIDBServerConnection::resetTransaction):
(WebKit::WebIDBServerConnection::didResetTransaction):
(WebKit::WebIDBServerConnection::rollbackTransaction):
(WebKit::WebIDBServerConnection::didRollbackTransaction):
(WebKit::WebIDBServerConnection::createObjectStore):
(WebKit::WebIDBServerConnection::didCreateObjectStore):
(WebKit::WebIDBServerConnection::createIndex):
(WebKit::WebIDBServerConnection::didCreateIndex):
(WebKit::WebIDBServerConnection::deleteIndex):
(WebKit::WebIDBServerConnection::didDeleteIndex):
(WebKit::WebIDBServerConnection::get):
(WebKit::WebIDBServerConnection::put):
(WebKit::WebIDBServerConnection::didPutRecord):
(WebKit::WebIDBServerConnection::didGetRecord):
(WebKit::WebIDBServerConnection::didOpenCursor):
(WebKit::WebIDBServerConnection::didAdvanceCursor):
(WebKit::WebIDBServerConnection::didIterateCursor):
(WebKit::WebIDBServerConnection::count):
(WebKit::WebIDBServerConnection::didCount):
(WebKit::WebIDBServerConnection::deleteRange):
(WebKit::WebIDBServerConnection::didDeleteRange):
(WebKit::WebIDBServerConnection::clearObjectStore):
(WebKit::WebIDBServerConnection::didClearObjectStore):
(WebKit::WebIDBServerConnection::deleteObjectStore):
(WebKit::WebIDBServerConnection::didDeleteObjectStore):
(WebKit::WebIDBServerConnection::changeDatabaseVersion):
(WebKit::WebIDBServerConnection::didChangeDatabaseVersion):
(WebKit::WebIDBServerConnection::openCursor):
(WebKit::WebIDBServerConnection::cursorAdvance):
(WebKit::WebIDBServerConnection::cursorIterate):
2015-06-20 Tim Horton <timothy_horton@apple.com>
Deselection of text causes a noticeable jump on force touch machines
https://bugs.webkit.org/show_bug.cgi?id=146173
<rdar://problem/20992842>
Reviewed by Sam Weinig.
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<TextIndicatorData>::encode):
(IPC::ArgumentCoder<TextIndicatorData>::decode):
Encode/decode wantsMargin.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performImmediateActionHitTestAtLocation):
(WebKit::textIndicatorTransitionForImmediateAction): Deleted.
Get rid of TextIndicatorPresentationTransition::Crossfade.
2015-06-20 Dan Bernstein <mitz@apple.com>
[Cocoa] Actually use Objective-C lightweight generics when the compiler supports them
https://bugs.webkit.org/show_bug.cgi?id=146183
Reviewed by Sam Weinig.
* Shared/API/Cocoa/WKFoundation.h: When the compiler supports Objective-C generics, define
WK_ARRAY and WK_SET to use them. Also added a definition of WK_DICTIONARY.
* UIProcess/API/Cocoa/WKWebViewPrivate.h: Use WK_DICTIONARY for the options dictionary of
-_loadRequest:withOptions:.
* UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
(-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]): Made the completion
halder type match the declaration, now that NSArray and WK_ARRAY(WKWebsiteDataRecord *) are
not the same.
* mac/postprocess-framework-headers.sh: Also rewrite WK_DICTIONARY.
2015-06-20 Chris Dumez <cdumez@apple.com>
[WK2][iOS] Avoid synchronous IPC on view state change when the content is not visible
https://bugs.webkit.org/show_bug.cgi?id=146179
<rdar://problem/20923432>
Reviewed by Tim Horton.
After r170787, viewStateChange() would cause a synchronous IPC between
the UIProcess and the WebProcess when the view becomes visible. This
was to avoid painting empty / black tiles when unsuspending the
WebProcess on tab switch, in the event volatile IOSurfaces were purged.
However, this sync IPC can have performance implications and is not
needed when the content is not actually visible yet (e.g.
hideContentUntilNextUpdate() was called, or the tab was killed).
This patch avoids the synchronous IPC when the content is hidden and
exposes a private API on WKWebView so that clients can ask for the
content to be hidden until the next update. This would allow for
clients to avoid the synchronous IPC if they don't need the content
to be displayed synchronously (e.g. the view is obscured).
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _hideContentUntilNextUpdate]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::hasVisibleContent):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::dispatchViewStateChange):
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::isContentHidden):
2015-06-20 Michael Catanzaro <mcatanzaro@igalia.com>
Check for SHA1 certificates ignores subresources
https://bugs.webkit.org/show_bug.cgi?id=146159
Reviewed by Dan Bernstein.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didCommitLoadForFrame): Call
PageLoadState::didDisplayOrRunInsecureContent if a certificate chain contains a non-root
SHA1 certificate when the frame is not the main frame.
2015-06-20 Dan Bernstein <mitz@apple.com>
Added availability information to a recently-added delegate method.
Suggested by Alexey Proskuryakov and Anders Carlsson.
* UIProcess/API/Cocoa/WKUIDelegate.h: Annotated -webViewDidClose:.
2015-06-20 Ryuan Choi <ryuan.choi@navercorp.com>
[EFL] Do not consider test directories when DEVELOPER_MODE is OFF
https://bugs.webkit.org/show_bug.cgi?id=146171
Reviewed by Gyuyoung Kim.
* PlatformEfl.cmake:
Do not define SOURCE_DIR when DEVELOPER_MODE is OFF for seccomp filter
not to allow jhbuild directory.
* Shared/efl/ProcessExecutablePathEfl.cpp:
(WebKit::findProcessPath): Guard test code to ENABLE(DEVELOPER_MODE).
2015-06-18 Myles C. Maxfield <mmaxfield@apple.com>
REGRESSION(r185475): [Mac] ASSERT() when clicking on text using web fonts with force touch trackpad
https://bugs.webkit.org/show_bug.cgi?id=145890
<rdar://problem/21390877>
Reviewed by Darin Adler and Tim Horton.
The best place to stop the serialization of unserializable fonts is inside WebKit2's IPC code. We want
this logic to occur when encoding an NSAttributedString, rather than when encoding an NSDictionary,
because changing the shape of an NSAttributedString is less likely to result in problems rather than
changing the shape of an NSDictionary.
* Shared/mac/ArgumentCodersMac.mm:
(IPC::fontIsSerializable):
(IPC::filterUnserializableValues):
(IPC::encode):
2015-06-19 Michael Catanzaro <mcatanzaro@igalia.com>
[SOUP] Fix return-type-c-linkage warning after r185553
https://bugs.webkit.org/show_bug.cgi?id=146014
Reviewed by Martin Robinson.
* Shared/Network/CustomProtocols/soup/CustomProtocolManagerImpl.cpp:
(WebKit::CustomProtocolManagerImpl::start): webkitSoupRequestGenericGetRequest now returns
a pointer rather than a reference.
2015-06-19 Brady Eidson <beidson@apple.com>
Rename WKSecurityOrigin.h/cpp to WKSecurityOriginRef.h/cpp.
https://bugs.webkit.org/show_bug.cgi?id=146152
Reviewed by Dan Bernstein.
* CMakeLists.txt:
* Shared/API/c/WKSecurityOriginRef.cpp: Renamed from Source/WebKit2/Shared/API/c/WKSecurityOrigin.cpp.
* Shared/API/c/WKSecurityOriginRef.h: Renamed from Source/WebKit2/Shared/API/c/WKSecurityOrigin.h.
* UIProcess/API/efl/ewk_security_origin.cpp:
* UIProcess/API/efl/ewk_storage_manager.cpp:
* WebKit2.xcodeproj/project.pbxproj:
2015-06-18 Brent Fulgham <bfulgham@apple.com>
[iOS] scrollIntoViewIfNeeded is not working with scroll-snap points
https://bugs.webkit.org/show_bug.cgi?id=145318
<rdar://problem/21081501>
Reviewed by Simon Fraser.
* Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
(ArgumentCoder<ScrollingStateScrollingNode>::encode): Handle scroll snap point offset indices.
(ArgumentCoder<ScrollingStateScrollingNode>::decode): Ditto.
* UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
(WebKit::RemoteScrollingCoordinatorProxy::currentSnapPointIndicesDidChange): Added. Send message
to WebProcess when scroll snap indices have changed.
* UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
* UIProcess/Scrolling/RemoteScrollingTree.cpp:
(WebKit::RemoteScrollingTree::currentSnapPointIndicesDidChange): Added. Notify the
RemoteScrollingCoordinatorProxy when scroll snap indices have changed.
* UIProcess/Scrolling/RemoteScrollingTree.h:
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
(-[WKOverflowScrollViewDelegate scrollViewWillEndDragging:withVelocity:targetContentOffset:]): Revised.
Identify changes in the current scroll snap point offset index (in either the horizontal or vertical
directions), and send a notification when this happens.
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::currentSnapPointIndicesDidChange): Added. Notify the
Scrolling Tree when indices changed.
* UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
(WebKit::RemoteScrollingCoordinatorProxy::adjustTargetContentOffsetForSnapping): Revised. Always compute
the new scroll snap offset index (even when we will rubber band).
* WebProcess/Scrolling/RemoteScrollingCoordinator.h:
* WebProcess/Scrolling/RemoteScrollingCoordinator.messages.in: Add a new message to relay changes in scroll
snap index.
* WebProcess/Scrolling/RemoteScrollingCoordinator.mm:
(WebKit::RemoteScrollingCoordinator::currentSnapPointIndicesChangedForNode): Added.
2015-06-19 Jeremy Jones <jeremyj@apple.com>
Revert switch to _synchronizedDrawingFence.
https://bugs.webkit.org/show_bug.cgi?id=146136
<rdar://problem/21227992>
Reviewed by Simon Fraser.
Revert _synchronizedDrawingFence code path that leaks a port.
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::setVideoLayerFrame):
2015-06-19 Anders Carlsson <andersca@apple.com>
Address review feedback from Darin.
* Shared/mac/HangDetectionDisablerMac.mm:
(WebKit::clientsMayIgnoreEvents):
2015-06-19 Anders Carlsson <andersca@apple.com>
Disable SpinTracer detection while loading sync XHR
https://bugs.webkit.org/show_bug.cgi?id=146150
rdar://problem/21462023
Reviewed by Dan Bernstein.
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::loadResourceSynchronously):
2015-06-19 Anders Carlsson <andersca@apple.com>
Spintracer treats the web process as hung when it's showing JavaScript dialogs in the UI process
https://bugs.webkit.org/show_bug.cgi?id=146124
rdar://problem/21449395
Reviewed by Geoffrey Garen.
Add a HangDetectionDisabler RAII object and use it for JavaScript panels.
* Shared/HangDetectionDisabler.h: Added.
(WebKit::HangDetectionDisabler::HangDetectionDisabler):
(WebKit::HangDetectionDisabler::~HangDetectionDisabler):
* Shared/mac/HangDetectionDisablerMac.mm: Added.
(WebKit::clientsMayIgnoreEvents):
(WebKit::setClientsMayIgnoreEvents):
(WebKit::HangDetectionDisabler::HangDetectionDisabler):
(WebKit::HangDetectionDisabler::~HangDetectionDisabler):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::runBeforeUnloadConfirmPanel):
(WebKit::WebChromeClient::runJavaScriptAlert):
(WebKit::WebChromeClient::runJavaScriptConfirm):
(WebKit::WebChromeClient::runJavaScriptPrompt):
2015-06-19 Dan Bernstein <mitz@apple.com>
Fixed the build for platforms that dont have SafariServices.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView previewViewControllerForPosition:inSourceView:]):
(-[WKContentView commitPreviewViewController:]):
(-[WKContentView willPresentPreviewViewController:forPosition:inSourceView:]):
2015-06-19 Csaba Osztrogonác <ossy@webkit.org>
Remove unnecessary svn:executable flags
https://bugs.webkit.org/show_bug.cgi?id=146107
Reviewed by Alexey Proskuryakov.
* UIProcess/API/efl/EwkView.cpp: Removed property svn:executable.
2015-06-19 Csaba Osztrogonác <ossy@webkit.org>
[WK2] Fix unused-private-field warning in WebProcess/Plugins/PluginView.<h|cpp>
https://bugs.webkit.org/show_bug.cgi?id=145252
Reviewed by Tim Horton.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::PluginView): Added the necessary ifdef guard.
* WebProcess/Plugins/PluginView.h: Added the necessary ifdef guard.
* WebProcess/WebPage/WebPage.h: Moved the definition of ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC to WTF.
2015-06-18 Carlos Garcia Campos <cgarcia@igalia.com>
Do not store configuration parameters twice in WebProcessPool
https://bugs.webkit.org/show_bug.cgi?id=146102
Reviewed by Sam Weinig.
Since we are copying the given WebProcessPoolConfiguration and
keeping it as a member, we don't need to keep an additional copy
of its contents as extra members. This also prevents
inconsistencies between the values in the configuration and the
members when any of them are modified by WebProcessPool API.
* UIProcess/API/APIProcessPoolConfiguration.h: Return a const
reference instead of a temporary in methods returning a String.
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::updateProcessSuppressionState):
(WebKit::WebProcessPool::platformInitializeWebProcess):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::setProcessModel):
(WebKit::WebProcessPool::setMaximumNumberOfProcesses):
(WebKit::WebProcessPool::networkingProcessConnection):
(WebKit::WebProcessPool::languageChanged):
(WebKit::WebProcessPool::setUsesNetworkProcess):
(WebKit::WebProcessPool::usesNetworkProcess):
(WebKit::WebProcessPool::ensureNetworkProcess):
(WebKit::WebProcessPool::ensureDatabaseProcess):
(WebKit::WebProcessPool::ensureSharedWebProcess):
(WebKit::WebProcessPool::createNewWebProcess):
(WebKit::WebProcessPool::warmInitialProcess):
(WebKit::WebProcessPool::disconnectProcess):
(WebKit::WebProcessPool::createNewWebProcessRespectingProcessCountLimit):
(WebKit::WebProcessPool::createWebPage):
(WebKit::WebProcessPool::postMessageToInjectedBundle):
(WebKit::WebProcessPool::setCanHandleHTTPSServerTrustEvaluation):
(WebKit::WebProcessPool::setCacheModel):
(WebKit::WebProcessPool::allowSpecificHTTPSCertificateForHost):
(WebKit::WebProcessPool::requestWebContentStatistics):
(WebKit::WebProcessPool::requestNetworkingStatistics):
* UIProcess/WebProcessPool.h:
(WebKit::WebProcessPool::sendToNetworkingProcess):
(WebKit::WebProcessPool::sendToNetworkingProcessRelaunchingIfNecessary):
(WebKit::WebProcessPool::sendToAllProcessesRelaunchingThemIfNecessary):
(WebKit::WebProcessPool::sendToOneProcess):
* UIProcess/gtk/WebProcessPoolGtk.cpp:
(WebKit::WebProcessPool::platformInitializeWebProcess):
2015-06-18 Jon Lee <jonlee@apple.com>
Update AVKit usage of pip
https://bugs.webkit.org/show_bug.cgi?id=146095
<rdar://problem/21386853>
Reviewed by Eric Carlson.
- Rename preference key
- Rename shouldAllowAlternateFullscreen to shouldAllowPictureInPictureMediaPlayback
* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp: Remove unused preference calls.
(WKPreferencesSetAllowsAlternateFullscreen): Deleted.
(WKPreferencesGetAllowsAlternateFullscreen): Deleted.
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _isShowingVideoPictureInPicture]): Renamed.
(-[WKWebView _isShowingVideoOptimized]): Deleted.
(-[WKWebView _mayAutomaticallyShowVideoPictureInPicture]): Renamed.
(-[WKWebView _mayAutomaticallyShowVideoOptimized]): Deleted.
(shouldAllowPictureInPictureMediaPlayback): Renamed.
(shouldAllowAlternateFullscreen): Deleted.
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/ios/PageClientImplIOS.mm:
* UIProcess/ios/WebVideoFullscreenManagerProxy.h: Rename local variables.
* UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::mayAutomaticallyShowVideoPictureInPicture): Renamed.
(WebKit::WebVideoFullscreenManagerProxy::mayAutomaticallyShowVideoOptimized): Deleted.
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
* WebProcess/WebPage/WebPage.cpp:
* WebProcess/ios/WebVideoFullscreenManager.mm:
2015-06-18 Jeremy Jones <jeremyj@apple.com>
Fix crash when entering fullscreen during exit fullscreen animation.
https://bugs.webkit.org/show_bug.cgi?id=146117
Reviewed by Simon Fraser.
A partial teardown left the LayerHostingContext in a bad state when attempting to reuse the model and interface
objects. Instead, complete the teardown and don't reuse the objects.
* WebProcess/ios/WebVideoFullscreenManager.mm:
(WebKit::WebVideoFullscreenManager::didEnterFullscreen): WebThreadRun is a no-op in WK2. Use dispatch_async.
(WebKit::WebVideoFullscreenManager::didCleanupFullscreen): Do complete teardown before entering fullscreen again.
2015-06-18 Anders Carlsson <andersca@apple.com>
Remove shouldInterruptJavaScript
https://bugs.webkit.org/show_bug.cgi?id=146118
Reviewed by Antti Koivisto.
* UIProcess/API/APIUIClient.h:
(API::UIClient::shouldInterruptJavaScript): Deleted.
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageUIClient): Deleted.
* UIProcess/API/C/WKPageUIClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::shouldInterruptJavaScript): Deleted.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::shouldInterruptJavaScript): Deleted.
* WebProcess/WebCoreSupport/WebChromeClient.h:
2015-06-18 Tim Horton <timothy_horton@apple.com>
Use SFSafariViewController for previews
https://bugs.webkit.org/show_bug.cgi?id=146092
Reviewed by Darin Adler.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView previewViewControllerForPosition:inSourceView:]):
(-[WKContentView commitPreviewViewController:]):
* WebKit2.xcodeproj/project.pbxproj:
* Source/WebKit2/Platform/spi/ios/SafariServicesSPI.h:
2015-06-18 Antti Koivisto <antti@apple.com>
~4% Membuster regression after WebKit r185452
https://bugs.webkit.org/show_bug.cgi?id=146112
rdar://problem/21406677
Reviewed by Chris Dumez.
Clear the cache write queue on critical memory pressure. There can be substantial amount of memory there and we
don't know how long writing it out will take. System is often under I/O pressure too in low memory situations.
This also makes sense for process suspension where we send simulated critical memory event.
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::lowMemoryHandler):
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::handleMemoryPressureNotification):
* NetworkProcess/cache/NetworkCache.h:
* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::Storage::clearWriteQueue):
* NetworkProcess/cache/NetworkCacheStorage.h:
2015-06-18 Csaba Osztrogonác <ossy@webkit.org>
Fix missing braces and deprecated declarations warnings in WebKitNotificationProvider.cpp
https://bugs.webkit.org/show_bug.cgi?id=145921
Reviewed by Carlos Garcia Campos.
* UIProcess/API/gtk/WebKitNotificationProvider.cpp:
(WebKitNotificationProvider::WebKitNotificationProvider):
2015-06-18 Gyuyoung Kim <gyuyoung.kim@webkit.org>
[EFL] test_ewk2_context has been failed since r185529
https://bugs.webkit.org/show_bug.cgi?id=146046
Reviewed by Csaba Osztrogonác.
ewk_context_network_process_model test has been failed since r185529.
This patch modifies the test which is similar to ewk_context_network_process_model
based on multiple process model to fix the failure. Besides ewk_context_network_process_model
seems to be fixed indirectly. So we enable it again.
* UIProcess/API/efl/tests/test_ewk2_context.cpp:
(TEST_F):
2015-06-17 Yongjun Zhang <yongjun_zhang@apple.com>
Also turn off long press on link preview.
https://bugs.webkit.org/show_bug.cgi?id=146084
Also turn off long presss gesture when previewing. Turn that back on when preview is completed.
Reviewed by Tim Horton.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView willPresentPreviewViewController:forPosition:inSourceView:]):
(-[WKContentView didDismissPreviewViewController:committing:]):
2015-06-17 Brent Fulgham <bfulgham@apple.com>
Overflow regions with scroll snap points are not reliably rubber banding
https://bugs.webkit.org/show_bug.cgi?id=142522
<rdar://problem/20100726>
Reviewed by Darin Adler.
Make sure we don't block rubberbanding behavior when a scroll gesture should take us past
the end of the scroll container.
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
(-[WKOverflowScrollViewDelegate scrollViewWillEndDragging:withVelocity:targetContentOffset:]): Don't adjust
target point if we were going to scroll past the edges of the scroll container.
2015-06-17 Anders Carlsson <andersca@apple.com>
Would like a way, in the API, to get notified about a web process crash
https://bugs.webkit.org/show_bug.cgi?id=146085
rdar://problem/17358828
Reviewed by Darin Adler.
* UIProcess/API/Cocoa/WKNavigationDelegate.h:
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::setNavigationDelegate):
(WebKit::NavigationState::NavigationClient::processDidCrash):
2015-06-17 Tim Horton <timothy_horton@apple.com>
Swipe gesture can get stuck, preventing scrolling and other gestures
https://bugs.webkit.org/show_bug.cgi?id=146088
<rdar://problem/16056087>
Reviewed by Darin Adler.
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::trackSwipeGesture):
Ignore mouse events that come in while we're doing a swipe.
This prevents potentially problematic mouse events (especially context menus)
won't be processed during a swipe, avoiding situations that can cause
the swipe gesture to get stuck.
2015-06-17 Sungmann Cho <sungmann.cho@navercorp.com>
Remove willSendEventToPlugin() from PluginController.h.
https://bugs.webkit.org/show_bug.cgi?id=146054
Reviewed by Darin Adler.
PluginController::willSendEventToPlugin() was introduced by http://webkit.org/b/59124.
This method had been used only for WebKit2 on Windows, and no one uses it now.
So we can remove it.
No new tests, no behavior change.
* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::willSendEventToPlugin): Deleted.
* PluginProcess/PluginControllerProxy.h:
* WebProcess/Plugins/PluginController.h:
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::willSendEventToPlugin): Deleted.
* WebProcess/Plugins/PluginView.h:
2015-06-17 Tim Horton <timothy_horton@apple.com>
Repro crash when swiping back from a NY Times article @ WebPageProxy::navigationGestureDidEnd
https://bugs.webkit.org/show_bug.cgi?id=146083
<rdar://problem/20974232>
Reviewed by Darin Adler.
* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::didSameDocumentNavigationForMainFrame):
(WebKit::ViewGestureController::activeLoadMonitoringTimerFired):
It is possible to get didSameDocumentNavigationForMainFrame *before*
endSwipeGesture, while the user is still interactively swiping. We
cannot remove the snapshot in this case, nor should we start the active
load monitoring timer; all of these things should happen only after the
swipe is completed and we've performed the navigation.
This was particularly bad (a crash instead of just a disappearing snapshot)
because removing the snapshot also causes m_webPageProxyForBackForwardListForCurrentSwipe
to be nulled out, but then it is dereferenced during endSwipeGesture.
Make sure that we never call removeSwipeSnapshotIfReady unless we were actually
waiting to remove the swipe snapshot (because the gesture had completed).
Most callers already did ensure this, but these two did not.
2015-06-17 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Improve Full Screen support for Web Inspector windows
https://bugs.webkit.org/show_bug.cgi?id=146036
Reviewed by Timothy Hatcher.
* UIProcess/WebInspectorProxy.h:
* UIProcess/mac/WebInspectorProxyMac.mm:
(-[WKWebInspectorProxyObjCAdapter windowDidEnterFullScreen:]):
(-[WKWebInspectorProxyObjCAdapter windowDidExitFullScreen:]):
(WebKit::WebInspectorProxy::platformCanAttach):
(WebKit::WebInspectorProxy::windowFullScreenDidChange):
When entering / leaving full screen update attach availability to
potentially show / hide the frontend's docking buttons.
(WebKit::WebInspectorProxy::createInspectorWindow):
Allow a Web Inspector window to be a full screen auxillary window,
so that if the application with a WebView opens a detached inspector
window it can be shown on the same desktop as the full screen app.
Also, reduce the minimum window size requirements for full screen tiling.
2015-06-17 Tim Horton <timothy_horton@apple.com>
Safari tabs still have shrunken content after coming out of fullscreen
https://bugs.webkit.org/show_bug.cgi?id=146037
<rdar://problem/21105960>
Reviewed by Simon Fraser and Darin Adler.
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::useFixedLayoutDidChange):
(WebKit::WebPageProxy::fixedLayoutSizeDidChange):
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setUseFixedLayout):
(WebKit::WebPage::setFixedLayoutSize):
Keep the UI process up-to-date when fixed layout is enabled or the size changes.
This is important because these things can change from the Web process side too,
and the UI process uses its (potentially stale) version to do some short-circuiting.
This was causing us to fail to turn off fixed layout when it was turned
on from the Web process side (by TiledCoreAnimationDrawingArea).
* UIProcess/mac/WKViewLayoutStrategy.mm:
(-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy willChangeLayoutStrategy]):
Reset the view scale, which WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy
makes heavy use of, just like the others.
2015-06-17 Dan Bernstein <mitz@apple.com>
[Cocoa] Expose UIDelegate::UIClient::close via WKUIDelegate
https://bugs.webkit.org/show_bug.cgi?id=145957
Reviewed by Darin Adler.
* UIProcess/API/Cocoa/WKUIDelegate.h: Added -webViewDidClose: to the protocol.
* UIProcess/Cocoa/UIDelegate.h: Added a webViewDidClose boolean to the delegate methods struct.
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::setDelegate): Initialize the webViewDidClose boolean.
(WebKit::UIDelegate::UIClient::close): Changed to call the new delegate method. Left behind
code that calls the old private method if its implemented.
2015-06-17 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] WEBKIT_CACHE_MODEL_DOCUMENT_VIEWER doesn't disable memory cache when set before the web process is launched
https://bugs.webkit.org/show_bug.cgi?id=146053
Reviewed by Martin Robinson.
The cache is disabled in WebProcess::platformSetCacheModel() when
the cache model is CacheModelDocumentViewer, but it's enabled
again by WebProcess::setMemoryCacheDisabled() when
memoryCacheDisabled creation parameter is processed. We need to
make sure the cache model and memoryCacheDisabled parameters are consistent.
* UIProcess/gtk/WebProcessPoolGtk.cpp:
(WebKit::WebProcessPool::platformInitializeWebProcess): Initialize
memoryCacheDisabled parameter to true if memory cache was
explicitly disabled or cache model is CacheModelDocumentViewer.
2015-06-17 Zan Dobersek <zdobersek@igalia.com>
[WK2] valueForKey() shouldn't copy the defaults map
https://bugs.webkit.org/show_bug.cgi?id=146050
Reviewed by Sam Weinig.
* Shared/WebPreferencesStore.cpp:
(WebKit::valueForKey): Avoid copying the defaults HashMap by binding the return value to a reference.
2015-06-16 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Inhibit screen saver when playing full screen video
https://bugs.webkit.org/show_bug.cgi?id=145795
Reviewed by Gustavo Noronha Silva.
Use Freedesktop.org DBus API to inhibit/unhinibit the screen saver
when entering/leaving fullscreen.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(screenSaverInhibitedCallback):
(webkitWebViewBaseSendInhibitMessageToScreenSaver):
(screenSaverProxyCreatedCallback):
(webkitWebViewBaseInhibitScreenSaver):
(webkitWebViewBaseUninhibitScreenSaver):
(webkitWebViewBaseEnterFullScreen):
(webkitWebViewBaseExitFullScreen):
2015-06-16 Gyuyoung Kim <gyuyoung.kim@webkit.org>
Purge PassRefPtr with Ref or RefPtr
https://bugs.webkit.org/show_bug.cgi?id=146001
Reviewed by Darin Adler.
As step to remove PassRefPtr, this patch reduces use of PassRefPtr in WebKit2.
If function can't return nullptr, PassRefPtr is changed with Ref. If not, the function
returns RefPtr.
* DatabaseProcess/DatabaseToWebProcessConnection.cpp:
(WebKit::DatabaseToWebProcessConnection::create):
* DatabaseProcess/DatabaseToWebProcessConnection.h:
* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
(WebKit::DatabaseProcessIDBConnection::create):
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
(WebKit::UniqueIDBDatabase::create):
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::create):
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/RemoteNetworkingContext.h:
* PluginProcess/WebProcessConnection.cpp:
(WebKit::WebProcessConnection::create):
* PluginProcess/WebProcessConnection.h:
* Shared/API/APINumber.h:
(API::Number::create):
* Shared/API/APISecurityOrigin.h:
(API::SecurityOrigin::createFromString):
(API::SecurityOrigin::create):
* Shared/API/APISerializedScriptValue.h:
(API::SerializedScriptValue::create):
(API::SerializedScriptValue::adopt):
* Shared/APIWebArchive.h:
* Shared/APIWebArchive.mm:
(API::WebArchive::create):
* Shared/APIWebArchiveResource.h:
* Shared/APIWebArchiveResource.mm:
(API::WebArchiveResource::create):
* Shared/AsyncRequest.h:
* UIProcess/API/efl/ewk_url_request_private.h:
(EwkUrlRequest::create):
* UIProcess/API/efl/ewk_url_response_private.h:
(EwkUrlResponse::create):
* UIProcess/API/efl/ewk_url_scheme_request_private.h:
(EwkUrlSchemeRequest::create):
* UIProcess/API/efl/ewk_window_features_private.h:
(EwkWindowFeatures::create):
* UIProcess/API/efl/tests/test_ewk2_object.cpp:
(TestEwkObject1::create):
(TestEwkObject2::create):
* UIProcess/API/gtk/WebKitBatteryProvider.cpp:
(WebKitBatteryProvider::create):
* UIProcess/API/gtk/WebKitBatteryProvider.h:
* UIProcess/API/gtk/WebKitColorChooser.cpp:
(WebKit::WebKitColorChooser::create):
* UIProcess/API/gtk/WebKitGeolocationProvider.cpp:
(WebKitGeolocationProvider::create):
* UIProcess/API/gtk/WebKitNotificationProvider.cpp:
(WebKitNotificationProvider::create):
* UIProcess/API/gtk/WebKitNotificationProvider.h:
* UIProcess/GeolocationPermissionRequestProxy.h:
(WebKit::GeolocationPermissionRequestProxy::create):
* UIProcess/InspectorServer/HTTPRequest.h:
(WebKit::HTTPRequest::create):
* UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.cpp:
(WebKit::WebSoupCustomProtocolRequestManager::create):
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::create):
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/Notifications/NotificationPermissionRequest.cpp:
(WebKit::NotificationPermissionRequest::create):
* UIProcess/Notifications/NotificationPermissionRequest.h:
* UIProcess/Notifications/WebNotification.h:
(WebKit::WebNotification::create):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::scriptValueCallback):
* UIProcess/WebVibrationProxy.cpp:
(WebKit::WebVibrationProxy::create):
* UIProcess/WebVibrationProxy.h:
* UIProcess/WebViewportAttributes.h:
(WebKit::WebViewportAttributes::create):
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::createNonPersistent):
(WebKit::WebsiteDataStore::create):
* UIProcess/WebsiteData/WebsiteDataStore.h:
* UIProcess/gtk/WebColorPickerGtk.cpp:
(WebKit::WebColorPickerGtk::create):
* UIProcess/gtk/WebColorPickerGtk.h:
* UIProcess/gtk/WebContextMenuProxyGtk.h:
(WebKit::WebContextMenuProxyGtk::create):
* UIProcess/gtk/WebPopupMenuProxyGtk.h:
(WebKit::WebPopupMenuProxyGtk::create):
* UIProcess/mac/ViewSnapshotStore.h:
* UIProcess/mac/ViewSnapshotStore.mm:
(WebKit::ViewSnapshot::create):
* UIProcess/mac/WebColorPickerMac.h:
* UIProcess/mac/WebColorPickerMac.mm:
(WebKit::WebColorPickerMac::create):
* UIProcess/mac/WebContextMenuProxyMac.h:
(WebKit::WebContextMenuProxyMac::create):
* UIProcess/mac/WebPopupMenuProxyMac.h:
(WebKit::WebPopupMenuProxyMac::create):
* WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.h:
* WebProcess/Databases/WebToDatabaseProcessConnection.h:
(WebKit::WebToDatabaseProcessConnection::create):
* WebProcess/FullScreen/WebFullScreenManager.cpp:
(WebKit::WebFullScreenManager::create):
* WebProcess/FullScreen/WebFullScreenManager.h:
* WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
(WebKit::InjectedBundleRangeHandle::create):
* WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.h:
* WebProcess/InjectedBundle/InjectedBundleBackForwardList.h:
(WebKit::InjectedBundleBackForwardList::create):
2015-06-16 Carlos Alberto Lopez Perez <clopez@igalia.com>
Unreviewed build fix after r185615.
* UIProcess/API/gtk/WebKitWebContext.cpp:
(webkit_web_context_clear_cache): Comment the call to the code
removed and write down the bugzilla link for reimplementation.
2015-06-16 Anders Carlsson <andersca@apple.com>
Get rid of performAPICallbackWithSecurityOriginDataVector
https://bugs.webkit.org/show_bug.cgi?id=146039
Reviewed by Andreas Kling.
Get rid of performAPICallbackWithSecurityOriginDataVector since it's now no longer used
and add a bunch of includes to make up for SecurityOriginData.h no longer including GenericCallback.h.
* DatabaseProcess/DatabaseProcess.cpp:
* DatabaseProcess/DatabaseProcess.h:
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
* Shared/SecurityOriginData.cpp:
(WebKit::performAPICallbackWithSecurityOriginDataVector): Deleted.
* Shared/SecurityOriginData.h:
* Shared/WebsiteData/WebsiteData.cpp:
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
* WebProcess/MediaCache/WebMediaKeyStorageManager.cpp:
2015-06-16 Ryuan Choi <ryuan.choi@navercorp.com>
Unreviewed build fix attempt on CMake based port after r185623.
* CMakeLists.txt:
2015-06-16 Anders Carlsson <andersca@apple.com>
Move LocalStorageDetails into the local storage database tracker
https://bugs.webkit.org/show_bug.cgi?id=146034
Reviewed by Andreas Kling.
* UIProcess/API/C/WKKeyValueStorageManager.cpp:
(WKKeyValueStorageManagerGetStorageDetailsByOrigin):
(WKKeyValueStorageManagerDeleteAllEntries):
* UIProcess/LocalStorageDetails.h: Removed.
* UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
(WebKit::LocalStorageDatabaseTracker::originDetails):
(WebKit::LocalStorageDatabaseTracker::details): Deleted.
* UIProcess/Storage/LocalStorageDatabaseTracker.h:
* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::getLocalStorageOriginDetails):
(WebKit::StorageManager::getLocalStorageDetailsByOrigin): Deleted.
(WebKit::StorageManager::deleteAllLocalStorageEntries): Deleted.
* UIProcess/Storage/StorageManager.h:
* WebKit2.xcodeproj/project.pbxproj:
2015-06-16 Dan Bernstein <mitz@apple.com>
Removed the WebKit2SandboxProfiles target.
Rubber-stamped by Anders Carlsson.
WebKit2SandboxProfiles was just an alias for the Sandbox Profiles target, and its not
needed anymore.
* WebKit2.xcodeproj/project.pbxproj:
2015-06-16 Anders Carlsson <andersca@apple.com>
Fold WebKeyValueStorageManager into WKKeyValueStorageManager
https://bugs.webkit.org/show_bug.cgi?id=146030
Reviewed by Andreas Kling.
* UIProcess/API/C/WKAPICast.h:
* UIProcess/API/C/WKContext.cpp:
(WKContextGetKeyValueStorageManager):
* UIProcess/API/C/WKKeyValueStorageManager.cpp:
(WKKeyValueStorageManagerGetTypeID):
(WKKeyValueStorageManagerGetOriginKey):
(WKKeyValueStorageManagerGetCreationTimeKey):
(WKKeyValueStorageManagerGetModificationTimeKey):
(WKKeyValueStorageManagerGetKeyValueStorageOrigins):
(WKKeyValueStorageManagerGetStorageDetailsByOrigin):
(WKKeyValueStorageManagerDeleteEntriesForOrigin):
(WKKeyValueStorageManagerDeleteAllEntries):
* UIProcess/WebKeyValueStorageManager.cpp: Removed.
(WebKit::WebKeyValueStorageManager::supplementName): Deleted.
(WebKit::WebKeyValueStorageManager::originKey): Deleted.
(WebKit::WebKeyValueStorageManager::creationTimeKey): Deleted.
(WebKit::WebKeyValueStorageManager::modificationTimeKey): Deleted.
(WebKit::WebKeyValueStorageManager::create): Deleted.
(WebKit::WebKeyValueStorageManager::WebKeyValueStorageManager): Deleted.
(WebKit::WebKeyValueStorageManager::~WebKeyValueStorageManager): Deleted.
(WebKit::WebKeyValueStorageManager::refWebContextSupplement): Deleted.
(WebKit::WebKeyValueStorageManager::derefWebContextSupplement): Deleted.
(WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins): Deleted.
(WebKit::WebKeyValueStorageManager::getStorageDetailsByOrigin): Deleted.
(WebKit::WebKeyValueStorageManager::deleteEntriesForOrigin): Deleted.
(WebKit::WebKeyValueStorageManager::deleteAllEntries): Deleted.
* UIProcess/WebKeyValueStorageManager.h: Removed.
* UIProcess/WebProcessPool.cpp:
* WebKit2.xcodeproj/project.pbxproj:
2015-06-16 Alex Christensen <achristensen@webkit.org>
CMake build fix after r185615.
* CMakeLists.txt:
Remove WebResourceCacheManager from CMake build system.
2015-06-16 Alex Christensen <achristensen@webkit.org>
[Content Extensions] Implement branch compaction for DFA bytecode.
https://bugs.webkit.org/show_bug.cgi?id=145619
Reviewed by Benjamin Poulain.
* UIProcess/API/APIUserContentExtensionStore.h:
Increment version number to reflect changes to bytecode.
2015-06-16 Anders Carlsson <andersca@apple.com>
WebResourceCacheManager is unused, get rid of it
https://bugs.webkit.org/show_bug.cgi?id=146027
Reviewed by Sam Weinig.
* DerivedSources.make:
* UIProcess/API/C/WKAPICast.h:
* UIProcess/API/C/WKContext.cpp:
* UIProcess/WebProcessPool.cpp:
* UIProcess/WebResourceCacheManagerProxy.cpp: Removed.
(WebKit::WebResourceCacheManagerProxy::supplementName): Deleted.
(WebKit::WebResourceCacheManagerProxy::create): Deleted.
(WebKit::WebResourceCacheManagerProxy::WebResourceCacheManagerProxy): Deleted.
(WebKit::WebResourceCacheManagerProxy::~WebResourceCacheManagerProxy): Deleted.
(WebKit::WebResourceCacheManagerProxy::processPoolDestroyed): Deleted.
(WebKit::WebResourceCacheManagerProxy::processDidClose): Deleted.
(WebKit::WebResourceCacheManagerProxy::shouldTerminate): Deleted.
(WebKit::WebResourceCacheManagerProxy::refWebContextSupplement): Deleted.
(WebKit::WebResourceCacheManagerProxy::derefWebContextSupplement): Deleted.
(WebKit::WebResourceCacheManagerProxy::getCacheOrigins): Deleted.
(WebKit::WebResourceCacheManagerProxy::didGetCacheOrigins): Deleted.
(WebKit::WebResourceCacheManagerProxy::clearCacheForOrigin): Deleted.
(WebKit::WebResourceCacheManagerProxy::clearCacheForAllOrigins): Deleted.
* UIProcess/WebResourceCacheManagerProxy.h: Removed.
* UIProcess/WebResourceCacheManagerProxy.messages.in: Removed.
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/ResourceCache/WebResourceCacheManager.cpp: Removed.
(WebKit::WebResourceCacheManager::supplementName): Deleted.
(WebKit::WebResourceCacheManager::WebResourceCacheManager): Deleted.
(WebKit::WebResourceCacheManager::getCacheOrigins): Deleted.
(WebKit::WebResourceCacheManager::returnCacheOrigins): Deleted.
(WebKit::WebResourceCacheManager::clearCacheForOrigin): Deleted.
(WebKit::WebResourceCacheManager::clearCacheForAllOrigins): Deleted.
* WebProcess/ResourceCache/WebResourceCacheManager.h: Removed.
* WebProcess/ResourceCache/WebResourceCacheManager.messages.in: Removed.
* WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.mm: Removed.
(WebKit::partitionName): Deleted.
(WebKit::WebResourceCacheManager::cfURLCacheHostNamesWithCallback): Deleted.
(WebKit::WebResourceCacheManager::clearCFURLCacheForHostNames): Deleted.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess): Deleted.
2015-06-16 Alex Christensen <achristensen@webkit.org>
CMake build fix after r185601.
* CMakeLists.txt:
Remove application cache manager classes.
2015-06-16 Anders Carlsson <andersca@apple.com>
Stop calling into WebResourceCacheManager
https://bugs.webkit.org/show_bug.cgi?id=146026
Reviewed by Andreas Kling.
Copy the cache clearing code into NetworkProcessCocoa in preparation of getting rid of
the WebResourceCacheManager code.
* NetworkProcess/NetworkProcess.cpp:
(WebKit::fetchDiskCacheEntries):
(WebKit::clearDiskCacheEntries):
(WebKit::cfURLCacheOrigins): Deleted.
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::partitionName):
(WebKit::NetworkProcess::cfURLCacheOrigins):
(WebKit::NetworkProcess::clearCFURLCacheForOrigins):
2015-06-16 Anders Carlsson <andersca@apple.com>
Get rid of the application cache manager classes, they are no longer used
https://bugs.webkit.org/show_bug.cgi?id=146024
Reviewed by Sam Weinig.
* DerivedSources.make:
* UIProcess/API/C/WKAPICast.h:
* UIProcess/API/C/WKContext.cpp:
* UIProcess/WebApplicationCacheManagerProxy.cpp: Removed.
(WebKit::WebApplicationCacheManagerProxy::supplementName): Deleted.
(WebKit::WebApplicationCacheManagerProxy::create): Deleted.
(WebKit::WebApplicationCacheManagerProxy::WebApplicationCacheManagerProxy): Deleted.
(WebKit::WebApplicationCacheManagerProxy::~WebApplicationCacheManagerProxy): Deleted.
(WebKit::WebApplicationCacheManagerProxy::processPoolDestroyed): Deleted.
(WebKit::WebApplicationCacheManagerProxy::processDidClose): Deleted.
(WebKit::WebApplicationCacheManagerProxy::shouldTerminate): Deleted.
(WebKit::WebApplicationCacheManagerProxy::refWebContextSupplement): Deleted.
(WebKit::WebApplicationCacheManagerProxy::derefWebContextSupplement): Deleted.
(WebKit::WebApplicationCacheManagerProxy::getApplicationCacheOrigins): Deleted.
(WebKit::WebApplicationCacheManagerProxy::didGetApplicationCacheOrigins): Deleted.
(WebKit::WebApplicationCacheManagerProxy::deleteEntriesForOrigin): Deleted.
(WebKit::WebApplicationCacheManagerProxy::deleteAllEntries): Deleted.
* UIProcess/WebApplicationCacheManagerProxy.h: Removed.
* UIProcess/WebApplicationCacheManagerProxy.messages.in: Removed.
* UIProcess/WebProcessPool.cpp:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/ApplicationCache/WebApplicationCacheManager.cpp: Removed.
(WebKit::WebApplicationCacheManager::supplementName): Deleted.
(WebKit::WebApplicationCacheManager::WebApplicationCacheManager): Deleted.
(WebKit::WebApplicationCacheManager::getApplicationCacheOrigins): Deleted.
(WebKit::WebApplicationCacheManager::deleteEntriesForOrigin): Deleted.
(WebKit::WebApplicationCacheManager::deleteAllEntries): Deleted.
(WebKit::WebApplicationCacheManager::setAppCacheMaximumSize): Deleted.
* WebProcess/ApplicationCache/WebApplicationCacheManager.h: Removed.
* WebProcess/ApplicationCache/WebApplicationCacheManager.messages.in: Removed.
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::clearApplicationCache):
(WebKit::InjectedBundle::setAppCacheMaximumSize):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess): Deleted.
2015-06-16 Brady Eidson <beidson@apple.com>
IDB: Records table migration doesn't work with all versions of SQLite.
https://bugs.webkit.org/show_bug.cgi?id=145993
Reviewed by Darin Adler, provisionally reviewed by Jon Lee.
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
(WebKit::v1RecordsTableSchema):
(WebKit::v1RecordsTableSchemaAlternate):
(WebKit::v2RecordsTableSchema):
(WebKit::v2RecordsTableSchemaAlternate):
(WebKit::createOrMigrateRecordsTableIfNecessary): Check both v1 and v1 Alternate whenever we check for the v1 schema.
Ditto for the v2 schema. Crash all builds if the current schema is none of these.
2015-06-16 Dan Bernstein <mitz@apple.com>
Build fix.
* mac/postprocess-framework-headers.sh:
2015-06-16 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r185552.
https://bugs.webkit.org/show_bug.cgi?id=146015
It broke some WK2 API tests on EFL bots (Requested by
gyuyoung on #webkit).
Reverted changeset:
"[EFL] Make send/receive messages to communicate the Web and
UI Processes using Injected Bundle."
https://bugs.webkit.org/show_bug.cgi?id=145685
http://trac.webkit.org/changeset/185552
2015-06-16 Ryuan Choi <ryuan.choi@navercorp.com>
[EFL] Add API tests for ewk_page
https://bugs.webkit.org/show_bug.cgi?id=146004
Reviewed by Gyuyoung Kim.
Add unit test for load_started/load_finished callbacks of ewk_page.
* PlatformEfl.cmake:
* UIProcess/API/efl/tests/extensions/extension_sample.cpp:
* UIProcess/API/efl/tests/test_ewk2_page.cpp: Added.
(EWK2PageTest::messageReceivedCallback):
(EWK2PageTest::EWK2PageTest):
(TEST_F):
2015-06-15 Simon Fraser <simon.fraser@apple.com>
[iOS WK2] position:fixed elements sometimes truncated on scroll view bouncing
https://bugs.webkit.org/show_bug.cgi?id=146000
rdar://problem/19448439
Reviewed by Benjamin Poulain.
When in the middle of a rubber-band (UIScrollView bounce), we could send a bad
fixed position rect down to WebCore, causing 100% height elements to get laid out
at the wrong height, possible too short. This occurred when -_updateVisibleContentRects
said we were in a stable state, but the rubber-band offset caused WebPageProxy::computeCustomFixedPositionRect()
to compute a bad rect via constrainedUnobscuredRect.intersect(documentRect).
Fix by not claiming to be in a stable state during rubber-banding. Added _scrollViewIsRubberBanding
to compute that, taking care with floating point comparisons for 3x devices.
* UIProcess/API/Cocoa/WKWebView.mm:
(isGreaterInDevicePixels):
(-[WKWebView _scrollViewIsRubberBanding]):
(-[WKWebView _updateVisibleContentRects]):
2015-06-15 Ryuan Choi <ryuan.choi@navercorp.com>
Fix build break when ENABLE_SECCOMP_FILTERS is ON
https://bugs.webkit.org/show_bug.cgi?id=145967
Reviewed by Carlos Garcia Campos.
Since r183189, ArgumentEncoder::addAttachment requires rvalue reference.
* Shared/linux/SeccompFilters/OpenSyscall.cpp:
(WebKit::OpenSyscallResult::encode): Use WTF::move().
2015-06-15 Chris Dumez <cdumez@apple.com>
[WK2] BrowsingContextController.loadData API is leaking Navigation objects
https://bugs.webkit.org/show_bug.cgi?id=145977
<rdar://problem/21305706>
Reviewed by Darin Adler.
BrowsingContextController.loadData API was leaking Navigation objects.
The issue was due to WebPageProxy::loadData() creating a Navigation
object but not passing along the navigationID to the WebProcess when
sending the Messages::WebPage::LoadData IPC. As a result, the
WebProcess would use 0 as navigationID and we would end up creating a
new Navigation object later on for the same navigation.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::loadData):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::loadData):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
2015-06-15 Dan Bernstein <mitz@apple.com>
REGRESSION (r185298): Databases service has Web Content services entitlements
https://bugs.webkit.org/show_bug.cgi?id=145980
Reviewed by Darin Adler.
* Configurations/DatabaseService.xcconfig: Set WK_XPC_SERVICE_IOS_ENTITLEMENTS_BASE to
Databases-iOS.
2015-06-11 Jon Lee <jonlee@apple.com>
[WK2] Add allowsPictureInPictureMediaPlayback
https://bugs.webkit.org/show_bug.cgi?id=145901
rdar://problem/21349851
Reviewed by Anders Carlsson.
Replace _allowsAlternateFullscreen with allowsPictureInPictureMediaPlayback.
* UIProcess/API/Cocoa/WKWebViewConfiguration.h: Add allowsPictureInPictureMediaPlayback.
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration init]): Remove _allowsAlternateFullscreen.
(-[WKWebViewConfiguration copyWithZone:]): Replace the variable.
(-[WKWebViewConfiguration _allowsAlternateFullscreen]): Deleted.
(-[WKWebViewConfiguration _setAllowsAlternateFullscreen:]): Deleted.
* UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h: Remove the SPI.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]): Update to use the new API.
2015-06-12 Alexey Proskuryakov <ap@apple.com>
-[WKWebView evaluateJavaScript] provides a misleading error when the return cannot be serialized
https://bugs.webkit.org/show_bug.cgi?id=145900
Reviewed by Sam Weinig.
We used to conflate to cases: (1) when there was a JavaScript exception, and
(2) when the result could not be serialized for IPC. Turns out that it was quite
misleading!
* UIProcess/API/C/WKPage.cpp:
(WKPageRunJavaScriptInMainFrame):
* UIProcess/API/Cocoa/WKError.h:
* UIProcess/API/Cocoa/WKError.mm:
(localizedDescriptionForErrorCode):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView evaluateJavaScript:completionHandler:]):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::runJavaScriptInMainFrame):
(WebKit::WebPageProxy::scriptValueCallback):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::runJavaScriptInMainFrame):
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkit_web_view_run_javascript):
(resourcesStreamReadCallback):
2015-06-15 Carlos Garcia Campos <cgarcia@igalia.com>
[SOUP] Custom URI schemes don't work for requests containing a fragment identifier
https://bugs.webkit.org/show_bug.cgi?id=145969
Reviewed by Sergio Villar Senin.
Use the WebKitSoupRequestGeneric request instead of creating a new one
from the SoupRequest URI, since that is the network one and doesn't
contain the fragment identifier part.
* Shared/Network/CustomProtocols/soup/CustomProtocolManagerImpl.cpp:
(WebKit::CustomProtocolManagerImpl::start):
2015-06-15 Hyungwook Lee <hyungwook.lee@navercorp.com>
[EFL] Make send/receive messages to communicate the Web and UI Processes using Injected Bundle.
https://bugs.webkit.org/show_bug.cgi?id=145685
Reviewed by Gyuyoung Kim.
To have extensible port specific API facility using Injected Bundle,
we need to load libewebkit_extension_manager.so in default that is same as what gtk port does.
* UIProcess/API/efl/ewk_context.cpp:
(EwkContext::EwkContext):
(EwkContext::~EwkContext):
(EwkContext::findOrCreateWrapper):
(bundlePathForExtension):
(EwkContext::create): Deleted.
* UIProcess/API/efl/ewk_context_private.h:
* WebProcess/efl/ExtensionManagerEfl.cpp:
(WebKit::ExtensionManagerEfl::initialize):
2015-06-15 Carlos Garcia Campos <cgarcia@igalia.com>
[SOUP] Move WebKitSoupRequestGeneric to platform layer
https://bugs.webkit.org/show_bug.cgi?id=145968
Reviewed by Sergio Villar Senin.
* PlatformEfl.cmake: Remove WebKitSoupRequestGeneric.
* PlatformGTK.cmake: Ditto.
* Shared/Network/CustomProtocols/soup/CustomProtocolManagerImpl.cpp:
* Shared/Network/CustomProtocols/soup/CustomProtocolManagerImpl.h:
2015-06-15 Csaba Osztrogonác <ossy@webkit.org>
Fix unused private field warning in PageBanner.h
https://bugs.webkit.org/show_bug.cgi?id=145925
Reviewed by Darin Adler.
* WebProcess/WebPage/PageBanner.cpp:
(WebKit::PageBanner::~PageBanner):
* WebProcess/WebPage/PageBanner.h: Initialize m_type, m_webPage, m_mouseDownInBanner, and m_isHidden here instead of in the constructor.
* WebProcess/WebPage/mac/PageBannerMac.mm: Use PLATFORM(MAC) instead of !PLATFORM(IOS), they are same in objc files.
2015-06-15 Carlos Garcia Campos <cgarcia@igalia.com>
[SOUP] Make WebKitSoupRequestGeneric independent from CustomProtocolManagerImpl
https://bugs.webkit.org/show_bug.cgi?id=145966
Reviewed by Sergio Villar Senin.
Add WebKitSoupRequestGenericClient with start and finish methods,
that are implemented by WebKitSoupRequestGeneric.
This allows us to move WebKitSoupRequestGeneric to platform layer.
* Shared/Network/CustomProtocols/soup/CustomProtocolManagerImpl.cpp:
(WebKit::CustomProtocolManagerImpl::registerScheme):
(WebKit::CustomProtocolManagerImpl::start):
* Shared/Network/CustomProtocols/soup/CustomProtocolManagerImpl.h:
* WebProcess/soup/WebKitSoupRequestGeneric.cpp:
(webkitSoupRequestGenericSendAsync):
(webkitSoupRequestGenericSendFinish):
* WebProcess/soup/WebKitSoupRequestGeneric.h:
* WebProcess/soup/WebKitSoupRequestGenericClient.h: Added.
2015-06-14 Dan Bernstein <mitz@apple.com>
Fixed the build.
* mac/postprocess-framework-headers.sh:
2015-06-14 Michael Catanzaro <mcatanzaro@igalia.com>
Format string misuse in DatabaseProcessIDBConnection.cpp and UniqueIDBDatabaseBackingStoreSQLite.cpp
https://bugs.webkit.org/show_bug.cgi?id=145960
Reviewed by Darin Adler.
Use PRIu64 and PRIi64 to print uint64_t and int64_t, respectively. These things are
different types on x86_64 Linux (unsigned long) and on Mac (unsigned long long).
* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
(WebKit::DatabaseProcessIDBConnection::getOrEstablishIDBDatabaseMetadata):
(WebKit::DatabaseProcessIDBConnection::deleteDatabase):
(WebKit::DatabaseProcessIDBConnection::openTransaction):
(WebKit::DatabaseProcessIDBConnection::beginTransaction):
(WebKit::DatabaseProcessIDBConnection::commitTransaction):
(WebKit::DatabaseProcessIDBConnection::resetTransaction):
(WebKit::DatabaseProcessIDBConnection::rollbackTransaction):
(WebKit::DatabaseProcessIDBConnection::changeDatabaseVersion):
(WebKit::DatabaseProcessIDBConnection::createObjectStore):
(WebKit::DatabaseProcessIDBConnection::deleteObjectStore):
(WebKit::DatabaseProcessIDBConnection::clearObjectStore):
(WebKit::DatabaseProcessIDBConnection::createIndex):
(WebKit::DatabaseProcessIDBConnection::deleteIndex):
(WebKit::DatabaseProcessIDBConnection::putRecord):
(WebKit::DatabaseProcessIDBConnection::getRecord):
(WebKit::DatabaseProcessIDBConnection::count):
(WebKit::DatabaseProcessIDBConnection::deleteRange):
(WebKit::DatabaseProcessIDBConnection::openCursor):
(WebKit::DatabaseProcessIDBConnection::cursorAdvance):
(WebKit::DatabaseProcessIDBConnection::cursorIterate):
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteObjectStore):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::clearObjectStore):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteIndex):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::generateKeyNumber):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::keyExistsInObjectStore):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::putRecord):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::uncheckedPutIndexRecord):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteRecord):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::getKeyRecordFromObjectStore):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::getKeyRangeRecordFromObjectStore):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::advanceCursor):
2015-06-14 Dan Bernstein <mitz@apple.com>
[Cocoa] Clean up postprocess-framework-headers.sh
https://bugs.webkit.org/show_bug.cgi?id=145962
Reviewed by Darin Adler.
* mac/postprocess-framework-headers.sh: Gather all the sed options in a variable, and then
run sed only once on each header. Also, correctly exit with the sed return value if it
fails.
2015-06-13 Chris Dumez <cdumez@apple.com>
[WK2] API::Navigation objects are leaked on history navigation to HistoryItems in PageCache
https://bugs.webkit.org/show_bug.cgi?id=145948
Reviewed by Darin Adler.
API::Navigation objects were leaked on history navigation to
HistoryItems in PageCache. In such case, we would create 2 Navigation
objects instead of 1 and the first one would be leaked. The reason
we create the second one is because we fail to pass along the
navigationID from the UIProcess to the WebProcess and then back to the
UIProcess. On the IPC back to the UIProcess, the navigationID ends up
being 0 so the UIProcess creates a new Navigation object, thinking that
the load was triggered by the WebContent process.
We now pass along the navigationID, even if the HistoryItem is in the
PageCache and we end up reusing the cached DocumentLoader, instead of
creating a new one. A new updateCachedDocumentLoader() delegate is
added to the FrameLoaderClient, similarly to the pre-existing
createDocumentLoader() but for the case where the DocumentLoader gets
reused.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::updateCachedDocumentLoader):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::goForward):
(WebKit::WebPage::goBack):
(WebKit::WebPage::goToBackForwardItem):
(WebKit::WebPage::updateCachedDocumentLoader):
* WebProcess/WebPage/WebPage.h:
2015-06-12 Gavin Barraclough <barraclough@apple.com>
Add private API to force page to always run at foreground priority
https://bugs.webkit.org/show_bug.cgi?id=145946
<rdar://problem/21267221>
Reviewed by Anders Carlsson.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
- copy _alwaysRunsAtForegroundPriority to WebPageConfiguration.
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration _alwaysRunsAtForegroundPriority]):
(-[WKWebViewConfiguration _setAlwaysRunsAtForegroundPriority:]):
- added _alwaysRunsAtForegroundPriority.
* UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
- added _alwaysRunsAtForegroundPriority.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
- initialize m_alwaysRunsAtForegroundPriority.
(WebKit::WebPageProxy::updateActivityToken):
- if m_alwaysRunsAtForegroundPriority is set always take the foreground activity token.
* UIProcess/WebPageProxy.h:
- added m_alwaysRunsAtForegroundPriority, alwaysRunsAtForegroundPriority.
2015-06-12 Anders Carlsson <andersca@apple.com>
Reimplement WKResourceCacheManagerRef on top of WKWebsiteDataStoreRef
https://bugs.webkit.org/show_bug.cgi?id=145951
Reviewed by Darin Adler.
* UIProcess/API/C/WKContext.cpp:
(WKContextGetResourceCacheManager):
* UIProcess/API/C/WKResourceCacheManager.cpp:
(WKResourceCacheManagerGetTypeID):
(toWebsiteDataTypes):
(WKResourceCacheManagerGetCacheOrigins):
(WKResourceCacheManagerClearCacheForOrigin):
(WKResourceCacheManagerClearCacheForAllOrigins):
2015-06-12 Anders Carlsson <andersca@apple.com>
Reimplement WKApplicationCacheManagerRef as WKWebsiteDataStoreRef
https://bugs.webkit.org/show_bug.cgi?id=145950
Reviewed by Dan Bernstein.
* UIProcess/API/C/WKAPICast.h:
* UIProcess/API/C/WKApplicationCacheManager.cpp:
(WKApplicationCacheManagerGetTypeID):
(WKApplicationCacheManagerGetApplicationCacheOrigins):
(WKApplicationCacheManagerDeleteEntriesForOrigin):
(WKApplicationCacheManagerDeleteAllEntries):
* UIProcess/API/C/WKContext.cpp:
(WKContextGetApplicationCacheManager):
(WKContextGetPluginSiteDataManager):
2015-06-12 Anders Carlsson <andersca@apple.com>
Clean up IndexedDB website data retrieval and removal
https://bugs.webkit.org/show_bug.cgi?id=145941
Reviewed by Andreas Kling.
- Use SecurityOrigin instead of SecurityOriginData; It's not possible to pass SecurityOriginData
safely between threads.
- Use std::chrono instead of double for modification times.
- Get rid of endTime since it's not used.
- Change deleteIndexedDatabaseEntriesForOrigin to deleteIndexedDatabaseEntriesForOrigins and make it take
a vector of origins instead of a single one.
- Get rid of deleteAllIndexedDatabaseEntries.
- Change SecurityOriginData::securityOrigin to call isolatedCopy on the origin components, since it's common
to pass origins to other threads and we want that to be safe.
* DatabaseProcess/DatabaseProcess.cpp:
(WebKit::DatabaseProcess::fetchWebsiteData):
(WebKit::DatabaseProcess::deleteWebsiteData):
(WebKit::DatabaseProcess::deleteWebsiteDataForOrigins):
(WebKit::DatabaseProcess::indexedDatabaseOrigins):
(WebKit::removeAllDatabasesForOriginPath):
(WebKit::DatabaseProcess::deleteIndexedDatabaseEntriesForOrigins):
(WebKit::DatabaseProcess::deleteIndexedDatabaseEntriesModifiedSince):
(WebKit::DatabaseProcess::getIndexedDatabaseOrigins): Deleted.
(WebKit::DatabaseProcess::deleteIndexedDatabaseEntriesForOrigin): Deleted.
(WebKit::DatabaseProcess::deleteIndexedDatabaseEntriesModifiedBetweenDates): Deleted.
(WebKit::DatabaseProcess::deleteAllIndexedDatabaseEntries): Deleted.
* DatabaseProcess/DatabaseProcess.h:
* Shared/SecurityOriginData.cpp:
(WebKit::SecurityOriginData::securityOrigin):
2015-06-12 Antti Koivisto <antti@apple.com>
Network Cache: Use SHA1 for header checksum
https://bugs.webkit.org/show_bug.cgi?id=145928
Reviewed by Chris Dumez.
Use SHA1 everywhere for consistency and robustness.
* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::Storage::bodyPathForKey):
(WebKit::NetworkCache::RecordMetaData::RecordMetaData):
(WebKit::NetworkCache::decodeRecordMetaData):
(WebKit::NetworkCache::decodeRecordHeader):
(WebKit::NetworkCache::encodeRecordMetaData):
(WebKit::NetworkCache::Storage::encodeRecord):
(WebKit::NetworkCache::hashData): Deleted.
This was the last user of 32 bit hashes in cache code.
* NetworkProcess/cache/NetworkCacheStorage.h:
Also bump the cache version number as recent changes have changed the format.
Old caches would transition fine but this makes it easier to identify which version user has.
2015-06-12 Simon Fraser <simon.fraser@apple.com>
[iOS WK2] Video with reflection crashes WebKit and Safari
https://bugs.webkit.org/show_bug.cgi?id=145905
rdar://problem/18364939
Reviewed by Anders Carlsson.
On iOS, AVPlayerLayers are contained inside a WebVideoContainerLayer, but
the layer type is still LayerTypeAVPlayerLayer.
Avoid throwing exceptions when cloning such layers by checking the layer class.
* WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
(WebKit::PlatformCALayerRemoteCustom::clone):
2015-06-12 Csaba Osztrogonác <ossy@webkit.org>
[EFL] Fix unused private field warning in WebContextMenuProxyEfl.cpp
https://bugs.webkit.org/show_bug.cgi?id=145911
Reviewed by Darin Adler.
* UIProcess/efl/WebContextMenuProxyEfl.cpp:
(WebKit::WebContextMenuProxyEfl::WebContextMenuProxyEfl): Deleted.
* UIProcess/efl/WebContextMenuProxyEfl.h:
2015-06-12 Zan Dobersek <zdobersek@igalia.com>
Unreviewed build fix after r185502.
* NetworkProcess/cache/NetworkCacheFileSystem.cpp:
GRefPtr.h header has been moved to a different place.
2015-06-12 Zan Dobersek <zdobersek@igalia.com>
[GLib] Move files under Source/WTF/wtf/gobject to Source/WTF/wtf/glib
https://bugs.webkit.org/show_bug.cgi?id=145799
Reviewed by Carlos Garcia Campos.
Update header inclusions for headers that have been moved
to Source/WTF/wtf/glib/.
* NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
* NetworkProcess/cache/NetworkCacheIOChannel.h:
* NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
* NetworkProcess/soup/NetworkProcessSoup.cpp:
* PlatformEfl.cmake:
* PlatformGTK.cmake:
* Shared/Downloads/soup/DownloadSoup.cpp:
* Shared/Network/CustomProtocols/soup/CustomProtocolManagerImpl.h:
* Shared/PrintInfo.h:
* Shared/gtk/ArgumentCodersGtk.cpp:
* Shared/gtk/ArgumentCodersGtk.h:
* Shared/gtk/KeyedDecoder.h:
* Shared/gtk/KeyedEncoder.h:
* Shared/gtk/ProcessExecutablePathGtk.cpp:
* UIProcess/API/gtk/WebKitBackForwardList.cpp:
* UIProcess/API/gtk/WebKitBackForwardListItem.cpp:
* UIProcess/API/gtk/WebKitColorChooser.h:
* UIProcess/API/gtk/WebKitContextMenu.cpp:
* UIProcess/API/gtk/WebKitContextMenuItem.cpp:
* UIProcess/API/gtk/WebKitCookieManager.cpp:
* UIProcess/API/gtk/WebKitDownload.cpp:
* UIProcess/API/gtk/WebKitDownloadClient.cpp:
* UIProcess/API/gtk/WebKitFaviconDatabase.cpp:
* UIProcess/API/gtk/WebKitFileChooserRequest.cpp:
* UIProcess/API/gtk/WebKitFindController.cpp:
* UIProcess/API/gtk/WebKitFormClient.cpp:
* UIProcess/API/gtk/WebKitFormSubmissionRequest.cpp:
* UIProcess/API/gtk/WebKitInjectedBundleClient.cpp:
* UIProcess/API/gtk/WebKitJavascriptResult.cpp:
* UIProcess/API/gtk/WebKitLoaderClient.cpp:
* UIProcess/API/gtk/WebKitMimeInfo.cpp:
* UIProcess/API/gtk/WebKitNavigationAction.cpp:
* UIProcess/API/gtk/WebKitNavigationPolicyDecision.cpp:
* UIProcess/API/gtk/WebKitPolicyClient.cpp:
* UIProcess/API/gtk/WebKitPrintOperation.cpp:
* UIProcess/API/gtk/WebKitResponsePolicyDecision.cpp:
* UIProcess/API/gtk/WebKitUIClient.cpp:
* UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
* UIProcess/API/gtk/WebKitUserContentManager.cpp:
* UIProcess/API/gtk/WebKitWebContext.cpp:
* UIProcess/API/gtk/WebKitWebInspector.cpp:
* UIProcess/API/gtk/WebKitWebResource.cpp:
* UIProcess/API/gtk/WebKitWebView.cpp:
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
* UIProcess/InspectorServer/WebSocketServer.h:
* UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp:
* UIProcess/InspectorServer/soup/WebSocketServerSoup.cpp:
* UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
* UIProcess/Plugins/gtk/PluginInfoCache.h:
* UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
* UIProcess/gtk/DragAndDropHandler.cpp:
* UIProcess/gtk/GestureController.h:
* UIProcess/gtk/InputMethodFilter.cpp:
* UIProcess/gtk/InputMethodFilter.h:
* UIProcess/gtk/WebInspectorProxyGtk.cpp:
* UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
* UIProcess/gtk/WebPopupMenuProxyGtk.h:
* UIProcess/gtk/WebProcessPoolGtk.cpp:
* WebProcess/Cookies/soup/WebCookieManagerSoup.cpp:
* WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp:
* WebProcess/InjectedBundle/API/gtk/WebKitWebHitTestResult.cpp:
* WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
* WebProcess/WebPage/gtk/PrinterListGtk.h:
* WebProcess/WebPage/gtk/WebPageGtk.cpp:
* WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
* WebProcess/WebPage/gtk/WebPrintOperationGtk.h:
* WebProcess/gtk/WebGtkExtensionManager.h:
* WebProcess/soup/WebKitSoupRequestInputStream.cpp:
* WebProcess/soup/WebProcessSoup.cpp:
* WebProcess/soup/WebSoupRequestManager.h:
2015-06-12 Antti Koivisto <antti@apple.com>
Network Cache: Use SHA1 for key hash
https://bugs.webkit.org/show_bug.cgi?id=143829
Reviewed by Anders Carlsson.
For consistency with blobs, use SHA1 instead of MD5.
* NetworkProcess/cache/NetworkCacheCoders.cpp:
(WebKit::NetworkCache::Coder<MD5::Digest>::encode): Deleted.
(WebKit::NetworkCache::Coder<MD5::Digest>::decode): Deleted.
No longer needed.
* NetworkProcess/cache/NetworkCacheCoders.h:
* NetworkProcess/cache/NetworkCacheKey.cpp:
(WebKit::NetworkCache::hashString):
(WebKit::NetworkCache::Key::computeHash):
* NetworkProcess/cache/NetworkCacheKey.h:
2015-06-12 Csaba Osztrogonác <ossy@webkit.org>
Fix mismatched-tags warning in Source/WebKit2/UIProcess/gtk/InputMethodFilter.h
https://bugs.webkit.org/show_bug.cgi?id=145923
Reviewed by Carlos Garcia Campos.
* UIProcess/gtk/InputMethodFilter.h:
2015-06-12 Antti Koivisto <antti@apple.com>
Use SHA1 for cache coder checksums
https://bugs.webkit.org/show_bug.cgi?id=145880
Reviewed by Anders Carlsson.
Make cache data error detection more robust by using SHA1 for checksums.
* NetworkProcess/cache/NetworkCacheDecoder.cpp:
(WebKit::NetworkCache::Decoder::Decoder):
(WebKit::NetworkCache::Decoder::decodeFixedLengthData):
(WebKit::NetworkCache::Decoder::decodeNumber):
(WebKit::NetworkCache::Decoder::verifyChecksum):
* NetworkProcess/cache/NetworkCacheDecoder.h:
* NetworkProcess/cache/NetworkCacheEncoder.cpp:
(WebKit::NetworkCache::Encoder::Encoder):
(WebKit::NetworkCache::Encoder::grow):
(WebKit::NetworkCache::Encoder::updateChecksumForData):
(WebKit::NetworkCache::Encoder::encodeFixedLengthData):
(WebKit::NetworkCache::Encoder::encodeNumber):
(WebKit::NetworkCache::Encoder::encodeChecksum):
* NetworkProcess/cache/NetworkCacheEncoder.h:
(WebKit::NetworkCache::Encoder::buffer):
(WebKit::NetworkCache::Encoder::bufferSize):
(WebKit::NetworkCache::Encoder::updateChecksumForNumber):
2015-06-12 Csaba Osztrogonác <ossy@webkit.org>
[EFL] Fix deprecated declarations warnings related to WK2 versioned structs
https://bugs.webkit.org/show_bug.cgi?id=145913
Reviewed by Gyuyoung Kim.
* UIProcess/API/efl/ewk_favicon_database.cpp:
(EwkFaviconDatabase::EwkFaviconDatabase):
* UIProcess/efl/ContextHistoryClientEfl.cpp:
(WebKit::ContextHistoryClientEfl::ContextHistoryClientEfl):
* UIProcess/efl/ContextMenuClientEfl.cpp:
(ContextMenuClientEfl::ContextMenuClientEfl):
* UIProcess/efl/DownloadManagerEfl.cpp:
(WebKit::DownloadManagerEfl::DownloadManagerEfl):
* UIProcess/efl/FindClientEfl.cpp:
(WebKit::FindClientEfl::FindClientEfl):
* UIProcess/efl/FormClientEfl.cpp:
(WebKit::FormClientEfl::FormClientEfl):
* UIProcess/efl/PageUIClientEfl.cpp:
(WebKit::PageUIClientEfl::PageUIClientEfl):
2015-06-11 Mark Lam <mark.lam@apple.com>
WebCore::reportException() needs to be able to accept a raw thrown value in addition to Exception objects.
https://bugs.webkit.org/show_bug.cgi?id=145872
Reviewed by Michael Saboff.
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::reportException):
- Don't assume we have an Exception object. Let WebCore::reportException() take
care of it.
2015-06-11 Carlos Alberto Lopez Perez <clopez@igalia.com>
[CMake] Unreviewed build fix after r185479.
* CMakeLists.txt: Unlist the files that r185479 deleted.
2015-06-11 Anders Carlsson <andersca@apple.com>
Get rid of WebOriginDataManager
https://bugs.webkit.org/show_bug.cgi?id=145896
Reviewed by Andreas Kling.
* DatabaseProcess/DatabaseProcess.cpp:
(WebKit::DatabaseProcess::DatabaseProcess): Deleted.
(WebKit::DatabaseProcess::getOrigins): Deleted.
(WebKit::DatabaseProcess::deleteEntriesForOrigin): Deleted.
(WebKit::DatabaseProcess::deleteEntriesModifiedBetweenDates): Deleted.
(WebKit::DatabaseProcess::deleteAllEntries): Deleted.
* DatabaseProcess/DatabaseProcess.h:
* DerivedSources.make:
* UIProcess/API/C/WKAPICast.h:
* UIProcess/API/C/WKContext.cpp:
* UIProcess/Databases/DatabaseProcessProxy.cpp:
(WebKit::DatabaseProcessProxy::didReceiveMessage): Deleted.
* UIProcess/WebOriginDataManagerProxy.cpp: Removed.
(WebKit::WebOriginDataManagerProxy::supplementName): Deleted.
(WebKit::WebOriginDataManagerProxy::create): Deleted.
(WebKit::WebOriginDataManagerProxy::WebOriginDataManagerProxy): Deleted.
(WebKit::WebOriginDataManagerProxy::~WebOriginDataManagerProxy): Deleted.
(WebKit::WebOriginDataManagerProxy::processPoolDestroyed): Deleted.
(WebKit::WebOriginDataManagerProxy::processDidClose): Deleted.
(WebKit::WebOriginDataManagerProxy::shouldTerminate): Deleted.
(WebKit::WebOriginDataManagerProxy::refWebContextSupplement): Deleted.
(WebKit::WebOriginDataManagerProxy::derefWebContextSupplement): Deleted.
(WebKit::CallbackSynchronizer::create): Deleted.
(WebKit::CallbackSynchronizer::~CallbackSynchronizer): Deleted.
(WebKit::CallbackSynchronizer::taskStarted): Deleted.
(WebKit::CallbackSynchronizer::taskCompleted): Deleted.
(WebKit::CallbackSynchronizer::CallbackSynchronizer): Deleted.
(WebKit::createSynchronizedCallback): Deleted.
(WebKit::sendMessageToAllProcessesInProcessPool): Deleted.
(WebKit::WebOriginDataManagerProxy::getOrigins): Deleted.
(WebKit::WebOriginDataManagerProxy::didGetOrigins): Deleted.
(WebKit::WebOriginDataManagerProxy::deleteEntriesForOrigin): Deleted.
(WebKit::WebOriginDataManagerProxy::deleteEntriesModifiedBetweenDates): Deleted.
(WebKit::WebOriginDataManagerProxy::didDeleteEntries): Deleted.
(WebKit::WebOriginDataManagerProxy::deleteAllEntries): Deleted.
(WebKit::WebOriginDataManagerProxy::didDeleteAllEntries): Deleted.
* UIProcess/WebOriginDataManagerProxy.h: Removed.
* UIProcess/WebOriginDataManagerProxy.messages.in: Removed.
* UIProcess/WebProcessPool.cpp:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/OriginData/WebOriginDataManager.cpp: Removed.
(WebKit::WebOriginDataManager::WebOriginDataManager): Deleted.
(WebKit::WebOriginDataManager::getOrigins): Deleted.
(WebKit::WebOriginDataManager::deleteEntriesForOrigin): Deleted.
(WebKit::WebOriginDataManager::deleteEntriesModifiedBetweenDates): Deleted.
(WebKit::WebOriginDataManager::deleteAllEntries): Deleted.
* WebProcess/OriginData/WebOriginDataManager.h: Removed.
* WebProcess/OriginData/WebOriginDataManager.messages.in: Removed.
* WebProcess/OriginData/WebOriginDataManagerSupplement.h: Removed.
(WebKit::WebOriginDataManagerSupplement::WebOriginDataManagerSupplement): Deleted.
(WebKit::WebOriginDataManagerSupplement::~WebOriginDataManagerSupplement): Deleted.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
* WebProcess/WebPage/WebPage.cpp:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::~WebProcess):
(WebKit::WebProcess::WebProcess): Deleted.
(WebKit::WebProcess::getOrigins): Deleted.
(WebKit::WebProcess::deleteEntriesForOrigin): Deleted.
(WebKit::WebProcess::deleteEntriesModifiedBetweenDates): Deleted.
(WebKit::WebProcess::deleteAllEntries): Deleted.
* WebProcess/WebProcess.h:
* WebProcess/cocoa/WebProcessCocoa.mm:
2015-06-11 Matt Rajca <mrajca@apple.com>
Media Session: Add plumbing for media control event delivery.
https://bugs.webkit.org/show_bug.cgi?id=145859
Reviewed by Anders Carlsson.
* UIProcess/API/C/WKPage.cpp:
(WKPageHandleMediaEvent):
* UIProcess/API/C/WKPagePrivate.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::handleMediaEvent):
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::handleMediaEvent):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
2015-06-11 Myles C. Maxfield <mmaxfield@apple.com>
[OS X] Decoding fonts may return nil when using force click
https://bugs.webkit.org/show_bug.cgi?id=145890
Reviewed by Beth Dakin.
[NSFontDescriptor fontDescriptorWithFontAttributes] might return nil, which
causes the encoding of an NSFont to erroneously return true.
* Shared/mac/ArgumentCodersMac.mm:
(IPC::decode):
2015-06-11 Anders Carlsson <andersca@apple.com>
Reimplement WKOriginDataManager in terms of API::WebsiteDataStore
https://bugs.webkit.org/show_bug.cgi?id=145889
Reviewed by Dan Bernstein.
* UIProcess/API/C/WKAPICast.h:
* UIProcess/API/C/WKContext.cpp:
(WKContextGetOriginDataManager):
* UIProcess/API/C/WKOriginDataManager.cpp:
(WKOriginDataManagerGetTypeID):
(WKOriginDataManagerGetOrigins):
(WKOriginDataManagerDeleteEntriesForOrigin):
(WKOriginDataManagerDeleteEntriesModifiedBetweenDates):
(WKOriginDataManagerDeleteAllEntries):
2015-06-11 Brent Fulgham <bfulgham@apple.com>
Full screen video space can be resized to 1pt wide
https://bugs.webkit.org/show_bug.cgi?id=145895
<rdar://problem/20907914>
Reviewed by Simon Fraser.
Prior to the upcoming OS X, full screen mode was not resizable. Now that it is,
we need to set a minimum window width that is large enough to hold the media
controls. This makes our full-screen video behave the same as the QuickTimeX player.
* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): Active that new
kWKLayoutModeDynamicSizeWithMinimumViewSize style, and set the minimum view size to
be the width of our media controls, with 20 pixels of padding on either side.
(-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): Set the layout
mode back to the default style.
2015-06-11 Jon Lee <jonlee@apple.com>
Update media controls JS and CSS to use picture-in-picture
https://bugs.webkit.org/show_bug.cgi?id=145827
<rdar://problem/21311576>
Reviewed by Dean Jackson.
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface): Deleted GetMediaUIImageData.
2015-06-11 Alex Christensen <achristensen@webkit.org>
Speculative build fix for GTK after r185463.
* CMakeLists.txt:
Remove WebPluginSiteDataManager.cpp from CMake build.
2015-06-11 Anders Carlsson <andersca@apple.com>
Remove WebPluginSiteDataManager
https://bugs.webkit.org/show_bug.cgi?id=145884
Reviewed by Andreas Kling.
* PluginProcess/PluginProcess.cpp:
(WebKit::PluginProcess::clearSiteData): Deleted.
* PluginProcess/PluginProcess.h:
* PluginProcess/PluginProcess.messages.in:
* UIProcess/API/C/WKAPICast.h:
* UIProcess/API/C/WKContext.cpp:
* UIProcess/API/C/WKPluginSiteDataManager.cpp:
* UIProcess/Plugins/PluginProcessManager.cpp:
(WebKit::PluginProcessManager::clearSiteData): Deleted.
* UIProcess/Plugins/PluginProcessManager.h:
* UIProcess/Plugins/PluginProcessProxy.cpp:
(WebKit::PluginProcessProxy::clearSiteData): Deleted.
(WebKit::PluginProcessProxy::pluginProcessCrashedOrFailedToLaunch): Deleted.
(WebKit::PluginProcessProxy::didFinishLaunching): Deleted.
(WebKit::PluginProcessProxy::didClearSiteData): Deleted.
* UIProcess/Plugins/PluginProcessProxy.h:
* UIProcess/Plugins/PluginProcessProxy.messages.in:
* UIProcess/Plugins/WebPluginSiteDataManager.cpp: Removed.
(WebKit::WebPluginSiteDataManager::GetSitesWithDataState::GetSitesWithDataState): Deleted.
(WebKit::WebPluginSiteDataManager::GetSitesWithDataState::getSitesWithDataForNextPlugin): Deleted.
(WebKit::WebPluginSiteDataManager::GetSitesWithDataState::didGetSitesWithDataForSinglePlugin): Deleted.
(WebKit::WebPluginSiteDataManager::ClearSiteDataState::ClearSiteDataState): Deleted.
(WebKit::WebPluginSiteDataManager::ClearSiteDataState::clearSiteDataForNextPlugin): Deleted.
(WebKit::WebPluginSiteDataManager::ClearSiteDataState::didClearSiteDataForSinglePlugin): Deleted.
(WebKit::WebPluginSiteDataManager::create): Deleted.
(WebKit::WebPluginSiteDataManager::WebPluginSiteDataManager): Deleted.
(WebKit::WebPluginSiteDataManager::~WebPluginSiteDataManager): Deleted.
(WebKit::WebPluginSiteDataManager::invalidate): Deleted.
(WebKit::WebPluginSiteDataManager::getSitesWithData): Deleted.
(WebKit::WebPluginSiteDataManager::didGetSitesWithData): Deleted.
(WebKit::WebPluginSiteDataManager::clearSiteData): Deleted.
(WebKit::WebPluginSiteDataManager::didClearSiteData): Deleted.
(WebKit::WebPluginSiteDataManager::didGetSitesWithDataForSinglePlugin): Deleted.
(WebKit::WebPluginSiteDataManager::didGetSitesWithDataForAllPlugins): Deleted.
(WebKit::WebPluginSiteDataManager::didClearSiteDataForSinglePlugin): Deleted.
(WebKit::WebPluginSiteDataManager::didClearSiteDataForAllPlugins): Deleted.
* UIProcess/Plugins/WebPluginSiteDataManager.h: Removed.
(WebKit::WebPluginSiteDataManager::processPool): Deleted.
(WebKit::WebPluginSiteDataManager::clearProcessPool): Deleted.
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::~WebProcessPool): Deleted.
* UIProcess/WebProcessPool.h:
* UIProcess/WebProcessProxy.cpp:
* WebKit2.xcodeproj/project.pbxproj:
2015-06-11 Anders Carlsson <andersca@apple.com>
Make WKWebsiteDataStoreRef backed by an API::WebsiteDataStore
https://bugs.webkit.org/show_bug.cgi?id=145882
Reviewed by Dan Bernstein.
* UIProcess/API/C/WKAPICast.h:
* UIProcess/API/C/WKContext.cpp:
(WKContextGetPluginSiteDataManager):
* UIProcess/API/C/WKPluginSiteDataManager.cpp:
(WKPluginSiteDataManagerGetTypeID):
(WKPluginSiteDataManagerGetSitesWithData):
(WKPluginSiteDataManagerClearSiteData):
(WKPluginSiteDataManagerClearAllSiteData):
2015-06-11 Antti Koivisto <antti@apple.com>
Network process crashes decoding invalid cache entry on 32bit system
https://bugs.webkit.org/show_bug.cgi?id=145842
rdar://problem/21228334
Reviewed by Anders Carlsson.
After cache scheme changes we may end up decoding invalid cache entries. This is by design,
we should just fail decoding and delete these entries.
However Decoder::bufferIsLargeEnoughToContain test in some cases would allow corrupted large
sizes due to overflow in 32bit pointer math and we would crash when allocating a string.
* NetworkProcess/cache/NetworkCacheCoders.cpp:
(WebKit::NetworkCache::Coder<CString>::decode):
(WebKit::NetworkCache::decodeStringText):
(WebKit::NetworkCache::Coder<WebCore::CertificateInfo>::decode):
(WebKit::NetworkCache::Coder<MD5::Digest>::encode):
* NetworkProcess/cache/NetworkCacheCoders.h:
* NetworkProcess/cache/NetworkCacheDecoder.cpp:
(WebKit::NetworkCache::Decoder::Decoder):
(WebKit::NetworkCache::Decoder::bufferIsLargeEnoughToContain):
Reshuffle to avoid sum.
(WebKit::NetworkCache::Decoder::decodeFixedLengthData):
* NetworkProcess/cache/NetworkCacheDecoder.h:
(WebKit::NetworkCache::Decoder::bufferSize):
(WebKit::NetworkCache::Decoder::currentOffset):
(WebKit::NetworkCache::Decoder::length): Deleted.
(WebKit::NetworkCache::Decoder::isInvalid): Deleted.
(WebKit::NetworkCache::Decoder::markInvalid): Deleted.
Remove these, they are not really used or needed.
2015-06-10 Anders Carlsson <andersca@apple.com>
Rewrite WKPluginSiteDataManager using WebsiteDataStore functions
https://bugs.webkit.org/show_bug.cgi?id=145868
Reviewed by Antti Koivisto.
* UIProcess/API/C/WKPluginSiteDataManager.cpp:
(WKPluginSiteDataManagerGetSitesWithData):
(WKPluginSiteDataManagerClearSiteData):
(WKPluginSiteDataManagerClearAllSiteData):
(toNPClearSiteDataFlags): Deleted.
* UIProcess/Plugins/WebPluginSiteDataManager.h:
(WebKit::WebPluginSiteDataManager::processPool):
2015-06-11 Antti Koivisto <antti@apple.com>
3% cold PLT regression from network cache on iOS
https://bugs.webkit.org/show_bug.cgi?id=145694
rdar://problem/21158245
Reviewed by Chris Dumez.
Cache does not help in cold page loads but it shouldn't' be hurting either. Write I/O needs to be toned down a bit.
* NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
(WebKit::NetworkCache::IOChannel::IOChannel):
(WebKit::NetworkCache::IOChannel::open):
Dispatch channels inherit their I/O priority from the target queue. Use background queue for write I/O.
* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::Storage::Storage):
(WebKit::NetworkCache::Storage::dispatchPendingReadOperations):
(WebKit::NetworkCache::Storage::dispatchPendingWriteOperations):
Only write one file at a time instead of maximum of three.
(WebKit::NetworkCache::Storage::retrieve):
For consistency with store prepend new entries here too.
(WebKit::NetworkCache::Storage::store):
Delay start of the first write operation by 1s.
Prepend instead of append to the pending write deque so retrieveFromMemory lookup finds newest entries first in case of duplicates
(WebKit::NetworkCache::Storage::traverse):
* NetworkProcess/cache/NetworkCacheStorage.h:
2015-06-10 Yongjun Zhang <yongjun_zhang@apple.com>
Don't send touch events on link preview.
https://bugs.webkit.org/show_bug.cgi?id=145863
Disable web touch event recognizer on link preview. We do the same when finding nodes in inspector or when long press gesture
is recognized (by _cancelAllTouches).
Reviewed by Beth Dakin.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView willPresentPreviewViewController:forPosition:inSourceView:]): Remove touch event gesture recognizer on preview start.
(-[WKContentView didDismissPreviewViewController:committing:]): Add the gesture recognizer back on dismiss.
2015-06-10 Anders Carlsson <andersca@apple.com>
WKWebsiteDataStore should handle removing plug-in data for individual records
https://bugs.webkit.org/show_bug.cgi?id=145864
Reviewed by Beth Dakin.
* PluginProcess/PluginProcess.cpp:
(WebKit::PluginProcess::deleteWebsiteDataForHostNames):
* PluginProcess/PluginProcess.h:
* PluginProcess/PluginProcess.messages.in:
* UIProcess/Plugins/PluginProcessManager.cpp:
(WebKit::PluginProcessManager::deleteWebsiteDataForHostNames):
* UIProcess/Plugins/PluginProcessManager.h:
* UIProcess/Plugins/PluginProcessProxy.cpp:
(WebKit::PluginProcessProxy::deleteWebsiteDataForHostNames):
(WebKit::PluginProcessProxy::pluginProcessCrashedOrFailedToLaunch):
(WebKit::PluginProcessProxy::didFinishLaunching):
(WebKit::PluginProcessProxy::didDeleteWebsiteDataForHostNames):
* UIProcess/Plugins/PluginProcessProxy.h:
* UIProcess/Plugins/PluginProcessProxy.messages.in:
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::removeData):
2015-06-10 Anders Carlsson <andersca@apple.com>
WKWebsiteDataStore should handle removing plug-in data
https://bugs.webkit.org/show_bug.cgi?id=145862
Reviewed by Sam Weinig.
* PluginProcess/PluginProcess.cpp:
(WebKit::PluginProcess::deleteWebsiteData):
* PluginProcess/PluginProcess.h:
* PluginProcess/PluginProcess.messages.in:
* UIProcess/Plugins/PluginProcessManager.cpp:
(WebKit::PluginProcessManager::deleteWebsiteData):
* UIProcess/Plugins/PluginProcessManager.h:
* UIProcess/Plugins/PluginProcessProxy.cpp:
(WebKit::PluginProcessProxy::~PluginProcessProxy):
(WebKit::PluginProcessProxy::deleteWebsiteData):
(WebKit::PluginProcessProxy::pluginProcessCrashedOrFailedToLaunch):
(WebKit::PluginProcessProxy::didFinishLaunching):
(WebKit::PluginProcessProxy::didDeleteWebsiteData):
* UIProcess/Plugins/PluginProcessProxy.h:
* UIProcess/Plugins/PluginProcessProxy.messages.in:
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::removeData):
2015-06-10 Brent Fulgham <bfulgham@apple.com>
[WK2] Do not indicate Media Keys are present when they are not
https://bugs.webkit.org/show_bug.cgi?id=145713
<rdar://problem/19752566>
Reviewed by Dean Jackson.
Correct the reporting of Media Key presence by checking for the actual
media key file, not just the directory. Sometimes the directory will exist
with no media key files (e.g., if a user navigates to the directory using
the Finder).
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::computeMediaKeyFile): Moved earlier in file so it could be used by
the 'mediaKeyOrigins' method.
(WebKit::WebsiteDataStore::mediaKeyOrigins): Only indicate we have a media key
origin if the folder actually contains the media key file.
(WebKit::WebsiteDataStore::removeMediaKeys): Use the existing 'computeMediaKeyFile',
rather than manually building the file from strings.
2015-06-09 Anders Carlsson <andersca@apple.com>
Support fetching website data
https://bugs.webkit.org/show_bug.cgi?id=145828
Reviewed by Darin Adler.
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::fetchData):
(WebKit::WebsiteDataStore::plugins):
* UIProcess/WebsiteData/WebsiteDataStore.h:
2015-06-10 Zan Dobersek <zdobersek@igalia.com>
Unreviewed. Fixing the build for the GTK port with Clang.
* UIProcess/gtk/InputMethodFilter.h: Add the <functional> header inclusion
to avoid compilation errors due to missing std::function<>.
2015-06-10 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Move KeyBindingTranslator from platform to WebKit2 layer
https://bugs.webkit.org/show_bug.cgi?id=145840
Reviewed by Martin Robinson.
It's currently used only by WebKit2 in the UI process and it's
another file built twice because of the GTK2 plugin process.
* PlatformGTK.cmake:
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
* UIProcess/gtk/KeyBindingTranslator.cpp: Renamed from Source/WebCore/platform/gtk/KeyBindingTranslator.cpp.
(WebKit::backspaceCallback):
(WebKit::selectAllCallback):
(WebKit::cutClipboardCallback):
(WebKit::copyClipboardCallback):
(WebKit::pasteClipboardCallback):
(WebKit::toggleOverwriteCallback):
(WebKit::popupMenuCallback):
(WebKit::showHelpCallback):
(WebKit::deleteFromCursorCallback):
(WebKit::moveCursorCallback):
(WebKit::KeyBindingTranslator::KeyBindingTranslator):
(WebKit::KeyBindingTranslator::commandsForKeyEvent):
* UIProcess/gtk/KeyBindingTranslator.h: Renamed from Source/WebCore/platform/gtk/KeyBindingTranslator.h.
(WebKit::KeyBindingTranslator::addPendingEditorCommand):
2015-06-10 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Get rid of GetEditorCommandsForKeyEvent sync message
https://bugs.webkit.org/show_bug.cgi?id=145598
Reviewed by Žan Doberšek.
We are sending GetEditorCommandsForKeyEvent sync message from web
process to the UI process for every key pressed. And if the
keydown event doesn't handle the key, the message is sent again
for the keypress event, so in many cases it happens twice per
keypress. We can get the list of commands when the key press event
happens in the web view, and send it to the web process as part of
the keyboard event like mac port does. In the web process,
commands not inserting text will be handled by keydown and the
rest in keypress without having to use any other IPC message for that.
* Shared/NativeWebKeyboardEvent.h: Add command list parameter to
the constructor.
* Shared/WebEvent.h: Add GTK specific constructor that receives a
list of commands and whether the event was handled by input methods.
(WebKit::WebKeyboardEvent::commands): Returns the list of commands.
* Shared/WebEventConversion.cpp:
(WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent):
Also copy the commands and handledByInputMethod member.
* Shared/WebKeyboardEvent.cpp:
(WebKit::WebKeyboardEvent::WebKeyboardEvent): Implement GTK
specific constructor that receives a list of commands and whether
the event was handled by input methods.
(WebKit::WebKeyboardEvent::encode): Encode commands and handledByInputMethod.
(WebKit::WebKeyboardEvent::decode): Decode commands and handledByInputMethod.
* Shared/gtk/NativeWebKeyboardEventGtk.cpp:
(WebKit::NativeWebKeyboardEvent::NativeWebKeyboardEvent): Add
command list parameter to the constructor.
* Shared/gtk/WebEventFactory.cpp:
(WebKit::WebEventFactory::createWebKeyboardEvent): Use the new
WebKeyboardEvent constructor and simplify the code. We don't need
to explicitly set VK_PROCESSKEY as windows virtual key code when
the event was handled by input methods. The WebCore event handler
already does that.
* Shared/gtk/WebEventFactory.h:
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::getEditorCommandsForKeyEvent): Deleted.
* UIProcess/API/gtk/PageClientImpl.h:
* UIProcess/API/gtk/WebKitWebViewBase.cpp: Add a
KeyBindingTranslator member.
(webkitWebViewBaseKeyPressEvent): Use the new
InputMethodFilter::filterKeyEvent() API and get the list of
commands for the key when events was not handled by input methods.
(webkitWebViewBaseKeyReleaseEvent): Use the new
InputMethodFilter::filterKeyEvent() API.
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.messages.in: Remove GetEditorCommandsForKeyEvent message.
* UIProcess/gtk/InputMethodFilter.cpp:
(WebKit::InputMethodFilter::handleKeyboardEvent): Call the
completation handler.
(WebKit::InputMethodFilter::handleKeyboardEventWithCompositionResults): Ditto.
(WebKit::InputMethodFilter::filterKeyEvent): Use a completion
handler for the task, so that the caller (the web view) can handle
the keyboard event.
* UIProcess/gtk/InputMethodFilter.h:
* UIProcess/gtk/WebPageProxyGtk.cpp:
(WebKit::WebPageProxy::getEditorCommandsForKeyEvent): Deleted.
* WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
(WebKit::WebEditorClient::handleKeyboardEvent): Return earlier if
the event was handled by input methods. And get the list of
commands from the PlatformKeyboardEvent instead of sending a sync
message to the UI process.
(WebKit::WebEditorClient::handleInputMethodKeydown): If the event
was handled by inpout methods, set the event as default handled so
that the WebCore event handler sets VK_PROCESSKEY as windows
virtual key code.
(WebKit::WebEditorClient::getEditorCommandsForKeyEvent): Deleted.
2015-06-10 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix GTK build after r185412.
Add missing include.
* NetworkProcess/cache/NetworkCacheFileSystem.cpp:
2015-06-10 Antti Koivisto <antti@apple.com>
NetworkCache: Delete old cache versions
https://bugs.webkit.org/show_bug.cgi?id=145800
Reviewed by Darin Adler.
* CMakeLists.txt:
* NetworkProcess/cache/NetworkCacheBlobStorage.cpp:
(WebKit::NetworkCache::BlobStorage::synchronize):
* NetworkProcess/cache/NetworkCacheFileSystem.cpp: Added.
(WebKit::NetworkCache::directoryEntryType):
(WebKit::NetworkCache::traverseDirectory):
Pass entry type as callback argument.
(WebKit::NetworkCache::deleteDirectoryRecursively):
Add helper.
(WebKit::NetworkCache::fileTimes):
(WebKit::NetworkCache::updateFileModificationTimeIfNeeded):
* NetworkProcess/cache/NetworkCacheFileSystem.h: Copied from Source/WebKit2/NetworkProcess/cache/NetworkCacheFileSystemPosix.h.
Move code to cpp.
(WebKit::NetworkCache::traverseDirectory): Deleted.
(WebKit::NetworkCache::traverseCacheFiles): Deleted.
(WebKit::NetworkCache::fileTimes): Deleted.
(WebKit::NetworkCache::updateFileModificationTimeIfNeeded): Deleted.
* NetworkProcess/cache/NetworkCacheFileSystemPosix.h: Removed.
* NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
* NetworkProcess/cache/NetworkCacheStatistics.cpp:
(WebKit::NetworkCache::Statistics::bootstrapFromNetworkCache):
* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::makeBlobDirectoryPath):
(WebKit::NetworkCache::traverseRecordsFiles):
Move cache hierarchy aware traversal code here from NetworkCacheFileSystem (for better layering).
Rename for clarity.
(WebKit::NetworkCache::deleteEmptyRecordsDirectories):
Factor to a function.
(WebKit::NetworkCache::Storage::Storage):
(WebKit::NetworkCache::Storage::synchronize):
(WebKit::NetworkCache::Storage::traverse):
(WebKit::NetworkCache::Storage::clear):
Use traverseRecordsFiles for traversal.
(WebKit::NetworkCache::Storage::shrink):
(WebKit::NetworkCache::Storage::deleteOldVersions):
Delete version subdirectories with version number less than the current version.
Remove code for clearing unversioned V1 caches. No one should have them.
* NetworkProcess/cache/NetworkCacheStorage.h:
* UIProcess/API/APIUserContentExtensionStore.cpp:
* WebKit2.xcodeproj/project.pbxproj:
2015-06-10 Zan Dobersek <zdobersek@igalia.com>
[GTK] Web Inspector is broken
https://bugs.webkit.org/show_bug.cgi?id=145836
Reviewed by Carlos Garcia Campos.
* PlatformGTK.cmake: Thread the InspectorBackendCommands.js file as a separate
dependency of InspectorGResourceBundle.xml. It can't be listed under the InspectorFiles
variable and then searched via the CMake glob command because it probably won't exist
at the time the command is run (since it's copied into the specified path), so it won't
be listed among the dependencies at all.
2015-06-09 Anders Carlsson <andersca@apple.com>
Fix build.
* UIProcess/Plugins/WebPluginSiteDataManager.cpp:
(WebKit::WebPluginSiteDataManager::GetSitesWithDataState::getSitesWithDataForNextPlugin):
2015-06-09 Anders Carlsson <andersca@apple.com>
Change the PluginProcessManager data fetching function to take a completion handler
https://bugs.webkit.org/show_bug.cgi?id=145821
Reviewed by Sam Weinig.
* UIProcess/Plugins/PluginProcessManager.cpp:
(WebKit::PluginProcessManager::fetchWebsiteData):
(WebKit::PluginProcessManager::getSitesWithData): Deleted.
* UIProcess/Plugins/PluginProcessManager.h:
* UIProcess/Plugins/PluginProcessProxy.cpp:
(WebKit::generateCallbackID):
(WebKit::PluginProcessProxy::~PluginProcessProxy):
(WebKit::PluginProcessProxy::fetchWebsiteData):
(WebKit::PluginProcessProxy::pluginProcessCrashedOrFailedToLaunch):
(WebKit::PluginProcessProxy::didFinishLaunching):
(WebKit::PluginProcessProxy::didGetSitesWithData):
(WebKit::PluginProcessProxy::getSitesWithData): Deleted.
* UIProcess/Plugins/PluginProcessProxy.h:
* UIProcess/Plugins/WebPluginSiteDataManager.cpp:
(WebKit::WebPluginSiteDataManager::GetSitesWithDataState::getSitesWithDataForNextPlugin):
2015-06-09 Anders Carlsson <andersca@apple.com>
Add code to keep track of plug-in data host names in website data records
https://bugs.webkit.org/show_bug.cgi?id=145818
Reviewed by Andreas Kling.
* Shared/WebsiteData/WebsiteData.cpp:
(WebKit::WebsiteData::encode):
(WebKit::WebsiteData::decode):
* Shared/WebsiteData/WebsiteData.h:
* UIProcess/WebsiteData/WebsiteDataRecord.cpp:
(WebKit::WebsiteDataRecord::displayNameForPluginDataHostName):
(WebKit::WebsiteDataRecord::addPluginDataHostName):
(WebKit::WebsiteDataRecord::displayNameForCookieHostName): Deleted.
* UIProcess/WebsiteData/WebsiteDataRecord.h:
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::fetchData):
2015-06-09 Anders Carlsson <andersca@apple.com>
Add Plug-in type declarations to WKWebsiteDataRecord and friends
https://bugs.webkit.org/show_bug.cgi?id=145816
Reviewed by Andreas Kling.
* Shared/WebsiteData/WebsiteDataTypes.h:
* UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
(dataTypesToString):
* UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
(WebKit::toWebsiteDataTypes):
(WebKit::toWKWebsiteDataTypes):
* UIProcess/API/Cocoa/WKWebsiteDataRecordPrivate.h:
2015-06-09 Antti Koivisto <antti@apple.com>
REGRESSION(r185262): NetworkCache is in wrong location on OS X
https://bugs.webkit.org/show_bug.cgi?id=145812
Reviewed by Anders Carlsson.
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::legacyPlatformDefaultWebSQLDatabaseDirectory):
(WebKit::WebProcessPool::legacyPlatformDefaultLocalStorageDirectory):
(WebKit::WebProcessPool::legacyPlatformDefaultMediaKeysStorageDirectory):
(WebKit::WebProcessPool::isNetworkCacheEnabled):
Make sure static functions that use NSUserDefaults call registerUserDefaultsIfNeeded() first.
2015-06-09 Yusuke Suzuki <utatane.tea@gmail.com>
Crash when passing Symbol to NPAPI plugin objects
https://bugs.webkit.org/show_bug.cgi?id=145798
Reviewed by Darin Adler.
When the symbol is passed, `propertyName.publicName()` becomes nullptr.
So dereferencing it causes null dereference errors.
At first, this bug appears in the https://bugs.webkit.org/show_bug.cgi?id=145556,
plugin[@@toStringTag] ("string" + plugin) causes SEGV in plugins/embed-inside-object.html test.
This patch avoids it by early returning when the symbols are passed.
Methods for symbols are not implemented in the NPObject side, so it works correctly.
* WebProcess/Plugins/Netscape/JSNPObject.cpp:
(WebKit::npIdentifierFromIdentifier):
(WebKit::JSNPObject::callMethod):
(WebKit::JSNPObject::getOwnPropertySlot):
(WebKit::JSNPObject::put):
(WebKit::JSNPObject::deleteProperty):
(WebKit::JSNPObject::propertyGetter):
(WebKit::JSNPObject::methodGetter):
2015-06-09 Carlos Garcia Campos <cgarcia@igalia.com>
[SOUP] Network Cache: Give more priority to reads over writes in IO WorkQueue
https://bugs.webkit.org/show_bug.cgi?id=145791
Reviewed by Sergio Villar Senin.
Keep using G_PRIORITY_DEFAULT for reads, but use
G_PRIORITY_DEFAULT_IDLE for writes now.
* NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
(WebKit::NetworkCache::outputStreamWriteReadyCallback): Use
G_PRIORITY_DEFAULT_IDLE for write async operations.
(WebKit::NetworkCache::IOChannel::write): Pass
G_PRIORITY_DEFAULT_IDLE to runTaskInQueue().
2015-06-09 Carlos Garcia Campos <cgarcia@igalia.com>
[SOUP] Network Cache: run the IO completion handler in the given queue instead of the whole operation
https://bugs.webkit.org/show_bug.cgi?id=145797
Reviewed by Žan Doberšek.
I misunderstood what the WorkQueue parameter meant in the IO
channel operations. It's the queue where the completion handler
should be run, not the whole operation. Since our operations are
already non-blocking, we can just run the read/writes in the main
thread, and schedule the completion handler in the given work
queue when the operation finishes.
* NetworkProcess/cache/NetworkCacheIOChannel.h:
* NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
(WebKit::NetworkCache::inputStreamReadReadyCallback):
(WebKit::NetworkCache::IOChannel::read):
(WebKit::NetworkCache::IOChannel::readSync):
(WebKit::NetworkCache::outputStreamWriteReadyCallback):
(WebKit::NetworkCache::IOChannel::write):
2015-06-09 David Kilzer <ddkilzer@apple.com>
REGRESSION (r185357): Fix build for iOS 8.x
* UIProcess/ios/forms/WKFileUploadPanel.mm:
(fallbackIconForFile): Add cast prior to iOS 9.
2015-06-09 Gyuyoung Kim <gyuyoung.kim@webkit.org>
[EFL] Fix a crash on MiniBrowser when running on debug mode
https://bugs.webkit.org/show_bug.cgi?id=145793
Reviewed by Carlos Garcia Campos.
r185314 missed to initialize parameters.diskCacheDirectory with configuration's one.
* UIProcess/efl/WebProcessPoolEfl.cpp:
(WebKit::WebProcessPool::platformInitializeWebProcess):
2015-06-09 Csaba Osztrogonác <ossy@webkit.org>
[cmake] Fix the style issues in cmake project files
https://bugs.webkit.org/show_bug.cgi?id=145755
Reviewed by Darin Adler.
* CMakeLists.txt:
* PlatformGTK.cmake:
* PlatformMac.cmake:
2015-06-02 Jon Honeycutt <jhoneycutt@apple.com>
[iOS] UI process memory spike, hang when uploading a very large JPEG
<https://bugs.webkit.org/show_bug.cgi?id=145567>
<rdar://problem/21206699>
When uploading an image, we generate a thumbnail to use for an icon
that sits next to the control. To do this, we load the image and draw
it into a thumbnail-sized canvas. This can be very expensive for large
images.
To fix this, we'll use CGImageSource API, which will allow us to get
any existing thumbnail that exists in the source file.
Reviewed by Darin Adler.
* UIProcess/ios/forms/WKFileUploadPanel.mm:
(squareCropRectForSize):
Use std::round, based on Darin's review feedback that a) rintf is
incorrect in 64-bit systems where CGFloat is a double, b) rintf uses a
variable rounding mode, which is undesirable.
(squareImage):
Changed to take a CGImageRef.
Use RetainPtr and +[UIImage imageWithCGImage:] to match other code in
this file.
(thumbnailSizedImageForImage):
Changed to take a CGImageRef and to use iconSideLength.
(iconForImageFile):
Create an image source for the file, then use CGImageSource API to
generate a thumbnail.
(-[_WKImageFileUploadItem initWithFileURL:originalImage:]): Deleted.
(-[_WKImageFileUploadItem displayImage]):
Use iconForImageFile() rather than trying to generate an icon from the
UIImage.
(-[WKFileUploadPanel _uploadItemForImageData:imageName:successBlock:failureBlock:]):
Removed originalImage parameter; _WKImageFileUploadItem no longer uses
it.
(-[WKFileUploadPanel _uploadItemForJPEGRepresentationOfImage:successBlock:failureBlock:]):
(-[WKFileUploadPanel _uploadItemForImage:withAssetURL:successBlock:failureBlock:]):
2015-06-08 Dan Bernstein <mitz@apple.com>
[Cocoa] Use generics in framework headers
https://bugs.webkit.org/show_bug.cgi?id=145781
Reviewed by Sam Weinig.
* mac/postprocess-framework-headers.sh: Use the parameter to WK_ARRAY and WK_SET.
2015-06-08 Chris Dumez <cdumez@apple.com>
Access GCController instance via GCController::singleton() instead of a free function
https://bugs.webkit.org/show_bug.cgi?id=145776
Reviewed by Darin Adler.
Access GCController instance via GCController::singleton() instead of a
free function as per coding style and for consistency with other
singleton classes in the codebase.
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::garbageCollectJavaScriptObjects):
(WebKit::InjectedBundle::garbageCollectJavaScriptObjectsOnAlternateThreadForDebugging):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::terminate):
(WebKit::WebProcess::didClose):
(WebKit::WebProcess::garbageCollectJavaScriptObjects):
(WebKit::WebProcess::setJavaScriptGarbageCollectorTimerEnabled):
2015-06-08 Anders Carlsson <andersca@apple.com>
Include IndexedDB databases in -[WKWebsiteDataStore allWebsiteDataTypes]
https://bugs.webkit.org/show_bug.cgi?id=145775
Reviewed by Simon Fraser.
* UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
(+[WKWebsiteDataStore allWebsiteDataTypes]):
2015-06-08 Anders Carlsson <andersca@apple.com>
Move the snapshot layer contents SPI to the web view
https://bugs.webkit.org/show_bug.cgi?id=145771
Reviewed by Geoffrey Garen.
We need to potentially ask the web page to take a snapshot of the current item,
so move the SPI to WKWebView and name it appropriately.
* UIProcess/API/Cocoa/WKBackForwardListItem.mm:
(-[WKBackForwardListItem _snapshotLayerContents]): Deleted.
* UIProcess/API/Cocoa/WKBackForwardListItemPrivate.h: Removed.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _snapshotLayerContentsForBackForwardListItem:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* WebKit2.xcodeproj/project.pbxproj:
2015-06-08 Brady Eidson <beidson@apple.com>
Completely remove all IDB properties/constructors when it is disabled at runtime.
rdar://problem/18429374 and https://bugs.webkit.org/show_bug.cgi?id=137034
Reviewed by Geoffrey Garen.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess): Enable IDB at runtime if it's enabled at compile time.
2015-06-08 Michael Catanzaro <mcatanzaro@igalia.com>
[SOUP] Performs DNS prefetch when a proxy is configured (information leak)
https://bugs.webkit.org/show_bug.cgi?id=145542
Reviewed by Alexey Proskuryakov.
Add documentation to webkit_web_context_prefetch_dns to indicate that the function does
nothing if the system configuration indicates we should use a proxy to resolve the host.
* UIProcess/API/gtk/WebKitWebContext.cpp:
2015-06-08 Carlos Garcia Campos <cgarcia@igalia.com>
REGRESSION(r185251): [GTK] webkit_web_context_set_disk_cache_directory() doesn't work when using shared secondary process model after r185251
https://bugs.webkit.org/show_bug.cgi?id=145751
Reviewed by Darin Adler.
In r185251 the CFNetwork cache was disabled in the web process,
but it also removed the disk cache directory web process
initialization parameter. While we support networking in the web
process when shared secondary process model is used, the network
cache should still work. We can remove this if we eventually
switch to use the network process unconditionally.
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode): Encode disk cache directory.
(WebKit::WebProcessCreationParameters::decode): Decode disk cache directory.
* Shared/WebProcessCreationParameters.h: Bring back disk cache directory only for soup.
* UIProcess/gtk/WebProcessPoolGtk.cpp:
(WebKit::WebProcessPool::platformInitializeWebProcess): Initialize disk cache directory parameter.
* WebProcess/soup/WebProcessSoup.cpp:
(WebKit::WebProcess::platformInitializeWebProcess): Use the disck cache directory parameter again.
2015-06-08 Csaba Osztrogonác <ossy@webkit.org>
[GTK] Remove the unused scroll function from WebPageGtk.cpp
https://bugs.webkit.org/show_bug.cgi?id=145756
Reviewed by Carlos Garcia Campos.
* WebProcess/WebPage/gtk/WebPageGtk.cpp:
(WebKit::scroll): Deleted.
2015-06-08 Gyuyoung Kim <gyuyoung.kim@webkit.org>
REGRESSION(r185262): [EFL] Modify legacyPlatformDefaultNetworkCacheDirectory() according to network cache
https://bugs.webkit.org/show_bug.cgi?id=145752
Reviewed by Carlos Garcia Campos.
EFL port needs to add different prefix for network cache directory since r185262.
Modify it basedon GTK port fix.
* UIProcess/efl/WebProcessPoolEfl.cpp:
(WebKit::WebProcessPool::legacyPlatformDefaultNetworkCacheDirectory):
2015-06-07 Carlos Garcia Campos <cgarcia@igalia.com>
REGRESSION(r185262): [GTK] webkit_web_context_set_disk_cache_directory() doesn't work after r185262
https://bugs.webkit.org/show_bug.cgi?id=145735
Reviewed by Darin Adler.
* NetworkProcess/soup/NetworkProcessSoup.cpp:
(WebKit::NetworkProcess::platformInitializeNetworkProcess): Use
the directory name to clear the old cache, since the disk cache
subdirectory is now added in the UI process.
* UIProcess/API/gtk/WebKitWebContext.cpp:
(webkit_web_context_set_disk_cache_directory): Update the
WebProcessPool configuration to override the disk cache directory.
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::ensureNetworkProcess): Use the
configuration to get the disk cache directory.
(WebKit::WebProcessPool::WebProcessPool): Remove
m_diskCacheDirectory member initialization.
* UIProcess/WebProcessPool.h: Remove m_diskCacheDirectory member.
* UIProcess/gtk/WebProcessPoolGtk.cpp:
(WebKit::WebProcessPool::legacyPlatformDefaultNetworkCacheDirectory):
Append the disk cache subdirectory.
2015-06-07 Gyuyoung Kim <gyuyoung.kim@webkit.org>
[EFL][GTK] Fix build break since r185262
https://bugs.webkit.org/show_bug.cgi?id=145724
Unreviewed, fix build break for EFL and GTK ports.
* UIProcess/API/APIWebsiteDataStore.cpp:
(API::WebsiteDataStore::defaultLocalStorageDirectory):
(API::WebsiteDataStore::defaultWebSQLDatabaseDirectory):
(API::WebsiteDataStore::defaultNetworkCacheDirectory):
(API::WebsiteDataStore::defaultApplicationCacheDirectory):
(API::WebsiteDataStore::defaultMediaKeysStorageDirectory):
(API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory):
* UIProcess/efl/WebProcessPoolEfl.cpp:
(WebKit::WebProcessPool::legacyPlatformDefaultNetworkCacheDirectory):
(WebKit::WebProcessPool::platformDefaultDiskCacheDirectory): Deleted.
* WebProcess/soup/WebProcessSoup.cpp:
(WebKit::WebProcess::platformInitializeWebProcess):
2015-06-06 Dan Bernstein <mitz@apple.com>
Dont enable manual sandboxing in the iOS Simulator. This should fix all the tests timing out.
* Configurations/DebugRelease.xcconfig:
2015-06-06 Dan Bernstein <mitz@apple.com>
[iOS] Cant debug with Development XPC services due to automatic sandboxing
https://bugs.webkit.org/show_bug.cgi?id=145731
Rubber-stamped by Darin Adler.
In iOS, the XPC services are automatically sandboxed based on their entitlements. The
sandbox doesnt allow them to re-exec, which is necessary for linking against engineering
builds of the WebKit frameworks placed in a non-system location.
The solution is to opt Engineering builds into manual sandboxing.
* Configurations/BaseTarget.xcconfig:
- Add ENABLE_MANUAL_SANDBOXING to
GCC_PREPROCESSOR_DEFINITIONS when WK_MANUAL_SANDBOXING_ENABLED is YES.
- Set WK_MANUAL_SANDBOXING_ENABLED to YES for OS X, because we always use manual
sandboxing on that platform.
* Configurations/DebugRelease.xcconfig: Removed unused definition of DEBUG_OR_RELEASE. Set
WK_MANUAL_SANDBOXING_ENABLED to YES for all engineering builds.
* Configurations/BaseXPCService.xcconfig: Define CODE_SIGN_ENTITLEMENTS for iOS to be empty
if the service is not installed; to use the base entitlements file from Configurations if
manual sandboxing is not enabled; and to use a derived entitlements file, which doesnt
specify a sandbox profile, if manual sandboxing is enabled.
* Configurations/DatabaseService.Development.xcconfig: Define
WK_XPC_SERVICE_IOS_ENTITLEMENTS_BASE and let BaseXPCService.xcconfig define
CODE_SIGN_ENTITLEMENTS for iOS.
* Configurations/DatabaseService.xcconfig: Ditto.
* Configurations/NetworkService.Development.xcconfig: Ditto.
* Configurations/NetworkService.xcconfig: Ditto.
* Configurations/WebContentService.Development.xcconfig: Ditto.
* Configurations/WebContentService.xcconfig: Ditto.
* WebKit2.xcodeproj/project.pbxproj:
- In the Derived Sources target, added a Derive Entitlements for Manual Sandboxing script
build phase. When building for iOS with manual sandboxing enabled, it creates copies of
the iOS entitlements files with a -no-sandbox suffix and the seatbelt-profiles key
removed.
- In the WebKit target, added a Copy iOS Sandbox Profiles for Manual Sandboxing script build
phase. When building for iOS with manual sandboxing enabled, it copies the iOS sandbox
profiles into the framework, so that the services can apply them to themselves at runtime.
* Shared/ios/ChildProcessIOS.mm:
(WebKit::ChildProcess::initializeSandbox): Use ENABLE(MANUAL_SANDBOXING) and dont define it
here.
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::initializeSandbox): Use ENABLE(MANUAL_SANDBOXING) instead of defining
and using ENABLE_MANUAL_WEBPROCESS_SANDBOXING here.
2015-06-06 Anders Carlsson <andersca@apple.com>
Remove support from getting plug-in information from Carbon resources
https://bugs.webkit.org/show_bug.cgi?id=145730
Reviewed by Dan Bernstein.
No current plug-in versions use this feature, and both Chrome and Mozilla for
Mac stopped looking at Carbon resources years ago.
* Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
(WebKit::NetscapePluginModule::getPluginInfo):
(WebKit::ResourceMap::ResourceMap): Deleted.
(WebKit::ResourceMap::~ResourceMap): Deleted.
(WebKit::ResourceMap::isValid): Deleted.
(WebKit::getStringListResource): Deleted.
(WebKit::getPluginInfoFromCarbonResources): Deleted.
2015-06-05 Anders Carlsson <andersca@apple.com>
Only allow plug-ins to create custom MIME property lists on older versions of OS X
https://bugs.webkit.org/show_bug.cgi?id=145716
Reviewed by Dan Bernstein.
* PluginProcess/EntryPoint/mac/LegacyProcess/PluginProcessMain.mm:
* Shared/Plugins/Netscape/NetscapePluginModule.h:
* Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
(WebKit::getMIMETypesFromPluginBundle):
* UIProcess/Plugins/PluginProcessProxy.h:
* UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
2015-06-05 Chris Dumez <cdumez@apple.com>
[WK2][iOS] Limit the number of vnodes used by the WebContent processes
https://bugs.webkit.org/show_bug.cgi?id=145672
<rdar://problem/21126637>
Reviewed by Antti Koivisto.
Have the WebContent process register a vnode pressure handler on iOS,
which calls the memory pressure handler.
On non-critical pressure, it will prune dead resources from the memory
cache, which should free up some vnodes. On critical pressure, the
handler will clear the PageCache and do a JS GC, which should free even
more vnodes.
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):
2015-06-05 Anders Carlsson <andersca@apple.com>
Fix refacto, don't put IndexedDB databases in the cache directory
https://bugs.webkit.org/show_bug.cgi?id=145714
Reviewed by Antti Koivisto.
* UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
(API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory):
2015-06-05 Anders Carlsson <andersca@apple.com>
Make the network cache directory part of WKContextConfigurationRef
https://bugs.webkit.org/show_bug.cgi?id=145711
Reviewed by Antti Koivisto.
Also, make the UI process be in control of where we place the new network cache.
When using the Modern WebKit API, put the cache in ~/Library/Caches/<Bundle ID>/WebKit/NetworkCache,
and put the cache in ~/Library/Caches/<Bundle ID>/WebKitCache otherwise (this is just for Safari).
* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::Storage::open):
* UIProcess/API/APIProcessPoolConfiguration.cpp:
(API::ProcessPoolConfiguration::createWithLegacyOptions):
(API::ProcessPoolConfiguration::ProcessPoolConfiguration):
(API::ProcessPoolConfiguration::copy):
* UIProcess/API/APIProcessPoolConfiguration.h:
* UIProcess/API/C/WKContext.cpp:
(WKContextSetDiskCacheDirectory): Deleted.
* UIProcess/API/C/WKContextConfigurationRef.cpp:
(WKContextConfigurationCopyDiskCacheDirectory):
(WKContextConfigurationSetDiskCacheDirectory):
* UIProcess/API/C/WKContextConfigurationRef.h:
* UIProcess/API/C/WKContextPrivate.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeNetworkProcess):
(WebKit::WebProcessPool::legacyPlatformDefaultNetworkCacheDirectory):
(WebKit::WebProcessPool::isNetworkCacheEnabled):
(WebKit::WebProcessPool::platformDefaultDiskCacheDirectory): Deleted.
* UIProcess/WebProcessPool.cpp:
(WebKit::legacyWebsiteDataStoreConfiguration):
(WebKit::WebProcessPool::WebProcessPool):
(WebKit::WebProcessPool::ensureNetworkProcess):
(WebKit::WebProcessPool::diskCacheDirectory): Deleted.
* UIProcess/WebProcessPool.h:
2015-06-05 Anders Carlsson <andersca@apple.com>
Make the application cache directory part of WKContextConfigurationRef
https://bugs.webkit.org/show_bug.cgi?id=145704
Reviewed by Geoffrey Garen.
* UIProcess/API/APIProcessPoolConfiguration.cpp:
(API::ProcessPoolConfiguration::createWithLegacyOptions):
(API::ProcessPoolConfiguration::ProcessPoolConfiguration):
(API::ProcessPoolConfiguration::copy):
* UIProcess/API/APIProcessPoolConfiguration.h:
* UIProcess/API/C/WKContext.cpp:
(WKContextSetApplicationCacheDirectory): Deleted.
* UIProcess/API/C/WKContextConfigurationRef.cpp:
(WKContextConfigurationCopyApplicationCacheDirectory):
(WKContextConfigurationSetApplicationCacheDirectory):
* UIProcess/API/C/WKContextConfigurationRef.h:
* UIProcess/API/C/WKContextPrivate.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::WebProcessPool):
(WebKit::WebProcessPool::createNewWebProcess):
(WebKit::WebProcessPool::applicationCacheDirectory): Deleted.
* UIProcess/WebProcessPool.h:
2015-06-05 Mark Lam <mark.lam@apple.com>
finally blocks should not set the exception stack trace when re-throwing the exception.
https://bugs.webkit.org/show_bug.cgi?id=145525
Reviewed by Geoffrey Garen.
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::reportException):
- Changed to use the new Exception object.
2015-06-05 Anders Carlsson <andersca@apple.com>
Disable the CFNetwork cache in the web process
https://bugs.webkit.org/show_bug.cgi?id=145700
rdar://problem/20243343
Reviewed by Geoffrey Garen.
* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::Storage::open):
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::WebProcessCreationParameters): Deleted.
(WebKit::WebProcessCreationParameters::encode): Deleted.
(WebKit::WebProcessCreationParameters::decode): Deleted.
* Shared/WebProcessCreationParameters.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess): Deleted.
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::createNewWebProcess): Deleted.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess): Deleted.
(WebKit::WebProcess::initializeWebProcess): Deleted.
* WebProcess/WebProcess.h:
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformClearResourceCaches):
(WebKit::WebProcess::platformInitializeWebProcess):
(WebKit::WebProcess::platformSetCacheModel): Deleted.
(WebKit::WebProcess::platformTerminate): Deleted.
2015-06-05 Anders Carlsson <andersca@apple.com>
Consolidate default website data directory computations
https://bugs.webkit.org/show_bug.cgi?id=145698
Reviewed by Andreas Kling.
* UIProcess/API/APIProcessPoolConfiguration.cpp:
(API::ProcessPoolConfiguration::ProcessPoolConfiguration):
* UIProcess/API/APIWebsiteDataStore.h:
* UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
(API::WebsiteDataStore::defaultApplicationCacheDirectory):
(API::WebsiteDataStore::defaultNetworkCacheDirectory):
(API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory):
(API::WebsiteDataStore::defaultLocalStorageDirectory):
(API::WebsiteDataStore::defaultMediaKeysStorageDirectory):
(API::WebsiteDataStore::defaultWebSQLDatabaseDirectory):
(API::WebsiteDataStore::defaultDataStoreConfiguration):
(API::applicationCacheDirectory): Deleted.
2015-06-01 Jon Honeycutt <jhoneycutt@apple.com>
[iOS] Uploading an animated GIF from the photo library uploads a JPEG
<https://bugs.webkit.org/show_bug.cgi?id=145539>
<rdar://problem/19760877
Selecting a photo from the photo library using UIImagePickerController
results in an NSDictionary with image info and a UIImage with the
image. It's not possible to get the original image data from the
UIImage, only a PNG or JPEG representation, so we were getting a JPEG
representation and uploading that to the server. For animated GIFs,
this meant a JPEG representation of the first frame.
To fix this, we'll get the asset URL, if available, and use the Photos
API to query for the original image data.
Reviewed by Andy Estes and Joe Pecoraro.
* UIProcess/ios/forms/WKFileUploadPanel.mm:
Soft link the Photos framework.
(-[WKFileUploadPanel _uploadItemForImageData:originalImage:imageName:successBlock:failureBlock:]):
Save the image's data to a temporary location, and create a
_WKImageFileUploadItem. Code moved from
-_uploadItemFromMediaInfo:successBlock:failureBlock:.
(-[WKFileUploadPanel _uploadItemForJPEGRepresentationOfImage:successBlock:failureBlock:]):
Get a JPEG representation of the UIImage, and create an upload item
from that data.
(uploadImageNameFromUTI):
Return a filename for the uploaded image based on the UTI.
(-[WKFileUploadPanel _uploadItemForImage:withAssetURL:successBlock:failureBlock:]):
Fetch the photo asset with the given asset URL. Create an image manager
object, and request the image data for the photo asset. Create an
upload item from that data. If we fail, fall back to a JPEG
representation.
(-[WKFileUploadPanel _uploadItemFromMediaInfo:successBlock:failureBlock:]):
Return early if the media item is not an image type. If it is, and we
have an asset URL, try to create an upload item for the native image.
If we don't have an asset URL, use a JPEG representation of the image.
2015-06-04 Gyuyoung Kim <gyuyoung.kim@webkit.org>
REGRESSION(r185091): Crash happens on indexdb tests
https://bugs.webkit.org/show_bug.cgi?id=145549
Reviewed by Darin Adler.
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp: Remove leakRef() use.
(WebKit::WebIDBServerConnection::didCreateObjectStore):
(WebKit::WebIDBServerConnection::didCreateIndex):
(WebKit::WebIDBServerConnection::didDeleteIndex):
(WebKit::WebIDBServerConnection::didPutRecord):
(WebKit::WebIDBServerConnection::didGetRecord):
(WebKit::WebIDBServerConnection::didOpenCursor):
(WebKit::WebIDBServerConnection::didAdvanceCursor):
(WebKit::WebIDBServerConnection::didIterateCursor):
(WebKit::WebIDBServerConnection::didCount):
(WebKit::WebIDBServerConnection::didDeleteRange):
(WebKit::WebIDBServerConnection::didClearObjectStore):
(WebKit::WebIDBServerConnection::didDeleteObjectStore):
(WebKit::WebIDBServerConnection::didChangeDatabaseVersion):
2015-06-04 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: REGRESSION: dragged node in the DOM Tree isn't positioned correctly
https://bugs.webkit.org/show_bug.cgi?id=143912
Reviewed by Simon Fraser.
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::setDragImage):
When using the WKWebView, convert the position from the WKView's
coordinate system to the WKWebView's.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView draggingUpdated:]):
* UIProcess/API/mac/WKView.mm:
(-[WKView _dragImageForView:withImage:at:linkDrag:]):
Whitespace cleanup in original drag code.
2015-06-04 Dan Bernstein <mitz@apple.com>
Fixed the build.
* UIProcess/API/Cocoa/WKErrorPrivate.h:
2015-06-04 Dan Bernstein <mitz@apple.com>
Renamed the WebKit2SandboxProfiles target to Sandbox Profiles.
Rubber-stamped by Anders Carlsson.
* WebKit2.xcodeproj/project.pbxproj: Renamed the target. For now, added an aggregate
target with the old name that depends on the renamed target. We can remove it once the build
system doesnt reference to old name.
2015-06-03 Dan Bernstein <mitz@apple.com>
[Cocoa] Expose interruptedForPolicyChangeError
https://bugs.webkit.org/show_bug.cgi?id=145627
Reviewed by Anders Carlsson.
* UIProcess/API/Cocoa/WKErrorPrivate.h: Added WKErrorCodeFrameLoadInterruptedByPolicyChange with the same value as
kWKErrorCodeFrameLoadInterruptedByPolicyChange.
2015-06-04 Chris Dumez <cdumez@apple.com>
[WK2] Prune more resources from the MemoryCache before process suspension
https://bugs.webkit.org/show_bug.cgi?id=145633
Reviewed by Andreas Kling.
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::lowMemoryHandler):
(WebKit::NetworkProcess::initializeNetworkProcess):
(WebKit::NetworkProcess::processWillSuspendImminently):
(WebKit::NetworkProcess::prepareToSuspend):
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::platformLowMemoryHandler):
* PluginProcess/PluginProcess.cpp:
(WebKit::PluginProcess::initializeProcess):
Update low memory handler prototype to match WebCore changes.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::actualPrepareToSuspend):
Pass Synchronous::Yes argument to MemoryPressureHandler::releaseMemory()
to request that the memory is free up synchronously (e.g. synchronous
JS garbage collection) as the process is about to be suspended.
Previously, the memory pressure handler was trying to detect this case
by checking if the system was really under memory pressure but this was
a bit hackish and it wouldn't work if the process happened to get
suspended while the system was under memory pressure.
2015-06-03 Carlos Alberto Lopez Perez <clopez@igalia.com>
[GTK] [Wayland] Build is broken on trunk
https://bugs.webkit.org/show_bug.cgi?id=142879
Reviewed by Carlos Garcia Campos.
* WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
(WebKit::LayerTreeHostGtk::makeContextCurrent): When Wayland target
is enabled GLNativeWindowType is not an u_int64 type.
Cast contextID to avoid a build failure.
2015-06-03 Dan Bernstein <mitz@apple.com>
Made WKBackForwardListItemPrivate.h a private header after it was added as internal in r185183.
* WebKit2.xcodeproj/project.pbxproj:
2015-06-03 Hyungwook Lee <hyungwook.lee@navercorp.com>
[EFL] Implement window_object_cleared callback in EwkPageClient.
https://bugs.webkit.org/show_bug.cgi?id=145603
Reviewed by Gyuyoung Kim.
We need to provide right timing for custom JS API that may need to work at the beginning of the page.
* UIProcess/API/efl/tests/extensions/extension_sample.cpp:
* WebProcess/InjectedBundle/API/efl/ewk_page.cpp:
(EwkPage::EwkPage):
(EwkPage::didStartProvisionalLoadForFrame):
(EwkPage::didClearWindowObjectForFrame):
(EwkPage::didFinishDocumentLoadForFrame):
* WebProcess/InjectedBundle/API/efl/ewk_page.h:
* WebProcess/InjectedBundle/API/efl/ewk_page_private.h:
2015-06-03 Anders Carlsson <andersca@apple.com>
Add SPI that returns the snapshot layer contents for a given back/forward list item
https://bugs.webkit.org/show_bug.cgi?id=145621
Reviewed by Dan Bernstein.
* UIProcess/API/Cocoa/WKBackForwardListItem.mm:
(-[WKBackForwardListItem _snapshotLayerContents]):
* UIProcess/API/Cocoa/WKBackForwardListItemInternal.h:
* UIProcess/API/Cocoa/WKBackForwardListItemPrivate.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKBackForwardListItemInternal.h.
* WebKit2.xcodeproj/project.pbxproj:
2015-06-02 Hyungwook Lee <hyungwook.lee@navercorp.com>
[EFL] Implement load_started callback in EwkPageClient.
https://bugs.webkit.org/show_bug.cgi?id=145545
Reviewed by Gyuyoung Kim.
We need to provide load_started callback to web extension module.
* UIProcess/API/efl/tests/extensions/extension_sample.cpp:
* WebProcess/InjectedBundle/API/efl/ewk_page.cpp:
(EwkPage::EwkPage):
(EwkPage::remove):
(EwkPage::didStartProvisionalLoadForFrame):
(EwkPage::didFinishDocumentLoadForFrame):
* WebProcess/InjectedBundle/API/efl/ewk_page.h:
* WebProcess/InjectedBundle/API/efl/ewk_page_private.h:
2015-06-02 Gavin Barraclough <barraclough@apple.com>
PDFs always think they're visible on iOS.
https://bugs.webkit.org/show_bug.cgi?id=145493
<rdar://problem/19668879>
Reviewed by Andreas Kling & Sam Weinig.
The problem here is that WKContentView is currently responsible for notifying the WebPageProxy
that the visibility may have changed, but when a PDF isn't showing the WKContentView isn't in
the view hierarchy and doesn't receive the didMoveToWindow notifications and the WKPDFView
(which is in the view hierarchy) does not listen for these events.
Visibility of the page should really just track the visibility of the WKWebView (and when
actually assessing the visibility it largely does - the page client checks the web view's
visibility, bar a FIXME, and the foreground/background check, which needs to change).
So notifications should really just come from the WKWebView.
The WKWebView already listens for the didMoveToWindow notification, it just was only updating
the IsInWindow flag. Instead just update all flags, and the call to viewStateDidChange from
WKContentView can just be removed.
There is one problem with this in that it would reverse the order of the calls to
viewStateDidChange & _updateForScreen:, which would mean the the view would become visible before
updating the screen pixel density. To fix this, moving the call to _updateForScreen:
to willMoveToWindow:, to ensure it occurs before the page becomes visible.
This will also change behavior on Mac for WKWebView clients, in coalescing all view state changes
within the didMoveToWindow call. This is the direction we intended to go in anyway (the plan is
to remove the mayHaveChanged argument from viewStateDidChange - we're currently adding unnecessary
IPC traffic).
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView didMoveToWindow]):
- should update all view state flags.
* UIProcess/API/ios/WKViewIOS.mm:
(-[WKView didMoveToWindow]):
- added to match WKWebView.mm, for WebKitTestRunner.
* UIProcess/ios/WKContentView.mm:
(-[WKContentView willMoveToWindow:]):
- should _updateForScreen:
(-[WKContentView didMoveToWindow]): Deleted.
- functionality moved to -[WKWebView didMoveToWindow], -[WKContentView didMoveToWindow].
2015-06-02 Chris Dumez <cdumez@apple.com>
[iOS][WK2] Always mark layers as volatile for background pages
https://bugs.webkit.org/show_bug.cgi?id=145547
<rdar://problem/20663184>
Reviewed by Simon Fraser.
We previously marked layers as volatile when the WebProcess was about
to be suspended. Most of the time the WebProcess gets suspended when a
page goes into the background. However, it is not always true (see
radar), in which case the layers won't be marked as volatile and use
memory even though they are not visible.
We now mark layers as volatile as soon as the page goes into the
background, instead of relying on the WebProcess suspension mechanism
to do so.
A new ApplicationDidEnterBackground IPC message from the UIProcess to
the WebProcess is added (in addition to the pre-existing
ApplicationWillEnterForeground one). When the WebProcess receives this
message, it will freeze the layer tree state and mark the layers as
volatile (with a timer to keep retrying if needed), similarly to what
is already done in WebProcess::actualPrepareToSuspend().
When the ApplicationWillEnterForeground is received, we unfreeze the
layer tree state. The layers' volatile state will be automatically
updated when they are displayed (see setBufferVolatility() call in
RemoteLayerBackingStore::display()).
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _applicationDidEnterBackground:]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::applicationDidEnterBackground):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::setLayerTreeStateIsFrozen):
(WebKit::WebPage::markLayersVolatileImmediatelyIfPossible):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::volatilityTimerFired):
(WebKit::WebPage::applicationDidEnterBackground):
(WebKit::WebPage::applicationWillEnterForeground):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::markAllLayersVolatileIfPossible):
(WebKit::WebProcess::setAllLayerTreeStatesFrozen):
2015-06-02 Brady Eidson <beidson@apple.com>
WebKit policy delegate should suggest if a navigation should be allowed to open URLs externally.
rdar://problem/21025301 and https://bugs.webkit.org/show_bug.cgi?id=145280
Reviewed by Alex Christensen.
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::clickedLink):
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::performFrameLoadURLRequest):
(WebKit::PluginView::loadURL):
* WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
(WebKit::WebContextMenuClient::searchWithGoogle):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchCreatePage):
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::openInNewTab):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::loadURLInFrame):
(WebKit::WebPage::loadRequest):
(WebKit::WebPage::loadDataImpl):
(WebKit::WebPage::navigateToPDFLinkWithSimulatedClick):
2015-06-02 Gyuyoung Kim <gyuyoung.kim@webkit.org>
REGRESSION(r185091): Crash happens on indexdb tests
https://bugs.webkit.org/show_bug.cgi?id=145549
Reviewed by Csaba Osztrogonác.
r185091 caused crash on some indexeddb tests. The crash happens because IDBDatabaseError::create() doesn't
dereference count by using ptr(). It makes a crash when dereferencing on ~Ref() destructor. To fix this issue,
this patch uses leakRef() instead of ptr().
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
(WebKit::WebIDBServerConnection::didCreateObjectStore):
(WebKit::WebIDBServerConnection::didCreateIndex):
(WebKit::WebIDBServerConnection::didDeleteIndex):
(WebKit::WebIDBServerConnection::didPutRecord):
(WebKit::WebIDBServerConnection::didGetRecord):
(WebKit::WebIDBServerConnection::didOpenCursor):
(WebKit::WebIDBServerConnection::didAdvanceCursor):
(WebKit::WebIDBServerConnection::didIterateCursor):
(WebKit::WebIDBServerConnection::didCount):
(WebKit::WebIDBServerConnection::didDeleteRange):
(WebKit::WebIDBServerConnection::didClearObjectStore):
(WebKit::WebIDBServerConnection::didDeleteObjectStore):
(WebKit::WebIDBServerConnection::didChangeDatabaseVersion):
2015-06-01 Enrica Casucci <enrica@apple.com>
[iOS] Hardware Keyboard: All combinations for arrow keys with Shift do not extend the selection.
https://bugs.webkit.org/show_bug.cgi?id=145538
rdar://problem/18504199
Reviewed by Darin Adler.
The extend parameter was ignored in all the functions below.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _moveUp:withHistory:]):
(-[WKContentView _moveDown:withHistory:]):
(-[WKContentView _moveLeft:withHistory:]):
(-[WKContentView _moveRight:withHistory:]):
(-[WKContentView _moveToStartOfWord:withHistory:]):
(-[WKContentView _moveToStartOfParagraph:withHistory:]):
(-[WKContentView _moveToStartOfLine:withHistory:]):
(-[WKContentView _moveToStartOfDocument:withHistory:]):
(-[WKContentView _moveToEndOfWord:withHistory:]):
(-[WKContentView _moveToEndOfParagraph:withHistory:]):
(-[WKContentView _moveToEndOfLine:withHistory:]):
(-[WKContentView _moveToEndOfDocument:withHistory:]):
2015-06-01 Anders Carlsson <andersca@apple.com>
Use xpc_connection_set_oneshot_instance where possible
https://bugs.webkit.org/show_bug.cgi?id=145535
rdar://problem/21109994
Reviewed by Sam Weinig.
Use xpc_connection_set_oneshot_instance where possible; this will make sure that the
web process instances go away when the web process exits.
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::connectToService):
(WebKit::connectToReExecService):
2015-06-01 Enrica Casucci <enrica@apple.com>
[iOS] Hardware Keyboard: Command + left arrow does not work.
https://bugs.webkit.org/show_bug.cgi?id=145531
rdar://problem/18576402
Reviewed by Anders Carlsson.
We were calling a non existent command (moveToStartOfLine) instead of
moveToBeginningOfLine.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _moveToStartOfLine:withHistory:]):
2015-06-01 Brady Eidson <beidson@apple.com>
Add WKTR support for "should open external URLs".
https://bugs.webkit.org/show_bug.cgi?id=145505
Reviewed by Darin Adler.
Expose C-spi to allow WKTR to set this bit on new loads:
* UIProcess/API/C/WKPage.cpp:
(WKPageLoadURLWithShouldOpenExternalURLsPolicy):
* UIProcess/API/C/WKPagePrivate.h:
Expose the bit on NavigationAction for the policy delegate:
* WebProcess/InjectedBundle/API/c/WKBundleNavigationAction.cpp:
(WKBundleNavigationActionGetShouldOpenExternalURLs):
* WebProcess/InjectedBundle/API/c/WKBundleNavigationActionPrivate.h: Copied from Tools/WebKitTestRunner/WorkQueueManager.h.
* WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp:
(WebKit::InjectedBundleNavigationAction::InjectedBundleNavigationAction):
* WebProcess/InjectedBundle/InjectedBundleNavigationAction.h:
(WebKit::InjectedBundleNavigationAction::shouldOpenExternalURLs):
* WebKit2.xcodeproj/project.pbxproj:
2015-06-01 Gavin Barraclough <barraclough@apple.com>
PDFs always think they're visible on iOS.
https://bugs.webkit.org/show_bug.cgi?id=145493
<rdar://problem/19668879>
Unreviewed roll-out.
Temporarily reverting this change  will need a workaround for test harness craziness.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView didMoveToWindow]):
(-[WKWebView setOpaque:]):
* UIProcess/ios/WKContentView.mm:
(-[WKContentView willMoveToWindow:]):
(-[WKContentView didMoveToWindow]):
(-[WKContentView browsingContextController]):
2015-06-01 Csaba Osztrogonác <ossy@webkit.org>
[EFL] Remove unused const variable from EwkView.cpp
https://bugs.webkit.org/show_bug.cgi?id=145512
Reviewed by Gyuyoung Kim.
* UIProcess/API/efl/EwkView.cpp:
2015-06-01 Csaba Osztrogonác <ossy@webkit.org>
[cmake] Suppress unused parameter warnings in WebKit2 and TestNetscapePlugIn
https://bugs.webkit.org/show_bug.cgi?id=145264
Reviewed by Carlos Garcia Campos.
* CMakeLists.txt: Use COMPILE_FLAGS instead of CMAKE_<C|CXX>_FLAGS to put -Wno-unused-parameter after -Wextra.
2015-05-31 Gavin Barraclough <barraclough@apple.com>
PDFs always think they're visible on iOS.
https://bugs.webkit.org/show_bug.cgi?id=145493
<rdar://problem/19668879>
Reviewed by Andreas Kling.
The problem here is that WKContentView is currently responsible for notifying the WebPageProxy
that the visibility may have changed, but when a PDF isn't showing the WKContentView isn't in
the view hierarchy and doesn't receive the didMoveToWindow notifications and the WKPDFView
(which is in the view hierarchy) does not listen for these events.
Visibility of the page should really just track the visibility of the WKWebView (and when
actually assessing the visibility it largely does - the page client checks the web view's
visibility, bar a FIXME, and the foreground/background check, which needs to change).
So notifications should really just come from the WKWebView.
The WKWebView already listens for the didMoveToWindow notification, it just was only updating
the IsInWindow flag. Instead just update all flags, and the call to viewStateDidChange from
WKContentView can just be removed.
There is one problem with this in that it would reverse the order of the calls to
viewStateDidChange & _updateForScreen:, which would mean the the view would become visible before
updating the screen pixel density. To fix this, move the call to _updateForScreen: to
willMoveToWindow:, to ensure it occurs before the page becomes visible.
This will also change behavior on Mac for WKWebView clients, in coalescing all view state changes
within the didMoveToWindow call. This is the direction we intended to go in anyway (the plan is
to remove the mayHaveChanged argument from viewStateDidChange - we're currently adding unnecessary
IPC traffic).
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView didMoveToWindow]):
- should update all view state flags.
* UIProcess/ios/WKContentView.mm:
(-[WKContentView willMoveToWindow:]):
- should _updateForScreen:
(-[WKContentView didMoveToWindow]): Deleted.
- functionality moved to -[WKWebView didMoveToWindow], -[WKContentView didMoveToWindow].
2015-05-30 Brady Eidson <beidson@apple.com>
Make FrameLoader methods that take PassRefPtr<Event> take raw pointers instead.
https://bugs.webkit.org/show_bug.cgi?id=145495
Reviewed by Alexey Proskuryakov.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::navigateToPDFLinkWithSimulatedClick):
2015-05-29 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Crash closing a related tab with Web Inspector open while page is refreshing
https://bugs.webkit.org/show_bug.cgi?id=145488
Reviewed by Alexey Proskuryakov.
* WebProcess/WebPage/WebInspector.h:
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::~WebInspector):
Ensure, no matter how we close, that we have invalidated the
frontend connection of which we are the client.
(WebKit::WebInspector::createInspectorPage):
This member variable will never be null.
2015-05-29 Andreas Kling <akling@apple.com>
[iOS] When bouncing back from max pinch zoom scale, scaleChangeRate should be 0.
<https://webkit.org/b/145487>
<rdar://problem/20989389>
Reviewed by Benjamin Poulain.
Make sure we don't send WebCore some velocity data with non-zero scaleChangeRate
when we bounce back from being pinch-zoomed past the maximum scale.
This fixes an issue where the bounce-back animation would cause a burst of
unnecessary tile generation.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::adjustVelocityDataForBoundedScale):
(WebKit::WebPage::updateVisibleContentRects):
2015-05-29 Jon Lee <jonlee@apple.com>
Fix preferences for wireless playback
https://bugs.webkit.org/show_bug.cgi?id=145477
rdar://problem/21166767
Reviewed by Anders Carlsson.
* UIProcess/API/C/WKPreferences.cpp: Add missing preference calls in C API.
* UIProcess/API/C/WKPreferencesRef.h:
2015-05-29 Enrica Casucci <enrica@apple.com>
[iOS] Cursor hidden in text area once it scrolls.
https://bugs.webkit.org/show_bug.cgi?id=145451
rdar://problem/20356413
Reviewed by Simon Fraser.
This patch fixes both the touch scrolling inside the
overflow area as well as the programmatic scroll that
occurs when inserting a new line. The first issue is fixed by
implementing the chrome client methods didLayout,
didStartOverflowScroll and didEndOverflowScroll. The second
required changing the implementation of notifyRevealedSelectionByScrollingFrame.
We not only need to notify the client to redraw the selection,
but we also need to recompute the editorState, because scrolling
might have occurred.
I've removed the NotifyRevealedSelection message that was not needed
any longer, since EditorStateChanged will do exactly what we want.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::editorStateChanged):
(WebKit::WebPageProxy::notifyRevealedSelection): Deleted.
* WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
(WebKit::WebChromeClient::notifyRevealedSelectionByScrollingFrame):
(WebKit::WebChromeClient::didLayout):
(WebKit::WebChromeClient::didStartOverflowScroll):
(WebKit::WebChromeClient::didEndOverflowScroll):
2015-05-29 Chris Dumez <cdumez@apple.com>
[iOS] Update WebContent process sandbox profile for AWD logging
https://bugs.webkit.org/show_bug.cgi?id=145473
<rdar://problem/20543269>
Reviewed by Darin Adler.
Update WebContent process sandbox profile for AWD logging.
* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2015-05-29 Anders Carlsson <andersca@apple.com>
WebKit.framework installs or references Mac-only headers on iOS
https://bugs.webkit.org/show_bug.cgi?id=145471
rdar://problem/21161459
Reviewed by Dan Bernstein.
* UIProcess/API/C/mac/WKInspectorPrivateMac.h:
Add an #if !TARGET_OS_IPHONE guard around the entire header.
2015-05-29 Anders Carlsson <andersca@apple.com>
WKScriptMessageInternal.h should be a project header, not a private header
https://bugs.webkit.org/show_bug.cgi?id=145464
rdar://problem/21161639
Reviewed by Dan Bernstein.
* WebKit2.xcodeproj/project.pbxproj:
2015-05-28 Alexey Proskuryakov <ap@apple.com>
Clean up VisitedLinkProvider teardown
https://bugs.webkit.org/show_bug.cgi?id=145450
rdar://problem/20244726
Reviewed by Brady Eidson.
* UIProcess/VisitedLinkProvider.cpp:
(WebKit::VisitedLinkProvider::~VisitedLinkProvider):
2015-05-28 Brady Eidson <beidson@apple.com>
Change method of signaling "should open external urls" to WebKit.
https://bugs.webkit.org/show_bug.cgi?id=145454
Reviewed by Dan Bernstein.
Making this a property on the request was never a good idea.
Adding a new extensible load SPI seems much better.
* Shared/API/Cocoa/_WKNSURLRequestExtras.h: Removed.
* Shared/API/Cocoa/_WKNSURLRequestExtras.mm: Removed.
* UIProcess/API/Cocoa/WKBrowsingContextController.mm:
(-[WKBrowsingContextController loadRequest:userData:]): Since this API is deprecated,
it always gets the default restrictive behavior.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView loadRequest:]):
(-[WKWebView loadRequest:withOptions:]): Take an options dictionary that, for now,
only supports one option.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* WebKit2.xcodeproj/project.pbxproj:
2015-05-28 Anders Carlsson <andersca@apple.com>
Make sure that we create the private WebKit.framework symlinks last
https://bugs.webkit.org/show_bug.cgi?id=145442
<rdar://problem/21142213>
Reviewed by Dan Bernstein.
Move the "Add Symlinks in /System/Library/PrivateFrameworks/WebKit.framework" build phase to
the "All" aggregate target. Also update the script now that INSTALL_PATH is different.
* WebKit2.xcodeproj/project.pbxproj:
2015-05-28 Said Abou-Hallawa <sabouhallawa@apple.com>
Code clean up for extracting information from the mix of WritingMode and TextDirection
https://bugs.webkit.org/show_bug.cgi?id=143399
Reviewed by Darin Adler.
* Shared/WebPopupItem.h:
* UIProcess/API/C/efl/WKAPICastEfl.h:
* UIProcess/WebPopupMenuProxy.h:
enum TextDirection is moved from TextFlags.h to WritingMode.h. So include
WritingMode.h instead of including TextFlags.h.
2015-05-28 Antti Koivisto <antti@apple.com>
Disable network cache for old clients
https://bugs.webkit.org/show_bug.cgi?id=145418
Reviewed by Andreas Kling.
Follow-up: Don't do linked-on-or-after checks for iOS Safari.
* UIProcess/Cocoa/VersionChecks.mm:
(WebKit::linkTimeVersion):
(WebKit::linkedOnOrAfter):
2015-05-28 Matt Rajca <mrajca@apple.com>
Add ENABLE_MEDIA_SESSION feature flag (which is off by default).
https://bugs.webkit.org/show_bug.cgi?id=145415
Reviewed by Eric Carlson.
* Configurations/FeatureDefines.xcconfig:
2015-05-28 Gyuyoung Kim <gyuyoung.kim@webkit.org>
Unreviewed, Fix build break since r184930.
* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::createTransientLocalStorageMap): Pass a pointer of SecurityOrigin
in isSameSchemeHostPort().
2015-05-28 Zan Dobersek <zdobersek@igalia.com>
Unreviewed. Fixing the build after r184950.
* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::createSessionStorageMap): getOrCreateStorageArea()
now expects a Ref<WebCore::SecurityOrigin> object.
2015-05-28 Zan Dobersek <zdobersek@igalia.com>
[WK2] Handle WebCore::SecurityOrigin objects through Ref<> where possible
https://bugs.webkit.org/show_bug.cgi?id=145373
Reviewed by Andreas Kling.
WebCore::SecurityOrigin creation functions in most cases return a
Ref<WebCore::SecurityOrigin> object. In the WebKit2 layer, those objects
were still largely converted to RefPtr<>s.
This patch switches to using Ref<> where possible. The remaining uses of
RefPtr<WebCore::SecurityOrigin> are present due to HashTables, to-be-copied
Vectors, WebCore::DatabaseManager::origins() API and code where non-null
WebCore::SecurityOrigin can't be guaranteed.
* DatabaseProcess/DatabaseProcess.cpp:
(WebKit::DatabaseProcess::deleteIndexedDatabaseEntriesForOrigin):
* NetworkProcess/NetworkProcess.cpp:
(WebKit::cfURLCacheOrigins):
* UIProcess/Storage/LocalStorageDatabase.cpp:
(WebKit::LocalStorageDatabase::create):
(WebKit::LocalStorageDatabase::LocalStorageDatabase):
(WebKit::LocalStorageDatabase::openDatabase):
(WebKit::LocalStorageDatabase::close):
* UIProcess/Storage/LocalStorageDatabase.h:
* UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
(WebKit::LocalStorageDatabaseTracker::origins):
* UIProcess/Storage/LocalStorageDatabaseTracker.h:
* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::StorageArea::securityOrigin):
(WebKit::StorageManager::TransientLocalStorageNamespace::getOrCreateStorageArea):
(WebKit::StorageManager::TransientLocalStorageNamespace::origins):
(WebKit::StorageManager::TransientLocalStorageNamespace::clearStorageAreasMatchingOrigin):
(WebKit::StorageManager::StorageArea::create):
(WebKit::StorageManager::StorageArea::StorageArea):
(WebKit::StorageManager::StorageArea::openDatabaseAndImportItemsIfNeeded):
(WebKit::StorageManager::LocalStorageNamespace::getOrCreateStorageArea):
(WebKit::StorageManager::LocalStorageNamespace::didDestroyStorageArea):
(WebKit::StorageManager::SessionStorageNamespace::origins):
(WebKit::StorageManager::SessionStorageNamespace::clearStorageAreasMatchingOrigin):
(WebKit::StorageManager::SessionStorageNamespace::getOrCreateStorageArea):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::reachedApplicationCacheOriginQuota):
* WebProcess/ApplicationCache/WebApplicationCacheManager.cpp:
(WebKit::WebApplicationCacheManager::getApplicationCacheOrigins):
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::setApplicationCacheOriginQuota):
(WebKit::InjectedBundle::resetApplicationCacheOriginQuota):
* WebProcess/ResourceCache/WebResourceCacheManager.cpp:
(WebKit::WebResourceCacheManager::returnCacheOrigins):
(WebKit::WebResourceCacheManager::clearCacheForOrigin):
* WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
(WebKit::WebDatabaseManager::deleteDatabaseWithNameForOrigin):
(WebKit::WebDatabaseManager::deleteDatabasesForOrigin):
(WebKit::WebDatabaseManager::setQuotaForOrigin):
2015-05-19 Jon Honeycutt <jhoneycutt@apple.com>
[iOS] When viewing an MJPEG stream as the main resource, only the first
frame paints
<https://bugs.webkit.org/show_bug.cgi?id=145185>
<rdar://problem/20124694>
Reviewed by Darin Adler.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::willReplaceMultipartContent):
Tell the WebPage that we will replace multipart content.
(WebKit::WebFrameLoaderClient::didReplaceMultipartContent):
Tell the WebPage that we did replace multipart content.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
* WebProcess/WebPage/DrawingArea.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::willReplaceMultipartContent):
Save the exposed content rect.
(WebKit::WebPage::didReplaceMultipartContent):
Restore the exposed content rect that was saved before this load. This
fixes the issue for WK2.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::exposedContentRect):
2015-05-22 Jon Lee <jonlee@apple.com>
Fix macros for wireless playback
https://bugs.webkit.org/show_bug.cgi?id=145239
rdar://problem/21049541
Reviewed by Anders Carlsson.
Encompass the logic within ENABLE(WIRELESS_TARGET_PLAYBACK). Update property name.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
* UIProcess/API/Cocoa/WKWebViewConfiguration.h: Update names. Add a WKDeprecated
category section.
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration init]): Update name of variables to reflect new property names.
(-[WKWebViewConfiguration copyWithZone:]): Ditto.
(-[WKWebViewConfiguration mediaPlaybackAllowsAirPlay]): Get and set off of the new
variable.
(-[WKWebViewConfiguration setMediaPlaybackAllowsAirPlay:]): Ditto.
(-[WKWebViewConfiguration mediaPlaybackRequiresUserAction]): Ditto.
(-[WKWebViewConfiguration setMediaPlaybackRequiresUserAction:]): Ditto.
2015-05-27 Brady Eidson <beidson@apple.com>
Add a "should open urls externally" flag to DocumentLoader.
rdar://problem/21025301 and https://bugs.webkit.org/show_bug.cgi?id=145417
Reviewed by Geoff Garen.
Rename "user initiated" to "should open external URLs":
* Shared/API/Cocoa/_WKNSURLRequestExtras.h:
* Shared/API/Cocoa/_WKNSURLRequestExtras.mm:
(-[NSURLRequest _web_shouldOpenExternalURLs]):
(-[NSMutableURLRequest _web_setShouldOpenExternalURLs:]):
(-[NSURLRequest _web_isUserInitiated]): Deleted.
(-[NSMutableURLRequest _web_setIsUserInitiated:]): Deleted.
Hold the new flag as a bool, and encode/decode it across IPC:
* Shared/NavigationActionData.cpp:
(WebKit::NavigationActionData::encode):
(WebKit::NavigationActionData::decode):
(WebKit::NavigationActionData::NavigationActionData): Deleted.
* Shared/NavigationActionData.h:
* UIProcess/API/APINavigationAction.h: Add accessor for the bool flag.
* UIProcess/API/C/WKPage.cpp:
(WKPageLoadURLWithUserData): Use "ShouldNotAllow" in the legacy C API for now.
(WKPageLoadURLRequestWithUserData): Ditto.
* UIProcess/API/Cocoa/WKBrowsingContextController.mm:
(-[WKBrowsingContextController loadRequest:userData:]): Set the value of the flag
based on whether or not the initiating NSURLRequest was user initiated.
* UIProcess/API/Cocoa/WKNavigationAction.mm:
(-[WKNavigationAction _shouldOpenExternalURLs]): Add accessor for the bool flag.
* UIProcess/API/Cocoa/WKNavigationActionPrivate.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView loadRequest:]): Set the value of the flag based on whether or not the
initiating NSURLRequest was user initiated.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::loadRequest): Pass the value down to the WebProcess to load.
(WebKit::WebPageProxy::loadFile): Ditto, but always with "ShouldNotAllow".
* UIProcess/WebPageProxy.h:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): Translate
the NavigationAction flag to a bool in the NavigationActionData object.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::loadRequest): Set the value of the flag in the FrameLoadRequest that
will be loaded.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
2015-05-27 Anders Carlsson <andersca@apple.com>
Can't load local files in WKWebView from containerized app
https://bugs.webkit.org/show_bug.cgi?id=145424
rdar://problem/20831176
Reviewed by Dan Bernstein.
Allow the network process to load local files from its bundle as long as it has
the sandbox extensions to do so.
This was originally added to only allow SSO to read the Info.plist inside its own application
bundle, but being able to read the application bundle from within the network process should be OK.
* Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
2015-05-27 Andreas Kling <akling@apple.com>
[WK2] Local storage areas should get torn down when they have no remaining references.
<https://webkit.org/b/143339>
<rdar://problem/20156436>
Reviewed by Darin Adler.
Let StorageNamespaceImpl own its StorageAreaMaps weakly instead of through RefPtr.
Ownership is flipped so that StorageAreaMap refs the StorageNamespaceImpl instead.
This allows the StorageAreaMaps to get destroyed once all of its clients are gone.
Practically speaking, this means that the garbage collector now decides when local
storage databases can be closed, instead of us keeping them open for the lifetime
of the web process.
For session storage, it works a bit differently. In the web process, they get torn
down when their last client disappears, but they stay alive in the UI process.
If/when the web process asks the UI process to open session storage for an origin,
the UI process checks if one already exists, and if so, just updates the ID of the
old storage with the new one provided by the web process.
* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::StorageArea::isSessionStorage):
(WebKit::StorageManager::createTransientLocalStorageMap):
(WebKit::StorageManager::createSessionStorageMap):
(WebKit::StorageManager::destroyStorageMap):
* WebProcess/Storage/StorageAreaImpl.cpp:
(WebKit::StorageAreaImpl::securityOrigin):
* WebProcess/Storage/StorageAreaImpl.h:
* WebProcess/Storage/StorageAreaMap.cpp:
(WebKit::StorageAreaMap::StorageAreaMap):
(WebKit::StorageAreaMap::~StorageAreaMap):
* WebProcess/Storage/StorageAreaMap.h:
(WebKit::StorageAreaMap::securityOrigin):
* WebProcess/Storage/StorageNamespaceImpl.cpp:
(WebKit::StorageNamespaceImpl::didDestroyStorageAreaMap):
(WebKit::StorageNamespaceImpl::storageArea):
* WebProcess/Storage/StorageNamespaceImpl.h:
2015-05-27 Antti Koivisto <antti@apple.com>
Disable network cache for old clients
https://bugs.webkit.org/show_bug.cgi?id=145418
rdar://problem/21126587
Reviewed by Andy Estes.
Old clients might use NSURLCache API to clear the cache. New cache requires use of new APIs.
* UIProcess/Cocoa/VersionChecks.h: Added.
* UIProcess/Cocoa/VersionChecks.mm: Added.
Add linked-on-or-after check mechanism similar to WebKit1.
(WebKit::linkTimeVersion):
(WebKit::linkedOnOrAfter):
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeNetworkProcess):
Use it when deciding whether to enable the cache.
* WebKit2.xcodeproj/project.pbxproj:
2015-05-27 Dean Jackson <dino@apple.com>
img.currentSrc problem in strict mode with old picturefill
https://bugs.webkit.org/show_bug.cgi?id=144095
<rdar://problem/21087013>
Reviewed by Simon Fraser.
Add a PICTURE_SIZES flag.
* Configurations/FeatureDefines.xcconfig:
2015-05-27 Chris Dumez <cdumez@apple.com>
Assertion hit in WebPage::didChangeSelection()
https://bugs.webkit.org/show_bug.cgi?id=145413
<rdar://problem/21001129>
Reviewed by Ryosuke Niwa.
We sometimes hit the "ASSERT(layoutCount == view->layoutCount())"
assertion in WebPage::didChangeSelection(). We manage to prevent
synchronous layouts in most cases when calling editorState(). However,
it seems it can still happen in some cases. Crashing in this case seems
overkill and can be annoying to other developers, especially
considering the implications are only on performance.
This patch drops the assertion.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didChangeSelection): Deleted.
2015-05-27 Anders Carlsson <andersca@apple.com>
Address a follow-up review comment from Darin.
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::removeMediaKeys):
2015-05-26 Anders Carlsson <andersca@apple.com>
WKWebsiteDataStore should handle media keys
https://bugs.webkit.org/show_bug.cgi?id=145394
rdar://problem/20617794.
Reviewed by Darin Adler.
* Shared/WebsiteData/WebsiteDataTypes.h:
Add WebsiteDataTypeMediaKeys enum.
* UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
(API::WebsiteDataStore::defaultDataStoreConfiguration):
Set up mediaKeysStorageDirectory.
* UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
(dataTypesToString):
* UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
(WebKit::toWebsiteDataTypes):
(WebKit::toWKWebsiteDataTypes):
* UIProcess/API/Cocoa/WKWebsiteDataRecordPrivate.h: Added.
Add _WKWebsiteDataTypeMediaKeys.
* UIProcess/WebProcessPool.cpp:
(WebKit::legacyWebsiteDataStoreConfiguration):
Set up mediaKeysStorageDirectory.
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::WebsiteDataStore):
Set m_mediaKeysStorageDirectory.
(WebKit::WebsiteDataStore::fetchData):
Make CallbackAggregator ThreadSafeRefCounted.
Handle WebsiteDataTypeMediaKeys by calling mediaKeyOrigins on our background queue.
(WebKit::WebsiteDataStore::removeData):
Make CallbackAggregator ThreadSafeRefCounted.
Handle WebsiteDataTypeMediaKeys by calling removeMediaKeys on our background queue.
(WebKit::WebsiteDataStore::mediaKeyOrigins):
Compute the origins.
(WebKit::computeMediaKeyFile):
Add helper function that returns the media key given a containing directory.
(WebKit::WebsiteDataStore::removeMediaKeys):
Remove media key files.
* UIProcess/WebsiteData/WebsiteDataStore.h:
Add new members.
* WebKit2.xcodeproj/project.pbxproj:
Add new files.
2015-05-27 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Update OptionsGTK.cmake and NEWS for 2.9.2 release.
* gtk/NEWS: Add release notes for 2.9.2.
2015-05-27 Carlos Garcia Campos <cgarcia@igalia.com>
[SOUP] Network Cache: Handle the case when we fail to create the IO stream
https://bugs.webkit.org/show_bug.cgi?id=145406
Reviewed by Sergio Villar Senin.
We were asserting in that case, but it can happen that we
fail to create the stream. It happened to me after r184690, that
changed the NetworkCache::Key hash. Since this was not expected to
happen, the async operation never finished and the completion
handler never called, leaving resources loading forever. We
should make sure we call the completion handler with an error
code, so that the load finishes and the entry is silently removed
from the cache.
* NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
(WebKit::NetworkCache::IOChannel::read):
(WebKit::NetworkCache::IOChannel::readSync):
(WebKit::NetworkCache::IOChannel::write):
2015-05-26 Carlos Garcia Campos <cgarcia@igalia.com>
Network Cache: Add cache capacity to the totals of JSON file
https://bugs.webkit.org/show_bug.cgi?id=145246
Reviewed by Antti Koivisto.
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::dumpContentsToFile):
* NetworkProcess/cache/NetworkCacheStorage.h:
(WebKit::NetworkCache::Storage::capacity):
2015-05-26 Anders Carlsson <andersca@apple.com>
Add a symlink for every file inside /S/L/F/WebKit.framework to the PrivateFrameworks mirror.
rdar://problem/21111232.
Reviewed by Dan Bernstein.
* WebKit2.xcodeproj/project.pbxproj:
2015-05-26 Hunseop Jeong <hs85.jeong@samsung.com>
[EFL] webview should be updated from (0,0) when using the evasGL.
https://bugs.webkit.org/show_bug.cgi?id=137948
Reviewed by Gyuyoung Kim.
Changed the point of the start position to update the evasObject
correctly when using the evasGL for graphics backend.
* UIProcess/API/efl/EwkView.cpp:
(EwkView::displayTimerFired):
2015-05-26 Dan Bernstein <mitz@apple.com>
<rdar://problem/21104551> Update build settings
Reviewed by Anders Carlsson.
* Configurations/DebugRelease.xcconfig:
* Configurations/FeatureDefines.xcconfig:
* Configurations/Version.xcconfig:
* Configurations/WebContentService.Development.xcconfig:
* Configurations/WebContentService.xcconfig:
2015-05-26 Milan Crha <mcrha@redhat.com>
[GTK] Expand wildcards inside generate-inspector-gresource-manifest.py
https://bugs.webkit.org/show_bug.cgi?id=138134
Reviewed by Žan Doberšek.
* PlatformGTK.cmake: Command line with expanded resources exceeds 32KB, which
is a limit on Windows. It's better to expand wildcards inside the python script.
2015-05-25 Dan Bernstein <mitz@apple.com>
ASSERT_MAIN_THREAD and DOM_ASSERT_MAIN_THREAD are unnecessary no-ops
https://bugs.webkit.org/show_bug.cgi?id=145372
Reviewed by Sam Weinig.
* Configurations/Base.xcconfig: Removed DISABLE_THREAD_CHECK from DEBUG_DEFINES.
2015-05-25 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add construct property to WebKitWebContext to set the IndexedDB database directory
https://bugs.webkit.org/show_bug.cgi?id=140882
Reviewed by Gustavo Noronha Silva.
Add WebKitWebContext:indexed-db-database-directory construct only property.
* UIProcess/API/gtk/WebKitWebContext.cpp:
(webkitWebContextGetProperty):
(webkitWebContextSetProperty):
(webkitWebContextConstructed):
(webkit_web_context_class_init):
2015-05-24 Sam Weinig <sam@webkit.org>
Crash when using a removed ScriptMessageHandler
<rdar://problem/20888499>
https://bugs.webkit.org/show_bug.cgi?id=145359
Reviewed by Dan Bernstein.
* WebProcess/UserContent/WebUserContentController.cpp:
(WebKit::WebUserMessageHandlerDescriptorProxy::~WebUserMessageHandlerDescriptorProxy):
Invalidate the descriptor when the message handler client (as implemented by WebUserMessageHandlerDescriptorProxy)
goes away. This will happen if a script message handler is removed at the API level or the WebUserContentController
is destroyed (which will happen if all the pages get destroyed).
2015-05-23 Dan Bernstein <mitz@apple.com>
<rdar://problem/21090327> /S/L/PrivateFrameworks/WebKit.framework is missing Headers and PrivateHeaders symlinks
https://bugs.webkit.org/show_bug.cgi?id=145354
Reviewed by David Kilzer.
* WebKit2.xcodeproj/project.pbxproj: Create Headers and PrivateHeaders symlinks alongside
the dylib symlink.
2015-05-23 Sungmann Cho <sungmann.cho@navercorp.com>
Rename ShareableResource::create(Handle&) to map(Handle&) to match SharedMemory.
https://bugs.webkit.org/show_bug.cgi?id=145288
Reviewed by Sam Weinig.
* Shared/ShareableResource.cpp:
(WebKit::ShareableResource::Handle::tryWrapInSharedBuffer):
(WebKit::ShareableResource::map):
(WebKit::ShareableResource::create): Deleted.
* Shared/ShareableResource.h:
2015-05-22 Jon Lee <jonlee@apple.com>
Rename MediaPlaybackAllowsInline
https://bugs.webkit.org/show_bug.cgi?id=145315
Reviewed by Eric Carlson.
Our API uses allowsInlineMediaPlayback. Our symbols should reflect the same.
* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetMediaPlaybackAllowsInline): Update the call to preferences.
The C API will not change in a future patch.
(WKPreferencesGetMediaPlaybackAllowsInline): Ditto.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]): Update the name of the key.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences): Ditto.
* UIProcess/API/gtk/WebKitSettings.cpp: Update the call.
(webkit_settings_get_media_playback_allows_inline):
(webkit_settings_set_media_playback_allows_inline):
2015-05-22 Jon Lee <jonlee@apple.com>
Rename MediaPlaybackAllowsAirPlay
https://bugs.webkit.org/show_bug.cgi?id=145316
Reviewed by Eric Carlson.
In preparation for an API rename, update internal symbols from mediaPlaybackAllowsAirPlay
to allowsAirPlayForMediaPlayback.
* Shared/WebPreferencesDefinitions.h: Update the name.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]): Ditto.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences): Update the call to settings.
2015-05-22 Jon Lee <jonlee@apple.com>
Unreviewed GTK fix after r184802.
* UIProcess/API/gtk/WebKitSettings.cpp:
(webkit_settings_get_media_playback_requires_user_gesture):
(webkit_settings_set_media_playback_requires_user_gesture):
2015-05-22 Jon Lee <jonlee@apple.com>
Rename MediaPlaybackRequiresUserGesture
https://bugs.webkit.org/show_bug.cgi?id=145314
Reviewed by Anders Carlsson.
In preparation for an API rename, update internal symbols from mediaPlaybackRequiresUserGesture
to requiresUserGestureForMediaPlayback.
No changes are being made to the API in this patch.
* Shared/WebPreferencesDefinitions.h: Update the name of the macro and the setting.
* UIProcess/API/C/WKPreferences.cpp: The C API will not change in a future patch.
(WKPreferencesSetMediaPlaybackRequiresUserGesture): Update the call to preferences.
(WKPreferencesGetMediaPlaybackRequiresUserGesture): Ditto.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]): Update the name of the key.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences): Ditto.
2015-05-22 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r183647.
https://bugs.webkit.org/show_bug.cgi?id=145326
broke some toolbar blurring behavior (Requested by thorton on
#webkit).
Reverted changeset:
"Asynchronous (or timed-out synchronous) resize flashes white
instead of page background color"
https://bugs.webkit.org/show_bug.cgi?id=144468
http://trac.webkit.org/changeset/183647
2015-05-22 Yongjun Zhang <yongjun_zhang@apple.com>
Image link doesn't create a preview view controller.
https://bugs.webkit.org/show_bug.cgi?id=145320
Also try to create the preview view controller if the hit-tested node
is a image link.
Reviewed by Beth Dakin.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView gestureRecognizerShouldBegin:]):
(-[WKContentView previewViewControllerForPosition:inSourceView:]):
2015-05-22 Tim Horton <timothy_horton@apple.com>
Avoid doing an extra layout in some cases while doing scale-to-fit
https://bugs.webkit.org/show_bug.cgi?id=145321
<rdar://problem/21051165>
Reviewed by Beth Dakin.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded):
If we make it to scaleViewToFitDocumentIfNeeded with valid layout,
the view width is still less than the last-known minimum document size,
and the document size hasn't changed, update the view scale without
doing an extra layout, keeping the fixed layout size at the previously
computed minimum document size.
2015-05-22 Beth Dakin <bdakin@apple.com>
Yellow highlight and DD popover don't go away when scrolling an iframe
https://bugs.webkit.org/show_bug.cgi?id=145312
-and corresponding-
rdar://problem/19692334
Reviewed by Tim Horton.
Match what Lookup already does for their popover and dismiss our popovers on
scroll.
* UIProcess/API/mac/WKView.mm:
(-[WKView scrollWheel:]):
This should not be needed anymore.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::pageDidScroll):
2015-05-22 Tim Horton <timothy_horton@apple.com>
Remove action menu support
https://bugs.webkit.org/show_bug.cgi?id=145305
<rdar://problem/21070771>
Reviewed by Anders Carlsson.
* Configurations/WebKit.xcconfig:
* Shared/API/c/WKActionMenuItemTypes.h:
* Shared/API/c/WKActionMenuTypes.h:
* UIProcess/API/Cocoa/WKViewPrivate.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView _didPerformImmediateActionHitTest:contentPreventsDefault:userData:]):
(-[WKView dealloc]): Deleted.
(-[WKView mouseDown:]): Deleted.
(-[WKView initWithFrame:processPool:configuration:webView:]): Deleted.
(-[WKView prepareForMenu:withEvent:]): Deleted.
(-[WKView willOpenMenu:withEvent:]): Deleted.
(-[WKView didCloseMenu:withEvent:]): Deleted.
(-[WKView _didPerformActionMenuHitTest:forImmediateAction:contentPreventsDefault:userData:]): Deleted.
(-[WKView _actionMenuItemsForHitTestResult:withType:defaultActionMenuItems:]): Deleted.
(-[WKView _actionMenuItemsForHitTestResult:withType:defaultActionMenuItems:userData:]): Deleted.
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::performImmediateActionHitTestAtLocation):
(WebKit::WebPageProxy::didPerformImmediateActionHitTest):
(WebKit::WebPageProxy::performActionMenuHitTestAtLocation): Deleted.
(WebKit::WebPageProxy::selectLastActionMenuRange): Deleted.
(WebKit::WebPageProxy::focusAndSelectLastActionMenuHitTestResult): Deleted.
(WebKit::WebPageProxy::didPerformActionMenuHitTest): Deleted.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::didPerformImmediateActionHitTest):
(WebKit::PageClientImpl::didPerformActionMenuHitTest): Deleted.
* UIProcess/mac/WKActionMenuController.h: Removed.
* UIProcess/mac/WKActionMenuController.mm: Removed.
* UIProcess/mac/WKImmediateActionController.h:
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController didPerformImmediateActionHitTest:contentPreventsDefault:userData:]):
(-[WKImmediateActionController immediateActionRecognizerWillPrepare:]):
(-[WKImmediateActionController immediateActionRecognizerWillBeginAnimation:]):
(-[WKImmediateActionController didPerformActionMenuHitTest:contentPreventsDefault:userData:]): Deleted.
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/API/APIInjectedBundlePageContextMenuClient.h:
(API::InjectedBundle::PageContextMenuClient::prepareForImmediateAction):
(API::InjectedBundle::PageContextMenuClient::prepareForActionMenu): Deleted.
* WebProcess/InjectedBundle/API/c/WKBundlePageContextMenuClient.h:
* WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
* WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h:
* WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
(WebKit::InjectedBundlePageContextMenuClient::prepareForImmediateAction):
(WebKit::InjectedBundlePageContextMenuClient::prepareForActionMenu): Deleted.
* WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.h:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/WebPageOverlay.cpp:
(WebKit::WebPageOverlay::actionContextForResultAtPoint):
* WebProcess/WebPage/WebPageOverlay.h:
(WebKit::WebPageOverlay::Client::actionContextForResultAtPoint):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::textIndicatorTransitionForImmediateAction):
(WebKit::WebPage::performImmediateActionHitTestAtLocation):
(WebKit::textIndicatorTransitionForActionMenu): Deleted.
(WebKit::WebPage::performActionMenuHitTestAtLocation): Deleted.
(WebKit::WebPage::selectLastActionMenuRange): Deleted.
(WebKit::WebPage::focusAndSelectLastActionMenuHitTestResult): Deleted.
Remove everything, except some enums that clients still refer to.
Also, leave SPI that used to be shared between immediate actions and
action menus intact, even if it had "action menu" in the name. We can
deprecate and rename in another patch... except for the very recently-added
support from r184106, which we'll revert entirely, removing WKBundlePageOverlayV2,
which was not adopted by any clients.
2015-05-22 Brady Eidson <beidson@apple.com>
Rework how the ResourceRequest user initiated property key is used.
Followup to https://bugs.webkit.org/show_bug.cgi?id=145281
Reviewed by Dan Bernstein.
* Shared/API/Cocoa/_WKNSURLRequestExtras.mm:
(-[NSURLRequest _web_isUserInitiated]):
(-[NSMutableURLRequest _web_setIsUserInitiated:]):
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(WKResourceRequestIsUserInitiatedKey): Deleted.
(InitWebCoreSystemInterface): Deleted.
2015-05-21 Gavin Barraclough <barraclough@apple.com>
Networking process sometimes suspended while WebContent runnable
https://bugs.webkit.org/show_bug.cgi?id=145291
<rdar://problem/21033029>
Reviewed by Andreas Kling.
There is an asymmetry in how the Networking process suspension is managed.
We drop the assertion (& suspend the process) whenever the WebProcess says
it is ready to suspend, but we only take the assertion (& resume execution)
when the WebContent process is actually resumed. This leaves a race where
the WebContent process was willing to be suspended, but the UI app changed
its mind suspending it. Since the WebContent process never actually suspended
(we only prepared it to), we never send a resume, and since we never resume,
we never wake the Networking process.
The fix is pretty clean. A web process should take a token on the networking
process precisely whenever it holds an assertion on the web content process.
This also enables a nice refinement, that when holding a BG assertion on the
WebContent process we only need to hold a BG assertion on the networking
process.
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::didSetAssertionState):
- no-op
* UIProcess/Network/NetworkProcessProxy.h:
- added didSetAssertionState.
* UIProcess/ProcessThrottler.cpp:
(WebKit::ProcessThrottler::updateAssertionNow):
(WebKit::ProcessThrottler::updateAssertion):
(WebKit::ProcessThrottler::didConnectToProcess):
- whenever taking/updating the assertion, inform the client via didSetAssertionState.
* UIProcess/ProcessThrottlerClient.h:
- added didSetAssertionState.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::didFinishLaunching):
removed initializeNetworkProcessActivityToken - this is taken via ProcessThrottler::didConnectToProcess.
(WebKit::WebProcessProxy::sendProcessDidResume):
- removed call to initializeNetworkProcessActivityToken - updated via didSetAssertionState.
(WebKit::WebProcessProxy::processReadyToSuspend):
- removed update of m_tokenForNetworkProcess - updated via didSetAssertionState.
(WebKit::WebProcessProxy::didSetAssertionState):
- update m_backgroundTokenForNetworkProcess/m_foregroundTokenForNetworkProcess.
(WebKit::WebProcessProxy::initializeNetworkProcessActivityToken): Deleted.
- updated via didSetAssertionState.
* UIProcess/WebProcessProxy.h:
- added didSetAssertionState, added separate FG/BG activity tokens for Networking process.
2015-05-22 Dan Bernstein <mitz@apple.com>
Fixed the fix for <rdar://problem/20830673> Symlink the WebKit dylib instead of just the framework directory
https://bugs.webkit.org/show_bug.cgi?id=145287
Reviewed by Anders Carlsson.
* WebKit2.xcodeproj/project.pbxproj: Give the symlink the correct destination.
2015-05-21 Brady Eidson <beidson@apple.com>
Add an "initiated by user gesture" flag to ResourceRequest.
https://bugs.webkit.org/show_bug.cgi?id=145281
Reviewed by Alex Christensen.
Expose a new category on NSURLRequest to allow SPI clients to easily set/get the flag:
* Shared/API/Cocoa/_WKNSURLRequestExtras.h: Added.
* Shared/API/Cocoa/_WKNSURLRequestExtras.mm: Added.
(-[NSURLRequest _web_isUserInitiated]):
(-[NSMutableURLRequest _web_setIsUserInitiated:]):
* WebKit2.xcodeproj/project.pbxproj:
Expose the new property key to WebCore:
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(WKResourceRequestIsUserInitiatedKey):
(InitWebCoreSystemInterface):
2015-05-21 Daniel Bates <dabates@apple.com>
Rollout <http://trac.webkit.org/changeset/183909>
(https://bugs.webkit.org/show_bug.cgi?id=144657)
Revert <http://trac.webkit.org/changeset/183909> since pausing the database
thread prevents in-progress transactions from completing. We need to think
about this change some more.
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _applicationDidEnterBackground:]): Deleted.
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::applicationDidEnterBackground): Deleted.
* WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
(WebKit::WebDatabaseManager::setPauseAllDatabases): Deleted.
* WebProcess/WebCoreSupport/WebDatabaseManager.h:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::applicationWillEnterForeground): Deleted.
(WebKit::WebPage::applicationDidEnterBackground): Deleted.
2015-05-21 Enrica Casucci <enrica@apple.com>
[iOS] Crash when taking a snapshot of a large PDF.
https://bugs.webkit.org/show_bug.cgi?id=145286
rdar://problem/20892362
Reviewed by Tim Horton.
The code for the PDF case was incorrectly computing the snapshot rect.
On top of that drawViewHierarchyInRect was ignoring the rect and
always creating an image using the view bounds causing the crash.
We are now always using the IOSurface if we are parented or
an image context when we are not.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
2015-05-21 Anders Carlsson <andersca@apple.com>
Symlink the WebKit dylib instead of just the framework directory
https://bugs.webkit.org/show_bug.cgi?id=145287
rdar://problem/20830673
Reviewed by Dan Bernstein.
* WebKit2.xcodeproj/project.pbxproj:
2015-05-21 Anders Carlsson <andersca@apple.com>
WKWebsiteDataStore doesn't track and remove iOS Safari's offline application cache entries
https://bugs.webkit.org/show_bug.cgi?id=145279
rdar://problem/20657912
Reviewed by Dan Bernstein.
Special-case iOS Safari and WebApp when computing the default application cache directory.
* UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
(API::applicationCacheDirectory):
(API::WebsiteDataStore::defaultDataStoreConfiguration):
2015-05-21 Brian Weinstein <bweinstein@apple.com>
Add a _WKWebKitContentExtensionStore initializer that takes a path.
https://bugs.webkit.org/show_bug.cgi?id=145269 and work towards <rdar://problem/21031414>
Reviewed by Anders Carlsson.
* UIProcess/API/APIUserContentExtensionStore.cpp:
(API::UserContentExtensionStore::storeWithPath):
* UIProcess/API/APIUserContentExtensionStore.h:
* UIProcess/API/Cocoa/_WKUserContentExtensionStore.h:
* UIProcess/API/Cocoa/_WKUserContentExtensionStore.mm:
(+[_WKUserContentExtensionStore storeWithURL:]):
2015-05-21 Alexey Proskuryakov <ap@apple.com>
Build fix. Silence some deprecation warnings.
* UIProcess/ios/forms/WKFileUploadPanel.mm:
(-[WKFileUploadPanel _presentPopoverWithContentViewController:animated:]):
* UIProcess/ios/forms/WKFormInputControl.mm:
(-[WKDateTimePopover initWithView:datePickerMode:]):
* UIProcess/ios/forms/WKFormPopover.h:
* UIProcess/ios/forms/WKFormPopover.mm:
* UIProcess/ios/forms/WKFormSelectPopover.mm:
(-[WKSelectPopover initWithView:hasGroups:]):
2015-05-21 Csaba Osztrogonác <ossy@webkit.org>
[EFL] Remove an unused private field from EwkPopupMenuItem class
https://bugs.webkit.org/show_bug.cgi?id=145249
Reviewed by Gyuyoung Kim.
* UIProcess/API/efl/ewk_popup_menu.cpp:
(EwkPopupMenu::EwkPopupMenu):
* UIProcess/API/efl/ewk_popup_menu_private.h:
2015-05-21 Csaba Osztrogonác <ossy@webkit.org>
[EFL] Fix mismatched-tags warnings in UIProcess/API/efl
https://bugs.webkit.org/show_bug.cgi?id=145129
Reviewed by Gyuyoung Kim.
* UIProcess/API/efl/EwkViewCallbacks.h:
* UIProcess/API/efl/ewk_application_cache_manager.h:
* UIProcess/API/efl/ewk_auth_request.h:
* UIProcess/API/efl/ewk_back_forward_list.h:
* UIProcess/API/efl/ewk_back_forward_list_item.h:
* UIProcess/API/efl/ewk_color_picker.h:
* UIProcess/API/efl/ewk_context.h:
* UIProcess/API/efl/ewk_context_menu_item.h:
* UIProcess/API/efl/ewk_cookie_manager.h:
* UIProcess/API/efl/ewk_database_manager.h:
* UIProcess/API/efl/ewk_download_job.h:
* UIProcess/API/efl/ewk_error.h:
* UIProcess/API/efl/ewk_favicon_database.h:
* UIProcess/API/efl/ewk_file_chooser_request.h:
* UIProcess/API/efl/ewk_form_submission_request.h:
* UIProcess/API/efl/ewk_navigation_data.h:
* UIProcess/API/efl/ewk_navigation_policy_decision.h:
* UIProcess/API/efl/ewk_object.h:
* UIProcess/API/efl/ewk_page_group.h:
* UIProcess/API/efl/ewk_popup_menu.h:
* UIProcess/API/efl/ewk_popup_menu_item.h:
* UIProcess/API/efl/ewk_security_origin.h:
* UIProcess/API/efl/ewk_settings.h:
* UIProcess/API/efl/ewk_storage_manager.h:
* UIProcess/API/efl/ewk_url_request.h:
* UIProcess/API/efl/ewk_url_response.h:
* UIProcess/API/efl/ewk_url_scheme_request.h:
* UIProcess/API/efl/ewk_view.h:
* UIProcess/API/efl/ewk_window_features.h:
* WebProcess/InjectedBundle/API/efl/ewk_extension.h:
* WebProcess/InjectedBundle/API/efl/ewk_page.h:
2015-05-21 Csaba Osztrogonác <ossy@webkit.org>
Fix mismatched-tags warnings related to CoordinatedGraphics
https://bugs.webkit.org/show_bug.cgi?id=145130
Reviewed by Darin Adler.
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
* UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.messages.in:
* WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
2015-05-20 Gyuyoung Kim <gyuyoung.kim@webkit.org>
Unreviewed GTK build fix since r184686.
* UIProcess/gtk/WebProcessPoolGtk.cpp:
(WebKit::WebProcessPool::legacyPlatformDefaultApplicationCacheDirectory): Add *legacy* prefix.
(WebKit::WebProcessPool::platformDefaultApplicationCacheDirectory): Deleted.
2015-05-20 Gyuyoung Kim <gyuyoung.kim@webkit.org>
Unreviewed EFL build fix since r184686.
* UIProcess/efl/WebProcessPoolEfl.cpp:
(WebKit::WebProcessPool::legacyPlatformDefaultApplicationCacheDirectory): Add *legacy* prefix.
(WebKit::WebProcessPool::platformDefaultApplicationCacheDirectory): Deleted.
2015-05-20 Chris Dumez <cdumez@apple.com>
[WK2][iOS] Update WebContent process sandbox profile for AWD logging
https://bugs.webkit.org/show_bug.cgi?id=145229
<rdar://problem/20543269>
Reviewed by Alexey Proskuryakov.
* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2015-05-20 Gavin Barraclough <barraclough@apple.com>
dispatchViewStateChange should not wait for sync reply if the page isn't visible
https://bugs.webkit.org/show_bug.cgi?id=145242
<rdar://problem/20967937>
Reviewed by Ben Poulain.
This is particularly problematic on iOS, since if the page isn't visible the process is likely suspended.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::dispatchViewStateChange):
(WebKit::WebPageProxy::waitForDidUpdateViewState):
2015-05-20 Marcos Chavarría Teijeiro <mchavarria@igalia.com>
Enable disk cache for range requests
https://bugs.webkit.org/show_bug.cgi?id=144682
Reviewed by Antti Koivisto.
Add Range header value to the network cache key constructor so we take
into account this value. The 206 response code is also marked to be cached.
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::makeCacheKey):
(WebKit::NetworkCache::isStatusCodeCacheableByDefault):
* NetworkProcess/cache/NetworkCacheKey.cpp:
(WebKit::NetworkCache::Key::Key):
(WebKit::NetworkCache::Key::operator=):
(WebKit::NetworkCache::Key::computeHash):
(WebKit::NetworkCache::Key::operator==):
(WebKit::NetworkCache::Key::encode):
(WebKit::NetworkCache::Key::decode):
(WebKit::NetworkCache::Key::stringToHash): Deleted.
* NetworkProcess/cache/NetworkCacheKey.h:
2015-05-20 Anders Carlsson <andersca@apple.com>
WKWebsiteDataStore API doesn't report webkit.org as using Databases or App Cache after visiting http://www.webkit.org/demos/sticky-notes/
https://bugs.webkit.org/show_bug.cgi?id=145238
rdar://problem/20581175
Reviewed by Tim Horton.
Make sure to set the application cache and WebSQL directories when using the legacy data store.
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::legacyPlatformDefaultApplicationCacheDirectory):
(WebKit::WebProcessPool::platformDefaultApplicationCacheDirectory):
Rename this and move it to the right place.
* UIProcess/WebProcessPool.cpp:
(WebKit::legacyWebsiteDataStoreConfiguration):
Rename this and add the application cache and WebSQL directories.
(WebKit::WebProcessPool::WebProcessPool):
Call legacyWebsiteDataStoreConfiguration.
(WebKit::WebProcessPool::applicationCacheDirectory):
Call legacyPlatformDefaultApplicationCacheDirectory.
* UIProcess/WebProcessPool.h:
2015-05-20 Enrica Casucci <enrica@apple.com>
[iOS] Using CSS viewport units causes incorrect layout.
https://bugs.webkit.org/show_bug.cgi?id=145225
rdar://problem/20924495
Reviewed by Benjamin Poulain.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::updateViewportSizeForCSSViewportUnits):
2015-05-20 Tim Horton <timothy_horton@apple.com>
Allow overriding the waitForDidUpdateViewState timeout
https://bugs.webkit.org/show_bug.cgi?id=145230
<rdar://problem/20990162>
Reviewed by Darin Adler.
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::waitForDidUpdateViewState):
Use the value from NSUserDefaults, if it exists.
We'll only check once, so changing the default requires a restart of the UI process.
2015-05-20 Anders Carlsson <andersca@apple.com>
Make sure we always have a process pool to perform data store operations with
https://bugs.webkit.org/show_bug.cgi?id=145231
rdar://problem/20618248
Reviewed by Tim Horton.
Make sure that we always return a process pool. If we're a legacy C SPI per-context data store,
find the process pool we're a part of and use that. Otherwise, create a new one.
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::processPools):
2015-05-19 Jer Noble <jer.noble@apple.com>
Touching HTMLMediaElement.h or MediaPlayer.h causes a world rebuild.
https://bugs.webkit.org/show_bug.cgi?id=145193
Reviewed by Eric Carlson.
Use HTMLMediaElementEnums instead of HTMLMediaElement.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _isShowingVideoOptimized]): HTMLMediaElement -> HTMLMediaElementEnums.
* UIProcess/ios/WebVideoFullscreenManagerProxy.h:
* UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::hasMode): Ditto.
(WebKit::WebVideoFullscreenModelContext::fullscreenModeChanged): Ditto.
(WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID): Ditto.
(WebKit::WebVideoFullscreenManagerProxy::fullscreenModeChanged): Ditto.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::enterVideoFullscreenForVideoElement): Ditto.
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/ios/WebVideoFullscreenManager.h:
(WebKit::WebVideoFullscreenInterfaceContext::fullscreenMode): Ditto.
(WebKit::WebVideoFullscreenInterfaceContext::setFullscreenMode): Ditto.
* WebProcess/ios/WebVideoFullscreenManager.messages.in:
* WebProcess/ios/WebVideoFullscreenManager.mm:
(WebKit::WebVideoFullscreenManager::enterVideoFullscreenForVideoElement): Ditto.
(WebKit::WebVideoFullscreenManager::fullscreenModeChanged): Ditto.
(WebKit::WebVideoFullscreenManager::didCleanupFullscreen): Ditto.
2015-05-20 Anders Carlsson <andersca@apple.com>
Refactor process pool enumeration code in WebsiteDataStore
https://bugs.webkit.org/show_bug.cgi?id=145218
Reviewed by Tim Horton.
Also make sure to keep the WebProcessPool objects alive for the duration of the various data store
operations. This is the first step towards having the data store create a single process pool lazily if
there are no web views associated with the data store.
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::fetchData):
(WebKit::WebsiteDataStore::removeData):
(WebKit::WebsiteDataStore::processPools):
* UIProcess/WebsiteData/WebsiteDataStore.h:
2015-05-20 Alex Christensen <achristensen@webkit.org>
[Content Extensions] Relax restrictions on triggers that match everything.
https://bugs.webkit.org/show_bug.cgi?id=145069
Reviewed by Benjamin Poulain.
* UIProcess/API/APIUserContentExtensionStore.h:
Increment version number to reflect changes in DFABytecode.
2015-05-20 Sungmann Cho <sungmann.cho@navercorp.com>
Minor cleanups to PluginProcessProxy.
https://bugs.webkit.org/show_bug.cgi?id=145199
Reviewed by Anders Carlsson.
1. Remove unnecessary forward declaration.
2. Remove unnecessary #include.
* UIProcess/Plugins/PluginProcessProxy.cpp:
* UIProcess/Plugins/PluginProcessProxy.h:
2015-05-20 Marcos Chavarría Teijeiro <mchavarria@igalia.com>
[GTK] Add some documentation to WebKitWebExtension
https://bugs.webkit.org/show_bug.cgi?id=142786
Reviewed by Carlos Garcia Campos.
WebKitWebExtension API documentation lacks of some details and the information
available is in some contributors blog posts. I add the section
documentation with a small guide about how to use WebExtensions.
The code examples were taken from Carlos García and Adrián Pérez blog
posts.
* WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp:
2015-05-20 Sungmann Cho <sungmann.cho@navercorp.com>
Rename WebsiteDataStore::isNonPersistent() to WebsiteDataStore::isPersistent().
https://bugs.webkit.org/show_bug.cgi?id=145111
Reviewed by Darin Adler.
This is a follow up to https://bugs.webkit.org/show_bug.cgi?id=144158.
* UIProcess/API/APIWebsiteDataStore.cpp:
(API::WebsiteDataStore::isPersistent):
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::fetchData):
(WebKit::WebsiteDataStore::removeData):
* UIProcess/WebsiteData/WebsiteDataStore.h:
(WebKit::WebsiteDataStore::isPersistent):
(WebKit::WebsiteDataStore::isNonPersistent): Deleted.
2015-05-20 Hyungwook Lee <hyungwook.lee@navercorp.com>
[EFL] Fix build failure, linker does not find libXext.
https://bugs.webkit.org/show_bug.cgi?id=144100
Reviewed by Gyuyoung Kim.
Move Xext library from WebProcess_LIBRARIES to WebKit2_LIBRARIES.
* PlatformEfl.cmake:
2015-05-19 Carlos Garcia Campos <cgarcia@igalia.com>
[SOUP] Network Cache: Implement ShareableResource for Soup and enable it for GTK platform
https://bugs.webkit.org/show_bug.cgi?id=144380
Reviewed by Antti Koivisto.
It improves the network cache performance, by mmaping big
resources and sending only the file descriptor to the web process
instead of the actual file data. It needs some changes in
cross-platform code, because we can't use the same approach as
mac (it uses a platform specific implementation not available in
other platforms).
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::store): Use
Data::tryCreateSharedMemory() to create the shared memory used by
the ShareableResource. Also add an ASSERT instead of checking the
shareable resource created is not nullptr, because the
ShareableResource::create() that receives a shared memory should
never return nullptr.
* NetworkProcess/cache/NetworkCacheData.h:
* NetworkProcess/cache/NetworkCacheDataCocoa.mm:
(WebKit::NetworkCache::Data::tryCreateSharedMemory):
* NetworkProcess/cache/NetworkCacheDataSoup.cpp:
(WebKit::NetworkCache::Data::tryCreateSharedMemory): Create a
SharedMemory object to wrap the mapped file, but keeping the ownership.
* NetworkProcess/cache/NetworkCacheEntry.cpp:
(WebKit::NetworkCache::Entry::initializeShareableResourceHandleFromStorageRecord):
Use Data::tryCreateSharedMemory() to create the shared memory used
bythe ShareableResource. Also add an ASSERT instead of checking
the shareable resource created is not nullptr, because the
ShareableResource::create() that receives a shared memory should
never return nullptr.
* Platform/SharedMemory.h:
* Platform/unix/SharedMemoryUnix.cpp:
(WebKit::SharedMemory::map): Use wrapMap() and initialize
m_isWrappingMap to false.
(WebKit::SharedMemory::wrapMap): Create a SharedMemory object for
the given map, without taking its ownership.
(WebKit::SharedMemory::~SharedMemory): Do not unmap and close the
file descriptor if m_isWrappingMap is true.
* Shared/ShareableResource.cpp:
(WebKit::createShareableResourceDeallocator):
(WebKit::ShareableResource::wrapInSharedBuffer): Create a SharedBuffer
wrapping the ShareableResource data.
(WebKit::ShareableResource::Handle::tryWrapInSharedBuffer): Create
a ShareableResource for the handle and create a SharedBuffer
wrapping it.
* Shared/ShareableResource.h:
* WebKit2Prefix.h: Enable ENABLE_SHAREABLE_RESOURCE for GTK.
* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::didReceiveResource): Get the CFData
from the SharedBuffer for QuickLook instead of wrapping the handle again.
2015-05-19 Carlos Garcia Campos <cgarcia@igalia.com>
[SOUP] Network Cache: Disable network cache efficacy logging
https://bugs.webkit.org/show_bug.cgi?id=145172
Reviewed by Martin Robinson.
Disable network cache efficacy logging by default, since we are
not currently using the collected data.
* UIProcess/soup/WebProcessPoolSoup.cpp:
(WebKit::WebProcessPool::platformInitializeNetworkProcess):
2015-05-19 Michael Saboff <msaboff@apple.com>
REGRESSION(183787): JIT is enabled for all builds
https://bugs.webkit.org/show_bug.cgi?id=145179
Reviewed by Geoffrey Garen.
Eliminated the setting of ENABLE_JIT, as wtf/Platform.h has appropriate logic to
set it depending on OS and CPU type.
* Configurations/FeatureDefines.xcconfig:
2015-05-19 Brady Eidson <beidson@apple.com>
X-Frame-Options headers not respected when loading from application cache.
<rdar://problem/14877623> and https://bugs.webkit.org/show_bug.cgi?id=131800
Reviewed by Alexey Proskuryakov.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::loadDataImpl):
2015-05-19 Sungmann Cho <sungmann.cho@navercorp.com>
Add PLUGIN_ARCHITECTURE(MAC) around WKNVCALayerRenderServerPort in NetscapeBrowserFunc.h.
https://bugs.webkit.org/show_bug.cgi?id=145173
Reviewed by Anders Carlsson.
WKNVCALayerRenderServerPort in NetscapeBrowserFunc.h is meaningful only for Mac.
So we need to add PLUGIN_ARCHITECTURE(MAC) around it.
* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.h:
2015-05-19 Brent Fulgham <bfulgham@apple.com>
REGRESSION(142590): Part 2: Scroll-snap points are improperly snapping to earlier index values (Scrolling Thread)
https://bugs.webkit.org/show_bug.cgi?id=145175
<rdar://problem/21023785>
Reviewed by Beth Dakin.
Add a stub implementation of isScrollSnapInProgress to match ScrollingCoordinator signature.
* WebProcess/Scrolling/RemoteScrollingCoordinator.h:
* WebProcess/Scrolling/RemoteScrollingCoordinator.mm:
(WebKit::RemoteScrollingCoordinator::isScrollSnapInProgress): Added stub.
2015-05-19 Jeremy Jones <jeremyj@apple.com>
WebVideoFullscreenManagerProxy has incorrect OS_VERSION_MIN_REQUIRED conditionals.
https://bugs.webkit.org/show_bug.cgi?id=145158
Reviewed by Eric Carlson.
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::setVideoLayerFrame):
2015-05-19 Ting-Wei Lan <lantw44@gmail.com>
[SOUP] Use st_birthtime to get creation time of files on systems support it
https://bugs.webkit.org/show_bug.cgi?id=144989
Reviewed by Carlos Garcia Campos.
FreeBSD and NetBSD have either st_birthtime field or compatiblity macro
with the same name in stat. It is better to use it instead of manually
setting xattr, which is unreliable because both operating systems and
file systems support are required.
* NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
(WebKit::NetworkCache::fileTimes):
* NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
(WebKit::NetworkCache::IOChannel::IOChannel):
2015-05-19 Chris Dumez <cdumez@apple.com>
Mark static variables as const when possible
https://bugs.webkit.org/show_bug.cgi?id=145161
Reviewed by Andreas Kling.
* Platform/IPC/MessageEncoder.cpp:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::networkProcessLatencyQOS):
(WebKit::networkProcessThroughputQOS):
(WebKit::webProcessLatencyQOS):
(WebKit::webProcessThroughputQOS):
* UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
(WebKit::PluginProcessProxy::pluginNeedsExecutableHeap):
(WebKit::pluginProcessLatencyQOS):
(WebKit::pluginProcessThroughputQOS):
* WebProcess/WebPage/WebPage.cpp:
2015-05-18 Michael Catanzaro <mcatanzaro@igalia.com>
[CMake] Ignore warnings in system headers
https://bugs.webkit.org/show_bug.cgi?id=144747
Reviewed by Darin Adler.
Separate include directories into WebKit project includes and system includes. Suppress all
warnings from headers in system include directories using the SYSTEM argument to
the include_directories command.
* CMakeLists.txt:
* PlatformEfl.cmake:
* PlatformGTK.cmake:
2015-05-18 Csaba Osztrogonác <ossy@webkit.org>
Fix return-type warnings in test_ewk2_color_picker.cpp
https://bugs.webkit.org/show_bug.cgi?id=145122
Reviewed by Gyuyoung Kim.
* UIProcess/API/efl/tests/test_ewk2_color_picker.cpp:
(EWK2ColorPickerTest::hideColorPicker):
(EWK2ColorPickerTest::hideColorPickerByRemovingElement):
2015-05-18 Skachkov Alexandr <gskachkov@gmail.com>
[ES6] Arrow function syntax. Feature flag for arrow function
https://bugs.webkit.org/show_bug.cgi?id=145108
Reviewed by Ryosuke Niwa.
Added feature flag ENABLE_ES6_ARROWFUNCTION_SYNTAX for arrow function
* Configurations/FeatureDefines.xcconfig:
2015-05-18 Anders Carlsson <andersca@apple.com>
WKWebsiteDataStore should fully support session storage
https://bugs.webkit.org/show_bug.cgi?id=145145
rdar://problem/10690447
Reviewed by Sam Weinig.
Add a session store data type and handle it when clearing and fetching data.
* Shared/WebsiteData/WebsiteDataTypes.h:
* UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
* UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
(dataTypesToString):
* UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
(WebKit::toWebsiteDataTypes):
(WebKit::toWKWebsiteDataTypes):
* UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
(+[WKWebsiteDataStore allWebsiteDataTypes]):
* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::SessionStorageNamespace::origins):
(WebKit::StorageManager::SessionStorageNamespace::clearStorageAreasMatchingOrigin):
(WebKit::StorageManager::SessionStorageNamespace::clearAllStorageAreas):
(WebKit::StorageManager::getSessionStorageOrigins):
(WebKit::StorageManager::deleteSessionStorageOrigins):
(WebKit::StorageManager::deleteSessionStorageEntriesForOrigins):
* UIProcess/Storage/StorageManager.h:
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::fetchData):
(WebKit::WebsiteDataStore::removeData):
2015-05-18 Brady Eidson <beidson@apple.com>
Followup to: Networking process on iOS can be suspended and never exit
https://bugs.webkit.org/show_bug.cgi?id=144971.
Unreviewed. Fixing API tests that revealed the unintentional change in behavior.
* Shared/ChildProcessProxy.cpp:
(WebKit::ChildProcessProxy::shutDownProcess): The on WebProcessProxy code path that this
was adopted from had an m_connection null check, and that null check needs to remain.
2015-05-18 Csaba Osztrogonác <ossy@webkit.org>
[GTK] URTBF after r184503.
* PlatformGTK.cmake:
2015-05-18 Brady Eidson <beidson@apple.com>
Networking process on iOS can be suspended and never exit.
<rdar://problem/20368630> and https://bugs.webkit.org/show_bug.cgi?id=144971
Reviewed by Darin Adler.
There's a few issues here.
1 - When the NetworkProcessProxy goes away, it takes its process assertion with it. This causes
the Network process to suspend indefinitely, unable to ever respond to IPC::Connection callbacks.
We already solved this with WebProcess with a watchdog timer keeping both the process assertion
and xpc_connection alive while the process shuts down. This patch expands that to the network
process, and it will be easy to expand that to database and plugin processes doing forward.
2 - All of our child processes either decide to self-terminate or listen for their connection to
close at which point they terminate. This leads to various races. We should
move to a model where the UI process explicitly tells them to shutdown, and this patch starts us
down that path.
* CMakeLists.txt:
* DerivedSources.make:
* WebKit2.xcodeproj/project.pbxproj:
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::didReceiveMessage): Send ChildProcess messages to ChildProcess.
* Shared/ChildProcess.cpp:
(WebKit::ChildProcess::shutDown): For now, just terminate the process. In the future have the
process do cleanup work before it is terminated.
* Shared/ChildProcess.h:
* Shared/ChildProcess.messages.in: Added.
* Shared/ChildProcessProxy.cpp:
(WebKit::ChildProcessProxy::shutDownProcess): Set a watchdog and - if possible - explicitly message
the process to ShutDown.
(WebKit::ChildProcessProxy::abortProcessLaunchIfNeeded): Deleted.
* Shared/ChildProcessProxy.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::~WebProcessPool): Explicitly tell the network process to shut down.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::removeWebPage): Move abortProcessLaunchIfNeeded() and the watchdog timer
code to ChildProcessProxy::shutDownProcess.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::didReceiveMessage): Send ChildProcess messages to ChildProcess::didReceiveMessage.
2015-05-17 Carlos Garcia Campos <cgarcia@igalia.com>
Network Cache: Make Data::adoptMap take the ownership of the file descriptor
https://bugs.webkit.org/show_bug.cgi?id=144950
Reviewed by Antti Koivisto.
It will be required to implement ShareableResource for soup
network backend. Also move the common code of Data to a common
file and add mapToFile(). The mapFile version that receives a file
descriptor has been renamed to adoptAndMapFile().
* CMakeLists.txt: Add new file to compilation.
* NetworkProcess/cache/NetworkCacheBlobStorage.cpp:
(WebKit::NetworkCache::BlobStorage::add): Use mapToFile().
* NetworkProcess/cache/NetworkCacheData.cpp: Added.
(WebKit::NetworkCache::Data::mapToFile): Write the data to the
given file and map it.
(WebKit::NetworkCache::mapFile):
(WebKit::NetworkCache::adoptAndMapFile):
(WebKit::NetworkCache::computeSHA1):
(WebKit::NetworkCache::bytesEqual):
* NetworkProcess/cache/NetworkCacheData.h:
* NetworkProcess/cache/NetworkCacheDataCocoa.mm:
(WebKit::NetworkCache::Data::adoptMap): Close the file descriptor.
* NetworkProcess/cache/NetworkCacheDataSoup.cpp:
(WebKit::NetworkCache::Data::Data): Use a constructor that
receives a file descriptor instead of the one receiving
Backing. If the file descriptor is not -1 then the Data is a map.
(WebKit::NetworkCache::MapWrapper::~MapWrapper): Also close the
file descriptor.
(WebKit::NetworkCache::Data::adoptMap): Pass the file descriptor
to the MapWrapper and create the Data passing the file descriptor.
* UIProcess/API/APIUserContentExtensionStore.cpp:
(API::openAndMapContentExtension): Use mapFile that receives a
file path.
(API::compiledToFile): Use adoptAndMapFile() and don't close the
descriptor.
2015-05-16 Andy Estes <aestes@apple.com>
[iOS] WKPDFView should not follow javascript: links
https://bugs.webkit.org/show_bug.cgi?id=145101
Reviewed by Dan Bernstein.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::navigateToPDFLinkWithSimulatedClick): Returned early if url's protocol is javascript:.
(WebKit::WebPageProxy::navigateToURLWithSimulatedClick): Renamed to navigateToPDFLinkWithSimulatedClick to
reflect that this function is exclusively for following PDF links.
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView annotation:wasTouchedAtPoint:controller:]):
(-[WKPDFView actionSheetAssistant:openElementAtLocation:]):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::navigateToPDFLinkWithSimulatedClick): Renamed from navigateToURLWithSimulatedClick.
(WebKit::WebPage::navigateToURLWithSimulatedClick): Renamed to navigateToPDFLinkWithSimulatedClick.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
2015-05-16 Brent Fulgham <bfulgham@apple.com>
[iOS] Remote scrolling tree needs to coordinate scroll snap state during resize/rotations
https://bugs.webkit.org/show_bug.cgi?id=145059
<rdar://problem/20975978>
Reviewed by Simon Fraser.
The web view needs to update its scroll snap point offsets to take into account any
adjustments to the view size caused by content insets. We also need to update the
offstes after device rotation.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView scrollViewWillEndDragging:withVelocity:targetContentOffset:]): Retrieve the proper
computed content inset for the view and incorporate into any scroll snap point adjustments.
(-[WKWebView _updateVisibleContentRects]): If we have active scroll snap points,
* UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
* UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
(WebKit::RemoteScrollingCoordinatorProxy::adjustTargetContentOffsetForSnapping): Update to account
for content inset.
(WebKit::RemoteScrollingCoordinatorProxy::shouldSnapForMainFrameScrolling): Also validate that the
active index is valid.
(WebKit::RemoteScrollingCoordinatorProxy::closestSnapOffsetForMainFrameScrolling): Update to track
current active snap offset index.
(WebKit::RemoteScrollingCoordinatorProxy::hasActiveSnapPoint): Added.
(WebKit::RemoteScrollingCoordinatorProxy::nearestActiveSnapPoint): Added. It calculates the proper
scroll position incorporating any snap point and content insets.
2015-05-15 Yongjun Zhang <yongjun_zhang@apple.com>
Don't reset the preview recognizer in [WKContentViewInteraction cleanupInteraction]
https://bugs.webkit.org/show_bug.cgi?id=145081
We shouldn't reset the recognizer in [WKContentViewInteraction cleanupInteraction] since we don't re-add it
back to WKContentView when the process relaunched. Since we already add/remove it when the view is move into/
removed from the window, we don't need reset it in cleanupInteraction.
Reviewed by Dan Bernstein.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView cleanupInteraction]):
2015-05-15 James Savage <james.savage@apple.com>
REGRESSION (r181910): WKWebView incorrectly scales snapshot
https://bugs.webkit.org/show_bug.cgi?id=145076
Reviewed by Tim Horton.
We added a fast path to snapshotting using IOSurfaces with
http://trac.webkit.org/changeset/181910 which incorrectly determined
scale and transform and resulted in bad snapshots in some situations.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
When snapshotting an IOSurface we need to compute our scale based off of
the rect in the WKWebView coordinates, we also failed to account for
non-zero origins in the snapshot rect. Remove an unused varible while
we're here.
2015-05-15 Alex Christensen <achristensen@webkit.org>
[Content Extensions] Fail to load old content extension files
https://bugs.webkit.org/show_bug.cgi?id=145027
Reviewed by Eric Carlson.
* UIProcess/API/APIUserContentExtensionStore.cpp:
(API::openAndMapContentExtension):
* UIProcess/API/APIUserContentExtensionStore.h:
2015-05-15 Jeremy Jones <jeremyj@apple.com>
Limit alternate fullscreen with linked on or after.
https://bugs.webkit.org/show_bug.cgi?id=144894
Reviewed by Dean Jackson.
* UIProcess/API/Cocoa/WKWebView.mm:
(shouldAllowAlternateFullscreen): Added.
(-[WKWebView initWithFrame:configuration:]):
2015-05-15 Chris Dumez <cdumez@apple.com>
[WK2][Cocoa] Back swipe tab snapshot takes a long time to be removed on bing.com
https://bugs.webkit.org/show_bug.cgi?id=145061
<rdar://problem/20939743>
Reviewed by Tim Horton.
When swiping back from a video search result to the list of video
search results on bing.com, the back swipe gesture tab snapshot takes
~3 seconds to be removed, even though the page gets loaded almost
instantly from PageCache. The tab snapshot should be removed as soon as
the load is done.
The issue is that we only cleared the back swipe gesture tab snapshot
after PageClient::didFinishLoadForMainFrame() has been called. However,
PageClient::didFinishLoadForMainFrame() was only being called by
WebPageProxy if the main frame loaded *without* error. In case the main
frame loaded with an error, only WebPageProxy::didFailLoadForFrame() is
called, not WebPageProxy::didFinishLoadForFrame() and we would fail to
remove the gesture snapshot until the 3 seconds timeout.
This patch calls PageClient::didFinishLoadForMainFrame() from
WebPageProxy::didFailLoadForFrame() so we remove the snapshot in the
error case as well.
The reason didFailLoadForFrame() is being called on bing.com video
search results is because a "ping" load is aborted when the page is
entering PageCache. Aborting any kind of resource load sets a
"cancellation" error on the main document.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didFailLoadForFrame):
2015-05-14 Carlos Garcia Campos <cgarcia@igalia.com>
REGRESSION(r183861): [SOUP] Downloads are broken when using the Network Process
https://bugs.webkit.org/show_bug.cgi?id=144738
Reviewed by Alexey Proskuryakov.
When converting the main resource handle to a download, the
NetworkResourceLoader is aborted, and the ResourceHandle is
cleaned up aborting the download operation. We need to use a
different ResourceHandle for the download operation.
* Shared/Downloads/soup/DownloadSoup.cpp:
(WebKit::Download::startWithHandle): Use ResourceHandle::releaseForDownload()
instead of reusing the given handle.
2015-05-14 Brady Eidson <beidson@apple.com>
Rename connectionDidClose and related methods to be more clear.
https://bugs.webkit.org/show_bug.cgi?id=145030
Reviewed by Darin Adler.
These methods were easy to confuse with "Connection::Client::didClose()", yet they
were about something much more explicit: A child process being shut down by the UI Process.
Let's call them as such.
* Shared/ChildProcessProxy.cpp:
(WebKit::ChildProcessProxy::shutDownProcess):
(WebKit::ChildProcessProxy::clearConnection): Deleted.
(WebKit::ChildProcessProxy::connectionDidClose): Deleted.
* Shared/ChildProcessProxy.h:
* UIProcess/Databases/DatabaseProcessProxy.cpp:
(WebKit::DatabaseProcessProxy::processWillShutDown):
* UIProcess/Databases/DatabaseProcessProxy.h:
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::processWillShutDown):
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/Plugins/PluginProcessProxy.cpp:
(WebKit::PluginProcessProxy::processWillShutDown):
* UIProcess/Plugins/PluginProcessProxy.h:
* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::webProcessWillShutDown):
(WebKit::WebFrameProxy::disconnect): Deleted.
* UIProcess/WebFrameProxy.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::webProcessWillShutDown):
(WebKit::WebPageProxy::connectionDidClose): Deleted.
* UIProcess/WebPageProxy.h:
* UIProcess/WebProcessLifetimeTracker.cpp:
(WebKit::WebProcessLifetimeTracker::webProcessWillShutDown):
(WebKit::WebProcessLifetimeTracker::connectionDidClose): Deleted.
* UIProcess/WebProcessLifetimeTracker.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::processWillShutDown):
(WebKit::WebProcessProxy::shutDown):
(WebKit::WebProcessProxy::removeWebPage):
(WebKit::WebProcessProxy::didClose):
(WebKit::WebProcessProxy::disconnectFramesFromPage):
(WebKit::WebProcessProxy::shouldTerminate):
(WebKit::WebProcessProxy::requestTermination):
(WebKit::WebProcessProxy::connectionDidClose): Deleted.
(WebKit::WebProcessProxy::disconnect): Deleted.
* UIProcess/WebProcessProxy.h:
2015-05-14 Zhuo Li <zachli@apple.com>
Some CFNetwork SPI to reset HSTS hosts added since a date should not be used on Yosemite.
https://bugs.webkit.org/show_bug.cgi?id=145025.
and
rdar://problem/20646308.
Reviewed by Alexey Proskuryakov.
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::resetHSTSHostsAddedAfterDate):
2015-05-14 Timothy Horton <timothy_horton@apple.com>
Add a layout mode that scales down the view to try to fit the document
https://bugs.webkit.org/show_bug.cgi?id=145022
<rdar://problem/19790341>
Reviewed by Dean Jackson.
* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::creationParameters):
(WebKit::WebPageProxy::setShouldScaleViewToFitDocument):
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::setShouldScaleViewToFitDocument):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::setShouldScaleViewToFitDocument):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
Plumb shouldScaleViewToFitDocument through to the DrawingArea.
* UIProcess/mac/WKViewLayoutStrategy.mm:
(+[WKViewLayoutStrategy layoutStrategyWithPage:view:mode:]):
(-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy initWithPage:view:mode:]):
(-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy updateLayout]):
(-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy willChangeLayoutStrategy]):
* UIProcess/API/C/WKLayoutMode.h:
* UIProcess/API/Cocoa/_WKLayoutMode.h:
Add a new layout mode, which just turns on shouldScaleViewToFitDocument,
and otherwise behaves as normal.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::setShouldScaleViewToFitDocument):
(WebKit::TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded):
(WebKit::TiledCoreAnimationDrawingArea::flushLayers):
On every flush where either the document size or view size has changed,
or layout is outstanding, do a layout with fixed layout off to determine
whether the document fits inside the view. If it doesn't, scale it down
to fit. This will require an extra layout for every resize while in the
scaled-down state, but there is potential for future optimization.
2015-05-14 Anders Carlsson <andersca@apple.com>
Local storage origins should include origins with transient local storage
https://bugs.webkit.org/show_bug.cgi?id=145017
rdar://problem/10690447
Reviewed by Sam Weinig.
The transient local storage namespaces are used for third party data blocking and will stay
around until the UI process exits so we need to be able to include website data from transient storage
in the website data store APIs.
* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::TransientLocalStorageNamespace::origins):
(WebKit::StorageManager::getLocalStorageOrigins):
* UIProcess/Storage/StorageManager.h:
* UIProcess/WebKeyValueStorageManager.cpp:
(WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::fetchData):
2015-05-14 Beth Dakin <bdakin@apple.com>
Change range of possible forces for mouseforcechanged DOM event
https://bugs.webkit.org/show_bug.cgi?id=144987
-and corresponding-
rdar://problem/20472802
Reviewed by Tim Horton.
Change to a 0-3 range.
* Shared/mac/WebEventFactory.mm:
(WebKit::WebEventFactory::createWebMouseEvent):
2015-05-14 Zan Dobersek <zdobersek@igalia.com>
[GTK] Add missing ENABLE(NETSCAPE_PLUGIN_API) build guards
https://bugs.webkit.org/show_bug.cgi?id=144994
Reviewed by Carlos Garcia Campos.
This fixes the build when configured with Netscape plugin API
support disabled.
* UIProcess/API/gtk/WebKitWebContext.cpp:
(webkit_web_context_set_additional_plugins_directory):
(webkitWebContextGetPluginThread):
* UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
(WebKit::ProcessLauncher::launchProcess):
2015-05-13 Carlos Garcia Campos <cgarcia@igalia.com>
[SOUP] Network Cache: NetworkProcess segfault when file system doesn't support xattrs
https://bugs.webkit.org/show_bug.cgi?id=144953
Reviewed by Martin Robinson.
Return early if we fail to get the birthtime xattr.
* NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
(WebKit::NetworkCache::fileTimes):
2015-05-13 Daniel Bates <dabates@apple.com>
Rename ProcessThrottlerClient::{send, cancel}ProcessWillSuspend() to {send, cancel}PrepareToSuspend()
https://bugs.webkit.org/show_bug.cgi?id=144619
<rdar://problem/20812779>
Reviewed by Andy Estes.
The names of the functions ProcessThrottlerClient::{send, cancel}ProcessWillSuspend() are misnomers. These
functions are called when the ProcessThrottler wants to prepare the process that it manages for suspension
and changes its mind, respectively. That is, these functions do not actually correspond to the OS decision
to suspend a process or cancel the suspension of a process, respectively. So, rename these functions and
associated {Network, Web}ProcessProxy message names to better describe their purpose.
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::prepareToSuspend):
(WebKit::NetworkProcess::cancelPrepareToSuspend):
(WebKit::NetworkProcess::processWillSuspend): Deleted.
(WebKit::NetworkProcess::cancelProcessWillSuspend): Deleted.
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in:
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::sendPrepareToSuspend):
(WebKit::NetworkProcessProxy::sendCancelPrepareToSuspend):
(WebKit::NetworkProcessProxy::sendProcessWillSuspend): Deleted.
(WebKit::NetworkProcessProxy::sendCancelProcessWillSuspend): Deleted.
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/ProcessThrottler.cpp:
(WebKit::ProcessThrottler::updateAssertion):
* UIProcess/ProcessThrottlerClient.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcess::actualPrepareToSuspend): Formerly named prepareToSuspend.
(WebKit::WebProcessProxy::sendPrepareToSuspend):
(WebKit::WebProcessProxy::sendCancelPrepareToSuspend):
(WebKit::WebProcessProxy::sendProcessWillSuspend): Deleted.
(WebKit::WebProcessProxy::sendCancelProcessWillSuspend): Deleted.
* UIProcess/WebProcessProxy.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::prepareToSuspend):
(WebKit::WebProcess::cancelPrepareToSuspend):
(WebKit::WebProcess::processWillSuspend): Deleted.
(WebKit::WebProcess::cancelProcessWillSuspend): Deleted.
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:
2015-05-13 Anders Carlsson <andersca@apple.com>
Don't create a per-pool data store when using the modern API
https://bugs.webkit.org/show_bug.cgi?id=144963
rdar://problem/20331756
Reviewed by Tim Horton.
* UIProcess/API/APIProcessPoolConfiguration.cpp:
(API::ProcessPoolConfiguration::createWithLegacyOptions):
(API::ProcessPoolConfiguration::copy):
* UIProcess/API/APIProcessPoolConfiguration.h:
Keep track of whether the process pool should have a data store.
* UIProcess/API/C/WKContext.cpp:
(WKContextGetWebsiteDataStore):
* UIProcess/WebKeyValueStorageManager.cpp:
(WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
(WebKit::WebKeyValueStorageManager::getStorageDetailsByOrigin):
(WebKit::WebKeyValueStorageManager::deleteEntriesForOrigin):
(WebKit::WebKeyValueStorageManager::deleteAllEntries):
Update now that WebProcessPool::dataStore() no longer returns a reference.
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::WebProcessPool):
Only create a data store if the configuration states that we should.
* UIProcess/WebProcessPool.h:
Change dataStore() to return a pointer instead of a reference.
2015-05-13 Alexey Proskuryakov <ap@apple.com>
[Mac] Sandbox violation reading SubmitDiagInfo.domains
https://bugs.webkit.org/show_bug.cgi?id=144962
rdar://problem/20719330
Reviewed by Darin Adler.
* WebProcess/com.apple.WebProcess.sb.in:
2015-05-13 Beth Dakin <bdakin@apple.com>
Speculative build fix.
* UIProcess/API/Cocoa/_WKOverlayScrollbarStyle.h:
2015-05-13 Michael Catanzaro <mcatanzaro@igalia.com>
[GTK][CMake] Extra include directory when libnotify is present but disabled
https://bugs.webkit.org/show_bug.cgi?id=144941
Reviewed by Martin Robinson.
Add LIBNOTIFY_INCLUDE_DIRS to WebKit2_INCLUDE_DIRECTORIES only if USE_LIBNOTIFY is true,
rather than checking LIBNOTIFY_FOUND.
* PlatformGTK.cmake:
2015-05-13 Beth Dakin <bdakin@apple.com>
Need SPI to set the overlay scroll bar style
https://bugs.webkit.org/show_bug.cgi?id=144928
-and corresponding-
rdar://problem/20143614
Reviewed by Anders Carlsson.
Make scrollbarOverlayStyle a part of the creation parameters.
* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
New SPI.
* UIProcess/API/Cocoa/WKViewPrivate.h:
* UIProcess/API/Cocoa/_WKOverlayScrollbarStyle.h: Added.
* UIProcess/API/mac/WKView.mm:
(-[WKView _setOverlayScrollbarStyle:]):
(-[WKView _overlayScrollbarStyle]):
Store m_scrollbarOverlayStyle on WebPageProxy, and set it to the WebProcess.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::creationParameters):
(WebKit::WebPageProxy::setOverlayScrollbarStyle):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::overlayScrollbarStyle):
* WebKit2.xcodeproj/project.pbxproj:
Return WebPages scrollbarOverlayStyle().
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::preferredScrollbarOverlayStyle):
* WebProcess/WebCoreSupport/WebChromeClient.h:
Cache the scrollbarOverlayStyle() here for the WebProcess.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::setScrollbarOverlayStyle):
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::scrollbarOverlayStyle):
* WebProcess/WebPage/WebPage.messages.in:
2015-05-13 Anders Carlsson <andersca@apple.com>
Rename some StorageManager functions to indicate that they work on local storage entries
https://bugs.webkit.org/show_bug.cgi?id=144958
First part of rdar://problem/10690447.
Reviewed by Beth Dakin.
* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::getLocalStorageOrigins):
(WebKit::StorageManager::getLocalStorageDetailsByOrigin):
(WebKit::StorageManager::deleteLocalStorageEntriesForOrigin):
(WebKit::StorageManager::deleteAllLocalStorageEntries):
(WebKit::StorageManager::deleteLocalStorageEntriesForOrigins):
(WebKit::StorageManager::getOrigins): Deleted.
(WebKit::StorageManager::getStorageDetailsByOrigin): Deleted.
(WebKit::StorageManager::deleteEntriesForOrigin): Deleted.
(WebKit::StorageManager::deleteAllEntries): Deleted.
(WebKit::StorageManager::deleteEntriesForOrigins): Deleted.
* UIProcess/Storage/StorageManager.h:
* UIProcess/WebKeyValueStorageManager.cpp:
(WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
(WebKit::WebKeyValueStorageManager::getStorageDetailsByOrigin):
(WebKit::WebKeyValueStorageManager::deleteEntriesForOrigin):
(WebKit::WebKeyValueStorageManager::deleteAllEntries):
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::fetchData):
(WebKit::WebsiteDataStore::removeData):
2015-05-13 Joseph Pecoraro <pecoraro@apple.com>
Crash under WebKit::WebInspectorProxy::attachAvailabilityChanged sometimes opening new page
https://bugs.webkit.org/show_bug.cgi?id=144957
Reviewed by Simon Fraser.
* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::attachAvailabilityChanged):
2015-05-13 Joseph Pecoraro <pecoraro@apple.com>
Pass String as reference in more places
https://bugs.webkit.org/show_bug.cgi?id=144769
Reviewed by Daniel Bates.
* WebProcess/WebPage/WebInspectorUI.cpp:
(WebKit::WebInspectorUI::showMainResourceForFrame):
* WebProcess/WebPage/WebInspectorUI.h:
2015-05-13 Timothy Horton <timothy_horton@apple.com>
View scale changes are temporarily lost after restoring a page from the page cache
https://bugs.webkit.org/show_bug.cgi?id=144934
Reviewed by Brady Eidson.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::scalePage):
(WebKit::WebPage::scalePageInViewCoordinates):
(WebKit::WebPage::pageScaleFactor):
(WebKit::WebPage::viewScaleFactor):
(WebKit::WebPage::scaleView):
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::viewScaleFactor): Deleted.
Get rid of m_viewScaleFactor, instead using Page::viewScaleFactor.
2015-05-13 Sungmann Cho <sungmann.cho@navercorp.com>
Minor cleanups to PluginProxy.cpp.
https://bugs.webkit.org/show_bug.cgi?id=144948
Reviewed by Gyuyoung Kim.
1. Remove unnecessary #include.
2. Remove unnecessary return statement from PluginProxy::paint().
No new tests, no behavior change.
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::paint):
2015-05-13 Daegyu Lee <daegyu.lee@navercorp.com>
REGRESSION(r176631): [EFL] Fullscreen feature doesn't work correctly on MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=144906
Reviewed by Gyuyoung Kim.
* UIProcess/CoordinatedGraphics/PageViewportController.cpp:
(WebKit::PageViewportController::updateMinimumScaleToFit): Recover the r176631 condition to
call applyScaleAfterRenderingContents function to apply correct scale.
2015-05-12 Dan Bernstein <mitz@apple.com>
<rdar://problem/17414349> In Safari, Debug > Get Bytecode Profile crashes the Web Content process
https://bugs.webkit.org/show_bug.cgi?id=144944
Reviewed by Darin Adler.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::getBytecodeProfile): Dont assert that m_perBytecodeProfiler isnt null,
because it is when the profiler is disabled, which is the default. In that case, return
after sending back the empty string, rather than continuing to dereference a null pointer.
2015-05-12 Jon Honeycutt <jhoneycutt@apple.com>
Crash when using <input type=file>
<https://bugs.webkit.org/show_bug.cgi?id=144939>
<rdar://problem/20172315>
Reviewed by Andy Estes.
* UIProcess/ios/forms/WKFileUploadPanel.mm:
Use a RefPtr to hold the WebOpenPanelResultListenerProxy, because the
WKFileUploadPanel can outlive it.
2015-05-12 Simon Fraser <simon.fraser@apple.com>
Turn antialiased font dilation off by default
https://bugs.webkit.org/show_bug.cgi?id=144940
rdar://problem/20923031
Reviewed by Sam Weinig.
Turn antialised font dilation off by default.
* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferencesRefPrivate.h:
2015-05-12 Daniel Bates <dabates@apple.com>
Make {Network, Web}ProcessProxy inherit from ProcessThrottleClient privately
https://bugs.webkit.org/show_bug.cgi?id=144886
Reviewed by Darin Adler.
{Network, Web}ProcessProxy are implemented in terms of ProcessThrottleClient, an
interface that defines the callbacks that ProcessThrottler makes to a client. We
do not want to allow arbitrary callers to make use of the interface ProcessThrottleClient.
So, we should use private inheritance to represent the relationship between
{Network, Web}ProcessProxy and ProcessThrottleClient instead of public inheritance.
Additionally make ProcessThrottler a instance variable of {Network, Web}ProcessProxy instead
of holding a smart pointer to a ProcessThrottler instance because we always want to
have a ProcessThrottler for each instance of {Network, Web}ProcessProxy.
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::NetworkProcessProxy): Update code to work now that m_throttler
is an instance of ProcessThrottler instead of a smart pointer to a ProcessThrottler instance.
(WebKit::NetworkProcessProxy::didFinishLaunching): Update code to access functions of
m_throttler by reference instead of by pointer.
(WebKit::NetworkProcessProxy::didCancelProcessSuspension): Ditto.
(WebKit::NetworkProcessProxy::processReadyToSuspend): Ditto.
(WebKit::NetworkProcessProxy::setIsHoldingLockedFiles): Ditto.
* UIProcess/Network/NetworkProcessProxy.h: Inherit from ProcessThrottleClient privately.
(WebKit::NetworkProcessProxy::throttler): Update code to work now that m_throttler is an
instance of ProcessThrottler instead of a smart pointer to a ProcessThrottler instance.
* UIProcess/ProcessThrottler.cpp:
(WebKit::ProcessThrottler::ProcessThrottler): Update code to work now that m_process is
a lvalue reference instead of a pointer.
(WebKit::ProcessThrottler::updateAssertion): Ditto.
(WebKit::ProcessThrottler::assertionWillExpireImminently): Ditto.
* UIProcess/ProcessThrottler.h: Ditto.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::WebProcessProxy): Update code to work now that m_throttler is an
instance of ProcessThrottler instead of a smart pointer to a ProcessThrottler instance.
(WebKit::WebProcessProxy::didFinishLaunching): Update code to access functions of
m_throttler by reference instead of by pointer.
(WebKit::WebProcessProxy::processReadyToSuspend): Ditto.
(WebKit::WebProcessProxy::didCancelProcessSuspension): Ditto.
(WebKit::WebProcessProxy::setIsHoldingLockedFiles): Ditto.
* UIProcess/WebProcessProxy.h: Inherit from ProcessThrottleClient privately.
(WebKit::WebProcessProxy::throttler): Update code to work now that m_throttler is an
instance of ProcessThrottler instead of a smart pointer to a ProcessThrottler instance.
2015-05-12 Anders Carlsson <andersca@apple.com>
Production builds should link against the shims directly
https://bugs.webkit.org/show_bug.cgi?id=144922
rdar://problem/19708579
Reviewed by Dan Bernstein.
* Configurations/NetworkService.xcconfig:
Point to an Info.plist that has DYLD_INSERT_LIBRARIES set on 10.10 and earlier.
Link directly against SecItemShim.dylib where possible.
* Configurations/PluginProcessShim.xcconfig:
Set the install name and install path.
* Configurations/PluginService.32.xcconfig:
Point to an Info.plist that has DYLD_INSERT_LIBRARIES set on 10.10 and earlier.
Link directly against PluginProcessShim.dylib where possible.
* Configurations/PluginService.64.xcconfig:
Point to an Info.plist that has DYLD_INSERT_LIBRARIES set on 10.10 and earlier.
Link directly against PluginProcessShim.dylib where possible.
* Configurations/SecItemShim.xcconfig:
Set the install name and install path.
* Configurations/WebContentService.xcconfig:
Point to an Info.plist that has DYLD_INSERT_LIBRARIES set on 10.10 and earlier.
Link directly against WebProcessShim.dylib where possible.
* Configurations/WebProcessShim.xcconfig:
Set the install name and install path.
* NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX-10.9-10.10.plist: Copied from Source/WebKit2/NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX.plist.
* NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX.plist:
Add an Info.plist for 10.9 and 10.10 and remove DYLD_INSERT_LIBRARIES from the non-legacy plist.
* PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64-10.9-10.10.Info.plist: Copied from Source/WebKit2/PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist.
* PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist:
Add an Info.plist for 10.9 and 10.10 and remove DYLD_INSERT_LIBRARIES from the non-legacy plist.
* WebKit2.xcodeproj/project.pbxproj:
Add new files.
* WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX-10.9-10.10.plist: Copied from Source/WebKit2/WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist.
* WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist:
Add an Info.plist for 10.9 and 10.10 and remove DYLD_INSERT_LIBRARIES from the non-legacy plist.
2015-05-12 Alexey Proskuryakov <ap@apple.com>
Undo a mistaken part of r184211.
* UIProcess/Cocoa/WebProcessPoolCocoa.mm: (WebKit::WebProcessPool::cookieStorageDirectory):
* UIProcess/WebProcessPool.h:
cookieStorageDirectory() is used on iOS, so bring it back.
2015-05-08 Alexey Proskuryakov <ap@apple.com>
[Mac] Share cookie storage between UI process and secondary processes
https://bugs.webkit.org/show_bug.cgi?id=144820
rdar://problem/20572830
Reviewed by Darin Adler.
Pass a cookie storage descriptor that includes file path as well as other data that
CFNetwork needs to use the same cookies storage as in another process (session cookies
are still separate).
While at it, started to clean up code that passes cookie storage path. It was mostly
dead and unimplemented, only used in child processes when USE(SECCOMP_FILTERS) was enabled.
* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
* Shared/Network/NetworkProcessCreationParameters.cpp:
(WebKit::NetworkProcessCreationParameters::encode):
(WebKit::NetworkProcessCreationParameters::decode):
* Shared/Network/NetworkProcessCreationParameters.h:
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
(WebKit::WebProcessPool::platformInitializeNetworkProcess):
(WebKit::WebProcessPool::platformDefaultCookieStorageDirectory): Deleted.
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::ensureNetworkProcess):
(WebKit::WebProcessPool::createNewWebProcess):
(WebKit::WebProcessPool::cookieStorageDirectory):
* UIProcess/WebProcessPool.h:
* UIProcess/efl/WebProcessPoolEfl.cpp:
(WebKit::WebProcessPool::platformDefaultCookieStorageDirectory): Deleted.
* UIProcess/gtk/WebProcessPoolGtk.cpp:
(WebKit::WebProcessPool::platformDefaultCookieStorageDirectory): Deleted.
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):
2015-05-12 Chris Dumez <cdumez@apple.com>
[WK2] Log using diagnostic logging how far back in history we navigate
https://bugs.webkit.org/show_bug.cgi?id=144919
<rdar://problem/20920043>
Reviewed by Gavin Barraclough.
Log using diagnostic logging how far back in history we navigate.
When a back navigation or a backward indexed navigation occurs, we
log the delta: (HistoryListSize - 1) - NewHistoryItemIndex.
* UIProcess/WebBackForwardList.cpp:
(WebKit::WebBackForwardList::goToItem):
2015-05-11 Sam Weinig <sam@webkit.org>
ChildProcess should take an os_activity
https://bugs.webkit.org/show_bug.cgi?id=141781
Reviewed by Ryosuke Niwa.
* DatabaseProcess/EntryPoint/mac/XPCService/DatabaseServiceEntryPoint.mm:
(DatabaseServiceInitializer):
* NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
(NetworkServiceInitializer):
* PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm:
(PluginServiceInitializer):
* WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:
(WebContentServiceInitializer):
Start an os_activity in the initializer for each XPC service.
* config.h:
Add HAVE_OS_ACTIVITY where available.
2015-05-12 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix GTK+ debug build after r184197.
* UIProcess/gtk/RedirectedXCompositeWindow.cpp: Add missing include.
2015-05-08 Carlos Garcia Campos <cgarcia@igalia.com>
[X11] Add XUniquePtr and XUniqueResource to automatically free X resources
https://bugs.webkit.org/show_bug.cgi?id=144521
Reviewed by Darin Adler.
Use XUniquePtr and XUniqueResource to free X resources.
* PlatformEfl.cmake: Add Source/WebCore/platform/graphics/x11 dir
to the include dir list.
* PlatformGTK.cmake: Ditto.
* UIProcess/cairo/BackingStoreCairo.cpp:
(WebKit::BackingStore::createBackend): Do not pass the display to
the BackingStoreBackendCairoX11 constructor.
* UIProcess/gtk/RedirectedXCompositeWindow.cpp:
(WebKit::RedirectedXCompositeWindow::RedirectedXCompositeWindow):
(WebKit::RedirectedXCompositeWindow::~RedirectedXCompositeWindow):
(WebKit::RedirectedXCompositeWindow::resize):
(WebKit::RedirectedXCompositeWindow::cleanupPixmapAndPixmapSurface):
(WebKit::RedirectedXCompositeWindow::surface):
* UIProcess/gtk/RedirectedXCompositeWindow.h:
(WebKit::RedirectedXCompositeWindow::windowID):
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
(WebKit::NetscapePlugin::platformPostInitializeWindowless):
(WebKit::NetscapePlugin::platformDestroy):
(WebKit::NetscapePlugin::platformGeometryDidChange):
(WebKit::NetscapePlugin::platformPaint):
2015-05-11 Dan Bernstein <mitz@apple.com>
WebKit2 part of <rdar://problem/20878075> Trying to navigate to an invalid URL loads about:blank, but -[WKWebView URL] returns the invalid URL
Reviewed by Alexey Proskuryakov.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didChangeProvisionalURLForFrame): Added. Update internal state the
same way we update it for server redirects, but dont make client callbacks. Clients
observing the URL property will see it change.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in: Added DidChangeProvisionalURLForFrame.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidChangeProvisionalURL): Override this new
FrameLoaderClient function to send a DidChangeProvisionalURLForFrame message to the UI
process.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2015-05-11 Dan Bernstein <mitz@apple.com>
<rdar://problem/19773721> [iOS] Find on page feels like it zooms in too much
https://bugs.webkit.org/show_bug.cgi?id=144891
Reviewed by Darin Adler.
Sometimes, Find on Pages constant 1.6 scale factor is too much. Smart magnification is
designed to choose a scale factor that is just right.
* UIProcess/ios/SmartMagnificationController.h:
* UIProcess/ios/SmartMagnificationController.messages.in: Added Magnify message.
* UIProcess/ios/SmartMagnificationController.mm:
(WebKit::SmartMagnificationController::magnify): Added. Handle the new message using
-[WKContentView _soomToRect:withOrigin:fitEntireRect:minimumScale:maximumScale:minimumScrollDistance:].
* WebProcess/WebPage/ios/FindControllerIOS.mm:
(WebKit::FindController::updateFindIndicator): Instead of zooming to the selection rect,
get the surrounding render rect (the area we would target for a double-tap at the beginning
of the selection), and tell the magnification controller to target it. Use the center of the
start of the selection as the origin.
2015-05-11 Brent Fulgham <bfulgham@apple.com>
Scroll snap logic should be triggered when resizing the WebView
https://bugs.webkit.org/show_bug.cgi?id=142590
<rdar://problem/20125088>
Reviewed by Simon Fraser.
* UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
(RemoteScrollingCoordinatorProxy::closestSnapOffsetForMainFrameScrolling): Modify use of 'closestSnapOffset' to satisfy the additional
argument I added. This is currently not used for anything on iOS.
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm: Ditto.
2015-05-11 Andreas Kling <akling@apple.com>
Force a rebuild of JSNPObject.cpp on bots.
* WebProcess/Plugins/Netscape/JSNPObject.cpp:
(WebKit::JSNPObject::callMethod):
2015-05-11 Anders Carlsson <andersca@apple.com>
Simplify shim path computation
https://bugs.webkit.org/show_bug.cgi?id=144884
Part of rdar://problem/19708579.
Reviewed by Sam Weinig.
Factor the code that computes the shim path out into a separate function. Also make this mac only
since we don't have any shims on iOS.
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::computeProcessShimPath):
(WebKit::addDYLDEnvironmentAdditions):
2015-05-11 Myles C. Maxfield <mmaxfield@apple.com>
Unreviewed build fix
Unreviewed.
* UIProcess/API/APIUserContentExtensionStore.cpp:
(API::compiledToFile):
2015-05-11 Alex Christensen <achristensen@webkit.org>
[Content Extensions] Support domain-specific rules and exceptions.
https://bugs.webkit.org/show_bug.cgi?id=144833
Reviewed by Darin Adler.
* Shared/WebCompiledContentExtension.cpp:
(WebKit::WebCompiledContentExtension::filtersWithoutDomainsBytecode):
(WebKit::WebCompiledContentExtension::filtersWithoutDomainsBytecodeLength):
(WebKit::WebCompiledContentExtension::filtersWithDomainsBytecode):
(WebKit::WebCompiledContentExtension::filtersWithDomainsBytecodeLength):
(WebKit::WebCompiledContentExtension::domainFiltersBytecode):
(WebKit::WebCompiledContentExtension::domainFiltersBytecodeLength):
(WebKit::WebCompiledContentExtension::bytecode): Deleted.
(WebKit::WebCompiledContentExtension::bytecodeLength): Deleted.
* Shared/WebCompiledContentExtension.h:
* Shared/WebCompiledContentExtensionData.cpp:
(WebKit::WebCompiledContentExtensionData::encode):
(WebKit::WebCompiledContentExtensionData::decode):
* Shared/WebCompiledContentExtensionData.h:
(WebKit::WebCompiledContentExtensionData::WebCompiledContentExtensionData):
* UIProcess/API/APIUserContentExtensionStore.cpp:
(API::ContentExtensionMetaData::fileSize):
(API::encodeContentExtensionMetaData):
(API::decodeContentExtensionMetaData):
(API::compiledToFile):
(API::createExtension):
Keep track of 3 different types of bytecode to be able to handle domain-specific rules.
2015-05-11 Tim Horton <timothy_horton@apple.com>
Page overlay action context override should indicate the source of the request
https://bugs.webkit.org/show_bug.cgi?id=144832
<rdar://problem/20562594>
Reviewed by Darin Adler.
* WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
* WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h:
* WebProcess/WebPage/WebPageOverlay.cpp:
(WebKit::WebPageOverlay::actionContextForResultAtPoint):
* WebProcess/WebPage/WebPageOverlay.h:
(WebKit::WebPageOverlay::Client::actionContextForResultAtPoint):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performActionMenuHitTestAtLocation):
Add a parameter to WKBundlePageOverlayActionContextForResultAtPoint so that
clients can tell whether the requested action context should be targetted
at an action menu or immediate action.
2015-05-11 Daniel Bates <dabates@apple.com>
[iOS] Close all open databases in expiration handler of process assertion
https://bugs.webkit.org/show_bug.cgi?id=144661
<rdar://problem/20845052>
Reviewed by Darin Adler.
For WebKit2, close all open databases when the process assertion expiration
handler is called.
When the process assertion expiration handler is called we dispatch a synchronous
message called ProcessWillSuspendImminently to the {Web, Network} processes to inform
them that they will be suspended imminently. The {Web, Network} process will always
service this message regardless if they were waiting for another message. In the
WebProcess, we will close all open databases among other tasks upon receiving this
message. In the NetworkProcess, we will purge some data from memory.
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::didReceiveSyncMessage): Modified to call NetworkProcess::didReceiveSyncNetworkProcessMessage()
to process the synchronous ProcessWillSuspendImminently message.
(WebKit::NetworkProcess::processWillSuspendImminently): Added; free some memory.
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in: Added synchronous message ProcessWillSuspendImminently.
* Shared/ChildProcessProxy.h:
(WebKit::ChildProcessProxy::sendSync): Added parameter sendSyncFlags so that we can send
a sync message with flag IPC::InterruptWaitingIfSyncMessageArrives to cause the {Web, Network}Process
to process the message regardless of whether it is waiting for another message.
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::sendProcessWillSuspendImminently): Added. Sends the message
ProcessWillSuspendImminently to the NetworkProcess.
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/ProcessAssertion.cpp:
(WebKit::ProcessAndUIAssertion::setClient): Added.
* UIProcess/ProcessAssertion.h: Added abstract class ProcessAssertionClient.
(WebKit::ProcessAssertionClient::~ProcessAssertionClient): Added.
(WebKit::ProcessAssertion::setClient): Added.
(WebKit::ProcessAssertion::client): Added.
* UIProcess/ProcessThrottler.cpp:
(WebKit::ProcessThrottler::didConnectToProcess):
(WebKit::ProcessThrottler::assertionWillExpireImminently): Added; implements the ProcessAssertionClient
interface. Notify the process throttler clients that the assertion is near expiration.
* UIProcess/ProcessThrottler.h:
* UIProcess/ProcessThrottlerClient.h: Added
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::sendProcessWillSuspendImminently): Added. Sends the message
ProcessWillSuspendImminently to the WebProcess.
* UIProcess/WebProcessProxy.h:
* UIProcess/ios/ProcessAssertionIOS.mm:
(-[WKProcessAssertionBackgroundTaskManager addClient:]): Added.
(-[WKProcessAssertionBackgroundTaskManager removeClient:]): Added.
(-[WKProcessAssertionBackgroundTaskManager _updateBackgroundTask]): Modified expiration handler
to notify ProcessAssertionClient clients that the assertion is near expiration.
(WebKit::ProcessAssertion::~ProcessAssertion): Remove the client on destruction.
(WebKit::ProcessAndUIAssertion::setClient): Added.
* WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
(WebKit::WebDatabaseManager::closeAllDatabases): Added; turns around and calls DatabaseManager::closeAllDatabases().
* WebProcess/WebCoreSupport/WebDatabaseManager.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::didReceiveSyncMessage): Call WebProcess::didReceiveSyncWebProcessMessage() to process
the synchronous ProcessWillSuspendImminently message. Removed logging for an unhandled synchronous message
since WebProcess::didReceiveSyncWebProcessMessage() will ASSERT_NOT_REACHED() for such a message.
(WebKit::WebProcess::prepareToSuspend): Extracted code from WebProcess::processWillSuspend() so that it can
be used from both WebProcess::processWillSuspend() and WebProcess::processWillSuspendImminently(). And modified
it to conditionally dispatch a ProcessReadyToSuspend message to the WebProcessProxy. We only want to dispatch
such a message as part of a coordinated suspension by the ProcessThrottler. That is, we do not want to dispatch
the ProcessReadyToSuspend message when the background assertion is near expiration (i.e. WebProcess::processWillSuspendImminently()
is called).
(WebKit::WebProcess::processWillSuspendImminently): Added. Suspend all open databases among other tasks.
(WebKit::WebProcess::processWillSuspend): Implemented in terms of WebProcess::prepareToSuspend().
(WebKit::WebProcess::processSuspensionCleanupTimerFired): Modified to conditionally dispatch a ProcessReadyToSuspend
message to the WebProcessProxy.
(WebKit::WebProcess::processDidResume): Stop the suspension cleanup timer, which may be active if the WebProcess
did not mark all its graphics layers as volatile before process suspension.
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in: Added synchronous message ProcessWillSuspendImminently.
2015-05-10 Gyuyoung Kim <gyuyoung.kim@webkit.org>
Use Ref instead of PassRefPtr in WebCore/page
https://bugs.webkit.org/show_bug.cgi?id=144841
Reviewed by Darin Adler.
To kill PassRefPtr, this patch replaces PassRefPtr with Ref or RefPtr
in WebCore/page.
(WebKit::WebUserContentController::WebUserContentController):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setTextIndicator):
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::didPerformDictionaryLookup):
* WebProcess/UserContent/WebUserContentController.cpp:
(WebKit::WebUserContentController::WebUserContentController):
2015-05-10 Philip Chimento <philip.chimento@gmail.com>
[GTK][SOUP] Web and Network processes don't know how to get memory size on OSX
https://bugs.webkit.org/show_bug.cgi?id=144554
Reviewed by Darin Adler.
* NetworkProcess/soup/NetworkProcessSoup.cpp:
(WebKit::NetworkProcess::platformSetCacheModel): Use WTF::ramSize()
instead of local function. Also use WTF::MB instead of dividing by
1024 * 1024.
(WebKit::getMemorySize): Deleted.
* WebProcess/soup/WebProcessSoup.cpp:
(WebKit::WebProcess::platformSetCacheModel): Ditto.
(WebKit::getMemorySize): Deleted.
2015-05-10 Yongjun Zhang <yongjun_zhang@apple.com>
Use preview view controller from WebKitSystemInterface.
https://bugs.webkit.org/show_bug.cgi?id=144836
Add a property _allowsLinkPreview to WKWebView so that we can turn on/off preview at runtime. Also,
for client that doesn't provide preview view controller, use the default view controller prepared
by WebKitSystemInterface.
Reviewed by Dan Bernstein.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
(-[WKWebView _allowsLinkPreview]):
(-[WKWebView _setAllowsLinkPreview:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h: Add _allowsLinkPreview property
* UIProcess/ios/WKContentView.mm:
(-[WKContentView willMoveToWindow:]):
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _registerPreviewInWindow:]):
(-[WKContentView _unregisterPreviewInWindow:]):
(-[WKContentView previewViewControllerForPosition:inSourceView:]): : For client that doesn't provide
preview delegate, use preview view controller in WebKitSystemInterface.
(-[WKContentView commitPreviewViewController:]):
2015-05-10 Darin Adler <darin@apple.com>
Fix internal Apple builds on Mavericks.
* UIProcess/API/mac/WKView.mm:
(-[WKView _dismissContentRelativeChildWindows]): Added missing conditionals around
some code that is for OS X 10.10 or newer only. There were similar conditionals around
other nearby code in this file, and around other uses of the same method in other files,
so matched the style.
2015-05-10 Dan Bernstein <mitz@apple.com>
iOS internal build fix.
* Platform/mac/MenuUtilities.mm:
2015-05-10 Sungmann Cho <sungmann.cho@navercorp.com>
Remove unnecessary semicolons.
https://bugs.webkit.org/show_bug.cgi?id=144844
Reviewed by Darin Adler.
No new tests, no behavior change.
* Shared/Downloads/mac/DownloadMac.mm:
(-[WKDownloadAsDelegate download:shouldDecodeSourceDataOfMIMEType:]):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::transformHandlesToObjects):
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorLocation):
* WebProcess/WebPage/WebBackForwardListProxy.cpp:
(WebKit::idToHistoryItemMap):
2015-05-10 Darin Adler <darin@apple.com>
Fix build.
* Platform/mac/MenuUtilities.mm: Added includes that were somehow omitted in what
I committed before.
2015-05-10 Darin Adler <darin@apple.com>
[Cocoa] Don't soft link DataDetectorsCore
https://bugs.webkit.org/show_bug.cgi?id=144837
Reviewed by Dan Bernstein.
* Platform/mac/MenuUtilities.mm: Use DataDetectorsSPI.h instead of doing it here.
* WebProcess/WebPage/mac/WebPageMac.mm: Removed unneeded include of unused header,
DataDetectorsSPI.h.
2015-05-09 Dan Bernstein <mitz@apple.com>
Deployment-target __NSi_ and __NSd_ definitions in WKFoundation.h are redundant
https://bugs.webkit.org/show_bug.cgi?id=144831
Reviewed by Sam Weinig.
Reverted r182846 and r182904.
* Shared/API/Cocoa/WKFoundation.h:
* WebKit2.xcodeproj/project.pbxproj:
2015-05-09 Yoav Weiss <yoav@yoav.ws>
Remove the PICTURE_SIZES build flag
https://bugs.webkit.org/show_bug.cgi?id=144679
Reviewed by Benjamin Poulain.
Removed the PICTURE_SIZES build time flag.
* Configurations/FeatureDefines.xcconfig:
2015-05-08 Beth Dakin <bdakin@apple.com>
Shuffle touch-related code to keep the internal builds working
https://bugs.webkit.org/show_bug.cgi?id=144812
Reviewed by Benjamin Poulain.
* Shared/NativeWebTouchEvent.h:
* Shared/WebEvent.h:
* Shared/WebEventConversion.cpp:
* Shared/ios/NativeWebTouchEventIOS.mm:
(WebKit::NativeWebTouchEvent::extractWebTouchPoint):
(WebKit::extractWebTouchPoint): Deleted.
* Shared/ios/WebPlatformTouchPointIOS.cpp:
2015-05-08 Dan Bernstein <mitz@apple.com>
<rdar://problem/20757196> NSInternalInconsistencyException raised in -[NSString encodeWithCoder:] beneath createEncodedObject when using WKRemoteObjectEncoder for Safari AutoFill
https://bugs.webkit.org/show_bug.cgi?id=144818
Reviewed by Anders Carlsson.
Allow NSString instances that contain unpaired surrogates to be encoded by
WKRemoteObjectCoder by encoding them directly rather than using
-[NSString encodeWithCoder:].
* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(encodeString): Added. Sets an API::String as the object to encode.
(encodeObject): Changed to use encodeString for NSString instances.
(decodeString): Added. Gets an API::String from the dictionary and returns it as an
NSString.
(decodeObject): Changed to use decodeString for NSString instances.
2015-05-08 Timothy Horton <timothy_horton@apple.com>
Fix the build.
* Platform/mac/LayerHostingContext.mm:
(WebKit::LayerHostingContext::createFencePort):
2015-05-08 Timothy Horton <timothy_horton@apple.com>
Periodically repaint during resize while using the DynamicSizeWithMinimumViewSize layout strategy
https://bugs.webkit.org/show_bug.cgi?id=144816
Reviewed by Simon Fraser.
* UIProcess/mac/WKViewLayoutStrategy.mm:
(-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy initWithPage:view:mode:]):
(-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy _updateTransientScale:]):
(-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy updateLayout]):
Factor out _updateTransientScale from updateLayout.
Keep track of the last viewScaleFactor that we know is being displayed
(_lastCommittedViewScale) and use that for computing the transient scale,
so that we can recompute the transient scale while the UI process's notion
of the actual view scale might have moved ahead of what the Web process has
painted.
2015-05-08 Timothy Horton <timothy_horton@apple.com>
Fix the build.
* UIProcess/WebPageProxy.cpp:
2015-05-08 Timothy Horton <timothy_horton@apple.com>
Fix the build.
* Platform/mac/LayerHostingContext.mm:
(WebKit::LayerHostingContext::createFencePort):
2015-05-08 Timothy Horton <timothy_horton@apple.com>
Fix the build.
* Platform/mac/LayerHostingContext.mm:
(WebKit::LayerHostingContext::createFencePort):
2015-05-08 Timothy Horton <timothy_horton@apple.com>
Flip the direction of the fence in scaleViewAndUpdateGeometryFenced
https://bugs.webkit.org/show_bug.cgi?id=144810
Reviewed by Simon Fraser.
Send the fence from the Web process to the UI process, instead of vice versa.
This means that we won't keep the UI process CAContext blocked for the whole
time that the Web process is doing layout/painting/etc. Instead, we'll start
blocking the Web process CAContext immediately after flushing and before committing,
and send the fence to the UI process to be applied immediately. This minimizes
the amount of time in both processes spent blocked on the fence.
* Platform/mac/LayerHostingContext.h:
* Platform/mac/LayerHostingContext.mm:
(WebKit::LayerHostingContext::createFencePort):
Add createFencePort, which creates a MachSendRight wrapping a CA fence port.
Note that you must setFencePort() with this port if you want the LayerHostingContext's
CAContext to block on it!
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::scaleViewAndUpdateGeometryFenced):
(WebKit::WebPageProxy::machSendRightCallback):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
Create a callback and send it to the Web process along with scaleViewAndUpdateGeometryFenced.
* UIProcess/mac/WKViewLayoutStrategy.mm:
(-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy updateLayout]):
When called back, install the fence port in our CAContext; when the commit goes through,
remove the transient scale as we did previously.
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::replyWithFenceAfterNextFlush):
(WebKit::DrawingArea::updateGeometry): Deleted.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::scaleViewAndUpdateGeometryFenced):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
Instead of installing a fence created in the UI process, tell the DrawingArea
to create one and reply to the UI process with it after the next flush.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::flushLayers):
(WebKit::TiledCoreAnimationDrawingArea::replyWithFenceAfterNextFlush):
After flushing, before committing, create a fence and reply to any
callbacks that requested fences, and install it in our context.
2015-05-08 Michael Catanzaro <mcatanzaro@igalia.com>, Martin Robinson <mrobinson@igalia.com>
[GTK] Checks for DEVELOPMENT_BUILD are all wrong
https://bugs.webkit.org/show_bug.cgi?id=144746
Reviewed by Carlos Garcia Campos.
Use ENABLE(DEVELOPER_MODE) rather than DEVELOPMENT_BUILD.
* Shared/gtk/ProcessExecutablePathGtk.cpp:
(WebKit::findWebKitProcess):
* UIProcess/API/gtk/WebKitWebContext.cpp:
(injectedBundleDirectory):
* UIProcess/gtk/TextCheckerGtk.cpp:
(WebKit::enchantTextChecker):
2015-05-08 Anders Carlsson <andersca@apple.com>
Fix ProcessLauncher port leak
https://bugs.webkit.org/show_bug.cgi?id=144807
rdar://problem/20593291
Reviewed by Sam Weinig.
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::connectToService):
xpc_dictionary_set_mach_send increments the send right count so make sure to
balance it with a call to mach_port_deallocate.
2015-05-08 Beth Dakin <bdakin@apple.com>
Fix performance tests after r183954
https://bugs.webkit.org/show_bug.cgi?id=144805
Reviewed by Alexey Proskuryakov.
Web* is traditionally a WK1 prefix, so use the WK2 prefix instead in WK2 so that
we dont have two classes with the same name in the two projects.
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController _defaultAnimationController]):
2015-05-08 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Expose allowFileAccessFromFileURLs setting to WebKit2 GTK+ API
https://bugs.webkit.org/show_bug.cgi?id=144748
Reviewed by Sergio Villar Senin.
This is needed by local applications loaded as a file URI that do XMLHttpRequests.
* UIProcess/API/gtk/WebKitSettings.cpp:
(webKitSettingsSetProperty):
(webKitSettingsGetProperty):
(webkit_settings_class_init):
(webkit_settings_get_allow_file_access_from_file_urls):
(webkit_settings_set_allow_file_access_from_file_urls):
* UIProcess/API/gtk/WebKitSettings.h:
* UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
* UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
2015-05-08 Andreas Kling <akling@apple.com>
Optimize serialization of quoted JSON strings.
<https://webkit.org/b/144754>
Reviewed by Darin Adler.
* NetworkProcess/cache/NetworkCacheEntry.cpp:
(WebKit::NetworkCache::Entry::asJSON): Use the new StringBuilder API.
2015-05-08 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r183945.
https://bugs.webkit.org/show_bug.cgi?id=144789
"It broke all the GTK+ tests" (Requested by KaL on #webkit).
Reverted changeset:
"[GTK] Checks for DEVELOPMENT_BUILD are all wrong"
https://bugs.webkit.org/show_bug.cgi?id=144746
http://trac.webkit.org/changeset/183945
2015-05-07 Conrad Shultz <conrad_shultz@apple.com>
Don't register for Lookup notifications until needed
https://bugs.webkit.org/show_bug.cgi?id=144783
Reviewed by Tim Horton.
* UIProcess/API/mac/WKView.mm:
Add a WKViewData ivar to track whether we've already registered for popover notifications.
(-[WKView _prepareForDictionaryLookup]):
Added; moved notification registration from -[WKView initWithFrame:processPool:configuration:webView:.
(-[WKView initWithFrame:processPool:configuration:webView:]):
Move notification registration to -_prepareForDictionaryLookup.
* UIProcess/API/mac/WKViewInternal.h:
Expose -_prepareForDictionaryLookup.
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::didPerformDictionaryLookup):
Send -[WKView _prepareForDictionaryLookup].
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController _animationControllerForText]):
Ditto.
2015-05-07 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r183961.
https://bugs.webkit.org/show_bug.cgi?id=144784
Broke js/dom/JSON-stringify.html (Requested by kling on
#webkit).
Reverted changeset:
"Optimize serialization of quoted JSON strings."
https://bugs.webkit.org/show_bug.cgi?id=144754
http://trac.webkit.org/changeset/183961
2015-05-07 Anders Carlsson <andersca@apple.com>
Build fixes.
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:processPool:configuration:webView:]):
Use the regular init method.
* UIProcess/mac/WKSharingServicePickerDelegate.mm:
(-[WKSharingServicePickerDelegate sharingService:didShareItems:]):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::handleSelectionServiceClick):
Pass empty dictionaries instead of nil.
2015-05-07 Chris Dumez <cdumez@apple.com>
ASSERTION when pasting text into the WebInspector console
https://bugs.webkit.org/show_bug.cgi?id=144774
Reviewed by Ryosuke Niwa.
Fix assertion in didChangeSelection() meant to check that calling
editorState() does not cause a synchronous layout. The assertion
was not correct as it was relying on FrameView::needsLayout() and
we would hit it if calling editorState() would schedule a layout.
Instead, the new assertion relies on FrameView::layoutCount(),
which is more accurate.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didChangeSelection):
2015-05-07 Andreas Kling <akling@apple.com>
Optimize serialization of quoted JSON strings.
<https://webkit.org/b/144754>
Reviewed by Darin Adler.
* NetworkProcess/cache/NetworkCacheEntry.cpp:
(WebKit::NetworkCache::Entry::asJSON): Use the new StringBuilder API.
2015-05-07 Martin Robinson <mrobinson@igalia.com>
Followup fixes to r183936
I neglected to include a few review comments when I landed the patch.
* UIProcess/gtk/TextCheckerGtk.cpp:
(WebKit::checkerState): Remove double semicolons.
(WebKit::updateStateForAllProcessPools): Use range-based-for loop here and
give the function a better name.
(WebKit::TextChecker::setContinuousSpellCheckingEnabled): Use new function name
(WebKit::TextChecker::setGrammarCheckingEnabled):Use new function name
(WebKit::TextChecker::ignoreWord): Fix unused parameter warning.
(WebKit::updateStateForAllContexts): Deleted.
2015-05-07 Michael Catanzaro <mcatanzaro@igalia.com>
[GTK] Checks for DEVELOPMENT_BUILD are all wrong
https://bugs.webkit.org/show_bug.cgi?id=144746
Reviewed by Martin Robinson.
Use DEVELOPER_MODE rather than DEVELOPMENT_BUILD.
* Shared/gtk/ProcessExecutablePathGtk.cpp:
(WebKit::findWebKitProcess):
* UIProcess/API/gtk/WebKitWebContext.cpp:
(injectedBundleDirectory):
* UIProcess/gtk/TextCheckerGtk.cpp:
(WebKit::enchantTextChecker):
2015-05-06 Dean Jackson <dino@apple.com>
Handle backdrop views that have to tile
https://bugs.webkit.org/show_bug.cgi?id=142317
<rdar://problem/20049088>
Reviewed by Simon Fraser.
Take 2 - this was rolled out because Mavericks was crashing.
Add some better logging for custom appearance.
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTextStream::operator<<):
2015-05-07 Sungmann Cho <sungmann.cho@navercorp.com>
Add PLUGIN_ARCHITECTURE(X11) around m_frameRectInWindowCoordinates in NetscapePlugin.
https://bugs.webkit.org/show_bug.cgi?id=144490
Reviewed by Darin Adler.
m_frameRectInWindowCoordinates in NetscapePlugin is currently being used only for
the windowed plugins, and the windowed plugins are only supported on X11. So we can
guard it with PLUGIN_ARCHITECTURE(X11).
No new tests, no behavior change.
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::geometryDidChange):
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
2015-05-05 Myles C. Maxfield <mmaxfield@apple.com>
Revert "Introducing the Platform Abstraction Layer (PAL)"
https://bugs.webkit.org/show_bug.cgi?id=144751
Unreviewed.
PAL should be a new target inside WebCore, rather than a top-level folder.
* Configurations/FeatureDefines.xcconfig: Updated
2015-05-07 Jer Noble <jer.noble@apple.com>
[WK2][Fullscreen] Fullscreen video does not enter low-power mode.
https://bugs.webkit.org/show_bug.cgi?id=144744
Reviewed by Darin Adler.
One of the requirements of entering low-power compositing mode is that no masking layers
are present in any of the ancestors of the fullscreen video layer. So once our fullscreen
transition animation completes, remove the mask layer entirely from our clipping layer.
This means it needs to be re-created and added when entering fullscreen, rather than just
at initialization time.
* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController initWithWindow:webView:]):
(-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
(-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]):
2015-05-07 Martin Robinson <mrobinson@igalia.com>
[GTK] All spell checking layout tests fail
https://bugs.webkit.org/show_bug.cgi?id=144648
Reviewed by Carlos Garcia Campos.
Simplify and complete the GTK+ spell-checking implementation. Instead of using
the EFL/GTK+ only WKTextChecker interface, directly implement Enchant spell-checking
in TextCheckerGtk. The per-context spell checking API is an illusion, since all
WKTextChecker implementations will adjust the same singleton. This can be a first step
toward removing it entirely.
Also complete the implementation of the TextChecker interface by duplicating the EFL code,
which reuses other methods in the same class. Eventually this duplication will collapse,
once GTK+ and EFL can share an Enchant implementation.
* PlatformGTK.cmake:
* UIProcess/API/gtk/WebKitPrivate.h:
* UIProcess/API/gtk/WebKitTextChecker.cpp: Removed.
* UIProcess/API/gtk/WebKitTextChecker.h: Removed.
* UIProcess/API/gtk/WebKitWebContext.cpp: Remove WebTextChecker usage and
replace it with calls directly to the TextChecker singleton via static methods.
* UIProcess/TextChecker.h:
* UIProcess/gtk/TextCheckerGtk.cpp: Move the WebTextChecker enchant implementation
here and reuse the EFL version of WebKit::TextChecker::requestCheckingOfString.
Also initialize languages properly when building for developer builds. This
allows WebKitTestRunner to work even when it doesn't explicitly set the languages.
2015-05-07 Ada Chan <adachan@apple.com>
Fix a couple of cases where the backForwardListState's currentIndex is not set correctly in WebBackForwardList::backForwardListState().
https://bugs.webkit.org/show_bug.cgi?id=144666
Reviewed by Darin Adler.
* UIProcess/WebBackForwardList.cpp:
(WebKit::WebBackForwardList::backForwardListState):
If the first item is filtered out and the currentIndex is 0, don't decrement currentIndex.
If all the items are filtered out, set currentIndex to the uninitialized value.
2015-05-07 Csaba Osztrogonác <ossy@webkit.org>
[WK2] Remove Windows cruft
https://bugs.webkit.org/show_bug.cgi?id=144745
Reviewed by Darin Adler.
* NetworkProcess/soup/NetworkProcessSoup.cpp:
(WebKit::getMemorySize):
* Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
(IPC::ArgumentCoder<WebCore::GraphicsSurfaceToken>::encode):
(IPC::ArgumentCoder<WebCore::GraphicsSurfaceToken>::decode):
* WebProcess/soup/WebProcessSoup.cpp:
(WebKit::getMemorySize):
2015-05-07 Carlos Garcia Campos <cgarcia@igalia.com>
REGRESSION(r182032): [GTK] Production build is broken after r182032
https://bugs.webkit.org/show_bug.cgi?id=144736
Reviewed by Martin Robinson.
The problem is that r182032 moved the NetworkProcess sources from
WebKit2 sources to NetworkProcess sources. That's not a problem
for developer builds where all internal symbols are exported, but
doesn't work for production builds because all those internal
symbols are private.
* CMakeLists.txt: Use a different name for common network process
sources variable.
* PlatformMac.cmake: Append common network process sources to the
network process source list for Mac.
2015-05-07 Dan Bernstein <mitz@apple.com>
<rdar://problem/19317140> [Xcode] Remove usage of AspenFamily.xcconfig in Source/
https://bugs.webkit.org/show_bug.cgi?id=144727
Reviewed by Darin Adler.
* Configurations/Base.xcconfig: Dont include AspenFamily.xcconfig, and define
INSTALL_PATH_PREFIX and LD_DYLIB_INSTALL_NAME for the iOS 8.x Simulator.
* Configurations/WebKit2.xcconfig: Define INSTALL_PATH_ACTUAL and let INSTALL_PATH be
derived from it and INSTALL_PATH_PREFIX. Dont override DYLIB_INSTALL_NAME_BASE for iOS,
because we define LD_DYLIB_INSTALL_NAME directly where needed.
2015-05-07 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Update OptionsGTK.cmake and NEWS for 2.9.1 release.
* gtk/NEWS: Add release notes for 2.9.1.
2015-05-07 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Remove dock button from Web Inspector window
https://bugs.webkit.org/show_bug.cgi?id=144728
Reviewed by Sergio Villar Senin.
We added the dock buttons to the headerbar, because they were
removed from the inspector toolbar, but with the new tabbed
design, the dock buttons are back in the toolbar and look redundant.
* UIProcess/WebInspectorProxy.h:
* UIProcess/gtk/WebInspectorProxyGtk.cpp:
(WebKit::WebInspectorProxy::createInspectorWindow):
(WebKit::WebInspectorProxy::platformAttachAvailabilityChanged):
(WebKit::WebInspectorProxy::dockButtonClicked): Deleted.
2015-05-06 Jer Noble <jer.noble@apple.com>
[WK2][Fullscreen] Elements whose children extend beyond their bounds are clipped in fullscreen mode.
https://bugs.webkit.org/show_bug.cgi?id=144716
Reviewed by Darin Adler.
We create a mask animation for the transition between windowed and fullscreen modes, on the
assumption that the element being taken into fullscreen mode does not have visible children
who extend beyond that elements bounds. This assumption breaks down in the case where div
with absolutely positioned children is taken fullscreen. While we can't necessarily make the
transition look correct in this case, we can remove the mask after the transition completes.
* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
* WebProcess/MediaCache/WebMediaKeyStorageManager.cpp:
(WebKit::removeAllMediaKeyStorageForOriginPath):
2015-05-06 Jinwoo Jeong <jw00.jeong@samsung.com>
Fix a build break on EFL debug build
https://bugs.webkit.org/show_bug.cgi?id=144654
Reviewed by Gyuyoung Kim.
No new tests, just build fix.
* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
(WebKit::CoordinatedGraphicsScene::paintToCurrentGLContext):
(WebKit::CoordinatedGraphicsScene::paintToGraphicsContext):
2015-05-06 Daniel Bates <dabates@apple.com>
[iOS][WK2] Pause/resume database thread when UIProcess enters/leaves the background
https://bugs.webkit.org/show_bug.cgi?id=144657
<rdar://problem/18894598>
Reviewed by Andy Estes.
Pause and resume the database thread when the UIProcess enters and leaves the background,
respectively, so that we avoid WebProcess termination due to holding a locked SQLite
database file when the WebProcess is suspended. This behavior matches the analagous
behavior in Legacy WebKit.
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _applicationDidEnterBackground:]): Call WebPageProxy::applicationDidEnterBackground()
when the UIProcess enters the background.
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::applicationDidEnterBackground): Added; notify the WebProcess to pause the database thread.
We temporarily take out background assertion on the WebProcess before sending this notification to ensure that the
WebProcess is running to receive it. We'll release this assertion when the WebProcess replies that it received the
notification.
* WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
(WebKit::WebDatabaseManager::setPauseAllDatabases): Added; turns around and calls DatabaseManager::setPauseAllDatabases().
* WebProcess/WebCoreSupport/WebDatabaseManager.h:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in: Add message ApplicationDidEnterBackground(). Also,
add empty lines to help demarcate this message and the other UIKit application lifecycle-related
messages from the rest of the list of messages.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::applicationWillEnterForeground): Resume the database thread.
(WebKit::WebPage::applicationDidEnterBackground): Pause the database thread.
2015-05-06 Ryuan Choi <ryuan.choi@navercorp.com>
[EFL] ewk_view_page_contents_get() API test is flaky
https://bugs.webkit.org/show_bug.cgi?id=144683
Reviewed by Gyuyoung Kim.
Callback of WKPageGetContentsAsMHTMLData contains WKData which does not contain null terminated character.
* UIProcess/API/efl/ewk_view.cpp: Pass the data of string instead of WKData directly.
(ewkViewPageContentsAsMHTMLCallback):
2015-05-06 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Docking Toolbar Buttons do not respect Docking Availability
https://bugs.webkit.org/show_bug.cgi?id=144714
Reviewed by Timothy Hatcher.
* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::createInspectorPage):
(WebKit::WebInspectorProxy::attachAvailabilityChanged):
* WebProcess/WebPage/WebInspectorUI.cpp:
(WebKit::WebInspectorUI::setDockingUnavailable):
* WebProcess/WebPage/WebInspectorUI.h:
* WebProcess/WebPage/WebInspectorUI.messages.in:
When docking availability changes, inform the inspector page
so it can respond by updating its UI.
2015-05-06 Joonghun Park <jh718.park@samsung.com>
[WK2] Simplify AsyncRequestImpl::ArgumentType parameters
https://bugs.webkit.org/show_bug.cgi?id=144689
Reviewed by Darin Adler.
Remove duplicated typename and ::type from AsyncRequestImpl related
function parameters.
* Shared/AsyncRequest.h:
2015-05-06 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r183894.
https://bugs.webkit.org/show_bug.cgi?id=144719
crashes on mavericks (Requested by dino on #webkit).
Reverted changeset:
"Handle backdrop views that have to tile"
https://bugs.webkit.org/show_bug.cgi?id=142317
http://trac.webkit.org/changeset/183894
2015-05-06 Brady Eidson <beidson@apple.com>
Addition review followup for:
Crash executing null AsyncRequest in IDB code.
<rdar://problem/18854856> and https://bugs.webkit.org/show_bug.cgi?id=144715
Reviewed by Darin Adler.
This patch adds a layer on top of the UniqueIDBDatabase request map to catch this coding mistake in the future.
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::didCompleteBoolRequest): Get rid of the ASSERT and the temporary variable,
make it a single line which reads better.
(WebKit::UniqueIDBDatabase::didPutRecordInBackingStore): Ditto.
(WebKit::UniqueIDBDatabase::didGetRecordFromBackingStore): Ditto.
(WebKit::UniqueIDBDatabase::didOpenCursorInBackingStore): Ditto.
(WebKit::UniqueIDBDatabase::didAdvanceCursorInBackingStore): Ditto.
(WebKit::UniqueIDBDatabase::didIterateCursorInBackingStore): Ditto.
(WebKit::UniqueIDBDatabase::didCountInBackingStore): Ditto.
(WebKit::UniqueIDBDatabase::didDeleteRangeInBackingStore): Ditto.
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.h: Ditto.
Add the class AsyncRequestMap which shadows a HashMap but does aggressive runtime checks
in ::take() to make sure the same request was not dispatched twice in a row, and makes sure we
never try to execute a null AsyncRequest by way of a RELEASE_ASSERT.
* Shared/AsyncRequest.h:
(WebKit::AsyncRequestMap::AsyncRequestMap):
(WebKit::AsyncRequestMap::take):
(WebKit::AsyncRequestMap::add):
(WebKit::AsyncRequestMap::clear):
(WebKit::AsyncRequestMap::values):
2015-05-06 Brady Eidson <beidson@apple.com>
Crash executing null AsyncRequest in IDB code.
<rdar://problem/18854856> and https://bugs.webkit.org/show_bug.cgi?id=144715
Reviewed by Darin Adler.
When UniqueIDBDatabase fails to execute an operation on the database work queue it usually
dispatches an AsyncRequest ID back to the main thread with an error callback.
For two of its operations it would then also dispatch the success callback.
In those cases the main thread would first take the AsyncRequest for the error callback out
of a map and then execute it.
It would then try to take the same AsyncRequest out of the map again, fail to do so, then
execute a null AsyncRequest.
This patch fixes the two functions to not dispatch both an error and success callback.
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::countInBackingStore): Return after dispatching the error callback.
(WebKit::UniqueIDBDatabase::deleteRangeInBackingStore): Ditto.
2015-05-06 Dean Jackson <dino@apple.com>
Handle backdrop views that have to tile
https://bugs.webkit.org/show_bug.cgi?id=142317
<rdar://problem/20049088>
Reviewed by Simon Fraser.
Add some better logging for custom appearance.
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTextStream::operator<<):
2015-05-06 Chris Dumez <cdumez@apple.com>
Disable network cache efficacy logging
https://bugs.webkit.org/show_bug.cgi?id=144703
<rdar://problem/20439143>
Reviewed by Andreas Kling.
Disable network cache efficacy logging by default as we have sufficient
data for now.
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::registerUserDefaultsIfNeeded):
2015-05-06 Timothy Horton <timothy_horton@apple.com>
Fix the build.
* UIProcess/mac/WKViewLayoutStrategy.mm:
(-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy updateLayout]):
2015-05-06 Dan Bernstein <mitz@apple.com>
No way to get a WKWebProcessPlugInFrames parent frame
https://bugs.webkit.org/show_bug.cgi?id=144705
Reviewed by Sam Weinig.
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
(-[WKWebProcessPlugInFrame _parentFrame]): Added this getter.
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFramePrivate.h: Declared new
_parentFrame property.
2015-05-06 Timothy Horton <timothy_horton@apple.com>
Fix the build.
* UIProcess/mac/WKViewLayoutStrategy.mm:
(-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy updateLayout]):
2015-04-02 Myles C. Maxfield <mmaxfield@apple.com>
Introducing the Platform Abstraction Layer (PAL)
https://bugs.webkit.org/show_bug.cgi?id=143358
Reviewed by Simon Fraser.
* Configurations/FeatureDefines.xcconfig: Updated
2015-05-05 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK][WK2] The WebKit network disk cache is not enabled
https://bugs.webkit.org/show_bug.cgi?id=142821
Reviewed by Martin Robinson.
Enable NetworkCache for the GTK+ port.
* config.h:
2015-05-06 Ryuan Choi <ryuan.choi@navercorp.com>
[EFL] Remove redudant condition in ViewClientEfl::didChangeViewportAttributes
https://bugs.webkit.org/show_bug.cgi?id=144672
Reviewed by Gyuyoung Kim.
ViewClientEfl::didChangeViewportAttributes is always called when fixed layout is disabled.
* UIProcess/efl/ViewClientEfl.cpp:
(WebKit::ViewClientEfl::didChangeViewportAttributes):
Removes condition that checks whether fixed layout is enabled.
2015-05-05 Alexey Proskuryakov <ap@apple.com>
NetworkResourceLoader::cleanup() should clear ResourceHandle client pointer.
https://bugs.webkit.org/show_bug.cgi?id=144641
rdar://problem/20250960
Reviewed by David Kilzer.
* NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::cleanup):
Clear the client pointer.
* Shared/Authentication/AuthenticationManager.cpp:
(WebKit::AuthenticationManager::useCredentialForChallenge):
(WebKit::AuthenticationManager::continueWithoutCredentialForChallenge):
(WebKit::AuthenticationManager::cancelChallenge):
(WebKit::AuthenticationManager::performDefaultHandling):
(WebKit::AuthenticationManager::rejectProtectionSpaceAndContinue):
Updated comments, which were not accurate, at least on Mac.
2015-05-05 Tim Horton <timothy_horton@apple.com>
Views get stuck with viewScale < 1 after switching from DynamicSizeWithMinimumViewSize to ViewSize
https://bugs.webkit.org/show_bug.cgi?id=144656
Reviewed by Dan Bernstein.
* UIProcess/mac/WKViewLayoutStrategy.mm:
(-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy willChangeLayoutStrategy]):
Reset the viewScale when we leave the DynamicSizeWithMinimumViewSize strategy.
2015-05-05 Tim Horton <timothy_horton@apple.com>
Fix the build.
* Platform/mac/LayerHostingContext.mm:
(WebKit::LayerHostingContext::setFencePort):
2015-05-05 Tim Horton <timothy_horton@apple.com>
Fix the build.
* UIProcess/mac/WKViewLayoutStrategy.mm:
(-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy updateLayout]):
2015-05-05 Timothy Horton <timothy_horton@apple.com>
Add a layout mode for computing fixed layout size from a minimum size
https://bugs.webkit.org/show_bug.cgi?id=144610
<rdar://problem/19790341>
Reviewed by Simon Fraser.
Add a layout mode where WebKit determines the layout size with a set of
(still in flux) heuristics, trying hard to keep the page usable below a
particular client-defined threshold view size.
This can mean that WebKit will start scaling down the page inside the view
to make the whole page fit, using the viewScale mechanism.
* UIProcess/API/C/WKLayoutMode.h:
* UIProcess/API/Cocoa/_WKLayoutMode.h:
Add the new layout mode, and documentation for the two complicated ones.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _layoutMode]):
(-[WKWebView _setLayoutMode:]):
(-[WKWebView _setViewScale:]):
(-[WKWebView _setMinimumViewSize:]):
(-[WKWebView _minimumViewSize]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
Forward the layoutMode and viewScale parameters to WKView if we have one.
* UIProcess/API/Cocoa/WKViewPrivate.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView dealloc]):
(-[WKView viewWillStartLiveResize]):
(-[WKView viewDidEndLiveResize]):
(-[WKView setFrameSize:]):
(-[WKView initWithFrame:processPool:configuration:webView:]):
(-[WKView disableFrameSizeUpdates]):
(-[WKView enableFrameSizeUpdates]):
(-[WKView frameSizeUpdatesDisabled]):
(-[WKView _layoutMode]):
(-[WKView _setLayoutMode:]):
(-[WKView _setViewScale:]):
(-[WKView _setMinimumViewSize:]):
(-[WKView _minimumViewSize]):
Store the minimum view size, and update the fixed layout size if needed.
(-[WKView _updateAutomaticallyComputedFixedLayoutSize]): Deleted.
(-[WKView _setAutomaticallyComputesFixedLayoutSizeFromViewScale:]): Deleted.
(-[WKView _automaticallyComputesFixedLayoutSizeFromViewScale]): Deleted.
Store the WKLayoutMode on the WKViewLayoutStrategy instead of having a
bunch of things like _automaticallyComputesFixedLayoutSizeFromViewScale.
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/mac/WKViewLayoutStrategy.h: Added.
* UIProcess/mac/WKViewLayoutStrategy.mm: Added.
(+[WKViewLayoutStrategy layoutStrategyWithPage:view:mode:]):
(-[WKViewLayoutStrategy initWithPage:view:mode:]):
(-[WKViewLayoutStrategy willDestroyView:]):
(-[WKViewLayoutStrategy layoutMode]):
(-[WKViewLayoutStrategy updateLayout]):
(-[WKViewLayoutStrategy disableFrameSizeUpdates]):
(-[WKViewLayoutStrategy enableFrameSizeUpdates]):
(-[WKViewLayoutStrategy frameSizeUpdatesDisabled]):
(-[WKViewLayoutStrategy didChangeViewScale]):
(-[WKViewLayoutStrategy didChangeMinimumViewSize]):
(-[WKViewLayoutStrategy willStartLiveResize]):
(-[WKViewLayoutStrategy didEndLiveResize]):
(-[WKViewLayoutStrategy didChangeFrameSize]):
(-[WKViewLayoutStrategy willChangeLayoutStrategy]):
(-[WKViewViewSizeLayoutStrategy initWithPage:view:mode:]):
(-[WKViewViewSizeLayoutStrategy updateLayout]):
(-[WKViewFixedSizeLayoutStrategy initWithPage:view:mode:]):
(-[WKViewFixedSizeLayoutStrategy updateLayout]):
(-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy initWithPage:view:mode:]):
(-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy updateLayout]):
(-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy didChangeViewScale]):
(-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy didChangeFrameSize]):
Move the existing layout strategies from WKView into WKViewLayoutStrategy subclasses.
(-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy initWithPage:view:mode:]):
(-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy updateLayout]):
(-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy didChangeMinimumViewSize]):
(-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy willStartLiveResize]):
(-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy didEndLiveResize]):
While in live resize with the new layout mode, disable frame size updates.
The new layout mode will do a live scale during part of the resize, and
we don't always want to send the new view size to the Web process.
(-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy didChangeFrameSize]):
(-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy willChangeLayoutStrategy]):
While in the new layout mode, maintain the viewScale as the minimum of the
scale required to fit the current view frame size inside the minimumViewSize.
If no scaling is required, carry on as usual, pushing the new view frame size
to the DrawingArea and on to the Web process.
If scaling is required, apply a transform to the view in the UI process,
until the live resize completes, in which case we send a fenced viewScale
adjustment to the Web process (so that the tiles paint at the new viewScale
synchronized with the removal of the transform in the UI process).
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::scaleViewFenced):
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::addFence):
(WebKit::DrawingArea::acceleratedAnimationDidEnd): Deleted.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::scaleViewAndUpdateGeometryFenced):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::addFence):
Add scaleViewAndUpdateGeometryFenced and the ability to install CoreAnimation fences on
TiledCoreAnimationDrawingArea's CAContext.
Add the ability to send updateGeometry out-of-band, so that
we can send it synchronously inside the message along with the CA fence.
We have to both change the viewScale and updateGeometry simultaneously
in the same CA commit that we install the fence into, in order to ensure
that there is no flash.
2015-05-05 Alex Christensen <achristensen@webkit.org>
[Content Extensions] Release input NSString when finished copying it.
https://bugs.webkit.org/show_bug.cgi?id=144642
Reviewed by Brian Weinstein.
* UIProcess/API/Cocoa/_WKUserContentExtensionStore.h:
* UIProcess/API/Cocoa/_WKUserContentExtensionStore.mm:
(-[_WKUserContentExtensionStore compileContentExtensionForIdentifier:encodedContentExtension:completionHandler:]):
2015-05-05 Alex Christensen <achristensen@webkit.org>
[Content Extensions] Use less memory to store the json input.
https://bugs.webkit.org/show_bug.cgi?id=144604
Reviewed by Benjamin Poulain.
* UIProcess/API/APIUserContentExtensionStore.cpp:
(API::compiledToFile):
(API::UserContentExtensionStore::compileContentExtension):
* UIProcess/API/APIUserContentExtensionStore.h:
Don't copy strings as much or keep them alive after done using them.
2015-05-04 Alex Christensen <achristensen@webkit.org>
[Content Extensions] Use less memory when writing byte code to file
https://bugs.webkit.org/show_bug.cgi?id=144602
Reviewed by Darin Adler.
* UIProcess/API/APIUserContentExtensionStore.cpp:
(API::decodeContentExtensionMetaData):
(API::writeDataToFile):
(API::compiledToFile):
(API::createExtension):
Compile and write each DFA to file, then come back and write the header when finalizing.
Also don't copy the DFA bytecode. This way, we don't need to keep more than one DFA's
bytecode in memory at a time.
2015-05-05 Sungmann Cho <sungmann.cho@navercorp.com>
Make all FrameLoadState data members private.
https://bugs.webkit.org/show_bug.cgi?id=144562
Reviewed by Darin Adler.
Previously, all of the data members in FrameLoadState were public and accessed directly
from outside the class. But these should all be private as noted in FrameLoadState.h
for better encapsulation.
No new tests, no behavior change.
* UIProcess/API/C/WKFrame.cpp:
(WKFrameGetFrameLoadState):
* UIProcess/FrameLoadState.h:
(WebKit::FrameLoadState::state):
(WebKit::FrameLoadState::url):
(WebKit::FrameLoadState::provisionalURL):
(WebKit::FrameLoadState::unreachableURL):
* UIProcess/WebFrameProxy.h:
(WebKit::WebFrameProxy::url):
(WebKit::WebFrameProxy::provisionalURL):
(WebKit::WebFrameProxy::unreachableURL):
2015-05-05 Alexey Proskuryakov <ap@apple.com>
Crashes in SandboxExtension::consumePermanently when uploading
https://bugs.webkit.org/show_bug.cgi?id=144611
rdar://problem/10156710
Reviewed by Darin Adler.
This only fixes the crashes, uploading still won't work.
Added null checks and some logging that may help us get to the root cause eventually.
* Shared/SandboxExtension.h:
(WebKit::SandboxExtension::createHandle):
(WebKit::SandboxExtension::createHandleForReadWriteDirectory):
* Shared/mac/SandboxExtensionMac.mm:
(WebKit::SandboxExtension::createHandle):
(WebKit::SandboxExtension::createHandleForReadWriteDirectory):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didChooseFilesForOpenPanel):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::extendSandboxForFileFromOpenPanel):
2015-05-05 Csaba Osztrogonác <ossy@webkit.org>
Remove TextureMapperImageBuffer
https://bugs.webkit.org/show_bug.cgi?id=143561
Reviewed by Žan Doberšek.
* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
(WebKit::CoordinatedGraphicsScene::paintToCurrentGLContext):
* WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
(WebKit::LayerTreeHostGtk::setNativeSurfaceHandleForCompositing):
2015-05-05 Carlos Garcia Campos <cgarcia@igalia.com>
[SOUP] Network Cache: IOChannel operations are not sent to the right thread
https://bugs.webkit.org/show_bug.cgi?id=144542
Reviewed by Darin Adler.
We are ignoring the given WorkQueue and running the async
operations in the current thread. Check the given WorkQueue
instead and schedule the operation to the given queue. If the
given queue is nullptr, which means the operation should be run in
the main context, the operation is run directly if the current
context is the main one or sent to the main context using a
GMainLoopSource.
Fixes crashes due to asserts when running disk-cache layout tests
in a Debug build.
* NetworkProcess/cache/NetworkCacheIOChannel.h:
* NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
(WebKit::NetworkCache::runTaskInQueue):
(WebKit::NetworkCache::IOChannel::read):
(WebKit::NetworkCache::IOChannel::readSync):
(WebKit::NetworkCache::IOChannel::write):
2015-05-04 Dan Bernstein <mitz@apple.com>
WebKit always goes through LaunchServices for main frame navigation actions
https://bugs.webkit.org/show_bug.cgi?id=144608
Reviewed by Tim Horton.
* UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Defined
_WKNavigationActionPolicyAllowWithoutTryingAppLink.
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction): If the policy
is _WKNavigationActionPolicyAllowWithoutTryingAppLink, dont go through tryAppLink.
2015-05-04 Enrica Casucci <enrica@apple.com>
[iOS WK2] editorState should include information about selection clipping rectangle.
https://bugs.webkit.org/show_bug.cgi?id=144603
rdar://problem/20521252
Reviewed by Chris Dumez.
Adding selectionClipRect to the post-layout portion of EditorState.
This way we can compute the selection clipping rectangle based on
up-to-date information instead of using the rectangle provided when
then element was first focused.
* Shared/EditorState.cpp:
(WebKit::EditorState::PostLayoutData::encode):
(WebKit::EditorState::PostLayoutData::decode):
* Shared/EditorState.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _selectionClipRect]):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::platformEditorState):
2015-05-04 Antti Koivisto <antti@apple.com>
Network Cache: Support time based cache clearing
https://bugs.webkit.org/show_bug.cgi?id=144568
<rdar://problem/19769820>
Reviewed by Andreas Kling.
Support clearing cache entries newer than given time only.
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::deleteDumpFile):
(WebKit::NetworkCache::Storage::traverse):
Also fix thread safety of traverse handler function.
(WebKit::NetworkCache::Cache::clear):
Also add completion handler to support the API properly.
* NetworkProcess/cache/NetworkCache.h:
* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::Storage::clear):
* NetworkProcess/cache/NetworkCacheStorage.h:
* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::clearNSURLCache):
Factor to a function.
(WebKit::NetworkProcess::clearDiskCache):
2015-05-04 Zan Dobersek <zdobersek@igalia.com>
[WTF] Remove Functional.h inclusions
https://bugs.webkit.org/show_bug.cgi?id=144400
Reviewed by Darin Adler.
Remove unnecessary inclusions of the <wtf/Functional.h> header in WebKit2.
* Platform/IPC/unix/ConnectionUnix.cpp:
* WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: Import the <objc/runtime.h>
header that was previously indirectly included through the Functional.h header.
* WebProcess/WebPage/DrawingArea.cpp:
2015-05-04 Csaba Osztrogonác <ossy@webkit.org>
[ARM] Don't compare unsigned chars to EOF (-1)
https://bugs.webkit.org/show_bug.cgi?id=144439
Reviewed by Geoffrey Garen.
* Shared/linux/WebMemorySamplerLinux.cpp:
(WebKit::nextToken): Don't cast return value of fgetc() to char.
2015-05-04 Antti Koivisto <antti@apple.com>
Remove NetworkResourceLoadScheduler
https://bugs.webkit.org/show_bug.cgi?id=144550
Reviewed by Sam Weinig.
It doesn't really do anything.
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::scheduleResourceLoad):
(WebKit::NetworkConnectionToWebProcess::performSynchronousLoad):
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::getNetworkProcessStatistics):
* NetworkProcess/NetworkProcess.h:
(WebKit::NetworkProcess::networkResourceLoadScheduler): Deleted.
* NetworkProcess/NetworkResourceLoadScheduler.cpp: Removed.
* NetworkProcess/NetworkResourceLoadScheduler.h: Removed.
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::cleanup):
* NetworkProcess/NetworkResourceLoader.h:
(WebKit::NetworkResourceLoader::create):
* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::initializeNetworkSettings):
Moved from NetworkResourceLoadSchedulerMac.mm.
(WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
* NetworkProcess/mac/NetworkResourceLoadSchedulerMac.mm: Removed.
* NetworkProcess/soup/NetworkResourceLoadSchedulerSoup.cpp: Removed.
* WebKit2.xcodeproj/project.pbxproj:
2015-05-03 Alexey Proskuryakov <ap@apple.com>
Crash in SandboxExtension::consume when uploading iWork -tef documents to iCloud
https://bugs.webkit.org/show_bug.cgi?id=144509
rdar://problem/18731910
Reviewed by Daniel Bates.
No test, because testRunner.beginDragWithFiles doesn't work in WKTR, and making
it work is hard.
* Shared/BlobDataFileReferenceWithSandboxExtension.cpp:
(WebKit::BlobDataFileReferenceWithSandboxExtension::prepareForFileAccess):
(WebKit::BlobDataFileReferenceWithSandboxExtension::revokeFileAccess):
2015-05-03 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK][EFL] Unify platform display handling
https://bugs.webkit.org/show_bug.cgi?id=144517
Reviewed by Martin Robinson.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseRealize): Use PlatformDisplay::sharedDisplay()
to checkt the display type.
(webkitWebViewBaseCreateWebPage): Ditto.
* UIProcess/cairo/BackingStoreCairo.cpp:
(WebKit::BackingStore::createBackend): Pass the native X11 shared
display to BackingStoreBackendCairoX11.
* WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
(WebKit::NetscapePlugin::x11HostDisplay): Return the native X11
shared display.
2015-05-03 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix Debug build with NETWORK_CACHE enabled and CACHE_PARTITIONING disabled.
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::store):
2015-05-01 Dan Bernstein <mitz@apple.com>
WebKit2 part of <rdar://problem/8636045> Back/forward navigation to an error page in Safari breaks the back-forward list
https://bugs.webkit.org/show_bug.cgi?id=144501
Reviewed by Darin Adler.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::loadAlternateHTMLString): If this is called during
didFailProvisionalLoadForFrame, send back the provisional URL captured at the time of
failure.
(WebKit::WebPageProxy::didFailProvisionalLoadForFrame): Get the provisioinal URL and keep
it in new member variable m_failingProvisionalLoadURL for the duration of the clients
handling of this message.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in: Added provisionalURL parameter to
DidFailProvisionalLoadForFrame.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad): Send the URL for this error
to the UI process.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::loadAlternateHTMLString): Temporarily restore the loaders state to
reflect the provisional load error being handled.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in: Added provisionalLoadErrorURL parameter to
LoadAlternateHTMLString.
2015-05-01 Martin Robinson <mrobinson@igalia.com>
USE(...) macro should expect unprefixed variables
https://bugs.webkit.org/show_bug.cgi?id=144454
Reviewed by Daniel Bates.
* Shared/API/c/WKBase.h: Replace all occurrences WTF_USE with USE.
* WebKit2.xcodeproj/project.pbxproj: Ditto.
2015-05-01 Brady Eidson <beidson@apple.com>
Add API to disable meta refreshes.
<rdar://problem/20333198> and https://bugs.webkit.org/show_bug.cgi?id=144269
Reviewed by Alexey Proskuryakov.
Add a preference to enable/disable meta refreshes, enabled by default.
* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetMetaRefreshEnabled):
(WKPreferencesGetMetaRefreshEnabled):
(WKPreferencesGetIgnoreViewportScalingConstraints): Deleted.
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
2015-05-01 Antti Koivisto <antti@apple.com>
Remove network process load serialization code
https://bugs.webkit.org/show_bug.cgi?id=144448
Reviewed by Alexey Proskuryakov.
TestRunner.setSerializeHTTPLoads is used by a few tests but it is unnecessary
with network process. We don't reorder loads anyway so test results are consistent.
There or no other clients for this code.
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::NetworkConnectionToWebProcess):
(WebKit::NetworkConnectionToWebProcess::setSerialLoadingEnabled): Deleted.
* NetworkProcess/NetworkConnectionToWebProcess.h:
(WebKit::NetworkConnectionToWebProcess::isSerialLoadingEnabled): Deleted.
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::getNetworkProcessStatistics):
* NetworkProcess/NetworkResourceLoadScheduler.cpp:
(WebKit::NetworkResourceLoadScheduler::scheduleLoader):
(WebKit::NetworkResourceLoadScheduler::removeLoader):
(WebKit::NetworkResourceLoadScheduler::loadsPendingCount): Deleted.
* NetworkProcess/NetworkResourceLoadScheduler.h:
* WebProcess/InjectedBundle/API/c/WKBundle.cpp:
(WKBundleSetTabKeyCyclesThroughElements):
(WKBundleSetSerialLoadingEnabled): Deleted.
(WKBundleDispatchPendingLoadRequests): Deleted.
* WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::setSerialLoadingEnabled): Deleted.
(WebKit::InjectedBundle::dispatchPendingLoadRequests): Deleted.
Remove also this as it does nothing.
* WebProcess/Network/WebResourceLoadScheduler.cpp:
(WebKit::WebResourceLoadScheduler::WebResourceLoadScheduler):
(WebKit::WebResourceLoadScheduler::suspendPendingRequests):
(WebKit::WebResourceLoadScheduler::resumePendingRequests):
Remove implementation, it does nothing.
(WebKit::WebResourceLoadScheduler::setSerialLoadingEnabled):
* WebProcess/Network/WebResourceLoadScheduler.h:
2015-04-30 Timothy Horton <timothy_horton@apple.com>
Remove long-deprecated unused WKView minimumLayoutWidth properties
https://bugs.webkit.org/show_bug.cgi?id=144480
Reviewed by Alexey Proskuryakov.
* UIProcess/API/Cocoa/WKViewPrivate.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView minimumLayoutWidth]): Deleted.
(-[WKView setMinimumLayoutWidth:]): Deleted.
(-[WKView minimumWidthForAutoLayout]): Deleted.
(-[WKView setMinimumWidthForAutoLayout:]): Deleted.
These were replaced with minimumSizeForAutoLayout long ago.
2015-04-30 Simon Fraser <simon.fraser@apple.com>
Fixed elements end up in the middle of the view with pageScale < 1
https://bugs.webkit.org/show_bug.cgi?id=144428
rdar://problem/20404982
Reviewed by Tim Horton.
Encode/decode fixedElementsLayoutRelativeToFrame.
* Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
(ArgumentCoder<ScrollingStateFrameScrollingNode>::encode):
(ArgumentCoder<ScrollingStateFrameScrollingNode>::decode):
2015-04-30 Tim Horton <timothy_horton@apple.com>
Asynchronous (or timed-out synchronous) resize flashes white instead of page background color
https://bugs.webkit.org/show_bug.cgi?id=144468
Reviewed by Simon Fraser and Dan Bernstein.
* UIProcess/API/mac/WKView.mm:
(-[WKView _viewBackgroundColor]):
(-[WKView updateLayer]):
Use the pageExtendedBackgroundColor for the background color of the WKView,
if we have one (and aren't using a transparent background). This means
during asynchronous resize or other cases where the Web process isn't keeping
up with the UI process during a resize, we'll see background color instead of white.
2015-04-30 Beth Dakin <bdakin@apple.com>
Should choose UIScrollView indicatorStyle based on the document background color
https://bugs.webkit.org/show_bug.cgi?id=144473
-and corresponding-
rdar://problem/19897699
Reviewed by Simon Fraser.
Update the indicator style whenever the background color changes.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _updateScrollViewBackground]):
2015-04-30 Enrica Casucci <enrica@apple.com>
[iOS] tapping in the middle of a word in editable content should not select the word.
https://bugs.webkit.org/show_bug.cgi?id=144421
rdar://problem/20710948
Reviewed by Tim Horton.
Reverting to the original behavior.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::selectWithGesture):
2015-04-29 Hunseop Jeong <hs85.jeong@samsung.com>
Fix the EFL build after r183595
https://bugs.webkit.org/show_bug.cgi?id=144427
Reviewed by Gyuyoung Kim.
updateWheelEventTestTriggersIfNeeded() is guarded by #if ENABLE(CSS_SCROLL_SNAP) || ENABLE(RUBBER_BANDING).
* WebProcess/WebPage/EventDispatcher.cpp:
(WebKit::updateWheelEventTestTriggersIfNeeded):
2015-04-29 Brent Fulgham <bfulgham@apple.com>
Expand test infrastructure to support scrolling tests
https://bugs.webkit.org/show_bug.cgi?id=143684
<rdar://problem/20375516>
Reviewed by Simon Fraser.
Update test programs to activate (and deactivate) the new WheelEventTestTrigger logic.
* UIProcess/API/C/WKPage.cpp:
(WKPageClearWheelEventTestTriggers): Added.
* UIProcess/API/C/WKPage.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::clearWheelEventTestTrigger): Added.
* UIProcess/WebPageProxy.h:
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageStartMonitoringScrollOperations): Interact with WheelEventTestTrigger through
the Page, rather than MainFrame.
(WKBundlePageRegisterScrollOperationCompletionCallback): Ditto.
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::createScrollbar): Make sure scroll animator knows about any
active test triggers.
* WebPage/EventDispatcher.mm:
(WebKit::EventDispatcher::wheelEvent): If the wheel event was passed to the scrolling thread,
defer tests until a Scrolling Thread Sync has occurred.
* WebPage/WebPage.cpp:
(WebKit::WebPage::clearWheelEventTestTrigger): Added.
* WebPage/WebPage.h:
* WebPage/WebPage.message.in: Added ClearWheelEventTestTrigger message.
2015-04-29 Enrica Casucci <enrica@apple.com>
Adding the ability to move selection by granularity on iOS.
https://bugs.webkit.org/show_bug.cgi?id=144410
rdar://problem/19213337
Reviewed by Benjamin Poulain.
This patch also correctly sets _usingGestureForSelection for all
the functions that change the selection with a gesture.
This way we make sure that the selection drawing is not delayed
until the next time we paint.
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView moveSelectionAtBoundary:inDirection:completionHandler:]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::moveSelectionAtBoundaryWithDirection):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::moveSelectionAtBoundaryWithDirection):
2015-04-29 Tim Horton <timothy_horton@apple.com>
UI process sometimes crashes under _takeViewSnapshot when the window is off-screen
https://bugs.webkit.org/show_bug.cgi?id=144418
<rdar://problem/20740278>
Reviewed by Alexey Proskuryakov.
* UIProcess/API/mac/WKView.mm:
(-[WKView _takeViewSnapshot]):
Null-check the array before checking if it has any items.
If the window is off-screen, we can't snapshot it.
2015-04-29 Simon Fraser <simon.fraser@apple.com>
Allow testing of plug-ins that handle wheel events.
https://bugs.webkit.org/show_bug.cgi?id=144413
Reviewed by Tim Horton.
Allow the Test Netscape Plug-in to pretend to handle wheel events,
so layout tests can use it.
* Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
(WebKit::NetscapePluginModule::determineQuirks):
2015-04-29 Filip Pizlo <fpizlo@apple.com>
JSTypeInfo should have an inline type flag to indicate if getCallData() has been overridden
https://bugs.webkit.org/show_bug.cgi?id=144397
Reviewed by Andreas Kling.
If you override getCallData() and you want to be called a "function", then you need to use the
new TypeOfShouldCallGetCallData flag.
* WebProcess/Plugins/Netscape/JSNPObject.h:
2015-04-29 Antti Koivisto <antti@apple.com>
ResourceLoadPriority should be enum class
https://bugs.webkit.org/show_bug.cgi?id=144326
Reviewed by Darin Adler.
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::servePendingRequests): Deleted.
Remove this unused message.
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::makeStoreDecision):
(WebKit::NetworkCache::Cache::retrieve):
* NetworkProcess/mac/NetworkResourceLoadSchedulerMac.mm:
(WebKit::NetworkResourceLoadScheduler::platformInitializeNetworkSettings):
* WebProcess/Network/WebResourceLoadScheduler.cpp:
(WebKit::WebResourceLoadScheduler::servePendingRequests):
* WebProcess/Network/WebResourceLoadScheduler.h:
2015-04-29 Myles C. Maxfield <mmaxfield@apple.com>
[OS X] Use CTFontCreateForCSS instead of doing font search ourselves
https://bugs.webkit.org/show_bug.cgi?id=132159
Reviewed by Darin Adler.
Add SPI to set the font whitelist.
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/API/C/WKContext.cpp:
(WKContextSetFontWhitelist):
* UIProcess/API/C/WKContextPrivate.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::setFontWhitelist):
* UIProcess/WebProcessPool.h:
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):
2015-04-29 Martin Robinson <mrobinson@igalia.com>
[CMake] [GTK] Organize and clean up unused CMake variables
https://bugs.webkit.org/show_bug.cgi?id=144364
Reviewed by Gyuyoung Kim.
* PlatformGTK.cmake: Add variables specific to this project.
* webkit2gtk-web-extension.pc.in: Hardcode the GTK+ API version. It rarely changes.
* webkit2gtk.pc.in: Ditto.
2015-04-29 Carlos Garcia Campos <cgarcia@igalia.com>
REGRESSION(r182573): [GTK] The default context menu contains an empty item since r182573
https://bugs.webkit.org/show_bug.cgi?id=144388
Reviewed by Brady Eidson.
Move the WebContextMenuClient::shareMenuItem() implementation to
platform files, since platforms not supporting share menu item
should return a null ContextMenuIem instead.
* WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
(WebKit::WebContextMenuClient::shareMenuItem): Deleted.
* WebProcess/WebCoreSupport/efl/WebContextMenuClientEfl.cpp:
(WebKit::WebContextMenuClient::shareMenuItem):
* WebProcess/WebCoreSupport/gtk/WebContextMenuClientGtk.cpp:
(WebKit::WebContextMenuClient::shareMenuItem):
* WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
(WebKit::WebContextMenuClient::shareMenuItem):
2015-04-29 Carlos Garcia Campos <cgarcia@igalia.com>
REGRESSION(r183467): [SOUP] isMainResource is no longer passed as resource load parameters to the network process
https://bugs.webkit.org/show_bug.cgi?id=144381
Reviewed by Darin Adler.
A requester enum value is passed now as part of the
ResourceRequest, but it's not encoded/decoded for soup.
* Shared/soup/WebCoreArgumentCodersSoup.cpp:
(IPC::ArgumentCoder<ResourceRequest>::encodePlatformData): Encode requester.
(IPC::ArgumentCoder<ResourceRequest>::decodePlatformData): Decode requester.
2015-04-28 Carlos Garcia Campos <cgarcia@igalia.com>
[SOUP] Use xattrs to get/set the creation time of disk cache files
https://bugs.webkit.org/show_bug.cgi?id=144251
Reviewed by Martin Robinson.
The network process disk cache uses the creation time to compute a
worth value used to determine the order in which cached resources
are deleted when the cache is shrunk. In some operating systems
like Linux there's no st_birthtime in struct stat, but since cache
files are always created and deleted by us, we could use a custom
xattr to store and retrieve the creation time of cached resources.
* NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
(WebKit::NetworkCache::fileTimes):
* NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
(WebKit::NetworkCache::IOChannel::IOChannel):
2015-04-28 Carlos Garcia Campos <cgarcia@igalia.com>
Network Cache: Do not create a SharedBuffer for mapped resources unless explicitly requested
https://bugs.webkit.org/show_bug.cgi?id=144337
Reviewed by Antti Koivisto.
We send a buffer or a memory mapped handler to the web process
depending on whether the resource body is mapped or not, but we
are always creating a shared buffer even for mapped resources.
Split initializeBufferFromStorageRecord() moving the mapped memory
handler initialization to its own method.
* NetworkProcess/cache/NetworkCacheEntry.cpp:
(WebKit::NetworkCache::Entry::initializeShareableResourceHandleFromStorageRecord):
Initialize the mapped memory handler if the body data is mapped.
(WebKit::NetworkCache::Entry::initializeBufferFromStorageRecord):
Initialize the buffer by wrapping the mapped memory if the body
data is mapped, or using the body data directly otherwise.
(WebKit::NetworkCache::Entry::shareableResourceHandle): Call
initializeShareableResourceHandleFromStorageRecord() if the
handler is null.
* NetworkProcess/cache/NetworkCacheEntry.h:
2015-04-28 Simon Fraser <simon.fraser@apple.com>
Make a non-static version of FrameView::yPositionForRootContentLayer()
https://bugs.webkit.org/show_bug.cgi?id=144375
Reviewed by Andy Estes.
There were two calls to the static FrameView::yPositionForRootContentLayer()
which passed in all the arguments for the same FrameView. Make a member
function for convenience.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::shadowLayerPositionForFrame):
2015-04-28 Ryuan Choi <ryuan.choi@navercorp.com>
[CoordinatedGraphics] Merge TILED_BACKING_STORE guard with COORDINATED_GRAPHICS
https://bugs.webkit.org/show_bug.cgi?id=143001
Reviewed by Gyuyoung Kim.
* UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
(WebKit::CoordinatedLayerTreeHostProxy::commitCoordinatedGraphicsState):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::dispatchViewportPropertiesDidChange):
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidLayout):
(WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setSize):
(WebKit::WebPage::setUseFixedLayout):
(WebKit::WebPage::canHandleUserEvents):
* WebProcess/WebPage/WebPage.h:
2015-04-28 Timothy Horton <timothy_horton@apple.com>
[TextIndicator] Yellow highlight takes too long to fade out on scroll
https://bugs.webkit.org/show_bug.cgi?id=144358
<rdar://problem/19451011>
Reviewed by Beth Dakin.
* UIProcess/API/Cocoa/WKViewPrivate.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView renewGState]):
(-[WKView viewDidMoveToWindow]):
(-[WKView _dictionaryLookupPopoverWillClose:]):
(-[WKView _setTextIndicator:]):
(-[WKView _setTextIndicator:withLifetime:]):
(-[WKView _clearTextIndicatorWithAnimation:]):
(-[WKView magnifyWithEvent:]):
(-[WKView smartMagnifyWithEvent:]):
(-[WKView setMagnification:centeredAtPoint:]):
(-[WKView setMagnification:]):
(-[WKView _dismissContentRelativeChildWindows]):
(-[WKView _dismissContentRelativeChildWindowsWithAnimation:]):
(-[WKView _setTextIndicator:fadeOut:]): Deleted.
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::pageDidScroll):
(WebKit::WebPageProxy::setTextIndicator):
(WebKit::WebPageProxy::clearTextIndicator):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::setTextIndicator):
(WebKit::PageClientImpl::clearTextIndicator):
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::setTextIndicator):
(WebKit::PageClientImpl::clearTextIndicator):
(WebKit::PageClientImpl::didPerformDictionaryLookup):
(WebKit::PageClientImpl::dismissContentRelativeChildWindows):
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController _defaultAnimationController]):
(-[WKImmediateActionController _animationControllerForDataDetectedText]):
(-[WKImmediateActionController _animationControllerForDataDetectedLink]):
(-[WKImmediateActionController _animationControllerForText]):
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::updateFindIndicator):
Make _setTextIndicator take a reference.
Add a variant of _setTextIndicator that takes a Lifetime.
Make _clearTextIndicatorWithAnimation take a DismissalAnimation.
Make dismissContentRelativeChildWindows take a parameter indicating
whether the dismissal should include animation or not (currently
only applies to TextIndicator).
Don't animate when dismissal occurs because of scrolling, zooming,
or other things in which the content will have changed significantly
underneath the indicator and shouldn't have a slowly-fading-out yellow highlight.
2015-04-28 Michael Catanzaro <mcatanzaro@igalia.com>
Fully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT
https://bugs.webkit.org/show_bug.cgi?id=144304
Reviewed by Geoffrey Garen.
Define ENABLE_JIT, enabled by default, instead of ENABLE_LLINT_C_LOOP, disabled by default.
* Configurations/FeatureDefines.xcconfig:
2015-04-28 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r183514.
https://bugs.webkit.org/show_bug.cgi?id=144359
It broke cloop test bots (Requested by mcatanzaro on #webkit).
Reverted changeset:
"Fully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT"
https://bugs.webkit.org/show_bug.cgi?id=144304
http://trac.webkit.org/changeset/183514
2015-04-28 Michael Catanzaro <mcatanzaro@igalia.com>
Fully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT
https://bugs.webkit.org/show_bug.cgi?id=144304
Reviewed by Geoffrey Garen.
Define ENABLE_JIT, enabled by default, instead of ENABLE_LLINT_C_LOOP, disabled by default.
* Configurations/FeatureDefines.xcconfig:
2015-04-28 Enrica Casucci <enrica@apple.com>
Add support for lookup on iOS.
https://bugs.webkit.org/show_bug.cgi?id=144342
rdar://problem/19994090
Reviewed by Tim Horton.
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _lookup:]):
(-[WKContentView canPerformAction:withSender:]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::getLookupContextAtPoint):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getLookupContextAtPoint):
2015-04-28 Brady Eidson <beidson@apple.com>
Consolidate most "frame load" arguments into FrameLoadRequest.
https://bugs.webkit.org/show_bug.cgi?id=144276
Reviewed by Alexey Proskuryakov.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::loadURL):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchCreatePage):
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::openInNewTab):
2015-04-28 Chris Dumez <cdumez@apple.com>
[WK2][Mac] Update WebContent process' sandbox profile for AWD
https://bugs.webkit.org/show_bug.cgi?id=144315
<rdar://problem/20719293>
Reviewed by Alexey Proskuryakov.
Update sandbox profile for AWD similarly to what was done for iOS in
r182278.
* WebProcess/com.apple.WebProcess.sb.in:
2015-04-28 Antti Koivisto <antti@apple.com>
Network Cache: Disk cache getting filled by YouTube video data
https://bugs.webkit.org/show_bug.cgi?id=144259
Reviewed by Darin Adler.
MSE media is loaded via XHR and tends to eventually fill the cache.
YouTube serves the media chunks cacheable, however they are rarely (if ever) reused.
We can reduce disk writes and keep more useful resources around by not caching them
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::didReceiveResponseAsync):
(WebKit::NetworkResourceLoader::didRetrieveCacheEntry):
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::makeStoreDecision):
Don't store if the requester is XHR and response has video or audio content type.
* NetworkProcess/cache/NetworkCache.h:
* NetworkProcess/cache/NetworkCacheStatistics.cpp:
(WebKit::NetworkCache::storeDecisionToDiagnosticKey):
* Shared/Network/NetworkResourceLoadParameters.cpp:
(WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters):
(WebKit::NetworkResourceLoadParameters::encode):
(WebKit::NetworkResourceLoadParameters::decode):
* Shared/Network/NetworkResourceLoadParameters.h:
The requester type is now part of the ResourceRequest, no need for separate parameter.
* Shared/mac/WebCoreArgumentCodersMac.mm:
(IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
(IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
* WebProcess/Network/WebResourceLoadScheduler.cpp:
(WebKit::WebResourceLoadScheduler::scheduleLoad):
2015-04-28 Zan Dobersek <zdobersek@igalia.com>
[WK2] API::UserContentURLPattern creation functions should return Ref<>
https://bugs.webkit.org/show_bug.cgi?id=144225
Reviewed by Darin Adler.
Have API::UserContentURLPattern creation functions return Ref<>.
Call-sites are also updated, using and operating on the returned Ref<>
object where possible.
* Shared/API/APIUserContentURLPattern.h:
(API::UserContentURLPattern::create):
* Shared/API/c/WKUserContentURLPattern.cpp:
(WKUserContentURLPatternCreate):
2015-04-28 Zan Dobersek <zdobersek@igalia.com>
[WK2] API::URLRequest, API::URLResponse creation functions should return Ref<>
https://bugs.webkit.org/show_bug.cgi?id=144224
Reviewed by Darin Adler.
Have API::URLRequest and API::URLResponse creation functions return Ref<>.
The call-sites are also updated, using and operating on the returned Ref<> object
where possible.
* Shared/API/APIURLRequest.h:
(API::URLRequest::create):
* Shared/API/APIURLResponse.h:
(API::URLResponse::create):
* Shared/API/c/WKURLRequest.cpp:
(WKURLRequestCreateWithWKURL):
* Shared/API/c/mac/WKURLRequestNS.mm:
(WKURLRequestCreateWithNSURLRequest):
* Shared/API/c/mac/WKURLResponseNS.mm:
(WKURLResponseCreateWithNSURLResponse):
* UIProcess/API/C/WKContext.cpp:
(WKContextSetDownloadClient):
* UIProcess/API/C/WKDownload.cpp:
(WKDownloadCopyRequest):
* UIProcess/API/C/WKNavigationDataRef.cpp:
(WKNavigationDataCopyOriginalRequest):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPagePolicyClient):
(WKPageSetPageUIClient):
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
* UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.cpp:
(WebKit::WebSoupCustomProtocolRequestManagerClient::startLoading):
* WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
(willSendRequestForFrame):
* WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.cpp:
(WebKit::InjectedBundlePagePolicyClient::decidePolicyForNavigationAction):
(WebKit::InjectedBundlePagePolicyClient::decidePolicyForNewWindowAction):
(WebKit::InjectedBundlePagePolicyClient::decidePolicyForResponse):
2015-04-27 Zan Dobersek <zdobersek@igalia.com>
[WK2] API::Point, API::Size, API::Rect creation functions should return Ref<>
https://bugs.webkit.org/show_bug.cgi?id=144223
Reviewed by Darin Adler.
Have API::Point, API::Size and API::Rect creation functions return Ref<>.
Call-sites are also updated, using and operating on the returned Ref<> object
where possible.
* Shared/API/APIGeometry.h:
(API::Size::create):
(API::Point::create):
(API::Rect::create):
* Shared/API/c/WKGeometry.cpp:
(WKPointCreate):
(WKSizeCreate):
(WKRectCreate):
2015-04-27 Zan Dobersek <zdobersek@igalia.com>
[WK2] API::Error creation functions should return Ref<>
https://bugs.webkit.org/show_bug.cgi?id=144222
Reviewed by Darin Adler.
Have API::Error creation functions return Ref<>.
The call-sites are also updated, using and operating
on the returned Ref<> object where possible.
* Shared/API/APIError.h:
(API::Error::create):
* Shared/API/c/cf/WKErrorCF.cpp:
(WKErrorCreateWithCFError):
* UIProcess/API/C/WKOriginDataManager.cpp:
(WKOriginDataManagerDeleteEntriesForOrigin):
(WKOriginDataManagerDeleteEntriesModifiedBetweenDates):
(WKOriginDataManagerDeleteAllEntries):
* UIProcess/API/C/WKPage.cpp:
(toGenericCallbackFunction):
(WKPageForceRepaint):
(WKPageValidateCommand):
(WKPageComputePagesForPrinting):
* UIProcess/API/C/WKPluginSiteDataManager.cpp:
(WKPluginSiteDataManagerClearSiteData):
(WKPluginSiteDataManagerClearAllSiteData):
* UIProcess/GenericCallback.h:
(WebKit::toGenericCallbackFunction):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::printFinishedCallback):
2015-04-27 Sungmann Cho <sungmann.cho@navercorp.com>
[GTK] Remove unnecessary semicolon from WebKitNotificationProvider.h.
https://bugs.webkit.org/show_bug.cgi?id=144312
Reviewed by Martin Robinson.
No new tests, no behavior change.
* UIProcess/API/gtk/WebKitNotificationProvider.h:
2015-04-27 Brent Fulgham <bfulgham@apple.com>
PDF action menu fixes
https://bugs.webkit.org/show_bug.cgi?id=144299
<rdar://problem/20702215>
Reviewed by Tim Horton.
Make two corrections to how PDFs are handled:
1. When calculating the view rect for the user's selection, make sure
that we get coordinates for the correct PDF page. The existing code assumed
that the current PDFLayerControler's current page was correct, but this will
not be true if you zoom the PDF out so that several pages are displayed at
once. Each selection keeps track of the page it is referenced against.
2. Revise the offsets calculated for the TextIndicator to take into account
the font descender (as well as the ascender), and to adjust by the scaled
amount of margin around the selected text.
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::viewRectForSelection): Use correct page for calculating
the coordinates.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::dictionaryPopupInfoForSelectionInPDFPlugin): Include font 'descendant'
and (scaled) margin when adjusting the hit target for the TextIndicator to draw.
2015-04-27 Michael Catanzaro <mcatanzaro@igalia.com>
Rename WTF_USE_3D_GRAPHICS to ENABLE_GRAPHICS_CONTEXT_3D
https://bugs.webkit.org/show_bug.cgi?id=144193
Reviewed by Darin Adler.
* CMakeLists.txt:
2015-04-24 Jon Honeycutt <jhoneycutt@apple.com>
Context menus are not reshown after an orientation change
<https://bugs.webkit.org/show_bug.cgi?id=144143>
<rdar://problem/20679931>
Reviewed by Darin Adler.
* UIProcess/ios/WKActionSheet.mm:
(-[WKActionSheet updateSheetPosition]):
Return early if we're still in a rotation, not if the rotation is
complete.
2015-04-27 Zan Dobersek <zdobersek@igalia.com>
[WK2] API::Dictionary creation functions should return Ref<>
https://bugs.webkit.org/show_bug.cgi?id=144221
Reviewed by Darin Adler.
Have API::Dictionary creation functions return Ref<>.
The call-sites are also updated, using and operating
on the returned Ref<> object where possible.
* Shared/API/APIDictionary.cpp:
(API::Dictionary::create):
* Shared/API/APIDictionary.h:
* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(createEncodedObject):
* Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:
(-[_WKRemoteObjectRegistry _sendInvocation:interface:]):
* Shared/API/c/WKDictionary.cpp:
(WKDictionaryCreate):
* Shared/API/c/WKMutableDictionary.cpp:
(WKMutableDictionaryCreate):
* Shared/Plugins/Netscape/PluginInformation.cpp:
(WebKit::createPluginInformationDictionary):
* Shared/Plugins/Netscape/PluginInformation.h:
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageUIClient):
* UIProcess/API/gtk/WebKitWebContext.cpp:
(webkit_web_context_prefetch_dns):
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkit_web_view_get_snapshot):
* UIProcess/Plugins/PlugInAutoStartProvider.cpp:
(WebKit::PlugInAutoStartProvider::autoStartOriginsTableCopy):
* UIProcess/Plugins/PlugInAutoStartProvider.h:
* UIProcess/StatisticsRequest.cpp:
(WebKit::createDictionaryFromHashMap):
(WebKit::StatisticsRequest::completedRequest):
* UIProcess/WebFormClient.cpp:
(WebKit::WebFormClient::willSubmitForm):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didFailToInitializePlugin):
* WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
(didInitiateLoadForResource):
(willSendRequestForFrame):
(didReceiveResponseForResource):
(didReceiveContentLengthForResource):
(didFinishLoadForResource):
(didFailLoadForResource):
(webkitWebPageDidReceiveMessage):
* WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
(WebKit::InjectedBundlePageFormClient::willSendSubmitEvent):
(WebKit::InjectedBundlePageFormClient::willSubmitForm):
2015-04-27 Zan Dobersek <zdobersek@igalia.com>
[WK2] API::Data creation functions should return Ref<>
https://bugs.webkit.org/show_bug.cgi?id=144220
Reviewed by Darin Adler.
Have API::Data creation functions return Ref<>.
The call-sites are also updated, using and operating
on the returned Ref<> object where possible.
* Shared/API/APIData.h:
(API::Data::createWithoutCopying):
(API::Data::create):
* Shared/API/c/WKData.cpp:
(WKDataCreate):
* Shared/API/c/mac/WKWebArchive.cpp:
(WKWebArchiveCopyData):
* Shared/API/c/mac/WKWebArchiveResource.cpp:
(WKWebArchiveResourceCopyData):
* Shared/APIWebArchive.h:
* Shared/APIWebArchive.mm:
(API::WebArchive::data):
* Shared/APIWebArchiveResource.h:
* Shared/APIWebArchiveResource.mm:
(API::WebArchiveResource::data):
* Shared/Cocoa/APIDataCocoa.mm:
(API::Data::createWithoutCopying):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView loadData:MIMEType:characterEncodingName:baseURL:]):
* UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
(webkitURISchemeRequestReadCallback):
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkit_web_view_load_bytes):
* UIProcess/Downloads/DownloadProxy.cpp:
(WebKit::createData):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::dataCallback):
(WebKit::WebPageProxy::savePDFToFileInDownloadsFolder):
2015-04-27 Zan Dobersek <zdobersek@igalia.com>
[WK2] API::URL creation functions should return Ref<>
https://bugs.webkit.org/show_bug.cgi?id=144219
Reviewed by Darin Adler.
Have API::URL creation functions return Ref<>.
The call-sites are also updated, using and operating in the
returned Ref<> object, where possible.
* Shared/API/APIURL.h:
(API::URL::create):
* Shared/API/c/WKSharedAPICast.h:
(WebKit::toCopiedURLAPI):
* Shared/API/c/WKURL.cpp:
(WKURLCreateWithUTF8CString):
(WKURLCreateWithBaseURL):
* UIProcess/API/gtk/WebKitWebResource.cpp:
(webkit_web_resource_get_data):
* UIProcess/WebIconDatabase.cpp:
(WebKit::WebIconDatabase::didChangeIconForPageURL):
(WebKit::WebIconDatabase::notifyIconDataReadyForPageURL):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::userAgent):
2015-04-27 Zan Dobersek <zdobersek@igalia.com>
[WK2] API::String creation functions should return Ref<>
https://bugs.webkit.org/show_bug.cgi?id=144218
Reviewed by Darin Adler.
Have API::String creation functions return Ref<>.
The call-sites are also updated, using and operating on the returned
Ref<> object, where possible.
* Shared/API/APIString.h:
* Shared/API/c/WKPluginInformation.cpp:
(WKPluginInformationBundleIdentifierKey):
(WKPluginInformationBundleVersionKey):
(WKPluginInformationBundleShortVersionKey):
(WKPluginInformationPathKey):
(WKPluginInformationDisplayNameKey):
(WKPluginInformationDefaultLoadPolicyKey):
(WKPluginInformationUpdatePastLastBlockedVersionIsKnownAvailableKey):
(WKPluginInformationHasSandboxProfileKey):
(WKPluginInformationFrameURLKey):
(WKPluginInformationMIMETypeKey):
(WKPluginInformationPageURLKey):
(WKPluginInformationPluginspageAttributeURLKey):
(WKPluginInformationPluginURLKey):
(WKPlugInInformationReplacementObscuredKey):
* Shared/API/c/WKSharedAPICast.h:
(WebKit::ProxyingRefPtr::ProxyingRefPtr):
(WebKit::toCopiedAPI):
* Shared/API/c/WKString.cpp:
(WKStringCreateWithUTF8CString):
(WKStringCreateWithJSString):
* UIProcess/API/C/WKDatabaseManager.cpp:
(WKDatabaseManagerGetOriginKey):
(WKDatabaseManagerGetOriginQuotaKey):
(WKDatabaseManagerGetOriginUsageKey):
(WKDatabaseManagerGetDatabaseDetailsKey):
(WKDatabaseManagerGetDatabaseDetailsNameKey):
(WKDatabaseManagerGetDatabaseDetailsDisplayNameKey):
(WKDatabaseManagerGetDatabaseDetailsExpectedUsageKey):
(WKDatabaseManagerGetDatabaseDetailsCurrentUsageKey):
(WKDatabaseManagerGetDatabaseDetailsCreationTimeKey):
(WKDatabaseManagerGetDatabaseDetailsModificationTimeKey):
* UIProcess/API/C/WKKeyValueStorageManager.cpp:
(WKKeyValueStorageManagerGetOriginKey):
(WKKeyValueStorageManagerGetCreationTimeKey):
(WKKeyValueStorageManagerGetModificationTimeKey):
* UIProcess/API/C/WKPage.cpp:
(WKPageGetSessionHistoryURLValueType):
(WKPageGetSessionBackForwardListItemValueType):
(toGenericCallbackFunction):
(WKPageValidateCommand):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::didReceiveInvalidMessage):
2015-04-27 Brady Eidson <beidson@apple.com>
Make 'enum NavigationType' be an enum class
https://bugs.webkit.org/show_bug.cgi?id=144270
Reviewed by Alex Christensen.
* Shared/API/c/WKSharedAPICast.h:
(WebKit::toAPI):
* Shared/NavigationActionData.cpp:
(WebKit::NavigationActionData::NavigationActionData):
* UIProcess/API/Cocoa/WKNavigationAction.mm:
(toWKNavigationType):
* UIProcess/API/gtk/WebKitPrivate.cpp:
(toWebKitNavigationType):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::openInNewTab):
2015-04-27 Brent Fulgham <bfulgham@apple.com>
REGRESSION(r182879): Images and video can no longer be downloaded
https://bugs.webkit.org/show_bug.cgi?id=144267
<rdar://problem/20702844>
Reviewed by Simon Fraser.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _createActionMenuItemForTag:]): Check for
"!WebCore::protocolIs(..., "file")" for image and media downloads.
2015-04-27 Csaba Osztrogonác <ossy@webkit.org>
[EFL] TestWebKitAPI's forwarding header generator should depend on WebKit2's generator
https://bugs.webkit.org/show_bug.cgi?id=143874
Reviewed by Gyuyoung Kim.
* PlatformEfl.cmake: Rename the generator to have consistent name with other generators.
* Scripts/generate-forwarding-headers.pl: Removed the unnecessary multiple include-path support.
2015-04-17 Carlos Garcia Campos <cgarcia@igalia.com>
[SOUP] Add initial implementation of NetworkProcess disk cache
https://bugs.webkit.org/show_bug.cgi?id=143872
Reviewed by Martin Robinson.
Implement the platform specific parts of the disk cache
implementation for Soup. It's mainly NetworkCache::Data and
NetworkCache::IOChannel.
* CMakeLists.txt:
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::dumpFileChanged):
(WebKit::NetworkCache::Cache::initialize):
* NetworkProcess/cache/NetworkCacheBlobStorage.cpp:
* NetworkProcess/cache/NetworkCacheData.h:
(WebKit::NetworkCache::Data::soupBuffer):
* NetworkProcess/cache/NetworkCacheDataSoup.cpp: Added.
(WebKit::NetworkCache::Data::Data):
(WebKit::NetworkCache::Data::empty):
(WebKit::NetworkCache::Data::data):
(WebKit::NetworkCache::Data::isNull):
(WebKit::NetworkCache::Data::apply):
(WebKit::NetworkCache::Data::subrange):
(WebKit::NetworkCache::concatenate):
(WebKit::NetworkCache::MapWrapper::~MapWrapper):
(WebKit::NetworkCache::deleteMapWrapper):
(WebKit::NetworkCache::mapFile):
(WebKit::NetworkCache::Data::adoptMap):
(WebKit::NetworkCache::computeSHA1):
(WebKit::NetworkCache::bytesEqual):
* NetworkProcess/cache/NetworkCacheIOChannel.h:
* NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp: Added.
(WebKit::NetworkCache::IOChannel::IOChannel):
(WebKit::NetworkCache::IOChannel::open):
(WebKit::NetworkCache::fillDataFromReadBuffer):
(WebKit::NetworkCache::inputStreamReadReadyCallback):
(WebKit::NetworkCache::IOChannel::read):
(WebKit::NetworkCache::IOChannel::readSync):
(WebKit::NetworkCache::outputStreamWriteReadyCallback):
(WebKit::NetworkCache::IOChannel::write):
* NetworkProcess/cache/NetworkCacheStorageSoup.cpp: Removed.
* NetworkProcess/gtk/NetworkProcessMainGtk.cpp:
* NetworkProcess/soup/NetworkProcessSoup.cpp:
(WebKit::NetworkProcess::platformInitializeNetworkProcess):
(WebKit::NetworkProcess::platformSetCacheModel):
(WebKit::NetworkProcess::clearDiskCache):
* PlatformGTK.cmake:
2015-04-26 Yusuke Suzuki <utatane.tea@gmail.com>
[ES6] Implement ES6 template literals
https://bugs.webkit.org/show_bug.cgi?id=142691
Reviewed by Darin Adler.
Add ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX compile time flag.
* Configurations/FeatureDefines.xcconfig:
2015-04-26 Sungmann Cho <sungmann.cho@navercorp.com>
Remove PluginView::renderer().
https://bugs.webkit.org/show_bug.cgi?id=144216
Reviewed by Darin Adler.
Nobody should have to know about the plug-in view's renderer except the plug-in view itself.
No new tests, no behavior change.
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::convertFromScrollbarToContainingView):
(WebKit::PDFPlugin::convertFromContainingViewToScrollbar):
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::renderer): Deleted.
* WebProcess/Plugins/PluginView.h:
2015-04-26 Doug Russell <d_russell@apple.com>
AX: richer text change notifications (142719)
https://bugs.webkit.org/show_bug.cgi?id=142719
Reviewed by Darin Adler.
Richer accessibility value change notifications. Introduce AXTextEditType,
postTextStateChangeNotification and postTextReplacementNotification to give assistive
tech apps more reliable context for responding to changes in web content. Also implement
a mechanism to post value changes in password form fields in coalesced ticks to thwart
analyzing the cadence of changes.
Richer accessibility selection change notifications. Introduce AXTextStateChangeIntent,
and an overload of postTextReplacementNotification to give assistive tech apps more
reliable context for responding to changes in web content selection. Also block posting
selection changes on password fields.
* UIProcess/WebEditCommandProxy.cpp:
(WebKit::WebEditCommandProxy::nameForEditAction):
2015-04-26 Dan Bernstein <mitz@apple.com>
<rdar://problem/20702337> REGRESSION (r182952): Plug-in service fails to load because it links against WebKit2.framework
https://bugs.webkit.org/show_bug.cgi?id=144233
Reviewed by Simon Fraser.
Have the plug-in service link against WebKit.framework rather than WebKit2.framework.
* Configurations/PluginService.32.xcconfig: Removed linker flags for linking against WebKit2
and Foundation from the definition of OTHER_LDFLAGS. Since linking is no longer conditional,
we can just do it in the targets Link Binary With Libraries build phase.
* Configurations/PluginService.64.xcconfig: Ditto.
* WebKit2.xcodeproj/project.pbxproj: Have Foundation and WebKit listed in the services Link
Binariy With Libraries build phases (one service already had WebKit).
2015-04-26 Dan Bernstein <mitz@apple.com>
Fixed the build.
* UIProcess/ios/forms/WKFileUploadPanel.mm:
(-[WKFileUploadPanel _showDocumentPickerMenu]): Suppressed deprecation warnings around use
of -[UIDocumentMenuViewController _setIgnoreApplicationEntitlementForImport:].
2015-04-25 Tim Horton <timothy_horton@apple.com>
Further update gesture swipe shadow style
https://bugs.webkit.org/show_bug.cgi?id=144215
<rdar://problem/19295843>
Reviewed by Dan Bernstein.
* Resources/mac/SwipeShadow.png: Removed.
* Resources/mac/SwipeShadow@2x.png: Removed.
* UIProcess/mac/ViewGestureController.h:
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
* WebKit2.xcodeproj/project.pbxproj:
Use a CAGradientLayer instead of PNGs for the swipe shadow.
2015-04-25 Dan Bernstein <mitz@apple.com>
WebKit2 part of <rdar://problem/20697966> Avoid using TBD as an argument to NS_AVAILABLE
https://bugs.webkit.org/show_bug.cgi?id=144201
Reviewed by Darin Adler.
Instead of TBD, we use the high version number to which it corresponds in CFAvailability.h,
9876.5.
* mac/MigrateHeadersFromWebKitLegacy.make: To detect not-yet-available declarations in
headers, look for "9876_5" rather than "TBA".
2015-04-24 Timothy Hatcher <timothy@apple.com>
Web Inspector: Remove native window dock controls
https://bugs.webkit.org/show_bug.cgi?id=144184
Reviewed by Joseph Pecoraro.
* Resources/DockBottom.pdf: Removed.
* Resources/DockBottomLegacy.pdf: Removed.
* Resources/DockRight.pdf: Removed.
* Resources/DockRightLegacy.pdf: Removed.
* UIProcess/WebInspectorProxy.h:
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::createInspectorWindow):
(WebKit::WebInspectorProxy::platformAttachAvailabilityChanged):
* WebKit2.xcodeproj/project.pbxproj:
2015-04-25 Martin Robinson <mrobinson@igalia.com>
Rename ENABLE_3D_RENDERING to ENABLE_3D_TRANSFORMS
https://bugs.webkit.org/show_bug.cgi?id=144182
Reviewed by Simon Fraser.
* Configurations/FeatureDefines.xcconfig: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
2015-04-24 Simon Fraser <simon.fraser@apple.com>
Have the web inspector report accurate memory use for layers with detached backing store
https://bugs.webkit.org/show_bug.cgi?id=144179
Reviewed by Dean Jackson.
Remote layers can make their backing store volatile, so the backing only contributes
to reported memory use when attached.
* WebProcess/WebPage/mac/PlatformCALayerRemote.h:
2015-04-24 Andreas Kling <akling@apple.com>
theverge.com burning 100% CPU on iPad (due to window.screenX/Y)
<https://webkit.org/b/144175>
<rdar://problem/20694585>
Reviewed by Anders Carlsson.
Return an empty window rect on iOS WK2 builds. This avoids sending a synchronous
IPC request to the UI process that would give the same result, but spend way
more time and CPU cycles to do so.
With this change, theverge.com CPU usage goes from 100% to ~20% when idle.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::windowRect):
2015-04-24 Brent Fulgham <bfulgham@apple.com>
TextIndicator for embedded PDFs is slightly offset
https://bugs.webkit.org/show_bug.cgi?id=144172
<rdar://problem/20691304>
Reviewed by Tim Horton.
When I converted the existing DOM Range logic to work with PDFSelections, I omitted the
step where the font ascent was used to adjust the origin used for the TextIndicator. This
patch determines the correct ascent for the range of characters in the selection, and
adjusts the offset by the difference between the ascent and the height of the selection rect.
Also, since the PDFSelection only supplies the bounding rect for the selection, I calculate
an equivalent text bounding box by insetting the rect by half the size of the ascent.
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::scaleFactor): Add accessor for PDF scale factor.
* WebProcess/Plugins/PDF/PDFPlugin.h:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::dictionaryPopupInfoForPDFSelectionInPluginView): Adjusted to take the
font ascent and scale factor into account.
2015-04-24 David Kilzer <ddkilzer@apple.com>
REGRESSION (r183293): Fix iOS EWS build by adding SPI declaration for +[UIPeripheralHost visiblePeripheralFrame]
Fixes the following build failures:
WebKit2/UIProcess/ios/WKPDFView.mm:740:45: error: class method '+visiblePeripheralFrame' not found (return type defaults to 'id') [-Werror,-Wobjc-method-access]
CGRect keyboardRect = [UIPeripheralHost visiblePeripheralFrame];
^~~~~~~~~~~~~~~~~~~~~~
WebKit2/UIProcess/ios/WKPDFView.mm:740:12: error: no viable conversion from 'id' to 'CGRect'
CGRect keyboardRect = [UIPeripheralHost visiblePeripheralFrame];
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Platform/spi/ios/UIKitSPI.h:
(+[UIPeripheralHost visiblePeripheralFrame]): Add declaration.
2015-04-24 Anders Carlsson <andersca@apple.com>
Change _WKWebsiteDataStore to hold on to an internal WKWebsiteDataStore
https://bugs.webkit.org/show_bug.cgi?id=144171
Reviewed by Tim Horton.
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration _websiteDataStore]):
(-[WKWebViewConfiguration _setWebsiteDataStore:]):
* UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
* UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
(-[_WKWebsiteDataStore initWithDataStore:]):
(+[_WKWebsiteDataStore defaultDataStore]):
(+[_WKWebsiteDataStore nonPersistentDataStore]):
(-[_WKWebsiteDataStore isNonPersistent]):
(-[_WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
(-[_WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
(-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
* UIProcess/API/Cocoa/_WKWebsiteDataStoreInternal.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataStore.h.
* WebKit2.xcodeproj/project.pbxproj:
2015-04-24 Tim Horton <timothy_horton@apple.com>
WKPDFView does not support password-protected PDFs
https://bugs.webkit.org/show_bug.cgi?id=144162
<rdar://problem/18411512>
Reviewed by Andy Estes.
* Platform/spi/ios/UIKitSPI.h:
Add some SPI.
* UIProcess/ios/WKPDFView.h:
* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView _didLoadPDFDocument]):
(-[WKPDFView web_setContentProviderData:suggestedFilename:]):
Move creation of the UIPDFDocument (only possible if the CGPDFDocument is unlocked)
and initial setup of the page views out into _didLoadPDFDocument.
If the CGPDFDocument is locked, we'll show some UI to unlock it; otherwise
we'll continue on to _didLoadPDFDocument as previously.
(-[WKPDFView web_setMinimumSize:]):
Resize the password UI instead of the PDF pages if we have it.
(-[WKPDFView _computePageAndDocumentFrames]):
Don't bother doing any work revalidating PDF pages if the document is locked.
(-[WKPDFView _updatePasswordEntryField]):
Make sure that the UIDocumentPassword view is always the size of the scrollview.
This takes care of rotation.
(-[WKPDFView _keyboardDidShow:]):
Make sure that we scroll the password field around, if necessary, to keep it
on screen when editing begins.
(-[WKPDFView _showPasswordEntryField]):
(-[WKPDFView _hidePasswordEntryField]):
Adjust the background color (to match the UIDocumentPasswordView) and disable zooming
while it's up. The UIDocumentPassword view is installed into the scroll view
to match UIWebView behavior.
(-[WKPDFView userDidEnterPassword:forPasswordView:]):
(-[WKPDFView didBeginEditingPassword:inView:]):
(-[WKPDFView didEndEditingPassword:inView:]):
(-[WKPDFView _didFailToUnlock]):
Pop up a dialog informing the user that they entered the wrong password.
(-[WKPDFView _tryToUnlockWithPassword:]):
Try to unlock the document. If it succeeds, hide the unlock UI and go back to
_didLoadPDFDocument.
2015-04-24 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r183266.
https://bugs.webkit.org/show_bug.cgi?id=144164
Broke 32-bit build and a test. (Requested by ap on #webkit).
Reverted changeset:
"AX: richer text change notifications (142719)"
https://bugs.webkit.org/show_bug.cgi?id=142719
http://trac.webkit.org/changeset/183266
2015-04-24 Brent Fulgham <bfulgham@apple.com>
REGRESSION: WebKit2.ActionMenusTest API test fails
https://bugs.webkit.org/show_bug.cgi?id=144149
<rdar://problem/20677770>
Reviewed by Tim Horton.
Tested by TestWebKitAPI
The 'lookupTextAtLocation' method was not converting the NSEvent coordinates it
was receiving from root view to the plugin view. Consequently, full page PDFs
did hit testing correctly, but an <embed> PDF would not.
Since 'existingSelectionContainsPoint' is exposed as API, I also modified it to
expect 'root view' coordinates and perform the requisite conversions, rather
than expecting 'plugin view' coordinates.
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::existingSelectionContainsPoint): Expect 'root view' coordinates
for the input.
(WebKit::PDFPlugin::lookupTextAtLocation): Properly convert the passed 'root view'
coordinates to the PDF's view coordinate space.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performActionMenuHitTestAtLocation): Pass hit point using view coordinates,
not content coordinates.
2015-04-24 Anders Carlsson <andersca@apple.com>
Address a review comment from Joe Pecoraro.
* UIProcess/API/Cocoa/WKWebsiteDataStore.h:
2015-04-24 Anders Carlsson <andersca@apple.com>
Rename -[WKWebsiteDataStore isNonPersistent] to -[WKWebsiteDataStore isPersistent]
https://bugs.webkit.org/show_bug.cgi?id=144158
Reviewed by Beth Dakin.
* UIProcess/API/APIWebsiteDataStore.cpp:
(API::WebsiteDataStore::isPersistent):
(API::WebsiteDataStore::isNonPersistent): Deleted.
* UIProcess/API/APIWebsiteDataStore.h:
* UIProcess/API/Cocoa/WKWebsiteDataStore.h:
* UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
(-[WKWebsiteDataStore isPersistent]):
(-[WKWebsiteDataStore isNonPersistent]): Deleted.
* UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
* UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
(-[_WKWebsiteDataStore isNonPersistent]):
* UIProcess/WebsiteData/WebsiteDataStore.h:
2015-04-24 Brent Fulgham <bfulgham@apple.com>
Immediate action not functional for embedded PDFs
https://bugs.webkit.org/show_bug.cgi?id=143952
<rdar://problem/19842365>
Reviewed by Tim Horton.
Add a new method to retrieve appropriate dictionary lookup content and update the
hit test result with relevant dictionary content and the bounding rect of the
selection.
* WebProcess/Plugins/Netscape/NetscapePlugin.h: Add stub.
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp: Initialize plugin type.
* WebProcess/Plugins/PDF/PDFPlugin.h:
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::rectInWindowSpaceForRectInLayoutSpace): New helper function to
convert PDF 'in page' units to the equivalent view units.
(WebKit::PDFPlugin::PDFPlugin): Initialize plugin type.
(WebKit::PDFPlugin::viewRectForSelection): Query a provided PDFSelection for
its bounding rect and return the result in view units.
* WebProcess/Plugins/Plugin.h:
* WebProcess/Plugins/PluginProxy.cpp: Initialize plugin type.
* WebProcess/Plugins/PluginProxy.h: Add stub.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::viewRectForSelection): Added.
* WebProcess/Plugins/PluginView.h:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::dictionaryPopupInfoForPDFSelectionInPluginView): Added.
(WebKit::textIndicatorTransitionForActionMenu): Added helper function.
(WebKit::WebPage::performActionMenuHitTestAtLocation): Update the hit test information
with relevant dictionary lookup content, and mark the result as a text node (if
appropriate).
2015-04-24 Jer Noble <jer.noble@apple.com>
[WK2] Only issue a isPlayingAudioDidChange() notification if the audio playing state actually changed.
https://bugs.webkit.org/show_bug.cgi?id=144153
Reviewed by Alexey Proskuryakov.
Check the old state vs. the new state and only issue the change notification if the IsPlayingAudio state changed.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::isPlayingMediaDidChange):
2015-04-24 Antti Koivisto <antti@apple.com>
CrashTracer: [USER] com.apple.WebKit.Networking at com.apple.WebKit: WebKit::NetworkResourceLoader::~NetworkResourceLoader + 14
https://bugs.webkit.org/show_bug.cgi?id=144147
Reviewed by Chris Dumez.
Storage::storeBodyAsBlob copies the std::function callback for handling mapped bodies in a thread.
This is thread safe only if the function copy is thread safe. It is currently not as we are capturing
RefPtr<NetworkResourceLoader> and NetworkResourceLoader doesn't use thread safe refcounting.
Fix by avoiding copying of the callback. Use same apporach for WriteOperation as we already use for
ReadOperation: count the active operations in progress and delete WriteOperation when everything is
finished. This way we don't need to copy the function out from WriteOperation.
* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::Storage::ReadOperation::ReadOperation):
(WebKit::NetworkCache::Storage::WriteOperation::WriteOperation):
Move definition here from the header.
(WebKit::NetworkCache::Storage::~Storage):
(WebKit::NetworkCache::Storage::storeBodyAsBlob):
Increment the operation count when storing a blob, call finishWriteOperation when done.
(WebKit::NetworkCache::Storage::dispatchReadOperation):
(WebKit::NetworkCache::Storage::finishReadOperation):
Count active operations instead of finished operations. This makes the code clearer.
(WebKit::NetworkCache::Storage::dispatchWriteOperation):
(WebKit::NetworkCache::Storage::finishWriteOperation):
Mirror the way ReadOperations work.
* NetworkProcess/cache/NetworkCacheStorage.h:
(WebKit::NetworkCache::Storage::ReadOperation::ReadOperation): Deleted.
2015-04-24 Timothy Hatcher <timothy@apple.com>
REGRESSION: Web Inspector: Start Timeline Recording in Develop menu broken
https://bugs.webkit.org/show_bug.cgi?id=144150
Reviewed by Brian Burg.
* WebProcess/WebPage/WebInspectorUI.cpp:
(WebKit::WebInspectorUI::evaluateCommandOnLoad): Properly treat bools as literals
instead of strings by not using the string version of evaluateCommandOnLoad.
2015-04-23 Anders Carlsson <andersca@apple.com>
Add headerdocs for WKWebsiteDataRecord and WKWebsiteDataStore
https://bugs.webkit.org/show_bug.cgi?id=144138
Reviewed by Darin Adler.
* UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
* UIProcess/API/Cocoa/WKWebsiteDataStore.h:
* UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
(-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
(-[WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
(-[WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
2015-04-24 Doug Russell <d_russell@apple.com>
AX: richer text change notifications (142719)
https://bugs.webkit.org/show_bug.cgi?id=142719
Reviewed by Darin Adler.
Richer accessibility value change notifications. Introduce AXTextEditType, postTextStateChangeNotification and postTextReplacementNotification to give assistive tech apps more reliable context for responding to changes in web content. Also implement a mechanism to post value changes in password form fields in coalesced ticks to thwart analyzing the cadence of changes.
Richer accessibility selection change notifications. Introduce AXTextStateChangeIntent, and an overload of postTextReplacementNotification to give assistive tech apps more reliable context for responding to changes in web content selection. Also block posting selection changes on password fields.
* UIProcess/WebEditCommandProxy.cpp:
(WebKit::WebEditCommandProxy::nameForEditAction):
2015-04-24 Darin Adler <darin@apple.com>
Convert OwnPtr and PassOwnPtr uses to std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=128007
Reviewed by Anders Carlsson.
* NetworkProcess/cache/NetworkCacheEncoder.h: Added an include now
needed that was inherited from OwnPtr.h before.
2015-04-24 Antti Koivisto <antti@apple.com>
Network Cache: Make path functions members
https://bugs.webkit.org/show_bug.cgi?id=144146
Reviewed by Carlos Garcia Campos.
This simplifies the code.
* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::Storage::partitionPathForKey):
(WebKit::NetworkCache::Storage::recordPathForKey):
(WebKit::NetworkCache::Storage::bodyPathForKey):
(WebKit::NetworkCache::Storage::storeBodyAsBlob):
(WebKit::NetworkCache::Storage::remove):
(WebKit::NetworkCache::Storage::dispatchReadOperation):
(WebKit::NetworkCache::Storage::finishReadOperation):
(WebKit::NetworkCache::Storage::dispatchWriteOperation):
(WebKit::NetworkCache::partitionPathForKey): Deleted.
(WebKit::NetworkCache::recordPathForKey): Deleted.
(WebKit::NetworkCache::bodyPathForKey): Deleted.
* NetworkProcess/cache/NetworkCacheStorage.h:
2015-04-24 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Remove incorrect assert after r183189.
In this case the assert was already there, but it's incorrect
because we are handling uninitialized attachments below in the
same function, and also when sending messages. So, if it's ok to
send uninitialized attachments, it's ok to receive them. This
didn't fail before r183189, because we were only invaliding the
attachments by setting the file descriptor to -1, and they were
handled as null attachments. After r183189, the move operator
resets the moved attachment leaving it uninitialized again.
* Platform/IPC/unix/ConnectionUnix.cpp:
(IPC::Connection::processMessage):
2015-04-24 Carlos Garcia Campos <cgarcia@igalia.com>
[SOUP] Use a webkit subdirectory for the disk cache
https://bugs.webkit.org/show_bug.cgi?id=144048
Reviewed by Martin Robinson.
Recent versions of libsoup remove any file in cache dir not
referenced by the index when the cache is loaded to workaround
leaked resources when load/dump is unbalanced for whatever reason,
like a crash. We currently use $XDG_CACHE_HOME/app-name as default
disk cache directory, but that directory could be used by apps to
cache other things, and the soup cache might end up deleting other
stuff. The soup cache assumes the given directory is only for the
disk cache, so we should ensure that.
* NetworkProcess/soup/NetworkProcessSoup.cpp:
(WebKit::NetworkProcess::platformInitializeNetworkProcess): Append
webkit to the given disk cache and clear the previous soup cache if it exists.
* WebProcess/soup/WebProcessSoup.cpp:
(WebKit::WebProcess::platformInitializeWebProcess): Ditto.
2015-04-24 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Remove incorrect ASSERT added in r183176.
We allow to encode null attachments.
* Platform/unix/SharedMemoryUnix.cpp:
(WebKit::SharedMemory::Handle::releaseAttachment):
2015-04-23 Dan Bernstein <mitz@apple.com>
<rdar://problem/20680694> Framework header postprocessing isnt removing WK_DEPRECATED macros when it should.
Reviewed by Andy Estes.
* mac/postprocess-framework-headers.sh:
2015-04-23 Simon Fraser <simon.fraser@apple.com>
Make it possible to detach GraphicsLayerCA backing store
https://bugs.webkit.org/show_bug.cgi?id=144140
Reviewed by Tim Horton.
This changes makes it possible to denote a GraphicsLayerCA's backing store
as "attached" or not. When not attached, the backing store is made volatile
and can be purged. This will be used in a future patch.
* Shared/mac/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::~RemoteLayerBackingStore): Whitespace.
(WebKit::RemoteLayerBackingStore::display): If backingStoreWillBeDisplayed()
returns true, this indicates that the backing store was brought out of the
"unreachable" list, so return true even if the backing store doesn't require
painting.
* Shared/mac/RemoteLayerBackingStoreCollection.h: C++11 initializer, and comments.
* Shared/mac/RemoteLayerBackingStoreCollection.mm:
(WebKit::RemoteLayerBackingStoreCollection::RemoteLayerBackingStoreCollection):
(WebKit::RemoteLayerBackingStoreCollection::backingStoreWillBeDisplayed): Return true
if the caller will need to submit the backing store in the current transaction.
(WebKit::RemoteLayerBackingStoreCollection::backingStoreBecameUnreachable): This
explicit dirtying is no longer necessary given the backingStoreWillBeDisplayed() change.
* Shared/mac/RemoteLayerTreePropertyApplier.mm:
(WebKit::applyPropertiesToLayer): Only set the layer's backing if we both have backing
store, and it's attached.
* Shared/mac/RemoteLayerTreeTransaction.h: New bit, and data member.
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
(WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
(WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
(WebKit::dumpChangedLayers):
* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::recursiveBuildTransaction): Only call display()
on the backing store if it's attached.
(WebKit::PlatformCALayerRemote::setBackingStoreAttached):
(WebKit::PlatformCALayerRemote::backingStoreAttached):
* WebProcess/WebPage/mac/PlatformCALayerRemote.h:
* WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
* WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
(WebKit::RemoteLayerTreeContext::backingStoreWillBeDisplayed):
2015-04-23 Tim Horton <timothy_horton@apple.com>
Quick Look preview popover is not dismissed on scroll in Mail
https://bugs.webkit.org/show_bug.cgi?id=144119
<rdar://problem/19752045>
Reviewed by Anders Carlsson.
* UIProcess/API/mac/WKView.mm:
(-[WKView renewGState]):
If we have a TextIndicator, dismiss all content relative child windows
on renewGState, not just the TextIndicator itself.
This will fix cases like Mail, where WebKit isn't driving the scrolling,
and we have no way (except renewGState) to know that scrolling is happening.
2015-04-23 Simon Fraser <simon.fraser@apple.com>
Changing TiledBacking velocity should schedule a tile revalidation
https://bugs.webkit.org/show_bug.cgi?id=144123
Reviewed by Tim Horton.
Drive-by fix: use the FrameView& that we have already.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::updateVisibleContentRects):
2015-04-23 Jer Noble <jer.noble@apple.com>
[Mac] Disable QTKit by default on future OS X.
https://bugs.webkit.org/show_bug.cgi?id=144082
Reviewed by Darin Adler.
QTKitEnabled defaults to false.
* Shared/WebPreferencesDefinitions.h:
2015-04-23 Jer Noble <jer.noble@apple.com>
[WK2][Mac] Tweak the timing curve of the WebKit Fullscreen animation
https://bugs.webkit.org/show_bug.cgi?id=144120
Reviewed by Eric Carlson.
Tweak the curve to ease-in faster when the fullscreen animation duration is short.
* UIProcess/mac/WKFullScreenWindowController.mm:
(timingFunctionForDuration):
(zoomAnimation):
(maskAnimation):
(fadeAnimation):
2015-04-23 Enrica Casucci <enrica@apple.com>
iOS build fix after r183208.
Unreviewed.
* UIProcess/ios/WKContentViewInteraction.mm:
2015-04-22 Alexey Proskuryakov <ap@apple.com>
[iOS] WebKit services should inherit environment variables for home
https://bugs.webkit.org/show_bug.cgi?id=144078
rdar://problem/20571678
Reviewed by Dan Bernstein.
Pass current environment variables as XPC bootstrap. Also while at it, made
_CFBundleSetupXPCBootstrap not soft linked.
* Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:
(main):
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::connectToService):
2015-04-23 Enrica Casucci <enrica@apple.com>
Support share button.
https://bugs.webkit.org/show_bug.cgi?id=144077
rdar://problem/19772892
Reviewed by Darin Adler.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _share:]):
(-[WKContentView canPerformAction:withSender:]):
(-[WKContentView _define:]):
(-[WKContentView accessibilityRetrieveSpeakSelectionContent]):
(-[WKContentView moveByOffset:]):
(-[WKContentView requestAutocorrectionRectsForString:withCompletionHandler:]):
(-[WKContentView applyAutocorrection:toString:withCompletionHandler:]):
(-[WKContentView requestAutocorrectionContextWithCompletionHandler:]):
(-[WKContentView accessoryTab:]):
(-[WKContentView _becomeFirstResponderWithSelectionMovingForward:completionHandler:]):
(-[WKContentView executeEditCommandWithCallback:]):
2015-04-23 Carlos Garcia Campos <cgarcia@igalia.com>
[UNIX] Do not allow copies of IPC::Attachment
https://bugs.webkit.org/show_bug.cgi?id=144096
Reviewed by Darin Adler.
It ensures that the file descriptor ownership is always correctly
transferred. This way we can remove the dispose() method to
explicitly close the file descriptor and always close it in the
Attachment destructor (unless explicitly transferred to
IPC::Connection or SharedMemory). It simplifies the code and
ensure we don't leak file descriptors.
* Platform/IPC/ArgumentDecoder.cpp:
(IPC::ArgumentDecoder::~ArgumentDecoder): Remove the code to
explicitly dispose attachments.
(IPC::ArgumentDecoder::removeAttachment): Use WTF::move().
* Platform/IPC/ArgumentEncoder.cpp:
(IPC::ArgumentEncoder::~ArgumentEncoder): Remove the code to
explicitly dispose attachments.
(IPC::ArgumentEncoder::addAttachment): Use WTF::move().
(IPC::ArgumentEncoder::releaseAttachments): Simplify by using WTF::move().
* Platform/IPC/ArgumentEncoder.h:
* Platform/IPC/Attachment.cpp:
(IPC::Attachment::encode): Move a copy of the attachment, and
reset the file descriptor, since the ownership is passed to the encoder.
* Platform/IPC/Attachment.h: Make copy constructor and assignment
private to not allow public copies. The only copy allowed is done
by Attachment::encode(). Make m_fileDescriptor mutable so that we
can reset it in Attachment::encode() after passing the ownership
to the encoder.
* Platform/IPC/unix/AttachmentUnix.cpp:
(IPC::Attachment::~Attachment): Close the file descriptor if it
hasn't been released explicitly.
(IPC::Attachment::dispose): Deleted.
* Platform/IPC/unix/ConnectionUnix.cpp:
(IPC::Connection::processMessage): Do not use AttachmentResourceGuard.
(IPC::Connection::sendOutgoingMessage): Ditto.
(IPC::AttachmentResourceGuard::AttachmentResourceGuard): Deleted.
(IPC::AttachmentResourceGuard::~AttachmentResourceGuard): Deleted.
* Platform/unix/SharedMemoryUnix.cpp:
(WebKit::SharedMemory::Handle::~Handle): Do not call clear().
(WebKit::SharedMemory::Handle::clear): Reset the attachment.
* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::createInspectorPage): Use WTF::move().
* WebProcess/Plugins/PluginProcessConnectionManager.cpp:
(WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
Call releaseFileDescriptor() instead of fileDescritpro() since the
ownership is passed to the connection.
2015-04-23 Alexey Proskuryakov <ap@apple.com>
Build fix.
* WebProcess/cocoa/WebProcessCocoa.mm: Correct the case of an include file name.
2015-04-23 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix debug build after r183176.
* Platform/unix/SharedMemoryUnix.cpp:
(WebKit::SharedMemory::Handle::decode):
(WebKit::SharedMemory::createHandle):
2015-04-23 Andreas Kling <akling@apple.com>
There should only be one way to get the system memory size.
<https://webkit.org/b/144081>
Reviewed by Antti Koivisto.
* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::platformSetCacheModel):
(WebKit::memorySize): Deleted.
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformSetCacheModel):
(WebKit::memorySize): Deleted.
2015-04-23 Chris Dumez <cdumez@apple.com>
[WK2] WebDiagnosticLoggingClient is leaking
https://bugs.webkit.org/show_bug.cgi?id=144089
<rdar://problem/19706214>
Reviewed by Darin Adler.
WebDiagnosticLoggingClient is leaking. It is constructed inside WebPage
constructor but there is no code destroying it.
This patch adds a new xxxDestroyed() virtual function to
DiagnosticLoggingClient and that is overriden in
WebDiagnosticLoggingClient to call "delete this". This is the same
pattern as for other WK2 clients (e.g. WebFrameLoaderClient,
WebProgressTrackerClient).
* WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
(WebKit::WebDiagnosticLoggingClient::mainFrameDestroyed):
* WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.h:
2015-04-23 Carlos Garcia Campos <cgarcia@igalia.com>
[UNIX] Simplify the file descriptor handling in SharedMemory
https://bugs.webkit.org/show_bug.cgi?id=144046
Reviewed by Darin Adler.
Simplify the file descriptor handling and clarify its ownership by
using IPC::Attachment in SharedMemory::Handle instead of fd and
size members. SharedMemory::Handle::adoptFromAttachment() has been
renamed as SharedMemory::Handle::adoptAttachment() and receives an
IPC::Attachment. And SharedMemory::Handle::releaseToAttachment()
has been renamed as SharedMemory::Handle::releaseAttachment().
* Platform/IPC/Attachment.h: Add move constructor and move assigned operator.
* Platform/IPC/Connection.h:
(IPC::Connection::identifierIsNull): A file descriptor is null
when it's -1 no 0.
* Platform/IPC/unix/AttachmentUnix.cpp:
(IPC::Attachment::Attachment):
(IPC::Attachment::operator=):
(IPC::Attachment::dispose): Reset the file descriptor after
closing it.
* Platform/IPC/unix/ConnectionUnix.cpp:
(IPC::Connection::processMessage): Use
SharedMemory::Handle::adoptAttachment() that receives an
IPC::Attachment now.
(IPC::Connection::sendOutgoingMessage): Use
SharedMemory::Handle::releaseAttachment().
* Platform/SharedMemory.h:
* Platform/unix/SharedMemoryUnix.cpp:
(WebKit::SharedMemory::Handle::Handle): Remove initializers for
file descriptor and size members.
(WebKit::SharedMemory::Handle::clear): Dispose the attachment.
(WebKit::SharedMemory::Handle::isNull): Handle is null if the
attachment file descriptor is -1.
(WebKit::SharedMemory::Handle::encode): Use releaseAttachment().
(WebKit::SharedMemory::Handle::decode): Use adoptAttachment().
(WebKit::SharedMemory::Handle::releaseAttachment): Implement it
using move.
(WebKit::SharedMemory::Handle::adoptAttachment): Ditto.
(WebKit::SharedMemory::map): Use
IPC::Attachment::releaseFileDescriptor() instead of manually
changing the member.
(WebKit::SharedMemory::createHandle): Initialize the handle
attachment with the duplicated file descriptor and size.
2015-04-22 Darin Adler <darin@apple.com>
Remove OwnPtr and PassOwnPtr use from WebKit/cf, WebKit/mac, and WebKit2
https://bugs.webkit.org/show_bug.cgi?id=143943
Reviewed by Anders Carlsson.
* WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
Removed unneeded include.
2015-04-22 Brent Fulgham <bfulgham@apple.com>
VisibleSelection should only accept Range by reference
https://bugs.webkit.org/show_bug.cgi?id=144047
Reviewed by Tim Horton.
Update all uses of VisibleSelection to pass a Range reference instead
of a Range pointer.
* WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
(WebKit::InjectedBundleRangeHandle::renderedImage):
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::getImageForFindMatch):
(WebKit::FindController::selectFindMatch):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::insertTextAsync):
(WebKit::WebPage::setCompositionAsync):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::insertDictatedTextAsync):
2015-04-22 Anders Carlsson <andersca@apple.com>
Add WK_ARRAY and WK_SET annotations
https://bugs.webkit.org/show_bug.cgi?id=144075
rdar://problem/19417770
Reviewed by Dan Bernstein.
* Shared/API/Cocoa/WKFoundation.h:
* UIProcess/API/Cocoa/WKBackForwardList.h:
* UIProcess/API/Cocoa/WKUserContentController.h:
* UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
* UIProcess/API/Cocoa/WKWebsiteDataStore.h:
* mac/postprocess-framework-headers.sh:
2015-04-22 Brent Fulgham <bfulgham@apple.com>
Unreviewed build fix after r183136.
* WebProcess/WebPage/mac/WebPageMac.mm: Correct capitalization of
'HTMLPluginImageElement.h' -> 'HTMLPlugInImageElement.h'
2015-04-21 Brent Fulgham <bfulgham@apple.com>
Extend action menus to support PDF
https://bugs.webkit.org/show_bug.cgi?id=143895
<rdar://problem/19003333>
Reviewed by Tim Horton.
If the mouse pointer is over a PDF, try to provide a relevant action menu for whatever
content is under the mouse. For now, we only support copying text and handling URLs.
If no text is selected, use the dictionary lookup service to find a semantically appropriate
selection underneath the mouse. This is consistent with how normal text is treated in pure HTML
views. If some text is already selected, and the mouse is over the existing selection, continue
using the selected text. Otherwise, discard the old selection and select the most appropriate
region under the mouse pointer.
* Shared/API/c/WKActionMenuTypes.h: Add PDF menu option.
* Shared/WebMouseEvent.cpp: Recognize mouse force events as valid mouse events.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _defaultMenuItemsForPDF]): Add simply copy text option.
(-[WKActionMenuController _defaultMenuItems]): Recognize PDFs and add relevant action
menu entries.
* WebProcess/Plugins/Netscape/NetscapePlugin.h: Provide stub for new method.
* WebProcess/Plugins/PDF/PDFLayerControllerDetails.h: Expose 'rectsForSelectionInLayerSpace',
'rectsForAnnotationInLayoutSpace', 'layout', and 'currentPage'.
* WebProcess/Plugins/PDF/PDFPlugin.h:
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::getSelectionForWordAtPoint): Added.
(WebKit::PDFPlugin::existingSelectionContainsPoint): Added.
(WebKit::PDFPlugin::lookupTextAtLocation): Added.
* WebProcess/Plugins/Plugin.h: Add declaration for new 'getSelectionForWordAtPoint' method.
* WebProcess/Plugins/PluginProxy.h: Provide stub for new method.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::getSelectionForWordAtPoint): Added.
(WebKit::PluginView::existingSelectionContainsPoint): Added.
(WebKit::PluginView::lookupTextAtLocation): Added.
* WebProcess/Plugins/PluginView.h:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performActionMenuHitTestAtLocation): Update to support PDF documents and retrieve
relevant content to support later action menu handling.
2015-04-22 Eric Carlson <eric.carlson@apple.com>
Update AirPlay sandbox rules
https://bugs.webkit.org/show_bug.cgi?id=144062
<rdar://problem/19869448>
Reviewed by Alexey Proskuryakov.
* WebProcess/com.apple.WebProcess.sb.in: Remove obsolete rules.
2015-04-22 Alexey Proskuryakov <ap@apple.com>
[Mac] In nightlies and local builds, WebKit services can get terminated under memory pressure
https://bugs.webkit.org/show_bug.cgi?id=144052
rdar://problem/19754404
Reviewed by Darin Adler.
* Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
(main): Make XPC transaction tracking work again after a re-exec.
2015-04-22 Zan Dobersek <zdobersek@igalia.com>
[WK2] Have API::Array creation methods return Ref<>
https://bugs.webkit.org/show_bug.cgi?id=143933
Reviewed by Darin Adler.
API::Array::create() and API::Array::createStringArray() should return Ref<> objects
as the return values are never null. It's up to the caller to implicitly convert the
returned objects to RefPtr<> if so required. All the call-sites have been updated to
reflect that.
* Shared/API/APIArray.cpp:
(API::Array::create):
(API::Array::createStringArray):
(API::Array::copy):
* Shared/API/APIArray.h:
* Shared/API/APIDictionary.cpp:
(API::Dictionary::keys):
* Shared/API/APIDictionary.h:
* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(ensureObjectStream):
* Shared/API/c/WKArray.cpp:
(WKArrayCreate):
(WKArrayCreateAdoptingValues):
* Shared/API/c/WKContextMenuItem.cpp:
(WKContextMenuCopySubmenuItems):
* Shared/API/c/WKDictionary.cpp:
(WKDictionaryCopyKeys):
* Shared/API/c/WKMutableArray.cpp:
(WKMutableArrayCreate):
* Shared/Cocoa/WKNSDictionary.mm:
(-[WKNSDictionary keyEnumerator]):
* Shared/SecurityOriginData.cpp:
(WebKit::performAPICallbackWithSecurityOriginDataVector):
* Shared/WebContextMenuItem.cpp:
(WebKit::WebContextMenuItem::submenuItemsAsAPIArray):
* Shared/WebContextMenuItem.h:
* Shared/WebOpenPanelParameters.cpp:
(WebKit::WebOpenPanelParameters::acceptMIMETypes):
(WebKit::WebOpenPanelParameters::selectedFileNames):
* Shared/WebOpenPanelParameters.h:
* UIProcess/API/C/WKBackForwardListRef.cpp:
(WKBackForwardListCopyBackListWithLimit):
(WKBackForwardListCopyForwardListWithLimit):
* UIProcess/API/C/WKGrammarDetail.cpp:
(WKGrammarDetailCopyGuesses):
* UIProcess/API/C/WKOpenPanelParameters.cpp:
(WKOpenPanelParametersCopyAcceptedMIMETypes):
(WKOpenPanelParametersCopySelectedFileNames):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageContextMenuClient):
(WKPageCopyRelatedPages):
* UIProcess/API/Cocoa/WKBackForwardList.mm:
(-[WKBackForwardList backList]):
(-[WKBackForwardList forwardList]):
* UIProcess/API/Cocoa/WKBrowsingContextGroup.mm:
(createWKArray):
* UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
(-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
* UIProcess/API/gtk/WebKitBackForwardList.cpp:
(webkit_back_forward_list_get_back_list_with_limit):
(webkit_back_forward_list_get_forward_list_with_limit):
* UIProcess/API/gtk/WebKitFileChooserRequest.cpp:
(webkit_file_chooser_request_get_mime_types):
(webkit_file_chooser_request_get_mime_types_filter):
(webkit_file_chooser_request_select_files):
* UIProcess/API/gtk/WebKitNotificationProvider.cpp:
(WebKitNotificationProvider::notificationCloseCallback):
* UIProcess/Notifications/WebNotificationManagerProxy.cpp:
(WebKit::WebNotificationManagerProxy::populateCopyOfNotificationPermissions):
* UIProcess/Notifications/WebNotificationProvider.cpp:
(WebKit::WebNotificationProvider::clearNotifications):
* UIProcess/Plugins/WebPluginSiteDataManager.cpp:
(WebKit::WebPluginSiteDataManager::didGetSitesWithData):
* UIProcess/StatisticsRequest.cpp:
(WebKit::StatisticsRequest::completedRequest):
* UIProcess/UserContent/WebUserContentControllerProxy.cpp:
(WebKit::WebUserContentControllerProxy::WebUserContentControllerProxy):
* UIProcess/WebBackForwardList.cpp:
(WebKit::WebBackForwardList::backList):
(WebKit::WebBackForwardList::forwardList):
(WebKit::WebBackForwardList::backListAsAPIArrayWithLimit):
(WebKit::WebBackForwardList::forwardListAsAPIArrayWithLimit):
* UIProcess/WebBackForwardList.h:
* UIProcess/WebCookieManagerProxy.cpp:
(WebKit::WebCookieManagerProxy::didGetHostnamesWithCookies):
* UIProcess/WebDatabaseManagerProxy.cpp:
(WebKit::WebDatabaseManagerProxy::didGetDatabasesByOrigin):
(WebKit::WebDatabaseManagerProxy::didGetDatabaseOrigins):
* UIProcess/WebGrammarDetail.cpp:
(WebKit::WebGrammarDetail::guesses):
* UIProcess/WebGrammarDetail.h:
* UIProcess/WebKeyValueStorageManager.cpp:
(WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
(WebKit::WebKeyValueStorageManager::getStorageDetailsByOrigin):
* UIProcess/WebMediaCacheManagerProxy.cpp:
(WebKit::WebMediaCacheManagerProxy::didGetHostnamesWithMediaCache):
* UIProcess/WebOriginDataManagerProxy.cpp:
(WebKit::WebOriginDataManagerProxy::didGetOrigins):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didFindStringMatches):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::pluginInfoStoreDidLoadPlugins):
* UIProcess/ios/forms/WKFileUploadPanel.mm:
(-[WKFileUploadPanel _chooseFiles:displayString:iconImage:]):
(-[WKFileUploadPanel presentWithParameters:resultListener:]):
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
(-[WKWebProcessPlugInFrame childFrames]):
* WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.cpp:
(WKBundleBackForwardListItemCopyChildren):
* WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
(WKBundleFrameCopyChildFrames):
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageCopyTrackedRepaintRects):
* WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.cpp:
(WebKit::InjectedBundleBackForwardListItem::children):
* WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.h:
* WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
(WebKit::InjectedBundlePageContextMenuClient::getCustomMenuFromDefaultItems):
* WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
(WebKit::InjectedBundlePageFormClient::didAssociateFormControls):
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
(WebKit::InjectedBundlePageLoaderClient::featuresUsedInPage):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::findLargestFrameInFrameSet):
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::childFrames):
* WebProcess/WebPage/WebFrame.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::trackedRepaintRects):
* WebProcess/WebPage/WebPage.h:
2015-04-21 Eric Carlson <eric.carlson@apple.com>
[Mac] Use one playback target for all web processes
https://bugs.webkit.org/show_bug.cgi?id=144009
Reviewed by Tim Horton.
Every WebPageProxy uses the WebMediaSessionManager singleton to talk to the playback target
picker.
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::resetState):
(WebKit::WebPageProxy::isPlayingMediaDidChange):
(WebKit::WebPageProxy::addPlaybackTargetPickerClient):
(WebKit::WebPageProxy::removePlaybackTargetPickerClient):
(WebKit::WebPageProxy::showPlaybackTargetPicker):
(WebKit::WebPageProxy::playbackTargetPickerClientStateDidChange):
(WebKit::WebPageProxy::setPlaybackTarget):
(WebKit::WebPageProxy::externalOutputDeviceAvailableDidChange):
(WebKit::WebPageProxy::setShouldPlayToPlaybackTarget):
(WebKit::WebPageProxy::devicePickerProxy): Deleted.
(WebKit::WebPageProxy::startingMonitoringPlaybackTargets): Deleted.
(WebKit::WebPageProxy::stopMonitoringPlaybackTargets): Deleted.
(WebKit::WebPageProxy::didChoosePlaybackTarget): Deleted.
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::isPlayingAudio):
* UIProcess/WebPageProxy.messages.in:
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::mediaSessionManager):
(WebKit::PageClientImpl::createPlaybackTargetPicker): Deleted.
* UIProcess/mac/WebMediaSessionManagerMac.cpp: Added.
(WebKit::WebMediaSessionManagerMac::singleton):
(WebKit::WebMediaSessionManagerMac::WebMediaSessionManagerMac):
(WebKit::WebMediaSessionManagerMac::~WebMediaSessionManagerMac):
(WebKit::WebMediaSessionManagerMac::targetPicker):
* UIProcess/mac/WebMediaSessionManagerMac.h: Added.
* WebProcess/Plugins/PluginView.h:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::isPlayingMediaDidChange):
(WebKit::WebChromeClient::addPlaybackTargetPickerClient):
(WebKit::WebChromeClient::removePlaybackTargetPickerClient):
(WebKit::WebChromeClient::showPlaybackTargetPicker):
(WebKit::WebChromeClient::playbackTargetPickerClientStateDidChange):
(WebKit::WebChromeClient::startingMonitoringPlaybackTargets): Deleted.
(WebKit::WebChromeClient::stopMonitoringPlaybackTargets): Deleted.
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::dispatchAfterEnsuringUpdatedScrollPosition):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::playbackTargetSelected):
(WebKit::WebPage::playbackTargetAvailabilityDidChange):
(WebKit::WebPage::setShouldPlayToPlaybackTarget):
2015-04-21 Anders Carlsson <andersca@apple.com>
WKWebsiteDataStore doesn't track and remove IndexedDB databases
https://bugs.webkit.org/show_bug.cgi?id=144032
rdar://problem/20242856
Reviewed by Tim Horton.
* DatabaseProcess/DatabaseProcess.cpp:
(WebKit::DatabaseProcess::fetchWebsiteData):
(WebKit::DatabaseProcess::deleteWebsiteData):
(WebKit::DatabaseProcess::deleteWebsiteDataForOrigins):
* DatabaseProcess/DatabaseProcess.h:
* DatabaseProcess/DatabaseProcess.messages.in:
* Shared/WebsiteData/WebsiteDataTypes.h:
* UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
* UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
(dataTypesToString):
* UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
(WebKit::toWebsiteDataTypes):
(WebKit::toWKWebsiteDataTypes):
* UIProcess/Databases/DatabaseProcessProxy.cpp:
(WebKit::generateCallbackID):
(WebKit::DatabaseProcessProxy::~DatabaseProcessProxy):
(WebKit::DatabaseProcessProxy::fetchWebsiteData):
(WebKit::DatabaseProcessProxy::deleteWebsiteData):
(WebKit::DatabaseProcessProxy::deleteWebsiteDataForOrigins):
(WebKit::DatabaseProcessProxy::didClose):
(WebKit::DatabaseProcessProxy::didFetchWebsiteData):
(WebKit::DatabaseProcessProxy::didDeleteWebsiteData):
(WebKit::DatabaseProcessProxy::didDeleteWebsiteDataForOrigins):
* UIProcess/Databases/DatabaseProcessProxy.h:
* UIProcess/Databases/DatabaseProcessProxy.messages.in:
* UIProcess/WebProcessPool.h:
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::fetchData):
(WebKit::WebsiteDataStore::removeData):
2015-04-21 Anders Carlsson <andersca@apple.com>
Add module maps for WebKit
https://bugs.webkit.org/show_bug.cgi?id=144026
rdar://problem/19665428
Reviewed by Dan Bernstein.
* Configurations/WebKit.xcconfig:
* Modules/OSX.modulemap: Added.
* Modules/iOS.modulemap: Added.
2015-04-21 Tim Horton <timothy_horton@apple.com>
Long pause under _takeViewSnapshot when screen updates are disabled
https://bugs.webkit.org/show_bug.cgi?id=144017
<rdar://problem/20548397>
Reviewed by Simon Fraser.
* UIProcess/API/mac/WKView.mm:
(-[WKView _takeViewSnapshot]):
Use CGSHWCaptureWindowList, for snapshotting that doesn't block on
the next commit, and can succeed while screen updates are disabled
without blocking.
2015-04-21 Chris Dumez <cdumez@apple.com>
[WK2][NetworkCache] Better account of resource revalidations in efficacy logging
https://bugs.webkit.org/show_bug.cgi?id=144014
Reviewed by Antti Koivisto.
Better account of resource revalidations in efficacy logging.
Prevously, resources that were in the cache but needed revalidation
were counted as retrieval successes, which is not entirely accurate.
We now distinguish "is in the cache and is directly usable" from
"is in the cache but needs revalidation". We also log how many of these
revalidations are successful.
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::didReceiveResponseAsync):
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::update):
* NetworkProcess/cache/NetworkCache.h:
* NetworkProcess/cache/NetworkCacheStatistics.cpp:
(WebKit::NetworkCache::Statistics::recordRetrievedCachedEntry):
(WebKit::NetworkCache::Statistics::recordRevalidationSuccess):
* NetworkProcess/cache/NetworkCacheStatistics.h:
2015-04-21 Dan Bernstein <mitz@apple.com>
[Cocoa] Framework header postprocessing should respect additional definitions
https://bugs.webkit.org/show_bug.cgi?id=144018
Reviewed by Anders Carlsson.
* mac/postprocess-framework-headers.sh: Read definitons from
/usr/local/include/WebKitAdditions/Scripts/postprocess-framework-headers-definitions, and
have them take precedence over OSX_VERSION and IOS_VERSION and supply additional options to
sed.
2015-04-21 Anders Carlsson <andersca@apple.com>
Fix block signatures
https://bugs.webkit.org/show_bug.cgi?id=144002
Reviewed by Andreas Kling.
* UIProcess/API/Cocoa/WKUIDelegate.h:
* UIProcess/API/Cocoa/WKWebsiteDataStore.h:
* UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
(-[WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
(-[WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
* UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
* UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
(-[_WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
(-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView _highlightLinkAnnotation:forDuration:completionHandler:]):
* UIProcess/ios/forms/WKFileUploadPanel.mm:
(-[WKFileUploadPanel _processMediaInfoDictionaries:successBlock:failureBlock:]):
(-[WKFileUploadPanel _processMediaInfoDictionaries:atIndex:processedResults:processedImageCount:processedVideoCount:successBlock:failureBlock:]):
(-[WKFileUploadPanel _uploadItemFromMediaInfo:successBlock:failureBlock:]):
2015-04-21 Timothy Horton <timothy_horton@apple.com>
PDFs still don't snapshot properly in iOS Safari
https://bugs.webkit.org/show_bug.cgi?id=143976
<rdar://problem/18283459>
Reviewed by Anders Carlsson.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didLayoutForCustomContentProvider):
* UIProcess/WebPageProxy.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didFinishLoadingDataForCustomContentProviderWithSuggestedFilename:data:]):
Inform the client that we've passed all reasonable layout milestones
as soon as the custom content provider has been handed its data.
WKPDFView, the only custom content provider, synchronously lays out
its subviews upon initial receipt of data, so this works fine for it.
This ensures that clients that normally depend on layout milestones firing
won't break when a custom content view is installed.
(-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
Fall back to renderInContext: if the custom content view is not parented
when a snapshot is requested.
2015-04-21 Dan Bernstein <mitz@apple.com>
Merged WKBackForwardListItems Internal category into the class extension in WKBackForwardListItemInternal.h.
Reviewed by Anders Carlsson.
* UIProcess/API/Cocoa/WKBackForwardListItem.mm:
(-[WKBackForwardListItem _item]):
(-[WKBackForwardListItem _apiObject]):
* UIProcess/API/Cocoa/WKBackForwardListItemInternal.h:
2015-04-21 Chris Dumez <cdumez@apple.com>
Make Vector(const Vector<T, otherCapacity, otherOverflowBehaviour>&) constructor explicit
https://bugs.webkit.org/show_bug.cgi?id=143970
Reviewed by Darin Adler.
Make Vector(const Vector<T, otherCapacity, otherOverflowBehaviour>&)
constructor explicit as it copies the vector and it is easy to call it
by mistake.
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
(WebKit::WebIDBServerConnection::setIndexKeys):
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
2015-04-20 Dan Bernstein <mitz@apple.com>
Expose more bundle form client functions as WKWebProcessPlugInFormDelegatePrivate methods
https://bugs.webkit.org/show_bug.cgi?id=143973
Reviewed by Anders Carlsson.
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFormDelegatePrivate.h: Declared new
delegate methods.
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.h: Declared new frame
property.
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:
(-[WKWebProcessPlugInNodeHandle frame]): Added. Returns the nodes documents frame. This is
useful to delegates getting an array of nodes via the new method.
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]): Added overrides of
shouldNotifyOnFormChanges and didAssociateFormControls, which call the new delegate methods.
2015-04-20 Joseph Pecoraro <pecoraro@apple.com>
Cleanup some StringBuilder use
https://bugs.webkit.org/show_bug.cgi?id=143550
Reviewed by Darin Adler.
* DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
(WebKit::buildObjectStoreStatement):
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
(WebKit::v2RecordsTableSchema):
* Shared/Databases/IndexedDB/IDBUtilities.cpp:
(WebKit::uniqueDatabaseIdentifier):
* UIProcess/API/APIUserScript.cpp:
(API::UserScript::generateUniqueURL):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::didReceiveInvalidMessage):
* WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
(WebKit::combinedSecurityOriginIdentifier):
2015-04-20 Anders Carlsson <andersca@apple.com>
Modify the WKWebsiteDataStore API to take a NSSet of types instead of a bitmask
https://bugs.webkit.org/show_bug.cgi?id=143966
Reviewed by Dan Bernstein.
* UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
* UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
(dataTypesToString):
(-[WKWebsiteDataRecord dataTypes]):
* UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
(WebKit::toWebsiteDataTypes):
(WebKit::toWKWebsiteDataTypes):
* UIProcess/API/Cocoa/WKWebsiteDataStore.h:
* UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
(+[WKWebsiteDataStore allWebsiteDataTypes]):
(-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
(-[WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
(-[WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
* UIProcess/API/Cocoa/_WKWebsiteDataRecord.h:
* UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
* UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
(toWKWebsiteDataTypes):
(-[_WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
(-[_WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
(-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
2015-04-20 Beth Dakin <bdakin@apple.com>
Should remove mouseForceClick and mouseForceCancelled from DOM force events
https://bugs.webkit.org/show_bug.cgi?id=143904
-and corresponding-
rdar://problem/20578842
Reviewed by Dan Bernstein.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::immediateActionDidCancel):
2015-04-20 Tim Horton <timothy_horton@apple.com>
Implement immediate action support for tel: and mailto: URLs
https://bugs.webkit.org/show_bug.cgi?id=143916
<rdar://problem/19721711>
Reviewed by Darin Adler.
* Shared/API/c/WKImmediateActionTypes.h:
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController _defaultAnimationController]):
(-[WKImmediateActionController _animationControllerForDataDetectedText]):
(-[WKImmediateActionController _animationControllerForDataDetectedLink]):
(-[WKImmediateActionController _menuItemForDataDetectedText]): Deleted.
Add _animationControllerForDataDetectedLink and use it when
building immediate actions for tel: and mailto: links.
2015-04-20 Alex Christensen <achristensen@webkit.org>
Properly report errors from _WKUserContentExtensionStore.
https://bugs.webkit.org/show_bug.cgi?id=143808
Reviewed by Darin Adler.
* UIProcess/API/Cocoa/_WKUserContentExtensionStore.mm:
(-[_WKUserContentExtensionStore compileContentExtensionForIdentifier:encodedContentExtension:completionHandler:]):
(-[_WKUserContentExtensionStore lookupContentExtensionForIdentifier:completionHandler:]):
(-[_WKUserContentExtensionStore removeContentExtensionForIdentifier:completionHandler:]):
2015-04-18 Simon Fraser <simon.fraser@apple.com>
REGRESSION (r181656): Animated tiled layers are missing content
https://bugs.webkit.org/show_bug.cgi?id=143911
rdar://problem/20596328
Reviewed by Darin Adler.
After r181656, all requestAnimationFrame was falling back to timers, and not
using the platform's DisplayRefreshMonitor, because of a Nullopt vs nullptr
fumble.
Replace this confusing Optional<> code with simpler code that just forces the
clients to make a DisplayRefreshMonitor if they can, first asking
ChromeClient, and then falling back to createDefaultDisplayRefreshMonitor().
Make lots of things into references, and use C++11 initialization in some places.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::createDisplayRefreshMonitor):
* WebProcess/WebCoreSupport/WebChromeClient.h:
2015-04-18 Dan Bernstein <mitz@apple.com>
SwipeShadow images are installed on iOS
https://bugs.webkit.org/show_bug.cgi?id=143915
Reviewed by Tim Horton.
* Configurations/WebKit.xcconfig: Added Resources/Mac/* to
EXCLUDED_SOURCE_FILE_NAMES[sdk=iphone*]. We could move more resources there and remove
individual patterns.
* Resources/SwipeShadow.png: Moved to mac.
* Resources/SwipeShadow@2x.png: Moved to mac.
* Resources/mac: Added.
* Resources/mac/SwipeShadow.png: Moved from Source/WebKit2/Resources/SwipeShadow.png.
* Resources/mac/SwipeShadow@2x.png: Moved from Source/WebKit2/Resources/SwipeShadow@2x.png.
* WebKit2.xcodeproj/project.pbxproj: Created mac group in the Resources group and moved
SwipeShadow*.png into it. Updated for file moves.
2015-04-18 Chris Dumez <cdumez@apple.com>
Fix NetworkCache Statistics database bootstrapping after r182803
https://bugs.webkit.org/show_bug.cgi?id=143890
Reviewed by Darin Adler.
Update the NetworkCache Statistics database bootstrapping code to use
the records path instead of the version path. Also check that the
filenames in the folder are valid hashes to discard the *-body files.
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::recordsPath):
(WebKit::NetworkCache::Cache::storagePath): Deleted.
* NetworkProcess/cache/NetworkCache.h:
* NetworkProcess/cache/NetworkCacheStatistics.cpp:
(WebKit::NetworkCache::Statistics::initialize):
(WebKit::NetworkCache::Statistics::bootstrapFromNetworkCache):
(WebKit::NetworkCache::Statistics::shrinkIfNeeded):
2015-04-17 Tim Horton <timothy_horton@apple.com>
Clients sometimes block for 500ms in waitForPossibleGeometryUpdates
https://bugs.webkit.org/show_bug.cgi?id=143901
<rdar://problem/20488655>
Reviewed by Anders Carlsson.
* Platform/IPC/Connection.cpp:
(IPC::Connection::waitForMessage):
InterruptWaitingIfSyncMessageArrives already cancels waitForMessage if
a sync message arrives while waiting, but it should also avoid waiting
if there's a sync message already in the queue when the waiting starts,
as that will have the same nasty effect.
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
(WebKit::TiledCoreAnimationDrawingAreaProxy::waitForPossibleGeometryUpdate):
If a synchronous message comes in from the Web process while we're waiting,
cancel our synchronous wait for DidUpdateGeometry. This will cause the size
change to not synchronize with the Web process' painting, but that is better
than pointlessly blocking for 500ms.
2015-04-17 Chris Dumez <cdumez@apple.com>
Possible null pointer dereference in WebDiagnosticLoggingClient::logDiagnosticMessageWithValue()
https://bugs.webkit.org/show_bug.cgi?id=143899
<rdar://problem/20584215>
Reviewed by Anders Carlsson.
WebDiagnosticLoggingClient::logDiagnosticMessage*() methods failed to
check that m_page.corePage() was non-null before dereferencing, thus
causing crashes when it is null.
* WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
(WebKit::WebDiagnosticLoggingClient::logDiagnosticMessage):
(WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithResult):
(WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithValue):
2015-04-17 Yongjun Zhang <yongjun_zhang@apple.com>
WebKit client should be able to add view controller for link preview.
https://bugs.webkit.org/show_bug.cgi?id=143686
Add delegate methods to WKUIDelegatePrivate so that a WebKit client can prepare a view controller
for link preview and react to the dismissal of this view controller. Also connect WKContentView to
preview gesture recognizer and forwards the delegate callbacks to corresponding delegate methods
in WKUIDelegatePrivate.
Reviewed by Beth Dakin.
* Platform/spi/ios/UIKitSPI.h:
* UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView willMoveToWindow:]):
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView cleanupInteraction]):
(-[WKContentView gestureRecognizer:canPreventGestureRecognizer:]):
(-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
(-[WKContentView gestureRecognizerShouldBegin:]):
(-[WKContentView previewViewControllerForPosition:inSourceView:]):
(-[WKContentView commitPreviewViewController:]):
(-[WKContentView willPresentPreviewViewController:forPosition:inSourceView:]):
(-[WKContentView didDismissPreviewViewController:committing:]):
2015-04-17 Beth Dakin <bdakin@apple.com>
Force mouse events should go through normal mouse event handling code paths
https://bugs.webkit.org/show_bug.cgi?id=143749
-and corresponding-
rdar://problem/20472895
Reviewed by Dean Jackson.
This patch makes pressureChangeWithEvent create NativeWebMouseEvents with the
NSEventTypePressures that is gets and sends those down to the web process.
Re-name pressureEvent to lastPressureEvent. Now that event can sometimes be an
NSEventTypePressure, the new name makes it clear how the second parameter differs
from the first.
* Shared/NativeWebMouseEvent.h:
New event types for the new types of events.
* Shared/WebEvent.h:
* Shared/WebEventConversion.cpp:
(WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
* Shared/mac/NativeWebMouseEventMac.mm:
(WebKit::NativeWebMouseEvent::NativeWebMouseEvent):
* Shared/mac/WebEventFactory.h:
All of the square-peg, round-hole problems of massaging the NSEventTypePressures
events into WebMouseEvents is taken care of here.
* Shared/mac/WebEventFactory.mm:
(WebKit::mouseButtonForEvent):
(WebKit::globalPointForEvent):
(WebKit::pointForEvent):
(WebKit::WebEventFactory::createWebMouseEvent):
Instead of calling the old inputDeviceForceDidChange, create a NativeWebMouseEvent
and handle it.
* UIProcess/API/mac/WKView.mm:
(-[WKView pressureChangeWithEvent:]):
Handle the new types.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didReceiveEvent):
Can delete inputDeviceForceDidChange since its no longer used.
(WebKit::WebPageProxy::inputDeviceForceDidChange): Deleted.
* UIProcess/WebPageProxy.h:
Handle the new types of mouse events properly.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::handleMouseEvent):
Delete inputDeviceForceDidChange() and m_lastForceStage.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::inputDeviceForceDidChange): Deleted.
Handle new WebEvent types.
* WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
2015-04-17 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r182912 and r182920.
https://bugs.webkit.org/show_bug.cgi?id=143881
Build breakage in some configurations (Requested by ap on
#webkit).
Reverted changesets:
"Force mouse events should go through normal mouse event
handling code paths"
https://bugs.webkit.org/show_bug.cgi?id=143749
http://trac.webkit.org/changeset/182912
http://trac.webkit.org/changeset/182920
2015-04-17 Antti Koivisto <antti@apple.com>
Network Cache: Read resource record and body in parallel
https://bugs.webkit.org/show_bug.cgi?id=143879
Reviewed by Chris Dumez.
We currently first fetch the record file and then fetch the body blob if needed.
We can do both operations in parallel to reduce latency.
* NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
(WebKit::NetworkCache::traverseCacheFiles):
Do all validation in the client.
* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::Storage::synchronize):
Maintain a bloom filter that contains the body blobs to avoid unnecessary IO attempts.
Delete any unknown file in cache directory.
(WebKit::NetworkCache::Storage::addToRecordFilter):
More informative name for record filter.
(WebKit::NetworkCache::Storage::mayContain):
(WebKit::NetworkCache::Storage::readRecord):
(WebKit::NetworkCache::Storage::storeBodyAsBlob):
(WebKit::NetworkCache::Storage::dispatchReadOperation):
Start record read IO and body blob read IO in parallel.
(WebKit::NetworkCache::Storage::finishReadOperation):
The read is finished when we have both the record and the blob.
(WebKit::NetworkCache::Storage::dispatchWriteOperation):
(WebKit::NetworkCache::Storage::retrieve):
(WebKit::NetworkCache::Storage::store):
(WebKit::NetworkCache::Storage::traverse):
(WebKit::NetworkCache::Storage::clear):
(WebKit::NetworkCache::Storage::shrink):
(WebKit::NetworkCache::Storage::addToContentsFilter): Deleted.
(WebKit::NetworkCache::Storage::decodeRecord): Deleted.
* NetworkProcess/cache/NetworkCacheStorage.h:
(WebKit::NetworkCache::Storage::ReadOperation::ReadOperation):
ReadOperation is now mutable and gathers the read result.
2015-04-16 Anders Carlsson <andersca@apple.com>
Stop installing WebKit2.framework
https://bugs.webkit.org/show_bug.cgi?id=143860
rdar://problem/18298491
Reviewed by Dan Bernstein.
* Configurations/WebKit2.xcconfig:
Set SKIP_INSTALL=YES for all SDKs except 10.9 where we still need it.
2015-04-17 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix the build with ENABLE(NETWORK_CACHE) and !ENABLE(SHAREABLE_RESOURCE).
* NetworkProcess/cache/NetworkCacheEntry.cpp:
* NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
(WebKit::NetworkCache::fileTimes): There's no st_birthtime in Linux.
2015-04-17 Carlos Garcia Campos <cgarcia@igalia.com>
[SOUP] ResourceRequest cache policy is not encoded/decoded in IPC messages
https://bugs.webkit.org/show_bug.cgi?id=143867
Reviewed by Sergio Villar Senin.
Encode/Decode the ResourceRequest cache policy.
* Shared/soup/WebCoreArgumentCodersSoup.cpp:
(IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
(IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
2015-04-16 Sungmann Cho <sungmann.cho@navercorp.com>
Use UNUSED_PARAM instead of the void casting to suppress unused parameter warnings.
https://bugs.webkit.org/show_bug.cgi?id=143750
Reviewed by Darin Adler.
No new tests, no behavior change.
* WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
(WebKit::NotificationPermissionRequestManager::NotificationPermissionRequestManager):
2015-04-16 Brady Eidson <beidson@apple.com>
Compiling a content extension fails when user's home directory is on a different volume from /var/tmp.
https://bugs.webkit.org/show_bug.cgi?id=143834
Reviewed by Anders Carlsson.
* UIProcess/API/APIUserContentExtensionStore.cpp:
(API::compiledToFile): Use moveFile() instead of renameFile()
2015-04-16 Anders Carlsson <andersca@apple.com>
Deprecate _WKWebsiteDataStore in favor of WKWebsiteDataStore
https://bugs.webkit.org/show_bug.cgi?id=143844
Reviewed by Dan Bernstein.
* Shared/API/Cocoa/WKFoundation.h:
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration _validate]):
* UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
* UIProcess/API/Cocoa/_WKWebsiteDataRecord.h:
* UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
* mac/postprocess-framework-headers.sh:
2015-04-16 Alex Christensen <achristensen@webkit.org>
Removed unused WKUserContentFilterRef.
https://bugs.webkit.org/show_bug.cgi?id=143852
Reviewed by Sam Weinig.
* Shared/WebCompiledContentExtension.cpp:
(WebKit::LegacyContentExtensionCompilationClient::LegacyContentExtensionCompilationClient): Deleted.
(WebKit::LegacyContentExtensionCompilationClient::writeBytecode): Deleted.
(WebKit::LegacyContentExtensionCompilationClient::writeActions): Deleted.
(WebKit::WebCompiledContentExtension::createFromCompiledContentExtensionData): Deleted.
* Shared/WebCompiledContentExtension.h:
* UIProcess/API/C/WKUserContentFilterRef.cpp: Removed.
* UIProcess/API/C/WKUserContentFilterRef.h: Removed.
* UIProcess/API/C/WebKit2_C.h:
* UIProcess/API/Cocoa/_WKUserContentFilter.h:
* UIProcess/API/Cocoa/_WKUserContentFilter.mm:
(-[_WKUserContentFilter initWithName:serializedRules:]): Deleted.
* WebKit2.xcodeproj/project.pbxproj:
2015-04-16 Beth Dakin <bdakin@apple.com>
Rubber-stamped by Tim Horton.
Fixing a small mistake in http://trac.webkit.org/changeset/182912 which should
make sure to use the most up-to-date pressure information when setting the force
on a WebMouseEvent.
* Shared/mac/WebEventFactory.mm:
(WebKit::WebEventFactory::createWebMouseEvent):
2015-04-13 Jer Noble <jer.noble@apple.com>
[iOS] When simultaneously exiting-and-entering fullscreen, WebVideoFullscreenManager/Proxy becomes confused about what video element it represents.
https://bugs.webkit.org/show_bug.cgi?id=143680
Reviewed by Simon Fraser.
The original assumption of WebVideoFullscreenManager and -Proxy was that the two classes would represent a
single video element and its full screen state. With multiple animations in and out of fullscreen combined with
multiple fullscreen modes, this assumption no longer holds true.
Rather than having a WebVideoFullscreenManager which /isa/ WebVideoFullscreenModelVideoElement, the manager now
/hasa/ WebVideoFullscreenModelVideoElement (or has many such models). Ditto for WebVideoFullscreenManager and
WebVideoFullscreenInterfaceAVKit. The WebVideoFullscreenInterfaceAVKit still needs a WebVideoFullscreenModel to
communicate with, so a new wrapper class is used for that purpose, WebVideoFullscreenModelContext. Ditto for
WebVideoFullscreenModelVideoElement and the new class WebVideoFullscreenInterfaceContext. These context classes
are paired and share a contextId, allowing the manager and its proxy to route messages between the UIProcess's
WebVideoFullscreenInterfaceAVKit to-and-from the WebProcess's WebVideoFullscreenModelVideoElement.
Both the WebVideoFullscreenModelContext and the WebVideoFullscreenInterfaceContext take a back-pointer to their
manager or manager proxy, and each method on the context simply calls the matching method on the manager and
passes its contextId as a parameter.
Both the WebVideoFullscreenManager and the WebVideoFullscreenManagerProxy pass that contextId in each of their
cross-process messages.
On the other side, the manager and proxy also have a map between contextIds and their matching
WebVideoFullscreenModelVideoElement (in the case of WebVideoFullscreenManager) or
WebVideoFullscreenInterfaceAVKit (in the case of WebVideoFullscreenManagerProxy).
While this change is large by LoC, it is almost entirely boilerplate. The new and interesting pieces are these:
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::WebVideoFullscreenManagerProxy): No longer a WebVideoFullscreenInterfaceAVKit.
(WebKit::WebVideoFullscreenManagerProxy::invalidate): Walk through the models and interfaces, invalidating each.
(WebKit::WebVideoFullscreenManagerProxy::createModelAndInterface): Added. Return a new model and interface tuple.
(WebKit::WebVideoFullscreenManagerProxy::ensureModelAndInterface): Added. Lazily create, and add to the m_contextMap
a new model and interface object.
(WebKit::WebVideoFullscreenManagerProxy::ensureModel): Return the model half of ensureModelAndInterface().
(WebKit::WebVideoFullscreenManagerProxy::ensureInterface): Return the interface half of ensureModelAndInterface().
(WebKit::WebVideoFullscreenManagerProxy::enterFullscreen): Walk through the outstanding interface objects, and if
any have a fullscreen mode which matches the about-to-be-fullscreen interface, request that that other interface
exit fullscreen.
* WebProcess/ios/WebVideoFullscreenManager.mm:
(WebKit::nextContextId): Static, incrementing counter used as a contextId source.
(WebKit::WebVideoFullscreenManager::WebVideoFullscreenManager): No longer a WebVideoFullscreenModelVideoElement.
(WebKit::WebVideoFullscreenManager::~WebVideoFullscreenManager): Walk through the models and interfaces, invalidating each.
(WebKit::WebVideoFullscreenManager::ensureModelAndInterface): Added. Return a new model and interface tuple.
(WebKit::WebVideoFullscreenManager::ensureModelAndInterface): Added. Lazily create, and add to the m_contextMap
a new model and interface object.
(WebKit::WebVideoFullscreenManager::ensureModel): Return the model half of ensureModelAndInterface().
(WebKit::WebVideoFullscreenManager::ensureInterface): Return the interface half of ensureModelAndInterface().
New classes and methods which just forward on to their owning objects:
* UIProcess/ios/WebVideoFullscreenManagerProxy.h:
(WebKit::WebVideoFullscreenModelContext::create):
(WebKit::WebVideoFullscreenModelContext::~WebVideoFullscreenModelContext):
(WebKit::WebVideoFullscreenModelContext::invalidate):
(WebKit::WebVideoFullscreenModelContext::layerHost):
(WebKit::WebVideoFullscreenModelContext::setLayerHost):
(WebKit::WebVideoFullscreenModelContext::setInitialVideoLayerFrame):
(WebKit::WebVideoFullscreenModelContext::WebVideoFullscreenModelContext):
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenModelContext::play):
(WebKit::WebVideoFullscreenModelContext::pause):
(WebKit::WebVideoFullscreenModelContext::togglePlayState):
(WebKit::WebVideoFullscreenModelContext::beginScrubbing):
(WebKit::WebVideoFullscreenModelContext::endScrubbing):
(WebKit::WebVideoFullscreenModelContext::seekToTime):
(WebKit::WebVideoFullscreenModelContext::fastSeek):
(WebKit::WebVideoFullscreenModelContext::beginScanningForward):
(WebKit::WebVideoFullscreenModelContext::beginScanningBackward):
(WebKit::WebVideoFullscreenModelContext::endScanning):
(WebKit::WebVideoFullscreenModelContext::requestExitFullscreen):
(WebKit::WebVideoFullscreenModelContext::setVideoLayerFrame):
(WebKit::WebVideoFullscreenModelContext::videoLayerFrame):
(WebKit::WebVideoFullscreenModelContext::setVideoLayerGravity):
(WebKit::WebVideoFullscreenModelContext::videoLayerGravity):
(WebKit::WebVideoFullscreenModelContext::selectAudioMediaOption):
(WebKit::WebVideoFullscreenModelContext::selectLegibleMediaOption):
(WebKit::WebVideoFullscreenModelContext::fullscreenModeChanged):
(WebKit::WebVideoFullscreenModelContext::didSetupFullscreen):
(WebKit::WebVideoFullscreenModelContext::didEnterFullscreen):
(WebKit::WebVideoFullscreenModelContext::didExitFullscreen):
(WebKit::WebVideoFullscreenModelContext::didCleanupFullscreen):
(WebKit::WebVideoFullscreenModelContext::fullscreenMayReturnToInline):
* WebProcess/ios/WebVideoFullscreenManager.h:
(WebKit::WebVideoFullscreenInterfaceContext::create):
(WebKit::WebVideoFullscreenInterfaceContext::invalidate):
(WebKit::WebVideoFullscreenInterfaceContext::layerHostingContext):
(WebKit::WebVideoFullscreenInterfaceContext::isAnimating):
(WebKit::WebVideoFullscreenInterfaceContext::setIsAnimating):
(WebKit::WebVideoFullscreenInterfaceContext::targetIsFullscreen):
(WebKit::WebVideoFullscreenInterfaceContext::setTargetIsFullscreen):
(WebKit::WebVideoFullscreenInterfaceContext::fullscreenMode):
(WebKit::WebVideoFullscreenInterfaceContext::setFullscreenMode):
(WebKit::WebVideoFullscreenInterfaceContext::isFullscreen):
(WebKit::WebVideoFullscreenInterfaceContext::setIsFullscreen):
* WebProcess/ios/WebVideoFullscreenManager.mm:
(WebKit::WebVideoFullscreenInterfaceContext::WebVideoFullscreenInterfaceContext):
(WebKit::WebVideoFullscreenInterfaceContext::~WebVideoFullscreenInterfaceContext):
(WebKit::WebVideoFullscreenInterfaceContext::setLayerHostingContext):
(WebKit::WebVideoFullscreenInterfaceContext::resetMediaState):
(WebKit::WebVideoFullscreenInterfaceContext::setDuration):
(WebKit::WebVideoFullscreenInterfaceContext::setCurrentTime):
(WebKit::WebVideoFullscreenInterfaceContext::setBufferedTime):
(WebKit::WebVideoFullscreenInterfaceContext::setRate):
(WebKit::WebVideoFullscreenInterfaceContext::setVideoDimensions):
(WebKit::WebVideoFullscreenInterfaceContext::setSeekableRanges):
(WebKit::WebVideoFullscreenInterfaceContext::setCanPlayFastReverse):
(WebKit::WebVideoFullscreenInterfaceContext::setAudioMediaSelectionOptions):
(WebKit::WebVideoFullscreenInterfaceContext::setLegibleMediaSelectionOptions):
(WebKit::WebVideoFullscreenInterfaceContext::setExternalPlayback):
Cross-process methods which now take a contextId parameter:
* UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID):
(WebKit::WebVideoFullscreenManagerProxy::resetMediaState):
(WebKit::WebVideoFullscreenManagerProxy::setCurrentTime):
(WebKit::WebVideoFullscreenManagerProxy::setBufferedTime):
(WebKit::WebVideoFullscreenManagerProxy::setVideoDimensions):
(WebKit::WebVideoFullscreenManagerProxy::setSeekableRangesVector):
(WebKit::WebVideoFullscreenManagerProxy::setCanPlayFastReverse):
(WebKit::WebVideoFullscreenManagerProxy::setAudioMediaSelectionOptions):
(WebKit::WebVideoFullscreenManagerProxy::setLegibleMediaSelectionOptions):
(WebKit::WebVideoFullscreenManagerProxy::setExternalPlaybackProperties):
(WebKit::WebVideoFullscreenManagerProxy::setDuration):
(WebKit::WebVideoFullscreenManagerProxy::setRate):
(WebKit::WebVideoFullscreenManagerProxy::exitFullscreen):
(WebKit::WebVideoFullscreenManagerProxy::cleanupFullscreen):
(WebKit::WebVideoFullscreenManagerProxy::preparedToReturnToInline):
(WebKit::WebVideoFullscreenManagerProxy::play):
(WebKit::WebVideoFullscreenManagerProxy::pause):
(WebKit::WebVideoFullscreenManagerProxy::togglePlayState):
(WebKit::WebVideoFullscreenManagerProxy::beginScrubbing):
(WebKit::WebVideoFullscreenManagerProxy::endScrubbing):
(WebKit::WebVideoFullscreenManagerProxy::seekToTime):
(WebKit::WebVideoFullscreenManagerProxy::fastSeek):
(WebKit::WebVideoFullscreenManagerProxy::beginScanningForward):
(WebKit::WebVideoFullscreenManagerProxy::beginScanningBackward):
(WebKit::WebVideoFullscreenManagerProxy::endScanning):
(WebKit::WebVideoFullscreenManagerProxy::requestExitFullscreen):
(WebKit::WebVideoFullscreenManagerProxy::didSetupFullscreen):
(WebKit::WebVideoFullscreenManagerProxy::didExitFullscreen):
(WebKit::WebVideoFullscreenManagerProxy::didEnterFullscreen):
(WebKit::WebVideoFullscreenManagerProxy::didCleanupFullscreen):
(WebKit::WebVideoFullscreenManagerProxy::setVideoLayerFrame):
(WebKit::WebVideoFullscreenManagerProxy::setVideoLayerGravity):
(WebKit::WebVideoFullscreenManagerProxy::selectAudioMediaOption):
(WebKit::WebVideoFullscreenManagerProxy::selectLegibleMediaOption):
(WebKit::WebVideoFullscreenManagerProxy::fullscreenModeChanged):
(WebKit::WebVideoFullscreenManagerProxy::fullscreenMayReturnToInline):
(WebKit::WebVideoFullscreenManagerProxy::videoLayerFrame): Deleted.
(WebKit::WebVideoFullscreenManagerProxy::videoLayerGravity): Deleted.
* WebProcess/ios/WebVideoFullscreenManager.messages.in:
* WebProcess/ios/WebVideoFullscreenManager.mm:
(WebKit::WebVideoFullscreenManager::enterVideoFullscreenForVideoElement):
(WebKit::WebVideoFullscreenManager::exitVideoFullscreenForVideoElement):
(WebKit::WebVideoFullscreenManager::resetMediaState):
(WebKit::WebVideoFullscreenManager::setDuration):
(WebKit::WebVideoFullscreenManager::setCurrentTime):
(WebKit::WebVideoFullscreenManager::setBufferedTime):
(WebKit::WebVideoFullscreenManager::setRate):
(WebKit::WebVideoFullscreenManager::setVideoDimensions):
(WebKit::WebVideoFullscreenManager::setSeekableRanges):
(WebKit::WebVideoFullscreenManager::setCanPlayFastReverse):
(WebKit::WebVideoFullscreenManager::setAudioMediaSelectionOptions):
(WebKit::WebVideoFullscreenManager::setLegibleMediaSelectionOptions):
(WebKit::WebVideoFullscreenManager::setExternalPlayback):
(WebKit::WebVideoFullscreenManager::play):
(WebKit::WebVideoFullscreenManager::pause):
(WebKit::WebVideoFullscreenManager::togglePlayState):
(WebKit::WebVideoFullscreenManager::beginScrubbing):
(WebKit::WebVideoFullscreenManager::endScrubbing):
(WebKit::WebVideoFullscreenManager::seekToTime):
(WebKit::WebVideoFullscreenManager::fastSeek):
(WebKit::WebVideoFullscreenManager::beginScanningForward):
(WebKit::WebVideoFullscreenManager::beginScanningBackward):
(WebKit::WebVideoFullscreenManager::endScanning):
(WebKit::WebVideoFullscreenManager::requestExitFullscreen):
(WebKit::WebVideoFullscreenManager::selectAudioMediaOption):
(WebKit::WebVideoFullscreenManager::selectLegibleMediaOption):
(WebKit::WebVideoFullscreenManager::fullscreenModeChanged):
(WebKit::WebVideoFullscreenManager::didSetupFullscreen):
(WebKit::WebVideoFullscreenManager::didEnterFullscreen):
(WebKit::WebVideoFullscreenManager::didExitFullscreen):
(WebKit::WebVideoFullscreenManager::didCleanupFullscreen):
(WebKit::WebVideoFullscreenManager::setVideoLayerGravityEnum):
(WebKit::WebVideoFullscreenManager::fullscreenMayReturnToInline):
(WebKit::WebVideoFullscreenManager::setVideoLayerFrameFenced):
(WebKit::WebVideoFullscreenManager::exitVideoFullscreen): Deleted.
2015-04-16 Beth Dakin <bdakin@apple.com>
Force mouse events should go through normal mouse event handling code paths
https://bugs.webkit.org/show_bug.cgi?id=143749
-and corresponding-
rdar://problem/20472895
Reviewed by Dean Jackson.
This patch makes pressureChangeWithEvent create NativeWebMouseEvents with the
NSEventTypePressures that is gets and sends those down to the web process.
Re-name pressureEvent to lastPressureEvent. Now that event can sometimes be an
NSEventTypePressure, the new name makes it clear how the second parameter differs
from the first.
* Shared/NativeWebMouseEvent.h:
New event types for the new types of events.
* Shared/WebEvent.h:
* Shared/WebEventConversion.cpp:
(WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
* Shared/mac/NativeWebMouseEventMac.mm:
(WebKit::NativeWebMouseEvent::NativeWebMouseEvent):
* Shared/mac/WebEventFactory.h:
All of the square-peg, round-hole problems of massaging the NSEventTypePressures
events into WebMouseEvents is taken care of here.
* Shared/mac/WebEventFactory.mm:
(WebKit::mouseButtonForEvent):
(WebKit::globalPointForEvent):
(WebKit::pointForEvent):
(WebKit::WebEventFactory::createWebMouseEvent):
Instead of calling the old inputDeviceForceDidChange, create a NativeWebMouseEvent
and handle it.
* UIProcess/API/mac/WKView.mm:
(-[WKView pressureChangeWithEvent:]):
Handle the new types.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didReceiveEvent):
Can delete inputDeviceForceDidChange since its no longer used.
(WebKit::WebPageProxy::inputDeviceForceDidChange): Deleted.
* UIProcess/WebPageProxy.h:
Handle the new types of mouse events properly.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::handleMouseEvent):
Delete inputDeviceForceDidChange() and m_lastForceStage.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::inputDeviceForceDidChange): Deleted.
Handle new WebEvent types.
* WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
2015-04-16 Dan Bernstein <mitz@apple.com>
<rdar://problem/20575744> Also include a definition of __NSd_{current deployment target} in WKFoundation.h.
Reviewed by Tim Horton.
* WebKit2.xcodeproj/project.pbxproj:
2015-04-16 Timothy Horton <timothy_horton@apple.com>
Provide a mechanism through the legacy SPI to know when swipe gestures begin and end
https://bugs.webkit.org/show_bug.cgi?id=143740
<rdar://problem/20468540>
Reviewed by Dan Bernstein.
In the C SPI, add three WKPageLoaderClient callbacks for the three
navigation gesture events (did begin, will end, did end).
* UIProcess/API/C/WKPageLoaderClient.h:
Add the callbacks.
* UIProcess/API/APILoaderClient.h:
(API::LoaderClient::navigationGestureDidBegin):
(API::LoaderClient::navigationGestureWillEnd):
(API::LoaderClient::navigationGestureDidEnd):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::navigationGestureDidBegin):
(WebKit::WebPageProxy::navigationGestureWillEnd):
(WebKit::WebPageProxy::navigationGestureDidEnd):
Dispatch navigation gesture events to the loader client as well as
(after a bounce through the PageClient) the navigation delegate.
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageLoaderClient):
Call the callbacks.
* UIProcess/mac/ViewGestureController.h:
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::trackSwipeGesture):
(WebKit::ViewGestureController::willEndSwipeGesture):
While we were already informing WebPageProxy of 'did begin' and 'did end'
navigation gesture events, we were missing 'will end'. Add it.
2015-04-16 Tim Horton <timothy_horton@apple.com>
Dispatching multiple asynchronous animated resizes in parallel causes page scale to detach from reality
https://bugs.webkit.org/show_bug.cgi?id=143812
<rdar://problem/19866038>
Reviewed by Simon Fraser.
* Shared/VisibleContentRectUpdateInfo.h:
(WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
No cats in transaction (more of these below, too).
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::dynamicViewportSizeUpdate):
(WebKit::WebPageProxy::dynamicViewportUpdateChangedTarget):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::handleTap):
(WebKit::WebPage::commitPotentialTap):
(WebKit::WebPage::dynamicViewportSizeUpdate):
Add an incrementing ID to dynamicViewportSizeUpdates. The UI process keeps
the current ID, and it is bounced through the Web process (dynamicViewportSizeUpdates)
back to the UI process (dynamicViewportUpdateChangedTarget). If we have
dispatched another dynamicViewportSizeUpdate in the interim, ignore
the intermediate target.
2015-04-16 Sungmann Cho <sungmann.cho@navercorp.com>
Remove PluginController::isPluginVisible().
https://bugs.webkit.org/show_bug.cgi?id=143830
Reviewed by Darin Adler.
PluginController::isPluginVisible() was introduced by http://webkit.org/b/60285.
This method had been used only for WebKit2 on Windows, and no one uses it now.
So we can remove it.
No new tests, no behavior change.
* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::isPluginVisible): Deleted.
* PluginProcess/PluginControllerProxy.h:
* WebProcess/Plugins/PluginController.h:
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::isPluginVisible): Deleted.
* WebProcess/Plugins/PluginView.h:
2015-04-16 Gyuyoung Kim <gyuyoung.kim@webkit.org>
[EFL] Disable a flaky ewk_context_network_process_model() API test
https://bugs.webkit.org/show_bug.cgi?id=143824
Reviewed by Csaba Osztrogonác.
ewk_context_network_process_model has been often failed. Though Bug 142967
was filed to fix this issue, it is not solved yet. To maintain EFL bot, this patch
disables it until fixing it.
* UIProcess/API/efl/tests/test_ewk2_context.cpp:
(TEST_F):
2015-04-16 Csaba Osztrogonác <ossy@webkit.org>
[WK2] Forwarding headers generator shouldn't generate unnecessary headers
https://bugs.webkit.org/show_bug.cgi?id=143820
Reviewed by Carlos Garcia Campos.
* Scripts/generate-forwarding-headers.pl:
(collectNeededHeaders):
2015-04-16 Csaba Osztrogonác <ossy@webkit.org>
[GTK] Run forwarding headers generator unconditionally
https://bugs.webkit.org/show_bug.cgi?id=143819
Reviewed by Carlos Garcia Campos.
* PlatformGTK.cmake:
2015-04-15 Brent Fulgham <bfulgham@apple.com>
[Mac] Disable "Save to Downloads" option for local files
https://bugs.webkit.org/show_bug.cgi?id=143794
Reviewed by Tim Horton.
Disable the Image and Media download options if the download
target is a local file. We can only download web resources;
anything else is actually a no-op.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _defaultMenuItemsForVideo]):
(-[WKActionMenuController _defaultMenuItemsForImage]):
2015-04-15 Anders Carlsson <andersca@apple.com>
Make websiteDataStore on WKWebViewConfiguration public
https://bugs.webkit.org/show_bug.cgi?id=143810
Reviewed by Dan Bernstein.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
* UIProcess/API/Cocoa/WKWebViewConfiguration.h:
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration websiteDataStore]):
(-[WKWebViewConfiguration setWebsiteDataStore:]):
(-[WKWebViewConfiguration _websiteDataStore]):
(-[WKWebViewConfiguration _setWebsiteDataStore:]):
2015-04-15 Anders Carlsson <andersca@apple.com>
Make WKWebsiteDataStore public
https://bugs.webkit.org/show_bug.cgi?id=143805
Reviewed by Dan Bernstein.
Rename the current _WKWebsiteDataStore to WKWebsiteDataStore. Make init unavailable and tighten up the
types of the defaultDataStore and nonPersistentDataStore class methods.
Add a new _WKWebsiteDataStore @interface and @implementation that derives from WKWebsiteDataStore
and forwards the defaultDataStore and nonPersistentDataStore method calls.
* Shared/API/Cocoa/WebKit.h:
* Shared/Cocoa/APIObject.mm:
(API::Object::newObject):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration _websiteDataStore]):
* UIProcess/API/Cocoa/WKWebsiteDataStore.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataStore.h.
* UIProcess/API/Cocoa/WKWebsiteDataStore.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataStore.mm.
(+[WKWebsiteDataStore defaultDataStore]):
(+[WKWebsiteDataStore nonPersistentDataStore]):
(-[WKWebsiteDataStore dealloc]):
(-[WKWebsiteDataStore isNonPersistent]):
(toSystemClockTime):
(-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
(-[WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
(toWebsiteDataRecords):
(-[WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
(-[WKWebsiteDataStore _apiObject]):
* UIProcess/API/Cocoa/WKWebsiteDataStoreInternal.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataStoreInternal.h.
(WebKit::wrapper):
* UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
* UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
(+[_WKWebsiteDataStore defaultDataStore]):
(+[_WKWebsiteDataStore nonPersistentDataStore]):
(-[_WKWebsiteDataStore dealloc]): Deleted.
(-[_WKWebsiteDataStore isNonPersistent]): Deleted.
(toWebsiteDataTypes): Deleted.
(toSystemClockTime): Deleted.
(-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]): Deleted.
(-[_WKWebsiteDataStore _apiObject]): Deleted.
* WebKit2.xcodeproj/project.pbxproj:
2015-04-15 Timothy Horton <timothy_horton@apple.com>
Custom CSS cursors do not use -webkit-image-set on retina displays
https://bugs.webkit.org/show_bug.cgi?id=120783
Reviewed by Beth Dakin.
Patch by Evan Wallace <evan.exe@gmail.com>.
Serialize the cursor image scale for SetCursor messages so custom
CSS cursors work with -webkit-image-set on retina displays.
* Shared/WebCoreArgumentCoders.cpp:
(CoreIPC::ArgumentCoder<Cursor>::encode):
(CoreIPC::ArgumentCoder<Cursor>::decode):
2015-04-15 Alex Christensen <achristensen@webkit.org>
Progress towards CMake on Mac.
https://bugs.webkit.org/show_bug.cgi?id=143785
Reviewed by Csaba Osztrogonác.
* CMakeLists.txt:
* PlatformEfl.cmake:
* PlatformGTK.cmake:
2015-04-15 Anders Carlsson <andersca@apple.com>
Make WKWebsiteDataRecord public
https://bugs.webkit.org/show_bug.cgi?id=143796
Reviewed by Dan Bernstein.
Rename _WKWebsiteDataRecord and associated files to WKWebsiteDataRecord and
add a new _WKWebsiteDataRecord.h with a class @interface declaration that just
inherits from WKWebsiteDataRecord. We don't need an @implementation since nobody is expected
to allocate _WKWebsiteDataRecord objects.
* Shared/API/Cocoa/WebKit.h:
* Shared/Cocoa/APIObject.mm:
(API::Object::newObject):
* UIProcess/API/Cocoa/WKWebsiteDataRecord.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataRecord.h.
* UIProcess/API/Cocoa/WKWebsiteDataRecord.mm: Renamed from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataRecord.mm.
(-[WKWebsiteDataRecord dealloc]):
(dataTypesToString):
(-[WKWebsiteDataRecord description]):
(-[WKWebsiteDataRecord displayName]):
(-[WKWebsiteDataRecord dataTypes]):
(-[WKWebsiteDataRecord _apiObject]):
* UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataRecordInternal.h.
(WebKit::wrapper):
(WebKit::toWebsiteDataTypes):
(WebKit::toWKWebsiteDataTypes):
* UIProcess/API/Cocoa/_WKWebsiteDataRecord.h:
* UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
(toWebsiteDataRecords):
* WebKit2.xcodeproj/project.pbxproj:
2015-04-13 Jer Noble <jer.noble@apple.com>
[Fullscreen] ChromeClient::exitVideoFullscreen() should take a pointer to a HTMLVideoElement.
https://bugs.webkit.org/show_bug.cgi?id=143674
Reviewed by Darin Adler.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::enterVideoFullscreenForVideoElement): Takes a reference.
(WebKit::WebChromeClient::exitVideoFullscreenForVideoElement): Renamed from exitVideoFullscreen().
(WebKit::WebChromeClient::exitVideoFullscreen): Deleted.
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/ios/WebVideoFullscreenManager.h:
* WebProcess/ios/WebVideoFullscreenManager.mm:
(WebKit::WebVideoFullscreenManager::enterVideoFullscreenForVideoElement): Ditto.
(WebKit::WebVideoFullscreenManager::exitVideoFullscreenForVideoElement): Renamed from exitVideoFullscreen().
(WebKit::WebVideoFullscreenManager::didEnterFullscreen): Pass a reference.
(WebKit::WebVideoFullscreenManager::didCleanupFullscreen): Ditto.
(WebKit::WebVideoFullscreenManager::exitVideoFullscreen): Deleted.
2015-04-15 Antti Koivisto <antti@apple.com>
Network Cache: Inline small body data to record file
https://bugs.webkit.org/show_bug.cgi?id=143783
Reviewed by Chris Dumez.
We currently save all body data as separate files. We can improve space efficiency and do less reads and writes
by inlining smaller resource bodies with the header.
* NetworkProcess/cache/NetworkCacheIOChannel.h:
* NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
(WebKit::NetworkCache::IOChannel::read):
(WebKit::NetworkCache::IOChannel::readSync):
(WebKit::NetworkCache::IOChannel::write):
Add WorkQueue argument to allow specifying which queue the result is submitted to.
* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::decodeRecordMetaData):
Add a boolean indicating whether the body is inlined.
(WebKit::NetworkCache::decodeRecordHeader):
(WebKit::NetworkCache::Storage::decodeRecord):
(WebKit::NetworkCache::encodeRecordMetaData):
(WebKit::NetworkCache::Storage::storeBodyAsBlob):
(WebKit::NetworkCache::Storage::encodeRecord):
(WebKit::NetworkCache::Storage::dispatchReadOperation):
Read the record first, then read the blob if needed.
Submit the read operation directly from the main queue. Only thing we do is opening an IO channel
and that uses O_NONBLOCK.
Process the read results in the IO work queue where we now do the blob retrieval.
(WebKit::NetworkCache::shouldStoreBodyAsBlob):
The current threshold for saving a separate blob is 16KB.
(WebKit::NetworkCache::Storage::dispatchWriteOperation):
(WebKit::NetworkCache::Storage::traverse):
(WebKit::NetworkCache::createRecord): Deleted.
(WebKit::NetworkCache::encodeRecordHeader): Deleted.
* NetworkProcess/cache/NetworkCacheStorage.h:
2015-04-15 Tim Horton <timothy_horton@apple.com>
Non-local keyboards don't update scroll view parameters
https://bugs.webkit.org/show_bug.cgi?id=143791
<rdar://problem/18974020>
* Platform/spi/ios/UIKitSPI.h:
Fix the build.
2015-04-15 Tim Horton <timothy_horton@apple.com>
Non-local keyboards don't update scroll view parameters
https://bugs.webkit.org/show_bug.cgi?id=143791
<rdar://problem/18974020>
Reviewed by Enrica Casucci.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _shouldUpdateKeyboardWithInfo:]):
(-[WKWebView _keyboardWillChangeFrame:]):
(-[WKWebView _keyboardWillShow:]):
Make sure that we update scroll view parameters (obscured insets, etc.)
if we have a non-local keyboard, in addition to the cases where we have an assisted node.
2015-04-15 Dan Bernstein <mitz@apple.com>
<rdar://problem/20549298> No matching __NSi_ definition for postprocessed value of WK_{MAC,IOS}_TBA
https://bugs.webkit.org/show_bug.cgi?id=143786
Reviewed by Anders Carlsson.
* Shared/API/Cocoa/WKFoundation.h: Added a placeholder for the postprocessing script to
insert a definition of __NSi_* for the current deployment target. Import CoreFoundation.h so
that we can check if the macro is already defined.
* WebKit2.xcodeproj/project.pbxproj: In the Postprocess WKFoundation.h script build phase,
replace the placeholder with a definition of __NSi_{current deployment target} if not
already defined.
2015-04-14 Anders Carlsson <andersca@apple.com>
Make creating send rights from shared memory more robust
https://bugs.webkit.org/show_bug.cgi?id=143730
rdar://problem/16595870
Reviewed by Darin Adler.
This cleans up creation of handles and send rights and also fixes a bug where it would be impossible
to send more than 128 MB of shared memory in a single object.
* Platform/SharedMemory.h:
* Platform/mac/SharedMemoryMac.cpp:
(WebKit::makeMemoryEntry):
New helper function that creates a memory entry send right. This uses MAP_MEM_VM_SHARE which ensures
that memory objects larger than 128 MB will be handled correctly.
(WebKit::SharedMemory::create):
Call makeMemoryEntry.
(WebKit::SharedMemory::createHandle):
Call createSendRight.
(WebKit::SharedMemory::createSendRight):
Call makeMemoryEntry and add the necessary assertions.
2015-04-15 Eric Carlson <eric.carlson@apple.com>
Generalize "isPlayingAudio" to include other media characteristics
https://bugs.webkit.org/show_bug.cgi?id=143713
Reviewed by Jer Noble.
* UIProcess/API/C/WKPage.cpp:
(toGenericCallbackFunction): Scope CallbackBase.
(WKPageForceRepaint): Ditto.
(WKPageValidateCommand): Ditto.
(WKPageComputePagesForPrinting): Ditto.
* UIProcess/API/Cocoa/_WKThumbnailView.mm:
(-[_WKThumbnailView _requestSnapshotIfNeeded]): Ditto.
* UIProcess/API/mac/WKView.mm:
(-[WKView becomeFirstResponder]): Ditto.
(-[WKView updateFontPanelIfNeeded]): Ditto.
(-[WKView validateUserInterfaceItem:]): Ditto.
(-[WKView startSpeaking:]): Ditto.
(-[WKView selectedRangeWithCompletionHandler:]): Ditto.
(-[WKView markedRangeWithCompletionHandler:]): Ditto.
(-[WKView hasMarkedTextWithCompletionHandler:]): Ditto.
(-[WKView attributedSubstringForProposedRange:completionHandler:]): Ditto.
(-[WKView firstRectForCharacterRange:completionHandler:]): Ditto.
(-[WKView characterIndexForPoint:completionHandler:]): Ditto.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::isPlayingMediaDidChange): Rename from isPlayingAudioDidChange.
(WebKit::WebPageProxy::isPlayingAudioDidChange): Deleted.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController dealloc]): Scope CallbackBase.
(-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): Ditto.
* UIProcess/mac/WKPrintingView.mm:
(-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]): Ditto.
(-[WKPrintingView _askPageToComputePageRects]): Ditto.
(-[WKPrintingView _drawPreview:]): Ditto.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::setPluginIsPlayingAudio):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::isPlayingMediaDidChange):
(WebKit::WebChromeClient::isPlayingAudioDidChange): Deleted.
* WebProcess/WebCoreSupport/WebChromeClient.h:
2015-04-15 Antti Koivisto <antti@apple.com>
Network Cache: Add thread-safe accessors for storage paths
https://bugs.webkit.org/show_bug.cgi?id=143668
Reviewed by Darin Adler.
Less need to use StringCapture.
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::dumpFilePath):
(WebKit::NetworkCache::Cache::storagePath):
* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::makeRecordsDirectoryPath):
(WebKit::NetworkCache::Storage::Storage):
(WebKit::NetworkCache::Storage::basePath):
(WebKit::NetworkCache::Storage::versionPath):
(WebKit::NetworkCache::Storage::recordsPath):
(WebKit::NetworkCache::Storage::synchronize):
(WebKit::NetworkCache::Storage::remove):
(WebKit::NetworkCache::Storage::dispatchReadOperation):
(WebKit::NetworkCache::Storage::finishReadOperation):
(WebKit::NetworkCache::Storage::dispatchWriteOperation):
(WebKit::NetworkCache::Storage::traverse):
(WebKit::NetworkCache::Storage::clear):
(WebKit::NetworkCache::Storage::shrink):
(WebKit::NetworkCache::Storage::deleteOldVersions):
(WebKit::NetworkCache::makeRecordDirectoryPath): Deleted.
* NetworkProcess/cache/NetworkCacheStorage.h:
(WebKit::NetworkCache::Storage::baseDirectoryPath): Deleted.
(WebKit::NetworkCache::Storage::directoryPath): Deleted.
2015-04-14 Tim Horton <timothy_horton@apple.com>
Update gesture swipe shadow style
https://bugs.webkit.org/show_bug.cgi?id=143616
<rdar://problem/19295843>
Reviewed by Darin Adler.
* UIProcess/mac/ViewGestureController.h:
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
For the modern shadow style, use a layer stretched along the edge of the swiping content
with the newly added PNGs as the layer contents.
Add a dimming layer over the lower layer of content which fades in/out
during the swipe.
(WebKit::ViewGestureController::handleSwipeGesture):
Fade the dimming layer in and out during the entire swipe.
Fade the shadow layer out during the last few pixels of the swipe.
(WebKit::ViewGestureController::removeSwipeSnapshot):
Unparent the new layers.
* WebKit2.xcodeproj/project.pbxproj:
* Resources/SwipeShadow.png:
* Resources/SwipeShadow@2x.png:
Add the new resources.
2015-04-14 Brian Weinstein <bweinstein@apple.com>
Add SPI to clear HSTS hosts added since a date.
https://bugs.webkit.org/show_bug.cgi?id=143726
and
rdar://problem/16664597
Reviewed by Anders Carlsson.
* UIProcess/API/C/mac/WKContextPrivateMac.h:
* UIProcess/API/C/mac/WKContextPrivateMac.mm:
(WKContextResetHSTSHostsAddedAfterDate): Call into the WebProcessPool.
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::resetHSTSHostsAddedAfterDate): Call CFNetwork SPI to clear HSTS hosts added
after the given date.
* UIProcess/WebProcessPool.h:
2015-04-14 Anders Carlsson <andersca@apple.com>
More work on making the SharedMemory interface more sane
https://bugs.webkit.org/show_bug.cgi?id=143718
Reviewed by Andreas Kling.
Get rid of m_shouldVMDeallocateData. The idea is that shared memory created by calling
SharedMemory::allocate has a non-null m_data pointer, and a null m_port. Shared memory created
by calling SharedMemory::create with a pointer and a length has a non-null port but a null m_data
since the data can be unmapped by the caller and we don't want to hold on to dangling pointers.
* Platform/SharedMemory.h:
(WebKit::SharedMemory::data):
* Platform/mac/SharedMemoryMac.cpp:
(WebKit::SharedMemory::allocate):
(WebKit::SharedMemory::create):
(WebKit::SharedMemory::map):
(WebKit::SharedMemory::~SharedMemory):
(WebKit::SharedMemory::createHandle):
2015-04-14 Antti Koivisto <antti@apple.com>
Network Cache: Deduplicate body data
https://bugs.webkit.org/show_bug.cgi?id=143652
Reviewed by Darin Adler.
It is common to have cache entries with identical body data. This happens when the same resource is loaded from
a different URL (https vs http, slash vs no-slash at end, etc.). It also happens when the same URL is
referenced from different cache partitions.
We can improve disk space efficiency and use less memory by sharing identical body data between cache entries.
This patch splits the body data out from the record file. The new record file contains meta data and response
headers only. Body data is stored using the new BlobStorage interface. Files are deduplicated by computing
SHA1 hash over the data and looking for an existing blob with the same hash. If found the existing entry
is reused by creating a hard link to it.
The new disk structure looks like this:
WebKitCache/
Version 3/
Blobs/
0A3C9A970ADA27FAE9BD7BC630BAD0B929C293C0
0A6B8060BA77DF92C82A2FD7AF58F79524D8F34C
...
Records/
apple.com/
0B8645B04E7EC78C178B7460052601C2
0B8645B04E7EC78C178B7460052601C2-body
0CB1A3638D1C5A09C5E3283A74FA040B
0CB1A3638D1C5A09C5E3283A74FA040B-body
...
Each record file has an associated -body which is a hard link to a file in the Blobs directory.
The patch increases effective capacity by 10-20% with a typical cache. It also saves memory especially when identical
resources are used in multiple tabs.
Currently all >0 sized resources are stored as shared blobs. In future small resources should be integrated into record
files and blobs used for larger files only.
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::store):
(WebKit::NetworkCache::Cache::update):
Adopt the new storage interface.
(WebKit::NetworkCache::Cache::dumpContentsToFile):
* NetworkProcess/cache/NetworkCacheBlobStorage.cpp: Added.
(WebKit::NetworkCache::BlobStorage::BlobStorage):
(WebKit::NetworkCache::BlobStorage::synchronize):
Compute size and delete unused files from the Blobs directory (link count == 1).
(WebKit::NetworkCache::BlobStorage::blobPath):
(WebKit::NetworkCache::BlobStorage::add):
(WebKit::NetworkCache::BlobStorage::get):
Interface for storing and retrieving data blobs. Blobs are deduplicated on add.
(WebKit::NetworkCache::BlobStorage::remove):
Removes the link but doesn't remove the blob even if there are no other clients. That happens on next synchronize().
(WebKit::NetworkCache::BlobStorage::shareCount):
Checks the link count to get the number of clients.
* NetworkProcess/cache/NetworkCacheBlobStorage.h: Added.
(WebKit::NetworkCache::BlobStorage::approximateSize):
* NetworkProcess/cache/NetworkCacheCoders.cpp:
(WebKit::NetworkCache::Coder<SHA1::Digest>::encode):
(WebKit::NetworkCache::Coder<SHA1::Digest>::decode):
* NetworkProcess/cache/NetworkCacheCoders.h:
* NetworkProcess/cache/NetworkCacheData.h:
(WebKit::NetworkCache::Data::isEmpty):
* NetworkProcess/cache/NetworkCacheDataCocoa.mm:
(WebKit::NetworkCache::Data::empty):
(WebKit::NetworkCache::Data::fromMap):
(WebKit::NetworkCache::mapFile):
(WebKit::NetworkCache::computeSHA1):
(WebKit::NetworkCache::bytesEqual):
Add some helpers.
* NetworkProcess/cache/NetworkCacheEntry.cpp:
(WebKit::NetworkCache::Entry::asJSON):
* NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
(WebKit::NetworkCache::IOChannel::IOChannel):
* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::makeRecordDirectoryPath):
(WebKit::NetworkCache::makeBlobDirectoryPath):
(WebKit::NetworkCache::Storage::Storage):
(WebKit::NetworkCache::Storage::approximateSize):
(WebKit::NetworkCache::Storage::synchronize):
(WebKit::NetworkCache::partitionPathForKey):
(WebKit::NetworkCache::recordPathForKey):
(WebKit::NetworkCache::bodyPath):
(WebKit::NetworkCache::decodeRecordMetaData):
(WebKit::NetworkCache::decodeRecordHeader):
(WebKit::NetworkCache::createRecord):
(WebKit::NetworkCache::encodeRecordMetaData):
(WebKit::NetworkCache::encodeRecordHeader):
(WebKit::NetworkCache::Storage::remove):
(WebKit::NetworkCache::Storage::updateFileModificationTime):
(WebKit::NetworkCache::Storage::dispatchReadOperation):
Read both the blob and the record entry.
(WebKit::NetworkCache::Storage::finishReadOperation):
Factor to a function.
(WebKit::NetworkCache::Storage::store):
(WebKit::NetworkCache::Storage::traverse):
(WebKit::NetworkCache::Storage::dispatchPendingWriteOperations):
(WebKit::NetworkCache::Storage::dispatchWriteOperation):
We don't need separate full write and header write paths anymore. Everything is treated
as a full write and deduplication stops us writing the body again.
This simplifies the code and data structures.
(WebKit::NetworkCache::Storage::finishWriteOperation):
Factor to a function.
(WebKit::NetworkCache::Storage::clear):
(WebKit::NetworkCache::deletionProbability):
Take the sharing count into account when computing deletion probability.
It is less useful to delete a record that shares its body with others as data won't get deleted.
(WebKit::NetworkCache::Storage::shrinkIfNeeded):
(WebKit::NetworkCache::Storage::shrink):
(WebKit::NetworkCache::Storage::deleteOldVersions):
(WebKit::NetworkCache::directoryPathForKey): Deleted.
(WebKit::NetworkCache::filePathForKey): Deleted.
(WebKit::NetworkCache::openFileForKey): Deleted.
(WebKit::NetworkCache::decodeRecord): Deleted.
(WebKit::NetworkCache::Storage::update): Deleted.
No need for separate update interface anymore. Regular store() avoids unnecessary body write.
(WebKit::NetworkCache::Storage::dispatchFullWriteOperation): Deleted.
(WebKit::NetworkCache::Storage::dispatchHeaderWriteOperation): Deleted.
* NetworkProcess/cache/NetworkCacheStorage.h:
* WebKit2.xcodeproj/project.pbxproj:
2015-04-14 Chris Dumez <cdumez@apple.com>
REGRESSION(r182603): [GTK] More than 500 crashes on the layout tests with the debug build.
https://bugs.webkit.org/show_bug.cgi?id=143715
Reviewed by Darin Adler.
Enable assertions checking that calling editorState() does not cause a
synchronous layout only on Mac and iOS. This assertion does not
necessarily hold true on other ports as each one as its own
platformEditorState() implementation. In particular, this assertion
was being hit on GTK.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didChangeSelection):
2015-04-13 Alexey Proskuryakov <ap@apple.com>
Build fixes after r182772.
* UIProcess/API/mac/WKView.mm:
(-[WKView _updateAutomaticallyComputedFixedLayoutSize]): Make a CGSize, not an NSSize.
(-[WKView _setAutomaticallyComputesFixedLayoutSizeFromViewScale:]): Moved implementation
to the correct place.
(-[WKView _automaticallyComputesFixedLayoutSizeFromViewScale]): Ditto.
(-[WKView _layoutMode]): Use a memeber from _data directly, not via a method.
2015-04-13 Alexey Proskuryakov <ap@apple.com>
More build fix.
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::setDragImage):
2015-04-13 Hunseop Jeong <hs85.jeong@samsung.com>
[EFL][GTK] Fix build break after r182753
https://bugs.webkit.org/show_bug.cgi?id=143689
Reviewed by Anders Carlsson.
* Platform/IPC/unix/ConnectionUnix.cpp:
(IPC::Connection::processMessage):
(IPC::Connection::sendOutgoingMessage):
* Platform/unix/SharedMemoryUnix.cpp:
(WebKit::SharedMemory::allocate):
(WebKit::accessModeMMap):
(WebKit::SharedMemory::map):
(WebKit::SharedMemory::create): Deleted.
2015-04-13 Alexey Proskuryakov <ap@apple.com>
Build fix.
* UIProcess/mac/PageClientImpl.mm: (WebKit::PageClientImpl::setDragImage):
2015-04-13 Anders Carlsson <andersca@apple.com>
Keep track of each shared memory object's protection when deciding whether to return our existing port
https://bugs.webkit.org/show_bug.cgi?id=143687
Reviewed by Tim Horton.
* Platform/SharedMemory.h:
* Platform/mac/SharedMemoryMac.cpp:
(WebKit::machProtection):
(WebKit::SharedMemory::create):
(WebKit::SharedMemory::map):
(WebKit::SharedMemory::createHandle):
2015-04-13 Tim Horton <timothy_horton@apple.com>
Add a persistent, fixed scale factor to make it easy to scale down WK(Web)Views
https://bugs.webkit.org/show_bug.cgi?id=143560
<rdar://problem/16302047>
Reviewed by Darin Adler.
Add a new "view" scale factor to WKView and WKWebView.
Unlike page scale (or "magnification" in the API), view scale:
- persists between page loads
- persists between Web process crashes
- is not user adjustable
- can reliably be < 1
The page scale and view scale are multiplied together whenever we push
a new page scale down into WebCore, so the implementation of view scale
is transparent to WebCore, and acts effectively as a constant multiplier
for the (user-adjustable) page scale factor.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::scaleView):
Add scaleView, which updates our cached viewScaleFactor and pushes it to the Web process.
(WebKit::WebPageProxy::creationParameters):
Plumb viewScaleFactor through the page creation parameters.
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::viewScaleFactor): Added.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
If the viewScaleFactor is not 1 at creation time, call scalePage with a page scale of 1.
Internally, scalePage will multiply in the viewScaleFactor and push it all to the Web process.
(WebKit::WebPage::scalePage):
Multiply the page scale factor by the view scale factor before passing it to WebCore.
(WebKit::WebPage::scalePageInViewCoordinates):
Early returns need to check the total scale, not just the new page scale.
(WebKit::WebPage::totalScaleFactor):
The scale that we get back from WebCore::Page::pageScaleFactor is the product
of WebKit2's view and page scales. So, here we'll call that the totalScaleFactor.
(Might need a different name because it seems like "total" should include deviceScale too).
(WebKit::WebPage::pageScaleFactor):
WebKit2's notion of the pageScaleFactor does not include the view scale, so
divide it out of WebCore's page scale.
(WebKit::WebPage::scaleView):
Apply a new view scale, maintaining the current scroll position.
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::viewScaleFactor):
* WebProcess/WebPage/WebPage.messages.in:
* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
Plumb viewScaleFactor through the page creation parameters.
* UIProcess/API/Cocoa/WKViewPrivate.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _viewScale]):
(-[WKWebView _setViewScale:]):
* UIProcess/API/mac/WKView.mm:
(-[WKView _viewScale]):
(-[WKView _setViewScale:]):
Push the new view scale to WebPage.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _setAutomaticallyComputesFixedLayoutSizeFromViewScale:]):
(-[WKWebView _automaticallyComputesFixedLayoutSizeFromViewScale]):
* UIProcess/API/mac/WKView.mm:
(-[WKView setFrameSize:]):
(-[WKView _updateAutomaticallyComputedFixedLayoutSize]):
(-[WKView _setAutomaticallyComputesFixedLayoutSizeFromViewScale:]):
(-[WKView _automaticallyComputesFixedLayoutSizeFromViewScale]):
* UIProcess/API/mac/WKViewInternal.h:
Add a new layout mode, "DynamicSizeComputedFromViewScale",
which turns on fixed layout size mode, and sets the fixed layout size
based on the view's frame and view scale. The fixed layout size is maintained
as the frame of the view scaled by the inverse of the view scale. This
makes it very easy to maintain a WK(Web)View that is scaled down by
a constant amount, but is laid out as if it were not.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::adjustTransientZoom):
(WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):
(WebKit::TiledCoreAnimationDrawingArea::applyTransientZoomToPage):
Because the transient zoom mechanism touches layers that WebCore owns,
it mostly need to operate with totalScaleFactor, because that is what WebCore sees.
2015-04-10 Brent Fulgham <bfulgham@apple.com>
Expand test infrastructure to support scrolling tests
https://bugs.webkit.org/show_bug.cgi?id=143286
<rdar://problem/20375516>
Reviewed by Simon Fraser.
Extend the WK2 testing API to include a method for setting a JSC callback function to be triggered
by the new WebCore::WheelEventTestTrigger singleton.
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageStartMonitoringScrollOperations): WK2 method that causes the testing system to begin tracking wheel events.
(WKBundlePageRegisterScrollOperationCompletionCallback): WK2 method to set the callback function for testing.
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:
2015-04-13 Enrica Casucci <enrica@apple.com>
Clients of WKWebView should be able to override drag functions.
https://bugs.webkit.org/show_bug.cgi?id=143618
Reviewed by Darin Adler.
WKWebView now implements the drag protocol functions and
forwards the calls to the inner WKView.
In the page client, when we receive a request to start drag
from the WebProcess, we call _dragImageForView in WKView with
the target view. The function calls dragImage on the given view,
so that its clients can override the dragImage function.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView draggingEntered:]):
(-[WKWebView draggingUpdated:]):
(-[WKWebView draggingExited:]):
(-[WKWebView prepareForDragOperation:]):
(-[WKWebView performDragOperation:]):
* UIProcess/API/mac/WKView.mm:
(-[WKView _dragImageForView:withImage:at:linkDrag:]):
(-[WKView _setDragImage:at:linkDrag:]): Deleted.
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::setDragImage):
2015-04-13 Alex Christensen <achristensen@webkit.org>
[iOS] Unreviewed build fix after r182760.
* Shared/WebCoreArgumentCoders.cpp:
(IPC::encodeSharedBuffer):
(IPC::decodeSharedBuffer):
Update SharedMemory function names.
2015-04-13 Anders Carlsson <andersca@apple.com>
Rename SharedMemory::create overloads
https://bugs.webkit.org/show_bug.cgi?id=143679
Reviewed by Beth Dakin.
Rename the SharedMemory::create overload that allocates memory to SharedMemory::allocate,
and the SharedMemory::create overload that maps in a handle to SharedMemory::map.
* Platform/SharedMemory.h:
* Platform/mac/SharedMemoryMac.cpp:
(WebKit::SharedMemory::allocate):
(WebKit::SharedMemory::map):
(WebKit::SharedMemory::create): Deleted.
* Shared/ShareableBitmap.cpp:
(WebKit::ShareableBitmap::createShareable):
(WebKit::ShareableBitmap::create):
* Shared/ShareableResource.cpp:
(WebKit::ShareableResource::create):
* Shared/ShareableResource.h:
* Shared/WebCompiledContentExtension.cpp:
(WebKit::WebCompiledContentExtension::createFromCompiledContentExtensionData):
* Shared/WebCompiledContentExtensionData.cpp:
(WebKit::WebCompiledContentExtensionData::decode):
* Shared/WebHitTestResult.cpp:
(WebKit::WebHitTestResult::Data::Data):
(WebKit::WebHitTestResult::Data::decode):
* UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:
(WebKit::WebPasteboardProxy::getPasteboardBufferForType):
(WebKit::WebPasteboardProxy::setPasteboardBufferForType):
* UIProcess/VisitedLinkProvider.cpp:
(WebKit::VisitedLinkProvider::resizeTable):
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::dataSelectionForPasteboard):
(WebKit::WebPageProxy::setPromisedDataForImage):
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::writeItemsToPasteboard):
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::bufferForType):
(WebKit::WebPlatformStrategies::setBufferForType):
* WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
(WebKit::WebDragClient::declareAndWriteDragImage):
* WebProcess/WebPage/VisitedLinkTableController.cpp:
(WebKit::VisitedLinkTableController::setVisitedLinkTable):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::getDataSelectionForPasteboard):
2015-04-13 Brady Eidson <beidson@apple.com>
Share sheets from Share menus appear outside the browser window.
<rdar://problem/20455592> and https://bugs.webkit.org/show_bug.cgi?id=143620
Reviewed by Darin Adler.
Refactor existing Sharing Service Picker code to also be used for the Share menu NSMenuItem.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::internalShowContextMenu):
(WebKit::WebPageProxy::platformInitializeShareMenuItem):
* UIProcess/WebPageProxy.h:
* UIProcess/mac/WKSharingServicePickerDelegate.h: Added.
* UIProcess/mac/WKSharingServicePickerDelegate.mm: Added.
(+[WKSharingServicePickerDelegate sharedSharingServicePickerDelegate]):
(-[WKSharingServicePickerDelegate menuProxy]):
(-[WKSharingServicePickerDelegate setMenuProxy:]):
(-[WKSharingServicePickerDelegate setPicker:]):
(-[WKSharingServicePickerDelegate setFiltersEditingServices:]):
(-[WKSharingServicePickerDelegate setHandlesEditingReplacement:]):
(-[WKSharingServicePickerDelegate sharingServicePicker:sharingServicesForItems:mask:proposedSharingServices:]):
(-[WKSharingServicePickerDelegate sharingServicePicker:delegateForSharingService:]):
(-[WKSharingServicePickerDelegate sharingService:willShareItems:]):
(-[WKSharingServicePickerDelegate sharingService:didShareItems:]):
(-[WKSharingServicePickerDelegate sharingService:sourceWindowForShareItems:sharingContentScope:]):
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::setupServicesMenu):
(+[WKSharingServicePickerDelegate sharedSharingServicePickerDelegate]): Deleted.
(-[WKSharingServicePickerDelegate menuProxy]): Deleted.
(-[WKSharingServicePickerDelegate setMenuProxy:]): Deleted.
(-[WKSharingServicePickerDelegate setPicker:]): Deleted.
(-[WKSharingServicePickerDelegate setIncludeEditorServices:]): Deleted.
(-[WKSharingServicePickerDelegate sharingServicePicker:sharingServicesForItems:mask:proposedSharingServices:]): Deleted.
(-[WKSharingServicePickerDelegate sharingServicePicker:delegateForSharingService:]): Deleted.
(-[WKSharingServicePickerDelegate sharingService:willShareItems:]): Deleted.
(-[WKSharingServicePickerDelegate sharingService:didShareItems:]): Deleted.
(-[WKSharingServicePickerDelegate sharingService:sourceWindowForShareItems:sharingContentScope:]): Deleted.
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::platformInitializeShareMenuItem):
* WebKit2.xcodeproj/project.pbxproj:
2015-04-13 Anders Carlsson <andersca@apple.com>
Begin cleaning up the shared memory interface
https://bugs.webkit.org/show_bug.cgi?id=143677
Reviewed by Andreas Kling.
Rename createFromVMBuffer to create and add a protection parameter (which is currently unused).
Also, turn SharedMemory::Protection into a proper enum class.
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::store):
* NetworkProcess/cache/NetworkCacheEntry.cpp:
(WebKit::NetworkCache::Entry::initializeBufferFromStorageRecord):
* NetworkProcess/mac/NetworkResourceLoaderMac.mm:
(WebKit::tryGetShareableHandleFromCFData):
* Platform/SharedMemory.h:
* Platform/mac/SharedMemoryMac.cpp:
(WebKit::SharedMemory::create):
(WebKit::machProtection):
(WebKit::SharedMemory::createHandle):
(WebKit::SharedMemory::createFromVMBuffer): Deleted.
* Shared/ContextMenuContextData.cpp:
(WebKit::ContextMenuContextData::encode):
(WebKit::ContextMenuContextData::decode):
* Shared/ShareableBitmap.h:
* Shared/ShareableResource.cpp:
(WebKit::ShareableResource::create):
(WebKit::ShareableResource::createHandle):
* Shared/WebCompiledContentExtensionData.cpp:
(WebKit::WebCompiledContentExtensionData::encode):
(WebKit::WebCompiledContentExtensionData::decode):
* Shared/WebHitTestResult.cpp:
(WebKit::WebHitTestResult::Data::encode):
(WebKit::WebHitTestResult::Data::decode):
* UIProcess/API/APIUserContentExtensionStore.cpp:
(API::createExtension):
* UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:
(WebKit::WebPasteboardProxy::getPasteboardBufferForType):
(WebKit::WebPasteboardProxy::setPasteboardBufferForType):
(WebKit::WebPasteboardProxy::readBufferFromPasteboard):
* UIProcess/VisitedLinkProvider.cpp:
(WebKit::VisitedLinkProvider::sendTable):
* UIProcess/mac/WKPrintingView.mm:
(pageDidDrawToImage):
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::dataSelectionForPasteboard):
(WebKit::WebPageProxy::setPromisedDataForImage):
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::writeItemsToPasteboard):
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::bufferForType):
(WebKit::WebPlatformStrategies::setBufferForType):
(WebKit::WebPlatformStrategies::readBufferFromPasteboard):
* WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
(WebKit::WebDragClient::declareAndWriteDragImage):
* WebProcess/WebPage/VisitedLinkTableController.cpp:
(WebKit::VisitedLinkTableController::setVisitedLinkTable):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::takeSnapshot):
(WebKit::WebPage::drawRectToImage):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::getDataSelectionForPasteboard):
2015-04-10 Jon Honeycutt <jhoneycutt@apple.com>
Cannot click "Next" button on Google two-factor auth setup page
<https://bugs.webkit.org/show_bug.cgi?id=143624>
<rdar://problem/19175714>
This issue occurs when this site focuses the submit button. When it
receives focus, we try to assist it. While we consider ourselves to be
assisting it, we ignore further gesture inputs for that node, including
the tap gesture.
To fix this, only assist input types that we know are assistable,
including text fields, select and date elements, etc.
Reviewed by Darin Adler.
* UIProcess/ios/WKContentViewInteraction.mm:
(isAssistableInputType):
If the type is a known-assistable type, return true.
(-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]):
Call isAssistableInputType() to determine whether we should do any kind
of assistance for this node.
2015-04-13 Beth Dakin <bdakin@apple.com>
Add force property to MouseEvents
https://bugs.webkit.org/show_bug.cgi?id=143569
-and corresponding-
rdar://problem/20472954
Reviewed by Darin Adler.
In order to accommodate adding force to all PlatformMouseEvents, we have to add it
to pass a caches pressure event to NativeWebMouseEvent and add force to
WebMouseEvent.
NativeWebMouseEvent now requires a second NSEvent for the pressureEvent.
* Shared/NativeWebMouseEvent.h:
WebMouseEvent takes a force parameter.
* Shared/WebEvent.h:
(WebKit::WebMouseEvent::force):
* Shared/WebEventConversion.cpp:
(WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
* Shared/WebMouseEvent.cpp:
(WebKit::WebMouseEvent::WebMouseEvent):
(WebKit::WebMouseEvent::encode):
(WebKit::WebMouseEvent::decode):
* Shared/mac/NativeWebMouseEventMac.mm:
(WebKit::NativeWebMouseEvent::NativeWebMouseEvent):
* Shared/mac/WebEventFactory.h:
* Shared/mac/WebEventFactory.mm:
(WebKit::WebEventFactory::createWebMouseEvent):
Cache the most recent pressureEvent in _data so that it can be sent along to the
NativeWebMouseEvent constructor.
* UIProcess/API/mac/WKView.mm:
(-[WKView pressureChangeWithEvent:]):
(-[WKView acceptsFirstMouse:]):
(-[WKView shouldDelayWindowOrderingForEvent:]):
(-[WKView _postFakeMouseMovedEventForFlagsChangedEvent:]):
(-[WKView initWithFrame:processPool:configuration:webView:]):
WebMouseEvent takes a force parameter.
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::showContextMenuAtPoint):
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::createWebEvent):
MouseEvent and PlatformMouseEvent both take force parameters too.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::navigateToURLWithSimulatedClick):
(WebKit::WebPage::contextMenuAtPointInWindow):
(WebKit::WebPage::dragEnded):
(WebKit::WebPage::simulateMouseDown):
(WebKit::WebPage::simulateMouseUp):
(WebKit::WebPage::simulateMouseMotion):
The functions that dispatch the force events no longer take a PlatformMouseEvent
as a parameter.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::inputDeviceForceDidChange):
(WebKit::WebPage::immediateActionDidCancel):
2015-04-13 Andreas Kling <akling@apple.com>
Don't segregate heap objects based on Structure immortality.
<https://webkit.org/b/143638>
Reviewed by Darin Adler.
* WebProcess/Plugins/Netscape/JSNPObject.h:
2015-04-13 Timothy Horton <timothy_horton@apple.com>
javascript: links in inline PDFs shouldn't execute JavaScript in the context of the host website
https://bugs.webkit.org/show_bug.cgi?id=143642
<rdar://problem/18259355>
Reviewed by Darin Adler.
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::clickedLink):
Don't follow javascript: URLs.
2015-04-10 Alex Christensen <achristensen@webkit.org>
[Content Extensions] Don't unmap shared memory while using it.
https://bugs.webkit.org/show_bug.cgi?id=143625
Reviewed by Darin Adler.
* Shared/WebCompiledContentExtension.cpp:
(WebKit::WebCompiledContentExtension::createFromCompiledContentExtensionData):
* Shared/WebCompiledContentExtensionData.h:
(WebKit::WebCompiledContentExtensionData::WebCompiledContentExtensionData):
* UIProcess/API/APIUserContentExtensionStore.cpp:
(API::createExtension):
Keep the Data object alive as long as the SharedMemory that uses it.
2015-04-12 Darin Adler <darin@apple.com>
[Cocoa] Localizable strings are inconsistent and need to be regenerated
https://bugs.webkit.org/show_bug.cgi?id=143661
Reviewed by Dan Bernstein.
* UIProcess/WebEditCommandProxy.cpp:
(WebKit::WebEditCommandProxy::nameForEditAction): Also added a comment
about the fact that we have two copies of all the localizable strings.
2015-04-12 Sungmann Cho <sungmann.cho@navercorp.com>
Fix trival typos related to the word "coordinate".
https://bugs.webkit.org/show_bug.cgi?id=143644
Reviewed by Alexey Proskuryakov.
No new tests, no behavior change.
* Shared/WebHitTestResult.cpp:
(WebKit::WebHitTestResult::Data::encode):
(WebKit::WebHitTestResult::Data::decode):
* Shared/WebHitTestResult.h:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performActionMenuHitTestAtLocation):
(WebKit::WebPage::lookupTextAtLocation):
2015-04-12 Sungmann Cho <sungmann.cho@navercorp.com>
Remove PluginModuleInfo.cpp from WebKit2
https://bugs.webkit.org/show_bug.cgi?id=143643
Reviewed by Darin Adler.
Remove PluginModuleInfo.cpp from WebKit2 because it is totally empty.
No new tests, no behavior change.
* CMakeLists.txt:
* Shared/Plugins/PluginModuleInfo.cpp: Removed.
* WebKit2.xcodeproj/project.pbxproj:
2015-04-11 Yusuke Suzuki <utatane.tea@gmail.com>
[ES6] Enable Symbol in web pages
https://bugs.webkit.org/show_bug.cgi?id=143375
Reviewed by Ryosuke Niwa.
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:
* UIProcess/efl/WebInspectorProxyEfl.cpp:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
* UIProcess/gtk/WebInspectorProxyGtk.cpp:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
2015-04-08 Sam Weinig <sam@webkit.org>
Allow LaunchServices to handle URLs on link navigations
<rdar://problem/19446826>
https://bugs.webkit.org/show_bug.cgi?id=143544
Reviewed by Anders Carlsson.
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::tryAppLink):
(WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
Only let LaunchServices have a crack at the URL if the navigation is:
1) a main frame navigation
2) a result of a user gesture
2015-04-10 Tim Horton <timothy_horton@apple.com>
Replace setFixedLayoutSizeEnabled: with an enum of layout modes
https://bugs.webkit.org/show_bug.cgi?id=143576
Reviewed by Simon Fraser.
* UIProcess/API/C/WKLayoutMode.h: Added.
* UIProcess/API/Cocoa/WKViewPrivate.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _layoutMode]):
(-[WKWebView _setLayoutMode:]):
(-[WKWebView _isFixedLayoutEnabled]): Deleted.
(-[WKWebView _setFixedLayoutEnabled:]): Deleted.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/API/Cocoa/_WKLayoutMode.h: Added.
* UIProcess/API/mac/WKView.mm:
(-[WKView _layoutMode]):
(-[WKView _setLayoutMode:]):
(-[WKView _isFixedLayoutEnabled]): Deleted.
(-[WKView _setFixedLayoutEnabled:]): Deleted.
* WebKit2.xcodeproj/project.pbxproj:
Add enums for "layout mode". Currently we have two values: "ViewSize",
which is the normal behavior, and "FixedSize", which is fixed layout mode.
More values will come in the future.
2015-04-10 Anders Carlsson <andersca@apple.com>
_WKWebsiteDataStore doesn't track and remove offline application cache entries
https://bugs.webkit.org/show_bug.cgi?id=143614
rdar://problem/20243235
Reviewed by Andreas Kling.
* Shared/WebsiteData/WebsiteDataTypes.h:
Add WebsiteDataTypeOfflineWebApplicationCache.
* UIProcess/API/Cocoa/_WKWebsiteDataRecord.h:
* UIProcess/API/Cocoa/_WKWebsiteDataRecord.mm:
(dataTypesToString):
* UIProcess/API/Cocoa/_WKWebsiteDataRecordInternal.h:
(WebKit::toWebsiteDataTypes):
(WebKit::toWKWebsiteDataTypes):
Add WKWebsiteDataTypeOfflineWebApplicationCache.
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::fetchData):
Create a custom application cache storage and fetch the origins from it.
(WebKit::WebsiteDataStore::removeData):
Delete either all the cache entries (since we don't track time in the application cache),
or the ones specified by the given entries.
2015-04-10 Eric Carlson <eric.carlson@apple.com>
[Mac] Refactor MediaPlaybackTarget
https://bugs.webkit.org/show_bug.cgi?id=143571
Reviewed by Jer Noble.
Pass a MediaPlaybackTargetContext across process boundary instead of a MediaPlaybackTarget.
* Shared/WebCoreArgumentCoders.h:
(IPC::ArgumentCoder<MediaPlaybackTargetContext>::encode): New.
(IPC::ArgumentCoder<MediaPlaybackTargetContext>::decode): New.
* Shared/mac/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<MediaPlaybackTargetContext>::encodePlatformData): New.
(IPC::ArgumentCoder<MediaPlaybackTargetContext>::decodePlatformData): New.
(IPC::ArgumentCoder<MediaPlaybackTarget>::encode): Deleted.
(IPC::ArgumentCoder<MediaPlaybackTarget>::decode): Deleted.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didChoosePlaybackTarget): Take a Ref<MediaPlaybackTarget>&&.
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::playbackTargetSelected): Take a Ref<MediaPlaybackTarget>&&.
2015-04-10 Hunseop Jeong <hs85.jeong@samsung.com>
Fix some minor typos related to the WebProcessCreationParameter.
https://bugs.webkit.org/show_bug.cgi?id=143598
Reviewed by Csaba Osztrogonác.
No new tests, no behavior change.
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::createNewWebProcess):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):
2015-04-09 Andy Estes <aestes@apple.com>
[Cocoa] Add a HAVE(AVKIT) and use it
https://bugs.webkit.org/show_bug.cgi?id=143593
Reviewed by David Kilzer.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _mayAutomaticallyShowVideoOptimized]): Returned false if !HAVE(AVKIT).
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy): Removed the check for < iOS 8.2.
(WebKit::WebPageProxy::reattachToWebProcess): Ditto.
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::create): Created a version of this function that returns nullptr if
the minimum required version of iOS is less than 8.2 or if !HAVE(AVKIT).
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences): Only called Settings::setAVKitEnabled(true) if HAVE(AVKIT).
2015-04-09 Hunseop Jeong <hs85.jeong@samsung.com>
Use modern loops in WebProcess
https://bugs.webkit.org/show_bug.cgi?id=143302
Reviewed by Darin Adler.
Use modern range for-loops in WebProcess.
No new tests, no behavior change.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeConnection):
(WebKit::WebProcess::initializeWebProcess):
(WebKit::WebProcess::focusedWebPage):
(WebKit::WebProcess::webPageGroup):
(WebKit::WebProcess::setTextCheckerState):
(WebKit::WebProcess::resetAllGeolocationPermissions):
2015-04-09 Gordon Sheridan <gordon_sheridan@apple.com>
Track IconDatabase retain counts for WebContent processes. Balance retain/releases for processes that terminate before successfully doing it themselves.
https://bugs.webkit.org/show_bug.cgi?id=143517.
Reviewed by Brady Eidson.
* UIProcess/WebIconDatabase.messages.in:
Move RetainIconForPageURL and ReleaseIconForPageURL messages to WebProcessProxy so they can be associated with the appropriate web process.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::connectionDidClose):
Call releaseRemainingIconsForPageURLs() to balance retains/releases for this process.
(WebKit::WebProcessProxy::retainIconForPageURL):
Track retain counts for page URLs and call through to WebIconDatabase.
(WebKit::WebProcessProxy::releaseIconForPageURL):
Ditto.
(WebKit::WebProcessProxy::releaseRemainingIconsForPageURLs):
Call releaseIconForPageURL() once for each outstanding retain count, for each page URL.
* UIProcess/WebProcessProxy.h:
Declare methods for retainIconForPageURL(), releaseIconForPageURL(), and releaseRemainingIconsForPageURLs().
Declare hash map to track number of retains per page URL.
* UIProcess/WebProcessProxy.messages.in:
Moved RetainIconForPageURL and ReleaseIconForPageURL messages here from WebIconDatabase.
* WebProcess/IconDatabase/WebIconDatabaseProxy.cpp:
(WebKit::WebIconDatabaseProxy::retainIconForPageURL):
Modify the receiver of the message to be WebProcessProxy.
(WebKit::WebIconDatabaseProxy::releaseIconForPageURL):
Ditto.
2015-04-09 Chris Dumez <cdumez@apple.com>
[WK2] Regression(r182194): The NetworkProcess is calling the wrong memory pressure handler before suspending
https://bugs.webkit.org/show_bug.cgi?id=143575
<rdar://problem/20484338>
Reviewed by Andreas Kling.
After r182194, the NetworkProcess is calling the memory pressure
handler before getting suspended to free-up as much memory as possible
at this point.
However, we were calling the default memory pressure handling code
instead of the custom handler registered by the NetworkProcess. This
patch fixes the problem.
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::lowMemoryHandler):
(WebKit::NetworkProcess::initializeNetworkProcess):
(WebKit::NetworkProcess::processWillSuspend):
* NetworkProcess/NetworkProcess.h:
2015-04-09 Brady Eidson <beidson@apple.com>
REGRESSION (r182573): Action Menus no longer appear for WebKit2 views displaying an image
rdar://problem/20486551 and https://bugs.webkit.org/show_bug.cgi?id=143574
Reviewed by Brent Fulgham.
* Shared/WebHitTestResult.cpp:
(WebKit::WebHitTestResult::Data::Data): Clear up a name scoping issue.
2015-04-09 Chris Dumez <cdumez@apple.com>
[WK2][iOS] editorState() should not cause a synchronous layout
https://bugs.webkit.org/show_bug.cgi?id=142536
<rdar://problem/20041506>
Reviewed by Enrica Casucci.
platformEditorState() on iOS does a synchronous layout to compute some
of the EditorState members (e.g. caretRectAtStart / caretRectAtEnd).
This is bad for performance as this is called every time the selection
is changed (which happens for e.g. when you set the value of a focused
HTMLInputElement).
This patch updates the behavior on iOS to only send a partial EditorState
on selection change so that the UIProcess gets most of the information
(the ones that do not require style recalc or layout) ASAP. A full Editor
state is then sent after the asynchronous layout is done.
With this change, I see a 38% improvement on Speedometer (26.4 +/- 0.37
-> 36.5 +/- 0.54) on iPhone 6 Plus.
* Shared/EditorState.cpp:
(WebKit::EditorState::encode):
(WebKit::EditorState::decode):
(WebKit::EditorState::PostLayoutData::encode):
(WebKit::EditorState::PostLayoutData::decode):
* Shared/EditorState.h:
(WebKit::EditorState::EditorState): Deleted.
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _didCommitLayerTree:]):
* UIProcess/ios/WKContentViewInteraction.mm:
(WebKit::WKSelectionDrawingInfo::WKSelectionDrawingInfo):
(-[WKContentView webSelectionRects]):
(-[WKContentView _addShortcut:]):
(-[WKContentView selectedText]):
(-[WKContentView isReplaceAllowed]):
(-[WKContentView _promptForReplace:]):
(-[WKContentView _transliterateChinese:]):
(-[WKContentView textStylingAtPosition:inDirection:]):
(-[WKContentView canPerformAction:withSender:]):
(-[WKContentView _showDictionary:]):
(-[WKContentView _characterBeforeCaretSelection]):
(-[WKContentView _characterInRelationToCaretSelection:]):
(-[WKContentView _selectionAtDocumentStart]):
(-[WKContentView selectedTextRange]):
(-[WKContentView hasContent]):
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::didChangeSelectionAndUpdateLayout):
* WebProcess/WebCoreSupport/WebEditorClient.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::editorState):
(WebKit::WebPage::didChangeSelection):
(WebKit::WebPage::sendPostLayoutEditorStateIfNeeded):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/efl/WebPageEfl.cpp:
(WebKit::WebPage::platformEditorState):
* WebProcess/WebPage/gtk/WebPageGtk.cpp:
(WebKit::WebPage::platformEditorState):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::platformEditorState):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::platformEditorState):
2015-04-09 Antti Koivisto <antti@apple.com>
Network Cache: Crash in WebCore::CachedResource::tryReplaceEncodedData
https://bugs.webkit.org/show_bug.cgi?id=143562
Reviewed by Anders Carlsson.
If another thread comes and truncates the file before we map it we end up with a map that crashes when accessed.
* NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
(WebKit::NetworkCache::IOChannel::IOChannel):
When creating a new file unlink any existing file instead of using O_TRUNC.
2015-04-09 Csaba Osztrogonác <ossy@webkit.org>
[EFL][GTK] WebKit2's generate-forwarding-headers.pl runs too many times
https://bugs.webkit.org/show_bug.cgi?id=142907
Unreviewed typo fix after r182595.
* PlatformGTK.cmake:
2015-04-09 Csaba Osztrogonác <ossy@webkit.org>
[EFL][GTK] WebKit2's generate-forwarding-headers.pl runs too many times
https://bugs.webkit.org/show_bug.cgi?id=142907
Reviewed by Carlos Garcia Campos.
* PlatformEfl.cmake:
* PlatformGTK.cmake:
* Scripts/generate-forwarding-headers.pl: Make it work with more path and platform arguments.
2015-04-08 Joseph Pecoraro <pecoraro@apple.com>
Exception in console and broken right click after attempting to show context menu in Inspector
https://bugs.webkit.org/show_bug.cgi?id=143556
Reviewed by Brady Eidson.
* Shared/mac/NativeContextMenuItem.mm:
(WebKit::NativeContextMenuItem::NativeContextMenuItem):
Add an ASSERT to immediately catch a menu item created with a nil native menu item.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::internalShowContextMenu):
Gracefully handle a null share context menu item.
2015-04-08 Brent Fulgham <bfulgham@apple.com>
[Mac] Unreviewed test fix after r182584
https://bugs.webkit.org/show_bug.cgi?id=143452
Correct bit comparison to use the correct value for the Control-key
* Shared/mac/WebEventFactory.mm:
(WebKit::typeForEvent):
2015-04-08 Jaehun Lim <ljaehun.lim@samsung.com>
[EFL] Create PageUIClientEfl after sending CreateWebPage message
https://bugs.webkit.org/show_bug.cgi?id=143514
Reviewed by Gyuyoung Kim.
UIProcess sends some messages to WebPage before WebPage is created. It makes some error logs on debug build.
So this patch moves the initialization of m_pageUIClient after calling WKViewInitialize().
* UIProcess/API/efl/EwkView.cpp:
(EwkView::EwkView):
2015-04-08 Brent Fulgham <bfulgham@apple.com>
[Mac] WebKit is not honoring OS preferences for secondary click behaviors
https://bugs.webkit.org/show_bug.cgi?id=143452
<rdar://problem/20437483>
Reviewed by Tim Horton.
We cannot rely on the event's button number to decide behavior. The OS settings might have
mapped middle button to context menu, etc. Instead, we should ask the OS (via NSMenu) what
the proper button press behavior is.
* Shared/mac/WebEventFactory.mm:
(WebKit::mouseButtonForEvent): Ask NSMenu what kind of button press we have received.
2015-04-08 Brady Eidson <beidson@apple.com>
Expose the "Share" menu for links, images, and media.
<rdar://problem/20435340> and https://bugs.webkit.org/show_bug.cgi?id=143502
Reviewed by Tim Horton.
* Shared/ContextMenuContextData.cpp:
(WebKit::ContextMenuContextData::ContextMenuContextData):
* Shared/WebHitTestResult.cpp:
(WebKit::WebHitTestResult::Data::Data):
* Shared/WebHitTestResult.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::internalShowContextMenu):
* WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
(WebKit::WebContextMenuClient::shareMenuItem):
* WebProcess/WebCoreSupport/WebContextMenuClient.h:
* WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
(WebKit::WebContextMenuClient::shareSelectedTextMenuItem): Deleted.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performActionMenuHitTestAtLocation):
2015-04-08 Anders Carlsson <andersca@apple.com>
Add encoding and decoding of ints to WKRemoteObjectCoder
https://bugs.webkit.org/show_bug.cgi?id=143538
Reviewed by Tim Horton.
* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(-[WKRemoteObjectEncoder encodeInt:forKey:]):
(-[WKRemoteObjectDecoder decodeIntForKey:]):
2015-04-08 Anders Carlsson <andersca@apple.com>
Delete ApplicationCache static member functions
https://bugs.webkit.org/show_bug.cgi?id=143534
Reviewed by Tim Horton.
* WebProcess/ApplicationCache/WebApplicationCacheManager.cpp:
(WebKit::WebApplicationCacheManager::deleteEntriesForOrigin):
(WebKit::WebApplicationCacheManager::deleteAllEntries):
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::clearApplicationCacheForOrigin):
(WebKit::InjectedBundle::appCacheUsageForOrigin):
2015-04-08 Enrica Casucci <enrica@apple.com>
32-bit build fix after r182554.
* UIProcess/API/mac/WKView.mm:
(-[WKView resignFirstResponder]):
2015-04-08 Beth Dakin <bdakin@apple.com>
Force events should not require preventDefault in order to fire
https://bugs.webkit.org/show_bug.cgi?id=143503
-and corresponding-
rdar://problem/20458916
Reviewed by Tim Horton.
We no longer need m_lastActionMenuHitTestPreventsDefault since well always
dispatch the events to Element.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performActionMenuHitTestAtLocation):
(WebKit::WebPage::inputDeviceForceDidChange):
(WebKit::WebPage::immediateActionDidCancel):
2015-04-08 Enrica Casucci <enrica@apple.com>
Calling makeFirstResponder on WKWebView doesn't work.
https://bugs.webkit.org/show_bug.cgi?id=143482
rdar://problem/20298166
Reviewed by Dan Bernstein.
Adding forwarding of the responder status to the WKView.
We also need to avoid doing any cleanup in resignFirstResponder
if we know we are about to regain responder status again.
Same goes for becomeFirstResponder.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView becomeFirstResponder]):
(-[WKWebView acceptsFirstResponder]):
* UIProcess/API/mac/WKView.mm:
(-[WKView becomeFristResponder]):
(-[WKView resignFirstResponder]):
2015-04-07 Tim Horton <timothy_horton@apple.com>
Fix the build.
* UIProcess/API/mac/WKView.mm:
(-[WKView _setFixedLayoutSize:]):
2015-04-07 Tim Horton <timothy_horton@apple.com>
Expose and test fixedLayoutSize via modern WebKit SPI
https://bugs.webkit.org/show_bug.cgi?id=143500
Reviewed by Simon Fraser.
* UIProcess/API/Cocoa/WKViewPrivate.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _isFixedLayoutEnabled]):
(-[WKWebView _setFixedLayoutEnabled:]):
(-[WKWebView _fixedLayoutSize]):
(-[WKWebView _setFixedLayoutSize:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView _isFixedLayoutEnabled]):
(-[WKView _setFixedLayoutEnabled:]):
(-[WKView _fixedLayoutSize]):
(-[WKView _setFixedLayoutSize:]):
Add API for adjusting the fixed layout size, and whether or not we use it.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
Repair a mistake I made in r139822, where I brought odd TILED_BACKING_STORE-only
logic (which disables scrollbars if fixedLayoutSize is enabled) to the rest of the ports.
Put it back as TILED_BACKING_STORE-only.
Persist the fixedLayoutSize through view creation; we already persist the enabled state,
but not the size, which doesn't make any sense.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::fixedLayoutSize):
* WebProcess/WebPage/WebPage.h:
Add a fixedLayoutSize() getter.
2015-04-07 Brady Eidson <beidson@apple.com>
ContextMenuItem refactoring
https://bugs.webkit.org/show_bug.cgi?id=143485
Reviewed by Beth Dakin.
* Shared/mac/NativeContextMenuItem.mm:
(WebKit::NativeContextMenuItem::NativeContextMenuItem):
2015-04-07 Simon Fraser <simon.fraser@apple.com>
Add a new setting, AntialiasedFontDilationEnabled, exposed via WK2.
https://bugs.webkit.org/show_bug.cgi?id=143495
Reviewed by Tim Horton.
Exposed the antialiasedFontDilationEnabled setting via WK C SPI and Objective-C SPI.
* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetAntialiasedFontDilationEnabled):
(WKPreferencesGetAntialiasedFontDilationEnabled):
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _antialiasedFontDilationEnabled]):
(-[WKPreferences _setAntialiasedFontDilationEnabled:]):
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
2015-04-07 Beth Dakin <bdakin@apple.com>
Should only propagate pressure events with relevant phases
https://bugs.webkit.org/show_bug.cgi?id=143494
-and corresponding-
rdar://problem/20453738
Reviewed by Tim Horton.
We only care about the changed, began, and ended phases.
* UIProcess/API/mac/WKView.mm:
(-[WKView pressureChangeWithEvent:]):
2015-04-07 Jer Noble <jer.noble@apple.com>
Unreviewed build fix; make calls to new SPI conditional on iOS version.
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::setVideoLayerFrame):
2015-04-06 Anders Carlsson <andersca@apple.com>
Create the web inspector process pool lazily
https://bugs.webkit.org/show_bug.cgi?id=143456
rdar://problem/20146520
Reviewed by Mark Lam.
Add and implement WebInspectorProxy::isInspectorProcessPool instead of always creating the inspector process pool
when trying to determine if a given process pool is the inspector process pool.
This should speed up initialization somewhat and avoid creating a storage manager for example.
* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::inspectorProcessPool):
(WebKit::WebInspectorProxy::isInspectorProcessPool):
* UIProcess/WebInspectorProxy.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::getLaunchOptions):
2015-04-06 Brady Eidson <beidson@apple.com>
Combine ActionMenuHitTestResult with WebHitTestResult
https://bugs.webkit.org/show_bug.cgi?id=143444
Reviewed by Beth Dakin.
* Shared/mac/ActionMenuHitTestResult.h: Removed.
* Shared/mac/ActionMenuHitTestResult.mm: Removed.
* Shared/WebHitTestResult.cpp:
(WebKit::WebHitTestResult::Data::Data):
(WebKit::WebHitTestResult::Data::encode):
(WebKit::WebHitTestResult::Data::decode):
(WebKit::WebHitTestResult::Data::platformEncode):
(WebKit::WebHitTestResult::Data::platformDecode):
* Shared/WebHitTestResult.h:
* Shared/mac/WebHitTestResult.mm: Added.
(WebKit::WebHitTestResult::Data::platformEncode):
(WebKit::WebHitTestResult::Data::platformDecode):
* UIProcess/API/mac/WKView.mm:
(-[WKView _didPerformActionMenuHitTest:forImmediateAction:contentPreventsDefault:userData:]):
(-[WKView _didPerformActionMenuHitTest:forImmediateAction:userData:]): Deleted.
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didPerformActionMenuHitTest):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::didPerformActionMenuHitTest):
* UIProcess/mac/WKActionMenuController.h:
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController willDestroyView:]):
(-[WKActionMenuController _clearActionMenuState]):
(-[WKActionMenuController didPerformActionMenuHitTest:userData:]):
(-[WKActionMenuController _hitTestResultDataImage]):
(-[WKActionMenuController _defaultMenuItemsForImage]):
(-[WKActionMenuController _copyImage:]):
(-[WKActionMenuController _addImageToPhotos:]):
(-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
(-[WKActionMenuController _defaultMenuItemsForEditableTextWithSuggestions]):
(-[WKActionMenuController _defaultMenuItemsForDataDetectableLink]):
(-[WKActionMenuController _webHitTestResult]):
(-[WKActionMenuController _defaultMenuItems]):
(-[WKActionMenuController _hitTestResultImage]): Deleted.
* UIProcess/mac/WKImmediateActionController.h:
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController willDestroyView:]):
(-[WKImmediateActionController _clearImmediateActionState]):
(-[WKImmediateActionController didPerformActionMenuHitTest:contentPreventsDefault:userData:]):
(-[WKImmediateActionController immediateActionRecognizerDidUpdateAnimation:]):
(-[WKImmediateActionController _webHitTestResult]):
(-[WKImmediateActionController _defaultAnimationController]):
(-[WKImmediateActionController _updateImmediateActionItem]):
(-[WKImmediateActionController _menuItemForDataDetectedText]):
(-[WKImmediateActionController _animationControllerForText]):
(-[WKImmediateActionController didPerformActionMenuHitTest:userData:]): Deleted.
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performActionMenuHitTestAtLocation):
2015-04-06 Jer Noble <jer.noble@apple.com>
Synchronize fullscreen animation between processes.
https://bugs.webkit.org/show_bug.cgi?id=143131
Reviewed by Simon Fraser.
Support synchronize resizing by animating within the UIProcess. Since setVideoLayerFrameFenced() is now only
ever called from within a 0-duration transaction, make that the official contract of the function and wrap
the WebProcess side of that method in its own 0-duration transaction.
* Platform/spi/ios/BackBoardServicesSPI.h: Added.
* Platform/spi/ios/UIKitSPI.h:
* UIProcess/ios/WebVideoFullscreenManagerProxy.h:
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID): Remember the initial rect.
(WebKit::WebVideoFullscreenManagerProxy::videoLayerFrame): Added; simple getter.
(WebKit::WebVideoFullscreenManagerProxy::setVideoLayerFrame): Use a different synchronization fence primative.
Save the cached frame value.
(WebKit::WebVideoFullscreenManagerProxy::videoLayerGravity): Added; simple getter.
(WebKit::WebVideoFullscreenManagerProxy::setVideoLayerGravity): Save the cached gravity value.
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/ios/WebVideoFullscreenManager.mm:
(WebKit::WebVideoFullscreenManager::setVideoLayerFrameFenced): Wrap in a 0-length transaction.
2015-04-06 Chris Dumez <cdumez@apple.com>
[WK2][iOS] Regression(r182323): ASSERTION FAILED: WebCore::SQLiteDatabaseTracker::hasTransactionInProgress() in NetworkCache::Statistics::initialize()
https://bugs.webkit.org/show_bug.cgi?id=143451
<rdar://problem/20437994>
Reviewed by Anders Carlsson.
Initialize WebProcess::m_webSQLiteDatabaseTracker and
NetworkProcess::m_webSQLiteDatabaseTracker in their respective class
constructors instead of doing it later in the initializeWebProcess() /
initializeNetworkProcess() methods.
If we do it later, it can happen that the tracker gets set after
a SQLiteTransactionInProgressAutoCounter initialization and before
the actual transaction. When this happens, the
SQLiteTransactionInProgressAutoCounter variable fails to increment the
transaction count. Then when the transaction is executed,
SQLiteDatabaseTracker::hasTransactionInProgress() can return false.
This would lead to possible assertions on start up on iOS.
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::NetworkProcess):
(WebKit::NetworkProcess::initializeNetworkProcess):
* NetworkProcess/NetworkProcess.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess):
(WebKit::WebProcess::initializeConnection):
* WebProcess/WebProcess.h:
2015-04-06 Beth Dakin <bdakin@apple.com>
https://trac.webkit.org/changeset/182338 introduced a build failure that I
attempted to fix with https://trac.webkit.org/changeset/182341 , but that disabled
the feature accidentally. This should do the right thing.
* UIProcess/API/mac/WKView.mm:
(-[WKView pressureChangeWithEvent:]):
2015-04-06 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r182296.
https://bugs.webkit.org/show_bug.cgi?id=143448
This will disturb network cache efficacy logging, we should
reland this later. (Requested by cdumez__ on #webkit).
Reverted changeset:
"[WK2][NetworkCache] Drop HTTP method from NetworkCache::Key"
https://bugs.webkit.org/show_bug.cgi?id=143348
http://trac.webkit.org/changeset/182296
2015-04-06 Žan Doberšek <zdobersek@igalia.com>
[WK2] API::Array::copy() should move the resulting Vector<> of copies into the Array::create() call
https://bugs.webkit.org/show_bug.cgi?id=143413
Reviewed by Darin Adler.
Move the Vector<> object containing the copied elements into the Array::create()
call, avoiding copying all the elements again.
While here, change the Vector<> parameters for Array::create() and the Array
constructor to rvalue references. This will ensure that the passed-in object
is moved into the Array::create() call if possible, or explicitly copied
otherwise. The constructor is moved into the header for inlining opportunities
and the unnecessary parameter in the create(Vector<>&&) method declaration
removed.
* Shared/API/APIArray.cpp:
(API::Array::create):
(API::Array::copy):
(API::Array::Array): Deleted.
* Shared/API/APIArray.h:
2015-04-06 Žan Doberšek <zdobersek@igalia.com>
UserScript, UserStyleSheet constructors should take in Vector<String> rvalues
https://bugs.webkit.org/show_bug.cgi?id=143411
Reviewed by Darin Adler.
Move the whitelist and blacklist Vector<String> objects into the
UserScript and UserStyleSheet constructors in ArgumentCoder<T>::decode
functions.
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<UserStyleSheet>::decode):
(IPC::ArgumentCoder<UserScript>::decode):
2015-04-05 Darin Adler <darin@apple.com>
[Mac] Spins seen in WKSetApplicationInformationItem, so it should not be called on the main thread
https://bugs.webkit.org/show_bug.cgi?id=143423
rdar://problem/18773785
Reviewed by Alexey Proskuryakov.
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::origin): Factored out this helper function from updateActivePages below, so
the function below is easier to read.
(WebKit::WebProcess::updateActivePages): Refactored to use the new origin function.
Use dispatch_async to call WKSetApplicationInformationItem without blocking.
2015-04-05 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Use constants of sqlite3 directly for status of SQL result in webdatabase
https://bugs.webkit.org/show_bug.cgi?id=143329
Reviewed by Darin Adler.
In webdatabase, it has used own constant variables as well as using sqlite3 constants directly.
If sqlite3 constants are changed in the library, we should modify many files as well. Besides
it can cause to use if~else statement which consumes more cpu cycles compared to switch~case.
* DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
(WebKit::SQLiteIDBCursor::createSQLiteStatement):
(WebKit::SQLiteIDBCursor::resetAndRebindStatement):
(WebKit::SQLiteIDBCursor::bindArguments):
(WebKit::SQLiteIDBCursor::internalAdvanceOnce):
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
(WebKit::createOrMigrateRecordsTableIfNecessary):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::createAndPopulateInitialMetadata):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::extractExistingMetadata):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::changeDatabaseVersion):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::createObjectStore):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteObjectStore):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::clearObjectStore):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::createIndex):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteIndex):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::generateKeyNumber):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::updateKeyGeneratorNumber):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::keyExistsInObjectStore):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::putRecord):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::uncheckedPutIndexRecord):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteRecord):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::getKeyRecordFromObjectStore):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::getKeyRangeRecordFromObjectStore):
* NetworkProcess/cache/NetworkCacheStatistics.cpp:
(WebKit::NetworkCache::executeSQLStatement):
(WebKit::NetworkCache::Statistics::initialize):
(WebKit::NetworkCache::Statistics::queryWasEverRequested):
(WebKit::NetworkCache::Statistics::addHashesToDatabase):
(WebKit::NetworkCache::Statistics::addStoreDecisionsToDatabase):
* UIProcess/Storage/LocalStorageDatabase.cpp:
(WebKit::LocalStorageDatabase::importItems):
(WebKit::LocalStorageDatabase::updateDatabaseWithChangedItems):
(WebKit::LocalStorageDatabase::databaseIsEmpty):
* UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
(WebKit::LocalStorageDatabaseTracker::deleteAllDatabases):
(WebKit::LocalStorageDatabaseTracker::importOriginIdentifiers):
(WebKit::LocalStorageDatabaseTracker::addDatabaseWithOriginIdentifier):
(WebKit::LocalStorageDatabaseTracker::removeDatabaseWithOriginIdentifier):
(WebKit::LocalStorageDatabaseTracker::pathForDatabaseWithOriginIdentifier):
* WebProcess/Cookies/soup/WebKitSoupCookieJarSqlite.cpp:
(webkitSoupCookieJarSqliteLoad):
(webkitSoupCookieJarSqliteInsertCookie):
(webkitSoupCookieJarSqliteDeleteCookie):
2015-04-05 Simon Fraser <simon.fraser@apple.com>
Remove "go ahead and" from comments
https://bugs.webkit.org/show_bug.cgi?id=143421
Reviewed by Darin Adler, Benjamin Poulain.
Remove the phrase "go ahead and" from comments where it doesn't add
anything (which is almost all of them).
* Platform/unix/EnvironmentUtilities.cpp:
(WebKit::EnvironmentUtilities::stripValuesEndingWithString):
* PluginProcess/PluginProcess.cpp:
(WebKit::PluginProcess::didClose):
* UIProcess/API/mac/WKView.mm:
(-[WKView insertText:replacementRange:]):
(-[WKView _pluginFocusOrWindowFocusChanged:pluginComplexTextInputIdentifier:]):
* UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
(WebKit::LocalStorageDatabaseTracker::removeDatabaseWithOriginIdentifier):
2015-04-05 Antti Koivisto <antti@apple.com>
Bloom filter should support longer hashes
https://bugs.webkit.org/show_bug.cgi?id=143419
Reviewed by Dan Bernstein.
Use the hash digest directly in the contents filter instead of going via shortHash.
* NetworkProcess/cache/NetworkCacheKey.h:
(WebKit::NetworkCache::Key::hash):
(WebKit::NetworkCache::Key::shortHash): Deleted.
(WebKit::NetworkCache::Key::toShortHash): Deleted.
No longer needed.
* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::Storage::synchronize):
(WebKit::NetworkCache::Storage::addToContentsFilter):
(WebKit::NetworkCache::Storage::mayContain):
* NetworkProcess/cache/NetworkCacheStorage.h:
2015-04-05 Antti Koivisto <antti@apple.com>
Network cache Bloom filter is too big
https://bugs.webkit.org/show_bug.cgi?id=143400
Follow-up: Fix an ineffective assert.
* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::Storage::setMaximumSize): Average resource size is closer to 50KB than 50MB.
2015-04-05 Antti Koivisto <antti@apple.com>
Rename Cache::setMaximumSize to setCapacity
https://bugs.webkit.org/show_bug.cgi?id=143418
Reviewed by Dan Bernstein.
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::setCapacity):
(WebKit::NetworkCache::Cache::setMaximumSize): Deleted.
* NetworkProcess/cache/NetworkCache.h:
* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::Storage::retrieve):
(WebKit::NetworkCache::Storage::store):
(WebKit::NetworkCache::Storage::update):
(WebKit::NetworkCache::Storage::setCapacity):
(WebKit::NetworkCache::Storage::shrinkIfNeeded):
(WebKit::NetworkCache::Storage::shrink):
(WebKit::NetworkCache::Storage::setMaximumSize): Deleted.
* NetworkProcess/cache/NetworkCacheStorage.h:
* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::platformSetCacheModel):
2015-04-04 Antti Koivisto <antti@apple.com>
Network cache Bloom filter is too big
https://bugs.webkit.org/show_bug.cgi?id=143400
Reviewed by Chris Dumez.
It is currently 1MB.
This patch switches the cache from a counting filter (CountingBloomFilter) to a bit filter (BloomFilter).
It also reduces the filter size from 2^20 to 2^18 elements which is good for ~26000 cache entries while
still keeping false positive rate below 1%. The current cache capacity allows around 4000 entries
with typical web contents.
The new filter size is 32KB.
* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::Storage::Storage):
(WebKit::NetworkCache::Storage::synchronize):
Turn initialization function into general purpose synchronization function.
(WebKit::NetworkCache::Storage::addToContentsFilter):
Collect newly added hashes so we don't miss entries that were added during synchronization.
(WebKit::NetworkCache::Storage::mayContain):
(WebKit::NetworkCache::Storage::remove):
(WebKit::NetworkCache::Storage::retrieve):
(WebKit::NetworkCache::Storage::store):
(WebKit::NetworkCache::Storage::dispatchPendingWriteOperations):
(WebKit::NetworkCache::Storage::dispatchFullWriteOperation):
(WebKit::NetworkCache::Storage::dispatchHeaderWriteOperation):
(WebKit::NetworkCache::Storage::setMaximumSize):
(WebKit::NetworkCache::Storage::clear):
(WebKit::NetworkCache::Storage::shrinkIfNeeded):
(WebKit::NetworkCache::Storage::shrink):
Non-counting Bloom filter does not support removals so this requires a new strategy.
Shrink code now simply deletes entries. The filter is updated by calling synchronize() at the end.
While we could synchronize the filter during traversal it is better to just have one function for that.
(WebKit::NetworkCache::Storage::initialize): Deleted.
* NetworkProcess/cache/NetworkCacheStorage.h:
(WebKit::NetworkCache::Storage::mayContain):
(WebKit::NetworkCache::Storage::cacheMayContain): Deleted.
2015-04-04 Andy Estes <aestes@apple.com>
[Content Filtering] Blocked page is not always displayed when it should be
https://bugs.webkit.org/show_bug.cgi?id=143410
Reviewed by Andreas Kling.
* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::didStartProvisionalLoad): Stopped clearing m_contentFilterUnblockHandler here.
(WebKit::WebFrameProxy::didHandleContentFilterUnblockNavigation): Started doing it here instead.
2015-04-04 Chris Dumez <cdumez@apple.com>
[WK2][Cocoa] Add a way to temporarily disable the WebKit Network Cache for testing
https://bugs.webkit.org/show_bug.cgi?id=143392
<rdar://problem/20315669>
Reviewed by Antti Koivisto.
Add a way to temporarily disable the WebKit Network Cache for testing.
It will be used temporarily for comparing page load times with and
without the WebKit network disk cache enabled.
This is in addition to the existing "WebKitNetworkCacheEnabled"
NSUserDefaults:
webkitNetworkCacheIsEnabled = [defaults boolForKey:WebKitNetworkCacheEnabledDefaultsKey]
&& ![defaults boolForKey:WebKitNetworkCacheTemporarilyDisabledForTestingKey];
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeNetworkProcess):
2015-04-04 Simon Fraser <simon.fraser@apple.com>
REGRESSION (r182215): Feedly crashes when closing article
https://bugs.webkit.org/show_bug.cgi?id=143405
rdar://problem/20382734, rdar://problem/20395497
Reviewed by Tim Horton.
Calling computeNonFastScrollableRegion() eagerly when scrollable areas come and go
is bad, because it can cause FrameView::layout() to get called in the middle of
RenderObject destruction, which leaves the render tree in a bad state.
Fix by calling computeNonFastScrollableRegion() lazily, just before scrolling tree commit.
AsyncScrollingCoordinator::frameViewNonFastScrollableRegionChanged() now just sets
a flag to say that the non-fast region needs to be recomputed, and that schedules
a scrolling tree commit. When the commit happens, we recompute the region. If the
region didn't change, and no other changes are pending, there's no need to commit.
* WebProcess/Scrolling/RemoteScrollingCoordinator.mm:
(WebKit::RemoteScrollingCoordinator::buildTransaction):
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::flushLayers): Outdent #ifdefs.
2015-04-03 Beth Dakin <bdakin@apple.com>
Attempted build fix.
* UIProcess/API/mac/WKView.mm:
2015-04-03 Simon Fraser <simon.fraser@apple.com>
Fix the firing of the ReachedSessionRestorationRenderTreeSizeThreshold milestone on iOS
https://bugs.webkit.org/show_bug.cgi?id=143394
Reviewed by Tim Horton.
A client reshuffle at some point broke the dispatch of the ReachedSessionRestorationRenderTreeSizeThreshold
milestone. Fix by using WebPageProxy::didLayout() to fire the milestone.
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::didCommitLayerTree):
2015-04-03 Beth Dakin <bdakin@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=143387
Improvements to webkitmouseforce web API
-and corresponding-
rdar://problem/20281808
rdar://problem/20281853
Reviewed by Darin Adler.
This patch:
1. Dispatches webkitmouseforceup and webkitmouseforceclick at the right time.
2. Dispatches webkitmouseforcechanged from mousedown all the way through through
mouseup.
3. Uses force values from pressureChangeWithEvent instead of the immediate action
gesture recognizer.
Listen for this NSResponder method, and pass the relevant info to WebPageProxy to
dispatch to the web process.
* UIProcess/API/mac/WKView.mm:
(-[WKView pressureChangeWithEvent:]):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::inputDeviceForceDidChange):
(WebKit::WebPageProxy::immediateActionDidUpdate):
* UIProcess/WebPageProxy.h:
The web process still needs to know when the immediate action gesture recognizer
is updating, but it doesnt need the force information. That will come from
pressureChangeWithEvent.
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController immediateActionRecognizerDidUpdateAnimation:]):
Cache m_lastForceStage so that we can determine if we are
transitioning to a new stage.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
* WebProcess/WebPage/WebPage.h:
New message for InputDeviceForceDidChange and modified message for
ImmediateActionDidUpdate
* WebProcess/WebPage/WebPage.messages.in:
inputDeviceForceDidChange now takes care of dispatching mouseforcechanged,
mouseforcedown, mouseforceup, and mouseforceclick.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::inputDeviceForceDidChange):
We still need to keep track of the ImmediateActionStages in WebCore::EventHandler
so that we can have the right default behavior on mouseup based on whether or not
that action began and was completed. (In other words, to ensure we dont navigate
to a link after force clicking it.)
(WebKit::WebPage::immediateActionDidUpdate):
(WebKit::WebPage::immediateActionDidComplete):
2015-04-03 Said Abou-Hallawa <sabouhallawa@apple.com>
InjectedBundleNodeHandle::renderedImage() needs to be exposed from the Cocoa WebAPI layer.
https://bugs.webkit.org/show_bug.cgi?id=143341.
Reviewed by Anders Carlsson.
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.h:
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:
(-[WKWebProcessPlugInNodeHandle renderedImageWithOptions:]): Expose rendered
image injected bundle API from the Cocoa layer. A node in the page can be
rendered to an NSImage on MacOS and to a UIImage on iOS.
2015-04-03 Chris Dumez <cdumez@apple.com>
[WK2][iOS] We should prevent NetworkProcess suspension while it has pending SQL transactions
https://bugs.webkit.org/show_bug.cgi?id=143278
<rdar://problem/20180799>
Reviewed by Anders Carlsson.
Prevent NetworkProcess suspension while it has pending SQL transactions,
similarly to what we already did for WebProcesses. This patch moves the
WebSQLiteDatabaseTracker from WebProcess/ to Shared/ and make it usable
by the NetworkProcess class as well.
Whenever there are locked files to due SQL transactions, the
NetworkProcess will send an IPC message to the NetworkProcessProxy
which will hold a background process assertion until the NetworkProcess'
SQL transactions are complete. This way, it is no longer possible for
the NetworkProcess to get suspended while SQL transactions are running
and a database file is locked.
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::initializeNetworkProcess):
* NetworkProcess/NetworkProcess.h:
* Shared/WebSQLiteDatabaseTracker.cpp: Renamed from Source/WebKit2/WebProcess/WebCoreSupport/WebSQLiteDatabaseTracker.cpp.
(WebKit::WebSQLiteDatabaseTracker::WebSQLiteDatabaseTracker):
(WebKit::m_childProcessType):
(WebKit::WebSQLiteDatabaseTracker::willBeginFirstTransaction):
(WebKit::WebSQLiteDatabaseTracker::didFinishLastTransaction):
(WebKit::WebSQLiteDatabaseTracker::hysteresisUpdated):
* Shared/WebSQLiteDatabaseTracker.h: Renamed from Source/WebKit2/WebProcess/WebCoreSupport/WebSQLiteDatabaseTracker.h.
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::didClose):
(WebKit::NetworkProcessProxy::setIsHoldingLockedFiles):
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/Network/NetworkProcessProxy.messages.in:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess):
(WebKit::WebProcess::initializeConnection):
* WebProcess/WebProcess.h:
2015-04-03 Antti Koivisto <antti@apple.com>
Add non-counting Bloom filter implementation
https://bugs.webkit.org/show_bug.cgi?id=143366
Reviewed by Sam Weinig.
* NetworkProcess/cache/NetworkCacheStorage.h:
2015-04-03 Zan Dobersek <zdobersek@igalia.com>
Fix the EFL and GTK build after r182243
https://bugs.webkit.org/show_bug.cgi?id=143361
Reviewed by Csaba Osztrogonác.
* PlatformGTK.cmake: Add a custom command that copies the
InspectorBackendCommands.js file into the proper directory
under DerivedSources/WebInspectorUI/.
2015-04-03 Philippe Normand <pnormand@igalia.com>
Unreviewed, GTK build fix.
* UIProcess/API/gtk/WebKitContextMenuClient.cpp:
* UIProcess/gtk/WebContextMenuProxyGtk.cpp:
* UIProcess/gtk/WebContextMenuProxyGtk.h:
2015-04-02 Csaba Osztrogonác <ossy@webkit.org>
Typo fix.
* PlatformGTK.cmake:
2015-04-02 Csaba Osztrogonác <ossy@webkit.org>
URTBF after r182303, stub NativeContextMenuItem implemetations added for EFL and GTK.
* PlatformEfl.cmake:
* PlatformGTK.cmake:
* Shared/efl/NativeContextMenuItemEfl.cpp: Added.
(WebKit::NativeContextMenuItem::NativeContextMenuItem):
* Shared/gtk/NativeContextMenuItemGtk.cpp: Added.
(WebKit::NativeContextMenuItem::NativeContextMenuItem):
2015-04-02 Timothy Horton <timothy_horton@apple.com>
De-PLATFORM(IOS)-ify LayerHostingContext::setFencePort
https://bugs.webkit.org/show_bug.cgi?id=143342
* Platform/mac/LayerHostingContext.h:
* Platform/mac/LayerHostingContext.mm:
Actually, not available on Mavericks. Fix the build.
2015-04-02 Brady Eidson <beidson@apple.com>
Unreviewed: Re-applied change after rollout.
Expose the "Share" menu for text selections on platforms where it's available.
rdar://problem/20034174 and https://bugs.webkit.org/show_bug.cgi?id=143318
* Shared/API/c/WKContextMenuItemTypes.h: Add a constant for the Share menu.
* Shared/API/c/WKSharedAPICast.h:
(WebKit::toAPI):
(WebKit::toImpl):
* Shared/ContextMenuContextData.cpp:
(WebKit::ContextMenuContextData::ContextMenuContextData):
(WebKit::ContextMenuContextData::encode):
(WebKit::ContextMenuContextData::decode):
* Shared/ContextMenuContextData.h:
(WebKit::ContextMenuContextData::selectedText):
Add a "cross platform" menu item wrapper, right now only for NSMenuItem.
* Shared/NativeContextMenuItem.h:
(WebKit::NativeContextMenuItem::~NativeContextMenuItem):
(WebKit::NativeContextMenuItem::nsMenuItem):
* Shared/mac/NativeContextMenuItem.mm:
(WebKit::NativeContextMenuItem::NativeContextMenuItem):
Let WebContextMenuItem hold on to a NativeContextMenuItem to maintain full fidelity of the platform.
* Shared/WebContextMenuItem.cpp:
(WebKit::WebContextMenuItem::WebContextMenuItem):
* Shared/WebContextMenuItem.h:
(WebKit::WebContextMenuItem::create):
(WebKit::WebContextMenuItem::nativeContextMenuItem):
* UIProcess/API/APIContextMenuClient.h:
(API::ContextMenuClient::getContextMenuFromProposedMenu):
(API::ContextMenuClient::showContextMenu):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageContextMenuClient):
* UIProcess/WebContextMenuProxy.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::internalShowContextMenu): Translate the placeholder item from the web process into the
native Share menu before consulting the context menu client. Also create the API items here so the native NSMenuItem
can be attached to them.
* UIProcess/mac/WebContextMenuProxyMac.h:
* UIProcess/mac/WebContextMenuProxyMac.mm:
(-[WKMenuTarget forwardContextMenuAction:]):
(WebKit::nsMenuItem):
(WebKit::nsMenuItemVector):
(WebKit::WebContextMenuProxyMac::populate):
(WebKit::WebContextMenuProxyMac::showContextMenu):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/WebContextMenuClient.h:
* WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
(WebKit::WebContextMenuClient::shareSelectedTextMenuItem): In the web process, mark the Share menu's place in the
context menu with a placeholder item. It will be translated into the real Share menu in the UI process.
2015-04-02 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r182293.
https://bugs.webkit.org/show_bug.cgi?id=143355
Broke GTK and EFL builds. (Requested by bfulgham on #webkit).
Reverted changeset:
"Expose the "Share" menu for text selections on platforms
where it's available."
https://bugs.webkit.org/show_bug.cgi?id=143318
http://trac.webkit.org/changeset/182293
2015-04-02 Chris Dumez <cdumez@apple.com>
[WK2][NetworkCache] Drop HTTP method from NetworkCache::Key
https://bugs.webkit.org/show_bug.cgi?id=143348
Reviewed by Antti Koivisto.
Drop HTTP method from NetworkCache::Key as we only cache GET responses
for now. Even when we start caching HEAD responses, we likely will not
want the method to be part of the key because:
- A HEAD response can be used to update the headers of a previously cached response to GET
- A cached GET response may be used to satisfy subsequent HEAD requests
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::makeCacheKey):
* NetworkProcess/cache/NetworkCacheKey.cpp:
(WebKit::NetworkCache::Key::Key):
(WebKit::NetworkCache::Key::operator=):
(WebKit::NetworkCache::Key::computeHash):
(WebKit::NetworkCache::Key::operator==):
(WebKit::NetworkCache::Key::encode):
(WebKit::NetworkCache::Key::decode):
* NetworkProcess/cache/NetworkCacheKey.h:
(WebKit::NetworkCache::Key::method): Deleted.
2015-04-02 Jer Noble <jer.noble@apple.com>
[Mac][WK2] Fullscreen animation incorrect when initiated on non-primary monitor
https://bugs.webkit.org/show_bug.cgi?id=143237
Reviewed by Brent Fulgham.
The animation calculations have an implicit assumptions of a screen whose origin is 0,0. Account
for the screen origin by passing the window's screen's frame into the zoomAnimation() and maskAnimation()
methods.
* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController initWithWindow:webView:]):
(zoomAnimation):
(maskAnimation):
(-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]):
(-[WKFullScreenWindowController _startExitFullScreenAnimationWithDuration:]):
2015-04-02 Brady Eidson <beidson@apple.com>
Expose the "Share" menu for text selections on platforms where it's available.
rdar://problem/20034174 and https://bugs.webkit.org/show_bug.cgi?id=143318
Reviewed by Sam Weinig.
* Shared/API/c/WKContextMenuItemTypes.h: Add a constant for the Share menu.
* Shared/API/c/WKSharedAPICast.h:
(WebKit::toAPI):
(WebKit::toImpl):
* Shared/ContextMenuContextData.cpp:
(WebKit::ContextMenuContextData::ContextMenuContextData):
(WebKit::ContextMenuContextData::encode):
(WebKit::ContextMenuContextData::decode):
* Shared/ContextMenuContextData.h:
(WebKit::ContextMenuContextData::selectedText):
Add a "cross platform" menu item wrapper, right now only for NSMenuItem.
* Shared/NativeContextMenuItem.h:
(WebKit::NativeContextMenuItem::~NativeContextMenuItem):
(WebKit::NativeContextMenuItem::nsMenuItem):
* Shared/mac/NativeContextMenuItem.mm:
(WebKit::NativeContextMenuItem::NativeContextMenuItem):
Let WebContextMenuItem hold on to a NativeContextMenuItem to maintain full fidelity of the platform.
* Shared/WebContextMenuItem.cpp:
(WebKit::WebContextMenuItem::WebContextMenuItem):
* Shared/WebContextMenuItem.h:
(WebKit::WebContextMenuItem::create):
(WebKit::WebContextMenuItem::nativeContextMenuItem):
* UIProcess/API/APIContextMenuClient.h:
(API::ContextMenuClient::getContextMenuFromProposedMenu):
(API::ContextMenuClient::showContextMenu):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageContextMenuClient):
* UIProcess/WebContextMenuProxy.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::internalShowContextMenu): Translate the placeholder item from the web process into the
native Share menu before consulting the context menu client. Also create the API items here so the native NSMenuItem
can be attached to them.
* UIProcess/mac/WebContextMenuProxyMac.h:
* UIProcess/mac/WebContextMenuProxyMac.mm:
(-[WKMenuTarget forwardContextMenuAction:]):
(WebKit::nsMenuItem):
(WebKit::nsMenuItemVector):
(WebKit::WebContextMenuProxyMac::populate):
(WebKit::WebContextMenuProxyMac::showContextMenu):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/WebContextMenuClient.h:
* WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
(WebKit::WebContextMenuClient::shareSelectedTextMenuItem): In the web process, mark the Share menu's place in the
context menu with a placeholder item. It will be translated into the real Share menu in the UI process.
2015-04-02 Timothy Horton <timothy_horton@apple.com>
De-PLATFORM(IOS)-ify LayerHostingContext::setFencePort
https://bugs.webkit.org/show_bug.cgi?id=143342
Reviewed by Myles C. Maxfield.
* Platform/mac/LayerHostingContext.h:
* Platform/mac/LayerHostingContext.mm:
(WebKit::LayerHostingContext::setFencePort):
There's nothing iOS specific about this.
2015-04-02 Oliver Hunt <oliver@apple.com>
Ensure that we always set network ATS context in the network process
https://bugs.webkit.org/show_bug.cgi?id=143343
Reviewed by Dan Bernstein.
If a custom cache location or size we were early returning before setting
the CFNetwork ATS context. This is clearly an error.
* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
2015-04-02 Alexey Proskuryakov <ap@apple.com>
Make checkURLReceivedFromWebProcess not rely on details of platform URL implementation.
https://bugs.webkit.org/show_bug.cgi?id=143222
rdar://problem/19978997
Reviewed by Sam Weinig.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::checkURLReceivedFromWebProcess):
2015-04-02 Yusuke Suzuki <utatane.tea@gmail.com>
Clean up EnumerationMode to easily extend
https://bugs.webkit.org/show_bug.cgi?id=143276
Reviewed by Geoffrey Garen.
Use default EnumerationMode().
* WebProcess/Plugins/Netscape/NPJSObject.cpp:
(WebKit::NPJSObject::enumerate):
2015-04-02 Chris Dumez <cdumez@apple.com>
[WK2][iOS] Update the WebContent process' sandbox profile for AWD
https://bugs.webkit.org/show_bug.cgi?id=143340
<rdar://problem/20375170>
Reviewed by Alexey Proskuryakov.
Update the WebContent process' sandbox profile for AWD.
* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2015-04-01 Antti Koivisto <antti@apple.com>
Use std::chrono types to represent time in response and cache classes
https://bugs.webkit.org/show_bug.cgi?id=143316
Reviewed by Andreas Kling.
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::didFinishLoading):
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::responseHasExpired):
(WebKit::NetworkCache::responseNeedsRevalidation):
(WebKit::NetworkCache::makeStoreDecision):
(WebKit::NetworkCache::Cache::store):
* NetworkProcess/cache/NetworkCacheEntry.cpp:
(WebKit::NetworkCache::Entry::Entry):
(WebKit::NetworkCache::Entry::asJSON):
* NetworkProcess/cache/NetworkCacheEntry.h:
(WebKit::NetworkCache::Entry::timeStamp):
* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::decodeRecordMetaData):
(WebKit::NetworkCache::decodeRecord):
Sanity check the timestamp on decode.
(WebKit::NetworkCache::encodeRecordMetaData):
(WebKit::NetworkCache::encodeRecordHeader):
(WebKit::NetworkCache::Storage::traverse):
* NetworkProcess/cache/NetworkCacheStorage.h:
* WebProcess/Plugins/PluginView.cpp:
(WebKit::lastModifiedDateMS):
(WebKit::PluginView::Stream::didReceiveResponse):
(WebKit::PluginView::manualLoadDidReceiveResponse):
(WebKit::lastModifiedDate): Deleted.
2015-04-01 Chris Dumez <cdumez@apple.com>
[WK2][Cocoa] Add didFailProvisionalLoadWithErrorForFrame callback to WKWebProcessPlugInLoadDelegate
https://bugs.webkit.org/show_bug.cgi?id=143319
<rdar://problem/19463834>
Reviewed by Dan Bernstein.
Add didFailProvisionalLoadWithErrorForFrame callback to
WKWebProcessPlugInLoadDelegate so that the client side can track all
types page load completions:
- didFailProvisionalLoadWithErrorForFrame
- didFailLoadWithErrorForFrame
- didFinishLoadForFrame
Note that this event is already exposed on UIProcess side via the
WKPageLoaderClient.didFailLoadWithErrorForFrame callback.
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h:
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(didFailProvisionalLoadWithErrorForFrame):
(setUpPageLoaderClient):
2015-04-01 Enrica Casucci <enrica@apple.com>
Injected bundle messages should be at the page level.
https://bugs.webkit.org/show_bug.cgi?id=143283
Reviewed by Alexey Proskuryakov.
All the messages between the injected bundle and the UI
process should be page level messages instead of context.
The author of this patch is Tim Horton, I just finished it.
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageInjectedBundleClient):
* UIProcess/API/C/WKPage.h:
* UIProcess/API/C/WKPageInjectedBundleClient.h: Added.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _pageForTesting]):
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/WebPageInjectedBundleClient.cpp: Added.
(WebKit::WebPageInjectedBundleClient::didReceiveMessageFromInjectedBundle):
(WebKit::WebPageInjectedBundleClient::didReceiveSynchronousMessageFromInjectedBundle):
* UIProcess/WebPageInjectedBundleClient.h: Added.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setInjectedBundleClient):
(WebKit::WebPageProxy::handleMessage):
(WebKit::WebPageProxy::handleSynchronousMessage):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::injectedBundleClient):
* UIProcess/WebPageProxy.messages.in:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::handleMessage):
* WebKit2.xcodeproj/project.pbxproj:
* CMakeLists.txt:
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePagePostMessage):
(WKBundlePagePostSynchronousMessage):
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::postMessage):
(WebKit::WebPage::postSynchronousMessage):
* WebProcess/WebPage/WebPage.h:
2015-04-01 Alexey Proskuryakov <ap@apple.com>
[iOS] WebContent should have access to the entirety of its caches directory
https://bugs.webkit.org/show_bug.cgi?id=143312
rdar://problem/20314916
Reviewed by Oliver Hunt.
* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
* Shared/Network/NetworkProcessCreationParameters.cpp:
(WebKit::NetworkProcessCreationParameters::encode):
(WebKit::NetworkProcessCreationParameters::decode):
* Shared/Network/NetworkProcessCreationParameters.h:
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::networkingCachesDirectory):
(WebKit::WebProcessPool::webContentCachesDirectory):
(WebKit::WebProcessPool::openGLCacheDirectory): Deleted.
(WebKit::WebProcessPool::networkingHSTSDatabasePath): Deleted.
(WebKit::WebProcessPool::webContentHSTSDatabasePath): Deleted.
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::ensureNetworkProcess):
(WebKit::WebProcessPool::createNewWebProcess):
* UIProcess/WebProcessPool.h:
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):
2015-04-01 Timothy Horton <timothy_horton@apple.com>
Smart magnification gesture sometimes shoots to the middle of the page
https://bugs.webkit.org/show_bug.cgi?id=143296
<rdar://problem/18209280>
Reviewed by Dean Jackson.
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::didCollectGeometryForSmartMagnificationGesture):
Constrain the target rect to the viewport, and if it had overflowed the viewport,
scroll halfway towards the gesture origin.
2015-03-31 Simon Fraser <simon.fraser@apple.com>
Remove scrolling tree dependency on wheel event handler counts, and use fast scrolling even when there are wheel handlers
https://bugs.webkit.org/show_bug.cgi?id=143288
rdar://problem/16049624
Reviewed by Beth Dakin.
Remove the wheel event counting that Document does, and passes into the scrolling tree.
The ScrollingTree now just uses the non-fast scrollable region to determine when to
fast scroll on pages with wheel event handlers.
If a handler includes position:fixed renderers, we just cover the whole document
with the slow-scrolling region currently. This could be improved.
* Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
(ArgumentCoder<ScrollingStateFrameScrollingNode>::encode):
(ArgumentCoder<ScrollingStateFrameScrollingNode>::decode):
(WebKit::RemoteScrollingTreeTextStream::dump):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::wheelEventHandlersChanged):
(WebKit::WebChromeClient::numWheelEventHandlersChanged): Deleted.
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::wheelEventHandlersChanged):
(WebKit::WebPage::recomputeShortCircuitHorizontalWheelEventsState):
(WebKit::WebPage::numWheelEventHandlersChanged): Deleted.
* WebProcess/WebPage/WebPage.h:
2015-03-31 Dan Bernstein <mitz@apple.com>
<rdar://problem/20365675> [iOS] Include Add to Reading List link action only where supported
https://bugs.webkit.org/show_bug.cgi?id=143289
Reviewed by Tim Horton.
* UIProcess/API/Cocoa/_WKElementAction.h: Excluded _WKElementActionTypeAddToReadingList from
the _WKElementActionType enum when Reading List is not supported.
* UIProcess/API/Cocoa/_WKElementAction.mm:
(+[_WKElementAction elementActionWithType:customTitle:]): Made Add to Reading List code
conditional on HAVE(SAFARI_SERVICES_FRAMEWORK).
* UIProcess/ios/WKActionSheetAssistant.mm:
(-[WKActionSheetAssistant showImageSheet]): Ditto.
(-[WKActionSheetAssistant showLinkSheet]): Ditto.
* config.h: Defined HAVE_SAFARI_SERVICES_FRAMEWORK.
2015-03-31 Timothy Horton <timothy_horton@apple.com>
TextIndicator for <span> inside an <a> only highlights the <span>, should highlight the whole <a>
https://bugs.webkit.org/show_bug.cgi?id=143287
<rdar://problem/20318342>
Reviewed by Beth Dakin.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performActionMenuHitTestAtLocation):
Instead of just highlighting the hit element, highlight the whole
element that the link URL comes from.
2015-03-31 Timothy Horton <timothy_horton@apple.com>
WKView should stop using endGestureWithEvent
https://bugs.webkit.org/show_bug.cgi?id=143285
<rdar://problem/20357007>
Reviewed by Simon Fraser.
* UIProcess/API/mac/WKView.mm:
(-[WKView magnifyWithEvent:]):
(-[WKView endGestureWithEvent:]): Deleted.
* UIProcess/mac/ViewGestureController.h:
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::endMagnificationGesture):
(WebKit::ViewGestureController::endActiveGesture): Deleted.
While there is no visible symptom, it is recommended that we check
the phase of normal magnification events instead of using the
special gesture end events.
2015-03-31 Timothy Horton <timothy_horton@apple.com>
Swipes occur in the wrong direction in RTL
https://bugs.webkit.org/show_bug.cgi?id=143257
<rdar://problem/20300862>
Reviewed by Simon Fraser.
* UIProcess/ios/ViewGestureControllerIOS.mm:
(-[WKSwipeTransitionController gestureRecognizerForInteractiveTransition:WithTarget:action:]):
When choosing which edge to attach our gesture recognizers to,
flip them in RTL.
(-[WKSwipeTransitionController directionForTransition:]):
(WebKit::ViewGestureController::beginSwipeGesture):
(WebKit::ViewGestureController::canSwipeInDirection):
* UIProcess/mac/ViewGestureController.h:
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::scrollEventCanBecomeSwipe):
(WebKit::ViewGestureController::trackSwipeGesture):
(WebKit::ViewGestureController::determineLayerAdjacentToSnapshotForParent):
(WebKit::ViewGestureController::beginSwipeGesture):
(WebKit::ViewGestureController::handleSwipeGesture):
Adjust SwipeDirection to be in logical back-forward list direction
instead of physical edge direction.
2015-03-31 Myles C. Maxfield <mmaxfield@apple.com>
Move ExpansionBehaviorFlags and TextDirection to their own file
https://bugs.webkit.org/show_bug.cgi?id=143273
Reviewed by Simon Fraser.
This is a mechanical change. It just moves code around.
This is getting ready for https://bugs.webkit.org/show_bug.cgi?id=142608
* Shared/WebPopupItem.h:
* UIProcess/API/C/efl/WKAPICastEfl.h:
* UIProcess/API/efl/EwkView.h:
* UIProcess/WebPopupMenuProxy.h:
* UIProcess/efl/WebUIPopupMenuClient.h:
2015-03-31 Yusuke Suzuki <utatane.tea@gmail.com>
Clean up Identifier factories to clarify the meaning of StringImpl*
https://bugs.webkit.org/show_bug.cgi?id=143146
Reviewed by Filip Pizlo.
Just change to Identifier::fromString.
* WebProcess/Plugins/Netscape/JSNPObject.cpp:
(WebKit::JSNPObject::getOwnPropertyNames):
* WebProcess/Plugins/Netscape/NPJSObject.cpp:
(WebKit::identifierFromIdentifierRep):
2015-03-31 Timothy Horton <timothy_horton@apple.com>
WebKit briefly shows wrong webpage after swiping back (gigaom.com, or any site on a slow network)
https://bugs.webkit.org/show_bug.cgi?id=143256
<rdar://problem/19458648>
Reviewed by Dan Bernstein.
Instead of allowing a flash of the previous page when the swipe snapshot
timeouts fire (removing the snapshot before the new page is loaded), show
the snapshotted background color.
This fixes the problem on iOS, where UI-side compositing makes it easy to fix,
but not yet on OS X.
* UIProcess/API/Cocoa/WKWebView.mm:
(baseScrollViewBackgroundColor):
(scrollViewBackgroundColor):
If the ViewGestureController returns a valid background color, use that
instead of the page's background color.
* UIProcess/API/Cocoa/WKWebViewInternal.h:
Expose _updateScrollViewBackground.
* UIProcess/PageClient.h:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::didChangeBackgroundColor):
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::didChangeBackgroundColor):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didChangeBackgroundColor):
* UIProcess/WebPageProxy.h:
Add and plumb didChangeBackgroundColor, which calls
_updateScrollViewBackground on iOS.
* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::endSwipeGesture):
Hide the content of the drawing area until the next commit. This way,
even if the snapshot is removed (say, because a timeout fired), we won't
ever show the old page content (but we will show background color).
Store the background color associated with the current snapshot.
Let WKWebView know that it needs to recompute the background color.
(WebKit::ViewGestureController::removeSwipeSnapshot):
Clear the background color so that the next time we commit, WKWebView
will get an invalid color from ViewGestureController and fall back
to the page's extended background color instead.
* UIProcess/mac/ViewGestureController.h:
(WebKit::ViewGestureController::backgroundColorForCurrentSnapshot):
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
(WebKit::ViewGestureController::removeSwipeSnapshot):
Keep backgroundColorForCurrentSnapshot up to date on Mac too, even
though we don't use it yet.
2015-03-31 Timothy Horton <timothy_horton@apple.com>
[iOS] Rotating PDF in Safari scrolls to the wrong position
https://bugs.webkit.org/show_bug.cgi?id=143259
<rdar://problem/19872693>
Reviewed by Dan Bernstein.
* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView web_setMinimumSize:]):
Maintan the relative top/left within the rescaled document.
2015-03-31 Chris Dumez <cdumez@apple.com>
[WK2][iOS] Extend ProcessThrottler use to the NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=143249
<rdar://problem/20231539>
Reviewed by Gavin Barraclough.
Extend ProcessThrottler use to the NetworkProcess instead of only the
WebProcesses. This is needed so that the NetworkProcess gets notified
before suspension. We now use this notification to free-up memory
before suspending by calling the critical memory pressure handler, as
we already do for WebProcesses (rdar://problem/20231539). In the
future, this infrastructure will be used to delay suspension until the
pending SQL transactions are done as well (rdar://problem/20180799).
Previously, the NetworkProcessProxy would hold a foreground assertion
on behalf of the NetworkProcess but would never release that assertion.
In this patch, we change this so that WebProcessProxies hold assertions
on behalf of the NetworkProcess, and release those assertions before
suspending. As a result, the NetworkProcess gets suspended when all
WebProcesses are suspended.
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::processWillSuspend):
(WebKit::NetworkProcess::cancelProcessWillSuspend):
(WebKit::NetworkProcess::processDidResume):
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in:
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::NetworkProcessProxy):
(WebKit::NetworkProcessProxy::didFinishLaunching):
(WebKit::NetworkProcessProxy::sendProcessWillSuspend):
(WebKit::NetworkProcessProxy::sendCancelProcessWillSuspend):
(WebKit::NetworkProcessProxy::didCancelProcessSuspension):
(WebKit::NetworkProcessProxy::sendProcessDidResume):
(WebKit::NetworkProcessProxy::processReadyToSuspend):
* UIProcess/Network/NetworkProcessProxy.h:
(WebKit::NetworkProcessProxy::throttler):
* UIProcess/Network/NetworkProcessProxy.messages.in:
* UIProcess/ProcessThrottler.cpp:
(WebKit::ProcessThrottler::ProcessThrottler):
(WebKit::ProcessThrottler::didConnectToProcess):
(WebKit::ProcessThrottler::didConnnectToProcess): Deleted.
* UIProcess/ProcessThrottler.h:
* UIProcess/ProcessThrottlerClient.h: Added.
(WebKit::ProcessThrottlerClient::~ProcessThrottlerClient):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::ensureNetworkProcess):
* UIProcess/WebProcessPool.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::didFinishLaunching):
(WebKit::WebProcessProxy::initializeNetworkProcessActivityToken):
(WebKit::WebProcessProxy::sendProcessDidResume):
(WebKit::WebProcessProxy::processReadyToSuspend):
* UIProcess/WebProcessProxy.h:
* WebKit2.xcodeproj/project.pbxproj:
2015-03-31 Csaba Osztrogonác <ossy@webkit.org>
Unreviewed, revert accidental change by r182138.
* Scripts/generate-forwarding-headers.pl:
(createForwardingHeadersForFramework):
2015-03-31 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix GTK+ build with REDIRECTED_XCOMPOSITE_WINDOW disabled in X11 platform.
Also fix some unused parameter warnings when
REDIRECTED_XCOMPOSITE_WINDOW is disabled.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewRenderAcceleratedCompositingResults):
(resizeWebKitWebViewBaseFromAllocation):
2015-03-31 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] DnD icon/widget has odd background
https://bugs.webkit.org/show_bug.cgi?id=143217
Reviewed by Martin Robinson.
Use gtk_drag_set_icon_surface() to set the drag icon image,
instead of DragIcon class.
* UIProcess/API/gtk/WebKitWebView.cpp:
* UIProcess/gtk/DragAndDropHandler.cpp:
(WebKit::DragAndDropHandler::startDrag):
* UIProcess/gtk/DragAndDropHandler.h:
2015-03-30 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r182172.
https://bugs.webkit.org/show_bug.cgi?id=143250
Since this class is an API object, we don't know for sure when
it will be destroyed. (Requested by kling on #webkit).
Reverted changeset:
"WebBackForwardList doesn't need to manually clear the
snapshot of an entry when removing it."
https://bugs.webkit.org/show_bug.cgi?id=143231
http://trac.webkit.org/changeset/182172
2015-03-30 Andreas Kling <akling@apple.com>
WebBackForwardList doesn't need to manually clear the snapshot of an entry when removing it.
<https://webkit.org/b/143231>
Reviewed by Tim Horton.
Now that we don't keep WebBackForwardListItem objects alive forever, it's not necessary
to clear the snapshot when removing them from the WebBackForwardList, since the entire
object will be deleted shortly after that anyway.
* UIProcess/WebBackForwardList.cpp:
(WebKit::WebBackForwardList::didRemoveItem):
2015-03-30 Enrica Casucci <enrica@apple.com>
[iOS] WebContent crashing at WebCore: WebCore::Range::collectSelectionRects.
https://bugs.webkit.org/show_bug.cgi?id=143234
<rdar://problem/18571345>
Reviewed by Tim Horton.
This is a speculative fix that adds a null check before referencing the range.
In both places where the check has been added the range returned by the call
that should create it could be null.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::platformEditorState):
2015-03-30 Sam Weinig <sam@webkit.org>
[Content Extensions] Flesh out the UserContentExtensionStore
https://bugs.webkit.org/show_bug.cgi?id=143123
Reviewed by Benjamin Poulain.
* Shared/WebCompiledContentExtension.cpp:
(WebKit::WebCompiledContentExtension::createFromCompiledContentExtensionData):
* Shared/WebCompiledContentExtensionData.cpp:
(WebKit::WebCompiledContentExtensionData::encode):
(WebKit::WebCompiledContentExtensionData::decode):
* Shared/WebCompiledContentExtensionData.h:
(WebKit::WebCompiledContentExtensionData::WebCompiledContentExtensionData):
Switch the order in memory of actions and bytecode (and switch the order of the
variables as well, to keep it clear). This will become necessary when streaming
the data to disk, as actions are created before the bytecode and we would have to keep them
in memory until the bytecode was finished compiling if they didn't come before in the file.
* UIProcess/API/APIUserContentExtensionStore.h:
* UIProcess/API/APIUserContentExtensionStore.cpp:
(API::UserContentExtensionStore::defaultStore):
Add accessor for the processes default shared store.
(API::constructedPath):
Helper for constructing the path to a file in the store based on identifier.
(API::encodeContentExtensionMetaData):
(API::decodeContentExtensionMetaData):
Helpers for encoding/decoding the file metadata (version, bytecode size, actions size).
(API::openAndMapContentExtension):
Helper to open and map a filed back content extension.
(API::writeDataToFile):
Helper to write a Data object to a file.
(API::compiledToFile):
Helper to run the content extension compiler and write it to disk. It first
writes it to a temporary file and then does an atomic rename operation to put
the file in the final location. Doing this means that if the process crashes while
the compile is taking place, the partially written file won't end up in the cache,
but rather, will be cleaned up by the OS.
(API::UserContentExtensionStore::lookupContentExtension):
API entry point to lookup an extension that has been compiled to disk. On a background queue,
it attempts to open and map the extension (based on the identifier passed in) and return it
to the caller via the callback function passed in.
(API::UserContentExtensionStore::compileContentExtension):
API entry point to compile an extension and write it to store. On a background queue, it
compiles the file to disk and if successful, returns the memory mapped data via the callback
function passed in.
(API::UserContentExtensionStore::removeContentExtension):
API entry point to remove an extension from the store. On a background queue, it
unlinks the extension (based on the identifier passed in) and tells the caller it completed
the action vial the callback function passed in.
(API::UserContentExtensionStore::synchronousRemoveAllContentExtensions):
Helper for testing which synchronously unlinks all the files in the store.
(API::userContentExtensionStoreErrorCategory):
std::error_code adaptor for some generic errors that can happen in the store. We will want
to flesh these out further.
* UIProcess/API/Cocoa/APIUserContentExtensionStoreCocoa.mm: Added.
(API::UserContentExtensionStore::defaultStorePath):
Helper to get the platform specific path for the store.
* UIProcess/API/C/WKUserContentExtensionStoreRef.cpp:
(WKUserContentExtensionStoreGetTypeID):
Add ENABLE(CONTENT_EXTENSIONS) guards.
* UIProcess/API/Cocoa/_WKUserContentExtensionStore.h:
* UIProcess/API/Cocoa/_WKUserContentExtensionStore.mm:
(-[_WKUserContentExtensionStore dealloc]):
(+[_WKUserContentExtensionStore defaultStore]):
(-[_WKUserContentExtensionStore compileContentExtensionForIdentifier:encodedContentExtension:completionHandler:]):
(-[_WKUserContentExtensionStore lookupContentExtensionForIdentifier:completionHandler:]):
(-[_WKUserContentExtensionStore removeContentExtensionForIdentifier:completionHandler:]):
(-[_WKUserContentExtensionStore _removeAllContentExtensions]):
(-[_WKUserContentExtensionStore init]): Deleted.
* UIProcess/API/Cocoa/_WKUserContentExtensionStoreInternal.h:
* UIProcess/API/Cocoa/_WKUserContentExtensionStorePrivate.h: Added.
SPI wrappers for the store.
* WebKit2.xcodeproj/project.pbxproj:
Add new files.
2015-03-30 Antti Koivisto <antti@apple.com>
Don't cache resources that are very unlikely to be reused
https://bugs.webkit.org/show_bug.cgi?id=143226
Reviewed by Chris Dumez.
Follow-up to cover Cache-control: no-cache case which also has zero cache lifetime.
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::makeStoreDecision):
2015-03-30 Antti Koivisto <antti@apple.com>
Include cache entry worth to json dump
https://bugs.webkit.org/show_bug.cgi?id=143202
Follow-up fix.
* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::computeRecordWorth):
This accidentally gave the error case worth 1 rather than 0 as it should be.
2015-03-30 Antti Koivisto <antti@apple.com>
Don't cache resources that are very unlikely to be reused
https://bugs.webkit.org/show_bug.cgi?id=143226
<rdar://problem/20347160>
Reviewed by Geoff Garen.
We are writing lots of resources to the cache that are never used again.
In browse-around-randomly test this reduced number of cache entries created by ~20% and bytes written by ~5%.
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::makeUseDecision):
(WebKit::NetworkCache::makeRetrieveDecision):
Rename for clarity.
(WebKit::NetworkCache::makeStoreDecision):
Store only if the resource has non-zero expiration or has validation headers.
Very High priority resources (main resources) keep the existing policy to minimize impact
on back navigation and tab restore.
(WebKit::NetworkCache::Cache::retrieve):
(WebKit::NetworkCache::Cache::store):
(WebKit::NetworkCache::canUse): Deleted.
(WebKit::NetworkCache::canRetrieve): Deleted.
(WebKit::NetworkCache::canStore): Deleted.
* NetworkProcess/cache/NetworkCache.h:
* NetworkProcess/cache/NetworkCacheStatistics.cpp:
(WebKit::NetworkCache::storeDecisionToDiagnosticKey):
2015-03-30 Tim Horton <timothy_horton@apple.com>
Swipe snapshot removed too early (jumps around) on arstechnica and NYT
https://bugs.webkit.org/show_bug.cgi?id=143199
<rdar://problem/18420467>
Reviewed by Dan Bernstein.
Make ViewGestureControllerIOS's snapshot removal timing behave more like the Mac version.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didCommitLayerTree:]):
Let ViewGestureController know when the page has finished state restoration.
(-[WKWebView _didFinishLoadForMainFrame]):
(-[WKWebView _didSameDocumentNavigationForMainFrame:]):
Forward these to ViewGestureController.
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::didFinishLoadForMainFrame):
Forward didFinishLoadForMainFrame to WKWebView.
* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::ViewGestureController):
(WebKit::ViewGestureController::endSwipeGesture):
Split the swipe snapshot removal state into a bunch of bools.
(WebKit::ViewGestureController::willCommitPostSwipeTransitionLayerTree):
(WebKit::ViewGestureController::setRenderTreeSize):
(WebKit::ViewGestureController::removeSwipeSnapshotIfReady):
(WebKit::ViewGestureController::removeSwipeSnapshot):
Unify the snapshot removal logic into one function; removeSwipeSnapshotIfReady
completely owns the decision. For now, we're waiting for everything, but
we can do better in the future (using firstVisuallyNonEmptyLayout like Mac used to).
(WebKit::ViewGestureController::didRestoreScrollPosition):
(WebKit::ViewGestureController::didFinishLoadForMainFrame):
(WebKit::ViewGestureController::didSameDocumentNavigationForMainFrame):
(WebKit::ViewGestureController::activeLoadMonitoringTimerFired):
Add more conditions for swipe snapshot removal. We'll now wait for
didFinishLoadForMainFrame (or didSameDocumentNavigationForMainFrame),
for active loads to finish, and for the scroll position to be restored.
This brings the iOS implementation in line with the slightly better Mac
implementation, and also sets the stage for deduplication of all of this code.
* UIProcess/mac/ViewGestureController.h:
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::ViewGestureController):
2015-03-30 Chris Dumez <cdumez@apple.com>
[WK2][NetworkCache] Add support for "Cache-Control: max-stale" request header
https://bugs.webkit.org/show_bug.cgi?id=143159
<rdar://problem/20333296>
Reviewed by Antti Koivisto.
Add support for "Cache-Control: max-stale" request header:
https://tools.ietf.org/html/rfc7234#section-5.2.1.2
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::responseHasExpired):
(WebKit::NetworkCache::requestRequiresRevalidation):
(WebKit::NetworkCache::canUse):
2015-03-30 Csaba Osztrogonác <ossy@webkit.org>
[EFL][GTK] WebKit2's generate-forwarding-headers.pl should fail if clashing headers found
https://bugs.webkit.org/show_bug.cgi?id=142909
Reviewed by Philippe Normand.
* Scripts/generate-forwarding-headers.pl:
(createForwardingHeadersForFramework):
2015-03-29 Antti Koivisto <antti@apple.com>
Include cache entry worth to json dump
https://bugs.webkit.org/show_bug.cgi?id=143202
Reviewed by Darin Adler.
This is useful for analyzing cache performance.
Also include the body size, total item count and average worth.
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::traverse):
(WebKit::NetworkCache::Cache::dumpContentsToFile):
* NetworkProcess/cache/NetworkCacheEntry.cpp:
(WebKit::NetworkCache::Entry::asJSON):
* NetworkProcess/cache/NetworkCacheEntry.h:
* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::Storage::traverse):
Add flags for specificying what sort of information is needed.
(WebKit::NetworkCache::computeRecordWorth):
Factor to a function.
(WebKit::NetworkCache::deletionProbability):
* NetworkProcess/cache/NetworkCacheStorage.h:
2015-03-29 Simon Fraser <simon.fraser@apple.com>
Fix iOS scrollperf crash after a web process crash
https://bugs.webkit.org/show_bug.cgi?id=143110
Reviewed by Dean Jackson.
When we destroy the drawing area after a web process crash, we also need to destroy
the scrollingPerformanceData which has a reference to the drawing area.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::resetState):
2015-03-29 Simon Fraser <simon.fraser@apple.com>
Convert arguments to ScrollingCoordinator functions to references
https://bugs.webkit.org/show_bug.cgi?id=143198
Reviewed by Darin Adler.
Convert all the FrameView* and ScrollableArea* arguments to ScrollingCoordinator functions to
references, and use references in a few other places.
* WebProcess/Scrolling/RemoteScrollingCoordinator.h:
* WebProcess/Scrolling/RemoteScrollingCoordinator.mm:
(WebKit::RemoteScrollingCoordinator::coordinatesScrollingForFrameView):
2015-03-29 Enrica Casucci <enrica@apple.com>
[iOS WK2] WKContentView should implement _selectionClipRect
https://bugs.webkit.org/show_bug.cgi?id=143143
rdar://problem/20330075
Reviewed by Benjamin Poulain.
UIKit checks if the text delegate responds to this selector
to retrieve the clipping rectangle for the editable element
where the selection is being create.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _selectionClipRect]):
2015-03-29 Antti Koivisto <antti@apple.com>
Use st_mtime instead of st_atime to track file access time
https://bugs.webkit.org/show_bug.cgi?id=143200
Reviewed by Darin Adler.
On OS X atime updates automatically on read so calling Storage::traverse() would always ends up updating access times
for all cache entries to the current time. This would make entry worth computation produce unexpected results.
We update mtime manually on successful cache retrieve only so switching to it fixes the problem.
* NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
(WebKit::NetworkCache::fileTimes):
(WebKit::NetworkCache::updateFileModificationTimeIfNeeded):
(WebKit::NetworkCache::updateFileAccessTimeIfNeeded): Deleted.
* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::Storage::updateFileModificationTime):
(WebKit::NetworkCache::Storage::dispatchReadOperation):
(WebKit::NetworkCache::deletionProbability):
(WebKit::NetworkCache::Storage::updateFileAccessTime): Deleted.
* NetworkProcess/cache/NetworkCacheStorage.h:
2015-03-27 Gwang Yoon Hwang <yoon@igalia.com>
[TexMap] Seperate BitmapTexture related classes implementations from TextureMapper
https://bugs.webkit.org/show_bug.cgi?id=142386
Reviewed by Žan Doberšek.
TextureMapper and TextureMapperGL are bloated and tightly coupled with
BitmapTexture. We should move these classes to seperated file of their own.
Also, this patch removes friend relationship from TextureMapperGL and its
subsidiary classes.
The main purpose of this refactoring is to expose BitmapTexturePool to
renderers of platformlayers like Video and Canvas. By doing this, each
renderer can acquire textures from the global texture pool to paint
their contents directly.
* Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp: Include BitmapTextureGL.h explicitly
2015-03-27 Anders Carlsson <andersca@apple.com>
Use a typedef for the WKPluginLoadClientPolicy enum
https://bugs.webkit.org/show_bug.cgi?id=143161
Reviewed by Tim Horton.
* UIProcess/API/C/WKPluginLoadPolicy.h:
2015-03-27 Chris Dumez <cdumez@apple.com>
[WK2][NetworkCache] Use WTF::WorkQueue abstraction inside NetworkCacheStatistics
https://bugs.webkit.org/show_bug.cgi?id=143154
Reviewed by Antti Koivisto.
Use WTF::WorkQueue abstraction inside NetworkCacheStatistics, like we
already do in NetworkCacheStorage.
* NetworkProcess/cache/NetworkCacheStatistics.cpp: Renamed from Source/WebKit2/NetworkProcess/cache/NetworkCacheStatisticsCocoa.mm.
(WebKit::NetworkCache::executeSQLCommand):
(WebKit::NetworkCache::executeSQLStatement):
(WebKit::NetworkCache::Statistics::open):
(WebKit::NetworkCache::Statistics::Statistics):
(WebKit::NetworkCache::Statistics::initialize):
(WebKit::NetworkCache::Statistics::bootstrapFromNetworkCache):
(WebKit::NetworkCache::Statistics::shrinkIfNeeded):
(WebKit::NetworkCache::Statistics::recordRetrievalRequest):
(WebKit::NetworkCache::Statistics::recordNotCachingResponse):
(WebKit::NetworkCache::retrieveDecisionToDiagnosticKey):
(WebKit::NetworkCache::Statistics::recordNotUsingCacheForRequest):
(WebKit::NetworkCache::storeDecisionToDiagnosticKey):
(WebKit::NetworkCache::Statistics::recordRetrievalFailure):
(WebKit::NetworkCache::cachedEntryReuseFailureToDiagnosticKey):
(WebKit::NetworkCache::Statistics::recordRetrievedCachedEntry):
(WebKit::NetworkCache::Statistics::markAsRequested):
(WebKit::NetworkCache::Statistics::writeTimerFired):
(WebKit::NetworkCache::Statistics::queryWasEverRequested):
(WebKit::NetworkCache::Statistics::clear):
(WebKit::NetworkCache::Statistics::addHashesToDatabase):
(WebKit::NetworkCache::Statistics::addStoreDecisionsToDatabase):
* NetworkProcess/cache/NetworkCacheStatistics.h:
(WebKit::NetworkCache::Statistics::serialBackgroundIOQueue):
* WebKit2.xcodeproj/project.pbxproj:
2015-03-27 Ryosuke Niwa <rniwa@webkit.org>
Safari clears selection when its window gets activated via mouse down
https://bugs.webkit.org/show_bug.cgi?id=143157
Reviewed by Anders Carlsson.
The bug was caused by PlatformMouseEvent created in WebKit2 not having its event number
even though we were correctly calling setActivationEventNumber in WebPage::acceptsFirstMouse.
Fixed the bug by storing [NSEvent eventNumber] in WebMouseEvent on Mac in WebKit2 as done in WebKit1.
* Shared/WebEvent.h:
(WebKit::WebMouseEvent::eventNumber):
* Shared/WebEventConversion.cpp:
(WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
* Shared/WebMouseEvent.cpp:
(WebKit::WebMouseEvent::WebMouseEvent):
(WebKit::WebMouseEvent::encode):
(WebKit::WebMouseEvent::decode):
* Shared/mac/WebEventFactory.mm:
(WebKit::WebEventFactory::createWebMouseEvent):
2015-03-27 Anders Carlsson <andersca@apple.com>
Only do the Connection::setShouldCloseConnectionOnMachExceptions() hack where necessary
https://bugs.webkit.org/show_bug.cgi?id=143141
rdar://problem/19471284
Reviewed by Andreas Kling.
* Platform/IPC/Connection.h:
* Platform/IPC/mac/ConnectionMac.mm:
(IPC::Connection::platformInvalidate):
(IPC::Connection::platformInitialize):
(IPC::Connection::open):
* Shared/ChildProcessProxy.cpp:
(WebKit::ChildProcessProxy::didFinishLaunching):
* UIProcess/Plugins/PluginProcessProxy.cpp:
(WebKit::PluginProcessProxy::didFinishLaunching):
2015-03-27 Tim Horton <timothy_horton@apple.com>
Implement iOS WebKit2 PDF Find-in-Page
https://bugs.webkit.org/show_bug.cgi?id=143065
<rdar://problem/16793370>
Reviewed by Dan Bernstein.
* Platform/spi/ios/CorePDFSPI.h:
Add some SPI.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _countStringMatches:options:maxCount:]):
(-[WKWebView _findString:options:maxCount:]):
(-[WKWebView _hideFindUI]):
If we have a custom content view, forward find-in-page methods to it.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/API/Cocoa/_WKFindOptions.h:
Move _WKFindOptions into its own file.
* UIProcess/Cocoa/WKWebViewContentProvider.h:
Add find-related methods to the WKWebViewContentProvider protocol.
* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView web_initWithFrame:webView:]):
(-[WKPDFView dealloc]):
Maintain a dispatch queue for searching the PDF.
(-[WKPDFView web_setContentProviderData:suggestedFilename:]):
Fix a type.
(-[WKPDFView _ensureViewForPage:]):
Split the code to create/parent a page view out from _revalidateViews,
so that the find code can create/parent the targetted UIPDFPageView
in order to install the find highlight in it, but before it is scrolled into view.
(-[WKPDFView _revalidateViews]):
Use the stored page index instead of counting again.
Don't unparent page views that have find-in-page highlights in them, because
we won't know enough to recreate them later.
(-[WKPDFView _computePageAndDocumentFrames]):
Put the page index in PDFPageInfo, for reference elsewhere.
(-[WKPDFView _stringCompareOptionsFromWKFindOptions:]):
(-[WKPDFView _computeMatchesForString:options:maxCount:completionHandler:]):
Asynchronously (and on our serial queue) search the PDF for the given string.
We'll cache the most recent results to avoid searching more than once,
cancel existing searches when another begins (since it's a serial queue,
this ensures we'll only have one search active at a time).
(-[WKPDFView web_countStringMatches:options:maxCount:]):
Count the number of matches for the given string, and inform the FindClient
of the result.
(-[WKPDFView _didFindMatch:]):
When we find a match, create a view for it, highlight the match, and
zoom so that it's in-view.
(-[WKPDFView web_findString:options:maxCount:]):
Incrementally search the document for the given string. We do an incremental
search even if we have all of the results so that we can anchor the search
in the right place if the new string is a prefix of the old string, etc.
Wrap around appropriately when searching past the beginning or end of the
document. If we have all of the results (there were less than maxCount results),
look through the cached matches for the incrementally-found result and
report its index to the client.
(-[WKPDFView web_hideFindUI]):
Dismiss the selection and clear some state so we start the next search afresh.
* WebKit2.xcodeproj/project.pbxproj:
2015-03-27 Andreas Kling <akling@apple.com>
WebProcessProxy should not retain WebBackForwardListItems forever.
<https://webkit.org/b/143152>
<rdar://problem/19925709>
Reviewed by Anders Carlsson.
Have WebProcessProxy actually forget about a WebBackForwardListItem after it's removed from
the WebBackForwardList.
This ensures that we don't accumulate too many of these objects, which can get quite large
due to the session state encoded in them.
We already have graceful handling of the case where an incoming IPC message references
a removed back/forward list item.
* UIProcess/WebBackForwardList.cpp:
(WebKit::WebBackForwardList::didRemoveItem):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::backForwardRemovedItem):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::removeBackForwardItem):
* UIProcess/WebProcessProxy.h:
2015-03-27 Simon Fraser <simon.fraser@apple.com>
Use the correct timebase to log scrollperf blank pixel counts on iOS
https://bugs.webkit.org/show_bug.cgi?id=143149
Reviewed by Tim Horton.
MobileSafari and WebKit need to collect scrollperf data using the same timebase;
MobileSafari can't call WTF::monotonicallyIncreasingTime(), so use CFAbsoluteTimeGetCurrent()
everywhere.
* UIProcess/Cocoa/RemoteLayerTreeScrollingPerformanceData.mm:
(WebKit::RemoteLayerTreeScrollingPerformanceData::appendBlankPixelCount):
2015-03-27 Chris Dumez <cdumez@apple.com>
[WK2][NetworkCache] Rename requestNeedsRevalidation() to requestRequiresRevalidation()
https://bugs.webkit.org/show_bug.cgi?id=143137
Reviewed by Antti Koivisto.
Rename requestNeedsRevalidation() to requestRequiresRevalidation() as I
think it is more accurate. It is not the request that needs revalidating.
The requests just requires us to revalidate the response.
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::requestRequiresRevalidation):
(WebKit::NetworkCache::canUse):
(WebKit::NetworkCache::requestNeedsRevalidation): Deleted.
2015-03-27 Oliver Hunt <oliver@apple.com>
Forward additional CFNetwork ATS information to child processes
https://bugs.webkit.org/show_bug.cgi?id=143136
Reviewed by Anders Carlsson.
Add additional process creation parameter information, and pass it
to the child processes that actually use CFNetwork.
* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
* Shared/Network/NetworkProcessCreationParameters.cpp:
(WebKit::NetworkProcessCreationParameters::encode):
(WebKit::NetworkProcessCreationParameters::decode):
* Shared/Network/NetworkProcessCreationParameters.h:
* Shared/Plugins/PluginProcessCreationParameters.cpp:
(WebKit::PluginProcessCreationParameters::encode):
(WebKit::PluginProcessCreationParameters::decode):
* Shared/Plugins/PluginProcessCreationParameters.h:
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
(WebKit::WebProcessPool::platformInitializeNetworkProcess):
* UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
(WebKit::PluginProcessProxy::platformInitializePluginProcess):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):
2015-03-27 Chris Dumez <cdumez@apple.com>
[WK2][NetworkCache] We only cache responses with status codes that are cacheable by default
https://bugs.webkit.org/show_bug.cgi?id=143125
<rdar://problem/20321172>
Reviewed by Antti Koivisto.
We Previously only cached responses with status codes that are cacheable
by default [1]. However, RFC 7234 [2] allows us to cache responses with
other status codes, as long as they have explicit headers allowing
caching:
- 'Expires' header field
- 'max-age' response directive
This patch updates our caching policy accordingly to improve efficiency.
[1] http://tools.ietf.org/html/rfc7231#page-48
[2] http://tools.ietf.org/html/rfc7234#section-4.3.2
Test: http/tests/cache/disk-cache/disk-cache-307-status-code.html
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::canStore):
2015-03-26 Antti Koivisto <antti@apple.com>
Respect cache-control directives in request
https://bugs.webkit.org/show_bug.cgi?id=143121
rdar://problem/19714040
Reviewed by Chris Dumez.
Better support for https://tools.ietf.org/html/rfc7234#section-5.2.1
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::canUse):
Consider requests with Cache-control: no-cache and max-age=0 expired.
(WebKit::NetworkCache::canStore):
Don't store requests with Cache-control: no-store.
(WebKit::NetworkCache::Cache::store):
* NetworkProcess/cache/NetworkCache.h:
* NetworkProcess/cache/NetworkCacheStatisticsCocoa.mm:
(WebKit::NetworkCache::storeDecisionToDiagnosticKey):
2015-03-25 Jon Honeycutt <jhoneycutt@apple.com>
iOS file upload panel menu items need icons
<https://bugs.webkit.org/show_bug.cgi?id=143042>
<rdar://problem/20178678>
Reviewed by Andy Estes.
* Platform/spi/ios/UIKitSPI.h:
Declare new SPI methods _UIImageGetWebKitTakePhotoOrVideoIcon and
_UIImageGetWebKitPhotoLibraryIcon().
* UIProcess/ios/forms/WKFileUploadPanel.mm:
(photoLibraryIcon):
(cameraIcon):
If UIKit SPI exists, use it. Otherwise, return nil.
(-[WKFileUploadPanel _showDocumentPickerMenu]):
Use icons.
2015-03-26 Enrica Casucci <enrica@apple.com>
OS X build fix after r182037.
Unreviewed.
* UIProcess/API/mac/WKView.mm:
(-[WKView _addFontPanelObserver]):
(-[WKView removeWindowObservers]):
(-[WKView observeValueForKeyPath:ofObject:change:context:]):
2015-03-26 Enrica Casucci <enrica@apple.com>
iOS build fix after r182037.
Unreviewed.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _setEditable:]):
2015-03-26 Enrica Casucci <enrica@apple.com>
REGRESSION(r1807689): Slower startup time for WKWebView.
https://bugs.webkit.org/show_bug.cgi?id=143115
rdar://problem/20233711
Reviewed by Anders Carlsson.
In http://trac.webkit.org/changeset/180768 we added an observer to
track visibility of the NSFontPanel to ensure we could fetch the font
information for the current selection when the panel first becomes visible.
It turns out that adding the observer requires the shared font panel
object to be created.
That is apparently a very expensive operation that is regressing
the initialization time for the WKWebView.
We should initialize the NSFontPanel lazily, only when we make the entire
view editable.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _setEditable:]):
* UIProcess/API/mac/WKView.mm:
(-[WKView addWindowObserversForWindow:]):
(-[WKView _addFontPanelObserver]):
(-[WKView removeWindowObservers]):
(-[WKView observeValueForKeyPath:ofObject:change:context:]):
* UIProcess/API/mac/WKViewInternal.h:
2015-03-26 Alex Christensen <achristensen@webkit.org>
Progress towards CMake on Mac.
https://bugs.webkit.org/show_bug.cgi?id=143112
Reviewed by Chris Dumez.
* CMakeLists.txt:
* PlatformMac.cmake:
* UIProcess/Cocoa/WebPageProxyCocoa.mm:
2015-03-26 Chris Dumez <cdumez@apple.com>
[WK2][Cocoa] Add private API to override the network disk cache size
https://bugs.webkit.org/show_bug.cgi?id=143113
<rdar://problem/20315669>
Reviewed by Antti Koivisto.
Add private API to let the client override the network disk cache size.
By default, the network disk cache is automatically determined based on
the CacheModel and the available disk space. However, for testing
purposes, it can be used for the client-side to be able to override
the disk cache size.
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::initializeNetworkProcess):
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::setMaximumSize):
* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::platformSetCacheModel):
* Shared/Network/NetworkProcessCreationParameters.cpp:
(WebKit::NetworkProcessCreationParameters::encode):
(WebKit::NetworkProcessCreationParameters::decode):
* Shared/Network/NetworkProcessCreationParameters.h:
* UIProcess/API/APIProcessPoolConfiguration.cpp:
(API::ProcessPoolConfiguration::copy):
* UIProcess/API/APIProcessPoolConfiguration.h:
* UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
* UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
(-[_WKProcessPoolConfiguration diskCacheSizeOverride]):
(-[_WKProcessPoolConfiguration setDiskCacheSizeOverride:]):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::WebProcessPool):
(WebKit::WebProcessPool::ensureNetworkProcess):
* UIProcess/WebProcessPool.h:
2015-03-26 Andreas Kling <akling@apple.com>
[Darwin] Boost the web process QoS level while handling a synchronous IPC message.
<https://webkit.org/b/142988>
<rdar://problem/20264346>
Reviewed by Antti Koivisto and Anders Carlsson.
Add a mechanism for IPC::Connection to boost the main thread for the duration
of processing a synchronous message.
This fixes an issue where the UI process would block on a synchronous request
to the web process that was being carried out at a lower QoS level.
* Platform/IPC/Connection.cpp:
(IPC::Connection::Connection): Save the main thread's pthread_t while we have
a chance to retreive it.
(IPC::Connection::processIncomingMessage): Optionally boost the main thread when
processing an incoming message with the IsSyncMessage flag set.
* Platform/IPC/Connection.h:
(IPC::Connection::setShouldBoostMainThreadOnSyncMessage): Added. When this mode is
enabled, Connection will give a temporary QoS override to the main thread when
receiving a synchronous message. Ownership of the override is handed to the
MessageDecoder, which resets the main thread QoS in its destructor.
* Platform/IPC/MessageDecoder.cpp:
(IPC::MessageDecoder::~MessageDecoder): Remove any QoS override owned by this message.
* Platform/IPC/MessageDecoder.h:
(IPC::MessageDecoder::setQOSClassOverride): Added. Takes ownership of a QoS override
to make sure it stays in effect until this message has been dispatched.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeConnection): Set up main thread QoS boosting for the
web process's connection to the UI process.
2015-03-26 Ryosuke Niwa <rniwa@webkit.org>
Cursor doesn't change back to pointer when leaving Mail
https://bugs.webkit.org/show_bug.cgi?id=132038
Reviewed by Anders Carlsson.
Fixed the bug by adding a cursor rect and making the primary tracking area update the cursor so that
AppKit will reset the cursor as it leaves the WebView.
We use nil cursor here since we manually update the cursor by calling [NSCursor set].
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:processPool:configuration:webView:]):
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::recommendedScrollbarStyleDidChange):
2015-03-26 Michael Catanzaro <mcatanzaro@igalia.com>
[Linux] SeccompFilters: improve the port-agnostic whitelist
https://bugs.webkit.org/show_bug.cgi?id=140064
Reviewed by Žan Doberšek.
Allow the web process to access several files and directories that it
was previously prohibited from accessing. This makes the web process
much less likely to break.
* Shared/linux/SeccompFilters/SyscallPolicy.cpp:
(WebKit::SyscallPolicy::addDefaultWebProcessPolicy):
2015-03-26 Antti Koivisto <antti@apple.com>
Remove unneeded isConditionalRequest check from NetworkResourceLoader
https://bugs.webkit.org/show_bug.cgi?id=143096
Reviewed by Anders Carlsson.
This check is leftover from implementation that allowed disk cache to validate conditional
request itself. The case can't happen as NetworkCache canRetrieve test does not allow
conditional requests in the first place.
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::didReceiveResponseAsync):
(WebKit::isConditionalRequest): Deleted.
2015-03-26 Antti Koivisto <antti@apple.com>
Rename Storage::Entry to Storage::Record
https://bugs.webkit.org/show_bug.cgi?id=143101
Reviewed by Chris Dumez.
Lets have just one type called Entry in the cache code.
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::retrieve):
(WebKit::NetworkCache::Cache::store):
(WebKit::NetworkCache::Cache::update):
(WebKit::NetworkCache::Cache::traverse):
(WebKit::NetworkCache::Cache::dumpContentsToFile):
* NetworkProcess/cache/NetworkCacheEntry.cpp:
(WebKit::NetworkCache::Entry::Entry):
(WebKit::NetworkCache::Entry::encodeAsStorageRecord):
(WebKit::NetworkCache::Entry::decodeStorageRecord):
(WebKit::NetworkCache::Entry::initializeBufferFromStorageRecord):
(WebKit::NetworkCache::Entry::buffer):
(WebKit::NetworkCache::Entry::shareableResourceHandle):
(WebKit::NetworkCache::Entry::encode): Deleted.
(WebKit::NetworkCache::Entry::decode): Deleted.
(WebKit::NetworkCache::Entry::initializeBufferFromStorageEntry): Deleted.
* NetworkProcess/cache/NetworkCacheEntry.h:
(WebKit::NetworkCache::Entry::sourceStorageRecord):
(WebKit::NetworkCache::Entry::sourceStorageEntry): Deleted.
* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::RecordMetaData::RecordMetaData):
(WebKit::NetworkCache::decodeRecordMetaData):
(WebKit::NetworkCache::decodeRecordHeader):
(WebKit::NetworkCache::decodeRecord):
(WebKit::NetworkCache::encodeRecordMetaData):
(WebKit::NetworkCache::encodeRecordHeader):
(WebKit::NetworkCache::Storage::dispatchReadOperation):
(WebKit::NetworkCache::retrieveFromMemory):
(WebKit::NetworkCache::Storage::store):
(WebKit::NetworkCache::Storage::update):
(WebKit::NetworkCache::Storage::traverse):
(WebKit::NetworkCache::Storage::dispatchPendingWriteOperations):
(WebKit::NetworkCache::Storage::dispatchFullWriteOperation):
(WebKit::NetworkCache::Storage::dispatchHeaderWriteOperation):
(WebKit::NetworkCache::EntryMetaData::EntryMetaData): Deleted.
(WebKit::NetworkCache::decodeEntryMetaData): Deleted.
(WebKit::NetworkCache::decodeEntryHeader): Deleted.
(WebKit::NetworkCache::decodeEntry): Deleted.
(WebKit::NetworkCache::encodeEntryMetaData): Deleted.
(WebKit::NetworkCache::encodeEntryHeader): Deleted.
* NetworkProcess/cache/NetworkCacheStorage.h:
2015-03-26 Chris Dumez <cdumez@apple.com>
[WK2] Let the compiler generate the NetworkCache::Key move constructor
https://bugs.webkit.org/show_bug.cgi?id=143079
Reviewed by Antti Koivisto.
Let the compiler generate the NetworkCache::Key move constructor. The
generated one will do exactly the same thing as the one we had except
that it will move the m_hash member as well. I don't see any reason why
we weren't moving this member before (it is an std::array<uint8_t, 16>).
Also have the compiler generate a move assignment operator for
consistency. Although it is not currently useful, it could be at some
point.
* NetworkProcess/cache/NetworkCacheKey.cpp:
(WebKit::NetworkCache::Key::Key): Deleted.
* NetworkProcess/cache/NetworkCacheKey.h:
2015-03-26 Chris Dumez <cdumez@apple.com>
[WK2][NetworkCache] Compute if a cached response has expired only when actually needed
https://bugs.webkit.org/show_bug.cgi?id=143070
Reviewed by Antti Koivisto.
Compute if a cached response has expired only when actually needed:
- This is not a history navigation
and
- It does not have "Cache-Control: no-cache" header
Previously, we would always determine if the response has expired and
we often end up not using this information.
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::responseHasExpired):
(WebKit::NetworkCache::canUse):
2015-03-26 Zan Dobersek <zdobersek@igalia.com>
Avoid the Vector<> copy in WebTouchEvent constructor
https://bugs.webkit.org/show_bug.cgi?id=143043
Reviewed by Carlos Garcia Campos.
Have the WebTouchEvent accept a Vector<> rvalue.
The relevant code is updated so the Vector<> object is moved
through the call chain and finally into the WebTouchEvent constructor.
* Shared/NativeWebTouchEvent.h:
* Shared/WebEvent.h:
* Shared/WebTouchEvent.cpp:
(WebKit::WebTouchEvent::WebTouchEvent):
* Shared/efl/WebEventFactory.cpp:
(WebKit::WebEventFactory::createWebTouchEvent):
* Shared/gtk/NativeWebTouchEventGtk.cpp:
(WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
* Shared/gtk/WebEventFactory.cpp:
(WebKit::WebEventFactory::createWebTouchEvent):
* Shared/gtk/WebEventFactory.h:
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseTouchEvent):
2015-03-25 Chris Dumez <cdumez@apple.com>
[WK2] WebFrameLoaderClient::dispatchDecidePolicyForResponse() should always call the FramePolicyFunction
https://bugs.webkit.org/show_bug.cgi?id=143036
<rdar://problem/20252438>
<rdar://problem/13811738>
Reviewed by Alexey Proskuryakov.
WebFrameLoaderClient::dispatchDecidePolicyForResponse() should always
call the FramePolicyFunction. Previously, it would fail to do in 2
cases:
- m_frame->page() returns null
or
- webPage->sendSync() returns false
If the FramePolicyFunction is not called, we will fail to clear the
callback in the PolicyChecker and
DocumentLoader::continueAfterContentPolicy() will not be called.
DocumentLoader::continueAfterContentPolicy() is in charge of resetting
m_waitingForContentPolicy flag to false. This could therefore explain
the following assertion being hit in DocumentLoader::detachFromFrame()
(see <rdar://problem/20252438>):
RELEASE_ASSERT(!m_waitingForContentPolicy)
Also, as the PolicyChecker callback is not cleared, it could make it
possible for DocumentLoader::continueAfterContentPolicy() to be called
*after* the load is finished, when later canceling the PolicyCallback:
FrameLoader::stopAllLoaders()
-> PolicyChecker::stopCheck()
-> PolicyCallback::cancel()
-> DocumentLoader::continueAfterContentPolicy(PolicyIgnore)
Calling continueAfterContentPolicy(PolicyIgnore) after the load is
finished would be bad and could explain some of the crashes we've seen
in DocumentLoader::continueAfterContentPolicy() ->
DocumentLoader:: stopLoadingForPolicyChange() (see
<rdar://problem/13811738>).
This patch also applies the same fix to
dispatchDecidePolicyForNewWindowAction() and
dispatchDecidePolicyForNavigationAction() as they use the same pattern.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
2015-03-25 Tim Horton <timothy_horton@apple.com>
Add a preference to prevent "user-scalable=no" from having any effect
https://bugs.webkit.org/show_bug.cgi?id=143032
Reviewed by Sam Weinig.
* Shared/WebPreferencesDefinitions.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
Add a preference and push it to the ViewportConfiguration.
2015-03-25 Beth Dakin <bdakin@apple.com>
REGRESSION (r181660): Force click url preview doesn't have a TextIndicator in Mail
https://bugs.webkit.org/show_bug.cgi?id=143064
-and corresponding-
rdar://problem/20251440
Reviewed by Tim Horton.
The TextIndicator was getting set to nil by the call to
_dismissContentRelativeChildWindows in mouseDown. That line of code was added by
http://trac.webkit.org/changeset/177242 to work around a bug in another component
that has now been resolved, so it no longer appears to be necessary.
* UIProcess/API/mac/WKView.mm:
(-[WKView mouseDown:]):
2015-03-25 Anders Carlsson <andersca@apple.com>
Add network and application cache directories to WebsiteDataStore
https://bugs.webkit.org/show_bug.cgi?id=143063
Reviewed by Sam Weinig.
Create a WebKit directory under ~/Library/Caches/<Bundle ID> for non-sandboxed applications,
and ~/Library/Caches for sandboxed applications. Create NetworkCache and OfflineWebApplicationCache
subdirectories. These directories will be used with the modern WebKit API.
* UIProcess/API/APIWebsiteDataStore.h:
* UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
(API::WebsiteDataStore::cacheDirectoryFileSystemRepresentation):
(API::WebsiteDataStore::defaultDataStoreConfiguration):
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::WebsiteDataStore):
* UIProcess/WebsiteData/WebsiteDataStore.h:
2015-03-25 Sam Weinig <sam@webkit.org>
Address additional review feedback from https://bugs.webkit.org/show_bug.cgi?id=143059.
* Shared/WebCompiledContentExtension.cpp:
(WebKit::WebCompiledContentExtension::createFromCompiledContentExtensionData):
* UIProcess/API/C/WKUserContentFilterRef.cpp:
(WKUserContentFilterCreate):
* UIProcess/API/Cocoa/_WKUserContentFilter.mm:
(-[_WKUserContentFilter initWithName:serializedRules:]):
2015-03-25 Sam Weinig <sam@webkit.org>
[Content Extensions] Convert content extension compiling to return error codes and write its output using a client
https://bugs.webkit.org/show_bug.cgi?id=143059
Reviewed by Alex Christensen.
* Shared/WebCompiledContentExtension.cpp:
* Shared/WebCompiledContentExtension.h:
(WebKit::LegacyContentExtensionCompilationClient::LegacyContentExtensionCompilationClient):
(WebKit::LegacyContentExtensionCompilationClient::writeBytecode):
(WebKit::LegacyContentExtensionCompilationClient::writeActions):
Add subclass of ContentExtensionCompilationClient for use with the non-file backed content
extensions.
* UIProcess/API/C/WKUserContentFilterRef.cpp:
(WKUserContentFilterCreate):
* UIProcess/API/Cocoa/_WKUserContentFilter.mm:
(-[_WKUserContentFilter initWithName:serializedRules:]):
Update to use the new interface of compileRuleList().
2015-03-25 Ryosuke Niwa <rniwa@webkit.org>
Web Inspector: Switching tabs to window with inspector open prohibits typing into console
https://bugs.webkit.org/show_bug.cgi?id=126800
Reviewed by Anders Carlsson.
This is a regression from r85356 and r83814. These two patches made WKWebView clear its selection
when WKView resigns the first responder without ever restoring it even if WKView later becomes
the first responder again. This is problematic when a text field or a editing host element had been
focused and selected prior to the resignation since the editing code uses the selection to determine
the editability of the element.
Fixed the bug by restoring selection in [WKView becomeFirstResponder] if the selection is empty.
* UIProcess/API/mac/WKView.mm:
(-[WKView becomeFirstResponder]):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::restoreSelectionInFocusedEditableElement):
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::restoreSelectionInFocusedEditableElement):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
2015-03-25 Beth Dakin <bdakin@apple.com>
REGRESSION (r181660): Safari navigates to link after a starting and canceling a
force preview
https://bugs.webkit.org/show_bug.cgi?id=143057
-and corresponding-
rdar://problem/20251436
Reviewed by Tim Horton.
Always call _page->immediateActionDidUpdate() so that the EventHandlers
ImmediateActionStage is appropriately updated.
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController immediateActionRecognizerDidUpdateAnimation:]):
Update the EventHandlers ImmediateActionStage.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::immediateActionDidUpdate):
2015-03-25 Antti Koivisto <antti@apple.com>
Separate entry decoding from validation
https://bugs.webkit.org/show_bug.cgi?id=143052
Reviewed by Chris Dumez.
Make NetworkCache::Cache a class and move it to a file of its own.
Move the encoding/decoding code there.
* NetworkProcess/NetworkProcess.cpp:
(WebKit::fetchDiskCacheEntries):
(WebKit::clearDiskCacheEntries):
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::sendReplyToSynchronousRequest):
(WebKit::NetworkResourceLoader::start):
(WebKit::NetworkResourceLoader::sendBufferMaybeAborting):
(WebKit::NetworkResourceLoader::didRetrieveCacheEntry):
(WebKit::NetworkResourceLoader::validateCacheEntry):
* NetworkProcess/NetworkResourceLoader.h:
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::collectVaryingRequestHeaders):
(WebKit::NetworkCache::canUse):
Focused function for deciding if we can use a cache entry and if it needs validation.
(WebKit::NetworkCache::Cache::retrieve):
(WebKit::NetworkCache::Cache::store):
(WebKit::NetworkCache::Cache::update):
(WebKit::NetworkCache::Cache::traverse):
(WebKit::NetworkCache::encodeStorageEntry): Deleted.
(WebKit::NetworkCache::decodeStorageEntry): Deleted.
* NetworkProcess/cache/NetworkCache.h:
* NetworkProcess/cache/NetworkCacheEntry.cpp: Added.
(WebKit::NetworkCache::Entry::Entry):
(WebKit::NetworkCache::Entry::encode):
(WebKit::NetworkCache::Entry::decode):
(WebKit::NetworkCache::Entry::initializeBufferFromStorageEntry):
(WebKit::NetworkCache::Entry::buffer):
(WebKit::NetworkCache::Entry::shareableResourceHandle):
(WebKit::NetworkCache::Entry::needsValidation):
(WebKit::NetworkCache::Entry::setNeedsValidation):
* NetworkProcess/cache/NetworkCacheEntry.h: Added.
(WebKit::NetworkCache::Entry::key):
(WebKit::NetworkCache::Entry::timeStamp):
(WebKit::NetworkCache::Entry::response):
(WebKit::NetworkCache::Entry::varyingRequestHeaders):
(WebKit::NetworkCache::Entry::sourceStorageEntry):
* NetworkProcess/cache/NetworkCacheStatistics.h:
* NetworkProcess/cache/NetworkCacheStatisticsCocoa.mm:
(WebKit::NetworkCache::cachedEntryReuseFailureToDiagnosticKey):
(WebKit::NetworkCache::Statistics::recordRetrievedCachedEntry):
* WebKit2.xcodeproj/project.pbxproj:
2015-03-25 David Hyatt <hyatt@apple.com>
Add a pref to enable the new block-inside-inline model
https://bugs.webkit.org/show_bug.cgi?id=143050
Reviewed by Sam Weinig.
* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetNewBlockInsideInlineModelEnabled):
(WKPreferencesGetNewBlockInsideInlineModelEnabled):
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
2015-03-25 Zan Dobersek <zdobersek@igalia.com>
[WK2] WebUserMediaClient::pageDestroyed() virtual method should be marked as override
https://bugs.webkit.org/show_bug.cgi?id=143046
Reviewed by Carlos Garcia Campos.
* WebProcess/WebCoreSupport/WebUserMediaClient.h: Mark the WebUserMediaClient::pageDestroyed()
method, inherited from the WebCore::UserMediaClient, as an override.
2015-03-25 Zan Dobersek <zdobersek@igalia.com>
[GTK][WK2] WebPageProxy::failedToShowPopupMenu() virtual method should be marked as override
https://bugs.webkit.org/show_bug.cgi?id=143045
Reviewed by Carlos Garcia Campos.
* UIProcess/WebPageProxy.h: Mark the failedToShowPopupMenu(), inherited from
the WebPopupMenuProxy::Client class, as overridden.
2015-03-25 Zan Dobersek <zdobersek@igalia.com>
[WK2] Clean up DrawingAreaImpl vtable overrides
https://bugs.webkit.org/show_bug.cgi?id=143044
Reviewed by Carlos Garcia Campos.
Declare virtual methods of the DrawingAreaImpl class as overridden where necessary.
* WebProcess/WebPage/DrawingAreaImpl.h:
(WebKit::DrawingAreaImpl::layerTreeStateIsFrozen): Deleted.
(WebKit::DrawingAreaImpl::layerTreeHost): Deleted.
2015-03-24 Ryosuke Niwa <rniwa@webkit.org>
Inspector doesn't get focused when opened in dock mode
https://bugs.webkit.org/show_bug.cgi?id=143030
Reviewed by Anders Carlsson.
The bug was caused by platformBringToFront and platformAttach calling makeFirstResponder on WKWebView,
which aren't intended to become the first responder. Fixed the bug by calling makeFirstResponder on the WKView
subview of the WKWebView, which is intended to be used as the first responder on behalf of the web view.
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformBringToFront):
(WebKit::WebInspectorProxy::platformAttach):
2015-03-24 Chris Dumez <cdumez@apple.com>
[WK2] Responses with 302 HTTP Status Code should not be cached
https://bugs.webkit.org/show_bug.cgi?id=143028
<rdar://problem/19714040>
Reviewed by Antti Koivisto.
Responses with 302 HTTP Status Code should not be cached as per
RFC 7231:
http://tools.ietf.org/html/rfc7231#section-6.1
This patch updates our disk cache policy accordingly.
Test: http/tests/cache/disk-cache/disk-cache-302-status-code.html
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::canStore):
2015-03-24 Anders Carlsson <andersca@apple.com>
Fix crash in WebKit::RemoteObjectRegistry::sendInvocation
https://bugs.webkit.org/show_bug.cgi?id=143027
rdar://problem/20208674
Reviewed by Sam Weinig.
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(-[WKWebProcessPlugInBrowserContextController dealloc]):
Make sure to invalidate the _WKRemoteObjectRegistry like we do in the UI process.
2015-03-24 Chris Dumez <cdumez@apple.com>
[WK2] Responses with 204 HTTP Status Code should be cacheable by default
https://bugs.webkit.org/show_bug.cgi?id=143020
<rdar://problem/20281529>
Reviewed by Antti Koivisto.
Make responses with 204 HTTP Status Code cacheable by default, as
per RFC 7231:
http://tools.ietf.org/html/rfc7231#section-6.3.5
Test: http/tests/cache/disk-cache/disk-cache-204-status-code.html
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::canStore):
2015-03-24 Enrica Casucci <enrica@apple.com>
[iOS] Remove unused keyboard code in WKSelectPopover class.
https://bugs.webkit.org/show_bug.cgi?id=143021
Reviewed by Joseph Pecoraro.
WKSelectPopover created an instance of UIKeyboard that was
initialized in initWithView but never used. Removing the
obsolete code.
* UIProcess/ios/forms/WKFormSelectPopover.mm:
(-[WKSelectPopover initWithView:hasGroups:]):
2015-03-24 Dan Bernstein <mitz@apple.com>
WebKit2 part of <rdar://problem/20282863> Transforms are flattened in snapshots of on-screen WKWebViews
https://bugs.webkit.org/show_bug.cgi?id=143023
Reviewed by Tim Horton.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]): If the view is in a
window, use CARenderServerRenderLayerWithTransform to synchronously capture a snapshot of
its layer tree into an IOSurfcae, then call the completion handler with an image created
from the IOSurface.
2015-03-24 Beth Dakin <bdakin@apple.com>
Add events related to force click gesture
https://bugs.webkit.org/show_bug.cgi?id=142836
-and corresponding-
rdar://problem/20210239
Reviewed by Dean Jackson.
ActionMenuHitTestResult has a new bool indicating whether to not the HitTestResult
will prevent default.
* Shared/mac/ActionMenuHitTestResult.h:
* Shared/mac/ActionMenuHitTestResult.mm:
(WebKit::ActionMenuHitTestResult::encode):
(WebKit::ActionMenuHitTestResult::decode):
Send immediateActionDidUpdate and the normalized force over the the WebProcess.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::immediateActionDidUpdate):
* UIProcess/WebPageProxy.h:
We need a dummy animation controller when web content is overriding the default
behavior.
* UIProcess/mac/WKImmediateActionController.mm:
Send along the update information.
(-[WKImmediateActionController immediateActionRecognizerDidUpdateAnimation:]):
Use the dummy animation controller if default has been prevented.
(-[WKImmediateActionController _defaultAnimationController]):
(-[WKImmediateActionController _updateImmediateActionItem]):
Keep track of whether m_lastActionMenuHitTes prevented the default immediate
action behavior.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
Call dispatchMouseForceMayBegin() at hit test time.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performActionMenuHitTestAtLocation):
Call dispatchMouseForceChanged() if appropriate.
(WebKit::WebPage::immediateActionDidUpdate):
Call dispatchMouseForceCancelled() if appropriate.
(WebKit::WebPage::immediateActionDidCancel):
Call dispatchMouseForceDown() if appropriate.
(WebKit::WebPage::immediateActionDidComplete):
2015-03-24 Anders Carlsson <andersca@apple.com>
Fix designated initializer violations
https://bugs.webkit.org/show_bug.cgi?id=143016
rdar://problem/20268858
Reviewed by Dan Bernstein.
Move -[WKProcessPool _initWithConfiguration:] to a class extension so we can make it the designated initializer.
* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _initWithConfiguration:]):
* UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
2015-03-24 Chris Dumez <cdumez@apple.com>
[WK2] Responses with 404 HTTP Status Code should be cacheable by default
https://bugs.webkit.org/show_bug.cgi?id=143014
<rdar://problem/20280310>
Reviewed by Antti Koivisto.
Make responses with 404 HTTP Status Code cacheable by default, as
per RFC 7231:
http://tools.ietf.org/html/rfc7231#section-6.5.4
Test: http/tests/cache/disk-cache/disk-cache-404-status-code.html
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::canStore):
2015-03-24 Chris Dumez <cdumez@apple.com>
[WK2] Remove NetworkCache FIXME comment about caching responses to OPTIONS requests
https://bugs.webkit.org/show_bug.cgi?id=143009
Reviewed by Andreas Kling.
Remove NetworkCache FIXME comment about caching responses to OPTIONS
method as RFC 7234 says "Responses to the OPTIONS method are not
cacheable" [1].
[1] http://tools.ietf.org/html/rfc7231#page-31
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::canRetrieve):
2015-03-24 Chris Dumez <cdumez@apple.com>
[WK2] NetworkCache retrievals fail for entries with no body
https://bugs.webkit.org/show_bug.cgi?id=142979
<rdar://problem/20264100>
Reviewed by Antti Koivisto.
NetworkCache retrievals were failing for entries with no body because
decodeEntry() doesn't correctly handle this case. In particular, the
following check fails:
"metaData.bodyOffset + metaData.bodySize == fileData.size()".
This is because bodyOffset is pageSize-aligned.
As a result, the following resource on apple.com is stored in the cache
but we fail to reuse it and reload it from the network every time:
http://images.apple.com/home/styles/promos.css
This patch updates decodeEntry() to create a null Data object for the
body if bodySize is 0.
* NetworkProcess/cache/NetworkCacheDataCocoa.mm:
(WebKit::NetworkCache::Data::data):
Do not attempt to initialize m_data if m_dispatchData is null as the
call to dispatch_data_create_map() would then crash. We now return
null in this case. This is needed as decodeStorageEntry() in
NetworkCache.cpp constructs a SharedBuffer from
storageEntry.body.data() and the body may be null.
* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::decodeEntry):
2015-03-24 Chris Dumez <cdumez@apple.com>
[WK2] The WebKit network cache does not cache responses with "Content-Disposition: attachment" header
https://bugs.webkit.org/show_bug.cgi?id=142989
<rdar://problem/20265992>
Reviewed by Antti Koivisto.
Update our WebKit network cache policy to cache responses with
"Content-Disposition: attachment" header. There is no reason we cannot
cache these and our memory cache already does.
This was causing a decent amount of cache misses in the wild. I have
noticed for example that when loading disney.com, we fail to cache the
following resources because of this policy:
http://pagead2.googlesyndication.com/pagead/osd.js
http://pagead2.googlesyndication.com/pagead/show_companion_ad.js
Those resources have Cache-Control headers that indicate they are meant
to be cacheable.
Test: http/tests/cache/disk-cache-validation-attachment.html
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::canStore):
2015-03-23 Joseph Pecoraro <pecoraro@apple.com>
Unreviewed, another attempt to fix 32-bit build after r181881.
* UIProcess/WebInspectorProxy.h:
2015-03-23 Joseph Pecoraro <pecoraro@apple.com>
Unreviewed, attempt to fix 32-bit build after r181881.
* UIProcess/API/Cocoa/WKViewPrivate.h:
* UIProcess/API/mac/WKView.mm:
2015-03-19 Timothy Hatcher <timothy@apple.com>
Web Inspector: Support attaching to another view other than the WKView
https://bugs.webkit.org/show_bug.cgi?id=142892
Reviewed by Tim Horton.
* UIProcess/API/C/WKInspector.cpp:
(WKInspectorAttach): Drive by fix so it used the last attachment side.
* UIProcess/API/Cocoa/WKViewPrivate.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView _inspectorAttachmentView]): Added.
(-[WKView _setInspectorAttachmentView:]): Added.
* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::createInspectorPage):
(WebKit::WebInspectorProxy::attachAvailabilityChanged):
Use platformCanAttach as a final check incase there is a different
attachment view that the platform knows about.
* UIProcess/WebInspectorProxy.h:
(WebKit::WebInspectorProxy::attachmentSide): Added.
(WebKit::WebInspectorProxy::platformCanAttach): Added.
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::attachmentViewDidChange): Added.
(WebKit::WebInspectorProxy::closeTimerFired):
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
(WebKit::WebInspectorProxy::platformCanAttach):
(WebKit::WebInspectorProxy::inspectedViewFrameDidChange):
(WebKit::WebInspectorProxy::platformInspectedWindowHeight):
(WebKit::WebInspectorProxy::platformInspectedWindowWidth):
(WebKit::WebInspectorProxy::platformAttach):
(WebKit::WebInspectorProxy::platformDetach):
Use the _inspectorAttachmentView and change how the frame change notification
is observed and follow the attachment view as it changes.
2015-03-23 Tim Horton <timothy_horton@apple.com>
Images shared to photos via action menu are padded with zeroes at the end
https://bugs.webkit.org/show_bug.cgi?id=142985
Reviewed by Anders Carlsson.
* Shared/mac/ActionMenuHitTestResult.h:
* Shared/mac/ActionMenuHitTestResult.mm:
(WebKit::ActionMenuHitTestResult::encode):
(WebKit::ActionMenuHitTestResult::decode):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performActionMenuHitTestAtLocation):
Send the size of the image separately from the SharedMemory.
The SharedMemory's size can be rounded up, so we need to keep the original
size around in order to write the data to disk.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _hitTestResultImage]):
(-[WKActionMenuController _addImageToPhotos:]):
Use the image size instead of the SharedMemory size.
2015-03-23 Enrica Casucci <enrica@apple.com>
[iOS] WebContent crash attempting to select text with a gesture at RenderObject::absoluteBoundingBoxRect.
https://bugs.webkit.org/show_bug.cgi?id=142913
rdar://problem/16400033
Reviewed by Sam Weinig.
When looking for the best candidate range at the given position,
we should skip nodes that don't have a renderer.
This is a speculative fix.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::rangeForWebSelectionAtPosition):
2015-03-23 Alexey Proskuryakov <ap@apple.com>
REGRESSION (Yosemite): WKView visibility notifications are messed up
https://bugs.webkit.org/show_bug.cgi?id=142945
Reviewed by Tim Horton.
As these notifications cannot be used by NSView subclasses, create a separate
object for observing them.
* UIProcess/API/mac/WKView.mm:
(-[WKWindowVisibilityObserver initWithView:]):
(-[WKWindowVisibilityObserver startObserving:]):
(-[WKWindowVisibilityObserver stopObserving:]):
(-[WKWindowVisibilityObserver _windowDidOrderOnScreen:]):
(-[WKWindowVisibilityObserver _windowDidOrderOffScreen:]):
(-[WKView addWindowObserversForWindow:]):
(-[WKView removeWindowObservers]): Also, don't try to remove NSWindowWillOrderOffScreenNotification,
which we never start to observe.
(-[WKView initWithFrame:processPool:configuration:webView:]):
* UIProcess/API/mac/WKViewInternal.h:
2015-03-23 Anders Carlsson <andersca@apple.com>
Make platform/mac-wk2/plugins/destroy-during-async-npp-new.html work again.
https://bugs.webkit.org/show_bug.cgi?id=133692
rdar://problem/17255947
Reviewed by Alexey Proskuryakov.
Add plug-in destruction protectors around message receiver code that can call out to NPObjects or JavaScript
where we need the plug-in to stay around after the call.
* Shared/Plugins/NPObjectMessageReceiver.cpp:
(WebKit::NPObjectMessageReceiver::invoke):
(WebKit::NPObjectMessageReceiver::invokeDefault):
(WebKit::NPObjectMessageReceiver::getProperty):
(WebKit::NPObjectMessageReceiver::setProperty):
(WebKit::NPObjectMessageReceiver::construct):
2015-03-23 Anders Carlsson <andersca@apple.com>
Put the WK_NULLABLE_SPECIFIER in the right place for block parameters
https://bugs.webkit.org/show_bug.cgi?id=142975
rdar://problem/19863930
Reviewed by Dan Bernstein.
* UIProcess/API/Cocoa/WKNavigationDelegate.h:
* UIProcess/API/Cocoa/WKUIDelegate.h:
* UIProcess/API/Cocoa/WKWebView.h:
2015-03-23 Tim Horton <timothy_horton@apple.com>
Add a share item to the link action menu
https://bugs.webkit.org/show_bug.cgi?id=142961
<rdar://problem/19198374>
Reviewed by Beth Dakin.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _hitLinkURL]):
Factor out _hitLinkURL from various places.
(-[WKActionMenuController _openURLFromActionMenu:]):
(-[WKActionMenuController _addToReadingListFromActionMenu:]):
(-[WKActionMenuController _defaultMenuItemsForVideo]):
(-[WKActionMenuController _defaultMenuItemsForImage]):
(-[WKActionMenuController _createActionMenuItemForTag:]):
(-[WKActionMenuController _createShareActionMenuItemForTag:withItems:]):
Adopt -[NSMenuItem standardShareMenuItemWithItems].
All of the null-checking is unnecessary as it's impossible to enter
these functions with a null image/etc.
(-[WKActionMenuController _defaultMenuItemsForLink]):
* Shared/API/c/WKActionMenuItemTypes.h:
Add a 'Share' item to the link menu.
2015-03-23 Zan Dobersek <zdobersek@igalia.com>
[GTK] Use std::abs() in ClickCounter::currentClickCountForGdkButtonEvent()
https://bugs.webkit.org/show_bug.cgi?id=142964
Reviewed by Carlos Garcia Campos.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(ClickCounter::currentClickCountForGdkButtonEvent): Use the STL's std::abs()
instead of C's abs(). The templated nature of std::abs() ensures the proper
computation that matches the types of the passed-in values, and shuts down
a warning when compiling with Clang.
2015-03-23 Zan Dobersek <zdobersek@igalia.com>
[GTK][WK2] webkitBackForwardListChanged() should operate on a Vector reference
https://bugs.webkit.org/show_bug.cgi?id=142963
Reviewed by Carlos Garcia Campos.
* UIProcess/API/gtk/WebKitBackForwardList.cpp:
(webkitBackForwardListChanged): This function only reads from the passed-in
Vector of removed items, so only a const lvalue reference to the Vector
is needed.
* UIProcess/API/gtk/WebKitBackForwardListPrivate.h:
2015-03-23 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add a configure option to build without Redirected XComposite Window
https://bugs.webkit.org/show_bug.cgi?id=142865
Reviewed by Žan Doberšek.
Use USE(REDIRECTED_XCOMPOSITE_WINDOW) instead of
USE(TEXTURE_MAPPER_GL) && PLATFORM(X11).
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseRealize): Use the XID of the WebKitWebView
window as native surface handle when REDIRECTED_XCOMPOSITE_WINDOW
is disabled.
(webkitWebViewRenderAcceleratedCompositingResults):
(resizeWebKitWebViewBaseFromAllocation):
(webkitWebViewBaseEnterAcceleratedCompositingMode):
(webkitWebViewBaseExitAcceleratedCompositingMode):
* UIProcess/gtk/RedirectedXCompositeWindow.cpp:
* UIProcess/gtk/RedirectedXCompositeWindow.h:
2015-03-22 Eric Carlson <eric.carlson@apple.com>
[Mac] Enable WIRELESS_PLAYBACK_TARGET for WK1
https://bugs.webkit.org/show_bug.cgi?id=142940
Reviewed by Sam Weinig.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::playbackTargetSelected): Argument to didChoosePlaybackTarget is now const.
2015-03-22 Anders Carlsson <andersca@apple.com>
_WKWebsiteDataStore should clear WebSQL databases
https://bugs.webkit.org/show_bug.cgi?id=142947
rdar://problem/20242174
Reviewed by Sam Weinig.
* Shared/WebsiteData/WebsiteDataTypes.h:
Add WebsiteDataTypeWebSQLDatabases.
* UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
(API::WebsiteDataStore::defaultDataStoreConfiguration):
Initialize configuration.webSQLDatabaseDirectory.
* UIProcess/API/Cocoa/_WKWebsiteDataRecord.h:
Add WKWebsiteDataTypeWebSQLDatabases.
* UIProcess/API/Cocoa/_WKWebsiteDataRecord.mm:
(dataTypesToString):
Handle WKWebsiteDataTypeWebSQLDatabases.
* UIProcess/API/Cocoa/_WKWebsiteDataRecordInternal.h:
(WebKit::toWebsiteDataTypes):
(WebKit::toWKWebsiteDataTypes):
Handle WKWebsiteDataTypeWebSQLDatabases and WebsiteDataTypes::WebsiteDataTypeWebSQLDatabases.
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::WebsiteDataStore):
Initialize m_webSQLDatabaseDirectory and add a queue member variable.
(WebKit::WebsiteDataStore::fetchData):
Fetch database origins.
(WebKit::WebsiteDataStore::removeData):
Remove databases.
* UIProcess/WebsiteData/WebsiteDataStore.h:
Add new members.
2015-03-22 Dan Bernstein <mitz@apple.com>
[iOS] Expose WebPageProxy::setInitialFocus as SPI
https://bugs.webkit.org/show_bug.cgi?id=142951
Reviewed by Anders Carlsson.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _becomeFirstResponderWithSelectionMovingForward:completionHandler:]): New SPI.
Just calls through to WKWebContentView, but allows a nil completion handler.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView becomeFirstResponder]): Pass an empty lambda for the new callback parameter to
WebPageProxy::setInitialFocus.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setInitialFocus): Added a void callback parameter and made sure to
call it.
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _becomeFirstResponderWithSelectionMovingForward:completionHandler:]):
Added. Calls WebPageProxy::setInitialFocus, and once that completes, checks if anything was
focused and if so, becomes first responder, then calls the completion handler.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setInitialFocus): Added a callbackID parameter, and made sure to send the
callback message. Added a temporary change of m_userIsInteracting to true, so that the UI
process wont ignore any StartAssistingNode message resulting from the focus change.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in: Added a callbackID parameter to SetInitialFocus.
2015-03-21 Dean Jackson <dino@apple.com>
Remove the prefix for CSS Transforms
https://bugs.webkit.org/show_bug.cgi?id=142927
<rdar://problem/11568151>
Reviewed by Simon Fraser.
Rename AnimatedPropertyWebkitTransform to AnimatedPropertyTransform.
* Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
(IPC::ArgumentCoder<TextureMapperAnimation>::encode):
2015-03-21 Csaba Osztrogonác <ossy@webkit.org>
[EFL][GTK] Make WebKit2's generate-forwarding-headers.pl less verbose
https://bugs.webkit.org/show_bug.cgi?id=142908
Reviewed by Žan Doberšek.
* Scripts/generate-forwarding-headers.pl:
(createForwardingHeadersForFramework):
2015-03-21 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r181824.
https://bugs.webkit.org/show_bug.cgi?id=142935
Broke Windows build (Requested by ap on #webkit).
Reverted changeset:
"Remove the prefix for CSS Transforms"
https://bugs.webkit.org/show_bug.cgi?id=142927
http://trac.webkit.org/changeset/181824
2015-03-20 Dean Jackson <dino@apple.com>
Remove the prefix for CSS Transforms
https://bugs.webkit.org/show_bug.cgi?id=142927
<rdar://problem/11568151>
Reviewed by Simon Fraser.
Rename AnimatedPropertyWebkitTransform to AnimatedPropertyTransform.
* Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
(IPC::ArgumentCoder<TextureMapperAnimation>::encode):
2015-03-20 Chris Dumez <cdumez@apple.com>
[WK2] NetworkCache retrievals sometimes fail on browser startup
https://bugs.webkit.org/show_bug.cgi?id=142925
<rdar://problem/20245368>
Reviewed by Antti Koivisto.
NetworkCache retrievals sometimes fail on browser startup for resources
that are actually cached. The reason is that we are using a bloom filter
for performance reasons to avoid unnecessary disk I/O and this bloom
filter is populated on start up in a background thread by traversing the
cache files on disk. However, when restoring the tabs on start-up we
sometimes query this bloom filter before it is completely populated and
we thus fail to retrieve cached entries because we think they don't
exist and don't check the disk.
This patch adds an "isPopulatingContentsFilter" flag that is turned ON
on start up while we are populating the bloon filter. We then bypass
the bloom filter and send queries directly to disk on start up if this
flag is ON.
* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::Storage::initialize):
(WebKit::NetworkCache::Storage::retrieve):
(WebKit::NetworkCache::Storage::dispatchPendingWriteOperations):
(WebKit::NetworkCache::Storage::dispatchHeaderWriteOperation):
* NetworkProcess/cache/NetworkCacheStorage.h:
(WebKit::NetworkCache::Storage::cacheMayContain):
2015-03-20 Chris Dumez <cdumez@apple.com>
[WK2] Allow stale content when restoring the browser's session state
https://bugs.webkit.org/show_bug.cgi?id=142916
<rdar://problem/20243493>
Reviewed by Darin Adler.
Allow stale content when restoring the browser's session state
(restoring all tabs from previous session), e.g.
- Via History > Reopen All windows from previous session on Safari
- Happens on startup for MobileSafari
I have verified that using "Open in tabs" on a bookmarks folder
still does fresh loads (rdar://problem/8131355) as it is not using
the restoreFromSessionState() code path.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::reattachToWebProcessForReload):
(WebKit::WebPageProxy::reattachToWebProcessWithItem):
(WebKit::WebPageProxy::goForward):
(WebKit::WebPageProxy::goBack):
(WebKit::WebPageProxy::goToBackForwardItem):
(WebKit::WebPageProxy::restoreFromSessionState):
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::goToBackForwardItem):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
2015-03-20 Beth Dakin <bdakin@apple.com>
[Immediate Actions] Should re-enable immediate actions for iBooks
https://bugs.webkit.org/show_bug.cgi?id=142915
-and corresponding-
rdar://problem/19585689
Reviewed by Tim Horton.
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:processPool:configuration:webView:]):
2015-03-20 Alex Christensen <achristensen@webkit.org>
Progress towards CMake on Mac.
https://bugs.webkit.org/show_bug.cgi?id=136003
Reviewed by Chris Dumez.
* PlatformMac.cmake:
Add include directories and forwarding headers.
* Shared/API/APIObject.h:
(API::ObjectImpl::operator new):
* UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::intrinsicContentSizeDidChange):
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
Fix some unused parameter warnings.
2015-03-20 Gyuyoung Kim <gyuyoung.kim@samsung.com>
[CMake] Remove duplicated cmake function calls in WebKit2/CMakeLists.txt
https://bugs.webkit.org/show_bug.cgi?id=142901
Reviewed by Csaba Osztrogonác.
add_depencencies(), install() can support multiple targets or location.
We don't need to call it twice.
* CMakeLists.txt: Additionaly move -DBUILDING_WEBKIT to PlatformGTK.cmake,
because it is only used by GTK port.
2015-03-20 Zan Dobersek <zdobersek@igalia.com>
[GTK] Disable accelerated compositing on Wayland
https://bugs.webkit.org/show_bug.cgi?id=142877
Reviewed by Carlos Garcia Campos.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseCreateWebPage): As was done in the past, we should disable
accelerated compositing on Wayland until the proper support for it lands.
2015-03-19 Andy Estes <aestes@apple.com>
[Content Filtering] Add tests for unblock requests
https://bugs.webkit.org/show_bug.cgi?id=142900
Reviewed by Andreas Kling.
* UIProcess/Cocoa/WebPageProxyCocoa.mm:
(WebKit::WebPageProxy::contentFilterDidBlockLoadForFrame): Called WebFrameProxy::contentFilterDidBlockLoad.
* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::didStartProvisionalLoad): Assigned a default-constructed ContentFilterUnblockHandler instead of calling clear().
(WebKit::WebFrameProxy::didHandleContentFilterUnblockNavigation): Renamed from contentFilterDidHandleNavigationAction.
Updated to use ContentFilterUnblockHandler's new API.
(WebKit::WebFrameProxy::contentFilterDidHandleNavigationAction): Deleted.
* UIProcess/WebFrameProxy.h:
(WebKit::WebFrameProxy::contentFilterDidBlockLoad): Renamed from setContentFilterUnblockHandler.
(WebKit::WebFrameProxy::setContentFilterUnblockHandler): Deleted.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::decidePolicyForNavigationAction): Called WebFrameProxy::didHandleContentFilterUnblockNavigation.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::contentFilterDidBlockLoad): If the unblock handler needs the UI process,
send WebPageProxy::ContentFilterDidBlockLoadForFrame. Oterwise, call PolicyChecker::setContentFilterUnblockHandler.
2015-03-20 Zan Dobersek <zdobersek@igalia.com>
[GTK] Properly guard X11-specific code in BackingStore::createBackend()
https://bugs.webkit.org/show_bug.cgi?id=142875
Reviewed by Martin Robinson.
* UIProcess/cairo/BackingStoreCairo.cpp:
(WebKit::BackingStore::createBackend): Guard the GTK- and X11-specific
bit of code with PLATFORM(GTK) and PLATFORM(X11). Testing GDK_WINDOWING_X11
ensures that the GTK+ dependency has X11 support, but does not ensure
that WebKitGTK+ has been configured to build for X11 environments (which
is what PLATFORM(X11) ensures).
2015-03-19 Chris Dumez <cdumez@apple.com>
[WK2] We should allow stale content when restoring a killed / crashed WebProcess
https://bugs.webkit.org/show_bug.cgi?id=142893
<rdar://problem/19633737>
<rdar://problem/19869257>
Reviewed by Antti Koivisto.
Allow stale content when restoring a killed / crashed WebProcess
(similarly to a history navigation). This is actually what was intended
as we call WebPage::goToBackForwardItem() in this case, which uses
IndexedBackForward load type. However, this value was then ignored in
FrameLoader::loadDifferentDocumentItem().
This patch gets rid of the special casing in
FrameLoader::loadDifferentDocumentItem() and makes it clear at call
sites when calling goToBackForwardItem() if we should allow stale
content or not. If goToBackForwardItem() is called with the
allowStaleContent flag off, we'll keep using the IndexedBackForward
frame load type. However, if the flag is on, we'll use the Standard
frame load type and do a fresh load.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::reattachToWebProcessForReload):
Set allowStaleContent flag to true as we want to allow stale content
when reloading a WebProcess after it crashed or was killed (behavior
change).
(WebKit::WebPageProxy::reattachToWebProcessWithItem):
Add allowStaleContent parameter so that call sites can decide which
policy to use.
(WebKit::WebPageProxy::goForward):
(WebKit::WebPageProxy::goBack):
Set allowStaleContent flag to true as this is our policy for history
navigations.
(WebKit::WebPageProxy::goToBackForwardItem):
Add allowStaleContent parameter so that the call site can let us know
what to do. This is useful as this is called not only for indexed
back / forward navigations (allowing stale content) but also for
restoring session state (forbidding state content:
<rdar://problem/8131355>).
(WebKit::WebPageProxy::restoreFromSessionState):
Call goToBackForwardItem() with allowStaleContent flag set to false
as users expect fresh contents in this case. This method is called
when:
- Tabs are restored on Safari / MobileSafari startup
- Tabs are restored via "History > Reopen All windows from last session"
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::goToBackForwardItem):
Add allowStaleContent parameter and use "Standard" frame load type
instead of "IndexedBackForward" if it is false. This is needed as
"IndexedBackForward" frame load type allows using stale content.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
Add allowStaleContent flag to GoToBackForwardItem message.
2015-03-19 Eric Carlson <eric.carlson@apple.com>
[Mac] Move MediaPlaybackTargetPicker
https://bugs.webkit.org/show_bug.cgi?id=142889
Move WebMediaPlaybackTargetPickerProxy to WebCore so it can be used by
both WK2 and WK1.
Reviewed by Tim Horton.
* UIProcess/PageClient.h:
* UIProcess/WebMediaPlaybackTargetPickerProxy.cpp: Removed.
* UIProcess/WebMediaPlaybackTargetPickerProxy.h: Removed.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::devicePickerProxy):
* UIProcess/WebPageProxy.h:
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::createPlaybackTargetPicker):
* UIProcess/mac/WebMediaPlaybackTargetPickerProxyMac.h: Removed.
* UIProcess/mac/WebMediaPlaybackTargetPickerProxyMac.mm: Removed.
* WebKit2.xcodeproj/project.pbxproj:
2015-03-19 Jessie Berlin <jberlin@webkit.org>
32-bit build fix after r181770.
* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController initWithWindow:webView:]):
2015-03-19 Anders Carlsson <andersca@apple.com>
Add support for deleting individual cache entries
https://bugs.webkit.org/show_bug.cgi?id=142886
Reviewed by Antti Koivisto.
* NetworkProcess/NetworkProcess.cpp:
(WebKit::fetchDiskCacheEntries):
Remove an unnecessary call to cfURLCacheOrigins().
(WebKit::clearDiskCacheEntries):
Helper function for clearing disk cache entries. This handles both the old and new cache implementations.
(WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
Call clearDiskCacheEntries if needed.
2015-03-19 Jer Noble <jer.noble@apple.com>
[WK2][Mac] Fullscreen animations with mismatched aspect ratios are "squished".
https://bugs.webkit.org/show_bug.cgi?id=142132
Reviewed by Tim Horton.
Use CALayer animations for the transition into and out of fullscreen.
The fullscreen transition consists of three separate animations:
1. An opacity animation for the black backdrop behind the fullscreen content
2. A scale/translation animation from fullscreen element's initial screen to its final one.
3. A clip animation from the fullscreen element's initial aspect ratio to its final one.
The opacity animation will apply to the fullscreen window's content view's layer's
background color. To separately animate the transform and mask of the web view's content, a
layer-backed subview is added to the content view, and the scale/translation & clip
animations are applied to its transform property and mask layer respectively.
Utility methods to create each animation have been added, and each includes a parameter for
the direction of the animation, so that the same methods can be used for entering and
exiting fullscreen transitions.
The user-visible changes to this new transition are when the aspect ratios of the initial
and final screen locations are different: previously the transition would use a scale
transform to "squish" the fullscreen content into the initial aspect ratio. The new
transition instead "clips" the fullscreen content to the initial aspect ratio. For common
operations such a <video> element with a different aspect ratio than the screen, this makes
the black letterbox "grow" during the transition, and makes the transition overall much
smoother.
* UIProcess/mac/WKFullScreenWindowController.h:
* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController initWithWindow:webView:]): Create and initialze the clipping view.
(-[WKFullScreenWindowController applicationDidChangeScreenParameters:]): _backgroundWindow was removed.
(-[WKFullScreenWindowController enterFullScreen:]): Add the webView to the _clipView, not the contentView.
(-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:finalFrame:]): _backgroundWindow,
_fadeAnimation, and _scaleAnimation are all removed.
(-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): Ditto.
(-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): Ditto. Hide the contentView's
layer. Pause visibility updates.
(-[WKFullScreenWindowController completeFinishExitFullScreenAnimationAfterRepaint]): Resume visibility updates.
(-[WKFullScreenWindowController close]): _fadeAnimation and _scaleAnimation are removed.
(-[WKFullScreenWindowController customWindowsToEnterFullScreenForWindow:]): Return only the fullscreen
window.
(-[WKFullScreenWindowController customWindowsToExitFullScreenForWindow:]): Ditto.
(zoomAnimation): Added.
(maskAnimation): Added.
(fadeAnimation): Added.
(-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]): Use the utility
methods above to set up the animation.
(-[WKFullScreenWindowController _startExitFullScreenAnimationWithDuration:]): Ditto.
(createBackgroundFullscreenWindow): Deleted.
(windowFrameFromApparentFrames): Deleted.
2015-03-19 Enrica Casucci <enrica@apple.com>
<attachment> should put URLs on the pasteboard so that Finder can accept drops.
https://bugs.webkit.org/show_bug.cgi?id=142801
rdar://problem/19982527
Reviewed by Tim Horton.
This patch adds all the necessary support to write attachment elements into
the pasteboard, including the promised type in WK2.
* UIProcess/API/mac/WKView.mm:
(-[WKView _setPromisedDataForImage:withFileName:withExtension:withTitle:withURL:withVisibleURL:withArchive:forPasteboard:]):
(-[WKView _setPromisedDataForAttachment:withExtension:withTitle:withURL:withVisibleURL:forPasteboard:]):
(-[WKView namesOfPromisedFilesDroppedAtDestination:]):
(-[WKView _setPromisedData:withFileName:withExtension:withTitle:withURL:withVisibleURL:withArchive:forPasteboard:]): Deleted.
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::setPromisedDataForImage):
(WebKit::PageClientImpl::setPromisedDataForAttachment):
(WebKit::PageClientImpl::setPromisedData): Deleted.
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::setPromisedDataForImage):
(WebKit::WebPageProxy::setPromisedDataForAttachment):
(WebKit::WebPageProxy::setPromisedData): Deleted.
* WebProcess/WebCoreSupport/WebDragClient.h:
* WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
(WebKit::WebDragClient::declareAndWriteAttachment):
(WebKit::WebDragClient::declareAndWriteDragImage):
2015-03-19 Anders Carlsson <andersca@apple.com>
Cache::remove should take a Key instead of an entry
https://bugs.webkit.org/show_bug.cgi?id=142878
Reviewed by Antti Koivisto.
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::remove):
* NetworkProcess/cache/NetworkCache.h:
2015-03-19 Chris Dumez <cdumez@apple.com>
Clean up DOMTimer related settings
https://bugs.webkit.org/show_bug.cgi?id=142837
Reviewed by Darin Adler.
Stop setting the DOMTimers' default minimum interval to 4ms as this
is now the default.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
2015-03-19 Chris Dumez <cdumez@apple.com>
The network cache should ignore "cache-control: no-cache, must-revalidate" on history navigation
https://bugs.webkit.org/show_bug.cgi?id=142831
<rdar://problem/20209957>
Reviewed by Antti Koivisto.
The network cache should ignore "no-cache" and "must-revalidate" as
Cache-Control policy for history navigations to avoid unnecessary
revalidation in this case. Our memory cache already behaves this way.
On history navigation, our disk cache implementation currently
revalidates unconditionally resources if "cache-control: no-cache" is
used. It also revalidates expired resources if "cache-control:
must-revalidate" is used. This is sub-optimal.
RFC 7234 does not require us to do so [1]:
"""
User agents often have history mechanisms, such as "Back" buttons and
history lists, that can be used to redisplay a representation
retrieved earlier in a session.
The freshness model (Section 4.2) does not necessarily apply to
history mechanisms. That is, a history mechanism can display a
previous representation even if it has expired.
"""
Chrome and IE9+ [2] already ignore "cache-control: must-revalidate" on history navigation.
[1] https://tools.ietf.org/html/rfc7234#page-32
[2] http://blogs.msdn.com/b/ie/archive/2010/07/14/caching-improvements-in-internet-explorer-9.aspx
Test: http/tests/cache/disk-cache-validation-back-navigation-policy.html
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::decodeStorageEntry):
2015-03-18 Simon Fraser <simon.fraser@apple.com>
Don't paint PDFs on every scroll
https://bugs.webkit.org/show_bug.cgi?id=142857
rdar://problem/20130207
Reviewed by Tim Horton.
Don't push a scale factor onto the PDF layer controller if it hasn't
changed, since doing so causes a repaint.
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::updatePageAndDeviceScaleFactors):
2015-03-18 Anders Carlsson <andersca@apple.com>
Use && instead of & when deciding if the network cache should be cleared
https://bugs.webkit.org/show_bug.cgi?id=142845
Reviewed by Antti Koivisto.
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::deleteWebsiteData):
2015-03-18 Anders Carlsson <andersca@apple.com>
Add WKContextGetWebsiteDataStore API
https://bugs.webkit.org/show_bug.cgi?id=142832
rdar://problem/16544715
Reviewed by Sam Weinig.
Also add WKWebsiteDataStoreRef which is toll-free bridged to _WKWebsiteDataStore.
* Shared/API/c/WKBase.h:
Add new declaration.
* UIProcess/API/APIWebsiteDataStore.cpp:
(API::WebsiteDataStore::create):
* UIProcess/API/APIWebsiteDataStore.h:
Add a new function that takes a configuration.
* UIProcess/API/C/WKAPICast.h:
Add cast.
* UIProcess/API/C/WKContext.cpp:
(WKContextGetWebsiteDataStore):
Return the context's website data store.
* UIProcess/API/C/WKContext.h:
Add new declaration.
* UIProcess/API/C/WKWebsiteDataStoreRef.cpp: Added.
* UIProcess/API/C/WKWebsiteDataStoreRef.h: Added.
Add new files.
* UIProcess/WebKeyValueStorageManager.cpp:
(WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
(WebKit::WebKeyValueStorageManager::getStorageDetailsByOrigin):
(WebKit::WebKeyValueStorageManager::deleteEntriesForOrigin):
(WebKit::WebKeyValueStorageManager::deleteAllEntries):
Update now that WebProcessPool holds on to an API::WebsiteDataStore.
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::WebProcessPool):
(WebKit::WebProcessPool::createWebPage):
* UIProcess/WebProcessPool.h:
WebProcessPool should hold on to an API::WebsiteDataStore instead of a WebKit::WebsiteDataStore.
* WebKit2.xcodeproj/project.pbxproj:
Add new files.
2015-03-18 Tim Horton <timothy_horton@apple.com>
Cannot invoke action menus anymore
https://bugs.webkit.org/show_bug.cgi?id=142797
<rdar://problem/20032670>
* UIProcess/API/mac/WKView.mm:
Need one more respondsToSelector check.
2015-03-18 Chris Dumez <cdumez@apple.com>
[WK2] Log the number of network cache requests that we have never seen before
https://bugs.webkit.org/show_bug.cgi?id=142828
<rdar://problem/19632130>
Reviewed by Antti Koivisto.
Log the number of network cache requests that we have never seen before
using diagnostic logging.
* NetworkProcess/cache/NetworkCacheStatisticsCocoa.mm:
(WebKit::NetworkCache::Statistics::recordNotUsingCacheForRequest):
(WebKit::NetworkCache::Statistics::recordRetrievalFailure):
2015-03-17 Antti Koivisto <antti@apple.com>
Prune least valuable cache entries first
https://bugs.webkit.org/show_bug.cgi?id=142810
rdar://problem/19632130
Reviewed by Darin Adler.
When pruning the cache estimate relative value of each entry using formula
age = current time - creation time
accessAge = last access time - creation time
value = accessAge / age
That is, we value entries that have been accessed recently and survived in the cache longest.
The most valuable entries don't get deleted at all while the deletion probablity ramps up for
lower value entries.
* NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
(WebKit::NetworkCache::fileTimes):
Get the creation time and access time for a file.
(WebKit::NetworkCache::updateFileAccessTimeIfNeeded):
Update access time manually if the file system doesn't do it automatically.
* NetworkProcess/cache/NetworkCacheIOChannel.h:
(WebKit::NetworkCache::IOChannel::path):
(WebKit::NetworkCache::IOChannel::type):
* NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
(WebKit::NetworkCache::IOChannel::IOChannel):
(WebKit::NetworkCache::IOChannel::open):
Remember the file path and move most of the work to constructor.
* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::Storage::Storage):
(WebKit::NetworkCache::Storage::remove):
(WebKit::NetworkCache::Storage::updateFileAccessTime):
(WebKit::NetworkCache::Storage::dispatchReadOperation):
(WebKit::NetworkCache::deletionProbability):
Compute the probability based on entry age and access time.
(WebKit::NetworkCache::Storage::shrinkIfNeeded):
* NetworkProcess/cache/NetworkCacheStorage.h:
(WebKit::NetworkCache::Storage::serialBackgroundIOQueue):
(WebKit::NetworkCache::Storage::deleteQueue): Deleted.
More generic name.
2015-03-18 Chris Dumez <cdumez@apple.com>
[WK2] Log total number of network cache queries using diagnostic logging
https://bugs.webkit.org/show_bug.cgi?id=142803
<rdar://problem/19632130>
Reviewed by Antti Koivisto.
Log total number of network cache queries using diagnostic logging.
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::retrieve):
* NetworkProcess/cache/NetworkCacheStatistics.h:
* NetworkProcess/cache/NetworkCacheStatisticsCocoa.mm:
(WebKit::NetworkCache::Statistics::recordCacheRetrievalRequest):
2015-03-18 Chris Dumez <cdumez@apple.com>
[WK2] We should not even try the network cache for non-HTTP protocol requests
https://bugs.webkit.org/show_bug.cgi?id=142802
<rdar://problem/19632130>
Reviewed by Antti Koivisto.
We should not even try the network cache for non-HTTP protocol requests
and the network cache cannot handle those.
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::start):
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::canRetrieve):
(WebKit::NetworkCache::Cache::retrieve):
* NetworkProcess/cache/NetworkCache.h:
* NetworkProcess/cache/NetworkCacheStatisticsCocoa.mm:
(WebKit::NetworkCache::retrieveDecisionToDiagnosticKey):
2015-03-17 Conrad Shultz <conrad_shultz@apple.com>
Ignore some deprecation warnings
https://bugs.webkit.org/show_bug.cgi?id=142813
Reviewed by Mark Rowe.
Fixing the deprecations is tracked by: <rdar://problem/20201450>
* UIProcess/mac/WebPopupMenuProxyMac.mm:
(WebKit::WebPopupMenuProxyMac::populate):
2015-03-17 Ryuan Choi <ryuan.choi@navercorp.com>
[EFL] Expose JavaScript binding interface through ewk_extension
https://bugs.webkit.org/show_bug.cgi?id=142033
Reviewed by Gyuyoung Kim.
* PlatformEfl.cmake:
* UIProcess/API/efl/tests/extensions/extension_sample.cpp: Registered test object for new test case.
* UIProcess/API/efl/tests/test_ewk2_javascript_binding.cpp: Added simple binding API test case.
(EWK2ContextTestWithExtension::messageReceivedCallback):
(EWK2ContextTestWithExtension::EWK2ContextTestWithExtension):
(TEST_F):
* WebProcess/InjectedBundle/API/efl/EWebKit_Extension.h:
* WebProcess/InjectedBundle/API/efl/ewk_extension.cpp:
(EwkExtension::didCreatePage):
(EwkExtension::willDestroyPage):
* WebProcess/InjectedBundle/API/efl/ewk_extension.h:
* WebProcess/InjectedBundle/API/efl/ewk_extension_private.h:
* WebProcess/InjectedBundle/API/efl/ewk_page.cpp: Added.
(toEwkPage):
(EwkPage::EwkPage):
(EwkPage::append):
(EwkPage::remove):
(EwkPage::didFinishDocumentLoadForFrame):
(ewk_page_js_global_context_get):
(ewk_page_client_register):
(ewk_page_client_unregister):
* WebProcess/InjectedBundle/API/efl/ewk_page.h: Added.
* WebProcess/InjectedBundle/API/efl/ewk_page_private.h: Added.
(EwkPage::page):
* efl/ewebkit2-extension.pc.in:
2015-03-17 Tim Horton <timothy_horton@apple.com>
Cannot invoke action menus anymore
https://bugs.webkit.org/show_bug.cgi?id=142797
<rdar://problem/20032670>
* UIProcess/API/mac/WKView.mm:
Need a respondsToSelector check.
2015-03-17 Tim Horton <timothy_horton@apple.com>
Cannot invoke action menus anymore
https://bugs.webkit.org/show_bug.cgi?id=142797
<rdar://problem/20032670>
Reviewed by Beth Dakin.
* UIProcess/API/mac/WKView.mm:
Don't process mouse events that would make an action menu; call super
and let AppKit take care of it. We have to duplicate the macro so that
we can avoid calling super for the internal-only methods.
Also, otherMouseMoved is simply not a thing, so remove it.
2015-03-17 Beth Dakin <bdakin@apple.com>
DOM mouse events have weird timing for force clickable elements in Safari 8.0.3 on
10.10.2
https://bugs.webkit.org/show_bug.cgi?id=142700
-and corresponding-
rdar://problem/20165168
Reviewed by Tim Horton.
No need to tell the WKImmediateActionController about mouse down any more since we
are expecting it at the beginning of an immediate action interaction.
* UIProcess/API/mac/WKView.mm:
(-[WKView mouseDown:]):
Set the delaysPrimaryMouseButtonEvents to NO for the
_immediateActionGestureRecognizer. This will cause AppKit to send up the mouse
events at the expected time.
(-[WKView initWithFrame:processPool:configuration:webView:]):
WebCore::EventHandler now needs to know if an immediate action cancelled or
completed. This plumbs that information down.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::immediateActionDidCancel):
(WebKit::WebPageProxy::immediateActionDidComplete):
* UIProcess/WebPageProxy.h:
* UIProcess/mac/WKImmediateActionController.h:
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController immediateActionRecognizerDidCancelAnimation:]):
(-[WKImmediateActionController immediateActionRecognizerDidCompleteAnimation:]):
(-[WKImmediateActionController wkView:willHandleMouseDown:]): Deleted.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
Call EventHandler::setImmediateActionStage() with the appropriate stage.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performActionMenuHitTestAtLocation):
(WebKit::WebPage::immediateActionDidCancel):
(WebKit::WebPage::immediateActionDidComplete):
2015-03-17 Timothy Horton <timothy_horton@apple.com>
Reproducible null deref under ScriptedAnimationController::createDisplayRefreshMonitor
https://bugs.webkit.org/show_bug.cgi?id=142776
<rdar://problem/18921338>
Reviewed by Alexey Proskuryakov.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::createDisplayRefreshMonitor):
* WebProcess/WebCoreSupport/WebChromeClient.h:
Adjust to the new signature.
2015-03-17 Antti Koivisto <antti@apple.com>
Disk cache should support Vary: Cookie
https://bugs.webkit.org/show_bug.cgi?id=142770
rdar://problem/19764945
Reviewed by Anders Carlsson.
Cookies are not part of the original request but are added by the networking layer when submitting the request.
Fetch them explicitly when resolving Vary: Cookie.
The implementation is not perfect as it fetches the cookie for the cache entry when saving a Vary:Cookie response,
not when making the request. In principle the cookie may have changed in-between. This should be enough to handle
reasonable cases though. Fetching cookies for every request might be too expensive for this rarely used feature.
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::headerValueForVary):
(WebKit::NetworkCache::encodeStorageEntry):
(WebKit::NetworkCache::verifyVaryingRequestHeaders):
2015-03-17 Zan Dobersek <zdobersek@igalia.com>
[WK2] Use C++ lambdas in IPC::Connection
https://bugs.webkit.org/show_bug.cgi?id=138018
Reviewed by Anders Carlsson.
Replace uses of WTF::bind() in the IPC::Connection class with C++ lambdas.
* Platform/IPC/Connection.cpp:
(IPC::Connection::dispatchWorkQueueMessageReceiverMessage):
(IPC::Connection::invalidate):
(IPC::Connection::sendMessage):
(IPC::Connection::processIncomingMessage): Simplify the error messages so we
don't have to format strings on-the-fly, removing the issues of cross-thread
string copying altogether.
(IPC::Connection::dispatchDidReceiveInvalidMessage): The parameters are now
of the StringReference type.
(IPC::Connection::enqueueIncomingMessage):
* Platform/IPC/Connection.h:
* Platform/IPC/mac/ConnectionMac.mm:
(IPC::Connection::receiveSourceEventHandler):
* Platform/IPC/unix/ConnectionUnix.cpp:
(IPC::Connection::open):
2015-03-17 Zan Dobersek <zdobersek@igalia.com>
[CMake] Use a forwarding header for ANGLE's ShaderLang.h to avoid picking up ANGLE's EGL headers
https://bugs.webkit.org/show_bug.cgi?id=142530
Reviewed by Darin Adler.
* CMakeLists.txt: Replace the Source/ThirdParty/ANGLE/include/GLSLANG entry
in the list of inclusion directories for WebKit2 with Source/ThirdParty/ANGLE,
possible due to the new forwarding header for ANGLE's ShaderLang.h.
2015-03-17 Gwang Yoon Hwang <yoon@igalia.com>
REGRESSION(r180924): Unable to build WebKitGTK+ with threaded compositor
Unreviewed build fix.
* WebProcess/WebPage/LayerTreeHost.h:
Remove duplicated declaration of setNativeSurfaceHandleForCompositing.
2015-03-16 Ryosuke Niwa <rniwa@webkit.org>
Enable ES6 classes by default
https://bugs.webkit.org/show_bug.cgi?id=142774
Reviewed by Gavin Barraclough.
* Configurations/FeatureDefines.xcconfig:
2015-03-16 Conrad Shultz <conrad_shultz@apple.com>
Don't pass nil as a fireDate for NSTimer
https://bugs.webkit.org/show_bug.cgi?id=142765
Reviewed by Dan Bernstein.
While we're here, switch to a selector that conforms to documented NSTimer API.
* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController cancelOperation:]):
Set the timer's fireDate as the future date matching the former interval; update the selector.
(-[WKFullScreenWindowController _watchdogTimerFired:]):
Timer callback; wrap -exitFullScreen.
2015-03-16 Alex Christensen <achristensen@webkit.org>
Progress towards CMake on Mac
https://bugs.webkit.org/show_bug.cgi?id=142747
Reviewed by Chris Dumez.
* PlatformMac.cmake:
Started adding Mac-specific directories and headers.
2015-03-16 Alexey Proskuryakov <ap@apple.com>
ASSERT(m_plugin) on plugins/snapshotting/snapshot-plugin-not-quite-blocked-by-image.html
https://bugs.webkit.org/show_bug.cgi?id=142637
Reviewed by Dean Jackson.
* WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::pluginSnapshotTimerFired):
m_plugin can be legitimately null.
2015-03-16 Csaba Osztrogonác <ossy@webkit.org>
One more URTBF after r181578.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
2015-03-16 Csaba Osztrogonác <ossy@webkit.org>
URTBF after r181578.
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::setCSSAnimationTriggersEnabled): Copy/paste error fixed.
2015-03-16 Dean Jackson <dino@apple.com>
Expose WK2 preference for Animation Triggers runtime flag
https://bugs.webkit.org/show_bug.cgi?id=142744
Reviewed by Anders Carlsson.
Expose CSSAnimationTriggersEnabled, linking it to the runtime enabled
feature flag.
* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetCSSAnimationTriggersEnabled):
(WKPreferencesGetCSSAnimationTriggersEnabled):
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
(WebKit::InjectedBundle::setCSSAnimationTriggersEnabled):
* WebProcess/InjectedBundle/InjectedBundle.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
2015-03-16 Conrad Shultz <conrad_shultz@apple.com>
Allow clients to selectively disable plug-ins
https://bugs.webkit.org/show_bug.cgi?id=142506
Reviewed by Anders Carlsson.
Add new functionality allow clients to declaratively disable individual plug-ins (in a manner that conceals them
from the page). As part of this:
1) Introduce the concept of web-visible plug-ins and related concepts, as distinct from the real underlying
set of plug-ins.
2) Where applicable, plumb additional information about plug-ins (specifically, bundle identification) deeper
down the stack.
3) Add generic functionality to PluginStrategy to support filtering plug-ins for visibility and introduce
a concrete implementation thereof in WebPlatformStrategies in WebKit2.
4) Add messaging infrastructure to allow clients to set and clear plug-in policies.
While currently only used in a very limited manner, the new declarative plug-in policies are written generically
so that they could be easily used in the future to reduce synchronous messaging to the client when loading plug-ins.
* Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
(WebKit::NetscapePluginModule::getPluginInfo):
Set new PluginInfo members.
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<PluginInfo>::encode):
Handle new PluginInfo members.
(IPC::ArgumentCoder<PluginInfo>::decode):
Ditto.
* Shared/WebProcessCreationParameters.h:
Declare a member to store client plug-in policies.
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
Encode the policies.
(WebKit::WebProcessCreationParameters::decode):
Decode the policies.
* UIProcess/API/C/WKAPICast.h:
(WebKit::toWKPluginLoadClientPolicy):
Teach how to cast between WebCore and WebKit2 policy definitions.
(WebKit::toPluginLoadClientPolicy):
Ditto.
* UIProcess/API/C/WKPluginLoadPolicy.h:
Declare WKPluginLoadClientPolicy, matching PluginLoadClientPolicy in WebCore.
* UIProcess/API/C/mac/WKContextPrivateMac.h:
* UIProcess/API/C/mac/WKContextPrivateMac.mm:
(WKContextSetPluginLoadClientPolicy):
New function; wrap WebProcessPool::setPluginLoadClientPolicy().
(WKContextClearPluginClientPolicies):
New function; wrap WebProcessPool::clearPluginClientPolicies().
* UIProcess/WebProcessPool.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::createNewWebProcess):
Copy any client plug-in policies to the new process' creation parameters.
(WebKit::WebProcessPool::setPluginLoadClientPolicy):
Send SetPluginLoadClientPolicy to all processes and stash the passed-in policy info.
(WebKit::WebProcessPool::clearPluginClientPolicies):
Send ClearPluginClientPolicies to all processes and clear any stashed policy info.
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::pluginInfo):
Set new PluginInfo member.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::pluginSupportsExtension):
Adopt getWebVisibleMimesAndPluginIndices().
(WebKit::WebFrameLoaderClient::objectContentType):
Update to reflect reflect function rename.
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::getPluginInfo):
Pass the Page to populatePluginCache().
(WebKit::WebPlatformStrategies::getWebVisiblePluginInfo):
New member function; wrap getPluginInfo(); if appropriate, filter out plug-ins the client has asked
to block on the current page.
(WebKit::WebPlatformStrategies::setPluginLoadClientPolicy):
New member function; map empty inputs to a wildcard character and insert the new policy into the nested map.
(WebKit::WebPlatformStrategies::clearPluginClientPolicies):
New member function; empty m_hostsToPluginIdentifierData.
(WebKit::WebPlatformStrategies::pluginLoadClientPolicyForHost):
New member function; look up the most specific policy for the given plug-in and host.
(WebKit::WebPlatformStrategies::populatePluginCache):
If appropriate, set the client load policy on the plug-ins; do this irrespective of whether the cache has
been populated since the Page, and therefore host, may change.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::canShowMIMEType):
Update to reflect function rename.
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):
Enumerate and process the client plug-in policies in the creation parameters.
(WebKit::WebProcess::setPluginLoadClientPolicy):
New member function; wrap PluginStrategy::setPluginLoadClientPolicy.
(WebKit::WebProcess::clearPluginClientPolicies):
New member function; wrap PluginStrategy::clearPluginClientPolicies().
* WebProcess/WebProcess.messages.in:
Add messages for setting and clearing policies.
2015-03-16 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Add new Notification classes to GTK+ API documentation.
Add WebKitNotification and WebKitNotificationPermissionRequest to
the documentation and fix some other typos causing warnings when
generating HTML documentation.
* UIProcess/API/gtk/WebKitUserContent.cpp:
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkit_web_view_class_init):
* UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
2015-03-16 Przemyslaw Piorkowski <p.piorkowski@samsung.com>
[EFL][WK2] REGRESSION(r178526): test_ewk2_storage_manager has been failed for a long time
https://bugs.webkit.org/show_bug.cgi?id=141249
Reviewed by Gyuyoung Kim.
* PlatformEfl.cmake: Enable test_ewk2_storage_manager for EFL port - it is passing now.
2015-03-16 David Kilzer <ddkilzer@apple.com>
[iOS] REGRESSION (r181511): Most layout tests crash with a NULL deref
Follow-up fix for:
[iOS] Presenting a modal sheet on top of a WKWebView causes it to lose focused, active state
<http://webkit.org/b/142702>
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::isViewWindowActive): Add NULL check for m_webView.
(WebKit::PageClientImpl::isViewFocused): Ditto.
2015-03-15 Simon Fraser <simon.fraser@apple.com>
Clean up related to wheelEvent names
https://bugs.webkit.org/show_bug.cgi?id=142713
Reviewed by Anders Carlsson.
Add EventNames::isWheelEventType() and use it in places that test for the
two wheel event names.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::handleEvent):
2015-03-15 Dan Bernstein <mitz@apple.com>
[iOS] Presenting a modal sheet on top of a WKWebView causes it to lose focused, active state
https://bugs.webkit.org/show_bug.cgi?id=142702
Reviewed by Anders Carlsson.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView becomeFirstResponder]): Override to delegate first responder status to the
WKContentView if possible.
(-[WKWebView _retainActiveFocusedState]): New SPI that prevents view hierarchy changes from
affecting the active and focused state of the view. Increments a counter ivar and returns a
completion block (which callers must call when theyre done) that decrements it back.
* UIProcess/API/Cocoa/WKWebViewInternal.h: Declared new _activeFocusedStateRetainCount ivar
with @package access.
* UIProcess/API/Cocoa/WKWebViewPrivate.h: Declared new method.
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::isViewWindowActive): Return true if active/focused state is to be
maintained despite not being visible.
(WebKit::PageClientImpl::isViewFocused): Return true if active/focused state is to be
maintained despite not being active.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView resignFirstResponder]): Dont blur the assisted node if active/focused
state is to be maintained.
2015-03-14 Simon Fraser <simon.fraser@apple.com>
Clean up use of flags in localToContainer-type functions
https://bugs.webkit.org/show_bug.cgi?id=142704
Reviewed by Alexey Proskuryakov.
Pass UseTransforms explicitly to localToContainerPoint()
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getAssistedNodeInformation):
2015-03-14 Brent Fulgham <bfulgham@apple.com>
[iOS] scroll snap points are animating to the wrong positions.
https://bugs.webkit.org/show_bug.cgi?id=142705
<rdar://problem/20136946>
Reviewed by Simon Fraser.
Scroll snapping was landing in the wrong place on iOS because of two problems:
(1) It was searching for the closest snap offset point using unscaled 'screen' pixels,
which caused it to always choose one of the earliest snap point options.
(2) It was then selecting a scaled snap point coordinate and passing it back to UIKit
to animate the snap. This caused it to select a target point beyond the 'screen' pixel
we want to hit.
The solution to both problems are to scale the scroll destination UIKit suggests so that
we search among the scaled points with a valid value. Then, we need to scale the returned
value back to screen units before handing it back to UIKit to process.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView scrollViewWillBeginDragging:]): Drive-by fix. Get rid of extra ';' at
the end of the line.
* UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
(WebKit::RemoteScrollingCoordinatorProxy::closestSnapOffsetForMainFrameScrolling):
2015-03-14 Dean Jackson <dino@apple.com>
Feature flag for Animations Level 2
https://bugs.webkit.org/show_bug.cgi?id=142699
<rdar://problem/20165097>
Reviewed by Brent Fulgham.
Add ENABLE_CSS_ANIMATIONS_LEVEL_2 and a runtime flag animationTriggersEnabled.
* Configurations/FeatureDefines.xcconfig:
2015-03-14 Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
[GStreamer] share GL context in pipeline
https://bugs.webkit.org/show_bug.cgi?id=142693
Reviewed by Philippe Normand.
* WebProcess/gtk/WebProcessMainGtk.cpp: Enable XInitThreads() if
GSTREAMER_GL is used, since GstGL elements use another thread for
queuing GL operations.
2015-03-13 Alex Christensen <achristensen@webkit.org>
Progress towards CMake on Mac.
https://bugs.webkit.org/show_bug.cgi?id=142680
Reviewed by Gyuyoung Kim.
* PlatformMac.cmake: Added.
2015-03-13 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r181483.
https://bugs.webkit.org/show_bug.cgi?id=142688
Caused use-after-free on many tests (Requested by ap on
#webkit).
Reverted changeset:
"Allow clients to selectively disable plug-ins"
https://bugs.webkit.org/show_bug.cgi?id=142506
http://trac.webkit.org/changeset/181483
2015-03-13 Eric Carlson <eric.carlson@apple.com>
[Mac] Enable WIRELESS_PLAYBACK_TARGET
https://bugs.webkit.org/show_bug.cgi?id=142635
Reviewed by Darin Adler.
* Configurations/FeatureDefines.xcconfig:
2015-03-13 Timothy Horton <timothy_horton@apple.com>
Sites that use a device-width viewport but don't have enough height to fill the view are scaled up
https://bugs.webkit.org/show_bug.cgi?id=142664
<rdar://problem/18859470>
Reviewed by Benjamin Poulain.
* UIProcess/ios/WKScrollView.mm:
(-[WKScrollView _rubberBandOffsetForOffset:maxOffset:minOffset:range:outside:]):
Now that the WKContentView can (without pinching) be smaller than the unobscured
region of the WKWebView, we need to take that into account when deciding where
to retarget scrolling.
2015-03-13 Mark Lam <mark.lam@apple.com>
Replace TCSpinLock with a new WTF::SpinLock based on WTF::Atomic.
<https://webkit.org/b/142674>
Reviewed by Filip Pizlo.
* WebProcess/WebPage/EventDispatcher.cpp:
(WebKit::EventDispatcher::EventDispatcher):
* WebProcess/WebPage/EventDispatcher.h:
* WebProcess/WebPage/ViewUpdateDispatcher.cpp:
(WebKit::ViewUpdateDispatcher::ViewUpdateDispatcher):
* WebProcess/WebPage/ViewUpdateDispatcher.h:
2015-03-10 Conrad Shultz <conrad_shultz@apple.com>
Allow clients to selectively disable plug-ins
https://bugs.webkit.org/show_bug.cgi?id=142506
Reviewed by Anders Carlsson.
Add new functionality allow clients to declaratively disable individual plug-ins (in a manner that conceals them
from the page). As part of this:
1) Introduce the concept of web-visible plug-ins and related concepts, as distinct from the real underlying
set of plug-ins.
2) Where applicable, plumb additional information about plug-ins (specifically, bundle identification) deeper
down the stack.
3) Add generic functionality to PluginStrategy to support filtering plug-ins for visibility and introduce
a concrete implementation thereof in WebPlatformStrategies in WebKit2.
4) Add messaging infrastructure to allow clients to set and clear plug-in policies.
While currently only used in a very limited manner, the new declarative plug-in policies are written generically
so that they could be easily used in the future to reduce synchronous messaging to the client when loading plug-ins.
* Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
(WebKit::NetscapePluginModule::getPluginInfo):
Set new PluginInfo members.
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<PluginInfo>::encode):
Handle new PluginInfo members.
(IPC::ArgumentCoder<PluginInfo>::decode):
Ditto.
* Shared/WebProcessCreationParameters.h:
Declare a member to store client plug-in policies.
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
Encode the policies.
(WebKit::WebProcessCreationParameters::decode):
Decode the policies.
* UIProcess/API/C/WKAPICast.h:
(WebKit::toWKPluginLoadClientPolicy):
Teach how to cast between WebCore and WebKit2 policy definitions.
(WebKit::toPluginLoadClientPolicy):
Ditto.
* UIProcess/API/C/WKPluginLoadPolicy.h:
Declare WKPluginLoadClientPolicy, matching PluginLoadClientPolicy in WebCore.
* UIProcess/API/C/mac/WKContextPrivateMac.h:
* UIProcess/API/C/mac/WKContextPrivateMac.mm:
(WKContextSetPluginLoadClientPolicy):
New function; wrap WebProcessPool::setPluginLoadClientPolicy().
(WKContextClearPluginClientPolicies):
New function; wrap WebProcessPool::clearPluginClientPolicies().
* UIProcess/WebProcessPool.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::createNewWebProcess):
Copy any client plug-in policies to the new process' creation parameters.
(WebKit::WebProcessPool::setPluginLoadClientPolicy):
Send SetPluginLoadClientPolicy to all processes and stash the passed-in policy info.
(WebKit::WebProcessPool::clearPluginClientPolicies):
Send ClearPluginClientPolicies to all processes and clear any stashed policy info.
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::pluginInfo):
Set new PluginInfo member.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::pluginSupportsExtension):
Adopt getWebVisibleMimesAndPluginIndices().
(WebKit::WebFrameLoaderClient::objectContentType):
Update to reflect reflect function rename.
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::getPluginInfo):
Pass the Page to populatePluginCache().
(WebKit::WebPlatformStrategies::getWebVisiblePluginInfo):
New member function; wrap getPluginInfo(); if appropriate, filter out plug-ins the client has asked
to block on the current page.
(WebKit::WebPlatformStrategies::setPluginLoadClientPolicy):
New member function; map empty inputs to a wildcard character and insert the new policy into the nested map.
(WebKit::WebPlatformStrategies::clearPluginClientPolicies):
New member function; empty m_hostsToPluginIdentifierData.
(WebKit::WebPlatformStrategies::pluginLoadClientPolicyForHost):
New member function; look up the most specific policy for the given plug-in and host.
(WebKit::WebPlatformStrategies::populatePluginCache):
If appropriate, set the client load policy on the plug-ins; do this irrespective of whether the cache has
been populated since the Page, and therefore host, may change.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::canShowMIMEType):
Update to reflect function rename.
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):
Enumerate and process the client plug-in policies in the creation parameters.
(WebKit::WebProcess::setPluginLoadClientPolicy):
New member function; wrap PluginStrategy::setPluginLoadClientPolicy.
(WebKit::WebProcess::clearPluginClientPolicies):
New member function; wrap PluginStrategy::clearPluginClientPolicies().
* WebProcess/WebProcess.messages.in:
Add messages for setting and clearing policies.
2015-03-12 Jon Honeycutt <jhoneycutt@apple.com>
Use UIDocumentMenuViewController to allow selection of files from
iCloud Drive in WKFileUploadPanel
Part of <https://bugs.webkit.org/show_bug.cgi?id=142596> WebKit on
iOS should support file upload from iCloud Drive
<rdar://problem/12178991>
Reviewed by Andy Estes.
* Platform/spi/ios/UIKitSPI.h:
Include UIDocumentMenuViewController_Private.h if it exists. If not,
declare this new SPI.
* UIProcess/ios/forms/WKFileUploadPanel.mm:
(fallbackIconForFile):
Create a UIDocumentInteractionController for the file, and return a
thumbnail image from its smallest icon.
(iconForImageFile):
If we can get a UIImage from the file, create a thumbnail from it.
Otherwise, call fallbackIconForFile().
(iconForVideoFile):
Code moved from -[_WKVideoFileUploadItem displayImage].
(iconForFile):
Get the file's extension, and get the extension's preferred UTI. If the
UTI is an image type, call iconForImageFile(). If it's a video type,
call iconForVideoFile(). Otherwise, return the fallback icon.
(-[_WKFileUploadItem initWithFileURL:]):
Added an initializer that takes a file URL.
(-[_WKFileUploadItem fileURL]):
(-[_WKImageFileUploadItem initWithFileURL:originalImage:]):
(-[_WKVideoFileUploadItem displayImage]):
(WKFileUploadPanel):
Inherit from UIDocumentPickerDelegate and UIDocumentMenuDelegate. Add
an ivar for the document menu controller.
(-[WKFileUploadPanel dealloc]):
(-[WKFileUploadPanel presentWithParameters:resultListener:]):
If instances of UIDocumentMenuViewController respond to
-_setIgnoreApplicationEntitlementForImport:, meaning we can disable the
assertion that the current app has the iCloud Documents entitlement,
then show the document picker menu. Otherwise, show the current source
selection UI. The runtime check will be removed when a newer UIKit is
available.
(UTIsForMIMETypes):
Return the UTIs for the <input> element's "accept" attribute's MIME
type list.
(-[WKFileUploadPanel _mediaTypesForPickerSourceType:]):
Call UTIsForMIMETypes(). Fall back to available source types for this
picker type.
(-[WKFileUploadPanel _documentPickerMenuMediaTypes]):
Call UTIsForMIMETypes(). Fall back to the all-encompassing
"public.item" UTI.
(-[WKFileUploadPanel _photoLibraryButtonLabel]):
(-[WKFileUploadPanel _cameraButtonLabel]):
Factored out of -_showMediaSourceSelectionSheet. Return the
appropriate label for the camera button, based on whether it can take a
photo or video, or return nil if the camera is not available.
(-[WKFileUploadPanel _showMediaSourceSelectionSheet]):
Changed to use -_cameraButtonLabel and
-_presentForCurrentInterfaceIdiom:.
(-[WKFileUploadPanel _showDocumentPickerMenu]):
Create a UIDocumentMenuViewController, and populate it with options to
open the photo library or take a picture or video. If iCloud Drive or
other document sources are available, they will be added automatically.
(-[WKFileUploadPanel _presentForCurrentInterfaceIdiom:]):
(-[WKFileUploadPanel documentMenu:didPickDocumentPicker:]):
(-[WKFileUploadPanel documentMenuWasCancelled:]):
(-[WKFileUploadPanel documentPicker:didPickDocumentAtURL:]):
(-[WKFileUploadPanel documentPickerWasCancelled:]):
(-[WKFileUploadPanel _uploadItemFromMediaInfo:successBlock:failureBlock:]):
(-[_WKImageFileUploadItem initWithFilePath:originalImage:]): Deleted.
(-[_WKImageFileUploadItem fileURL]): Deleted.
(-[_WKVideoFileUploadItem initWithFilePath:mediaURL:]): Deleted.
(-[_WKVideoFileUploadItem fileURL]): Deleted.
2015-03-11 Enrica Casucci <enrica@apple.com>
Adopt new API for keyboard event handling.
https://bugs.webkit.org/show_bug.cgi?id=142602
rdar://problem/19966087
Reviewed by Sam Weinig.
Adopts the new API.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _didHandleKeyEvent:]):
2015-03-12 Alexey Proskuryakov <ap@apple.com>
testRunner.setAlwaysAcceptCookies does not work with NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=138687
Reviewed by Carlos Garcia Campos.
* UIProcess/WebCookieManagerProxy.cpp:
(WebKit::WebCookieManagerProxy::setHTTPCookieAcceptPolicy): Don't change system-wide
cookie accept policy when in testing mode. Also, update the policy in WebProcesses too,
as we still do some networking there.
* UIProcess/WebProcessPool.h:
* WebProcess/InjectedBundle/API/c/WKBundle.cpp:
(WKBundleSetAlwaysAcceptCookies): Deleted.
* WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::setAlwaysAcceptCookies): Deleted.
* WebProcess/InjectedBundle/InjectedBundle.h:
Remove WKBundleSetAlwaysAcceptCookies SPI, as WKTR now uses an API in UI process.
2015-03-12 Anders Carlsson <andersca@apple.com>
WKErrorDomain should be declared nonnull
https://bugs.webkit.org/show_bug.cgi?id=142628
Reviewed by Antti Koivisto.
Add WK_ASSUME_NONNULL_BEGIN and WK_ASSUME_NONNULL_END so everything will be implicitly nonnull.
* UIProcess/API/Cocoa/WKError.h:
2015-03-12 Ian Henderson <ian@ianhenderson.org>
PDFs don't snapshot properly in iOS Safari
https://bugs.webkit.org/show_bug.cgi?id=142623
Reviewed by Tim Horton.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
If we have a _customContentView, use UIView snapshotting instead of
trying to snapshot the web page.
2015-03-12 Eric Carlson <eric.carlson@apple.com>
[Mac] Update AirPlay handling
https://bugs.webkit.org/show_bug.cgi?id=142541
Unreviewed, respond to post-review comments and add previously reviewed changes
missed by a bungled merge.
* Shared/mac/WebCoreArgumentCodersMac.mm:
* UIProcess/WebMediaPlaybackTargetPickerProxy.cpp:
(WebKit::WebMediaPlaybackTargetPickerProxy::~WebMediaPlaybackTargetPickerProxy):
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::createPlaybackTargetPicker):
* UIProcess/mac/WebMediaPlaybackTargetPickerProxyMac.h: Added.
* UIProcess/mac/WebMediaPlaybackTargetPickerProxyMac.mm: Added.
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/WebPageMac.mm:
* WebProcess/com.apple.WebProcess.sb.in:
2015-03-11 Antti Koivisto <antti@apple.com>
Cache traversal missing large entries
https://bugs.webkit.org/show_bug.cgi?id=142601
Reviewed by Andreas Kling.
When traversing cache entries we only read the header data from disk. This didn't work
correctly for entries larger than the read size.
* NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
(WebKit::NetworkCache::IOChannel::read):
Partial reads only receive one callback with 'done' set to true.
Ensure we actually return data in this case.
* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::decodeEntryHeader):
Add some logging.
2015-03-11 Eric Carlson <eric.carlson@apple.com>
[Mac] Update AirPlay handling
https://bugs.webkit.org/show_bug.cgi?id=142541
Reviewed by Sam Weinig.
* Shared/WebCoreArgumentCoders.h:
* Shared/mac/WebCoreArgumentCodersMac.mm:
(IPC::ArgumentCoder<AVPlaybackTarget>::encode):
(IPC::ArgumentCoder<AVPlaybackTarget>::decode):
* UIProcess/PageClient.h:
* UIProcess/WebAVPlaybackTargetPickerProxy.cpp: Added.
(WebKit::WebAVPlaybackTargetPickerProxy::WebAVPlaybackTargetPickerProxy):
(WebKit::WebAVPlaybackTargetPickerProxy::~WebAVPlaybackTargetPickerProxy):
(WebKit::WebAVPlaybackTargetPickerProxy::showPlaybackTargetPicker):
(WebKit::WebAVPlaybackTargetPickerProxy::startingMonitoringPlaybackTargets):
(WebKit::WebAVPlaybackTargetPickerProxy::stopMonitoringPlaybackTargets):
* UIProcess/WebAVPlaybackTargetPickerProxy.h: Added.
(WebKit::WebAVPlaybackTargetPickerProxy::Client::~Client):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::devicePickerProxy):
(WebKit::WebPageProxy::showPlaybackTargetPicker):
(WebKit::WebPageProxy::startingMonitoringPlaybackTargets):
(WebKit::WebPageProxy::stopMonitoringPlaybackTargets):
(WebKit::WebPageProxy::didChoosePlaybackTarget):
(WebKit::WebPageProxy::externalOutputDeviceAvailableDidChange):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::createPlaybackTargetPicker):
* UIProcess/mac/WebAVPlaybackTargetPickerProxyMac.h: Added.
* UIProcess/mac/WebAVPlaybackTargetPickerProxyMac.mm: Added.
(WebKit::WebAVPlaybackTargetPickerProxyMac::create):
(WebKit::WebAVPlaybackTargetPickerProxyMac::WebAVPlaybackTargetPickerProxyMac):
(WebKit::WebAVPlaybackTargetPickerProxyMac::~WebAVPlaybackTargetPickerProxyMac):
(WebKit::WebAVPlaybackTargetPickerProxyMac::outputeDeviceAvailabilityChangedTimerFired):
(WebKit::WebAVPlaybackTargetPickerProxyMac::availableDevicesDidChange):
(WebKit::WebAVPlaybackTargetPickerProxyMac::devicePicker):
(WebKit::WebAVPlaybackTargetPickerProxyMac::showPlaybackTargetPicker):
(WebKit::WebAVPlaybackTargetPickerProxyMac::currentDeviceDidChange):
(WebKit::WebAVPlaybackTargetPickerProxyMac::startingMonitoringPlaybackTargets):
(WebKit::WebAVPlaybackTargetPickerProxyMac::stopMonitoringPlaybackTargets):
(-[WebAVOutputDevicePickerMenuControllerHelper initWithCallback:]):
(-[WebAVOutputDevicePickerMenuControllerHelper clearCallback]):
(-[WebAVOutputDevicePickerMenuControllerHelper observeValueForKeyPath:ofObject:change:context:]):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/WebAVPlaybackTargetPicker.cpp: Added.
(WebKit::WebAVPlaybackTargetPicker::WebAVPlaybackTargetPicker):
(WebKit::WebAVPlaybackTargetPicker::showPlaybackDevicePicker):
(WebKit::WebAVPlaybackTargetPicker::configureWireLessTargetMonitoring):
(WebKit::WebAVPlaybackTargetPicker::addClient):
(WebKit::WebAVPlaybackTargetPicker::removeClient):
(WebKit::WebAVPlaybackTargetPicker::didChoosePlaybackTarget):
(WebKit::WebAVPlaybackTargetPicker::playbackTargetAvailabilityDidChange):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::showPlaybackTargetPicker):
(WebKit::WebChromeClient::startingMonitoringPlaybackTargets):
(WebKit::WebChromeClient::stopMonitoringPlaybackTargets):
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::playbackTargetSelected):
(WebKit::WebPage::playbackTargetAvailabilityDidChange):
* WebProcess/com.apple.WebProcess.sb.in:
2015-03-11 Myles C. Maxfield <mmaxfield@apple.com>
Fix the build
Unreviewed.
* Shared/Downloads/mac/DownloadMac.mm:
(WebKit::Download::start):
(WebKit::Download::resume):
2015-03-10 Sam Weinig <sam@webkit.org>
Allow adding a button in input elements for auto fill related functionality
<rdar://problem/19782066>
https://bugs.webkit.org/show_bug.cgi?id=142564
Reviewed by Anders Carlsson.
- Adds new SPI to respond to clicks on the AutoFill button (both bundle and UIProcess).
- Adds new SPI to enable/disable the display of the AutoFill button on an element.
- Adds new SPI to get the bounds of the AutoFill button.
- Updates spelling of AutoFill to be consistent.
* UIProcess/API/APIUIClient.h:
(API::UIClient::didClickAutoFillButton):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageUIClient):
* UIProcess/API/C/WKPageUIClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::handleAutoFillButtonClick):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h:
(API::InjectedBundle::PageUIClient::didClickAutoFillButton):
* WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
(WebKit::InjectedBundlePageUIClient::didClickAutoFillButton):
* WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::handleAutoFillButtonClick):
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/InjectedBundle/API/c/WKBundlePageUIClient.h:
Pipe the didClickAutoFillButton to the SPI layer.
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:
(-[WKWebProcessPlugInNodeHandle HTMLInputElementIsAutoFilled]):
(-[WKWebProcessPlugInNodeHandle setHTMLInputElementIsAutoFilled:]):
Update for new spelling of AutoFill.
* WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h:
* WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
(WKBundleNodeHandleGetHTMLInputElementAutoFilled):
(WKBundleNodeHandleSetHTMLInputElementAutoFilled):
Added. Replaces WKBundleNodeHandleGetHTMLInputElementAutofilled/WKBundleNodeHandleSetHTMLInputElementAutofilled
which are now deprecated due to inconsistent spelling of AutoFill.
(WKBundleNodeHandleGetHTMLInputElementAutoFillButtonEnabled):
(WKBundleNodeHandleSetHTMLInputElementAutoFillButtonEnabled):
(WKBundleNodeHandleGetHTMLInputElementAutoFillButtonBounds):
Added.
(WKBundleNodeHandleGetHTMLInputElementAutofilled):
(WKBundleNodeHandleSetHTMLInputElementAutofilled):
Deprecated.
* WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
(WebKit::InjectedBundleNodeHandle::getOrCreate):
(WebKit::InjectedBundleNodeHandle::create):
(WebKit::InjectedBundleNodeHandle::InjectedBundleNodeHandle):
(WebKit::InjectedBundleNodeHandle::~InjectedBundleNodeHandle):
(WebKit::InjectedBundleNodeHandle::coreNode):
(WebKit::InjectedBundleNodeHandle::document):
(WebKit::InjectedBundleNodeHandle::elementBounds):
(WebKit::InjectedBundleNodeHandle::renderRect):
(WebKit::InjectedBundleNodeHandle::renderedImage):
(WebKit::InjectedBundleNodeHandle::visibleRange):
(WebKit::InjectedBundleNodeHandle::setHTMLInputElementValueForUser):
(WebKit::InjectedBundleNodeHandle::isHTMLInputElementAutoFilled):
(WebKit::InjectedBundleNodeHandle::setHTMLInputElementAutoFilled):
(WebKit::InjectedBundleNodeHandle::isHTMLInputElementAutoFillButtonEnabled):
(WebKit::InjectedBundleNodeHandle::setHTMLInputElementAutoFillButtonEnabled):
(WebKit::InjectedBundleNodeHandle::htmlInputElementAutoFillButtonBounds):
(WebKit::InjectedBundleNodeHandle::htmlInputElementLastChangeWasUserEdit):
(WebKit::InjectedBundleNodeHandle::htmlTextAreaElementLastChangeWasUserEdit):
(WebKit::InjectedBundleNodeHandle::isTextField):
(WebKit::InjectedBundleNodeHandle::htmlTableCellElementCellAbove):
(WebKit::InjectedBundleNodeHandle::documentFrame):
(WebKit::InjectedBundleNodeHandle::htmlFrameElementContentFrame):
(WebKit::InjectedBundleNodeHandle::htmlIFrameElementContentFrame):
(WebKit::InjectedBundleNodeHandle::isHTMLInputElementAutofilled): Deleted.
(WebKit::InjectedBundleNodeHandle::setHTMLInputElementAutofilled): Deleted.
* WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
Fix-up InjectedBundleNodeHandle to store its underlying Node in a Ref, rather than a RefPtr.
Add helpers to implement the new SPI for WKBundleNodeHandleRef.
2015-03-11 Timothy Horton <timothy_horton@apple.com>
Make it possible to zoom on pages that claim to lay out to device size and then fail to do so
https://bugs.webkit.org/show_bug.cgi?id=142549
Reviewed by Simon Fraser.
* Shared/WebPreferencesDefinitions.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
Flip the pref on by default.
2015-03-11 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Do not look for child processes in the UI process binary path
https://bugs.webkit.org/show_bug.cgi?id=135752
Reviewed by Gustavo Noronha Silva.
It's only useful for internal tools and tests, but never when
installed, since we don't install the processes in the bin dir but
in the libexec dir.
* Shared/gtk/ProcessExecutablePathGtk.cpp:
(WebKit::findWebKitProcess): Only look or the executables in the
UI process binary path or WEBKIT_EXEC_PATH for development builds.
* UIProcess/API/gtk/WebKitWebContext.cpp:
(injectedBundleDirectory): Only check
WEBKIT_INJECTED_BUNDLE_PATH env var for development builds.
2015-03-10 Antti Koivisto <antti@apple.com>
Add interface to delete disk cache entries
https://bugs.webkit.org/show_bug.cgi?id=142546
Reviewed by Anders Carlsson.
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::remove):
* NetworkProcess/cache/NetworkCache.h:
* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::Storage::Storage):
(WebKit::NetworkCache::Storage::remove):
Move deletion to a serial queue so we can't create large number of threads.
(WebKit::NetworkCache::Storage::dispatchReadOperation):
(WebKit::NetworkCache::Storage::dispatchHeaderWriteOperation):
(WebKit::NetworkCache::Storage::removeEntry): Deleted.
* NetworkProcess/cache/NetworkCacheStorage.h:
(WebKit::NetworkCache::Storage::deleteQueue):
2015-03-10 Chris Dumez <cdumez@apple.com>
5 tests fail on Apple Mac WK2 performance bots
https://bugs.webkit.org/show_bug.cgi?id=142485
Reviewed by Andreas Kling.
Only log errors in debug builds if SandboxExtension::createHandle() fails
so that performance tests don't fail because of it. Such error is not
fatal and is expected under certain circumstances. In particular,
SandboxExtension::createHandle() is sometimes called for non-existing
files (e.g. from NetworkResourceLoadParameters::encode()).
* Shared/mac/SandboxExtensionMac.mm:
(WebKit::SandboxExtension::createHandle):
2015-03-10 Timothy Horton <timothy_horton@apple.com>
Fix the build
* Shared/Downloads/ios/DownloadIOS.mm:
(WebKit::Download::startWithHandle):
* UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm:
(-[WKCustomProtocolLoader initWithCustomProtocolManagerProxy:customProtocolID:request:connection:]):
2015-03-10 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Contents not shown when entering AC mode unless the window is resized
https://bugs.webkit.org/show_bug.cgi?id=142347
Reviewed by Žan Doberšek.
The problem is once again that we are now creating the redirected
X window in realize method. When entering AC mode we resize the
redirected window to the drawing area size. Since the size hasn't
changed from the drawing area point of view, the web process is
not notified. The WebProcess always uses the window size, instead
of the root layer size, to make sure it's in sync, see the comment
in LayerTreeHostGtk::compositeLayersToContext(). So, we need to
enforce a resize when we change the size of the redirected window
when entering AC mode.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseEnterAcceleratedCompositingMode):
* UIProcess/DrawingAreaProxyImpl.h:
(WebKit::DrawingAreaProxyImpl::forceResize):
2015-03-10 Csaba Osztrogonác <ossy@webkit.org>
[cmake] Handle unused parameter warnings as build errors except in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=142338
Reviewed by Gyuyoung Kim.
* CMakeLists.txt:
2015-03-10 Dan Bernstein <mitz@apple.com>
WebKit2 part of <rdar://problem/20086546> [Cocoa] Add an option to treat certificate chains with SHA1-signed certificates as insecure
https://bugs.webkit.org/show_bug.cgi?id=142461
Reviewed by Sam Weinig.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]): Initialize
webPageConfiguration.treatsSHA1SignedCertificatesAsInsecure from the WKWebViewConfiguration.
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
Added _treatsSHA1SignedCertificatesAsInsecure ivar.
(-[WKWebViewConfiguration copyWithZone:]): Copy _treatsSHA1SignedCertificatesAsInsecure.
(-[WKWebViewConfiguration _treatsSHA1SignedCertificatesAsInsecure]): Added this getter.
(-[WKWebViewConfiguration _setTreatsSHA1SignedCertificatesAsInsecure:]): Added this setter.
* UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h: Declared new
_treatsSHA1SignedCertificatesAsInsecure property.
* UIProcess/PageLoadState.cpp:
(WebKit::PageLoadState::didCommitLoad): Use new hasInsecureContent parameter to initialize
hasInsecureContent parameter in the uncommitted state.
* UIProcess/PageLoadState.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy): Initialize new m_treatsSHA1CertificatesAsInsecure
member variable from the WebPageConfiguration.
(WebKit::WebPageProxy::didCommitLoadForFrame): Pass true for the new hasInsecureContent to
PageLoadState::didCommitLoad if we are treating SHA1-signed certificates as insecure and
the certificate info contains a non-root SHA1-signed certificate.
* UIProcess/WebPageProxy.h: Added m_treatsSHA1CertificatesAsInsecure member variable.
2015-03-09 Geoffrey Garen <ggaren@apple.com>
bmalloc: tryFastMalloc shouldn't crash
https://bugs.webkit.org/show_bug.cgi?id=142443
Reviewed by Anders Carlsson.
Part 1: Stop using tryFastRealloc.
* Shared/ShareableBitmap.cpp:
(WebKit::ShareableBitmap::resize): Deleted.
* Shared/ShareableBitmap.h: Removed the resize function because it has
no clients.
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::updateBackingStore): Changed to allocate a new
backing store instead of resizing the old one. This has three advantages:
(1) Might be more memory-efficient, since you don't have to keep the old
one around while allocating the new one.
(2) Avoids the overhead of realloc() copying the contents of the old
backing store even though we only want uninitialized memory.
(3) Makes resize failure consistent with initial allocation failure.
Previously, while initial allocation failure would set the backing store
to null, resize failure would keep the old wrong backing store and then
tell it not to paint. Now, resize failure also sets the backing store to
null.
2015-03-09 Martin Robinson <mrobinson@igalia.com>
[EFL] Move DispatchQueue to WTF
https://bugs.webkit.org/show_bug.cgi?id=142493
Reviewed by Csaba Osztrogonác.
* PlatformEfl.cmake: Remove DispatchQueue from the source list.
2015-03-08 Dean Jackson <dino@apple.com>
[iOS Media] Video buffer progress missing on iPhones
https://bugs.webkit.org/show_bug.cgi?id=142462
Reviewed by Eric Carlson.
Coordinate the SetBufferedTime message between the Web and UI
processes.
* UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in: New message SetBufferedTime.
* WebProcess/ios/WebVideoFullscreenManager.h:
* WebProcess/ios/WebVideoFullscreenManager.mm:
(WebKit::WebVideoFullscreenManager::setBufferedTime):
2015-03-08 Sam Weinig <sam@webkit.org>
[Content Extensions] Add scaffolding for the WKUserContentExtensionStore
https://bugs.webkit.org/show_bug.cgi?id=142464
Reviewed by Dan Bernstein.
* Shared/API/APIObject.h:
Add a UserContentExtensionStore type and move the UserContentExtension type into the correct section (UIProcess).
* Shared/API/c/WKBase.h:
Add the WKUserContentExtensionStoreRef C-SPI type.
* Shared/Cocoa/APIObject.mm:
(API::Object::newObject):
Add allocation support for UserContentExtensionStore (and UserContentExtension while we are there, it will be
needed shortly).
* UIProcess/API/APIUserContentExtensionStore.cpp: Added.
(API::UserContentExtensionStore::UserContentExtensionStore):
(API::UserContentExtensionStore::~UserContentExtensionStore):
* UIProcess/API/APIUserContentExtensionStore.h: Added.
Stub out the UserContentExtensionStore.
* UIProcess/API/C/WKAPICast.h:
Add casting for the UserContentExtensionStore.
* UIProcess/API/C/WKUserContentExtensionStoreRef.cpp: Added.
(WKUserContentExtensionStoreGetTypeID):
* UIProcess/API/C/WKUserContentExtensionStoreRef.h: Added.
* UIProcess/API/Cocoa/_WKUserContentExtensionStore.h: Added.
* UIProcess/API/Cocoa/_WKUserContentExtensionStore.mm: Added.
(-[_WKUserContentExtensionStore init]):
(-[_WKUserContentExtensionStore dealloc]):
(-[_WKUserContentExtensionStore _apiObject]):
* UIProcess/API/Cocoa/_WKUserContentExtensionStoreInternal.h: Added.
(WebKit::wrapper):
Stub out SPI for the UserContentExtensionStore.
* WebKit2.xcodeproj/project.pbxproj:
* CMakeLists.txt:
Add new files.
2015-03-08 Sam Weinig <sam@webkit.org>
AX: Expose a frame's accessible name through WK2 C SPI
<rdar://problem/19653068>
https://bugs.webkit.org/show_bug.cgi?id=142468
Reviewed by Dan Bernstein.
* WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
(WKBundleFrameSetAccessibleName):
* WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::setAccessibleName):
* WebProcess/WebPage/WebFrame.h:
Add SPI to set a frame's accessible name. This matches the Legacy WebKit SPI -[WebFrame setAccessibleName:].
2015-03-08 Sam Weinig <sam@webkit.org>
[Content Extensions] Pass compiled content extensions as read-only shared memory rather than copying them
https://bugs.webkit.org/show_bug.cgi?id=142458
Reviewed by Dan Bernstein.
* Shared/WebCompiledContentExtensionData.cpp:
(WebKit::WebCompiledContentExtensionData::encode):
(WebKit::WebCompiledContentExtensionData::decode):
* Shared/WebCompiledContentExtensionData.h:
(WebKit::WebCompiledContentExtensionData::WebCompiledContentExtensionData):
Store the compiled data as a SharedMemory block with offset/size pairs for the
bytecode and actions. While the bytecode offset is currently always 0, this won't
be the case when we map these in from files due to metadata that will be placed
at the top of the files.
* Shared/WebCompiledContentExtension.h:
* Shared/WebCompiledContentExtension.cpp:
(WebKit::WebCompiledContentExtension::createFromCompiledContentExtensionData):
Temporary creation helper. In subsequent patches, this will be removed and replaced
by always passing in shared/mapped data.
(WebKit::WebCompiledContentExtension::create):
(WebKit::WebCompiledContentExtension::WebCompiledContentExtension):
(WebKit::WebCompiledContentExtension::bytecode):
(WebKit::WebCompiledContentExtension::bytecodeLength):
(WebKit::WebCompiledContentExtension::actions):
(WebKit::WebCompiledContentExtension::actionsLength):
Convert to work with the new WebCompiledContentExtension format.
* UIProcess/API/C/WKUserContentFilterRef.cpp:
(WKUserContentFilterCreate):
* UIProcess/API/Cocoa/_WKUserContentFilter.mm:
(-[_WKUserContentFilter initWithName:serializedRules:]):
Switch to using WebCompiledContentExtension::createFromCompiledContentExtensionData().
* WebProcess/UserContent/WebUserContentController.cpp:
(WebKit::WebUserContentController::addUserContentExtensions):
* WebProcess/WebPage/WebPageGroupProxy.cpp:
(WebKit::WebPageGroupProxy::addUserContentExtension):
Update to pass the WebCompiledContentExtensionData directly to the WebCompiledContentExtension.
2015-03-08 Carlos Garcia Campos <cgarcia@igalia.com>
Remove willDestroyFrame in WKBundlePageLoaderClient
https://bugs.webkit.org/show_bug.cgi?id=142389
Reviewed by Anders Carlsson.
I added willDestroyFrame in r154540 but I realized recently that
it has never actually worked. Adding the callback to
WKBundlePageLoaderClient was the first mistake, since frames are
handled by WebProcess and DidDestroyFrame message is indeed a
WebProcessProxy not a WebPageProxy one. Second mistake was calling
the callback from WebFrameLoaderClient::frameLoaderDestroyed(),
since at that point the frame has already been detached from the
page and so WebFrame::page() always returns nullptr. So, this in
fact dead code and since r180211 nobody is using it.
* WebProcess/InjectedBundle/API/c/WKBundlePageLoaderClient.h:
* WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
(webkitWebPageCreate): Use verion 6 instead of version 7 of loader client.
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
(WebKit::InjectedBundlePageLoaderClient::willDestroyFrame): Deleted.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::frameLoaderDestroyed):
2015-03-06 Sam Weinig <sam@webkit.org>
[Content Extensions] Move compiling of content extensions to the UIProcess
https://bugs.webkit.org/show_bug.cgi?id=142402
Reviewed by Benjamin Poulain.
* Shared/API/APIObject.h:
Rename UserContentFilter type to UserContentExtension to match new unified naming.
* Shared/WebCompiledContentExtension.cpp: Added.
(WebKit::WebCompiledContentExtension::create):
(WebKit::WebCompiledContentExtension::WebCompiledContentExtension):
(WebKit::WebCompiledContentExtension::~WebCompiledContentExtension):
(WebKit::WebCompiledContentExtension::bytecode):
(WebKit::WebCompiledContentExtension::bytecodeLength):
(WebKit::WebCompiledContentExtension::actions):
(WebKit::WebCompiledContentExtension::actionsLength):
* Shared/WebCompiledContentExtension.h: Added.
Add new WebKit2 implementation of CompiledContentExtension. Right now it is the same as the old
WebCore based CompiledContentExtension, but in subsequent patches, it will use shared/file backed
memory.
* Shared/WebCompiledContentExtensionData.cpp: Added.
(WebKit::WebCompiledContentExtensionData::encode):
(WebKit::WebCompiledContentExtensionData::decode):
* Shared/WebCompiledContentExtensionData.h: Added.
Add encodable/decodable holder for the compiled content extension data for use in IPC. Right
now it is doing the naive thing and always copying the data, but in subsequent patches, it will
use shared/file backed memory.
* Shared/WebPageGroupData.cpp:
(WebKit::WebPageGroupData::encode):
(WebKit::WebPageGroupData::decode):
* Shared/WebPageGroupData.h:
Rename member to match new unification on the name userContentExtension. Change the value from
the serialized JSON (as a String) to WebCompiledContentExtensionData.
* UIProcess/API/APIUserContentExtension.cpp: Copied from Source/WebKit2/UIProcess/API/APIUserContentFilter.cpp.
(API::UserContentExtension::UserContentExtension):
(API::UserContentExtension::~UserContentExtension):
(API::UserContentFilter::UserContentFilter): Deleted.
(API::UserContentFilter::~UserContentFilter): Deleted.
* UIProcess/API/APIUserContentExtension.h: Copied from Source/WebKit2/UIProcess/API/APIUserContentFilter.h.
* UIProcess/API/APIUserContentFilter.cpp: Removed.
* UIProcess/API/APIUserContentFilter.h: Removed.
Renamed UserContentFilter to APIUserContentExtension. Updated to store the compiled extension (as a WebCompiledContentExtension)
rather than the serialized JSON.
* UIProcess/API/C/WKAPICast.h:
* UIProcess/API/C/WKPageGroup.cpp:
(WKPageGroupAddUserContentFilter):
(WKPageGroupRemoveUserContentFilter):
(WKPageGroupRemoveAllUserContentFilters):
* UIProcess/API/C/WKUserContentControllerRef.cpp:
(WKUserContentControllerAddUserContentFilter):
(WKUserContentControllerRemoveAllUserContentFilters):
* UIProcess/API/Cocoa/WKUserContentController.mm:
(-[WKUserContentController _addUserContentFilter:]):
(-[WKUserContentController _removeUserContentFilter:]):
(-[WKUserContentController _removeAllUserContentFilters]):
Update for rename of APIUserContentFilter -> UserContentExtension.
* UIProcess/API/C/WKUserContentFilterRef.cpp:
(WKUserContentFilterGetTypeID):
(WKUserContentFilterCreate):
Update for rename of APIUserContentFilter -> UserContentExtension. Also make WKUserContentFilterCreate eagerly
compile rule list to a WebCompiledContentExtensionData.
* UIProcess/API/Cocoa/_WKUserContentFilter.mm:
(-[_WKUserContentFilter initWithName:serializedRules:]):
(-[_WKUserContentFilter dealloc]):
(-[_WKUserContentFilter _apiObject]):
Update for rename of APIUserContentFilter -> UserContentExtension. Also make initWithName:serializedRules: eagerly
compile rule list to a WebCompiledContentExtensionData.
* UIProcess/API/Cocoa/_WKUserContentFilterInternal.h:
(WebKit::wrapper):
Update for rename of APIUserContentFilter -> UserContentExtension.
* UIProcess/UserContent/WebUserContentControllerProxy.cpp:
(WebKit::WebUserContentControllerProxy::addProcess):
(WebKit::WebUserContentControllerProxy::addUserContentExtension):
(WebKit::WebUserContentControllerProxy::removeUserContentExtension):
(WebKit::WebUserContentControllerProxy::removeAllUserContentExtensions):
(WebKit::WebUserContentControllerProxy::addUserContentFilter): Deleted.
(WebKit::WebUserContentControllerProxy::removeUserContentFilter): Deleted.
(WebKit::WebUserContentControllerProxy::removeAllUserContentFilters): Deleted.
* UIProcess/UserContent/WebUserContentControllerProxy.h:
* UIProcess/WebPageGroup.cpp:
(WebKit::WebPageGroup::addUserContentExtension):
(WebKit::WebPageGroup::removeUserContentExtension):
(WebKit::WebPageGroup::removeAllUserContentExtensions):
(WebKit::WebPageGroup::addUserContentFilter): Deleted.
(WebKit::WebPageGroup::removeUserContentFilter): Deleted.
(WebKit::WebPageGroup::removeAllUserContentFilters): Deleted.
* UIProcess/WebPageGroup.h:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/UserContent/WebUserContentController.cpp:
(WebKit::WebUserContentController::addUserContentExtensions):
(WebKit::WebUserContentController::removeUserContentExtension):
(WebKit::WebUserContentController::removeAllUserContentExtensions):
(WebKit::WebUserContentController::addUserContentFilters): Deleted.
(WebKit::WebUserContentController::removeUserContentFilter): Deleted.
(WebKit::WebUserContentController::removeAllUserContentFilters): Deleted.
* WebProcess/UserContent/WebUserContentController.h:
* WebProcess/UserContent/WebUserContentController.messages.in:
* WebProcess/WebPage/WebPageGroupProxy.cpp:
(WebKit::WebPageGroupProxy::WebPageGroupProxy):
(WebKit::WebPageGroupProxy::addUserContentExtension):
(WebKit::WebPageGroupProxy::removeUserContentExtension):
(WebKit::WebPageGroupProxy::removeAllUserContentExtensions):
(WebKit::WebPageGroupProxy::addUserContentFilter): Deleted.
(WebKit::WebPageGroupProxy::removeUserContentFilter): Deleted.
(WebKit::WebPageGroupProxy::removeAllUserContentFilters): Deleted.
* WebProcess/WebPage/WebPageGroupProxy.h:
* WebProcess/WebPage/WebPageGroupProxy.messages.in:
Pipe the compiled extension from the UIProcess to the WebProcess.
2015-03-06 Dean Jackson <dino@apple.com>
Support "plus-lighter" in mix-blend mode
https://bugs.webkit.org/show_bug.cgi?id=142416
<rdar://problem/19993979>
Reviewed by Darin Adler and Sam Weinig.
Output the appropriate blending type when logging.
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTextStream::operator<<):
2015-03-06 Beth Dakin <bdakin@apple.com>
REGRESSION (r180782): Data Detector popovers are not dismissed on scroll or zoom
https://bugs.webkit.org/show_bug.cgi?id=142371
-and corresponding-
rdar://problem/20059224
Reviewed by Tim Horton.
This patch has the WKImmediateActionController keep track of whether or not it has
an active immediate action. Then we only call into Lookup and DD if the window is
key OR if the WKViews immediateActionController has an active action.
* UIProcess/API/mac/WKView.mm:
(-[WKView _dismissContentRelativeChildWindows]):
* UIProcess/mac/WKImmediateActionController.h:
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController initWithPage:view:recognizer:]):
(-[WKImmediateActionController willDestroyView:]):
(-[WKImmediateActionController _clearImmediateActionState]):
(-[WKImmediateActionController hasActiveImmediateAction]):
(-[WKImmediateActionController immediateActionRecognizerWillBeginAnimation:]):
2015-03-06 Jeremy Jones <jeremyj@apple.com>
Scroll to make the video element visible when exiting fullscreen.
https://bugs.webkit.org/show_bug.cgi?id=141439
Reviewed by Simon Fraser.
This patch will restore interface state when exiting fullscreen.
Adds preparedToReturnToInline to continue exiting once the interface is updated.
* UIProcess/ios/WebVideoFullscreenManagerProxy.h:
* UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID):
(WebKit::WebVideoFullscreenManagerProxy::fullscreenMayReturnToInline):
(WebKit::WebVideoFullscreenManagerProxy::preparedToReturnToInline): added.
* WebProcess/ios/WebVideoFullscreenManager.h:
* WebProcess/ios/WebVideoFullscreenManager.messages.in:
* WebProcess/ios/WebVideoFullscreenManager.mm:
(WebKit::WebVideoFullscreenManager::fullscreenMayReturnToInline):
2015-03-06 Antti Koivisto <antti@apple.com>
Rename NetworkCacheStorageCocoa.mm to NetworkCacheStorage.cpp
https://bugs.webkit.org/show_bug.cgi?id=142401
Rubber-stamped by Anders Carlsson.
It is now fully cross-platform.
* NetworkProcess/cache/NetworkCacheStorage.cpp: Copied from Source/WebKit2/NetworkProcess/cache/NetworkCacheStorageCocoa.mm.
(WebKit::NetworkCache::Storage::shrinkIfNeeded):
* NetworkProcess/cache/NetworkCacheStorageCocoa.mm: Removed.
* WebKit2.xcodeproj/project.pbxproj:
2015-03-06 Antti Koivisto <antti@apple.com>
Don't use dispatch_semaphore in NetworkCacheStorage
https://bugs.webkit.org/show_bug.cgi?id=142395
Reviewed by Anders Carlsson.
* NetworkProcess/cache/NetworkCacheIOChannel.h:
* NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
(WebKit::NetworkCache::IOChannel::read):
(WebKit::NetworkCache::IOChannel::readSync):
Add readSync to encapsulate the semaphore.
* NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
(WebKit::NetworkCache::Storage::traverse):
2015-03-06 Antti Koivisto <antti@apple.com>
Move dispatch_data use behind NetworkCache::Data abstraction
https://bugs.webkit.org/show_bug.cgi?id=142392
Reviewed by Anders Carlsson.
* NetworkProcess/cache/NetworkCacheData.h:
(WebKit::NetworkCache::DispatchPtr::DispatchPtr):
* NetworkProcess/cache/NetworkCacheDataCocoa.mm:
(WebKit::NetworkCache::Data::Data):
(WebKit::NetworkCache::Data::apply):
(WebKit::NetworkCache::Data::subrange):
(WebKit::NetworkCache::concatenate):
(WebKit::NetworkCache::mapFile):
* NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
(WebKit::NetworkCache::IOChannel::read):
* NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
(WebKit::NetworkCache::hashData):
(WebKit::NetworkCache::decodeEntryMetaData):
(WebKit::NetworkCache::decodeEntryHeader):
(WebKit::NetworkCache::decodeEntry):
(WebKit::NetworkCache::encodeEntryMetaData):
(WebKit::NetworkCache::encodeEntryHeader):
(WebKit::NetworkCache::Storage::dispatchFullWriteOperation):
(WebKit::NetworkCache::mapFile): Deleted.
2015-03-06 Antti Koivisto <antti@apple.com>
Use WTF abstraction for page size in NetworkCacheStorage
https://bugs.webkit.org/show_bug.cgi?id=142396
Reviewed by Darin Adler.
* NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
(WebKit::NetworkCache::decodeEntryMetaData):
(WebKit::NetworkCache::Storage::dispatchFullWriteOperation):
2015-03-06 Myles C. Maxfield <mmaxfield@apple.com>
[iOS] SVG fonts are garbled
https://bugs.webkit.org/show_bug.cgi?id=142377
Reviewed by Simon Fraser.
* Configurations/FeatureDefines.xcconfig:
2015-03-06 Zan Dobersek <zdobersek@igalia.com>
Unguarded GTK-specific member and method usage in DrawingAreaImpl
https://bugs.webkit.org/show_bug.cgi?id=142391
Reviewed by Carlos Garcia Campos.
r180924 introduced unguarded use of m_nativeSurfaceHandleForCompositing
and LayerTreeHost::setNativeSurfaceHandleForCompositing() in DrawingAreaImpl.
Definitions for both of these are guarded with USE(TEXTURE_MAPPER_GL) and PLATFORM(GTK),
so their use should be as well.
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode):
2015-03-06 David Kilzer <ddkilzer@apple.com>
REGRESSION (r181140): WebKit2 fails to build on Mavericks buildbot
Work around Xcode dependency tracking issues by making changes
to source files that need to be recompiled.
* NetworkProcess/NetworkProcess.cpp: Update copyright. Include
NetworkCache.h since it didn't appear to be included by
NetworkCacheCoders.h.
* NetworkProcess/cocoa/NetworkProcessCocoa.mm: Update copyright.
2015-03-05 Antti Koivisto <antti@apple.com>
Move disk cache classes to namespace
https://bugs.webkit.org/show_bug.cgi?id=142339
Reviewed by Anders Carlsson.
Move everything to NetworkCache namespace.
2015-03-05 Carlos Garcia Campos <cgarcia@igalia.com>
REGRESSION(r180924): ASSERTION FAILED: !from.isEmpty() in WebCore::TransformationMatrix::rectToRect
https://bugs.webkit.org/show_bug.cgi?id=142345
Reviewed by Martin Robinson.
This was caused by r180924 that postpones the creation of the
TextureMapper, which could cause that a layer has not yet a size
when TextureMapper::paint() is called. This patch moves the
creation of the TextureMapper to
LayerTreeHostGtk::setNativeSurfaceHandleForCompositing(), so that
it's created as soon as it's possible to create. This method is
called by the drawing area right after creating the
LayerTreeHostGtk if it already have a handler, or when the handle
is received from the UI process.
* WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
(WebKit::LayerTreeHostGtk::initialize): Remove the
nsureTextureMapper call because at this point the layer context ID
is always 0, so it's impossible to create the TextureMapper.
(WebKit::LayerTreeHostGtk::compositeLayersToContext): Remove the
ensureTextureMapper call from here too, since at this point, if we
have a context, we should also have a TextureMapper. Add an ASSERT
right before using the TextureMapper.
(WebKit::LayerTreeHostGtk::setNativeSurfaceHandleForCompositing):
Create the TextureMapper here.
(WebKit::LayerTreeHostGtk::ensureTextureMapper): Deleted.
* WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
2015-03-05 Anders Carlsson <andersca@apple.com>
WKWebView Encoder for remote object communication does not implement encodeInt32:forKey:
https://bugs.webkit.org/show_bug.cgi?id=142356
rdar://problem/20058952
Reviewed by Tim Horton.
* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(-[WKRemoteObjectEncoder encodeInt32:forKey:]):
(-[WKRemoteObjectDecoder decodeInt32ForKey:]):
2015-03-05 Chris Dumez <cdumez@apple.com>
NetworkCache efficacy logging is using too much CPU
https://bugs.webkit.org/show_bug.cgi?id=142186
<rdar://problem/19632080>
Reviewed by Antti Koivisto.
NetworkCache efficacy logging was using too much CPU mostly due to
database writes. Logging was using ~11.3% of the NetworkProcess'
CPU usage (~9.2% for writes / ~1.3% for reads).
This patch buffers writes requests in memory and only writes them
to disk every 10 seconds. We are thus writing to this less frequently
and writing more at once, in a single SQL transaction. After this
change, efficacy logging only accounts for ~3.5% of the NetworkProcess'
CPU activity (1.5% for writes / 1.2% for reads).
Now that CPU usage is more acceptable, this patch re-enables the
network cache efficicy logging.
* NetworkProcess/cache/NetworkCacheStatistics.h:
* NetworkProcess/cache/NetworkCacheStatisticsCocoa.mm:
(WebKit::executeSQLCommand):
(WebKit::executeSQLStatement):
Call step() instead of executeCommand() because:
- The input statement is already prepared.
- step() does not finalize() the statement and thus we caller can
reuse it after calling reset().
(WebKit::NetworkCacheStatistics::NetworkCacheStatistics):
(WebKit::NetworkCacheStatistics::initialize):
(WebKit::NetworkCacheStatistics::bootstrapFromNetworkCache):
(WebKit::NetworkCacheStatistics::recordNotCachingResponse):
(WebKit::NetworkCacheStatistics::recordNotUsingCacheForRequest):
(WebKit::NetworkCacheStatistics::recordRetrievalFailure):
(WebKit::NetworkCacheStatistics::markAsRequested):
(WebKit::NetworkCacheStatistics::writeTimerFired):
(WebKit::NetworkCacheStatistics::queryWasEverRequested):
(WebKit::NetworkCacheStatistics::addHashesToDatabase):
(WebKit::NetworkCacheStatistics::addStoreDecisionsToDatabase):
(WebKit::NetworkCacheStatistics::addHashToDatabase): Deleted.
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::registerUserDefaultsIfNeeded):
Re-enable the network cache efficacy logging.
2015-03-05 Antti Koivisto <antti@apple.com>
Switch NetworkCacheStorage to WorkQueue abstraction
https://bugs.webkit.org/show_bug.cgi?id=142337
Reviewed by Anders Carlsson.
Don't use dispatch_async directly.
* NetworkProcess/cache/NetworkCacheStorage.h:
(WebKit::NetworkCacheStorage::ioQueue):
(WebKit::NetworkCacheStorage::backgroundIOQueue):
* NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
(WebKit::NetworkCacheStorage::NetworkCacheStorage):
(WebKit::NetworkCacheStorage::initialize):
(WebKit::NetworkCacheStorage::removeEntry):
(WebKit::NetworkCacheStorage::dispatchReadOperation):
(WebKit::retrieveFromMemory):
(WebKit::NetworkCacheStorage::traverse):
(WebKit::NetworkCacheStorage::dispatchFullWriteOperation):
(WebKit::NetworkCacheStorage::dispatchHeaderWriteOperation):
(WebKit::NetworkCacheStorage::clear):
(WebKit::NetworkCacheStorage::shrinkIfNeeded):
(WebKit::NetworkCacheStorage::deleteOldVersions):
2015-03-05 Lukasz Bialek <l.bialek@samsung.com>
[EFL][WK2] Crash when "Download Linked File" from MiniBrowser context menu is clicked
https://bugs.webkit.org/show_bug.cgi?id=131162
Reviewed by Gyuyoung Kim.
"Download Linked File" crashes because of null-pointer exception of Download Job.
Due to architectural difficulties, easy fix is not possible (EwkView is needed in
DownloadManager to create DownloadJobs and it is only used to notify the client
about download (finished, error, cancel) via smart callback using EwkView (Evas_Object).
Propose a new callbacks which are view independent and detach EFL's DownloadManager
from EwkView. It makes DownloadManagerEFL consistent with WKContextDownload.
Fix the crash and restore download functionality.
* PlatformEfl.cmake:
Enable newly reimplemented tests
* UIProcess/API/efl/EwkViewCallbacks.h:
Remove old callback mechanism
* UIProcess/API/efl/ewk_context.cpp:
(ewk_context_download_callbacks_set):
* UIProcess/API/efl/ewk_context.h:
Declare new callback functions and registration functions
* UIProcess/API/efl/ewk_download_job.cpp:
(EwkDownloadJob::EwkDownloadJob):
(EwkDownloadJob::view): Deleted.
* UIProcess/API/efl/ewk_download_job.h:
* UIProcess/API/efl/ewk_download_job_private.h:
(EwkDownloadJob::create):
Remove EwkView dependency
* UIProcess/API/efl/ewk_view.h:
* UIProcess/API/efl/tests/test_ewk2_download_job.cpp:
Alter tests to new callback mechanism
* UIProcess/efl/DownloadManagerEfl.cpp:
(WebKit::DownloadManagerEfl::decideDestinationWithSuggestedFilename):
(WebKit::DownloadManagerEfl::didStart):
(WebKit::DownloadManagerEfl::didFail):
(WebKit::DownloadManagerEfl::didCancel):
(WebKit::DownloadManagerEfl::didFinish):
(WebKit::DownloadManagerEfl::DownloadManagerEfl):
(WebKit::DownloadManagerEfl::registerDownloadJob):
(WebKit::DownloadManagerEfl::setCallbacks):
* UIProcess/efl/DownloadManagerEfl.h:
* UIProcess/efl/WebViewEfl.cpp:
(WebKit::WebViewEfl::handleDownloadRequest):
Add support of new callback mechanism
2015-03-05 Michael Catanzaro <mcatanzaro@igalia.com>
[SOUP] Disable RC4
https://bugs.webkit.org/show_bug.cgi?id=140014
Reviewed by Carlos Garcia Campos.
Disallow RC4-based ciphersuites when performing TLS negotiation,
because it is no longer considered secure.
* NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp:
(main):
* WebProcess/EntryPoint/unix/WebProcessMain.cpp:
(main):
2015-03-04 Yusuke Suzuki <utatane.tea@gmail.com>
Hide Promise with runtime flags under Cocoa JSContext API
https://bugs.webkit.org/show_bug.cgi?id=141965
Reviewed by Filip Pizlo.
Add new JSC runtime flag, PromiseDisabled.
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:
2015-03-04 Beth Dakin <bdakin@apple.com>
Attempted build fix.
* UIProcess/API/Cocoa/WKViewPrivate.h:
2015-03-04 Beth Dakin <bdakin@apple.com>
Message UI process when contentSize changes
https://bugs.webkit.org/show_bug.cgi?id=142294
-and corresponding-
rdar://problem/19963165
Reviewed by Andreas Kling.
This patch un-ifdefs the didChangeContentSize message so that we can use it on Mac
as well.
New private method that subclasses can override when they need to do something
with contentSize changes.
* UIProcess/API/Cocoa/WKViewPrivate.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView _didChangeContentSize:]):
* UIProcess/PageClient.h:
Un-ifdef.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didChangeContentSize):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::didChangeContentSize):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::contentsSizeChanged):
Stubs for other platforms now that the pure-virtual is un-masked.
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::didChangeContentSize):
* UIProcess/API/gtk/PageClientImpl.h:
2015-03-04 Antti Koivisto <antti@apple.com>
Factor platform I/O out from NetworkCacheStorage
https://bugs.webkit.org/show_bug.cgi?id=142279
Reviewed by Chris Dumez.
* NetworkProcess/cache/NetworkCacheData.h: Added.
* NetworkProcess/cache/NetworkCacheDataCocoa.mm: Added.
NetworkCacheStorage::Data -> NetworkCacheData
Move to files of its own.
* NetworkProcess/cache/NetworkCacheIOChannel.h: Added.
* NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm: Added.
Add abstraction for dispatch IO channels.
2015-03-04 Joseph Pecoraro <pecoraro@apple.com>
Remove WK_AVAILABLE and related macros when we cannot determine iOS/Mac version
https://bugs.webkit.org/show_bug.cgi?id=142252
rdar://problem/19983833
Reviewed by David Kilzer.
When mac / ios version was unable to be determined strip the WK_AVAILABLE
and WK_DEPRECATED macros to avoid outputing a broken macro.
* mac/postprocess-framework-headers.sh:
2015-03-04 Debarshi Ray <debarshir@gnome.org>
[GTK] WebView should hold a reference on WebContext because non-default contexts are a reality
https://bugs.webkit.org/show_bug.cgi?id=142225
Reviewed by Carlos Garcia Campos.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewRequestFavicon):
(webkitWebViewWatchForChangesInFavicon):
(webkitWebViewDisconnectFaviconDatabaseSignalHandlers):
(webkitWebViewConstructed):
(webkitWebViewGetProperty):
(webkitWebViewDispose):
(webkitWebViewLoadChanged):
(webkitWebViewLoadFailedWithTLSErrors):
(webkit_web_view_get_context):
(webkit_web_view_download_uri):
2015-03-03 Shivakumar JM <shiva.jm@samsung.com>
Fix build warning in WebKit2/Shared module.
https://bugs.webkit.org/show_bug.cgi?id=142213
Reviewed by Simon Fraser.
Fix build warning by removing argument name from function.
* Shared/WebCoreArgumentCoders.cpp:
(IPC::pathPointCountApplierFunction):
2015-03-03 Andy Estes <aestes@apple.com>
[Content Filtering] Separate unblock handling into its own class
https://bugs.webkit.org/show_bug.cgi?id=142251
Reviewed by Andreas Kling.
Adopted ContentFilterUnblockHandler.
* Shared/WebCoreArgumentCoders.h:
* Shared/mac/WebCoreArgumentCodersMac.mm:
(IPC::ArgumentCoder<ContentFilterUnblockHandler>::encode):
(IPC::ArgumentCoder<ContentFilterUnblockHandler>::decode):
(IPC::ArgumentCoder<ContentFilter>::encode): Deleted.
(IPC::ArgumentCoder<ContentFilter>::decode): Deleted.
* UIProcess/Cocoa/WebPageProxyCocoa.mm:
(WebKit::WebPageProxy::contentFilterDidBlockLoadForFrame):
* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::didStartProvisionalLoad):
(WebKit::WebFrameProxy::contentFilterDidHandleNavigationAction):
* UIProcess/WebFrameProxy.h:
(WebKit::WebFrameProxy::setContentFilterUnblockHandler):
(WebKit::WebFrameProxy::setContentFilterForBlockedLoad): Deleted.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::contentFilterDidBlockLoad):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2015-03-03 Chris Dumez <cdumez@apple.com>
[WK2] Fix memory leak in _getCookieHeadersForTask
https://bugs.webkit.org/show_bug.cgi?id=142245
Reviewed by Alexey Proskuryakov.
Fix memory leak in _getCookieHeadersForTask. We are leaking the CFDictionary
returned by webKitCookieStorageCopyRequestHeaderFieldsForURL().
This patch addresses the issue by storing the return CFDictionary in a
RetainPtr<CFDictionaryRef>.
* Shared/mac/CookieStorageShim.mm:
(-[WKNSURLSessionLocal _getCookieHeadersForTask:completionHandler:]):
2015-03-03 Enrica Casucci <enrica@apple.com>
Incomplete dictation results in text fields in a web page.
https://bugs.webkit.org/show_bug.cgi?id=142240
rdar://problem/19953432
Reviewed by Tim Horton.
The empty stub for insertDictationResult:withCorrectionIdentifier
must be removed. This way UIKit will call insertText and do the right thing.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView insertDictationResult:withCorrectionIdentifier:]): Deleted.
2015-03-03 Dean Jackson <dino@apple.com>
Controls panel should have system blurry background
https://bugs.webkit.org/show_bug.cgi?id=142154
<rdar://problem/20000964>
Reviewed by Simon Fraser.
In order to replicate the system style of media controls
on OS X and iOS, we need to expose a special -webkit-appearance.
This patch adds the new property value, and implements
the iOS part of the appearance, which is a blurry shaded
background.
* Shared/mac/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::drawInContext): Add entries for
the new layer types, even though they are not correct yet.
* Shared/mac/RemoteLayerTreePropertyApplier.mm:
(WebKit::updateCustomAppearance):
(WebKit::RemoteLayerTreePropertyApplier::applyProperties): UIBackdropViews
have a defined hierarchy that we don't create. We need to make sure we add our
children to the right subview.
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::description): Logging.
* UIProcess/ios/RemoteLayerTreeHostIOS.mm: Rename existing WKBackdropView
to WKSimpleBackdropView, and add a new WKBackdropView that inherits
from UIBackdropView.
(-[WKBackdropView hitTest:withEvent:]):
(-[WKBackdropView description]):
(WebKit::RemoteLayerTreeHost::createLayer): Handle the new LayerTypes.
* UIProcess/mac/RemoteLayerTreeHost.mm:
(WebKit::RemoteLayerTreeHost::createLayer):
2015-03-03 Chris Dumez <cdumez@apple.com>
Access ApplicationCacheStorage global instance via singleton() static member function
https://bugs.webkit.org/show_bug.cgi?id=142239
Reviewed by Anders Carlsson.
Access ApplicationCacheStorage global instance via singleton() static
member function as per WebKit coding style.
2015-03-03 Joseph Pecoraro <pecoraro@apple.com>
Build Fix: Add fall back handling in postprocess script for missing/unknown platform name.
Rubber-stamped by David Kilzer.
* mac/postprocess-framework-headers.sh:
2015-03-03 Enrica Casucci <enrica@apple.com>
Build fix for iOS.
Unreviewed.
* UIProcess/ios/WKContentViewInteraction.mm: Adding forward declaration.
2015-03-03 Antti Koivisto <antti@apple.com>
Include key to NetworkCacheStorage::Entry
https://bugs.webkit.org/show_bug.cgi?id=142215
Reviewed by Chris Dumez.
This simplified code. The key is saved as part of the entry so it makes logical sense too.
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::makeCacheKey):
(WebKit::encodeStorageEntry):
(WebKit::NetworkCache::retrieve):
(WebKit::NetworkCache::store):
(WebKit::NetworkCache::update):
(WebKit::NetworkCache::traverse):
(WebKit::entryAsJSON):
(WebKit::NetworkCache::dumpContentsToFile):
* NetworkProcess/cache/NetworkCacheKey.cpp:
(WebKit::NetworkCacheKey::operator=):
* NetworkProcess/cache/NetworkCacheKey.h:
(WebKit::NetworkCacheKey::isNull):
* NetworkProcess/cache/NetworkCacheStorage.h:
* NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
(WebKit::decodeEntry):
(WebKit::encodeEntryHeader):
(WebKit::retrieveFromMemory):
(WebKit::NetworkCacheStorage::retrieve):
(WebKit::NetworkCacheStorage::store):
(WebKit::NetworkCacheStorage::update):
(WebKit::NetworkCacheStorage::traverse):
(WebKit::NetworkCacheStorage::dispatchPendingWriteOperations):
(WebKit::NetworkCacheStorage::dispatchFullWriteOperation):
(WebKit::NetworkCacheStorage::dispatchHeaderWriteOperation):
2015-03-03 Antti Koivisto <antti@apple.com>
Cache shrink leaves behind empty partition directories
https://bugs.webkit.org/show_bug.cgi?id=142217
Reviewed by Andreas Kling.
* NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
(WebKit::traverseCacheFiles):
No need for std::function.
* NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
(WebKit::NetworkCacheStorage::shrinkIfNeeded):
After shrink traverse through the partition directories and try to delete them.
System knows if they are actually empty.
2015-03-03 Anders Carlsson <andersca@apple.com>
Use the correct display name for website data for local files
https://bugs.webkit.org/show_bug.cgi?id=142228
Reviewed by Dan Bernstein.
* UIProcess/WebsiteData/WebsiteDataRecord.cpp:
(displayNameForLocalFiles):
Add new helper function.
(WebKit::WebsiteDataRecord::displayNameForCookieHostName):
Check if the hostname is kCFHTTPCookieLocalFileDomain.
(WebKit::WebsiteDataRecord::displayNameForOrigin):
Handle file URLs as well.
2015-03-03 Enrica Casucci <enrica@apple.com>
Fixed typo in platform guard in http://trac.webkit.org/changeset/180939.
Unreviewed.
* UIProcess/ios/WKContentViewInteraction.mm:
2015-03-03 Enrica Casucci <enrica@apple.com>
Adopt new API for keyboard interaction.
https://bugs.webkit.org/show_bug.cgi?id=142201
rdar://problem/19924949
Reviewed by Joseph Pecoraro.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView inputAssistantItem]):
(-[WKContentView _inputAssistantItem]):
2015-03-03 Carlos Garcia Campos <cgarcia@igalia.com>
REGRESSION(r177075): WebProcess crashes when entering accelerating compositing mode before the WebView is realized
https://bugs.webkit.org/show_bug.cgi?id=142079
Reviewed by Žan Doberšek.
The problem is that the texture mapper and native window handler
are initialized when the LayerTreeHost is initialized, assuming
the UI process has already sent the native window handler to the
web process, but that doesn't always happen since we moved the
redirected window creation to realize in r177075.
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::nativeSurfaceHandleForCompositing): Deleted.
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode): Call
LayerTreeHost::setNativeSurfaceHandleForCompositing if we
already have a native window handle at this point.
(WebKit::DrawingAreaImpl::setNativeSurfaceHandleForCompositing):
Call LayerTreeHost::setNativeSurfaceHandleForCompositing also when
not using threaded compositing.
* WebProcess/WebPage/LayerTreeHost.h:
* WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
(WebKit::LayerTreeHostGtk::makeContextCurrent): Helper function to
ensure a context and making it current.
(WebKit::LayerTreeHostGtk::ensureTextureMapper): Ensure a texture
is created for the current context.
(WebKit::LayerTreeHostGtk::initialize): Use makeContextCurrent()
and ensureTextureMapper(), and remove the LayerTreeContext
initialization since that's is now always initialized in
setNativeSurfaceHandleForCompositing().
(WebKit::LayerTreeHostGtk::compositeLayersToContext): Use
makeContextCurrent() helper function and also call
ensureTextureMapper() just in case the texture could not be
created during initialization because the native window handle was
not yet available.
(WebKit::LayerTreeHostGtk::flushAndRenderLayers): Use makeContextCurrent().
(WebKit::LayerTreeHostGtk::setNativeSurfaceHandleForCompositing):
Initialize the LayerTreeContext.
(WebKit::LayerTreeHostGtk::glContext): Deleted.
* WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
2015-03-02 Gyuyoung Kim <gyuyoung.kim@samsung.com>
[WK2] Remove unnecessary create() factory functions.
https://bugs.webkit.org/show_bug.cgi?id=142161
Reviewed by Chris Dumez.
We can replace some create() factory functions with std::make_unique(). Because
it just returns new instance. Even some of those functions have used std::unique_ptr<>
instead of std::make_unique<>. Fixed all.
* DatabaseProcess/IndexedDB/sqlite/SQLiteIDBTransaction.h:
(WebKit::SQLiteIDBTransaction::create): Deleted.
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::establishTransaction):
* Platform/efl/DispatchQueueWorkItemEfl.h:
(WorkItem::dispatch):
(WorkItem::create): Deleted.
* UIProcess/API/gtk/PageClientImpl.h:
(WebKit::PageClientImpl::create): Deleted.
* UIProcess/API/gtk/WebKitTextChecker.h:
(WebKitTextChecker::create): Deleted.
* UIProcess/API/gtk/WebKitWebContext.cpp:
(webkitWebContextConstructed):
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseConstructed):
2015-03-02 Brady Eidson <beidson@apple.com>
Lots of: ERROR: Unhandled web process message WebPageGroupProxy:RemoveAllUserContentFilters
https://bugs.webkit.org/show_bug.cgi?id=142155
Reviewed by Simon Fraser.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::didReceiveMessage): Return after handling WebPageGroupProxy messages
instead of logging an error.
2015-03-02 Antti Koivisto <antti@apple.com>
Add way to dump cache meta data to file
https://bugs.webkit.org/show_bug.cgi?id=142183
Add a missing return so we don't try to decode a null entry.
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::dumpContentsToFile):
2015-03-02 Anders Carlsson <andersca@apple.com>
Return disk cache entries from the new disk cache
https://bugs.webkit.org/show_bug.cgi?id=142190
Reviewed by Antti Koivisto.
* NetworkProcess/NetworkProcess.cpp:
(WebKit::fetchDiskCacheEntries):
Call NetworkCache::traverse() to get all the cache entries, unique their origins and pass them back with the completion handler.
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::traverse):
New helper function that traverses network cache entries.
* NetworkProcess/cache/NetworkCache.h:
2015-03-02 Antti Koivisto <antti@apple.com>
Add way to dump cache meta data to file
https://bugs.webkit.org/show_bug.cgi?id=142183
Reviewed by Andreas Kling.
Dump goes to WebKitCache/dump.json. On OSX it can be triggered with
notifyutil -p com.apple.WebKit.Cache.dump
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::initialize):
(WebKit::NetworkCache::dumpFilePath):
(WebKit::entryAsJSON):
(WebKit::NetworkCache::dumpContentsToFile):
(WebKit::NetworkCache::clear):
Also clear any dumps.
* NetworkProcess/cache/NetworkCache.h:
* NetworkProcess/cache/NetworkCacheStorage.h:
(WebKit::NetworkCacheStorage::baseDirectoryPath):
* NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
(WebKit::fileNameForKey):
(WebKit::filePathForKey):
(WebKit::openFile):
(WebKit::openFileForKey):
(WebKit::decodeEntryHeader):
Separate header decoding.
(WebKit::decodeEntry):
(WebKit::NetworkCacheStorage::traverse):
Add asynchronous cache traversal inteface.
2015-03-02 Anders Carlsson <andersca@apple.com>
WebsiteDataStore should handle deleting cookies
https://bugs.webkit.org/show_bug.cgi?id=142185
Reviewed by Beth Dakin.
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
When asked to delete cookies, do so.
* NetworkProcess/NetworkProcess.h:
Update the deleteWebsiteDataForOrigins signature.
* NetworkProcess/NetworkProcess.messages.in:
Add cookieHostNames to DeleteWebsiteDataForOrigins.
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::deleteWebsiteDataForOrigins):
* UIProcess/Network/NetworkProcessProxy.h:
Update to take a vector of cookie host names.
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::removeData):
Figure out if we need to ask the network process to delete data.
2015-03-02 Anders Carlsson <andersca@apple.com>
WebsiteDataStore should support getting cookie host names
https://bugs.webkit.org/show_bug.cgi?id=142178
Reviewed by Dan Bernstein.
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::fetchWebsiteData):
Assert that we're destroyed from the main thread since we end up copying the website data struct.
* Shared/WebsiteData/WebsiteData.cpp:
(WebKit::WebsiteData::encode):
(WebKit::WebsiteData::decode):
* Shared/WebsiteData/WebsiteData.h:
Add a hostnamesWithCookies member.
* UIProcess/WebsiteData/WebsiteDataRecord.cpp:
(WebKit::WebsiteDataRecord::displayNameForCookieHostName):
Add a new function that will return the display name for a cookie host name.
(WebKit::WebsiteDataRecord::addCookieHostName):
* UIProcess/WebsiteData/WebsiteDataRecord.h:
Add a hash set of cookie host names.
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::fetchData):
Create data records for each host name with cookies.
2015-03-02 Jer Noble <jer.noble@apple.com>
[WK2][Mac] WebPageProxy::supressVisibilityUpdates() should suppress visibility updates.
https://bugs.webkit.org/show_bug.cgi?id=141907
Reviewed by Tim Horton.
At some point, the window/view/page visibility update code was refactored such that setting
WebPageProxy::setSuppressVisibilityUpdate() no longer suppressed visibility updates. This causes
full screen animations to become "flashy" when moving the WebView between the regular and full
screen window, as a HTMLMediaElement in the full screen animation will receive a "!visible"
notification and disconnect its rendering pipeline.
In WebPageProxy::viewStateDidChange(), respect m_suppressVisibilityUpdates and bail out early
if set. In WebPageProxy::setSuppressVisibilityUpdates(), trigger an explicit update after
clearing m_suppressVisibilityUpdates.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setSuppressVisibilityUpdates):
(WebKit::WebPageProxy::viewStateDidChange):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::setSuppressVisibilityUpdates): Deleted.
2015-03-02 Jer Noble <jer.noble@apple.com>
[WK1][WK2][Mac] Fullscreen animation is incorrect when page is scaled.
https://bugs.webkit.org/show_bug.cgi?id=142121
Reviewed by Simon Fraser.
Change the order of operations when entering or exiting fullscreen. Change the page scale to
1 before entering, so the final screen rect takes that scale into account, and vice-versa on
exiting.
* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController enterFullScreen:]):
(-[WKFullScreenWindowController exitFullScreen]):
2015-03-01 Simon Fraser <simon.fraser@apple.com>
Make clip-path work on <video>, <canvas> etc.
https://bugs.webkit.org/show_bug.cgi?id=138684
Reviewed by Darin Adler.
Support encode/decode for WebCore Path objects, which is done by traversing
the path.
* Shared/WebCoreArgumentCoders.cpp:
(IPC::pathPointCountApplierFunction):
(IPC::pathEncodeApplierFunction):
(IPC::ArgumentCoder<Path>::encode):
(IPC::ArgumentCoder<Path>::decode):
* Shared/WebCoreArgumentCoders.h:
* Shared/mac/RemoteLayerTreePropertyApplier.mm:
(WebKit::applyPropertiesToLayer): Actually apply the path and wind rule to the shape layer.
* Shared/mac/RemoteLayerTreeTransaction.h: Include path and wind rule in the layer properties.
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
(WebKit::RemoteLayerTreeTransaction::LayerProperties::encode): Encode shape and wind rule.
(WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): Decode shape and wind rule.
* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::shapePath):
(WebKit::PlatformCALayerRemote::setShapePath):
(WebKit::PlatformCALayerRemote::shapeWindRule):
(WebKit::PlatformCALayerRemote::setShapeWindRule):
* WebProcess/WebPage/mac/PlatformCALayerRemote.h:
2015-03-01 Chris Dumez <cdumez@apple.com>
Make NotificationCenter / Notification suspendable
https://bugs.webkit.org/show_bug.cgi?id=142117
<rdar://problem/19923085>
Reviewed by Andreas Kling.
Provide implementation for NotificationClient::hasPendingPermissionRequests().
* WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
(WebKit::NotificationPermissionRequestManager::hasPendingPermissionRequests):
* WebProcess/Notifications/NotificationPermissionRequestManager.h:
* WebProcess/WebCoreSupport/WebNotificationClient.cpp:
(WebKit::WebNotificationClient::hasPendingPermissionRequests):
* WebProcess/WebCoreSupport/WebNotificationClient.h:
2015-03-01 Antti Koivisto <antti@apple.com>
Enable new disk cache on iOS
https://bugs.webkit.org/show_bug.cgi?id=142148
Reviewed by Sam Weinig.
* NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
iOS build fix.
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::registerUserDefaultsIfNeeded):
Disable the efficacy logging by default for now. It has significant performance impact.
* config.h:
Enable it.
2015-02-28 Anders Carlsson <andersca@apple.com>
WebsiteDataStore should handle fetching and deleting local storage data
https://bugs.webkit.org/show_bug.cgi?id=142137
Reviewed by Sam Weinig.
* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::deleteEntriesForOrigins):
Add a new function that deletes entries from multiple origins.
* UIProcess/Storage/StorageManager.h:
Add new members.
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::fetchData):
Fetch local storage data as well.
(WebKit::WebsiteDataStore::removeData):
Delete local storage data as well.
2015-02-28 Anders Carlsson <andersca@apple.com>
Fetch cache origins from the network process
https://bugs.webkit.org/show_bug.cgi?id=142135
Reviewed by Dan Bernstein.
* NetworkProcess/NetworkProcess.cpp:
(WebKit::cfURLCacheOrigins):
Add a new helper function that returns a vector of CFURL cache origins.
(WebKit::fetchDiskCacheOrigins):
Fetch the disk cache origins and pass them along to the completion handler. Currently we don't handle the new disk cache.
(WebKit::NetworkProcess::fetchWebsiteData):
Create a callback aggregator and fetch disk cache origins if we're asked for it.
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::computeNetworkProcessAccessTypeForDataFetch):
New helper function that computes if we need to launch the network process in order to fetch data.
(WebKit::WebsiteDataStore::fetchData):
Fetch website data from the network process as well.
2015-02-28 Anders Carlsson <andersca@apple.com>
Simplify WebResourceCacheManagerCFNet.mm code
https://bugs.webkit.org/show_bug.cgi?id=142134
Reviewed by Dan Bernstein.
- ENABLE(CACHE_PARTITIONING) is always true on Mac and iOS, so remove those #ifdefs.
- Make cfURLCacheHostNamesWithCallback and clearCFURLCacheForHostNames public
so they can be used by the new WebsiteDataStore code in an upcoming patch.
- Change cfURLCacheHostNamesWithCallback to take an std::function instead of a block.
* WebProcess/ResourceCache/WebResourceCacheManager.cpp:
(WebKit::WebResourceCacheManager::getCacheOrigins):
* WebProcess/ResourceCache/WebResourceCacheManager.h:
* WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.mm:
(WebKit::partitionName):
(WebKit::WebResourceCacheManager::cfURLCacheHostNamesWithCallback):
(WebKit::WebResourceCacheManager::clearCFURLCacheForHostNames):
(WebKit::WebResourceCacheManager::cfURLCacheHostNames): Deleted.
2015-02-28 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r180804.
https://bugs.webkit.org/show_bug.cgi?id=142131
Broke nightlies (Requested by ap on #webkit).
Reverted changeset:
"[WK2] Drop legacy WKBundlePageDiagnosticLoggingClient API"
https://bugs.webkit.org/show_bug.cgi?id=141176
http://trac.webkit.org/changeset/180804
2015-02-27 Hunseop Jeong <hs85.jeong@samsung.com>
[EFL][GTK] Fix build break after r180790,180798
https://bugs.webkit.org/show_bug.cgi?id=142127
Reviewed by Gyuyoung Kim.
* CMakeLists.txt:
2015-02-27 Chris Dumez <cdumez@apple.com>
[WK2] Drop legacy WKBundlePageDiagnosticLoggingClient API
https://bugs.webkit.org/show_bug.cgi?id=141176
Reviewed by Sam Weinig.
Drop legacy WKBundlePageDiagnosticLoggingClient WK2 API as we are now
exposing this functionality via WKPageDiagnosticLoggingClient.h on
UIProcess side. The client-side has already been ported over.
* CMakeLists.txt:
* Shared/API/c/WKSharedAPICast.h:
(WebKit::toAPI): Deleted.
(WebKit::toDiagnosticLoggingResultType): Deleted.
* UIProcess/API/C/WKAPICast.h:
(WebKit::toAPI):
* UIProcess/API/C/WKDiagnosticLoggingResultType.h: Renamed from Source/WebKit2/Shared/API/c/WKDiagnosticLoggingResultType.h.
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageSetDiagnosticLoggingClient): Deleted.
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:
* WebProcess/InjectedBundle/API/c/WKBundlePageDiagnosticLoggingClient.h: Removed.
* WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.cpp: Removed.
* WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.h: Removed.
* WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
(WebKit::WebDiagnosticLoggingClient::logDiagnosticMessage):
(WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithResult):
(WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithValue):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::close):
(WebKit::WebPage::initializeInjectedBundleDiagnosticLoggingClient): Deleted.
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::injectedBundleDiagnosticLoggingClient): Deleted.
2015-02-27 Anders Carlsson <andersca@apple.com>
Rename WebResourceCacheManagerCFNet.cpp to WebResourceCacheManagerCFNet.mm
Rubber-stamped by Dan Bernstein.
This will let us use lambda to block conversion in a subsequent patch.
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.mm: Renamed from Source/WebKit2/WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.cpp.
2015-02-27 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r180203 and r180210.
https://bugs.webkit.org/show_bug.cgi?id=142116
broke process suspension and tile map (Requested by thorton on
#webkit).
Reverted changesets:
"Adopt CAMachPort-as-layer-contents"
https://bugs.webkit.org/show_bug.cgi?id=141687
http://trac.webkit.org/changeset/180203
"Fix the !USE(IOSURFACE) build"
http://trac.webkit.org/changeset/180210
2015-02-27 Sam Weinig <sam@webkit.org>
Add WebKit2 SPI to create a DOM File object
https://bugs.webkit.org/show_bug.cgi?id=142109
Reviewed by Tim Horton.
Add a new handle type for exposing a DOM File object to script. Follow
the pattern of WKBundleNodeHandleRef and WKBundleRangeHandleRef with the
new class WKBundleFileHandleRef. It can be created for a specific path,
and then the JS wrapper can be obtained via WKBundleFrameGetJavaScriptWrapperForFileForWorld.
* Shared/API/APIObject.h:
* Shared/API/c/WKBase.h:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
* WebProcess/InjectedBundle/API/c/WKBundleFileHandleRef.cpp: Added.
(WKBundleFileHandleGetTypeID):
(WKBundleFileHandleCreateWithPath):
* WebProcess/InjectedBundle/API/c/WKBundleFileHandleRef.h: Added.
* WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
(WKBundleFrameGetJavaScriptWrapperForFileForWorld):
* WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
* WebProcess/InjectedBundle/DOM/InjectedBundleFileHandle.cpp: Added.
(WebKit::domHandleCache):
(WebKit::InjectedBundleFileHandle::create):
(WebKit::InjectedBundleFileHandle::getOrCreate):
(WebKit::InjectedBundleFileHandle::InjectedBundleFileHandle):
(WebKit::InjectedBundleFileHandle::~InjectedBundleFileHandle):
(WebKit::InjectedBundleFileHandle::coreFile):
* WebProcess/InjectedBundle/DOM/InjectedBundleFileHandle.h: Added.
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::jsWrapperForWorld):
* WebProcess/WebPage/WebFrame.h:
2015-02-27 Beth Dakin <bdakin@apple.com>
Lookup panel dismisses when pages are loading in other tabs/windows
https://bugs.webkit.org/show_bug.cgi?id=142104
-and corresponding-
rdar://problem/19882137
Reviewed by Tim Horton.
Until rdar://problem/13875766 is resolved, we should only call into Lookup and
DataDetectors for key windows.
* UIProcess/API/mac/WKView.mm:
(-[WKView _dismissContentRelativeChildWindows]):
2015-02-27 Anders Carlsson <andersca@apple.com>
Add infrastructure for handling website data in the network process
https://bugs.webkit.org/show_bug.cgi?id=142092
Reviewed by Andreas Kling.
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::fetchWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
Send back "Did" messages without actually doing anything for now.
* NetworkProcess/NetworkProcess.h:
Add new members.
* NetworkProcess/NetworkProcess.messages.in:
Add FetchWebsiteData and DeleteWebsiteDataForOrigins messages.
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::~NetworkProcessProxy):
Assert that all maps are empty.
(WebKit::NetworkProcessProxy::fetchWebsiteData):
(WebKit::NetworkProcessProxy::deleteWebsiteDataForOrigins):
Add callbacks and send fetch and delete messages respectively.
(WebKit::NetworkProcessProxy::networkProcessCrashedOrFailedToLaunch):
Make sure to invoke all callbacks.
(WebKit::NetworkProcessProxy::didFetchWebsiteData):
Find the callback and invoke it.
(WebKit::NetworkProcessProxy::didDeleteWebsiteDataForOrigins):
Ditto.
* UIProcess/Network/NetworkProcessProxy.h:
Add new members.
* UIProcess/Network/NetworkProcessProxy.messages.in:
Add DidFetchWebsiteData and DidDeleteWebsiteDataForOrigins messages.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::connectionDidClose):
Just pass an empty WebsiteData object.
2015-02-26 Enrica Casucci <enrica@apple.com>
[WK2] REGRESSION(r180465): WebKit::WebPage::editorState() triggers a layout.
https://bugs.webkit.org/show_bug.cgi?id=142015
Reviewed by Alexey Proskuryakov.
We no longer compute the font information at selection
when we update the editor state.
Instead, we request the font information only when the selection
changes and the font panel is visible.
I added an observer to be notified of the font panel visibility
changes to update NSFontManager to reflect the font at the
current selection.
* Shared/EditorState.cpp:
(WebKit::EditorState::encode):
(WebKit::EditorState::decode):
* Shared/EditorState.h:
(WebKit::EditorState::EditorState):
* UIProcess/API/mac/WKView.mm:
(-[WKView updateFontPanelIfNeeded]):
(-[WKView _selectionChanged]):
(-[WKView addWindowObserversForWindow:]):
(-[WKView removeWindowObservers]):
(-[WKView observeValueForKeyPath:ofObject:change:context:]):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::fontAtSelection):
(WebKit::WebPageProxy::fontAtSelectionCallback):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::platformEditorState):
(WebKit::WebPage::fontAtSelection):
2015-02-27 Brady Eidson <beidson@apple.com>
Add API to remove a single content filter.
<rdar://problem/19977764> and https://bugs.webkit.org/show_bug.cgi?id=142088
Reviewed by Sam Weinig.
* Shared/WebPageGroupData.h:
* UIProcess/API/C/WKPageGroup.cpp:
(WKPageGroupRemoveUserContentFilter):
* UIProcess/API/C/WKPageGroup.h:
* UIProcess/API/Cocoa/WKUserContentController.mm:
(-[WKUserContentController _removeUserContentFilter:]):
* UIProcess/API/Cocoa/WKUserContentControllerPrivate.h:
* UIProcess/UserContent/WebUserContentControllerProxy.cpp:
(WebKit::WebUserContentControllerProxy::WebUserContentControllerProxy):
(WebKit::WebUserContentControllerProxy::addProcess):
(WebKit::WebUserContentControllerProxy::addUserContentFilter):
(WebKit::WebUserContentControllerProxy::removeUserContentFilter):
(WebKit::WebUserContentControllerProxy::removeAllUserContentFilters):
* UIProcess/UserContent/WebUserContentControllerProxy.h:
* UIProcess/WebPageGroup.cpp:
(WebKit::WebPageGroup::addUserContentFilter):
(WebKit::WebPageGroup::removeUserContentFilter):
* UIProcess/WebPageGroup.h:
* WebProcess/UserContent/WebUserContentController.cpp:
(WebKit::WebUserContentController::removeUserContentFilter):
* WebProcess/UserContent/WebUserContentController.h:
* WebProcess/UserContent/WebUserContentController.messages.in:
* WebProcess/WebPage/WebPageGroupProxy.cpp:
(WebKit::WebPageGroupProxy::WebPageGroupProxy):
(WebKit::WebPageGroupProxy::removeUserContentFilter):
* WebProcess/WebPage/WebPageGroupProxy.h:
* WebProcess/WebPage/WebPageGroupProxy.messages.in:
2015-02-26 Anders Carlsson <andersca@apple.com>
Add API to remove all website data for the given data records
https://bugs.webkit.org/show_bug.cgi?id=142060
Reviewed by Beth Dakin.
* UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
Add new method declaration.
* UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
(toWebsiteDataRecords):
Add a helper function that converts an NSArray of _WKWebsiteDataRecords to a Vector of WebsiteDataRecords.
(-[_WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
Call through to the underlying WebsiteDataStore.
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::removeData):
Figure out which processes to call deleteWebsiteDataForOrigins for and do so. Add a callback aggregator so we can
call the completion handler at the right time.
* UIProcess/WebsiteData/WebsiteDataStore.h:
Add new members.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::deleteWebsiteDataForOrigins):
Use the newly added MemoryCache member function to delete all resources matching the set of origins.
2015-02-26 Chris Dumez <cdumez@apple.com>
Rename DatabaseManager::manager() to DatabaseManager::singleton()
https://bugs.webkit.org/show_bug.cgi?id=142054
Reviewed by Ryosuke Niwa.
Rename DatabaseManager::manager() to DatabaseManager::singleton() as
per coding style and use WTF::NeverDestroyed.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::exceededDatabaseQuota):
* WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
(WebKit::WebDatabaseManager::initialize):
(WebKit::WebDatabaseManager::getDatabasesByOrigin):
(WebKit::WebDatabaseManager::getDatabaseOrigins):
(WebKit::WebDatabaseManager::deleteDatabaseWithNameForOrigin):
(WebKit::WebDatabaseManager::deleteDatabasesForOrigin):
(WebKit::WebDatabaseManager::deleteAllDatabases):
(WebKit::WebDatabaseManager::setQuotaForOrigin):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
2015-02-26 Myles C. Maxfield <mmaxfield@apple.com>
[Mac] [iOS] Parsing support for -apple-trailing-word
https://bugs.webkit.org/show_bug.cgi?id=141939
Reviewed by Andreas Kling.
* Configurations/FeatureDefines.xcconfig:
2015-02-26 Brady Eidson <beidson@apple.com>
Make WKPageGroupRemoveAllUserContentFilters actually remove all user content filters
https://bugs.webkit.org/show_bug.cgi?id=142047
Reviewed by Geoff Garen.
* UIProcess/API/C/WKPageGroup.cpp:
(WKPageGroupRemoveAllUserContentFilters): Remove all content filters instead of removing all user scripts.
2015-02-25 Anders Carlsson <andersca@apple.com>
Add (unused for now) code to delete website data for a set of origins
https://bugs.webkit.org/show_bug.cgi?id=142019
Reviewed by Beth Dakin.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::~WebProcessProxy):
Assert that there are no pending callbacks.
(WebKit::WebProcessProxy::connectionDidClose):
Invoke all the didDeleteWebsiteDataForOrigins callbacks.
(WebKit::WebProcessProxy::didDeleteWebsiteDataForOrigins):
Grab the didDeleteWebsiteDataForOrigins and invoke it.
(WebKit::WebProcessProxy::deleteWebsiteDataForOrigins):
Add the pending callback and send a DeleteWebsiteDataForOrigins to the web process.
* UIProcess/WebProcessProxy.h:
Add new members.
* UIProcess/WebProcessProxy.messages.in:
Add a DidDeleteWebsiteDataForOrigins message.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::deleteWebsiteDataForOrigins):
For now, just send back a DidDeleteWebsiteDataForOrigins message.
* WebProcess/WebProcess.h:
Add new members.
* WebProcess/WebProcess.messages.in:
Add a DeleteWebsiteDataForOrigins message.
2015-02-25 Shivakumar JM <shiva.jm@samsung.com>
Fix build warning in WebKit2/UIProcess module.
https://bugs.webkit.org/show_bug.cgi?id=142014
Reviewed by Anders Carlsson.
Fix build warning by using UNUSED_PARAM macro.
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::computeWebProcessAccessTypeForDataFetch):
2015-02-24 Simon Fraser <simon.fraser@apple.com>
Clarify some resizing terminology in ScrollView/FrameView
https://bugs.webkit.org/show_bug.cgi?id=141996
Reviewed by Zalan Bujtas.
ScrollableArea/ScrollView/FrameView had some confusing terminology around
contentsResized/visibleContentsResized/fixedLayoutSizeChanged.
Clarify this by distinguishing between:
1. Available size changes because of
i) non-overlay scrollbar presence
ii) ScrollableArea frame change
2. Removing fixedLayoutSizeChanged() and just treating it like an
available size change.
contentsResized() is relegated to simply being a hook that allows Mac to
flash overlay scrollbars.
The confusingly named visibleContentsResized() is now updateContentsSize(),
and is the way that a ScrollableArea tells its subclasss that it should recompute
the size of the contents (i.e. do a layout).
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::scrollbarStyleChanged): Call the base class method,
which takes care of
2015-02-24 Simon Fraser <simon.fraser@apple.com>
Use an enum for scrollbar style
https://bugs.webkit.org/show_bug.cgi?id=141985
Reviewed by Beth Dakin.
Switch to an enum class for the scrollbar style (normal or overlay).
Sadly it still has to be passed as an int across the process boundary.
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::recommendedScrollbarStyleDidChange):
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::recommendedScrollbarStyleDidChange):
* WebProcess/Plugins/PDF/PDFPlugin.h:
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::scrollbarStyleChanged):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::recommendedScrollbarStyleDidChange):
* WebProcess/WebCoreSupport/WebChromeClient.h:
2015-02-24 Chris Dumez <cdumez@apple.com>
[Mac][WK2] ASSERTION FAILED: m_sendPort in IPC::Connection::open()
https://bugs.webkit.org/show_bug.cgi?id=141934
Reviewed by Darin Adler.
Speculative fix for "ASSERTION FAILED: m_sendPort" in
IPC::Connection::open(). This assertion seems to indicate we ended
up in IPC::Connection::open() with MACH_PORT_NULL as port.
I found that in XPCServiceInitializerDelegate::getConnectionIdentifier()
we return true unconditionally, even though
xpc_dictionary_copy_mach_send() can return MACH_PORT_NULL. This patch
updates this method to add a check for MACH_PORT_NULL and return false
in this case.
* Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
(WebKit::XPCServiceInitializerDelegate::getConnectionIdentifier):
2015-02-24 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r180599.
https://bugs.webkit.org/show_bug.cgi?id=141998
Lots of new test failures (Requested by smfr on #webkit).
Reverted changeset:
"Parsing support for -webkit-trailing-word"
https://bugs.webkit.org/show_bug.cgi?id=141939
http://trac.webkit.org/changeset/180599
2015-02-24 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Fix build break on EFL and GTK port since r180585.
https://bugs.webkit.org/show_bug.cgi?id=141994
Reviewed by Joseph Pecoraro.
* UIProcess/WebsiteData/WebsiteDataRecord.cpp:
(WebKit::WebsiteDataRecord::displayNameForOrigin):
* UIProcess/WebsiteData/WebsiteDataRecord.h:
(WebKit::WebsiteDataRecord::WebsiteDataRecord):
2015-02-24 Myles C. Maxfield <mmaxfield@apple.com>
[Mac] [iOS] Parsing support for -apple-trailing-word
https://bugs.webkit.org/show_bug.cgi?id=141939
Reviewed by Andreas Kling.
* Configurations/FeatureDefines.xcconfig:
2015-02-24 Csaba Osztrogonác <ossy@webkit.org>
Buildfix after r180585.
* CMakeLists.txt:
2015-02-24 Anders Carlsson <andersca@apple.com>
Pass _WKWebsiteDataRecord objects to the fetchData completion handler
https://bugs.webkit.org/show_bug.cgi?id=141984
Reviewed by Andreas Kling.
* Shared/Cocoa/APIObject.mm:
(API::Object::newObject):
Create _WKWebsiteDataRecord objects for WebsiteDataRecord API objects.
* UIProcess/API/APIWebsiteDataRecord.h:
Add WebsiteDataRecord getter.
* UIProcess/API/Cocoa/_WKWebsiteDataRecord.h:
Add displayName and dataTypes properties.
* UIProcess/API/Cocoa/_WKWebsiteDataRecord.mm:
(dataTypesToString):
Helper function to convert dataTypes bit-fields to strings.
(-[_WKWebsiteDataRecord description]):
Include the display name and data types in the description.
(-[_WKWebsiteDataRecord displayName]):
Return the display name.
(-[_WKWebsiteDataRecord dataTypes]):
Return the data types.
* UIProcess/API/Cocoa/_WKWebsiteDataRecordInternal.h:
(WebKit::toWebsiteDataTypes):
Move this here from _WKWebsiteDataStore.mm.
(WebKit::toWKWebsiteDataTypes):
Add new function to convert WebsiteDataTypes to WKWebsiteDataTypes.
* UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
(-[_WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
(-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
Qualify toWebsiteDataTypes calls.
* UIProcess/WebsiteData/WebsiteDataRecord.cpp: Added.
(WebKit::WebsiteDataRecord::displayNameForOrigin):
New helper that returns a display name given an origin.
(WebKit::WebsiteDataRecord::add):
Add the origin as well as the type.
* UIProcess/WebsiteData/WebsiteDataRecord.h:
Add new members.
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::fetchData):
Loop through the entries and add them to the m_websiteDataRecords hash map, which
is keyed off of the display name. Pass the m_websiteDataRecords values to the completion handler.
* WebKit2.xcodeproj/project.pbxproj:
2015-02-24 Csaba Osztrogonác <ossy@webkit.org>
One more buildfix after r180575.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::connectionDidClose):
2015-02-24 Csaba Osztrogonác <ossy@webkit.org>
URTBF after 180575.
* CMakeLists.txt:
2015-02-24 Anders Carlsson <andersca@apple.com>
Implement more of the data fetching API
https://bugs.webkit.org/show_bug.cgi?id=141975
Reviewed by Andreas Kling.
* Shared/WebsiteData/WebsiteData.cpp: Added.
(WebKit::WebsiteData::Entry::encode):
(WebKit::WebsiteData::Entry::decode):
(WebKit::WebsiteData::encode):
(WebKit::WebsiteData::decode):
* Shared/WebsiteData/WebsiteData.h: Added.
Add a new WebsiteData class that will store website data. Currently it only stores
origin + website data type, but in the future it is going to store more things, like
host names that have cookies associated.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::~WebProcessProxy):
Assert that we don't have any pending fetch data callbacks.
(WebKit::WebProcessProxy::connectionDidClose):
Invoke any pending fetch website data callbacks.
(WebKit::WebProcessProxy::didFetchWebsiteData):
Grab the callback and invoke it.
(WebKit::WebProcessProxy::fetchWebsiteData):
Set up a pending callback and send a FetchWebsiteData message to the web process.
* UIProcess/WebProcessProxy.h:
Add new member.
* UIProcess/WebProcessProxy.messages.in:
Add a DidFetchWebsiteData message.
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::computeWebProcessAccessTypeForDataFetch):
Return the web process access type for the given set of data types.
(WebKit::WebsiteDataStore::fetchData):
Set up a callback aggregator that will assemble the needed website data into a vector of website data records.
(WebKit::computeNetworkProcessAccessTypeForDataRemoval):
(WebKit::computeWebProcessAccessTypeForDataRemoval):
Rename these functions to indicate that they are about data removal.
(WebKit::WebsiteDataStore::removeData):
Append "ForDataRemoval" to function calls.
* WebKit2.xcodeproj/project.pbxproj:
Add new files.
* WebProcess/Storage/StorageAreaMap.cpp:
(WebKit::StorageAreaMap::StorageAreaMap):
Tighten types.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::fetchWebsiteData):
For now, just fetch memory cache data.
* WebProcess/WebProcess.h:
Add new members.
* WebProcess/WebProcess.messages.in:
Add FetchWebsiteData message.
2015-02-24 Yusuke Suzuki <utatane.tea@gmail.com>
REGRESSION(r179429): Can't type comments in Facebook
https://bugs.webkit.org/show_bug.cgi?id=141859
Reviewed by Brent Fulgham.
Enable SymbolEnabled in inspector context.
* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetJavaScriptRuntimeFlags):
(WKPreferencesGetJavaScriptRuntimeFlags):
(WKPreferencesSetJavaScriptExperimentsEnabled): Deleted.
(WKPreferencesGetJavaScriptExperimentsEnabled): Deleted.
* UIProcess/API/C/WKPreferencesRef.h:
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _javaScriptRuntimeFlags]):
(-[WKPreferences _setJavaScriptRuntimeFlags:]):
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:
* UIProcess/efl/WebInspectorProxyEfl.cpp:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
* UIProcess/gtk/WebInspectorProxyGtk.cpp:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
* mac/WebKit2.order:
2015-02-24 Anders Carlsson <andersca@apple.com>
Tighten up some SecurityOrigin related code, use references where possible
https://bugs.webkit.org/show_bug.cgi?id=141971
Reviewed by Antti Koivisto.
* DatabaseProcess/DatabaseProcess.cpp:
(WebKit::DatabaseProcess::getIndexedDatabaseOrigins):
* Shared/SecurityOriginData.cpp:
(WebKit::SecurityOriginData::fromSecurityOrigin):
(WebKit::SecurityOriginData::securityOrigin):
* Shared/SecurityOriginData.h:
* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::createTransientLocalStorageMap):
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
(WebKit::WebIDBServerConnection::WebIDBServerConnection):
* WebProcess/MediaCache/WebMediaKeyStorageManager.cpp:
(WebKit::WebMediaKeyStorageManager::getMediaKeyOrigins):
* WebProcess/Storage/StorageAreaMap.cpp:
(WebKit::StorageAreaMap::create):
(WebKit::StorageAreaMap::StorageAreaMap):
(WebKit::StorageAreaMap::dispatchSessionStorageEvent):
(WebKit::StorageAreaMap::dispatchLocalStorageEvent):
* WebProcess/Storage/StorageAreaMap.h:
* WebProcess/Storage/StorageNamespaceImpl.cpp:
(WebKit::StorageNamespaceImpl::storageArea):
2015-02-24 Michael Catanzaro <mcatanzaro@igalia.com>
Crash loading local file with WebPageProxy::loadAlternateHTMLString
https://bugs.webkit.org/show_bug.cgi?id=141867
Reviewed by Anders Carlsson.
WebPageProxy::loadAlternateHTMLString needs to assume read access to unreachableURL as well
as baseURL, because unreachableURL will get added to the back/forward list, causing us to
crash later on when we notice the unexpected URL received in checkURLReceivedFromWebProcess.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::loadAlternateHTMLString):
2015-02-24 Ryuan Choi <ryuan.choi@navercorp.com>
[EFL] Add message APIs to communicate between ewk_context and extensions
https://bugs.webkit.org/show_bug.cgi?id=137660
Reviewed by Gyuyoung Kim.
* PlatformEfl.cmake: Added dependencies for ewk2UnitTestExtensionSample
* UIProcess/API/efl/ewk_context.cpp:
(EwkContext::EwkContext):
(EwkContext::didReceiveMessageFromInjectedBundle):
(EwkContext::setMessageFromExtensionCallback):
(EwkContext::processReceivedMessageFromInjectedBundle):
(ewk_context_message_post_to_extensions):
(ewk_context_message_from_extensions_callback_set):
(EwkContext::didReceiveSynchronousMessageFromInjectedBundle):
Deleted to split synchronouse message APIs from asynchronuous message APIs.
ewebkit will not support this until there are requirements.
(EwkContext::setMessageFromInjectedBundleCallback): Renamed to setMessageFromExtensionCallback.
(ewk_context_message_post_to_injected_bundle): Renamed to ewk_context_message_post_to_extensions.
(ewk_context_message_from_injected_bundle_callback_set): Renamed to ewk_context_message_from_injected_bundle_callback_set.
* UIProcess/API/efl/ewk_context.h:
* UIProcess/API/efl/ewk_context_private.h:
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
Improved test case for ewk_context_new_with_extensions_path using the message APIs.
(EWK2UnitTest::EWK2UnitTestBase::EWK2UnitTestBase):
(EWK2UnitTest::EWK2UnitTestBase::SetUp):
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h:
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.cpp:
(EWK2UnitTest::EWK2UnitTestEnvironment::extensionSample): Deleted.
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.h:
* UIProcess/API/efl/tests/extensions/extension_sample.cpp:
Improved test case for ewk_context_new_with_extensions_path using the message APIs.
* UIProcess/API/efl/tests/test_ewk2_context.cpp: Ditto.
(EWK2ContextTestWithExtension::messageReceivedCallback):
(EWK2ContextTestWithExtension::EWK2ContextTestWithExtension):
(TEST_F):
* WebProcess/InjectedBundle/API/efl/ewk_extension.cpp:
(toEwkExtendion):
(EwkExtension::EwkExtension):
(EwkExtension::didCreatePage):
(EwkExtension::willDestroyPage):
(EwkExtension::didReceiveMessage):
(EwkExtension::didReceiveMessageToPage):
(ewk_extension_message_post): Implemented to post message to ewk_context.
* WebProcess/InjectedBundle/API/efl/ewk_extension.h:
* WebProcess/InjectedBundle/API/efl/ewk_extension_private.h:
(EwkExtension::bundle):
* WebProcess/efl/ExtensionManagerEfl.cpp:
(WebKit::ExtensionManagerEfl::initialize):
Fixed the bug when there are different shared objects in extension path.
This is spotted while improving test case.
2015-02-23 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r180547 and r180550.
https://bugs.webkit.org/show_bug.cgi?id=141957
Broke 10 Windows tests. (Requested by bfulgham_ on #webkit).
Reverted changesets:
"REGRESSION(r179429): Can't type comments in Facebook"
https://bugs.webkit.org/show_bug.cgi?id=141859
http://trac.webkit.org/changeset/180547
"Constructor returning null should construct an object instead
of null"
https://bugs.webkit.org/show_bug.cgi?id=141640
http://trac.webkit.org/changeset/180550
2015-02-23 Ryosuke Niwa <rniwa@webkit.org>
Disable font loading events until our implementation gets updated to match the latest spec
https://bugs.webkit.org/show_bug.cgi?id=141938
Reviewed by Andreas Kling.
* Configurations/FeatureDefines.xcconfig:
2015-02-23 Yusuke Suzuki <utatane.tea@gmail.com>
REGRESSION(r179429): Can't type comments in Facebook
https://bugs.webkit.org/show_bug.cgi?id=141859
Reviewed by Geoffrey Garen.
Enable SymbolEnabled in inspector context.
* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetJavaScriptRuntimeFlags):
(WKPreferencesGetJavaScriptRuntimeFlags):
(WKPreferencesSetJavaScriptExperimentsEnabled): Deleted.
(WKPreferencesGetJavaScriptExperimentsEnabled): Deleted.
* UIProcess/API/C/WKPreferencesRef.h:
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _javaScriptRuntimeFlags]):
(-[WKPreferences _setJavaScriptRuntimeFlags:]):
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:
* UIProcess/efl/WebInspectorProxyEfl.cpp:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
* UIProcess/gtk/WebInspectorProxyGtk.cpp:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
* mac/WebKit2.order:
2015-02-23 Benjamin Poulain <bpoulain@apple.com>
[iOS WK2] The WebProcess keep scrolling pages based on the last velocity after scrolling has been interrupted
https://bugs.webkit.org/show_bug.cgi?id=141933
rdar://problem/18746673
rdar://problem/19711490
Reviewed by Simon Fraser.
The bug happened like this:
1) The user scroll the page. WKContentView tracks the velocity and send
the update rect + velocity to the WebProcess.
2) The user interupts the scrolling but does not commit to either scrolling
again or cancelling the scrolling.
Since we were not notified of this state, the WebProcess still believed
the velocity is stable.
3) With any paint update, the WebProcess would account for the last velocity
and try to guess the best repaint area. This would drift endlessly out
of the view since the view is not really moving.
This patch fixes the issue by adding special handling for interrupted scrolling.
Kudos to Kurt Revis for providing us the required APIs.
* Shared/VisibleContentRectUpdateInfo.h:
(WebKit::operator==):
We can no longer filter VisibleContentRectUpdateInfo ignoring the velocity.
Typically, UIScrollView would call -scrollViewDidScroll: before being interrupted.
If we filter based on the VisibleContentRectUpdateInfo, we have two identical
states differing only by the velocity. If we filter the second update, the WebProcess
would never know the velocity should be zero.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _scrollViewDidInterruptDecelerating:]):
We get this callback when scrolling is interrupted. We just need to clear
the velocity and re-send a new update for the current state.
(-[WKWebView _updateVisibleContentRects]):
Do not consider an interrupted scroll as a stable state. We don't know if scrolling
will resume or will stop.
* UIProcess/ios/WKContentView.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView didInterruptScrolling]):
2015-02-23 Anders Carlsson <andersca@apple.com>
Add API for fetching website data records to _WKWebsiteDataStore
https://bugs.webkit.org/show_bug.cgi?id=141926
Reviewed by Beth Dakin.
* UIProcess/API/APIWebsiteDataRecord.cpp:
(API::WebsiteDataRecord::create):
(API::WebsiteDataRecord::WebsiteDataRecord):
* UIProcess/API/APIWebsiteDataRecord.h:
Update to take a WebsiteDataRecord parameter.
* UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
* UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
(-[_WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
Call down to the WebsiteDataStore.
* UIProcess/WebsiteData/WebsiteDataRecord.h: Added.
This will be the data-container part of WebsiteDataRecord, but it's currently empty.
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::fetchData):
Just dispatch the completion handler for now.
* UIProcess/WebsiteData/WebsiteDataStore.h:
Add new member.
* WebKit2.xcodeproj/project.pbxproj:
Add new files.
2015-02-23 Chris Dumez <cdumez@apple.com>
Add support for diagnostic logging messages sampling
https://bugs.webkit.org/show_bug.cgi?id=141823
<rdar://problem/19899030>
Reviewed by Andreas Kling.
Add support for diagnostic logging messages sampling to decrease the
impact of diagnostic logging on CPU usage, while still getting useful
overall results. This patch adds a ShouldSample argument to
logDiagnosticMessage*() functions and logs 5% of the messages when
sampling. Sampling is turned on for keys that are known to be verbose
(e.g. per resource load logging).
On the page load test I am tracking, CPU usage caused by diagnostic
logging went down to 0.3% of UIProcess from 2.8% with this change.
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::logDiagnosticMessage):
(WebKit::NetworkProcess::logDiagnosticMessageWithResult):
(WebKit::NetworkProcess::logDiagnosticMessageWithValue):
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/cache/NetworkCacheStatisticsCocoa.mm:
(WebKit::NetworkCacheStatistics::recordNotUsingCacheForRequest):
(WebKit::NetworkCacheStatistics::recordRetrievalFailure):
(WebKit::NetworkCacheStatistics::recordRetrievedCachedEntry):
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::logDiagnosticMessage):
(WebKit::NetworkProcessProxy::logDiagnosticMessageWithResult):
(WebKit::NetworkProcessProxy::logDiagnosticMessageWithValue):
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/Network/NetworkProcessProxy.messages.in:
* UIProcess/WebPageProxy.cpp:
(WebKit::shouldLogDiagnosticMessage):
(WebKit::WebPageProxy::logDiagnosticMessage):
(WebKit::WebPageProxy::logDiagnosticMessageWithResult):
(WebKit::WebPageProxy::logDiagnosticMessageWithValue):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
(WebKit::WebDiagnosticLoggingClient::logDiagnosticMessage):
(WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithResult):
(WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithValue):
* WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::willStartUserTriggeredZooming):
2015-02-23 Anders Carlsson <andersca@apple.com>
Add a stubbed out _WKWebsiteDataRecord class
https://bugs.webkit.org/show_bug.cgi?id=141919
Reviewed by Beth Dakin.
Also add the corresponding API::WebsiteDataRecord C++ class. A website data record is going to represent
a set of associated websites and the types of website data that exist for said websites.
* Shared/API/APIObject.h:
* UIProcess/API/APIWebsiteDataRecord.cpp: Added.
* UIProcess/API/APIWebsiteDataRecord.h: Added.
* UIProcess/API/Cocoa/_WKWebsiteDataRecord.h: Added.
* UIProcess/API/Cocoa/_WKWebsiteDataRecord.mm: Added.
* UIProcess/API/Cocoa/_WKWebsiteDataRecordInternal.h: Added.
* UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
* WebKit2.xcodeproj/project.pbxproj:
2015-02-23 Timothy Horton <timothy_horton@apple.com>
Reproducible crash in ViewGestureController::removeSwipeSnapshot()
https://bugs.webkit.org/show_bug.cgi?id=141917
<rdar://problem/19918590>
Reviewed by Brian Weinstein.
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::removeSwipeSnapshot):
If the snapshot was purged and we're showing a white snapshot, we won't
be able to mark the (null) snapshot surface as volatile. Add a null check.
2015-02-23 Anders Carlsson <andersca@apple.com>
Replace another straight-up cast with a toImpl call
https://bugs.webkit.org/show_bug.cgi?id=141914
rdar://problem/19913016
Reviewed by Andreas Kling.
This fixes a problem where Mail would not display message bodies.
* UIProcess/API/Cocoa/WKConnection.mm:
(didReceiveMessage):
2015-02-20 Brent Fulgham <bfulgham@apple.com>
Scrollbars and ScrollAnimators must always have a ScrollableArea
https://bugs.webkit.org/show_bug.cgi?id=141855
Reviewed by Simon Fraser.
Change users of the scrollAnimator() method to expect a reference instead of a pointer.
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::createScrollbar):
(WebKit::PDFPlugin::destroyScrollbar):
2015-02-20 Jessie Berlin <jberlin@webkit.org>
Build fix after r180465.
* UIProcess/mac/PageClientImpl.h:
2015-02-20 Carlos Alberto Lopez Perez <clopez@igalia.com>
[GTK] Unreviewed build fix after r180449.
* UIProcess/API/gtk/WebKitFileChooserRequest.cpp:
(webkit_file_chooser_request_get_selected_files):
2015-02-20 Enrica Casucci <enrica@apple.com>
[WK2] Add support for font panel on OS X.
https://bugs.webkit.org/show_bug.cgi?id=141777
Reviewed by Tim Horton.
This patch adds the necessary hooks to WKView to support
the font panel. It also includes refactoring of WebPage::editorState
and WebPageProxy::editorStateChanged to separate the different platform
specific tasks.
* Shared/EditorState.cpp:
(WebKit::EditorState::encode):
(WebKit::EditorState::decode):
* Shared/EditorState.h:
(WebKit::EditorState::EditorState):
* UIProcess/API/mac/WKView.mm:
(-[WKView _selectionChanged]):
(-[WKView changeFont:]):
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::editorStateChanged): Deleted.
* UIProcess/WebPageProxy.h:
* UIProcess/efl/WebPageProxyEfl.cpp:
(WebKit::WebPageProxy::editorStateChanged):
* UIProcess/gtk/WebPageProxyGtk.cpp:
(WebKit::WebPageProxy::editorStateChanged):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::editorStateChanged):
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::selectionDidChange):
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::setFont):
(WebKit::WebPageProxy::editorStateChanged):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::editorState):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/efl/WebPageEfl.cpp:
(WebKit::WebPage::platformEditorState):
* WebProcess/WebPage/gtk/WebPageGtk.cpp:
(WebKit::WebPage::platformEditorState):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::platformEditorState):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::platformEditorState):
(WebKit::WebPage::setFont):
2015-02-20 Chris Dumez <cdumez@apple.com>
[WK2] Add more detailed diagnostic logging for measuring network cache efficacy
https://bugs.webkit.org/show_bug.cgi?id=141803
<rdar://problem/19632080>
Reviewed by Antti Koivisto.
Add more detailed diagnostic logging for measuring network cache
efficacy.
We want to know the reason the network cache is being by-passed, why
the network cache decided not to cache a response and why it cannot
reuse a cache entry.
This patch adds a new "UncachedReason" table to the SQLite database
to store the reason the network cache is deciding not to cache a
given response. This information is used later, when the resource is
requested again to log the reason why the request cannot be satistied
by the cache.
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::decodeStorageEntry):
(WebKit::canRetrieve):
(WebKit::NetworkCache::retrieve):
(WebKit::canStore):
(WebKit::NetworkCache::store):
* NetworkProcess/cache/NetworkCache.h:
* NetworkProcess/cache/NetworkCacheStatistics.h:
* NetworkProcess/cache/NetworkCacheStatisticsCocoa.mm:
(WebKit::NetworkCacheStatistics::initialize):
(WebKit::NetworkCacheStatistics::recordNotCachingResponse):
(WebKit::retrieveDecisionToDiagnosticKey):
(WebKit::NetworkCacheStatistics::recordNotUsingCacheForRequest):
(WebKit::storeDecisionToDiagnosticKey):
(WebKit::NetworkCacheStatistics::recordRetrievalFailure):
(WebKit::cachedEntryReuseFailureToDiagnosticKey):
(WebKit::NetworkCacheStatistics::recordRetrievedCachedEntry):
(WebKit::NetworkCacheStatistics::queryWasEverRequested):
(WebKit::NetworkCacheStatistics::clear):
2015-02-20 Anders Carlsson <andersca@apple.com>
API::String should just be a simple wrapper for WTF strings
https://bugs.webkit.org/show_bug.cgi?id=141852
Reviewed by Beth Dakin.
Expose a StringView member function on API::String. Move all the WKString API implementations to WKString.cpp.
* Shared/API/APIString.h:
* Shared/API/c/WKString.cpp:
(WKStringIsEmpty):
(WKStringGetLength):
(WKStringGetCharacters):
(WKStringGetMaximumUTF8CStringSize):
(WKStringGetUTF8CString):
(WKStringIsEqual):
(WKStringIsEqualToUTF8CString):
(WKStringIsEqualToUTF8CStringIgnoringCase):
2015-02-20 Anders Carlsson <andersca@apple.com>
API::String::string() needs to return an isolated string copy
https://bugs.webkit.org/show_bug.cgi?id=141846
Reviewed by Tim Horton.
Since we can expose API::String objects as NSStrings now, we need to make sure that
we return copied strings so we won't mess up the StringImpl refcounts.
* Shared/API/APIString.h:
2015-02-20 Alexey Proskuryakov <ap@apple.com>
Remove svn:keywords property.
As far as I can tell, the property had no effect on any of these files, but also,
when it has effect it's likely harmful.
* Platform/spi/ios/DataDetectorsUISPI.h: Removed property svn:keywords.
* Platform/spi/ios/ManagedConfigurationSPI.h: Removed property svn:keywords.
* Platform/spi/ios/TextInputSPI.h: Removed property svn:keywords.
* Scripts/webkit/LegacyMessageReceiver-expected.cpp: Removed property svn:keywords.
* Scripts/webkit/LegacyMessages-expected.h: Removed property svn:keywords.
* Scripts/webkit/MessageReceiver-expected.cpp: Removed property svn:keywords.
* Scripts/webkit/MessageReceiverSuperclass-expected.cpp: Removed property svn:keywords.
* Scripts/webkit/Messages-expected.h: Removed property svn:keywords.
* Scripts/webkit/MessagesSuperclass-expected.h: Removed property svn:keywords.
* UIProcess/ios/PageClientImplIOS.h: Removed property svn:keywords.
* UIProcess/ios/WKActionSheet.h: Removed property svn:keywords.
* UIProcess/ios/WKActionSheetAssistant.h: Removed property svn:keywords.
* UIProcess/ios/WKContentView.h: Removed property svn:keywords.
* UIProcess/ios/WKContentViewInteraction.h: Removed property svn:keywords.
* UIProcess/ios/WKGeolocationProviderIOS.h: Removed property svn:keywords.
* UIProcess/ios/WKScrollView.h: Removed property svn:keywords.
* UIProcess/mac/PageClientImpl.h: Removed property svn:keywords.
* UIProcess/mac/WKPrintingView.h: Removed property svn:keywords.
* UIProcess/mac/WKTextInputWindowController.h: Removed property svn:keywords.
* WebProcess/WebCoreSupport/WebSQLiteDatabaseTracker.h: Removed property svn:keywords.
2015-02-20 Csaba Osztrogonác <ossy@webkit.org>
EFL URTBF
* Platform/efl/DispatchQueueEfl.cpp:
2015-02-20 Csaba Osztrogonác <ossy@webkit.org>
URTBF after r180410, WorkQueue.h is in WTF now.
* Platform/efl/DispatchQueueWorkItemEfl.h:
2015-02-20 Anders Carlsson <andersca@apple.com>
Use toAPI when returning the object graph as a WKTypeRef
https://bugs.webkit.org/show_bug.cgi?id=141841
Reviewed by Sam Weinig.
* UIProcess/API/Cocoa/WKProcessGroup.mm:
(getInjectedBundleInitializationUserData):
2015-02-20 Eric Carlson <eric.carlson@apple.com>
[iOS] cleanup AirPlay code
https://bugs.webkit.org/show_bug.cgi?id=141811
Reviewed by Jer Noble.
* Configurations/FeatureDefines.xcconfig: IOS_AIRPLAY -> WIRELESS_PLAYBACK_TARGET.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences): Ditto.
2015-02-20 Gyuyoung Kim <gyuyoung.kim@samsung.com>
[WK2][EFL] Fix the build after r180362
https://bugs.webkit.org/show_bug.cgi?id=141836
Reviewed by Carlos Garcia Campos.
As r180409, EFL port needs to add missing includes for several features,
and needs to have a specific implementation of toAPI/toImple for EFL port.
* UIProcess/API/C/WKBatteryManager.cpp:
* UIProcess/API/C/WKPage.cpp:
* UIProcess/API/C/efl/WKAPICastEfl.h:
(WebKit::toAPI):
(WebKit::toImpl):
* UIProcess/API/efl/ewk_url_scheme_request.cpp:
* UIProcess/CoordinatedGraphics/WebViewClient.cpp:
* UIProcess/efl/WebUIPopupMenuClient.cpp:
* UIProcess/efl/WebViewEfl.cpp:
* WebProcess/efl/ExtensionManagerEfl.cpp:
2015-02-20 Antti Koivisto <antti@apple.com>
Move WorkQueue from WK2 to WTF
https://bugs.webkit.org/show_bug.cgi?id=141797
Reviewed by Anders Carlsson.
* CMakeLists.txt:
* DatabaseProcess/DatabaseProcess.h:
* Platform/IPC/Connection.h:
* Platform/WorkQueue.cpp: Removed.
* Platform/WorkQueue.h: Removed.
* Platform/efl/WorkQueueEfl.cpp: Removed.
* Platform/gtk/WorkQueueGtk.cpp: Removed.
* Platform/mac/WorkQueueMac.cpp: Removed.
* PlatformEfl.cmake:
* PlatformGTK.cmake:
* Shared/Network/CustomProtocols/CustomProtocolManager.h:
* UIProcess/Launcher/ProcessLauncher.cpp:
* UIProcess/Storage/LocalStorageDatabase.cpp:
* UIProcess/Storage/LocalStorageDatabase.h:
* UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
* UIProcess/Storage/LocalStorageDatabaseTracker.h:
* UIProcess/Storage/StorageManager.cpp:
* UIProcess/Storage/StorageManager.h:
* WebKit2.xcodeproj/project.pbxproj:
2015-02-20 Carlos Garcia Campos <cgarcia@igalia.com>
[WK2][GTK] Fix the build after r180362
https://bugs.webkit.org/show_bug.cgi?id=141813
Reviewed by Žan Doberšek.
Add several missing includes and a specific implementation of
toAPI/toImpl for GTK+ WebView.
* UIProcess/API/C/gtk/WKAPICastGtk.h:
(WebKit::toAPI):
(WebKit::toImpl):
* UIProcess/API/C/gtk/WKView.cpp:
* UIProcess/API/gtk/WebKitFormClient.cpp:
* UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.cpp:
* UIProcess/gtk/WebInspectorClientGtk.cpp:
2015-02-19 Shivakumar JM <shiva.jm@samsung.com>
Fix build warning in WebKit2/WebProcess and UIProcess module.
https://bugs.webkit.org/show_bug.cgi?id=141794.
Reviewed by Anders Carlsson.
Fix build warning by using UNUSED_PARAM macro.
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::computeWebProcessAccessType):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::deleteWebsiteData):
2015-02-19 Remy Demarest <rdemarest@apple.com>
Make EnvironmentVariables::appendValue() handle the case where the existing value is an empty string.
https://bugs.webkit.org/show_bug.cgi?id=141818.
Reviewed by Dan Bernstein.
* UIProcess/Launcher/mac/EnvironmentVariables.cpp:
(WebKit::EnvironmentVariables::appendValue): If the existing value is an empty string, replace it rather than
append to it.
2015-02-19 Anders Carlsson <andersca@apple.com>
Make C SPI objects and modern API objects toll-free bridged
https://bugs.webkit.org/show_bug.cgi?id=141808
Reviewed by Tim Horton.
* Shared/API/APIObject.h:
(API::Object::wrap):
(API::Object::unwrap):
Add default implementations of wrap and unwrap. These just cast.
* Shared/API/c/WKArray.cpp:
(WKArrayCreate):
(WKArrayCreateAdoptingValues):
(WKArrayGetItemAtIndex):
* Shared/API/c/WKDictionary.cpp:
(WKDictionaryGetItemForKey):
Add toImpl and toAPI where necessary.
* Shared/API/c/WKSharedAPICast.h:
Add API::Object::wrap in toAPI and unwrap in toImpl.
* Shared/API/c/WKType.cpp:
(WKGetTypeID):
(WKRetain):
(WKRelease):
Add missing toImpl calls.
* Shared/Cocoa/APIObject.mm:
(API::Object::wrap):
Return the APIObject Objective-C wrapper.
(API::Object::unwrap):
Return the API::Object from the Objective-C object.
* Shared/Cocoa/WKObject.h:
Add wrap and unwrap declarations.
* UIProcess/API/C/WKPage.cpp:
* UIProcess/API/C/WKPageConfigurationRef.cpp:
* UIProcess/API/C/WKPageGroup.cpp:
* UIProcess/API/C/WKUserContentControllerRef.cpp:
Add missing includes; toImpl now requires a complete type.
2015-02-19 Timothy Horton <timothy_horton@apple.com>
Remove unused forward declaration from WKWebViewInternal.h
https://bugs.webkit.org/show_bug.cgi?id=141806
Reviewed by Anders Carlsson.
* UIProcess/API/Cocoa/WKWebViewInternal.h:
The use of WebCore::Highlight moved to WKContentView.
2015-02-19 Anders Carlsson <andersca@apple.com>
Use the real implementation type in our API cast traits
https://bugs.webkit.org/show_bug.cgi?id=141805
Reviewed by Sam Weinig.
* Shared/API/c/WKSharedAPICast.h:
(WebKit::toURLRef):
(WebKit::toAPI): Deleted.
(WebKit::toImpl): Deleted.
* UIProcess/GenericCallback.h:
2015-02-19 Anders Carlsson <andersca@apple.com>
Remove the stray storage manager from WebProcessPool
https://bugs.webkit.org/show_bug.cgi?id=141800
Reviewed by Sam Weinig.
* UIProcess/API/mac/WKView.mm:
(-[WKView dealloc]):
(-[WKView initWithFrame:processPool:configuration:webView:]):
(-[WKView _applicationWillTerminate:]): Deleted.
Remove code that calls applicationWillTerminate on the WebPageProxy.
* UIProcess/WebKeyValueStorageManager.cpp:
(WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
(WebKit::WebKeyValueStorageManager::getStorageDetailsByOrigin):
(WebKit::WebKeyValueStorageManager::deleteEntriesForOrigin):
(WebKit::WebKeyValueStorageManager::deleteAllEntries):
Get the storage manager from the website data store.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::close):
Remove storage manager calls.
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::WebProcessPool):
(WebKit::WebProcessPool::applicationWillTerminate): Deleted.
* UIProcess/WebProcessPool.h:
Remove storage manager code.
* UIProcess/WebsiteData/WebsiteDataStore.h:
(WebKit::WebsiteDataStore::storageManager):
Add getter.
2015-02-19 Csaba Osztrogonác <ossy@webkit.org>
[WK2] Unreviewed buildfix for non-Cocoa platforms.
* CMakeLists.txt:
* UIProcess/WebsiteData/unix/WebsiteDataStoreUnix.cpp: Added.
(WebKit::WebsiteDataStore::platformInitialize): Added.
(WebKit::WebsiteDataStore::platformDestroy): Added.
2015-02-19 Anders Carlsson <andersca@apple.com>
WebsiteDataStore should ensure that local storage is written before exiting
https://bugs.webkit.org/show_bug.cgi?id=141798
Reviewed by Sam Weinig.
* UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm: Added.
(WebKit::dataStoresWithStorageManagers):
(WebKit::WebsiteDataStore::platformInitialize):
(WebKit::WebsiteDataStore::platformDestroy):
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::WebsiteDataStore):
(WebKit::WebsiteDataStore::~WebsiteDataStore):
* UIProcess/WebsiteData/WebsiteDataStore.h:
* WebKit2.xcodeproj/project.pbxproj:
2015-02-18 Chris Dumez <cdumez@apple.com>
[WK2][iOS] Fix NetworkCache build
https://bugs.webkit.org/show_bug.cgi?id=141778
Reviewed by Antti Koivisto.
Add missing header include to use round_page() on iOS.
* NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
2015-02-18 Alexey Proskuryakov <ap@apple.com>
Remove input and output files from "Make Frameworks Symbolic Link" step
https://bugs.webkit.org/show_bug.cgi?id=141769
Reviewed by Dan Bernstein.
* WebKit2.xcodeproj/project.pbxproj:
2015-02-18 Timothy Horton <timothy_horton@apple.com>
Adopt WebCore::IOSurface in ImageBuffer
https://bugs.webkit.org/show_bug.cgi?id=141751
Reviewed by Simon Fraser.
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
Remove old WKSI IOSurface-related functions.
2015-02-18 Beth Dakin <bdakin@apple.com>
iBooks immediate action blacklist should not even create the gesture recognizer
https://bugs.webkit.org/show_bug.cgi?id=141768
-and corresponding-
rdar://problem/19806770
Reviewed by Tim Horton.
Move the runtime-application check to the point where the gesture recognizer is
created so that we can avoid doing so.
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:processPool:configuration:webView:]):
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController _updateImmediateActionItem]):
2015-02-18 Chris Dumez <cdumez@apple.com>
Access FontCache global instance via singleton() static member function
https://bugs.webkit.org/show_bug.cgi?id=141726
Reviewed by Daniel Bates.
Access FontCache global instance via singleton() static member function,
as per coding style.
2015-02-18 Timothy Horton <timothy_horton@apple.com>
Add WKContext SPI to clear all visited links
https://bugs.webkit.org/show_bug.cgi?id=141752
<rdar://problem/9997966>
Reviewed by Dan Bernstein.
* UIProcess/API/C/WKContext.cpp:
(WKContextClearVisitedLinks):
* UIProcess/API/C/WKContext.h:
2015-02-17 Anders Carlsson <andersca@apple.com>
Add API for clearing in-memory caches to WKWebsiteDataStore
https://bugs.webkit.org/show_bug.cgi?id=141724
Reviewed by Tim Horton.
* Shared/WebsiteData/WebsiteDataTypes.h:
Add WebsiteDataTypeMemoryCache.
* UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
Add WKWebsiteDataTypeMemoryCache.
* UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
(toWebsiteDataTypes):
Handle WKWebsiteDataTypeMemoryCache and convert it to WebsiteDataTypeMemoryCache.
* UIProcess/WebProcessProxy.cpp:
(WebKit::generateCallbackID):
Generate a new callback.
(WebKit::WebProcessProxy::~WebProcessProxy):
Assert that we don't have any pending callbacks.
(WebKit::WebProcessProxy::connectionDidClose):
Invoke pending callbacks.
(WebKit::WebProcessProxy::canTerminateChildProcess):
Don't try to terminate if we have pending callbacks.
(WebKit::WebProcessProxy::didDeleteWebsiteData):
Take the callback and invoke it.
(WebKit::WebProcessProxy::deleteWebsiteData):
Send a delete message.
* UIProcess/WebProcessProxy.h:
Add new members.
* UIProcess/WebProcessProxy.messages.in:
Add DidDeleteWebsiteData message.
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::computeNetworkProcessAccessType):
Spell persistent correctly.
(WebKit::computeWebProcessAccessType):
Return a web process access type given the a data type mask.
(WebKit::WebsiteDataStore::removeData):
Ask any associated web processes to remove website data.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::deleteWebsiteData):
Delete the memory cache if requested.
* WebProcess/WebProcess.h:
Add new member.
* WebProcess/WebProcess.messages.in:
Add DeleteWebsiteData message.
2015-02-17 Timothy Horton <timothy_horton@apple.com>
REGRESSION (r178595): Clicking on DD highlights sometimes do not work
https://bugs.webkit.org/show_bug.cgi?id=141728
<rdar://problem/19825372>
Reviewed by Beth Dakin.
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController _cancelImmediateActionIfNeeded]):
(-[WKImmediateActionController immediateActionRecognizerWillBeginAnimation:]):
The change that r178595 intended to make was purely that things that we
have no immediate actions for should cancel the immediate action gesture recognizer.
Moving the DataDetectors activation code as well breaks strict ordering
of immediate action callbacks vs. shouldUseActionsWithContext: that they depend on.
2015-02-17 Anders Carlsson <andersca@apple.com>
Only create the WebKit.framework symlink in PrivateFrameworks when the platform is iphoneos
https://bugs.webkit.org/show_bug.cgi?id=141710
<rdar://problem/19719748>
Reviewed by Andreas Kling.
Don't create the symlink when building for the simulator.
* WebKit2.xcodeproj/project.pbxproj:
2015-02-17 Chris Dumez <cdumez@apple.com>
Access MemoryPressureHandler global instance via a singleton() static member function
https://bugs.webkit.org/show_bug.cgi?id=141691
Reviewed by Andreas Kling.
Access MemoryPressureHandler global instance via a singleton() static
member function.
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::initializeNetworkProcess):
(WebKit::NetworkProcess::lowMemoryHandler): Deleted.
* NetworkProcess/NetworkProcess.h:
* PluginProcess/PluginProcess.cpp:
(WebKit::PluginProcess::initializeProcess):
(WebKit::PluginProcess::lowMemoryHandler): Deleted.
* PluginProcess/PluginProcess.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::updateVisibleContentRects):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):
(WebKit::WebProcess::processWillSuspend):
2015-02-16 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] WebKitFrame objects are never released
https://bugs.webkit.org/show_bug.cgi?id=141641
Reviewed by Martin Robinson.
Use a FrameDestructionObserver derived class to wrap our
WebKitFrame objects and delete them when the frame is destroyed,
instead of using willDestroyFrame callback of WKBundlePageLoaderClient
that has never worked.
* WebProcess/InjectedBundle/API/gtk/WebKitFrame.cpp:
(webkitFrameGetWebFrame):
* WebProcess/InjectedBundle/API/gtk/WebKitFramePrivate.h:
* WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
(webkitFrameGetOrCreate):
(webkitFrameDestroy):
(webkitWebPageCreate):
(willDestroyFrame): Deleted.
2015-02-16 Tim Horton <timothy_horton@apple.com>
Fix the !USE(IOSURFACE) build
* Shared/mac/RemoteLayerBackingStore.mm:
SOFT_LINK_MAY_FAIL makes a function that will be unused if !USE(IOSURFACE).
2015-02-16 Tim Horton <timothy_horton@apple.com>
Sometimes RemoteLayerBackingStore ends up non-volatile while the process is suspended
<rdar://problem/19842957>
https://bugs.webkit.org/show_bug.cgi?id=141675
Reviewed by Simon Fraser.
Previously, it was possible to get a layer tree flush in between the
process suspension cleanup code making surfaces volatile and the process
actually being suspended (it was racy because the suspension requires
a few IPC round trips). Depending on how far through the flush we got,
we could sometimes end up either making new non-volatile backing store,
or switching some recently-made-volatile backing store back to non-volatile.
We don't want to have any non-volatile backing store while suspended.
* UIProcess/ProcessThrottler.cpp:
(WebKit::ProcessThrottler::updateAssertion):
Inform the WebProcess when it's going from suspended to runnable state.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::sendProcessDidResume):
* UIProcess/WebProcessProxy.h:
Forward the message along.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::processWillSuspend):
(WebKit::WebProcess::cancelProcessWillSuspend):
(WebKit::WebProcess::setAllLayerTreeStatesFrozen):
(WebKit::WebProcess::processDidResume):
Freeze all of this process' pages' layer trees when we start trying to suspend,
and un-freeze them when either suspension is cancelled or we resume.
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:
2015-02-16 Tim Horton <timothy_horton@apple.com>
Adopt CAMachPort-as-layer-contents
https://bugs.webkit.org/show_bug.cgi?id=141687
<rdar://problem/19393233>
Reviewed by Simon Fraser.
* Shared/mac/RemoteLayerBackingStore.h:
* Shared/mac/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::decode):
If we have CAMachPort, just keep the MachSendRight around.
(WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer):
If we have CAMachPort, make one and leak our send right into it. CAMachPort
will adopt the port and destroy it when needed.
(WebKit::RemoteLayerBackingStore::setBufferVolatility):
Tiny style fix.
2015-02-15 Sam Weinig <sam@webkit.org>
Add experimental <attachment> element support
https://bugs.webkit.org/show_bug.cgi?id=141626
Reviewed by Tim Horton.
* Configurations/FeatureDefines.xcconfig:
2015-02-16 Tim Horton <timothy_horton@apple.com>
REGRESSION (r176459): Process suspension cleanup timer sometimes never stops
https://bugs.webkit.org/show_bug.cgi?id=141669
Reviewed by Simon Fraser.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::markAllLayersVolatileIfPossible):
r176459 accidentally removed the code to stop the cleanup timer
in the case where we successfully finish marking layers volatile,
causing the timer to continue running once the process comes back
from a suspended state.
2015-02-16 Anders Carlsson <andersca@apple.com>
Check for the assume_nonnull feature instead of noescape
https://bugs.webkit.org/show_bug.cgi?id=141666
Reviewed by Dan Bernstein.
* Shared/API/Cocoa/WKFoundation.h:
2015-02-16 Anders Carlsson <andersca@apple.com>
Add nullability qualifiers to all API headers
https://bugs.webkit.org/show_bug.cgi?id=141652
rdar://problem/19793630
Reviewed by Dan Bernstein.
* Shared/API/Cocoa/WKFoundation.h:
Add a WK_NULLABLE_SPECIFIER macro.
* UIProcess/API/Cocoa/WKBackForwardListItem.h:
* UIProcess/API/Cocoa/WKFrameInfo.h:
* UIProcess/API/Cocoa/WKNavigationAction.h:
* UIProcess/API/Cocoa/WKNavigationDelegate.h:
* UIProcess/API/Cocoa/WKNavigationResponse.h:
* UIProcess/API/Cocoa/WKScriptMessage.h:
* UIProcess/API/Cocoa/WKScriptMessageHandler.h:
* UIProcess/API/Cocoa/WKUIDelegate.h:
* UIProcess/API/Cocoa/WKUserContentController.h:
* UIProcess/API/Cocoa/WKUserScript.h:
* UIProcess/API/Cocoa/WKWebView.h:
* UIProcess/API/Cocoa/WKWebViewConfiguration.h:
* UIProcess/API/Cocoa/WKWindowFeatures.h:
* mac/postprocess-framework-headers.sh:
Handle the WK_NULLABLE_SPECIFIER macro. Change the WK_NULLABLE sed command to replace
all occurrences of WK_NULLABLE instead of just the first one.
2015-02-16 Dan Bernstein <mitz@apple.com>
Update SPI availability annotations
https://bugs.webkit.org/show_bug.cgi?id=141588
Reviewed by Anders Carlsson.
* Shared/API/Cocoa/WKFoundation.h: Added a definition of __NSi_8_3 for when building with
an older SDK.
* UIProcess/API/Cocoa/WKErrorPrivate.h:
* UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
2015-02-16 Antti Koivisto <antti@apple.com>
Remove unused InjectedBundle::setCacheModel.
Rubber-stamped by Anders Carlsson.
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::setCacheModel): Deleted.
* WebProcess/InjectedBundle/InjectedBundle.h:
2015-02-16 Anders Carlsson <andersca@apple.com>
Build fix for versions of Xcode that support nullability but don't have the Foundation #defines.
* Shared/API/Cocoa/WKFoundation.h:
2015-02-16 Antti Koivisto <antti@apple.com>
Develop/Disable Caches does not properly disable disk cache
https://bugs.webkit.org/show_bug.cgi?id=141636
Reviewed by Anders Carlsson.
The menu item sets the cache model to "document viewer" to disable the caches (cache size 0).
However the cache model was never passed to the network process after the initialization.
* NetworkProcess/NetworkProcess.messages.in:
* NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
(WebKit::NetworkCacheStorage::retrieve):
(WebKit::NetworkCacheStorage::store):
(WebKit::NetworkCacheStorage::update):
Don't try to store or retrieve when the maximum cache size is set to zero.
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::setCacheModel):
Message the network process too.
* WebProcess/InjectedBundle/API/c/WKBundle.cpp:
(WKBundleSetCacheModel): Deleted.
Remove the now unused SPI.
* WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
2015-02-16 Antti Koivisto <antti@apple.com>
Assertion in disk cache code with redirect to a non-http resource
https://bugs.webkit.org/show_bug.cgi?id=141644
Reviewed by Anders Carlsson.
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::didFinishLoading):
Check that response is HTTP before calling computeFreshnessLifetimeForHTTPFamily.
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::canStore):
Deny storing non-HTTP responses to cache (though the above already covers this).
2015-02-13 Anders Carlsson <andersca@apple.com>
Add support for nullability to the header postprocessing
https://bugs.webkit.org/show_bug.cgi?id=141573
Reviewed by Darin Adler.
* Shared/API/Cocoa/WKFoundation.h:
* UIProcess/API/Cocoa/WKBackForwardList.h:
* mac/postprocess-framework-headers.sh:
2015-02-16 Grzegorz Czajkowski <g.czajkowski@samsung.com>
[EFL] Rename WebContextEfl to WebProcessPoolEfl
https://bugs.webkit.org/show_bug.cgi?id=141642
Reviewed by Csaba Osztrogonác.
Although we've renamed almost everything in r177716, this is still
required after r177692.
* UIProcess/efl/WebProcessPoolEfl.cpp: Renamed from Source/WebKit2/UIProcess/efl/WebContextEfl.cpp.
2015-02-14 Alexey Proskuryakov <ap@apple.com>
Build fix after <http://trac.webkit.org/changeset/180122>
* Platform/mac/StringUtilities.mm:
2015-02-14 Joseph Pecoraro <pecoraro@apple.com>
[Mac] Possible DDActionContext leaks, RetainPtr cleanup
https://bugs.webkit.org/show_bug.cgi?id=141613
Reviewed by Tim Horton.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _defaultMenuItemsForDataDetectableLink]):
Adopt the allocated object.
2015-02-09 Brian J. Burg <burg@cs.washington.edu>
Web Inspector: remove some unnecessary Inspector prefixes from class names in Inspector namespace
https://bugs.webkit.org/show_bug.cgi?id=141372
Reviewed by Joseph Pecoraro.
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::remoteFrontendDisconnected):
2015-02-14 Beth Dakin <bdakin@apple.com>
REGRESSION: Page opens with enlarged font after visiting PDF, navigating back,
then doing a process swap
https://bugs.webkit.org/show_bug.cgi?id=141584
-and corresponding-
rdar://problem/18167729
Reviewed by Tim Horton.
This patch keeps the plugin zoom/scale factors separate from page zoom/scale
factors in the UI process since they are used for slightly different purposes for
plugins (i.e., PDFs) than they are for normal pages. Keeping track of the right
factor for the right type of document will ensure that we dont use the wrong one.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::pageZoomFactor):
(WebKit::WebPageProxy::pageScaleFactor):
(WebKit::WebPageProxy::pluginScaleFactorDidChange):
(WebKit::WebPageProxy::pluginZoomFactorDidChange):
(WebKit::WebPageProxy::didCommitLoadForFrame):
(WebKit::WebPageProxy::pageZoomFactorDidChange): Deleted.
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::pageZoomFactor): Deleted.
(WebKit::WebPageProxy::pageScaleFactor): Deleted.
* UIProcess/WebPageProxy.messages.in:
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::setPageScaleFactor):
2015-02-14 Brian J. Burg <burg@cs.washington.edu>
REGRESSION(r179573): Web Inspector toolbar is completely messed up on Mavericks
https://bugs.webkit.org/show_bug.cgi?id=141555
Reviewed by Joseph Pecoraro.
The old WKView-based code called _setDrawsBackground:NO on the WKView for Mavericks.
Simulate this old behavior by calling WebPageProxy::setDrawsBackground(false).
WKWebView's setOpaque:BOOL gives a flat background color instead of the intended
gradient, so we can't use that method.
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
2015-02-13 Simon Fraser <simon.fraser@apple.com>
Crash closing a tab when a context or popup menu is open
https://bugs.webkit.org/show_bug.cgi?id=141582
rdar://problem/17700475
Reviewed by Anders Carlsson.
If a context menu or a popup menu is open when a tab is programmatically closed,
then we'd crash because both the WebContextMenuProxyMac/WebPopupMenuProxyMac
and the WebPageProxy would be deleted while still in use, via messages
handled via the nested event tracking runloop.
Fix by protecting those things while showing the popup. Also programmatically
dismiss the popup when closing the WebPageProxy.
* UIProcess/WebContextMenuProxy.h:
(WebKit::WebContextMenuProxy::cancelTracking):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::close):
(WebKit::WebPageProxy::showPopupMenu): Clean up some EFL-related confusion that we don't need.
Retaining |this| will also retain m_activePopupMenu.
(WebKit::WebPageProxy::hidePopupMenu):
(WebKit::WebPageProxy::showContextMenu):
(WebKit::WebPageProxy::resetState):
* UIProcess/WebPopupMenuProxy.h:
(WebKit::WebPopupMenuProxy::cancelTracking):
* UIProcess/mac/WebContextMenuProxyMac.h:
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::showContextMenu):
(WebKit::WebContextMenuProxyMac::cancelTracking):
* UIProcess/mac/WebPopupMenuProxyMac.h: For popups, we need to remember if we were
canceled to avoid trying to send events after closing.
* UIProcess/mac/WebPopupMenuProxyMac.mm:
(WebKit::WebPopupMenuProxyMac::WebPopupMenuProxyMac):
(WebKit::WebPopupMenuProxyMac::showPopupMenu):
(WebKit::WebPopupMenuProxyMac::cancelTracking):
2015-02-13 Timothy Horton <timothy_horton@apple.com>
Fix the iOS build.
* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::removeSwipeSnapshot):
* UIProcess/mac/ViewGestureController.h:
This code is never used on iOS.
2015-02-13 Timothy Horton <timothy_horton@apple.com>
Make WebCore::IOSurface have single ownership instead of refcounting
https://bugs.webkit.org/show_bug.cgi?id=141578
Reviewed by Anders Carlsson.
* Shared/mac/RemoteLayerBackingStore.h:
* Shared/mac/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::Buffer::discard):
* UIProcess/API/mac/WKView.mm:
(-[WKView _takeViewSnapshot]):
* UIProcess/mac/ViewGestureController.h:
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
(WebKit::ViewGestureController::removeSwipeSnapshot):
* UIProcess/mac/ViewSnapshotStore.h:
* UIProcess/mac/ViewSnapshotStore.mm:
(WebKit::ViewSnapshot::create):
(WebKit::ViewSnapshot::ViewSnapshot):
(WebKit::ViewSnapshot::hasImage):
Adjust to the single-ownership model.
2015-02-13 Brent Fulgham <bfulgham@apple.com>
[iOS] Unreviewed build fix after r180076.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::creationParameters): We do not
want to do this on iOS.
* UIProcess/WebPageProxy.h: No need to expose function
on iOS (only Mac).
2015-02-13 Brent Fulgham <bfulgham@apple.com>
[Mac, iOS] Adjust pagination behavior for Mail.app printing use
https://bugs.webkit.org/show_bug.cgi?id=141569
<rdar://problem/14912763>
Reviewed by Anders Carlsson.
* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode): Add new flag.
(WebKit::WebPageCreationParameters::decode): Ditto.
* Shared/WebPageCreationParameters.h: Ditto.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::creationParameters): Set new page construction flag.
* UIProcess/WebPageProxy.h:
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::paginationQuirkEnabled): Ask for new pagination flag
when running as a Mail client.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage): Set up pagination based on desired settings.
2015-02-12 Simon Fraser <simon.fraser@apple.com>
determinePrimarySnapshottedPlugIn() should only traverse visible Frames
https://bugs.webkit.org/show_bug.cgi?id=141547
Part of rdar://problem/18445733.
Reviewed by Anders Carlsson.
Use FrameTree::traverseNextRendered() to avoid doing things in unrendered frames
which are not guaranteed to have been laid out.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::determinePrimarySnapshottedPlugIn):
2015-02-13 Antti Koivisto <antti@apple.com>
WorkQueue should support concurrent queues
https://bugs.webkit.org/show_bug.cgi?id=141559
Reviewed by Anders Carlsson.
* DatabaseProcess/DatabaseProcess.cpp:
(WebKit::DatabaseProcess::DatabaseProcess):
* Platform/IPC/Connection.h:
* Platform/IPC/mac/ConnectionMac.mm:
(IPC::Connection::open):
* Platform/WorkQueue.cpp:
(WorkQueue::create):
Also make create return a Ref.
(WorkQueue::WorkQueue):
* Platform/WorkQueue.h:
Add queue type enum.
* Platform/efl/WorkQueueEfl.cpp:
(WorkQueue::platformInitialize):
* Platform/gtk/WorkQueueGtk.cpp:
(WorkQueue::platformInitialize):
* Platform/mac/WorkQueueMac.cpp:
(WorkQueue::platformInitialize):
* Shared/mac/SecItemShim.cpp:
(WebKit::SecItemShim::initializeConnection):
* Shared/mac/SecItemShim.h:
* UIProcess/Launcher/ProcessLauncher.cpp:
(WebKit::processLauncherWorkQueue):
* UIProcess/mac/SecItemShimProxy.cpp:
(WebKit::SecItemShimProxy::initializeConnection):
* UIProcess/mac/SecItemShimProxy.h:
* WebProcess/Plugins/PluginProcessConnectionManager.cpp:
(WebKit::PluginProcessConnectionManager::initializeConnection):
* WebProcess/Plugins/PluginProcessConnectionManager.h:
* WebProcess/WebPage/EventDispatcher.cpp:
(WebKit::EventDispatcher::EventDispatcher):
(WebKit::EventDispatcher::initializeConnection):
* WebProcess/WebPage/EventDispatcher.h:
* WebProcess/WebPage/ViewUpdateDispatcher.h:
2015-02-12 Anders Carlsson <andersca@apple.com>
Clean up the framework postprocessing phase
https://bugs.webkit.org/show_bug.cgi?id=141544
Reviewed by Dan Bernstein.
Rename WK_API_AVAILABILITY_ENABLED to WK_FRAMEWORK_HEADER_POSTPROCESSING_ENABLED to better match what
it is we're doing. Also, rename the associated script. Remove a couple of now unnecessary #defines, and
change everything we can to be feature-based instead of OS based.
* Configurations/WebKit.xcconfig:
* Shared/API/Cocoa/WKFoundation.h:
* WebKit2.xcodeproj/project.pbxproj:
* mac/postprocess-framework-headers.sh: Renamed from Source/WebKit2/mac/rewrite-availability-macros.sh.
2015-02-12 Tim Horton <timothy_horton@apple.com>
Crash removing RemoteLayerTreeDisplayRefreshMonitor from the drawing area's map
https://bugs.webkit.org/show_bug.cgi?id=141545
<rdar://problem/17712200>
Reviewed by Simon Fraser.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::windowScreenDidChange):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
windowScreenDidChange should take uint32_t, since that's what PlatformDisplayID is.
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
RemoteLayerTreeDisplayRefreshMonitor is driven by the page's
RemoteLayerTreeDrawingArea. Because of this, we cannot have the same
sharing of DisplayRefreshMonitors that other platforms use.
In order to ensure that we get a unique DisplayRefreshMonitor
per-DrawingArea, give each page a unique DisplayID derived
from WebPage's unique ID.
2015-02-12 Tim Horton <timothy_horton@apple.com>
Crash under RemoteLayerTreeDrawingArea::flushLayers() when closing a tab
https://bugs.webkit.org/show_bug.cgi?id=141541
Reviewed by Benjamin Poulain.
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::flushLayers):
The WebPage pointer can become stale between when it is retrieved
and dereferenced. Retrieve it by ID inside the dispatch_async block
instead of outside of it.
2015-02-12 Antti Koivisto <antti@apple.com>
WebKit persistent cache uses a lot of threads
https://bugs.webkit.org/show_bug.cgi?id=141520
Reviewed by Andreas Kling.
Parallel retrieves are limited but stores are not. We may end up with lots of backround io
dispatch queue threads if they don't complete fast enough.
This patch adds pending state for write operations similar to what retrieves already have
and limits to number of active operations.
* NetworkProcess/cache/NetworkCacheStorage.h:
Combine StoreOperation and UpdateOperation and rename to WriteOperation.
Rename RetrieveOperation to ReadOperation.
The idea is to emphasize that these are disk operations.
* NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
(WebKit::NetworkCacheStorage::dispatchReadOperation):
(WebKit::NetworkCacheStorage::dispatchPendingReadOperations):
(WebKit::retrieveFromMemory):
(WebKit::NetworkCacheStorage::retrieve):
(WebKit::NetworkCacheStorage::store):
(WebKit::NetworkCacheStorage::update):
(WebKit::NetworkCacheStorage::dispatchPendingWriteOperations):
Only allow 3 parallel writes.
(WebKit::NetworkCacheStorage::dispatchFullWriteOperation):
(WebKit::NetworkCacheStorage::dispatchHeaderWriteOperation):
More informative names.
(WebKit::NetworkCacheStorage::dispatchRetrieveOperation): Deleted.
(WebKit::NetworkCacheStorage::dispatchPendingRetrieveOperations): Deleted.
(WebKit::retrieveActive): Deleted.
2015-02-12 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add API to allow overriding the default color chooser implementation
https://bugs.webkit.org/show_bug.cgi?id=98935
Reviewed by Gustavo Noronha Silva.
Add API to allow the user to override the default UI of color
chooser. Similar to the file chooser API, a new run-color-chooser
signal is added to WebKitWebView that passes a WebKitColorChooserRequest
parameter to the signal.
Initial patch by Arnaud Renevier <a.renevier@sisa.samsung.com>.
* PlatformGTK.cmake: Add new files to compilation.
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::createColorPicker): Create a
WebKitColorChooser is the view widget is a WebKitWebView or a
WebColorPicker otherwise,
* UIProcess/API/gtk/WebKitColorChooser.cpp: Added.
(WebKit::WebKitColorChooser::create):
(WebKit::WebKitColorChooser::WebKitColorChooser):
(WebKit::WebKitColorChooser::~WebKitColorChooser):
(WebKit::WebKitColorChooser::endPicker): Chain up to parent class
when not having a request, or finish the request if we have one.
(WebKit::WebKitColorChooser::colorChooserRequestFinished):
(WebKit::WebKitColorChooser::colorChooserRequestRGBAChanged):
(WebKit::WebKitColorChooser::showColorPicker): Create a new
WebKitColorChooserRequest and emit WebKitWebView::run-color-chooser.
If the signal is not handled, fallback to the default color
chooser dialog implemented by the parent class.
* UIProcess/API/gtk/WebKitColorChooser.h: Added.
* UIProcess/API/gtk/WebKitColorChooserRequest.cpp: Added.
(webkitColorChooserRequestGetProperty):
(webkitColorChooserRequestSetProperty):
(webkit_color_chooser_request_class_init):
(webkit_color_chooser_request_set_rgba):
(webkit_color_chooser_request_get_rgba):
(webkit_color_chooser_request_get_element_rectangle):
(webkit_color_chooser_request_finish):
(webkit_color_chooser_request_cancel):
(webkitColorChooserRequestCreate):
* UIProcess/API/gtk/WebKitColorChooserRequest.h: Added.
* UIProcess/API/gtk/WebKitColorChooserRequestPrivate.h: Added.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkit_web_view_class_init): Add run-color-chooser signal.
(webkitWebViewEmitRunColorChooser): Emit run-color-chooser signal.
* UIProcess/API/gtk/WebKitWebView.h:
* UIProcess/API/gtk/WebKitWebViewPrivate.h:
* UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: Add new symbols.
* UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add new section for WebKitColorChooserRequest.
* UIProcess/API/gtk/webkit2.h: Include WebKitColorChooserRequest.h
2015-02-11 Enrica Casucci <enrica@apple.com>
iOS build fix.
Unreviewed.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView inputAssistantItem]):
(-[WKContentView _inputAssistantItem]):
2015-02-11 Chris Dumez <cdumez@apple.com>
[WK2] Add logging to validate the network cache efficacy (Part 2)
https://bugs.webkit.org/show_bug.cgi?id=141345
<rdar://problem/19632080>
Reviewed by Sam Weinig.
Add diagnostic logging messages to validate the network cache efficacy.
The following 4 messages are added:
- networkCache / retrieval / success
- networkCache / retrieval / unhandledRequestFailure
- networkCache / retrieval / noLongerInCacheFailure
- networkCache / retrieval / unusableCachedEntryFailure
The messages are sent via IPC from the NetworkProcess to the UIProcess,
where the WebPageProxy code already handles diagnostic messages sent by
the WebProcess.
2015-02-11 Tim Horton <timothy_horton@apple.com>
REGRESSION (iOS 8): PDFs embedded in <object>/<embed> tag don't load at all
https://bugs.webkit.org/show_bug.cgi?id=141457
<rdar://problem/18221851>
Reviewed by Alexey Proskuryakov.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::objectContentType):
On iOS, if we don't know what to do with a PDF-in-object, treat it as an image.
2015-02-11 ChangSeok Oh <changseok.oh@collabora.com>
Activate ReliefLogger of a memory pressure handler for linux system.
https://bugs.webkit.org/show_bug.cgi?id=123611
Reviewed by Anders Carlsson.
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
Make the parameter, shouldEnableMemoryPressureReliefLogging shareable with COCOA else systems.
(WebKit::WebProcessCreationParameters::encode): ditto.
(WebKit::WebProcessCreationParameters::decode): ditto.
* Shared/WebProcessCreationParameters.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::createNewWebProcess): Set shouldEnableMemoryPressureReliefLogging
to true for linux system.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess): Pass the shouldEnableMemoryPressureReliefLogging value
to MemoryPressureHandler::ReliefLogger::setLoggingEnabled().
2015-02-11 Yusuke Suzuki <utatane.tea@gmail.com>
[GTK][EFL] Suppress a warning of unused params
https://bugs.webkit.org/show_bug.cgi?id=141474
Reviewed by Darin Adler.
Drop unused argument name, `directoryName`.
* UIProcess/API/APIWebsiteDataStore.cpp:
(API::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation):
2015-02-11 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add default color chooser implementation using GtkColorChooserDialog
https://bugs.webkit.org/show_bug.cgi?id=141392
Reviewed by Gustavo Noronha Silva.
* PlatformGTK.cmake: Add new files to compilation.
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::createColorPicker): Call WebColorPickerGtk::create().
* UIProcess/gtk/WebColorPickerGtk.cpp: Added.
(WebKit::WebColorPickerGtk::create):
(WebKit::WebColorPickerGtk::WebColorPickerGtk):
(WebKit::WebColorPickerGtk::~WebColorPickerGtk):
(WebKit::WebColorPickerGtk::cancel): Set initial color.
(WebKit::WebColorPickerGtk::endPicker): Destroy the color chooser dialog.
(WebKit::WebColorPickerGtk::didChooseColor): Notify the client.
(WebKit::WebColorPickerGtk::colorChooserDialogRGBAChangedCallback):
Update the selected color.
(WebKit::WebColorPickerGtk::colorChooserDialogResponseCallback):
Cancel or finish the operation depending on the dialog response.
(WebKit::WebColorPickerGtk::showColorPicker): Create a
GtkColorChooserDialog to handle the color picker operation.
* UIProcess/gtk/WebColorPickerGtk.h: Added.
(WebKit::WebColorPickerGtk::initialColor):
2015-02-11 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r179910.
https://bugs.webkit.org/show_bug.cgi?id=141464
Caused assertions on debug bots (Requested by ap on #webkit).
Reverted changeset:
"[WK2] Add logging to validate the network cache efficacy
(Part 2)"
https://bugs.webkit.org/show_bug.cgi?id=141345
http://trac.webkit.org/changeset/179910
2015-02-10 Chris Dumez <cdumez@apple.com>
[WK2] Add logging to validate the network cache efficacy (Part 2)
https://bugs.webkit.org/show_bug.cgi?id=141345
<rdar://problem/19632080>
Reviewed by Antti Koivisto.
Add diagnostic logging messages to validate the network cache efficacy.
The following 4 messages are added:
- networkCache / retrieval / success
- networkCache / retrieval / unhandledRequestFailure
- networkCache / retrieval / noLongerInCacheFailure
- networkCache / retrieval / unusableCachedEntryFailure
The messages are sent via IPC from the NetworkProcess to the UIProcess,
where the WebPageProxy code already handles diagnostic messages sent by
the WebProcess.
2015-02-10 Conrad Shultz <conrad_shultz@apple.com>
Clients need the ability to hook into immediate action lifecycle
https://bugs.webkit.org/show_bug.cgi?id=141449
Reviewed by Tim Horton.
* UIProcess/API/Cocoa/WKViewPrivate.h:
Expose new methods.
* UIProcess/API/mac/WKView.mm:
(-[WKView _prepareForImmediateActionAnimation]):
(-[WKView _cancelImmediateActionAnimation]):
(-[WKView _completeImmediateActionAnimation]):
Stub implementations.
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController immediateActionRecognizerWillPrepare:]):
Send -_prepareForImmediateActionAnimation.
(-[WKImmediateActionController immediateActionRecognizerDidCancelAnimation:]):
Send -_cancelImmediateActionAnimation.
(-[WKImmediateActionController immediateActionRecognizerDidCompleteAnimation:]):
Send -_completeImmediateActionAnimation.
2015-02-10 Dan Bernstein <mitz@apple.com>
<rdar://problem/19770264> Starting a navigation gesture dismisses the keyboard
Reviewed by Tim Horton.
* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::beginSwipeGesture): Reordered the view hierarchy changes,
such that m_liveSwipeView will not momentarily move out of the window, because that causes
the windows first responder to be set to nil (if it was a descendant of m_liveSwipView).
2015-02-10 Enrica Casucci <enrica@apple.com>
Hit testing is misplaced when selecting on wikipedia page.
https://bugs.webkit.org/show_bug.cgi?id=141410
rdar://problem/19768211
Reviewed by Simon Fraser.
When loading a new document into the same WebPage object, we need
to clear the assisted node, since there is no guarantee that the
node will be blurred. The bug was caused by the use of a stale
assisted node to constrain the point where the gesture occurs.
The node was still valid, since the previous page was in the cache.
I've added a ASSERT to check that, when constraining the point to
node rectangle, the node is in the same document as the one we
are performing hit test on. When the frame is detached, we clear
the assisted node if the node is part of the document is the frame
being detached.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::detachedFromParent2):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::constrainPoint):
(WebKit::WebPage::resetAssistedNodeForFrame):
2015-02-10 Joseph Pecoraro <pecoraro@apple.com>
[Cocoa] NSData over retain in WKBrowsingContextController loadData
https://bugs.webkit.org/show_bug.cgi?id=141437
Reviewed by Anders Carlsson.
* UIProcess/API/Cocoa/WKBrowsingContextController.mm:
(-[WKBrowsingContextController loadData:MIMEType:textEncodingName:baseURL:userData:]):
API::Data::createWithoutCopying will automatically do the retaining / releasing for us.
2015-02-10 Zhuo Li <zachli@apple.com>
[WK2] Add support for registering url schemes to bypass Content Security Policy.
https://bugs.webkit.org/show_bug.cgi?id=140736
Reviewed by Anders Carlsson.
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/API/C/WKContext.cpp:
(WKContextRegisterURLSchemeAsBypassingContentSecurityPolicy):
* UIProcess/API/C/WKContextPrivate.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::createNewWebProcess):
(WebKit::WebProcessPool::registerURLSchemeAsBypassingContentSecurityPolicy):
* UIProcess/WebProcessPool.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):
(WebKit::WebProcess::registerURLSchemeAsBypassingContentSecurityPolicy):
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:
2015-02-10 Sanghyup Lee <sh53.lee@samsung.com>
[EFL] Use a variable to set flicking time instead of hardcoding
https://bugs.webkit.org/show_bug.cgi?id=138950
Reviewed by Gyuyoung Kim.
Currently time of flick gesture animation is hardcoded as one second.
This patch added a static variable to increase readability.
* UIProcess/API/efl/GestureRecognizer.cpp:
(WebKit::GestureHandler::GestureHandler):
(WebKit::GestureHandler::flickAnimatorCallback):
(WebKit::GestureHandler::handleFlick):
2015-02-09 Enrica Casucci <enrica@apple.com>
Selection flickers when trying to change size of selection.
https://bugs.webkit.org/show_bug.cgi?id=141404
rdar://problem/18824863
Reviewed by Benjamin Poulain.
When looking for the contracted range from the current range,
we were incorrectly choosing a selection whose rectangle is empty
as a best match candidate. This was throwing off all the logic
and producing a contracted range whose rectangle was bigger than the
expanded range, therefore producing a shrink threshold larger than the
growth one.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::contractedRangeFromHandle):
2015-02-09 Brian J. Burg <burg@cs.washington.edu>
REGRESSION(r179705): 2nd-level inspector availability no longer controlled by DeveloperExtrasEnabled user default
https://bugs.webkit.org/show_bug.cgi?id=141343
Reviewed by Timothy Hatcher.
The regression was caused by the switch to using WKWebViewConfiguration and
its default WebPreferences object, which is used to populate the inspector page's
Settings object. This WebPreferences is initialized with no identifier, so
only preferences in the FOR_EACH_WEBKIT_DEBUG_*_PREFERENCE macros are populated
from NSUserDefaults.
The simplest fix is to move DeveloperExtrasEnabled into the DEBUG group.
Previously, each inspector level had a unique identifier such as
__WebInspectorPageGroupLevelN__, and the n+1 level inspector was enabled
by toggling __WebInspectorPageGroupLevelN__.WebKit2DeveloperExrasEnabled.
With the move to the DEBUG group, the preference becomes simply
WebKitDeveloperExtrasEnabled, which enables any level of inspector.
(This does not clash with Safari's "Show Develop Menu" preference, which uses
the key "WebKitDeveloperExtrasEnabledPreferenceKey")
* Shared/WebPreferencesDefinitions.h:
2015-02-08 Antti Koivisto <antti@apple.com>
Measure cache size more accurately
https://bugs.webkit.org/show_bug.cgi?id=141378
<rdar://problem/19760224>
Reviewed by Chris Dumez.
Estimate the cache disk space usage from the actual entry sizes instead of the item count.
This prevents large cache items from making the cache grow beyond its bounds.
* NetworkProcess/cache/NetworkCacheStorage.h:
* NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
(WebKit::NetworkCacheStorage::initialize):
(WebKit::NetworkCacheStorage::removeEntry):
(WebKit::NetworkCacheStorage::store):
(WebKit::NetworkCacheStorage::clear):
(WebKit::NetworkCacheStorage::shrinkIfNeeded):
2015-02-09 Carlos Garcia Campos <cgarcia@igalia.com>
REGRESSION(r179705): [GTK] The Web Inspector doesn't work after r179705
https://bugs.webkit.org/show_bug.cgi?id=141333
Reviewed by Žan Doberšek.
Create an initialize WebPreferences for the inspector page. This
was moved from cross-platform code to platform specific code.
* UIProcess/gtk/WebInspectorProxyGtk.cpp:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
2015-02-08 Timothy Horton <timothy_horton@apple.com>
Null deref in _clearImmediateActionState when closing a view with a DataDetectors popover open
https://bugs.webkit.org/show_bug.cgi?id=141377
<rdar://problem/19711203>
Reviewed by Darin Adler.
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController _clearImmediateActionState]):
We can have already detached the page when DataDetectors calls us back
in interactionStoppedHandler. While we have kept a strong reference to the
page in the interactionStoppedHandler block, _page is nulled out.
It's OK to avoid doing this work, in any case, because closing a page
tears down the TextIndicator anyway.
2015-02-08 Chris Dumez <cdumez@apple.com>
[WK2] Add logging to validate the network cache efficacy (Part 1)
https://bugs.webkit.org/show_bug.cgi?id=141269
<rdar://problem/19632080>
Reviewed by Antti Koivisto.
Add console logging to validate the network cache efficacy. This will
tell us if how the network cache satisties requests, in particular:
- Request cannot be handled by the cache
- Entry was not in the cache but is no longer there (pruned)
- Entry is in the cache but is not usable
- Entry is in the cache and is used.
This patch introduces a SQLite-based network cache statistics storage
that is used to store requests we have seen before, and query if we
have seen a request before. The storage is lightweight as it only
stores hashes in the database, in a background thread.
The statistics cache is initially bootstapped from the network disk
cache so that we have data initially and get as accurate statistics
as possible from the start.
To maintain an acceptable level of performance, we have a hard limit
on the number of unique requests that are retained set to 100000.
Diagnostic logging for this will be added in a follow-up patch.
2015-02-07 Chris Dumez <cdumez@apple.com>
Add Vector::removeFirstMatching() / removeAllMatching() methods taking lambda functions
https://bugs.webkit.org/show_bug.cgi?id=141321
Reviewed by Darin Adler.
Use new Vector::removeFirstMatching() / removeAllMatching() methods.
2015-02-07 Tim Horton <timothy_horton@apple.com>
Add API::HistoryClient and split some things out of API::NavigationClient
https://bugs.webkit.org/show_bug.cgi?id=141264
Reviewed by Darin Adler.
* UIProcess/API/APIHistoryClient.h: Added.
(API::HistoryClient::~HistoryClient):
(API::HistoryClient::didNavigateWithNavigationData):
(API::HistoryClient::didPerformClientRedirect):
(API::HistoryClient::didPerformServerRedirect):
(API::HistoryClient::didUpdateHistoryTitle):
* UIProcess/API/APINavigationClient.h:
(API::NavigationClient::didNavigateWithNavigationData): Deleted.
(API::NavigationClient::didPerformClientRedirect): Deleted.
(API::NavigationClient::didPerformServerRedirect): Deleted.
(API::NavigationClient::didUpdateHistoryTitle): Deleted.
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::createHistoryClient):
(WebKit::NavigationState::HistoryClient::HistoryClient):
(WebKit::NavigationState::HistoryClient::~HistoryClient):
(WebKit::NavigationState::HistoryClient::didNavigateWithNavigationData):
(WebKit::NavigationState::HistoryClient::didPerformClientRedirect):
(WebKit::NavigationState::HistoryClient::didPerformServerRedirect):
(WebKit::NavigationState::HistoryClient::didUpdateHistoryTitle):
(WebKit::NavigationState::NavigationClient::didNavigateWithNavigationData): Deleted.
(WebKit::NavigationState::NavigationClient::didPerformClientRedirect): Deleted.
(WebKit::NavigationState::NavigationClient::didPerformServerRedirect): Deleted.
(WebKit::NavigationState::NavigationClient::didUpdateHistoryTitle): Deleted.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setHistoryClient):
(WebKit::WebPageProxy::didNavigateWithNavigationData):
(WebKit::WebPageProxy::didPerformClientRedirect):
(WebKit::WebPageProxy::didPerformServerRedirect):
(WebKit::WebPageProxy::didUpdateHistoryTitle):
* UIProcess/WebPageProxy.h:
Add a API::HistoryClient and move the few things that belong on it out of API::NavigationClient.
Adjust accordingly in WebPageProxy and NavigationState.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
(-[WKWebView setNavigationDelegate:]):
(-[WKWebView setUIDelegate:]):
(-[WKWebView _setHistoryDelegate:]):
Lazily push the NavigationState/UIDelegate clients down to WebPageProxy upon
installation of a delegate, so that alternative (C SPI) delegate setters can
be separately created.
* WebKit2.xcodeproj/project.pbxproj:
2015-02-07 Antti Koivisto <antti@apple.com>
And as a further followup restore the 8bit test too.
* NetworkProcess/cache/NetworkCacheKey.cpp:
(WebKit::hashString):
2015-02-07 Antti Koivisto <antti@apple.com>
Use longer hashes for cache keys
https://bugs.webkit.org/show_bug.cgi?id=141356
Rubber-stamped by Darin Adler.
Folloup and build fix.
* NetworkProcess/cache/NetworkCacheCoders.h:
* NetworkProcess/cache/NetworkCacheKey.cpp:
(WebKit::hashString):
Use containsOnlyASCII instead of is8Bit so both paths always compute the same hash.
* NetworkProcess/cache/NetworkCacheKey.h:
2015-02-07 Antti Koivisto <antti@apple.com>
Remove a printf.
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::retrieve):
2015-02-07 Antti Koivisto <antti@apple.com>
Use longer hashes for cache keys
https://bugs.webkit.org/show_bug.cgi?id=141356
Reviewed by Darin Adler.
The current key hashes are 32bit. We should use longer hashes to eliminate collisions.
This patch switches us to using MD5 digests for the cache key hashes. As a result the file names for the cache
entries grow from 8 to 32 character.
Note that we don't need a cryptographic hash (full cache keys are verified against the entries).
MD5 just happens to be fast, convenient and available.
The patch also moves the whole cache hierarchy down to a versioned subdirectory ("WebKitCache/Version 2")
and deletes any old style cache files if they exist.
* NetworkProcess/cache/NetworkCacheCoders.cpp:
(WebKit::NetworkCacheCoder<MD5::Digest>::encode):
(WebKit::NetworkCacheCoder<MD5::Digest>::decode):
* NetworkProcess/cache/NetworkCacheCoders.h:
* NetworkProcess/cache/NetworkCacheKey.cpp:
(WebKit::NetworkCacheKey::NetworkCacheKey):
(WebKit::hashString):
(WebKit::NetworkCacheKey::computeHash):
(WebKit::NetworkCacheKey::hashAsString):
(WebKit::NetworkCacheKey::stringToHash):
* NetworkProcess/cache/NetworkCacheKey.h:
(WebKit::NetworkCacheKey::shortHash):
(WebKit::NetworkCacheKey::toShortHash):
32bit hash to use in the bloom filter.
(WebKit::NetworkCacheKey::hashStringLength):
* NetworkProcess/cache/NetworkCacheStorage.h:
Bump the version.
* NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
(WebKit::traverseCacheFiles):
(WebKit::makeVersionedDirectoryPath):
(WebKit::NetworkCacheStorage::NetworkCacheStorage):
(WebKit::NetworkCacheStorage::initialize):
(WebKit::NetworkCacheStorage::removeEntry):
(WebKit::NetworkCacheStorage::retrieve):
(WebKit::NetworkCacheStorage::store):
(WebKit::NetworkCacheStorage::update):
(WebKit::NetworkCacheStorage::shrinkIfNeeded):
(WebKit::NetworkCacheStorage::deleteOldVersions):
Wipe out the version 1 cache.
2015-02-06 Chris Dumez <cdumez@apple.com>
Have SQLiteStatement::database() return a reference
https://bugs.webkit.org/show_bug.cgi?id=141348
Reviewed by Andreas Kling.
Have SQLiteStatement::database() return a reference as it can never
return null.
* DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
(WebKit::SQLiteIDBCursor::internalAdvanceOnce):
2015-02-06 Alexey Proskuryakov <ap@apple.com>
Report network process crashes during layout tests
https://bugs.webkit.org/show_bug.cgi?id=139646
Reviewed by Anders Carlsson.
Added a way to get network process pid, modeled after how we do this for web process.
* UIProcess/API/C/mac/WKContextPrivateMac.h:
* UIProcess/API/C/mac/WKContextPrivateMac.mm:
(WKContextGetNetworkProcessIdentifier):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::networkProcessCrashed): Don't reset m_networkProcess until
after calling the client, so that the client could retrieve its pid.
(WebKit::WebProcessPool::networkProcessIdentifier):
* UIProcess/WebProcessPool.h:
2015-02-05 Timothy Hatcher <timothy@apple.com>
Support overriding the deviceScaleFactor per WKWebView/WKView
https://bugs.webkit.org/show_bug.cgi?id=141311
Reviewed by Tim Horton.
* UIProcess/API/Cocoa/WKViewPrivate.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _setOverrideDeviceScaleFactor:]):
(-[WKWebView _overrideDeviceScaleFactor]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView _intrinsicDeviceScaleFactor]):
(-[WKView _setOverrideDeviceScaleFactor:]):
(-[WKView _overrideDeviceScaleFactor]):
2015-02-06 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Remove WebKitWebView::close-notification signal
https://bugs.webkit.org/show_bug.cgi?id=141330
Reviewed by Gustavo Noronha Silva.
In favor of a WebKitNotification::closed signal and
webkit_notification_close() method that both applications and
WebKit can use to close a notification. This also fixes the
onclose event that was not fired when the notification was
closed. It also brings back padding space in WebKitWebViewClass.
* UIProcess/API/gtk/WebKitNotification.cpp:
(webkit_notification_class_init): Add WebKitNotification::closed signal.
(webkit_notification_close): Emit WebKitNotification::closed.
* UIProcess/API/gtk/WebKitNotification.h:
* UIProcess/API/gtk/WebKitNotificationProvider.cpp:
(WebKitNotificationProvider::notificationCloseCallback): Callback
for WebKitNotification::closed signal that notifies the WebProcess
and removes the notification from the map.
(WebKitNotificationProvider::show): Connect to WebKitNotification::closed.
(WebKitNotificationProvider::cancelNotificationByID): Call webkit_notification_close().
* UIProcess/API/gtk/WebKitNotificationProvider.h:
* UIProcess/API/gtk/WebKitWebView.cpp:
(notifyNotificationClosed): The user closed the annotation, call
webkit_notification_close().
(webNotificationClosed): The WebKitNotification has been closed,
close the libnotify notification if it hasn't been closed yet.
(webkitWebViewShowNotification): Create the libnotifiy
notification if needed and associate it to the WebKitNotification
as user data. Connect to the closed signal of both, the libnotifiy
notification and the WebKit notification.
(webkitWebViewCloseNotification): Deleted.
(webkit_web_view_class_init): Remove close-notification signal and
the default hanlder.
(webkitWebViewEmitCloseNotification): Deleted.
* UIProcess/API/gtk/WebKitWebView.h:
* UIProcess/API/gtk/WebKitWebViewPrivate.h:
* UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: Add webkit_notification_close.
2015-02-06 Carlos Garcia Campos <cgarcia@igalia.com>
ASSERTION FAILED: !m_adoptionIsRequired in WTF::RefCountedBase::ref
https://bugs.webkit.org/show_bug.cgi?id=141035
Reviewed by Sergio Villar Senin.
Rename PrinterListGtk::singleton() as PrinterListGtk::getOrCreate(), and
make it return nullptr when the shared PrinterListGtk object is
still being created. This can happen if the nested loop used by
gtk_enumerate_printers dispatches a GSource that starts a new
synchronous print operation. In that case we just ignore the
second print operation, since there's already one ongoing.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::print): Return early if
PrinterListGtk::getOrCreate() return nullptr.
* WebProcess/WebPage/gtk/PrinterListGtk.cpp:
(WebKit::PrinterListGtk::getOrCreate): Return nullptr if the
PrinterListGtk is still enumerating the printers.
(WebKit::PrinterListGtk::PrinterListGtk): Initialize
m_enumeratingPrinters to true before calling
gtk_enumerate_printers, and to false once it finishes.
(WebKit::PrinterListGtk::singleton): Deleted.
(WebKit::PrinterListGtk::enumeratePrintersFunction): Deleted.
* WebProcess/WebPage/gtk/PrinterListGtk.h:
* WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp: Add an
assertion here since PrinterListGtk::getOrCreate() should never
return nullptr at this point.
2015-02-05 Tim Horton <timothy_horton@apple.com>
Null deref in ViewGestureController::beginSwipeGesture when swiping while script is navigating
https://bugs.webkit.org/show_bug.cgi?id=141308
<rdar://problem/18460046>
Reviewed by Simon Fraser.
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::trackSwipeGesture):
If script navigates (history.back, probably other cases too) while in the middle of
building up enough scroll events to start a swipe, it can destroy the history item
that we were planning to swipe to. If this happens, bail from the swipe.
2015-02-05 Alexey Proskuryakov <ap@apple.com>
Don't pass architecture to development plug-in XPC services
https://bugs.webkit.org/show_bug.cgi?id=141309
Reviewed by Anders Carlsson.
We now have separate services for 32-bit and 64-bit.
* Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
(WebKit::reexec):
(WebKit::XPCServiceEventHandler):
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::connectToReExecService):
2015-02-05 Chris Dumez <cdumez@apple.com>
Use deleteEmptyDirectory() in NetworkCacheStorage::clear()
https://bugs.webkit.org/show_bug.cgi?id=141314
Reviewed by Antti Koivisto.
Use deleteEmptyDirectory() in NetworkCacheStorage::clear() to simplify
the code a little bit.
* NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
(WebKit::NetworkCacheStorage::clear):
2015-02-05 Joseph Pecoraro <pecoraro@apple.com>
[iOS] Remove False Positive dispatch_source Leak in WebMemoryPressureHandler singleton
https://bugs.webkit.org/show_bug.cgi?id=141307
Reviewed by Anders Carlsson.
* UIProcess/ios/WebMemoryPressureHandlerIOS.h:
* UIProcess/ios/WebMemoryPressureHandlerIOS.mm:
(WebKit::WebMemoryPressureHandler::WebMemoryPressureHandler):
We want to keep the dispatch_source around, so just tie it to the
singleton so that it is not reported as a leak.
2015-02-05 Antti Koivisto <antti@apple.com>
Switch to file backed buffer when resource is cached to disk
https://bugs.webkit.org/show_bug.cgi?id=141295
Reviewed by Chris Dumez.
Wire the DidCacheResource mechanism to the new disk cache.
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::didFinishLoading):
Send DidCacheResource message to the web process so it can switch the resource to file backing.
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::store):
(WebKit::NetworkCache::update):
* NetworkProcess/cache/NetworkCache.h:
* NetworkProcess/cache/NetworkCacheStorage.h:
(WebKit::DispatchPtr::DispatchPtr):
* NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
(WebKit::NetworkCacheStorage::Data::Data):
(WebKit::mapFile):
(WebKit::decodeEntry):
(WebKit::retrieveActive):
(WebKit::NetworkCacheStorage::retrieve):
(WebKit::NetworkCacheStorage::store):
Map files larger than a memory page after a successful store.
(WebKit::NetworkCacheStorage::update):
(WebKit::encodeEntry): Deleted.
2015-02-05 Chris Dumez <cdumez@apple.com>
[WK2] Properly check for mmap() error case
https://bugs.webkit.org/show_bug.cgi?id=141304
Reviewed by Anders Carlsson.
mmap() returns MAP_FAILED, which is (void*)-1, not a null pointer in
case of failure. This patch updates several wrong error checks in
WebKit2.
* Platform/IPC/ArgumentEncoder.cpp:
(IPC::allocBuffer):
(IPC::ArgumentEncoder::reserve):
* Platform/IPC/mac/ConnectionMac.mm:
(IPC::Connection::sendOutgoingMessage):
2015-02-05 Brian J. Burg <burg@cs.washington.edu>
Clean up WebInspectorProxy and use simpler inspector levels design
https://bugs.webkit.org/show_bug.cgi?id=141135
Reviewed by Timothy Hatcher.
Inspector levels used to be managed by keeping a set of WebPageGroup
instances and doing pointer comparisons to check whether the inspected
view is itself a web inspector instance. This is unnecessary, as we
can maintain a mapping from WebPageProxy* to its corresponding level.
When an inspector instance is created, it is inserted into the mapping
along with its level. An inspector's level is 1 unless its inspected page
is in the mapping, then it is one greater that the inspected page's level.
The level is provided by inspectorLevel(), rather than a member variable.
WebInspectorProxy is created in the constructor of WebPageProxy. Thus, there
would be no chance to add the inspector page's level to the mapping before the
next level inspector tries to look it up when initializing its members.
This patch introduces other miscellaneous cleanups, such as naming m_page
to m_inspectedPage, using Ref and using an enum class for the attachment side.
* UIProcess/API/C/WKInspector.cpp:
(WKInspectorGetPage):
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(resizeWebKitWebViewBaseFromAllocation):
* UIProcess/InspectorServer/efl/WebInspectorServerEfl.cpp:
* UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp:
* UIProcess/WebInspectorProxy.cpp:
(WebKit::pageLevelMap):
(WebKit::WebInspectorProxy::WebInspectorProxy):
(WebKit::WebInspectorProxy::inspectorLevel):
(WebKit::WebInspectorProxy::inspectorPageGroupIdentifier):
(WebKit::WebInspectorProxy::inspectorPagePreferences):
(WebKit::WebInspectorProxy::invalidate):
(WebKit::WebInspectorProxy::isFront):
(WebKit::WebInspectorProxy::connect):
(WebKit::WebInspectorProxy::show):
(WebKit::WebInspectorProxy::hide):
(WebKit::WebInspectorProxy::close):
(WebKit::WebInspectorProxy::didRelaunchInspectorPageProcess):
(WebKit::WebInspectorProxy::showConsole):
(WebKit::WebInspectorProxy::showResources):
(WebKit::WebInspectorProxy::showMainResourceForFrame):
(WebKit::WebInspectorProxy::attachBottom):
(WebKit::WebInspectorProxy::attachRight):
(WebKit::WebInspectorProxy::attach):
(WebKit::WebInspectorProxy::detach):
(WebKit::WebInspectorProxy::togglePageProfiling):
(WebKit::WebInspectorProxy::isInspectorPage):
(WebKit::decidePolicyForNavigationAction):
(WebKit::WebInspectorProxy::remoteFrontendConnected):
(WebKit::WebInspectorProxy::remoteFrontendDisconnected):
(WebKit::WebInspectorProxy::dispatchMessageFromRemoteFrontend):
(WebKit::WebInspectorProxy::eagerlyCreateInspectorPage):
(WebKit::WebInspectorProxy::createInspectorPage):
(WebKit::WebInspectorProxy::didClose):
(WebKit::WebInspectorPageGroups::singleton): Deleted.
(WebKit::WebInspectorPageGroups::inspectorLevel): Deleted.
(WebKit::WebInspectorPageGroups::isInspectorPageGroup): Deleted.
(WebKit::WebInspectorPageGroups::inspectorPageGroupLevel): Deleted.
(WebKit::WebInspectorPageGroups::inspectorPageGroupForLevel): Deleted.
(WebKit::WebInspectorPageGroups::createInspectorPageGroup): Deleted.
(WebKit::WebInspectorProxy::~WebInspectorProxy): Deleted.
(WebKit::WebInspectorProxy::inspectorPageGroup): Deleted.
(WebKit::WebInspectorProxy::setAttachedWindowHeight): Deleted.
(WebKit::WebInspectorProxy::enableRemoteInspection): Deleted.
(WebKit::WebInspectorProxy::open): Deleted.
* UIProcess/WebInspectorProxy.h:
(WebKit::WebInspectorProxy::create):
(WebKit::WebInspectorProxy::inspectedPage):
(WebKit::WebInspectorProxy::page): Deleted.
* UIProcess/efl/WebInspectorProxyEfl.cpp:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
* UIProcess/gtk/WebInspectorProxyGtk.cpp:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
(WebKit::WebInspectorProxy::dockButtonClicked):
(WebKit::WebInspectorProxy::createInspectorWindow):
(WebKit::WebInspectorProxy::platformInspectedWindowHeight):
(WebKit::WebInspectorProxy::platformInspectedWindowWidth):
(WebKit::WebInspectorProxy::platformAttach):
(WebKit::WebInspectorProxy::platformDetach):
(WebKit::WebInspectorProxy::platformSetAttachedWindowHeight):
(WebKit::WebInspectorProxy::platformSetAttachedWindowWidth):
* UIProcess/mac/WebInspectorProxyMac.mm:
(-[WKWebInspectorProxyObjCAdapter attachRight:]):
(-[WKWebInspectorProxyObjCAdapter attachBottom:]):
(WebKit::WebInspectorProxy::createInspectorWindow):
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
(WebKit::WebInspectorProxy::platformBringToFront):
(WebKit::WebInspectorProxy::windowFrameDidChange):
(WebKit::WebInspectorProxy::inspectedViewFrameDidChange):
(WebKit::WebInspectorProxy::platformInspectedWindowHeight):
(WebKit::WebInspectorProxy::platformInspectedWindowWidth):
(WebKit::WebInspectorProxy::platformAttach):
(WebKit::WebInspectorProxy::platformDetach):
(-[WKWebInspectorProxyObjCAdapter close]): Deleted.
2015-02-05 Chris Dumez <cdumez@apple.com>
[WK2][Cocoa] Populate m_contentsFilter bloom filter from the main dispatch queue NetworkCacheStorage::initialize()
https://bugs.webkit.org/show_bug.cgi?id=141297
Reviewed by Antti Koivisto.
Populate m_contentsFilter bloom filter from the main dispatch queue
NetworkCacheStorage::initialize() to avoid thread-safety issues.
* NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
(WebKit::NetworkCacheStorage::initialize):
2015-02-05 Chris Dumez <cdumez@apple.com>
Use deleteFile() in NetworkCacheStorageCocoa.mm
https://bugs.webkit.org/show_bug.cgi?id=141299
Reviewed by Antti Koivisto.
Use deleteFile() in NetworkCacheStorageCocoa.mm to simplify the code
a bit.
* NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
(WebKit::NetworkCacheStorage::removeEntry):
(WebKit::NetworkCacheStorage::clear):
(WebKit::NetworkCacheStorage::shrinkIfNeeded):
2015-02-04 Antti Koivisto <antti@apple.com>
Avoid copying std::functions across threads in NetworkCacheStorage
https://bugs.webkit.org/show_bug.cgi?id=141273
Reviewed by Andreas Kling.
The current approach is risky. There is possiblity that captured variables are
deleted in an unexpected thread.
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::retrieve):
The capture trick here is no longer needed.
* NetworkProcess/cache/NetworkCacheStorage.h:
For each cache operation we create Retrive/Store/UpdateOperation object kept alive by the active operation map.
This object captures all parameters of the operation including the lambda. When the operation completes
the object is removed from the map in the main thread, ensuring safe destruction.
* NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
(WebKit::NetworkCacheStorage::dispatchRetrieveOperation):
(WebKit::NetworkCacheStorage::dispatchPendingRetrieveOperations):
(WebKit::retrieveActive):
Instead of maintaining a separate write cache we just look through the active write and update maps.
(WebKit::NetworkCacheStorage::retrieve):
Use fixed sized priority array rather than a dynamic one. Vector<Deque<std::unique_ptr>> doesn't quite work.
(WebKit::NetworkCacheStorage::store):
(WebKit::NetworkCacheStorage::update):
(WebKit::NetworkCacheStorage::clear):
2015-02-05 Youenn Fablet <youenn.fablet@crf.canon.fr> and Xabier Rodriguez Calvar <calvaris@igalia.com>
[Streams API] Implement a barebone ReadableStream interface
https://bugs.webkit.org/show_bug.cgi?id=141045
Reviewed by Benjamin Poulain.
* CMakeLists.txt:
* Configurations/FeatureDefines.xcconfig:
2015-02-04 Joseph Pecoraro <pecoraro@apple.com>
[iOS] Selection callout does not follow selection when double-tap scrolling
https://bugs.webkit.org/show_bug.cgi?id=141214
Reviewed by Benjamin Poulain.
Implement the delegate that gets called after UIScrollView
setContentOffset animations. When scrolling to a rect, do the normal
willScroll, didScroll actions to update the selection assistant.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _scrollToRect:origin:minimumScrollDistance:]):
(-[WKWebView scrollViewDidEndScrollingAnimation:]):
2015-02-04 Simon Fraser <simon.fraser@apple.com>
[iOS WK2] Layers that are created and destroyed in the same transaction shouldn't be encoded
https://bugs.webkit.org/show_bug.cgi?id=141228
Reviewed by Tim Horton.
With UI-side compositing, it was possible for layers to get created and
destroyed in the same transaction (e.g. two layouts before a single layer
tree commit). When that happened we would encode layer creation properties
but not encode layer properties, since the layer would be unreachable.
Fix by removing deleted layers from the created layers list, which is
converted into a map for easy searching.
* WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
* WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
(WebKit::RemoteLayerTreeContext::layerWasCreated):
(WebKit::RemoteLayerTreeContext::layerWillBeDestroyed):
(WebKit::RemoteLayerTreeContext::buildTransaction):
2015-02-04 Michael Catanzaro <mcatanzaro@igalia.com>
Build with seccomp filters broken since r179409
https://bugs.webkit.org/show_bug.cgi?id=141206
Reviewed by Darin Adler.
Fix build by renaming SeccompBrokerClient::shared to SeccompBrokerClient::singleton.
* Shared/linux/SeccompFilters/SeccompBroker.cpp:
(WebKit::SeccompBrokerClient::singleton):
(WebKit::SeccompBroker::initialize):
(WebKit::SeccompBrokerClient::shared):
(WebKit::SeccompBroker::runLoop):
2015-02-04 Simon Fraser <simon.fraser@apple.com>
[iOS WK2] Assert in ScrollingTreeOverflowScrollingNodeIOS::updateAfterChildren() on tab switching
https://bugs.webkit.org/show_bug.cgi?id=141223
rdar://problem/18458993
Reviewed by Tim Horton.
It's possible to submit a RemoteLayerTree transaction that contains data
about a created layer, but doesn't have any properties for that layer. This
happens when the newly created layer isn't reached during the traversal that
gathers layer properties (i.e. it's not rooted). However, whether we create
a scrolling layer or not requires having properties; they are missing, so we
create a normal layer, but then the scrolling tree commit asserts that we
should have a scrolling layer.
Fix by making scrolling layers have a corresponding layer type, which is
stored in layer creation properties. This required exposing layer types
up through GraphicsLayer, but that allows for some nice cleanup:
1. No need to have the hokey shouldUseTiledBacking() GraphicsLayerClient hack
for creating the page tiled layer.
2. The notion of "custom behaviors" can be removed from GraphicsLayer entirely.
* Shared/mac/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::drawInContext):
* Shared/mac/RemoteLayerTreeTransaction.h:
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
(WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
(WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
(WebKit::dumpChangedLayers):
(WebKit::RemoteLayerTreeTransaction::description):
* UIProcess/ios/RemoteLayerTreeHostIOS.mm:
(WebKit::RemoteLayerTreeHost::createLayer):
* UIProcess/mac/RemoteLayerTreeHost.mm:
(WebKit::RemoteLayerTreeHost::createLayer):
* WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::customBehavior): Deleted.
(WebKit::PlatformCALayerRemote::updateCustomBehavior): Deleted.
* WebProcess/WebPage/mac/PlatformCALayerRemote.h:
* WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
* WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
(WebKit::RemoteLayerTreeContext::createGraphicsLayer):
2015-02-04 Gyuyoung Kim <gyuyoung.kim@samsung.com>
[EFL][WK2] Manage failing API tests
https://bugs.webkit.org/show_bug.cgi?id=141250
Reviewed by Csaba Osztrogonác.
* PlatformEfl.cmake: Skip to test test_ewk2_storage_manager.
* UIProcess/API/efl/tests/test_ewk2_view.cpp: Disable 2 unit test functions.
(TEST_F):
2015-02-04 Chris Dumez <cdumez@apple.com>
Add removeFirst(value) / removeAll(value) methods to WTF::Vector
https://bugs.webkit.org/show_bug.cgi?id=141192
Reviewed by Benjamin Poulain.
Use new Vector::removeFirst(value) / removeAll(value) API to simplify the
code a bit.
* UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.cpp:
(WebKit::WebSoupCustomProtocolRequestManager::unregisterSchemeForCustomProtocol):
* UIProcess/PageLoadState.cpp:
(WebKit::PageLoadState::removeObserver):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::~WebProcessPool):
(WebKit::WebProcessPool::disconnectProcess):
* WebProcess/InjectedBundle/API/efl/ewk_extension.cpp:
(EwkExtension::remove):
2015-02-03 Chris Dumez <cdumez@apple.com>
Unreviewed attempt to fix GTK/EFL build after r179588.
Add new files to CMakeLists.txt.
* CMakeLists.txt:
2015-02-03 Shivakumar JM <shiva.jm@samsung.com>
Fix build warning in WebKit2/Platform/IPC module.
https://bugs.webkit.org/show_bug.cgi?id=141229
Reviewed by Chris Dumez.
Fix build warning by using UNUSED_PARAM macro.
* Platform/IPC/Connection.cpp:
(IPC::Connection::sendMessage):
2015-02-03 Tim Horton <timothy_horton@apple.com>
Add WKPageNavigationClient as C SPI around API::NavigationClient, and adopt in WKTR
https://bugs.webkit.org/show_bug.cgi?id=141217
* UIProcess/API/C/WKPageRenderingProgressEventsInternal.h:
Include, not import.
2015-02-03 Tim Horton <timothy_horton@apple.com>
Add WKPageNavigationClient as C SPI around API::NavigationClient, and adopt in WKTR
https://bugs.webkit.org/show_bug.cgi?id=141217
Reviewed by Sam Weinig.
* Shared/API/c/WKBase.h:
* UIProcess/API/C/WKAPICast.h:
* UIProcess/API/C/WKFrameInfoRef.cpp: Added.
(WKFrameInfoGetTypeID):
* UIProcess/API/C/WKFrameInfoRef.h: Added.
* UIProcess/API/C/WKNavigationActionRef.cpp: Added.
(WKNavigationActionGetTypeID):
* UIProcess/API/C/WKNavigationActionRef.h: Added.
* UIProcess/API/C/WKNavigationRef.cpp: Added.
(WKNavigationGetTypeID):
* UIProcess/API/C/WKNavigationRef.h: Added.
* UIProcess/API/C/WKNavigationResponseRef.cpp: Added.
(WKNavigationResponseGetTypeID):
(WKNavigationResponseCanShowMIMEType):
* UIProcess/API/C/WKNavigationResponseRef.h: Added.
Add tiny C wrappers around API::{FrameInfo, NavigationAction, Navigation, NavigationResponse}.
* UIProcess/API/APINavigationClient.h:
(API::NavigationClient::decidePolicyForPluginLoad):
Add a default implementation of decidePolicyForPluginLoad.
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageNavigationClient):
* UIProcess/API/C/WKPage.h:
Add WKPageSetPageNavigationClient, which connects API::NavigationClient to
the new WKPageNavigationClient C SPI.
* UIProcess/API/C/WKPageNavigationClient.h: Added.
Add WKPageNavigationClient, which one can use in place of WKPageLoaderClient
and WKPagePolicyClient and which has the same semantics as the Modern ObjC API
(including things like API::Navigation as WKNavigationRef, etc.)
* UIProcess/API/C/WKPageLoaderClient.h:
* UIProcess/API/C/WKPageRenderingProgressEvents.h: Added.
* UIProcess/API/C/WKPageRenderingProgressEventsInternal.h: Added.
(pageRenderingProgressEvents):
* UIProcess/API/C/WKPluginLoadPolicy.h: Added.
Pull some enums out into their own files (WKPageRenderingProgressEvents is
duplicated from the Modern ObjC API's _WKRenderingProgressEvents, WKPluginLoadPolicy
is pulled out of WKPageLoaderClient).
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::findPlugin):
Add an equivalent of pluginLoadPolicy to the NavigationClient.
* WebKit2.xcodeproj/project.pbxproj:
2015-02-03 Timothy Horton <timothy_horton@apple.com>
Every PageOverlayClientImpl leaks
https://bugs.webkit.org/show_bug.cgi?id=141224
<rdar://problem/19652939>
Reviewed by Simon Fraser.
* WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
(WKBundlePageOverlayCreate):
* WebProcess/WebPage/WebPageOverlay.cpp:
(WebKit::WebPageOverlay::create):
(WebKit::WebPageOverlay::WebPageOverlay):
(WebKit::WebPageOverlay::pageOverlayDestroyed):
(WebKit::WebPageOverlay::willMoveToPage):
(WebKit::WebPageOverlay::didMoveToPage):
(WebKit::WebPageOverlay::drawRect):
(WebKit::WebPageOverlay::mouseEvent):
(WebKit::WebPageOverlay::didScrollFrame):
(WebKit::WebPageOverlay::actionContextForResultAtPoint):
(WebKit::WebPageOverlay::dataDetectorsDidPresentUI):
(WebKit::WebPageOverlay::dataDetectorsDidChangeUI):
(WebKit::WebPageOverlay::dataDetectorsDidHideUI):
(WebKit::WebPageOverlay::copyAccessibilityAttributeStringValueForPoint):
(WebKit::WebPageOverlay::copyAccessibilityAttributeBoolValueForPoint):
(WebKit::WebPageOverlay::copyAccessibilityAttributeNames):
* WebProcess/WebPage/WebPageOverlay.h:
(WebKit::WebPageOverlay::client):
Keep the PageOverlayClientImpl as a unique_ptr instead of a leaked reference,
ensuring that it's cleaned up when the WebPageOverlay is torn down.
2015-02-03 Chris Dumez <cdumez@apple.com>
Drop ResourceLoadPriorityUnresolved resource load priority and use Optional<> instead
https://bugs.webkit.org/show_bug.cgi?id=141186
Reviewed by Antti Koivisto.
Update code now that ResourceLoadPriorityUnresolved is not longer a
ResourceLoadPriority enum value.
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::retrieve):
* WebProcess/Network/WebResourceLoadScheduler.cpp:
(WebKit::WebResourceLoadScheduler::scheduleLoad):
2015-02-03 Enrica Casucci <enrica@apple.com>
[iOS] Add support for deleteFromInputWithFlags.
https://bugs.webkit.org/show_bug.cgi?id=141216
rdar://problem/19130081
Reviewed by Benjamin Poulain.
Adopts the new method as soon as it is available.
The patch also removes some obsolete code used for staging.
* Platform/spi/ios/UIKitSPI.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _interpretKeyEvent:isCharEvent:]):
2015-02-03 Joseph Pecoraro <pecoraro@apple.com>
[iOS] Selection Callout should not immediately disappear on pages with frequent layouts
https://bugs.webkit.org/show_bug.cgi?id=141210
Reviewed by Enrica Casucci.
In iOS WebKit2 in order to keep caret refreshes in sync with WebCore layouts
the selection assistant is told to update whenever WebKit's layer tree
commits. Unfortunately, for pages with JavaScript animation that are
frequently doing a layout / layer tree update, this would trigger very
frequent selection updates that would keep the caret from blinking and
dismiss any selection callouts.
This change tracks the last selection drawing information so that we can
avoid informing the assistant of a selection updates unless it has changed
visually or needs to redraw (zoom).
* Shared/EditorState.cpp:
Remove include already in header.
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(WebKit::WKSelectionDrawingInfo::WKSelectionDrawingInfo):
(WebKit::operator==):
(WebKit::operator!=):
(-[WKContentView observeValueForKeyPath:ofObject:change:context:]):
When zooming, force the selection update, even though the drawing
information hasn't changed, the views will need to be updated.
(-[WKContentView _updateChangedSelection]):
(-[WKContentView _updateChangedSelection:]):
Monitor EditorState for changes in selection drawing and avoid
informing the selection assistant unless necessary.
2015-02-03 Jeremy Jones <jeremyj@apple.com>
Prevent flicker when exiting fullscreen by synchronizing transactions.
https://bugs.webkit.org/show_bug.cgi?id=140897
Reviewed by Tim Horton.
Flush transactions before removing layerHost. This allows existing transactions to be completed before the hosting layer disappears.
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::didCleanupFullscreen):
2015-02-03 Brian J. Burg <burg@cs.washington.edu>
Convert WebInspectorProxy to use WKWebView API for the inspector view
https://bugs.webkit.org/show_bug.cgi?id=141037
Reviewed by Timothy Hatcher.
Use the newer API for PLATFORM(MAC). The main difference is that the
WKWebView's page group cannot be set directly; instead, the group identifier
is passed. Also add some preference setters needed for the inspector.
Refactor some code to not use page groups directly. In a future patch,
the PageGroup-based inspector level system will be simplified. It is
it is no longer necessary to keep a static map of PageGroup instances,
since they are only used to save inspector window preferences. (These used
to prevent all levels of inspector from pausing together when a second-level
inspector hit a breakpoint. This is not necessary with multi-process
web inspectors.)
Also, adjust window resizing behavior when the inspector is docked to
the right. Window width resizes should not affect the width of the inspector
frame. This matches the behavior of height changes when docked to the bottom.
To support 32-bit Mac builds where WKWebView is not defined, share the stub
platformFoo() implementations with PLATFORM(IOS). The stubs are now located
in the platform-independent WebInspectorProxy.cpp.
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _logsPageMessagesToSystemConsoleEnabled]): Added.
(-[WKPreferences _setLogsPageMessagesToSystemConsoleEnabled:]): Added.
(-[WKPreferences _allowFileAccessFromFileURLs]): Added.
(-[WKPreferences _setAllowFileAccessFromFileURLs:]): Added.
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:
* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::WebInspectorProxy):
(WebKit::WebInspectorProxy::inspectorPagePreferences):
(WebKit::WebInspectorProxy::attach):
(WebKit::WebInspectorProxy::detach):
(WebKit::WebInspectorProxy::setAttachedWindowHeight):
(WebKit::WebInspectorProxy::setAttachedWindowWidth):
(WebKit::WebInspectorProxy::createInspectorPage):
(WebKit::WebInspectorProxy::shouldOpenAttached):
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
(WebKit::WebInspectorProxy::platformOpen):
(WebKit::WebInspectorProxy::platformDidClose):
(WebKit::WebInspectorProxy::platformInvalidate):
(WebKit::WebInspectorProxy::platformBringToFront):
(WebKit::WebInspectorProxy::platformHide):
(WebKit::WebInspectorProxy::platformIsFront):
(WebKit::WebInspectorProxy::platformInspectedURLChanged):
(WebKit::WebInspectorProxy::platformSave):
(WebKit::WebInspectorProxy::platformAppend):
(WebKit::WebInspectorProxy::platformInspectedWindowHeight):
(WebKit::WebInspectorProxy::platformInspectedWindowWidth):
(WebKit::WebInspectorProxy::platformAttach):
(WebKit::WebInspectorProxy::platformDetach):
(WebKit::WebInspectorProxy::platformSetAttachedWindowHeight):
(WebKit::WebInspectorProxy::platformSetToolbarHeight):
(WebKit::WebInspectorProxy::inspectorPageURL):
(WebKit::WebInspectorProxy::inspectorTestPageURL):
(WebKit::WebInspectorProxy::inspectorBaseURL):
(WebKit::WebInspectorProxy::platformSetAttachedWindowWidth):
(WebKit::WebInspectorProxy::platformAttachAvailabilityChanged):
* UIProcess/WebInspectorProxy.h:
* UIProcess/ios/WebInspectorProxyIOS.mm: Removed.
* UIProcess/mac/WebInspectorProxyMac.mm:
(-[WKWebInspectorWKWebView _didRelaunchProcess]):
WKWebView doesn't implement this, so remove the super call.
(WebKit::WebInspectorProxy::closeTimerFired):
(WebKit::createDockButton):
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
(WebKit::WebInspectorProxy::platformAttach):
(-[WKWebInspectorWKView _didRelaunchProcess]): Deleted.
* WebKit2.xcodeproj/project.pbxproj:
2015-02-03 Antti Koivisto <antti@apple.com>
Memory cache for resources pending disk write
https://bugs.webkit.org/show_bug.cgi?id=141159
Reviewed by Andreas Kling.
If a resource was requested from the disk cache before it has been written we ended up
loading it again. Add a short lived memory cache to avoid this.
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::decodeStorageEntry):
* NetworkProcess/cache/NetworkCacheStorage.h:
(WebKit::NetworkCacheStorage::Data::isMap):
Add a way to know whether a Data is backed by map or not. SharedMemory does not work correctly
if it is not a map.
* NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
(WebKit::NetworkCacheStorage::Data::Data):
(WebKit::NetworkCacheStorage::initialize):
Also do some renaming.
(WebKit::decodeEntry):
(WebKit::NetworkCacheStorage::removeEntry):
(WebKit::NetworkCacheStorage::retrieve):
(WebKit::NetworkCacheStorage::store):
(WebKit::NetworkCacheStorage::clear):
(WebKit::NetworkCacheStorage::shrinkIfNeeded):
2015-02-02 Antti Koivisto <antti@apple.com>
Update cache header after revalidation without rewriting the body data
https://bugs.webkit.org/show_bug.cgi?id=141182
Reviewed by Andreas Kling.
Currently we just rewrite the entire entry after revalidation.
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::decodeStorageEntry):
Include the strorage entry to the cache response so we can more easily update it.
(WebKit::NetworkCache::update):
Call the storage update function with the new and the exisiting storage entry.
* NetworkProcess/cache/NetworkCache.h:
* NetworkProcess/cache/NetworkCacheStorage.h:
* NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
(WebKit::openFileForKey):
Added an option for opening a file for writing without creating a new one.
Renamed for clarity.
(WebKit::encodeEntryHeader):
Separate header encoding to a function.
(WebKit::encodeEntry):
(WebKit::NetworkCacheStorage::dispatchRetrieveOperation):
(WebKit::NetworkCacheStorage::store):
(WebKit::NetworkCacheStorage::update):
New update function.
If the page-rounded header size would stay unchanged we can just write the new header over the old one.
In the unlikely event it doesn't we rewrite the whole thing.
(WebKit::createIOChannelForKey): Deleted.
2015-02-02 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r179540.
https://bugs.webkit.org/show_bug.cgi?id=141190
need further investigation to fix !WK_API_ENABLED (32bit)
build. (Requested by brrian_ on #webkit).
Reverted changeset:
"Convert WebInspectorProxy to use WKWebView API for the
inspector view"
https://bugs.webkit.org/show_bug.cgi?id=141037
http://trac.webkit.org/changeset/179540
2015-02-02 Brian J. Burg <burg@cs.washington.edu>
Convert WebInspectorProxy to use WKWebView API for the inspector view
https://bugs.webkit.org/show_bug.cgi?id=141037
Reviewed by Timothy Hatcher.
Use the newer API for PLATFORM(MAC). The main difference is that the
WKWebView's page group cannot be set directly; instead, the group identifier
is passed. Also add some preference setters needed for the inspector.
Refactor some code to not use page groups directly. In a future patch,
the PageGroup-based inspector level system will be simplified. It is
it is no longer necessary to keep a static map of PageGroup instances,
since they are only used to save inspector window preferences. (These used
to prevent all levels of inspector from pausing together when a second-level
inspector hit a breakpoint. This is not necessary with multi-process
web inspectors.)
Also, adjust window resizing behavior when the inspector is docked to
the right. Window width resizes should not affect the width of the inspector
frame. This matches the behavior of height changes when docked to the bottom.
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _logsPageMessagesToSystemConsoleEnabled]): Added.
(-[WKPreferences _setLogsPageMessagesToSystemConsoleEnabled:]): Added.
(-[WKPreferences _allowFileAccessFromFileURLs]): Added.
(-[WKPreferences _setAllowFileAccessFromFileURLs:]): Added.
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:
* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::WebInspectorProxy):
(WebKit::WebInspectorProxy::inspectorPagePreferences): Added.
(WebKit::WebInspectorProxy::attach):
(WebKit::WebInspectorProxy::detach):
(WebKit::WebInspectorProxy::setAttachedWindowHeight):
(WebKit::WebInspectorProxy::setAttachedWindowWidth):
(WebKit::WebInspectorProxy::createInspectorPage):
(WebKit::WebInspectorProxy::shouldOpenAttached):
* UIProcess/WebInspectorProxy.h: Use default member initializers.
* UIProcess/mac/WebInspectorProxyMac.mm:
(-[WKWebInspectorWKWebView _didRelaunchProcess]):
WKWebView doesn't implement this, so remove the super call.
(WebKit::WebInspectorProxy::closeTimerFired):
(WebKit::createDockButton):
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
(WebKit::WebInspectorProxy::platformAttach):
(-[WKWebInspectorWKView _didRelaunchProcess]): Deleted.
2015-02-02 Chris Dumez <cdumez@apple.com>
Make NetworkCache's constructor private
https://bugs.webkit.org/show_bug.cgi?id=141181
Reviewed by Antti Koivisto.
Make NetworkCache's constructor private and mark its destructor as
deleted as it is a singleton class.
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::NetworkCache): Deleted.
* NetworkProcess/cache/NetworkCache.h:
2015-02-02 Filip Pizlo <fpizlo@apple.com>
Revert accidental (and super bad) change in r179490.
* WebProcess/com.apple.WebProcess.sb.in:
2015-02-02 Chris Dumez <cdumez@apple.com>
Access MemoryCache singleton using MemoryCache::singleton()
https://bugs.webkit.org/show_bug.cgi?id=141104
Reviewed by Andreas Kling.
Access MemoryCache singleton using MemoryCache::singleton() static
member function, instead of a free function, as per the recent
coding style discussion on WebKit-dev.
2015-02-02 Jeremy Jones <jeremyj@apple.com>
Prevent crash when accessing WebAVPlayerController.delegate.
https://bugs.webkit.org/show_bug.cgi?id=140893
Reviewed by Darin Adler.
Plumb new resetMediaState() through IPC interface WebVideoFullscreenManagerProxy.
* UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::invalidate): remove redundant set to nullptr.
* WebProcess/ios/WebVideoFullscreenManager.h:
* WebProcess/ios/WebVideoFullscreenManager.mm:
(WebKit::WebVideoFullscreenManager::resetMediaState):
2015-02-01 Chris Dumez <cdumez@apple.com>
Use more references in HistoryItem
https://bugs.webkit.org/show_bug.cgi?id=141133
Reviewed by Andreas Kling.
Use more references in HistoryItem instead of pointers.
* WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.cpp:
(WebKit::InjectedBundleBackForwardListItem::children):
* WebProcess/WebCoreSupport/SessionStateConversion.cpp:
(WebKit::toFrameState):
(WebKit::applyFrameState):
* WebProcess/WebPage/WebBackForwardListProxy.cpp:
(WebKit::WebBackForwardListProxy::addItem):
* WebProcess/WebPage/WebBackForwardListProxy.h:
2015-02-01 Dan Bernstein <mitz@apple.com>
Remove ViewGestureController tracing
https://bugs.webkit.org/show_bug.cgi?id=141137
Reviewed by Tim Horton.
Remove the tracing added in r176133, now that http://webkit.org/b/138750 is fixed.
* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
(WebKit::ViewGestureController::endSwipeGesture):
(WebKit::ViewGestureController::willCommitPostSwipeTransitionLayerTree):
(WebKit::ViewGestureController::removeSwipeSnapshot):
(WebKit::addLogEntry): Deleted.
(WebKit::dumpLogEntries): Deleted.
* UIProcess/mac/ViewGestureController.h:
2015-01-31 Sam Weinig <sam@webkit.org>
Remove even more Mountain Lion support
https://bugs.webkit.org/show_bug.cgi?id=141124
Reviewed by Alexey Proskuryakov.
* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:
* Configurations/FeatureDefines.xcconfig:
* Configurations/Version.xcconfig:
* Configurations/WebContentService.Development.xcconfig:
* Configurations/WebContentService.xcconfig:
* Configurations/WebKit.xcconfig:
* NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
2015-01-31 Antti Koivisto <antti@apple.com>
Enable WebKit disk cache on OS X
https://bugs.webkit.org/show_bug.cgi?id=141022
Reviewed by Gavin Barraclough.
* config.h: Flip the switch.
2015-01-31 Antti Koivisto <antti@apple.com>
Unreviewed, rolling out r179447.
Forgot to include the test.
Reverted changeset:
"Enable WebKit disk cache on OS X"
https://bugs.webkit.org/show_bug.cgi?id=141022
http://trac.webkit.org/changeset/179447
2015-01-31 Antti Koivisto <antti@apple.com>
Enable WebKit disk cache on OS X
https://bugs.webkit.org/show_bug.cgi?id=141022
Reviewed by Gavin Barraclough.
* config.h: Flip the switch.
2015-01-31 Antti Koivisto <antti@apple.com>
OSObjectPtr does not work with dispatch_data_t on Maverics
https://bugs.webkit.org/show_bug.cgi?id=141081
Reviewed by Zalan Bujtas.
Previous attempt to special case dispatch_data_t in OSObjectPtr didn't work in all cases
probably due to the context sensitivity of the definition of the dispatch_data_t type.
For now, add DispatchPtr for the cache code and use it.
* NetworkProcess/cache/NetworkCacheStorage.h:
(WebKit::DispatchPtr::DispatchPtr):
(WebKit::DispatchPtr::~DispatchPtr):
(WebKit::DispatchPtr::operator=):
(WebKit::DispatchPtr::get):
(WebKit::DispatchPtr::operator bool):
(WebKit::adoptDispatch):
* NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
(WebKit::NetworkCacheStorage::Data::Data):
(WebKit::NetworkCacheStorage::Data::data):
(WebKit::NetworkCacheStorage::NetworkCacheStorage):
(WebKit::createIOChannelForKey):
(WebKit::decodeEntry):
(WebKit::encodeEntryMetaData):
(WebKit::encodeEntry):
2015-01-30 Tim Horton <timothy_horton@apple.com>
Add and hook up APINavigationClient
https://bugs.webkit.org/show_bug.cgi?id=140698
Reviewed by Sam Weinig.
Add a single APINavigationClient that NavigationState implements and
WebPageProxy prefers over APILoaderClient and APIPolicyClient.
* UIProcess/API/APILoaderClient.h:
Fix a comment.
* UIProcess/API/APINavigationClient.h: Added.
APINavigationClient is the union of NavigationState's overrides of APILoaderClient and APIPolicyClient.
Names are adjusted to more closely match the Modern API.
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
Instead of having policy and loader clients, NavigationState has a single navigation client.
Adjust as necessary.
Move as much logic as possible (isMainFrame checks, construction of API objects) out of here
and into WebPageProxy.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
Install the aforementioned single navigation client.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setNavigationClient):
Add a navigation client setter.
For all policy and loader client calls, if we have a navigation client, use that;
otherwise, fall back on the policy and loader clients.
* UIProcess/WebPageProxy.h:
* WebKit2.xcodeproj/project.pbxproj:
2015-01-30 Chris Dumez <cdumez@apple.com>
Update MemoryCache code to use more references instead of pointers
https://bugs.webkit.org/show_bug.cgi?id=141099
Reviewed by Andreas Kling.
* WebProcess/ResourceCache/WebResourceCacheManager.cpp:
(WebKit::WebResourceCacheManager::clearCacheForOrigin):
2015-01-30 Chris Dumez <cdumez@apple.com>
Rename shared() static member functions to singleton() for singleton classes.
https://bugs.webkit.org/show_bug.cgi?id=141088
Reviewed by Ryosuke Niwa and Benjamin Poulain.
Rename shared() static member functions to singleton() for singleton
classes as per the recent coding style change.
2015-01-30 Alexey Proskuryakov <ap@apple.com>
Build fix.
* Shared/API/c/WKDeprecatedFunctions.cpp:
* UIProcess/API/C/WKPreferencesRefPrivate.h:
The screen font substitution functions still need to be present in the header.
2015-01-29 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Resize the redirected XComposite again after leaving accelerated compositing mode
https://bugs.webkit.org/show_bug.cgi?id=140935
Reviewed by Sergio Villar Senin.
Since r178414 we don't resize the redirected XComposite window
until we enter accelerated compositing mode, but after leaving it
the redirected window keeps its size. We should resize it to 1x1
again and free the XPixmap and cairo surface to save that memory
while not in accelerated compositing mode.
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::enterAcceleratedCompositingMode): Notify
the WebKitWebViewBase.
(WebKit::PageClientImpl::exitAcceleratedCompositingMode): Ditto.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseEnterAcceleratedCompositingMode): Resize the
XComposite window to the current drawing area size.
(webkitWebViewBaseExitAcceleratedCompositingMode): Resize the
XComposite window to and empty size.
* UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
* UIProcess/gtk/RedirectedXCompositeWindow.cpp:
(WebKit::RedirectedXCompositeWindow::RedirectedXCompositeWindow):
Do not initialize m_size since we now handle the empty size as a
especial case. Make sure we always create the X window with at
least 1x1 size.
(WebKit::RedirectedXCompositeWindow::resize): Resize the window to
at least 1x1, but when en empty size is given, call
cleanupPixmapAndPixmapSurface() to release those resources.
(WebKit::RedirectedXCompositeWindow::surface): Create the cairo
surface with at least 1x1 size.
2015-01-29 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Runtime critical warnings sometimes at start up when using the network process
https://bugs.webkit.org/show_bug.cgi?id=140998
Reviewed by Žan Doberšek.
This is caused by the CustomProtocolManager work queue
theread. This WorkQueue is created when the CustomProtocolManager
object is constructed, but destroyed when it's initialized when
the UI process asks to use the network process. In this case,
sometimes happens that the work queue thread that runs the main
loop is executed once the object has been destroyed and the main
loop pointer is nullptr.
* Platform/WorkQueue.h:
* Platform/gtk/WorkQueueGtk.cpp:
(WorkQueue::platformInitialize): Use a lambda function for the
thread body.
(WorkQueue::platformInvalidate): Detach the worker thread before
deleting the main loop object.
(WorkQueue::startWorkQueueThread): Deleted.
(WorkQueue::workQueueThreadBody): Deleted.
2015-01-29 Beth Dakin <bdakin@apple.com>
Another follow-on, spotted this mistake. This used to be
#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090 , so it should now be
COCOA.
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::registerUserDefaultsIfNeeded):
2015-01-29 Beth Dakin <bdakin@apple.com>
Follow-on, fixing a bad merge from my last change.
* Shared/WebPreferencesDefinitions.h:
2015-01-29 Beth Dakin <bdakin@apple.com>
Remove more Mountain Lion code from WebKit2
https://bugs.webkit.org/show_bug.cgi?id=141052
Reviewed by Tim Horton.
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::sendBufferMaybeAborting):
* NetworkProcess/NetworkResourceLoader.h:
* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
* NetworkProcess/mac/NetworkDiskCacheMonitor.mm:
* NetworkProcess/mac/NetworkResourceLoaderMac.mm:
(WebKit::NetworkResourceLoader::willCacheResponseAsync):
* Platform/IPC/MessageDecoder.cpp:
* Platform/IPC/MessageDecoder.h:
* Platform/IPC/mac/ConnectionMac.mm:
(IPC::ConnectionTerminationWatchdog::watchdogTimerFired):
(IPC::Connection::open):
(IPC::Connection::receiveSourceEventHandler):
(IPC::Connection::kill):
* Platform/IPC/mac/ImportanceAssertion.h:
* PluginProcess/mac/PluginProcessMac.mm:
(WebKit::PluginProcess::initializeProcessName):
* Shared/WebPreferencesDefinitions.h:
* Shared/mac/ChildProcessMac.mm:
(WebKit::initializeTimerCoalescingPolicy):
(WebKit::ChildProcess::setApplicationIsDaemon):
(WebKit::ChildProcess::platformInitialize):
(WebKit::ChildProcess::setQOS):
* Shared/mac/CookieStorageShim.mm:
(WebKit::CookieStorageShim::initialize):
* UIProcess/API/mac/WKView.mm:
(-[WKView addWindowObserversForWindow:]):
(-[WKView removeWindowObservers]):
(-[WKView _windowDidChangeOcclusionState:]):
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::LoaderClient::didReceiveAuthenticationChallengeInFrame):
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::registerUserDefaultsIfNeeded):
(WebKit::WebProcessPool::platformInitializeWebProcess):
(WebKit::WebProcessPool::registerNotificationObservers):
(WebKit::WebProcessPool::unregisterNotificationObservers):
(WebKit::privateBrowsingSession):
(WebKit::WebProcessPool::isURLKnownHSTSHost):
(WebKit::WebProcessPool::resetHSTSHosts):
* UIProcess/Databases/mac/DatabaseProcessProxyMac.mm:
(WebKit::shouldUseXPC):
* UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
(WebKit::shouldUseXPC):
* UIProcess/WebProcessPool.h:
* UIProcess/mac/TextCheckerMac.mm:
(WebKit::shouldAutomaticQuoteSubstitutionBeEnabled):
(WebKit::shouldAutomaticDashSubstitutionBeEnabled):
(WebKit::TextChecker::didChangeAutomaticQuoteSubstitutionEnabled):
(WebKit::TextChecker::didChangeAutomaticDashSubstitutionEnabled):
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::applyDebuggingPropertiesToSwipeViews):
* UIProcess/mac/WebProcessProxyMac.mm:
(WebKit::shouldUseXPC):
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::updateActivePages):
* WebProcess/com.apple.WebProcess.sb.in:
* config.h:
2015-01-29 Sam Weinig <sam@webkit.org>
Remove support for screen font substitution
https://bugs.webkit.org/show_bug.cgi?id=141038
Reviewed by Tim Horton.
* Shared/API/c/WKDeprecatedFunctions.cpp:
(WKPreferencesSetScreenFontSubstitutionEnabled):
(WKPreferencesGetScreenFontSubstitutionEnabled):
Move now empty preferences SPI to WKDeprecatedFunctions.
* Shared/WebPreferencesDefinitions.h:
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetScreenFontSubstitutionEnabled): Deleted.
(WKPreferencesGetScreenFontSubstitutionEnabled): Deleted.
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
* WebProcess/WebProcess.h:
(WebKit::WebProcess::presenterApplicationPid):
(WebKit::WebProcess::shouldForceScreenFontSubstitution): Deleted.
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):
Stop piping screen font substitution setting to the web process.
2015-01-29 Alexey Proskuryakov <ap@apple.com>
Frequent kernel panics when running WebKit regression tests
https://bugs.webkit.org/show_bug.cgi?id=141043
Reviewed by Sam Weinig.
Split PluginService.Development into 32-bit and 64-bit variants, to better match
production variant. When building FAT, we'll have the right architecture from
the start now, so no need to re-exec into a different architecture.
* Configurations/PluginService.Development.xcconfig: Removed.
* Configurations/PluginService.32.Development.xcconfig: Copied from Source/WebKit2/Configurations/PluginService.Development.xcconfig.
* Configurations/PluginService.64.Development.xcconfig: Copied from Source/WebKit2/Configurations/PluginService.Development.xcconfig.
Changed to use ONLY_ACTIVE_ARCH instead of CONFIGURATION, so that we build the
right thing even in debug FAT builds.
* Configurations/PluginService.32.xcconfig:
* Configurations/PluginService.64.xcconfig:
While at it, applied the same changes as in Development variants. This means that
FAT builds will now build only the correct architecture for PluginService.64
(it used to build FAT, unnecessarily).
* PluginProcess/EntryPoint/mac/XPCService/PluginService.Development/Info.plist:
Updated to support multiple product names.
* UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::serviceName): Launch the
right development service.
* WebKit2.xcodeproj/project.pbxproj: Split the Plugin.Development target into two.
2015-01-29 Tim Horton <timothy_horton@apple.com>
Fix the build with newer Clang
* NetworkProcess/NetworkConnectionToWebProcess.h:
These should be 'override's.
2015-01-29 Chris Dumez <cdumez@apple.com>
Clean up / modernize PageCache class
https://bugs.webkit.org/show_bug.cgi?id=141009
Reviewed by Darin Adler.
Clean up / modernize PageCache class.
* WebProcess/WebPage/WebBackForwardListProxy.cpp:
(WebKit::WebBackForwardListProxy::removeItem):
(WebKit::WebBackForwardListProxy::close):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::goForward):
(WebKit::WebPage::goBack):
(WebKit::WebPage::goToBackForwardItem):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::releasePageCache):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformSetCacheModel):
* WebProcess/soup/WebProcessSoup.cpp:
(WebKit::WebProcess::platformSetCacheModel):
2015-01-29 Csaba Osztrogonác <ossy@webkit.org>
[EFL][GTK] Fix the build after r179326
https://bugs.webkit.org/show_bug.cgi?id=141027
Reviewed by Alexey Proskuryakov.
Guard MessageRecorder implementation with USE(DTRACE)
for platforms not supporting DTrace.
Original patch by Carlos Garcia Campos <cgarcia@igalia.com>
* Platform/IPC/ArgumentCoders.cpp:
* Platform/IPC/ArgumentCoders.h:
* Platform/IPC/Connection.cpp:
(IPC::Connection::dispatchWorkQueueMessageReceiverMessage):
(IPC::Connection::sendMessage):
(IPC::Connection::sendSyncMessage):
(IPC::Connection::sendSyncMessageFromSecondaryThread):
(IPC::Connection::dispatchSyncMessage):
(IPC::Connection::dispatchMessage):
* Platform/IPC/MessageDecoder.cpp:
(IPC::MessageDecoder::MessageDecoder):
* Platform/IPC/MessageDecoder.h:
* Platform/IPC/MessageEncoder.cpp:
(IPC::MessageEncoder::MessageEncoder):
(IPC::MessageEncoder::encodeHeader):
* Platform/IPC/MessageEncoder.h:
* Platform/IPC/MessageRecorder.h:
2015-01-29 Tim Horton <timothy_horton@apple.com>
Avoid manually handling quickLookWithEvent: if the immediate action gesture recognizer will do Lookup for us
https://bugs.webkit.orgshow_bug.cgi?id=141018
<rdar://problem/19619999>
* UIProcess/API/mac/WKView.mm:
(-[WKView quickLookWithEvent:]):
Yosemite is 101000, not 10100.
2015-01-28 Tim Horton <timothy_horton@apple.com>
Add API::{FrameInfo, NavigationAction, NavigationResponse} types
https://bugs.webkit.org/show_bug.cgi?id=140982
Reviewed by Sam Weinig.
Make C++ API objects for WK{FrameInfo, NavigationAction, NavigationResponse}
to wrap around, as a step towards moving Modern API logic down into WebPageProxy.
* Shared/API/APIObject.h:
* Shared/Cocoa/APIObject.mm:
(API::Object::newObject):
* UIProcess/API/APIFrameInfo.cpp: Added.
* UIProcess/API/APIFrameInfo.h: Added.
* UIProcess/API/APINavigationAction.h: Added.
* UIProcess/API/APINavigationResponse.h: Added.
Add API::FrameInfo, API::NavigationAction, and API::NavigationResponse.
* UIProcess/API/Cocoa/WKFrameInfo.mm:
* UIProcess/API/Cocoa/WKFrameInfoInternal.h:
Make WKFrameInfo a WKObject, wrapping a API::FrameInfo.
* UIProcess/API/Cocoa/WKNavigationAction.mm:
* UIProcess/API/Cocoa/WKNavigationActionInternal.h:
Make WKNavigationAction a WKObject, wrapping a API::NavigationAction.
* UIProcess/API/Cocoa/WKNavigationResponse.mm:
* UIProcess/API/Cocoa/WKNavigationResponseInternal.h:
Make WKNavigationResponse a WKObject, wrapping a API::NavigationResponse.
* UIProcess/API/Cocoa/WKUserContentController.mm:
Adopt API::FrameInfo.
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
Adopt API::FrameInfo, and reorganize the code slightly.
Adopt API::NavigationAction.
(WebKit::NavigationState::PolicyClient::decidePolicyForResponse):
Adopt API::FrameInfo.
Adopt API::NavigationResponse.
(WebKit::NavigationState::LoaderClient::didFailProvisionalLoadWithErrorForFrame):
Adopt API::FrameInfo.
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::UIClient::createNewPage):
(WebKit::UIDelegate::UIClient::runJavaScriptAlert):
(WebKit::UIDelegate::UIClient::runJavaScriptConfirm):
(WebKit::UIDelegate::UIClient::runJavaScriptPrompt):
Adopt API::FrameInfo.
* WebKit2.xcodeproj/project.pbxproj:
2015-01-28 Antti Koivisto <antti@apple.com>
http/tests/xmlhttprequest/workers/methods.html sometimes times out with disk cache enabled
https://bugs.webkit.org/show_bug.cgi?id=140976
Reviewed by Chris Dumez.
The previous fix sometimes invoked the completion handler twice. Explicitly track if we
have called it or not.
* NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
(WebKit::NetworkCacheStorage::dispatchRetrieveOperation):
Also move the error case to the done branch. According to the documentation 'done' is always set on error.
2015-01-28 Timothy Horton <timothy_horton@apple.com>
Add a WebKitMessageRecorder DTrace provider, exposing IPC details to DTrace
https://bugs.webkit.org/show_bug.cgi?id=140673
Reviewed by Sam Weinig.
* Platform/IPC/ArgumentCoders.cpp:
(IPC::ArgumentCoder<uuid_t>::encode):
(IPC::ArgumentCoder<uuid_t>::decode):
* Platform/IPC/ArgumentCoders.h:
Add a uuid_t (simple) argument coder.
Fix a mis-named header-guard #ifdef.
* Platform/IPC/Connection.cpp:
(IPC::Connection::dispatchWorkQueueMessageReceiverMessage):
(IPC::Connection::dispatchSyncMessage):
Sync message replies inherit the message UUID from the incoming sync message.
(IPC::Connection::sendMessage):
(IPC::Connection::waitForMessage):
(IPC::Connection::sendSyncMessage):
(IPC::Connection::sendSyncMessageFromSecondaryThread):
Record outgoing messages. Because sendSyncMessage calls sendMessage,
we have to explicitly avoid recording the message twice.
(IPC::Connection::dispatchMessage):
Record the incoming message.
(IPC::Connection::remoteProcessID):
Add remoteProcessID(), which tries to determine the pid of the remote process.
* Platform/IPC/Connection.h:
(IPC::Connection::xpcConnection):
This can be const.
(IPC::Connection::isValid):
Make this public.
* Platform/IPC/MessageDecoder.cpp:
(IPC::MessageDecoder::MessageDecoder):
* Platform/IPC/MessageDecoder.h:
(IPC::MessageDecoder::setMessageProcessingToken):
(IPC::MessageDecoder::UUID):
Decode and store the message UUID.
Store a MessageProcessingToken for the lifetime of the MessageDecoder;
this ensures that all time spent processing the incoming message will be
counted against that message.
* Platform/IPC/MessageEncoder.cpp:
(IPC::MessageEncoder::MessageEncoder):
By default, create a new UUID for the message. Alternatively, allow clients
to pass the message UUID in (used for sync message replies).
Store the messageReceiverName and messageName.
(IPC::MessageEncoder::encodeHeader):
Factor encodeHeader() out of the constructors so most of their code can be shared.
(IPC::MessageEncoder::isSyncMessage):
(IPC::MessageEncoder::shouldDispatchMessageWhenWaitingForSyncReply):
Add getters for these flags.
* Platform/IPC/MessageEncoder.h:
(IPC::MessageEncoder::messageReceiverName):
(IPC::MessageEncoder::messageName):
(IPC::MessageEncoder::destinationID):
(IPC::MessageEncoder::UUID):
* Platform/IPC/MessageRecorder.h: Added.
* Platform/IPC/MessageRecorder.cpp: Added.
(MessageRecorder::MessageRecorder):
Add a class that interfaces with a custom DTrace provider to log incoming and outgoing messages.
(MessageRecorder::shared):
(MessageRecorder::isEnabled):
Determine if either of the message probes are enabled. If not, we'll avoid most of the
work associated with MessageRecorder.
(MessageRecorder::recordOutgoingMessage):
(MessageRecorder::recordIncomingMessage):
Build a WebKitMessageRecord and MessageProcessingToken from the Message(De|En)coder.
Once the MessageProcessingToken is deallocated, the probe will be invoked with the WebKitMessageRecord.
(MessageRecorder::MessageProcessingToken::MessageProcessingToken):
(MessageRecorder::MessageProcessingToken::~MessageProcessingToken):
Keep track of when the token is created and destroyed; these are considered the beginning
and ending "processing" times of the message (and as such the token should be kept alive for
exactly as long as the message is being processed).
* Platform/IPC/MessageRecorderProbes.d: Added.
Add a DTrace provider source file with two probes, message_sent and message_received.
The struct must match the struct in MessageRecorder.h.
* Platform/IPC/ProcessType.h: Added.
Add an enum of process types.
* WebKit2.xcodeproj/project.pbxproj:
* DatabaseProcess/DatabaseProcess.h:
* DatabaseProcess/DatabaseToWebProcessConnection.h:
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkProcess.h:
* WebProcess/Databases/WebToDatabaseProcessConnection.h:
* WebProcess/Network/NetworkProcessConnection.h:
* WebProcess/Plugins/PluginProcessConnection.h:
* WebProcess/WebPage/WebInspector.h:
* WebProcess/WebPage/WebInspectorUI.h:
* WebProcess/WebProcess.h:
* UIProcess/Databases/DatabaseProcessProxy.h:
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/Plugins/PluginProcessProxy.h:
* UIProcess/WebProcessProxy.h:
* PluginProcess/PluginProcess.h:
* PluginProcess/WebProcessConnection.h:
Annotate Connection::Clients with process types.
2015-01-28 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Crash closing inspected page with frequent activity
https://bugs.webkit.org/show_bug.cgi?id=140973
Reviewed by Timothy Hatcher.
* WebProcess/WebPage/WebInspector.h:
(WebKit::WebInspector::disconnectFromPage):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::close):
Be sure to close the WebInspector connection through the page
when the page is closing so that the WebKit::WebInspector is
relinquishes itself as the InspectorFrontendChannel.
2015-01-28 Timothy Horton <timothy_horton@apple.com>
Avoid manually handling quickLookWithEvent: if the immediate action gesture recognizer will do Lookup for us
https://bugs.webkit.org/show_bug.cgi?id=141018
<rdar://problem/19619999>
Reviewed by Beth Dakin.
* UIProcess/API/mac/WKView.mm:
(-[WKView quickLookWithEvent:]):
If we have an immediate action gesture recognizer, just call super and
avoid WebKit's special quickLookWithEvent: implementation.
2015-01-28 Sungmann Cho <sungmann.cho@navercorp.com>
Remove remaining PLATFORM(WIN) code blocks from WebKit2.
https://bugs.webkit.org/show_bug.cgi?id=140972
Reviewed by Darin Adler.
* WebProcess/Cookies/cf/WebCookieManagerCFNet.cpp:
(WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy):
2015-01-28 Beth Dakin <bdakin@apple.com>
Remove Mountain Lion code from WebKit and WebKit2
https://bugs.webkit.org/show_bug.cgi?id=141010
Reviewed by Sam Weinig.
* NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
* PluginProcess/EntryPoint/mac/LegacyProcess/PluginProcessMain.mm:
* Shared/mac/ChildProcessMac.mm:
(WebKit::ChildProcess::initializeSandbox):
* Shared/mac/WebEventFactory.mm:
(WebKit::phaseForEvent):
* UIProcess/API/mac/WKView.mm:
(-[WKView quickLookWithEvent:]):
(-[WKView updateLayer]):
(-[WKView createFullScreenWindow]):
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::didFinishLaunching):
* UIProcess/Network/mac/NetworkProcessProxyMac.mm:
(WebKit::shouldUseXPC):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::didFinishLaunching):
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::isViewVisible):
* WebKit2Prefix.h:
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
* WebProcess/com.apple.WebProcess.sb.in:
2015-01-28 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Crash when closing inspected page
https://bugs.webkit.org/show_bug.cgi?id=140968
Reviewed by Timothy Hatcher.
Handle cases where the corePage could be null. With the Inspector Process
in its own process, messages may come to the WebContentProcess after
the WebCore::Page has itself been destroyed.
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::show):
(WebKit::WebInspector::close):
(WebKit::WebInspector::openInNewTab):
(WebKit::WebInspector::evaluateScriptForTest):
(WebKit::WebInspector::showConsole):
(WebKit::WebInspector::showResources):
(WebKit::WebInspector::showMainResourceForFrame):
(WebKit::WebInspector::startPageProfiling):
(WebKit::WebInspector::stopPageProfiling):
(WebKit::WebInspector::canAttachWindow):
(WebKit::WebInspector::sendMessageToBackend):
(WebKit::WebInspector::remoteFrontendConnected):
(WebKit::WebInspector::remoteFrontendDisconnected):
2015-01-28 Sam Weinig <sam@webkit.org>
Convert WebPreferences and VisitedLinkProvider to be bridged API::Objects
https://bugs.webkit.org/show_bug.cgi?id=141002
Reviewed by Tim Horton.
* Shared/API/APIObject.h:
Add VisitedLinkProvider type.
* Shared/Cocoa/APIObject.mm:
(API::Object::newObject):
Allocate WebPreferences and VisitedLinkProvider as their Objective-C counterpart.
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences init]):
Switch to constructInWrapper.
(-[WKPreferences dealloc]):
Call the WebPreferences destructor.
(-[WKPreferences _apiObject]):
Add implementation of the WKObject protocol.
* UIProcess/API/Cocoa/WKPreferencesInternal.h:
Convert to using ObjectStorage.
* UIProcess/API/Cocoa/_WKVisitedLinkProvider.mm:
(-[_WKVisitedLinkProvider init]):
Switch to constructInWrapper.
(-[_WKVisitedLinkProvider dealloc]):
Call the VisitedLinkProvider destructor.
(-[_WKVisitedLinkProvider _apiObject]):
Add implementation of the WKObject protocol.
* UIProcess/API/Cocoa/_WKVisitedLinkProviderInternal.h:
Convert to using ObjectStorage.
* UIProcess/VisitedLinkProvider.cpp:
(WebKit::VisitedLinkProvider::create):
* UIProcess/VisitedLinkProvider.h:
Switch create() to return a Ref.
* UIProcess/WebPreferences.h:
Make the constructor public for use by constructInWrapper.
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::createWebPage):
* UIProcess/WebProcessPool.h:
Store the VisitedLinkProvider in a Ref.
2015-01-28 Dana Burkart <dburkart@apple.com>
Move ASan flag settings from DebugRelease.xcconfig to Base.xcconfig
https://bugs.webkit.org/show_bug.cgi?id=136765
Reviewed by Alexey Proskuryakov.
* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:
2015-01-28 Chris Dumez <cdumez@apple.com>
Fix typo in markPagesForVistedLinkStyleRecalc()
https://bugs.webkit.org/show_bug.cgi?id=140977
Reviewed by Darin Adler.
* WebProcess/WebPage/VisitedLinkTableController.cpp:
(WebKit::VisitedLinkTableController::setVisitedLinkTable):
(WebKit::VisitedLinkTableController::visitedLinkStateChanged):
(WebKit::VisitedLinkTableController::allVisitedLinkStateChanged):
(WebKit::VisitedLinkTableController::removeAllVisitedLinks):
2015-01-27 Antti Koivisto <antti@apple.com>
http/tests/xmlhttprequest/workers/methods.html sometimes times out with disk cache enabled
https://bugs.webkit.org/show_bug.cgi?id=140976
Reviewed by Chris Dumez.
Running
run-webkit-tests --release -2 http/tests/xmlhttprequest/workers/methods.html --iterations=100
would usually time out an iteration.
* NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
(WebKit::NetworkCacheStorage::dispatchRetrieveOperation):
Using dispatch_io_read with an empty file calls the handler block immediately with done boolean set
without it being an error. We failed to call the completion handler and any synchronous xhr would hang.
We may see an empty cache file if we are just in process of writing it.
Fix by handling this case specifically.
2015-01-28 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Add missing file to WebInspector compilation for GTK+.
* PlatformGTK.cmake: Add UserInterface/External/ESLint/eslint.js
2015-01-28 Chris Dumez <cdumez@apple.com>
Rename pageCache() to PageCache::shared() and return a reference
https://bugs.webkit.org/show_bug.cgi?id=140983
Reviewed by Andreas Kling.
Rename pageCache() to PageCache::shared() as this is a singleton class
and have it return a reference instead of a pointer.
* WebProcess/WebPage/VisitedLinkTableController.cpp:
(WebKit::VisitedLinkTableController::setVisitedLinkTable):
(WebKit::VisitedLinkTableController::visitedLinkStateChanged):
(WebKit::VisitedLinkTableController::allVisitedLinkStateChanged):
(WebKit::VisitedLinkTableController::removeAllVisitedLinks):
* WebProcess/WebPage/WebBackForwardListProxy.cpp:
(WebKit::WebBackForwardListProxy::removeItem):
(WebKit::WebBackForwardListProxy::close):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::releasePageCache):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformSetCacheModel):
* WebProcess/soup/WebProcessSoup.cpp:
(WebKit::WebProcess::platformSetCacheModel):
2015-01-27 Alexey Proskuryakov <ap@apple.com>
More build fixes for newer clang.
Rubber-stamped by Anders Carlsson.
Added missing override keywords, marked some deprecated accessibility methods as such.
* PluginProcess/EntryPoint/mac/LegacyProcess/PluginProcessMain.mm:
(WebKit::PluginProcessMainDelegate::doPreInitializationWork): Deleted.
(WebKit::PluginProcessMainDelegate::getExtraInitializationData): Deleted.
(WebKit::PluginProcessMainDelegate::doPostRunWork): Deleted.
* PluginProcess/WebProcessConnection.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
* UIProcess/Plugins/PluginProcessProxy.h:
* UIProcess/WebPageProxy.h:
* UIProcess/mac/PageClientImpl.h:
* WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
(PageOverlayClientImpl::actionContextForResultAtPoint): Deleted.
(PageOverlayClientImpl::dataDetectorsDidPresentUI): Deleted.
(PageOverlayClientImpl::dataDetectorsDidChangeUI): Deleted.
(PageOverlayClientImpl::dataDetectorsDidHideUI): Deleted.
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
(WebKit::NetscapePlugin::isBeingAsynchronouslyInitialized): Deleted.
* WebProcess/Plugins/PDF/PDFPlugin.h:
* WebProcess/Plugins/PluginProcessConnection.h:
* WebProcess/Plugins/PluginProxy.h:
(WebKit::PluginProxy::isBeingAsynchronouslyInitialized): Deleted.
* WebProcess/WebCoreSupport/WebContextMenuClient.h:
2015-01-27 Beth Dakin <bdakin@apple.com>
Immediate action gesture recognizer still doesn't work well with IB
https://bugs.webkit.org/show_bug.cgi?id=140967
-and corresponding-
rdar://problem/19621509
Reviewed by Tim Horton.
We should add (or remove) the gesture recognizer in viewDidMoveToWindow because
initWithFrame it too early and IB might mess with it.
* UIProcess/API/mac/WKView.mm:
(-[WKView viewDidMoveToWindow]):
(-[WKView initWithFrame:processPool:configuration:webView:]):
2015-01-27 Beth Dakin <bdakin@apple.com>
Invoking an immediate action on link often dismisses selection
https://bugs.webkit.org/show_bug.cgi?id=140911
-and corresponding-
rdar://problem/19572685
Reviewed by Tim Horton.
Calling _page->setMaintainsInactiveSelection(false) in complete is often
too soon. Instead, call it in dismissContentRelativeChildWindows. This is more
similar to the timing for the TextIndicator.
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController dismissContentRelativeChildWindows]):
(-[WKImmediateActionController immediateActionRecognizerWillPrepare:]):
(-[WKImmediateActionController immediateActionRecognizerDidCompleteAnimation:]):
2015-01-27 Carlos Garcia Campos <cgarcia@igalia.com>
REGRESSION(r166975): [GTK] Page overlays are not drawn anymore after r166975
https://bugs.webkit.org/show_bug.cgi?id=131433
Reviewed by Žan Doberšek.
Implement page overlays for the GTK+ port.
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
Override pure virtual setViewOverlayRootLayer().
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::display): Remove FIXME and use modern
for loop.
(WebKit::DrawingAreaImpl::attachViewOverlayGraphicsLayer): Remove
ifdefs and use LayerTreeHost::setViewOverlayRootLayer().
* WebProcess/WebPage/LayerTreeHost.h: Add pure virtual setViewOverlayRootLayer().
* WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
(WebKit::LayerTreeHostGtk::LayerTreeHostGtk): Initialize m_viewOverlayRootLayer.
(WebKit::LayerTreeHostGtk::initialize): Remove FIXME.
(WebKit::LayerTreeHostGtk::setNonCompositedContentsNeedDisplay):
Remove unused old page overlays code.
(WebKit::LayerTreeHostGtk::setNonCompositedContentsNeedDisplayInRect): Ditto.
(WebKit::LayerTreeHostGtk::sizeDidChange): Ditto.
(WebKit::LayerTreeHostGtk::paintContents): Remove FIXME.
(WebKit::LayerTreeHostGtk::flushPendingLayerChanges): Flush
compositing state on m_pageOverlayLayers if present.
(WebKit::LayerTreeHostGtk::setViewOverlayRootLayer): Set m_pageOverlayLayers.
(WebKit::LayerTreeHostGtk::createPageOverlayLayer): Deleted.
(WebKit::LayerTreeHostGtk::destroyPageOverlayLayer): Deleted.
* WebProcess/WebPage/gtk/LayerTreeHostGtk.h: Remove unused old
page overlays code.
2015-01-27 Sungmann Cho <sungmann.cho@navercorp.com>
Remove remaining PLUGIN_ARCHITECTURE(WIN) code blocks from WebKit2.
https://bugs.webkit.org/show_bug.cgi?id=140912
Reviewed by Anders Carlsson.
* Shared/Plugins/Netscape/NetscapePluginModule.cpp:
(WebKit::NetscapePluginModule::tryLoad):
* Shared/Plugins/PluginQuirks.h:
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::userAgent):
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
2015-01-26 Simon Fraser <simon.fraser@apple.com>
[iOS WK2] Fix possible crash when -[WKWebView evaluateJavaScript:completionHandler:] was called then the WKWebView is destroyed
https://bugs.webkit.org/show_bug.cgi?id=140203
rdar://problem/19198492
Reviewed by Sam Weinig.
When handling the OwnerWasInvalidated case in -[WKWebView evaluateJavaScript:completionHandler:],
the block passed to dispatch_async() needs to be retained. Fix by passing the RefPtr
to the lambda.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView evaluateJavaScript:completionHandler:]):
2015-01-26 Chris Dumez <cdumez@apple.com>
Rename Document::body() to Document::bodyOrFrameset() for clarity
https://bugs.webkit.org/show_bug.cgi?id=140902
Reviewed by Andreas Kling.
Rename Document::body() to Document::bodyOrFrameset() for clarity. This
method does not necessarily return an HTMLBodyElement, it can also
return a frameset as per the specification:
http://www.w3.org/TR/html5/dom.html#dom-tree-accessors
This method is often misused internally (the caller is only interested
in the <body> element). I will fix these instances in a follow-up patch,
this patch is only renaming mechanically.
2015-01-26 Antti Koivisto <antti@apple.com>
Add a user default for disabling network cache
https://bugs.webkit.org/show_bug.cgi?id=140904
Reviewed by Andreas Kling
defaults write com.apple.Safari WebKitNetworkCacheEnabled -bool YES/NO
* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
* Shared/Network/NetworkProcessCreationParameters.cpp:
(WebKit::NetworkProcessCreationParameters::encode):
(WebKit::NetworkProcessCreationParameters::decode):
* Shared/Network/NetworkProcessCreationParameters.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::registerUserDefaultsIfNeeded):
(WebKit::WebProcessPool::platformInitializeWebProcess):
(WebKit::WebProcessPool::platformInitializeNetworkProcess):
2015-01-26 Chris Dumez <cdumez@apple.com>
First argument to DOM traversal functions should be a reference
https://bugs.webkit.org/show_bug.cgi?id=140895
Reviewed by Antti Koivisto.
First argument to DOM traversal functions should be a reference instead
of a pointer as it is dereferenced without null-check.
2015-01-26 Beth Dakin <bdakin@apple.com>
Blacklist iBooks for WebKit's default immediate actions
https://bugs.webkit.org/show_bug.cgi?id=140854
-and corresponding-
rdar://problem/19489518
Reviewed by Tim Horton.
Blacklist iBooks.
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController _updateImmediateActionItem]):
2015-01-26 Myles C. Maxfield <mmaxfield@apple.com>
[iOS] [SVG -> OTF Converter] Flip the switch off on iOS
https://bugs.webkit.org/show_bug.cgi?id=140860
Reviewed by Darin Adler.
The fonts it makes are grotesque. (See what I did there? Typographic
humor is the best humor.)
* Configurations/FeatureDefines.xcconfig:
2015-01-26 Fabien Vallée <fvallee@connected-labs.com>
AX: crash in accessibilityRootObjectWrapper method (WebPageAccessibilityObjectAtk.cpp)
<https://bugs.webkit.org/show_bug.cgi?id=140618>
Reviewed by Chris Fleizach.
Check if document()->axObjectCache() is nullptr to fix the crash.
Similar patch has been applied on mac port:
<http://trac.webkit.org/changeset/167136>
Crash occured on <http://itv.mit-xperts.com/hbbtvtest/appmanager/>
(this page needs CEHTML / HbbTV extensions, conditions cannot
be reproduced using regression tests)
* WebProcess/WebPage/atk/WebPageAccessibilityObjectAtk.cpp:
(accessibilityRootObjectWrapper):
2015-01-26 Michael Catanzaro <mcatanzaro@igalia.com>
[GTK] gtkdoc does not appear in DevHelp
https://bugs.webkit.org/show_bug.cgi?id=139369
Reviewed by Philippe Normand.
* PlatformGTK.cmake: Include the API version in the gtkdoc filenames.
* UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: Renamed from Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-sections.txt.
* UIProcess/API/gtk/docs/webkit2gtk-4.0.types: Renamed from Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk.types.
2015-01-25 Timothy Horton <timothy_horton@apple.com>
Unresponsive Web processes sometimes throw ObjC exceptions under didPerformActionMenuHitTest:
https://bugs.webkit.org/show_bug.cgi?id=140859
<rdar://problem/19571057>
Reviewed by Darin Adler.
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController didPerformActionMenuHitTest:userData:]):
If we've already given up on this gesture (either because it was canceled or the
willBeginAnimation timeout expired), we shouldn't build a new animationController for it.
This is true both because it wouldn't look good to swap animationControllers out
from under the gesture, but also because AppKit throws an exception when you do this
and that breaks a lot of things.
2015-01-24 Chris Dumez <cdumez@apple.com>
[WK2][Cocoa] Drop WKDiagnosticLoggingResultType defines
https://bugs.webkit.org/show_bug.cgi?id=140838
Reviewed by Sam Weinig.
Drop WKDiagnosticLoggingResultType defines in _WKDiagnosticLoggingDelegate.h
header now that the client-side is correctly using
_WKDiagnosticLoggingResultType instead.
* UIProcess/API/Cocoa/_WKDiagnosticLoggingDelegate.h:
2015-01-23 Antti Koivisto <antti@apple.com>
Implement cache size limit
https://bugs.webkit.org/show_bug.cgi?id=140844
Reviewed by Andreas Kling.
Prevent the cache from growing without bounds. The simple scheme implemented here
estimates the cache size from number of entries. When the estimated size exceeds
the maximum size we randomly clear 1/4 of the entries.
* NetworkProcess/cache/NetworkCacheStorage.h:
* NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
(WebKit::NetworkCacheStorage::NetworkCacheStorage):
(WebKit::NetworkCacheStorage::initialize):
(WebKit::NetworkCacheStorage::removeEntry):
(WebKit::NetworkCacheStorage::store):
(WebKit::NetworkCacheStorage::setMaximumSize):
(WebKit::NetworkCacheStorage::clear):
(WebKit::NetworkCacheStorage::shrinkIfNeeded):
(WebKit::NetworkCacheStorage::initializeKeyFilter): Deleted.
2015-01-23 Timothy Horton <timothy_horton@apple.com>
Fix the pre-Yosemite build.
* UIProcess/API/mac/WKView.mm:
(-[WKView _dismissContentRelativeChildWindows]):
2015-01-23 Timothy Horton <timothy_horton@apple.com>
QLPreviewMenuItem popovers don't close when the page scrolls
https://bugs.webkit.org/show_bug.cgi?id=140806
<rdar://problem/19555618>
Reviewed by Beth Dakin.
Now that QLPreviewMenuItem's popover doesn't eat scrolls, we need to dismiss it if the page scrolls.
* UIProcess/API/mac/WKView.mm:
(-[WKView _dismissContentRelativeChildWindows]):
Send _dismissContentRelativeChildWindows on to WKImmediateActionController.
* UIProcess/mac/WKImmediateActionController.h:
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController _clearImmediateActionState]):
(-[WKImmediateActionController dismissContentRelativeChildWindows]):
(-[WKImmediateActionController _defaultAnimationController]):
Keep track of the active QLPreviewMenuItem, and close it upon scroll.
2015-01-23 Timothy Horton <timothy_horton@apple.com>
Infinite recursion in _clearImmediateActionState
https://bugs.webkit.org/show_bug.cgi?id=140807
<rdar://problem/19571601>
Reviewed by Anders Carlsson.
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController _clearImmediateActionState]):
Clear _hasActivatedActionContext before calling didUseActions, because
didUseActions can call _clearImmediateActionState.
2015-01-23 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add initial database process support
https://bugs.webkit.org/show_bug.cgi?id=139491
Reviewed by Sergio Villar Senin.
Add initial support for DatabaseProcess, disabled by default for
now.
* CMakeLists.txt: Add required files to compilation.
* DatabaseProcess/DatabaseProcess.cpp:
(WebKit::DatabaseProcess::createDatabaseToWebProcessConnection):
Add the unix domain sockets implementation.
* DatabaseProcess/EntryPoint/unix/DatabaseProcessMain.cpp: Added.
(main):
* DatabaseProcess/gtk/DatabaseProcessMainGtk.cpp: Added.
(WebKit::DatabaseProcessMainUnix):
* DatabaseProcess/unix/DatabaseProcessMainUnix.h: Added.
* PlatformGTK.cmake: Add required files to compilation.
* Shared/ProcessExecutablePath.h:
* Shared/gtk/KeyedDecoder.cpp: Added.
(WebKit::KeyedDecoder::KeyedDecoder):
(WebKit::KeyedDecoder::~KeyedDecoder):
(WebKit::KeyedDecoder::buildDictionaryFromGVariant):
(WebKit::KeyedDecoder::decodeBytes):
(WebKit::KeyedDecoder::decodeBool):
(WebKit::KeyedDecoder::decodeUInt32):
(WebKit::KeyedDecoder::decodeInt32):
(WebKit::KeyedDecoder::decodeInt64):
(WebKit::KeyedDecoder::decodeFloat):
(WebKit::KeyedDecoder::decodeDouble):
(WebKit::KeyedDecoder::decodeString):
(WebKit::KeyedDecoder::beginObject):
(WebKit::KeyedDecoder::endObject):
(WebKit::KeyedDecoder::beginArray):
(WebKit::KeyedDecoder::beginArrayElement):
(WebKit::KeyedDecoder::endArrayElement):
(WebKit::KeyedDecoder::endArray):
* Shared/gtk/KeyedDecoder.h: Added.
* Shared/gtk/KeyedEncoder.cpp: Added.
(WebKit::KeyedEncoder::KeyedEncoder):
(WebKit::KeyedEncoder::~KeyedEncoder):
(WebKit::KeyedEncoder::encodeBytes):
(WebKit::KeyedEncoder::encodeBool):
(WebKit::KeyedEncoder::encodeUInt32):
(WebKit::KeyedEncoder::encodeInt32):
(WebKit::KeyedEncoder::encodeInt64):
(WebKit::KeyedEncoder::encodeFloat):
(WebKit::KeyedEncoder::encodeDouble):
(WebKit::KeyedEncoder::encodeString):
(WebKit::KeyedEncoder::beginObject):
(WebKit::KeyedEncoder::endObject):
(WebKit::KeyedEncoder::beginArray):
(WebKit::KeyedEncoder::beginArrayElement):
(WebKit::KeyedEncoder::endArrayElement):
(WebKit::KeyedEncoder::endArray):
(WebKit::KeyedEncoder::finishEncoding):
* Shared/gtk/KeyedEncoder.h: Added.
* Shared/gtk/ProcessExecutablePathGtk.cpp:
(WebKit::executablePathOfDatabaseProcess):
* UIProcess/Databases/DatabaseProcessProxy.cpp:
(WebKit::DatabaseProcessProxy::didCreateDatabaseToWebProcessConnection):
Add the unix domain sockets implementation.
* UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
(WebKit::ProcessLauncher::launchProcess): Handle the
DatabaseProcess too.
* UIProcess/gtk/WebContextGtk.cpp:
(WebKit::WebContext::platformDefaultIndexedDBDatabaseDirectory):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::ensureWebToDatabaseProcessConnection): Add
the unix domain sockets implementation.
2015-01-22 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] Ignore synthetic click initiated on a previous page
https://bugs.webkit.org/show_bug.cgi?id=139556
rdar://problem/18586008
Reviewed by David Kilzer.
Under the right accumulation of bad luck, a synthetic click could be generated
on a page that never asked for it.
What happened was:
1) Page Foo listen to touch event.
2) In response to touch events, Foo decides to navigate to page Bar
*but* it does not cancel the native gesture recognizers with preventDefault().
3) Page Bar loads.
4) The native gesture recognizer ask us to click, we forward that to the WebProcess
and generate a synthetic mouse event.
-> Bar receives a click.
If you are unlucky enough, it looks like a single tap does a double click.
There are two ways this patch avoids the problem:
First, in the UIProcess, we just cancel the HighlightLongPressGestureRecognizer
on didCommitLoadForMainFrame. This prevents "fast clicks" from accidentally going through.
This is not bullet proof because we get didCommitLoadForMainFrame asynchronously but
killing the timer and gesture seems like a good idea.
Second, we skip any tap command at the WebProcess level when it was issued for
the previous page. This is using the same principle we used for VisibleContentRect:
any input generated before the current layer tree commit is useless for the current page.
We track the commit ID in the UIProcess when we decide to do the tracking or not.
Note that we keep the ID regardless of the tracking state, it does not matter if we have sent
touch events, what matters is what content was on screen when the touch events were handled.
If the user interaction result in a tap, we send the commit ID along the tap commands.
In the WebProcess, we know the actual layer tree commit associated with the current page.
If the tap was generated with a layer ID preceding the current page, we fail the command.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::handleTouchEventSynchronously):
(WebKit::WebPageProxy::resetState):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _didCommitLoadForMainFrame]):
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _attemptClickAtLocation:]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::commitPotentialTap):
(WebKit::WebPageProxy::handleTap):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didCommitLoad):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::handleTap):
(WebKit::WebPage::commitPotentialTap):
2015-01-22 Chris Dumez <cdumez@apple.com>
[WK2][Cocoa] Drop WKWebViewConfiguration._featureCounterEnabled SPI.
https://bugs.webkit.org/show_bug.cgi?id=140799
Reviewed by Dan Bernstein.
Drop WKWebViewConfiguration._featureCounterEnabled SPI now that the
client-side has been updated.
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration _setAllowsAlternateFullscreen:]):
(-[WKWebViewConfiguration _featureCounterEnabled]): Deleted.
(-[WKWebViewConfiguration _setFeatureCounterEnabled:]): Deleted.
* UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
2015-01-22 Antti Koivisto <antti@apple.com>
Fix ENABLE(NETWORK_CACHE) build
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::didFinishLoading):
2015-01-22 Timothy Horton <timothy_horton@apple.com>
UserData decoding of WKTypeRefWrapper always fails
https://bugs.webkit.org/show_bug.cgi?id=140791
<rdar://problem/19438402>
Reviewed by Anders Carlsson.
* Shared/mac/ObjCObjectGraph.mm:
(WebKit::ObjCObjectGraph::decode):
Add a missing break.
2015-01-22 Ryosuke Niwa <rniwa@webkit.org>
Add a build flag for ES6 class syntax
https://bugs.webkit.org/show_bug.cgi?id=140760
Reviewed by Michael Saboff.
* Configurations/FeatureDefines.xcconfig:
2015-01-22 Chris Dumez <cdumez@apple.com>
Drop the legacy FeatureCounter class
https://bugs.webkit.org/show_bug.cgi?id=140749
Reviewed by Andreas Kling.
Drop the legacy FeatureCounter class and use DiagnosticLoggingClient
instead.
* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration init]):
(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration _featureCounterEnabled]):
(-[WKWebViewConfiguration _setFeatureCounterEnabled:]):
* UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::willStartUserTriggeredZooming):
2015-01-22 Beth Dakin <bdakin@apple.com>
ibtoold crash below -[WebView close]
https://bugs.webkit.org/show_bug.cgi?id=140782
-and corresponding-
rdar://problem/19558472
Reviewed by Tim Horton.
Retain the NSImmediateActionGestureRecognizer. This should not be necessary, but
it is because interface builder can mess with our views.
* UIProcess/mac/WKImmediateActionController.h:
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController willDestroyView:]):
(-[WKImmediateActionController _cancelImmediateAction]):
(-[WKImmediateActionController _cancelImmediateActionIfNeeded]):
(-[WKImmediateActionController _updateImmediateActionItem]):
2015-01-22 David Kilzer <ddkilzer@apple.com>
[iOS] Fix iphoneos SDK builds for ios-ews queue
<http://webkit.org/b/140748>
Reviewed by Daniel Bates.
* Platform/spi/ios/BKSProcessAssertionSPI.h: Add -invalidate
definition. Sort @property to the top of BKSProcessAssertion.
2015-01-22 Shivakumar JM <shiva.jm@samsung.com>
Fix build warning in WebKit2/UIProcess module
https://bugs.webkit.org/show_bug.cgi?id=140758
Reviewed by Csaba Osztrogonác.
Fix build warnings by using UNUSED_PARAM macro
* UIProcess/API/C/WKPageGroup.cpp:
(WKPageGroupAddUserContentFilter):
(WKPageGroupRemoveAllUserContentFilters):
2014-11-06 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Use API::ContextMenuClient and API::InjectedBundle::PageContextMenuClient classes
https://bugs.webkit.org/show_bug.cgi?id=138467
Reviewed by Gustavo Noronha Silva.
* UIProcess/API/gtk/WebKitContextMenu.cpp:
(webkitContextMenuPopulate): Add a version that receives a Vector<WebContextMenuItemData>&.
(webkitContextMenuCreate): Change it to receive a const
Vector<WebContextMenuItemData>& instead of a API::Array* and also
add a another version that receives const Vector<ContextMenuItem>&.
* UIProcess/API/gtk/WebKitContextMenuClient.cpp:
(attachContextMenuClientToView): Use a class derived from
API::ContextMenuClient to implement the context menu client.
(getContextMenuFromProposedMenu): Deleted.
* UIProcess/API/gtk/WebKitContextMenuItem.cpp:
(webkitContextMenuItemCreate): Change it to receive a const
WebContextMenuItemData& and added another version that receives a
const ContextMenuItem&.
* UIProcess/API/gtk/WebKitContextMenuItemPrivate.h:
* UIProcess/API/gtk/WebKitContextMenuPrivate.h:
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewPopulateContextMenu): Remove the creation of a
WebHitTestResult::Data, since it receives it now as parameter.
* UIProcess/API/gtk/WebKitWebViewPrivate.h:
* WebProcess/InjectedBundle/API/gtk/WebKitWebHitTestResult.cpp:
(webkitWebHitTestResultCreate): Change it to receive a const
HitTestResult& instead of const InjectedBundleHitTestResult&.
* WebProcess/InjectedBundle/API/gtk/WebKitWebHitTestResultPrivate.h:
* WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
(webkitWebPageCreate): Use a class derived from
API::InjectedBundle::PageContextMenuClient to implement the
context menu client.
(getContextMenuFromDefaultMenu): Deleted.
2015-01-22 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Try to fix Debug build after r178889.
* UIProcess/API/C/WKPage.cpp: Include Logging.h.
2015-01-21 Carlos Garcia Campos <cgarcia@igalia.com>
Add API::ContextMenuClient and API::InjectedBundle::PageContextMenuClient classes
https://bugs.webkit.org/show_bug.cgi?id=138466
Reviewed by Anders Carlsson.
Move ContextMenuClient to use API classes in both UI and Injected
Bundle APIs.
* CMakeLists.txt: Remove WebPageContextMenuClient.cpp.
* UIProcess/API/APIContextMenuClient.h: Renamed from Source/WebKit2/UIProcess/WebPageContextMenuClient.h.
(API::ContextMenuClient::~ContextMenuClient):
(API::ContextMenuClient::getContextMenuFromProposedMenu):
(API::ContextMenuClient::customContextMenuItemSelected):
(API::ContextMenuClient::contextMenuDismissed):
(API::ContextMenuClient::showContextMenu):
(API::ContextMenuClient::hideContextMenu):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageContextMenuClient):
* UIProcess/WebPageContextMenuClient.cpp: Removed.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::setContextMenuClient):
(WebKit::WebPageProxy::close):
(WebKit::WebPageProxy::internalShowContextMenu):
(WebKit::WebPageProxy::contextMenuItemSelected):
(WebKit::WebPageProxy::initializeContextMenuClient): Deleted.
* UIProcess/WebPageProxy.h:
* WebKit2.xcodeproj/project.pbxproj: Remove deleted files and add
new files to compilation.
* WebProcess/InjectedBundle/API/APIInjectedBundlePageContextMenuClient.h: Copied from Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.h.
(API::InjectedBundle::PageContextMenuClient::~PageContextMenuClient):
(API::InjectedBundle::PageContextMenuClient::getCustomMenuFromDefaultItems):
(API::InjectedBundle::PageContextMenuClient::prepareForActionMenu):
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageSetContextMenuClient):
* WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
(WebKit::InjectedBundlePageContextMenuClient::InjectedBundlePageContextMenuClient):
(WebKit::InjectedBundlePageContextMenuClient::getCustomMenuFromDefaultItems):
(WebKit::InjectedBundlePageContextMenuClient::prepareForActionMenu):
* WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.h:
* WebProcess/WebPage/WebContextMenu.cpp:
(WebKit::WebContextMenu::menuItemsWithUserData):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::setInjectedBundleContextMenuClient):
(WebKit::WebPage::close):
(WebKit::WebPage::initializeInjectedBundleContextMenuClient): Deleted.
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::injectedBundleContextMenuClient):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performActionMenuHitTestAtLocation):
2015-01-20 Jon Honeycutt <jhoneycutt@apple.com>
[iOS] WebKitTestRunner: Tests fail due to incorrect web view size
<https://bugs.webkit.org/show_bug.cgi?id=139736>
<rdar://problem/19282196>
This starts happening after we fail to reset the test controller to
consistent values in TestInvocation::invoke(). When we terminate the
web process and relaunch it, the new WebPage object created in the web
process is using the default ViewportConfiguration with dimensions of
1024x768.
The PageClient on iOS currently notifies the WKWebView and the
WKContentView when the web process is relaunched. This patch extends
that to also notify the WKView.
Reviewed by Benjamin Poulain.
* UIProcess/API/Cocoa/WKViewPrivate.h:
Declare -_didRelaunchProcess.
* UIProcess/API/ios/WKViewIOS.mm:
(-[WKView _commonInitializationWithContextRef:pageGroupRef:relatedToPage:]):
Call the new method that accepts a WKView.
(-[WKView _didRelaunchProcess]):
Call -_frameOrBoundsChanged to update the web process's size to the
size of the WKView.
* UIProcess/ios/PageClientImplIOS.h:
Add a constructor that takes a WKView, and add a member var to hold it.
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::PageClientImpl):
Implement the constructor that takes a WKView.
(WebKit::PageClientImpl::didRelaunchProcess):
Tell the WKView that the web process relaunched.
* UIProcess/ios/WKContentView.h:
Declare an initializer that takes a WKView.
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _commonInitializationWithProcessPool:configuration:]):
Split out from -[WKContentView initWithFrame:processPool:configuration:webView:].
(-[WKContentView initWithFrame:processPool:configuration:webView:]):
Perform some initialization, including creating the PageClient, and
call the common initializer.
(-[WKContentView initWithFrame:processPool:configuration:wkView:]):
Ditto.
2015-01-21 Sam Weinig <sam@webkit.org>
Add WKPageGroupRef SPI for user content filters
https://bugs.webkit.org/show_bug.cgi?id=140728
Reviewed by Anders Carlsson.
While Safari is transitioning to WKUserContentController, it is useful
for them to have access to have access to content filters on the page group
where they currently have user content related functionality.
* Shared/WebPageGroupData.cpp:
(WebKit::WebPageGroupData::encode):
(WebKit::WebPageGroupData::decode):
* Shared/WebPageGroupData.h:
* UIProcess/API/C/WKPageGroup.cpp:
(WKPageGroupAddUserContentFilter):
(WKPageGroupRemoveAllUserContentFilters):
* UIProcess/API/C/WKPageGroup.h:
* UIProcess/WebPageGroup.cpp:
(WebKit::WebPageGroup::addUserContentFilter):
(WebKit::WebPageGroup::removeAllUserContentFilters):
* UIProcess/WebPageGroup.h:
* WebProcess/WebPage/WebPageGroupProxy.cpp:
(WebKit::WebPageGroupProxy::WebPageGroupProxy):
(WebKit::WebPageGroupProxy::addUserContentFilter):
(WebKit::WebPageGroupProxy::removeAllUserContentFilters):
* WebProcess/WebPage/WebPageGroupProxy.h:
* WebProcess/WebPage/WebPageGroupProxy.messages.in:
2015-01-21 Beth Dakin <bdakin@apple.com>
Crash in QuickLook preview delegate method
https://bugs.webkit.org/show_bug.cgi?id=140740
-and corresponding-
rdar://problem/19540806
Reviewed by Tim Horton.
Clear out the delegate.
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController willDestroyView:]):
2015-01-21 Zan Dobersek <zdobersek@igalia.com>
AsyncRequestImpl casting in AsyncRequest::completeRequest() is incorrect
https://bugs.webkit.org/show_bug.cgi?id=139724
Reviewed by Darin Adler.
AsyncRequestImpl casting in AsyncRequest::completeRequest() relies on
the parameter pack to properly determine the type of the AsyncRequestImpl
object. The casting result can be incorrect when an argument is passed
by reference while the original object was constructed with a callback
that expects an argument that's passed by value.
To avoid this the AsyncRequestImpl template is now instantiated with
raw types, with callback parameters remaining raw types in case
of being integral (enforcing passing-by-value these arguments when
dispatching), and const references being used otherwise (enforcing
passing-by-reference).
This enables casting AsyncRequest objects to the correct AsyncRequestImpl<>
by running the parameter pack through std::decay.
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::putRecord):
(WebKit::UniqueIDBDatabase::getRecord):
(WebKit::UniqueIDBDatabase::openCursor):
(WebKit::UniqueIDBDatabase::cursorAdvance):
(WebKit::UniqueIDBDatabase::cursorIterate):
(WebKit::UniqueIDBDatabase::count):
(WebKit::UniqueIDBDatabase::deleteRange):
* Shared/AsyncRequest.h:
(WebKit::AsyncRequest::completeRequest):
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
(WebKit::WebIDBServerConnection::getOrEstablishIDBDatabaseMetadata):
(WebKit::WebIDBServerConnection::get):
2015-01-21 Chris Dumez <cdumez@apple.com>
[WK2] Stop using WKDiagnosticLoggingResultType.h C API header in Cocoa API
https://bugs.webkit.org/show_bug.cgi?id=140655
Reviewed by Anders Carlsson.
Stop using WKDiagnosticLoggingResultType.h C API header in Cocoa API.
Instead, introduce a new _WKDiagnosticLoggingResultType enum in
_WKDiagnosticLoggingDelegate.h.
A few defines mapping WKDiagnosticLoggingResultType enum and its values
to the new _WKDiagnosticLoggingResultType are temporarily added until
the client-side is transitioned.
* UIProcess/API/Cocoa/_WKDiagnosticLoggingDelegate.h:
* UIProcess/Cocoa/DiagnosticLoggingClient.mm:
(WebKit::toWKDiagnosticLoggingResultType):
(WebKit::DiagnosticLoggingClient::logDiagnosticMessageWithResult):
2015-01-21 Zan Dobersek <zdobersek@igalia.com>
[WK2] Use C++ lambdas in ProcessLauncher class
https://bugs.webkit.org/show_bug.cgi?id=138186
Reviewed by Darin Adler.
Replace uses of WTF::bind() in the ProcessLauncher class with C++ lambdas.
* UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
(WebKit::ProcessLauncher::launchProcess):
* UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
(WebKit::ProcessLauncher::launchProcess):
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::connectToService):
(WebKit::tryPreexistingProcess):
(WebKit::createProcess):
2015-01-21 Zan Dobersek <zdobersek@igalia.com>
Clean up ViewUpdateDispatcher
https://bugs.webkit.org/show_bug.cgi?id=140619
Reviewed by Darin Adler.
* WebProcess/WebPage/ViewUpdateDispatcher.cpp:
(WebKit::ViewUpdateDispatcher::visibleContentRectUpdate):
Replace WTF::bind() with a C++ lambda.
(WebKit::ViewUpdateDispatcher::dispatchVisibleContentRectUpdate):
Use WTF::move() to move the HashMap member into the local variable.
2015-01-21 Csaba Osztrogonác <ossy@webkit.org>
Remove ENABLE(INSPECTOR) ifdef guards
https://bugs.webkit.org/show_bug.cgi?id=140668
Reviewed by Darin Adler.
* Configurations/FeatureDefines.xcconfig:
* Shared/API/c/WKSharedAPICast.h:
(WebKit::toAPI):
(WebKit::toImpl):
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<ResourceRequest>::encode):
(IPC::ArgumentCoder<ResourceRequest>::decode):
* UIProcess/API/C/WKInspector.cpp:
(WKInspectorGetTypeID):
(WKInspectorGetPage):
(WKInspectorIsConnected):
(WKInspectorIsVisible):
(WKInspectorIsFront):
(WKInspectorConnect):
(WKInspectorShow):
(WKInspectorHide):
(WKInspectorClose):
(WKInspectorShowConsole):
(WKInspectorShowResources):
(WKInspectorShowMainResourceForFrame):
(WKInspectorIsAttached):
(WKInspectorAttach):
(WKInspectorDetach):
(WKInspectorIsProfilingPage):
(WKInspectorTogglePageProfiling):
* UIProcess/API/C/WKPage.cpp:
(WKPageGetInspector):
* UIProcess/API/efl/ewk_view.cpp:
(ewk_view_inspector_show):
(ewk_view_inspector_close):
* UIProcess/API/efl/tests/test_ewk2_view.cpp:
(TEST_F):
* UIProcess/PageClient.h:
* UIProcess/WebInspectorProxy.cpp:
* UIProcess/WebInspectorProxy.h:
* UIProcess/WebInspectorProxy.messages.in:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::reattachToWebProcess):
(WebKit::WebPageProxy::maybeInitializeSandboxExtensionHandle):
(WebKit::WebPageProxy::resetState):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::getLaunchOptions):
* UIProcess/efl/WebInspectorProxyEfl.cpp:
* UIProcess/gtk/WebInspectorProxyGtk.cpp:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::disableInspectorNodeSearch):
* UIProcess/ios/WebInspectorProxyIOS.mm:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::disableInspectorNodeSearch):
* UIProcess/mac/WebInspectorProxyMac.mm:
* WebProcess/InjectedBundle/API/c/WKBundleInspector.cpp:
(WKBundleInspectorGetTypeID):
(WKBundleInspectorShow):
(WKBundleInspectorClose):
(WKBundleInspectorEvaluateScriptForTest):
(WKBundleInspectorSetPageProfilingEnabled):
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageGetInspector):
* WebProcess/WebCoreSupport/WebInspectorClient.cpp:
* WebProcess/WebCoreSupport/WebInspectorClient.h:
* WebProcess/WebCoreSupport/WebInspectorFrontendClient.h:
* WebProcess/WebPage/WebInspector.cpp:
* WebProcess/WebPage/WebInspector.h:
* WebProcess/WebPage/WebInspector.messages.in:
* WebProcess/WebPage/WebInspectorUI.cpp:
* WebProcess/WebPage/WebInspectorUI.h:
* WebProcess/WebPage/WebInspectorUI.messages.in:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::~WebPage):
(WebKit::WebPage::close):
(WebKit::WebPage::inspectorUI):
(WebKit::WebPage::didReceiveMessage):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/efl/WebInspectorEfl.cpp:
* WebProcess/WebPage/efl/WebInspectorUIEfl.cpp:
* WebProcess/WebPage/gtk/WebInspectorGtk.cpp:
* WebProcess/WebPage/gtk/WebInspectorUIGtk.cpp:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::disableInspectorNodeSearch):
* WebProcess/WebPage/mac/WebInspectorMac.mm:
* WebProcess/WebPage/mac/WebInspectorUIMac.mm:
* config.h:
2015-01-20 Martin Hock <mhock@apple.com>
[iOS][WK2] Redraw find-in-page indicator on rotation
https://bugs.webkit.org/show_bug.cgi?id=140632
<rdar://problem/18858394>
Reviewed by Tim Horton.
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::redraw): Add method to redraw find indicator (only used by iOS).
* WebProcess/WebPage/FindController.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::mainFrameDidLayout):
* WebProcess/WebPage/ios/FindControllerIOS.mm:
(WebKit::FindController::updateFindIndicator): Redraw should not trigger zoom.
2015-01-20 David Kilzer <ddkilzer@apple.com>
Switch to comparing PLATFORM_NAME in terms of macosx
<http://webkit.org/b/139516>
Reviewed by Timothy Hatcher.
* WebKit2.xcodeproj/project.pbxproj:
* mac/rewrite-availability-macros.sh: Remove the else block that
checked for an unknown PLATFORM_NAME.
2015-01-19 Simon Fraser <simon.fraser@apple.com>
Add a way to collect scrolling performance data (viewport tile coverage) with UI-side compositing
https://bugs.webkit.org/show_bug.cgi?id=140474
Reviewed by Tim Horton.
Add a private method to enable scrolling data collection to WKWebView. When enabled, create
a RemoteLayerTreeScrollingPerformanceData object that collects "blank pixel" data on
every layer tree commit and scroll, and stores them in a vector. A second SPI call
allows retrieval of an NSArray of this data.
To allow RemoteLayerTreeScrollingPerformanceData to find the correct layer which
contains the main tile grid, we set a layer name on the appropriate layer (even
in release builds).
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView visibleRectInScreenCoordinates]):
(-[WKWebView _didCommitLayerTree:]):
(-[WKWebView scrollViewDidScroll:]):
(-[WKWebView _setScrollPerformanceDataCollectionEnabled:]):
(-[WKWebView _scrollPerformanceDataCollectionEnabled]):
(-[WKWebView _scrollPerformanceData]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/Cocoa/RemoteLayerTreeScrollingPerformanceData.h: Added.
(WebKit::RemoteLayerTreeScrollingPerformanceData::BlankPixelCount::BlankPixelCount):
* UIProcess/Cocoa/RemoteLayerTreeScrollingPerformanceData.mm: Added.
(WebKit::RemoteLayerTreeScrollingPerformanceData::RemoteLayerTreeScrollingPerformanceData):
(WebKit::RemoteLayerTreeScrollingPerformanceData::~RemoteLayerTreeScrollingPerformanceData):
(WebKit::RemoteLayerTreeScrollingPerformanceData::didCommitLayerTree):
(WebKit::RemoteLayerTreeScrollingPerformanceData::didScroll):
(WebKit::RemoteLayerTreeScrollingPerformanceData::BlankPixelCount::canCoalesce):
(WebKit::RemoteLayerTreeScrollingPerformanceData::appendBlankPixelCount):
(WebKit::RemoteLayerTreeScrollingPerformanceData::data):
(WebKit::findTileGridContainerLayer):
(WebKit::RemoteLayerTreeScrollingPerformanceData::blankPixelCount):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::setScrollPerformanceDataCollectionEnabled):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::scrollPerformanceDataCollectionEnabled):
(WebKit::WebPageProxy::scrollingPerformanceData):
* WebKit2.xcodeproj/project.pbxproj:
2015-01-19 Dean Jackson <dino@apple.com>
Support "plus-darker" in mix-blend mode
https://bugs.webkit.org/show_bug.cgi?id=140646
<rdar://problem/19523370>
Reviewed by Simon Fraser.
Output the appropriate blending type when logging.
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTextStream::operator<<):
2015-01-20 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Update OptionsGTK.cmake and NEWS for 2.7.4 release.
* gtk/NEWS: Add release notes for 2.7.4.
2015-01-20 Tomas Popela <tpopela@redhat.com>
[GTK] Add API to set the web view editable into WebKit2 GTK+ API
https://bugs.webkit.org/show_bug.cgi?id=139443
Reviewed by Carlos Garcia Campos.
Provide a way to set the web view editable, without accessing the DOM
and setting the contenteditable attribute to elements.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewSetProperty):
(webkitWebViewGetProperty):
(webkit_web_view_class_init):
(webkit_web_view_is_editable):
(webkit_web_view_set_editable):
* UIProcess/API/gtk/WebKitWebView.h:
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
2015-01-20 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add an option to create WebKitWebView snapshots with transparent background
https://bugs.webkit.org/show_bug.cgi?id=140617
Reviewed by Gustavo Noronha Silva.
Add WEBKIT_SNAPSHOT_OPTIONS_TRANSPARENT_BACKGROUND flag to not
fill with white the background before rendering the snapshot.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkit_web_view_get_snapshot): Pass a TransparentBackground
boolean argument to the WEbProcess.
* UIProcess/API/gtk/WebKitWebView.h:
* WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
(webkitWebPageDidReceiveMessage): Set the FrameView background as
transparent when TransparentBackground option is True before
rendering the snapshot.
2015-01-19 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add API to change the WebKitWebView background color
https://bugs.webkit.org/show_bug.cgi?id=140610
Reviewed by Gustavo Noronha Silva.
When a color different than the default one (opaque white) is
used, the SetDrawsBackground message is sent to the WebProcess with
a False value to indicate WebCore to not render backgrounds. The
background color passed is saved in the WebPageProxy and used by
the backing store to fill the background before the actual
contents are rendered in the WebView.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkit_web_view_set_background_color):
(webkit_web_view_get_background_color):
* UIProcess/API/gtk/WebKitWebView.h:
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy): Initialize m_backgroundColor member.
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::backgroundColor): Return m_backgroundColor.
(WebKit::WebPageProxy::setBackgroundColor): Set m_backgroundColor.
* UIProcess/cairo/BackingStoreCairo.cpp:
(WebKit::BackingStore::incorporateUpdate): Fill the damage region
with the WebPageProxy background color when the WebProcess is not
rendering backgrounds. If the background color is not fully opaque
we need to clear the region before filling it with the color.
2015-01-19 Myles C. Maxfield <mmaxfield@apple.com>
[SVG -> OTF Converter] Flip the switch on
https://bugs.webkit.org/show_bug.cgi?id=140592
Reviewed by Antti Koivisto.
* Configurations/FeatureDefines.xcconfig:
2015-01-19 Mark Rowe <mrowe@apple.com>
<https://webkit.org/b/140504> REGRESSION (r178452): Visited link coloring only appears to work in the first web process
Roll out r178452 since it broke visited link coloring.
Reviewed by Anders Carlsson.
* UIProcess/VisitedLinkProvider.cpp:
(WebKit::VisitedLinkProvider::~VisitedLinkProvider):
(WebKit::VisitedLinkProvider::addProcess):
(WebKit::VisitedLinkProvider::removeProcess):
(WebKit::VisitedLinkProvider::removeAll):
(WebKit::VisitedLinkProvider::webProcessWillOpenConnection):
(WebKit::VisitedLinkProvider::webProcessDidCloseConnection):
(WebKit::VisitedLinkProvider::pendingVisitedLinksTimerFired):
(WebKit::VisitedLinkProvider::resizeTable):
* UIProcess/VisitedLinkProvider.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::processDidFinishLaunching):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::disconnect):
(WebKit::WebProcessProxy::addVisitedLinkProvider):
(WebKit::WebProcessProxy::didDestroyVisitedLinkProvider):
* UIProcess/WebProcessProxy.h:
2015-01-19 Sam Weinig <sam@webkit.org>
Sprinkle some CTTE on API::PolicyClient and API::FormClient
https://bugs.webkit.org/show_bug.cgi?id=140656
Reviewed by Tim Horton.
- Use references rather than pointers where possible.
- Store and pass the listeners as Refs.
- Make API::FormClient more like API::PolicyClient by making it the
responsibility of the client implementation to call the default policy.
* UIProcess/API/APIFormClient.h:
(API::FormClient::willSubmitForm):
* UIProcess/API/APIPolicyClient.h:
(API::PolicyClient::decidePolicyForNavigationAction):
(API::PolicyClient::decidePolicyForNewWindowAction):
(API::PolicyClient::decidePolicyForResponse):
(API::PolicyClient::unableToImplementPolicy):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPagePolicyClient):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _setFormDelegate:]):
* UIProcess/API/gtk/WebKitPolicyClient.cpp:
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
(WebKit::NavigationState::PolicyClient::decidePolicyForNewWindowAction):
(WebKit::NavigationState::PolicyClient::decidePolicyForResponse):
* UIProcess/WebFormClient.cpp:
(WebKit::WebFormClient::willSubmitForm):
* UIProcess/WebFormClient.h:
* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::setUpPolicyListenerProxy):
(WebKit::WebFrameProxy::setUpFormSubmissionListenerProxy):
* UIProcess/WebFrameProxy.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::decidePolicyForNewWindowAction):
(WebKit::WebPageProxy::decidePolicyForResponse):
(WebKit::WebPageProxy::unableToImplementPolicy):
(WebKit::WebPageProxy::willSubmitForm):
2015-01-18 Sam Weinig <sam@webkit.org>
Merge API::ProcessPoolConfiguration and _WKProcessPoolConfiguration
https://bugs.webkit.org/show_bug.cgi?id=140601
Reviewed by Anders Carlsson.
- Converts _WKProcessPoolConfiguration to be backed via API::ProcessPoolConfiguration.
- Expands API::ProcessPoolConfiguration to add all the parameters necessary to fully
initialize a WebProcessPool. This allows -[WKProcessPool _initWithConfiguration:] to
be a simple pass through initializer, which in turn allows us to consider WebProcessPools
created on the C++ and Objective-C sides as equivalent.
- Makes WebProcessPool own the reference to the API::ProcessPoolConfiguration (rather than
the WKProcessPool wrapper).
* Shared/Cocoa/APIObject.mm:
(API::Object::newObject):
Create the API::ProcessPoolConfigurations using [_WKProcessPoolConfiguration alloc] as its
storage..
* UIProcess/API/APIProcessPoolConfiguration.cpp:
(API::ProcessPoolConfiguration::create):
(API::ProcessPoolConfiguration::createWithLegacyOptions):
(API::ProcessPoolConfiguration::ProcessPoolConfiguration):
(API::ProcessPoolConfiguration::~ProcessPoolConfiguration):
(API::ProcessPoolConfiguration::copy):
(API::ProcessPoolConfiguration::webProcessPoolConfiguration): Deleted.
* UIProcess/API/APIProcessPoolConfiguration.h:
Add the remaining initialization parameters and add a convenience create function
for configuring legacy WebProcessPools (for use by the C-SPI).
* UIProcess/API/APIWebsiteDataStore.cpp:
(API::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation):
* UIProcess/API/APIWebsiteDataStore.h:
* UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
(API::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation):
(API::WebsiteDataStore::defaultDataStoreConfiguration):
Expose helper for getting the website data directories for use in the ProcessPoolConfiguration.
* UIProcess/API/C/WKContext.cpp:
(WKContextCreate):
(WKContextCreateWithInjectedBundlePath):
(WKContextCreateWithConfiguration):
Use ProcessPoolConfiguration::createWithLegacyOptions() to keep backwards compatibility.
* UIProcess/API/C/WKContextConfigurationRef.cpp:
(WKContextConfigurationCreate):
Update for ProcessPoolConfiguration::create() returning a Ref. Note, this function
was not changed to call ProcessPoolConfiguration::createWithLegacyOptions() since
it has not been around long enough to warrant it.
* UIProcess/API/Cocoa/WKProcessGroup.mm:
(-[WKProcessGroup initWithInjectedBundleURL:]):
Use ProcessPoolConfiguration::createWithLegacyOptions() to keep backwards compatibility.
* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool description]):
Change to pull the configuration from the underlying API::Object.
(-[WKProcessPool _configuration]):
Change to pull the configuration from the underlying API::Object and call the new
copy() helper on it.
(-[WKProcessPool _initWithConfiguration:]):
Convert to be a simple pass through to API::Object::constructInWrapper.
(websiteDataDirectoryURL): Deleted.
Moved to APIWebsiteDataStore.h
* UIProcess/API/Cocoa/WKProcessPoolInternal.h:
Removes the _WKProcessPoolConfiguration member, now that it is stored on the WebProcessPool.
* UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
(-[_WKProcessPoolConfiguration init]):
(-[_WKProcessPoolConfiguration dealloc]):
Added to support API::Object bridging.
(-[_WKProcessPoolConfiguration injectedBundleURL]):
(-[_WKProcessPoolConfiguration setInjectedBundleURL:]):
Convert to getting the URL from the underlying object. Moved the exception
that used to be on creation of the WKProcessPool.
(-[_WKProcessPoolConfiguration maximumProcessCount]):
(-[_WKProcessPoolConfiguration setMaximumProcessCount:]):
Convert to getting the count from the underlying object.
(-[_WKProcessPoolConfiguration cachePartitionedURLSchemes]):
Convert to constructing the NSArray on demand from the underlying Vector.
(-[_WKProcessPoolConfiguration setCachePartitionedURLSchemes:]):
Converts the NSArray to a Vector rather than storing the array.
* UIProcess/API/Cocoa/_WKProcessPoolConfigurationInternal.h: Added.
(API::wrapper):
Add boilerplate for API::Object bridging.
* UIProcess/API/gtk/WebKitWebContext.cpp:
(webkitWebContextConstructed):
Update to use API::ProcessPoolConfiguration::createWithLegacyOptions() to keep backwards compatibility.
* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::inspectorProcessPool):
Update to call API::ProcessPoolConfiguration::createWithLegacyOptions().
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::create):
(WebKit::websiteDataStoreConfiguration):
(WebKit::WebProcessPool::WebProcessPool):
(WebKit::WebProcessPool::applyPlatformSpecificConfigurationDefaults): Deleted.
This functionality was moved to the constructor of the API::ProcessPoolConfiguration.
* UIProcess/WebProcessPool.h:
Changed to take (and store) a API::ProcessPoolConfiguration rather than the WebProcessPoolConfiguration.
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::legacyPlatformDefaultWebSQLDatabaseDirectory):
(WebKit::WebProcessPool::legacyPlatformDefaultIndexedDBDatabaseDirectory):
(WebKit::WebProcessPool::legacyPlatformDefaultLocalStorageDirectory):
(WebKit::WebProcessPool::legacyPlatformDefaultMediaKeysStorageDirectory):
(WebKit::WebProcessPool::platformDefaultWebSQLDatabaseDirectory): Deleted.
(WebKit::WebProcessPool::platformDefaultIndexedDBDatabaseDirectory): Deleted.
(WebKit::WebProcessPool::platformDefaultLocalStorageDirectory): Deleted.
(WebKit::WebProcessPool::platformDefaultMediaKeysStorageDirectory): Deleted.
* UIProcess/efl/WebContextEfl.cpp:
(WebKit::WebProcessPool::legacyPlatformDefaultWebSQLDatabaseDirectory):
(WebKit::WebProcessPool::legacyPlatformDefaultIndexedDBDatabaseDirectory):
(WebKit::WebProcessPool::legacyPlatformDefaultLocalStorageDirectory):
(WebKit::WebProcessPool::legacyPlatformDefaultMediaKeysStorageDirectory):
(WebKit::WebProcessPool::platformDefaultWebSQLDatabaseDirectory): Deleted.
(WebKit::WebProcessPool::platformDefaultIndexedDBDatabaseDirectory): Deleted.
(WebKit::WebProcessPool::platformDefaultLocalStorageDirectory): Deleted.
(WebKit::WebProcessPool::platformDefaultMediaKeysStorageDirectory): Deleted.
* UIProcess/gtk/WebProcessPoolGtk.cpp:
(WebKit::WebProcessPool::legacyPlatformDefaultWebSQLDatabaseDirectory):
(WebKit::WebProcessPool::legacyPlatformDefaultIndexedDBDatabaseDirectory):
(WebKit::WebProcessPool::legacyPlatformDefaultLocalStorageDirectory):
(WebKit::WebProcessPool::legacyPlatformDefaultMediaKeysStorageDirectory):
(WebKit::WebProcessPool::platformDefaultWebSQLDatabaseDirectory): Deleted.
(WebKit::WebProcessPool::platformDefaultIndexedDBDatabaseDirectory): Deleted.
(WebKit::WebProcessPool::platformDefaultLocalStorageDirectory): Deleted.
(WebKit::WebProcessPool::platformDefaultMediaKeysStorageDirectory): Deleted.
Renamed to make it clear these were the legacy locations for these directories.
* WebKit2.xcodeproj/project.pbxproj:
Added new files.
2015-01-19 Beth Dakin <bdakin@apple.com>
Speculative build fix.
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:processPool:configuration:webView:]):
2015-01-19 Timothy Horton <timothy_horton@apple.com>
Adjust naming of action menu SPI
https://bugs.webkit.org/show_bug.cgi?id=140644
<rdar://problem/19448129>
Reviewed by Brian Weinstein.
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:processPool:configuration:webView:]):
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController prepareForMenu:withEvent:]):
(-[WKActionMenuController willOpenMenu:withEvent:]):
(-[WKActionMenuController didCloseMenu:withEvent:]):
(-[WKActionMenuController menuNeedsUpdate:]):
(-[WKActionMenuController _updateActionMenuItems]):
2015-01-19 Zan Dobersek <zdobersek@igalia.com>
[CoordinatedGraphics] Use C++ lambda instead of WTF::bind() in ThreadedCompositor::updateSceneState()
https://bugs.webkit.org/show_bug.cgi?id=140613
Reviewed by Carlos Garcia Campos.
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
(WebKit::ThreadedCompositor::updateSceneState): Replace the use of WTF::bind() with a C++ lambda.
2015-01-19 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r178653.
https://bugs.webkit.org/show_bug.cgi?id=140634
Broke multiple SVG tests on Mountain Lion (Requested by ap on
#webkit).
Reverted changeset:
"[SVG -> OTF Converter] Flip the switch on"
https://bugs.webkit.org/show_bug.cgi?id=140592
http://trac.webkit.org/changeset/178653
2015-01-19 Dean Jackson <dino@apple.com>
Add "override" to fix the build with newer clangs.
* UIProcess/Cocoa/WebProcessProxyCocoa.mm:
(WebKit::WebProcessProxy::transformHandlesToObjects):
(WebKit::WebProcessProxy::transformObjectsToHandles):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::transformObjectsToHandles):
* UIProcess/ios/WebVideoFullscreenManagerProxy.h:
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::transformHandlesToObjects):
(WebKit::WebProcess::transformObjectsToHandles):
2015-01-19 Myles C. Maxfield <mmaxfield@apple.com>
[SVG -> OTF Converter] Flip the switch on
https://bugs.webkit.org/show_bug.cgi?id=140592
Reviewed by Antti Koivisto.
* Configurations/FeatureDefines.xcconfig:
2015-01-18 Daniel Bates <dabates@apple.com>
Attempt to fix the iOS build after <http://trac.webkit.org/changeset/178631>
(https://bugs.webkit.org/show_bug.cgi?id=129441)
* UIProcess/WKInspectorHighlightView.mm:
(-[WKInspectorHighlightView update:]): Substitute HighlightType::Node and
HighlightType::Rects for HighlightTypeNode and HighlightTypeRects, respectively.
* WebProcess/WebCoreSupport/WebInspectorClient.cpp:
(WebKit::WebInspectorClient::highlight): Pass lvalue reference to WebCore::Highlight
instead of pointer in call to InspectorController::getHighlight().
2015-01-18 Sam Weinig <sam@webkit.org>
Fix style issues and add availability macros missed in r178634
https://bugs.webkit.org/show_bug.cgi?id=140597
Reviewed by Dan Bernstein.
* UIProcess/API/Cocoa/WKUserContentControllerPrivate.h:
Add missing availability macros.
* UIProcess/API/Cocoa/_WKUserContentFilter.h:
* UIProcess/API/Cocoa/_WKUserContentFilter.mm:
(-[_WKUserContentFilter initWithName:serializedRules:]):
(-[_WKUserContentFilter _initWithName:serializedRules:]): Deleted.
Removed unnecessary leading underscore from init method.
2015-01-17 Sam Weinig <sam@webkit.org>
Add initial experimental user content filtering API
https://bugs.webkit.org/show_bug.cgi?id=140584
Reviewed by Benjamin Poulain.
Moves content filtering from being per-ProcessPool to per-UserContentController.
* Shared/API/APIObject.h:
* Shared/API/c/WKBase.h:
* UIProcess/API/APIUserContentFilter.cpp: Added.
(API::UserContentFilter::UserContentFilter):
(API::UserContentFilter::~UserContentFilter):
* UIProcess/API/APIUserContentFilter.h: Added.
* UIProcess/API/C/WKAPICast.h:
* UIProcess/API/C/WKUserContentFilterRef.cpp: Added.
(WKUserContentFilterGetTypeID):
(WKUserContentFilterCreate):
* UIProcess/API/C/WKUserContentFilterRef.h: Added.
* UIProcess/API/C/WebKit2_C.h:
* UIProcess/API/Cocoa/_WKUserContentFilter.h: Added.
* UIProcess/API/Cocoa/_WKUserContentFilter.mm: Added.
(WKUserContentControllerAddUserContentFilter):
(WKUserContentControllerRemoveAllUserContentFilters):
(-[_WKUserContentFilter _initWithName:ruleList:]):
* UIProcess/API/Cocoa/_WKUserContentFilterInternal.h: Added.
Add a basic UserContentFilter type and expose it via both the Objective-C API (as _WKUserContentFilter)
and via the C SPI (as WKUserContentFilterRef).
* UIProcess/API/C/WKUserContentControllerRef.h:
* UIProcess/API/C/WKUserContentControllerRef.cpp:
Add C-SPI to set and remove WKUserContentFilterRefs.
* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _loadContentExtensionWithIdentifier:serializedRules:successCompletionHandler:errorCompletionHandler:]): Deleted.
* UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::processDidFinishLaunching):
(WebKit::WebProcessPool::loadContentExtension): Deleted.
* UIProcess/WebProcessPool.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::loadContentExtension): Deleted.
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:
Remove the old SPI for loading content filters that was per-ProcessPool. Content filters now follow
the same pattern as UserScripts and UserStyleSheets as being per-UserContentController.
* UIProcess/API/Cocoa/WKUserContentController.mm:
(-[WKUserContentController _addUserContentFilter:]):
(-[WKUserContentController _removeAllUserContentFilters]):
* UIProcess/API/Cocoa/WKUserContentControllerInternal.h:
* UIProcess/API/Cocoa/WKUserContentControllerPrivate.h: Added.
* UIProcess/UserContent/WebUserContentControllerProxy.cpp:
(WebKit::WebUserContentControllerProxy::WebUserContentControllerProxy):
(WebKit::WebUserContentControllerProxy::addProcess):
(WebKit::WebUserContentControllerProxy::addUserContentFilter):
(WebKit::WebUserContentControllerProxy::removeAllUserContentFilters):
* UIProcess/UserContent/WebUserContentControllerProxy.h:
* WebProcess/UserContent/WebUserContentController.cpp:
(WebKit::WebUserContentController::addUserContentFilters):
(WebKit::WebUserContentController::removeAllUserContentFilters):
* WebProcess/UserContent/WebUserContentController.h:
* WebProcess/UserContent/WebUserContentController.messages.in:
Pipe user content filters over to all the WebProcesses that the UserContentController is
connected to.
* WebKit2.xcodeproj/project.pbxproj:
Add new files.
2015-01-17 Chris Dumez <cdumez@apple.com>
[WK2][iOS] Add Cocoa delegate for logging diagnostic messages
https://bugs.webkit.org/show_bug.cgi?id=140410
Reviewed by Sam Weinig.
Add Cocoa delegate for logging diagnostic messages.
* UIProcess/API/APIDiagnosticLoggingClient.h: Copied from Source/WebKit2/UIProcess/WebPageDiagnosticLoggingClient.h.
(API::DiagnosticLoggingClient::~DiagnosticLoggingClient):
(API::DiagnosticLoggingClient::logDiagnosticMessage):
(API::DiagnosticLoggingClient::logDiagnosticMessageWithResult):
(API::DiagnosticLoggingClient::logDiagnosticMessageWithValue):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageDiagnosticLoggingClient):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
(-[WKWebView _diagnosticLoggingDelegate]):
(-[WKWebView _setDiagnosticLoggingDelegate:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/API/Cocoa/_WKDiagnosticLoggingDelegate.h: Copied from Source/WebKit2/UIProcess/WebPageDiagnosticLoggingClient.h.
* UIProcess/Cocoa/DiagnosticLoggingClient.h: Copied from Source/WebKit2/UIProcess/WebPageDiagnosticLoggingClient.h.
* UIProcess/Cocoa/DiagnosticLoggingClient.mm: Added.
(WebKit::DiagnosticLoggingClient::DiagnosticLoggingClient):
(WebKit::DiagnosticLoggingClient::delegate):
(WebKit::DiagnosticLoggingClient::setDelegate):
(WebKit::DiagnosticLoggingClient::logDiagnosticMessage):
(WebKit::DiagnosticLoggingClient::logDiagnosticMessageWithResult):
(WebKit::DiagnosticLoggingClient::logDiagnosticMessageWithValue):
* UIProcess/WebPageDiagnosticLoggingClient.cpp:
(WebKit::WebPageDiagnosticLoggingClient::WebPageDiagnosticLoggingClient):
* UIProcess/WebPageDiagnosticLoggingClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::setDiagnosticLoggingClient):
(WebKit::WebPageProxy::close):
(WebKit::WebPageProxy::logDiagnosticMessage):
(WebKit::WebPageProxy::logDiagnosticMessageWithResult):
(WebKit::WebPageProxy::logDiagnosticMessageWithValue):
(WebKit::WebPageProxy::initializeDiagnosticLoggingClient): Deleted.
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::diagnosticLoggingClient):
* WebKit2.xcodeproj/project.pbxproj:
2015-01-17 David Kilzer <ddkilzer@apple.com>
REGRESSION (r178618): Change to WKWebViewConfiguration broke iOS build
<https://bugs.webkit.org/show_bug.cgi?id=140559>
Blind fix to address the following build failure:
Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm:79:7: error: interface type cannot be statically allocated
T m_value;
^
*
Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm:94:55: note: in instantiation of template class 'LazyInitialized<WKWebViewContentProviderRegistry>' requested here
LazyInitialized<WKWebViewContentProviderRegistry> _contentProviderRegistry;
^
Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm:53:21: error: assigning to 'WKWebViewContentProviderRegistry *' from incompatible type 'RetainPtr<WKWebViewContentProviderRegistry *>'
m_value = f();
^ ~~~
Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm:222:37: note: in instantiation of function template specialization 'LazyInitialized<WKWebViewContentProviderRegistry>::get<(lambda at Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm:222:41)>' requested here
return _contentProviderRegistry.get([] { return adoptNS([[WKWebViewContentProviderRegistry alloc] init]); });
^
Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm:57:24: error: property 'get' not found on object of type 'WKWebViewContentProviderRegistry *'
return m_value.get();
^
3 errors generated.
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm: Change
_contentProviderRegistry to be a LazyInitialized<RetainPtr<>> to
match other instance variables.
2015-01-16 Sam Weinig <sam@webkit.org>
Add a basic configuration object for WKView
https://bugs.webkit.org/show_bug.cgi?id=140559
Reviewed by Anders Carlsson.
- Adds WKPageConfigurationRef (backed by API::PageConfiguration). WKWebView configuration
is not yet bridged to this, but that will happen soon. For now, it has a few basic
configuration options.
- Adds WKUserContentControllerRef as C-SPI version of WKUserContentController.
- Adds WKUserScriptRef as C-SPI version of WKUserScript.
* Shared/API/APIObject.h:
* Shared/API/c/WKBase.h:
* Shared/API/c/WKSharedAPICast.h:
(WebKit::toWKUserScriptInjectionTime):
* UIProcess/API/APIPageConfiguration.cpp: Added.
(API::PageConfiguration::PageConfiguration):
(API::PageConfiguration::~PageConfiguration):
(API::PageConfiguration::processPool):
(API::PageConfiguration::setProcessPool):
(API::PageConfiguration::userContentController):
(API::PageConfiguration::setUserContentController):
(API::PageConfiguration::pageGroup):
(API::PageConfiguration::setPageGroup):
(API::PageConfiguration::preferences):
(API::PageConfiguration::setPreferences):
(API::PageConfiguration::relatedPage):
(API::PageConfiguration::setRelatedPage):
(API::PageConfiguration::webPageConfiguration):
* UIProcess/API/APIPageConfiguration.h: Added.
(API::PageConfiguration::create):
* UIProcess/API/APIUserScript.cpp: Added.
(API::generateIdentifier):
(API::UserScript::generateUniqueURL):
* UIProcess/API/APIUserScript.h:
* UIProcess/API/C/WKAPICast.h:
* UIProcess/API/C/WKPageConfigurationRef.cpp: Added.
(WKPageConfigurationGetTypeID):
(WKPageConfigurationCreate):
(WKPageConfigurationGetContext):
(WKPageConfigurationSetContext):
(WKPageConfigurationGetPageGroup):
(WKPageConfigurationSetPageGroup):
(WKPageConfigurationGetUserContentController):
(WKPageConfigurationSetUserContentController):
(WKPageConfigurationGetPreferences):
(WKPageConfigurationSetPreferences):
(WKPageConfigurationGetRelatedPage):
(WKPageConfigurationSetRelatedPage):
* UIProcess/API/C/WKPageConfigurationRef.h: Added.
* UIProcess/API/C/WKUserContentControllerRef.cpp: Added.
(WKUserContentControllerGetTypeID):
(WKUserContentControllerCreate):
(WKUserContentControllerCopyUserScripts):
(WKUserContentControllerAddUserScript):
(WKUserContentControllerRemoveAllUserScripts):
* UIProcess/API/C/WKUserContentControllerRef.h: Added.
* UIProcess/API/C/WKUserScriptRef.cpp: Added.
(WKUserScriptGetTypeID):
(WKUserScriptCreateWithSource):
(WKUserScriptCopySource):
(WKUserScriptGetInjectionTime):
(WKUserScriptGetMainFrameOnly):
* UIProcess/API/C/WKUserScriptRef.h: Added.
* UIProcess/API/C/WebKit2_C.h:
* UIProcess/API/Cocoa/WKUserScript.mm:
(-[WKUserScript initWithSource:injectionTime:forMainFrameOnly:]):
(generateIdentifier): Deleted.
* UIProcess/API/Cocoa/WKViewPrivate.h:
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(LazyInitialized::get):
(LazyInitialized::set):
(LazyInitialized::peek):
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:configurationRef:]):
* UIProcess/UserContent/WebUserContentControllerProxy.h:
(WebKit::WebUserContentControllerProxy::create):
* WebKit2.xcodeproj/project.pbxproj:
2015-01-16 Anders Carlsson <andersca@apple.com>
Pass the connection along to WebProcessLifetimeTracker
https://bugs.webkit.org/show_bug.cgi?id=140569
Reviewed by Andreas Kling.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::connectionWillOpen):
(WebKit::WebPageProxy::connectionDidClose):
* UIProcess/WebProcessLifetimeTracker.cpp:
(WebKit::WebProcessLifetimeTracker::connectionWillOpen):
(WebKit::WebProcessLifetimeTracker::connectionDidClose):
(WebKit::WebProcessLifetimeTracker::connectionWillClose): Deleted.
* UIProcess/WebProcessLifetimeTracker.h:
2015-01-16 Anders Carlsson <andersca@apple.com>
More WebPageProxy CTTE
https://bugs.webkit.org/show_bug.cgi?id=140565
Reviewed by Andreas Kling.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::connectionWillOpen):
(WebKit::WebPageProxy::connectionDidClose):
(WebKit::WebPageProxy::connectionWillClose): Deleted.
* UIProcess/WebPageProxy.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::connectionWillOpen):
(WebKit::WebProcessProxy::connectionDidClose):
2015-01-16 Anders Carlsson <andersca@apple.com>
Remove dead code
https://bugs.webkit.org/show_bug.cgi?id=140563
Reviewed by Geoffrey Garen.
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::processWillOpenConnection): Deleted.
(WebKit::WebProcessPool::processWillCloseConnection): Deleted.
* UIProcess/WebProcessPool.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::connectionWillOpen):
(WebKit::WebProcessProxy::connectionDidClose):
2015-01-16 Anders Carlsson <andersca@apple.com>
Sprinkle some CTTE in ChildProcessProxy member functions
https://bugs.webkit.org/show_bug.cgi?id=140562
Reviewed by Andreas Kling.
* Shared/ChildProcessProxy.cpp:
(WebKit::ChildProcessProxy::didFinishLaunching):
(WebKit::ChildProcessProxy::clearConnection):
(WebKit::ChildProcessProxy::connectionWillOpen):
(WebKit::ChildProcessProxy::connectionDidClose):
(WebKit::ChildProcessProxy::connectionWillClose): Deleted.
* Shared/ChildProcessProxy.h:
* UIProcess/Databases/DatabaseProcessProxy.cpp:
(WebKit::DatabaseProcessProxy::connectionWillOpen): Deleted.
(WebKit::DatabaseProcessProxy::connectionWillClose): Deleted.
* UIProcess/Databases/DatabaseProcessProxy.h:
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::connectionWillOpen):
(WebKit::NetworkProcessProxy::connectionWillClose): Deleted.
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::connectionWillOpen):
(WebKit::WebProcessProxy::connectionDidClose):
(WebKit::WebProcessProxy::connectionWillClose): Deleted.
* UIProcess/WebProcessProxy.h:
* UIProcess/mac/SecItemShimProxy.cpp:
(WebKit::SecItemShimProxy::initializeConnection):
* UIProcess/mac/SecItemShimProxy.h:
2015-01-16 Beth Dakin <bdakin@apple.com>
Should cancel immediate action sooner in WK2
https://bugs.webkit.org/show_bug.cgi?id=140561
-and corresponding-
rdar://problem/19490114
Reviewed by Tim Horton.
_cancelImmediateActionIfNeeded will cancel the immediate action if there is no
animation controller or if the DDActionContext doesnt want to use its actions.
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController _cancelImmediateActionIfNeeded]):
Call _cancelImmediateActionIfNeeded to cancel earlier.
(-[WKImmediateActionController didPerformActionMenuHitTest:userData:]):
Re-factor this code to use the newly-added method _cancelImmediateActionIfNeeded
(-[WKImmediateActionController immediateActionRecognizerWillBeginAnimation:]):
2015-01-16 Anders Carlsson <andersca@apple.com>
Don't try to send SetSession messages before the web page has been constructed in the web process
https://bugs.webkit.org/show_bug.cgi?id=140558
Reviewed by Andreas Kling.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
We already send the session ID along in the page creation parameters so just message the network process
if we need to create an ephemeral session.
(WebKit::WebPageProxy::setSessionID):
Add an isValid call for good measure.
2015-01-16 Anders Carlsson <andersca@apple.com>
Log unhandled messages in the web process
https://bugs.webkit.org/show_bug.cgi?id=140549
Reviewed by Andreas Kling.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::didReceiveSyncMessage):
(WebKit::WebProcess::didReceiveMessage):
2015-01-16 Shivakumar JM <shiva.jm@samsung.com>
Fix build warning in WebKit2/UIProcess module.
https://bugs.webkit.org/show_bug.cgi?id=140538
Reviewed by Csaba Osztrogonác.
Fix build warnings by removing parameter name from functions
* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::processWillOpenConnection):
(WebKit::StorageManager::processDidCloseConnection):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::processWillOpenConnection):
(WebKit::WebProcessPool::processWillCloseConnection):
2015-01-15 Csaba Osztrogonác <ossy@webkit.org>
Remove ENABLE(SQL_DATABASE) guards
https://bugs.webkit.org/show_bug.cgi?id=140434
Reviewed by Darin Adler.
* Configurations/FeatureDefines.xcconfig:
* Shared/OriginAndDatabases.cpp:
* Shared/OriginAndDatabases.h:
* Shared/WebCoreArgumentCoders.cpp:
* UIProcess/API/C/WKContext.cpp:
(WKContextGetDatabaseManager):
* UIProcess/API/C/WKDatabaseManager.cpp:
(WKDatabaseManagerGetTypeID):
(WKDatabaseManagerGetOriginKey):
(WKDatabaseManagerGetOriginQuotaKey):
(WKDatabaseManagerGetOriginUsageKey):
(WKDatabaseManagerGetDatabaseDetailsKey):
(WKDatabaseManagerGetDatabaseDetailsNameKey):
(WKDatabaseManagerGetDatabaseDetailsDisplayNameKey):
(WKDatabaseManagerGetDatabaseDetailsExpectedUsageKey):
(WKDatabaseManagerGetDatabaseDetailsCurrentUsageKey):
(WKDatabaseManagerGetDatabaseDetailsCreationTimeKey):
(WKDatabaseManagerGetDatabaseDetailsModificationTimeKey):
(WKDatabaseManagerSetClient):
(WKDatabaseManagerGetDatabasesByOrigin):
(WKDatabaseManagerGetDatabaseOrigins):
(WKDatabaseManagerDeleteDatabasesWithNameForOrigin):
(WKDatabaseManagerDeleteDatabasesForOrigin):
(WKDatabaseManagerDeleteAllDatabases):
(WKDatabaseManagerSetQuotaForOrigin):
* UIProcess/API/efl/EwkView.cpp:
(EwkView::informDatabaseQuotaReached):
* UIProcess/WebDatabaseManagerProxy.cpp:
* UIProcess/WebDatabaseManagerProxy.h:
* UIProcess/WebDatabaseManagerProxy.messages.in:
* UIProcess/WebProcessPool.cpp:
* UIProcess/efl/PageUIClientEfl.cpp:
(WebKit::PageUIClientEfl::PageUIClientEfl):
(WebKit::PageUIClientEfl::exceededDatabaseQuota):
* UIProcess/efl/PageUIClientEfl.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::clearAllDatabases):
(WebKit::InjectedBundle::setDatabaseQuota):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::exceededDatabaseQuota):
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
* WebProcess/WebCoreSupport/WebDatabaseManager.h:
* WebProcess/WebCoreSupport/WebDatabaseManager.messages.in:
* WebProcess/WebCoreSupport/WebSQLiteDatabaseTracker.cpp:
* WebProcess/WebCoreSupport/WebSQLiteDatabaseTracker.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess):
2015-01-15 Anders Carlsson <andersca@apple.com>
Add a connection parameter to StorageManager willOpen/didClose functions
https://bugs.webkit.org/show_bug.cgi?id=140527
Reviewed by Tim Horton.
Rename processWillCloseConnection to processDidCloseConnection and pass connections
to both functions since in the near future we won't be able to get the connection from
the web process proxy in these scenarios.
* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::processWillOpenConnection):
(WebKit::StorageManager::processDidCloseConnection):
(WebKit::StorageManager::processWillCloseConnection): Deleted.
* UIProcess/Storage/StorageManager.h:
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::webProcessWillOpenConnection):
(WebKit::WebsiteDataStore::webProcessDidCloseConnection):
2015-01-15 Chris Dumez <cdumez@apple.com>
[WK2] Wire diagnostic logging messages through the UIProcess
https://bugs.webkit.org/show_bug.cgi?id=140486
Reviewed by Sam Weinig.
Wire diagnostic logging messages through the UIProcess.
Eventually, the corresponding bundle API should go away.
* CMakeLists.txt:
Add UIProcess/WebPageDiagnosticLoggingClient.cpp to CMake.
* Shared/API/c/WKDiagnosticLoggingResultType.h:
Extract WKDiagnosticLoggingResultType enumeration from
WKBundlePageDiagnosticLoggingClient.h into its own header so that
it can be shared with the new WKPageDiagnosticLoggingClient.h.
* Shared/API/c/WKSharedAPICast.h:
(WebKit::toAPI):
(WebKit::toDiagnosticLoggingResultType):
Add WebCore::DiagnosticLoggingResultType <-> WKDiagnosticLoggingResultType
casting functions.
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageDiagnosticLoggingClient):
* UIProcess/API/C/WKPage.h:
Add WKPage API so that the application can set the DiagnosticLoggingClient.
* UIProcess/API/C/WKPageDiagnosticLoggingClient.h: Added.
New WK2 diagnostic logging client that will eventually replace the existing
WKBundlePageDiagnosticLoggingClient.h injected bundle client.
* UIProcess/WebPageDiagnosticLoggingClient.cpp: Copied from Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.cpp.
* UIProcess/WebPageDiagnosticLoggingClient.h: Copied from Source/WebCore/page/DiagnosticLoggingClient.h.
* UIProcess/WebPageProxy.cpp:
* UIProcess/WebPageProxy.h:
Handle new IPC messages for logging diagnostic messages.
* UIProcess/WebPageProxy.messages.in:
Add 3 IPC messages for logging diagnostic messages.
* WebKit2.xcodeproj/project.pbxproj:
Add new files to XCode project.
* WebProcess/InjectedBundle/API/c/WKBundlePageDiagnosticLoggingClient.h:
Remove WKDiagnosticLoggingResultType enum as it was moved to its own
header.
* WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.cpp:
* WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.h:
Use WebCore::DiagnosticLoggingResultType enum type instead of
WKDiagnosticLoggingResultType and call toAPI() to convert to
WKDiagnosticLoggingResultType type.
* WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
(WebKit::WebDiagnosticLoggingClient::logDiagnosticMessage):
(WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithResult):
(WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithValue):
Send IPC to WebPageProxy in addition to calling the injected bundle client.
* WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.h:
Use new DiagnosticLoggingResultType enum instead of the old LogType one.
2015-01-15 Dan Bernstein <mitz@apple.com>
Added availability annotations to modern Cocoa SPI.
Rubber-stamped by Anders Carlsson.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
2015-01-15 Anders Carlsson <andersca@apple.com>
Fix assertions on the Mountain Lion bots.
It is allowed to call addWorkQueueMessageReceiver even if the connection is open
so remove that assertion.
* Platform/IPC/Connection.cpp:
(IPC::Connection::addWorkQueueMessageReceiver):
2015-01-15 Joseph Pecoraro <pecoraro@apple.com>
Unreviewed build fix after r178536.
Initialize member variables in the proper order.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
2015-01-15 Enrica Casucci <enrica@apple.com>
[WK2] Add support for fully editable WKWebView.
https://bugs.webkit.org/show_bug.cgi?id=140515
Reviewed by Anders Carlsson.
WKWebView has now a new property (_editable) to control
the editability of the entire content.
* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _isEditable]):
(-[WKWebView _setEditable:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/API/mac/WKView.mm:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::setEditable):
(WebKit::WebPageProxy::creationParameters):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::isEditable):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setEditable):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
2015-01-15 Anders Carlsson <andersca@apple.com>
Clearing the website data store should clear local storage
https://bugs.webkit.org/show_bug.cgi?id=140507
Reviewed by Andreas Kling.
* Shared/WebsiteData/WebsiteDataTypes.h:
Add WebsiteDataTypeLocalStorage.
* UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
Add WKWebsiteDataTypeLocalStorage
* UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
(toWebsiteDataTypes):
Handle WKWebsiteDataTypeLocalStorage.
* UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
(WebKit::fileModificationTime):
Use an early return.
(WebKit::LocalStorageDatabaseTracker::deleteDatabasesModifiedSince):
Change this to take an std::chrono::system_clock::time_point and don't
try to modifiy m_origins while iterating it.
* UIProcess/Storage/LocalStorageDatabaseTracker.h:
Update declarations.
* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::deleteLocalStorageOriginsModifiedSince):
Change this to take an std::chrono::system_clock::time_point.
* UIProcess/Storage/StorageManager.h:
Update declarations.
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::removeData):
Remove data from the storage manager as well.
2015-01-15 Anders Carlsson <andersca@apple.com>
Give WebsiteDataStore a StorageManager
https://bugs.webkit.org/show_bug.cgi?id=140505
Reviewed by Andreas Kling.
The process pool storage manager is still around but is only used for clearing data. It will be removed
completely in an upcoming commit.
* UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
(API::WebsiteDataStore::defaultDataStoreConfiguration):
Set up the local storage directory.
* UIProcess/API/Cocoa/WKProcessPool.mm:
(websiteDataDirectoryURL):
Export this so it can be called from APIWebsiteDataStoreCocoa.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::createNewPage):
Call WebsiteDataStore::cloneSessionData instead.
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::websiteDataStore):
Add getter.
* UIProcess/WebProcessPool.cpp:
(WebKit::websiteDataStoreConfiguration):
Update this to take a WebProcessPoolConfiguration object and assign the local storage directory.
(WebKit::WebProcessPool::WebProcessPool):
Pass the configuration to websiteDataStoreConfiguration.
(WebKit::WebProcessPool::processWillOpenConnection):
(WebKit::WebProcessPool::processWillCloseConnection):
Remove storage manager calls.
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::WebsiteDataStore):
When creating a persistent data store, also create a storage manager.
(WebKit::WebsiteDataStore::cloneSessionData):
Clone the session storage namespace.
(WebKit::WebsiteDataStore::webPageWasAdded):
Create a session storage namespace for this page.
(WebKit::WebsiteDataStore::webPageWasRemoved):
Destroy the session storage namespace.
(WebKit::WebsiteDataStore::webProcessWillOpenConnection):
Tell the storage manager about the new process connection.
(WebKit::WebsiteDataStore::webPageWillOpenConnection):
Set the allowed connection.
(WebKit::WebsiteDataStore::webPageDidCloseConnection):
Clear the allowed connection.
(WebKit::WebsiteDataStore::webProcessDidCloseConnection):
Tell the storage manager that the process connection has been closed.
* UIProcess/WebsiteData/WebsiteDataStore.h:
Add new members.
2015-01-15 Anders Carlsson <andersca@apple.com>
More work on the lifetime observer
https://bugs.webkit.org/show_bug.cgi?id=140500
Reviewed by Andreas Kling.
Add webPageWasAdded/webPageWasRemoved functions; these will be called first and last during the
lifetime of the web page. Also remove removeObserver since nobody is calling it.
* UIProcess/WebProcessLifetimeObserver.h:
(WebKit::WebProcessLifetimeObserver::webPageWasAdded):
(WebKit::WebProcessLifetimeObserver::webPageWasRemoved):
* UIProcess/WebProcessLifetimeTracker.cpp:
(WebKit::WebProcessLifetimeTracker::addObserver):
(WebKit::WebProcessLifetimeTracker::pageWasInvalidated):
(WebKit::WebProcessLifetimeTracker::removeObserver): Deleted.
* UIProcess/WebProcessLifetimeTracker.h:
2015-01-14 Anders Carlsson <andersca@apple.com>
Don't pass an allowed connection when creating a session storage namespace
https://bugs.webkit.org/show_bug.cgi?id=140482
Reviewed by Sam Weinig.
Instead, always call setAllowedSessionStorageNamespaceConnection. This will make it easier to
move the storage manager into WebsiteDataStore and make it use the process lifetime observer machinery.
* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::SessionStorageNamespace::create):
(WebKit::StorageManager::SessionStorageNamespace::SessionStorageNamespace):
(WebKit::StorageManager::createSessionStorageNamespace):
* UIProcess/Storage/StorageManager.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
2015-01-15 Carlos Garcia Campos <cgarcia@igalia.com>
REGRESSION(r177075): [GTK] Creating a second web view disables accelerated compositing in existing web view
https://bugs.webkit.org/show_bug.cgi?id=140494
Reviewed by Gustavo Noronha Silva.
The problem is that r177075 moved the creation of the redirected
XComposite window to realize method, but leaving the call to
webkitWebViewBaseUpdatePreferences() in both places Realize() and
CreateWebPage(). webkitWebViewBaseUpdatePreferences() only updates
the accelerating compositing setting nowadays, depending on
whether the redirected XComposited window could be created or not
(something that depends on whether XRender, XComposite and XDamage
extensions are available in the current display). So, when the
first web view is created, webkitWebViewBaseUpdatePreferences() is
called first from CreateWebPage(), and always disabling
accelerated compositing because the redirected window hasn't been
created yet, and then from Realize() right after the redirected
window is created so that accelerated compositing is enabled. When
the second web view is created the same happens, but since
settings are shared among web views, the first call to
webkitWebViewBaseUpdatePreferences() from CreateWebPage() disables
accelerated compositing and the web page exists accelerated
compositing mode and never enters it again unless the page is
reloaded. I guess the web page should enter accelerated
compositing mode again when the setting is enabled again from
Realize(), but since the setting is global and doesn't depend on
every web view, we should never disable it once it has been
enabled in any case.
Since we want to enable accelerated compositing mode when the
redirected XComposite window has been successfully created, we can
use the SetNativeSurfaceHandleForCompositing message to enable the
setting and remove webkitWebViewBaseUpdatePreferences().
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewUpdateSettings):
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseRealize):
(webkitWebViewBaseCreateWebPage):
(webkitWebViewBaseUpdatePreferences): Deleted.
* UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::setNativeSurfaceHandleForCompositing):
2015-01-14 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix GTK+ build after r178464.
* UIProcess/API/gtk/WebKitUserContent.cpp:
(_WebKitUserScript::_WebKitUserScript):
(webkitUserScriptGetUserScript):
* UIProcess/API/gtk/WebKitUserContentPrivate.h:
2015-01-14 Sam Weinig <sam@webkit.org>
Convert WKUserScript to be an API::Object bridged object
https://bugs.webkit.org/show_bug.cgi?id=140471
Reviewed by Dan Bernstein.
* Shared/API/APIObject.h:
* Shared/Cocoa/APIObject.mm:
(API::Object::newObject):
Add Type::UserScript.
* UIProcess/API/APIUserScript.h: Added.
Add API object for UserScripts.
* UIProcess/API/Cocoa/WKUserContentController.mm:
(-[WKUserContentController init]):
(-[WKUserContentController userScripts]):
(-[WKUserContentController addUserScript:]):
(-[WKUserContentController removeAllUserScripts]):
(toWebCoreUserScriptInjectionTime): Deleted.
* UIProcess/UserContent/WebUserContentControllerProxy.cpp:
(WebKit::WebUserContentControllerProxy::WebUserContentControllerProxy):
(WebKit::WebUserContentControllerProxy::addProcess):
(WebKit::WebUserContentControllerProxy::addUserScript):
(WebKit::WebUserContentControllerProxy::removeAllUserScripts):
* UIProcess/UserContent/WebUserContentControllerProxy.h:
(WebKit::WebUserContentControllerProxy::userScripts):
Store the WKUserScripts in the WebUserContentControllerProxy instead of the
Objective-C layer WKUserContentController, to allow creation of the object
from either the Objective-C or C++ sides.
* UIProcess/API/Cocoa/WKUserScript.mm:
(generateIdentifier):
(-[WKUserScript initWithSource:injectionTime:forMainFrameOnly:]):
(-[WKUserScript source]):
(-[WKUserScript injectionTime]):
(-[WKUserScript isForMainFrameOnly]):
(-[WKUserScript _apiObject]):
* UIProcess/API/Cocoa/WKUserScriptInternal.h:
(API::wrapper):
(API::toWebCoreUserScriptInjectionTime):
(API::toWKUserScriptInjectionTime):
Convert to get properties from the API::UserScript.
* WebKit2.xcodeproj/project.pbxproj:
Add the new file.
2015-01-14 Anders Carlsson <andersca@apple.com>
Add per page connection callbacks to the lifetime observer
https://bugs.webkit.org/show_bug.cgi?id=140475
Reviewed by Andreas Kling.
* UIProcess/WebProcessLifetimeObserver.cpp:
(WebKit::WebProcessLifetimeObserver::addWebPage):
(WebKit::WebProcessLifetimeObserver::removeWebPage):
* UIProcess/WebProcessLifetimeObserver.h:
(WebKit::WebProcessLifetimeObserver::webPageWillOpenConnection):
(WebKit::WebProcessLifetimeObserver::webPageDidCloseConnection):
2015-01-14 Anders Carlsson <andersca@apple.com>
Make WebsiteDataStore a WebProcessLifetimeObserver
https://bugs.webkit.org/show_bug.cgi?id=140472
Reviewed by Andreas Kling.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::~WebsiteDataStore):
(WebKit::WebsiteDataStore::removeData):
(WebKit::WebsiteDataStore::addWebPage): Deleted.
(WebKit::WebsiteDataStore::removeWebPage): Deleted.
* UIProcess/WebsiteData/WebsiteDataStore.h:
2015-01-14 Chris Dumez <cdumez@apple.com>
[WK2][iOS] Add private API to toggle diagnostic logging setting
https://bugs.webkit.org/show_bug.cgi?id=140464
Reviewed by Dan Bernstein.
Add private API to toggle diagnostic logging setting for iOS.
Previously, there was only a WK2 private C API for this.
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _diagnosticLoggingEnabled]):
(-[WKPreferences _setDiagnosticLoggingEnabled:]):
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:
2015-01-14 Anders Carlsson <andersca@apple.com>
Switch VisitedLinkProvider over to WebProcessLifetimeObserver
https://bugs.webkit.org/show_bug.cgi?id=140469
Reviewed by Andreas Kling.
* UIProcess/VisitedLinkProvider.cpp:
(WebKit::VisitedLinkProvider::~VisitedLinkProvider):
(WebKit::VisitedLinkProvider::removeAll):
(WebKit::VisitedLinkProvider::webProcessWillOpenConnection):
(WebKit::VisitedLinkProvider::webProcessDidCloseConnection):
(WebKit::VisitedLinkProvider::pendingVisitedLinksTimerFired):
(WebKit::VisitedLinkProvider::resizeTable):
(WebKit::VisitedLinkProvider::addProcess): Deleted.
(WebKit::VisitedLinkProvider::removeProcess): Deleted.
* UIProcess/VisitedLinkProvider.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::processDidFinishLaunching):
* UIProcess/WebProcessLifetimeObserver.cpp:
(WebKit::WebProcessLifetimeObserver::processes):
* UIProcess/WebProcessLifetimeObserver.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::disconnect):
(WebKit::WebProcessProxy::addVisitedLinkProvider): Deleted.
(WebKit::WebProcessProxy::didDestroyVisitedLinkProvider): Deleted.
* UIProcess/WebProcessProxy.h:
2015-01-14 Anders Carlsson <andersca@apple.com>
Add willOpen and didClose member functions to WebProcessLifetimeObserver
https://bugs.webkit.org/show_bug.cgi?id=140449
Reviewed by Andreas Kling.
* UIProcess/VisitedLinkProvider.cpp:
(WebKit::VisitedLinkProvider::addVisitedLinkHash):
(WebKit::VisitedLinkProvider::webProcessWillOpenConnection):
(WebKit::VisitedLinkProvider::webProcessDidCloseConnection):
* UIProcess/VisitedLinkProvider.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::close):
* UIProcess/WebProcessLifetimeObserver.cpp:
(WebKit::WebProcessLifetimeObserver::addWebPage):
(WebKit::WebProcessLifetimeObserver::removeWebPage):
* UIProcess/WebProcessLifetimeObserver.h:
(WebKit::WebProcessLifetimeObserver::webProcessWillOpenConnection):
(WebKit::WebProcessLifetimeObserver::webProcessDidCloseConnection):
2015-01-14 Dan Bernstein <mitz@apple.com>
Added availability annotations to some modern Cocoa SPI.
Rubber-stamped by Anders Carlsson.
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:
* UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
2015-01-14 Hunseop Jeong <hs85.jeong@samsung.com>
[GTK] Fix build after r178385
https://bugs.webkit.org/show_bug.cgi?id=140429
Reviewed by Csaba Osztrogonác.
* UIProcess/API/gtk/WebKitUserContentManager.cpp:
(_WebKitUserContentManagerPrivate::_WebKitUserContentManagerPrivate):
2015-01-14 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r178412.
https://bugs.webkit.org/show_bug.cgi?id=140433
Wrong fix (Requested by KaL on #webkit).
Reverted changeset:
"Unreviewed GTK build fix after r178385."
http://trac.webkit.org/changeset/178412
2015-01-12 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Do not schedule a redraw for the redirected XComposite window when not in accelerated compositing mode
https://bugs.webkit.org/show_bug.cgi?id=140354
Reviewed by Martin Robinson.
The RedirectedXCompositeWindow uses XDamage to be notified when
the XWindow has been modified. Since the redirected window is
created unconditionally we always receive a XDamage notify when
the window is mapped, and we schedule a redraw in the web view
even when the web view is not in accelerated compositing mode.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseRealize): Only call gtk_widget_queue_draw() when
in accelerated compositing mode.
2015-01-14 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Do not resize the redirected XComposite window when not in accelerated compositing mode
https://bugs.webkit.org/show_bug.cgi?id=140353
Reviewed by Martin Robinson.
We create the redirected XComposite window unconditionally, but
with a size of 1x1 to save memory. However, we are always resizing
it, so in the end we always end up with a XWindow allocated for
the same size of the web view, even for web views that never enter
in accelerated compositing mode.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewRenderAcceleratedCompositingResults): Resize the
RedirectedXCompositeWindow to the current web view size to ensure
the sizes match before drawing.
(resizeWebKitWebViewBaseFromAllocation): Only resize the
RedirectedXCompositeWindow when in accelerated compositing mode.
* UIProcess/gtk/RedirectedXCompositeWindow.cpp:
(WebKit::RedirectedXCompositeWindow::resize): Return early if the
given size is the current size.
2015-01-14 Carlos Garcia Campos <cgarcia@igalia.com>
REGRESSION(r177075): Flickering when the WebView is realized
https://bugs.webkit.org/show_bug.cgi?id=140352
Reviewed by Martin Robinson.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseRealize): Pass the parent GdkWindow to the
RedirectedXCompositeWindow constructor.
* UIProcess/gtk/RedirectedXCompositeWindow.cpp:
(WebKit::supportsXDamageAndXComposite): Get the display from the
given GdkWindow.
(WebKit::RedirectedXCompositeWindow::create): Receive a GdkWindow
instead of the Display and sise that is always 1x1.
(WebKit::RedirectedXCompositeWindow::RedirectedXCompositeWindow):
Use the passed in GdkWindow to get the Display, Visual and Depth
instead of using the window as parent and reparent afterwards.
* UIProcess/gtk/RedirectedXCompositeWindow.h:
2015-01-14 Gwang Yoon Hwang <yoon@igalia.com>
Unreviewed GTK build fix after r178385.
WebUserContentControllerProxy is not RefCounted anymore.
* UIProcess/API/gtk/WebKitUserContentManager.cpp:
(_WebKitUserContentManagerPrivate::_WebKitUserContentManagerPrivate):
2015-01-13 Chris Dumez <cdumez@apple.com>
Unreviewed GTK build fix after r178375.
uint64_t navigationID -> API::Navigation*.
* UIProcess/API/gtk/WebKitLoaderClient.cpp:
2015-01-13 Chris Dumez <cdumez@apple.com>
Unreviewed GTK build fix after r178375.
WebFrameProxy is now a reference instead of a pointer.
* UIProcess/API/gtk/WebKitLoaderClient.cpp:
2015-01-13 Chris Dumez <cdumez@apple.com>
Unreviewed GTK build fix after r178375.
WebPageProxy is now a reference instead of a pointer.
* UIProcess/API/gtk/WebKitLoaderClient.cpp:
2015-01-13 Anders Carlsson <andersca@apple.com>
Fill in more of WebProcessLifetimeTracker
https://bugs.webkit.org/show_bug.cgi?id=140418
Reviewed by Andreas Kling.
* UIProcess/WebProcessLifetimeObserver.cpp:
(WebKit::WebProcessLifetimeObserver::WebProcessLifetimeObserver):
(WebKit::WebProcessLifetimeObserver::~WebProcessLifetimeObserver):
(WebKit::WebProcessLifetimeObserver::addWebPage):
(WebKit::WebProcessLifetimeObserver::removeWebPage):
* UIProcess/WebProcessLifetimeObserver.h:
* UIProcess/WebProcessLifetimeTracker.cpp:
(WebKit::WebProcessLifetimeTracker::WebProcessLifetimeTracker):
(WebKit::WebProcessLifetimeTracker::addObserver):
(WebKit::WebProcessLifetimeTracker::connectionWillOpen):
(WebKit::WebProcessLifetimeTracker::connectionWillClose):
(WebKit::WebProcessLifetimeTracker::pageWasInvalidated):
(WebKit::WebProcessLifetimeTracker::processIsRunning):
* UIProcess/WebProcessLifetimeTracker.h:
2015-01-13 Chris Dumez <cdumez@apple.com>
Unreviewed iOS build fix after r178375.
LoaderClient::didLayout() now takes a reference to the WebPageProxy
instead of a pointer.
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::didCommitLayerTree):
2015-01-13 Sam Weinig <sam@webkit.org>
Convert WebUserContentControllerProxy to an API::Object bridged to WKUserContentController
https://bugs.webkit.org/show_bug.cgi?id=140414
Reviewed by Dan Bernstein.
* Shared/API/APIObject.h:
Add Type::UserContentController.
* Shared/Cocoa/APIObject.mm:
(API::Object::newObject):
Allocate WebUserContentControllerProxy using [WKUserContentController alloc].
* UIProcess/API/Cocoa/WKUserContentController.mm:
(-[WKUserContentController init]):
(-[WKUserContentController dealloc]):
(-[WKUserContentController _apiObject]):
* UIProcess/API/Cocoa/WKUserContentControllerInternal.h:
(WebKit::wrapper):
Convert to using API::ObjectStorage for the internal WebUserContentControllerProxy.
* UIProcess/UserContent/WebUserContentControllerProxy.cpp:
(WebKit::WebUserContentControllerProxy::create): Deleted.
* UIProcess/UserContent/WebUserContentControllerProxy.h:
Convert to inherit from API::ObjectImpl<> and remove create function.
2015-01-13 Anders Carlsson <andersca@apple.com>
Stub out more of the process lifetime tracker code
https://bugs.webkit.org/show_bug.cgi?id=140411
Reviewed by Sam Weinig.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::close):
(WebKit::WebPageProxy::connectionWillOpen):
(WebKit::WebPageProxy::connectionWillClose):
* UIProcess/WebProcessLifetimeTracker.cpp:
(WebKit::WebProcessLifetimeTracker::connectionWillOpen):
(WebKit::WebProcessLifetimeTracker::connectionWillClose):
(WebKit::WebProcessLifetimeTracker::pageWasInvalidated):
* UIProcess/WebProcessLifetimeTracker.h:
2015-01-13 Carlos Alberto Lopez Perez <clopez@igalia.com>
[CMake] Unreviewed build fix after r178366.
* CMakeLists.txt: Add new files added by r178366.
2015-01-13 Sam Weinig <sam@webkit.org>
Move more of the Navigation infrastructure down to WebPageProxy
https://bugs.webkit.org/show_bug.cgi?id=140395
Reviewed by Anders Carlsson.
* UIProcess/API/APILoaderClient.h:
(API::LoaderClient::didStartProvisionalLoadForFrame):
(API::LoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
(API::LoaderClient::didFailProvisionalLoadWithErrorForFrame):
(API::LoaderClient::didCommitLoadForFrame):
(API::LoaderClient::didFinishDocumentLoadForFrame):
(API::LoaderClient::didFinishLoadForFrame):
(API::LoaderClient::didFailLoadWithErrorForFrame):
(API::LoaderClient::didSameDocumentNavigationForFrame):
(API::LoaderClient::didReceiveTitleForFrame):
(API::LoaderClient::didFirstLayoutForFrame):
(API::LoaderClient::didFirstVisuallyNonEmptyLayoutForFrame):
(API::LoaderClient::didRemoveFrameFromHierarchy):
(API::LoaderClient::didDisplayInsecureContentForFrame):
(API::LoaderClient::didRunInsecureContentForFrame):
(API::LoaderClient::didDetectXSSForFrame):
(API::LoaderClient::didLayout):
(API::LoaderClient::canAuthenticateAgainstProtectionSpaceInFrame):
(API::LoaderClient::didReceiveAuthenticationChallengeInFrame):
(API::LoaderClient::didStartProgress):
(API::LoaderClient::didChangeProgress):
(API::LoaderClient::didFinishProgress):
(API::LoaderClient::processDidBecomeUnresponsive):
(API::LoaderClient::interactionOccurredWhileProcessUnresponsive):
(API::LoaderClient::processDidBecomeResponsive):
(API::LoaderClient::processDidCrash):
(API::LoaderClient::didChangeBackForwardList):
(API::LoaderClient::shouldKeepCurrentBackForwardListItemInList):
(API::LoaderClient::willGoToBackForwardListItem):
(API::LoaderClient::pluginLoadPolicy):
(API::LoaderClient::didFailToInitializePlugin):
(API::LoaderClient::didBlockInsecurePluginVersion):
(API::LoaderClient::webGLLoadPolicy):
(API::LoaderClient::resolveWebGLLoadPolicy):
(API::LoaderClient::didDestroyNavigation): Deleted.
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageLoaderClient):
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::LoaderClient::didStartProvisionalLoadForFrame):
(WebKit::NavigationState::LoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
(WebKit::NavigationState::LoaderClient::didFailProvisionalLoadWithErrorForFrame):
(WebKit::NavigationState::LoaderClient::didCommitLoadForFrame):
(WebKit::NavigationState::LoaderClient::didFinishDocumentLoadForFrame):
(WebKit::NavigationState::LoaderClient::didFinishLoadForFrame):
(WebKit::NavigationState::LoaderClient::didFailLoadWithErrorForFrame):
(WebKit::NavigationState::LoaderClient::didSameDocumentNavigationForFrame):
(WebKit::NavigationState::LoaderClient::didLayout):
(WebKit::NavigationState::LoaderClient::canAuthenticateAgainstProtectionSpaceInFrame):
(WebKit::NavigationState::LoaderClient::didReceiveAuthenticationChallengeInFrame):
(WebKit::NavigationState::LoaderClient::processDidCrash):
(WebKit::NavigationState::LoaderClient::didDestroyNavigation): Deleted.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didChangeBackForwardList):
(WebKit::WebPageProxy::willGoToBackForwardListItem):
(WebKit::WebPageProxy::shouldKeepCurrentBackForwardListItemInList):
(WebKit::WebPageProxy::findPlugin):
(WebKit::WebPageProxy::didStartProgress):
(WebKit::WebPageProxy::didChangeProgress):
(WebKit::WebPageProxy::didFinishProgress):
(WebKit::WebPageProxy::didDestroyNavigation):
(WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
(WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
(WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
(WebKit::WebPageProxy::didCommitLoadForFrame):
(WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
(WebKit::WebPageProxy::didFinishLoadForFrame):
(WebKit::WebPageProxy::didFailLoadForFrame):
(WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
(WebKit::WebPageProxy::didReceiveTitleForFrame):
(WebKit::WebPageProxy::didFirstLayoutForFrame):
(WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame):
(WebKit::WebPageProxy::didLayout):
(WebKit::WebPageProxy::didRemoveFrameFromHierarchy):
(WebKit::WebPageProxy::didDisplayInsecureContentForFrame):
(WebKit::WebPageProxy::didRunInsecureContentForFrame):
(WebKit::WebPageProxy::didDetectXSSForFrame):
(WebKit::WebPageProxy::webGLPolicyForURL):
(WebKit::WebPageProxy::resolveWebGLPolicyForURL):
(WebKit::WebPageProxy::processDidBecomeUnresponsive):
(WebKit::WebPageProxy::interactionOccurredWhileProcessUnresponsive):
(WebKit::WebPageProxy::processDidBecomeResponsive):
(WebKit::WebPageProxy::processDidCrash):
(WebKit::WebPageProxy::canAuthenticateAgainstProtectionSpaceInFrame):
(WebKit::WebPageProxy::didReceiveAuthenticationChallengeProxy):
(WebKit::WebPageProxy::didFailToInitializePlugin):
(WebKit::WebPageProxy::didBlockInsecurePluginVersion):
- Moves conversion from navigationID to API::Navigation into WebPageProxy
from NavigationState.
- Changes API::LoaderClient to pass WebPageProxy and WebFrameProxy by reference
rather than pointer, and to take an API::Navigation instead of a navigationID.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
Move access of the navigationID to after calling into the client bundle to avoid
passing a navigationID of a deleted navigation to the UIProcess. This problem was
caught via the WebKit2.StopLoadingDuringDidFailProvisionalLoadTest API test, which
now exercises the Navigation code path. Had that test been written using a Navigation
delegate, the issue would have happened prior to this change.
2015-01-13 Anders Carlsson <andersca@apple.com>
Begin stubbing out a per page process lifetime tracker object
https://bugs.webkit.org/show_bug.cgi?id=140399
Reviewed by Beth Dakin.
This will make it easier for certain objects that track a set of web page proxy objects
(user content controller, visited link provider, data store) to be notified when their
underlying processes come and go.
* UIProcess/WebPageProxy.h:
* UIProcess/WebProcessLifetimeObserver.cpp: Added.
* UIProcess/WebProcessLifetimeObserver.h: Added.
* UIProcess/WebProcessLifetimeTracker.cpp: Added.
(WebKit::WebProcessLifetimeTracker::WebProcessLifetimeTracker):
(WebKit::WebProcessLifetimeTracker::~WebProcessLifetimeTracker):
(WebKit::WebProcessLifetimeTracker::addObserver):
(WebKit::WebProcessLifetimeTracker::removeObserver):
* UIProcess/WebProcessLifetimeTracker.h: Added.
* WebKit2.xcodeproj/project.pbxproj:
2015-01-12 Carlos Alberto Lopez Perez <clopez@igalia.com>
[CMake] Unreviewed build fix after r178309.
* CMakeLists.txt: Rename moved files at r178309.
2015-01-11 Sam Weinig <sam@webkit.org>
Remove support for SharedWorkers
https://bugs.webkit.org/show_bug.cgi?id=140344
Reviewed by Anders Carlsson.
* Configurations/FeatureDefines.xcconfig:
* NetworkProcess/NetworkProcessPlatformStrategies.cpp:
(WebKit::NetworkProcessPlatformStrategies::createSharedWorkerStrategy): Deleted.
* NetworkProcess/NetworkProcessPlatformStrategies.h:
* WebKit2Prefix.h:
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::createSharedWorkerStrategy): Deleted.
(WebKit::WebPlatformStrategies::isAvailable): Deleted.
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:
2015-01-12 Anders Carlsson <andersca@apple.com>
Move a couple of API files to UIProcess/API.
Rubber-stamped by Tim Horton.
* UIProcess/API/APINavigationData.cpp: Renamed from Source/WebKit2/UIProcess/APINavigationData.cpp.
* UIProcess/API/APINavigationData.h: Renamed from Source/WebKit2/UIProcess/APINavigationData.h.
* UIProcess/API/APIProcessPoolConfiguration.cpp: Renamed from Source/WebKit2/UIProcess/APIProcessPoolConfiguration.cpp.
* UIProcess/API/APIProcessPoolConfiguration.h: Renamed from Source/WebKit2/UIProcess/APIProcessPoolConfiguration.h.
* UIProcess/API/APISession.cpp: Renamed from Source/WebKit2/UIProcess/APISession.cpp.
* UIProcess/API/APISession.h: Renamed from Source/WebKit2/UIProcess/APISession.h.
* WebKit2.xcodeproj/project.pbxproj:
2015-01-12 Martin Hock <mhock@apple.com>
[iOS][WK2] Push content bounds on layer tree commit to prevent drawing stale fixed position rects
https://bugs.webkit.org/show_bug.cgi?id=140264
<rdar://problem/18873545>
Reviewed by Benjamin Poulain.
When a resize occurs, we need to push the new content bounds to the web
process or stale fixed position rects may draw incorrectly.
As an example, suppose that WKWebView in UIProcess performs
_frameOrBoundsChanged with new view bounds.
Meanwhile, we'll switch to WebContentProcess and perform layout.
Switching back to UIProcess, _frameOrBoundsChanged calls WKWebView
_updateVisibleContentRects.
_updateVisibleContentRects calls WKContentView didUpdateVisibleRect with
the new bounds.
didUpdateVisibleRects in turn calls WebPageProxyIOS
computeCustomFixedPositionRect.
computeCustomFixedPositionRect asks for the content bounds from
PageClientImplIOS contentsSize which queries WKContentView's bounds
size. But those bounds are stale because the layer tree commit hasn't
occurred yet.
By informing the WKWebView of the updated content size on layer tree
commit, we ensure that the fixed position rects will be drawn correctly.
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _didCommitLayerTree:]): Push new content bounds to the web process.
2015-01-12 Myles C. Maxfield <mmaxfield@apple.com>
Allow targetting the SVG->OTF font converter with ENABLE(SVG_OTF_CONVERTER)
https://bugs.webkit.org/show_bug.cgi?id=136769
Reviewed by Antti Koivisto.
* Configurations/FeatureDefines.xcconfig:
2015-01-12 Zan Dobersek <zdobersek@igalia.com>
Clean up FrameTree::traverseNext() traversals of main frames
https://bugs.webkit.org/show_bug.cgi?id=140338
Reviewed by Andreas Kling.
There's no reason to pass the main frame as the stayWithin parameter
to FrameTree::traverseNext() when traversing over that same main frame.
* WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
(WebKit::WebContextMenuClient::searchWithSpotlight):
2015-01-12 Timothy Horton <timothy_horton@apple.com>
Multi-rect TextIndicators are vertically flipped in WebKit1
https://bugs.webkit.org/show_bug.cgi?id=140350
<rdar://problem/19441243>
Reviewed by Beth Dakin.
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<TextIndicatorData>::encode):
(IPC::ArgumentCoder<TextIndicatorData>::decode):
Adjust to the field name changes.
* UIProcess/API/mac/WKView.mm:
(-[WKView _setTextIndicator:fadeOut:]):
Convert the textBoundingRect from root view to screen coordinates.
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::updateFindIndicator):
(WebKit::FindController::drawRect):
Adjust to the new name, and use contentsToRootView when comparing against
the stored m_findIndicatorRect.
2015-01-11 Ryuan Choi <ryuan.choi@navercorp.com>
[CoordinatedGraphics] Suspend or resume when visibility is changed
https://bugs.webkit.org/show_bug.cgi?id=140285
Reviewed by Gyuyoung Kim.
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp: Copied the logic from TiledCoreAnimationDrawingArea.
(WebKit::CoordinatedDrawingArea::viewStateDidChange):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.h:
2015-01-10 Gwang Yoon Hwang <yoon@igalia.com>
[ThreadedCompositor] Prevent excessive rendering call.
https://bugs.webkit.org/show_bug.cgi?id=140297
Reviewed by Žan Doberšek.
Not to waste CPU time on waiting V-Sync interval, the update timer of
compositing thread should be throttled.
In case of updating scene state, this update timer should be called as
soon as possible. However, when CoordinatedGraphicsScene requests update
viewport to advance the animations, this call should be scheduled for
a next frame.
No new tests. No change in functionality.
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
(WebKit::CompositingRunLoop::CompositingRunLoop):
(WebKit::CompositingRunLoop::setUpdateTimer):
(WebKit::CompositingRunLoop::updateTimerFired):
(WebKit::ThreadedCompositor::setNeedsDisplay):
(WebKit::ThreadedCompositor::updateViewport):
(WebKit::ThreadedCompositor::scheduleDisplayImmediately):
(WebKit::ThreadedCompositor::didChangeVisibleRect):
(WebKit::ThreadedCompositor::scheduleDisplayIfNeeded): Deleted.
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
2015-01-09 Sam Weinig <sam@webkit.org>
Try to fix the GTK and EFL builds.
* CMakeLists.txt:
2015-01-09 Anders Carlsson <andersca@apple.com>
Get rid of the database strategy
https://bugs.webkit.org/show_bug.cgi?id=140322
Reviewed by Sam Weinig.
* NetworkProcess/NetworkProcessPlatformStrategies.cpp:
(WebKit::NetworkProcessPlatformStrategies::createDatabaseStrategy): Deleted.
* NetworkProcess/NetworkProcessPlatformStrategies.h:
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::createDatabaseStrategy): Deleted.
(WebKit::WebPlatformStrategies::getDatabaseServer): Deleted.
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:
2015-01-09 Dan Bernstein <mitz@apple.com>
[Cocoa] Remove deprecated WKRenderingProgressEvents
https://bugs.webkit.org/show_bug.cgi?id=140325
Reviewed by Anders Carlsson.
* Shared/API/Cocoa/WKRenderingProgressEvents.h: Removed.
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h:
2015-01-09 Sam Weinig <sam@webkit.org>
Move Navigation creation out of the Cocoa layer and down into the WebPageProxy level
https://bugs.webkit.org/show_bug.cgi?id=140319
Reviewed by Anders Carlsson.
- Adds WebNavigationState, a class at the WebPageProxy level to handle the creation
and storage of Navigations. Starts moving some of the functionality from NavigationState
there.
* UIProcess/API/APINavigation.cpp:
(API::Navigation::Navigation):
* UIProcess/API/APINavigation.h:
(API::Navigation::create):
(API::Navigation::navigationID):
Have each Navigation store its navigationID and generate it via the WebNavigationState
that is passed to the constructor.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView loadRequest:]):
(-[WKWebView loadFileURL:allowingReadAccessToURL:]):
(-[WKWebView loadData:MIMEType:characterEncodingName:baseURL:]):
(-[WKWebView goToBackForwardListItem:]):
(-[WKWebView goBack]):
(-[WKWebView goForward]):
(-[WKWebView reload]):
(-[WKWebView reloadFromOrigin]):
(-[WKWebView _restoreFromSessionStateData:]):
(-[WKWebView _restoreSessionState:andNavigate:]):
Update for WebPageProxy functions returning the Navigations directly, rather than
the navigationID.
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
Remove creation of the load request navigation which is now handled by the WebPageProxy.
(WebKit::NavigationState::LoaderClient::didStartProvisionalLoadForFrame):
(WebKit::NavigationState::LoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
(WebKit::NavigationState::LoaderClient::didFailProvisionalLoadWithErrorForFrame):
(WebKit::NavigationState::LoaderClient::didCommitLoadForFrame):
(WebKit::NavigationState::LoaderClient::didFinishDocumentLoadForFrame):
(WebKit::NavigationState::LoaderClient::didFinishLoadForFrame):
(WebKit::NavigationState::LoaderClient::didFailLoadWithErrorForFrame):
(WebKit::NavigationState::LoaderClient::didSameDocumentNavigationForFrame):
(WebKit::NavigationState::LoaderClient::didDestroyNavigation):
(WebKit::NavigationState::LoaderClient::processDidCrash):
Change to get/take/remove Navigations from the WebPageProxy's WebNavigationState
(WebKit::NavigationState::createLoadRequestNavigation): Deleted.
(WebKit::NavigationState::createBackForwardNavigation): Deleted.
(WebKit::NavigationState::createReloadNavigation): Deleted.
(WebKit::NavigationState::createLoadDataNavigation): Deleted.
Move Navigation creation to WebNavigationState.
* UIProcess/WebFrameListenerProxy.cpp:
(WebKit::WebFrameListenerProxy::WebFrameListenerProxy):
(WebKit::WebFrameListenerProxy::receivedPolicyDecision):
* UIProcess/WebFrameListenerProxy.h:
(WebKit::WebFrameListenerProxy::navigation):
(WebKit::WebFrameListenerProxy::setNavigation):
(WebKit::WebFrameListenerProxy::navigationID): Deleted.
(WebKit::WebFrameListenerProxy::setNavigationID): Deleted.
* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::receivedPolicyDecision):
* UIProcess/WebFrameProxy.h:
Store a Navigation rather than a navigationID on the WebFrameListenerProxy.
* UIProcess/WebNavigationState.cpp: Added.
(WebKit::WebNavigationState::WebNavigationState):
(WebKit::WebNavigationState::~WebNavigationState):
(WebKit::WebNavigationState::createLoadRequestNavigation):
(WebKit::WebNavigationState::createBackForwardNavigation):
(WebKit::WebNavigationState::createReloadNavigation):
(WebKit::WebNavigationState::createLoadDataNavigation):
(WebKit::WebNavigationState::navigation):
(WebKit::WebNavigationState::takeNavigation):
(WebKit::WebNavigationState::didDestroyNavigation):
(WebKit::WebNavigationState::clearAllNavigations):
* UIProcess/WebNavigationState.h: Added.
(WebKit::WebNavigationState::generateNavigationID):
New class to manage navigations.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::reattachToWebProcessForReload):
(WebKit::WebPageProxy::reattachToWebProcessWithItem):
(WebKit::WebPageProxy::loadRequest):
(WebKit::WebPageProxy::loadFile):
(WebKit::WebPageProxy::loadData):
(WebKit::WebPageProxy::loadHTMLString):
(WebKit::WebPageProxy::reload):
(WebKit::WebPageProxy::goForward):
(WebKit::WebPageProxy::goBack):
(WebKit::WebPageProxy::goToBackForwardItem):
(WebKit::WebPageProxy::receivedPolicyDecision):
(WebKit::WebPageProxy::restoreFromSessionState):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::generateNavigationID): Deleted.
Create navigations directly rather than generating a navigation ID and letting
the API level create Navigation.
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::navigationState):
Add WebNavigationState member and accessor.
* WebKit2.xcodeproj/project.pbxproj:
Add WebNavigationState.h/cpp
2015-01-09 Daniel Bates <dabates@apple.com>
[iOS] Make DumpRenderTree build with public SDK
https://bugs.webkit.org/show_bug.cgi?id=140311
Reviewed by Sam Weinig.
Add more SPI declarations.
* Platform/spi/ios/UIKitSPI.h:
2015-01-09 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Remove or use TimelineAgent Resource related event types
https://bugs.webkit.org/show_bug.cgi?id=140155
Reviewed by Timothy Hatcher.
* WebProcess/Network/WebResourceLoadScheduler.cpp:
(WebKit::WebResourceLoadScheduler::scheduleLoad):
2015-01-09 Daniel Bates <dabates@apple.com>
[iOS] Fix the WebKit2 build with the public SDK
Forward declare class WebView.
* Platform/spi/ios/UIKitSPI.h:
2015-01-09 Sam Weinig <sam@webkit.org>
Make WKNavigation bridged to API::Navigation (Take 2)
https://bugs.webkit.org/show_bug.cgi?id=140272
Reviewed by Dan Bernstein.
* Shared/API/APIObject.h:
Add Navigation.
* Shared/Cocoa/APIObject.mm:
(API::Object::newObject):
Bridge to WKNavigation.
* UIProcess/API/APINavigation.cpp: Added.
(API::Navigation::Navigation):
(API::Navigation::~Navigation):
* UIProcess/API/APINavigation.h: Added.
(API::Navigation::create):
(API::Navigation::request):
Add initial implementation.
* UIProcess/API/Cocoa/WKNavigation.mm:
(-[WKNavigation dealloc]):
(-[WKNavigation _request]):
(-[WKNavigation _apiObject]):
* UIProcess/API/Cocoa/WKNavigationInternal.h:
(API::wrapper):
Implement bridging to API::Navigation and get the request from the underlying object.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView loadRequest:]):
(-[WKWebView loadFileURL:allowingReadAccessToURL:]):
(-[WKWebView loadData:MIMEType:characterEncodingName:baseURL:]):
(-[WKWebView goToBackForwardListItem:]):
(-[WKWebView goBack]):
(-[WKWebView goForward]):
(-[WKWebView reload]):
(-[WKWebView reloadFromOrigin]):
(-[WKWebView _restoreSessionState:andNavigate:]):
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::createLoadRequestNavigation):
(WebKit::NavigationState::createBackForwardNavigation):
(WebKit::NavigationState::createReloadNavigation):
(WebKit::NavigationState::createLoadDataNavigation):
(WebKit::NavigationState::LoaderClient::didStartProvisionalLoadForFrame):
(WebKit::NavigationState::LoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
(WebKit::NavigationState::LoaderClient::didFailProvisionalLoadWithErrorForFrame):
(WebKit::NavigationState::LoaderClient::didCommitLoadForFrame):
(WebKit::NavigationState::LoaderClient::didFinishDocumentLoadForFrame):
(WebKit::NavigationState::LoaderClient::didFinishLoadForFrame):
(WebKit::NavigationState::LoaderClient::didFailLoadWithErrorForFrame):
(WebKit::NavigationState::LoaderClient::didSameDocumentNavigationForFrame):
Switch to storing API::Navigations.
* WebKit2.xcodeproj/project.pbxproj:
Add the new files.
2015-01-09 Gwang Yoon Hwang <yoon@igalia.com>
Rename GraphicsLayerAnimation to TextureMapperAnimation
https://bugs.webkit.org/show_bug.cgi?id=140296
Reviewed by Martin Robinson.
GraphicsLayerAnimation is changed to TextureMapperAnimation
* Scripts/webkit/messages.py:
(headers_for_type):
* Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
(IPC::ArgumentCoder<TextureMapperAnimation>::encode):
(IPC::ArgumentCoder<TextureMapperAnimation>::decode):
(IPC::ArgumentCoder<TextureMapperAnimations>::encode):
(IPC::ArgumentCoder<TextureMapperAnimations>::decode):
(IPC::ArgumentCoder<GraphicsLayerAnimation>::encode): Deleted.
(IPC::ArgumentCoder<GraphicsLayerAnimation>::decode): Deleted.
(IPC::ArgumentCoder<GraphicsLayerAnimations>::encode): Deleted.
(IPC::ArgumentCoder<GraphicsLayerAnimations>::decode): Deleted.
* Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.h:
* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
2015-01-08 Enrica Casucci <enrica@apple.com>
[iOS] Cannot paste an image URL in a plain text field in a page.
https://bugs.webkit.org/show_bug.cgi?id=140274
rdar://problem/18590809
Reviewed by Alexey Proskuryakov.
supportedPasteboardTypesForCurrentSelection should include kUTTypeURL for plain
text controls and WebArchivePboardType for rich text controls.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView supportedPasteboardTypesForCurrentSelection]): Remove obsolete and
incorrect FIXME.
2015-01-09 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r178141.
https://bugs.webkit.org/show_bug.cgi?id=140294
Broke multiple API tests (Requested by ap on #webkit).
Reverted changeset:
"Make WKNavigation bridged to API::Navigation"
https://bugs.webkit.org/show_bug.cgi?id=140272
http://trac.webkit.org/changeset/178141
2015-01-08 Benjamin Poulain <benjamin@webkit.org>
[WK2] Start a prototype for declarative site specific extensions
https://bugs.webkit.org/show_bug.cgi?id=140160
Reviewed by Andreas Kling.
Provide a small SPI for OS X. This will likely move
to a better place.
* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _loadContentExtensionWithIdentifier:serializedRules:successCompletionHandler:errorCompletionHandler:]):
* UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::processDidFinishLaunching):
(WebKit::WebProcessPool::loadContentExtension):
* UIProcess/WebProcessPool.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::loadContentExtension):
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:
2015-01-08 Sam Weinig <sam@webkit.org>
Make WKNavigation bridged to API::Navigation
https://bugs.webkit.org/show_bug.cgi?id=140272
Reviewed by Anders Carlsson.
* Shared/API/APIObject.h:
Add Navigation.
* Shared/Cocoa/APIObject.mm:
(API::Object::newObject):
Bridge to WKNavigation.
* UIProcess/API/APINavigation.cpp: Added.
(API::Navigation::Navigation):
(API::Navigation::~Navigation):
* UIProcess/API/APINavigation.h: Added.
(API::Navigation::create):
(API::Navigation::request):
Add initial implementation.
* UIProcess/API/Cocoa/WKNavigation.mm:
(-[WKNavigation dealloc]):
(-[WKNavigation _request]):
(-[WKNavigation _apiObject]):
* UIProcess/API/Cocoa/WKNavigationInternal.h:
(API::wrapper):
Implement bridging to API::Navigation and get the request from the underlying object.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView loadRequest:]):
(-[WKWebView loadFileURL:allowingReadAccessToURL:]):
(-[WKWebView loadData:MIMEType:characterEncodingName:baseURL:]):
(-[WKWebView goToBackForwardListItem:]):
(-[WKWebView goBack]):
(-[WKWebView goForward]):
(-[WKWebView reload]):
(-[WKWebView reloadFromOrigin]):
(-[WKWebView _restoreSessionState:andNavigate:]):
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::createLoadRequestNavigation):
(WebKit::NavigationState::createBackForwardNavigation):
(WebKit::NavigationState::createReloadNavigation):
(WebKit::NavigationState::createLoadDataNavigation):
(WebKit::NavigationState::LoaderClient::didStartProvisionalLoadForFrame):
(WebKit::NavigationState::LoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
(WebKit::NavigationState::LoaderClient::didFailProvisionalLoadWithErrorForFrame):
(WebKit::NavigationState::LoaderClient::didCommitLoadForFrame):
(WebKit::NavigationState::LoaderClient::didFinishDocumentLoadForFrame):
(WebKit::NavigationState::LoaderClient::didFinishLoadForFrame):
(WebKit::NavigationState::LoaderClient::didFailLoadWithErrorForFrame):
(WebKit::NavigationState::LoaderClient::didSameDocumentNavigationForFrame):
Switch to storing API::Navigations.
* WebKit2.xcodeproj/project.pbxproj:
Add the new files.
2015-01-08 Dean Jackson <dino@apple.com>
Text not drawn or white-on-white for "Close Page"/"Go Back" button on safe browsing warning page
https://bugs.webkit.org/show_bug.cgi?id=140232
Yet another attempt to get the Safari 7/8 build to work. I've moved the
stubs back into a place where they can be seen (both definition and implementation).
I also removed the previous workaround.
* Shared/API/c/WKDeprecatedFunctions.cpp:
(WKPreferencesSetApplicationChromeModeEnabled): Deleted.
(WKPreferencesGetApplicationChromeModeEnabled): Deleted.
* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetApplicationChromeModeEnabled):
(WKPreferencesGetApplicationChromeModeEnabled):
* UIProcess/API/C/WKPreferencesRefPrivate.h:
2015-01-08 Dean Jackson <dino@apple.com>
Text not drawn or white-on-white for "Close Page"/"Go Back" button on safe browsing warning page
https://bugs.webkit.org/show_bug.cgi?id=140232
Unreviewed followup to try to get the Mavericks Safari to build.
* Shared/WebPreferencesDefinitions.h: Add the application chrome mode definition.
2015-01-08 Dean Jackson <dino@apple.com>
Text not drawn or white-on-white for "Close Page"/"Go Back" button on safe browsing warning page
https://bugs.webkit.org/show_bug.cgi?id=140232
<rdar://problem/19371010>
Reviewed by Anders Carlsson.
Remove the applicationChromeMode setting, but leave stubs in to make
sure existing binaries don't break.
* Shared/API/c/WKDeprecatedFunctions.cpp:
(WKPreferencesSetApplicationChromeModeEnabled):
(WKPreferencesGetApplicationChromeModeEnabled):
* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetApplicationChromeModeEnabled): Deleted.
(WKPreferencesGetApplicationChromeModeEnabled): Deleted.
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorPageGroups::createInspectorPageGroup):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
2015-01-08 Gwang Yoon Hwang <yoon@igalia.com>
[ThreadedCompositor] Update active animations without interrupting the main-thread
https://bugs.webkit.org/show_bug.cgi?id=140245
Reviewed by Martin Robinson.
In the Threaded Compositor, CoordinatedGraphicsScene can directly
request updateViewport to the compositing thread if it has any active
animation.
To keep current behavior of CoordinatedGraphics, this patch modifies
CoordinatedGraphicsScene to remember the constructed thread as a
clientRunLoop, and dispatch updateViewport calls to clientRunLoop.
No new tests. No change in functionality.
* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
(WebKit::CoordinatedGraphicsScene::dispatchOnClientRunLoop):
(WebKit::CoordinatedGraphicsScene::CoordinatedGraphicsScene):
(WebKit::CoordinatedGraphicsScene::paintToCurrentGLContext):
(WebKit::CoordinatedGraphicsScene::updateViewport):
* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
(WebKit::ThreadedCompositor::ThreadedCompositor):
(WebKit::ThreadedCompositor::runCompositingThread):
2015-01-08 Gwang Yoon Hwang <yoon@igalia.com>
[GTK] Seperate updateBackingStore from flushCompositingState.
https://bugs.webkit.org/show_bug.cgi?id=136887
Reviewed by Žan Doberšek.
* WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
(WebKit::LayerTreeHostGtk::flushPendingLayerChanges):
Modified to call GraphicsLayerTextureMapper::updateBackingStoreIncludingSubLayers
2015-01-07 Gwang Yoon Hwang <yoon@igalia.com>
[GTK][ThreadedCompositor] Add support for threaded compositor.
https://bugs.webkit.org/show_bug.cgi?id=118265
Reviewed by Martin Robinson.
This patch introduces a threaded compositor for WebKitGTK+.
It is disabled as a default because it is a initial implementation.
The threaded compositor can be enabled using --threaded-compositor
option at compile time.
No new tests, this is an experimental feature.
* PlatformGTK.cmake:
Adds CoodinatedGraphics and threaded compositor related classes to
support threaded compositor
* Shared/DrawingAreaInfo.h:
Use DrawingAreaImpl for threaded compositor
* UIProcess/API/gtk/WebKitSettings.cpp:
(_WebKitSettingsPrivate::_WebKitSettingsPrivate):
Modified to use forceCompositingMode when the threaded compositor used.
If we does not set this mode here, it cannot draw the root content layer.
* WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp: Added.
* WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h: Added.
(WebKit::ThreadedCoordinatedLayerTreeHost::rootLayer):
Implements ThreadedCoordinatedLayerTreeHost to use the threaded
compositor. It is basically similar with CoordinatedLayerTreeHost but it uses ThreadedCompositor instead of IPC.
* UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::contentsSizeChanged):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp:
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.h:
* WebProcess/WebPage/DrawingArea.cpp:
(WebKit::DrawingArea::create):
(WebKit::DrawingArea::DrawingArea):
* WebProcess/WebPage/DrawingArea.h:
COORDINATED_GRAPHICS_MULTIPROCESS is introduced to classify IPC specific codes
from Coordinated Graphics.
And COORDINATED_GRAPHICS_THREADED is used to guard the threaded
compositor specific codes.
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::DrawingAreaImpl):
Modified to use forceCompositingMode when the threaded compositor used.
If we does not set this mode here, it will crash because of PageOverlay.
(WebKit::DrawingAreaImpl::mainFrameContentSizeChanged):
(WebKit::DrawingAreaImpl::updateBackingStoreState):
Modified to handle contents / viewport size changes for threaded compositor.
(WebKit::DrawingAreaImpl::attachViewOverlayGraphicsLayer):
Added to support Overlay layer in the threaded compositor.
(WebKit::DrawingAreaImpl::setNativeSurfaceHandleForCompositing):
Push the surface handle for compositing to the threaded compositor.
* WebProcess/WebPage/DrawingAreaImpl.h: Use COORDINATED_GRAPIHCS_THREADED to guard the threaded compositor related codes.
* WebProcess/WebPage/LayerTreeHost.cpp: Ditto.
* WebProcess/WebPage/LayerTreeHost.h: Ditto.
* WebProcess/WebPage/WebPage.cpp: Ditto.
* WebProcess/WebPage/WebPage.h: Ditto.
* WebProcess/WebPage/WebPage.messages.in: Ditto.
* WebProcess/gtk/WebProcessMainGtk.cpp:
Modified to call XInitThreads to use thread-safe xlib.
2015-01-07 Daniel Bates <dabates@apple.com>
[iOS] Make WebKit2 build with public iOS SDK and more build fixes for DRT
https://bugs.webkit.org/show_bug.cgi?id=137371
Reviewed by David Kilzer.
* Configurations/BaseTarget.xcconfig: Append directory $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks to
the list of directories to search for frameworks so that we the linker can find and link against iOS private
frameworks (e.g. AssertionServices).
* NetworkProcess/mac/NetworkResourceLoaderMac.mm:
(WebKit::NetworkResourceLoader::willCacheResponseAsync): Add PLATFORM(IOS)-guard around call to NetworkDiskCacheMonitor::monitorFileBackingStoreCreation().
* Platform/IPC/mac/ConnectionMac.mm: Add header sys/mman.h.
* Platform/spi/ios/BKSProcessAssertionSPI.h: Added.
* Platform/spi/ios/CorePDFSPI.h: Added.
* Platform/spi/ios/DataDetectorsUISPI.h: Added.
* Platform/spi/ios/ManagedConfigurationSPI.h: Added.
* Platform/spi/ios/TCCSPI.h: Added.
* Platform/spi/ios/TextInputSPI.h: Added.
* Platform/spi/ios/UIKitSPI.h: Added.
* Shared/Downloads/ios/DownloadIOS.mm: Add USE(CFNETWORK)-guard around CFNetwork-specific code and conditionally
include header CFNetwork/CFURLDownload.h.
(WebKit::Download::startWithHandle): Ditto.
* Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessEntryPoint.mm: Include header ServersSPI.h instead
of directly including private headers.
* Shared/ios/NativeWebTouchEventIOS.mm: Include header UIKitSPI.h instead of directly including private headers.
* Shared/mac/SandboxUtilities.cpp: Include header sys/param.h.
* UIProcess/API/Cocoa/WKWebView.mm: Include header UIKitSPI.h instead of directly including private headers.
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm: Ditto.
* UIProcess/API/Cocoa/WKWebViewInternal.h: Ditto.
* UIProcess/API/ios/WKViewIOS.mm: Ditto.
* UIProcess/Launcher/mac/ProcessLauncherMac.mm: Include header ServersSPI.h instead of directly including private headers.
* UIProcess/ios/PageClientImplIOS.mm: Include header UIKitSPI.h instead of directly including private headers.
* UIProcess/ios/ProcessAssertionIOS.mm: Include header BKSProcessAssertionSPI.h instead of directly including private headers.
* UIProcess/ios/SmartMagnificationController.mm: Include header UIKitSPI.h instead of directly including private headers.
* UIProcess/ios/ViewGestureControllerIOS.mm: Ditto.
* UIProcess/ios/WKActionSheet.mm: Ditto.
* UIProcess/ios/WKActionSheetAssistant.h: Include header DataDetectorsUISPI.h instead of directly including private headers.
* UIProcess/ios/WKActionSheetAssistant.mm: Include headers TCCSPI.h and UIKitSPI.h instead of directly including private headers.
* UIProcess/ios/WKContentView.mm: Include header UIKitSPI.h instead of directly including private headers. Also, move CALayer SPI
forward declarations to QuartzCoreSPI.h
* UIProcess/ios/WKContentViewInteraction.h: Include header UIKitSPI.h instead of directly including private headers.
* UIProcess/ios/WKContentViewInteraction.mm: Ditto. Also, include headers CoreGraphicsSPI.h, CoreText/CTFont.h, DataDetectorsUISPI.h,
ManagedConfigurationSPI.h, TextInputSPI.h.
* UIProcess/ios/WKGeolocationProviderIOSObjCSecurityOrigin.mm: Include header UIKitSPI.h instead of directly including private headers.
* UIProcess/ios/WKPDFPageNumberIndicator.mm: Ditto.
* UIProcess/ios/WKPDFView.h: Include header CorePDFSPI.h instead of directly including private headers.
* UIProcess/ios/WKPDFView.mm: Ditto. Also, remove header _UIHighlightViewSPI.h and include UIKitSPI.h.
* UIProcess/ios/WKScrollView.h: Include header UIKitSPI.h instead of directly including private headers.
* UIProcess/ios/WKSyntheticClickTapGestureRecognizer.h: Ditto.
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm: Ditto.
* UIProcess/ios/forms/WKAirPlayRoutePicker.mm: Ditto.
* UIProcess/ios/forms/WKFileUploadPanel.mm: Ditto.
* UIProcess/ios/forms/WKFormInputControl.mm: Ditto.
* UIProcess/ios/forms/WKFormPopover.mm: Ditto.
* UIProcess/ios/forms/WKFormSelectControl.h: Ditto.
* UIProcess/ios/forms/WKFormSelectControl.mm: Ditto.
* UIProcess/ios/forms/WKFormSelectPicker.mm: Ditto.
* UIProcess/ios/forms/WKFormSelectPopover.mm: Ditto.
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/EntryPoint/mac/LegacyProcess/WebContentProcessMain.mm: Include headers ServersSPI.h and GraphicsServicesSPI.h instead of
directly including private headers. Also, ignore deprecated declaration for bootstrap_register2().
* WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm: Include header GraphicsServicesSPI.h instead of directly
including private headers.
* config.h: Moved EXTERN_C_BEGIN and EXTERN_C_END macros from here to file wtf/Compiler.h and renamed them to WTF_EXTERN_C_BEGIN
and WTF_EXTERN_C_END, respectively, so that we can make use of them in SPI wrapper headers (e.g. UIKitSPI.h).
2015-01-07 Simon Fraser <simon.fraser@apple.com>
Make WebKitAcceleratedDrawingEnabled into a "debug" pref, so that it's read without page group prefixes
https://bugs.webkit.org/show_bug.cgi?id=140221
Reviewed by Sam Weinig.
Applications should not be toggling WebKitAcceleratedDrawingEnabled; it's really only
useful to toggle for debugging, so make it a debug pref.
* Shared/WebPreferencesDefinitions.h:
2015-01-07 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r178068.
https://bugs.webkit.org/show_bug.cgi?id=140235
Breaks the iOS build (Requested by enrica on #webkit).
Reverted changeset:
"[iOS] Make WebKit2 build with public iOS SDK and more build
fixes for DRT"
https://bugs.webkit.org/show_bug.cgi?id=137371
http://trac.webkit.org/changeset/178068
2015-01-07 Daniel Bates <dabates@apple.com>
[iOS] Make WebKit2 build with public iOS SDK and more build fixes for DRT
https://bugs.webkit.org/show_bug.cgi?id=137371
Reviewed by David Kilzer.
* Configurations/BaseTarget.xcconfig: Append directory $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks to
the list of directories to search for frameworks so that we the linker can find and link against iOS private
frameworks (e.g. AssertionServices).
* NetworkProcess/mac/NetworkResourceLoaderMac.mm:
(WebKit::NetworkResourceLoader::willCacheResponseAsync): Add PLATFORM(IOS)-guard around call to NetworkDiskCacheMonitor::monitorFileBackingStoreCreation().
* Platform/IPC/mac/ConnectionMac.mm: Add header sys/mman.h.
* Platform/spi/ios/BKSProcessAssertionSPI.h: Added.
* Platform/spi/ios/CorePDFSPI.h: Added.
* Platform/spi/ios/DataDetectorsUISPI.h: Added.
* Platform/spi/ios/ManagedConfigurationSPI.h: Added.
* Platform/spi/ios/TCCSPI.h: Added.
* Platform/spi/ios/TextInputSPI.h: Added.
* Platform/spi/ios/UIKitSPI.h: Added.
* Shared/Downloads/ios/DownloadIOS.mm: Add USE(CFNETWORK)-guard around CFNetwork-specific code and conditionally
include header CFNetwork/CFURLDownload.h.
(WebKit::Download::startWithHandle): Ditto.
* Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessEntryPoint.mm: Include header ServersSPI.h instead
of directly including private headers.
* Shared/ios/NativeWebTouchEventIOS.mm: Include header UIKitSPI.h instead of directly including private headers.
* Shared/mac/SandboxUtilities.cpp: Include header sys/param.h.
* UIProcess/API/Cocoa/WKWebView.mm: Include header UIKitSPI.h instead of directly including private headers.
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm: Ditto.
* UIProcess/API/Cocoa/WKWebViewInternal.h: Ditto.
* UIProcess/API/ios/WKViewIOS.mm: Ditto.
* UIProcess/Launcher/mac/ProcessLauncherMac.mm: Include header ServersSPI.h instead of directly including private headers.
Also, ignore deprecated declaration for bootstrap_register2().
* UIProcess/ios/PageClientImplIOS.mm: Include header UIKitSPI.h instead of directly including private headers.
* UIProcess/ios/ProcessAssertionIOS.mm: Include header BKSProcessAssertionSPI.h instead of directly including private headers.
* UIProcess/ios/SmartMagnificationController.mm: Include header UIKitSPI.h instead of directly including private headers.
* UIProcess/ios/ViewGestureControllerIOS.mm: Ditto.
* UIProcess/ios/WKActionSheet.mm: Ditto.
* UIProcess/ios/WKActionSheetAssistant.h: Include header DataDetectorsUISPI.h instead of directly including private headers.
* UIProcess/ios/WKActionSheetAssistant.mm: Include headers TCCSPI.h and UIKitSPI.h instead of directly including private headers.
* UIProcess/ios/WKContentView.mm: Include header UIKitSPI.h instead of directly including private headers. Also, move CALayer SPI
forward declarations to QuartzCoreSPI.h
* UIProcess/ios/WKContentViewInteraction.h: Include header UIKitSPI.h instead of directly including private headers.
* UIProcess/ios/WKContentViewInteraction.mm: Ditto. Also, include headers CoreGraphicsSPI.h, CoreText/CTFont.h, DataDetectorsUISPI.h,
ManagedConfigurationSPI.h, TextInputSPI.h.
* UIProcess/ios/WKGeolocationProviderIOSObjCSecurityOrigin.mm: Include header UIKitSPI.h instead of directly including private headers.
* UIProcess/ios/WKPDFPageNumberIndicator.mm: Ditto.
* UIProcess/ios/WKPDFView.h: Include header CorePDFSPI.h instead of directly including private headers.
* UIProcess/ios/WKPDFView.mm: Ditto. Also, remove header _UIHighlightViewSPI.h and include UIKitSPI.h.
* UIProcess/ios/WKScrollView.h: Include header UIKitSPI.h instead of directly including private headers.
* UIProcess/ios/WKSyntheticClickTapGestureRecognizer.h: Ditto.
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm: Ditto.
* UIProcess/ios/forms/WKAirPlayRoutePicker.mm: Ditto.
* UIProcess/ios/forms/WKFileUploadPanel.mm: Ditto.
* UIProcess/ios/forms/WKFormInputControl.mm: Ditto.
* UIProcess/ios/forms/WKFormPopover.mm: Ditto.
* UIProcess/ios/forms/WKFormSelectControl.h: Ditto.
* UIProcess/ios/forms/WKFormSelectControl.mm: Ditto.
* UIProcess/ios/forms/WKFormSelectPicker.mm: Ditto.
* UIProcess/ios/forms/WKFormSelectPopover.mm: Ditto.
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/EntryPoint/mac/LegacyProcess/WebContentProcessMain.mm: Include headers ServersSPI.h and GraphicsServicesSPI.h instead of
directly including private headers.
* WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm: Include header GraphicsServicesSPI.h instead of directly
including private headers.
* config.h: Moved EXTERN_C_BEGIN and EXTERN_C_END macros from here to file wtf/Compiler.h and renamed them to WTF_EXTERN_C_BEGIN
and WTF_EXTERN_C_END, respectively, so that we can make use of them in SPI wrapper headers (e.g. UIKitSPI.h).
2015-01-07 Beth Dakin <bdakin@apple.com>
Adopt delegate callbacks so that standardQuickLookMenuItem does not obscure the
link
https://bugs.webkit.org/show_bug.cgi?id=140206
-and corresponding-
rdar://problem/19300492
Reviewed by Tim Horton.
Providing and item frame will ensure that the original link is not obscured.
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController menuItem:itemFrameForPoint:]):
For now use a max size that is smaller than the WKView, with the screens aspect
ratio, and scaled down.
(-[WKImmediateActionController menuItem:maxSizeForPoint:]):
2015-01-07 Alexey Proskuryakov <ap@apple.com>
Release build fix.
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
2015-01-06 Alexey Proskuryakov <ap@apple.com>
[Mac] Secondary WebKit processes get re-exec'ed twice when running under ASan
https://bugs.webkit.org/show_bug.cgi?id=140175
Reviewed by Sam Weinig.
* UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::addDYLDEnvironmentAdditions):
If the main process is ASanified, add the ASan dynamic library to DYLD_INSERT_LIBRARIES.
This avoids an extra re-exec, which is very annoying when debugging.
The library is linked in using @rpath, so the only reliable way to find its location
is by examining binary images loaded into the current process.
2015-01-07 Zan Dobersek <zdobersek@igalia.com>
[TexMap] m_layer member in GraphicsLayerTextureMapper is always non-null
https://bugs.webkit.org/show_bug.cgi?id=140135
Reviewed by Darin Adler.
GraphicsLayerTextureMapper::layer() now returns a reference,
so the call sites are updated.
* WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
(WebKit::LayerTreeHostGtk::initialize):
(WebKit::LayerTreeHostGtk::layerFlushTimerFired):
(WebKit::LayerTreeHostGtk::compositeLayersToContext):
2015-01-06 Gwang Yoon Hwang <yoon@igalia.com>
Remove the remaining uses of OwnPtr in threaded compositor.
https://bugs.webkit.org/show_bug.cgi?id=140172
Reviewed by Sam Weinig.
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
(WebKit::ThreadedCompositor::runCompositingThread):
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
2015-01-06 Timothy Horton <timothy_horton@apple.com>
View state change callbacks are sometimes dropped on the floor
https://bugs.webkit.org/show_bug.cgi?id=140156
<rdar://problem/19255417>
Reviewed by Anders Carlsson.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::dispatchViewStateChange):
Always send SetViewState to the Web process if we have any
registered view state change callbacks. Otherwise, if nothing changed,
we can end up never calling the callback.
2015-01-06 Timothy Horton <timothy_horton@apple.com>
Make explicit which TextIndicator animations are driven manually, and which run automatically
https://bugs.webkit.org/show_bug.cgi?id=140113
<rdar://problem/19383425>
Reviewed by Darin Adler.
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::didPerformDictionaryLookup):
Delete an inaccurate comment.
2015-01-06 Anders Carlsson <andersca@apple.com>
Remove now unused IndexedDB code
https://bugs.webkit.org/show_bug.cgi?id=140128
Reviewed by Darin Adler.
Remove a function.
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::createIDBFactoryBackend): Deleted.
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:
2015-01-06 Darin Adler <darin@apple.com>
Fix race in FindController code
https://bugs.webkit.org/show_bug.cgi?id=140114
Reviewed by Anders Carlsson.
No idea how to reproduce this. Just ran into the crash in my local testing.
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::findString): Use a RefPtr to guarantee the FindController is
not deleted while a this pointer is stored in a function.
2015-01-05 Anders Carlsson <andersca@apple.com>
Add a DatabaseProvider subclass in WebKit2 and use it for IndexedDB
https://bugs.webkit.org/show_bug.cgi?id=140108
Reviewed by Darin Adler.
* CMakeLists.txt:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/Databases/WebDatabaseProvider.cpp: Added.
(WebKit::databaseProviders):
(WebKit::WebDatabaseProvider::getOrCreate):
(WebKit::WebDatabaseProvider::WebDatabaseProvider):
(WebKit::WebDatabaseProvider::~WebDatabaseProvider):
(WebKit::WebDatabaseProvider::createIDBFactoryBackend):
* WebProcess/Databases/WebDatabaseProvider.h: Added.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
2015-01-05 Matt Baker <mattbaker@apple.com>
Web Inspector: inspector view top inset should not include height of web view banners
https://bugs.webkit.org/show_bug.cgi?id=140076
Reviewed by Anders Carlsson.
Added _totalHeightOfBanners property to WKView, which is used by the WebInspectorProxy
to calculate the correct vertical position of the Inspector view frame. The browser is
responsible for setting the property value whenever banners are installed or uninstalled from
the view.
* UIProcess/API/Cocoa/WKViewPrivate.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView _setTotalHeightOfBanners:]):
(-[WKView _totalHeightOfBanners]):
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::inspectedViewFrameDidChange):
2015-01-05 Timothy Horton <timothy_horton@apple.com>
Implicitly dismissed DD popovers don't clear immediate action state, prematurely dismissing the next DD highlight
https://bugs.webkit.org/show_bug.cgi?id=140088
<rdar://problem/19298391>
Reviewed by Anders Carlsson.
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController _menuItemForDataDetectedText]):
Instead of just tearing down the TextIndicator, clear all state.
2015-01-05 Csaba Osztrogonác <ossy@webkit.org>
One more URTBF after r177917.
* UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
* WebProcess/Battery/WebBatteryManager.h:
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp:
(WebKit::CoordinatedDrawingArea::didReceiveCoordinatedLayerTreeHostMessage):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.h:
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
* WebProcess/WebPage/LayerTreeHost.h:
2015-01-05 Anders Carlsson <andersca@apple.com>
Get rid of PassRefPtr from IPC::Connection
https://bugs.webkit.org/show_bug.cgi?id=140092
Reviewed by Andreas Kling.
* DatabaseProcess/DatabaseToWebProcessConnection.cpp:
(WebKit::DatabaseToWebProcessConnection::DatabaseToWebProcessConnection):
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::NetworkConnectionToWebProcess):
* Platform/IPC/Connection.cpp:
(IPC::Connection::createServerConnection):
(IPC::Connection::createClientConnection):
(IPC::Connection::Connection):
* Platform/IPC/Connection.h:
* PluginProcess/WebProcessConnection.cpp:
(WebKit::WebProcessConnection::WebProcessConnection):
* Shared/ChildProcess.cpp:
(WebKit::ChildProcess::initialize):
* Shared/ChildProcessProxy.cpp:
(WebKit::ChildProcessProxy::didFinishLaunching):
* UIProcess/Plugins/PluginProcessProxy.cpp:
(WebKit::PluginProcessProxy::didFinishLaunching):
* WebProcess/Databases/WebToDatabaseProcessConnection.cpp:
(WebKit::WebToDatabaseProcessConnection::WebToDatabaseProcessConnection):
* WebProcess/Network/NetworkProcessConnection.cpp:
(WebKit::NetworkProcessConnection::NetworkProcessConnection):
* WebProcess/Plugins/PluginProcessConnection.cpp:
(WebKit::PluginProcessConnection::PluginProcessConnection):
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::createInspectorPage):
* WebProcess/WebPage/WebInspectorUI.cpp:
(WebKit::WebInspectorUI::establishConnection):
2015-01-05 Csaba Osztrogonác <ossy@webkit.org>
URTBF after r177917.
* UIProcess/WebBatteryManagerProxy.h:
* UIProcess/WebVibrationProxy.h:
2015-01-05 Anders Carlsson <andersca@apple.com>
Clean up Connection::SyncMessageState
https://bugs.webkit.org/show_bug.cgi?id=140087
Reviewed by Andreas Kling.
* Platform/IPC/Connection.cpp:
(IPC::Connection::SyncMessageState::syncMessageStateMapMutex):
Change this to return an std::mutex and use std::call_once to initialize it properly.
(IPC::Connection::SyncMessageState::getOrCreate):
Return a Ref.
(IPC::Connection::SyncMessageState::~SyncMessageState):
Use an std::lock_guard.
(IPC::Connection::SyncMessageState::processIncomingMessage):
Replace a bind call with a lambda.
(IPC::Connection::SyncMessageState::dispatchMessages):
ConnectionAndIncomingMessage now holds a Ref<Connection>.
(IPC::Connection::SyncMessageState::dispatchMessageAndResetDidScheduleDispatchMessagesForConnection):
Change Connection to a reference.
(IPC::Connection::processIncomingMessage):
Change Connection to a reference.
2015-01-05 Anders Carlsson <andersca@apple.com>
Clean up the storage manager some more
https://bugs.webkit.org/show_bug.cgi?id=140086
Reviewed by Andreas Kling.
Use lambdas instead of WTF::bind and get rid of a couple of internal functions.
* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::createSessionStorageNamespace):
(WebKit::StorageManager::destroySessionStorageNamespace):
(WebKit::StorageManager::setAllowedSessionStorageNamespaceConnection):
(WebKit::StorageManager::cloneSessionStorageNamespace):
(WebKit::StorageManager::processWillCloseConnection):
(WebKit::StorageManager::createSessionStorageNamespaceInternal): Deleted.
(WebKit::StorageManager::destroySessionStorageNamespaceInternal): Deleted.
(WebKit::StorageManager::setAllowedSessionStorageNamespaceConnectionInternal): Deleted.
(WebKit::StorageManager::cloneSessionStorageNamespaceInternal): Deleted.
(WebKit::StorageManager::invalidateConnectionInternal): Deleted.
* UIProcess/Storage/StorageManager.h:
2015-01-05 Anders Carlsson <andersca@apple.com>
Change more connection pointers to references
https://bugs.webkit.org/show_bug.cgi?id=140085
Reviewed by Andreas Kling.
* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::StorageArea::addListener):
(WebKit::StorageManager::StorageArea::removeListener):
(WebKit::StorageManager::createLocalStorageMap):
(WebKit::StorageManager::createTransientLocalStorageMap):
(WebKit::StorageManager::createSessionStorageMap):
(WebKit::StorageManager::destroyStorageMap):
(WebKit::StorageManager::getValues):
(WebKit::StorageManager::setItem):
(WebKit::StorageManager::removeItem):
(WebKit::StorageManager::clear):
(WebKit::StorageManager::applicationWillTerminate):
(WebKit::StorageManager::invalidateConnectionInternal):
(WebKit::StorageManager::findStorageArea):
* UIProcess/Storage/StorageManager.h:
2015-01-05 Anders Carlsson <andersca@apple.com>
Change more of the IPC code to take connections by reference
https://bugs.webkit.org/show_bug.cgi?id=140083
Reviewed by Andreas Kling.
* DatabaseProcess/DatabaseProcess.cpp:
(WebKit::DatabaseProcess::didReceiveMessage):
* DatabaseProcess/DatabaseProcess.h:
* DatabaseProcess/DatabaseToWebProcessConnection.cpp:
(WebKit::DatabaseToWebProcessConnection::didReceiveMessage):
(WebKit::DatabaseToWebProcessConnection::didReceiveSyncMessage):
* DatabaseProcess/DatabaseToWebProcessConnection.h:
* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::didReceiveMessage):
(WebKit::NetworkConnectionToWebProcess::didReceiveSyncMessage):
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::didReceiveMessage):
(WebKit::NetworkProcess::didReceiveSyncMessage):
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkResourceLoader.h:
* Platform/IPC/Connection.cpp:
(IPC::Connection::dispatchWorkQueueMessageReceiverMessage):
(IPC::Connection::dispatchSyncMessage):
(IPC::Connection::dispatchMessage):
* Platform/IPC/Connection.h:
(IPC::Connection::waitForAndDispatchImmediately):
* Platform/IPC/MessageReceiver.h:
(IPC::MessageReceiver::didReceiveSyncMessage):
* Platform/IPC/MessageReceiverMap.cpp:
(IPC::MessageReceiverMap::dispatchMessage):
(IPC::MessageReceiverMap::dispatchSyncMessage):
* Platform/IPC/MessageReceiverMap.h:
* PluginProcess/PluginControllerProxy.h:
* PluginProcess/PluginProcess.cpp:
(WebKit::PluginProcess::didReceiveMessage):
* PluginProcess/PluginProcess.h:
* PluginProcess/WebProcessConnection.cpp:
(WebKit::WebProcessConnection::didReceiveMessage):
(WebKit::WebProcessConnection::didReceiveSyncMessage):
* PluginProcess/WebProcessConnection.h:
* Scripts/webkit/messages.py:
(async_message_statement):
(sync_message_statement):
(generate_message_handler):
* Shared/API/Cocoa/RemoteObjectRegistry.h:
* Shared/Authentication/AuthenticationManager.h:
* Shared/ChildProcessProxy.cpp:
(WebKit::ChildProcessProxy::dispatchMessage):
(WebKit::ChildProcessProxy::dispatchSyncMessage):
* Shared/ChildProcessProxy.h:
* Shared/Network/CustomProtocols/CustomProtocolManager.h:
* Shared/Plugins/NPObjectMessageReceiver.h:
* Shared/Plugins/NPRemoteObjectMap.cpp:
(WebKit::NPRemoteObjectMap::didReceiveSyncMessage):
* Shared/Plugins/NPRemoteObjectMap.h:
* Shared/WebConnection.h:
* Shared/mac/SecItemShim.h:
* UIProcess/Databases/DatabaseProcessProxy.cpp:
(WebKit::DatabaseProcessProxy::didReceiveMessage):
* UIProcess/Databases/DatabaseProcessProxy.h:
* UIProcess/Downloads/DownloadProxy.h:
* UIProcess/DrawingAreaProxy.h:
* UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h:
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::didReceiveMessage):
(WebKit::NetworkProcessProxy::didReceiveSyncMessage):
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/Plugins/PluginProcessProxy.h:
* UIProcess/Storage/StorageManager.h:
* UIProcess/UserContent/WebUserContentControllerProxy.h:
* UIProcess/VisitedLinkProvider.h:
* UIProcess/WebApplicationCacheManagerProxy.h:
* UIProcess/WebCookieManagerProxy.h:
* UIProcess/WebDatabaseManagerProxy.h:
* UIProcess/WebFullScreenManagerProxy.h:
* UIProcess/WebGeolocationManagerProxy.h:
* UIProcess/WebIconDatabase.h:
* UIProcess/WebInspectorProxy.h:
* UIProcess/WebMediaCacheManagerProxy.h:
* UIProcess/WebOriginDataManagerProxy.h:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPasteboardProxy.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::dispatchMessage):
(WebKit::WebProcessPool::dispatchSyncMessage):
* UIProcess/WebProcessPool.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::didReceiveMessage):
(WebKit::WebProcessProxy::didReceiveSyncMessage):
* UIProcess/WebProcessProxy.h:
* UIProcess/WebResourceCacheManagerProxy.h:
* UIProcess/ios/SmartMagnificationController.h:
* UIProcess/ios/WebVideoFullscreenManagerProxy.h:
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
* UIProcess/mac/SecItemShimProxy.h:
* UIProcess/mac/ViewGestureController.h:
* WebProcess/ApplicationCache/WebApplicationCacheManager.h:
* WebProcess/Cookies/WebCookieManager.h:
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
* WebProcess/Databases/WebToDatabaseProcessConnection.cpp:
(WebKit::WebToDatabaseProcessConnection::didReceiveMessage):
* WebProcess/Databases/WebToDatabaseProcessConnection.h:
* WebProcess/FullScreen/WebFullScreenManager.cpp:
(WebKit::WebFullScreenManager::didReceiveMessage):
* WebProcess/FullScreen/WebFullScreenManager.h:
* WebProcess/Geolocation/WebGeolocationManager.h:
* WebProcess/IconDatabase/WebIconDatabaseProxy.h:
* WebProcess/MediaCache/WebMediaCacheManager.h:
* WebProcess/Network/NetworkProcessConnection.cpp:
(WebKit::NetworkProcessConnection::didReceiveMessage):
(WebKit::NetworkProcessConnection::didReceiveSyncMessage):
* WebProcess/Network/NetworkProcessConnection.h:
* WebProcess/Network/WebResourceLoader.h:
* WebProcess/Notifications/WebNotificationManager.h:
* WebProcess/OriginData/WebOriginDataManager.h:
* WebProcess/Plugins/PluginProcessConnection.cpp:
(WebKit::PluginProcessConnection::didReceiveMessage):
(WebKit::PluginProcessConnection::didReceiveSyncMessage):
* WebProcess/Plugins/PluginProcessConnection.h:
* WebProcess/Plugins/PluginProcessConnectionManager.h:
* WebProcess/Plugins/PluginProxy.h:
* WebProcess/ResourceCache/WebResourceCacheManager.h:
* WebProcess/Scrolling/RemoteScrollingCoordinator.h:
* WebProcess/Storage/StorageAreaMap.h:
* WebProcess/UserContent/WebUserContentController.h:
* WebProcess/WebCoreSupport/WebDatabaseManager.h:
* WebProcess/WebPage/DrawingArea.h:
* WebProcess/WebPage/EventDispatcher.h:
* WebProcess/WebPage/ViewGestureGeometryCollector.h:
* WebProcess/WebPage/ViewUpdateDispatcher.h:
* WebProcess/WebPage/VisitedLinkTableController.h:
* WebProcess/WebPage/WebInspector.h:
* WebProcess/WebPage/WebInspectorUI.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didReceiveMessage):
(WebKit::WebPage::didReceiveSyncMessage):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPageGroupProxy.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::didReceiveSyncMessage):
(WebKit::WebProcess::didReceiveMessage):
* WebProcess/WebProcess.h:
* WebProcess/ios/WebVideoFullscreenManager.h:
2015-01-05 Anders Carlsson <andersca@apple.com>
Pass IPC::Connection by reference to IPC message handlers
https://bugs.webkit.org/show_bug.cgi?id=140082
Reviewed by Darin Adler.
* Platform/IPC/HandleMessage.h:
(IPC::callMemberFunctionImpl):
(IPC::callMemberFunction):
(IPC::handleMessage):
(IPC::handleMessageDelayed):
* Scripts/webkit/messages.py:
(async_message_statement):
(sync_message_statement):
* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::createLocalStorageMap):
(WebKit::StorageManager::createTransientLocalStorageMap):
(WebKit::StorageManager::createSessionStorageMap):
(WebKit::StorageManager::destroyStorageMap):
(WebKit::StorageManager::getValues):
(WebKit::StorageManager::setItem):
(WebKit::StorageManager::removeItem):
(WebKit::StorageManager::clear):
* UIProcess/Storage/StorageManager.h:
* UIProcess/UserContent/WebUserContentControllerProxy.cpp:
(WebKit::WebUserContentControllerProxy::didPostMessage):
* UIProcess/UserContent/WebUserContentControllerProxy.h:
* UIProcess/WebGeolocationManagerProxy.cpp:
(WebKit::WebGeolocationManagerProxy::startUpdating):
(WebKit::WebGeolocationManagerProxy::stopUpdating):
(WebKit::WebGeolocationManagerProxy::setEnableHighAccuracy):
* UIProcess/WebGeolocationManagerProxy.h:
* UIProcess/WebOriginDataManagerProxy.cpp:
(WebKit::WebOriginDataManagerProxy::didGetOrigins):
(WebKit::WebOriginDataManagerProxy::didDeleteEntries):
(WebKit::WebOriginDataManagerProxy::didDeleteAllEntries):
* UIProcess/WebOriginDataManagerProxy.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::handleMessage):
(WebKit::WebProcessPool::handleSynchronousMessage):
* UIProcess/WebProcessPool.h:
* UIProcess/mac/SecItemShimProxy.cpp:
(WebKit::SecItemShimProxy::secItemRequest):
* UIProcess/mac/SecItemShimProxy.h:
2015-01-04 Anders Carlsson <andersca@apple.com>
Clean up some of the IPC code
https://bugs.webkit.org/show_bug.cgi?id=140057
Reviewed by Antti Koivisto.
Use std::mutex instead of WTF::Mutex. Change a couple of pointers to references in the connection client.
* DatabaseProcess/DatabaseProcess.cpp:
(WebKit::DatabaseProcess::didClose):
(WebKit::DatabaseProcess::didReceiveInvalidMessage):
* DatabaseProcess/DatabaseProcess.h:
* DatabaseProcess/DatabaseToWebProcessConnection.cpp:
(WebKit::DatabaseToWebProcessConnection::didClose):
(WebKit::DatabaseToWebProcessConnection::didReceiveInvalidMessage):
* DatabaseProcess/DatabaseToWebProcessConnection.h:
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::didClose):
(WebKit::NetworkConnectionToWebProcess::didReceiveInvalidMessage):
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::didClose):
(WebKit::NetworkProcess::didReceiveInvalidMessage):
* NetworkProcess/NetworkProcess.h:
* Platform/IPC/Connection.cpp:
(IPC::Connection::sendMessage):
(IPC::Connection::waitForMessage):
(IPC::Connection::connectionDidClose):
(IPC::Connection::sendOutgoingMessages):
(IPC::Connection::dispatchDidReceiveInvalidMessage):
(IPC::Connection::enqueueIncomingMessage):
(IPC::Connection::dispatchMessage):
(IPC::Connection::dispatchOneMessage):
* Platform/IPC/Connection.h:
* PluginProcess/PluginProcess.cpp:
(WebKit::PluginProcess::didClose):
(WebKit::PluginProcess::didReceiveInvalidMessage):
* PluginProcess/PluginProcess.h:
* PluginProcess/WebProcessConnection.cpp:
(WebKit::WebProcessConnection::didClose):
(WebKit::WebProcessConnection::didReceiveInvalidMessage):
* PluginProcess/WebProcessConnection.h:
* UIProcess/Databases/DatabaseProcessProxy.cpp:
(WebKit::DatabaseProcessProxy::didClose):
(WebKit::DatabaseProcessProxy::didReceiveInvalidMessage):
* UIProcess/Databases/DatabaseProcessProxy.h:
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::didClose):
(WebKit::NetworkProcessProxy::didReceiveInvalidMessage):
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/Plugins/PluginProcessProxy.cpp:
(WebKit::PluginProcessProxy::didClose):
(WebKit::PluginProcessProxy::didReceiveInvalidMessage):
* UIProcess/Plugins/PluginProcessProxy.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::didClose):
(WebKit::WebProcessProxy::didReceiveInvalidMessage):
* UIProcess/WebProcessProxy.h:
* WebProcess/Databases/WebToDatabaseProcessConnection.cpp:
(WebKit::WebToDatabaseProcessConnection::didClose):
(WebKit::WebToDatabaseProcessConnection::didReceiveInvalidMessage):
* WebProcess/Databases/WebToDatabaseProcessConnection.h:
* WebProcess/Network/NetworkProcessConnection.cpp:
(WebKit::NetworkProcessConnection::didClose):
(WebKit::NetworkProcessConnection::didReceiveInvalidMessage):
* WebProcess/Network/NetworkProcessConnection.h:
* WebProcess/Plugins/PluginProcessConnection.cpp:
(WebKit::PluginProcessConnection::didClose):
(WebKit::PluginProcessConnection::didReceiveInvalidMessage):
* WebProcess/Plugins/PluginProcessConnection.h:
* WebProcess/WebPage/WebInspector.h:
* WebProcess/WebPage/WebInspectorUI.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::didClose):
(WebKit::WebProcess::didReceiveInvalidMessage):
* WebProcess/WebProcess.h:
2015-01-01 Sam Weinig <sam@webkit.org>
Remove GroupSettings
https://bugs.webkit.org/show_bug.cgi?id=140037
Reviewed by Dan Bernstein.
Remove unused databaseDirectoryIdentifier parameters.
* WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
(WebKit::WebIDBFactoryBackend::WebIDBFactoryBackend):
(WebKit::WebIDBFactoryBackend::getDatabaseNames):
(WebKit::WebIDBFactoryBackend::deleteDatabase):
* WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.h:
* WebProcess/Storage/StorageNamespaceImpl.cpp:
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::createIDBFactoryBackend):
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:
2015-01-01 Jeff Miller <jeffm@apple.com>
Update user-visible copyright strings to include 2015
https://bugs.webkit.org/show_bug.cgi?id=139880
Reviewed by Darin Adler.
* DatabaseProcess/EntryPoint/mac/LegacyProcess/Info.plist:
* DatabaseProcess/EntryPoint/mac/XPCService/DatabaseService.Development/Info.plist:
* DatabaseProcess/EntryPoint/mac/XPCService/DatabaseService/Info.plist:
* Info.plist:
* NetworkProcess/EntryPoint/mac/LegacyProcess/Info.plist:
* NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development/Info-OSX.plist:
* NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development/Info-iOS.plist:
* NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX.plist:
* NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-iOS.plist:
* PluginProcess/EntryPoint/mac/LegacyProcess/Info.plist:
* PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist:
* PluginProcess/EntryPoint/mac/XPCService/PluginService.Development/Info.plist:
* WebProcess/EntryPoint/mac/LegacyProcess/Info.plist:
* WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info-OSX.plist:
* WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info-iOS.plist:
* WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist:
* WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-iOS.plist:
* mac/Info-WebKit2.plist:
2014-12-31 Sam Weinig <sam@webkit.org>
Move scrolling code off of WTF::bind
https://bugs.webkit.org/show_bug.cgi?id=140019
Reviewed by Darin Adler.
* WebProcess/WebPage/EventDispatcher.cpp:
(WebKit::EventDispatcher::wheelEvent):
(WebKit::EventDispatcher::touchEvent):
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::updatePreferences):
2015-01-01 Darin Adler <darin@apple.com>
We often misspell identifier as "identifer"
https://bugs.webkit.org/show_bug.cgi?id=140025
Reviewed by Michael Saboff.
* Shared/WebPageGroupData.cpp:
(WebKit::WebPageGroupData::encode):
(WebKit::WebPageGroupData::decode):
* Shared/WebPageGroupData.h:
* UIProcess/WebPageGroup.cpp:
(WebKit::pageGroupData):
(WebKit::WebPageGroup::WebPageGroup):
* UIProcess/WebPageGroup.h:
(WebKit::WebPageGroup::identifier):
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::createInspectorPage):
* WebProcess/WebPage/WebPageGroupProxy.cpp:
(WebKit::WebPageGroupProxy::WebPageGroupProxy):
* WebProcess/WebPage/WebPageGroupProxy.h:
(WebKit::WebPageGroupProxy::identifier):
Fix misspellings.
2014-12-31 Yusuke Suzuki <utatane.tea@gmail.com>
[GTK] Suppress unused parameter warnings in ui clients
https://bugs.webkit.org/show_bug.cgi?id=140012
Drop the parameter name of WebKitUIClient::isPlayingAudioDidChange
to suppress warnings.
Reviewed by Benjamin Poulain.
* UIProcess/API/gtk/WebKitUIClient.cpp:
2014-12-31 Sam Weinig <sam@webkit.org>
Remove the remaining uses of OwnPtr from WebKit2
https://bugs.webkit.org/show_bug.cgi?id=140017
Reviewed by Dan Bernstein.
* Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
(WebKit::RemoteScrollingCoordinatorTransaction::decode):
* Shared/Scrolling/RemoteScrollingCoordinatorTransaction.h:
(WebKit::RemoteScrollingCoordinatorTransaction::setStateTreeToEncode):
(WebKit::RemoteScrollingCoordinatorTransaction::scrollingStateTree):
* UIProcess/Launcher/mac/DynamicLinkerEnvironmentExtractor.mm:
* UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
(WebKit::RemoteScrollingCoordinatorProxy::updateScrollingTree):
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::PageClientImpl):
* UIProcess/mac/WKFullScreenWindowController.h:
* UIProcess/mac/WKPrintingView.mm:
(-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]):
(-[WKPrintingView _askPageToComputePageRects]):
(-[WKPrintingView _drawPreview:]):
* WebProcess/InjectedBundle/API/c/mac/WKBundlePageBannerMac.mm:
2014-12-31 Bartlomiej Gajda <b.gajda@samsung.com>
Fix build warnings after r177792.
https://bugs.webkit.org/show_bug.cgi?id=140005.
Reviewed by Anders Carlsson.
Add UNUSED_PARAM(connection) for async messages.
* Scripts/webkit/messages.py:
(generate_message_handler):
2014-12-31 Zan Dobersek <zdobersek@igalia.com>
Unreviewed build fix for the GTK port.
Move the ArgumentCodersGtk.h inclusion from WebPageProxy.cpp to
WebPageProxy.h. This makes GTK-specific IPC coders available to
WebPageProxyMessageReceiver, fixing a build error due to missing
ArgumentCoder template specializations for WebCore::DragData type
that is used in the GTK-specific StartDrag message.
* UIProcess/WebPageProxy.cpp:
* UIProcess/WebPageProxy.h:
2014-12-31 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r177824 and r177826.
https://bugs.webkit.org/show_bug.cgi?id=140011
The new test crashes (Requested by ap on #webkit).
Reverted changesets:
"Too large plugins are crashing."
https://bugs.webkit.org/show_bug.cgi?id=139856
http://trac.webkit.org/changeset/177824
"Fix bug number typo in the previous commit."
http://trac.webkit.org/changeset/177826
2014-12-30 Gabor Rapcsanyi <rgabor@webkit.org>
Too large plugins are crashing.
https://bugs.webkit.org/show_bug.cgi?id=139868
Reviewed by Darin Adler.
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::updateBackingStore): Return false if backingStore cannot be allocated.
2014-12-30 Anders Carlsson <andersca@apple.com>
Transient local storage namespaces need to ref their storage areas
https://bugs.webkit.org/show_bug.cgi?id=140006
<rdar://problem/19225389>
Reviewed by Sam Weinig.
We need to keep transient storage areas around even if they have no active connections,
so use a RefPtr instead of a raw pointer. This matches what we do for session storage namespaces.
* UIProcess/Storage/StorageManager.cpp:
2014-12-29 Anders Carlsson <andersca@apple.com>
Remove unneeded StorageNamespace functions
https://bugs.webkit.org/show_bug.cgi?id=139997
Reviewed by Sam Weinig.
* WebProcess/Storage/StorageNamespaceImpl.cpp:
(WebKit::StorageNamespaceImpl::close): Deleted.
(WebKit::StorageNamespaceImpl::clearOriginForDeletion): Deleted.
(WebKit::StorageNamespaceImpl::clearAllOriginsForDeletion): Deleted.
(WebKit::StorageNamespaceImpl::sync): Deleted.
(WebKit::StorageNamespaceImpl::closeIdleLocalStorageDatabases): Deleted.
* WebProcess/Storage/StorageNamespaceImpl.h:
2014-12-29 Anders Carlsson <andersca@apple.com>
Move storage code from WebCore to WebKit
https://bugs.webkit.org/show_bug.cgi?id=139558
Reviewed by Darin Adler.
* WebProcess/WebProcess.cpp:
2014-12-29 Dan Bernstein <mitz@apple.com>
Fixed the iOS build.
* WebProcess/WebPage/ios/WebPageIOS.mm:
2014-12-29 Anders Carlsson <andersca@apple.com>
Another iOS build fix.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::elementDidFocus):
2014-12-29 Anders Carlsson <andersca@apple.com>
Turn on transient local storage support again
https://bugs.webkit.org/show_bug.cgi?id=139995
Reviewed by Sam Weinig.
Using transient local storage caused weird crashes in the UI process so that change had to
be backed out - let's turn it on and see if it still happens.
* WebProcess/Storage/WebStorageNamespaceProvider.cpp:
(WebKit::WebStorageNamespaceProvider::createTransientLocalStorageNamespace):
2014-12-29 Anders Carlsson <andersca@apple.com>
Remove more old coder code gunk.
Rubber-stamped by Sam Weinig.
* Scripts/webkit/messages.py:
(argument_coder_headers_for_type):
(handler_function): Deleted.
2014-12-29 Anders Carlsson <andersca@apple.com>
Try to fix the iOS build.
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::startAssistingNode):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::elementDidFocus):
2014-12-29 Csaba Osztrogonác <ossy@webkit.org>
URTBF after r177805.
* CMakeLists.txt:
2014-12-29 Anders Carlsson <andersca@apple.com>
Remove the old user message coder code
https://bugs.webkit.org/show_bug.cgi?id=139994
Reviewed by Sam Weinig.
* Platform/IPC/HandleMessage.h:
(IPC::callMemberFunctionImpl): Deleted.
(IPC::callMemberFunction): Deleted.
(IPC::handleMessageVariadic): Deleted.
* Scripts/webkit/messages.py:
(decode_type):
(async_message_statement):
(sync_message_statement):
* Shared/UserMessageCoders.h: Removed.
* Shared/mac/ObjCObjectGraphCoders.h: Removed.
* Shared/mac/ObjCObjectGraphCoders.mm: Removed.
* UIProcess/WebConnectionToWebProcess.cpp:
* UIProcess/WebContextUserMessageCoders.h: Removed.
* UIProcess/WebPageProxy.cpp:
* UIProcess/WebProcessPool.cpp:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
* WebProcess/InjectedBundle/InjectedBundleUserMessageCoders.h: Removed.
* WebProcess/WebConnectionToUIProcess.cpp:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
* WebProcess/WebPage/WebContextMenu.cpp:
* WebProcess/WebPage/WebPage.cpp:
* WebProcess/WebPage/mac/WebPageMac.mm:
* WebProcess/WebProcess.cpp:
2014-12-29 Sam Weinig <sam@webkit.org>
Move WebPasteboardProxy from Shared to UIProcess, where it should have been all along
Rubber-stamped by Anders Carlsson.
* Shared/WebPasteboardProxy.cpp: Removed.
* Shared/WebPasteboardProxy.h: Removed.
* Shared/WebPasteboardProxy.messages.in: Removed.
* UIProcess/WebPasteboardProxy.cpp: Copied from Shared/WebPasteboardProxy.cpp.
* UIProcess/WebPasteboardProxy.h: Copied from Shared/WebPasteboardProxy.h.
* UIProcess/WebPasteboardProxy.messages.in: Copied from Shared/WebPasteboardProxy.messages.in.
* WebKit2.xcodeproj/project.pbxproj:
2014-12-29 Sam Weinig <sam@webkit.org>
Try to fix the iOS build.
* Shared/WebPasteboardProxy.h:
2014-12-29 Anders Carlsson <andersca@apple.com>
Convert injected bundle message posting to UserData
https://bugs.webkit.org/show_bug.cgi?id=139993
Reviewed by Sam Weinig.
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::createNewWebProcess):
(WebKit::WebProcessPool::postMessageToInjectedBundle):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::handleInjectedBundleMessage):
(WebKit::WebProcess::postInjectedBundleMessage): Deleted.
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:
2014-12-29 Sam Weinig <sam@webkit.org>
Try to fix the iOS build.
* Shared/WebPasteboardProxy.h:
2014-12-29 Csaba Osztrogonác <ossy@webkit.org>
One more speculative buildfix after r177794.
* CMakeLists.txt:
2014-12-29 Sam Weinig <sam@webkit.org>
Try to fix the iOS build.
* Shared/WebPasteboardProxy.h:
2014-12-29 Csaba Osztrogonác <ossy@webkit.org>
Speculative buildfix after r177793.
* WebProcess/soup/WebProcessSoup.cpp:
(WebKit::WebProcess::platformInitializeWebProcess):
2014-12-29 Csaba Osztrogonác <ossy@webkit.org>
Speculative buildfix after r177794.
* CMakeLists.txt:
2014-12-29 Sam Weinig <sam@webkit.org>
Removes some unnecessary use of LegacyReceiver
https://bugs.webkit.org/show_bug.cgi?id=139992
Reviewed by Anders Carlsson.
* Shared/WebConnection.cpp:
(WebKit::WebConnection::didReceiveMessage): Deleted.
* Shared/WebConnection.h:
* Shared/WebConnection.messages.in:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::didReceiveMessage): Deleted.
(WebKit::WebProcessPool::didReceiveSyncMessage): Deleted.
* UIProcess/WebProcessPool.h:
* UIProcess/WebProcessPool.messages.in:
Remove unnecessary use of LegacyReceiver.
* UIProcess/WebPageProxy.h:
Remove declarations for functions that don't exist.
2014-12-29 Anders Carlsson <andersca@apple.com>
Convert all variadic web process messages to UserData
https://bugs.webkit.org/show_bug.cgi?id=139991
Reviewed by Sam Weinig.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::loadRequest):
(WebKit::WebPageProxy::loadFile):
(WebKit::WebPageProxy::loadData):
(WebKit::WebPageProxy::loadHTMLString):
(WebKit::WebPageProxy::loadAlternateHTMLString):
(WebKit::WebPageProxy::loadPlainTextString):
(WebKit::WebPageProxy::loadWebArchiveData):
(WebKit::WebPageProxy::postMessageToInjectedBundle):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::loadRequest):
(WebKit::WebPage::loadDataImpl):
(WebKit::WebPage::loadString):
(WebKit::WebPage::loadData):
(WebKit::WebPage::loadHTMLString):
(WebKit::WebPage::loadAlternateHTMLString):
(WebKit::WebPage::loadPlainTextString):
(WebKit::WebPage::loadWebArchiveData):
(WebKit::WebPage::postInjectedBundleMessage):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
2014-12-29 Anders Carlsson <andersca@apple.com>
Convert all variadic WebProcessProxy message over to UserData
https://bugs.webkit.org/show_bug.cgi?id=139990
Reviewed by Sam Weinig.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::willGoToBackForwardListItem):
(WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
(WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
(WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
(WebKit::WebPageProxy::didCommitLoadForFrame):
(WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
(WebKit::WebPageProxy::didFinishLoadForFrame):
(WebKit::WebPageProxy::didFailLoadForFrame):
(WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
(WebKit::WebPageProxy::didReceiveTitleForFrame):
(WebKit::WebPageProxy::didFirstLayoutForFrame):
(WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame):
(WebKit::WebPageProxy::didLayout):
(WebKit::WebPageProxy::didRemoveFrameFromHierarchy):
(WebKit::WebPageProxy::didDisplayInsecureContentForFrame):
(WebKit::WebPageProxy::didRunInsecureContentForFrame):
(WebKit::WebPageProxy::didDetectXSSForFrame):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::decidePolicyForNewWindowAction):
(WebKit::WebPageProxy::decidePolicyForResponse):
(WebKit::WebPageProxy::decidePolicyForResponseSync):
(WebKit::WebPageProxy::unableToImplementPolicy):
(WebKit::WebPageProxy::willSubmitForm):
(WebKit::WebPageProxy::mouseDidMoveOverElement):
(WebKit::WebPageProxy::didBeginTrackingPotentialLongMousePress):
(WebKit::WebPageProxy::didRecognizeLongMousePress):
(WebKit::WebPageProxy::didCancelTrackingPotentialLongMousePress):
(WebKit::WebPageProxy::showContextMenu):
(WebKit::WebPageProxy::internalShowContextMenu):
(WebKit::WebPageProxy::didPerformActionMenuHitTest):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::showSelectionServiceMenu):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::mouseDidMoveOverElement):
(WebKit::WebChromeClient::didBeginTrackingPotentialLongMousePress):
(WebKit::WebChromeClient::didRecognizeLongMousePress):
(WebKit::WebChromeClient::didCancelTrackingPotentialLongMousePress):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::detachedFromParent2):
(WebKit::WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
(WebKit::WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
(WebKit::WebFrameLoaderClient::dispatchDidPushStateWithinPage):
(WebKit::WebFrameLoaderClient::dispatchDidReplaceStateWithinPage):
(WebKit::WebFrameLoaderClient::dispatchDidPopStateWithinPage):
(WebKit::WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
(WebKit::WebFrameLoaderClient::dispatchDidReceiveTitle):
(WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
(WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
(WebKit::WebFrameLoaderClient::dispatchDidFailLoad):
(WebKit::WebFrameLoaderClient::dispatchDidFinishDocumentLoad):
(WebKit::WebFrameLoaderClient::dispatchDidFinishLoad):
(WebKit::WebFrameLoaderClient::dispatchDidLayout):
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
(WebKit::WebFrameLoaderClient::dispatchUnableToImplementPolicy):
(WebKit::WebFrameLoaderClient::dispatchWillSubmitForm):
(WebKit::WebFrameLoaderClient::shouldGoToHistoryItem):
(WebKit::WebFrameLoaderClient::didDisplayInsecureContent):
(WebKit::WebFrameLoaderClient::didRunInsecureContent):
(WebKit::WebFrameLoaderClient::didDetectXSS):
* WebProcess/WebPage/WebContextMenu.cpp:
(WebKit::WebContextMenu::show):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performActionMenuHitTestAtLocation):
2014-12-29 Sam Weinig <sam@webkit.org>
Move Pasteboard code out of WebProcessPool and into its own singleton class
https://bugs.webkit.org/show_bug.cgi?id=139987
Reviewed by Anders Carlsson.
* DerivedSources.make:
* Shared/WebPasteboardProxy.cpp: Added.
(WebKit::WebPasteboardProxy::shared):
(WebKit::WebPasteboardProxy::WebPasteboardProxy):
(WebKit::WebPasteboardProxy::addWebProcessProxy):
* Shared/WebPasteboardProxy.h: Added.
* Shared/WebPasteboardProxy.messages.in: Added.
* UIProcess/Cocoa/WebPasteboardProxyCocoa.mm: Added.
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::didReceiveSyncMessage):
(WebKit::WebProcessPool::dummy): Deleted.
* UIProcess/WebProcessPool.h:
* UIProcess/WebProcessPool.messages.in:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::WebProcessProxy):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::writeItemsToPasteboard):
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2014-12-29 Anders Carlsson <andersca@apple.com>
Use UserData for bundle initialization data
https://bugs.webkit.org/show_bug.cgi?id=139989
Reviewed by Sam Weinig.
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::~WebProcessCreationParameters):
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::createNewWebProcess):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):
2014-12-28 Anders Carlsson <andersca@apple.com>
Use UserData when sending messages to the process pool
https://bugs.webkit.org/show_bug.cgi?id=139978
Reviewed by Sam Weinig.
* Scripts/webkit/messages.py:
(generate_message_handler):
Include the connection parameter for legacy receivers as well.
* Shared/CoreIPCSupport/WebContextMessageKinds.h:
Remove this, it's no longer needed.
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::didReceiveMessage):
No need to special case the postMessage message.
(WebKit::WebProcessPool::didReceiveSyncMessage):
No need to special case the postSynchronousMessageMessage message.
(WebKit::WebProcessPool::handleMessage):
Convert handles to objects and call didReceiveMessageFromInjectedBundle.
(WebKit::WebProcessPool::handleSynchronousMessage):
Convert handles to objects, call didReceiveSynchronousMessageFromInjectedBundle, and then
convert objects back to handles in the reply.
(WebKit::WebProcessPool::didReceiveMessageFromInjectedBundle): Deleted.
(WebKit::WebProcessPool::didReceiveSynchronousMessageFromInjectedBundle): Deleted.
(WebKit::WebProcessPool::dummy): Deleted.
* UIProcess/WebProcessPool.h:
Add handleMessage and handleSynchronousMessage message handlers.
* UIProcess/WebProcessPool.messages.in:
Add new messages.
* WebKit2.xcodeproj/project.pbxproj:
Remove a now unused file.
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::postMessage):
Convert objects to handles in the message body and then send the HandleMessage to the UI process.
(WebKit::InjectedBundle::postSynchronousMessage):
Convert objects to handles in the message body, send the HandleSynchronousMessage message to the UI process,
and then convert handles back to objects in the reply.
2014-12-28 Anders Carlsson <andersca@apple.com>
Transform nested objects inside arrays
https://bugs.webkit.org/show_bug.cgi?id=139976
Reviewed by Oliver Hunt.
Call transformGraph on each element so that we'll transform other nested objects correctly.
* Shared/UserData.cpp:
(WebKit::transformGraph):
2014-12-27 Dan Bernstein <mitz@apple.com>
iOS build fix after r177765.
* Shared/mac/ObjCObjectGraph.mm:
(WebKit::ObjCObjectGraph::encode):
2014-12-27 Anders Carlsson <andersca@apple.com>
Switch WebConnection over to sending objects with UserData
https://bugs.webkit.org/show_bug.cgi?id=139967
Reviewed by Oliver Hunt.
* Shared/WebConnection.cpp:
(WebKit::WebConnection::postMessage):
No need to construct the message manually anymore.
(WebKit::WebConnection::handleMessage):
No need to decode the message manually, just get the object from the UserData message body,
convert any handles to objects, and dispatch the message.
* Shared/WebConnection.h:
Remove now unused members.
* Shared/WebConnection.messages.in:
Give HandleMessage a proper signature.
* UIProcess/WebConnectionToWebProcess.cpp:
(WebKit::WebConnectionToWebProcess::transformHandlesToObjects):
(WebKit::WebConnectionToWebProcess::transformObjectsToHandles):
Call the WebProcessProxy version.
(WebKit::WebConnectionToWebProcess::encodeMessageBody): Deleted.
(WebKit::WebConnectionToWebProcess::decodeMessageBody): Deleted.
* UIProcess/WebConnectionToWebProcess.h:
* WebProcess/WebConnectionToUIProcess.cpp:
(WebKit::WebConnectionToUIProcess::encodeMessageBody): Deleted.
(WebKit::WebConnectionToUIProcess::decodeMessageBody): Deleted.
* WebProcess/WebConnectionToUIProcess.h:
Delete more unused members.
2014-12-27 Anders Carlsson <andersca@apple.com>
Encode and decode WKTypeRefWrapper objects
https://bugs.webkit.org/show_bug.cgi?id=139966
Reviewed by Oliver Hunt.
* Shared/UserData.cpp:
(WebKit::UserData::encode):
* Shared/UserData.h:
* Shared/mac/ObjCObjectGraph.mm:
(WebKit::typeFromObject):
(WebKit::ObjCObjectGraph::encode):
(WebKit::ObjCObjectGraph::decode):
2014-12-27 Anders Carlsson <andersca@apple.com>
Implement encoding and decoding of ObjCObjectGraph objects
https://bugs.webkit.org/show_bug.cgi?id=139965
Reviewed by Oliver Hunt.
* Shared/UserData.cpp:
(WebKit::UserData::encode):
(WebKit::UserData::decode):
* Shared/mac/ObjCObjectGraph.h:
* Shared/mac/ObjCObjectGraph.mm:
(WebKit::typeFromObject):
(WebKit::ObjCObjectGraph::encode):
(WebKit::ObjCObjectGraph::decode):
2014-12-27 Dan Bernstein <mitz@apple.com>
[Cocoa] WKWebProcessPlugInLoadDelegate uses the deprecated WKRenderingProgressEvents enum
https://bugs.webkit.org/show_bug.cgi?id=139964
Reviewed by Anders Carlsson.
* Shared/API/Cocoa/WKRenderingProgressEventsInternal.h: Removed.
* Shared/API/Cocoa/_WKRenderingProgressEvents.h: Added. Moved the enum definition from
WKWebViewPrivate.h to here.
* Shared/API/Cocoa/_WKRenderingProgressEventsInternal.h: Added.
(renderingProgressEvents): Moved from NavigationState.mm to here.
* UIProcess/API/Cocoa/WKBrowsingContextController.h: Removed observedRenderingProgressEvents
property declaration.
* UIProcess/API/Cocoa/WKBrowsingContextController.mm:
(layoutMilestones): Deleted.
(-[WKBrowsingContextController setObservedRenderingProgressEvents:]): Deleted. This is not
needed for binary compatibility.
(didLayout): Deleted.
(setUpPageLoaderClient): Removed setting up didLayout callback.
* UIProcess/API/Cocoa/WKBrowsingContextLoadDelegate.h: Removed unused delegate method.
* UIProcess/API/Cocoa/WKWebViewPrivate.h: Import definition of _WKRenderingProgressEvents
from new header.
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::renderingProgressEvents): Moved into its own header.
* WebKit2.xcodeproj/project.pbxproj: Updated for file additions and removeals, and moved
WKRenderingProgressEvents.h into a new Deprecated group.
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h: Changed the type of
a delegate method parameter to _WKRenderingProgressEvents.
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(didLayout): Pass the new type.
2014-12-26 Conrad Shultz <conrad_shultz@apple.com>
Safari build crashes when "zooming into"/choosing a tab from tab view
https://bugs.webkit.org/show_bug.cgi?id=139934
Reviewed by Dan Bernstein.
* UIProcess/API/mac/WKView.mm:
(-[WKView _setIgnoresNonWheelEvents:]):
Trying to add a nil gesture recognizer raises an exception. Stop assuming that a
gesture recognizer is non-nil.
2014-12-26 Anders Carlsson <andersca@apple.com>
Handle more types in the UserData encode/decode functions
https://bugs.webkit.org/show_bug.cgi?id=139959
Reviewed by Dan Bernstein.
* Shared/UserData.cpp:
(WebKit::UserData::encode):
(WebKit::UserData::decode):
2014-12-26 Anders Carlsson <andersca@apple.com>
Move handle encoding functions to their respective implementation files
https://bugs.webkit.org/show_bug.cgi?id=139957
Reviewed by Dan Bernstein.
* Shared/API/APIFrameHandle.cpp:
(API::FrameHandle::encode):
(API::FrameHandle::decode):
* Shared/API/APIFrameHandle.h:
* Shared/API/APIPageGroupHandle.cpp:
(API::PageGroupHandle::PageGroupHandle):
(API::PageGroupHandle::encode):
(API::PageGroupHandle::decode):
* Shared/API/APIPageGroupHandle.h:
* Shared/API/APIPageHandle.cpp:
(API::PageHandle::encode):
(API::PageHandle::decode):
* Shared/API/APIPageHandle.h:
* Shared/UserData.cpp:
(WebKit::UserData::encode):
(WebKit::UserData::decode):
2014-12-26 Anders Carlsson <andersca@apple.com>
Add the notion of auto-converting page and frame handles
https://bugs.webkit.org/show_bug.cgi?id=139954
Reviewed by Dan Bernstein.
This makes it possible to tell the difference between page and frame handles that
should be converted to their respective UI or web process object representations
and handles that should stay the same (for the modern API for example).
* Shared/API/APIFrameHandle.cpp:
(API::FrameHandle::create):
(API::FrameHandle::createAutoconverting):
(API::FrameHandle::FrameHandle):
* Shared/API/APIFrameHandle.h:
(API::FrameHandle::isAutoconverting):
* Shared/API/APIPageHandle.cpp:
(API::PageHandle::create):
(API::PageHandle::createAutoconverting):
(API::PageHandle::PageHandle):
* Shared/API/APIPageHandle.h:
(API::PageHandle::isAutoconverting):
* Shared/API/Cocoa/_WKFrameHandle.mm:
(-[_WKFrameHandle initWithCoder:]):
* Shared/UserData.cpp:
(WebKit::shouldTransform):
* Shared/UserData.h:
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::UIClient::printFrame):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::transformHandlesToObjects):
(WebKit::WebProcessProxy::transformObjectsToHandles):
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
(-[WKWebProcessPlugInFrame handle]):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::transformHandlesToObjects):
(WebKit::WebProcess::transformObjectsToHandles):
2014-12-26 Dan Bernstein <mitz@apple.com>
[Cocoa] Some modern SPI changes have missing or incorrect availability annotations
https://bugs.webkit.org/show_bug.cgi?id=139940
Reviewed by Darin Adler.
* Shared/API/c/WKDeclarationSpecifiers.h: Renamed WK_DEPRECATED to WK_C_DEPRECATED.
* Shared/API/Cocoa/WKFoundation.h: Define WK_DEPRECATED when API availability is not enabled
to mean that the declaration is currently deprecated.
* Shared/API/c/WKConnectionRef.h: Updated for the renaming of the existing WK_DEPRECATED to
WK_C_DEPRECATED.
* UIProcess/API/C/WKContext.h: Ditto.
* UIProcess/API/C/WKContextConnectionClient.h: Ditto.
* UIProcess/API/C/WKContextDownloadClient.h: Ditto.
* UIProcess/API/C/WKContextHistoryClient.h: Ditto.
* UIProcess/API/C/WKContextInjectedBundleClient.h: Ditto.
* UIProcess/API/C/WKCookieManager.h: Ditto.
* UIProcess/API/C/WKDatabaseManager.h: Ditto.
* UIProcess/API/C/WKGeolocationManager.h: Ditto.
* UIProcess/API/C/WKIconDatabase.h: Ditto.
* UIProcess/API/C/WKNotificationProvider.h: Ditto.
* UIProcess/API/C/WKPageContextMenuClient.h: Ditto.
* UIProcess/API/C/WKPageFindClient.h: Ditto.
* UIProcess/API/C/WKPageFindMatchesClient.h: Ditto.
* UIProcess/API/C/WKPageFormClient.h: Ditto.
* UIProcess/API/C/WKPageUIClient.h: Ditto.
* WebProcess/InjectedBundle/API/c/WKBundle.h: Ditto.
* WebProcess/InjectedBundle/API/c/WKBundlePageBanner.h: Ditto.
* WebProcess/InjectedBundle/API/c/WKBundlePageContextMenuClient.h: Ditto.
* WebProcess/InjectedBundle/API/c/WKBundlePageDiagnosticLoggingClient.h: Ditto.
* WebProcess/InjectedBundle/API/c/WKBundlePageEditorClient.h: Ditto.
* WebProcess/InjectedBundle/API/c/WKBundlePageFormClient.h: Ditto.
* WebProcess/InjectedBundle/API/c/WKBundlePageFullScreenClient.h: Ditto.
* WebProcess/InjectedBundle/API/c/WKBundlePageLoaderClient.h: Ditto.
* WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h: Ditto.
* WebProcess/InjectedBundle/API/c/WKBundlePagePolicyClient.h: Ditto.
* WebProcess/InjectedBundle/API/c/WKBundlePageResourceLoadClient.h: Ditto.
* WebProcess/InjectedBundle/API/c/WKBundlePageUIClient.h: Ditto.
* Shared/API/Cocoa/WKRenderingProgressEvents.h: Added missing availability annotation.
* UIProcess/API/Cocoa/WKPreferencesPrivate.h: Changed to use WK_MAC_TBA and WK_IOS_TBA for
_WKDebugOverlayRegions enum. Added availability annotations to new properties.
* UIProcess/API/Cocoa/WKProcessPoolPrivate.h: Added availability annotation to new method.
* UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h: Annotated new method, changed Mac
availability of iOS-only method to NA.
* UIProcess/API/Cocoa/WKWebViewPrivate.h: Added availability annotation to new enum value,
new property, and new method. Added deprecation annotation to one method.
* UIProcess/API/Cocoa/_WKWebsiteDataStore.h: Annotated new method.
* mac/rewrite-availability-macros.sh: Rewrite WK_DEPRECATED to NS_DEPRECATED.
2014-12-26 Dan Bernstein <mitz@apple.com>
<rdar://problem/19348208> REGRESSION (r177027): iOS builds use the wrong toolchain
https://bugs.webkit.org/show_bug.cgi?id=139950
Reviewed by David Kilzer.
* Configurations/Base.xcconfig: Only define TOOLCHAINS when building for OS X, doing so
in a manner that works with Xcode 5.1.1.
2014-12-25 Hunseop Jeong <hs85.jeong@samsung.com>
Fix build warning after r177700
https://bugs.webkit.org/show_bug.cgi?id=139948
Reviewed by Alexey Proskuryakov.
* UIProcess/WebConnectionToWebProcess.cpp:
(WebKit::WebConnectionToWebProcess::transformHandlesToObjects):
(WebKit::WebConnectionToWebProcess::transformObjectsToHandles):
2014-12-25 Chris Dumez <cdumez@apple.com>
[iOS] Log better using FeatureCounter why PageCache is failing due to pruned resources
https://bugs.webkit.org/show_bug.cgi?id=139921
Reviewed by Gavin Barraclough and Alexey Proskuryakov.
Call PageCache::pruneToCapacityNow() instead of multiple calls to
setCapacity() as it does exactly what we want. Also pass the new
PrunedReason argument so help us do better logging.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::releasePageCache):
2014-12-25 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r177712 and r177717.
https://bugs.webkit.org/show_bug.cgi?id=139944
Caused flaky assertion failures (Requested by ap on #webkit).
Reverted changesets:
"[iOS] Log better using FeatureCounter why PageCache is
failing due to pruned resources"
https://bugs.webkit.org/show_bug.cgi?id=139921
http://trac.webkit.org/changeset/177712
"Unreviewed, fix build warning after r177712"
http://trac.webkit.org/changeset/177717
2014-12-24 Dan Bernstein <mitz@apple.com>
[Cocoa] WebKit private headers shouldnt contain “inappropriate” macros
https://bugs.webkit.org/show_bug.cgi?id=139942
Reviewed by Darin Adler.
* WebKit2.xcodeproj/project.pbxproj: In the Check For Inappropriate Macros in External
Headers script build phase, check the PrivateHeaders directory as well.
2014-12-24 Dan Bernstein <mitz@apple.com>
Addressed a linker warning about the definition of a method in a category overridng a method from the class.
* UIProcess/API/mac/WKView.mm:
(-[WKView(Private) _targetWindowForMovePreparation]): Deleted. This was identical to the
definition in the main WKView implementation above.
2014-12-23 ChangSeok Oh <changseok.oh@collabora.com>
[GTK] Build fix after r177692
https://bugs.webkit.org/show_bug.cgi?id=139919
Reviewed by Gyuyoung Kim.
This change addresses build failures introduced after r177692.
* PlatformEfl.cmake: Renamed WebContextSoup to WebProcessPoolSoup.cpp
* PlatformGTK.cmake: ditto.
* UIProcess/API/gtk/PageClientImpl.cpp:
* UIProcess/API/gtk/WebKitDownloadClient.cpp:
* UIProcess/API/gtk/WebKitFormSubmissionRequest.cpp:
(webkitFormSubmissionRequestCreate):
(webkit_form_submission_request_get_text_fields):
* UIProcess/API/gtk/WebKitFormSubmissionRequestPrivate.h:
* UIProcess/API/gtk/WebKitInjectedBundleClient.cpp:
(didReceiveWebViewMessageFromInjectedBundle):
(didReceiveMessageFromInjectedBundle):
* UIProcess/API/gtk/WebKitSecurityManager.cpp:
(registerSecurityPolicyForURIScheme):
* UIProcess/API/gtk/WebKitWebContext.cpp:
(webkitWebContextConstructed):
(webkit_web_context_prefetch_dns):
(webkitWebContextGetContext):
* UIProcess/API/gtk/WebKitWebContextPrivate.h:
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkit_web_view_get_snapshot):
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseCreate):
(webkitWebViewBaseCreateWebPage):
* UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
* UIProcess/API/gtk/WebKitWindowProperties.cpp:
* UIProcess/gtk/WebInspectorProxyGtk.cpp:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
* UIProcess/gtk/WebProcessPoolGtk.cpp: Renamed from Source/WebKit2/UIProcess/gtk/WebContextGtk.cpp.
(WebKit::initInspectorServer):
(WebKit::WebProcessPool::platformDefaultApplicationCacheDirectory):
(WebKit::WebProcessPool::platformInitializeWebProcess):
(WebKit::WebProcessPool::platformInvalidateContext):
(WebKit::WebProcessPool::platformDefaultWebSQLDatabaseDirectory):
(WebKit::WebProcessPool::platformDefaultIndexedDBDatabaseDirectory):
(WebKit::WebProcessPool::platformDefaultIconDatabasePath):
(WebKit::WebProcessPool::platformDefaultLocalStorageDirectory):
(WebKit::WebProcessPool::platformDefaultMediaKeysStorageDirectory):
(WebKit::WebProcessPool::platformDefaultDiskCacheDirectory):
(WebKit::WebProcessPool::platformDefaultCookieStorageDirectory):
(WebKit::WebProcessPool::setIgnoreTLSErrors):
* UIProcess/soup/WebProcessPoolSoup.cpp: Renamed from Source/WebKit2/UIProcess/soup/WebContextSoup.cpp.
(WebKit::WebProcessPool::platformInitializeNetworkProcess):
* WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp:
(webkitWebExtensionDidReceiveMessage):
* WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
(didInitiateLoadForResource):
(willSendRequestForFrame):
(didReceiveResponseForResource):
(didReceiveContentLengthForResource):
(didFinishLoadForResource):
(didFailLoadForResource):
(webkitWebPageDidReceiveMessage):
* WebProcess/InjectedBundle/API/gtk/WebKitWebPagePrivate.h:
2014-12-23 Dan Bernstein <mitz@apple.com>
iOS build fix
* UIProcess/API/Cocoa/WKProcessGroup.mm:
(-[WKProcessGroup _geolocationProvider]):
2014-12-23 Gyuyoung Kim <gyuyoung.kim@samsung.com>
[EFL][WK2] Fix a lot of build break since r177692
https://bugs.webkit.org/show_bug.cgi?id=139932
Unreviewed EFL build fix.
Rename WebContext with WebProcessPool in EFL port files.
* CMakeLists.txt:
* UIProcess/API/efl/EwkView.cpp:
* UIProcess/API/efl/ewk_context.cpp:
* UIProcess/API/efl/tests/test_ewk2_context.cpp:
(TEST_F):
* UIProcess/CoordinatedGraphics/WebView.cpp:
(WebKit::WebView::WebView):
* UIProcess/CoordinatedGraphics/WebView.h:
* UIProcess/Network/CustomProtocols/soup/CustomProtocolManagerProxySoup.cpp:
(WebKit::CustomProtocolManagerProxy::CustomProtocolManagerProxy):
(WebKit::CustomProtocolManagerProxy::startLoading):
(WebKit::CustomProtocolManagerProxy::stopLoading):
* UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.cpp:
(WebKit::WebSoupCustomProtocolRequestManager::create):
(WebKit::WebSoupCustomProtocolRequestManager::WebSoupCustomProtocolRequestManager):
(WebKit::WebSoupCustomProtocolRequestManager::registerSchemeForCustomProtocol):
(WebKit::WebSoupCustomProtocolRequestManager::unregisterSchemeForCustomProtocol):
(WebKit::WebSoupCustomProtocolRequestManager::didReceiveResponse):
(WebKit::WebSoupCustomProtocolRequestManager::didLoadData):
(WebKit::WebSoupCustomProtocolRequestManager::didFailWithError):
(WebKit::WebSoupCustomProtocolRequestManager::didFinishLoading):
* UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.h:
* UIProcess/WebBatteryManagerProxy.cpp:
(WebKit::WebBatteryManagerProxy::create):
(WebKit::WebBatteryManagerProxy::WebBatteryManagerProxy):
(WebKit::WebBatteryManagerProxy::providerDidChangeBatteryStatus):
(WebKit::WebBatteryManagerProxy::providerUpdateBatteryStatus):
* UIProcess/WebBatteryManagerProxy.h:
* UIProcess/WebTextChecker.cpp:
(WebKit::updateStateForAllContexts):
* UIProcess/WebVibrationProxy.cpp:
(WebKit::WebVibrationProxy::WebVibrationProxy):
(WebKit::WebVibrationProxy::~WebVibrationProxy):
* UIProcess/efl/RequestManagerClientEfl.h:
* UIProcess/efl/WebContextEfl.cpp:
(WebKit::WebProcessPool::platformDefaultApplicationCacheDirectory):
(WebKit::WebProcessPool::platformInitializeWebProcess):
(WebKit::WebProcessPool::platformInvalidateContext):
(WebKit::WebProcessPool::platformDefaultWebSQLDatabaseDirectory):
(WebKit::WebProcessPool::platformDefaultIndexedDBDatabaseDirectory):
(WebKit::WebProcessPool::platformDefaultIconDatabasePath):
(WebKit::WebProcessPool::platformDefaultLocalStorageDirectory):
(WebKit::WebProcessPool::platformDefaultMediaKeysStorageDirectory):
(WebKit::WebProcessPool::platformDefaultDiskCacheDirectory):
(WebKit::WebProcessPool::platformDefaultCookieStorageDirectory):
(WebKit::WebProcessPool::setIgnoreTLSErrors):
(WebKit::WebContext::platformDefaultApplicationCacheDirectory): Deleted.
(WebKit::WebContext::platformInitializeWebProcess): Deleted.
(WebKit::WebContext::platformInvalidateContext): Deleted.
(WebKit::WebContext::platformDefaultWebSQLDatabaseDirectory): Deleted.
(WebKit::WebContext::platformDefaultIndexedDBDatabaseDirectory): Deleted.
(WebKit::WebContext::platformDefaultIconDatabasePath): Deleted.
(WebKit::WebContext::platformDefaultLocalStorageDirectory): Deleted.
(WebKit::WebContext::platformDefaultMediaKeysStorageDirectory): Deleted.
(WebKit::WebContext::platformDefaultDiskCacheDirectory): Deleted.
(WebKit::WebContext::platformDefaultCookieStorageDirectory): Deleted.
(WebKit::WebContext::setIgnoreTLSErrors): Deleted.
* UIProcess/efl/WebInspectorProxyEfl.cpp:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
* UIProcess/efl/WebViewEfl.cpp:
(WebKit::WebView::create):
(WebKit::WebViewEfl::WebViewEfl):
* UIProcess/efl/WebViewEfl.h:
* UIProcess/soup/WebContextSoup.cpp:
(WebKit::WebProcessPool::platformInitializeNetworkProcess):
(WebKit::WebContext::platformInitializeNetworkProcess): Deleted.
* UIProcess/soup/WebCookieManagerProxySoup.cpp:
(WebKit::WebCookieManagerProxy::setCookiePersistentStorage):
* UIProcess/soup/WebSoupRequestManagerProxy.h:
2014-12-23 Sam Weinig <sam@webkit.org>
Remove telephone number context support from ContextMenuContextData, it is unused
https://bugs.webkit.org/show_bug.cgi?id=139931
Reviewed by Alexey Proskuryakov.
m_isTelephoneNumberContext was only ever set to true in the ContextMenuContextData
constructor that took a TelephoneNumberContextTag, which never got called. Remove it
all.
* Shared/ContextMenuContextData.cpp:
(WebKit::ContextMenuContextData::ContextMenuContextData):
(WebKit::ContextMenuContextData::encode):
(WebKit::ContextMenuContextData::decode):
* Shared/ContextMenuContextData.h:
(WebKit::ContextMenuContextData::ContextMenuContextData):
(WebKit::ContextMenuContextData::isTelephoneNumberContext): Deleted.
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::showContextMenu):
2014-12-23 Sam Weinig <sam@webkit.org>
Attempt to fix the Mountain Lion build.
* Shared/ContextMenuContextData.h:
(WebKit::ContextMenuContextData::isTelephoneNumberContext):
2014-12-23 Anders Carlsson <andersca@apple.com>
Handle WKTypeRefWrapper when converting object graphs
https://bugs.webkit.org/show_bug.cgi?id=139927
Reviewed by Tim Horton.
* UIProcess/Cocoa/WebProcessProxyCocoa.mm:
(WebKit::WebProcessProxy::transformHandlesToObjects):
(WebKit::WebProcessProxy::transformObjectsToHandles):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::transformHandlesToObjects):
(WebKit::WebProcess::transformObjectsToHandles):
2014-12-23 Chris Dumez <cdumez@apple.com>
[iOS] Log better using FeatureCounter why PageCache is failing due to pruned resources
https://bugs.webkit.org/show_bug.cgi?id=139921
<rdar://problem/19255690>
Reviewed by Gavin Barraclough.
Call PageCache::pruneToCapacityNow() instead of multiple calls to
setCapacity() as it does exactly what we want. Also pass the new
PrunedReason argument so help us do better logging.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::releasePageCache):
2014-12-23 Sam Weinig <sam@webkit.org>
Attempt to fix the iOS build.
* UIProcess/API/Cocoa/WKProcessGroup.mm:
(-[WKProcessGroup _geolocationProvider]):
* UIProcess/API/ios/WKViewIOS.mm:
(-[WKView _commonInitializationWithContextRef:pageGroupRef:relatedToPage:]):
2014-12-23 Anders Carlsson <andersca@apple.com>
Handle coding object graphs in the UI process
https://bugs.webkit.org/show_bug.cgi?id=139925
Reviewed by Sam Weinig.
* UIProcess/Cocoa/WebProcessProxyCocoa.mm: Added.
(WebKit::WebProcessProxy::transformHandlesToObjects):
(WebKit::WebProcessProxy::transformObjectsToHandles):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::transformHandlesToObjects):
(WebKit::WebProcessProxy::transformObjectsToHandles):
* UIProcess/WebProcessProxy.h:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::transformObjectsToHandles):
* WebProcess/WebProcess.h:
2014-12-23 Sam Weinig <sam@webkit.org>
ContextMenuContextData should store a ShareableBitmap not a ShareableBitmap::Handle
https://bugs.webkit.org/show_bug.cgi?id=139924
Reviewed by Anders Carlsson.
Replaces the ShareableBitmap::Handle in ContextMenuContextData with a RefPtr<ShareableBitmap>.
Removes the now unnecessary override copy-constructor and assignment-operator.
* Shared/ContextMenuContextData.cpp:
(WebKit::ContextMenuContextData::ContextMenuContextData):
(WebKit::ContextMenuContextData::encode):
(WebKit::ContextMenuContextData::decode):
(WebKit::ContextMenuContextData::controlledDataIsEditable):
(WebKit::ContextMenuContextData::operator=): Deleted.
* Shared/ContextMenuContextData.h:
(WebKit::ContextMenuContextData::ContextMenuContextData):
(WebKit::ContextMenuContextData::controlledImage):
(WebKit::ContextMenuContextData::needsServicesMenu):
(WebKit::ContextMenuContextData::controlledImageHandle): Deleted.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::internalShowContextMenu):
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::setupServicesMenu):
2014-12-23 Chris Dumez <cdumez@apple.com>
Unreviewed iOS build fix after 177692.
Missing WebKit:: namespace.
* UIProcess/ios/WKContentView.h:
2014-12-23 Anders Carlsson <andersca@apple.com>
Fix 32-build.
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::transformHandlesToObjects):
(WebKit::WebProcess::transformObjectsToHandles):
2014-12-23 Timothy Horton <timothy_horton@apple.com>
Install a TextIndicator for link immediate actions
https://bugs.webkit.org/show_bug.cgi?id=139897
<rdar://problem/19333076>
Reviewed by Anders Carlsson.
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController _defaultAnimationController]):
Install the link's TextIndicator.
(-[WKImmediateActionController menuItemDidClose:]):
Dismiss the TextIndicator and clean up when the item closes.
2014-12-23 Timothy Horton <timothy_horton@apple.com>
Expose ElementBoundingBox on WKHitTestResult
https://bugs.webkit.org/show_bug.cgi?id=139895
<rdar://problem/19333075>
Reviewed by Dan Bernstein.
* UIProcess/API/C/WKHitTestResult.cpp:
(WKHitTestResultGetElementBoundingBox):
* UIProcess/API/C/WKHitTestResult.h:
Expose the rect.
2014-12-23 Timothy Horton <timothy_horton@apple.com>
Remove the custom web page preview code
https://bugs.webkit.org/show_bug.cgi?id=139894
<rdar://problem/19333074>
Reviewed by Dan Bernstein.
* UIProcess/API/Cocoa/WKViewPrivate.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView _dismissContentRelativeChildWindows]):
(-[WKView _viewForPreviewingURL:initialFrameSize:]): Deleted.
(-[WKView _titleForPreviewOfURL:]): Deleted.
(-[WKView _setPreviewTitle:]): Deleted.
(-[WKView _setPreviewLoading:]): Deleted.
(-[WKView _setPreviewOverrideImage:]): Deleted.
(-[WKView _finishPreviewingURL:withPreviewView:]): Deleted.
(-[WKView _handleClickInPreviewView:URL:]): Deleted.
(-[WKView _shouldUseStandardQuickLookPreview]): Deleted.
* UIProcess/mac/WKImmediateActionController.h:
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController willDestroyView:]):
(-[WKImmediateActionController _clearImmediateActionState]):
(-[WKImmediateActionController immediateActionRecognizerWillPrepare:]):
(-[WKImmediateActionController _defaultAnimationController]):
(-[WKImmediateActionController hidePreview]): Deleted.
(-[WKImmediateActionController setPreviewTitle:]): Deleted.
(-[WKImmediateActionController setPreviewLoading:]): Deleted.
(-[WKImmediateActionController setPreviewOverrideImage:]): Deleted.
(-[WKImmediateActionController _animationControllerForCustomPreview]): Deleted.
* UIProcess/mac/WKPagePreviewViewController.h: Removed.
* UIProcess/mac/WKPagePreviewViewController.mm: Removed.
* UIProcess/mac/WKPreviewPopoverAnimationController.h: Removed.
* UIProcess/mac/WKPreviewPopoverAnimationController.mm: Removed.
* WebKit2.xcodeproj/project.pbxproj:
Remove all of the custom web page preview code. Clients that want the custom
preview can implement it by overriding the immediate action.
2014-12-23 Anders Carlsson <andersca@apple.com>
Add WebProcessProxy::transformHandlesToObjects
https://bugs.webkit.org/show_bug.cgi?id=139922
Reviewed by Tim Horton.
This will be used to convert between the handles and their respective UI side objects.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::transformHandlesToObjects):
(WebKit::WebProcessProxy::transformObjectsToHandles):
(WebKit::WebProcessProxy::apiObjectByConvertingToHandles): Deleted.
* UIProcess/WebProcessProxy.h:
2014-12-23 Anders Carlsson <andersca@apple.com>
Add handle transform functions to WebConnection
https://bugs.webkit.org/show_bug.cgi?id=139920
Reviewed by Sam Weinig.
This will be used by the web connection code to convert between objects and their respective handles.
* Shared/WebConnection.h:
* UIProcess/WebConnectionToWebProcess.cpp:
(WebKit::WebConnectionToWebProcess::transformHandlesToObjects):
(WebKit::WebConnectionToWebProcess::transformObjectsToHandles):
* UIProcess/WebConnectionToWebProcess.h:
* WebProcess/WebConnectionToUIProcess.cpp:
(WebKit::WebConnectionToUIProcess::transformHandlesToObjects):
(WebKit::WebConnectionToUIProcess::transformObjectsToHandles):
* WebProcess/WebConnectionToUIProcess.h:
2014-12-23 Sam Weinig <sam@webkit.org>
Rename ImmutableDictionary to API::Dictionary and merge MutableDictionary into it
https://bugs.webkit.org/show_bug.cgi?id=139917
Reviewed by Anders Carlsson.
- Renames ImmutableDictionary -> API::Dictionary
- Merges MutableDictionary into the new API::Dictionary
(as a result WKDictionaryIsMutable() now always returns true)
* File list elided *
2014-12-23 Anders Carlsson <andersca@apple.com>
Add WebProcess::transformObjectsToHandles
https://bugs.webkit.org/show_bug.cgi?id=139918
Reviewed by Tim Horton.
This function will be used for transforming bundle objects to their respective handle types
when sending messages to the UI process.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::transformHandlesToObjects):
(WebKit::WebProcess::transformObjectsToHandles):
* WebProcess/WebProcess.h:
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::transformHandlesToObjects):
(WebKit::WebProcess::transformObjectsToHandles):
2014-12-23 Anders Carlsson <andersca@apple.com>
Move dynamic_objc_cast to RetainPtr.h
https://bugs.webkit.org/show_bug.cgi?id=139915
Reviewed by Sam Weinig.
* Shared/mac/ObjCObjectGraph.mm:
(WebKit::dynamic_objc_cast): Deleted.
2014-12-23 Anders Carlsson <andersca@apple.com>
Add WebProcess::transformHandlesToObjects
https://bugs.webkit.org/show_bug.cgi?id=139913
Reviewed by Tim Horton.
Rename objectGraphByTransformingObjectsToHandles to transformObjectsToHandles and add
transformHandlesToObjects that will try to convert handles to the actual bundle type objects.
* WebProcess/WebProcess.h:
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::transformHandlesToObjects):
(WebKit::WebProcess::transformObjectsToHandles):
(WebKit::WebProcess::objectGraphByTransformingObjectsToHandles): Deleted.
2014-12-23 Anders Carlsson <andersca@apple.com>
Add WebProcess::objectGraphByTransformingObjectsToHandles
https://bugs.webkit.org/show_bug.cgi?id=139912
Reviewed by Tim Horton.
This will be used to convert Objective-C object graphs containing bundle types to their handle counterparts.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::transformHandlesToObjects):
(WebKit::WebProcess::apiObjectByConvertingFromHandles): Deleted.
Rename apiObjectByConvertingFromHandles to transformHandlesToObjects.
* WebProcess/WebProcess.h:
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::objectGraphByTransformingObjectsToHandles):
2014-12-23 Anders Carlsson <andersca@apple.com>
Fix UserMessage::transform to only call shouldTransform once
https://bugs.webkit.org/show_bug.cgi?id=139911
Reviewed by Sam Weinig.
Also, make it possible for transformers to return null objects and change the transformers
to return the passed in object when there's no need to do a transform.
* Shared/UserData.cpp:
(WebKit::transformGraph):
(WebKit::UserData::transform):
(WebKit::UserData::encode): Deleted.
(WebKit::UserData::decode): Deleted.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::apiObjectByConvertingToHandles):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::apiObjectByConvertingFromHandles):
2014-12-23 Sam Weinig <sam@webkit.org>
Rename WebContext to WebProcessPool
https://bugs.webkit.org/show_bug.cgi?id=139909
Rubber-stamped by Anders Carlsson.
- Major renames:
WebContext -> WebProcessPool
WebContextConfiguration -> WebProcessPoolConfiguration
API::ContextConfiguration -> API::ProcessPoolConfiguration
* File list elided *
2014-12-23 Anders Carlsson <andersca@apple.com>
Only call shouldTransformGraph once per graph
https://bugs.webkit.org/show_bug.cgi?id=139910
Reviewed by Sam Weinig.
Don't call shouldTransformGraph for each node in the object graph. Instead, call it once
and then transform the entire graph if needed.
* Shared/mac/ObjCObjectGraph.h:
* Shared/mac/ObjCObjectGraph.mm:
(WebKit::shouldTransformGraph):
(WebKit::transformGraph):
(WebKit::ObjCObjectGraph::transform):
(WebKit::shouldTransform): Deleted.
2014-12-22 Anders Carlsson <andersca@apple.com>
Use a Transformer for UserData as well, to avoid always copying arrays and dictionaries
https://bugs.webkit.org/show_bug.cgi?id=139896
Reviewed by Darin Adler.
* Shared/UserData.cpp:
(WebKit::shouldTransform):
(WebKit::UserData::transform):
* Shared/UserData.h:
(WebKit::UserData::Transformer::~Transformer):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::apiObjectByConvertingToHandles):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::apiObjectByConvertingFromHandles):
2014-12-22 Anders Carlsson <andersca@apple.com>
Make it possible to transform Objective-C object graphs, replacing certain elements with others
https://bugs.webkit.org/show_bug.cgi?id=139893
Reviewed by Sam Weinig.
* Shared/mac/ObjCObjectGraph.h:
(WebKit::ObjCObjectGraph::Transformer::~Transformer):
* Shared/mac/ObjCObjectGraph.mm:
(WebKit::dynamic_objc_cast):
(WebKit::shouldTransform):
(WebKit::ObjCObjectGraph::transform):
2014-12-22 Jaehun Lim <ljaehun.lim@samsung.com>
Unreviewed build fix after r177661 and r177662
* CMakeLists.txt: Add APIPageGroupHandle.cpp to the source list.
2014-12-22 Anders Carlsson <andersca@apple.com>
Convert pages and page groups to their respective handle objects
https://bugs.webkit.org/show_bug.cgi?id=139891
Reviewed by Tim Horton.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::apiObjectByConvertingToHandles):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::apiObjectByConvertingFromHandles):
2014-12-22 Anders Carlsson <andersca@apple.com>
Add a bunch of missing header includes in preparation for making toImpl require the complete type
https://bugs.webkit.org/show_bug.cgi?id=139887
Reviewed by Andreas Kling.
* WebProcess/InjectedBundle/API/c/WKBundle.cpp:
* WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
* WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
* WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
* WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.cpp:
* WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp:
* WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
* WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.cpp:
* WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
2014-12-22 Chris Dumez <cdumez@apple.com>
[iOS] Log using FeatureCounter user-triggered zooming
https://bugs.webkit.org/show_bug.cgi?id=139879
<rdar://problem/19329130>
Reviewed by Benjamin Poulain.
Log using FeatureCounter user-triggered zooming on iOS.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::willStartUserTriggeredZooming):
2014-12-22 Anders Carlsson <andersca@apple.com>
Add an API::PageGroupHandle object
https://bugs.webkit.org/show_bug.cgi?id=139881
Reviewed by Sam Weinig.
API::PageGroupHandle won't be exposed to any API, it will only be used to facilitate passing page groups
between the UI and web process inside UserData objects.
* Shared/API/APIObject.h:
* Shared/API/APIPageGroupHandle.cpp: Added.
(API::PageGroupHandle::create):
(API::PageGroupHandle::~PageGroupHandle):
(API::PageGroupHandle::PageGroupHandle):
* Shared/API/APIPageGroupHandle.h: Added.
(API::PageGroupHandle::webPageGroupData):
* Shared/UserData.cpp:
(WebKit::UserData::UserData):
(WebKit::UserData::encode):
(WebKit::UserData::decode):
* Shared/UserData.h:
* UIProcess/WebPageGroup.h:
(WebKit::WebPageGroup::data):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::apiObjectByConvertingToHandles):
* WebKit2.xcodeproj/project.pbxproj:
2014-12-22 Daniel Bates <dabates@apple.com>
Fix the iOS build after <https://trac.webkit.org/changeset/177639>
(https://bugs.webkit.org/show_bug.cgi?id=139866)
Substitute APISecurityOrigin.h for WebSecurityOrigin.h as the latter was renamed to the former.
* UIProcess/ios/WKGeolocationProviderIOS.mm:
2014-12-22 Csaba Osztrogonác <ossy@webkit.org>
URTBF after r177649.
* CMakeLists.txt:
2014-12-22 Csaba Osztrogonác <ossy@webkit.org>
Last URTBF after r177639, GTK builds now.
* UIProcess/API/gtk/WebKitJavascriptResult.cpp:
* UIProcess/API/gtk/WebKitUIClient.cpp:
* UIProcess/API/gtk/WebKitUserContentManager.cpp:
* UIProcess/API/gtk/WebKitUserMediaPermissionRequest.cpp:
(webkitUserMediaPermissionRequestCreate):
* UIProcess/API/gtk/WebKitUserMediaPermissionRequestPrivate.h:
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewRunJavaScriptCallback):
(webkit_web_view_run_javascript):
(resourcesStreamReadCallback):
2014-12-22 Anders Carlsson <andersca@apple.com>
Move more API classes from Shared to Shared/API.
Rubber-stamped by Sam Weinig.
* Shared/API/APIArray.cpp: Renamed from Source/WebKit2/Shared/APIArray.cpp.
* Shared/API/APIArray.h: Renamed from Source/WebKit2/Shared/APIArray.h.
* Shared/API/APIClient.h: Renamed from Source/WebKit2/Shared/APIClient.h.
* Shared/API/APIData.cpp: Renamed from Source/WebKit2/Shared/APIData.cpp.
* Shared/API/APIData.h: Renamed from Source/WebKit2/Shared/APIData.h.
* Shared/API/APIError.cpp: Renamed from Source/WebKit2/Shared/APIError.cpp.
* Shared/API/APIError.h: Renamed from Source/WebKit2/Shared/APIError.h.
* Shared/API/APIFrameHandle.cpp: Renamed from Source/WebKit2/Shared/APIFrameHandle.cpp.
* Shared/API/APIFrameHandle.h: Renamed from Source/WebKit2/Shared/APIFrameHandle.h.
* Shared/API/APIGeometry.cpp: Renamed from Source/WebKit2/Shared/APIGeometry.cpp.
* Shared/API/APIGeometry.h: Renamed from Source/WebKit2/Shared/APIGeometry.h.
* Shared/API/APINumber.h: Renamed from Source/WebKit2/Shared/APINumber.h.
* Shared/API/APIObject.cpp: Renamed from Source/WebKit2/Shared/APIObject.cpp.
* Shared/API/APIObject.h: Renamed from Source/WebKit2/Shared/APIObject.h.
* Shared/API/APIPageHandle.cpp: Renamed from Source/WebKit2/Shared/APIPageHandle.cpp.
* Shared/API/APIPageHandle.h: Renamed from Source/WebKit2/Shared/APIPageHandle.h.
* Shared/API/APIString.h: Renamed from Source/WebKit2/Shared/APIString.h.
* Shared/API/APIURL.h: Renamed from Source/WebKit2/Shared/APIURL.h.
* Shared/API/APIURLRequest.cpp: Renamed from Source/WebKit2/Shared/APIURLRequest.cpp.
* Shared/API/APIURLRequest.h: Renamed from Source/WebKit2/Shared/APIURLRequest.h.
* Shared/API/APIURLResponse.cpp: Renamed from Source/WebKit2/Shared/APIURLResponse.cpp.
* Shared/API/APIURLResponse.h: Renamed from Source/WebKit2/Shared/APIURLResponse.h.
2014-12-22 Csaba Osztrogonác <ossy@webkit.org>
One more URTBF after r177639 to try to make GTK happy.
* UIProcess/API/gtk/WebKitUserContentManager.cpp:
2014-12-22 Csaba Osztrogonác <ossy@webkit.org>
URTBF after r177639 to try to make GTK happy.
* UIProcess/API/gtk/WebKitJavascriptResult.cpp:
2014-12-22 Anders Carlsson <andersca@apple.com>
Rename a bunch of API classes and move them to Shared/API
https://bugs.webkit.org/show_bug.cgi?id=139866
Reviewed by Sam Weinig.
* Shared/API/APISecurityOrigin.h: Renamed from Source/WebKit2/Shared/WebSecurityOrigin.h.
(API::SecurityOrigin::createFromString):
(API::SecurityOrigin::create):
(API::SecurityOrigin::securityOrigin):
(API::SecurityOrigin::SecurityOrigin):
* Shared/API/APISerializedScriptValue.h: Renamed from Source/WebKit2/Shared/WebSerializedScriptValue.h.
(API::SerializedScriptValue::create):
(API::SerializedScriptValue::adopt):
(API::SerializedScriptValue::deserialize):
(API::SerializedScriptValue::dataReference):
(API::SerializedScriptValue::internalRepresentation):
(API::SerializedScriptValue::SerializedScriptValue):
* Shared/API/APIUserContentURLPattern.h: Renamed from Source/WebKit2/Shared/WebUserContentURLPattern.h.
(API::UserContentURLPattern::create):
(API::UserContentURLPattern::host):
(API::UserContentURLPattern::scheme):
(API::UserContentURLPattern::isValid):
(API::UserContentURLPattern::matchesURL):
(API::UserContentURLPattern::matchesSubdomains):
(API::UserContentURLPattern::patternString):
(API::UserContentURLPattern::UserContentURLPattern):
* Shared/API/c/WKSecurityOrigin.cpp:
(WKSecurityOriginGetTypeID):
(WKSecurityOriginCreateFromString):
(WKSecurityOriginCreateFromDatabaseIdentifier):
(WKSecurityOriginCreate):
* Shared/API/c/WKSerializedScriptValue.cpp:
(WKSerializedScriptValueGetTypeID):
(WKSerializedScriptValueCreate):
(WKSerializedScriptValueCreateWithInternalRepresentation):
* Shared/API/c/WKSharedAPICast.h:
(WebKit::toCopiedAPI):
* Shared/API/c/WKUserContentURLPattern.cpp:
(WKUserContentURLPatternGetTypeID):
(WKUserContentURLPatternCreate):
* Shared/SecurityOriginData.cpp:
(WebKit::performAPICallbackWithSecurityOriginDataVector):
* Shared/UserData.cpp:
(WebKit::UserData::encode):
(WebKit::UserData::decode):
* Shared/UserMessageCoders.h:
(WebKit::UserMessageEncoder::baseEncode):
(WebKit::UserMessageDecoder::baseDecode):
* UIProcess/API/APIUIClient.h:
(API::UIClient::exceededDatabaseQuota):
(API::UIClient::decidePolicyForGeolocationPermissionRequest):
(API::UIClient::decidePolicyForUserMediaPermissionRequest):
(API::UIClient::decidePolicyForNotificationPermissionRequest):
* UIProcess/API/C/WKNotification.cpp:
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageUIClient):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView evaluateJavaScript:completionHandler:]):
* UIProcess/Cocoa/UIDelegate.h:
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::UIClient::exceededDatabaseQuota):
* UIProcess/GenericCallback.h:
* UIProcess/Notifications/WebNotification.cpp:
(WebKit::WebNotification::WebNotification):
* UIProcess/Notifications/WebNotification.h:
(WebKit::WebNotification::origin):
* UIProcess/Notifications/WebNotificationManagerProxy.cpp:
(WebKit::WebNotificationManagerProxy::providerDidUpdateNotificationPolicy):
(WebKit::WebNotificationManagerProxy::providerDidRemoveNotificationPolicies):
* UIProcess/Notifications/WebNotificationManagerProxy.h:
* UIProcess/Notifications/WebNotificationProvider.cpp:
* UIProcess/Notifications/WebNotificationProvider.h:
* UIProcess/PageClient.h:
(WebKit::PageClient::decidePolicyForGeolocationPermissionRequest):
* UIProcess/WebApplicationCacheManagerProxy.cpp:
(WebKit::WebApplicationCacheManagerProxy::deleteEntriesForOrigin):
* UIProcess/WebApplicationCacheManagerProxy.h:
* UIProcess/WebCookieManagerProxy.cpp:
* UIProcess/WebDatabaseManagerProxy.cpp:
(WebKit::WebDatabaseManagerProxy::didGetDatabasesByOrigin):
(WebKit::WebDatabaseManagerProxy::didGetDatabaseOrigins):
(WebKit::WebDatabaseManagerProxy::deleteDatabaseWithNameForOrigin):
(WebKit::WebDatabaseManagerProxy::deleteDatabasesForOrigin):
(WebKit::WebDatabaseManagerProxy::setQuotaForOrigin):
(WebKit::WebDatabaseManagerProxy::didModifyOrigin):
(WebKit::WebDatabaseManagerProxy::didModifyDatabase):
* UIProcess/WebDatabaseManagerProxy.h:
* UIProcess/WebDatabaseManagerProxyClient.cpp:
(WebKit::WebDatabaseManagerProxyClient::didModifyOrigin):
(WebKit::WebDatabaseManagerProxyClient::didModifyDatabase):
* UIProcess/WebDatabaseManagerProxyClient.h:
* UIProcess/WebKeyValueStorageManager.cpp:
(WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
(WebKit::WebKeyValueStorageManager::getStorageDetailsByOrigin):
(WebKit::WebKeyValueStorageManager::deleteEntriesForOrigin):
* UIProcess/WebKeyValueStorageManager.h:
* UIProcess/WebMediaCacheManagerProxy.cpp:
* UIProcess/WebOriginDataManagerProxy.cpp:
(WebKit::WebOriginDataManagerProxy::didGetOrigins):
(WebKit::WebOriginDataManagerProxy::deleteEntriesForOrigin):
* UIProcess/WebOriginDataManagerProxy.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::runJavaScriptInMainFrame):
(WebKit::WebPageProxy::scriptValueCallback):
(WebKit::WebPageProxy::exceededDatabaseQuota):
(WebKit::WebPageProxy::requestGeolocationPermissionForFrame):
(WebKit::WebPageProxy::requestUserMediaPermissionForFrame):
(WebKit::WebPageProxy::requestNotificationPermission):
* UIProcess/WebPageProxy.h:
* UIProcess/WebResourceCacheManagerProxy.cpp:
(WebKit::WebResourceCacheManagerProxy::clearCacheForOrigin):
* UIProcess/WebResourceCacheManagerProxy.h:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::decidePolicyForGeolocationPermissionRequest):
* UIProcess/ios/WKContentView.h:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h:
(API::InjectedBundle::PageUIClient::didReachApplicationCacheOriginQuota):
(API::InjectedBundle::PageUIClient::didExceedDatabaseQuota):
* WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
* WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
(WebKit::InjectedBundlePageUIClient::didReachApplicationCacheOriginQuota):
(WebKit::InjectedBundlePageUIClient::didExceedDatabaseQuota):
* WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::exceededDatabaseQuota):
(WebKit::WebChromeClient::reachedApplicationCacheOriginQuota):
2014-12-21 Sam Weinig <sam@webkit.org>
Allow the WebContext's history client to coexist with WKWebView's history delegate
https://bugs.webkit.org/show_bug.cgi?id=139857
Reviewed by Anders Carlsson.
- Renames API::HistoryClient to API::LegacyContextHistoryClient to make it clear what it is for.
- Re-routes the history client functions from the WebProcessProxy to the WebPageProxy.
- Add history client functions to API::LoaderClient and implement them for NavigationState's
LoaderClient subclass. Removes the need for WKProcessPool to have to setup a history client and
forward to the NavigationState.
* UIProcess/API/APIHistoryClient.h: Removed.
* UIProcess/API/APILegacyContextHistoryClient.h: Copied from Source/WebKit2/UIProcess/API/APIHistoryClient.h.
(API::LegacyContextHistoryClient::~LegacyContextHistoryClient):
(API::LegacyContextHistoryClient::didNavigateWithNavigationData):
(API::LegacyContextHistoryClient::didPerformClientRedirect):
(API::LegacyContextHistoryClient::didPerformServerRedirect):
(API::LegacyContextHistoryClient::didUpdateHistoryTitle):
(API::LegacyContextHistoryClient::populateVisitedLinks):
(API::HistoryClient::~HistoryClient): Deleted.
(API::HistoryClient::didNavigateWithNavigationData): Deleted.
(API::HistoryClient::didPerformClientRedirect): Deleted.
(API::HistoryClient::didPerformServerRedirect): Deleted.
(API::HistoryClient::didUpdateHistoryTitle): Deleted.
(API::HistoryClient::populateVisitedLinks): Deleted.
* UIProcess/API/APILoaderClient.h:
(API::LoaderClient::didNavigateWithNavigationData):
(API::LoaderClient::didPerformClientRedirect):
(API::LoaderClient::didPerformServerRedirect):
(API::LoaderClient::didUpdateHistoryTitle):
* UIProcess/API/C/WKContext.cpp:
(WKContextSetHistoryClient):
* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _initWithConfiguration:]):
* UIProcess/API/mac/WKView.mm:
* UIProcess/Cocoa/HistoryClient.h: Removed.
* UIProcess/Cocoa/HistoryClient.mm: Removed.
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::LoaderClient::didNavigateWithNavigationData):
(WebKit::NavigationState::LoaderClient::didPerformClientRedirect):
(WebKit::NavigationState::LoaderClient::didPerformServerRedirect):
(WebKit::NavigationState::LoaderClient::didUpdateHistoryTitle):
(WebKit::NavigationState::didNavigateWithNavigationData): Deleted.
(WebKit::NavigationState::didPerformClientRedirect): Deleted.
(WebKit::NavigationState::didPerformServerRedirect): Deleted.
(WebKit::NavigationState::didUpdateHistoryTitle): Deleted.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::WebContext):
(WebKit::WebContext::setHistoryClient):
(WebKit::WebContext::populateVisitedLinks):
* UIProcess/WebContext.h:
(WebKit::WebContext::historyClient):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didNavigateWithNavigationData):
(WebKit::WebPageProxy::didPerformClientRedirect):
(WebKit::WebPageProxy::didPerformServerRedirect):
(WebKit::WebPageProxy::didUpdateHistoryTitle):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::didNavigateWithNavigationData): Deleted.
(WebKit::WebProcessProxy::didPerformClientRedirect): Deleted.
(WebKit::WebProcessProxy::didPerformServerRedirect): Deleted.
(WebKit::WebProcessProxy::didUpdateHistoryTitle): Deleted.
* UIProcess/WebProcessProxy.h:
* UIProcess/WebProcessProxy.messages.in:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::updateGlobalHistory):
(WebKit::WebFrameLoaderClient::updateGlobalHistoryRedirectLinks):
(WebKit::WebFrameLoaderClient::setTitle):
2014-12-22 Michael Catanzaro <mcatanzaro@igalia.com>
[GTK] another outdated comment
https://bugs.webkit.org/show_bug.cgi?id=139863
Reviewed by Darin Adler.
Remove outdated comment. We nowadays block untrusted connections by
default.
* WebProcess/gtk/WebProcessMainGtk.cpp:
2014-12-21 Eric Carlson <eric.carlson@apple.com>
[iOS] avoid WebVideoFullscreenManager crash
https://bugs.webkit.org/show_bug.cgi?id=139852
<rdar://problem/19319302>
Reviewed by Darin Adler.
* WebProcess/ios/WebVideoFullscreenManager.mm:
(WebKit::WebVideoFullscreenManager::didExitFullscreen): NULL-check m_layerHostingContext and m_page.
(WebKit::WebVideoFullscreenManager::setVideoLayerFrameFenced): NULL-check m_layerHostingContext.
2014-12-21 David Kilzer <ddkilzer@apple.com>
Fix WebKit2 build with newer clang compiler
Fixes the following build error:
In file included from DerivedSources/WebKit2/WebVideoFullscreenManagerProxyMessageReceiver.cpp:32:
Source/WebKit2/Platform/IPC/HandleMessage.h:16:25: error: non-const lvalue reference to type 'Vector<[3 * ...]>' cannot bind to a temporary of type 'Vector<[3 * ...]>'
(object->*function)(std::get<ArgsIndex>(std::forward<ArgsTuple>(args))...);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Source/WebKit2/Platform/IPC/HandleMessage.h:22:5: note: in instantiation of function template specialization 'IPC::callMemberFunctionImpl<WebKit::WebVideoFullscreenManagerProxy, void (WebKit::WebVideoFullscreenManagerProxy::*)(WTF::Vector<std::__1::pair<double, double>, 0, WTF::CrashOnOverflow> &), std::__1::tuple<WTF::Vector<std::__1::pair<double, double>, 0, WTF::CrashOnOverflow> >, 0>' requested here
callMemberFunctionImpl(object, function, std::forward<ArgsTuple>(args), ArgsIndicies());
^
Source/WebKit2/Platform/IPC/HandleMessage.h:120:5: note: in instantiation of function template specialization 'IPC::callMemberFunction<WebKit::WebVideoFullscreenManagerProxy, void (WebKit::WebVideoFullscreenManagerProxy::*)(WTF::Vector<std::__1::pair<double, double>, 0, WTF::CrashOnOverflow> &), std::__1::tuple<WTF::Vector<std::__1::pair<double, double>, 0, WTF::CrashOnOverflow> >, std::make_index_sequence<1> >' requested here
callMemberFunction(WTF::move(arguments), object, function);
^
DerivedSources/WebKit2/WebVideoFullscreenManagerProxyMessageReceiver.cpp:55:14: note: in instantiation of function template specialization 'IPC::handleMessage<Messages::WebVideoFullscreenManagerProxy::SetSeekableRangesVector, WebKit::WebVideoFullscreenManagerProxy, void (WebKit::WebVideoFullscreenManagerProxy::*)(WTF::Vector<std::__1::pair<double, double>, 0, WTF::CrashOnOverflow> &)>' requested here
IPC::handleMessage<Messages::WebVideoFullscreenManagerProxy::SetSeekableRangesVector>(decoder, this, &WebVideoFullscreenManagerProxy::setSeekableRangesVector);
^
* UIProcess/ios/WebVideoFullscreenManagerProxy.h:
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::setSeekableRangesVector):
Make Vector<std::pair<double, double>>& argument const because a
temporary is not allowed to bind to a non-const reference.
2014-12-20 Eric Carlson <eric.carlson@apple.com>
[iOS] add optimized fullscreen API
https://bugs.webkit.org/show_bug.cgi?id=139833
<rdar://problem/18844486>
Reviewed by Simon Fraser.
* Configurations/FeatureDefines.xcconfig: Add ENABLE_VIDEO_PRESENTATION_MODE.
2014-12-20 David Kilzer <ddkilzer@apple.com>
Switch from using PLATFORM_NAME to SDK selectors in WebCore, WebInspectorUI, WebKit, WebKit2
<http://webkit.org/b/139463>
Reviewed by Mark Rowe.
* Configurations/All.xcconfig:
- Only set EXCLUDED_SOURCE_FILE_NAMES on iOS.
* Configurations/Base.xcconfig:
- Only set FRAMEWORK_CONTENT_DIRECTORY, GCC_ENABLE_OBJC_GC and
TOOLCHAINS on OS X.
* Configurations/BaseLegacyProcess.xcconfig:
- Only set SKIP_INSTALL on iOS.
* Configurations/BaseTarget.xcconfig:
- Set WEBKIT_FRAMEWORKS_DIR and UMBRELLA_FRAMEWORKS_DIR based on
SDK, and simply them.
* Configurations/BaseXPCService.xcconfig:
- Set INSTALL_PATH_ACTUAL_Normal based on SDK.
* Configurations/DebugRelease.xcconfig:
- Only set MACOSX_DEPLOYMENT_TARGET and SDKROOT on OS X.
- Set WEBKIT_SYSTEM_INTERFACE_LIBRARY based on SDK.
* Configurations/NetworkProcess.xcconfig:
- Only set EXCLUDED_SHIM_FILE_NAME and CODE_SIGN_ENTITLEMENTS on
iOS.
* Configurations/NetworkService.Development.xcconfig:
- Set INFOPLIST_FILE based on SDK.
- Simplify CODE_SIGN_ENTITLEMENTS for iOS.
* Configurations/NetworkService.xcconfig:
- Set INFOPLIST_FILE based on SDK.
- Simplify CODE_SIGN_ENTITLEMENTS for iOS.
* Configurations/PluginProcess.xcconfig:
- Only set EXCLUDED_SHIM_FILE_NAME and SKIP_INSTALL on iOS.
* Configurations/PluginProcessShim.xcconfig:
- Set OTHER_LDFLAGS based on SDK.
* Configurations/PluginService.32.xcconfig:
- Only set VALID_ARCHS on OS X.
- Set OTHER_LDFLAGS based on platform-specific values.
- Only set SKIP_INSTALL on iOS.
* Configurations/PluginService.64.xcconfig:
- Set ARCHS based on SDK.
- Set OTHER_LDFLAGS based on platform-specific values.
- Only set SKIP_INSTALL on iOS.
* Configurations/PluginService.Development.xcconfig:
- Only set SKIP_INSTALL on iOS.
- Set OTHER_LDFLAGS based on platform-specific values.
* Configurations/SecItemShim.xcconfig:
- Set OTHER_LDFLAGS based on platform-specific values.
* Configurations/Version.xcconfig:
- Set SYSTEM_VERSION_PREFIX separately for iOS and OS X.
* Configurations/WebContentProcess.xcconfig:
- Only set EXCLUDED_SHIM_FILE_NAME on iOS.
- Only set CODE_SIGN_ENTITLEMENTS on iOS Simulator.
* Configurations/WebContentService.Development.xcconfig:
- Set INFOPLIST_FILE and BUNDLE_LOCALIZATION_KEY based on SDK.
- Only set CODE_SIGN_ENTITLEMENTS on iOS hardware.
- Set OTHER_LDFLAGS based on platform-specific values.
* Configurations/WebContentService.xcconfig: Ditto.
* Configurations/WebKit.xcconfig:
- Set FRAMEWORK_AND_LIBRARY_LDFLAGS, SECTORDER_FLAGS, and
WK_API_AVAILABILITY_ENABLED based on SDK.
- Set OTHER_LDFLAGS based on platform-specific values.
- Only set EXCLUDED_SOURCE_FILE_NAMES on iOS.
* Configurations/WebKit2.xcconfig:
- Set INSTALL_PATH, INSTALL_PATH_ACTUAL, DYLIB_INSTALL_NAME_BASE,
NORMAL_WEBKIT2_FRAMEWORKS_DIR, WEBKIT2_FRAMEWORKS_DIR and
NORMAL_PRODUCTION_FRAMEWORKS_DIR based on SDK.
- Set SKIP_INSTALL on iOS.
* Configurations/WebProcessShim.xcconfig:
- Set OTHER_LDFLAGS based on platform-specific values.
2014-12-19 Jessie Berlin <jberlin@webkit.org>
Build fix.
* UIProcess/mac/WebInspectorProxyMac.mm:
2014-12-19 Jessie Berlin <jberlin@webkit.org>
Simplify the build fixes from r177615 and r177617.
Rubber-stamped by Dan Bernstein.
* UIProcess/mac/WebInspectorProxyMac.mm:
2014-12-19 Jessie Berlin <jberlin@webkit.org>
Another attempt at a speculative build fix.
* UIProcess/mac/WebInspectorProxyMac.mm:
2014-12-19 Jessie Berlin <jberlin@webkit.org>
Speculative build fix after r177610.
* UIProcess/mac/WebInspectorProxyMac.mm:
2014-12-19 Chris Dumez <cdumez@apple.com>
[iOS] Add didEnterFullscreen / didExitFullscreen callbacks to WKUIDelegatePrivate
https://bugs.webkit.org/show_bug.cgi?id=139835
<rdar://problem/19312042>
Reviewed by Anders Carlsson.
Add didEnterFullscreen / didExitFullscreen callbacks to WKUIDelegatePrivate
so that they can be implemented in MobileSafari.
* UIProcess/API/APIUIClient.h:
(API::UIClient::didEnterFullscreen):
(API::UIClient::didExitFullscreen):
* UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
* UIProcess/Cocoa/UIDelegate.h:
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::setDelegate):
(WebKit::UIDelegate::UIClient::didEnterFullscreen):
(WebKit::UIDelegate::UIClient::didExitFullscreen):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didEnterFullscreen):
(WebKit::WebPageProxy::didExitFullscreen):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::didExitFullscreen):
(WebKit::WebVideoFullscreenManagerProxy::didEnterFullscreen):
2014-12-19 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Inspector does not reopen correctly after Inspector Process crashes
https://bugs.webkit.org/show_bug.cgi?id=139838
Reviewed by Timothy Hatcher.
When the WebContentProcess holding the Inspector Frontend crashes, we
would properly tear down the inspector objects. However, the next time
the inspector is opened, when creating the new page in the Inspector
Page Group, a WebPageProxy is created with a Terminated WebProcessProxy.
That Terminated WebProcessProxy is automatically replaced with the next
load request is given. The newly created process was missing the
message listeners and assumed URL access settings that the
WebInspectorProxy had set on the old process.
So, WebInspectorProxy now listens for and resets the process properties
when the inspector process is recreated.
* UIProcess/WebInspectorProxy.h:
* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::didRelaunchInspectorPageProcess):
Reset process properties when the process is relaunched.
(WebKit::WebInspectorProxy::createInspectorPage):
(WebKit::WebInspectorProxy::didClose):
Save connection identifier if we need to establish connections later.
* UIProcess/mac/WebInspectorProxyMac.mm:
(-[WKWebInspectorProxyObjCAdapter didRelaunchProcess]):
(-[WKWebInspectorWKView _didRelaunchProcess]):
(WebKit::WebInspectorProxy::closeTimerFired):
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
Send WebInspectorProxy a message when the process underlying the
WKView is relaunched.
2014-12-19 Anders Carlsson <andersca@apple.com>
Get rid of the hardcoded set of structs in the message generation script
https://bugs.webkit.org/show_bug.cgi?id=139844
Reviewed by Tim Horton.
Instead, make it possible to use 'struct' in front of the type name to declare that the type is a struct.
* DatabaseProcess/DatabaseProcess.messages.in:
* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in:
* NetworkProcess/NetworkProcess.messages.in:
* PluginProcess/PluginProcess.messages.in:
* PluginProcess/WebProcessConnection.messages.in:
* Scripts/webkit/messages.py:
(struct_or_class):
(forward_declarations_for_namespace):
(forward_declarations_and_headers):
* Scripts/webkit/model.py:
(Parameter.__init__):
* Scripts/webkit/parser.py:
(parse_parameters_string):
* UIProcess/Storage/StorageManager.messages.in:
* UIProcess/WebContext.messages.in:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/WebProcessProxy.messages.in:
* WebProcess/ApplicationCache/WebApplicationCacheManager.messages.in:
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in:
* WebProcess/OriginData/WebOriginDataManager.messages.in:
* WebProcess/ResourceCache/WebResourceCacheManager.messages.in:
* WebProcess/WebPage/DrawingArea.messages.in:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebProcess.messages.in:
2014-12-19 Timothy Horton <timothy_horton@apple.com>
Fix the build.
* UIProcess/API/mac/WKView.mm:
(-[WKView _setIgnoresNonWheelEvents:]):
2014-12-19 Beth Dakin <bdakin@apple.com>
Preview popovers don't show an arrow for large links
https://bugs.webkit.org/show_bug.cgi?id=139842
-and corresponding-
<rdar://problem/19301470>
Reviewed by Tim Horton.
This patch addresses the case where the link is so large that there is no
available space on any side once you factor in screen padding. In that case, we
should give up early on not obscuring the link.
* UIProcess/mac/WKPreviewPopoverAnimationController.mm:
(-[WKPreviewPopoverAnimationController _targetSizeForPagePreview]):
(-[WKPreviewPopoverAnimationController _effectivePaddingWithPreviewPadding:]):
(-[WKPreviewPopoverAnimationController _maxSpaceAvailableOnYEdgeForOriginRect:withScreenRect:previewPadding:]):
(-[WKPreviewPopoverAnimationController _maxSpaceAvailableOnXEdgeForOriginRect:withScreenRect:previewPadding:]):
(-[WKPreviewPopoverAnimationController _preferredPopoverSizeWithPreviewPadding:forTargetSize:]):
2014-12-19 Timothy Horton <timothy_horton@apple.com>
WKView's ignoresNonWheelEvents should ignore immediate actions
https://bugs.webkit.org/show_bug.cgi?id=139839
<rdar://problem/19312111>
Reviewed by Anders Carlsson.
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:context:configuration:webView:]):
(-[WKView _setIgnoresNonWheelEvents:]):
Install/uninstall the immediate action gesture recognizer when
toggling ignoresNonWheelEvents.
2014-12-19 Csaba Osztrogonác <ossy@webkit.org>
URTBF after r177593.
* PluginProcess/PluginProcess.h:
* PluginProcess/unix/PluginProcessUnix.cpp:
(WebKit::PluginProcess::platformInitializePluginProcess):
* Shared/WebProcessCreationParameters.h:
* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
* WebProcess/WebProcess.h:
* WebProcess/soup/WebProcessSoup.cpp:
(WebKit::WebProcess::platformInitializeWebProcess):
2014-12-19 Anders Carlsson <andersca@apple.com>
Use WebCore::MachSendRights for the compositing render server port
https://bugs.webkit.org/show_bug.cgi?id=139834
Reviewed by Tim Horton.
* Platform/IPC/HandleMessage.h:
(IPC::callMemberFunctionImpl):
* Platform/mac/LayerHostingContext.h:
* Platform/mac/LayerHostingContext.mm:
(WebKit::LayerHostingContext::createForPort):
* PluginProcess/PluginControllerProxy.h:
* PluginProcess/PluginProcess.cpp:
(WebKit::PluginProcess::PluginProcess):
(WebKit::PluginProcess::initializePluginProcess):
* PluginProcess/PluginProcess.h:
(WebKit::PluginProcess::compositingRenderServerPort):
* PluginProcess/mac/PluginControllerProxyMac.mm:
(WebKit::PluginControllerProxy::compositingRenderServerPort):
* PluginProcess/mac/PluginProcessMac.mm:
(WebKit::PluginProcess::platformInitializePluginProcess):
* Shared/Plugins/PluginProcessCreationParameters.cpp:
* Shared/Plugins/PluginProcessCreationParameters.h:
* Shared/WebCoreArgumentCoders.h:
* Shared/WebProcessCreationParameters.h:
* Shared/mac/WebCoreArgumentCodersMac.mm:
(IPC::ArgumentCoder<MachSendRight>::encode):
* UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
(WebKit::PluginProcessProxy::platformInitializePluginProcess):
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::platformInitializeWebProcess):
* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
(WebKit::NPN_GetValue):
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
(WebKit::NetscapePlugin::compositingRenderServerPort):
(WebKit::NetscapePlugin::setLayerHostingMode):
* WebProcess/Plugins/PluginController.h:
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::compositingRenderServerPort):
* WebProcess/Plugins/PluginView.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess):
(WebKit::WebProcess::initializeWebProcess):
* WebProcess/WebProcess.h:
(WebKit::WebProcess::compositingRenderServerPort):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):
2014-12-19 Andreas Kling <akling@apple.com>
Ref-ify TextIterator API.
<https://webkit.org/b/139823>
Reviewed by Antti Koivisto.
* WebProcess/InjectedBundle/API/mac/WKDOMTextIterator.mm:
(-[WKDOMTextIterator currentRange]):
2014-12-19 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r177574.
https://bugs.webkit.org/show_bug.cgi?id=139821
"Broke Production builds by installing
libWebCoreTestSupport.dylib in the wrong directory" (Requested
by ddkilzer on #webkit).
Reverted changeset:
"Switch from using PLATFORM_NAME to SDK selectors in WebCore,
WebInspectorUI, WebKit, WebKit2"
https://bugs.webkit.org/show_bug.cgi?id=139463
http://trac.webkit.org/changeset/177574
2014-12-19 David Kilzer <ddkilzer@apple.com>
Switch from using PLATFORM_NAME to SDK selectors in WebCore, WebInspectorUI, WebKit, WebKit2
<http://webkit.org/b/139463>
Reviewed by Mark Rowe.
* Configurations/All.xcconfig:
- Only set EXCLUDED_SOURCE_FILE_NAMES on iOS.
* Configurations/Base.xcconfig:
- Only set FRAMEWORK_CONTENT_DIRECTORY, GCC_ENABLE_OBJC_GC and
TOOLCHAINS on OS X.
* Configurations/BaseLegacyProcess.xcconfig:
- Only set SKIP_INSTALL on iOS.
* Configurations/BaseTarget.xcconfig:
- Set WEBKIT_FRAMEWORKS_DIR and UMBRELLA_FRAMEWORKS_DIR based on
SDK, and simply them.
* Configurations/BaseXPCService.xcconfig:
- Set INSTALL_PATH_ACTUAL_Normal based on SDK.
* Configurations/DebugRelease.xcconfig:
- Only set MACOSX_DEPLOYMENT_TARGET and SDKROOT on OS X.
- Set WEBKIT_SYSTEM_INTERFACE_LIBRARY based on SDK.
* Configurations/NetworkProcess.xcconfig:
- Only set EXCLUDED_SHIM_FILE_NAME and CODE_SIGN_ENTITLEMENTS on
iOS.
* Configurations/NetworkService.Development.xcconfig:
- Set INFOPLIST_FILE based on SDK.
- Simplify CODE_SIGN_ENTITLEMENTS for iOS.
* Configurations/NetworkService.xcconfig:
- Set INFOPLIST_FILE based on SDK.
- Simplify CODE_SIGN_ENTITLEMENTS for iOS.
* Configurations/PluginProcess.xcconfig:
- Only set EXCLUDED_SHIM_FILE_NAME and SKIP_INSTALL on iOS.
* Configurations/PluginProcessShim.xcconfig:
- Set OTHER_LDFLAGS based on SDK.
* Configurations/PluginService.32.xcconfig:
- Only set VALID_ARCHS on OS X.
- Set OTHER_LDFLAGS based on platform-specific values.
- Only set SKIP_INSTALL on iOS.
* Configurations/PluginService.64.xcconfig:
- Set ARCHS based on SDK.
- Set OTHER_LDFLAGS based on platform-specific values.
- Only set SKIP_INSTALL on iOS.
* Configurations/PluginService.Development.xcconfig:
- Only set SKIP_INSTALL on iOS.
- Set OTHER_LDFLAGS based on platform-specific values.
* Configurations/SecItemShim.xcconfig:
- Set OTHER_LDFLAGS based on platform-specific values.
* Configurations/Version.xcconfig:
- Set SYSTEM_VERSION_PREFIX separately for iOS and OS X.
* Configurations/WebContentProcess.xcconfig:
- Only set EXCLUDED_SHIM_FILE_NAME on iOS.
- Only set CODE_SIGN_ENTITLEMENTS on iOS Simulator.
* Configurations/WebContentService.Development.xcconfig:
- Set INFOPLIST_FILE and BUNDLE_LOCALIZATION_KEY based on SDK.
- Only set CODE_SIGN_ENTITLEMENTS on iOS hardware.
- Set OTHER_LDFLAGS based on platform-specific values.
* Configurations/WebContentService.xcconfig: Ditto.
* Configurations/WebKit.xcconfig:
- Set FRAMEWORK_AND_LIBRARY_LDFLAGS, SECTORDER_FLAGS, and
WK_API_AVAILABILITY_ENABLED based on SDK.
- Set OTHER_LDFLAGS based on platform-specific values.
- Only set EXCLUDED_SOURCE_FILE_NAMES on iOS.
* Configurations/WebKit2.xcconfig:
- Set INSTALL_PATH, INSTALL_PATH_ACTUAL, DYLIB_INSTALL_NAME_BASE,
NORMAL_WEBKIT2_FRAMEWORKS_DIR, WEBKIT2_FRAMEWORKS_DIR and
NORMAL_PRODUCTION_FRAMEWORKS_DIR based on SDK.
- Set SKIP_INSTALL on iOS.
* Configurations/WebProcessShim.xcconfig:
- Set OTHER_LDFLAGS based on platform-specific values.
2014-12-18 Jon Honeycutt <jhoneycutt@apple.com>
iOS build fix.
* UIProcess/mac/WKPreviewPopoverAnimationController.mm:
2014-12-18 Jessie Berlin <jberlin@webkit.org>
Speculative build-fix after r177522.
* UIProcess/mac/WKPreviewPopoverAnimationController.mm:
(-[WKPreviewPopoverAnimationController setPreviewOverrideImage:]):
2014-12-18 Andreas Kling <akling@apple.com>
Ref-ify various Document-related things.
<https://webkit.org/b/139796>
Reviewed by Anders Carlsson.
* WebProcess/InjectedBundle/API/mac/WKDOMDocument.mm:
(-[WKDOMDocument createTextNode:]):
2014-12-18 Beth Dakin <bdakin@apple.com>
Speculative build fix.
* UIProcess/ProcessThrottler.h:
2014-12-18 Anders Carlsson <andersca@apple.com>
Use MachSendRight in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=139800
Reviewed by Tim Horton.
* Platform/IPC/ArgumentEncoder.h:
(IPC::ArgumentEncoder::encode):
(IPC::ArgumentEncoder::operator<<):
* Shared/WebCoreArgumentCoders.h:
* Shared/mac/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::encode):
(WebKit::RemoteLayerBackingStore::decode):
* Shared/mac/WebCoreArgumentCodersMac.mm:
(IPC::ArgumentCoder<MachSendRight>::encode):
(IPC::ArgumentCoder<MachSendRight>::decode):
2014-12-18 Gavin Barraclough <barraclough@apple.com>
Remove custom token mechanism from ProcessThrottler
https://bugs.webkit.org/show_bug.cgi?id=139744
Reviewed by Geoff Garen.
ProcessThrottler implements its own token-based counter mechanism, but should
just use RefCounter.
* UIProcess/Cocoa/NavigationState.h:
- remove std::unique_ptr.
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::didChangeIsLoading):
- remove std::make_unique.
* UIProcess/GenericCallback.h:
(WebKit::CallbackBase::CallbackBase):
(WebKit::GenericCallback::create):
(WebKit::GenericCallback::GenericCallback):
(WebKit::CallbackMap::put):
- remove std::unique_ptr.
* UIProcess/ProcessThrottler.cpp:
(WebKit::ProcessThrottler::ProcessThrottler):
(WebKit::m_backgroundCounter):
(WebKit::ProcessThrottler::assertionState):
(WebKit::ProcessThrottler::updateAssertion):
(WebKit::ProcessThrottler::ForegroundActivityToken::ForegroundActivityToken): Deleted.
(WebKit::ProcessThrottler::ForegroundActivityToken::~ForegroundActivityToken): Deleted.
(WebKit::ProcessThrottler::BackgroundActivityToken::BackgroundActivityToken): Deleted.
(WebKit::ProcessThrottler::BackgroundActivityToken::~BackgroundActivityToken): Deleted.
- removed old implementation of ForegroundActivityToken/BackgroundActivityToken.
* UIProcess/ProcessThrottler.h:
(WebKit::ProcessThrottler::foregroundActivityToken):
(WebKit::ProcessThrottler::backgroundActivityToken):
- added accessors to create activity tokens.
(WebKit::ProcessThrottler::weakPtr): Deleted.
- removed members replaced by RefCounter types.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::updateActivityToken):
(WebKit::WebPageProxy::validateCommand):
(WebKit::WebPageProxy::runJavaScriptInMainFrame):
(WebKit::WebPageProxy::getRenderTreeExternalRepresentation):
(WebKit::WebPageProxy::getSourceForFrame):
(WebKit::WebPageProxy::getContentsAsString):
(WebKit::WebPageProxy::getBytecodeProfile):
(WebKit::WebPageProxy::getContentsAsMHTMLData):
(WebKit::WebPageProxy::getSelectionOrContentsAsString):
(WebKit::WebPageProxy::getSelectionAsWebArchiveData):
(WebKit::WebPageProxy::getMainResourceDataOfFrame):
(WebKit::WebPageProxy::getResourceDataFromFrame):
(WebKit::WebPageProxy::getWebArchiveOfFrame):
(WebKit::WebPageProxy::getMarkedRangeAsync):
(WebKit::WebPageProxy::getSelectedRangeAsync):
(WebKit::WebPageProxy::characterIndexForPointAsync):
(WebKit::WebPageProxy::firstRectForCharacterRangeAsync):
(WebKit::WebPageProxy::takeSnapshot):
(WebKit::WebPageProxy::installViewStateChangeCompletionHandler):
- remove std::make_unique.
* UIProcess/WebPageProxy.h:
- remove std::unique_ptr.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::setIsHoldingLockedFiles):
- remove std::make_unique.
* UIProcess/WebProcessProxy.h:
- remove std::unique_ptr.
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::selectWithGesture):
(WebKit::WebPageProxy::updateSelectionWithTouches):
(WebKit::WebPageProxy::requestAutocorrectionData):
(WebKit::WebPageProxy::applyAutocorrection):
(WebKit::WebPageProxy::executeEditCommand):
(WebKit::WebPageProxy::selectTextWithGranularityAtPoint):
(WebKit::WebPageProxy::selectPositionAtBoundaryWithDirection):
(WebKit::WebPageProxy::selectPositionAtPoint):
(WebKit::WebPageProxy::beginSelectionInDirection):
(WebKit::WebPageProxy::updateSelectionWithExtentPoint):
(WebKit::WebPageProxy::requestDictationContext):
(WebKit::WebPageProxy::requestAutocorrectionContext):
(WebKit::WebPageProxy::selectWithTwoTouches):
(WebKit::WebPageProxy::moveSelectionByOffset):
(WebKit::WebPageProxy::focusNextAssistedNode):
- remove std::make_unique.
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::attributedSubstringForCharacterRangeAsync):
- remove std::make_unique.
2014-12-18 Gavin Barraclough <barraclough@apple.com>
Add strong typing to RefCounter interface, return value as a bool.
https://bugs.webkit.org/show_bug.cgi?id=139776
Reviewed by Geoff Garen.
Currently all token vended by a RefCounter have the same type - Ref<RefCounter::Count>.
This means there is no compile time type checking to prevent mistakes. Update the count()
method to token<>(), templated on type used to identify the token being returned.
Calls to token<T>() will return a result of type RefCounter::Token<T>.
There are a few problems with the fact the counter will return you an exact count of the
number of outstanding tokens:
- It is desirable to only fire the callback on zero-edge changes; it is more consistent
to do so if the value is only readable as a boolean.
- It is desirable to provide the value as an argument to the callback, however to make
this useful for integer values it is also necessary to indicate the direction of change
(0->1 is often interesting where 2->1 is not).
- There is a mismatch between the precision of returning a count, and the inherent
imprecision of a token based mechanism, where it may be difficult to guarantee
absolutely no unnecessary refcount churn, and thus unintentional counter values.
Removed PluginProcessManager::m_processSuppressionEnabled. Now the callback only fires on
zero-edge transitions we no longer need this to filter changes.
* UIProcess/Plugins/PluginProcessManager.cpp:
(WebKit::PluginProcessManager::PluginProcessManager):
- updateProcessSuppressionState -> updateProcessSuppressionDisabled.
* UIProcess/Plugins/PluginProcessManager.h:
(WebKit::PluginProcessManager::processSuppressionDisabledForPageCount): Deleted.
(WebKit::PluginProcessManager::processSuppressionDisabledToken):
- processSuppressionDisabledForPageCount -> processSuppressionDisabledToken.
(WebKit::PluginProcessManager::processSuppressionEnabled): Deleted.
(WebKit::PluginProcessManager::processSuppressionDisabled):
- processSuppressionEnabled -> processSuppressionDisabled.
* UIProcess/Plugins/PluginProcessProxy.cpp:
(WebKit::PluginProcessProxy::didFinishLaunching):
- processSuppressionEnabled -> processSuppressionDisabled.
* UIProcess/Plugins/mac/PluginProcessManagerMac.mm:
(WebKit::PluginProcessManager::updateProcessSuppressionState): Deleted.
(WebKit::PluginProcessManager::updateProcessSuppressionDisabled):
- updateProcessSuppressionState -> updateProcessSuppressionDisabled
* UIProcess/ProcessThrottler.h:
- added UserObservablePageToken, ProcessSuppressionDisabledToken types.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::WebContext):
(WebKit::m_processSuppressionDisabledForPageCounter):
- lambda now has bool argument.
* UIProcess/WebContext.h:
(WebKit::WebContext::userObservablePageCount):
(WebKit::WebContext::processSuppressionDisabledForPageCount):
- count() -> token<>(), changed return type.
* UIProcess/WebPageProxy.h:
- changed types of token members.
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::updateProcessSuppressionState):
renamed m_pluginProcessManagerProcessSuppressionDisabledCount -> m_pluginProcessManagerProcessSuppressionDisabledToken.
2014-12-18 Timothy Horton <timothy_horton@apple.com>
Try to fix some builds.
* UIProcess/mac/WKPreviewPopoverAnimationController.mm:
2014-12-18 Anders Carlsson <andersca@apple.com>
Fix build.
* UIProcess/API/mac/WKViewInternal.h:
2014-12-18 Chris Dumez <cdumez@apple.com>
Add missing availability annotation on @property _featureCounterEnabled
https://bugs.webkit.org/show_bug.cgi?id=139794
<rdar://problem/19266254>
Rubber-stamped by Dan Bernstein.
Follow-up to r177526 adding availability annotation on @property
_featureCounterEnabled.
* UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
2014-12-18 Beth Dakin <bdakin@apple.com>
Need to re-enable action menus
https://bugs.webkit.org/show_bug.cgi?id=139795
-and corresponding-
rdar://problem/19299367
Reviewed by Tim Horton.
Re-enable the menus by un-commenting the code to create the menu and controller.
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:context:configuration:webView:]):
performActionMenuHitTest already takes a parameter indicating whether the hit test
is for an immediate action or not. The callback didPerformActionMenuHitTest needs
that information too so that it knows whether to call into the
ActionMenuController or the ImmediateActionController.
(-[WKView _didPerformActionMenuHitTest:forImmediateAction:userData:]):
(-[WKView _didPerformActionMenuHitTest:userData:]): Deleted.
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didPerformActionMenuHitTest):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::didPerformActionMenuHitTest):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performActionMenuHitTestAtLocation):
2014-12-18 Chris Dumez <cdumez@apple.com>
[WK2] Stop using WKPreferencesPrivate API to toggle FeatureCounter support
https://bugs.webkit.org/show_bug.cgi?id=139794
<rdar://problem/19266254>
Reviewed by Anders Carlsson.
Stop using WKPreferencesPrivate API to toggle FeatureCounter support
and use WKWebViewConfigurationPrivate API instead. FeatureCounter is
not meant to change state after the view has been created.
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetFeatureCounterEnabled): Deleted.
(WKPreferencesGetFeatureCounterEnabled): Deleted.
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _featureCounterEnabled]): Deleted.
(-[WKPreferences _setFeatureCounterEnabled:]): Deleted.
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration init]):
(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration _featureCounterEnabled]):
(-[WKWebViewConfiguration _setFeatureCounterEnabled:]):
* UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
2014-12-18 Timothy Horton <timothy_horton@apple.com>
Fix the build.
* UIProcess/API/mac/WKView.mm:
(-[WKView _setPreviewOverrideImage:]):
2014-12-18 Timothy Horton <timothy_horton@apple.com>
Change page preview loading order, and add a TextIndicator
https://bugs.webkit.org/show_bug.cgi?id=139793
<rdar://problem/19288547>
Reviewed by Beth Dakin.
* Shared/mac/ActionMenuHitTestResult.h:
* Shared/mac/ActionMenuHitTestResult.mm:
(WebKit::ActionMenuHitTestResult::encode):
(WebKit::ActionMenuHitTestResult::decode):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performActionMenuHitTestAtLocation):
Build a TextIndicator for links.
* UIProcess/API/Cocoa/WKViewPrivate.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView _dismissContentRelativeChildWindows]):
(-[WKView _setPreviewTitle:]):
(-[WKView _setPreviewLoading:]):
Remove unneeded WK_API_ENABLED #ifs.
(-[WKView _setPreviewOverrideImage:]):
Add; forward to WKImmediateActionController.
* UIProcess/mac/WKImmediateActionController.h:
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController willDestroyView:]):
Shut down the WKPreviewPopoverAnimationController.
(-[WKImmediateActionController _clearImmediateActionState]):
(-[WKImmediateActionController immediateActionRecognizerWillPrepare:]):
Don't build an immediate action item here; we'll always build it in
willBeginAnimation, and the one we build here is likely to be wrong.
(-[WKImmediateActionController _defaultAnimationController]):
(-[WKImmediateActionController hidePreview]):
(-[WKImmediateActionController setPreviewTitle:]):
(-[WKImmediateActionController setPreviewLoading:]):
(-[WKImmediateActionController setPreviewOverrideImage:]):
(-[WKImmediateActionController _animationControllerForCustomPreview]):
(-[WKImmediateActionController _createPreviewPopoverIfNeededForURL:]): Deleted.
(-[WKImmediateActionController popoverWillClose:]): Deleted.
(targetSizeFitsInAvailableSpace): Deleted.
(-[WKImmediateActionController largestPopoverSize]): Deleted.
(-[WKImmediateActionController _preferredPopoverSizeWithPreviewPadding:]): Deleted.
(-[WKImmediateActionController pagePreviewViewController:viewForPreviewingURL:initialFrameSize:]): Deleted.
(-[WKImmediateActionController pagePreviewViewController:titleForPreviewOfURL:]): Deleted.
(-[WKImmediateActionController pagePreviewViewControllerWasClicked:]): Deleted.
Move preview popover code to WKPreviewPopoverAnimationController.
Install and uninstall the link text indicator when necessary.
* UIProcess/mac/WKPagePreviewViewController.h:
* UIProcess/mac/WKPagePreviewViewController.mm:
(-[WKPagePreviewViewController setLoading:]):
(-[WKPagePreviewViewController loadView]):
(-[WKPagePreviewViewController replacePreviewWithImage:atSize:]):
Allow overriding the preview with a full-view NSImage.
Hide the preview view until the loading spinner goes away.
* UIProcess/mac/WKPreviewPopoverAnimationController.h: Copied from Source/WebKit2/UIProcess/mac/WKImmediateActionController.h.
* UIProcess/mac/WKPreviewPopoverAnimationController.mm: Added.
(+[WKPreviewPopoverAnimationController _shouldImmediatelyShowPreview]):
(-[WKPreviewPopoverAnimationController initWithURL:view:page:originRect:eventLocationInView:]):
(-[WKPreviewPopoverAnimationController close]):
(-[WKPreviewPopoverAnimationController setPreviewLoading:]):
(-[WKPreviewPopoverAnimationController setPreviewOverrideImage:]):
If we have shown the popover, choose a size strictly smaller than
its current size.
(-[WKPreviewPopoverAnimationController _hidePreview]):
(-[WKPreviewPopoverAnimationController setPreviewTitle:]):
(-[WKPreviewPopoverAnimationController _createPreviewPopover]):
(-[WKPreviewPopoverAnimationController _showPreview]):
(targetSizeFitsInAvailableSpace):
(-[WKPreviewPopoverAnimationController largestPopoverSize]):
(-[WKPreviewPopoverAnimationController _targetSizeForPagePreview]):
(-[WKPreviewPopoverAnimationController _preferredPopoverSizeWithPreviewPadding:forTargetSize:]):
(-[WKPreviewPopoverAnimationController _previewWatchdogTimerFired:]):
(-[WKPreviewPopoverAnimationController recognizerWillBeginAnimation:]):
(-[WKPreviewPopoverAnimationController recognizerDidUpdateAnimation:]):
(-[WKPreviewPopoverAnimationController recognizerDidCancelAnimation:]):
(-[WKPreviewPopoverAnimationController recognizerDidCompleteAnimation:]):
(-[WKPreviewPopoverAnimationController recognizerDidDismissAnimation:]):
(-[WKPreviewPopoverAnimationController pagePreviewViewController:viewForPreviewingURL:initialFrameSize:]):
(-[WKPreviewPopoverAnimationController pagePreviewViewController:titleForPreviewOfURL:]):
(-[WKPreviewPopoverAnimationController pagePreviewViewControllerWasClicked:]):
(-[WKPreviewPopoverAnimationController popoverWillClose:]):
Move code in from WKImmediateActionController.
Forward NSImmediateActionAnimationControllerDelegate methods
to the popover's animation controller if we've popped it.
Pop the popover if we've loaded or 1 second has passed, whichever
comes first.
* WebKit2.xcodeproj/project.pbxproj:
2014-12-18 Anders Carlsson <andersca@apple.com>
Add a MachSendRight class to WebCore and use it in IOSurface
https://bugs.webkit.org/show_bug.cgi?id=139787
Reviewed by Tim Horton.
* Shared/mac/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::encode):
2014-12-18 Daniel Bates <dabates@apple.com>
Attempt to fix the iOS build after <http://trac.webkit.org/changeset/177486>
(https://bugs.webkit.org/show_bug.cgi?id=139755)
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::selectWithGesture): Wrap return value of Range::create() in RefPtr<Range>()
to make the the compiler happy since it wants clauses of the ternary operator to have the same data type
and Ref<Range> object does not support nullptr.
(WebKit::WebPage::selectWordBackward): Substitute Ref::ptr() for PassRefPtr::get().
(WebKit::WebPage::moveSelectionByOffset): Ditto.
(WebKit::WebPage::selectPositionAtPoint): Ditto.
(WebKit::WebPage::selectPositionAtBoundaryWithDirection): Ditto.
(WebKit::WebPage::requestDictationContext): Ditto.
(WebKit::computeAutocorrectionContext): Ditto.
2014-12-18 Antti Koivisto <antti@apple.com>
Remove alwaysUseBaselineOfPrimaryFont setting
https://bugs.webkit.org/show_bug.cgi?id=139770
Reviewed by Anders Carlsson.
* Shared/WebPreferencesDefinitions.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
2014-12-18 Adrian Perez de Castro <aperez@igalia.com>
[GTK] Implement webkit_web_view_is_playing_audio()
https://bugs.webkit.org/show_bug.cgi?id=138918
Reviewed by Carlos Garcia Campos.
Implements webkit_web_view_is_playing_audio(), and overrides
UIClient::isPlayingAudioDidChange() to be able to emit change
notification signals for the new WebKitWebView::is-playing-audio
property.
* UIProcess/API/gtk/WebKitUIClient.cpp:
(isPlayingAudioDidChange): Added.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewIsPlayingAudioChanged): Helper function to emit the
emit the notify::is-playing-audio signal when needed.
(webkitWebViewGetProperty): Handle the WebKitWebView::is-playing-audio
property.
(webkit_web_view_class_init): Install the
WebKitWebView::is-playing-audio property.
(webkit_web_view_is_playing_audio): Added.
* UIProcess/API/gtk/WebKitWebView.h:
* UIProcess/API/gtk/WebKitWebViewPrivate.h:
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add
webkit_web_view_is_playing_audio() to the list of public API
functions.
2014-12-18 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Allow to build with ENABLE_NETWORK_CACHE
https://bugs.webkit.org/show_bug.cgi?id=139728
Reviewed by Antti Koivisto.
Just make it build for now.
* CMakeLists.txt: Add new files to compilation.
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::didRetrieveCacheEntry): Use
ENABLE(SHAREABLE_RESOURCE) when ShareableResource is used.
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::decodeStorageEntry): Ditto.
(WebKit::makeCacheKey): Use ENABLE(CACHE_PARTITIONING) for ResourceRequest::cachePartition().
* NetworkProcess/cache/NetworkCache.h:
* NetworkProcess/cache/NetworkCacheStorage.h:
(WebKit::NetworkCacheStorage::Data::isNull): Move implementation
to platform specific files.
* NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
(WebKit::NetworkCacheStorage::Data::isNull): Moved from the header.
* NetworkProcess/cache/NetworkCacheStorageSoup.cpp: Added.
(WebKit::NetworkCacheStorage::Data::Data):
(WebKit::NetworkCacheStorage::Data::data):
(WebKit::NetworkCacheStorage::Data::isNull):
(WebKit::NetworkCacheStorage::open):
(WebKit::NetworkCacheStorage::NetworkCacheStorage):
(WebKit::NetworkCacheStorage::initializeKeyFilter):
(WebKit::NetworkCacheStorage::removeEntry):
(WebKit::NetworkCacheStorage::dispatchRetrieveOperation):
(WebKit::NetworkCacheStorage::dispatchPendingRetrieveOperations):
(WebKit::NetworkCacheStorage::retrieve):
(WebKit::NetworkCacheStorage::store):
(WebKit::NetworkCacheStorage::setMaximumSize):
(WebKit::NetworkCacheStorage::clear):
* PlatformGTK.cmake: Add NetworkCacheStorageSoup.cpp.
* config.h:
2014-12-17 Dan Bernstein <mitz@apple.com>
<rdar://problem/19282508> WebKitLegacy is unusable due to bad dylib identifier
https://bugs.webkit.org/show_bug.cgi?id=139760
Reviewed by Anders Carlsson.
* Configurations/WebKit2.xcconfig:
2014-12-17 Beth Dakin <bdakin@apple.com>
Page previews are sometimes sized much smaller than it seems they should be
https://bugs.webkit.org/show_bug.cgi?id=139754
-and corresponding-
rdar://problem/19286550
Reviewed by Tim Horton.
Increase the minimum size and add in a missing else!!
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController _preferredPopoverSizeWithPreviewPadding:]):
2014-12-17 Anders Carlsson <andersca@apple.com>
Ref-ify WebPageProxy and WebProcessProxy creation functions
https://bugs.webkit.org/show_bug.cgi?id=139751
Reviewed by Andreas Kling.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::createNewWebProcess):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::create):
* UIProcess/WebPageProxy.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::create):
(WebKit::WebProcessProxy::createWebPage):
* UIProcess/WebProcessProxy.h:
2014-12-17 Joseph Pecoraro <pecoraro@apple.com>
Unreviewed iOS Build Fix after r177459.
* UIProcess/ios/WebInspectorProxyIOS.mm:
(WebKit::WebInspectorProxy::platformInvalidate):
(WebKit::WebInspectorProxy::platformHide):
Add missing WebInspectorProxy platform methods.
2014-12-17 Enrica Casucci <enrica@apple.com>
[iOS] Define button and action should respect profile settings.
https://bugs.webkit.org/show_bug.cgi?id=139739
rdar://problem/15461887
Reviewed by Joseph Pecoraro.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView canPerformAction:withSender:]):
(-[WKContentView _define:]):
2014-12-17 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: [Mac] Occosional Crashes Closing Inspector
https://bugs.webkit.org/show_bug.cgi?id=139740
Reviewed by Timothy Hatcher.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didReceiveEvent):
The WebPageProxy could have gotten destroyed in handling (e.g. keyboard shortcut
to close the Inspector Window), so protect the object to avoid destruction
during handling.
* UIProcess/WebInspectorProxy.h:
* UIProcess/WebPageProxy.cpp:
Add platformInvalidate opportunity for the platform to do invalidation work.
* UIProcess/efl/WebInspectorProxyEfl.cpp:
(WebKit::WebInspectorProxy::platformInvalidate):
* UIProcess/gtk/WebInspectorProxyGtk.cpp:
(WebKit::WebInspectorProxy::platformInvalidate):
Empty implementations, these ports do not need to do anything.
* UIProcess/WebInspectorProxy.h:
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::closeTimerFired):
(WebKit::WebInspectorProxy::platformDidClose):
(WebKit::WebInspectorProxy::platformInvalidate):
When closing / invalidating make sure we close the WKView to clear client
for any delayed callbacks.
2014-12-17 Chris Dumez <cdumez@apple.com>
[iOS] Make it possible to toggle FeatureCounter support at runtime
https://bugs.webkit.org/show_bug.cgi?id=139688
<rdar://problem/19266254>
Reviewed by Andreas Kling.
Add private settings API to toggle FeatureCounter support on Safari and
MobileSafari.
* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetFeatureCounterEnabled):
(WKPreferencesGetFeatureCounterEnabled):
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _featureCounterEnabled]):
(-[WKPreferences _setFeatureCounterEnabled:]):
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
2014-12-17 Anders Carlsson <andersca@apple.com>
Clean up SQL statement building in SQLiteIDBCursor
https://bugs.webkit.org/show_bug.cgi?id=139741
Reviewed by Andreas Kling.
This vastly simplifies the code and gets rid of the last
uses of DEPRECATED_DEFINE_STATIC_LOCAL in WebKit2.
* DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
(WebKit::buildIndexStatement):
(WebKit::buildObjectStoreStatement):
(WebKit::SQLiteIDBCursor::establishStatement):
(WebKit::getIndexStatement): Deleted.
(WebKit::getObjectStoreStatement): Deleted.
2014-12-17 Andreas Kling <akling@apple.com>
Purge PassRefPtr from Frame.
<https://webkit.org/b/139731>
Reviewed by Anders Carlsson.
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::createSubframe):
2014-12-17 Dan Bernstein <mitz@apple.com>
iOS build fix
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::PageClient::setTextIndicatorAnimationProgress):
2014-12-17 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix GTK+ build after r177427.
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::setTextIndicatorAnimationProgress):
* UIProcess/API/gtk/PageClientImpl.h:
2014-12-16 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Unreviewed, EFL build fix since r177427.
* UIProcess/CoordinatedGraphics/WebView.cpp:
(WebKit::WebView::setTextIndicatorAnimationProgress): Added.
* UIProcess/CoordinatedGraphics/WebView.h:
2014-12-16 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Move WebCore/platform/graphics/surfaces to std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=139641
Reviewed by Andreas Kling.
* WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
2014-12-16 Timothy Horton <timothy_horton@apple.com>
Implement and adopt two new TextIndicator presentation animations
https://bugs.webkit.org/show_bug.cgi?id=139715
<rdar://problem/19237945>
Reviewed by Anders Carlsson.
* UIProcess/API/mac/WKView.mm:
(-[WKView _setTextIndicator:fadeOut:]):
(-[WKView _setTextIndicatorAnimationProgress:]):
(-[WKView _setTextIndicator:fadeOut:animationCompletionHandler:]): Deleted.
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::setTextIndicatorAnimationProgress):
(WebKit::WebPageProxy::performActionMenuHitTestAtLocation):
* UIProcess/WebPageProxy.h:
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::setTextIndicatorAnimationProgress):
(WebKit::PageClientImpl::didPerformDictionaryLookup):
Remove the completion handler block argument from TextIndicator
installation.
Plumb animation progress through PageClient to TextIndicatorWindow.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController prepareForMenu:withEvent:]):
(-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController _clearImmediateActionState]):
(-[WKImmediateActionController immediateActionRecognizerWillPrepare:]):
(-[WKImmediateActionController immediateActionRecognizerDidUpdateAnimation:]):
(-[WKImmediateActionController immediateActionRecognizerDidCancelAnimation:]):
(-[WKImmediateActionController immediateActionRecognizerDidCompleteAnimation:]):
(-[WKImmediateActionController _menuItemForDataDetectedText]):
(-[WKImmediateActionController _animationControllerForText]):
Forward immediate action gesture recognizer animation progress
to TextIndicator. Force us to keep the selection when immediate
action popovers steal first responder status from the WebView.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::textIndicatorTransitionForActionMenu):
(WebKit::WebPage::performActionMenuHitTestAtLocation):
Factor out the presentation animation decision code.
For immediate actions, of the Lookup range is equal to the
selection range, use a Crossfade animation; otherwise, use a FadeIn
animation.
Push whether the actionMenuHitTest is for an immediate action
or a menu to the Web process, to make the presentation animation
decision code live entirely in the Web process.
Avoid extracting encoded image data if we know we're doing
an immediate action and will never need it.
2014-12-16 Anders Carlsson <andersca@apple.com>
Fix lambda and std::function formatting
https://bugs.webkit.org/show_bug.cgi?id=139719
Reviewed by Sam Weinig.
* DatabaseProcess/DatabaseProcess.cpp:
(WebKit::DatabaseProcess::getOrigins):
(WebKit::DatabaseProcess::deleteEntriesForOrigin):
(WebKit::DatabaseProcess::deleteEntriesModifiedBetweenDates):
(WebKit::DatabaseProcess::deleteAllEntries):
* DatabaseProcess/DatabaseProcess.h:
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::deleteDatabase):
(WebKit::UniqueIDBDatabase::getOrEstablishIDBDatabaseMetadata):
(WebKit::UniqueIDBDatabase::openTransaction):
(WebKit::UniqueIDBDatabase::beginTransaction):
(WebKit::UniqueIDBDatabase::commitTransaction):
(WebKit::UniqueIDBDatabase::resetTransaction):
(WebKit::UniqueIDBDatabase::rollbackTransaction):
(WebKit::UniqueIDBDatabase::postTransactionOperation):
(WebKit::UniqueIDBDatabase::changeDatabaseVersion):
(WebKit::UniqueIDBDatabase::createObjectStore):
(WebKit::UniqueIDBDatabase::deleteObjectStore):
(WebKit::UniqueIDBDatabase::clearObjectStore):
(WebKit::UniqueIDBDatabase::createIndex):
(WebKit::UniqueIDBDatabase::deleteIndex):
(WebKit::UniqueIDBDatabase::putRecord):
(WebKit::UniqueIDBDatabase::getRecord):
(WebKit::UniqueIDBDatabase::openCursor):
(WebKit::UniqueIDBDatabase::cursorAdvance):
(WebKit::UniqueIDBDatabase::cursorIterate):
(WebKit::UniqueIDBDatabase::count):
(WebKit::UniqueIDBDatabase::deleteRange):
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
* NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
(WebKit::NetworkCacheStorage::store):
* Shared/AsyncTask.h:
(WebKit::AsyncTask::AsyncTask):
* Shared/ChildProcess.cpp:
(WebKit::didCloseOnConnectionWorkQueue):
* Shared/WebContextMenuItemData.cpp:
(WebKit::WebContextMenuItemData::WebContextMenuItemData):
* Shared/WebContextMenuItemData.h:
(WebKit::WebContextMenuItemData::selectionHandler):
* Shared/mac/SecItemShim.cpp:
(WebKit::responseMap):
* UIProcess/Plugins/PluginProcessManager.cpp:
(WebKit::PluginProcessManager::PluginProcessManager):
* UIProcess/WebContext.cpp:
(WebKit::WebContext::WebContext):
(WebKit::m_processSuppressionDisabledForPageCounter):
* UIProcess/WebOriginDataManagerProxy.cpp:
(WebKit::CallbackSynchronizer::create):
(WebKit::CallbackSynchronizer::CallbackSynchronizer):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
* UIProcess/mac/WebContextMenuProxyMac.mm:
(-[WKSelectionHandlerWrapper initWithSelectionHandler:]):
(WebKit::nsMenuItemVector):
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
(WebKit::WebIDBServerConnection::deleteDatabase):
(WebKit::WebIDBServerConnection::getOrEstablishIDBDatabaseMetadata):
(WebKit::WebIDBServerConnection::openTransaction):
(WebKit::WebIDBServerConnection::beginTransaction):
(WebKit::WebIDBServerConnection::commitTransaction):
(WebKit::WebIDBServerConnection::resetTransaction):
(WebKit::WebIDBServerConnection::rollbackTransaction):
(WebKit::WebIDBServerConnection::setIndexKeys):
(WebKit::WebIDBServerConnection::createObjectStore):
(WebKit::WebIDBServerConnection::createIndex):
(WebKit::WebIDBServerConnection::deleteIndex):
(WebKit::WebIDBServerConnection::get):
(WebKit::WebIDBServerConnection::put):
(WebKit::WebIDBServerConnection::count):
(WebKit::WebIDBServerConnection::deleteRange):
(WebKit::WebIDBServerConnection::clearObjectStore):
(WebKit::WebIDBServerConnection::deleteObjectStore):
(WebKit::WebIDBServerConnection::changeDatabaseVersion):
(WebKit::WebIDBServerConnection::openCursor):
(WebKit::WebIDBServerConnection::cursorAdvance):
(WebKit::WebIDBServerConnection::cursorIterate):
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
* WebProcess/OriginData/WebOriginDataManagerSupplement.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::getOrigins):
(WebKit::WebProcess::deleteEntriesForOrigin):
(WebKit::WebProcess::deleteEntriesModifiedBetweenDates):
(WebKit::WebProcess::deleteAllEntries):
* WebProcess/WebProcess.h:
2014-12-16 Anders Carlsson <andersca@apple.com>
Get rid of a couple of binds in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=139717
Reviewed by Sam Weinig.
* DatabaseProcess/DatabaseProcess.cpp:
(WebKit::DatabaseProcess::postDatabaseTask):
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::didShutdownBackingStore):
(WebKit::UniqueIDBDatabase::postMainThreadTask):
(WebKit::UniqueIDBDatabase::performNextMainThreadTask):
(WebKit::UniqueIDBDatabase::postDatabaseTask):
(WebKit::UniqueIDBDatabase::performNextMainThreadTaskWithoutAdoptRef): Deleted.
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
* Platform/IPC/mac/ConnectionMac.mm:
(IPC::Connection::initializeDeadNameSource):
* UIProcess/Launcher/ProcessLauncher.cpp:
(WebKit::processLauncherWorkQueue):
(WebKit::ProcessLauncher::ProcessLauncher):
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::unprotectPluginFromDestruction):
(WebKit::derefPluginView): Deleted.
2014-12-16 Andreas Kling <akling@apple.com>
Use Ref for SecurityOrigin.
<https://webkit.org/b/139710>
Reviewed by Anders Carlsson.
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::databaseFilenameIdentifier):
* WebProcess/ApplicationCache/WebApplicationCacheManager.cpp:
(WebKit::WebApplicationCacheManager::deleteEntriesForOrigin):
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
(WebKit::WebIDBServerConnection::WebIDBServerConnection):
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::addOriginAccessWhitelistEntry):
(WebKit::InjectedBundle::removeOriginAccessWhitelistEntry):
2014-12-16 Anders Carlsson <andersca@apple.com>
Remove deprecated StorageNamespaceImpl overloads
https://bugs.webkit.org/show_bug.cgi?id=139713
Reviewed by Andreas Kling.
* WebProcess/Storage/StorageNamespaceImpl.cpp:
(WebKit::StorageNamespaceImpl::storageArea):
(WebKit::StorageNamespaceImpl::copy):
(WebKit::StorageNamespaceImpl::createSessionStorageNamespace): Deleted.
(WebKit::StorageNamespaceImpl::createLocalStorageNamespace): Deleted.
* WebProcess/Storage/StorageNamespaceImpl.h:
2014-12-16 Beth Dakin <bdakin@apple.com>
Speculative build fix.
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController _animationControllerForCustomPreview]):
2014-12-16 Beth Dakin <bdakin@apple.com>
REGRESSION: Preview popovers obscure the link, look wrong
https://bugs.webkit.org/show_bug.cgi?id=139711
-and corresponding-
rdar://problem/19271854
Reviewed by Tim Horton.
Switch to using NSPopoverAnimationController.
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController _defaultAnimationController]):
(-[WKImmediateActionController _animationControllerForCustomPreview]):
2014-12-16 Timothy Horton <timothy_horton@apple.com>
Immediate action popovers can get stuck open
https://bugs.webkit.org/show_bug.cgi?id=139709
<rdar://problem/19270279>
Reviewed by Beth Dakin.
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController _clearImmediateActionState]):
Don't clear the animation controller; it breaks things and was unnecessary.
2014-12-16 Conrad Shultz <conrad_shultz@apple.com>
Add a progress indicator to the preview popover
https://bugs.webkit.org/show_bug.cgi?id=139699
Reviewed by Tim Horton.
* UIProcess/API/Cocoa/WKViewPrivate.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView _setPreviewLoading:]):
Wrap -[WKImmediateActionController setPreviewLoading:].
* UIProcess/mac/WKImmediateActionController.h:
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController _createPreviewPopoverIfNeededForURL:]):
Flag the preview view controller as loading before beginning the load.
(-[WKImmediateActionController setPreviewLoading:]):
Wrap -[WKPagePreviewViewController setLoading:].
* UIProcess/mac/WKPagePreviewViewController.h:
* UIProcess/mac/WKPagePreviewViewController.mm:
(-[WKPagePreviewViewController setLoading:]):
Toggle the progress indicator animation state.
(-[WKPagePreviewViewController isLoading]):
Accessor.
(-[WKPagePreviewViewController loadView]):
Create and center an indeterminate progress indicator that won't scale with the preview content.
2014-12-16 Enrica Casucci <enrica@apple.com>
Fix iOS builders for 8.0
https://bugs.webkit.org/show_bug.cgi?id=139495
Reviewed by Jer Noble
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _mayAutomaticallyShowVideoOptimized]):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::reattachToWebProcess):
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
2014-12-16 Gavin Barraclough <barraclough@apple.com>
Move Mac process suppression from WebCore to WebKit2
https://bugs.webkit.org/show_bug.cgi?id=139705
Reviewed by Geoff Garen.
Currently PageThrottler constructs the PageActivityState, holds a copy of the ViewState,
and an optional UserActivity.
Instead, still construct the PageActivityState but just pass this out via the Page to WebPage.
Logic From PageThrottler::updateUserActivity merged into WebPage::updateUserActivity.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::setPageActivityState):
- added to propagate PageActivityState to WebPage.
* WebProcess/WebCoreSupport/WebChromeClient.h:
- added setPageActivityState to propagate PageActivityState to WebPage.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
- calls to updateUserActivity.
(WebKit::WebPage::setPageActivityState):
- calls to updateUserActivity.
(WebKit::WebPage::updateUserActivity):
- incorporate logic from PageThrottler::updateUserActivity.
(WebKit::WebPage::setViewState):
- calls to updateUserActivity.
(WebKit::WebPage::updatePreferences):
- calls to updateUserActivity.
* WebProcess/WebPage/WebPage.h:
- added setPageActivityState, m_activityState.
2014-12-16 Anders Carlsson <andersca@apple.com>
More StorageManager modernization
https://bugs.webkit.org/show_bug.cgi?id=139704
Reviewed by Andreas Kling.
* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::LocalStorageNamespace::getOrCreateStorageArea):
(WebKit::StorageManager::SessionStorageNamespace::getOrCreateStorageArea):
(WebKit::StorageManager::createSessionStorageMap):
(WebKit::StorageManager::destroyStorageMap):
(WebKit::StorageManager::findStorageArea):
(WebKit::StorageManager::getOrCreateLocalStorageNamespace):
2014-12-16 Anders Carlsson <andersca@apple.com>
Use Ref in another StorageManager function
https://bugs.webkit.org/show_bug.cgi?id=139700
Reviewed by Andreas Kling.
* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::LocalStorageNamespace::getOrCreateStorageArea):
2014-12-16 Anders Carlsson <andersca@apple.com>
Use Ref in StorageManager
https://bugs.webkit.org/show_bug.cgi?id=139698
Reviewed by Andreas Kling.
* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::TransientLocalStorageNamespace::create):
(WebKit::StorageManager::TransientLocalStorageNamespace::getOrCreateStorageArea):
(WebKit::StorageManager::StorageArea::create):
(WebKit::StorageManager::StorageArea::clone):
(WebKit::StorageManager::LocalStorageNamespace::create):
(WebKit::StorageManager::SessionStorageNamespace::create):
(WebKit::StorageManager::create):
* UIProcess/Storage/StorageManager.h:
2014-12-16 Gavin Barraclough <barraclough@apple.com>
Split UserActivity from disabled flag in WebPage
https://bugs.webkit.org/show_bug.cgi?id=139696
Reviewed by Geoffrey Garen.
In preparation for other things driving the UserActivity.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
- initialize new members.
(WebKit::WebPage::updateUserActivity):
- start/stop the m_userActivity, based on m_processSupressionEnabled
(WebKit::WebPage::updatePreferences):
- call updateUserActivity to account for m_processSupressionEnabled changes.
* WebProcess/WebPage/WebPage.h:
- split m_processSuppressionDisabledByWebPreference -> m_processSupressionEnabled, m_userActivity.
2014-12-16 Anders Carlsson <andersca@apple.com>
Get rid of PassRefPtr inside StorageManager
https://bugs.webkit.org/show_bug.cgi?id=139693
Reviewed by Andreas Kling.
* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::TransientLocalStorageNamespace::getOrCreateStorageArea):
(WebKit::StorageManager::StorageArea::create):
(WebKit::StorageManager::StorageArea::StorageArea):
(WebKit::StorageManager::StorageArea::clone):
(WebKit::StorageManager::LocalStorageNamespace::create):
(WebKit::StorageManager::LocalStorageNamespace::getOrCreateStorageArea):
(WebKit::StorageManager::SessionStorageNamespace::create):
(WebKit::StorageManager::SessionStorageNamespace::getOrCreateStorageArea):
(WebKit::StorageManager::create):
* UIProcess/Storage/StorageManager.h:
2014-12-16 Tim Horton <timothy_horton@apple.com>
Disable TextIndication for Lookup immediate actions
https://bugs.webkit.org/show_bug.cgi?id=139684
Reviewed by Anders Carlsson.
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController _animationControllerForText]):
2014-12-16 Dan Bernstein <mitz@apple.com>
[Cocoa] WKWebProcessPlugInLoadDelegate cant tell what type of same-document navigation has happened
https://bugs.webkit.org/show_bug.cgi?id=139669
Reviewed by Anders Carlsson.
* Shared/API/Cocoa/_WKSameDocumentNavigationType.h: Added. Moved the
_WKSameDocumentNavigationType type definition here from WKNavigationDelegatePrivate.h.
* Shared/API/Cocoa/_WKSameDocumentNavigationTypeInternal.h: Added.
(WebKit::toWKSameDocumentNavigationType): Moved from NavigationState.mm.
* Shared/API/c/WKSharedAPICast.h:
(WebKit::toSameDocumentNavigationType): Added this conversion helper.
* UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Added #import.
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::toWKSameDocumentNavigationType): Deleted.
* WebKit2.xcodeproj/project.pbxproj: Updated for added headers.
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h: Declared new
delegate method that take a navigation type parameter.
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(didSameDocumentNavigationForFrame): Changed to call the new delegate method, passing the
navigation type.
2014-12-16 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Update OptionsGTK.cmake and NEWS for 2.7.3 release.
* gtk/NEWS: Add release notes for 2.7.3.
2014-12-16 Antti Koivisto <antti@apple.com>
WebKit level persistent caching
https://bugs.webkit.org/show_bug.cgi?id=30322
Minor cleanups based on comments by Joseph Pecoraro.
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::decodeStorageEntry):
* NetworkProcess/cache/NetworkCache.h:
* NetworkProcess/cache/NetworkCacheStorage.h:
* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
2014-12-15 Bartlomiej Gajda <b.gajda@samsung.com>
Build fix after r177301.
https://bugs.webkit.org/show_bug.cgi?id=139666
Reviewed by Gyuyoung Kim.
* WebProcess/WebPage/CoordinatedGraphics/WebPageCoordinatedGraphics.cpp:
(WebKit::WebPage::findZoomableAreaForPoint):
2014-12-15 Simon Fraser <simon.fraser@apple.com>
[iOS WK2] Possible crash when setting the WKWebViews's scroll view delegate, if the scroll view outlives the web view
https://bugs.webkit.org/show_bug.cgi?id=139662
rdar://problem/18083882
Reviewed by Benjamin Poulain.
Null out the internal delegate on the WKScrollView when the WKWebView goes away, since
it's possible for a client to set its own scroll view delegate, forcing the creation of
a WKScrollViewDelegateForwarder, and then retain the UIScrollView past the lifetime of
the WKWebView. In this situation, the WKScrollViewDelegateForwarder's internalDelegate
would point to a deleted WKWebView.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView dealloc]):
2014-12-15 Beth Dakin <bdakin@apple.com>
Make lookup an immediate action instead of an action menu item
https://bugs.webkit.org/show_bug.cgi?id=139661
-and corresponding-
rdar://problem/19198414
Reviewed by Tim Horton.
New type.
* Shared/API/c/WKImmediateActionTypes.h:
ActionMenuHitTestResult now includes a DictionaryPopupInfo.
* Shared/mac/ActionMenuHitTestResult.h:
* Shared/mac/ActionMenuHitTestResult.mm:
(WebKit::ActionMenuHitTestResult::encode):
(WebKit::ActionMenuHitTestResult::decode):
Remove all lookup menu items.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _defaultMenuItemsForText]):
(-[WKActionMenuController _defaultMenuItemsForEditableText]):
(-[WKActionMenuController _defaultMenuItemsForEditableTextWithSuggestions]):
(-[WKActionMenuController _createActionMenuItemForTag:]):
(-[WKActionMenuController _lookupText:]): Deleted.
Set the defaultAnimationController to the lookup-provided animation controller
when appropriate.
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController _defaultAnimationController]):
(-[WKImmediateActionController _animationControllerForText]):
Re-factor performDictionaryLookupForRange() so that most of the work is done in a
new function called dictionaryPopupInfoForRange(). This was that code can be used
for both performing a dictionary lookup and just getting the DictionaryPopupInfo
for the ActionMenuHitTest.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::dictionaryPopupInfoForRange):
(WebKit::WebPage::performDictionaryLookupForRange):
(WebKit::WebPage::performActionMenuHitTestAtLocation):
(WebKit::WebPage::lookupTextAtLocation):
2014-12-15 Matt Baker <mattbaker@apple.com>
Web Inspector: Docked inspector repositioned incorrectly when dragging frame borders
https://bugs.webkit.org/show_bug.cgi?id=139415
Reviewed by Joseph Pecoraro.
The _ignoreNextInspectedViewFrameDidChange flag wasn't set back to NO after
being tested by inspectedViewFrameDidChange.
* UIProcess/mac/WebInspectorProxyMac.mm:
(-[WKWebInspectorProxyObjCAdapter inspectedViewFrameDidChange:]):
2014-12-15 Gavin Barraclough <barraclough@apple.com>
Simplify tracking of process suppression disabled for PluginProcessManager
https://bugs.webkit.org/show_bug.cgi?id=139611
Unreviewed gtk/efl build fix.
* UIProcess/Plugins/PluginProcessManager.h:
- missing #ifdef
2014-12-15 Timothy Horton <timothy_horton@apple.com>
Implement Data Detectors immediate actions for WebKit2
https://bugs.webkit.org/show_bug.cgi?id=139617
<rdar://problem/19198539>
Reviewed by Beth Dakin.
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController _menuItemForDataDetectedText]):
Note that this action context is only for immediate actions.
2014-12-15 Myles C. Maxfield <mmaxfield@apple.com>
Addressing post-review comments in r177035
https://bugs.webkit.org/show_bug.cgi?id=139557
Reviewed by Darin Adler.
* Shared/WebHitTestResult.cpp:
(WebKit::WebHitTestResult::Data::elementBoundingBoxInWindowCoordinates): Migrate off rendererBoundingBox().
* WebProcess/WebPage/CoordinatedGraphics/WebPageCoordinatedGraphics.cpp:
(WebKit::WebPage::findZoomableAreaForPoint): Ditto.
2014-12-15 Timothy Horton <timothy_horton@apple.com>
Implement Data Detectors immediate actions for WebKit2
https://bugs.webkit.org/show_bug.cgi?id=139617
<rdar://problem/19198539>
Reviewed by Beth Dakin.
* Shared/API/c/WKImmediateActionTypes.h:
Add a new type.
* UIProcess/API/mac/WKView.mm:
(-[WKView mouseDown:]):
Send mouseDown along to the WKImmediateActionController too.
(-[WKView initWithFrame:context:configuration:webView:]):
Temporarily disable action menus.
(-[WKView _dismissContentRelativeChildWindows]):
Hide the immediate action preview when detaching child windows.
* UIProcess/mac/WKImmediateActionController.h:
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController willDestroyView:]):
Clear the DDActionContext when tearing down the view.
(-[WKImmediateActionController wkView:willHandleMouseDown:]):
(-[WKImmediateActionController _cancelImmediateAction]):
(-[WKImmediateActionController _clearImmediateActionState]):
(-[WKImmediateActionController immediateActionRecognizerWillPrepare:]):
(-[WKImmediateActionController immediateActionRecognizerWillBeginAnimation:]):
(-[WKImmediateActionController _defaultAnimationController]):
(-[WKImmediateActionController _updateImmediateActionItem]):
(-[WKImmediateActionController hidePreview]):
(-[WKImmediateActionController popoverWillClose:]):
(-[WKImmediateActionController _menuItemForDataDetectedText]):
Copy most of the DataDetectors implementation into WKImmediateActionController.
2014-12-15 Myles C. Maxfield <mmaxfield@apple.com>
Delete Notation because we don't use it
https://bugs.webkit.org/show_bug.cgi?id=139171
Reviewed by Kent Tamura.
* WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm:
(WebKit::WKDOMNodeClass):
* mac/MigrateHeadersFromWebKitLegacy.make:
2014-12-15 David Kilzer <ddkilzer@apple.com>
Remove last references to OfflineStorage process
<http://webkit.org/b/139648>
Reviewed by Anders Carlsson.
* WebKit2.xcodeproj/project.pbxproj: Remove last references to
the OfflineStorage process. See r154251 and r154256.
2014-12-15 Gavin Barraclough <barraclough@apple.com>
Change HysteresisActivity to use a lambda
https://bugs.webkit.org/show_bug.cgi?id=139636
Reviewed by Darin Adler.
The current implementation provides notifications via callbacks to a delegate. Using a delegate
with callbacks is limiting a number of ways. The callback names are very ambiguous, the callbacks
must either be on a separate object (more boilerplate), or the callback must be public for
HysteresisActivity to call them, or friends get involved. Without the boilerplate of extra
delegate objects it's hard to scale use of these objects - a single object can't serve as a
delegate for multiple HysteresisActivity members.
Instead, make HysteresisActivity take a lambda to callback on state change. To simplify, changed
HysteresisState to only track Started/Stopped states (removed WillStopPendingTimeout).
* WebProcess/WebCoreSupport/WebSQLiteDatabaseTracker.cpp:
(WebKit::WebSQLiteDatabaseTracker::WebSQLiteDatabaseTracker):
- HysteresisActivity now takes a lambda, not a delegate.
(WebKit::WebSQLiteDatabaseTracker::hysteresisUpdated):
(WebKit::WebSQLiteDatabaseTracker::started): Deleted.
(WebKit::WebSQLiteDatabaseTracker::stopped): Deleted.
- started/stopped merged into hysteresisUpdated
* WebProcess/WebCoreSupport/WebSQLiteDatabaseTracker.h:
- HysteresisActivity is no longer templated on delegate type, changed function declarations.
2014-12-15 Antti Koivisto <antti@apple.com>
WebKit level persistent caching
https://bugs.webkit.org/show_bug.cgi?id=30322
Reviewed by Sam Weinig.
We can improve performance and open new optimization possibilities by bringing network caching into WebKit.
This patch implements an experimental HTTP cache living in the network process.
The main classes are:
NetworkCache
- Implements HTTP cache validation logic including Vary header
- Initially non-range GET only
- Fast serialization using WebKit types (ResourcesResponse etc) instead of native network layer types
NetworkCacheKey
- Unique identifier for cache entries
- Keyed on method/partition/URL
NetworkCacheStorage
- Storage backend
- dispatch-IO based implementation (generic posix implementation wouldn't be difficult)
- File system only (no SQLite or similar)
- One file per resource containing both header and body data
- Zero persistent global metadata
- Bloom filter for fast fail
NetworkCacheEncoder/Decoder
- Serializisation support with integrity verification.
The code is behind the NETWORK_CACHE feature flag and requires network process to be enabled to use.
This patch does not enable the feature yet by default.
Test: http/tests/cache/disk-cache-validation.html
* NetworkProcess/cache/NetworkCache.cpp: Added.
* NetworkProcess/cache/NetworkCache.h: Added.
* NetworkProcess/cache/NetworkCacheKey.cpp: Added.
* NetworkProcess/cache/NetworkCacheKey.h: Added.
* NetworkProcess/cache/NetworkCacheStorage.h: Added.
* NetworkProcess/cache/NetworkCacheStorage.mm: Added.
* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
(WebKit::NetworkProcess::platformSetCacheModel):
* NetworkProcess/ios/NetworkProcessIOS.mm:
(WebKit::NetworkProcess::clearCacheForAllOrigins):
* NetworkProcess/mac/NetworkProcessMac.mm:
(WebKit::NetworkProcess::clearCacheForAllOrigins):
* NetworkProcess/mac/NetworkResourceLoaderMac.mm:
(WebKit::tryGetShareableHandleFromCFData):
* Platform/Logging.h:
* WebKit2.xcodeproj/project.pbxproj:
* config.h:
2014-12-15 Gavin Barraclough <barraclough@apple.com>
Simplify tracking of process suppression disabled for PluginProcessManager
https://bugs.webkit.org/show_bug.cgi?id=139611
Reviewed by Darin Adler.
Previously if process suppression state changed for any context we would
iterate over all contexts to recompute.
There was also an inconsistency in the code. When plugin processes are
created they called processSuppressionIsEnabledForAllContexts(), which
checked WebContext::processSuppressionEnabled(), which in turn checks
two things - whether any page is currently visible, and whether the
suppression is currently disabled for any page. However when updating
process supression state we would call
processSuppressionPreferenceIsEnabledForAllContexts(), which would just
check the value of the key from the context's default PageGroup.
We shouldn't be taking visibility into account (this is handled from the
content, where we know which pages have instances of which plugins), but
we should be checking the current pref value of each page.
We already track in each context whether any page has teh pref set to
disable throttling; add a counter to the shared PluginProcessManager to
coallesce across all contexts.
* UIProcess/Plugins/PluginProcessManager.cpp:
(WebKit::PluginProcessManager::PluginProcessManager):
- added m_processSuppressionDisabledForPageCounter, m_processSuppressionEnabled.
* UIProcess/Plugins/PluginProcessManager.h:
(WebKit::PluginProcessManager::processSuppressionDisabledForPageCount):
- accessor for WebContext to increment count.
(WebKit::PluginProcessManager::processSuppressionEnabled):
- accessor for PluginProcessProxy.
* UIProcess/Plugins/PluginProcessProxy.cpp:
(WebKit::PluginProcessProxy::didFinishLaunching):
- get initial supression state from the PluginProcessManager, not WebContext.
* UIProcess/Plugins/mac/PluginProcessManagerMac.mm:
(WebKit::PluginProcessManager::updateProcessSuppressionState):
(WebKit::PluginProcessManager::setProcessSuppressionEnabled): Deleted.
- setProcessSuppressionEnabled -> updateProcessSuppressionState
rather than WebContext setting suppression state, PluginProcessManager detects
when this may need to change & determines a new value for itself.
* UIProcess/WebContext.h:
- removed processSuppressionIsEnabledForAllContexts, processSuppressionPreferenceIsEnabledForAllContexts
updateProcessSuppressionState is no longer const (updates m_pluginProcessManagerProcessSuppressionDisabledCount).
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::updateProcessSuppressionState):
- instead of explicitly recomputing plugin throttling state from Within the WebContext, just update
m_pluginProcessManagerProcessSuppressionDisabledCount to count a RefCounter on the shared PluginProcessManager.
(WebKit::WebContext::processSuppressionIsEnabledForAllContexts): Deleted.
(WebKit::WebContext::processSuppressionPreferenceIsEnabledForAllContexts): Deleted.
- removed.
2014-12-15 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Use API::LoaderClient instead of WKPageLoaderClient
https://bugs.webkit.org/show_bug.cgi?id=139583
Reviewed by Gustavo Noronha Silva.
It simplifies the code and it will make easier to implement new
loader client methods.
* UIProcess/API/gtk/WebKitBackForwardList.cpp:
(webkitBackForwardListChanged):
* UIProcess/API/gtk/WebKitBackForwardListPrivate.h:
* UIProcess/API/gtk/WebKitLoaderClient.cpp:
(LoaderClient::LoaderClient):
(attachLoaderClientToView):
(didStartProvisionalLoadForFrame): Deleted.
(didReceiveServerRedirectForProvisionalLoadForFrame): Deleted.
(didFailProvisionalLoadWithErrorForFrame): Deleted.
(didCommitLoadForFrame): Deleted.
(didFinishLoadForFrame): Deleted.
(didFailLoadWithErrorForFrame): Deleted.
(didDisplayInsecureContentForFrame): Deleted.
(didRunInsecureContentForFrame): Deleted.
(didChangeBackForwardList): Deleted.
(didReceiveAuthenticationChallengeInFrame): Deleted.
(processDidCrash): Deleted.
2014-12-15 Gwang Yoon Hwang <yoon@igalia.com>
Add initial implementation of ThreadSafeCoordinatedSurface, ThreadedCompositor, and SimpleViewportController
https://bugs.webkit.org/show_bug.cgi?id=118383
Reviewed by Martin Robinson.
Implements an initial version of the Threaded Compositor.
Threaded Compositor is a variant of Coordinated Graphics implementation.
Basic structure of the implementaion is simliar, thus, Threaded
Compositor reuses lots of classes from Coordinated Graphics. However,
instead of compositing on UI Process, Threaded Compositor performs
compositing on a dedicate thread of Web Process.
No new test, because it is in experimental stage.
* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
(WebKit::CoordinatedGraphicsScene::CoordinatedGraphicsScene):
Removed a assertion not to force its creation in the main thread. In
the Threaded Compositor, it can be created in the dedicated thread.
* Shared/CoordinatedGraphics/threadedcompositor/ThreadSafeCoordinatedSurface.cpp: Added.
* Shared/CoordinatedGraphics/threadedcompositor/ThreadSafeCoordinatedSurface.h: Added.
Implements a surface using ImageBuffer as a backend to use in the Web
Process.
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h: Added.
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp: Added.
Implements a compositor which runs on the created thread. It owns
SimpleViewportController and CoordinatedGraphicsScene to render scene on the
actual surface.
* Shared/CoordinatedGraphics/SimpleViewportController.cpp: Added.
* Shared/CoordinatedGraphics/SimpleViewportController.h: Added.
This class is responsible to handle scale factor and scrolling position
with a simplifed logic in the compositing thread.
2014-12-14 Andreas Kling <akling@apple.com>
Replace PassRef with Ref/Ref&& across the board.
<https://webkit.org/b/139587>
Reviewed by Darin Adler.
* UIProcess/WebBackForwardList.h:
(WebKit::WebBackForwardList::create):
* UIProcess/WebBatteryManagerProxy.cpp:
(WebKit::WebBatteryManagerProxy::create):
* UIProcess/WebBatteryManagerProxy.h:
* UIProcess/WebPageGroup.cpp:
(WebKit::WebPageGroup::createNonNull):
* UIProcess/WebPageGroup.h:
* UIProcess/efl/BatteryProvider.cpp:
(BatteryProvider::create):
* UIProcess/efl/BatteryProvider.h:
* WebProcess/MediaStream/UserMediaPermissionRequestManager.h:
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::shouldApplyStyle):
* WebProcess/WebCoreSupport/WebUserMediaClient.cpp:
(WebKit::WebUserMediaClient::requestPermission):
* WebProcess/WebCoreSupport/WebUserMediaClient.h:
* WebProcess/WebPage/ViewUpdateDispatcher.cpp:
(WebKit::ViewUpdateDispatcher::create):
* WebProcess/WebPage/ViewUpdateDispatcher.h:
2014-12-12 Gavin Barraclough <barraclough@apple.com>
Split WebPageProxy::m_preventProcessSuppression to track pref/visibility separately
https://bugs.webkit.org/show_bug.cgi?id=139600
Reviewed by Geoff Garen.
Previously WebPageProxy::m_preventProcessSuppression would be set if either the page was visible
or its suppression was disabled by the pref. Instead track these separately. This will make the
user observability state applicable on iOS, too.
Add a new counter to WebContext, and split the counting in WebPageProxy.
::updateProccessSuppressionState continues to track the pref change (which matches its name),
tracking of user observability changes moved to updateActivityToken (which we should further
merge with; it already tracks observability to control process state for iOS).
* UIProcess/WebContext.cpp:
(WebKit::m_processSuppressionDisabledForPageCounter):
- added new RefCounter.
* UIProcess/WebContext.h:
(WebKit::WebContext::processSuppressionDisabledForPageCount):
- added new RefCounter.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::reattachToWebProcess):
- no longer needs to call updateProccessSuppressionState (pref has not changed; handled by the call to updateActivityToken).
(WebKit::WebPageProxy::dispatchViewStateChange):
- no longer needs to call updateProccessSuppressionState (pref has not changed; handled by the call to updateActivityToken).
(WebKit::WebPageProxy::updateActivityToken):
- this now also updated the user observability counter.
(WebKit::WebPageProxy::updateProccessSuppressionState):
- now only tracks whether this is disabled via the preference.
(WebKit::WebPageProxy::resetStateAfterProcessExited):
- clear the user observability counter; thsi will be reset on reattach.
* UIProcess/WebPageProxy.h:
- added new RefCounter::Count.
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::processSuppressionEnabled):
- processSuppressionEnabled is disabled if *neither*:
- there are user observable pages
- disabled by pref for any page.
2014-12-12 Beth Dakin <bdakin@apple.com>
Need a fake mouse move after hiding data detectors UI
https://bugs.webkit.org/show_bug.cgi?id=139608
-and corresponding-
rdar://problem/19221935
Reviewed by Tim Horton.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::dataDetectorsDidHideUI):
2014-12-12 Anders Carlsson <andersca@apple.com>
Handle caches in WebsiteDataStore
https://bugs.webkit.org/show_bug.cgi?id=139607
<rdar://problem/19107614>
Reviewed by Sam Weinig.
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::computeNetworkProcessAccessType):
2014-12-12 Enrica Casucci <enrica@apple.com>
[iOS] Predictions are not updated when using navigation buttons.
https://bugs.webkit.org/show_bug.cgi?id=139567
rdar://problem/19132585
Reviewed by Dan Bernstein.
When moving focus programmatically, we need to notify the keyboard so that it
can update the prediction bar.
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKFormInputSession setAccessoryViewCustomButtonTitle:]):
(-[WKContentView requiresAccessoryView]):
(-[WKContentView inputAssistantButtonItems]):
(-[WKContentView accessoryTab:]):
(-[WKContentView _startAssistingKeyboard]):
(-[WKContentView _stopAssistingNode]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::focusNextAssistedNode):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::focusNextAssistedNode):
2014-12-12 Timothy Horton <timothy_horton@apple.com>
TextIndicator (and other view-relative subwindows) is not dismissed on zoom gesture
https://bugs.webkit.org/show_bug.cgi?id=139580
<rdar://problem/19226350>
Reviewed by Anders Carlsson.
* UIProcess/PageClient.h:
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::dismissContentRelativeChildWindows):
(WebKit::PageClientImpl::dismissDictionaryLookupPanel): Deleted.
(WebKit::PageClientImpl::dismissActionMenuPopovers): Deleted.
Merge dismissDictionaryLookupPanel and dismissActionMenuPopovers into
_dismissContentRelativeChildWindows, which also dismisses TextIndicator and the
text correction panel. Dismissal of any child windows which are anchored to
the page content now bottlenecks through this function.
(WebKit::PageClientImpl::navigationGestureDidBegin):
Dismiss all anchored subwindows when starting a navigation gesture, not
just TextIndicator and action menu popovers.
* UIProcess/API/mac/WKView.mm:
(-[WKView scrollWheel:]):
No need to dismiss TextIndicator here; we've got this covered in the more-inclusive
WebPageProxy::pageDidScroll, and will now dismiss more things.
(-[WKView mouseDown:]):
Dismiss more things.
(-[WKView viewDidMoveToWindow]):
Dismiss more things.
(-[WKView _dismissContentRelativeChildWindows]):
The aforementioned combined dismissal function.
(-[WKView magnifyWithEvent:]):
(-[WKView smartMagnifyWithEvent:]):
(-[WKView setMagnification:centeredAtPoint:]):
(-[WKView setMagnification:]):
Any time the page magnification changes, dismiss all the things.
* UIProcess/API/mac/WKViewPrivate.h:
Expose _dismissContentRelativeChildWindows instead of _dismissActionMenuPopovers;
for all existing clients, it makes more sense to dismiss all view-relative subwindows
than just a subset of them.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didCommitLoadForFrame):
(WebKit::WebPageProxy::pageDidScroll):
(WebKit::WebPageProxy::resetStateAfterProcessExited):
Make use of dismissAnchoredSubwindows.
* UIProcess/mac/WKActionMenuController.h:
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController prepareForMenu:withEvent:]):
Dismiss more things.
(-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
(-[WKActionMenuController dismissActionMenuPopovers]): Deleted.
dismissActionMenuPopovers is folded into WKView's _dismissContentRelativeChildWindows.
(-[WKActionMenuController _showTextIndicator]): Deleted.
(-[WKActionMenuController _hideTextIndicator]): Deleted.
Fold _showTextIndicator and _hideTextIndicator into their only callers.
_isShowingTextIndicator was never necessary, because it's OK to change
the current TextIndicator at any time, and a newer one is always more relevant.
2014-12-12 Gavin Barraclough <barraclough@apple.com>
Keep single RefCounter to track whether any pages in a context are process suppressible
https://bugs.webkit.org/show_bug.cgi?id=139576
Reviewed by Sam Weinig.
Currently we keep separate counters in each process, and coallesce these in the
context. Instead we should have a counter in the WebContext.
Also, changed the name to better describe the state we're tracking, rather than
describing what it's currently used for. This counter will also be useful for
iOS, to better manage background state of the networking process.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::WebContext):
- initialize m_userObservablePageCounter.
* UIProcess/WebContext.h:
(WebKit::WebContext::updateProcessSuppressionState):
- Added no-op implementation for non-cocoa platforms.
(WebKit::WebContext::userObservablePageCount):
- Count the number of user visible (audible / visible) pages in Context.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::updateProccessSuppressionState):
- WebProcessProxy::processSuppressionCounter -> WebContext::userObservablePageCount
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::WebProcessProxy):
(WebKit::WebProcessProxy::didFinishLaunching):
- moved all processs supression state tracking to the WebContext.
* UIProcess/WebProcessProxy.h:
(WebKit::WebProcessProxy::processSuppressionCounter): Deleted.
- moved all processs supression state tracking to the WebContext.
* UIProcess/ios/WebProcessProxyIOS.mm:
(WebKit::WebProcessProxy::allPagesAreProcessSuppressible): Deleted.
(WebKit::WebProcessProxy::updateProcessSuppressionState): Deleted.
- moved all processs supression state tracking to the WebContext.
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::processSuppressionEnabled):
- no need to interate all processes; just have a single counter.
* UIProcess/mac/WebProcessProxyMac.mm:
(WebKit::WebProcessProxy::allPagesAreProcessSuppressible): Deleted.
(WebKit::WebProcessProxy::updateProcessSuppressionState): Deleted.
- moved all processs supression state tracking to the WebContext.
2014-12-12 Alexey Proskuryakov <ap@apple.com>
Layout Test http/tests/loading/307-after-303-after-post.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=73030
Reviewed by Anders Carlsson.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::createNewWebProcess): Added a FIXME comment.
(WebKit::WebContext::setIconDatabasePath): Don't enable m_iconDatabase if the path
is empty, meaning that the database is disabled (which is not a great way to say
that, but WebKit2 icon database doesn't support enabling/disabling cleanly).
(WebKit::WebContext::iconDatabasePath): Keep it empty if it was empty.
2014-12-12 Mark Rowe <mrowe@apple.com>
Fix the 32-bit build.
* UIProcess/API/mac/WKView.mm:
(-[WKView _setPreviewTitle:]):
2014-12-12 Timothy Horton <timothy_horton@apple.com>
Fix the 32-bit build.
* UIProcess/mac/WKImmediateActionController.h:
2014-12-12 Rohit Kumar <kumar.rohit@samsung.com>
Fix Build Warning in WebKit2/UIProcess module for GTK build and WebKit2/NetworkProcess module in GTK and EFL build
https://bugs.webkit.org/show_bug.cgi?id=139535
Reviewed by Martin Robinson.
* UIProcess/API/gtk/WebKitWebView.cpp: Use UNUSED_PARAM for conditional #if case
(webkitWebViewShowNotification):
(webkitWebViewCloseNotification):
2014-12-12 Gyuyoung Kim <gyuyoung.kim@samsung.com>
[EFL] Disable all EWK2Accessibility unit tests
https://bugs.webkit.org/show_bug.cgi?id=139577
Reviewed by Csaba Osztrogonác.
WebAccessibility functionality isn't supported by EFL WebKit2 though,
EWK2Accessibility unit tests have been tested. That's why those tests have been failed
so far.
* UIProcess/API/efl/tests/test_ewk2_accessibility.cpp:
(TEST_F):
2014-12-12 Simon Fraser <simon.fraser@apple.com>
Layer borders on contentsLayers don't correctly toggle with the rest of the borders
https://bugs.webkit.org/show_bug.cgi?id=139570
rdar://problem/18007746
Reviewed by Tim Horton.
Return nil if the color is invalid, to remove the color from the layer's
border or background.
* Shared/mac/RemoteLayerTreePropertyApplier.mm:
(WebKit::cgColorFromColor):
2014-12-11 Gavin Barraclough <barraclough@apple.com>
Track pages preventing suppression in WebProcessProxy using RefCounter
https://bugs.webkit.org/show_bug.cgi?id=139108
Reviewed by Benjamin Poulain.
The networking process is allowed to app nap if all web pages are also currently in app nap.
In order to detect whether any page in any process currently requires the networking process
to be active we:
- maintain hash sets in every WebProcessProxy of pages that are okay with suppression.
- if anything changes, the WebContext iterates every WebProcessProxy to recompute state.
This is all crazy - all we actually need is a simple count of the number of pages that need
to prevent the networking process from entering app nap. This patch gets us half way there -
replace the HashSet with a RefCounter. Next step will be to hoist the RefCounters from the
process proxies up to the context to do away with the iteration.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::reattachToWebProcess):
- make sure we prevent process suppression, per current viewstate & preferences.
(WebKit::WebPageProxy::dispatchViewStateChange):
- make sure we prevent process suppression, per viewstate change.
(WebKit::WebPageProxy::updateProccessSuppressionState):
- recompute whether we need to prevent process suppression.
(WebKit::WebPageProxy::preferencesDidChange):
- when preferences change process supression may be disabled.
(WebKit::WebPageProxy::resetStateAfterProcessExited):
- we need to drop the old ref, to allow a new one to be taken when we reattach.
(WebKit::WebPageProxy::isProcessSuppressible): Deleted.
- moreged into updateProccessSuppressionState.
* UIProcess/WebPageProxy.h:
- added m_preventProcessSuppression.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::WebProcessProxy):
- initialize m_pagesPreventingSuppression
(WebKit::WebProcessProxy::createWebPage):
- moved to WebPageProxy::WebPageProxy
(WebKit::WebProcessProxy::addExistingWebPage):
- moved to WebPageProxy::reattachToWebProcess
(WebKit::WebProcessProxy::removeWebPage):
- now implicit; when the page is destroyed the RefPtr will release.
(WebKit::WebProcessProxy::pageSuppressibilityChanged): Deleted.
- moved to WebPageProxy::dispatchViewStateChange.
(WebKit::WebProcessProxy::pagePreferencesChanged): Deleted.
- moved to WebPageProxy::preferencesDidChange.
* UIProcess/WebProcessProxy.h:
(WebKit::WebProcessProxy::preventProcessSuppressionForPage):
- reference count m_pagesPreventingSuppression
* UIProcess/mac/WebProcessProxyMac.mm:
(WebKit::WebProcessProxy::allPagesAreProcessSuppressible):
- converted to use m_pagesPreventingSuppression.
- removed guard that meant processes with no pages would keep the networking
process from entering app nap, which made no sense.
2014-12-11 Anders Carlsson <andersca@apple.com>
Temporarily use WebCore session storage for transient local storage
https://bugs.webkit.org/show_bug.cgi?id=139574
Reviewed by Dan Bernstein.
* WebProcess/Storage/StorageNamespaceImpl.h:
Change the header guard so it won't conflict with StorageNamespaceImpl.h in WebCore.
* WebProcess/Storage/WebStorageNamespaceProvider.cpp:
(WebKit::WebStorageNamespaceProvider::createTransientLocalStorageNamespace):
Use the WebCore session storage for now, to avoid crashes.
2014-12-11 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r177081.
https://bugs.webkit.org/show_bug.cgi?id=139569
broke iOS video playback (Requested by eric_carlson on
#webkit).
Reverted changeset:
"Fix iOS builders for 8.0"
https://bugs.webkit.org/show_bug.cgi?id=139495
http://trac.webkit.org/changeset/177081
2014-12-11 Beth Dakin <bdakin@apple.com>
WK2: Need new SPI for Webkit clients to override default immediate action
https://bugs.webkit.org/show_bug.cgi?id=139564
-and corresponding-
rdar://problem/19225448
Reviewed by Tim Horton.
New SPI _immediateActionAnimationControllerForHitTestResult:withType:userData:
* UIProcess/API/Cocoa/WKViewPrivate.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView _immediateActionAnimationControllerForHitTestResult:withType:userData:]):
Keep at ivar for the userData so that it can be passed to the new SPI.
* UIProcess/mac/WKImmediateActionController.h:
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController _clearImmediateActionState]):
(-[WKImmediateActionController didPerformActionMenuHitTest:userData:]):
Always give the SPI a chance to override the animationController.
(-[WKImmediateActionController _updateImmediateActionItem]):
Need to mark WKImmediateActionTypes.h as Private.
* WebKit2.xcodeproj/project.pbxproj:
2014-12-11 Timothy Horton <timothy_horton@apple.com>
Move the preview popover to WebImmediateActionController
https://bugs.webkit.org/show_bug.cgi?id=139563
<rdar://problem/19208291>
Reviewed by Beth Dakin.
* UIProcess/mac/WKImmediateActionController.h:
Remove an unnecessary forward declaration.
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController willDestroyView:]):
Clear the immediate action recognizer when the view goes away.
2014-12-11 Timothy Horton <timothy_horton@apple.com>
Fix the build.
* UIProcess/mac/WKImmediateActionController.h:
* UIProcess/mac/WKImmediateActionController.mm:
2014-12-11 Timothy Horton <timothy_horton@apple.com>
Move the preview popover to WKImmediateActionController
https://bugs.webkit.org/show_bug.cgi?id=139560
<rdar://problem/19208291>
Reviewed by Beth Dakin.
* Shared/API/c/WKImmediateActionTypes.h:
Add a link preview type.
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:context:configuration:webView:]):
Pass the gesture recognizer to the WKImmediateActionController.
(-[WKView _setPreviewTitle:]):
Forward preview title changes to the WKImmediateActionController,
because that's where the preview popover lives now.
* UIProcess/mac/WKActionMenuController.h:
* UIProcess/mac/WKActionMenuController.mm:
Move WKPagePreviewViewController into its own file.
Move page preview popover related code to WKImmediateActionController.
* UIProcess/mac/WKImmediateActionController.h:
* UIProcess/mac/WKImmediateActionController.mm:
Compare the gesture recognizers directly instead of their views, for accuracy.
Move page preview popover related code in from WKActionMenuController.
Some of this should eventually move to WKPagePreviewViewController, but
for now for ease of transition we will move it here.
* UIProcess/mac/WKPagePreviewViewController.h: Added.
* UIProcess/mac/WKPagePreviewViewController.mm: Added.
* WebKit2.xcodeproj/project.pbxproj:
Move WKPagePreviewViewController into its own file.
2014-12-11 Tomas Popela <tpopela@redhat.com>
[GTK] Minor fixes for documentation and translations
https://bugs.webkit.org/show_bug.cgi?id=139450
Reviewed by Sergio Villar Senin.
* UIProcess/API/gtk/WebKitNavigationAction.cpp:
Fix typo in documentation.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkit_web_view_class_init):
Mark zoom-level and is-loading properties names for translation and
when touching them also fix the indentation style.
2014-12-11 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Inspector Process crash when navigating to non-inspectable page
https://bugs.webkit.org/show_bug.cgi?id=139508
Reviewed by Zalan Bujtas.
The Inspector Process can still receive InspectorFrontendHost messages
even though the backend connection has been invalidated and cleared.
Only send messages if the connection exists.
* WebProcess/WebPage/WebInspectorUI.cpp:
(WebKit::WebInspectorUI::openInNewTab):
(WebKit::WebInspectorUI::sendMessageToBackend):
2014-12-11 Yongjun Zhang <yongjun_zhang@apple.com>
WebKit2 should expose FirstVisuallyNonEmptyLayout rendering milestone.
https://bugs.webkit.org/show_bug.cgi?id=139514
Expose DidFirstVisuallyNonEmptyLayout so that WebKit2 client can listen to visually non-empty layout rendering event.
Reviewed by Dan Bernstein.
* Shared/API/Cocoa/WKRenderingProgressEvents.h: Add WKRenderingProgressEventFirstVisuallyNonEmptyLayout to WKRenderingProgressEvents.
* Shared/API/Cocoa/WKRenderingProgressEventsInternal.h: Also map kWKDidFirstVisuallyNonEmptyLayout to WKRenderingProgressEventFirstVisuallyNonEmptyLayout.
(renderingProgressEvents):
* UIProcess/API/Cocoa/WKWebView.mm:
(layoutMilestones): Map _WKRenderingProgressEventFirstVisuallyNonEmptyLayout to WebCore::DidFirstVisuallyNonEmptyLayout.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/Cocoa/NavigationState.mm: Add _WKRenderingProgressEventFirstVisuallyNonEmptyLayout to _WKRenderingProgressEventFirstLayout.
(WebKit::renderingProgressEvents): Map WebCore::DidFirstVisuallyNonEmptyLayout to _WKRenderingProgressEventFirstVisuallyNonEmptyLayout.
2014-12-11 Michael Catanzaro <mcatanzaro@igalia.com>
[GTK] Disable backspace key navigation
https://bugs.webkit.org/show_bug.cgi?id=136231
Reviewed by Carlos Garcia Campos.
* WebProcess/WebPage/gtk/WebPageGtk.cpp:
(WebKit::WebPage::performDefaultBehaviorForKeyEvent): remove handling
for backspace and <shift>backspace key combinations.
2014-12-11 Michael Catanzaro <mcatanzaro@igalia.com>
[GTK] String changes for the HTTP authentication dialog
https://bugs.webkit.org/show_bug.cgi?id=136782
Reviewed by Carlos Garcia Campos.
* UIProcess/API/gtk/WebKitAuthenticationDialog.cpp:
(webkitAuthenticationDialogInitialize): Add a title to the dialog, add
some missing mnemonics, and tweak a few strings.
2014-12-09 Jeremy Jones <jeremyj@apple.com>
Restore interface state when stopping optimized fullscreen.
https://bugs.webkit.org/show_bug.cgi?id=139465
Reviewed by Simon Fraser.
Implement fullscreenMayReturnToInline() to request the client application show the corresponding tab.
* UIProcess/API/APIUIClient.h:
(API::UIClient::fullscreenMayReturnToInline): added
* UIProcess/API/Cocoa/WKUIDelegatePrivate.h: add declaration
* UIProcess/Cocoa/UIDelegate.h: add declaration
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::setDelegate): check for responds to selector
(WebKit::UIDelegate::UIClient::fullscreenMayReturnToInline): added
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::fullscreenMayReturnToInline): added.
* UIProcess/WebPageProxy.h: add declaration
* UIProcess/ios/WebVideoFullscreenManagerProxy.h: add declaration
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::fullscreenMayReturnToInline): show the tab.
2014-12-11 Alexey Proskuryakov <ap@apple.com>
REGRESSION (Async Text Input): Text input method state is not reset when reloading a page
https://bugs.webkit.org/show_bug.cgi?id=139504
rdar://problem/19034674
Reviewed by Enrica Casucci.
WebKit2 used to look at EditorState changes and guess when to cancel a composition.
This was quite unreliable, and needlessly complicated - WebCore knows when it decides
to destroy a composition, so it now explicitly notifies the clients.
* UIProcess/API/mac/WKView.mm: (-[WKView _processDidExit]): Address crashing case too.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::resetStateAfterProcessExited):
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::discardedComposition):
* WebProcess/WebCoreSupport/WebEditorClient.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didChangeSelection):
(WebKit::WebPage::discardedComposition):
* WebProcess/WebPage/WebPage.h:
2014-12-10 Anders Carlsson <andersca@apple.com>
Get rid of the storage strategy
https://bugs.webkit.org/show_bug.cgi?id=139519
Reviewed by Antti Koivisto.
* NetworkProcess/NetworkProcessPlatformStrategies.cpp:
(WebKit::NetworkProcessPlatformStrategies::createStorageStrategy): Deleted.
* NetworkProcess/NetworkProcessPlatformStrategies.h:
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::createStorageStrategy): Deleted.
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:
2014-12-11 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] WebKitNotification is defined twice
https://bugs.webkit.org/show_bug.cgi?id=139538
Reviewed by Martin Robinson.
Remove the typedef from WebKitForwardDeclarations.h since it's
already in WebKitNotification.h and include WebKitNotification.h
in WebKitWebView.h.
* UIProcess/API/gtk/WebKitForwardDeclarations.h:
* UIProcess/API/gtk/WebKitWebView.h:
2014-12-11 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Move click counter logic back to WebKitWebViewBase
https://bugs.webkit.org/show_bug.cgi?id=137685
Reviewed by Martin Robinson.
It was moved to a shared class in platform to be used by both
WebKit1 and WebKit2, but it's currently only used by WebKitWebViewBase.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(ClickCounter::reset):
(ClickCounter::currentClickCountForGdkButtonEvent):
(webkitWebViewBaseButtonPressEvent):
2014-12-11 Carlos Alberto Lopez Perez <clopez@igalia.com>
[SOUP] [GTK] warning: unused parameter at NetworkProcessSoup.cpp after r177056.
https://bugs.webkit.org/show_bug.cgi?id=139534
Reviewed by Martin Robinson.
* NetworkProcess/soup/NetworkProcessSoup.cpp:
(WebKit::NetworkProcess::clearDiskCache): Comment the parameter names.
2014-12-11 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Timers might never be fired during animations
https://bugs.webkit.org/show_bug.cgi?id=139062
Reviewed by Martin Robinson.
This can happen in old/slow machines where the time to render
layers might take more than 0.016. Since the layer flush timer is
using a higher priority than WebCore timers, when scheduling all
(or several) layer flushes immediately, no other sources with
lower priority are dispatched in the main loop. We could detect if
we are scheduling layer flushes immediately for too long (100ms)
and schedule the next flush after a delay to ensure other sources
with lower priority have a chance to be dispatched. Also use a
lower priority, GDK_PRIORITY_EVENTS is too high, so we use
GDK_PRIORITY_REDRAW - 1 to ensure it's higher than WebCore timers.
* WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
(WebKit::LayerTreeHostGtk::LayerTreeHostGtk): Rename
m_lastFlushTime as m_lastImmediateFlushTime.
(WebKit::LayerTreeHostGtk::layerFlushTimerFired): Save the
fireTime before calling flushAndRenderLayers() and compute the
next flush delay based on the elapsed time using monotonically
increasing time instead of current time. Use the target delay
as next flush delay if we have scheduled flushes immediately for
more than 100ms.
(WebKit::LayerTreeHostGtk::flushAndRenderLayers): Do not save the
layer flush time here, it's done in layerFlushTimerFired() so that
we don't need to keep it as a member.
(WebKit::LayerTreeHostGtk::scheduleLayerFlush): Use global
layerFlushTimerPriority.
* WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
2014-12-10 Jaehun Lim <ljaehun.lim@samsung.com>
[CMake] Fix build after WebStorageNamespaceProvider
Unreviewed, fix build.
* CMakeLists.txt: Add WebStorageNamespaceProvider.cpp to the source list.
2014-12-10 Sanghyup Lee <sh53.lee@samsung.com>
Build fix for EFL and GTK ports since r177104
https://bugs.webkit.org/show_bug.cgi?id=139513
Reviewed by Tim Horton.
Moved WebPageProxy::installViewStateChangeCompletionHandler in PLATFORM(MAC) macro.
* UIProcess/WebPageProxy.cpp:
* UIProcess/WebPageProxy.h:
2014-12-10 Anders Carlsson <andersca@apple.com>
Switch WebKit2 over to using the storage namespace provider
https://bugs.webkit.org/show_bug.cgi?id=139509
Reviewed by Tim Horton.
* WebProcess/Storage/StorageNamespaceImpl.cpp:
(WebKit::StorageNamespaceImpl::createLocalStorageNamespace):
(WebKit::StorageNamespaceImpl::~StorageNamespaceImpl):
(WebKit::localStorageNamespaceMap): Deleted.
Get rid of the storage namespace map - we have a map inside WebStorageNamespaceProvider now.
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::createStorageStrategy):
(WebKit::WebPlatformStrategies::populatePluginCache): Deleted.
(WebKit::WebPlatformStrategies::localStorageNamespace): Deleted.
(WebKit::WebPlatformStrategies::transientLocalStorageNamespace): Deleted.
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:
Get rid of the storage strategy.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
Set a storage namespace provider.
2014-12-10 Beth Dakin <bdakin@apple.com>
Follow-up build fix.
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:context:configuration:webView:]):
2014-12-09 Jon Honeycutt <jhoneycutt@apple.com>
Null dereference performing a "TapAndAHalf" gesture in Google search field
<https://bugs.webkit.org/show_bug.cgi?id=139506>
<rdar://problem/19028828>
Reviewed by Darin Adler.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::selectWithGesture):
Add a null check in the case that there is no word range for the
current position.
2014-12-10 Beth Dakin <bdakin@apple.com>
Speculative build fix.
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:context:configuration:webView:]):
2014-12-10 Beth Dakin <bdakin@apple.com>
WK2: Add initial support for immediate actions
https://bugs.webkit.org/show_bug.cgi?id=139511
Reviewed by Tim Horton.
New enum to track immediate action types as we add them.
* Shared/API/c/WKImmediateActionTypes.h: Added.
Create an NSImmediateActionGestureRecognizer if possible and a controller.
* UIProcess/API/mac/WKView.mm:
(-[WKView dealloc]):
(-[WKView initWithFrame:context:configuration:webView:]):
(-[WKView _didPerformActionMenuHitTest:userData:]):
This basic implementation of the controller will use the delegate methods to
perform an ActionMenuHitTest when relevant. Future patches will patch
_updateImmediateActionItem to use the hit test result to determine if there is any
immediate action that should be taken.
* UIProcess/mac/WKImmediateActionController.h: Added.
* UIProcess/mac/WKImmediateActionController.mm: Added.
(-[WKImmediateActionController willDestroyView:]):
(-[WKImmediateActionController _clearImmediateActionState]):
(-[WKImmediateActionController didPerformActionMenuHitTest:userData:]):
Does much of the work done in Action Menus prepareForMenu.
(-[WKImmediateActionController immediateActionRecognizerWillPrepare:]):
Does much of the work done in Action Menus menuNeedsUpdate.
(-[WKImmediateActionController immediateActionRecognizerWillBeginAnimation:]):
Does much of the work done in Action Menus didCloseMenu.
(-[WKImmediateActionController immediateActionRecognizerDidCancelAnimation:]):
Does much of the work done in Action Menus willOpenMenu.
(-[WKImmediateActionController immediateActionRecognizerDidCompleteAnimation:]):
To be filled in.
(-[WKImmediateActionController _updateImmediateActionItem]):
* WebKit2.xcodeproj/project.pbxproj:
2014-12-10 Timothy Horton <timothy_horton@apple.com>
Should have copy and paste items in all text menus
https://bugs.webkit.org/show_bug.cgi?id=139510
<rdar://problem/19198388>
Reviewed by Beth Dakin.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _defaultMenuItemsForText]):
Add a disabled paste menu item into the read-only text menu.
(-[WKActionMenuController _defaultMenuItemsForWhitespaceInEditableArea]):
Add a disabled copy menu item into the editable whitespace text menu.
2014-12-10 Martin Hock <mhock@apple.com>
[iOS] Add setting to ignore viewport scaling constraints
https://bugs.webkit.org/show_bug.cgi?id=139466
<rdar://problem/19200328>
Reviewed by Benjamin Poulain.
* Shared/WebPreferencesDefinitions.h: Add ignoreViewportScalingConstraints preference.
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetIgnoreViewportScalingConstraints):
(WKPreferencesGetIgnoreViewportScalingConstraints):
* UIProcess/API/C/WKPreferencesRef.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
2014-12-10 Timothy Horton <timothy_horton@apple.com>
Fix the build.
* UIProcess/API/mac/WKView.mm:
(-[WKView _targetWindowForMovePreparation]):
2014-12-10 Timothy Horton <timothy_horton@apple.com>
Provide SPI to asynchronously move a WKView into a window and know when it has painted
https://bugs.webkit.org/show_bug.cgi?id=139460
<rdar://problem/19135389>
Reviewed by Anders Carlsson.
* UIProcess/API/Cocoa/WKViewPrivate.h:
Add _prepareForMoveToWindow:withCompletionHandler:, which internally
goes through the motions of being parented in that window and calls
the completion handler once painting is done and the view is ready
to be displayed (upon which we expect the view to actually move into the window).
* UIProcess/API/mac/WKView.mm:
(-[WKView viewWillMoveToWindow:]):
If we currently have a _targetWindowForMovePreparation (and are
pretending to be in that window), avoid performing viewWillMoveToWindow:
for a different window.
(-[WKView viewDidMoveToWindow]):
(-[WKView doWindowDidChangeScreen]):
(-[WKView _intrinsicDeviceScaleFactor]):
(-[WKView _colorSpace]):
(-[WKView _targetWindowForMovePreparation]):
If we have a _targetWindowForMovePreparation, use its properties instead
of self.window's.
(-[WKView _prepareForMoveToWindow:withCompletionHandler:]):
Simulate a move into the target window, but defer sending the view state update.
Then, send the view state update after registering the completion handler.
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
Rename m_viewStateChangeWantsReply to m_viewStateChangeWantsSynchronousReply.
(WebKit::WebPageProxy::installViewStateChangeCompletionHandler):
Added. Allow installing a block that will be called the next time
we get a didUpdateViewState back from the WebProcess after pushing the
current view state changes.
(WebKit::WebPageProxy::viewStateDidChange):
Adapt to the aforementioned rename.
(WebKit::WebPageProxy::dispatchViewStateChange):
Adapt to the aforementioned rename.
Send the view state change callback IDs along with SetViewState.
(WebKit::WebPageProxy::updateViewState):
Adapt to the aforementioned rename.
* UIProcess/WebPageProxy.h:
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::activeWindow):
(WebKit::PageClientImpl::isViewWindowActive):
(WebKit::PageClientImpl::isViewVisible):
(WebKit::PageClientImpl::isViewVisibleOrOccluded):
(WebKit::PageClientImpl::isViewInWindow):
(WebKit::PageClientImpl::viewLayerHostingMode):
If we have a _targetWindowForMovePreparation, use its properties instead
of the WKView's window's.
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::viewStateDidChange):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::reinitializeWebPage):
(WebKit::WebPage::setViewState):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::viewStateDidChange):
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::viewStateDidChange):
Push the callback IDs to the WebProcess, and accumulate them in TiledCoreAnimationDrawingArea.
(WebKit::TiledCoreAnimationDrawingArea::didUpdateViewStateTimerFired):
Call all of the callbacks after one runloop cycle, just like DidUpdateViewState.
2014-12-10 Anders Carlsson <andersca@apple.com>
Add session storage handling to StorageNamespaceProvider
https://bugs.webkit.org/show_bug.cgi?id=139507
Reviewed by Tim Horton.
* WebProcess/Storage/StorageNamespaceImpl.cpp:
(WebKit::StorageNamespaceImpl::createSessionStorageNamespace):
* WebProcess/Storage/StorageNamespaceImpl.h:
* WebProcess/Storage/WebStorageNamespaceProvider.cpp:
(WebKit::WebStorageNamespaceProvider::createSessionStorageNamespace):
* WebProcess/Storage/WebStorageNamespaceProvider.h:
2014-12-10 Anders Carlsson <andersca@apple.com>
Implement the rest of the transient local storage namespace code
https://bugs.webkit.org/show_bug.cgi?id=139505
Reviewed by Tim Horton.
* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::TransientLocalStorageNamespace::create):
(WebKit::StorageManager::TransientLocalStorageNamespace::~TransientLocalStorageNamespace):
(WebKit::StorageManager::TransientLocalStorageNamespace::getOrCreateStorageArea):
(WebKit::StorageManager::TransientLocalStorageNamespace::clearStorageAreasMatchingOrigin):
(WebKit::StorageManager::TransientLocalStorageNamespace::clearAllStorageAreas):
(WebKit::StorageManager::TransientLocalStorageNamespace::TransientLocalStorageNamespace):
Introduce a new TransientLocalStorageNamespace that's just a glorified SecurityOrigin -> StorageArea HashMap.
(WebKit::StorageManager::StorageArea::create):
Change the return type to RefPtr.
(WebKit::StorageManager::deleteEntriesForOrigin):
(WebKit::StorageManager::deleteAllEntries):
(WebKit::StorageManager::deleteLocalStorageOriginsModifiedSince):
Use lambdas instead of bind. Delete the transient local storage as well.
(WebKit::StorageManager::createTransientLocalStorageMap):
Get a transient local storage namespace and ask it for a storage area.
(WebKit::StorageManager::getOrCreateTransientLocalStorageNamespace):
Look up the namespace from the map and create one if it doesn't exist.
(WebKit::StorageManager::deleteEntriesForOriginInternal): Deleted.
(WebKit::StorageManager::deleteAllEntriesInternal): Deleted.
* UIProcess/Storage/StorageManager.h:
2014-12-10 Anders Carlsson <andersca@apple.com>
Begin fixing transient local storage handling
https://bugs.webkit.org/show_bug.cgi?id=139503
Reviewed by Sam Weinig.
* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::createTransientLocalStorageMap):
* UIProcess/Storage/StorageManager.h:
Add empty stub implementation of createTransientLocalStorageMap.
* UIProcess/Storage/StorageManager.messages.in:
Add CreateTransientLocalStorageMap message.
* WebProcess/Storage/StorageAreaMap.cpp:
(WebKit::StorageAreaMap::StorageAreaMap):
If we have a local storage namespace with a non-null top-level origin, create a
transient local storage map.
* WebProcess/Storage/StorageNamespaceImpl.cpp:
(WebKit::StorageNamespaceImpl::createLocalStorageNamespace):
Pass a null top-level origin to the StorageNamespaceImpl constructor.
(WebKit::StorageNamespaceImpl::createTransientLocalStorageNamespace):
Create a new StorageNamespaceImpl, passing the top-level origin to the constructor.
(WebKit::StorageNamespaceImpl::createSessionStorageNamespace):
Pass a null top-level origin to the StorageNamespaceImpl constructor.
(WebKit::StorageNamespaceImpl::StorageNamespaceImpl):
Add a top-level origin parameter.
* WebProcess/Storage/StorageNamespaceImpl.h:
(WebKit::StorageNamespaceImpl::topLevelOrigin):
Add top-level origin member and getter.
* WebProcess/Storage/WebStorageNamespaceProvider.cpp:
(WebKit::WebStorageNamespaceProvider::createTransientLocalStorageNamespace):
Call StorageNamespaceImpl::createTransientLocalStorageNamespace.
2014-12-10 Anders Carlsson <andersca@apple.com>
Implement WebStorageNamespaceProvider::createLocalStorageNamespace
https://bugs.webkit.org/show_bug.cgi?id=139498
Reviewed by Beth Dakin.
* WebProcess/Storage/StorageNamespaceImpl.cpp:
(WebKit::StorageNamespaceImpl::createLocalStorageNamespace):
Add a new overload that takes an identifier + quota. Have the old overload call the new one.
* WebProcess/Storage/StorageNamespaceImpl.h:
Add new member.
* WebProcess/Storage/WebStorageNamespaceProvider.cpp:
(WebKit::WebStorageNamespaceProvider::createLocalStorageNamespace):
Call StorageNamespaceImpl::createLocalStorageNamespace.
2014-12-10 Anders Carlsson <andersca@apple.com>
Add a stubbed out WebStorageNamespaceProvider class to WebKit2
https://bugs.webkit.org/show_bug.cgi?id=139497
Reviewed by Beth Dakin.
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/Storage/WebStorageNamespaceProvider.cpp: Added.
(WebKit::storageNamespaceProviders):
(WebKit::WebStorageNamespaceProvider::getOrCreate):
(WebKit::WebStorageNamespaceProvider::WebStorageNamespaceProvider):
(WebKit::WebStorageNamespaceProvider::~WebStorageNamespaceProvider):
(WebKit::WebStorageNamespaceProvider::createLocalStorageNamespace):
(WebKit::WebStorageNamespaceProvider::createTransientLocalStorageNamespace):
* WebProcess/Storage/WebStorageNamespaceProvider.h: Added.
2014-12-10 Enrica Casucci <enrica@apple.com>
Fix iOS builders for 8.0
https://bugs.webkit.org/show_bug.cgi?id=139495
Reviewed by Eric Carlson.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _mayAutomaticallyShowVideoOptimized]):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::reattachToWebProcess):
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
2014-12-10 Julien Isorce <j.isorce@samsung.com>
[GTK] Enable depth 32 for the RedirectedXCompositeWindow
https://bugs.webkit.org/show_bug.cgi?id=139028
On gtk/X11, the layout compositing is done in the web process.
If one needs to handle alpha with the rest of the application
then it is not enough to make to browser's window as RGBA.
The shared redirected window needs to be RGBA as well.
(The shared X composite window between UIProcess and WebProcess).
This allows an end-to-end RGBA solution when the application
wants to interact with the alpha channel at compositing time.
For example for transparent Web UI.
Reviewed by Martin Robinson.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseRealize):
(webkitWebViewBaseConstructed):
(webkitWebViewRenderAcceleratedCompositingResults):
(webkitWebViewBaseUpdatePreferences):
(webkitWebViewBaseCreateWebPage):
* UIProcess/gtk/RedirectedXCompositeWindow.cpp:
(WebKit::RedirectedXCompositeWindow::create):
(WebKit::RedirectedXCompositeWindow::RedirectedXCompositeWindow):
* UIProcess/gtk/RedirectedXCompositeWindow.h:
2014-12-09 Claudio Saavedra <csaavedra@igalia.com> and Gustavo Noronha Silva <gustavo.noronha@collabora.com>
[GTK][WK2] Add HTML5 Notifications support
https://bugs.webkit.org/show_bug.cgi?id=61140
Reviewed by Carlos Garcia Campos.
* PlatformGTK.cmake: add new files to the build.
* UIProcess/API/gtk/WebKitForwardDeclarations.h:
* UIProcess/API/gtk/WebKitNotification.cpp: Added. New GObject used to expose information about
the notification to the API.
(webkitNotificationGetProperty):
(webkit_notification_class_init):
(webkitNotificationCreate):
(webkit_notification_get_id):
(webkit_notification_get_title):
(webkit_notification_get_body):
* UIProcess/API/gtk/WebKitNotification.h: Added.
* UIProcess/API/gtk/WebKitNotificationPermissionRequest.cpp: Added. Permission request object
for notifications.
(webkitNotificationPermissionRequestAllow):
(webkitNotificationPermissionRequestDeny):
(webkit_permission_request_interface_init):
(webkitNotificationPermissionRequestDispose):
(webkit_notification_permission_request_class_init):
(webkitNotificationPermissionRequestCreate):
* UIProcess/API/gtk/WebKitNotificationPermissionRequest.h: Added.
* UIProcess/API/gtk/WebKitNotificationPermissionRequestPrivate.h: Added.
* UIProcess/API/gtk/WebKitNotificationPrivate.h: Added.
* UIProcess/API/gtk/WebKitNotificationProvider.cpp: Added. Notification provider that emits signals.
The C API allows overriding the notification providers and managers for customizing the handling of
notifications. We decided to go for a single manager and a single provider which provide more idiomatic
GObject API - signals.
(toNotificationProvider):
(showCallback):
(cancelCallback):
(WebKitNotificationProvider::~WebKitNotificationProvider):
(WebKitNotificationProvider::create):
(WebKitNotificationProvider::WebKitNotificationProvider):
(WebKitNotificationProvider::show):
(WebKitNotificationProvider::cancel):
* UIProcess/API/gtk/WebKitNotificationProvider.h: Added.
* UIProcess/API/gtk/WebKitUIClient.cpp: implemented decidePolicyForNotificationPermissionRequest.
* UIProcess/API/gtk/WebKitWebContext.cpp:
(webkitWebContextConstructed): initialize the notification provider.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewShowNotification): default implementation for showing the notification, currently
using GNotification, about to be ported to libnotify.
(webkit_web_view_class_init): set the default implementation for the show-notification signal.
(webkitWebViewEmitCloseNotification): emit the close-notification signal.
(webkitWebViewEmitShowNotification): emit the show-notification signal.
* UIProcess/API/gtk/WebKitWebView.h:
* UIProcess/API/gtk/WebKitWebViewPrivate.h:
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: list new objects and methods.
* UIProcess/API/gtk/webkit2.h: include new headers.
2014-12-10 Grzegorz Czajkowski <g.czajkowski@samsung.com>
[EFL][[WK2] test_ewk2_text_checker is failed
https://bugs.webkit.org/show_bug.cgi?id=132982
Reviewed by Gyuyoung Kim.
Insert misspelled word to the input field using execCommand instead of
input.value attribute change which stops spell check, tracked by
https://bugs.webkit.org/show_bug.cgi?id=139473.
Since text checker API tests do not verify spellchecker itself (it's being
tested by LayoutTests/editing/spelling) but rather opportunity for overriding
its functionality this patch unskips those tests in order to API coverage.
* PlatformEfl.cmake:
Unskip test_ewk2_text_checker
* UIProcess/API/efl/tests/resources/spelling_test.html:
Use document.execCommand("InsertText", false, "aa ") instead of
input.value = "aa " to trigger spellchecker.
2014-12-10 Carlos Alberto Lopez Perez <clopez@igalia.com>
REGRESSION(r177038): [SOUP] [GTK] Debug build broken
https://bugs.webkit.org/show_bug.cgi?id=139475
Reviewed by Martin Robinson.
* NetworkProcess/soup/NetworkProcessSoup.cpp:
(WebKit::NetworkProcess::clearCacheForAllOrigins): Call clearDiskCache().
(WebKit::NetworkProcess::clearDiskCache): Implement this for SOUP.
SoupCache don't seems to have API for clearing a part of the cache,
so add a FIXME note regarding that.
2014-12-09 Csaba Osztrogonác <ossy@webkit.org>
URTBF after r177032.
* CMakeLists.txt:
2014-12-09 Alexey Proskuryakov <ap@apple.com>
Kotoeri sometimes doesn't correctly process the first chanaracter in a text field in Safari 7.1 or 6.2
https://bugs.webkit.org/show_bug.cgi?id=139459
rdar://problem/19017432
rdar://problem/19036869
Reviewed by Enrica Casucci.
When inputContext changes, notify the application. We already did this when the context
changed due to plug-ins, and this used to sort of make it work on on yahoo.co.jp,
which has plug-ins. But that was quite unreliable, as evidenced by the reproducible
cases where we didn't use an input method for the first keypress.
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::editorStateChanged):
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::notifyApplicationAboutInputContextChange):
2014-12-09 Jeremy Jones <jeremyj@apple.com>
Enable automatic optimized fullscreen mode.
https://bugs.webkit.org/show_bug.cgi?id=139437
Reviewed by Simon Fraser.
Anticipate the automatic transition to optimized video fullscreen mode when deciding if the page is visible.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _isShowingVideoOptimized]): Renamed. Test precondition.
(-[WKWebView _mayAutomaticallyShowVideoOptimized]): Added.
(-[WKWebView _isPlayingFullscreenOptimizedVideo]): Deleted.
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::isViewVisible): Test for optimized modes even when not in a window.
2014-12-09 Anders Carlsson <andersca@apple.com>
Add support for clearing the disk cache
https://bugs.webkit.org/show_bug.cgi?id=139458
Reviewed by Antti Koivisto.
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::deleteWebsiteData):
If we're asked to clear the disk cache, do so. Clearing the cache is asynchronous,
so we make sure not to call the completion handler right away in that case.
* NetworkProcess/NetworkProcess.h:
Add clearDiskCache member function.
* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::clearDiskCache):
Clear the disk cache, then call the completion handler.
* NetworkProcess/mac/NetworkProcessMac.mm:
(WebKit::NetworkProcess::clearCacheForAllOrigins):
Call the new clearDiskCache function.
* Shared/WebsiteData/WebsiteDataTypes.h:
Add WebsiteDataTypeDiskCache.
* UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
* UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
(toWebsiteDataTypes):
Handle WKWebsiteDataTypeDiskCache.
2014-12-09 Myles C. Maxfield <mmaxfield@apple.com>
Delete Node::boundingBox()
https://bugs.webkit.org/show_bug.cgi?id=139333
Reviewed by Zalan Bujtas.
* Shared/WebHitTestResult.cpp:
(WebKit::WebHitTestResult::Data::elementBoundingBoxInWindowCoordinates):
Use RenderObject::absoluteBoundingBoxRect().
* WebProcess/WebPage/CoordinatedGraphics/WebPageCoordinatedGraphics.cpp:
(WebKit::WebPage::findZoomableAreaForPoint): Use
RenderObject::absoluteBoundingBoxRect().
2014-12-09 Chris Dumez <cdumez@apple.com>
[WK2] Crash when answering notification permission request after navigating
https://bugs.webkit.org/show_bug.cgi?id=139429
<rdar://problem/18921122>
Reviewed by Andreas Kling.
When requesting a notification permission, navigating away and then
answering the permission, WebKit2 would crash. This is because upon
navigating, the request is cancelled and removed from the HashMaps
in NotificationPermissionRequestManager. When
didReceiveNotificationPermissionDecision() is later called, it would
look for the request identifier in m_idToOriginMap HashMap. As the
request was cancelled, HashMap::take() call would return null for
the SecurityOrigin*. This security origin pointer is then removed
from m_originToIDMap, but the code was failing to do a null check
first. Calling HashMap::remove(nullptr) would then crash.
This patch adds the missing null check and a layout test to cover
this case.
Test: http/tests/notifications/legacy/notification-request-permission-then-navigate.html
* WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
(WebKit::NotificationPermissionRequestManager::didReceiveNotificationPermissionDecision):
2014-12-09 Anders Carlsson <andersca@apple.com>
Implement clearing of cookies
https://bugs.webkit.org/show_bug.cgi?id=139455
Reviewed by Andreas Kling.
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::deleteWebsiteData):
Handle deleting cookies by finding the right network storage session and deleting the cookies from it.
Then, send a DidDeleteWebsiteData message back.
* NetworkProcess/NetworkProcess.h:
Add new members.
* NetworkProcess/NetworkProcess.messages.in:
Add new DeleteWebsiteData message.
* Shared/WebsiteData/WebsiteDataTypes.h:
Move the website data types enum to its own file so it can be shared.
* UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
(toWebsiteDataTypes):
Update now that WebsiteDataTypes is its own enum.
(-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
removeDataModifiedSince was renamed to removeData.
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::generateCallbackID):
Helper function to create a callback ID.
(WebKit::NetworkProcessProxy::~NetworkProcessProxy):
Assert that we have no pending callbacks.
(WebKit::NetworkProcessProxy::deleteWebsiteData):
Put the completion handler in our map and message the network process.
(WebKit::NetworkProcessProxy::networkProcessCrashedOrFailedToLaunch):
Call all completion handlers.
(WebKit::NetworkProcessProxy::didDeleteWebsiteData):
Grab the completion handler and call it.
* UIProcess/Network/NetworkProcessProxy.h:
Add new members.
* UIProcess/Network/NetworkProcessProxy.messages.in:
Add DidDeleteWebsiteData callback.
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::computeNetworkProcessAccessType):
Helper function that computes the type of process access we'd need for the given mask of
website data types.
(WebKit::WebsiteDataStore::removeData):
Gather all the network processes and message them. Use a callback aggregator object to track callbacks
so we'll call the completion handler once all callbacks have been invoked.
* UIProcess/WebsiteData/WebsiteDataStore.h:
Move WebsiteDataTypes to its own file.
* WebKit2.xcodeproj/project.pbxproj:
Add new files.
2014-12-09 Anders Carlsson <andersca@apple.com>
Give WebsiteDataStore a unique ID
https://bugs.webkit.org/show_bug.cgi?id=139448
Reviewed by Andreas Kling.
* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::creationParameters):
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::generateIdentifier):
(WebKit::WebsiteDataStore::WebsiteDataStore):
* UIProcess/WebsiteData/WebsiteDataStore.h:
(WebKit::WebsiteDataStore::identifier):
2014-12-09 Anders Carlsson <andersca@apple.com>
Build fix.
* UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
2014-12-09 Ting-Wei Lan <lantw44@gmail.com>
[GTK] LDFLAGS is ignored when running g-ir-scanner
https://bugs.webkit.org/show_bug.cgi?id=138832
Reviewed by Carlos Garcia Campos.
GTK+ requires libintl on FreeBSD because there is no gettext
implementation in FreeBSD libc. In order to link to libintl, which is
not located in the default search path of the linker, we need to add
the required path via the linker command line. However, LDFLAGS is
ignored when running g-ir-scanner starting from r167873, so we have
to manually pick required flags from CMAKE_SHARED_LINKER_FLAGS and
put them in correct order to prevent g-ir-scanner from linking to
the installed version of libraries.
* PlatformGTK.cmake:
2014-12-09 Jeremy Jones <jeremyj@apple.com>
Enable activating optimized fullscreen mode from standard fulscreen mode.
https://bugs.webkit.org/show_bug.cgi?id=139137
Reviewed by Simon Fraser.
Going from standard fullscreen mode to optimized fullscreen mode requires the ability to
update the fullscreen mode and a new standard-and-optimized-fullscreen mode.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _isPlayingFullscreenOptimizedVideo]):
Treat new standard-and-optimized as a kind of optimized.
* UIProcess/ios/WebVideoFullscreenManagerProxy.h: IPC fullscreen mode changes
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm: ditto
(WebKit::WebVideoFullscreenManagerProxy::fullscreenModeChanged): dito
* WebProcess/ios/WebVideoFullscreenManager.h: ditto
* WebProcess/ios/WebVideoFullscreenManager.messages.in: ditto
* WebProcess/ios/WebVideoFullscreenManager.mm: dito
(WebKit::WebVideoFullscreenManager::WebVideoFullscreenManager): ditto
(WebKit::WebVideoFullscreenManager::setFullscreenModeChanged): ditto
2014-12-08 Jaehun Lim <ljaehun.lim@samsung.com>
[EFL] Use DependenciesEFL instead of Dependencies
Unreviewed, fix simple typo.
* PlatformEfl.cmake:
2014-12-08 Beth Dakin <bdakin@apple.com>
Copy and Lookup menu items should be disabled when something is not copyable
https://bugs.webkit.org/show_bug.cgi?id=139423
Reviewed by Tim Horton.
Add allowsCopy to the WebHitTestResult.
* Shared/WebHitTestResult.cpp:
(WebKit::WebHitTestResult::Data::Data):
(WebKit::WebHitTestResult::Data::encode):
(WebKit::WebHitTestResult::Data::decode):
* Shared/WebHitTestResult.h:
(WebKit::WebHitTestResult::allowsCopy):
Set autoenablesItems to NO. Its messing with our ability to control the enable/
disable state otherwise.
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:context:configuration:webView:]):
Disable both lookup and copy when a WebHitTestResult does not allow copy.
* UIProcess/mac/WKActionMenuController.mm:
2014-12-08 Dan Bernstein <mitz@apple.com>
<rdar://problem/18905383> [iOS] Crash due to null m_webPageProxyForBackForwardListForCurrentSwipe in ViewGestureController::endSwipeGesture
https://bugs.webkit.org/show_bug.cgi?id=138750
Reviewed by Tim Horton.
The snapshot for the current gesture was being removed mid-gesture by the callback from
dispatchAfterEnsuringDrawing scheduled by the previous gesture. The fix is to ignore the
callback for a gesture if it is made after the snapshot for that gesture has already been
removed (which can happen as a result of the watchdog timer firing).
* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::ViewGestureController): Initialize new member variable.
(WebKit::addLogEntry): Fixed the log message format.
(WebKit::ViewGestureController::endSwipeGesture): When dispatchAfterEnsuringDrawing() calls
us back, bail out if the gesture snapshot has already been removed.
(WebKit::ViewGestureController::removeSwipeSnapshot): Increment
m_gesturePendingSnapshotRemoval.
* UIProcess/mac/ViewGestureController.h: Added m_gesturePendingSnapshotRemoval member
variable.
2014-12-08 Anders Carlsson <andersca@apple.com>
The website data store should know all its associated pages
https://bugs.webkit.org/show_bug.cgi?id=139411
Reviewed by Tim Horton.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::close):
* UIProcess/WebPageProxy.h:
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::~WebsiteDataStore):
(WebKit::WebsiteDataStore::addWebPage):
(WebKit::WebsiteDataStore::removeWebPage):
* UIProcess/WebsiteData/WebsiteDataStore.h:
2014-12-08 Dan Bernstein <mitz@apple.com>
<rdar://problem/18046692> [iOS] Safari crashes at -[_NSUndoStack popAndInvoke] when trying to undo typing on closed tab
https://bugs.webkit.org/show_bug.cgi?id=139408
Reviewed by Anders Carlsson.
* UIProcess/ios/WKContentView.mm:
(-[WKContentView undoManager]): Override to initialize if necessary and return a unique undo
manager for this instance. This ensures that undoable operations for this webview dont get
put in other undo managers, and matches UIWebView behavior.
2014-12-08 Chris Dumez <cdumez@apple.com>
Revert r176293 & r176275
Unreviewed, revert r176293 & r176275 changing the Vector API to use unsigned type
instead of size_t. There is some disagreement regarding the long-term direction
of the API and we shouldnt leave the API partly transitioned to unsigned type
while making a decision.
* Platform/IPC/ArgumentCoders.h:
* Platform/IPC/DataReference.h:
2014-12-08 Anders Carlsson <andersca@apple.com>
Make deleting all cookies after a given date a little more sane
https://bugs.webkit.org/show_bug.cgi?id=139409
Reviewed by Antti Koivisto.
Change all the doubles to std::chrono::system_clock::time_points instead.
* Platform/IPC/ArgumentCoders.cpp:
(IPC::ArgumentCoder<std::chrono::system_clock::time_point>::encode):
(IPC::ArgumentCoder<std::chrono::system_clock::time_point>::decode):
* Platform/IPC/ArgumentCoders.h:
* Scripts/webkit/messages.py:
(headers_for_type):
* UIProcess/API/C/WKCookieManager.cpp:
(WKCookieManagerDeleteAllCookiesModifiedAfterDate):
* UIProcess/API/C/WKCookieManager.h:
* UIProcess/WebCookieManagerProxy.cpp:
(WebKit::WebCookieManagerProxy::deleteAllCookiesModifiedSince):
(WebKit::WebCookieManagerProxy::deleteAllCookiesModifiedAfterDate): Deleted.
* UIProcess/WebCookieManagerProxy.h:
* WebProcess/Cookies/WebCookieManager.cpp:
(WebKit::WebCookieManager::deleteAllCookiesModifiedSince):
(WebKit::WebCookieManager::deleteAllCookiesModifiedAfterDate): Deleted.
* WebProcess/Cookies/WebCookieManager.h:
* WebProcess/Cookies/WebCookieManager.messages.in:
2014-12-08 Anders Carlsson <andersca@apple.com>
Move the callback invocation outside of the loop.
Rubber-stamped by Tim Horton.
* UIProcess/WebKeyValueStorageManager.cpp:
(WebKit::WebKeyValueStorageManager::getStorageDetailsByOrigin):
2014-12-08 Anders Carlsson <andersca@apple.com>
Add a stub implementation of WebsiteDataStore::removeDataModifiedSince
https://bugs.webkit.org/show_bug.cgi?id=139406
Reviewed by Antti Koivisto.
Change _WKWebsiteDataStore to call the newly added function.
* UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
(toWebsiteDataTypes):
(toSystemClockTime):
(-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::removeDataModifiedSince):
* UIProcess/WebsiteData/WebsiteDataStore.h:
2014-12-08 Gwang Yoon Hwang <yoon@igalia.com>
[GTK] Let DrawingArea manages setAcceleratedCompositingWindowId
https://bugs.webkit.org/show_bug.cgi?id=117230
Reviewed by Anders Carlsson.
This is a preparation patch for Threaded Coordinated Graphics.
LayerTreeHostGtk uses a native window handle to make glContext for
accelerated compositing. Therefore it is natural for DrawingArea to take
responsibility for the native window handle. And, in Coordinated
Graphics case, WebPage creates LayerTreeHost before receiving a native
window handle from UIProcess. It means we need a method to pass the
native window handle to already created LayerTreeHost.
This patch uses DrawingAreaProxy::setNativeSurfaceHandleForCompositing
instead of WebCoreProxy::setAcceleratedCompositingWindowId to set window
ID for accelerated compositing.
Also, this patch renames the setAcceleratedCompositingWindowId with a
more generic name, setNativeSurfaceHandleForCompositing.
No new tests. No change in functionality.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseCreateWebPage):
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::setNativeSurfaceHandleForCompositing):
* UIProcess/DrawingAreaProxyImpl.h:
* UIProcess/WebPageProxy.h:
* UIProcess/gtk/WebPageProxyGtk.cpp:
(WebKit::WebPageProxy::setAcceleratedCompositingWindowId): Deleted.
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::nativeSurfaceHandleForCompositing):
* WebProcess/WebPage/DrawingArea.messages.in:
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::setNativeSurfaceHandleForCompositing):
* WebProcess/WebPage/DrawingAreaImpl.h:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
(WebKit::LayerTreeHostGtk::glContext):
(WebKit::LayerTreeHostGtk::initialize):
* WebProcess/WebPage/gtk/WebPageGtk.cpp:
(WebKit::WebPage::platformInitialize):
(WebKit::WebPage::setAcceleratedCompositingWindowId): Deleted.
2014-12-08 Philippe Normand <pnormand@igalia.com>
[GTK] UserMedia Permission Request API
https://bugs.webkit.org/show_bug.cgi?id=136449
Reviewed by Carlos Garcia Campos.
* PlatformGTK.cmake: GTK-specific new files.
* UIProcess/API/gtk/WebKitUIClient.cpp: DecidePolicy handler
implementation for UserMediaPermissionRequest.
* UIProcess/API/gtk/WebKitUserMediaPermissionRequest.cpp: Added,
WebKitGTK API for UserMediaPermissionRequest, very similar to the
one used for Geolocation.
(webkitUserMediaPermissionRequestAllow):
(webkitUserMediaPermissionRequestDeny):
(webkit_permission_request_interface_init):
(webkitUserMediaPermissionRequestDispose):
(webkit_user_media_permission_get_media_types):
(webkitUserMediaPermissionRequestGetProperty):
(webkit_user_media_permission_request_class_init):
(webkitUserMediaPermissionRequestCreate):
* UIProcess/API/gtk/WebKitUserMediaPermissionRequest.h: Added.
* UIProcess/API/gtk/WebKitUserMediaPermissionRequestPrivate.h: Added.
* UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Expose new API
in documentation.
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Ditto.
* UIProcess/API/gtk/webkit2.h: Expose UserMediaPermissionRequest API.
2014-12-08 Anders Carlsson <andersca@apple.com>
Add a stubbed out method for clearing out the website data store
https://bugs.webkit.org/show_bug.cgi?id=139404
Reviewed by Antti Koivisto.
Add stubbed out method that just calls the completion handler.
* UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
* UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
(-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
2014-12-06 Antti Koivisto <antti@apple.com>
REGRESSION (173394): Support for webcam is broken
https://bugs.webkit.org/show_bug.cgi?id=139313
Reviewed by Alexey Proskuryakov.
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::didReceiveResponseAsync):
Don't buffer when handling multipart/x-mixed-replace. Multiple calls to didReceiveResponseAsync break assumptions.
2014-12-08 Gwang Yoon Hwang <yoon@igalia.com>
[CoordinatedGraphics] Move CoordinatedBackingStore and CoordinatedGraphicsScene to Shared
https://bugs.webkit.org/show_bug.cgi?id=139385
Reviewed by Martin Robinson.
For the Threaded Compositor, CoordinatedBackingStore and
CoordinatedGraphicsScene should be placed at the Shared instead of
UIProcess because it can be used in the WebProcess also.
No new tests because there is no behavior change.
* PlatformEfl.cmake:
* Shared/CoordinatedGraphics/CoordinatedBackingStore.cpp: Renamed from Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp.
* Shared/CoordinatedGraphics/CoordinatedBackingStore.h: Renamed from Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedBackingStore.h.
* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp: Renamed from Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedGraphicsScene.cpp.
* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h: Renamed from Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedGraphicsScene.h.
2014-12-08 Shivakumar JM <shiva.jm@samsung.com>
Fix build warning in WebKit2/UIProcess module.
https://bugs.webkit.org/show_bug.cgi?id=139386
Reviewed by Alexey Proskuryakov.
Fix build warning by removing unused parameter name from function
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::WebsiteDataStore):
2014-12-07 Gwang Yoon Hwang <yoon@igalia.com>
[CoordinatedGraphics] Change the namespace of CoordinatedBackingStore and CoordinatedGraphicsScene
https://bugs.webkit.org/show_bug.cgi?id=139372
Reviewed by Gyuyoung Kim.
CoordinatedBackingStore and CoordinatedGraphicsScene should be declared in the WebKit namespace
instead of WebCore namespace.
* UIProcess/API/CoordinatedGraphics/WKCoordinatedScene.cpp:
* UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp:
* UIProcess/CoordinatedGraphics/CoordinatedBackingStore.h:
(WebKit::CoordinatedBackingStoreTile::CoordinatedBackingStoreTile):
(WebKit::CoordinatedBackingStore::rect):
(WebCore::CoordinatedBackingStoreTile::CoordinatedBackingStoreTile): Deleted.
(WebCore::CoordinatedBackingStore::rect): Deleted.
* UIProcess/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
* UIProcess/CoordinatedGraphics/CoordinatedGraphicsScene.h:
(WebKit::CoordinatedGraphicsScene::setViewBackgroundColor):
(WebKit::CoordinatedGraphicsScene::viewBackgroundColor):
(WebKit::CoordinatedGraphicsScene::layerByID):
(WebKit::CoordinatedGraphicsScene::rootLayer):
(WebCore::CoordinatedGraphicsScene::setViewBackgroundColor): Deleted.
(WebCore::CoordinatedGraphicsScene::viewBackgroundColor): Deleted.
(WebCore::CoordinatedGraphicsScene::layerByID): Deleted.
(WebCore::CoordinatedGraphicsScene::rootLayer): Deleted.
* UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
(WebKit::CoordinatedLayerTreeHostProxy::coordinatedGraphicsScene):
* UIProcess/CoordinatedGraphics/WKCoordinatedSceneAPICast.h:
(WebKit::toImpl):
(WebKit::toAPI):
(toImpl): Deleted.
(toAPI): Deleted.
* UIProcess/CoordinatedGraphics/WebView.h:
2014-12-07 Dan Bernstein <mitz@apple.com>
Introduce and deploy a function that allocates and returns an instance of a soft-linked class
https://bugs.webkit.org/show_bug.cgi?id=139348
Reviewed by Anders Carlsson.
In [[getFooClass() alloc] init*], the type of the result of +alloc is id, so the compiler
picks an arbitrary declaration of init*, not necessarily the Foo one. This can then lead
to warnings or errors if the types or attributes dont match, or to runtime errors if Foo
doesnt even have the expected initializer. The new allocFooInstance() returns a Foo *, thus
avoiding the ambiguity.
* UIProcess/ios/forms/WKAirPlayRoutePicker.mm:
(-[WKAirPlayRoutePicker showAirPlayPickerIPad:fromRect:]):
(-[WKAirPlayRoutePicker showAirPlayPickerIPhone:]):
(-[WKAirPlayRoutePicker show:fromRect:]):
* UIProcess/ios/forms/WKFileUploadPanel.mm:
(-[_WKVideoFileUploadItem displayImage]):
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _defaultMenuItemsForDataDetectableLink]):
* WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
(WebKit::PlatformCALayerRemoteCustom::clone):
2014-12-06 Anders Carlsson <andersca@apple.com>
Fix build with newer versions of clang.
rdar://problem/18978733
Add missing overrides and casts.
* NetworkProcess/NetworkProcess.h:
* Shared/Downloads/DownloadAuthenticationClient.h:
(WebKit::DownloadAuthenticationClient::refAuthenticationClient): Deleted.
(WebKit::DownloadAuthenticationClient::derefAuthenticationClient): Deleted.
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageUIClient):
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration copyWithZone:]):
* UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
(-[_WKProcessPoolConfiguration copyWithZone:]):
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateLayersAfterViewportChange): Deleted.
* UIProcess/WebPageProxy.h:
* WebProcess/EntryPoint/mac/LegacyProcess/WebContentProcessMain.mm:
(WebKit::WebContentProcessMainDelegate::doPreInitializationWork): Deleted.
(WebKit::WebContentProcessMainDelegate::getConnectionIdentifier): Deleted.
(WebKit::WebContentProcessMainDelegate::getClientIdentifier): Deleted.
(WebKit::WebContentProcessMainDelegate::getClientProcessName): Deleted.
* WebProcess/IconDatabase/WebIconDatabaseProxy.h:
* WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
(WebKit::InjectedBundle::initialize):
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
* WebProcess/WebPage/WebBackForwardListProxy.h:
* WebProcess/WebPage/WebInspector.h:
(WebKit::WebInspector::didClose): Deleted.
(WebKit::WebInspector::didReceiveInvalidMessage): Deleted.
* WebProcess/WebPage/WebInspectorUI.h:
(WebKit::WebInspectorUI::didClose): Deleted.
(WebKit::WebInspectorUI::didReceiveInvalidMessage): Deleted.
* WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.h:
* WebProcess/WebProcess.h:
* WebProcess/ios/WebVideoFullscreenManager.h:
2014-12-06 Anders Carlsson <andersca@apple.com>
Only include TUCallSPI on Mac.
* Platform/mac/MenuUtilities.mm:
2014-12-06 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r176905.
https://bugs.webkit.org/show_bug.cgi?id=139337
the test case is failing in bots (Requested by anttik on
#webkit).
Reverted changeset:
"REGRESSION (173394): Support for webcam is broken"
https://bugs.webkit.org/show_bug.cgi?id=139313
http://trac.webkit.org/changeset/176905
2014-12-05 Antti Koivisto <antti@apple.com>
REGRESSION (173394): Support for webcam is broken
https://bugs.webkit.org/show_bug.cgi?id=139313
Reviewed by Alexey Proskuryakov.
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::didReceiveResponseAsync):
Don't buffer when handling multipart/x-mixed-replace. Multiple calls to didReceiveResponseAsync break assumptions.
2014-12-05 Yongjun Zhang <yongjun_zhang@apple.com>
Add a delegate method for didReceiveServerRedirectForProvisionalLoadForFrame.
https://bugs.webkit.org/show_bug.cgi?id=139325
Add delegate method webProcessPlugInBrowserContextController:didReceiveServerRedirectForProvisionalLoadForFrame: into
WKWebProcessPlugInLoadDelegate to listen to server side redirect in injected bundle.
Reviewed by Dan Bernstein.
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h:
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(didReceiveServerRedirectForProvisionalLoadForFrame):
(setUpPageLoaderClient):
2014-12-05 Csaba Osztrogonác <ossy@webkit.org>
URTBF, EFL is happy now.
* UIProcess/API/APIWebsiteDataStore.cpp:
(API::WebsiteDataStore::defaultDataStoreConfiguration):
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::createNonPersistent):
2014-12-05 Mark Lam <mark.lam@apple.com>
Gardening: one more build fix for GTK builds.
* CMakeLists.txt:
2014-12-05 Csaba Osztrogonác <ossy@webkit.org>
URTBF, remove duplicated entry due to parallel buildfixing.
* CMakeLists.txt:
2014-12-05 Csaba Osztrogonác <ossy@webkit.org>
URTBF after r176849.
* CMakeLists.txt: Added WebProcess/InjectedBundle/DOM/InjectedBundleCSSStyleDeclarationHandle.cpp.
2014-12-05 Mark Lam <mark.lam@apple.com>
Gardening: another build fix for GTK builds.
* CMakeLists.txt:
2014-12-05 Mark Lam <mark.lam@apple.com>
Gardening: more speculative build fix for GTK builds.
* CMakeLists.txt:
2014-12-05 Tim Horton <timothy_horton@apple.com>
Use the system string for telephone number menu
https://bugs.webkit.org/show_bug.cgi?id=139324
<rdar://problem/18726471>
Reviewed by Anders Carlsson.
* Platform/mac/MenuUtilities.mm:
(WebKit::menuItemTitleForTelephoneNumberGroup):
Make use of the SPI to retrieve the string if it exists.
2014-12-05 Tim Horton <timothy_horton@apple.com>
If the action menu hit test times out, a menu with a single separator appears
https://bugs.webkit.org/show_bug.cgi?id=139320
<rdar://problem/19158331>
Reviewed by Beth Dakin.
* UIProcess/mac/WKActionMenuController.h:
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController menuNeedsUpdate:]):
(-[WKActionMenuController _defaultMenuItems]):
Add a new "TimedOut" state, which we get into if the sync wait for
didPerformActionMenuHitTest times out. In this case, we'll drop the
separator item and give up on the menu. This way, the menu will never
have just a single separator item at the end of menuNeedsUpdate:.
2014-12-05 Mark Lam <mark.lam@apple.com>
Gardening: speculative build fix for GTK builds.
* CMakeLists.txt:
2014-12-05 Anders Carlsson <andersca@apple.com>
Fix build.
* UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
(API::WebsiteDataStore::defaultDataStoreConfiguration):
2014-12-05 Anders Carlsson <andersca@apple.com>
Give all web pages a website data store
https://bugs.webkit.org/show_bug.cgi?id=139317
Reviewed by Tim Horton.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
Set the website data store on the window.
* UIProcess/WebContext.cpp:
(WebKit::websiteDataStoreConfiguration):
Helper function that will create the default website data store configuration for a context.
(WebKit::WebContext::WebContext):
Create a new, per-context data store.
(WebKit::WebContext::createWebPage):
If we don't have a data store filled in, use the default per-context one.
* UIProcess/WebContext.h:
* UIProcess/WebPageProxy.h:
2014-12-05 Anders Carlsson <andersca@apple.com>
Move the website data store code to a new file
https://bugs.webkit.org/show_bug.cgi?id=139312
Reviewed by Tim Horton.
It's weird to have all the website data code in the API class, so move it to a new file.
* UIProcess/API/APIWebsiteDataStore.cpp:
(API::WebsiteDataStore::WebsiteDataStore):
(API::WebsiteDataStore::isNonPersistent):
(API::generateNonPersistentSessionID): Deleted.
* UIProcess/API/APIWebsiteDataStore.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
* UIProcess/WebsiteData/WebsiteDataStore.cpp: Copied from Source/WebKit2/UIProcess/API/APIWebsiteDataStore.cpp.
(WebKit::generateNonPersistentSessionID):
(WebKit::WebsiteDataStore::createNonPersistent):
(WebKit::WebsiteDataStore::create):
(WebKit::WebsiteDataStore::WebsiteDataStore):
(WebKit::WebsiteDataStore::~WebsiteDataStore):
* UIProcess/WebsiteData/WebsiteDataStore.h: Copied from Source/WebKit2/UIProcess/API/APIWebsiteDataStore.h.
(WebKit::WebsiteDataStore::isNonPersistent):
(WebKit::WebsiteDataStore::sessionID):
* WebKit2.xcodeproj/project.pbxproj:
2014-12-05 Tim Horton <timothy_horton@apple.com>
Keyboard input should be disabled in the preview popover
https://bugs.webkit.org/show_bug.cgi?id=139219
<rdar://problem/19052381>
Reviewed by Anders Carlsson.
* UIProcess/API/mac/WKView.mm:
(-[WKView performKeyEquivalent:]):
(-[WKView keyUp:]):
(-[WKView keyDown:]):
(-[WKView flagsChanged:]):
There are two implementations of each of these methods in this file.
Adjust the ones that the original patch missed.
2014-12-05 Antti Koivisto <antti@apple.com>
In NetworkResourceLoader always bail out after abort()
https://bugs.webkit.org/show_bug.cgi?id=139299
Reviewed by Alexey Proskuryakov.
Invoking abort() may kill the current object. Take care to bail out after it.
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::didReceiveResponseAsync):
(WebKit::NetworkResourceLoader::didReceiveBuffer):
(WebKit::NetworkResourceLoader::didFinishLoading):
Either make sure sendAbortingOnFailure() is called last in callbacks or the results is explicitly tested.
(WebKit::NetworkResourceLoader::bufferingTimerFired):
(WebKit::NetworkResourceLoader::sendBufferMaybeAborting):
Rename and return a boolean to indicate if load should continue.
(WebKit::NetworkResourceLoader::sendBuffer): Deleted.
* NetworkProcess/NetworkResourceLoader.h:
2014-12-05 Anders Carlsson <andersca@apple.com>
Don't use PLATFORM(IOS) in non-project headers.
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration _allowsAlternateFullscreen]):
* UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
2014-12-05 Sam Weinig <sam@webkit.org>
WKBundleCSSStyleDeclarationRef needs to be a real API::Object
https://bugs.webkit.org/show_bug.cgi?id=139291
Reviewed by Dan Bernstein.
Change WKBundleCSSStyleDeclarationRef from being a WebCore::CSSStyleDeclaration, to
being a real API::Object. WKRetain and WKRelease require this.
* Shared/APIObject.h:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
* WebProcess/InjectedBundle/DOM/InjectedBundleCSSStyleDeclarationHandle.cpp: Added.
(WebKit::domHandleCache):
(WebKit::InjectedBundleCSSStyleDeclarationHandle::getOrCreate):
(WebKit::InjectedBundleCSSStyleDeclarationHandle::InjectedBundleCSSStyleDeclarationHandle):
(WebKit::InjectedBundleCSSStyleDeclarationHandle::~InjectedBundleCSSStyleDeclarationHandle):
* WebProcess/InjectedBundle/DOM/InjectedBundleCSSStyleDeclarationHandle.h: Added.
* WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp:
(WebKit::InjectedBundlePageEditorClient::shouldApplyStyle):
2014-12-05 Anders Carlsson <andersca@apple.com>
Oops, didn't mean to commit this.
* Shared/API/Cocoa/WKFoundation.h:
2014-12-05 Anders Carlsson <andersca@apple.com>
Add an API::WebsiteDataStore object and use it for _WKWebsiteDataStore
https://bugs.webkit.org/show_bug.cgi?id=139304
Reviewed by Tim Horton.
* Shared/APIObject.h:
* Shared/Cocoa/APIObject.mm:
(API::Object::newObject):
Make _WKWebsiteDataStore a wrapper for API::WebsiteDataStore instead of API::Session.
* UIProcess/API/APIWebsiteDataStore.cpp: Added.
(API::generateNonPersistentSessionID):
(API::WebsiteDataStore::defaultDataStore):
(API::WebsiteDataStore::createNonPersistentDataStore):
(API::WebsiteDataStore::WebsiteDataStore):
(API::WebsiteDataStore::~WebsiteDataStore):
(API::WebsiteDataStore::isNonPersistent):
Add new WebsiteDataStore implementation. Currently it only contains the WebCore Session ID, but more will be
added to it in upcoming commits.
* UIProcess/API/APIWebsiteDataStore.h:
Add header.
* UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm: Added.
(API::WebsiteDataStore::defaultDataStoreConfiguration):
Platform specific file that returns the default data store configuration.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
Set the session ID from the website data store.
* UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
(+[_WKWebsiteDataStore defaultDataStore]):
(+[_WKWebsiteDataStore nonPersistentDataStore]):
(-[_WKWebsiteDataStore dealloc]):
(-[_WKWebsiteDataStore isNonPersistent]):
(-[_WKWebsiteDataStore _apiObject]):
Update now that we wrap an API::WebsiteDataStore instead.
* UIProcess/API/Cocoa/_WKWebsiteDataStoreInternal.h:
(WebKit::wrapper):
Update for API::Session -> API::WebsiteDataStore change.
* WebKit2.xcodeproj/project.pbxproj:
Add new files.
2014-12-05 David Kilzer <ddkilzer@apple.com>
FeatureDefines.xcconfig: Workaround bug in Xcode 5.1.1 when defining ENABLE_WEB_REPLAY
<http://webkit.org/b/139286>
Reviewed by Daniel Bates.
* Configurations/FeatureDefines.xcconfig: Switch back to using
PLATFORM_NAME to workaround a bug in Xcode 5.1.1 on 10.8.
2014-12-05 Anders Carlsson <andersca@apple.com>
Make WebPageProxy hold on to a SessionID instead of an API:Session
https://bugs.webkit.org/show_bug.cgi?id=139302
Reviewed by Sam Weinig.
This is in preparation for adding API::WebsiteDataStore. Currently we have to keep the
Session ID and the WebsiteDataStore separate because we still need to support toggling private browsing.
* UIProcess/API/C/WKPage.cpp:
(WKPageSetSession):
* UIProcess/API/C/WKSessionRef.cpp:
(WKSessionCreate):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
* UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
(+[_WKWebsiteDataStore nonPersistentDataStore]):
* UIProcess/APISession.cpp:
(API::generateID):
(API::Session::Session):
(API::Session::createEphemeral):
(API::Session::legacyPrivateSession): Deleted.
(API::Session::create): Deleted.
* UIProcess/APISession.h:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::createWebPage):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::setSessionID):
(WebKit::WebPageProxy::creationParameters):
(WebKit::WebPageProxy::setSession): Deleted.
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::sessionID):
2014-12-05 Eric Carlson <eric.carlson@apple.com>
[iOS] allow host application to opt-out of alternate fullscreen pt. 2
https://bugs.webkit.org/show_bug.cgi?id=139227
Reviewed by Jer Noble and Anders Carlsson.
* UIProcess/ios/WebVideoFullscreenManagerProxy.h: Add bool param to setupFullscreenWithID.
* UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in: Ditto.
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID): Ditto.
* WebProcess/ios/WebVideoFullscreenManager.mm:
(WebKit::WebVideoFullscreenManager::enterVideoFullscreenForVideoElement): Pass new parameter
to SetupFullscreenWithID.
2014-12-04 Anders Carlsson <andersca@apple.com>
Add missing includes in preparation for making toAPI require that it's passed an API::Object
https://bugs.webkit.org/show_bug.cgi?id=139278
Reviewed by Tim Horton.
* UIProcess/API/C/WKAuthenticationChallenge.cpp:
* UIProcess/API/C/WKAuthenticationDecisionListener.cpp:
* UIProcess/API/C/WKContext.cpp:
* UIProcess/API/C/WKDownload.cpp:
* UIProcess/API/C/WKFrame.cpp:
* UIProcess/API/C/WKGeolocationManager.cpp:
* UIProcess/API/C/WKInspector.cpp:
* UIProcess/API/C/WKPage.cpp:
* UIProcess/GenericCallback.h:
* UIProcess/Notifications/WebNotificationProvider.cpp:
* UIProcess/WebContextConnectionClient.cpp:
* UIProcess/WebContextInjectedBundleClient.cpp:
* UIProcess/WebCookieManagerProxyClient.cpp:
* UIProcess/WebDatabaseManagerProxyClient.cpp:
* UIProcess/WebFindClient.cpp:
* UIProcess/WebFormClient.cpp:
* UIProcess/WebIconDatabaseClient.cpp:
* UIProcess/WebPageContextMenuClient.cpp:
* WebProcess/InjectedBundle/API/c/WKBundle.cpp:
* WebProcess/InjectedBundle/API/c/WKBundleDOMWindowExtension.cpp:
* WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
* WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp:
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
* WebProcess/InjectedBundle/InjectedBundleClient.cpp:
* WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
* WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.cpp:
* WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.cpp:
* WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
2014-12-04 Anders Carlsson <andersca@apple.com>
Make API::String copy the underlying strings if needed, for thread safety
https://bugs.webkit.org/show_bug.cgi?id=139261
Reviewed by Sam Weinig.
* Shared/API/c/WKString.cpp:
(WKStringCreateWithUTF8CString):
(WKStringCreateWithJSString):
(WKStringCopyJSString):
Move the implementations from API::String and directly into the API functions.
* Shared/APIString.h:
Add a create overload that takes an rvalue reference. Call it from the create overload
that takes an lvalue reference, but explicitly copy the string.
We call isolatedCopy() again on the string in the rvalue reference overload, but that is a no-op
if the string can be sent to another thread. Add assertions in the String constructor that we can
send the string to another thread.
2014-12-04 Beth Dakin <bdakin@apple.com>
Clients disabling action menus sometimes still invoke action menu behaviors
https://bugs.webkit.org/show_bug.cgi?id=139270
-and corresponding-
rdar://problem/19147218
Reviewed by Tim Horton.
By default, we will keep a single item in the action menu up until the point where
_state == ActionMenuState::Ready. So by checking _state here, we are preventing
clients from opting out of our choice to wait. Ideally we would always still wait
for the Ready state, but this will get the best behavior in the mean time.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _updateActionMenuItems]):
2014-12-04 Antti Koivisto <antti@apple.com>
REGRESSION (r173468): Cannot step in WebInspector
https://bugs.webkit.org/show_bug.cgi?id=139260
Reviewed by Alexey Proskuryakov.
Inspector defers all loads and starts a nested runloop when it hits a breakpoint. When continuing it undefers the loads.
If the script execution was triggered from the didFinishLoading callback of the main resource then the main resource would
already be in the finished state in the network process side and setDefersLoading(false) message would end up restarting its load.
Since loads are not meant to restart the generated callbacks would assert or crash the web process when handled in the next
nested inspector runloop.
Fix by taking care that cleaned up NetworkResourceLoaders are always removed from the loader map of
the NetworkConnectionToWebProcess and so can't end up handling late messages.
No test, this requires JS debugger to trigger.
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::didCleanupResourceLoader):
This is now the only way to remove resource loaders.
It is called from NetworkResourceLoader::cleanup only.
(WebKit::NetworkConnectionToWebProcess::didClose):
(WebKit::NetworkConnectionToWebProcess::removeLoadIdentifier):
Calling abort removes the resource loader (since it calls cleanup) so no need to do it explicitly anymore.
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::start):
We are guaranteed to be reffed by NetworkConnectionToWebProcess until cleanup so the explicit ref/deref can be removed.
(WebKit::NetworkResourceLoader::cleanup):
Call to NetworkConnectionToWebProcess::didCleanupResourceLoader to make the loader unreachable.
* NetworkProcess/NetworkResourceLoader.h:
(WebKit::NetworkResourceLoader::identifier):
2014-12-04 Timothy Horton <timothy_horton@apple.com>
Fix the 32-bit build.
* UIProcess/API/mac/WKView.mm:
(-[WKView _setTextIndicator:fadeOut:animationCompletionHandler:]):
2014-12-04 Tim Horton <timothy_horton@apple.com>
TextIndicator::createWithSelectionInFrame does synchronous IPC in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=139252
<rdar://problem/19140827>
Reviewed by Anders Carlsson.
It turns out contentsToScreen requires sync IPC in Mac WebKit2, which we
really don't want to be doing here (especially since the UI process will often
be sitting in waitForAndDispatchImmediately waiting for didPerformActionMenuHitTest).
Go back to keeping TextIndicator rects in "window" coordinates and do the conversion
in each of the WebKits instead of trying to share that code.
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<TextIndicatorData>::encode):
(IPC::ArgumentCoder<TextIndicatorData>::decode):
* UIProcess/API/mac/WKView.mm:
(-[WKView _setTextIndicator:fadeOut:animationCompletionHandler:]):
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::updateFindIndicator):
(WebKit::FindController::drawRect):
Adjust to the WebCore changes.
2014-12-04 Anders Carlsson <andersca@apple.com>
Simplify StorageManager callback functions
https://bugs.webkit.org/show_bug.cgi?id=139257
Reviewed by Antti Koivisto.
* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::getOrigins):
(WebKit::StorageManager::getStorageDetailsByOrigin):
(WebKit::callCallbackFunction): Deleted.
(WebKit::StorageManager::getOriginsInternal): Deleted.
(WebKit::StorageManager::getStorageDetailsByOriginInternal): Deleted.
* UIProcess/Storage/StorageManager.h:
* UIProcess/WebKeyValueStorageManager.cpp:
(WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
(WebKit::WebKeyValueStorageManager::getStorageDetailsByOrigin):
(WebKit::didGetKeyValueStorageOrigins): Deleted.
(WebKit::didGetStorageDetailsByOrigin): Deleted.
2014-12-04 Csaba Osztrogonác <ossy@webkit.org>
URTBF after r176794.
* UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
(WebKit::fileCreationTime):
(WebKit::fileModificationTime):
2014-12-03 Anders Carlsson <andersca@apple.com>
Add a way to delete local storage origins modified after a given date
https://bugs.webkit.org/show_bug.cgi?id=139249
Reviewed by Tim Horton.
Also change LocalStorageDatabaseTracker to hold on to WTF::Optional time_t values
instead of treating missing values as zero.
* UIProcess/LocalStorageDetails.h:
* UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
(WebKit::fileCreationTime):
(WebKit::fileModificationTime):
(WebKit::LocalStorageDatabaseTracker::deleteDatabasesModifiedSince):
(WebKit::LocalStorageDatabaseTracker::details):
* UIProcess/Storage/LocalStorageDatabaseTracker.h:
* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::deleteLocalStorageOriginsModifiedSince):
* UIProcess/Storage/StorageManager.h:
* UIProcess/WebKeyValueStorageManager.cpp:
(WebKit::didGetStorageDetailsByOrigin):
2014-12-04 Peter Molnar <pmolnar.u-szeged@partner.samsung.com>
[EFL][WK2] Add ewk API to allow accepting a specific TLS certificate for a specific host
https://bugs.webkit.org/show_bug.cgi?id=131160
Reviewed by Gyuyoung Kim.
* UIProcess/API/efl/ewk_context.cpp:
(EwkContext::allowSpecificHTTPSCertificateForHost):
(ewk_context_tls_certificate_for_host_allow):
* UIProcess/API/efl/ewk_context.h:
* UIProcess/API/efl/ewk_context_private.h:
* UIProcess/API/efl/tests/test_ewk2_ssl.cpp:
2014-12-03 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r176457.
https://bugs.webkit.org/show_bug.cgi?id=139247
More iOS breakage (Requested by andersca on #webkit).
Reverted changeset:
"Fix iOS build."
http://trac.webkit.org/changeset/176457
2014-12-03 Beth Dakin <bdakin@apple.com>
<input> elements get whitespace action menu instead of editable text menu
https://bugs.webkit.org/show_bug.cgi?id=139241
-and corresponding-
rdar://problem/19072083
Reviewed by Sam Weinig.
Add isOverTextInsideFormControlElement to WebHitTestResult.
* Shared/WebHitTestResult.cpp:
(WebKit::WebHitTestResult::Data::Data):
(WebKit::WebHitTestResult::Data::encode):
(WebKit::WebHitTestResult::Data::decode):
* Shared/WebHitTestResult.h:
(WebKit::WebHitTestResult::isOverTextInsideFormControlElement):
Offer the text menus for text inside form controls.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _defaultMenuItems]):
We should disallow shadow content in the hit test. This is the default and it is
how context menus behave. We originally wanted to text inside shadow content so
that we could find the text, but the new function I added to HitTestResult will
allow that.
* WebProcess/WebPage/mac/WebPageMac.mm:
Adjust to the fact that we dont hit test shadow content any more.
(WebKit::WebPage::performActionMenuHitTestAtLocation):
(WebKit::WebPage::lookupTextAtLocation):
(WebKit::WebPage::focusAndSelectLastActionMenuHitTestResult):
2014-12-03 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r176489.
https://bugs.webkit.org/show_bug.cgi?id=139242
More iOS breakage (Requested by andersca on #webkit).
Reverted changeset:
"Unreviewed, iOS build fix after r176452."
http://trac.webkit.org/changeset/176489
2014-12-03 Tim Horton <timothy_horton@apple.com>
Implement action menus for tel: URLs
https://bugs.webkit.org/show_bug.cgi?id=139240
<rdar://problem/19115662>
Reviewed by Anders Carlsson.
* Shared/API/c/WKActionMenuTypes.h:
Add a new type.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _defaultMenuItemsForDataDetectableLink]):
Rename this function as it will work for both mailto and tel URLs.
Adjust it to use contextForView:.
(-[WKActionMenuController _clearActionMenuState]):
(-[WKActionMenuController menuNeedsUpdate:]):
(-[WKActionMenuController _defaultMenuItems]):
Don't check the menu type when going to interact with _currentActionContext.
We'll only have a _currentActionContext if we have a data detected item,
and there are multiple menu types that end up using DDActionContext.
2014-12-03 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r176452 and r176559.
https://bugs.webkit.org/show_bug.cgi?id=139239
Broke iOS (Requested by andersca on #webkit).
Reverted changesets:
"Remove alignment code from IPC coders"
https://bugs.webkit.org/show_bug.cgi?id=138963
http://trac.webkit.org/changeset/176452
"[WK2] SecComp buildfix after r176452"
https://bugs.webkit.org/show_bug.cgi?id=139081
http://trac.webkit.org/changeset/176559
2014-12-03 Tim Horton <timothy_horton@apple.com>
Keyboard input should be disabled in the preview popover
https://bugs.webkit.org/show_bug.cgi?id=139219
<rdar://problem/19052381>
Reviewed by Anders Carlsson.
Make sure that keyboard input, Quick Look, etc. are blocked in preview popovers
and WKThumbnailViews. Also block the fake mouseMove events that originate in
the Web process upon scrolling, because we were missing those despite blocking
ordinary mouseMove events.
* UIProcess/API/Cocoa/WKViewPrivate.h:
* UIProcess/API/mac/WKView.mm:
Rename _ignoresNonWheelMouseEvents to _ignoresNonWheelEvents, because it will
apply not only to mouse events but also key events, Quick Look events, menu
preparation events, swipe events, etc.
Add _ignoresAllEvents, which means the same thing as _ignoresNonWheelEvents
with the addition of ignoring scrollWheel events.
(-[WKView scrollWheel:]):
(-[WKView swipeWithEvent:]):
(-[WKView mouseMoved:]):
(-[WKView mouseDown:]):
(-[WKView mouseUp:]):
(-[WKView mouseDragged:]):
Adjust to the new name.
(-[WKView performKeyEquivalent:]):
(-[WKView keyUp:]):
(-[WKView keyDown:]):
(-[WKView flagsChanged:]):
(-[WKView quickLookWithEvent:]):
(-[WKView prepareForMenu:withEvent:]):
(-[WKView willOpenMenu:withEvent:]):
(-[WKView didCloseMenu:withEvent:]):
Block all of these events as well as those we were previously blocking.
(-[WKView _setIgnoresAllEvents:]):
(-[WKView _setIgnoresNonWheelMouseEvents:]):
(-[WKView _setIgnoresNonWheelEvents:]):
(-[WKView _ignoresNonWheelEvents]):
(-[WKView _ignoresAllEvents]):
* UIProcess/API/mac/WKViewInternal.h:
Adjust to the new names and the addition of ignoresAllEvents.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKPagePreviewViewController loadView]):
Adjust to the new name.
(-[WKActionMenuController prepareForMenu:withEvent:]):
Move bailing from prepareForMenu: up to WKView.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _ignoresNonWheelEvents]):
(-[WKWebView _setIgnoresNonWheelEvents:]):
(-[WKWebView _ignoresNonWheelMouseEvents]): Deleted.
(-[WKWebView _setIgnoresNonWheelMouseEvents:]): Deleted.
* UIProcess/API/Cocoa/WKWebViewInternal.h:
Adjust to the new name (without "mouse" in it).
* UIProcess/API/Cocoa/_WKThumbnailView.mm:
(-[_WKThumbnailView _viewWasUnparented]):
(-[_WKThumbnailView _viewWasParented]):
Explicitly tell WKView to disable event handling while thumbnailed,
instead of having WKView special-case thumbnail views internally.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setShouldDispatchFakeMouseMoveEvents):
* UIProcess/WebPageProxy.h:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::shouldDispatchFakeMouseMoveEvents):
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::shouldDispatchFakeMouseMoveEvents):
(WebKit::WebPage::setShouldDispatchFakeMouseMoveEvents):
* WebProcess/WebPage/WebPage.messages.in:
Plumb shouldDispatchFakeMouseMoveEvents from the UI process to the Web process
and through to WebKit2's ChromeClient implementation.
2014-12-03 Anders Carlsson <andersca@apple.com>
Remove ENABLE_UI_PROCESS_STORAGE define, it's always 1.
Rubber-stamped by Beth Dakin.
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::localStorageNamespace):
(WebKit::WebPlatformStrategies::transientLocalStorageNamespace):
(WebKit::WebPlatformStrategies::sessionStorageNamespace):
2014-12-03 Anders Carlsson <andersca@apple.com>
Use an @autoreleasepool instead of NSAutoreleasePool.
Rubber-stamped by Tim Horton.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::flushLayers):
2014-12-03 Dan Bernstein <mitz@apple.com>
REGRESSION(r176687): Caused webkit2 test assertion failure crashes in WebKit::WebPage::willStartDrag()
https://bugs.webkit.org/show_bug.cgi?id=139224
Reviewed by Alexey Proskuryakov.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::mouseEventSyncForTesting): Wait for the UI process to start dragging if
needed before handling the event.
2014-12-03 Michael Catanzaro <mcatanzaro@igalia.com>
[GTK] outdated comment
https://bugs.webkit.org/show_bug.cgi?id=137801
Reviewed by Carlos Garcia Campos.
Remove a comment that is no longer correct.
* NetworkProcess/gtk/NetworkProcessMainGtk.cpp:
2014-12-02 Conrad Shultz <conrad_shultz@apple.com>
Don't block menu highlighting when presenting a page preview
https://bugs.webkit.org/show_bug.cgi?id=139217
Reviewed by Tim Horton.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _previewURLFromActionMenu:]):
Defer popover presentation to the next turn of the runloop.
2014-12-02 Timothy Horton <timothy_horton@apple.com>
Fix the build.
* UIProcess/mac/WebContextMac.mm:
2014-12-02 Dan Bernstein <mitz@apple.com>
<rdar://problem/18441138> [iOS] Text selection in WKWebView with WKSelectionGranularityCharacter only works in the most recent WKWebView to load
https://bugs.webkit.org/show_bug.cgi?id=139211
Reviewed by Anders Carlsson.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView becomeFirstResponder]): Override to activate the text selection for when
becoming first resopnder.
(-[WKContentView resignFirstResponder]): Deactiavte the text selection when resigning first
responder. This ensures that if another WKWebView becomes first responder, and it uses
block selection, we dont end up with two active selection views.
(-[WKContentView useSelectionAssistantWithMode:]): Only activate the text selection if this
is the first responder. This ensures that loading content into a non-first-responder
WKWebView doesnt deactivate the text selection in the current first responder.
2014-12-02 Alexey Proskuryakov <ap@apple.com>
http/tests/appcache/main-resource-fallback-for-network-error-crash.html can break subsequent tests
https://bugs.webkit.org/show_bug.cgi?id=139149
Reviewed by Anders Carlsson.
This changes API behavior. I think that it's OK, because existing behavior made no sense.
We used to delete caches from disk, but they were still active in memory. Now we also
obsolete them in memory, so documents that use a cache still work, but new ones don't
pick one up.
* WebProcess/ApplicationCache/WebApplicationCacheManager.cpp:
(WebKit::WebApplicationCacheManager::deleteAllEntries): Use the new WebCore function
that properly deletes caches.
2014-12-02 Tim Horton <timothy_horton@apple.com>
Remove a SnowLeopard-era quirk for QuickLook
https://bugs.webkit.org/show_bug.cgi?id=139208
<rdar://problem/19121822>
Reviewed by Alexey Proskuryakov.
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::platformInitializeWebProcess):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::needsQuickLookResourceCachingQuirks): Deleted.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess):
* WebProcess/WebProcess.h:
(WebKit::WebProcess::needsQuickLookResourceCachingQuirks): Deleted.
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):
2014-12-02 Beth Dakin <bdakin@apple.com>
Build fix.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _defaultMenuItemsForLink]):
2014-12-02 Beth Dakin <bdakin@apple.com>
More build fix.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _defaultMenuItemsForLink]):
2014-12-02 Dan Bernstein <mitz@apple.com>
REGRESSION: Dragging selected text changes the selection
https://bugs.webkit.org/show_bug.cgi?id=139110
Reviewed by Simon Fraser.
After it sent the UI process the message to start dragging, the Web process handled mouse
move events that had already been in flight, interpreting them as a drag to start a new
selection. This is fixed by ignoring any mouse events received after asking the UI process
to start dragging.
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::setDragImage): Send the new DidStartDrag message back to the Web
process, so that it stops ignoring mouse events.
* WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
(WebKit::WebDragClient::startDrag): Call the new WebPage::willStartDrag, so that it starts
ignoring mouse events.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage): Initialize new member variable.
(WebKit::WebPage::mouseEvent): Dont handle the event if we have asked the UI process to
start dragging.
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::willStartDrag): Added. Sets new member variable m_isStartingDrag to true.
(WebKit::WebPage::didStartDrag): Added. Handles the message from the UI process by setting
m_isStartingDrag back to false.
* WebProcess/WebPage/WebPage.messages.in: Added DidStartDrag.
2014-12-02 Beth Dakin <bdakin@apple.com>
Should use standardQuickLookMenuItem for apps that don't implement customizations
https://bugs.webkit.org/show_bug.cgi?id=139193
-and corresponding-
rdar://problem/18944696
Reviewed by Anders Carlsson.
New SPI will allow clients to opt-out of the standardQuickLookMenuItem. By
default, opt in.
* UIProcess/API/Cocoa/WKViewPrivate.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView _shouldUseStandardQuickLookPreview]):
* UIProcess/mac/WKActionMenuController.mm:
Use [NSMenuItem standardQuickLookMenuItem] unless the client has requested
otherwise.
(-[WKActionMenuController _defaultMenuItemsForLink]):
Delegate methods to set up the standardQuickLookMenuItem.
(-[WKActionMenuController menuItem:viewAtScreenPoint:]):
(-[WKActionMenuController menuItem:previewItemAtPoint:]):
(-[WKActionMenuController menuItem:preferredEdgeForPoint:]):
2014-12-02 Tim Horton <timothy_horton@apple.com>
TextIndicator can get stuck (especially if we don't get LUNotificationPopoverWillClose when we should)
https://bugs.webkit.org/show_bug.cgi?id=139175
<rdar://problem/19072236>
Reviewed by Beth Dakin.
* UIProcess/API/mac/WKView.mm:
(-[WKView scrollWheel:]):
(-[WKView mouseDown:]):
Work around <rdar://problem/19086993> by always explicitly clearing the
active text indicator in mouseDown: and scrollWheel:.
This way, even if you manage to get a text indicator that outlives the
Look Up popover (or find-in-page, or whatever), it will be dismissed
by clicking or scrolling the view.
2014-12-02 Anders Carlsson <andersca@apple.com>
Remove visited link handling from PageGroup
https://bugs.webkit.org/show_bug.cgi?id=139185
Reviewed by Sam Weinig.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::populateVisitedLinks): Deleted.
* WebProcess/WebCoreSupport/WebChromeClient.h:
2014-12-01 Anders Carlsson <andersca@apple.com>
Remove WKBundleRemoveAllVisitedLinks
https://bugs.webkit.org/show_bug.cgi?id=139163
Reviewed by Sam Weinig.
WKBundleRemoveAllVisitedLinks has been a no-op since at least Yosemite; get rid of it.
* WebProcess/InjectedBundle/API/c/WKBundle.cpp:
(WKBundleRemoveAllVisitedLinks): Deleted.
* WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::removeAllVisitedLinks): Deleted.
* WebProcess/InjectedBundle/InjectedBundle.h:
2014-12-02 Eva Balazsfalvi <evab.u-szeged@partner.samsung.com>
Fix class was previously declared as a struct warnings
https://bugs.webkit.org/show_bug.cgi?id=139131
Reviewed by Csaba Osztrogonác.
* UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
* UIProcess/CoordinatedGraphics/WebViewClient.h:
2014-12-02 Gyuyoung Kim <gyuyoung.kim@samsung.com>
[EFL] ewk_view_scale_set() doesn't work correctly
https://bugs.webkit.org/show_bug.cgi?id=139109
Reviewed by Csaba Osztrogonác.
When ewk_view_scale_set() is called, it has only updated a scale factor which is maintained by WebPageProxy.
It causes WebPageProxy unsynchronized with PageViewportController's scale factor. That's why wrong scale
behavior has occured through ewk_view_scale_set(). Besides zooming has similar problem as well.
Thus this patch updates m_pageScaleFactor of PageViewportController as well as prohibits to change the scale
factor through viewport meta tag update. Because ewk_view_scale_set() means that user wants to set a specific
value to scale factor of current viewport.
* UIProcess/API/efl/EwkView.cpp:
(EwkView::updateScaleToPageViewportController):
Set m_initiallyFitToViewport to false. And call didChangeContentsVisibility() with new scale and scale position.
* UIProcess/API/efl/EwkView.h:
* UIProcess/API/efl/ewk_view.cpp:
(ewk_view_scale_set):
* UIProcess/API/efl/tests/test_ewk2_view.cpp:
(TEST_F):
* UIProcess/CoordinatedGraphics/PageViewportController.cpp:
(WebKit::PageViewportController::didCommitLoad):
Set m_initiallyFitToViewport to true in order to fit content to viewport size by default.
Initizlize content position with (0, 0).
(WebKit::PageViewportController::pageTransitionViewportReady):
Do not update scale when m_initiallyFitToViewport is false.
(WebKit::PageViewportController::syncVisibleContents):
Return false when syncVisibleContents is failed.
(WebKit::PageViewportController::didChangeViewportAttributes):
Do not update scale when m_initiallyFitToViewport is false.
(WebKit::PageViewportController::applyScaleAfterRenderingContents):
If syncVisibleContents() is failed, m_pageScaleFactor should be restored with previous value.
If not, new scale factor isn't applied though, PageViewportController uses it as own scale factor.
(WebKit::PageViewportController::updateMinimumScaleToFit):
Do not update scale when m_initiallyFitToViewport is false or m_hadUserInteraction is true.
* UIProcess/CoordinatedGraphics/PageViewportController.h:
(WebKit::PageViewportController::setInitiallyFitToViewport):
2014-11-20 Jeffrey Pfau <jpfau@apple.com>
Add cancelable version of willSendRequest
https://bugs.webkit.org/show_bug.cgi?id=138987
Reviewed by Anders Carlsson.
* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::willSendRequest):
2014-12-01 Conrad Shultz <conrad_shultz@apple.com>
Clients need a way to explicitly set the title of a page preview
https://bugs.webkit.org/show_bug.cgi?id=139161
Reviewed by Beth Dakin.
This implicitly assumes that only one page preview can be associate with a given WKView at a time.
* UIProcess/API/Cocoa/WKViewPrivate.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView _setPreviewTitle:]):
Wrap -[WKActionMenuController setPreviewTitle:]
* UIProcess/mac/WKActionMenuController.h:
* UIProcess/mac/WKActionMenuController.mm:
Add ivars for the title and the title text field (previously not independently exposed).
(-[WKPagePreviewViewController previewTitle]):
Accessor.
(-[WKPagePreviewViewController setPreviewTitle:]):
Accessor; set the text field's string value.
(-[WKPagePreviewViewController loadView]):
Adopt the _titleTextField ivar; assume that if a client has explicitly set the previewTitle then we don't
need to ask for it again.
(-[WKActionMenuController setPreviewTitle:]):
Wrap -[WKPagePreviewViewController setPreviewTitle:].
2014-12-01 Anders Carlsson <andersca@apple.com>
Make WebKit2 work slightly better with garbage collection
https://bugs.webkit.org/show_bug.cgi?id=139159
<rdar://problem/19108390>
Reviewed by Dan Bernstein.
* Shared/Cocoa/APIObject.mm:
(API::Object::ref):
(API::Object::deref):
Call CFRetain/CFRelease to prevent the memory from being collected.
(API::Object::newObject):
Call CFRetain under GC so we'll prevent memory from being collected prematurely.
2014-12-01 Tim Horton <timothy_horton@apple.com>
Implement yellow highlight for WebKit1 data detectors
https://bugs.webkit.org/show_bug.cgi?id=138956
<rdar://problem/18992185>
Reviewed by Beth Dakin.
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<TextIndicatorData>::encode):
(IPC::ArgumentCoder<TextIndicatorData>::decode):
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::updateFindIndicator):
(WebKit::FindController::drawRect):
Adjust to the fact that TextIndicator keeps screen-relative rects.
2014-12-01 Anders Carlsson <andersca@apple.com>
Remove old site specific quirks code that was added in 2009
https://bugs.webkit.org/show_bug.cgi?id=139141
Reviewed by Antti Koivisto.
* NetworkProcess/RemoteNetworkingContext.h:
* NetworkProcess/mac/RemoteNetworkingContext.mm:
(WebKit::RemoteNetworkingContext::needsSiteSpecificQuirks): Deleted.
* WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
* WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
(WebKit::WebFrameNetworkingContext::needsSiteSpecificQuirks): Deleted.
2014-12-01 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Crash in WebInspectorClient::hideHighlight when page is destroyed
https://bugs.webkit.org/show_bug.cgi?id=139136
Reviewed by Simon Fraser.
* WebProcess/WebCoreSupport/WebInspectorClient.cpp:
(WebKit::WebInspectorClient::hideHighlight):
Speculatively fix by null-checking the main frame which
can be null during page destruction.
2014-11-30 Jaehun Lim <ljaehun.lim@samsung.com>
[EFL] Add eldbus to the library list
https://bugs.webkit.org/show_bug.cgi?id=139120
Reviewed by Gyuyoung Kim.
Fix undefined reference errors for eldbus APIs.
* PlatformEfl.cmake:
2014-11-29 Anders Carlsson <andersca@apple.com>
Crash when calling WKPageClose on the originated page from within createNewPage callback
https://bugs.webkit.org/show_bug.cgi?id=139099
<rdar://problem/19052564>
Reviewed by Sam Weinig.
Null check the namespace ID.
* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::cloneSessionStorageNamespaceInternal):
2014-11-28 Tim Horton <timothy_horton@apple.com>
Stale userData is handed to WKView _actionMenuItemsForHitTestResult under prepareForMenu
https://bugs.webkit.org/show_bug.cgi?id=139069
<rdar://problem/19075587>
Reviewed by Sam Weinig.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController wkView:willHandleMouseDown:]):
(-[WKActionMenuController didCloseMenu:withEvent:]):
(-[WKActionMenuController _clearActionMenuState]):
Previously, _userData was not being cleared in didCloseMenu, so a subsequent
action menu invocation would end up sending stale userData to _actionMenuItemsForHitTestResult.
Additionally, factor all of the cleanup code out into _clearActionMenuState,
and call it from both wkView:willHandleMouseDown: and didCloseMenu:withEvent:.
2014-11-26 Timothy Horton <timothy_horton@apple.com>
DataDetectors PageOverlay callbacks are never called
https://bugs.webkit.org/show_bug.cgi?id=139067
<rdar://problem/19086676>
Reviewed by Anders Carlsson.
* Shared/mac/ActionMenuHitTestResult.mm:
(WebKit::ActionMenuHitTestResult::encode):
(WebKit::ActionMenuHitTestResult::decode):
Encode/decode the PageOverlay ID.
2014-11-28 Simon Fraser <simon.fraser@apple.com>
Allow clients of the WKRenderLayerRef C SPI to connect layer trees across frame boundaries
https://bugs.webkit.org/show_bug.cgi?id=139021
Reviewed by Dan Bernstein.
Add WKRenderLayerGetFrameContentsLayer which returns a WKRenderLayerRef for
the content document of a RenderWidget, if its has one (e.g. frames, iframes
and <object> with document contents).
* Shared/API/c/WKRenderLayer.cpp:
(WKRenderLayerGetFrameContentsLayer):
* Shared/API/c/WKRenderLayer.h:
* Shared/UserMessageCoders.h:
(WebKit::UserMessageEncoder::baseEncode):
(WebKit::UserMessageDecoder::baseDecode):
* Shared/WebRenderLayer.cpp:
(WebKit::WebRenderLayer::create):
(WebKit::WebRenderLayer::WebRenderLayer):
* Shared/WebRenderLayer.h:
(WebKit::WebRenderLayer::frameContentsLayer):
2014-11-28 Csaba Osztrogonác <ossy@webkit.org>
[WK2] SecComp buildfix after r176452
https://bugs.webkit.org/show_bug.cgi?id=139081
Reviewed by Antti Koivisto.
* Shared/linux/SeccompFilters/SeccompBroker.cpp:
(WebKit::SeccompBrokerClient::dispatch):
(WebKit::SeccompBroker::runLoop):
2014-11-28 Csaba Osztrogonác <ossy@webkit.org>
Fix -Wc++11-narrowing error in SeccompFilters.cpp
https://bugs.webkit.org/show_bug.cgi?id=139079
Reviewed by Carlos Garcia Campos.
* Shared/linux/SeccompFilters/SeccompFilters.cpp:
(WebKit::SeccompFilters::addRule):
* Shared/linux/SeccompFilters/SeccompFilters.h:
2014-11-28 Csaba Osztrogonác <ossy@webkit.org>
[WK2] SecComp buildfix after r168605 and r168999
https://bugs.webkit.org/show_bug.cgi?id=139080
Reviewed by Carlos Garcia Campos.
* Shared/linux/SeccompFilters/SyscallPolicy.cpp:
(WebKit::SyscallPolicy::addDefaultWebProcessPolicy):
2014-11-27 Ryuan Choi <ryuan.choi@navercorp.com>
[EFL] Remove E_Dbus dependency
https://bugs.webkit.org/show_bug.cgi?id=136355
Reviewed by Gyuyoung Kim.
* UIProcess/API/efl/ewk_main.cpp: Added init/shutdown for eldbus.
(WebKit::EwkMain::initialize):
(WebKit::EwkMain::finalize):
(WebKit::EwkMain::shutdownInitializedEFLModules):
2014-11-25 Anders Carlsson <andersca@apple.com>
Remove user content handling from PageGroup
https://bugs.webkit.org/show_bug.cgi?id=139051
Reviewed by Antti Koivisto.
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::addUserScript):
(WebKit::InjectedBundle::addUserStyleSheet):
(WebKit::InjectedBundle::removeUserScript):
(WebKit::InjectedBundle::removeUserStyleSheet):
(WebKit::InjectedBundle::removeUserScripts):
(WebKit::InjectedBundle::removeUserStyleSheets):
(WebKit::InjectedBundle::removeAllUserContent):
Talk to the user content controller from the passed in WebPageGroupProxy.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
Create the WebPageGroupProxy before creating the page so we can get its user content controller and
pass it to the page configuration if necessary.
* WebProcess/WebPage/WebPageGroupProxy.cpp:
(WebKit::WebPageGroupProxy::userContentController):
New function that lazily creates a user content controller. We don't want to create this eagerly since
it's not used with the modern API.
(WebKit::WebPageGroupProxy::addUserStyleSheet):
(WebKit::WebPageGroupProxy::addUserScript):
(WebKit::WebPageGroupProxy::removeAllUserStyleSheets):
(WebKit::WebPageGroupProxy::removeAllUserScripts):
(WebKit::WebPageGroupProxy::removeAllUserContent):
Call through to the user content controller.
* WebProcess/WebPage/WebPageGroupProxy.h:
Add an m_userContentController member.
2014-11-25 Ting-Wei Lan <lantw44@gmail.com>
[GTK] Use LD_LIBRARY_PATH to make g-ir-scanner use the newly-built
version of libraries when running the temporary executable
https://bugs.webkit.org/show_bug.cgi?id=138833
Reviewed by Carlos Garcia Campos.
This patch modifies LD_LIBRARY_PATH to make sure the dynamic linker
find the correct version of libraries when running the temporary
executable to generate the .gir file.
* PlatformGTK.cmake:
2014-11-25 Csaba Osztrogonác <ossy@webkit.org>
[EFL] REGRESSION(r176514): It made performance tests fail
https://bugs.webkit.org/show_bug.cgi?id=139037
Reviewed by Gyuyoung Kim.
* WebProcess/efl/WebProcessMainEfl.cpp: Don't try to load/shutdown eail if eailLibraryPath() is empty.
2014-11-24 Eva Balazsfalvi <evab.u-szeged@partner.samsung.com>
Remove Qt cruft related to tap higlighting
https://bugs.webkit.org/show_bug.cgi?id=139030
Reviewed by Andreas Kling.
* CMakeLists.txt:
* WebProcess/WebPage/TapHighlightController.cpp: Removed.
* WebProcess/WebPage/TapHighlightController.h: Removed.
2014-11-24 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Unreviewed, EFL build fix since r176530.
* UIProcess/CoordinatedGraphics/WebView.cpp: Replace pointer with reference.
(WebKit::WebView::processDidExit):
2014-11-24 Benjamin Poulain <bpoulain@apple.com>
[WK2] Remove some bad stuff from WebPageProxy
https://bugs.webkit.org/show_bug.cgi?id=138896
Reviewed by Sam Weinig.
The state loadStateAtProcessExit does not seem to be used anywhere.
The state urlAtProcessExit only exists to forward the url from
WebPageProxy::resetStateAfterProcessExited() to the coordinated graphics code
WebView::processDidExit().
* UIProcess/CoordinatedGraphics/WebView.cpp:
(WebKit::WebView::processDidExit):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::resetStateAfterProcessExited):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::urlAtProcessExit): Deleted.
(WebKit::WebPageProxy::loadStateAtProcessExit): Deleted.
2014-11-24 Ryuan Choi <ryuan.choi@navercorp.com>
[EFL] REGRESSION(176066): It made all performance tests fail
https://bugs.webkit.org/show_bug.cgi?id=138865
Reviewed by Csaba Osztrogonác.
Since r176066, there are crash because evas_gl_surface is destroyed with
invalid evas_gl instance after evas_gl is destroyed.
* UIProcess/API/efl/EwkView.cpp:
(EwkView::~EwkView):
2014-11-24 Alberto Garcia <berto@igalia.com>
Webkit2 doesnt build on powerpc 32 bits
https://bugs.webkit.org/show_bug.cgi?id=130837
Reviewed by Carlos Garcia Campos.
Check if libatomic is needed in order to use std::atomic, and add
it to the list of WebKit2 libraries.
* PlatformGTK.cmake:
2014-11-24 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Update OptionsGTK.cmake and NEWS for 2.7.2 release.
* gtk/NEWS: Add release notes for 2.7.2.
2014-11-24 Krzysztof Czech <k.czech@samsung.com>
[EFL] Utilize Eail library to support accessibility in EFL
https://bugs.webkit.org/show_bug.cgi?id=137742
Reviewed by Gyuyoung Kim.
Initialize EAIL module so that all the listeners and atk-bridge started properly.
Dynamic loading of EAIL help us to avoid elementary dependencies in WebKit.
* WebProcess/efl/WebProcessMainEfl.cpp:
(eailLibraryPath): reads path provided by ACCESSIBILITY_EAIL_LIBRARY_PATH variable.
(eail):
2014-11-24 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] WebKitWebView is created with the wrong web context when using webkit_web_view_new_with_related_view()
https://bugs.webkit.org/show_bug.cgi?id=139023
Reviewed by Sergio Villar Senin.
The WebKitWebContext is a construct only property, so it's always
set to the default value when not provided, during the
construction. When a related-view is used to create a new web view
we should ensure that the same web context is used for the new web
view, instead of the default. We should also ignore any web
context given as construct parameter if a related view is alos provided.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewConstructed): Do not set the context to the default
one when not given during construction.
(webkitWebViewSetProperty): Only use the default web context when
not provided as construct parameter and there isn't a related view.
2014-11-23 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add API to override the default local storage directory
https://bugs.webkit.org/show_bug.cgi?id=138828
Reviewed by Gustavo Noronha Silva.
Add WebKitWebContext:local-storage-directory construct-only
property. If not provided the default will be used.
* UIProcess/API/gtk/WebKitWebContext.cpp:
(webkitWebContextGetProperty):
(webkitWebContextSetProperty):
(webkitWebContextConstructed):
(webkit_web_context_class_init):
2014-11-23 Conrad Shultz <conrad_shultz@apple.com>
Page previews should have titles
https://bugs.webkit.org/show_bug.cgi?id=139020
Reviewed by Tim Horton.
* UIProcess/API/Cocoa/WKViewPrivate.h:
Declare -_titleForPreviewOfURL:.
* UIProcess/API/mac/WKView.mm:
(-[WKView _titleForPreviewOfURL:]):
Stub implementation.
* UIProcess/mac/WKActionMenuController.mm:
(+[WKPagePreviewViewController previewPadding]):
Account for the title height.
(-[WKPagePreviewViewController loadView]):
Set correct autoresize masks on some views; create and configure a title view that is
horizontally and vertically centered.
(-[WKActionMenuController pagePreviewViewController:titleForPreviewOfURL:]):
WKPagePreviewViewControllerDelegate method; wrap -[WKView _titleForPreviewOfURL:].
2014-11-22 Simon Fraser <simon.fraser@apple.com>
Extend WKRenderObject and WKRenderLayer with some more useful data
https://bugs.webkit.org/show_bug.cgi?id=139006
Reviewed by Sam Weinig.
Implement WKRenderLayerGetBackingStoreMemoryEstimate,
WKRenderObjectCopyTextSnippet and WKRenderObjectGetTextLength for improved
RenderLayer and RenderTree display in clients of the C SPI.
* Shared/API/c/WKRenderLayer.cpp:
(WKRenderLayerGetBackingStoreMemoryEstimate):
* Shared/API/c/WKRenderLayer.h:
* Shared/API/c/WKRenderObject.cpp:
(WKRenderObjectCopyTextSnippet):
(WKRenderObjectGetTextLength):
* Shared/API/c/WKRenderObject.h:
* Shared/UserMessageCoders.h:
(WebKit::UserMessageEncoder::baseEncode):
(WebKit::UserMessageDecoder::baseDecode):
* Shared/WebRenderLayer.cpp:
(WebKit::WebRenderLayer::create):
(WebKit::WebRenderLayer::WebRenderLayer):
* Shared/WebRenderLayer.h:
(WebKit::WebRenderLayer::backingStoreMemoryEstimate):
* Shared/WebRenderObject.cpp:
(WebKit::WebRenderObject::create):
(WebKit::WebRenderObject::WebRenderObject):
* Shared/WebRenderObject.h:
(WebKit::WebRenderObject::textSnippet):
(WebKit::WebRenderObject::textLength):
2014-11-21 Jer Noble <jer.noble@apple.com>
Support multiple signatures of diagnostic logging.
https://bugs.webkit.org/show_bug.cgi?id=138690
Reviewed by Anders Carlsson.
Extend the existing WKBundlePageDiagnosticLoggingClient interface by deprecating
the original logDiagnosticMessage client method in V1 and adding three new,
explicit client methods.
* CMakeLists.txt:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/API/c/WKBundlePageDiagnosticLoggingClient.h:
* WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.cpp:
(WebKit::InjectedBundlePageDiagnosticLoggingClient::logDiagnosticMessageDeprecated):
Renamed from logDiagnosticMessage().
(WebKit::InjectedBundlePageDiagnosticLoggingClient::logDiagnosticMessage): Pass to the client.
(WebKit::InjectedBundlePageDiagnosticLoggingClient::logDiagnosticMessageWithResult): Ditto.
(WebKit::InjectedBundlePageDiagnosticLoggingClient::logDiagnosticMessageWithValue): Ditto.
* WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.h:
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::logDiagnosticMessage): Deleted.
* WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp: Added.
(WebKit::WebDiagnosticLoggingClient::WebDiagnosticLoggingClient): Simple constructor.
(WebKit::WebDiagnosticLoggingClient::~WebDiagnosticLoggingClient): Simple destructor.
(WebKit::WebDiagnosticLoggingClient::logDiagnosticMessage): Pass to the injected bundle.
(WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithResult): Ditto.
(WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithValue): Ditto.
* WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.h: Added.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage): Initialize the new client.
2014-11-21 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Unreviewed, EFL build fix since r176459.
r176459 removed Timer parameter in timer callbacks only for Mac port.
So this patch applies it to remaining classes for EFL port.
* UIProcess/API/efl/EwkView.cpp:
(EwkView::EwkView):
(EwkView::displayTimerFired):
* UIProcess/API/efl/EwkView.h:
* UIProcess/efl/TextCheckerClientEfl.cpp:
(TextCheckerClientEfl::TextCheckerClientEfl):
(TextCheckerClientEfl::languagesUpdateTimerFired):
(TextCheckerClientEfl::spellCheckingSettingChangeTimerFired):
* UIProcess/efl/TextCheckerClientEfl.h:
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
(WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
(WebKit::CoordinatedLayerTreeHost::layerFlushTimerFired):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
2014-11-21 Chris Dumez <cdumez@apple.com>
Unreviewed, iOS build fix after r176462.
Fix include path to TextIndicator.h to include WebCore/
as it was moved.
* UIProcess/ios/PageClientImplIOS.mm:
2014-11-21 Chris Dumez <cdumez@apple.com>
Unreviewed, iOS build fix after r176452.
dencodeFixedLengthData() now only takes 2 arguments instead of
3.
* Shared/ios/QuickLookDocumentData.cpp:
(WebKit::QuickLookDocumentData::decode):
2014-11-21 Zalan Bujtas <zalan@apple.com>
Simple line layout: Add "show simple line layout debug borders" setting to MiniBrowser.
https://bugs.webkit.org/show_bug.cgi?id=138981
Reviewed by Simon Fraser.
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _simpleLineLayoutDebugBordersEnabled]):
(-[WKPreferences _setSimpleLineLayoutDebugBordersEnabled:]):
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:
2014-11-21 Eric Carlson <eric.carlson@apple.com>
WebVideoFullscreenManagerProxy must clear pointers when invalidated
https://bugs.webkit.org/show_bug.cgi?id=138982
Reviewed by Jer Noble.
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::~WebVideoFullscreenManagerProxy): Call invalidate.
(WebKit::WebVideoFullscreenManagerProxy::invalidate): Set WebVideoFullscreenModel and
WebVideoFullscreenChangeObserver to NULL.
2014-11-21 Timothy Horton <timothy_horton@apple.com>
Fix the build.
* UIProcess/API/mac/WKView.mm:
(-[WKView mouseDown:]):
2014-11-21 Beth Dakin <bdakin@apple.com>
The preview action menu item should not have a title
https://bugs.webkit.org/show_bug.cgi?id=138989
-and corresponding-
rdar://problem/19061959
Reviewed by Anders Carlsson.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _createActionMenuItemForTag:]):
2014-11-21 Conrad Shultz <conrad_shultz@apple.com>
Page previews should have a margin.
https://bugs.webkit.org/show_bug.cgi?id=138990
Reviewed by Beth Dakin.
Enclose the WKWebView (or client-supplied preview view) in a container slightly larger
than the preview view. Adjust sizing code to accommodate the margin.
* UIProcess/mac/WKActionMenuController.mm:
(+[WKPagePreviewViewController previewPadding]):
Return the total amount of fixed padding surrounding the preview
(-[WKPagePreviewViewController loadView]):
Store the actual previewView in an ivar so that clients can distinguish it from the container
view; wrap the preview in a container view; set frames appropriately.
(-[WKActionMenuController _createPreviewPopover]):
Update to reflect method rename; supplement the popover size with the fixed padding.
(-[WKActionMenuController _preferredPopoverSizeWithPreviewPadding:]):
Renamed from -_preferredPopoverSize; account for the fixed padding when computing the preferred size.
(-[WKActionMenuController _clearPreviewPopover]):
Use the previewView ivar instead of the view controller's view.
(-[WKActionMenuController pagePreviewViewControllerWasClicked:]):
Ditto.
(-[WKActionMenuController _preferredPopoverSize]): Deleted.
2014-11-21 Tim Horton <timothy_horton@apple.com>
REGRESSION (r176415): Can get stuck, unable to invoke any DataDetectors popovers
https://bugs.webkit.org/show_bug.cgi?id=138955
<rdar://problem/19056442>
Reviewed by Anders Carlsson.
* UIProcess/API/mac/WKView.mm:
(-[WKView mouseDown:]):
* UIProcess/mac/WKActionMenuController.h:
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController wkView:willHandleMouseDown:]):
(-[WKActionMenuController didCloseMenu:withEvent:]):
(-[WKActionMenuController menuNeedsUpdate:]):
Keep track of whether we have called shouldUseActionsWithContext: on a
DDActionContext; if we get a mouseDown without having seen didCloseMenu:
(and thus don't properly pair the shouldUseActionsWithContext: with a didUseActions),
tear down the old DDActionContext before proceeding.
2014-11-21 Tim Horton <timothy_horton@apple.com>
REGRESSION (r176351): Parts of apple.com/contact aren't Lookup-able
https://bugs.webkit.org/show_bug.cgi?id=138960
<rdar://problem/19056715>
Reviewed by Anders Carlsson.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
(-[WKActionMenuController _defaultMenuItemsForMailtoLink]): Deleted.
Use DataDetectors SPI instead of an explicit blacklist.
2014-11-21 Tim Horton <timothy_horton@apple.com>
Crashes while encoding a TextIndicator with no contentImageWithHighlight
https://bugs.webkit.org/show_bug.cgi?id=138984
<rdar://problem/19063717>
Reviewed by Sam Weinig.
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<TextIndicatorData>::encode):
(IPC::ArgumentCoder<TextIndicatorData>::decode):
encodeImage doesn't deal with null images, so handle that case gracefully.
2014-11-21 Tim Horton <timothy_horton@apple.com>
REGRESSION (r176351): Parts of apple.com/contact aren't Lookup-able
https://bugs.webkit.org/show_bug.cgi?id=138960
<rdar://problem/19056715>
Reviewed by Beth Dakin.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
Blacklist contact results, because they don't have useful menus. If we
bail before setting up _currentActionContext, we'll still allow fallthrough
to ordinary text actions, avoiding mysterious failure when a contact is detected.
This doesn't break the case that r176351 was intended to fix,
because in that case we were detecting e.g. addresses.
2014-11-21 Tim Horton <timothy_horton@apple.com>
Move TextIndicator{Window} to WebCore
https://bugs.webkit.org/show_bug.cgi?id=138954
<rdar://problem/18992185>
Some adjustments by Csaba Osztrogonác.
Reviewed by Anders Carlsson.
* CMakeLists.txt:
Remove TextIndicator.cpp.
* Scripts/webkit/messages.py:
(struct_or_class):
(headers_for_type):
Tell messages.py that TextIndicatorData is a struct, and comes from TextIndicator.h.
* Shared/WebCoreArgumentCoders.h:
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<TextIndicatorData>::encode):
(IPC::ArgumentCoder<TextIndicatorData>::decode):
Add argument coders for TextIndicatorData.
* Shared/DictionaryPopupInfo.h:
* Shared/mac/ActionMenuHitTestResult.h:
* Shared/mac/ActionMenuHitTestResult.mm:
* UIProcess/API/gtk/PageClientImpl.h:
* UIProcess/API/gtk/PageClientImpl.cpp:
* UIProcess/API/mac/WKView.mm:
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/CoordinatedGraphics/WebView.h:
* UIProcess/CoordinatedGraphics/WebView.cpp:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/WKContentView.h:
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
* UIProcess/mac/WKActionMenuController.mm:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
* WebProcess/WebPage/FindController.cpp:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
* WebProcess/WebPage/mac/WebPageMac.mm:
Adjust to TextIndicator and TextIndicatorWindow's new home.
2014-11-21 Tim Horton <timothy_horton@apple.com>
REGRESSION (r176238): Mailto links are getting preloaded, which results in a compose window
https://bugs.webkit.org/show_bug.cgi?id=138972
Reviewed by Beth Dakin.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController willOpenMenu:withEvent:]):
Only preload links.
2014-11-21 Anders Carlsson <andersca@apple.com>
Remove the Timer parameters from timer callbacks
https://bugs.webkit.org/show_bug.cgi?id=138974
Reviewed by Antti Koivisto.
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::NetworkResourceLoader):
(WebKit::NetworkResourceLoader::bufferingTimerFired):
* NetworkProcess/NetworkResourceLoader.h:
* Shared/WebMemorySampler.cpp:
(WebKit::WebMemorySampler::WebMemorySampler):
(WebKit::WebMemorySampler::sampleTimerFired):
(WebKit::WebMemorySampler::stopTimerFired):
* Shared/WebMemorySampler.h:
* Shared/mac/RemoteLayerBackingStoreCollection.h:
* Shared/mac/RemoteLayerBackingStoreCollection.mm:
(WebKit::RemoteLayerBackingStoreCollection::RemoteLayerBackingStoreCollection):
(WebKit::RemoteLayerBackingStoreCollection::volatilityTimerFired):
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::PluginView):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
(WebKit::RemoteLayerTreeDrawingArea::layerFlushTimerFired):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess):
(WebKit::WebProcess::processSuspensionCleanupTimerFired):
(WebKit::WebProcess::nonVisibleProcessCleanupTimerFired):
* WebProcess/WebProcess.h:
2014-11-21 Anders Carlsson <andersca@apple.com>
Remove the Timer parameters from timer callbacks
https://bugs.webkit.org/show_bug.cgi?id=138974
Reviewed by Antti Koivisto.
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::NetworkResourceLoader):
(WebKit::NetworkResourceLoader::bufferingTimerFired):
* NetworkProcess/NetworkResourceLoader.h:
* Shared/WebMemorySampler.cpp:
(WebKit::WebMemorySampler::WebMemorySampler):
(WebKit::WebMemorySampler::sampleTimerFired):
(WebKit::WebMemorySampler::stopTimerFired):
* Shared/WebMemorySampler.h:
* Shared/mac/RemoteLayerBackingStoreCollection.h:
* Shared/mac/RemoteLayerBackingStoreCollection.mm:
(WebKit::RemoteLayerBackingStoreCollection::RemoteLayerBackingStoreCollection):
(WebKit::RemoteLayerBackingStoreCollection::volatilityTimerFired):
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::PluginView):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
(WebKit::RemoteLayerTreeDrawingArea::layerFlushTimerFired):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess):
(WebKit::WebProcess::processSuspensionCleanupTimerFired):
(WebKit::WebProcess::nonVisibleProcessCleanupTimerFired):
* WebProcess/WebProcess.h:
2014-11-21 Antti Koivisto <antti@apple.com>
Fix iOS build.
* Shared/ios/QuickLookDocumentData.cpp:
(WebKit::QuickLookDocumentData::encode):
2014-11-21 Antti Koivisto <antti@apple.com>
Remove alignment code from IPC coders
https://bugs.webkit.org/show_bug.cgi?id=138963
Reviewed by Anders Carlsson.
Alignment code achieves nothing except making the messages somewhat bigger.
* Platform/IPC/ArgumentCoders.cpp:
(IPC::ArgumentCoder<CString>::encode):
(IPC::ArgumentCoder<CString>::decode):
(IPC::ArgumentCoder<String>::encode):
(IPC::decodeStringText):
* Platform/IPC/ArgumentCoders.h:
(IPC::SimpleArgumentCoder::encode):
(IPC::SimpleArgumentCoder::decode):
* Platform/IPC/ArgumentDecoder.cpp:
(IPC::ArgumentDecoder::initialize):
(IPC::ArgumentDecoder::bufferIsLargeEnoughToContain):
(IPC::ArgumentDecoder::decodeFixedLengthData):
(IPC::ArgumentDecoder::decodeVariableLengthByteArray):
(IPC::ArgumentDecoder::decodeNumber):
(IPC::ArgumentDecoder::decode):
(IPC::roundUpToAlignment): Deleted.
(IPC::alignedBufferIsLargeEnoughToContain): Deleted.
(IPC::ArgumentDecoder::alignBufferPosition): Deleted.
(IPC::decodeValueFromBuffer): Deleted.
* Platform/IPC/ArgumentDecoder.h:
(IPC::ArgumentDecoder::isInvalid):
(IPC::ArgumentDecoder::markInvalid):
(IPC::ArgumentDecoder::bufferIsLargeEnoughToContain):
* Platform/IPC/ArgumentEncoder.cpp:
(IPC::ArgumentEncoder::ArgumentEncoder):
(IPC::ArgumentEncoder::grow):
(IPC::ArgumentEncoder::encodeFixedLengthData):
(IPC::ArgumentEncoder::encodeVariableLengthByteArray):
(IPC::ArgumentEncoder::encode):
* Platform/IPC/ArgumentEncoder.h:
(IPC::ArgumentEncoder::buffer):
(IPC::ArgumentEncoder::mutableBuffer):
* Platform/IPC/DataReference.cpp:
(IPC::SharedBufferDataReference::encode):
* Platform/IPC/MessageEncoder.cpp:
(IPC::MessageEncoder::setIsSyncMessage):
(IPC::MessageEncoder::setShouldDispatchMessageWhenWaitingForSyncReply):
* Platform/IPC/mac/ConnectionMac.mm:
(IPC::Connection::sendOutgoingMessage):
2014-11-21 Anders Carlsson <andersca@apple.com>
Make memoryCache() return a reference
https://bugs.webkit.org/show_bug.cgi?id=138939
Reviewed by Antti Koivisto.
* WebProcess/Network/NetworkProcessConnection.cpp:
(WebKit::NetworkProcessConnection::didCacheResource):
* WebProcess/ResourceCache/WebResourceCacheManager.cpp:
(WebKit::WebResourceCacheManager::getCacheOrigins):
(WebKit::WebResourceCacheManager::clearCacheForOrigin):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::terminate):
(WebKit::WebProcess::didClose):
(WebKit::WebProcess::clearResourceCaches):
(WebKit::getWebCoreMemoryCacheStatistics):
(WebKit::WebProcess::setMemoryCacheDisabled):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformSetCacheModel):
* WebProcess/soup/WebProcessSoup.cpp:
(WebKit::WebProcess::platformSetCacheModel):
2014-11-21 Daniel Bates <dabates@apple.com>
[iOS] WebKit2 fails to build with public SDK due to missing SPI from CFNetwork, QuartzCore, MediaPlayer, XPC
https://bugs.webkit.org/show_bug.cgi?id=138930
Reviewed by Anders Carlsson.
* NetworkProcess/mac/NetworkResourceLoaderMac.mm: Remove forward declaration for NSCachedURLResponse
methods as this functionality was incorporated into CFNetworkSPI.h, which is included by this file.
* Platform/mac/LayerHostingContext.mm: Moved QuartzCore forward declarations from this file to file
QuartzCoreSPI.h and included header QuartzCoreSPI.h.
* Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h: Include header XPCSPI.h.
* Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm: Remove forward declarations of
XPC SPI since these declarations are part of XCPSPI.h, which is included by header XPCServiceEntryPoint.h.
* UIProcess/API/Cocoa/WKWebView.mm: Remove unnecessary include of header QuartzCore/CARenderServer.h
as it will be included by header QuartzCoreSPI.h.
* UIProcess/Network/NetworkProcessProxy.cpp: Include header XPCSPI.h when building for iOS with
USE(XPC_SERVICES) enabled.
* UIProcess/ios/forms/WKAirPlayRoutePicker.mm: Include header MediaPlayerSPI.h instead of including
MediaPlayer private headers directly. Also sort the list of #import directives.
2014-11-20 Dan Bernstein <mitz@apple.com>
Build fix.
* UIProcess/ios/forms/WKAirPlayRoutePicker.mm:
(-[WKAirPlayRoutePicker showAirPlayPickerIPad:fromRect:]): Cast the return value of
[getMPAudioVideoRoutingPopoverControllerClass() alloc] to resolve ambiguity about which
-initWithType: we are calling.
(-[WKAirPlayRoutePicker showAirPlayPickerIPhone:]): Cast to resolve ambiguity.
(-[WKAirPlayRoutePicker show:fromRect:]): Cast for consistency.
2014-11-20 Benjamin Poulain <bpoulain@apple.com>
Remove the remaining vestiges of minimal-ui
https://bugs.webkit.org/show_bug.cgi?id=138890
Reviewed by Sam Weinig.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidFinishDocumentLoad):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didCommitLoad):
(WebKit::WebPage::didFinishDocumentLoad): Deleted.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::savePageState):
(WebKit::WebPage::restorePageState):
(WebKit::WebPage::viewportConfigurationChanged):
(WebKit::WebPage::updateViewportSizeForCSSViewportUnits):
2014-11-20 Beth Dakin <bdakin@apple.com>
Preview popover needs minimum and maximum sizes
https://bugs.webkit.org/show_bug.cgi?id=138943
-and corresponding-
rdar://problem/18904651
Reviewed by Tim Horton.
Quick follow-up to get the right screen.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController largestPopoverSize]):
2014-11-20 Beth Dakin <bdakin@apple.com>
Preview popover needs minimum and maximum sizes
https://bugs.webkit.org/show_bug.cgi?id=138943
-and corresponding-
rdar://problem/18904651
Reviewed by Tim Horton.
This patch enforces minimum and maximum popover sizes. If the popover needs to be
sized up to be above the minimum, it will end up covering some of the
_hitTestResult, so we should compute a new origin rect based on the original
event location.
* UIProcess/mac/WKActionMenuController.h:
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController prepareForMenu:withEvent:]):
(-[WKActionMenuController _previewURLFromActionMenu:]):
(-[WKActionMenuController _createPreviewPopover]):
(-[WKActionMenuController largestPopoverSize]):
(-[WKActionMenuController _preferredPopoverSize]):
(-[WKActionMenuController _preferredSizeForPopoverPresentedFromOriginRect:]): Deleted.
2014-11-20 Conrad Shultz <conrad_shultz@apple.com>
Clicks on previews can be recognized multiple times
https://bugs.webkit.org/show_bug.cgi?id=138944
Reviewed by Tim Horton.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKPagePreviewViewController _clickRecognized:]):
Only dispatch the delegate message on the appropriate gesture recognizer state transition.
2014-11-20 Conrad Shultz <conrad_shultz@apple.com>
Clients should be able to customize preview click behavior
https://bugs.webkit.org/show_bug.cgi?id=138940
Reviewed by Tim Horton.
* UIProcess/API/Cocoa/WKViewPrivate.h:
Declare -_handleClickInPreviewView:URL:.
* UIProcess/API/mac/WKView.mm:
(-[WKView _handleClickInPreviewView:URL:]):
Extracted from -[WKActionMenuController pagePreviewViewControllerWasClicked:].
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController pagePreviewViewControllerWasClicked:]):
Extract code to -[WKView _handleClickInPreviewView:URL:].
2014-11-20 Csaba Osztrogonác <ossy@webkit.org>
URTBF after r176420 to fix non Apple builds.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::shouldPlugInAutoStartFromOrigin):
2014-11-20 Anders Carlsson <andersca@apple.com>
WebPlugInClient::m_webPage can never be null, use a reference
https://bugs.webkit.org/show_bug.cgi?id=138937
Reviewed by Andreas Kling.
* WebProcess/WebCoreSupport/WebPlugInClient.cpp:
(WebKit::WebPlugInClient::WebPlugInClient):
(WebKit::WebPlugInClient::shouldAutoStartFromOrigin):
* WebProcess/WebCoreSupport/WebPlugInClient.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::shouldPlugInAutoStartFromOrigin):
* WebProcess/WebProcess.h:
2014-11-20 Tim Horton <timothy_horton@apple.com>
TextIndicator should have getters for TextIndicator::Data properties
https://bugs.webkit.org/show_bug.cgi?id=138920
Reviewed by Beth Dakin.
Instead of having clients reach into the data(), add getters.
Remove frameRect(), which is identical to the textBoundingRectInWindowCoordinates getter.
Remove declarations for draw/drawContentImage, which were already removed.
* Shared/TextIndicator.cpp:
(WebKit::TextIndicator::frameRect): Deleted.
* Shared/TextIndicator.h:
(WebKit::TextIndicator::textBoundingRectInWindowCoordinates):
(WebKit::TextIndicator::textRectsInBoundingRectCoordinates):
(WebKit::TextIndicator::contentImageScaleFactor):
(WebKit::TextIndicator::contentImageWithHighlight):
(WebKit::TextIndicator::contentImage):
* UIProcess/mac/TextIndicatorWindow.mm:
(-[WKTextIndicatorView initWithFrame:textIndicator:margin:]):
(-[WKTextIndicatorView presentWithCompletionHandler:]):
(WebKit::TextIndicatorWindow::setTextIndicator):
2014-11-20 Tim Horton <timothy_horton@apple.com>
Cancel DataDetectors menu earlier if we know it can't be presented
https://bugs.webkit.org/show_bug.cgi?id=138922
<rdar://problem/18950441>
Reviewed by Beth Dakin.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController willOpenMenu:withEvent:]):
If we end up with a menu with no items, don't change selection or anything.
(-[WKActionMenuController menuNeedsUpdate:]):
Move our call to shouldUseActionsWithContext earlier, to menuNeedsUpdate,
and use a bigger hammer (removeAllItems).
2014-11-20 Tim Horton <timothy_horton@apple.com>
Don't use a TextIndicator BounceAndCrossfade transition if the selection highlight is never shown
https://bugs.webkit.org/show_bug.cgi?id=138919
<rdar://problem/19042207>
Reviewed by Beth Dakin.
* Shared/TextIndicator.h:
(WebKit::TextIndicator::presentationTransition):
(WebKit::TextIndicator::setPresentationTransition):
Add getter and setter pair.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
If the selection highlight will never be shown because there's only a single menu item,
use a normal bounce animation instead of bounce + crossfade.
2014-11-20 Beth Dakin <bdakin@apple.com>
Invalid message WebPageProxy.DidPerformDictionaryLookup on Google stocks result
https://bugs.webkit.org/show_bug.cgi?id=138568
-and corresponding-
rdar://problem/18904600
Reviewed by Tim Horton.
Skip images for lookup.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performDictionaryLookupForRange):
2014-11-20 Daniel Bates <dabates@apple.com>
[iOS] Add more ENABLE({TOUCH_EVENTS, IOS_TOUCH_EVENTS})-guards in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=138928
Reviewed by Simon Fraser.
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView setupInteraction]):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didCommitLoad):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::sendTapHighlightForNodeIfNecessary):
2014-11-20 Anders Carlsson <andersca@apple.com>
Add -[WKWebView loadData:MIMEType:textEncodingName:baseURL:]
https://bugs.webkit.org/show_bug.cgi?id=138929
<rdar://problem/18683802>
Reviewed by Dan Bernstein.
Also, re-implement -[WKWebView loadHTMLString:baseURL:] in terms of this newly added function
and assume a UTF-8 encoding. This matches what Legacy WebKit does.
* UIProcess/API/Cocoa/WKWebView.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView loadHTMLString:baseURL:]):
(-[WKWebView loadData:MIMEType:textEncodingName:baseURL:]):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::loadData):
* UIProcess/WebPageProxy.h:
2014-11-20 Antti Koivisto <antti@apple.com>
Remove alignment code from cache coders
https://bugs.webkit.org/show_bug.cgi?id=138927
Failed to land this file.
* NetworkProcess/cache/NetworkCacheCoders.cpp:
(WebKit::NetworkCacheCoder<CString>::encode):
(WebKit::NetworkCacheCoder<CString>::decode):
(WebKit::NetworkCacheCoder<String>::encode):
(WebKit::decodeStringText):
(WebKit::NetworkCacheCoder<WebCore::CertificateInfo>::encode):
(WebKit::NetworkCacheCoder<WebCore::CertificateInfo>::decode):
* NetworkProcess/cache/NetworkCacheCoders.h:
2014-11-20 Antti Koivisto <antti@apple.com>
Remove alignment code from cache coders
https://bugs.webkit.org/show_bug.cgi?id=138927
Reviewed by Anders Carlsson.
Alignment code doesn't do anything useful, wastes space and produces wrong results
if the encoder and decoder buffers don't have the same 8-byte alignment.
* NetworkProcess/cache/NetworkCacheDecoder.cpp:
(WebKit::NetworkCacheDecoder::NetworkCacheDecoder):
(WebKit::NetworkCacheDecoder::bufferIsLargeEnoughToContain):
(WebKit::NetworkCacheDecoder::decodeFixedLengthData):
(WebKit::NetworkCacheDecoder::decodeNumber):
(WebKit::roundUpToAlignment): Deleted.
(WebKit::alignedBufferIsLargeEnoughToContain): Deleted.
(WebKit::NetworkCacheDecoder::alignBufferPosition): Deleted.
* NetworkProcess/cache/NetworkCacheDecoder.h:
(WebKit::NetworkCacheDecoder::currentOffset):
(WebKit::NetworkCacheDecoder::isInvalid):
(WebKit::NetworkCacheDecoder::markInvalid):
(WebKit::NetworkCacheDecoder::bufferIsLargeEnoughToContain):
* NetworkProcess/cache/NetworkCacheEncoder.cpp:
(WebKit::NetworkCacheEncoder::grow):
(WebKit::NetworkCacheEncoder::encodeFixedLengthData):
(WebKit::NetworkCacheEncoder::encodeNumber):
(WebKit::roundUpToAlignment): Deleted.
* NetworkProcess/cache/NetworkCacheEncoder.h:
2014-11-20 Csaba Osztrogonác <ossy@webkit.org>
[GTK] URTBF after r176363.
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::setTextIndicator):
* UIProcess/API/gtk/PageClientImpl.h:
2014-11-19 Yongjun Zhang <yongjun_zhang@apple.com>
Don't track sub-resources that are started after main frame progress has completed.
https://bugs.webkit.org/show_bug.cgi?id=138582
Reviewed by Sam Weinig.
After main frame progress has finished, starting loading a sub-resource shouldn't affect
UI process's view of page loading status (i.e., the page has already completed loading
and the progress shouldn't change). To achive that, don't track the subresources that
are started after the main frame has finished, except for those triggered by user interaction.
* WebProcess/WebCoreSupport/WebProgressTrackerClient.cpp: Notify WebPage that the main frame progress
has started or finished.
(WebKit::WebProgressTrackerClient::progressStarted):
(WebKit::WebProgressTrackerClient::progressFinished):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::addResourceRequest): Don't track the resource request if it is initiated after
the main frame is loaded and it is not triggered by user interaction.
(WebKit::WebPage::removeResourceRequest):
* WebProcess/WebPage/WebPage.h: Rename m_networkResourceRequestIdentifiers to m_trackedNetworkResourceRequestIdentifiers.
(WebKit::WebPage::setMainFrameProgressCompleted):
2014-11-19 Sun-woo Nam <sunny.nam@samsung.com>
[EFL] Fix build failure since r176363.
https://bugs.webkit.org/show_bug.cgi?id=138903
Reviewed by Gyuyoung Kim.
The parameter for animation on setTextIndicator() was removed on 'PageClient' class.
* UIProcess/CoordinatedGraphics/WebView.cpp:
(WebKit::WebView::setTextIndicator):
* UIProcess/CoordinatedGraphics/WebView.h:
2014-11-19 Timothy Horton <timothy_horton@apple.com>
Try to fix the iOS build
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::performDictionaryLookupForSelection):
(WebKit::WebPage::performDictionaryLookupForRange):
2014-11-19 Timothy Horton <timothy_horton@apple.com>
Fix the 32-bit build
* UIProcess/mac/TextIndicatorWindow.mm:
(WebKit::TextIndicatorWindow::setTextIndicator):
2014-11-19 Tim Horton <timothy_horton@apple.com>
Add an optional entry transition (from selection highlight) to TextIndicator
https://bugs.webkit.org/show_bug.cgi?id=138856
<rdar://problem/18840128>
Reviewed by Anders Carlsson.
* Shared/TextIndicator.cpp:
(WebKit::outsetIndicatorRectIncludingShadow):
(WebKit::TextIndicator::createWithRange):
(WebKit::snapshotSelectionWithHighlight):
(WebKit::TextIndicator::createWithSelectionInFrame):
(WebKit::TextIndicator::frameRect):
(WebKit::TextIndicator::Data::encode):
(WebKit::TextIndicator::Data::decode):
Remove TextIndicator::draw and related functions; drawing is handled entirely
by the TextIndicatorWindow now, and TextIndicator just stores the required data.
Unify outsetIndicatorRectIncludingShadow.
Add an argument to createWithRange/createWithSelectionInFrame to indicate
if the TextIndicator should transition from the selection highlight to
the yellow bubble.
If we're doing the transition, paint the selection into a second bitmap,
without forcing the text to black and without hiding the blue highlight.
Encode/decode the second bitmap.
* Shared/TextIndicator.h:
* UIProcess/mac/TextIndicatorWindow.h:
* UIProcess/mac/TextIndicatorWindow.mm:
(-[WKTextIndicatorView initWithFrame:textIndicator:margin:transitionFromSelectionColor:]):
(-[WKTextIndicatorView presentWithCompletionHandler:]):
(-[WKTextIndicatorView hideWithCompletionHandler:]):
(-[WKTextIndicatorView isFlipped]):
(WebKit::TextIndicatorWindow::TextIndicatorWindow):
(WebKit::TextIndicatorWindow::setTextIndicator):
(WebKit::TextIndicatorWindow::closeWindow):
(WebKit::TextIndicatorWindow::startFadeOutTimerFired):
Re-implement the bounce animation using CoreAnimation instead of
the WKSI-based WKWindowBounceAnimation*.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performDictionaryLookupForSelection):
(WebKit::WebPage::performDictionaryLookupOfCurrentSelection):
(WebKit::WebPage::performDictionaryLookupForRange):
(WebKit::WebPage::performActionMenuHitTestAtLocation):
* WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
Use the aforementioned transition animation for performDictionaryLookupOfCurrentSelection,
the context menu lookup item, and for Data Detectors.
2014-11-19 Anders Carlsson <andersca@apple.com>
Add a version of API::Data::createWithoutCopying that takes an NSData
https://bugs.webkit.org/show_bug.cgi?id=138893
Reviewed by Dan Bernstein.
* Shared/APIData.h:
* Shared/Cocoa/APIDataCocoa.mm: Added.
(API::Data::createWithoutCopying):
* UIProcess/API/Cocoa/WKBrowsingContextController.mm:
(-[WKBrowsingContextController loadData:MIMEType:textEncodingName:baseURL:userData:]):
(releaseNSData): Deleted.
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]):
2014-11-19 Beth Dakin <bdakin@apple.com>
Invoking an action menu on a selection should result in the text menu
https://bugs.webkit.org/show_bug.cgi?id=138892
-and corresponding-
rdar://problem/18996776
Reviewed by Tim Horton.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _defaultMenuItems]):
2014-11-19 Anders Carlsson <andersca@apple.com>
Fix iOS build.
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2014-11-19 Anders Carlsson <andersca@apple.com>
Rename two Cocoa-only .cpp files to .mm.
Rubber-stamped by Sam Weinig.
* Shared/APIWebArchive.mm: Renamed from Source/WebKit2/Shared/APIWebArchive.cpp.
* Shared/APIWebArchiveResource.mm: Renamed from Source/WebKit2/Shared/APIWebArchiveResource.cpp.
* WebKit2.xcodeproj/project.pbxproj:
2014-11-19 Beth Dakin <bdakin@apple.com>
Data detected results with no menu items should not fall through to regular text
action menus
https://bugs.webkit.org/show_bug.cgi?id=138887
-and corresponding-
rdar://problem/18971616
Reviewed by Tim Horton.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _defaultMenuItems]):
2014-11-19 Daniel Bates <dabates@apple.com>
[iOS] Make WebKit build with public iOS SDK
https://bugs.webkit.org/show_bug.cgi?id=136863
Reviewed by David Kilzer.
* NetworkProcess/cocoa/NetworkProcessCocoa.mm: Moved CFNetwork forward declarations
from this file to file CFNetworkSPI.h and included header CFNetworkSPI.h.
* NetworkProcess/mac/NetworkDiskCacheMonitor.mm: Ditto.
* NetworkProcess/mac/NetworkResourceLoaderMac.mm: Ditto.
* UIProcess/API/Cocoa/WKProcessPool.mm: Ditto.
* UIProcess/mac/WebContextMac.mm: Ditto.
* WebProcess/cocoa/WebProcessCocoa.mm: Ditto.
2014-11-19 Anders Carlsson <andersca@apple.com>
Add APIs for customizing the user agent
https://bugs.webkit.org/show_bug.cgi?id=138881
rdar://problem/17233981
Reviewed by Dan Bernstein.
* UIProcess/API/Cocoa/WKWebView.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
(-[WKWebView customUserAgent]):
(-[WKWebView setCustomUserAgent:]):
(-[WKWebView _customUserAgent]):
(-[WKWebView _setCustomUserAgent:]):
* UIProcess/API/Cocoa/WKWebViewConfiguration.h:
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(LazyInitialized::set):
(-[WKWebViewConfiguration copyWithZone:]):
(defaultApplicationNameForUserAgent):
(-[WKWebViewConfiguration applicationNameForUserAgent]):
(-[WKWebViewConfiguration setApplicationNameForUserAgent:]):
2014-11-19 Simon Fraser <simon.fraser@apple.com>
[WK2 UI-side compositing] Initialize RemoteLayerTreeTransaction properties which are unset on Mac
https://bugs.webkit.org/show_bug.cgi?id=138877
Reviewed by Tim Horton.
These data members are unused on Mac, but still encoded, so initialize them with
reasonable values.
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::RemoteLayerTreeTransaction):
2014-11-19 Enrica Casucci <enrica@apple.com>
Refactor iOS selection gestures.
https://bugs.webkit.org/show_bug.cgi?id=138720
rdar://problem/18964359
Reviewed by Benjamin Poulain.
This is a first step towards refactoring the selection gestures code.
It introduces more general selection movement functions that can be used to build
the gestures.
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(toWKTextGranularity):
(toWKSelectionDirection):
(-[WKContentView selectPositionAtPoint:completionHandler:]):
(-[WKContentView selectPositionAtBoundary:inDirection:fromPoint:completionHandler:]):
(-[WKContentView selectTextWithGranularity:atPoint:completionHandler:]):
(-[WKContentView beginSelectionInDirection:completionHandler:]):
(-[WKContentView updateSelectionWithExtentPoint:completionHandler:]):
(-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::selectTextWithGranularityAtPoint):
(WebKit::WebPageProxy::selectPositionAtBoundaryWithDirection):
(WebKit::WebPageProxy::selectPositionAtPoint):
(WebKit::WebPageProxy::beginSelectionInDirection):
(WebKit::WebPageProxy::updateSelectionWithExtentPoint):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::selectWithGesture):
(WebKit::WebPage::visiblePositionInFocusedNodeForPoint):
(WebKit::WebPage::selectPositionAtPoint):
(WebKit::WebPage::selectPositionAtBoundaryWithDirection):
(WebKit::WebPage::selectTextWithGranularityAtPoint):
(WebKit::WebPage::beginSelectionInDirection):
(WebKit::WebPage::updateSelectionWithExtentPoint):
2014-11-19 Simon Fraser <simon.fraser@apple.com>
[WK2 UI-side Compositing] Fix the position and scroll indicator of the UI-side tiled scrolling indicator
https://bugs.webkit.org/show_bug.cgi?id=138876
Reviewed by Beth Dakin.
Fix the position of the tiled scrolling indicator in MiniBrowser by taking top
content offset into account.
On Mac, pass the current scroll position back to the UI process via the RemoteLayerTreeTransaction
so that we can use it to show the correctly scroll offset in the indicator. This is temporary until
Mac does UI-side scrolling.
* Shared/mac/RemoteLayerTreeTransaction.h:
(WebKit::RemoteLayerTreeTransaction::scrollPosition):
(WebKit::RemoteLayerTreeTransaction::setScrollPosition):
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::encode):
(WebKit::RemoteLayerTreeTransaction::decode):
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
(WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorLocation):
(WebKit::RemoteLayerTreeDrawingAreaProxy::updateDebugIndicator):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::willCommitLayerTree):
2014-11-19 Michael Catanzaro <mcatanzaro@igalia.com>
[GTK] Error in documentation of webkit_print_operation_get_page_setup()
https://bugs.webkit.org/show_bug.cgi?id=138868
Reviewed by Carlos Garcia Campos.
Fix copypaste error in documentation of
webkit_print_operation_get_page_setup().
* UIProcess/API/gtk/WebKitPrintOperation.cpp:
2014-11-19 Mark Rowe <mrowe@apple.com>
Remove an unused file.
* version.plist: Removed.
2014-11-18 Benjamin Poulain <bpoulain@apple.com>
[WK2] Remove the minimalUI code from the UIProcess
https://bugs.webkit.org/show_bug.cgi?id=138819
Reviewed by Sam Weinig.
It looks like the only interface we have to keep alive is
[WKWebView _overrideLayoutParametersWithMinimumLayoutSize:minimumLayoutSizeForMinimalUI:maximumUnobscuredSizeOverride:].
Clean up everything else, it is a pile of useless code.
* UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didCommitLoadForMainFrame]):
(-[WKWebView _didCommitLayerTree:]):
(-[WKWebView _frameOrBoundsChanged]):
(-[WKWebView _didRelaunchProcess]):
(-[WKWebView _beginAnimatedResizeWithUpdates:]):
(-[WKWebView _overrideLayoutParametersWithMinimumLayoutSize:minimumLayoutSizeForMinimalUI:maximumUnobscuredSizeOverride:]):
(-[WKWebView _overrideLayoutParametersWithMinimumLayoutSize:maximumUnobscuredSizeOverride:]):
(-[WKWebView _setUsesMinimalUI:]): Deleted.
(-[WKWebView _usesMinimalUI]): Deleted.
(activeMinimumLayoutSizeForMinimalUI): Deleted.
(-[WKWebView _setMinimumLayoutSizeOverrideForMinimalUI:]): Deleted.
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/API/ios/WKViewIOS.mm:
(-[WKView _frameOrBoundsChanged]):
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::setUsesMinimalUI): Deleted.
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::dynamicViewportSizeUpdate):
(WebKit::WebPageProxy::setViewportConfigurationMinimumLayoutSizeForMinimalUI): Deleted.
(WebKit::WebPageProxy::setUsesMinimalUI): Deleted.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::viewportPropertiesDidChange):
(WebKit::WebPage::dynamicViewportSizeUpdate):
(WebKit::WebPage::setViewportConfigurationMinimumLayoutSizeForMinimalUI): Deleted.
2014-11-18 Conrad Shultz <conrad_shultz@apple.com>
Unreviewed. Revision to the build fix in r176304.
The guarded method should simply be in the !TARGET_OS_IPHONE block.
* UIProcess/API/Cocoa/WKViewPrivate.h:
2014-11-18 Benjamin Poulain <bpoulain@apple.com>
iOS8 new "slow tap" heuristic fires mouse compat events despite preventDefault on touchend
https://bugs.webkit.org/show_bug.cgi?id=137069
rdar://problem/18481464
Reviewed by Simon Fraser.
On WebKit2, we let UIWebTouchEventsGestureRecognizer and _UIWebHighlightLongPressGestureRecognizer
run concurrently. This causes a race with an incorrect behavior:
1) If UIWebTouchEventsGestureRecognizer does not cancel the native gestures on start.
2) _UIWebHighlightLongPressGestureRecognizer starts after highlightDelay.
3) When the finger leaves the screen, both gestures end.
-> If the touch end sent to JavaScript in [3] ask the priority over native events, that no longer stops
the _UIWebHighlightLongPressGestureRecognizer.
The two gesture recognizers can run in any order, there is no guarantee on which one runs first.
To solve the bug, I must make sure the _UIWebHighlightLongPressGestureRecognizer never trigger a click
if the page wants the event.
To solve the order problem, I use the fact that event recognition goes in two phases for
non cancelled events:
1) Update the gesture recognizers.
2) Trigger the actions.
I do not know the order of recognizers in [1], but I know both have run before [2] is executed.
I use that to stop _UIWebHighlightLongPressGestureRecognizer from ending with a click in the case of the bug:
1) When _UIWebHighlightLongPressGestureRecognizer starts, I set _highlightLongPressCanClick signaling
the gesture can end normally. This is done on a timer and not direct input so I don't really have to worry
about a race here.
2) When processing the touch event for UIWebTouchEventsGestureRecognizer, I reset the flag _highlightLongPressCanClick
if the page wants the event.
3) When the actions of _UIWebHighlightLongPressGestureRecognizer are processed, the touch event
has already been processed by the page and the flag has been cleared if needed.
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _webTouchEvent:preventsNativeGestures:]):
(-[WKContentView _highlightLongPressRecognized:]):
2014-11-18 Ryosuke Niwa <rniwa@webkit.org>
iOS build fix after r176299. This method is not defined in WKViewIOS.mm.
* UIProcess/API/Cocoa/WKViewPrivate.h:
2014-11-18 David Kilzer <ddkilzer@apple.com>
FeatureDefines.xcconfig: Switch from using PLATFORM_NAME to SDK selectors
<http://webkit.org/b/138813>
Reviewed by Mark Rowe.
* Configurations/FeatureDefines.xcconfig: Switch to using SDK
selectors.
2014-11-18 Conrad Shultz <conrad_shultz@apple.com>
Give clients a way to cancel preview popovers
https://bugs.webkit.org/show_bug.cgi?id=138855
Reviewed by Tim Horton.
Promote -[WKView _dismissActionMenuPopovers] from internal to private.
* UIProcess/API/Cocoa/WKViewPrivate.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView _dismissActionMenuPopovers]):
* UIProcess/API/mac/WKViewInternal.h:
2014-11-18 Chris Dumez <cdumez@apple.com>
Add a setting to toggle DOMTimer throttling support
https://bugs.webkit.org/show_bug.cgi?id=138844
<rdar://problem/19020874>
Reviewed by Andreas Kling.
Add a setting to disable DOM timers throttling, in order to help
developers determine if a specific issue is caused by timer
throttling.
* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetDOMTimersThrottlingEnabled):
(WKPreferencesGetDOMTimersThrottlingEnabled):
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
2014-11-18 Geoffrey Garen <ggaren@apple.com>
Removed the custom allocator for ListHashSet nodes
https://bugs.webkit.org/show_bug.cgi?id=138841
Reviewed by Andreas Kling.
Uses of ListHashSet no longer need to declare an inline capacity,
since that was only used to specify the capacity of the custom allocator.
* UIProcess/Plugins/PluginInfoStore.cpp:
(WebKit::PluginInfoStore::loadPluginsIfNecessary):
2014-11-18 Eric Carlson <eric.carlson@apple.com>
Unreviewed build fix after r176283.
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2014-11-18 Tim Horton <timothy_horton@apple.com>
Avoid re-encoding action menu image data
https://bugs.webkit.org/show_bug.cgi?id=138817
<rdar://problem/18840382>
Reviewed by Anders Carlsson.
* Shared/mac/ActionMenuHitTestResult.h:
* Shared/mac/ActionMenuHitTestResult.mm:
(WebKit::ActionMenuHitTestResult::encode):
(WebKit::ActionMenuHitTestResult::decode):
Store and encode a SharedMemory with the raw encoded image data,
instead of re-painting the image into a ShareableBitmap.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _hitTestResultImage]):
(-[WKActionMenuController _defaultMenuItemsForImage]):
(-[WKActionMenuController _copyImage:]):
(-[WKActionMenuController _addImageToPhotos:]):
(-[WKActionMenuController _defaultMenuItems]):
(-[WKActionMenuController _canAddMediaToPhotos]): Deleted.
Build a temporary filename from a UUID and the image's desired extension.
Use the Image's encoded data instead of re-encoding it with CGImageDestination.
Build an image menu only if we have an image, URL, data, and extension.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performActionMenuHitTestAtLocation):
2014-11-18 Eric Carlson <eric.carlson@apple.com>
[iOS] allow host application to opt-out of alternate fullscreen
https://bugs.webkit.org/show_bug.cgi?id=138787
Reviewed by Sam Weinig.
"allowsAlternateFullscreen" doesn't need to be in the public WKWebView header.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]): allowsAlternateFullscreen -> _allowsAlternateFullscreen.
* UIProcess/API/Cocoa/WKWebViewConfiguration.h: Remove allowsAlternateFullscreen.
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration _allowsAlternateFullscreen]): New.
(-[WKWebViewConfiguration _setAllowsAlternateFullscreen:]): New.
* UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h: Declare _allowsAlternateFullscreen.
2014-11-18 Myles C. Maxfield <mmaxfield@apple.com>
Subclass CachedFont for SVG fonts
https://bugs.webkit.org/show_bug.cgi?id=138686
Reviewed by Simon Fraser.
Re-landing due to flakey bots.
Update for enum type.
* WebProcess/Network/WebResourceLoadScheduler.cpp:
(WebKit::maximumBufferingTime):
2014-11-18 Chris Dumez <cdumez@apple.com>
Update the Vector API to deal with unsigned types instead of size_t
https://bugs.webkit.org/show_bug.cgi?id=138824
Reviewed by Andreas Kling.
Update code base to fix build errors related to the typing changes
in the Vector API (size_t -> unsigned).
* Platform/IPC/ArgumentCoders.h:
* Platform/IPC/DataReference.h:
2014-11-18 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r176264.
https://bugs.webkit.org/show_bug.cgi?id=138837
caused many test failures (Requested by litherum on #webkit).
Reverted changeset:
"Subclass CachedFont for SVG fonts"
https://bugs.webkit.org/show_bug.cgi?id=138686
http://trac.webkit.org/changeset/176264
2014-11-18 Daniel Bates <dabates@apple.com>
[iOS] Libdispatch, Dyld, IOKit, Mach, NSPointerFunctions, MobileGestalt
SPI are not available in public SDK
https://bugs.webkit.org/show_bug.cgi?id=138802
Reviewed by David Kilzer.
Include headers DispatchSPI.h and MachVMSPI.h.h instead of including
libdispatch and Mach headers directly.
* Platform/mac/SharedMemoryMac.cpp:
* UIProcess/ios/WebMemoryPressureHandlerIOS.mm:
2014-11-18 Myles C. Maxfield <mmaxfield@apple.com>
Subclass CachedFont for SVG fonts
https://bugs.webkit.org/show_bug.cgi?id=138686
Reviewed by Simon Fraser.
Update for enum type.
* WebProcess/Network/WebResourceLoadScheduler.cpp:
(WebKit::maximumBufferingTime):
2014-11-18 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add API to create a WebKitWebContext
https://bugs.webkit.org/show_bug.cgi?id=138826
Reviewed by Gustavo Noronha Silva.
We have always used a default web context without providing API to
create others. The main reason was that nobody requested it and we
haven't needed it either. The main problem of the default web
context is that you can't configure anything during
construction. This hasn't been a problem so far because all the
web context configuration we expose in the API can be configured
after construction. But now we need to expose API to allow the
user to configure the local storage directory, which is a
construct only configuration. The default web context was also a
problem for our unit tests, because sharing the same context made
it difficult to ensure tests cases are independent to each other.
* UIProcess/API/gtk/WebKitGeolocationProvider.cpp:
(WebKitGeolocationProvider::~WebKitGeolocationProvider): Reset the
provider to avoid crashes when web context is destroyed and a new
one is created.
* UIProcess/API/gtk/WebKitWebContext.cpp:
(webkitWebContextConstructed): Add constructed implementation to
create the WebContext and initialize it.
(webkitWebContextDispose): Detach web context clients to avoid
crashes when a client callback is called on a disposed WebKitWebContext.
(webkit_web_context_class_init): Initialize gettext, add
constructed implementation and add the pointer to the vmethods
when creating signals.
(createDefaultWebContext): Simply create a WebKitWebContext.
(webkit_web_context_new): New public method to create a WebKitWebContext.
(injectedBundleFilename): Deleted.
* UIProcess/API/gtk/WebKitWebContext.h: Add virtual methods for
signals, so that users can inherit from WebKitWebContext and
override the virtual methods.
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbol.
2014-11-18 Carlos Alberto Lopez Perez <clopez@igalia.com>
[SOUP] [GnuTLS] Don't use a SSL3.0 record version in client hello.
https://bugs.webkit.org/show_bug.cgi?id=138794
Reviewed by Sergio Villar Senin.
It seems that following POODLE many sites incorrectly banned SSL 3.0
record packet versions. Since GnuTLS uses a SSL 3.0 record to
advertise TLS 1.2, they are effectively banning it even if it doesn't
advertise SSL 3.0. That is a server issue, but it can be worked around
by using the modifier %LATEST_RECORD_VERSION.
With this modifier, GnuTLS will use the latest TLS version record
in client hello instead of using the default SSL 3.0.
* NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp:
(main):
* WebProcess/EntryPoint/unix/WebProcessMain.cpp:
(main):
2014-11-17 Conrad Shultz <conrad_shultz@apple.com>
Page previews should be loaded sooner
https://bugs.webkit.org/show_bug.cgi?id=138814
Reviewed by Tim Horton.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController willOpenMenu:withEvent:]):
Send -_createPreviewPopover..
(-[WKActionMenuController _previewURLFromActionMenu:]):
Relocate some logic to the new -_createPreviewPopover; gate early return on popover visibility.
(-[WKActionMenuController _createPreviewPopover]):
Renamed from -_createPreviewPopoverForURL:originRect:; explicitly send -loadView to warm up the preview view.
(-[WKActionMenuController _createPreviewPopoverForURL:originRect:]): Deleted.
2014-11-17 Beth Dakin <bdakin@apple.com>
Preview is sometimes dismissed too early
https://bugs.webkit.org/show_bug.cgi?id=138811
-and corresponding-
rdar://problem/18900839
Reviewed by Tim Horton.
Dont make the popover transient until didCloseMenu: time.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController didCloseMenu:withEvent:]):
(-[WKActionMenuController _createPreviewPopoverForURL:originRect:]):
2014-11-17 Daniel Bates <dabates@apple.com>
Unreviewed, rolling out r176232.
Broke the Mac build. Will investigate offline.
Reverted changeset:
"[iOS] Libdispatch, Dyld, IOKit, Mach, NSPointerFunctions,
MobileGestalt"
https://bugs.webkit.org/show_bug.cgi?id=138802
http://trac.webkit.org/changeset/176232
2014-11-17 Daniel Bates <dabates@apple.com>
[iOS] Libdispatch, Dyld, IOKit, Mach, NSPointerFunctions, MobileGestalt
SPI are not available in public SDK
https://bugs.webkit.org/show_bug.cgi?id=138802
Reviewed by David Kilzer.
Include headers DispatchSPI.h and MachVMSPI.h.h instead of including
libdispatch and Mach headers directly.
* Platform/mac/SharedMemoryMac.cpp:
* UIProcess/ios/WebMemoryPressureHandlerIOS.mm:
2014-11-17 Daniel Bates <dabates@apple.com>
[iOS] CoreText and CoreUI SPI are not available in public SDK
https://bugs.webkit.org/show_bug.cgi?id=138760
Reviewed by David Kilzer.
Include header CoreTextSPI.h instead of including CoreText private headers.
* WebProcess/WebPage/WebPage.cpp:
2014-11-17 Tim Horton <timothy_horton@apple.com>
DataDetectors PageOverlay callbacks can come in to the wrong overlay
https://bugs.webkit.org/show_bug.cgi?id=138801
<rdar://problem/18991369>
Reviewed by Anders Carlsson.
We can call dataDetectorsDidHideUI on the wrong (or no) PageOverlay,
because it's possible to have another performActionMenuHitTestAtLocation
between the first one and the dataDetectorsDid*UI that correspond to it.
To make sure that the callbacks come to the right PageOverlay, plumb
an integer ID through all of the callbacks and find the overlay based on that.
* Shared/mac/ActionMenuHitTestResult.h:
Store the ID of the PageOverlay that overrode data detection.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
Send the ID back to the Web process when replying from DD callbacks.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performActionMenuHitTestAtLocation):
Store the ID of the PageOverlay that overrode data detection instead of
keeping the PageOverlay itself.
(WebKit::WebPage::dataDetectorsDidPresentUI):
(WebKit::WebPage::dataDetectorsDidChangeUI):
(WebKit::WebPage::dataDetectorsDidHideUI):
Find and reply to the correct page overlay.
2014-11-17 Beth Dakin <bdakin@apple.com>
Whitespace action menus should focus the HitTestResult and create an insertion
point
https://bugs.webkit.org/show_bug.cgi?id=138786
-and corresponding-
rdar://problem/18944893
Reviewed by Tim Horton.
Whitespace menus should cause the HitTestResult to be focused, and they should set
the selection based on the HitTest location.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::focusAndSelectLastActionMenuHitTestResult):
* UIProcess/WebPageProxy.h:
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController isMenuForTextContent]):
(-[WKActionMenuController willOpenMenu:withEvent:]):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performActionMenuHitTestAtLocation):
(WebKit::WebPage::focusAndSelectLastActionMenuHitTestResult):
2014-11-17 Daniel Bates <dabates@apple.com>
[iOS] AVKit and MediaPlayer SPI are not available in public SDK
https://bugs.webkit.org/show_bug.cgi?id=138756
Reviewed by Eric Carlson.
Include header MPAVRoutingControllerSPI.h instead of including the
private header MPAVRoutingController.h.
Additionally, sort the list of #import directives.
* UIProcess/ios/forms/WKAirPlayRoutePicker.mm:
2014-11-17 Daniel Bates <dabates@apple.com>
[iOS] QuartzCore SPI not available in public SDK
https://bugs.webkit.org/show_bug.cgi?id=138751
Reviewed by David Kilzer.
* Shared/mac/RemoteLayerBackingStore.mm: Move CALayer forward declaration
from this file to file QuartzCoreSPI.h and include header QuartzCoreSPI.h.
* Shared/mac/RemoteLayerTreePropertyApplier.mm: Ditto.
* UIProcess/API/Cocoa/WKWebView.mm: Include header QuartzCoreSPI.h instead
of including QuartzCore headers directly.
* UIProcess/ios/ViewGestureControllerIOS.mm: Ditto.
* UIProcess/ios/WKContentView.mm: Ditto.
* UIProcess/ios/WKPDFPageNumberIndicator.mm: Ditto.
* UIProcess/mac/ViewGestureControllerMac.mm: Move CAFilter forward declarations
from this file to fileQuartzCoreSPI.h and include header QuartzCoreSPI.h.
Also sort the list of #import directives.
* UIProcess/mac/ViewSnapshotStore.mm: Include header QuartzCoreSPI.h
instead of including QuartzCore headers directly.
2014-11-17 Eric Carlson <eric.carlson@apple.com>
[iOS] allow host application to opt-out of alternate fullscreen
https://bugs.webkit.org/show_bug.cgi?id=138787
Reviewed by Darin Adler.
* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetAllowsAlternateFullscreen):
(WKPreferencesGetAllowsAlternateFullscreen):
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
* UIProcess/API/Cocoa/WKWebViewConfiguration.h:
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration init]):
(-[WKWebViewConfiguration copyWithZone:]):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
2014-11-16 Benjamin Poulain <bpoulain@apple.com>
Start cleaning up minimal UI from WKWebView
https://bugs.webkit.org/show_bug.cgi?id=138725
Reviewed by Sam Weinig.
Start removing the old update path for minimumLayoutSize/maximumUnobscuredSize.
Unfortunately, I cannot remove everything yet because the clients still did not have
alternatives to [_overrideLayoutParametersWithMinimumLayoutSize:minimumLayoutSizeForMinimalUI:maximumUnobscuredSizeOverride]
and might change the minimal UI options.
This patch adds [_overrideLayoutParametersWithMinimumLayoutSize:maximumUnobscuredSizeOverride] to move
in the right direction. Next we'll udpate the client code and get rid of all the useless code.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _overrideLayoutParametersWithMinimumLayoutSize:minimumLayoutSizeForMinimalUI:maximumUnobscuredSizeOverride:]):
(-[WKWebView _overrideLayoutParametersWithMinimumLayoutSize:maximumUnobscuredSizeOverride:]):
(-[WKWebView _minimumLayoutSizeOverrideForMinimalUI]): Deleted.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
2014-11-16 Zan Dobersek <zdobersek@igalia.com>
[TexMap] Add typecasting support for GraphicsLayerTextureMapper
https://bugs.webkit.org/show_bug.cgi?id=138741
Reviewed by Martin Robinson.
Replace uses of toTextureMapperLayer() with downcasting and
calling the GraphicsLayerTextureMapper::layer() method.
* WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
(WebKit::LayerTreeHostGtk::initialize):
(WebKit::LayerTreeHostGtk::layerFlushTimerFired):
(WebKit::LayerTreeHostGtk::compositeLayersToContext):
2014-11-16 Tim Horton <timothy_horton@apple.com>
Use TextIndicator instead of the built in Lookup highlight
https://bugs.webkit.org/show_bug.cgi?id=138775
<rdar://problem/18953982>
Follow-up to r176164.
* UIProcess/API/mac/WKView.mm:
(-[WKView dealloc]):
(-[WKView initWithFrame:context:configuration:webView:]):
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::didPerformDictionaryLookup):
Include the softlinking macros directly in the files they're used
in, as they're supposed to be used.
2014-11-16 Tim Horton <timothy_horton@apple.com>
Use TextIndicator instead of the built in Lookup highlight
https://bugs.webkit.org/show_bug.cgi?id=138775
<rdar://problem/18953982>
Reviewed by Anders Carlsson.
In order to make the yellow highlight for Lookup more accurately match the
painted content of the web page (in light of e.g. Web fonts, and interesting
text features that only WebKit implements and cannot round-trip through
NSAttributedString), use a TextIndicator instead of the built-in Lookup
highlight where possible.
* Configurations/BaseTarget.xcconfig:
Make it possible to include headers from private frameworks. This matches WebCore.
* Shared/DictionaryPopupInfo.cpp:
(WebKit::DictionaryPopupInfo::encode):
(WebKit::DictionaryPopupInfo::decode):
* Shared/DictionaryPopupInfo.h:
Include the attributed string inside the DictionaryPopupInfo, instead of
as a secondary argument to DidPerformDictionaryLookup.
Add a TextIndicator to DictionaryPopupInfo, which can be used to highlight
the text in the UI process.
* UIProcess/API/mac/WKView.mm:
(-[WKView dealloc]):
(-[WKView viewDidMoveToWindow]):
(-[WKView _dictionaryLookupPopoverWillClose:]):
(-[WKView _setTextIndicator:fadeOut:animate:animationCompletionHandler:]):
(-[WKView _setTextIndicator:fadeOut:animate:]):
(-[WKView initWithFrame:context:configuration:webView:]):
(+[WKView hideWordDefinitionWindow]):
* UIProcess/API/mac/WKViewInternal.h:
Adopt the Lookup SPI header.
If we have the requisite API, register the notification that Lookup sends
when the popover closes, and hook that up to hide the text indicator.
Add a version of _setTextIndicator: that takes an animation completion handler.
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::didPerformDictionaryLookup):
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::didPerformDictionaryLookup):
Adjust to the new didPerformDictionaryLookup signature.
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
Remove a WKSI import.
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::didPerformDictionaryLookup):
If we have the requisite API, disable Lookup's built-in highlight and
present a TextIndicator instead.
We currently have to run the animations serially (first bounce the TextIndicator,
then animate in the Lookup popover) because the act of adding the Lookup popover
blocks us from getting any animation events for the TextIndicator, and breaks
the bounce. We could also fix this by using a threaded animation for the TextIndicator,
but it's not clear that it's safe to do so.
(WebKit::PageClientImpl::dismissDictionaryLookupPanel):
When explicitly dismissing the Lookup panel, also hide the text indicator.
* UIProcess/mac/TextIndicatorWindow.h:
* UIProcess/mac/TextIndicatorWindow.mm:
(WebKit::TextIndicatorWindow::setTextIndicator):
Store the completion handler.
(WebKit::TextIndicatorWindow::bounceAnimationDidEnd):
Call the completion handler when the animation completes.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _createActionMenuItemForTag:]):
Disable the Lookup item if lookup is not available.
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::showDefinitionForAttributedString):
Adjust to the new didPerformDictionaryLookup signature.
Since PDFPlugin can't trivially repaint the required part of the PDF,
we don't build a TextIndicator. This will result in PDFPlugin continuing
to use Lookup's built-in highlight.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performDictionaryLookupForRange):
Build a TextIndicator from the Lookup range and pass it along with
the DictionaryPopupInfo.
2014-11-15 David Kilzer <ddkilzer@apple.com>
REGRESSION (r176137): iOS build broke after moving DataDetectors scanning code to WebCore
This regressed with the following commit:
Move DataDetectors scanning code to WebCore
https://bugs.webkit.org/show_bug.cgi?id=138731
<rdar://problem/18877535>
* Shared/mac/ActionMenuHitTestResult.mm: Add PLATFORM(MAC) check
around the entire implementation since it it unused on iOS.
2014-11-14 Anders Carlsson <andersca@apple.com>
Raise an exception if -[WKWebView initWithFrame:configuration:] is passed a nil configuration
https://bugs.webkit.org/show_bug.cgi?id=138757
Reviewed by Simon Fraser.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
2014-11-15 Carlos Garcia Campos <cgarcia@igalia.com>
Network process crash when running http/tests/appcache/fallback.html
https://bugs.webkit.org/show_bug.cgi?id=138740
Reviewed by Alexey Proskuryakov.
It happens because ResourceHandle::continueWillSendRequest() is
called with a null request. We could handle that case in the
ResourceHandle, but the thing is tha the behaviour is
not the same for async loads, or when loading in the web
process. In WebResourceLoader::willSendRequest(),
ResourceRequest::willSendRequest() is called, and cancels the load
if the client returns a null request. In this case, the
ResourceLoader is detached and WebResourceLoader::willSendRequest()
returns early without sending the ContinueWillSendRequest message
to the network process. However, for synchronous loads,
NetworkResourceLoader::continueWillSendRequest() is always called.
Fixes http/tests/appcache/fallback.html for GTK port when using
the network process.
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::continueWillSendRequest): Do not
call ResourceHandle::continueWillSendRequest() if the client
request is null, since the load is going to be cancelled.
2014-11-15 Tim Horton <timothy_horton@apple.com>
Implement data detectors and mailto action menus for WebKit1
https://bugs.webkit.org/show_bug.cgi?id=138765
<rdar://problem/18877535>
Reviewed by Beth Dakin.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _defaultMenuItemsForMailtoLink]):
2014-11-14 Tim Horton <timothy_horton@apple.com>
Remove pre-[DDActionContext contextForView:...] fallback path
https://bugs.webkit.org/show_bug.cgi?id=138735
<rdar://problem/18982046>
Reviewed by Simon Fraser.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController willOpenMenu:withEvent:]):
(-[WKActionMenuController didCloseMenu:withEvent:]):
(-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
(hasDataDetectorsCompletionAPI): Deleted.
Remove the now-unnecessary fallback path.
2014-11-14 Tim Horton <timothy_horton@apple.com>
Frequent crashes under actionContextForResultAtPoint
https://bugs.webkit.org/show_bug.cgi?id=138761
<rdar://problem/18990684>
Reviewed by Dean Jackson.
* WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
(PageOverlayClientImpl::actionContextForResultAtPoint):
Initialize apiRange.
2014-11-14 Daniel Bates <dabates@apple.com>
[iOS] CoreGraphics SPI not available in public SDK
https://bugs.webkit.org/show_bug.cgi?id=138709
Reviewed by David Kilzer.
Include header CoreGraphicsSPI.h instead of including headers of
CoreGraphics directly.
* UIProcess/API/Cocoa/WKWebView.mm:
* UIProcess/ios/WKScrollView.mm:
2014-11-14 Tim Horton <timothy_horton@apple.com>
Move DataDetectors scanning code to WebCore
https://bugs.webkit.org/show_bug.cgi?id=138731
<rdar://problem/18877535>
Reviewed by Anders Carlsson.
Move DataDetectors scanning code to WebCore, so that both WebKits can use it.
* Shared/TextIndicator.cpp:
(WebKit::TextIndicator::createWithRange):
Move createWithRange in from WebPageMac's textIndicatorForRange.
(WebKit::TextIndicator::createWithSelectionInFrame):
* Shared/TextIndicator.h:
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::createSelectionSnapshot):
* WebProcess/WebPage/WebFrame.h:
Constify some things.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performActionMenuHitTestAtLocation):
Avoid using the DD result if it didn't come with a non-null Range.
Make use of detectItemAroundHitTestResult and TextIndicator::createWithRange.
(WebKit::scanForDataDetectedItems): Deleted.
(WebKit::textIndicatorForRange): Deleted.
Moved these two to other places.
2014-11-14 Dan Bernstein <mitz@apple.com>
<rdar://problem/18978497> Wrong (off-by-1) navigation snapshots shown after a mix of gesture and button back/forward navigation
https://bugs.webkit.org/show_bug.cgi?id=138753
Reviewed by Tim Horton.
Rather than having the UI process record a snapshot jut before the Web Content processs
notion of its current back/forward list item changes, have the UI process record a snapshot
right before its own current back/forward list item changes. This ensures that the right
snapshot gets attached to the right item in the UI process.
* UIProcess/WebBackForwardList.cpp:
(WebKit::WebBackForwardList::addItem): If there is a current item, record a navigation
snapshot of it before making the new item current.
(WebKit::WebBackForwardList::goToItem): If there is a current item, record a navigation
snapshot of it before making another item current.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::willChangeCurrentHistoryItemForMainFrame): Deleted.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in: Removed willChangeCurrentHistoryItemForMainFrame
message.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::willChangeCurrentHistoryItem): Deleted.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h: Removed declaration of
willChangeCurrentHistoryItem override.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::willChangeCurrentHistoryItemForMainFrame): Deleted.
* WebProcess/WebPage/WebPage.h:
2014-11-14 Dan Bernstein <mitz@apple.com>
Add some tracing to help investigating <rdar://problem/18905383> [iOS] Crash due to null m_webPageProxyForBackForwardListForCurrentSwipe in ViewGestureController::endSwipeGesture
https://bugs.webkit.org/show_bug.cgi?id=138750
Reviewed by Tim Horton.
Emit trace messages at various points, and log them prior to crashing if the error condition
occurs. Otherwise, clear the trace messages.
* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::addLogEntry): Helper function that adds a message, including a time stamp and a
backtrace, to m_logEntries.
(WebKit::dumpLogEntries): Helper function that logs everything in m_logEntries.
(WebKit::ViewGestureController::beginSwipeGesture): Add a log entry.
(WebKit::ViewGestureController::endSwipeGesture): If
m_webPageProxyForBackForwardListForCurrentSwipe is null, dump the log entries just before
crashing. Otherwise, clear m_logEntries.
(WebKit::ViewGestureController::willCommitPostSwipeTransitionLayerTree): Add a log entry.
(WebKit::ViewGestureController::removeSwipeSnapshot): Add a log entry.
* UIProcess/mac/ViewGestureController.h: Defined ENABLE_VIEW_GESTURE_CONTROLLER_TRACING,
and added m_logEntries member variable.
2014-11-14 Beth Dakin <bdakin@apple.com>
URLs for some videos are not valid URLs, should not be exposed to action menu
https://bugs.webkit.org/show_bug.cgi?id=138746
-and corresponding-
rdar://problem/18941927
Reviewed by Tim Horton.
If the video cannot be downloaded, that is also an indication that the URL of the
video will not be valid on its own. In these cases, we should share or copy the
main pages URL.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _defaultMenuItemsForVideo]):
(-[WKActionMenuController _copyVideoURL:]):
2014-11-14 Carlos Garcia Campos <cgarcia@igalia.com>
[SOUP] Encode/Decode allowCookies in ResourceRequest
https://bugs.webkit.org/show_bug.cgi?id=138730
Reviewed by Sergio Villar Senin.
We are not sending this information to the network process, making
cookies always available. Fixes
http/tests/xmlhttprequest/cross-origin-no-authorization.html when
network process is enabled.
* Shared/soup/WebCoreArgumentCodersSoup.cpp:
(IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
(IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
2014-11-14 Zan Dobersek <zdobersek@igalia.com>
Unreviewed build fix for the GTK+ port using Clang.
* UIProcess/gtk/RedirectedXCompositeWindow.h: Include the <functional>
header for the use of std::function<>.
2014-11-13 Dan Bernstein <mitz@apple.com>
Two WKWebView internal methods are implemented in a category
https://bugs.webkit.org/show_bug.cgi?id=138728
Reviewed by Tim Horton.
Moved the implementations from the category to the class.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _ignoresNonWheelMouseEvents]):
(-[WKWebView _setIgnoresNonWheelMouseEvents:]):
2014-11-13 Myles C. Maxfield <mmaxfield@apple.com>
Move FontMac and FontCacheMac off of WKSI
https://bugs.webkit.org/show_bug.cgi?id=138633
Reviewed by Simon Fraser.
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
* mac/WebKit2.order:
2014-11-13 Eric Carlson <eric.carlson@apple.com>
Context menus should not offer the "Download video" option for videos that cannot
be downloaded
https://bugs.webkit.org/show_bug.cgi?id=138530
-and corresponding-
rdar://problem/18919130
Reviewed by Tim Horton.
Expose isDownloadableMedia() to the InjectedBundleHitTestResult.
* WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp:
(WKBundleHitTestResultIsDownloadableMedia):
* WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h:
* WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
(WebKit::InjectedBundleHitTestResult::isDownloadableMedia):
* WebProcess/InjectedBundle/InjectedBundleHitTestResult.h:
2014-11-13 Daniel Bates <dabates@apple.com>
[iOS] NSGeometry data types are not available in the public SDK
https://bugs.webkit.org/show_bug.cgi?id=137536
Reviewed by David Kilzer.
Substitute header WAKAppKitStubs.h for NSGeometry.h as the latter is a
private header.
* Shared/ios/NativeWebTouchEventIOS.mm:
2014-11-13 Simon Fraser <simon.fraser@apple.com>
[WK2] Fire a layout milestone on session restore based on render tree size
https://bugs.webkit.org/show_bug.cgi?id=138711
rdar://problem/16033854
Reviewed by Anders Carlsson.
Add a session-restore layout milestone which fires after restoring a session,
when the render tree size reaches 50% of the size saved in the session state.
* Shared/SessionState.h: Add renderTreeSize.
* UIProcess/API/Cocoa/WKWebView.mm:
(layoutMilestones): Translate from SPI to WebCore milestones.
* UIProcess/API/Cocoa/WKWebViewPrivate.h: New iOS-only milestone, er, event.
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::renderingProgressEvents): Translate from WebCore milestone to rendering event.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy): Init stuff.
(WebKit::WebPageProxy::sessionState):
(WebKit::WebPageProxy::restoreFromSessionState): Zero out the target render tree size,
then get it out of session state and set the flag to say that we haven't reached it yet.
(WebKit::WebPageProxy::listenForLayoutMilestones): Set a flag to know that we should fire
the milestone. The other milestones get sent directly to WebCore.
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::exceedsRenderTreeSizeSizeThreshold): Return true when we've reached 50%.
(WebKit::WebPageProxy::didCommitLayerTree): Fire the milestone when appropriate.
* UIProcess/mac/LegacySessionStateCoding.cpp: Rev the session state data for iOS
(where doing so is less disruptive). Standardize some CFString constants.
(WebKit::encodeSessionHistory): Wrap for legibility.
(WebKit::encodeLegacySessionState): Make a CFNumber for render tree size, and store
it in the root dictionary.
(WebKit::decodeBackForwardTreeNode): Move a comment to match another similar block.
(WebKit::decodeLegacySessionState): Decode render tree size and store it.
2014-11-13 Tim Horton <timothy_horton@apple.com>
Adjust the WKBundlePageOverlay Data Detectors SPI
https://bugs.webkit.org/show_bug.cgi?id=138685
<rdar://problem/18947156>
Reviewed by Anders Carlsson.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
Forward DDActionContext callbacks to the Web process.
* WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
* WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h:
* WebProcess/WebPage/WebPageOverlay.cpp:
* WebProcess/WebPage/WebPageOverlay.h:
Add four DataDetectors-related WebKit2-only page overlay callbacks:
(WebKit::WebPageOverlay::actionContextForResultAtPoint):
Called during the action menu hit test; clients can reply with a DDActionContext
and a DOM range, and WebKit will treat that result and range as if it had
detected it itself, building the action menu and showing the yellow highlight as usual.
(WebKit::WebPageOverlay::dataDetectorsPresentedUI):
(WebKit::WebPageOverlay::dataDetectorsChangedUI):
(WebKit::WebPageOverlay::dataDetectorsHidUI):
These correspond to the DDActionContext callbacks, and can be used by clients
to show/hide corresponding UI while DataDetectors in the UI process is presenting UI.
(WebKit::WebPageOverlay::prepareForActionMenu): Deleted.
Get rid of prepareForActionMenu, as nobody ever used it.
* WebProcess/WebPage/WebPage.cpp:
Add WebPageOverlay.h so that we can build, because the destructor lives here.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performActionMenuHitTestAtLocation):
Give all of the WebPageOverlays the first shot at data detection; if none of them
reply with a valid DDActionContext/DOM range, we'll go ahead and do our normal detection.
(WebKit::WebPage::dataDetectorsPresentedUI):
(WebKit::WebPage::dataDetectorsChangedUI):
(WebKit::WebPage::dataDetectorsHidUI):
Forward these along to the active WebPageOverlay.
2014-11-13 Carlos Garcia Campos <cgarcia@igalia.com>
[SOUP] Missing ResourceRequest members encoded/decoded
https://bugs.webkit.org/show_bug.cgi?id=138694
Reviewed by Sergio Villar Senin.
At least timeoutInterval and priority should also be
encoded/decoded. This fixes all http/tests/xmlhttprequest/timeout/
tests when using the network process, since the timeout is always
0 for all requests that we send to the network process.
* Shared/soup/WebCoreArgumentCodersSoup.cpp:
(IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
(IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
2014-11-12 Ryuan Choi <ryuan.choi@navercorp.com>
[EFL] Fix the build with EFL 1.12
https://bugs.webkit.org/show_bug.cgi?id=138245
Reviewed by Gyuyoung Kim.
* UIProcess/API/efl/EwkView.cpp:
First, modified to use Evas_GL raw pointer instead of UniquePtrEfl because
Evas_GL.h can't be included in UniquePtrEfl.h
It should be moved into EvasGLContext because WebKit/EFL use only one Evas_GL.
Second, provided the version of GLES in Evas_GL_Config not to break build with
EFL 1.12
(EwkView::EwkView):
(EwkView::~EwkView):
(EwkView::displayTimerFired):
(EwkView::createGLSurface):
* UIProcess/API/efl/EwkView.h:
2014-11-12 Ada Chan <adachan@apple.com>
Fix the iOS build.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::pageMutedStateDidChange):
2014-11-05 Ada Chan <adachan@apple.com>
Implement new plug-in API for muting plug-ins
https://bugs.webkit.org/show_bug.cgi?id=138105
Reviewed by Anders Carlsson.
Handle the setting of NPNVmuteAudioBool on the plug-in.
* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::PluginControllerProxy):
Initialize m_isMuted.
(WebKit::PluginControllerProxy::mutedStateChanged):
Tell the plugin about the new muted state.
* PluginProcess/PluginControllerProxy.h:
* PluginProcess/PluginControllerProxy.messages.in:
Add the MutedStateChanged message.
* PluginProcess/PluginCreationParameters.cpp:
(WebKit::PluginCreationParameters::PluginCreationParameters):
Initialize isMuted.
(WebKit::PluginCreationParameters::encode):
Handle isMuted.
(WebKit::PluginCreationParameters::decode):
Ditto.
* PluginProcess/PluginCreationParameters.h:
* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
(WebKit::NPN_GetValue):
Get the plug-in's muted state.
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::isMuted):
Get the muted state from PluginControllerProxy.
(WebKit::NetscapePlugin::mutedStateChanged):
Call NPP_SetValue with NPNVmuteAudioBool and the updated muted state.
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/Plugins/Plugin.h:
(WebKit::Plugin::mutedStateChanged):
* WebProcess/Plugins/PluginController.h:
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::initialize):
Set m_pendingPluginCreationParameters->isMuted.
(WebKit::PluginProxy::mutedStateChanged):
Send the MutedStateChanged message to the plugin process.
* WebProcess/Plugins/PluginProxy.h:
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::pageMutedStateDidChange):
Call Plugin::mutedStateChanged() with the page's muted state.
(WebKit::PluginView::isMuted):
Get the page's current muted state.
* WebProcess/Plugins/PluginView.h:
2014-11-12 Tim Horton <timothy_horton@apple.com>
Two action menu item titles are swapped
https://bugs.webkit.org/show_bug.cgi?id=138667
<rdar://problem/18960409>
Reviewed by Beth Dakin.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _createActionMenuItemForTag:]):
Swap them back.
2014-11-12 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r175806.
https://bugs.webkit.org/show_bug.cgi?id=138666
Capturing CString is not thread safe (Requested by anttik on
#webkit).
Reverted changeset:
"[WK2] Use C++ lambdas in IPC::Connection"
https://bugs.webkit.org/show_bug.cgi?id=138018
http://trac.webkit.org/changeset/175806
2014-11-12 Tim Horton <timothy_horton@apple.com>
Need to show the text indicator when Data Detectors shows a popover
https://bugs.webkit.org/show_bug.cgi?id=138664
<rdar://problem/18869900>
Reviewed by Beth Dakin.
* UIProcess/mac/WKActionMenuController.h:
* UIProcess/mac/WKActionMenuController.mm:
(hasDataDetectorsCompletionAPI):
Determine if we have the new API.
(-[WKActionMenuController willDestroyView:]):
(-[WKActionMenuController willOpenMenu:withEvent:]):
Make use of the new API.
If we wanted to show a Data Detectors menu but have no items (or they're all
disabled), cancel the menu.
If we don't have it, manually manipulate the highlight.
(-[WKActionMenuController didCloseMenu:withEvent:]):
Make use of the new API.
If we don't have it, manually manipulate the highlight.
(-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
Set up completion handlers if we have the new API; when DataDetectors
presents UI, show the text indicator, when it dismisses, hide it.
If we don't have the API, manually manipulate the highlight.
2014-11-12 Tim Horton <timothy_horton@apple.com>
Make action menus much more reliable
https://bugs.webkit.org/show_bug.cgi?id=138654
<rdar://problem/18909111>
Reviewed by Anders Carlsson.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController prepareForMenu:withEvent:]):
Remove MenuUpdateStage; nothing actually uses this value, we just pass it around.
(-[WKActionMenuController didPerformActionMenuHitTest:userData:]):
Update the menu as soon as we have a reply from the Web process.
(-[WKActionMenuController menuNeedsUpdate:]):
If our sync-wait for the Web process' reply times out, we should still update
the menu to remove the placeholder separator item.
(-[WKActionMenuController _updateActionMenuItems]):
(-[WKActionMenuController _updateActionMenuItemsForStage:]): Deleted.
If we have our final answer for this menu (_state == Ready), and the final answer
has no items in the menu, cancel tracking on the menu.
2014-11-12 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Move RedirectedXCompositeWindow from platform to WebKit2 layer
https://bugs.webkit.org/show_bug.cgi?id=138093
Reviewed by Martin Robinson.
It's only used by WebKitWebViewBase. While moving the code the
following cleanups have been made:
- Use NeverDestroyed instead of DEPRECATED_DEFINE_STATIC_LOCAL.
- Use a helper class XDamageNotifier to handle the XDamage
events filtering and notification.
- Use std::function instead of pointer to function for the
damage callback.
- Pass the X display to the RedirectedXCompositeWindow constructor
and keep it as a member to use it everywhere, instead of using
the default display in some places and the widget display in others.
- Pass the damage notify function as a contructor parameter of
RedirectedXCompositeWindow instead of setting the callback
right after creating the object.
- Remove GLContextNeeded and all the dead code related to the
CreateGLContext mode that is no longer used.
- Rename cairoSurfaceForWidget() as surface().
- windowId() has been renamed as windowID() and made const.
- Use std::unique_ptr instead of PassOwnPtr.
- Fix coding style issues.
* PlatformGTK.cmake:
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseConstructed):
(webkitWebViewRenderAcceleratedCompositingResults):
(webkitWebViewBaseCreateWebPage):
(redirectedWindowDamagedCallback): Deleted.
* UIProcess/gtk/RedirectedXCompositeWindow.cpp: Renamed from Source/WebCore/platform/gtk/RedirectedXCompositeWindow.cpp.
(WebKit::XDamageNotifier::XDamageNotifier):
(WebKit::XDamageNotifier::add):
(WebKit::XDamageNotifier::remove):
(WebKit::XDamageNotifier::filterXDamageEvent):
(WebKit::XDamageNotifier::filterXEvent):
(WebKit::xDamageNotifier):
(WebKit::supportsXDamageAndXComposite):
(WebKit::RedirectedXCompositeWindow::create):
(WebKit::RedirectedXCompositeWindow::RedirectedXCompositeWindow):
(WebKit::RedirectedXCompositeWindow::~RedirectedXCompositeWindow):
(WebKit::RedirectedXCompositeWindow::resize):
(WebKit::RedirectedXCompositeWindow::cleanupPixmapAndPixmapSurface):
(WebKit::RedirectedXCompositeWindow::surface):
* UIProcess/gtk/RedirectedXCompositeWindow.h: Renamed from Source/WebCore/platform/gtk/RedirectedXCompositeWindow.h.
(WebKit::RedirectedXCompositeWindow::windowID):
2014-09-01 Philippe Normand <pnormand@igalia.com>
[WK2] UserMediaClient support
https://bugs.webkit.org/show_bug.cgi?id=123158
Reviewed by Benjamin Poulain.
Support for UserMediaPermissionRequest in WebKit2. It's
implemented similarily to the GeolocationPermissionRequest
support. When the WebPage requires this permission it sends a
message to the UI process which at some point grants or denies the
permission and sends the result back to the WebProcess.
* CMakeLists.txt: Generic CMake support for new files.
* Shared/API/c/WKBase.h: New type for UserMediaPermissionRequest.
* Shared/APIObject.h: Ditto.
* UIProcess/API/C/WKAPICast.h: PermissionRequest API mapping.
* UIProcess/API/APIUIClient.h: New decidePolicy handler for UserMediaPermissionRequest.
(API::UIClient::decidePolicyForUserMediaPermissionRequest):
* UIProcess/API/C/WKPage.cpp: Ditto.
(WKPageSetPageUIClient):
* UIProcess/API/C/WKPageUIClient.h: WKPageUIClient version bump to
5, including the new decidePolicyForUserMediaPermissionRequest member.
* UIProcess/API/C/WKUserMediaPermissionRequest.cpp: Added, C API
implementation of the UserMediaPermissionRequest.
(WKUserMediaPermissionRequestGetTypeID):
(WKUserMediaPermissionRequestAllow):
(WKUserMediaPermissionRequestDeny):
* UIProcess/API/C/WKUserMediaPermissionRequest.h: Added.
* UIProcess/API/C/WebKit2_C.h:
* UIProcess/UserMediaPermissionRequestManagerProxy.h: Added.
* UIProcess/UserMediaPermissionRequestProxy.cpp: Added, proxy
object for the UserMediaPermissionRequestType.
(WebKit::UserMediaPermissionRequestProxy::UserMediaPermissionRequestProxy):
(WebKit::UserMediaPermissionRequestProxy::allow):
(WebKit::UserMediaPermissionRequestProxy::deny):
(WebKit::UserMediaPermissionRequestProxy::invalidate):
* UIProcess/UserMediaPermissionRequestProxy.h: Added.
(WebKit::UserMediaPermissionRequestProxy::create):
(WebKit::UserMediaPermissionRequestProxy::mediaParameters):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::requestUserMediaPermissionForFrame): Defer
UserPermissionRequest to the UIClient.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in: New message to handle UserMediaPermissionRequests.
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp: Added,
WebProcess side of the UserRequestManager, keeping track of each
permission request.
(WebKit::generateRequestID):
(WebKit::UserMediaPermissionRequestManager::UserMediaPermissionRequestManager):
(WebKit::UserMediaPermissionRequestManager::startRequest):
(WebKit::UserMediaPermissionRequestManager::cancelRequest):
(WebKit::UserMediaPermissionRequestManager::didReceiveUserMediaPermissionDecision):
* WebProcess/MediaStream/UserMediaPermissionRequestManager.h: Added.
* WebProcess/WebCoreSupport/WebUserMediaClient.cpp: Added,
WebProcess implementation of the WebCore::UserMediaClient.
(WebKit::WebUserMediaClient::WebUserMediaClient):
(WebKit::WebUserMediaClient::pageDestroyed):
(WebKit::WebUserMediaClient::requestPermission):
(WebKit::WebUserMediaClient::cancelRequest):
* WebProcess/WebCoreSupport/WebUserMediaClient.h: Added.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage): Create the
UserMediaPermissionRequestManager and register the UserMediaClient
to the page.
(WebKit::WebPage::didReceiveUserMediaPermissionDecision): Dispatch
decision to manager.
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::userMediaPermissionRequestManager):
* WebProcess/WebPage/WebPage.messages.in: New Message to handle
permission decision result from the UI process.
2014-11-11 Tim Horton <timothy_horton@apple.com>
Add support for mailto: link action menus
https://bugs.webkit.org/show_bug.cgi?id=138641
<rdar://problem/18741567>
Reviewed by Beth Dakin.
* Shared/API/c/WKActionMenuTypes.h:
Add a new type for mailto links.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _defaultMenuItemsForMailtoLink]):
Build a DDActionContext and grab menu items for our mailto link.
(-[WKActionMenuController _defaultMenuItems]):
Get menu items from _defaultMenuItemsForMailtoLink if needed.
2014-11-11 Conrad Shultz <conrad_shultz@apple.com>
Clients should be notified when a page preview finishes
https://bugs.webkit.org/show_bug.cgi?id=138635
Reviewed by Tim Horton.
Add SPI to WKView to allow clients to do any cleanup that might be necessary when the preview closes.
* UIProcess/API/Cocoa/WKViewPrivate.h:
Declare new SPI.
* UIProcess/API/mac/WKView.mm:
(-[WKView _finishPreviewingURL:withPreviewView:]):
Stub SPI implementation.
* UIProcess/mac/WKActionMenuController.h:
Add an ivar for the preview view controller.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _createPreviewPopoverForURL:originRect:]):
Update to use the ivar.
(-[WKActionMenuController _clearPreviewPopover]):
Send -_finishPreviewingURL:withPreviewView: and nil out the view controller ivar.
2014-11-11 Tim Horton <timothy_horton@apple.com>
Update artwork for some action menu items
https://bugs.webkit.org/show_bug.cgi?id=138634
<rdar://problem/18871984>
Reviewed by Anders Carlsson.
* Resources/OpenInNewWindowTemplate.pdf: Removed.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _createActionMenuItemForTag:]):
(webKitBundleImageNamed): Deleted.
* WebKit2.xcodeproj/project.pbxproj:
Get rid of our custom art, and use system art for two more items.
2014-11-11 Alexey Proskuryakov <ap@apple.com>
DRT and WKTR touch disk cache
https://bugs.webkit.org/show_bug.cgi?id=138622
Reviewed by Geoffrey Garen.
Setting a cache model has a very strange behavior in WebKit2, where it ignores
sizes that were explicitly passed from UI process, and uses different ones. As
setCacheModel() is always called on launch, it always creates a non-empty disk cache.
The design needs to be improved one day, but for now, just make sure that we never
create a disk cache during testing.
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::NetworkProcess):
(WebKit::NetworkProcess::initializeNetworkProcess):
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
(WebKit::NetworkProcess::platformSetCacheModel):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess):
(WebKit::WebProcess::initializeWebProcess):
* WebProcess/WebProcess.h:
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformSetCacheModel):
(WebKit::WebProcess::platformInitializeWebProcess):
2014-11-11 Eric Carlson <eric.carlson@apple.com>
[iOS] a page with video in optimized fullscreen is visible
https://bugs.webkit.org/show_bug.cgi?id=138632
Reviewed by Anders Carlsson.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _isPlayingFullscreenOptimizedVideo]): New.
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::isViewVisible): Return true if displaying optimized fullscreen
video.
2014-11-11 Tim Horton <timothy_horton@apple.com>
Occasional assertion failure under recommendedScrollbarStyleDidChange()
https://bugs.webkit.org/show_bug.cgi?id=138604
<rdar://problem/18855914>
Reviewed by Beth Dakin.
It is possible for AppKit to install tracking areas into our view
behind our back, but we have code that depends on knowing exactly
the set of tracking areas installed on WKView.
Make this more robust by keeping a reference to the tracking area we
use for many things and manipulating that instead of making assumptions
about the total set of tracking areas on WKView.
* UIProcess/API/mac/WKView.mm:
(-[WKView _primaryTrackingArea]):
(-[WKView _replacePrimaryTrackingArea:]):
Provide a 'primary' tracking area setter/getter.
(-[WKView initWithFrame:context:configuration:webView:]):
Keep a reference to the original tracking area installed at initialization time.
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::recommendedScrollbarStyleDidChange):
Instead of walking the set of tracking areas, make use of the fact that
we know exactly which tracking area we installed, and uninstall just that
one, and replace it with our newly-built one.
2014-11-11 Myles C. Maxfield <mmaxfield@apple.com>
Finish moving CTFontGetVerticalGlyphsForCharacters and CTLineCreateWithUniCharProvider out from WKSI
https://bugs.webkit.org/show_bug.cgi?id=138623
Reviewed by Geoff Garen.
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
* mac/WebKit2.order:
2014-11-11 Timothy Horton <timothy_horton@apple.com>
Add a respondsToSelector check to dismissActionMenuPopovers
https://bugs.webkit.org/show_bug.cgi?id=138600
<rdar://problem/18932770>
Reviewed by Beth Dakin.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController dismissActionMenuPopovers]):
Avoid calling this wherever it doesn't exist.
2014-11-11 Tim Horton <timothy_horton@apple.com>
DataDetectors' menu items aren't presented in the telephone number menu
https://bugs.webkit.org/show_bug.cgi?id=138602
<rdar://problem/18866308>
Reviewed by Beth Dakin.
We currently round-trip the DataDetectors telephone number NSMenuItems
through the very-lossy WebContextMenuItemData, for no real reason.
We should avoid this so that DataDetectors' actual NSMenuItems are
presented in the final menu, so that they can adjust their items after
providing them to us.
* Platform/mac/MenuUtilities.h:
* Platform/mac/MenuUtilities.mm:
(WebKit::menuItemTitleForTelephoneNumber): Deleted.
Stop adjusting the menu item titles, as they come correct now.
(WebKit::menuItemsForTelephoneNumber): Deleted.
(WebKit::menuForTelephoneNumber):
Return a fully-formed menu for the single telephone number case.
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::showTelephoneNumberMenu):
Present the fully-formed menu, without round-tripping through
WebContextMenuItemData, because we do not need to hand the items to
the context menu client (and indeed, were not), and because this
allows us to use the exact items returned by DataDetectors, so they
can keep ahold of the items that we actually present.
* UIProcess/PageClient.h:
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::showPlatformContextMenu):
Add a Mac-only PageClient function for presenting a NSMenu at a
WKView-relative point.
2014-11-11 Tim Horton <timothy_horton@apple.com>
Adopt DDActionContext menu type SPI
https://bugs.webkit.org/show_bug.cgi?id=138603
<rdar://problem/18867627>
Reviewed by Anders Carlsson.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
Use the new SPI instead of WKSI.
2014-11-11 Tim Horton <timothy_horton@apple.com>
Data Detectors popovers should be dismissed upon scrolling
https://bugs.webkit.org/show_bug.cgi?id=138600
<rdar://problem/18932770>
Reviewed by Beth Dakin.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController prepareForMenu:withEvent:]):
Dismiss popovers when we start preparing another menu.
(-[WKActionMenuController dismissActionMenuPopovers]):
Use the new DataDetectors SPI.
2014-11-11 Tim Horton <timothy_horton@apple.com>
Localize strings for action menus
https://bugs.webkit.org/show_bug.cgi?id=138591
<rdar://problem/18815343>
Reviewed by Dan Bates.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _showTextIndicator]):
(-[WKActionMenuController _hideTextIndicator]):
(-[WKActionMenuController _createActionMenuItemForTag:]):
Make use of the new strings.
2014-11-11 Myles C. Maxfield <mmaxfield@apple.com>
Cleanup from r175379
https://bugs.webkit.org/show_bug.cgi?id=138616
Reviewed by Simon Fraser.
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
* mac/WebKit2.order:
2014-11-11 Myles C. Maxfield <mmaxfield@apple.com>
Move CTFontTransformGlyphs out from WKSI
https://bugs.webkit.org/show_bug.cgi?id=138599
Reviewed by Simon Fraser.
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
* mac/WebKit2.order:
2014-11-10 Simon Fraser <simon.fraser@apple.com>
Fix possible crash when closing the web inspector
https://bugs.webkit.org/show_bug.cgi?id=138597
rdar://problem/18872688
Reviewed by Andreas Kling.
I reported a crash when reloading a page after inspecting it, possibly caused by
r172864. Speculatively fix by null-checking the main frame.
* WebProcess/WebCoreSupport/WebInspectorClient.cpp:
(WebKit::WebInspectorClient::~WebInspectorClient):
2014-11-10 Beth Dakin <bdakin@apple.com>
Whitespace action menus aren't working properly
https://bugs.webkit.org/show_bug.cgi?id=138585
-and corresponding-
rdar://problem/18933586
Reviewed by Tim Horton.
Treat the whitespace menu as a text menu.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController isMenuForTextContent]):
2014-11-10 Simon Fraser <simon.fraser@apple.com>
[iOS WK2] Scroll deceleration rate is wrong
https://bugs.webkit.org/show_bug.cgi?id=138574
rdar://problem/18715303
Reviewed by Benjamin Poulain.
The CSS Snap Points code incorrectly set the WKScrollView's deceleration rate,
overriding the custom value that UIWebScrollView sets.
Fix by having WKScrollView store the custom rate at init time, and
using that value in -scrollViewWillBeginDragging:.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView scrollViewWillBeginDragging:]):
* UIProcess/ios/WKScrollView.h:
* UIProcess/ios/WKScrollView.mm:
(-[WKScrollView initWithFrame:]):
2014-11-09 Ada Chan <adachan@apple.com>
Reset WebPageProxy's isPlayingAudio state after web process crash or page invalidation.
https://bugs.webkit.org/show_bug.cgi?id=138559
Reviewed by Andreas Kling.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::resetState):
2014-11-10 Beth Dakin <bdakin@apple.com>
WK1: Support default actions for read-only text
https://bugs.webkit.org/show_bug.cgi?id=138552
-and corresponding-
rdar://problem/18877483
Reviewed by Tim Horton.
WK1 now needs to do a lot of dictionary lookup operations that it did not
previously have to handle. So this patch takes a lot of that functionality, which
was implemented as static functions in WebPageMac for WK2 and moves it into
WebCore.
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performDictionaryLookupForRange):
(WebKit::isPositionInRange): Deleted.
(WebKit::shouldUseSelection): Deleted.
(WebKit::rangeExpandedAroundPositionByCharacters): Deleted.
(WebKit::rangeForDictionaryLookupForSelection): Deleted.
(WebKit::rangeForDictionaryLookupAtHitTestResult): Deleted.
2014-11-10 Dan Bernstein <mitz@apple.com>
iOS build fix.
* UIProcess/ios/RemoteLayerTreeHostIOS.mm:
(WebKit::RemoteLayerTreeHost::createLayer):
2014-11-10 Zan Dobersek <zdobersek@igalia.com>
[WK2] Use C++ lambdas in IPC::Connection
https://bugs.webkit.org/show_bug.cgi?id=138018
Reviewed by Anders Carlsson.
Replace uses of WTF::bind() in the IPC::Connection class with C++11 lambdas.
* Platform/IPC/Connection.cpp:
(IPC::Connection::SyncMessageState::processIncomingMessage):
(IPC::Connection::dispatchWorkQueueMessageReceiverMessage):
(IPC::Connection::invalidate):
(IPC::Connection::sendMessage):
(IPC::Connection::processIncomingMessage):
(IPC::Connection::enqueueIncomingMessage):
* Platform/IPC/mac/ConnectionMac.mm:
(IPC::Connection::initializeDeadNameSource):
(IPC::Connection::receiveSourceEventHandler):
* Platform/IPC/unix/ConnectionUnix.cpp:
(IPC::Connection::open):
2014-11-09 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Remove create() factory function in FooAnimationValue classes
https://bugs.webkit.org/show_bug.cgi?id=138206
Reviewed by Darin Adler.
As a step to use std::unique_ptr and std::make_unique, this patch removes create()
factory function in FooAnimationValue classes. As this changes, FooAnimationValue::create()
are changed to std::make_unique<>.
* Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
(IPC::ArgumentCoder<GraphicsLayerAnimation>::decode):
* WebProcess/WebCoreSupport/WebInspectorClient.cpp:
(WebKit::WebInspectorClient::showPaintRect):
2014-11-09 Chris Dumez <cdumez@apple.com>
Unreviewed, fix typo in r175796.
Rename areEssentialEqualAsFloat to areEssentiallyEqualAsFloat.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::areEssentiallyEqualAsFloat):
(WebKit::WebPage::dynamicViewportSizeUpdate):
(WebKit::areEssentialEqualAsFloat): Deleted.
2014-11-09 Chris Dumez <cdumez@apple.com>
Add a more correct way to compare floating point numbers and use it
https://bugs.webkit.org/show_bug.cgi?id=138527
Reviewed by Darin Adler.
Use the new WTF::areEssentuallyEqual() utility function from MathExtras.h
to compare floating-point numbers.
* UIProcess/API/Cocoa/WKWebView.mm:
(withinEpsilon):
* UIProcess/CoordinatedGraphics/PageViewportController.cpp:
(WebKit::PageViewportController::updateMinimumScaleToFit):
(WebKit::fuzzyCompare): Deleted.
* UIProcess/CoordinatedGraphics/PageViewportController.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::withinEpsilon):
* UIProcess/API/Cocoa/WKWebView.mm:
(areEssentiallyEqualAsFloat):
(-[WKWebView _didCommitLayerTree:]):
(withinEpsilon): Deleted.
* UIProcess/CoordinatedGraphics/PageViewportController.cpp:
(WebKit::PageViewportController::updateMinimumScaleToFit):
(WebKit::fuzzyCompare): Deleted.
* UIProcess/CoordinatedGraphics/PageViewportController.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::areEssentialEqualAsFloat):
(WebKit::WebPage::dynamicViewportSizeUpdate):
(WebKit::withinEpsilon): Deleted.
2014-11-08 Simon Fraser <simon.fraser@apple.com>
Implement round-rect clipping on video elements
https://bugs.webkit.org/show_bug.cgi?id=138537
rdar://problem/9534399
Reviewed by Darin Adler.
Support border-radius on video and other layers with composited contents,
by pushing a FloatRoundedRect onto the GraphicsLayer as the contentsClippingRect,
and, on Mac, using layer corner-radius or a CAShapeLayer mask.
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<FloatRoundedRect>::encode):
(IPC::ArgumentCoder<FloatRoundedRect>::decode):
* Shared/WebCoreArgumentCoders.h:
* Shared/mac/RemoteLayerBackingStore.mm: New shape layer type.
(WebKit::RemoteLayerBackingStore::drawInContext):
* Shared/mac/RemoteLayerTreePropertyApplier.mm:
(WebKit::applyPropertiesToLayer): Apply corner-radius and shape path.
* Shared/mac/RemoteLayerTreeTransaction.h: Prettify the flags. Yes, I prefer this style.
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
(WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
(WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
(WebKit::RemoteLayerTreeTextStream::operator<<):
(WebKit::dumpChangedLayers):
(WebKit::RemoteLayerTreeTransaction::description):
* UIProcess/ios/RemoteLayerTreeHostIOS.mm:
(+[WKShapeView layerClass]): Make UIViews with a CAShapeLayer layer class.
(WebKit::RemoteLayerTreeHost::createLayer):
* UIProcess/mac/RemoteLayerTreeHost.mm:
(WebKit::RemoteLayerTreeHost::createLayer):
* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::updateClonedLayerProperties):
(WebKit::isEquivalentLayer):
(WebKit::PlatformCALayerRemote::setMask):
(WebKit::PlatformCALayerRemote::setClonedLayer):
(WebKit::PlatformCALayerRemote::cornerRadius):
(WebKit::PlatformCALayerRemote::setCornerRadius):
(WebKit::PlatformCALayerRemote::shapeRoundedRect):
(WebKit::PlatformCALayerRemote::setShapeRoundedRect):
* WebProcess/WebPage/mac/PlatformCALayerRemote.h:
2014-11-09 Conrad Shultz <conrad_shultz@apple.com>
Move _ignoresNonWheelMouseEvents implementation to WKView(Private)
https://bugs.webkit.org/show_bug.cgi?id=138487
Reviewed by Dan Bernstein.
Relocate some methods that should have been in a category implementation.
* UIProcess/API/mac/WKView.mm:
(-[WKView _setIgnoresNonWheelMouseEvents:]):
(-[WKView _ignoresNonWheelMouseEvents]):
2014-11-08 Beth Dakin <bdakin@apple.com>
WKActionMenuController methods should be more careful to use the best
WebHitTestResult
https://bugs.webkit.org/show_bug.cgi?id=138536
-and corresponding-
rdar://problem/18919195
Reviewed by Tim Horton.
This patch re-names _hitTestResultForStage to _webHitTestResult. The method no
longer takes a stage since that value is really not necessary to determine the
correct WebHitTestResult. This patch also makes all spots in this file that access
a WebHitTestResult go through _webHitTestResult to ensure that they get the most
up-to-date option.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController willOpenMenu:withEvent:]):
(-[WKActionMenuController _openURLFromActionMenu:]):
(-[WKActionMenuController _addToReadingListFromActionMenu:]):
(-[WKActionMenuController _previewURLFromActionMenu:]):
(-[WKActionMenuController _defaultMenuItemsForVideo]):
(-[WKActionMenuController _copyVideoURL:]):
(-[WKActionMenuController _saveVideoToDownloads:]):
(-[WKActionMenuController _saveImageToDownloads:]):
(-[WKActionMenuController _defaultMenuItems]):
(-[WKActionMenuController _updateActionMenuItemsForStage:]):
(imageForResource:name::switch): Deleted.
(-[WKActionMenuController _defaultMenuItems:]): Deleted.
2014-11-08 Beth Dakin <bdakin@apple.com>
Implement action menu support for videos
https://bugs.webkit.org/show_bug.cgi?id=138534
-and corresponding-
rdar://problem/18742164
Reviewed by Tim Horton.
New menu type and items types.
* Shared/API/c/WKActionMenuItemTypes.h:
* Shared/API/c/WKActionMenuTypes.h:
Plumb isMediaThatCanBeDownloaded() up to WebHitTestResult.
* Shared/WebHitTestResult.cpp:
(WebKit::WebHitTestResult::Data::Data):
(WebKit::WebHitTestResult::Data::encode):
(WebKit::WebHitTestResult::Data::decode):
* Shared/WebHitTestResult.h:
(WebKit::WebHitTestResult::isMediaThatCanBeDownloaded):
Re-name _canAddImageToPhotos to _canAddMediaToPhotos, which is more accurate. We
might use this method for videos some day, so now it has an accurate name.
* UIProcess/mac/WKActionMenuController.mm:
Default items and their actions.
(-[WKActionMenuController _defaultMenuItemsForVideo]):
(-[WKActionMenuController _copyVideoURL:]):
(-[WKActionMenuController _saveVideoToDownloads:]):
(-[WKActionMenuController _defaultMenuItemsForImage]):
(-[WKActionMenuController _canAddMediaToPhotos]):
(-[WKActionMenuController _addImageToPhotos:]):
(-[WKActionMenuController _createActionMenuItemForTag:]):
(-[WKActionMenuController _defaultMenuItems:]):
(-[WKActionMenuController _canAddImageToPhotos]): Deleted.
We hit test including shadow content to get the desired result for editable text
regions. But for media, we want to re-set to the shadow root.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performActionMenuHitTestAtLocation):
2014-11-08 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Allow to create a view with a related page in WTR
https://bugs.webkit.org/show_bug.cgi?id=138501
Reviewed by Martin Robinson.
This is needed when running tests in multi web process mode.
* UIProcess/API/C/gtk/WKView.cpp:
(WKViewCreate):
* UIProcess/API/C/gtk/WKView.h:
2014-11-07 Conrad Shultz <conrad_shultz@apple.com>
"Lookup" action menu should read "Look up"
https://bugs.webkit.org/show_bug.cgi?id=138509
Reviewed by Tim Horton.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _createActionMenuItemForTag:]):
2014-11-07 Beth Dakin <bdakin@apple.com>
Null deref performing Lookup on Apple Trailers full screen button
https://bugs.webkit.org/show_bug.cgi?id=138513
-and corresponding-
rdar://problem/18909699
Reviewed by Tim Horton.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performDictionaryLookupForSelection):
2014-11-07 Anshu Chimala <anshu@apple.com>
Make it possible to associate snapshots with back/forward list items other than the current item.
https://bugs.webkit.org/show_bug.cgi?id=138490
Reviewed by Tim Horton.
* UIProcess/API/Cocoa/WKViewPrivate.h:
Declare -saveBackForwardSnapshotForItem:, an alternative to -saveBackForwardSnapshotForCurrentItem that accepts a
back/forward list item as an argument.
* UIProcess/API/mac/WKView.mm:
(-[WKView saveBackForwardSnapshotForItem:]):
Pass the provided back/forward list item along to WebPageProxy::recordNavigationSnapshot().
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::recordNavigationSnapshot):
Overloaded to optionally take a back/forward list item as an argument. If one isn't provided, default to the current item
as before; otherwise, associate the snapshot with whichever item was provided.
* UIProcess/WebPageProxy.h:
Declare the new recordNavigationSnapshot() overload.
* UIProcess/mac/ViewSnapshotStore.h:
Make recordSnapshot() take a back/forward list item as an argument.
* UIProcess/mac/ViewSnapshotStore.mm:
(WebKit::ViewSnapshotStore::recordSnapshot):
Store the snapshot in the provided back/forward list item instead of in the current item.
2014-11-07 Tim Horton <timothy_horton@apple.com>
Popovers do not dismiss when navigating back and forth using gestures
https://bugs.webkit.org/show_bug.cgi?id=138512
<rdar://problem/18900200>
Reviewed by Beth Dakin.
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::navigationGestureDidBegin):
Dismiss action menu related popovers when navigation gestures begin.
2014-11-07 Beth Dakin <bdakin@apple.com>
Action menu preview popover should dismiss on scroll
https://bugs.webkit.org/show_bug.cgi?id=138511
-and corresponding-
rdar://problem/18901445
Reviewed by Tim Horton.
This patch re-names dismissActionMenuDataDetectorPopovers() to
dismissActionMenuPopovers() and also calls _clearPreviewPopover from that method
as well.
* UIProcess/API/mac/WKView.mm:
(-[WKView viewDidMoveToWindow]):
(-[WKView _dismissActionMenuPopovers]):
(-[WKView _dismissActionMenuDataDetectorPopovers]): Deleted.
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didCommitLoadForFrame):
(WebKit::WebPageProxy::pageDidScroll):
(WebKit::WebPageProxy::resetStateAfterProcessExited):
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::dismissActionMenuPopovers):
(WebKit::PageClientImpl::dismissActionMenuDataDetectorPopovers): Deleted.
* UIProcess/mac/WKActionMenuController.h:
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController dismissActionMenuPopovers]):
(-[WKActionMenuController dismissActionMenuDataDetectorPopovers]): Deleted.
2014-11-07 Beth Dakin <bdakin@apple.com>
Support action menus for whitespace in editable areas
https://bugs.webkit.org/show_bug.cgi?id=138488
-and corresponding-
rdar://problem/18877717
Reviewed by Tim Horton.
Very simple menu for whitespace in editable areas.
* Shared/API/c/WKActionMenuTypes.h:
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _defaultMenuItemsForWhitespaceInEditableArea]):
(-[WKActionMenuController _defaultMenuItems:]):
2014-11-07 Beth Dakin <bdakin@apple.com>
Invoking an action menu should dismiss existing selection
https://bugs.webkit.org/show_bug.cgi?id=138496
-and corresponding-
rdar://problem/18892787
Reviewed by Tim Horton.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController willOpenMenu:withEvent:]):
2014-11-07 Eric Carlson <eric.carlson@apple.com>
[iOS] Update optimized fullscreen media controls
https://bugs.webkit.org/show_bug.cgi?id=138493
Reviewed by Brent Fulgham.
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface): Initialize GetMediaUIImageData.
2014-11-07 Antti Koivisto <antti@apple.com>
Add cache coders
https://bugs.webkit.org/show_bug.cgi?id=138413
Reviewed by Anders Carlsson.
Add encoding and decoding support for cache types.
This is largely a copy of the IPC coder classes with some unnecessary features removed.
The coders compute a type-sensitive checksum that can be used to verify the data integrity.
The code is behind ENABLE(NETWORK_CACHE) and not yet used.
* NetworkProcess/cache: Added.
* NetworkProcess/cache/NetworkCacheCoder.h: Added.
* NetworkProcess/cache/NetworkCacheCoders.cpp: Added.
* NetworkProcess/cache/NetworkCacheCoders.h: Added.
* NetworkProcess/cache/NetworkCacheDecoder.cpp: Added.
* NetworkProcess/cache/NetworkCacheDecoder.h: Added.
* NetworkProcess/cache/NetworkCacheEncoder.cpp: Added.
* NetworkProcess/cache/NetworkCacheEncoder.h: Added.
* WebKit2.xcodeproj/project.pbxproj:
2014-11-06 Conrad Shultz <conrad_shultz@apple.com>
Clients should be able to customize the view used for page previews
https://bugs.webkit.org/show_bug.cgi?id=138447
Reviewed by Tim Horton.
Add SPI to WKView that clients can use to customize the view used in the page preview popover.
* UIProcess/API/Cocoa/WKViewPrivate.h:
Declare -_viewForPreviewingURL:initialFrameSize:.
* UIProcess/API/mac/WKView.mm:
(-[WKView _viewForPreviewingURL:initialFrameSize:]):
Return nil in the default implementation.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKPagePreviewViewController loadView]):
Only spin up a WKWebView if the delegate (and, therefore, the presenting WKView) doesn't supply a custom view.
(-[WKActionMenuController pagePreviewViewController:viewForPreviewingURL:initialFrameSize:]):
WKPagePreviewViewControllerDelegate method; wrap the WKView SPI.
2014-11-05 Jer Noble <jer.noble@apple.com>
De-templatize Timer
https://bugs.webkit.org/show_bug.cgi?id=138450
Reviewed by Anders Carlsson.
Remove template specifiers from Timer.
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::bufferingTimerFired):
* NetworkProcess/NetworkResourceLoader.h:
* Shared/WebMemorySampler.cpp:
(WebKit::WebMemorySampler::sampleTimerFired):
(WebKit::WebMemorySampler::stopTimerFired):
* Shared/WebMemorySampler.h:
* Shared/mac/RemoteLayerBackingStoreCollection.h:
* Shared/mac/RemoteLayerBackingStoreCollection.mm:
(WebKit::RemoteLayerBackingStoreCollection::volatilityTimerFired):
* UIProcess/API/efl/EwkView.cpp:
(EwkView::displayTimerFired):
* UIProcess/API/efl/EwkView.h:
* UIProcess/efl/TextCheckerClientEfl.cpp:
(TextCheckerClientEfl::languagesUpdateTimerFired):
(TextCheckerClientEfl::spellCheckingSettingChangeTimerFired):
* UIProcess/efl/TextCheckerClientEfl.h:
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
(WebKit::CoordinatedLayerTreeHost::layerFlushTimerFired):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::layerFlushTimerFired):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::processSuspensionCleanupTimerFired):
(WebKit::WebProcess::nonVisibleProcessCleanupTimerFired):
* WebProcess/WebProcess.h:
2014-11-06 Dean Jackson <dino@apple.com>
[filters2] Support for backdrop-filter
https://bugs.webkit.org/show_bug.cgi?id=138384
<rdar://problem/18874494>
Reviewed by Simon Fraser.
Take 2!! Previous patch was rolled out.
* Shared/mac/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::drawInContext): Handle LayerTypeBackdropLayer in the switch.
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::description): Describe a backdrop layer.
* UIProcess/ios/RemoteLayerTreeHostIOS.mm:
(+[WKBackdropView layerClass]): Define CABackdropLayer and use it as the class.
(WebKit::RemoteLayerTreeHost::createLayer):
* UIProcess/mac/RemoteLayerTreeHost.mm: Ditto.
(WebKit::RemoteLayerTreeHost::createLayer):
2014-11-06 Tim Horton <timothy_horton@apple.com>
Data detectors popover points at the first line of the detected item
https://bugs.webkit.org/show_bug.cgi?id=138471
<rdar://problem/18893079>
Reviewed by Sam Weinig.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::scanForDataDetectedItems):
Determine the bounding box of all quads of the detected item's text.
This way, the popover will point at the border of the item, instead of
right at the very first line.
2014-11-06 Beth Dakin <bdakin@apple.com>
Preview views often misplaced inside popover
https://bugs.webkit.org/show_bug.cgi?id=138472
Reviewed by Tim Horton.
This patch makes the popover maintain aspect ratio, and it uses the final scale of
that popover to scale the preview view as well.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKPagePreviewViewController initWithPageURL:mainViewSize:popoverToViewScale:]):
(-[WKPagePreviewViewController loadView]):
(-[WKActionMenuController _createPreviewPopoverForURL:originRect:]):
(-[WKActionMenuController _targetSize:fitsInAvailableSpace:]):
(-[WKActionMenuController _preferredSizeForPopoverPresentedFromOriginRect:]):
(-[WKPagePreviewViewController initWithPageURL:]): Deleted.
2014-11-06 Tim Horton <timothy_horton@apple.com>
TextIndicatorWindow's bounce animation is lopsided when indicating two short lines of text
https://bugs.webkit.org/show_bug.cgi?id=138458
Reviewed by Simon Fraser.
Previously, the TextIndicator's frame() covered the entire selection highlight bounds.
This was undesirable in cases where the highlight included areas far outside the
bounds of the selected text, as the TextIndicatorWindow's 'bounce' animation
would be misaligned (centered on the highlight instead of on the text).
* Shared/TextIndicator.cpp:
Get rid of the many-argument TextIndicator::create, because it was only used
internally, and have createWithSelectionInFrame make a ::Data instead.
(WebKit::TextIndicator::createWithSelectionInFrame):
Compute and store the bounding rect of all of the selected text rects, and store
all of the text rects relative to that bounding rect instead of relative to the
selection highlight bounds. We do this because the selection highlight bounds
often includes area which is far outside of the text bounds (in the case of a
selection that spans multiple lines), and causes the text indicator bounce
animation to bounce in a lopsided manner.
(WebKit::TextIndicator::TextIndicator):
Adjust to the rename of textRectsInSelectionRectCoordinates -> textRectsInBoundingRectCoordinates.
(WebKit::TextIndicator::frameRect):
Instead of the TextIndicator's frame being the selection highlight bounds,
it is now the bounds of all of the text rects.
(WebKit::TextIndicator::draw):
Translate into the image by the difference between the selection highlight bounds
and the text bounding rect. This is necessary because the content image is still generated
covering the entire selection highlight bounds, but the text rects are in text-rect-bounds coordinates.
(WebKit::TextIndicator::Data::encode):
(WebKit::TextIndicator::Data::decode):
Adjust to the rename of textRectsInSelectionRectCoordinates -> textRectsInBoundingRectCoordinates.
Encode/decode textBoundingRectInWindowCoordinates.
* Shared/TextIndicator.h:
(WebKit::TextIndicator::contentImage): Deleted.
Get rid of an unnecessary getter and constructor.
2014-11-06 Tim Horton <timothy_horton@apple.com>
Only provide a single result to the action menu DDActionContext
https://bugs.webkit.org/show_bug.cgi?id=138469
<rdar://problem/18869036>
Reviewed by Anders Carlsson.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::scanForDataDetectedItems):
Only provide one result; secondary results can be extremely unrelated to
the primary one and confuse Data Detectors further down the line.
2014-11-06 Tim Horton <timothy_horton@apple.com>
Null deref in rangeForDictionaryLookupAtHitTestResult on occasion
https://bugs.webkit.org/show_bug.cgi?id=138459
<rdar://problem/18872825>
Reviewed by Andreas Kling.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::rangeForDictionaryLookupAtHitTestResult):
rangeExpandedAroundPositionByCharacters can return null.
2014-11-06 Tim Horton <timothy_horton@apple.com>
Prefer link action menus over images
https://bugs.webkit.org/show_bug.cgi?id=138461
<rdar://problem/18768377>
Reviewed by Anders Carlsson.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _defaultMenuItems:]):
Swap the priority of links and images.
2014-11-05 Sam Weinig <sam@webkit.org>
Use std::unique_ptr for TileController
https://bugs.webkit.org/show_bug.cgi?id=138429
Reviewed by Anders Carlsson.
* WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
(WebKit::PlatformCALayerRemoteTiledBacking::PlatformCALayerRemoteTiledBacking):
* WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h:
2014-11-06 Dan Bernstein <mitz@apple.com>
iOS build fix.
* WebProcess/Plugins/PluginController.h:
2014-11-06 Daniel Bates <dabates@apple.com>
[iOS] WebProcess needs to take a background task assertion to prevent being killed
for "suspended with locked system files"
https://bugs.webkit.org/show_bug.cgi?id=138155
<rdar://problem/17939303>
Reviewed by Anders Carlsson.
Mitigates an issue where the WebProcess may be killed when suspended holding locked files
by allowing the WebProcess to notify the UIProcess when it is holding such files so that
both can continue to run for a period of time after the UIProcess transitions to the
background. In particular, the WebProcess notifies the UIProcess that it is holding- or
relinquished- a locked file when it begins and ends a sequence of SQLite transactions,
respectively.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::disconnect): Relinquish an existing background task assertion
when the WebProcess disconnects. Among other situations, the WebProcess may disconnect as
a result of being suspended holding locked files even when the UIProcess requested a
background task assertion (i.e. it may have exceeded its background time limit).
(WebKit::WebProcessProxy::setIsHoldingLockedFiles): Added. Either acquires a new background
task assertion or relinquishes an existing one.
* UIProcess/WebProcessProxy.h:
* UIProcess/WebProcessProxy.messages.in: Added message SetIsHoldingLockedFiles(bool). The WebProcess
dispatches this message to inform the UIProcess that it is holding- or relinquished- a locked file.
* WebKit2.xcodeproj/project.pbxproj: Added files WebSQLiteDatabaseTracker.{cpp, h}.
* WebProcess/WebCoreSupport/WebSQLiteDatabaseTracker.cpp: Added.
(WebKit::WebSQLiteDatabaseTracker::supplementName): Added.
(WebKit::WebSQLiteDatabaseTracker::WebSQLiteDatabaseTracker): Added.
(WebKit::WebSQLiteDatabaseTracker::initialize): Register to receive SQLiteDatabaseTrackerClient callbacks.
(WebKit::WebSQLiteDatabaseTracker::willBeginFirstTransaction): Inform the HysteresisActivity object on
the main thread that we began a transaction so that it calls WebSQLiteDatabaseTracker::started().
(WebKit::WebSQLiteDatabaseTracker::didFinishLastTransaction): Inform the HysteresisActivity object on
the main thread that we finished a transaction so that it may eventually call WebSQLiteDatabaseTracker::stopped().
(WebKit::WebSQLiteDatabaseTracker::started): Notify the UIProcess that the WebProcess is holding
a locked file.
(WebKit::WebSQLiteDatabaseTracker::stopped): Notify the UIProcess that the WebProcess has
relinquished the locked file.
* WebProcess/WebCoreSupport/WebSQLiteDatabaseTracker.h: Added. We use a HysteresisActivity object
to coalesce SetIsHoldingLockedFiles(false) messages as an optimization to minimize the number of
messages exchanged between the UIProcess and WebProcess when a web page performs SQLite transactions
in batches.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess): Instantiate the supplement WebSQLiteDatabaseTracker when building
for iOS.
2014-11-06 Alberto Garcia <berto@igalia.com>
[GTK] [Stable] webkitgtk 2.6.1 fails to load flashplugin
https://bugs.webkit.org/show_bug.cgi?id=137849
Reviewed by Carlos Garcia Campos.
NPPVpluginNeedsXEmbed is a boolean value, so it should normally
use an NPBool (1 byte). However some plugins (the Flash player in
particular) are using an int instead, so we have to do it as well
else we'll end up corrupting the stack.
* WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
(WebKit::NetscapePlugin::platformPostInitialize):
2014-11-06 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add context menu API to Web Process Extensions
https://bugs.webkit.org/show_bug.cgi?id=138311
Reviewed by Gustavo Noronha Silva.
Add WebKitWebPage::context-menu signal, similar to the
WebKitWebView one, but that receives a WebKitWebHitTestResult, a
class that extends WebKitTestResult to provide the WebKitDOMNode
from the Web Process Extensions API. This makes WebKitContextMenu,
WebKitContextMenuItem and WebKitTestResult classes shared between
UI and Web Extensions APIs. In addition to be able to customize
the context menu, it also provides API to set user data, as a
GVariant, in the Web Process that is sent to the UI Process.
* PlatformGTK.cmake: Add new files.
* UIProcess/API/gtk/WebKitContextMenu.cpp:
(webkit_context_menu_set_user_data): Add user data to the context
menu as a GVariant.
(webkit_context_menu_get_user_data): Get the user data previously
set with webkit_context_menu_set_user_data() either from the Web
or UI processes.
* UIProcess/API/gtk/WebKitContextMenu.h:
* UIProcess/API/gtk/WebKitContextMenuActions.h:
* UIProcess/API/gtk/WebKitContextMenuClient.cpp:
(getContextMenuFromProposedMenu): Convert the received user data
into a GVariant and pass it to webkitWebViewPopulateContextMenu().
* UIProcess/API/gtk/WebKitContextMenuItem.h:
* UIProcess/API/gtk/WebKitForwardDeclarations.h:
* UIProcess/API/gtk/WebKitHitTestResult.h:
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewPopulateContextMenu): Set the user data received
from the Web Process to the WebKitContextMenu before emitting
WebKitWebView::context-menu.
* UIProcess/API/gtk/WebKitWebViewPrivate.h:
* UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add new section for WebKitWebHitTestResult.
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
* UIProcess/API/gtk/docs/webkit2gtk.types: Add webkit_web_hit_test_result_get_type.
* WebProcess/InjectedBundle/API/gtk/WebKitWebHitTestResult.cpp: Added.
(webkitWebHitTestResultGetProperty): Add getter for node property.
(webkitWebHitTestResultSetProperty): Add setter for node property.
(webkit_web_hit_test_result_class_init): Add node property.
(webkitWebHitTestResultCreate): Create a new
WebKitWebHitTestResult for the given InjectedBundleHitTestResult.
(webkit_web_hit_test_result_get_node): Return the WebKitDOMNode.
* WebProcess/InjectedBundle/API/gtk/WebKitWebHitTestResult.h: Added.
* WebProcess/InjectedBundle/API/gtk/WebKitWebHitTestResultPrivate.h: Added.
* WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
(getContextMenuFromDefaultMenu): Build a WebKitContextMenu and
WebKitWebHitTestResult and emit WebKitWebPage::context-menu signal.
(webkit_web_page_class_init): Add WebKitWebPage::context-menu signal.
(webkitWebPageCreate): Add implementation for getContextMenuFromDefaultMenu.
* WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h:
2014-11-06 Ryuan Choi <ryuan.choi@gmail.com>
[EFL] Remove m_scrollPosition from CoordinatedGraphicsScene
https://bugs.webkit.org/show_bug.cgi?id=138419
Reviewed by Gyuyoung Kim.
m_scrollPosition of CoordinatedGraphicsScene is only to adjust the position
of fixed element. But this adjustment is only called by paintToCurrentGLContext()
and WebView can pass same information to the parameter of that method.
* UIProcess/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
(WebCore::CoordinatedGraphicsScene::paintToCurrentGLContext):
(WebCore::CoordinatedGraphicsScene::adjustPositionForFixedLayers):
(WebCore::CoordinatedGraphicsScene::setScrollPosition): Deleted.
* UIProcess/CoordinatedGraphics/CoordinatedGraphicsScene.h:
* UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
(WebKit::CoordinatedLayerTreeHostProxy::setVisibleContentsRect):
* UIProcess/CoordinatedGraphics/WebView.cpp:
(WebKit::WebView::paintToCurrentGLContext):
2014-11-05 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r175672.
https://bugs.webkit.org/show_bug.cgi?id=138455
Tries to make backdrop layers on every layer, asserts on
Mavericks (Requested by smfr on #webkit).
Reverted changeset:
"[filters2] Support for backdrop-filter"
https://bugs.webkit.org/show_bug.cgi?id=138384
http://trac.webkit.org/changeset/175672
2014-11-04 Ada Chan <adachan@apple.com>
Figure out whether a plug-in is playing audio.
https://bugs.webkit.org/show_bug.cgi?id=137219
Reviewed by Anders Carlsson.
Handle the setting of the NPPVpluginIsPlayingAudio variable.
* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::setPluginIsPlayingAudio):
Send a SetPluginIsPlayingAudio message to the WebProcess.
* PluginProcess/PluginControllerProxy.h:
* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
(WebKit::NPN_SetValue):
Handle NPPVpluginIsPlayingAudio. Call NetscapePlugin::setIsPlayingAudio().
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::setIsPlayingAudio):
Call PluginControllerProxy::setPluginIsPlayingAudio().
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/Plugins/PluginController.h:
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::setPluginIsPlayingAudio):
Call PluginView::setPluginIsPlayingAudio().
* WebProcess/Plugins/PluginProxy.h:
* WebProcess/Plugins/PluginProxy.messages.in:
Add the SetPluginIsPlayingAudio message.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::PluginView):
Initialize m_pluginIsPlayingAudio.
(WebKit::PluginView::~PluginView):
Remove itself from the Document's list of AudioProducers.
(WebKit::PluginView::initializePlugin):
Add itself to the Document's list of AudioProducers.
(WebKit::PluginView::pageMutedStateDidChange):
Add a FIXME.
(WebKit::PluginView::setPluginIsPlayingAudio):
If m_pluginIsPlayingAudio has changed, tell the Document to update its audio playing state.
* WebProcess/Plugins/PluginView.h:
Now inherits AudioProducer.
2014-11-05 Dan Bernstein <mitz@apple.com>
Tried to fix the GTK build.
* PlatformGTK.cmake: Removed references to deletion UI resources that have been removed.
2014-11-04 Dean Jackson <dino@apple.com>
[filters2] Support for backdrop-filter
https://bugs.webkit.org/show_bug.cgi?id=138384
<rdar://problem/18874494>
Reviewed by Simon Fraser.
* Shared/mac/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::drawInContext): Handle LayerTypeBackdropLayer in the switch.
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::description): Describe a backdrop layer.
* UIProcess/ios/RemoteLayerTreeHostIOS.mm:
(+[WKBackdropView layerClass]): Define CABackdropLayer and use it as the class.
(WebKit::RemoteLayerTreeHost::createLayer):
* UIProcess/mac/RemoteLayerTreeHost.mm: Ditto.
(WebKit::RemoteLayerTreeHost::createLayer):
2014-11-05 Ryuan Choi <ryuan.choi@gmail.com>
[EFL] Improve previous temporary fix against drawing (0,0) position before rendering content of next web page
https://bugs.webkit.org/show_bug.cgi?id=138305
Reviewed by Gyuyoung Kim.
WebKit2 has freezed layer tree until frame load completion since r101838.
In EFL port, we unfreeze it when PageViewportController::pageTransitionViewportReady() is called though,
UIProcess on EFL port updates cairo surface during the freezing time of layer tree.
Thus UIProcess should not update the layer trees until the layerTreeState is unfrozen.
* UIProcess/API/efl/EwkView.h: Removed previous workarounds.
(EwkView::setWaitingForNewPage): Deleted.
(EwkView::waitingForNewPage): Deleted.
(EwkView::didCommitNewPage): Deleted.
* UIProcess/CoordinatedGraphics/PageViewportController.cpp:
(WebKit::PageViewportController::PageViewportController):
(WebKit::PageViewportController::didCommitLoad):
(WebKit::PageViewportController::didRenderFrame):
(WebKit::PageViewportController::syncVisibleContents):
* UIProcess/CoordinatedGraphics/PageViewportController.h:
* UIProcess/efl/PageLoadClientEfl.cpp:
(WebKit::PageLoadClientEfl::didCommitLoadForFrame):
* UIProcess/efl/PageViewportControllerClientEfl.cpp:
(WebKit::PageViewportControllerClientEfl::didChangeVisibleContents):
* UIProcess/efl/ViewClientEfl.cpp:
(WebKit::ViewClientEfl::didRenderFrame):
2014-11-05 Timothy Horton <timothy_horton@apple.com>
Fix the build.
* UIProcess/mac/WKActionMenuController.mm:
2014-11-05 Dan Bernstein <mitz@apple.com>
Remove the unused deletion UI feature
https://bugs.webkit.org/show_bug.cgi?id=138442
Rubber-stamped by Alexey Proskuryakov.
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::shouldShowDeleteInterface): Deleted.
* WebProcess/WebCoreSupport/WebEditorClient.h:
2014-11-05 Conrad Shultz <conrad_shultz@apple.com>
It should be possible to open a page preview by clicking on it
https://bugs.webkit.org/show_bug.cgi?id=138445
Reviewed by Tim Horton.
Add a click recognizer to WKPagePreviewViewController and plumb it through to WKActionMenuController.
* UIProcess/mac/WKActionMenuController.mm:
Declare <WKPagePreviewViewControllerDelegate>, currently home to just a single method.
(-[WKPagePreviewViewController loadView]):
Configure and add a click gesture recognizer to the WKWebView.
(-[WKPagePreviewViewController _clickRecognized:]):
Gesture recognizer action; send -pagePreviewViewControllerWasClicked: to the delegate.
(-[WKActionMenuController willDestroyView:]):
Extract code to -_clearPreviewPopover.
(-[WKActionMenuController didCloseMenu:withEvent:]):
Ditto.
(-[WKActionMenuController _createPreviewPopoverForURL:]):
Set ourself as the delegate of the page preview controller.
(-[WKActionMenuController _clearPreviewPopover]):
Extracted from various other methods; if appropriate, nil out the preview view controller's delegate.
(-[WKActionMenuController popoverWillClose:]):
Extract code to -_clearPreviewPopover.
(-[WKActionMenuController pagePreviewViewControllerWasClicked:]):
WKPagePreviewViewControllerDelegate method; open the URL of the clicked page.
2014-11-05 Beth Dakin <bdakin@apple.com>
Page preview popover should show scaled-down web content
https://bugs.webkit.org/show_bug.cgi?id=138444
Reviewed by Anders Carlsson.
Instead of keeping the preferred size in the controller, keep the main views
size, and then scale the bounds of the popovers view using that and the scale
factor as a constant. Set the size of the popover explicitly so that it doesnt
get the views size. This will cause it to scale the WKWebView.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKPagePreviewViewController initWithPageURL:]):
(-[WKPagePreviewViewController loadView]):
(-[WKActionMenuController _createPreviewPopoverForURL:originRect:]):
(-[WKActionMenuController _preferredSizeForPopoverPresentedFromOriginRect:]):
2014-11-05 Conrad Shultz <conrad_shultz@apple.com>
Page preview popovers sometimes cover their originating element
https://bugs.webkit.org/show_bug.cgi?id=138437
Reviewed by Beth Dakin.
If a popover is sufficiently large, and the originating element is in a particular location, it's
possible that the popover can't be positioned in a manner that doesn't occlude the originating element.
Address this by scaling down the popover content if it can't fit entirely between the originating
element and the screen edge.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _previewURLFromActionMenu:]):
Update to use -_createPreviewPopoverForURL:originRect:.
(-[WKActionMenuController _createPreviewPopoverForURL:originRect:]):
Renamed from -_createPreviewPopoverForURL:; extract code to -_preferredSizeForPopoverPresentedFromOriginRect:.
(-[WKActionMenuController _preferredSizeForPopoverPresentedFromOriginRect:]):
Compute a size that is as large as possible while keeping the popover between the origin rect and screen edge
(with an arbitrary padding applied to keep from directly abutting the screen edge).
(-[WKActionMenuController _createPreviewPopoverForURL:]): Deleted.
2014-11-05 Alexey Proskuryakov <ap@apple.com>
fast/dom/remove-body-during-body-replacement2.html fails on WK2
https://bugs.webkit.org/show_bug.cgi?id=138334
Reviewed by Anders Carlsson.
Added an SPI to focus a frame.
* WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
(WKBundleFrameFocus):
* WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setViewState):
2014-11-05 Tim Horton <timothy_horton@apple.com>
Select Data Detectors results instead of just highlighting them
https://bugs.webkit.org/show_bug.cgi?id=138435
<rdar://problem/18877675>
Reviewed by Beth Dakin.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::selectLastActionMenuRange):
(WebKit::WebPageProxy::selectLookupTextAtLocation): Deleted.
Rename selectLookupTextAtLocation to selectLastActionMenuRange.
* UIProcess/WebPageProxy.h:
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController willOpenMenu:withEvent:]):
Do a real selection for single-item Data Detector menus; show the yellow highlight otherwise.
Adopt selectLastActionMenuRange for non-detected text.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performActionMenuHitTestAtLocation):
(WebKit::WebPage::selectLastActionMenuRange):
(WebKit::WebPage::selectLookupTextAtLocation): Deleted.
Store the last (detected data or Lookup-derived) action menu range.
Select it upon selectLastActionMenuRange.
2014-11-04 Jon Honeycutt <jhoneycutt@apple.com>
WebContent crash in WebPage::selectWithGesture()
<https://bugs.webkit.org/show_bug.cgi?id=138399>
<rdar://problem/18550631>
This crash occurs when the web process receives a "TapAndAHalf" gesture
with the "Changed" state without having received a "TapAndAHalf"
gesture with the "Began" state.
No test possible.
Reviewed by Simon Fraser.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::selectWithGesture):
Null check m_currentWordRange before dereferencing it.
2014-11-05 Conrad Shultz <conrad_shultz@apple.com>
Disable action menus on page previews
https://bugs.webkit.org/show_bug.cgi?id=138431
Reviewed by Anders Carlsson.
* UIProcess/API/mac/WKView.mm:
(-[WKView _shouldIgnoreMouseEvents]):
Renamed from -shouldIgnoreMouseEvents since this isn't actually public.
(-[WKView swipeWithEvent:]):
(-[WKView mouseMoved:]):
(-[WKView mouseDown:]):
(-[WKView mouseUp:]):
(-[WKView mouseDragged:]):
Updated to reflect method rename.
(-[WKView shouldIgnoreMouseEvents]): Deleted.
* UIProcess/API/mac/WKViewInternal.h:
Expose -_shouldIgnoreMouseEvents.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController prepareForMenu:withEvent:]):
Cancel the menu if the presenting WKView should ignore mouse events.
2014-11-05 Beth Dakin <bdakin@apple.com>
Action menu URL preview should "peek," i.e. appear when the menu item is
highlighted
https://bugs.webkit.org/show_bug.cgi?id=138432
-and corresponding-
rdar://problem/18774264
Reviewed by Anders Carlsson.
New ivars. Keep a reference to the popover, and a BOOL that indicates whether we
should close the popover when the menu goes away.
* UIProcess/mac/WKActionMenuController.h:
* UIProcess/mac/WKActionMenuController.mm:
Re-set the preview bool to NO whenever we are about to pop up a new menu.
(-[WKActionMenuController prepareForMenu:withEvent:]):
Close the popover when the menu closes unless _shouldKeepPreviewPopoverOpen has
been set.
(-[WKActionMenuController didCloseMenu:withEvent:]):
Set _shouldKeepPreviewPopoverOpen.
(-[WKActionMenuController _keepPreviewOpen:]):
Re-factored to use ivar.
(-[WKActionMenuController _previewURLFromActionMenu:]):
(-[WKActionMenuController _createPreviewPopoverForURL:]):
Now call _previewURLFromActionMenu on menu item highlight.
(-[WKActionMenuController menu:willHighlightItem:]):
NSPopover delegate method so that we can keep our BOOL and ivar accurate in the
case where the popover is closed by some other mechanism than the action menu
going away.
(-[WKActionMenuController popoverWillClose:]):
New selector for the preview. Now when this item is actually selected, we just
want to set the BOOL _shouldKeepPreviewPopoverOpen to YES so that we keep the
preview open.
(-[WKActionMenuController _createActionMenuItemForTag:]):
2014-11-05 Conrad Shultz <conrad_shultz@apple.com>
Disable interaction with action menu page previews
https://bugs.webkit.org/show_bug.cgi?id=138400
Reviewed by Tim Horton.
Expand on the existing -[WKView shouldIgnoreMouseEvents] by adding facilities to suppress handling
of all non-wheel events, effectively creating a scroll-only web view. Deploy this in
WKPagePreviewViewController.
* UIProcess/API/Cocoa/WKViewPrivate.h:
Declare the OS X-only ignoresNonWheelMouseEvents SPI.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _ignoresNonWheelMouseEvents]):
(-[WKWebView _setIgnoresNonWheelMouseEvents:]):
Wrap the underlying WKView methods.
* UIProcess/API/Cocoa/WKWebViewInternal.h:
Declare the OS X-only ignoresNonWheelMouseEvents property.
* UIProcess/API/mac/WKView.mm:
Add _ignoresNonWheelMouseEvents to WKViewData.
(-[WKView shouldIgnoreMouseEvents]):
Include a check for _ignoresNonWheelMouseEvents.
(-[WKView _setIgnoresNonWheelMouseEvents:]):
Set the ivar in WKViewData.
(-[WKView _ignoresNonWheelMouseEvents]):
Fetch the ivar in WKViewData.
(-[WKView _shouldIgnoreWheelEvents]):
Implement the old -shouldIgnoreMouseEvents behavior.
(-[WKView scrollWheel:]):
-shouldIgnoreMouseEvents -> -_shouldIgnoreWheelEvents.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKPagePreviewViewController loadView]):
Configure the WKWebView to ignore non-wheel mouse events; use RetainPtr for the WKWebView.
2014-11-03 Dean Jackson <dino@apple.com>
Add ENABLE_FILTERS_LEVEL_2 feature guard.
https://bugs.webkit.org/show_bug.cgi?id=138362
Reviewed by Tim Horton.
Add a new feature define for Level 2 of CSS Filters.
http://dev.w3.org/fxtf/filters-2/
* Configurations/FeatureDefines.xcconfig:
2014-11-05 Alberto Garcia <berto@igalia.com>
NetscapePlugin: NPP_GetValue should receive a pointer to NPBool, not bool
https://bugs.webkit.org/show_bug.cgi?id=138418
Reviewed by Carlos Garcia Campos.
Replace bool with NPBool, which is actually an unsigned char.
* WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
(WebKit::NetscapePlugin::platformPostInitialize):
2014-11-05 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add WebKitWebResource::failed-with-tls-errors signal
https://bugs.webkit.org/show_bug.cgi?id=137862
Reviewed by Gustavo Noronha Silva.
When a resource load fails due to TLS errors emit WebKitWebResource::failed-with-tls-errors
signal instead of WebKitWebResource::failed so that TLS errors information and certificate
are provided.
* UIProcess/API/gtk/WebKitInjectedBundleClient.cpp:
(didReceiveWebViewMessageFromInjectedBundle): Check if the error
is a TLS failure to emit failed-with-tls-errors instead of failed.
* UIProcess/API/gtk/WebKitWebResource.cpp:
(webkit_web_resource_class_init): Add WebKitWebResource::failed-with-tls-errors signal.
(webkitWebResourceFailedWithTLSErrors): Emit failed-with-tls-errors and finish signals.
* UIProcess/API/gtk/WebKitWebResourcePrivate.h:
2014-11-05 Shivakumar JM <shiva.jm@samsung.com>
Fix build warning in WebKit2/WebProcess module.
https://bugs.webkit.org/show_bug.cgi?id=138410
Reviewed by Alexey Proskuryakov.
Fix build warning by removing parameter name
* WebProcess/WebPage/WebPageOverlay.h:
(WebKit::WebPageOverlay::Client::prepareForActionMenu):
2014-11-05 Antti Koivisto <antti@apple.com>
Move HTTPHeaderMap encoding to the class
https://bugs.webkit.org/show_bug.cgi?id=138412
Reviewed by Andreas Kling.
* PluginProcess/PluginControllerProxy.cpp:
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<HTTPHeaderMap>::encode): Deleted.
(IPC::ArgumentCoder<HTTPHeaderMap>::decode): Deleted.
Make these HTTPHeaderMap members instead so they can access internals and can be used elsewhere.
* Shared/WebCoreArgumentCoders.h:
2014-11-04 Beth Dakin <bdakin@apple.com>
Speculative build fix.
* UIProcess/API/mac/WKView.mm:
(-[WKView _dismissActionMenuDataDetectorPopovers]):
* UIProcess/API/mac/WKViewInternal.h:
2014-11-04 Beth Dakin <bdakin@apple.com>
Un-anchor data detector popovers on scroll
https://bugs.webkit.org/show_bug.cgi?id=138385
-and corresponding-
rdar://problem/18869345
Reviewed by Tim Horton.
Whenever we dismiss the dictionary popover, and on scroll, we should try to
dismiss the data detector popovers. Right now we dont have the ability to know if
a dismiss succeeded, so we will settle for un-anchoring the popover.
* UIProcess/API/mac/WKView.mm:
(-[WKView viewDidMoveToWindow]):
(-[WKView _dismissActionMenuDataDetetcorPopovers]):
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didCommitLoadForFrame):
(WebKit::WebPageProxy::pageDidScroll):
(WebKit::WebPageProxy::resetStateAfterProcessExited):
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::dismissActionMenuDataDetetcorPopovers):
* UIProcess/mac/WKActionMenuController.h:
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController dismissActionMenuDataDetetcorPopovers]):
2014-11-04 Andy Estes <aestes@apple.com>
[iOS] WKPDFView should scroll to a fragment when loading a PDF
https://bugs.webkit.org/show_bug.cgi?id=138404
Reviewed by Tim Horton.
WKPDFView already knew how to scroll to a page number fragment during a same-document navigation, but it didn't
know to do so when loading a PDF whose URL already contained a page number fragment. This could happen if the
user long-presses a page number link and taps 'Open in New Tab'.
* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView web_setContentProviderData:suggestedFilename:]): Called _scrollToFragment:.
(-[WKPDFView _scrollToFragment:]): Moved fragment scrolling code to here from web_didSameDocumentNavigation:.
(-[WKPDFView web_didSameDocumentNavigation:]): Called _scrollToFragment.
2014-11-04 Andy Estes <aestes@apple.com>
[iOS] Stop using +[NSURL _web_URLWithWTFString:relativeToURL:] in WKPDFView
https://bugs.webkit.org/show_bug.cgi?id=138357
Rubber-stamped by Dan Bernstein.
During patch review for r175595 I changed from using +URLWithString:relativeToURL: to using
+_web_URLWithWTFString:relativeToURL: to append a page number fragment to the document URL.
If the base URL already contains a fragment, +_web_URLWithWTFString:relativeToURL: appends to the existing
fragment whereas +URLWithString:relativeToURL: replaces the existing fragment. I want the latter behavior.
* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView _URLForLinkAnnotation:]):
2014-11-04 Tim Horton <timothy_horton@apple.com>
Add bundle SPI allowing PageOverlay to customize the action menu
https://bugs.webkit.org/show_bug.cgi?id=138388
<rdar://problem/18875579>
Reviewed by Anders Carlsson.
* WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
Bump the BundlePageOverlay client version.
(WKBundlePageOverlayCreate):
(WKBundlePageOverlaySetAccessibilityClient):
Don't return if we have a version; the version check happens later anyway,
and now it is valid to have a version >0.
* WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h:
Bump the BundlePageOverlay client version.
Add prepareForActionMenu callback.
* WebProcess/WebPage/WebPageOverlay.h:
(WebKit::WebPageOverlay::Client::prepareForActionMenu):
* WebProcess/WebPage/WebPageOverlay.cpp:
(WebKit::overlayMap):
(WebKit::WebPageOverlay::WebPageOverlay):
(WebKit::WebPageOverlay::~WebPageOverlay):
(WebKit::WebPageOverlay::fromCoreOverlay):
(WebKit::WebPageOverlay::pageOverlayDestroyed):
Keep track of a map of PageOverlay to WebPageOverlay.
(WebKit::WebPageOverlay::prepareForActionMenu):
Forward prepareForActionMenu to the client.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performActionMenuHitTestAtLocation):
Iterate through the overlays and let them prepareForActionMenu;
the first overlay that returns true wins. If no overlays want to
do anything, hand preparation along to the context menu client.
2014-11-03 Jeremy Jones <jeremyj@apple.com>
Add button and enable optimized fullscreen.
https://bugs.webkit.org/show_bug.cgi?id=138351
Reviewed by Eric Carlson.
Add IsOptimizedFullscreenSupported to enable the feature only where appropriate.
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface): add IsOptimizedFullscreenSupported
2014-11-04 Andy Estes <aestes@apple.com>
[iOS] Add long press support for links in WKPDFView
https://bugs.webkit.org/show_bug.cgi?id=138357
Reviewed by Dan Bernstein.
Use WKActionSheetAssistant to show a link action sheet in response to long-pressing on a link. Have WKPDFView
conform to WKActionSheetAssistantDelegate in order to respond to the open and copy actions as well as to
provide the link's URL and position information to WKActionSheetAssistant. The long-pressed link is highlighted
for .75 seconds before the sheet is displayed in order to match UIWebPDFView.
* UIProcess/ios/WKActionSheetAssistant.h: Made protocol methods that WKPDFView doesn't implement optional.
* UIProcess/ios/WKActionSheetAssistant.mm:
(-[WKActionSheetAssistant updatePositionInformation]): Checked if delegate responds to
updatePositionInformationForActionSheetAssistant: before calling.
(-[WKActionSheetAssistant _createSheetWithElementActions:showLinkTitle:]): Checked if delegate responds to
actionSheetAssistant:willStartInteractionWithElement: before calling.
(-[WKActionSheetAssistant cleanupSheet]): Checked if delegate responds to actionSheetAssistantDidStopInteraction:
before calling.
* UIProcess/ios/WKPDFView.h: Conformed to WKActionSheetAssistantDelegate.
* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView web_initWithFrame:webView:]): Instantiated a WKActionSheetAssistant and set self as its delegate.
(-[WKPDFView _highlightLinkAnnotation:forDuration:completionHandler:]): Moved highlight drawing to here from
annotation:wasTouchedAtPoint:controller: in order to be reused for long-press.
(-[WKPDFView _URLForLinkAnnotation:]): Moved URL creation to here from annotation:wasTouchedAtPoint:controller:
in order to be reused for long-press. Generated an absolute URL since this URL might go into the pasteboard.
(-[WKPDFView annotation:wasTouchedAtPoint:controller:]): Changed to call
_highlightLinkAnnotation:forDuration:completionHandler: and _URLForLinkAnnotation:.
(-[WKPDFView annotation:isBeingPressedAtPoint:controller:]): Set values on _positionInformation and called
-[WKActionSheetAssistant showLinkSheet] after showing a highlight for .75 seconds.
(-[WKPDFView positionInformation]): Returned _positionInformation.
(-[WKPDFView performAction:]): Added a UTF-8 text and URL representation of the pressed URL to the pasteboard.
(-[WKPDFView openElementAtLocation:]): Called WebPage::navigateToURLWithSimulatedClick().
(-[WKPDFView actionsForElement:defaultActions:]): Returned actions from UIClient::actionsForElement().
(-[WKPDFView _createHighlightViewWithFrame:]): Deleted.
2014-11-04 Anders Carlsson <andersca@apple.com>
Try to fix the 32-bit build.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _defaultMenuItemsForLink]):
(-[WKActionMenuController _createActionMenuItemForTag:]):
2014-11-04 Conrad Shultz <conrad_shultz@apple.com>
Use a web view for Quick Look in action menus
https://bugs.webkit.org/show_bug.cgi?id=138370
Reviewed by Anders Carlsson.
Instead of using the QLPreviewBubble SPI, show a popover containing a web view. This currently
does not inherit any configuration from the presenting WKView and does not expose any
customization options.
* UIProcess/mac/WKActionMenuController.mm:
Declare new internal NSViewController subclass, WKPagePreviewViewController.
(-[WKPagePreviewViewController initWithPageURL:]):
Store the passed-in URL and set a somewhat arbitrary (iPhone 5 screen size) default preferred size.
(-[WKPagePreviewViewController loadView]):
Create a WKWebView and load the URL passed into the initializer.
(-[WKActionMenuController _previewURLFromActionMenu:]):
Renamed from -_quickLookURLFromActionMenu:; present the popover returned by -_createPreviewPopoverForURL:.
(-[WKActionMenuController _createPreviewPopoverForURL:]):
New helper method; return a popover that owns a _WKPagePreviewViewController configured to show a scaled-down web page.
(-[WKActionMenuController _createActionMenuItemForTag:]):
Update to reflect method rename.
(-[WKActionMenuController _quickLookURLFromActionMenu:]): Deleted.
2014-11-04 Chris Dumez <cdumez@apple.com>
Add ptr() method to Ref class
https://bugs.webkit.org/show_bug.cgi?id=138361
Reviewed by Darin Adler.
Use the new Ref::ptr() method.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::createWebPage):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setPreferences):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::didNavigateWithNavigationData):
(WebKit::WebProcessProxy::didPerformClientRedirect):
(WebKit::WebProcessProxy::didPerformServerRedirect):
(WebKit::WebProcessProxy::didUpdateHistoryTitle):
2014-11-04 Andy Estes <aestes@apple.com>
[iOS] Include a WKActionSheetAssistant parameter in WKActionSheetAssistantDelegate methods
https://bugs.webkit.org/show_bug.cgi?id=137792
Reviewed by Dan Bernstein.
* UIProcess/API/Cocoa/_WKElementAction.mm:
(+[_WKElementAction elementActionWithTitle:actionHandler:]):
(+[_WKElementAction elementActionWithType:customTitle:]):
(-[_WKElementAction _runActionWithElementInfo:forActionSheetAssistant:]):
* UIProcess/API/Cocoa/_WKElementActionInternal.h:
* UIProcess/ios/WKActionSheetAssistant.h:
* UIProcess/ios/WKActionSheetAssistant.mm:
(-[WKActionSheetAssistant initialPresentationRectInHostViewForSheet]):
(-[WKActionSheetAssistant presentationRectInHostViewForSheet]):
(-[WKActionSheetAssistant updatePositionInformation]):
(-[WKActionSheetAssistant _createSheetWithElementActions:showLinkTitle:]):
(-[WKActionSheetAssistant showImageSheet]):
(-[WKActionSheetAssistant showLinkSheet]):
(-[WKActionSheetAssistant showDataDetectorsSheet]):
(-[WKActionSheetAssistant cleanupSheet]):
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView positionInformationForActionSheetAssistant:]):
(-[WKContentView updatePositionInformationForActionSheetAssistant:]):
(-[WKContentView actionSheetAssistant:performAction:]):
(-[WKContentView actionSheetAssistant:openElementAtLocation:]):
(-[WKContentView actionSheetAssistant:decideActionsForElement:defaultActions:]):
(-[WKContentView actionSheetAssistant:willStartInteractionWithElement:]):
(-[WKContentView actionSheetAssistantDidStopInteraction:]):
2014-11-04 Csaba Osztrogonác <ossy@webkit.org>
URTBF after r175564 for !PLATFORM(COCOA).
* Shared/TextIndicator.cpp:
2014-11-04 Tim Horton <timothy_horton@apple.com>
Implement yellow highlight over data detected items
https://bugs.webkit.org/show_bug.cgi?id=138340
<rdar://problem/18840102>
Reviewed by Anders Carlsson.
* Shared/TextIndicator.cpp: Renamed from Source/WebKit2/UIProcess/TextIndicator.cpp.
* Shared/TextIndicator.h: Renamed from Source/WebKit2/UIProcess/TextIndicator.h.
Move TextIndicator to Shared.
Move all of the members to a Data struct.
Implement encode/decode for TextIndicator::Data, so it can be passed as
the argument to SetTextIndicator, and also as a field on ActionMenuHitTestResult.
Add 'createWithSelectionInFrame', which builds a TextIndicator
from the selection in the given frame.
* Shared/mac/ActionMenuHitTestResult.h:
* Shared/mac/ActionMenuHitTestResult.mm:
(WebKit::ActionMenuHitTestResult::encode):
(WebKit::ActionMenuHitTestResult::decode):
Rename actionBoundingBox to detectedDataBoundingBox.
Store/encode/decode detectedDataTextIndicator.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setTextIndicator):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
Create a TextIndicator from the TextIndicator::Data.
Add an explicit ClearTextIndicator message instead of sending empty Data.
* UIProcess/mac/WKActionMenuController.h:
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController prepareForMenu:withEvent:]):
If the text indicator is up when preparing for a new menu invocation, hide it.
(-[WKActionMenuController willOpenMenu:withEvent:]):
Show the text indicator when the menu opens, for data detected items.
(-[WKActionMenuController didCloseMenu:withEvent:]):
Hide the text indicator when the menu closes, unless we only had one item.
Then, we'll hide it in the DDActionContext completionHandler block.
(-[WKActionMenuController _showTextIndicator]):
(-[WKActionMenuController _hideTextIndicator]):
Added. Show and hide the text indicator based on the TextIndicator
data included in the action menu hit test result.
(-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
Hide the text indicator when the data detector popover completes.
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::getImageForFindMatch):
Make use of the newly-moved createSelectionSnapshot.
(WebKit::FindController::updateFindIndicator):
Make use of TextIndicator::createWithSelectionInFrame, which allows
us to share this code for building a TextIndicator with other callers.
(WebKit::FindController::hideFindIndicator):
(WebKit::getFindIndicatorBitmap): Deleted.
Move getFindIndicatorBitmap to WebFrame::createSelectionSnapshot.
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::createSelectionSnapshot):
Moved from FindController's getFindIndicatorBitmap.
Now returns a ShareableBitmap instead of going ahead and making a Handle.
* WebProcess/WebPage/WebFrame.h:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::scanForDataDetectedItems):
(WebKit::textIndicatorForRange):
Temporarily change the selection to the given range, then use
TextIndicator::indicatorWithSelectionInFrame to acquire a TextIndicator,
then reset the selection.
(WebKit::WebPage::performActionMenuHitTestAtLocation):
Create a TextIndicator from the data detected range.
2014-11-04 Andy Estes <aestes@apple.com>
Fix the iOS build after r175549.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::performActionOnElement):
2014-11-04 Darin Adler <darin@apple.com>
Eliminate ResourceBuffer and use SharedBuffer directly instead
https://bugs.webkit.org/show_bug.cgi?id=138174
Reviewed by Antti Koivisto.
* CMakeLists.txt: Removed WebResourceBuffer.cpp.
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::sendBuffer): Use a reference instead of pointer.
* NetworkProcess/NetworkResourceLoader.h: Ditto.
* NetworkProcess/mac/NetworkDiskCacheMonitor.h: Ditto.
* NetworkProcess/mac/NetworkDiskCacheMonitor.mm:
(WebKit::NetworkDiskCacheMonitor::resourceBecameFileBacked): Ditto.
* NetworkProcess/mac/NetworkResourceLoaderMac.mm:
(WebKit::NetworkResourceLoader::tryGetShareableHandleFromSharedBuffer): Ditto.
* Shared/WebResourceBuffer.cpp: Removed.
* Shared/WebResourceBuffer.h: Removed.
* WebKit2.xcodeproj/project.pbxproj: Removed WebResourceBuffer.cpp/h.
* WebProcess/Network/NetworkProcessConnection.cpp: Removed unneeded includes.
(WebKit::NetworkProcessConnection::didCacheResource): Use a reference instead
of a pointer.
* WebProcess/Network/WebResourceLoadScheduler.cpp: Removed unneeded include.
* WebProcess/Network/WebResourceLoader.cpp: Ditto.
* WebProcess/Network/WebResourceLoader.h: Ditto.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: Ditto.
(WebKit::WebFrameLoaderClient::finishedLoading): Use SharedBuffer directly.
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::source): Ditto.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::runJavaScriptInMainFrame): Refactored to make the relationship
between the buffer and the DataReference clearer and to avoid having a long-lived
DataReference pointing to an underlying buffer with unclear lifetime.
(WebKit::WebPage::getContentsAsString): Ditto.
(WebKit::WebPage::getSelectionAsWebArchiveData): Ditto.
(WebKit::WebPage::getMainResourceDataOfFrame): Ditto. Also use SharedBuffer directly.
(WebKit::WebPage::getResourceDataFromFrame): Ditto.
(WebKit::WebPage::getWebArchiveOfFrame): Ditto.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::containingLinkElement): Use elementLineage.
(WebKit::WebPage::performActionOnElement): Use references and SharedBuffer.
ALso did a bit of other cleanup in here.
(WebKit::isAssistableElement): Take Element& instead of Node*, since that's what
the caller has.
(WebKit::nextAssistableElement): Changed name to match what the function does.
Added an obviously-missing check on the startNode argument. Updated for change
to isAssistableElement above. Take a Page& instead of a Page*.
(WebKit::hasAssistableElement): Changed name to match what the function does.
Updated for change to nextAssistableElement above. Took out incorrect comparison
of a C++ pointer to the Objective-C object pointer nil. Take a Page& instead of a Page*.
(WebKit::WebPage::focusNextAssistedNode): Updated for above changes.
(WebKit::WebPage::getAssistedNodeInformation): Updated for above changes.
2014-11-04 Tim Horton <timothy_horton@apple.com>
Dictionary lookup panel pops up at random when clicking on selected text
https://bugs.webkit.org/show_bug.cgi?id=138353
<rdar://problem/18861406>
* WebProcess/WebPage/WebPage.h:
Fix the build; this needs to be public.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::rangeForDictionaryLookupAtHitTestResult):
Use the right selection (the one we just tested) in the change from r175517.
2014-11-04 Tim Horton <timothy_horton@apple.com>
Dictionary lookup panel pops up at random when clicking on selected text
https://bugs.webkit.org/show_bug.cgi?id=138353
<rdar://problem/18861406>
Reviewed by Andreas Kling.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::rangeForDictionaryLookupForSelection):
(WebKit::rangeForDictionaryLookupAtHitTestResult):
Factor rangeForDictionaryLookupForSelection out of performDictionaryLookupForSelection.
Make use of rangeForDictionaryLookupForSelection in rangeForDictionaryLookupAtHitTestResult,
returning the selection-based range if the hit test intersects the selected text.
Previously, we were just going forward with performDictionaryLookupForSelection,
which would actually *do* the lookup, even if we just wanted to retrieve the range.
Make rangeForDictionaryLookup* static.
(WebKit::WebPage::performDictionaryLookupForSelection):
Make use of rangeForDictionaryLookupForSelection.
2014-11-03 Chris Dumez <cdumez@apple.com>
Allow implicit conversion from Ref<T> to T&
https://bugs.webkit.org/show_bug.cgi?id=138331
Reviewed by Andreas Kling.
Remove unnecessary calls to Ref<T>::get() now that a Ref<T> can be
converted implicitly to a T&.
2014-11-03 Simon Fraser <simon.fraser@apple.com>
Expose visibleDebugOverlayRegions pref via the WK2 C SPI
https://bugs.webkit.org/show_bug.cgi?id=138342
Reviewed by Dan Bernstein.
Expose WKDebugOverlayRegions via the C SPI.
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetVisibleDebugOverlayRegions):
(WKPreferencesGetVisibleDebugOverlayRegions):
* UIProcess/API/C/WKPreferencesRef.h:
2014-11-03 Beth Dakin <bdakin@apple.com>
Implement action menus for editable text with spelling suggestions
https://bugs.webkit.org/show_bug.cgi?id=138333
-and corresponding-
rdar://problem/18742371
Reviewed by Tim Horton.
New types.
* Shared/API/c/WKActionMenuItemTypes.h:
* Shared/API/c/WKActionMenuTypes.h:
ActionMenuHitTestResult now stores the String result of the lookup.
* Shared/mac/ActionMenuHitTestResult.h:
* Shared/mac/ActionMenuHitTestResult.mm:
(WebKit::ActionMenuHitTestResult::encode):
(WebKit::ActionMenuHitTestResult::decode):
Make getGuessesForWord() public so we can call it from WKActionMenuController.
* UIProcess/WebPageProxy.h:
* UIProcess/mac/WKActionMenuController.mm:
Select the text for all types of text menus.
(-[WKActionMenuController isMenuForTextContent]):
(-[WKActionMenuController willOpenMenu:withEvent:]):
Spelling suggestions are presented in a sub-menu and will replace the selection
when chosen.
(-[WKActionMenuController _defaultMenuItemsForEditableTextWithSuggestions:]):
(-[WKActionMenuController _changeSelectionToSuggestion:]):
(-[WKActionMenuController _createActionMenuItemForTag:]):
(-[WKActionMenuController _defaultMenuItems:]):
New function to store the lookupText as a String on the ActionMenuHitTestResult.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performActionMenuHitTestAtLocation):
(WebKit::WebPage::lookupTextAtLocation):
2014-11-03 Simon Fraser <simon.fraser@apple.com>
Add page overlays that show regions with mouseWheel event handlers, and the non-fast-scrollable region, and code to toggle them in MiniBrowser WK2
https://bugs.webkit.org/show_bug.cgi?id=138257
Reviewed by Tim Horton.
Add private prefs to control visibility of debug-related page region overlays.
* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _visibleDebugOverlayRegions]):
(-[WKPreferences _setVisibleDebugOverlayRegions:]):
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:
* UIProcess/mac/WebPreferencesMac.mm:
(WebKit::setDebugUInt32ValueIfInUserDefaults):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::updatePreferences): Update the overlays.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::updatePreferences): Update the overlays.
2014-11-03 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r175406, r175413, and r175423.
https://bugs.webkit.org/show_bug.cgi?id=138327
Multipart tests are still broken (Requested by ap on #webkit).
Reverted changesets:
"Eliminate ResourceBuffer and use SharedBuffer directly
instead"
https://bugs.webkit.org/show_bug.cgi?id=138174
http://trac.webkit.org/changeset/175406
"Unreviewed, iOS build fix since 175406."
http://trac.webkit.org/changeset/175413
"Fix assertion in CachedResource::addDataBuffer"
http://trac.webkit.org/changeset/175423
2014-11-03 Tim Horton <timothy_horton@apple.com>
_actionMenuItemsForHitTestResult is given kWKActionMenuLink but an empty array of defaultMenuItems
https://bugs.webkit.org/show_bug.cgi?id=138321
<rdar://problem/18855134>
Reviewed by Beth Dakin.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _defaultMenuItemsForLink]):
(-[WKActionMenuController _defaultMenuItems:]):
Move the HTTP-family-URLs-only condition to the place where we decide what kind of menu to
show. We depend on _defaultMenuItemsForLink returning the link menu, and should never
set the link menu type if we aren't going to build a link menu.
2014-11-03 Tim Horton <timothy_horton@apple.com>
Use FrameSnapshotting functions in FindController::getFindIndicatorBitmap
https://bugs.webkit.org/show_bug.cgi?id=138300
<rdar://problem/18855863>
Reviewed by Simon Fraser.
Share more code by using WebCore's FrameSnapshotting::snapshotSelection
in FindController instead of copying it into FindController wholesale.
* WebProcess/WebPage/FindController.cpp:
(WebKit::getFindIndicatorBitmap):
Make getFindIndicatorBitmap static, rename it from getFindIndicatorBitmapAndRect,
and drop the rect argument because only one caller wanted it, and we no longer need
to compute it (this happens in WebCore now).
Use snapshotSelection; all of the removed paint behaviors get added by
code in or underneath snapshotSelection now.
Draw the snapshot into our ShareableBitmap; we could avoid this in a future patch
by refactoring the FrameSnapshotting functions to take GraphicsContexts.
(WebKit::FindController::getImageForFindMatch):
(WebKit::FindController::updateFindIndicator):
Adopt the new getFindIndicatorBitmap.
* WebProcess/WebPage/FindController.h:
Remove getFindIndicatorBitmap(AndRect), which is now static.
2014-11-03 Csaba Osztrogonác <ossy@webkit.org>
URTBF after r175476 to make GTK and EFL build happy.
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::setTextIndicator):
(WebKit::PageClientImpl::setFindIndicator): Deleted.
* UIProcess/API/gtk/PageClientImpl.h:
* UIProcess/CoordinatedGraphics/WebView.cpp:
(WebKit::WebView::setTextIndicator):
(WebKit::WebView::setFindIndicator): Deleted.
* UIProcess/CoordinatedGraphics/WebView.h:
2014-11-03 Tim Horton <timothy_horton@apple.com>
Rename FindIndicator{Window} to TextIndicator{Window}
https://bugs.webkit.org/show_bug.cgi?id=138302
<rdar://problem/18855190>
Reviewed by Anders Carlsson.
Rename FindIndicator{Window} to TextIndicator{Window} (and related),
because it will soon be used to indicate ranges of text that are not
necessarily find-in-page results.
FindController still has things named 'findIndicator' internally,
and I left the API alone (because all the API bits are actually find-specific),
but the actual FindIndicator/Window and the message to set it up, etc. are all
now called Text*.
* CMakeLists.txt:
* UIProcess/API/mac/WKView.mm:
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/PageClient.h:
* UIProcess/TextIndicator.cpp: Renamed from Source/WebKit2/UIProcess/FindIndicator.cpp.
* UIProcess/TextIndicator.h: Renamed from Source/WebKit2/UIProcess/FindIndicator.h.
* UIProcess/WebPageProxy.cpp:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
* UIProcess/ios/WKContentView.h:
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
* UIProcess/mac/TextIndicatorWindow.h: Renamed from Source/WebKit2/UIProcess/mac/FindIndicatorWindow.h.
* UIProcess/mac/TextIndicatorWindow.mm: Renamed from Source/WebKit2/UIProcess/mac/FindIndicatorWindow.mm.
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebPage/FindController.cpp:
2014-11-03 Beth Dakin <bdakin@apple.com>
Implement action menus for editable text
https://bugs.webkit.org/show_bug.cgi?id=138284
-and corresponding-
rdar://problem/18742323
Reviewed by Tim Horton.
New item type for paste.
* Shared/API/c/WKActionMenuItemTypes.h:
New menu type for editable text.
* Shared/API/c/WKActionMenuTypes.h:
* UIProcess/mac/WKActionMenuController.mm:
willOpenMenu should select text for both regular text menus and editable text
menus.
(-[WKActionMenuController willOpenMenu:withEvent:]):
Default items for editable text.
(-[WKActionMenuController _defaultMenuItemsForEditableText]):
(-[WKActionMenuController _paste:]):
(-[WKActionMenuController _createActionMenuItemForTag:]):
New method _hitTestResultForStage:(MenuUpdateStage)stage will figure out whether
we can use the WebHitTestResult from the ActionMenuHitTestResult or if we have to
use the potentially out-of-date WebHitTestResult that is cached on WebPageProxy.
An important difference between these results is that the ActionMenuHitTest
result, in addition to being more recent and accurate, also now includes shadow
content, which affects some editable regions on important sites such as
bugs.webkit.org and nytimes.com.
(-[WKActionMenuController _defaultMenuItems:]):
(-[WKActionMenuController _updateActionMenuItemsForStage:]):
(imageForResource:name::if): Deleted.
Allow shadow content in action menu hit testing.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performActionMenuHitTestAtLocation):
(WebKit::WebPage::selectLookupTextAtLocation):
2014-11-03 Ada Chan <adachan@apple.com>
Persist the page's muted state across web process crashes.
https://bugs.webkit.org/show_bug.cgi?id=138195
Reviewed by Anders Carlsson.
Store the Page's muted state in WebPageCreationParameters so that state can be properly
restored after recovering from a crash in the web process.
* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
Initialize m_muted.
(WebKit::WebPageProxy::setMuted):
Update m_muted.
(WebKit::WebPageProxy::creationParameters):
Set the muted data member in WebPageCreationParameters.
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
Initialize the page's muted state with the muted value from WebPageCreationParameters.
2014-11-03 Ryuan Choi <ryuan.choi@gmail.com>
[EFL] Remove dependency of PageViewportController from PageViewportControllerClient
https://bugs.webkit.org/show_bug.cgi?id=138301
Reviewed by Gyuyoung Kim.
PaeViewportControllerClient does not need to keep the instance of PageViewPortController.
This patch removes it to simplify relation between them.
In addition, uses a reference for the client of PageViewportController.
* UIProcess/API/efl/EwkView.cpp:
(EwkView::EwkView):
(EwkView::setViewportPosition):
* UIProcess/API/efl/EwkView.h:
* UIProcess/CoordinatedGraphics/PageViewportController.cpp:
(WebKit::PageViewportController::PageViewportController):
(WebKit::PageViewportController::didChangeContentsSize):
(WebKit::PageViewportController::didRenderFrame):
(WebKit::PageViewportController::pageDidRequestScroll):
(WebKit::PageViewportController::syncVisibleContents):
(WebKit::PageViewportController::didChangeViewportAttributes):
* UIProcess/CoordinatedGraphics/PageViewportController.h:
* UIProcess/PageViewportControllerClient.h:
* UIProcess/efl/PageViewportControllerClientEfl.cpp:
(WebKit::PageViewportControllerClientEfl::PageViewportControllerClientEfl):
(WebKit::PageViewportControllerClientEfl::setViewportPosition):
(WebKit::PageViewportControllerClientEfl::setController): Deleted.
* UIProcess/efl/PageViewportControllerClientEfl.h:
2014-11-03 Sungmann Cho <sungmann.cho@navercorp.com>
AX: Fix some minor typos related to the word "accessibility".
https://bugs.webkit.org/show_bug.cgi?id=138299
Reviewed by Chris Fleizach.
No new tests, no behavior change.
* WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.mm:
2014-11-01 Carlos Garcia Campos <cgarcia@igalia.com>
REGRESSION(r163656): Remote inspector doesn't work unless preferences change after page initialization
https://bugs.webkit.org/show_bug.cgi?id=138246
Reviewed by Joseph Pecoraro.
The problem is that initializeWebPage() is still using
pageGroup().preferences() instead of m_preferences to check if
developer extras are enabled to enable remote inspection of the page.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::initializeWebPage): Use m_preferences
instead of pageGroup().preferences().
2014-11-01 Carlos Garcia Campos <cgarcia@igalia.com>
REGRESSION(CMake): Make it possible to build without introspection
https://bugs.webkit.org/show_bug.cgi?id=138006
Reviewed by Philippe Normand.
Do not install introspection files when introspection is disabled.
* PlatformGTK.cmake:
2014-10-31 Dan Bernstein <mitz@apple.com>
Removed a reference to a file thats been deleted.
* WebKit2.xcodeproj/project.pbxproj: Removed reference to XPCPtr.h.
2014-10-31 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Use std::unique_ptr instead of OwnPtr in CoordinatorDrawingProxy
https://bugs.webkit.org/show_bug.cgi?id=138238
Reviewed by Ryosuke Niwa.
* UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.cpp:
(WebKit::CoordinatedDrawingAreaProxy::CoordinatedDrawingAreaProxy): Use std::make_unique.
(WebKit::CoordinatedDrawingAreaProxy::enterAcceleratedCompositingMode):
* UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.h: Use std::unique_ptr instead of OwnPtr.
2014-10-31 Sam Weinig <sam@webkit.org>
Add bundle SPI to customize the action menu
<rdar://problem/18830771>
https://bugs.webkit.org/show_bug.cgi?id=138271
Reviewed by Anders Carlsson.
- Adds a new function to the WKBundlePageContextMenuClient that allows the client to pass construct
user data in the bundle that can be available when customizing the menu in -[WKView _actionMenuItemsForHitTestResult...].
- Changes the signature of -[WKView _actionMenuItemsForHitTestResult...] to add userData.
- Makes the actual hit test result available in the second invocation of -[WKView _actionMenuItemsForHitTestResult...]
by serializing it in the ActionMenuHitTestResult.
* Shared/mac/ActionMenuHitTestResult.h:
* Shared/mac/ActionMenuHitTestResult.mm:
(WebKit::ActionMenuHitTestResult::encode):
(WebKit::ActionMenuHitTestResult::decode):
Adds the WebHitTestResult and the original hit test request location.
* UIProcess/API/Cocoa/WKViewPrivate.h:
Adds a new version of _actionMenuItemsForHitTestResult that passes userData along.
* UIProcess/API/mac/WKView.mm:
(-[WKView _didPerformActionMenuHitTest:userData:]):
(-[WKView _actionMenuItemsForHitTestResult:withType:defaultActionMenuItems:userData:]):
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didPerformActionMenuHitTest):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::didPerformActionMenuHitTest):
Pipe the user data through to the WKView.
* UIProcess/mac/WKActionMenuController.h:
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController prepareForMenu:withEvent:]):
(-[WKActionMenuController didPerformActionMenuHitTest:userData:]):
(-[WKActionMenuController menuNeedsUpdate:]):
(-[WKActionMenuController _updateActionMenuItemsForStage:]):
Differentiate between the two times _updateActionMenuItems was called via a new stage parameter,
(it is called once in prepareForMenu, and once in menuNeedsUpdate). Use the last mouse move hit
test result in the prepareForMenu case (as we don't have a real result yet), and the hit result
passed in via didPerformActionMenuHitTest in the menuNeedsUpdate case (assuming we didn't time out)
waiting on the web process.
* WebProcess/InjectedBundle/API/c/WKBundlePageContextMenuClient.h:
* WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
(WebKit::InjectedBundlePageContextMenuClient::prepareForActionMenu):
* WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.h:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performActionMenuHitTestAtLocation):
Adds new bundle SPI to collect user data to pass to the -[WKView _actionMenuItemsForHitTestResult...] method.
2014-10-31 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Use std::unique_ptr for TypeCountSet
https://bugs.webkit.org/show_bug.cgi?id=138242
Reviewed by Andreas Kling.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::getWebCoreStatistics): Use std::unique_ptr<> instead of OwnPtr.
2014-10-30 Jer Noble <jer.noble@apple.com>
[WK2] Send origin & deletion requests to WebProcessess in additon to the DatabaseProcess.
https://bugs.webkit.org/show_bug.cgi?id=138212
Reviewed by Brady Eidson.
Now that the WebProcess has its own WebOriginDataManager, WebOriginDataManagerProxy needs to
send its origin and deletion messages to all the WebProcesses. This necessetates synchronizing
all the various process's callbacks so that the final callback is only triggered once all the
messaged processes reply.
Add a simple class, CallbackSynchronizer, which will keep track of outstanding process callbacks
and which will trigger the final callback once all of them finish.
* UIProcess/WebOriginDataManagerProxy.cpp:
(WebKit::CallbackSynchronizer::create):
(WebKit::CallbackSynchronizer::~CallbackSynchronizer):
(WebKit::CallbackSynchronizer::taskStarted):
(WebKit::CallbackSynchronizer::taskCompleted):
(WebKit::CallbackSynchronizer::CallbackSynchronizer):
(WebKit::createSynchronizedCallback):
(WebKit::sendMessageToAllProcessesInContext):
(WebKit::WebOriginDataManagerProxy::getOrigins):
(WebKit::WebOriginDataManagerProxy::deleteEntriesForOrigin):
(WebKit::WebOriginDataManagerProxy::deleteEntriesModifiedBetweenDates):
(WebKit::WebOriginDataManagerProxy::deleteAllEntries):
Drive-by fix: check the correct enum value for WebMedia origin requests.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::getOrigins):
(WebKit::WebProcess::deleteEntriesForOrigin):
(WebKit::WebProcess::deleteEntriesModifiedBetweenDates):
(WebKit::WebProcess::deleteAllEntries):
2014-10-31 Tim Horton <timothy_horton@apple.com>
REGRESSION (r175376): Occasional null deref when doing a dictionary lookup
https://bugs.webkit.org/show_bug.cgi?id=138261
<rdar://problem/18841709>
Reviewed by Anders Carlsson.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performDictionaryLookupAtLocation):
rangeForDictionaryLookupAtHitTestResult can easily return null.
2014-10-31 Beth Dakin <bdakin@apple.com>
Use system art for action menus when possible
https://bugs.webkit.org/show_bug.cgi?id=138260
Reviewed by Tim Horton.
* Resources/AddImageToPhotosTemplate.pdf: Removed.
* Resources/CopyImageTemplate.pdf: Removed.
* Resources/SaveImageToDownloadsTemplate.pdf: Removed.
* Resources/ShareImageTemplate.pdf: Removed.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _createActionMenuItemForTag:]):
* WebKit2.xcodeproj/project.pbxproj:
2014-10-31 Timothy Horton <timothy_horton@apple.com>
Fix the build for Yosemite systems after r175417
* UIProcess/mac/WKActionMenuController.mm:
2014-10-31 Timothy Horton <timothy_horton@apple.com>
Fix the build for pre-Yosemite systems after r175417
* UIProcess/API/mac/WKView.mm:
(-[WKView dealloc]):
(-[WKView initWithFrame:context:configuration:webView:]):
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::didPerformActionMenuHitTest):
* UIProcess/mac/WKActionMenuController.h:
* UIProcess/mac/WKActionMenuController.mm:
2014-10-31 Timothy Horton <timothy_horton@apple.com>
Remove "Add to iPhoto" from the action menu's sharing menu
https://bugs.webkit.org/show_bug.cgi?id=138251
<rdar://problem/18837197>
Reviewed by Anders Carlsson.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController sharingServicePicker:sharingServicesForItems:mask:proposedSharingServices:]):
Retain/autorelease the new array.
2014-10-31 Tim Horton <timothy_horton@apple.com>
Remove "Add to iPhoto" from the action menu's sharing menu
https://bugs.webkit.org/show_bug.cgi?id=138251
<rdar://problem/18837197>
Reviewed by Anders Carlsson.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController sharingServicePicker:sharingServicesForItems:mask:proposedSharingServices:]):
Filter out "Add to iPhoto".
2014-10-31 Adrian Perez de Castro <aperez@igalia.com>
[GTK] Support script message handlers WebKitUserContentManager
https://bugs.webkit.org/show_bug.cgi?id=133730
Reviewed by Carlos Garcia Campos.
Support user script message handlers in WebKitUserContentManager.
This needs building with ENABLE_USER_MESSAGE_HANDLERS, for which
an option is added to the CMake build files. The option is disabled
globally by default, and the WebKitGTK port enables it. On the API
level, two new methods to register and unregister names are provided
in the "window.webkit" namespace, and on message reception the
"WebKitUserContentManager::script-message-received" signal is
emitted, using the registered names as signal detail.
* UIProcess/API/gtk/WebKitJavascriptResult.cpp: Add a new private
function to construct a WebKitJavascriptResult directly from a
WebCore::SerializedScriptValue.
(_WebKitJavascriptResult::_WebKitJavascriptResult): Ditto.
(webkitJavascriptResultCreate): Ditto.
* UIProcess/API/gtk/WebKitJavascriptResultPrivate.h: Ditto.
* UIProcess/API/gtk/WebKitUserContentManager.cpp:
(webkit_user_content_manager_class_init): Install the
"script-message-received" signal.
(webkit_user_content_manager_register_script_message_handler):
Added.
(webkit_user_content_manager_unregister_script_message_handler):
Added.
* UIProcess/API/gtk/WebKitUserContentManager.h: Added the new
public API methods.
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Ditto.
* UIProcess/API/gtk/docs/webkit2gtk.types: Add
webkit_user_content_manager_get_type() to the list in order to make
gtk-doc to generate documentation for signals.
2014-10-31 Martin Hock <mhock@apple.com>
Unreviewed, iOS build fix since 175406.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::performActionOnElement):
2014-10-30 Darin Adler <darin@apple.com>
Eliminate ResourceBuffer and use SharedBuffer directly instead
https://bugs.webkit.org/show_bug.cgi?id=138174
Reviewed by Antti Koivisto.
* CMakeLists.txt: Removed WebResourceBuffer.cpp.
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::sendBuffer): Use a reference instead of pointer.
* NetworkProcess/NetworkResourceLoader.h: Ditto.
* NetworkProcess/mac/NetworkDiskCacheMonitor.h: Ditto.
* NetworkProcess/mac/NetworkDiskCacheMonitor.mm:
(WebKit::NetworkDiskCacheMonitor::resourceBecameFileBacked): Ditto.
* NetworkProcess/mac/NetworkResourceLoaderMac.mm:
(WebKit::NetworkResourceLoader::tryGetShareableHandleFromSharedBuffer): Ditto.
* Shared/WebResourceBuffer.cpp: Removed.
* Shared/WebResourceBuffer.h: Removed.
* WebKit2.xcodeproj/project.pbxproj: Removed WebResourceBuffer.cpp/h.
* WebProcess/Network/NetworkProcessConnection.cpp: Removed unneeded includes.
(WebKit::NetworkProcessConnection::didCacheResource): Use a reference instead
of a pointer.
* WebProcess/Network/WebResourceLoadScheduler.cpp: Removed unneeded include.
* WebProcess/Network/WebResourceLoader.cpp: Ditto.
* WebProcess/Network/WebResourceLoader.h: Ditto.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: Ditto.
(WebKit::WebFrameLoaderClient::finishedLoading): Use SharedBuffer directly.
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::source): Ditto.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::runJavaScriptInMainFrame): Refactored to make the relationship
between the buffer and the DataReference clearer and to avoid having a long-lived
DataReference pointing to an underlying buffer with unclear lifetime.
(WebKit::WebPage::getContentsAsString): Ditto.
(WebKit::WebPage::getSelectionAsWebArchiveData): Ditto.
(WebKit::WebPage::getMainResourceDataOfFrame): Ditto. Also use SharedBuffer directly.
(WebKit::WebPage::getResourceDataFromFrame): Ditto.
(WebKit::WebPage::getWebArchiveOfFrame): Ditto.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::containingLinkElement): Use elementLineage.
(WebKit::WebPage::performActionOnElement): Use references and SharedBuffer.
ALso did a bit of other cleanup in here.
(WebKit::isAssistableElement): Take Element& instead of Node*, since that's what
the caller has.
(WebKit::nextAssistableElement): Changed name to match what the function does.
Added an obviously-missing check on the startNode argument. Updated for change
to isAssistableElement above. Take a Page& instead of a Page*.
(WebKit::hasAssistableElement): Changed name to match what the function does.
Updated for change to nextAssistableElement above. Took out incorrect comparison
of a C++ pointer to the Objective-C object pointer nil. Take a Page& instead of a Page*.
(WebKit::WebPage::focusNextAssistedNode): Updated for above changes.
(WebKit::WebPage::getAssistedNodeInformation): Updated for above changes.
2014-10-30 Jer Noble <jer.noble@apple.com>
[EME] Add Setting for accessing storage location for MediaKeys data
https://bugs.webkit.org/show_bug.cgi?id=138147
Reviewed by Brady Eidson.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage): Pass from WebMediaKeyStorageManager into Settings.
2014-10-30 Dana Burkart <dburkart@apple.com>
Workaround for <rdar://problem/18830639>
Unreviewed.
* Shared/API/Cocoa/WKFoundation.h:
2014-10-30 Dana Burkart <dburkart@apple.com>
<rdar://problem/18821260> Prepare for the mysterious future
Reviewed by Lucas Forschler.
* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:
* Configurations/FeatureDefines.xcconfig:
* Configurations/Version.xcconfig:
* Configurations/WebContentService.Development.xcconfig:
* Configurations/WebContentService.xcconfig:
* Configurations/WebKit.xcconfig:
2014-10-30 Anders Carlsson <andersca@apple.com>
Try to fix the iOS build.
* WebProcess/WebPage/WebPage.messages.in:
2014-10-30 Tim Horton <timothy_horton@apple.com>
Long spins under rangeExpandedAroundPosition on Yahoo Mail
https://bugs.webkit.org/show_bug.cgi?id=138223
<rdar://problem/18819547>
Reviewed by Enrica Casucci.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::rangeExpandedAroundPositionByCharacters):
Reimplement rangeExpandedAroundPosition to operate on characters instead of lines,
and to use Position. Moving VisiblePositions by line can be very expensive in some cases,
and for generating lookup/Data Detectors context, we don't care about that kind of precision.
This makes this function ~1000x faster when it hits on a row in the Yahoo Mail message list.
(WebKit::WebPage::performDictionaryLookupAtLocation):
(WebKit::scanForDataDetectedItems):
Adopt the new rangeExpandedAroundPositionByCharacters, expanding 250 characters
before and after, which roughly matches what we were usually getting going by line,
and is a reasonable amount of context for these operations.
2014-10-30 Brady Eidson <beidson@apple.com>
IndexedDB is deleting data when a PK is shared amongst two objectStores
rdar://problem/18479306 and https://bugs.webkit.org/show_bug.cgi?id=137154
Reviewed by Jer Noble.
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
(WebKit::v1RecordsTableSchema): Store away the v1 schema for introspection into the database.
(WebKit::v2RecordsTableSchema): Add utility methods to get the v2 schema with different Table names.
(WebKit::createOrMigrateRecordsTableIfNecessary): Check to see if the Records table exists with
the correct schema. If it is the v1 schema, then migrate the data to a new v2 table, drop the v1
table, then slide the new table into place.
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::ensureValidRecordsTable): Make sure the Records table
exists and is v2, and then make sure the uniqueness index exists.
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::createAndPopulateInitialMetadata): Dont bother creating
the Records table here as it will have already been established earlier.
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::getOrEstablishMetadata):
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:
2014-10-30 Beth Dakin <bdakin@apple.com>
Implement action menus for text
https://bugs.webkit.org/show_bug.cgi?id=138220
-and corresponding-
rdar://problem/18742297
Reviewed by Tim Horton.
Two new types of actions for the two text actions.
* Shared/API/c/WKActionMenuItemTypes.h:
One new type of menu.
* Shared/API/c/WKActionMenuTypes.h:
Pass willOpenMenu on to the WKActionMenuController.
* UIProcess/API/mac/WKView.mm:
(-[WKView willOpenMenu:withEvent:]):
Two new WebPageProxy functions that will pass messages along to the web process.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::selectLookupTextAtLocation):
* UIProcess/WebPageProxy.h:
At willOpenMenu time, text menus should select text so that it is clear what the
menu actions will apply to.
* UIProcess/mac/WKActionMenuController.h:
* UIProcess/mac/WKActionMenuController.mm:
Menu items for text menus.
(-[WKActionMenuController willOpenMenu:withEvent:]):
(-[WKActionMenuController _defaultMenuItemsForText]):
(-[WKActionMenuController _copyText:]):
(-[WKActionMenuController _lookupText:]):
(-[WKActionMenuController _createActionMenuItemForTag:]):
(imageForResource:name::if):
New messages to the web process.
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::performDictionaryLookupOfCurrentSelection):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
Re-factor performDictionaryLookupAtLocation() to re-use the code that finds the
Range for the dictionary lookup. That code now lives in
rangeForDictionaryLookupAtHitTestResult() and can be used by
performDictionaryLookupAtLocation() and our new function
selectLookupTextAtLocation().
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::rangeForDictionaryLookupAtHitTestResult):
(WebKit::WebPage::performDictionaryLookupAtLocation):
Since the action menu text is always selected, when the lookup action is chosen,
we can just lookup the current selection.
(WebKit::WebPage::performDictionaryLookupOfCurrentSelection):
Uses the new function rangeForDictionaryLookupAtHitTestResult() to get a lookup
range and then select it.
(WebKit::WebPage::selectLookupTextAtLocation):
2014-10-30 Dan Bernstein <mitz@apple.com>
When a client certificate is rejected, Safari says the website didnt accept the certificate “unknown” instead of naming the certificate
https://bugs.webkit.org/show_bug.cgi?id=138216
Reviewed by Alexey Proskuryakov.
* Shared/cf/ArgumentCodersCF.cpp:
(IPC::typeFromCFTypeRef): Remove no-longer-necessary platform guards around SecIdentityRef.
(IPC::encode): Ditto.
(IPC::decode): Ditto.
* Shared/mac/WebCoreArgumentCodersMac.mm:
(IPC::ArgumentCoder<ResourceError>::encodePlatformData): If NSErrorClientCertificateChainKey
is present in the errors userInfo dictionary, assert that its an array of identities and
certificates, and include it in the filtered dictionary.
2014-10-29 Hunseop Jeong <hs85.jeong@samsung.com>
[CoordinatedGraphics] Use modern for-loops
https://bugs.webkit.org/show_bug.cgi?id=138168
Reviewed by Andreas Kling.
No new tests as there is no change in functionality.
* UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp: Use a modern for loop.
(WebCore::CoordinatedBackingStore::texture):
(WebCore::CoordinatedBackingStore::paintTilesToTextureMapper):
* UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.cpp: Use a modern for loop.
(WebKit::CoordinatedDrawingAreaProxy::incorporateUpdate):
* UIProcess/CoordinatedGraphics/CoordinatedGraphicsScene.cpp: Use a modern for loop.
(WebCore::CoordinatedGraphicsScene::setLayerChildrenIfNeeded):
(WebCore::CoordinatedGraphicsScene::createLayers): changed the name of argument to be equal with deleteLayer().
(WebCore::CoordinatedGraphicsScene::deleteLayers):
(WebCore::CoordinatedGraphicsScene::createTilesIfNeeded):
(WebCore::CoordinatedGraphicsScene::removeTilesIfNeeded):
(WebCore::CoordinatedGraphicsScene::updateTilesIfNeeded):
(WebCore::CoordinatedGraphicsScene::syncUpdateAtlases):
(WebCore::CoordinatedGraphicsScene::syncImageBackings):
(WebCore::CoordinatedGraphicsScene::commitSceneState):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp: Use a modern for loop.
(WebKit::shouldPaintBoundsRect):
(WebKit::CoordinatedDrawingArea::display):
2014-10-29 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Unreviewed, EFL build fix since r175349.
* UIProcess/WebBackForwardList.cpp:
(WebKit::WebBackForwardList::didRemoveItem): Use PLATFORM(COCOA) for setSnapshot().
2014-10-29 Tim Horton <timothy_horton@apple.com>
Null deref under performActionMenuHitTestAtLocation
https://bugs.webkit.org/show_bug.cgi?id=138197
<rdar://problem/18817803>
Reviewed by Beth Dakin.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::scanForDataDetectedItems):
Null-check the expanded range.
2014-10-28 Ada Chan <adachan@apple.com>
Implement WKPageSetMuted(bool).
https://bugs.webkit.org/show_bug.cgi?id=138158
Reviewed by Anders Carlsson.
* UIProcess/API/C/WKPage.cpp:
(WKPageSetMuted):
* UIProcess/API/C/WKPagePrivate.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setMuted):
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setMuted):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
2014-10-29 Anders Carlsson <andersca@apple.com>
Clear ViewSnapshots when back/forward list items are removed from their list
https://bugs.webkit.org/show_bug.cgi?id=138188
<rdar://problem/18817001>
Reviewed by Tim Horton.
Ideally we should remove the WebBackForwardListItem objects as well, but this is a somewhat safer fix.
Change all the "remove item" codepaths to call WebBackForwardList::didRemoveItem and have it clear out the snapshot.
* UIProcess/WebBackForwardList.cpp:
(WebKit::WebBackForwardList::pageClosed):
(WebKit::WebBackForwardList::addItem):
(WebKit::WebBackForwardList::removeAllItems):
(WebKit::WebBackForwardList::clear):
(WebKit::WebBackForwardList::didRemoveItem):
* UIProcess/WebBackForwardList.h:
2014-10-29 Tim Horton <timothy_horton@apple.com>
Hide the 'Add to Photos' item if it isn't available
https://bugs.webkit.org/show_bug.cgi?id=138182
<rdar://problem/18814999>
Reviewed by Beth Dakin.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _defaultMenuItemsForImage]):
(-[WKActionMenuController _canAddImageToPhotos]):
(-[WKActionMenuController _addImageToPhotos:]):
Factor _canAddImageToPhotos out of _addImageToPhotos:, and use it in
_defaultMenuItemsForImage to avoid including the menu item in the first place.
2014-10-29 Tim Horton <timothy_horton@apple.com>
Rename WebPageProxy::activeActionMenuHitTestResult to lastMouseMoveHitTestResult
https://bugs.webkit.org/show_bug.cgi?id=138137
<rdar://problem/18798257>
Reviewed by Anders Carlsson.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::mouseDidMoveOverElement):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::lastMouseMoveHitTestResult):
(WebKit::WebPageProxy::activeActionMenuHitTestResult): Deleted.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _defaultMenuItemsForLink]):
(-[WKActionMenuController _openURLFromActionMenu:]):
(-[WKActionMenuController _addToReadingListFromActionMenu:]):
(-[WKActionMenuController _quickLookURLFromActionMenu:]):
(-[WKActionMenuController _saveImageToDownloads:]):
(imageForResource:name::if):
(-[WKActionMenuController _updateActionMenuItems]):
Rename to the more accurate and general name.
2014-10-29 Tim Horton <timothy_horton@apple.com>
Implement action menus for data detected items
https://bugs.webkit.org/show_bug.cgi?id=138178
<rdar://problem/18709436>
Reviewed by Anders Carlsson.
* Shared/API/c/WKActionMenuTypes.h:
Add a new type.
* Shared/WebHitTestResult.cpp:
(WebKit::WebHitTestResult::Data::Data):
(WebKit::WebHitTestResult::Data::encode):
(WebKit::WebHitTestResult::Data::decode):
* Shared/WebHitTestResult.h:
(WebKit::WebHitTestResult::isTextNode):
Determine, store, encode, and decode whether or not the hit node is a text node.
* Shared/mac/ActionMenuHitTestResult.h:
* Shared/mac/ActionMenuHitTestResult.mm: Renamed from Source/WebKit2/Shared/mac/ActionMenuHitTestResult.cpp.
(WebKit::ActionMenuHitTestResult::encode):
(WebKit::ActionMenuHitTestResult::decode):
Make ActionMenuHitTestResult an Obj-C++ file.
Store, encode, and decode (securely!) a DDActionContext and FloatRect
representing the bounding box of the data detected item, if any.
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:context:configuration:webView:]):
(-[WKView willOpenMenu:withEvent:]): Deleted.
Stop using willOpenMenu; we'll use NSMenuDelegate's menuNeedsUpdate: instead.
Hook up WKActionMenuController as our action menu's delegate.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController prepareForMenu:withEvent:]):
Call _updateActionMenuItems *after* we've adjusted _state, so that it
can depend on the value being correct.
(-[WKActionMenuController willOpenMenu:withEvent:]):
(-[WKActionMenuController didPerformActionMenuHitTest:]):
Move menu updating to menuNeedsUpdate for more accurate timing.
(_updateActionMenuItems):
When building the menu, if we have a text node that is not a link,
and hit a data detected item, retrieve the menu from the DDActionContext.
If we have nothing, make sure to reset _type, and if the final hit-test
is still pending, build a menu with a dummy item.
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::performActionMenuHitTestAtLocation): Moved to WebPageMac.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::rangeExpandedAroundPosition):
Factor this out of performDictionaryLookupAtLocation.
(WebKit::WebPage::performDictionaryLookupAtLocation):
Make use of rangeExpandedAroundPosition.
(WebKit::scanForDataDetectedItems):
Expand to four lines of context around the hit point.
Convert that range to plain text, and feed it to DataDetectors.
Find the result that intersects the hit point, and make a DDActionContext
for it. Also, store the bounding box of the first quad of the detected
text, to provide to Data Detectors as a hint for UI placement.
(WebKit::WebPage::performActionMenuHitTestAtLocation):
If the hit node is a text node, call scanForDataDetectedItems and
store the resultant DDActionContext and bounding rect on our
ActionMenuHitTestResult for transfer to the UI process.
2014-10-29 Joseph Pecoraro <pecoraro@apple.com>
[iOS] iPad: Occasional <select> crashes attempting to scroll to non-existing row 0 in viewWillAppear
https://bugs.webkit.org/show_bug.cgi?id=138165
Reviewed by David Kilzer.
This is a speculative fix for a crash attempting to scroll to a row in a
select picker on iPad. In these cases we are trying to scroll to the first
row of the first section, but no such row appears to exist. I was unable
to reproduce the issue, but if it is happening we should be able to protect
safely protect against crashing.
* UIProcess/ios/forms/WKFormSelectPopover.mm:
(-[WKSelectTableViewController viewWillAppear:]):
Protect against trying to scroll to a section/row that does not exist
by pre-checking that the section/row is valid.
2014-10-28 Ting-Wei Lan <lantw44@gmail.com>
Cast std::chrono::duration.count() to int64_t in ArgumentCoder
https://bugs.webkit.org/show_bug.cgi?id=136981
Reviewed by Alexey Proskuryakov.
Explicitly cast the return value of std::chrono::duration.count() to
a fixed-size interger type, which prevents compilation error when
the return value type matches neither int32_t nor int64_t.
* Platform/IPC/ArgumentCoders.h:
2014-10-28 Jer Noble <jer.noble@apple.com>
[EME] Pass location for media key storage through from WebKit/WebKit2.
https://bugs.webkit.org/show_bug.cgi?id=137120
Reviewed by Anders Carlsson.
Allow the location for media key storage to be passed into the WebProcess from the UIProcess
through the WebContextConfiguraiton struct.
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode): Add mediaKeysStorageDirectory.
(WebKit::WebProcessCreationParameters::decode): Ditto.
* Shared/WebProcessCreationParameters.h:
* UIProcess/API/C/WKContextConfigurationRef.cpp:
(WKContextConfigurationCopyMediaKeysStorageDirectory): Added getter.
(WKContextConfigurationSetMediaKeysStorageDirectory): Added setter.
* UIProcess/API/C/WKContextConfigurationRef.h:
* UIProcess/API/C/WKOriginDataManager.h:
* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _initWithConfiguration:]): Provide a default location.
* UIProcess/APIContextConfiguration.cpp:
(API::ContextConfiguration::webContextConfiguration): Set mediaKeysStorageDirectory.
* UIProcess/APIContextConfiguration.h:
(API::ContextConfiguration::mediaKeysStorageDirectory): Added getter.
(API::ContextConfiguration::setMediaKeysStorageDirectory): Added setter.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::applyPlatformSpecificConfigurationDefaults): Apply mediaKeysStorageDirectory.
(WebKit::WebContext::WebContext): Initialize m_mediaKeysStorageDirectory.
(WebKit::WebContext::createNewWebProcess): Create a sandbox extension handle for mediaKeysStorageDirectory.
* UIProcess/WebContext.h:
* UIProcess/efl/WebContextEfl.cpp:
(WebKit::WebContext::platformDefaultMediaKeysStorageDirectory): Return a default location.
* UIProcess/gtk/WebContextGtk.cpp:
(WebKit::WebContext::platformDefaultMediaKeysStorageDirectory): Ditto.
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::platformDefaultMediaKeysStorageDirectory): Return an overridable default location.
* WebProcess/MediaCache/WebMediaKeyStorageManager.cpp: Added.
(WebKit::WebMediaKeyStorageManager::initialize): Pull the mediaKeysStorageDirectory out of configuration.
(WebKit::WebMediaKeyStorageManager::supplementName): Return a configuration name.
(WebKit::WebMediaKeyStorageManager::mediaKeyStorageDirectoryForOrigin): Return the
correct storage directory based on the SecureOrigin.
(WebKit::WebMediaKeyStorageManager::getMediaKeyOrigins): Return the origins within the
storage directory.
(WebKit::removeAllMediaKeyStorageForOriginPath): Static, remove contents and directory at path.
(WebKit::WebMediaKeyStorageManager::deleteMediaKeyEntriesForOrigin): Use
removeAllMediaKeyStorageForOriginPath to remove origin data.
(WebKit::WebMediaKeyStorageManager::deleteMediaKeyEntriesModifiedBetweenDates): Ditto.
(WebKit::WebMediaKeyStorageManager::deleteAllMediaKeyEntries): Ditto.
* WebProcess/MediaCache/WebMediaKeyStorageManager.h: Added.
(WebKit::WebMediaKeyStorageManager::WebMediaKeyStorageManager): Default constructor.
(WebKit::WebMediaKeyStorageManager::~WebMediaKeyStorageManager): Default virtual destructor.
(WebKit::WebMediaKeyStorageManager::mediaKeyStorageDirectory): Simple accessor.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess): Add WebMediaKeyStorageManager as a supplement.
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess): Create a sandbox extension from the sandbox extension handle.
Add new source files to project(s).
* PlatformEfl.cmake:
* PlatformGTK.cmake:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/MediaCache/WebMediaKeyStorageManager.cpp:
(WebKit::WebMediaKeyStorageManager::getMediaKeyOrigins):
(WebKit::removeAllMediaKeyStorageForOriginPath):
Drive-by fix: references to VoidCallback are ambiguous, since the same name is re-used in multiple namespaces.
Make references to WebCore::VoidCallback explicit where the entire WebCore (and other) namespaces are pulled in.
* WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
(WebKit::NotificationPermissionRequestManager::startRequest):
(WebKit::NotificationPermissionRequestManager::didReceiveNotificationPermissionDecision):
* WebProcess/WebCoreSupport/WebNotificationClient.cpp:
(WebKit::WebNotificationClient::requestPermission):
2014-10-28 Jeremy Jones <jeremyj@apple.com>
Add optimized fullscreen mode.
https://bugs.webkit.org/show_bug.cgi?id=138044
Reviewed by Anders Carlsson.
Enable different types of fullscreen video behavior.
Add an enum parameter to enterVideoFullscreenForVideoElement for alternate types of fullscreen.
* UIProcess/ios/WebVideoFullscreenManagerProxy.h: Add fullscreenType parameter
* UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in: ditto
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID): ditto
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::enterVideoFullscreenForVideoElement): ditto
* WebProcess/WebCoreSupport/WebChromeClient.h: ditto
* WebProcess/ios/WebVideoFullscreenManager.h: ditto
* WebProcess/ios/WebVideoFullscreenManager.mm:
(WebKit::WebVideoFullscreenManager::enterVideoFullscreenForVideoElement): ditto
(WebKit::WebVideoFullscreenManager::didCleanupFullscreen): ditto
2014-10-28 Dan Bernstein <mitz@apple.com>
Added a Radar reference to a comment.
* Shared/mac/WebCoreArgumentCodersMac.mm:
(IPC::ArgumentCoder<Credential>::encodePlatformData):
2014-10-28 Dan Bernstein <mitz@apple.com>
[Cocoa] REGERESSION (r171801): Client certificate authentication is failing
https://bugs.webkit.org/show_bug.cgi?id=138144
Reviewed by Alexey Proskuryakov.
NSURLCredentials implementation of NSSecureCoding fails to encode identity-based
credentials properly. Work around that by encoding the identity, certificate, and
persistence individually.
* Shared/mac/WebCoreArgumentCodersMac.mm:
(IPC::ArgumentCoder<Credential>::encodePlatformData):
(IPC::ArgumentCoder<Credential>::decodePlatformData):
2014-10-28 Joseph Pecoraro <pecoraro@apple.com>
[iOS] iPhone should not allow selecting <optgroup> in <select multiple>
https://bugs.webkit.org/show_bug.cgi?id=137991
Reviewed by Darin Adler.
We seem to be getting the delegate when we are not supposed to.
Workaround the issue as best we can by reseting the styles
for the group's content view and not changing selections.
* UIProcess/ios/forms/WKFormSelectPicker.mm:
(-[WKMultipleSelectPicker pickerView:row:column:checked:]):
2014-10-28 Tim Horton <timothy_horton@apple.com>
Remove an inaccurate comment in WKActionMenuController
https://bugs.webkit.org/show_bug.cgi?id=138135
Reviewed by Anders Carlsson.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _defaultMenuItemsForLink]):
The comment is wrong; the separator is there for spacing, not just as a workaround.
2014-10-28 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Update OptionsGTK.cmake and NEWS for 2.7.1 release.
* gtk/NEWS: Add release notes for 2.7.1.
2014-10-28 Dan Bernstein <mitz@apple.com>
[Mac] OS X Mavericks build broken with public SDK
https://bugs.webkit.org/show_bug.cgi?id=138108
Reviewed by Mark Rowe.
* Shared/API/Cocoa/WKFoundation.h: Only define the NSEventModifierFlags type when using a
version of the OS X SDK that doesnt define it.
2014-10-27 Conrad Shultz <conrad_shultz@apple.com>
NSSharingService protocol conformance should be internal to WKActionMenuController
https://bugs.webkit.org/show_bug.cgi?id=138112
Reviewed by Tim Horton.
* UIProcess/mac/WKActionMenuController.h:
* UIProcess/mac/WKActionMenuController.mm:
Move protocol conformance from the interface to a class extension.
2014-10-27 Enrica Casucci <enrica@apple.com>
WebContent crash in WebKit::WebPage::expandedRangeFromHandle.
https://bugs.webkit.org/show_bug.cgi?id=138023
rdar://problem/18787412
Reviewed by Ryosuke Niwa.
We must change that we have a valid currentRange before trying
to expand or contract.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::changeBlockSelection):
2014-10-27 Alexey Proskuryakov <ap@apple.com>
http/tests/cookies/third-party-cookie-relaxing.html is flaky on bots
https://bugs.webkit.org/show_bug.cgi?id=138098
Reviewed by Anders Carlsson.
* NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
* WebProcess/com.apple.WebProcess.sb.in:
Update for the new name of testing session. Memory regions are now of the form
"WebKit Test-<pid>-0".
2014-10-27 Chris Dumez <cdumez@apple.com>
Use separate HashMaps for common and uncommon headers in HTTPHeaderMap
https://bugs.webkit.org/show_bug.cgi?id=138079
Reviewed by Anders Carlsson.
Update the WK2 IPC HTTPHeaderMap serialization / deserialization code
to leverage the fact that HTTPHeaderMap now stores common HTTP headers
and uncommon one in separate HashMaps. This speeds up deserialization
as we no longer need to call findHTTPHeaderName() for every decoded
header. We already know if the header is a common one or not, and if
it is then we already have a HTTPHeaderName type instead of a String.
I see that we spend ~40% less time in HTTPHeaderMap decoding when
loading http://flickr.com/explore, while the encoding takes about
the same amount of time as before.
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<HTTPHeaderMap>::encode):
(IPC::ArgumentCoder<HTTPHeaderMap>::decode):
2014-10-24 Benjamin Poulain <bpoulain@apple.com>
Fix the iOS build
* Configurations/WebKit.xcconfig:
2014-10-24 Beth Dakin <bdakin@apple.com>
_actionMenuItemsForHitTestResult should also take a type indicating what the menu
was built for
https://bugs.webkit.org/show_bug.cgi?id=138063
Reviewed by Dan Bernstein.
New type enum that can be used by clients.
* Shared/API/c/WKActionMenuTypes.h: Added.
Remove the old SPI and add the new.
* UIProcess/API/Cocoa/WKViewPrivate.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView _actionMenuItemsForHitTestResult:withType:defaultActionMenuItems:]):
(-[WKView _actionMenuItemsForHitTestResult:defaultActionMenuItems:]): Deleted.
Now keep an ivar for the type.
* UIProcess/mac/WKActionMenuController.h:
Create a category for the old SPI so that we can still call it if clients have
implemented it.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController initWithPage:view:]):
(-[WKActionMenuController didCloseMenu:withEvent:]):
(imageForResource:name::if):
(-[WKActionMenuController _updateActionMenuItems]):
* WebKit2.xcodeproj/project.pbxproj:
2014-10-24 Tim Horton <timothy_horton@apple.com>
Share sheet doesn't attach to the window
https://bugs.webkit.org/show_bug.cgi?id=138062
<rdar://problem/18767397>
Reviewed by Beth Dakin.
* UIProcess/mac/WKActionMenuController.h:
WKActionMenuController is now a NSSharingService{Picker}Delegate.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _defaultMenuItemsForImage]):
Set us up as the NSSharingServicePicker delegate.
(-[WKActionMenuController sharingServicePicker:delegateForSharingService:]):
Set us up as the NSSharingService delegate.
(-[WKActionMenuController sharingService:sourceWindowForShareItems:sharingContentScope:]):
Return the appropriate window to attach to.
2014-10-24 Jer Noble <jer.noble@apple.com>
Abstractify WebOriginDataManager to support arbitrary ChildProcess supplements.
https://bugs.webkit.org/show_bug.cgi?id=137993
Reviewed by Brady Eidson.
To allow different ChildProcess subclasses to handle listing and deletion of origin
data, make WebOriginDataManager more generic by having a supplement implement the
details, leaving WebOriginDataManager to deal with cross-process messaging.
De-virtualize AsyncTask, allowing a task to be created by passing in a
function<void()>, rather than an object, method, and arguments.
* Shared/AsyncTask.h:
(WebKit::AsyncTask::AsyncTask):
(WebKit::AsyncTask::performTask):
(WebKit::AsyncTask::~AsyncTask): Deleted.
Add a new virtual base class, to be implemented by various ChildProcesses, which
WebOriginDataManager will use to implement listing and deletion requests.
* WebProcess/OriginData/WebOriginDataManager.h:
* WebProcess/OriginData/WebOriginDataManagerSupplement.h: Added.
(WebKit::WebOriginDataManagerSupplement::WebOriginDataManagerSupplement):
(WebKit::WebOriginDataManagerSupplement::~WebOriginDataManagerSupplement):
(WebKit::WebOriginDataManagerSupplement::getOrigins):
(WebKit::WebOriginDataManagerSupplement::deleteEntriesForOrigin):
(WebKit::WebOriginDataManagerSupplement::deleteEntriesModifiedBetweenDates):
(WebKit::WebOriginDataManagerSupplement::deleteAllEntries):
* WebKit2.xcodeproj/project.pbxproj:
WebOriginDataManager doesn't need to be a ChildSupplement. Remove the DatabaseProcess-
specific implementations for its message handlers and replace with clean, generic calls
to its supplement. Because these supplements may want to respond to the request
asynchronously, pass a completion function in to be called by the supplement once its
work is complete.
* WebProcess/OriginData/WebOriginDataManager.cpp:
(WebKit::WebOriginDataManager::WebOriginDataManager):
(WebKit::WebOriginDataManager::getOrigins):
(WebKit::WebOriginDataManager::deleteEntriesForOrigin):
(WebKit::WebOriginDataManager::deleteEntriesModifiedBetweenDates):
(WebKit::WebOriginDataManager::deleteAllEntries):
(WebKit::WebOriginDataManager::supplementName): Deleted.
DatabaseProcess already uses WebOriginDataManager, so it will be the first process
to fall under the heel of the new regime. DatabaseProcess will subclass
WebOriginDataManagerSupplement, and pass itself in twice to the WebOriginDataManager
constructor. Create a lambda-based AsyncTask for each request, and call the completion
function when each request is complete.
* DatabaseProcess/DatabaseProcess.cpp:
(WebKit::DatabaseProcess::DatabaseProcess):
(WebKit::DatabaseProcess::getIndexedDatabaseOrigins):
(WebKit::DatabaseProcess::deleteIndexedDatabaseEntriesForOrigin):
(WebKit::DatabaseProcess::deleteIndexedDatabaseEntriesModifiedBetweenDates):
(WebKit::DatabaseProcess::deleteAllIndexedDatabaseEntries):
(WebKit::DatabaseProcess::getOrigins):
(WebKit::DatabaseProcess::deleteEntriesForOrigin):
(WebKit::DatabaseProcess::deleteEntriesModifiedBetweenDates):
(WebKit::DatabaseProcess::deleteAllEntries):
(WebKit::DatabaseProcess::doGetIndexedDatabaseOrigins): Deleted.
(WebKit::DatabaseProcess::doDeleteIndexedDatabaseEntriesForOrigin): Deleted.
(WebKit::DatabaseProcess::doDeleteIndexedDatabaseEntriesModifiedBetweenDates): Deleted.
(WebKit::DatabaseProcess::doDeleteAllIndexedDatabaseEntries): Deleted.
* DatabaseProcess/DatabaseProcess.h:
2014-10-24 Beth Dakin <bdakin@apple.com>
Very large images crash in action menu code
https://bugs.webkit.org/show_bug.cgi?id=138059
-and corresponding-
rdar://problem/18767859
Reviewed by Tim Horton.
If the HitTestResult failed to create and image, then dont go for the image
action menu.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _defaultMenuItems]):
ShareableBitmap::createShareable() can fail. The result needs to be null-checked.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::performActionMenuHitTestAtLocation):
2014-10-24 Beth Dakin <bdakin@apple.com>
Build fix.
* UIProcess/mac/WKActionMenuController.h:
* UIProcess/mac/WKActionMenuController.mm:
2014-10-24 Tim Horton <timothy_horton@apple.com>
Blindly try to fix all the builds.
* UIProcess/mac/WKActionMenuController.h:
* UIProcess/mac/WKActionMenuController.mm:
2014-10-24 Timothy Horton <timothy_horton@apple.com>
Blindly try to fix all the builds.
* UIProcess/mac/WKActionMenuController.h:
2014-10-24 Timothy Horton <timothy_horton@apple.com>
Blindly try to fix the 32-bit build.
* UIProcess/mac/WKActionMenuController.h:
* UIProcess/mac/WKActionMenuController.mm:
2014-10-24 Tim Horton <timothy_horton@apple.com>
[Mac][WebKit2] Move action menu code into its own file
https://bugs.webkit.org/show_bug.cgi?id=138034
<rdar://problem/18758758>
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController prepareForMenu:withEvent:]):
(-[WKActionMenuController _addImageToPhotos:]):
Review comments that were not previously addressed.
2014-10-24 Tim Horton <timothy_horton@apple.com>
[Mac][WebKit2] Move action menu code into its own file
https://bugs.webkit.org/show_bug.cgi?id=138034
<rdar://problem/18758758>
Reviewed by Dan Bernstein.
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:context:configuration:webView:]):
Make a WKActionMenuController if needed.
(-[WKView prepareForMenu:withEvent:]):
(-[WKView willOpenMenu:withEvent:]):
(-[WKView didCloseMenu:withEvent:]):
(-[WKView _didPerformActionMenuHitTest:]):
Forward these to WKActionMenuController.
(-[WKView _openURLFromActionMenu:]): Deleted.
(-[WKView _addToReadingListFromActionMenu:]): Deleted.
(-[WKView _quickLookURLFromActionMenu:]): Deleted.
(-[WKView _createActionMenuItemForTag:]): Deleted.
(webKitBundleImageNamed): Deleted.
(-[WKView _copyImage:]): Deleted.
(-[WKView _saveImageToDownloads:]): Deleted.
(temporaryPhotosDirectoryPath): Deleted.
(pathToPhotoOnDisk): Deleted.
(-[WKView _addImageToPhotos:]): Deleted.
(-[WKView _defaultMenuItemsForImage]): Deleted.
(-[WKView _defaultMenuItems]): Deleted.
(-[WKView _updateActionMenu]): Deleted.
Moved to WKActionMenuController.
* UIProcess/mac/WKActionMenuController.h: Added.
* UIProcess/mac/WKActionMenuController.mm: Added.
(-[WKActionMenuController initWithPage:view:]):
(-[WKActionMenuController prepareForMenu:withEvent:]):
(-[WKActionMenuController willOpenMenu:withEvent:]):
(-[WKActionMenuController didCloseMenu:withEvent:]):
(-[WKActionMenuController didPerformActionMenuHitTest:]):
(-[WKActionMenuController _defaultMenuItemsForLink]):
(-[WKActionMenuController _openURLFromActionMenu:]):
(-[WKActionMenuController _addToReadingListFromActionMenu:]):
(-[WKActionMenuController _quickLookURLFromActionMenu:]):
(-[WKActionMenuController _defaultMenuItemsForImage]):
(-[WKActionMenuController _copyImage:]):
(-[WKActionMenuController _saveImageToDownloads:]):
(temporaryPhotosDirectoryPath):
(pathToPhotoOnDisk):
(-[WKActionMenuController _addImageToPhotos:]):
(-[WKActionMenuController _createActionMenuItemForTag:]):
(webKitBundleImageNamed):
(imageForResource:name::if):
(-[WKActionMenuController _updateActionMenuItems]):
Moved from WKView.
* WebKit2.xcodeproj/project.pbxproj:
2014-10-24 Marcos Chavarría Teijeiro <chavarria1991@gmail.com>
[GTK] Implement is_selected method on WebKitHitTestResult
https://bugs.webkit.org/show_bug.cgi?id=137110
Reviewed by Tim Horton.
Expose CONTEXT_SELECTION for WebKitHitTestResult.
* Shared/WebHitTestResult.cpp: Add is_selected field and getter for this field.
(WebKit::WebHitTestResult::Data::Data):
(WebKit::WebHitTestResult::Data::encode):
(WebKit::WebHitTestResult::Data::decode):
* Shared/WebHitTestResult.h:
(WebKit::WebHitTestResult::isSelected):
* UIProcess/API/gtk/WebKitHitTestResult.cpp: Add WEBKIT_HIT_TEST_RESULT_CONTEXT_SELECTION context and method to check it.
(webkitHitTestResultCreate):
(webkitHitTestResultCompare):
(webkit_hit_test_result_context_is_selection):
* UIProcess/API/gtk/WebKitHitTestResult.h:
* UIProcess/API/gtk/WebKitWebView.cpp: Modify context-menu callback to set the new context option.
(webkitWebViewPopulateContextMenu):
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add documentation about new function.
2014-10-23 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK][Cairo] Remove GTK dependency of WidgetBackingStoreGtkX11
https://bugs.webkit.org/show_bug.cgi?id=138004
Reviewed by Gustavo Noronha Silva.
* UIProcess/BackingStore.h: Rename m_backingStore as m_backend,
since it's a bit confusing that a BackingStore class has a
m_backingStore member and WidgetBackingStore has been renamed as
BackingStoreBackendCairo.
* UIProcess/cairo/BackingStoreCairo.cpp:
(WebKit::BackingStore::createBackend): Helper function to create
the BackingStore backend depending on the platform.
(WebKit::BackingStore::paint): Use m_backend instead of m_backingStore.
(WebKit::BackingStore::incorporateUpdate): Ditto.
(WebKit::BackingStore::scroll): Ditto.
(WebKit::createBackingStoreForGTK): Deleted.
2014-10-23 Benjamin Poulain <bpoulain@apple.com>
Fix a bad find-and-replace in r175153
Looks like I messed up the commit on landing.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::didCommitLoadForFrame):
2014-10-23 Benjamin Poulain <bpoulain@apple.com>
[iOS WK2] If a page has the exact same VisibleContentRect as the page before, its VisibleContentRectUpdate can be ignored
https://bugs.webkit.org/show_bug.cgi?id=138031
rdar://problem/18739335
Reviewed by Simon Fraser.
Since any VisibleContentRectUpdate is costly for the WebProcess, we avoid sending updates
if none of the important parameters have changed (scale and geometry).
One unintended side effect is that the update of a page can be blocked if the parameters
of the previous page were identical.
What happen is this:
1) Page [A] sends its content rect update as needed. WebPageProxy saves the last update
in m_lastVisibleContentRectUpdate and use that value to avoid useless updates.
2) Page [B] load after page [A] and have the exact VisibleContentRect. When receiving the first
layer tree commit after didCommitLoadForFrame, WKWebView sends its VisibleContentRect
to WebPageProxy to synchronize the state of the WebProcess with what is on screen.
3) Since the two VisibleContentRect update has the same value as the ones of page [A], WebPageProxy
discards the update. The WebProcess has its initialization viewport and is not udpated until
a major parameter changes (scale or position).
In rdar://problem/18739335, the problem is the similar but with a different failure point:
1) Everything above happened already.
2) The layer tree transaction has a scrolling request. This is processed by WKWebView.
3) Since the scrolling position is invalid, the request is ignored and we send the last
VisibleContentRect to the WebProcess with WebPageProxy::resendLastVisibleContentRects().
4) Since the VisibleContentRect was never updated after didCommitLoadForFrame, the one we send
is for the previous page, which the web process correctly ignores.
This patch solves the problem by nuking the cached m_lastVisibleContentRectUpdate before
any valid VisibleContentRectUpdate for a new page.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::didCommitLoadForFrame):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::didCommitLayerTree):
2014-10-23 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Provide a way to have alternate inspector agents
https://bugs.webkit.org/show_bug.cgi?id=137901
Reviewed by Brian Burg.
* Configurations/FeatureDefines.xcconfig:
2014-10-23 Tim Horton <timothy_horton@apple.com>
Add some SPI headers for NSExtension and NSSharingService{Picker}
https://bugs.webkit.org/show_bug.cgi?id=138027
Reviewed by Anders Carlsson.
* UIProcess/API/mac/WKView.mm:
* UIProcess/mac/ServicesController.mm:
* UIProcess/mac/WebContextMenuProxyMac.mm:
Replace redefinitions with SPI header #imports.
2014-10-23 Benjamin Poulain <bpoulain@apple.com>
[iOS WK2] Make sure any dynamic viewport update schedules a layer tree commit
https://bugs.webkit.org/show_bug.cgi?id=138021
Reviewed by Simon Fraser.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::dynamicViewportSizeUpdate):
Sometimes, the clients can do a dynamic viewport update but only change the minimum
layout size (see rdar://problem/18755250).
When that happens, it is possible to do the full state update without ever scheduling
a layer tree commit. For example, if the new minimum layout height is only a few pixels
smaller than the old value and the layout of the page is equal or larger than the old value,
the layout is done without any side effect to the content (assuming a viewport configuration
based on width).
The contract with the client is that the next layer tree commit after a dynamic viewport update
carries all the valid parameters for the new viewport size. Since the new layout never scheduled
a layer tree commit, the UIProcess is just waiting for one, discarding all input.
This patch solves the issue by explicitely scheduling a layer flush after updating all the layout
and view parameters to their final values. In most cases, this makes no difference since a layer
tree commit was already scheduled. In the rare cases where nothing was scheduled, scheduling
the layer tree commit ensure we unlock the UIProcess.
2014-10-23 Ryosuke Niwa <rniwa@webkit.org>
WebContent crash in WebKit::WebPage::expandedRangeFromHandle
https://bugs.webkit.org/show_bug.cgi?id=138023
Reviewed by Enrica Casucci.
The crashes are caused by rangeForBlockAtPoint returning a null Range.
Exit early or continue if a range is null in various places.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::expandedRangeFromHandle): Continue looking for another point if the range returned by
rangeForBlockAtPoint is null.
(WebKit::WebPage::contractedRangeFromHandle): Ditto.
(WebKit::WebPage::computeExpandAndShrinkThresholdsForHandle): Removed the FIXME now that Enrica has
verified that this early exit added in r173788 is correct.
2014-10-23 Joseph Pecoraro <pecoraro@apple.com>
[iOS] iPhone unselecting items in <select multiple> shows incorrect values selected
https://bugs.webkit.org/show_bug.cgi?id=137989
Reviewed by Alexey Proskuryakov.
* UIProcess/ios/forms/WKFormSelectPicker.mm:
(-[WKMultipleSelectPicker pickerView:row:column:checked:]):
The second argument is "allowsMultipleSelection" and should only be set
when we are making a selection in a <select multiple>.
2014-10-23 Tim Horton <timothy_horton@apple.com>
Assertion failures in ImageKit soft linking
https://bugs.webkit.org/show_bug.cgi?id=138009
Reviewed by Anders Carlsson.
* UIProcess/API/mac/WKView.mm:
Soft-link ImageKit correctly.
ImageKit is inside the Quartz umbrella framework.
2014-10-23 Daniel Bates <dabates@apple.com>
[iOS] Fix the build after <http://trac.webkit.org/changeset/175079>
(https://bugs.webkit.org/show_bug.cgi?id=137995)
Rubber-stamped by Anders Carlsson.
Remove PageClientImpl::didPerformActionMenuHitTest() for iOS.
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::didPerformActionMenuHitTest): Deleted.
2014-10-23 Krzysztof Czech <k.czech@samsung.com>
[EFL] Fix build problem after r175098
https://bugs.webkit.org/show_bug.cgi?id=138002
Reviewed by Gyuyoung Kim.
Add ECORE_X dependency to avoid linking problems while building unit tests.
* PlatformEfl.cmake:
2014-10-23 Krzysztof Czech <k.czech@samsung.com>
[EFL] Set proper default value for WebPageAccessibilityObject
https://bugs.webkit.org/show_bug.cgi?id=137951
Reviewed by Csaba Osztrogonác.
Initial value for WebPageAccessibilityObject should be nullptr.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
2014-10-23 Krzysztof Czech <k.czech@samsung.com>
[EFL] Introduce EFL Accessibility in WebKit
https://bugs.webkit.org/show_bug.cgi?id=137819
Reviewed by Gyuyoung Kim.
EFL Accessibility provides an API that is used to notify clients that certain
Accessibility events occur. Utilizing it makes WebKit-EFL coherent with EFL native
accessibility approach.
* PlatformEfl.cmake:
* UIProcess/API/efl/EwkView.cpp:
(EwkView::EwkView):
* UIProcess/API/efl/EwkView.h:
(EwkView::webAccessibility):
* UIProcess/API/efl/WebAccessibility.cpp: Added.
(WebKit::WebAccessibility::WebAccessibility):
(WebKit::WebAccessibility::~WebAccessibility):
(WebKit::WebAccessibility::eventHandler):
(WebKit::WebAccessibility::executeGestureAction):
(WebKit::WebAccessibility::activate):
(WebKit::WebAccessibility::read):
(WebKit::WebAccessibility::readNext):
(WebKit::WebAccessibility::readPrev):
(WebKit::WebAccessibility::up):
(WebKit::WebAccessibility::down):
(WebKit::WebAccessibility::scroll):
(WebKit::WebAccessibility::mouse):
(WebKit::WebAccessibility::enable):
(WebKit::WebAccessibility::disable):
* UIProcess/API/efl/WebAccessibility.h: Added.
(WebKit::WebAccessibility::activateAction):
(WebKit::WebAccessibility::nextAction):
(WebKit::WebAccessibility::prevAction):
(WebKit::WebAccessibility::readAction):
* UIProcess/API/efl/ewk_view.cpp:
(ewk_view_accessibility_action_activate_get):
(ewk_view_accessibility_action_next_get):
(ewk_view_accessibility_action_prev_get):
(ewk_view_accessibility_action_read_by_point_get):
* UIProcess/API/efl/ewk_view.h:
* UIProcess/API/efl/tests/test_ewk2_accessibility.cpp: Added.
(EWK2Accessibility::xwindow):
(TEST_F):
* UIProcess/WebPageProxy.h:
* UIProcess/efl/WebPageProxyEfl.cpp:
(WebKit::WebPageProxy::accessibilityObjectReadByPoint):
(WebKit::WebPageProxy::accessibilityObjectReadPrevious):
(WebKit::WebPageProxy::accessibilityObjectReadNext):
2014-10-22 Benjamin Poulain <bpoulain@apple.com>
[iOS WK2] Protect WKWebView dynamic viewport change against empty sizes
https://bugs.webkit.org/show_bug.cgi?id=137988
rdar://problem/17785162
Reviewed by Simon Fraser.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _beginAnimatedResizeWithUpdates:]):
The algorithm behind dynamic size update finds the best content area to put in the viewport
after a viewport change. If an initial size or a target size is empty, it is impossible to
compute a reasonable area to keep in the view. We end up handling NaN scales
and/or sizes and CoreAnimation raises an exception when applying that value.
This patch add early exits when that occurs and fallback to the common code.
On Input, things are easy. If any of the initial values is empty, we just execute the updateBlock
without attempting any of the dynamic behaviors.
For the target values, things are trickier. We do not know what the values are going to be before we execute
the block. But once we executed the block, we have already skipped all the setters that call the web process.
To handle that, every value is set manually on WebPageProxy. This is a bit unfortunate because the setters
get yet another entry point.
2014-10-22 Gyuyoung Kim <gyuyoung.kim@samsung.com>
EFL and GTK ports have broken since r175075
https://bugs.webkit.org/show_bug.cgi?id=137995
Unreviewed, EFL and GTK ports build fix.
Need to use PLATFORM(MAC) guard for ActionMenuHitTest functions.
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::removeNavigationGestureSnapshot):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebPage/WebPage.cpp:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
2014-10-22 Tim Horton <timothy_horton@apple.com>
Add action menu support for images
https://bugs.webkit.org/show_bug.cgi?id=137987
<rdar://problem/18717767>
Reviewed by Anders Carlsson, Sam Weinig, and Beth Dakin.
* Resources/AddImageToPhotos.pdf: Added.
* Resources/CopyImage.pdf: Added.
* Resources/SaveImageToDownloads.pdf: Added.
* Resources/ShareImage.pdf: Added.
Add some temporary artwork.
* Scripts/webkit/messages.py:
(struct_or_class):
ActionMenuHitTestResult is a struct.
* Shared/API/c/WKActionMenuItemTypes.h:
Add new items for image menus.
* Shared/mac/ActionMenuHitTestResult.cpp:
(WebKit::ActionMenuHitTestResult::encode):
(WebKit::ActionMenuHitTestResult::decode):
For now, pass the hit image data across to the UI process as a ShareableBitmap.
* Shared/mac/ActionMenuHitTestResult.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView _createActionMenuItemForTag:]):
Refactor action menu item creation into a single function, so that
callers can share code and be much simpler.
(webKitBundleImageNamed):
Add a helper to acquire an image from the WebKit2 bundle.
(-[WKView _copyImage:]):
(-[WKView _saveImageToDownloads:]):
(temporaryPhotosDirectoryPath):
(pathToPhotoOnDisk):
(-[WKView _addImageToPhotos:]):
Add rudimentary implementations of image actions.
(-[WKView _defaultMenuItemsForImage]):
Support the image menu, plus a submenu acquired from NSSharingServicePicker
for the Share menu.
(-[WKView _defaultMenuItems]):
Call _defaultMenuItemsForImage if needed.
(-[WKView _updateActionMenu]):
Refactor _updateActionMenu out of prepareForMenu:withEvent:.
(-[WKView prepareForMenu:withEvent:]):
Ask the Web process to re-hit-test under the location that the menu
will appear. Mark the menu as pending.
(-[WKView _didPerformActionMenuHitTest:]):
When we get the hit test reply, record the result for future use.
(-[WKView willOpenMenu:withEvent:]):
If we got a hit test reply, rebuild the menu immediately. If not, wait
up to 500ms for the reply to come in. This eventually needs to be
cancellable if the menu is rejected in the interim.
(-[WKView didCloseMenu:withEvent:]):
Clear all state when the menu closes.
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::performActionMenuHitTestAtLocation):
(WebKit::WebPageProxy::didPerformActionMenuHitTest):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::didPerformActionMenuHitTest):
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
Plumb didPerformActionMenuHitTest back from WebPageProxy to WKView.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::performActionMenuHitTestAtLocation):
Hit test at the given location, recording the image data if there is any,
and return the result to the UI process.
* WebKit2.xcodeproj/project.pbxproj:
Add the PDFs.
2014-10-22 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Remove WidgetBackingStoreCairo::create() factory function
https://bugs.webkit.org/show_bug.cgi?id=137943
Reviewed by Darin Adler.
WidgetBackingStoreCairo::create() can be replaced by std::make_unique<>.
Thus this patch removes it, then use std::make_unique<>|std::unique_ptr<>.
* UIProcess/BackingStore.h:
* UIProcess/cairo/BackingStoreCairo.cpp:
(WebKit::createBackingStoreForGTK):
(WebKit::BackingStore::incorporateUpdate):
2014-10-22 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Remove TextCheckerEnchant::create() factory function
https://bugs.webkit.org/show_bug.cgi?id=137944
Reviewed by Darin Adler.
TextCheckerEnchant::create() can be replaced by std::make_unique<> and std::unique_ptr<>.
* UIProcess/API/gtk/WebKitTextChecker.cpp:
(WebKitTextChecker::WebKitTextChecker):
* UIProcess/API/gtk/WebKitTextChecker.h:
* UIProcess/efl/TextCheckerClientEfl.cpp:
(TextCheckerClientEfl::TextCheckerClientEfl):
* UIProcess/efl/TextCheckerClientEfl.h:
2014-10-22 Antti Koivisto <antti@apple.com>
Revert fix for REGRESSION (r173356): Safari can't install a profile, gets 'Download Failed error
(https://bugs.webkit.org/show_bug.cgi?id=137493)
Turns out the root cause was a bug in MIME type sniffing, https://bugs.webkit.org/show_bug.cgi?id=137855
Remove the workaround.
* Shared/Downloads/ios/DownloadIOS.mm:
(WebKit::Download::startWithHandle):
* Shared/Downloads/mac/DownloadMac.mm:
(WebKit::Download::startWithHandle):
2014-10-22 Beth Dakin <bdakin@apple.com>
Remove action menu web preference
https://bugs.webkit.org/show_bug.cgi?id=137975
Reviewed by Tim Horton.
* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetActionMenuSupportEnabled): Deleted.
(WKPreferencesGetActionMenuSupportEnabled): Deleted.
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:context:configuration:webView:]):
2014-10-22 Chris Dumez <cdumez@apple.com>
[Mac][WK2] Fix applicationIsSafari() detection
https://bugs.webkit.org/show_bug.cgi?id=137893
Reviewed by Alexey Proskuryakov.
Provide an implementation for FrameLoaderClient's new
needsQuickLookResourceCachingQuirks(), which accesses the flag stored
on the WebProcess, which is initialized upon WebProcess creation.
QuickLookMac::computeNeedsQuickLookResourceCachingQuirks() is called
on UIProcess side so that it works reliably and the flag is passed as
parameter when constructing the WebProcess.
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::platformInitializeWebProcess):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::needsQuickLookResourceCachingQuirks):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess):
* WebProcess/WebProcess.h:
(WebKit::WebProcess::needsQuickLookResourceCachingQuirks):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):
2014-10-22 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix GTK+ debug build after r175046.
Remove invalid ASSERT.
* UIProcess/gtk/InputMethodFilter.cpp:
(WebKit::InputMethodFilter::setCursorRect):
2014-10-22 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Move GtkInputMethodFilter from Platform to WebKit2
https://bugs.webkit.org/show_bug.cgi?id=137884
Reviewed by Gustavo Noronha Silva.
Merge WebViewBaseInputMethodFilter and GtkInputMethodFilter into a
single class InputMethodFilter. The code is mostly the same, but
instead of having a setWebView method only to get the WebPageProxy,
it has a setPage method that passes the WebPageProxy. The GtkIMContext
client window is set by the WebView when it's realized/unrealized.
* PlatformGTK.cmake:
* Shared/NativeWebKeyboardEvent.h:
* Shared/gtk/NativeWebKeyboardEventGtk.cpp:
(WebKit::NativeWebKeyboardEvent::NativeWebKeyboardEvent):
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseRealize):
(webkitWebViewBaseUnrealize):
(webkit_web_view_base_class_init):
(webkitWebViewBaseCreateWebPage):
(webkitWebViewBaseEnterFullScreen): Deleted.
* UIProcess/API/gtk/WebViewBaseInputMethodFilter.cpp: Removed.
* UIProcess/API/gtk/WebViewBaseInputMethodFilter.h: Removed.
* UIProcess/gtk/InputMethodFilter.cpp: Added.
(WebKit::InputMethodFilter::handleCommitCallback):
(WebKit::InputMethodFilter::handlePreeditStartCallback):
(WebKit::InputMethodFilter::handlePreeditChangedCallback):
(WebKit::InputMethodFilter::handlePreeditEndCallback):
(WebKit::InputMethodFilter::InputMethodFilter):
(WebKit::InputMethodFilter::~InputMethodFilter):
(WebKit::InputMethodFilter::setEnabled):
(WebKit::InputMethodFilter::setCursorRect):
(WebKit::InputMethodFilter::handleKeyboardEvent):
(WebKit::InputMethodFilter::handleKeyboardEventWithCompositionResults):
(WebKit::InputMethodFilter::filterKeyEvent):
(WebKit::InputMethodFilter::confirmComposition):
(WebKit::InputMethodFilter::updatePreedit):
(WebKit::InputMethodFilter::notifyFocusedIn):
(WebKit::InputMethodFilter::notifyFocusedOut):
(WebKit::InputMethodFilter::notifyMouseButtonPress):
(WebKit::InputMethodFilter::confirmCurrentComposition):
(WebKit::InputMethodFilter::cancelContextComposition):
(WebKit::InputMethodFilter::sendCompositionAndPreeditWithFakeKeyEvents):
(WebKit::InputMethodFilter::handleCommit):
(WebKit::InputMethodFilter::handlePreeditStart):
(WebKit::InputMethodFilter::handlePreeditChanged):
(WebKit::InputMethodFilter::handlePreeditEnd):
(WebKit::InputMethodFilter::logHandleKeyboardEventForTesting):
(WebKit::InputMethodFilter::logHandleKeyboardEventWithCompositionResultsForTesting):
(WebKit::InputMethodFilter::logConfirmCompositionForTesting):
(WebKit::InputMethodFilter::logSetPreeditForTesting):
* UIProcess/gtk/InputMethodFilter.h: Added.
(WebKit::InputMethodFilter::context):
(WebKit::InputMethodFilter::setPage):
(WebKit::InputMethodFilter::setTestingMode):
(WebKit::InputMethodFilter::events):
2014-10-21 Tim Horton <timothy_horton@apple.com>
Quick Look preview bubble has unnecessary controls
https://bugs.webkit.org/show_bug.cgi?id=137940
<rdar://problem/18731860>
Reviewed by Simon Fraser.
* UIProcess/API/mac/WKView.mm:
(-[WKView _quickLookURLFromActionMenu:]):
Temporarily use more SPI to allow us to hide the preview bubble's controls.
2014-10-21 Jeff Miller <jeffm@apple.com>
Remove const from WKURLRequestRef parameter to WKContextDownloadURLRequest()
https://bugs.webkit.org/show_bug.cgi?id=137928
Reviewed by Darin Adler.
* UIProcess/API/C/WKContext.cpp:
(WKContextDownloadURLRequest):
* UIProcess/API/C/WKContext.h:
2014-10-21 Anders Carlsson <andersca@apple.com>
WKRemoteObjectCoder should handle floats
https://bugs.webkit.org/show_bug.cgi?id=137926
<rdar://problem/18695126>
Reviewed by Beth Dakin.
* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(encodeInvocation):
(-[WKRemoteObjectEncoder encodeFloat:forKey:]):
(decodeInvocationArguments):
(-[WKRemoteObjectDecoder decodeFloatForKey:]):
2014-10-21 Jeff Miller <jeffm@apple.com>
WKContext needs to provide an API to resume a download
https://bugs.webkit.org/show_bug.cgi?id=137507
Reviewed by Darin Adler.
This patch adds WKContextResumeDownload(), which is only supported on the Mac, and requires the
resume data from WKDownloadGetResumeData().
We have to create a sandbox extension for the partially downloaded file in the UI process so the
network or web process can resume writing to it.
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::resumeDownload):
Added, calls through to DownloadManager::resumeDownload().
* NetworkProcess/NetworkProcess.h:
Added resumeDownload().
* NetworkProcess/NetworkProcess.messages.in:
Added ResumeDownload message.
* Shared/Downloads/Download.h:
Added resume().
* Shared/Downloads/DownloadManager.cpp:
(WebKit::DownloadManager::resumeDownload):
Added. The URL being downloaded is part of the opaque resumeData, so we can't specify it when the
Download is constructed.
* Shared/Downloads/DownloadManager.h:
Added resumeDownload().
* Shared/Downloads/ios/DownloadIOS.mm:
(WebKit::Download::resume):
Added, not implemented on this platform.
* Shared/Downloads/mac/DownloadMac.mm:
(WebKit::Download::resume):
Added. Consumes the sandbox extension, resumes the download, and sets m_request after the
NSURLDownload has been created. Note that we already have code to revoke the sandbox extension when
the download is finished, canceled, or fails.
* Shared/Downloads/soup/DownloadSoup.cpp:
(WebKit::Download::resume):
Added, not implemented on this platform.
* UIProcess/API/C/WKContext.cpp:
(WKContextResumeDownload):
Added.
* UIProcess/API/C/WKContext.h:
Added WKContextResumeDownload().
* UIProcess/WebContext.cpp:
(WebKit::WebContext::resumeDownload):
Added. Creates a sandbox extension for the existing file and includes it in the message to the
network or web process.
* UIProcess/WebContext.h:
Added resumeDownload().
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::resumeDownload):
Added, calls through to DownloadManager::resumeDownload().
* WebProcess/WebProcess.h:
Added resumeDownload().
* WebProcess/WebProcess.messages.in:
Added ResumeDownload message.
2014-10-20 Michael Catanzaro <mcatanzaro@igalia.com>
Change the default TLS errors policy to WEBKIT_TLS_ERRORS_POLICY_FAIL
https://bugs.webkit.org/show_bug.cgi?id=137832
Reviewed by Carlos Garcia Campos.
Too many general-purpose browsers that really need this policy
are not selecting it, so let's do so for them.
* UIProcess/API/gtk/WebKitWebContext.cpp:
(createDefaultWebContext):
2014-10-21 Michael Catanzaro <mcatanzaro@igalia.com>
[SOUP] Disable SSLv3
https://bugs.webkit.org/show_bug.cgi?id=137859
Reviewed by Carlos Garcia Campos.
Set G_TLS_GNUTLS_PRIORITY if unset.
* NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp:
(main):
* WebProcess/EntryPoint/unix/WebProcessMain.cpp:
(main):
2014-10-20 Chris Dumez <cdumez@apple.com>
ResourceRequest deserialization unnecessarily calls partitionName() on encoded cache partition
https://bugs.webkit.org/show_bug.cgi?id=137797
Reviewed by Darin Adler.
This patch adds a |needsValidation| argument to
ResourceRequest::setCachePartition() setter so that the caller can
indicate that the partition name is valid (because it was already
processed by partitionName() before). Use this new argument in
ArgumentCoder<ResourceRequest>::decode() to spent a bit less time
deserializing resource requests.
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<ResourceRequest>::decode):
2014-10-20 Beth Dakin <bdakin@apple.com>
Action menu items should have tags
https://bugs.webkit.org/show_bug.cgi?id=137898
Reviewed by Anders Carlsson.
* Shared/API/c/WKActionMenuItemTypes.h: Added.
* UIProcess/API/mac/WKView.mm:
(-[WKView _defaultMenuItemsForLink]):
* WebKit2.xcodeproj/project.pbxproj:
2014-10-20 Beth Dakin <bdakin@apple.com>
Add support for action menus
https://bugs.webkit.org/show_bug.cgi?id=137891
rdar://problem/18451638
rdar://problem/18694470
Reviewed by Anders Carlsson.
Temporary artwork needed for menu item.
* Resources/OpenInNewWindowTemplate.pdf: Added.
* WebKit2.xcodeproj/project.pbxproj:
Add a preference that defaults to false for action menu support.
* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetActionMenuSupportEnabled):
(WKPreferencesGetActionMenuSupportEnabled):
* UIProcess/API/C/WKPreferencesRefPrivate.h:
New SPI. WebKit clients can implement this method to customize the action menu.
* UIProcess/API/Cocoa/WKViewPrivate.h:
Create the action menu if it is supported.
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:context:configuration:webView:]):
Methods to implement the default menu actions.
(-[WKView _openURLFromActionMenu:]):
(-[WKView _addToReadingListFromActionMenu:]):
(-[WKView _quickLookURLFromActionMenu:]):
Add action menus support for links. Populate the menu at the right time.
(-[WKView _defaultMenuItemsForLink]):
(-[WKView _defaultMenuItems]):
(-[WKView prepareForMenu:withEvent:]):
(-[WKView _actionMenuItemsForHitTestResult:defaultActionMenuItems:]):
New member variable caches the HitTestResult on mouse move.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::mouseDidMoveOverElement):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::activeActionMenuHitTestResult):
2014-10-20 Timothy Hatcher <timothy@apple.com>
Web Inspector: Delay and white area when Web Inspector crashes
https://bugs.webkit.org/show_bug.cgi?id=137230
Reviewed by Anders Carlsson.
* UIProcess/WebInspectorProxy.cpp:
(WebKit::processDidCrash): Added.
(WebKit::WebInspectorProxy::eagerlyCreateInspectorPage): Hook up loader client.
2014-10-20 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Generate all Inspector domains together in JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=137748
Reviewed by Brian Burg.
* PlatformGTK.cmake:
2014-10-19 Antti Koivisto <antti@apple.com>
Avoid unnecessary NSURLResponse construction for QuickLook on iOS
https://bugs.webkit.org/show_bug.cgi?id=137876
Reviewed by Andy Estes.
* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::didReceiveResponse):
Switch to the modified QuickLookHandle interface that does not need NSURLResponse.
2014-10-16 Andy Estes <aestes@apple.com>
[iOS] Capture WKActionSheetAssistant's interaction with WKContentView in a @protocol
https://bugs.webkit.org/show_bug.cgi?id=137792
Reviewed by Tim Horton.
WKPDFView would like to use WKActionSheetAssistant to show an action sheet when long-pressing a link, but it
can't so long as WKActionSheetAssistant is tightly coupled to WKContentView. Resolve this by factoring
WKActionSheetAssistant's interaction with WKContentView into a new protocol called
WKActionSheetAssistantDelegate and having WKContentView conform to this protocol.
* UIProcess/API/Cocoa/_WKElementAction.mm:
(+[_WKElementAction elementActionWithTitle:actionHandler:]): Changed instances of WKContentView * to id <WKActionSheetAssistantDelegate>.
(+[_WKElementAction elementActionWithType:customTitle:]): Ditto.
(-[_WKElementAction _runActionWithElementInfo:delegate:]): Ditto.
(copyElement): Deleted.
(saveImage): Deleted.
(-[_WKElementAction _runActionWithElementInfo:view:]): Deleted.
* UIProcess/API/Cocoa/_WKElementActionInternal.h:
* UIProcess/ios/WKActionSheet.h:
* UIProcess/ios/WKActionSheet.mm:
(-[WKActionSheet init]): Renamed from initWithView: since WKActionSheet no longer needs to know about a view.
(-[WKActionSheet _didRotateAndLayout]): Called -[WKActionSheetDelegate updatePositionInformation].
(-[WKActionSheet initWithView:]): Deleted.
* UIProcess/ios/WKActionSheetAssistant.h:
* UIProcess/ios/WKActionSheetAssistant.mm:
(-[WKActionSheetAssistant delegate]): Added a getter for the delegate property.
(-[WKActionSheetAssistant setDelegate:]): Added a setter for the delegate property.
(-[WKActionSheetAssistant initWithView:]): Changed argument type from WKContentView * to UIView *.
(-[WKActionSheetAssistant initialPresentationRectInHostViewForSheet]): Returned CGRectZero if there is no delegate.
Otherwise, retrieved positionInformation from the delegate.
(-[WKActionSheetAssistant presentationRectInHostViewForSheet]): Ditto.
(-[WKActionSheetAssistant updatePositionInformation]): Called -[WKActionSheetAssistantDelegate updatePositionInformation].
(-[WKActionSheetAssistant _createSheetWithElementActions:showLinkTitle:]): Returned early if there is no delegate.
Otherwise, retrieved positionInformation from the delegate.
(-[WKActionSheetAssistant showImageSheet]): Ditto.
(-[WKActionSheetAssistant showLinkSheet]): Ditto.
(-[WKActionSheetAssistant showDataDetectorsSheet]): Ditto.
(-[WKActionSheetAssistant cleanupSheet]):
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView setupInteraction]): Installed self as WKActionSheetAssistant's delegate.
(-[WKContentView updatePositionInformation]): Renamed from _updatePositionInformation.
(-[WKContentView performAction:]): Renamed from _performAction:.
(-[WKContentView openElementAtLocation:]): Called _attemptClickAtLocation:.
(-[WKContentView actionsForElement:defaultActions:]): Called API::UIClient::actionsForElement().
(-[WKContentView startInteractionWithElement:]): Called WebPageProxy::startInteractionWithElementAtPosition().
(-[WKContentView stopInteraction]): Called WebPageProxy::stopInteraction().
(-[WKContentView _updatePositionInformation]): Deleted.
(-[WKContentView _performAction:]): Deleted.
2014-10-20 Carlos Garnacho <carlosg@gnome.org>
[GTK] Improve zooming gesture positioning
https://bugs.webkit.org/show_bug.cgi?id=137822
Reviewed by Carlos Garcia Campos.
* UIProcess/WebPageProxy.h:
* UIProcess/gtk/GestureController.cpp:
(WebKit::GestureController::ZoomGesture::center):
(WebKit::GestureController::ZoomGesture::begin):
(WebKit::GestureController::ZoomGesture::handleZoom):
(WebKit::GestureController::ZoomGesture::scaleChanged): Calculate
the proper view coordinates for the current offset/scale, based
on the initial gesture center point in document coordinates, and
the current center/scale.
* UIProcess/gtk/GestureController.h:
* UIProcess/gtk/WebPageProxyGtk.cpp:
(WebKit::WebPageProxy::getCenterForZoomGesture): Added. Synchronous
call to retrieve the zoom gesture anchor point, in document coordinates.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in: Added stub.
* WebProcess/WebPage/gtk/WebPageGtk.cpp:
(WebKit::WebPage::getCenterForZoomGesture): Added. Getter for the
translated coordinates used as the anchor point of the zoom gesture.
2014-10-20 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Remove the factory method from DragAndDropHandler
https://bugs.webkit.org/show_bug.cgi?id=137872
Reviewed by Sergio Villar Senin.
Make the constructor public and use std::make_unique instead.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseDragAndDropHandler):
* UIProcess/gtk/DragAndDropHandler.cpp:
(WebKit::DragAndDropHandler::create): Deleted.
* UIProcess/gtk/DragAndDropHandler.h:
2014-10-20 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add initial gestures support
https://bugs.webkit.org/show_bug.cgi?id=137812
Reviewed by Sergio Villar Senin.
Now that GTK+ has support for gestures, we can use it to handle
touch events and allow to scroll, zoom and tap with the fingers.
* PlatformGTK.cmake: Add new files to compilation.
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::doneWithTouchEvent): When the touch event
hasn't been handled by the web process pass it to the
GestureController and only fallback to pointer emulation when the
GestureController doesn't handle the event.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseTouchEvent): If the GestureController is
currently processing gestures is because the START touch event was
not handled by the web process, so pass any successive touch
events to the GestureController directly.
(webkitWebViewBaseGestureController): Create the GestureController
on demand and return a reference.
* UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
* UIProcess/gtk/GestureController.cpp: Added.
(WebKit::GestureController::create): Create a GestureController.
(WebKit::GestureController::GestureController): Initialize the
Gesture memebers.
(WebKit::GestureController::handleEvent): Pass the event to the gestures.
(WebKit::GestureController::isProcessingGestures): Whether
Gestures are active.
(WebKit::GestureController::Gesture::Gesture): Base class for gestures.
(WebKit::GestureController::Gesture::isActive): Whether the
gesture is active.
(WebKit::GestureController::Gesture::handleEvent): Pass the event
to the GtkGesture to process it.
(WebKit::GestureController::DragGesture::handleDrag): Send a wheel
event corresponding to the drag gesture to the web process.
(WebKit::GestureController::DragGesture::handleTap): Send move,
press and release events corresponding to a tap gesture to the web process.
(WebKit::GestureController::DragGesture::begin): Start a drag
gesture and schedule a timer to discard tap gesture in case of
long press.
(WebKit::GestureController::DragGesture::update): If the actual
drag hasn't started yet, check the drag threshold to decide
whether to start the drag or not. Otherwise call handleDrag() to
send the appropriate events to the web process.
(WebKit::GestureController::DragGesture::end): If the drag gesture
finishes and the drag didn't happen (it wasn't a long press and
drag threshold was not reached), call handleTap() to emulate a
click event.
(WebKit::GestureController::DragGesture::DragGesture): Initialize
the GtkGestureDrag.
(WebKit::GestureController::ZoomGesture::begin): Save the current
page scale factor and the center point of the gesture.
(WebKit::GestureController::ZoomGesture::scaleChanged): Schedule a
page scale change in an idle for the given scale value.
(WebKit::GestureController::ZoomGesture::ZoomGesture): Initialize
the GtkGestureZoom.
* UIProcess/gtk/GestureController.h: Added.
2014-10-19 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for all remaining RenderObject subclasses
https://bugs.webkit.org/show_bug.cgi?id=137845
Reviewed by Darin Adler.
Use is<>() / downcast<>() for all remaining RenderObject subclasses and
clean up the surrounding code.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::pluginProcessCrashed):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::createPlugin):
2014-10-19 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Move GtkDragAndDropHelper from Platform to WebKit2
https://bugs.webkit.org/show_bug.cgi?id=137422
Reviewed by Martin Robinson.
WebKitWebViewBase is currently the only user of
GtkDragAndDropHelper, that was added to share the code with
WebKit1. Move all the drag and drop logic to a new class
DragAndDropHandler.
* PlatformGTK.cmake: Add new files to compilation.
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::startDrag):
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseConstructed):
(webkitWebViewBaseDragDataGet):
(webkitWebViewBaseDragEnd):
(webkitWebViewBaseDragDataReceived):
(webkitWebViewBaseDragMotion):
(webkitWebViewBaseDragLeave):
(webkitWebViewBaseDragDrop):
(webkitWebViewBaseDragAndDropHandler):
(dragExitedCallback): Deleted.
(webkitWebViewBaseStartDrag): Deleted.
* UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
* UIProcess/gtk/DragAndDropHandler.cpp: Added.
(WebKit::DragAndDropHandler::create):
(WebKit::DragAndDropHandler::DragAndDropHandler):
(WebKit::DragAndDropHandler::DroppingContext::DroppingContext):
(WebKit::dragOperationToGdkDragActions):
(WebKit::dragOperationToSingleGdkDragAction):
(WebKit::gdkDragActionToDragOperation):
(WebKit::DragAndDropHandler::startDrag):
(WebKit::DragAndDropHandler::fillDragData):
(WebKit::DragAndDropHandler::finishDrag):
(WebKit::DragAndDropHandler::dataObjectForDropData):
(WebKit::DragAndDropHandler::dragEntered):
(WebKit::DragAndDropHandler::requestDragData):
(WebKit::DragAndDropHandler::dragMotion):
(WebKit::DragAndDropHandler::dragLeave):
(WebKit::DragAndDropHandler::drop):
* UIProcess/gtk/DragAndDropHandler.h: Added.
2014-10-18 Dan Bernstein <mitz@apple.com>
WorkQueue dispatches functions but isnt a FunctionDispatcher
https://bugs.webkit.org/show_bug.cgi?id=137853
Reviewed by Anders Carlsson.
* Platform/WorkQueue.h: Changed to inherit from FunctionDispatcher.
2014-10-18 Michael Catanzaro <mcatanzaro@igalia.com>
[GTK] Improve documentation of webkit_web_view_get_tls_info()
https://bugs.webkit.org/show_bug.cgi?id=137852
Reviewed by Martin Robinson.
* UIProcess/API/gtk/WebKitWebView.cpp:
2014-10-17 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for RenderBox
https://bugs.webkit.org/show_bug.cgi?id=137804
Reviewed by Andreas Kling.
Use is<>() / downcast<>() for RenderBox and clean up the surrounding
code.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::determinePrimarySnapshottedPlugIn):
(WebKit::WebPage::plugInIsPrimarySize):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::sendTapHighlightForNodeIfNecessary):
2014-10-16 Simon Fraser <simon.fraser@apple.com>
[iOS] Turn off font autosizing for iOS WebKitTestRunner
https://bugs.webkit.org/show_bug.cgi?id=137806
Reviewed by Sam Weinig.
Confusingly, WKPreferencesSetTextAutosizingEnabled() does nothing on iOS.
Instead, we have to add WKPreferencesSetMinimumZoomFontSize() and set it to 0
to disable font autosizing.
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetMinimumZoomFontSize):
(WKPreferencesGetMinimumZoomFontSize):
* UIProcess/API/C/WKPreferencesRefPrivate.h:
2014-10-17 Gyuyoung Kim <gyuyoung.kim@samsung.com>
[EFL] REGRESSION(r173929): It broke the Web Inspector
https://bugs.webkit.org/show_bug.cgi?id=137522
Reviewed by Csaba Osztrogonác.
r173929 let web inspector use a separate web process. Besides it changed that the inspector is shown
as docking mode by default. However EFL port doesn't support to show web inspector as docking window yet.
This patch is to show web inspector on EFL new window as before. Docking mode should be implemented by
upcoming patch.
* UIProcess/efl/WebInspectorProxyEfl.cpp:
(WebKit::WebInspectorProxy::platformAttach):
2014-10-17 Carlos Garcia Campos <cgarcia@igalia.com>
[GLIB] Add API to GMainLoopSource to schedule sources after a delay in microseconds
https://bugs.webkit.org/show_bug.cgi?id=137782
Reviewed by Sergio Villar Senin.
* WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
(WebKit::LayerTreeHostGtk::layerFlushTimerFired): Use microseconds
instead of milliseconds.
2014-10-17 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Move touch events handling from Platform to WebKit2
https://bugs.webkit.org/show_bug.cgi?id=137735
Reviewed by Sergio Villar Senin.
GtkTouchContextHelper was only used by WebKitWebViewBase, since
it's the only one that can create touch events. The code has been
simplified by processing the events in the view, and the native
touch events are now created with the native event and touch points.
* Shared/NativeWebTouchEvent.h:
(WebKit::NativeWebTouchEvent::touchContext): Deleted.
* Shared/gtk/NativeWebTouchEventGtk.cpp:
(WebKit::NativeWebTouchEvent::NativeWebTouchEvent): Pass touch
points instead of touch context to WebEventFactory::createWebTouchEvent().
* Shared/gtk/WebEventFactory.cpp:
(WebKit::WebEventFactory::createWebTouchEvent): Create the
WebTouchEvent for the given native event and points.
(WebKit::touchPhaseFromEvents): Deleted.
(WebKit::appendTouchEvent): Deleted.
* Shared/gtk/WebEventFactory.h:
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(appendTouchEvent): Helper function to create a
WebPlatformTouchPoint for the given native event and add it to the
list of touch points.
(webkitWebViewBaseGetTouchPointForEvent): Build the touch point
list for the event.
(webkitWebViewBaseTouchEvent): Process the touch event.
(webkitWebViewBaseDragDataReceived): Deleted.
2014-10-16 Pascal Jacquemart <p.jacquemart@samsung.com>
Removing CUSTOM_PROTOCOLS guard
https://bugs.webkit.org/show_bug.cgi?id=137741
Reviewed by Benjamin Poulain.
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::NetworkProcess):
* Shared/Network/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm:
* Shared/Network/CustomProtocols/CustomProtocolManager.h:
* Shared/Network/CustomProtocols/CustomProtocolManager.messages.in:
* Shared/Network/CustomProtocols/soup/CustomProtocolManagerImpl.cpp:
* Shared/Network/CustomProtocols/soup/CustomProtocolManagerImpl.h:
* Shared/Network/CustomProtocols/soup/CustomProtocolManagerSoup.cpp:
* Shared/Network/NetworkProcessCreationParameters.cpp:
(WebKit::NetworkProcessCreationParameters::encode):
(WebKit::NetworkProcessCreationParameters::decode):
* Shared/Network/NetworkProcessCreationParameters.h:
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/API/C/soup/WKAPICastSoup.h:
* UIProcess/API/C/soup/WKSoupCustomProtocolRequestManager.cpp:
(WKSoupCustomProtocolRequestManagerGetTypeID):
(WKSoupCustomProtocolRequestManagerSetClient):
* UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h:
* UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.messages.in:
* UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm:
* UIProcess/Network/CustomProtocols/soup/CustomProtocolManagerProxySoup.cpp:
* UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.cpp:
* UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.h:
* UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.cpp:
* UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.h:
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::NetworkProcessProxy):
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::WebContext):
(WebKit::WebContext::unregisterGlobalURLSchemeAsHavingCustomProtocolHandlers):
(WebKit::WebContext::unregisterSchemeForCustomProtocol):
* UIProcess/WebContext.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::WebProcessProxy):
* UIProcess/WebProcessProxy.h:
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::platformInitializeWebProcess):
(WebKit::WebContext::platformInitializeNetworkProcess):
* WebKit2Prefix.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess):
* WebProcess/soup/WebKitSoupRequestGeneric.cpp:
(webkitSoupRequestGenericSendAsync):
(webkitSoupRequestGenericSendFinish):
* WebProcess/soup/WebKitSoupRequestGeneric.h:
2014-10-16 Simon Fraser <simon.fraser@apple.com>
Crash under RemoteLayerTreeHost::getLayer() when closing a tab
https://bugs.webkit.org/show_bug.cgi?id=137796
rdar://problem/18547565
Reviewed by Tim Horton.
CA can call our animation delegate after the RemoteLayerTreeHost has been
destroyed. CAAnimation retains its delegate, so it's safe for us to null out
the WKAnimationDelegate's pointer to the RemoteLayerTreeHost when tearing down
the RemoteLayerTreeHost.
* UIProcess/mac/RemoteLayerTreeHost.mm:
(WebKit::RemoteLayerTreeHost::~RemoteLayerTreeHost):
(WebKit::RemoteLayerTreeHost::animationDidEnd):
* WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
(-[WKAnimationDelegate invalidate]):
(-[WKAnimationDelegate animationDidStart:]):
(-[WKAnimationDelegate animationDidStop:finished:]):
2014-10-16 Tim Horton <timothy_horton@apple.com>
Implement selection services menu for Legacy WebKit
https://bugs.webkit.org/show_bug.cgi?id=137582
<rdar://problem/18604241>
Reviewed by Brady Eidson.
* UIProcess/mac/WebContextMenuProxyMac.mm:
(-[WKSharingServicePickerDelegate sharingService:didShareItems:]):
Add a note that we should transition to using replaceSelectionWithAttributedString.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::handleSelectionServiceClick):
Allow editor services in editable-but-not-rich-text areas, just like in WebKit1.
2014-10-16 Tim Horton <timothy_horton@apple.com>
Various crashes in ViewGestureControllerIOS when closing a tab while a swipe gesture is in progress
https://bugs.webkit.org/show_bug.cgi?id=137770
<rdar://problem/17916459>
Reviewed by Dan Bernstein.
When tearing down a WKWebView in the middle of a swipe gesture, a variety of
UI process crashes were observed. First, two uses of potentially deleted objects
(the WebBackForwardListItem and ViewGestureController), which were fixed by
extending the object's lifetime and checking for its liveness, respectively.
Second, a potential null-deref of DrawingArea if the timing of endSwipeGesture
vs. page teardown was such that DrawingArea was null but everything else was in line.
Lastly, another case of messaging a potentially deleted object (specifically,
the _UIViewControllerTransitionContext's animator) in a callback from CA, which
was fixed by nulling out the animator (and a few other properties) when tearing
down the ViewGestureController.
* UIProcess/ios/ViewGestureControllerIOS.mm:
(-[WKSwipeTransitionController invalidate]):
Clear the soon-to-be-invalid ViewGestureController pointer.
(WebKit::ViewGestureController::~ViewGestureController):
Call [WKSwipeTransitionController invalidate] upon destruction.
Clear our transition context's interactor and animator, and inform it that
the transition is not in flight. This avoids a crash when calling back
to the already-destroyed animator later.
(WebKit::ViewGestureController::beginSwipeGesture):
Keep a reference to the target WebBackForwardListItem; this avoids
it being deleted between here and the transition completion block firing.
Look up the ViewGestureController by pageID, just like we do in endSwipeGesture,
to avoid situations where the callback fires after the WKWebView/ViewGestureController
have gone away.
Hold on to our _UIViewControllerOneToOneTransitionContext, so that we can do the
aforementioned clearing upon deallocation.
(WebKit::ViewGestureController::endSwipeGesture):
Null check the DrawingArea. If it is null, instead of doing our normal delayed logic
for swipe snapshot teardown, just put things back together immediately.
(WebKit::ViewGestureController::removeSwipeSnapshot):
Clear m_swipeTransitionContext.
2014-10-16 Antti Koivisto <antti@apple.com>
REGRESSION (r173356): Downloading a disk image appends ".txt" to it
https://bugs.webkit.org/show_bug.cgi?id=137493
<rdar://problem/18321947>
Reviewed by Alexey Proskuryakov.
* Shared/Downloads/ios/DownloadIOS.mm:
(WebKit::Download::startWithHandle):
* Shared/Downloads/mac/DownloadMac.mm:
(WebKit::Download::startWithHandle):
It appears that the synthesized NS/CFURLResponse fails to serialize the suggested filename correctly
unless it has been accessed first.
2014-10-15 Dan Bernstein <mitz@apple.com>
[Cocoa] "Plug-in will handle load" error isn't declared in the modern API
https://bugs.webkit.org/show_bug.cgi?id=137747
Reviewed by Anders Carlsson.
* UIProcess/API/Cocoa/WKError.mm: Define _WKLegacyErrorDomain.
* UIProcess/API/Cocoa/WKErrorInternal.h: Changed to import WKErrorPrivate.h.
* UIProcess/API/Cocoa/WKErrorPrivate.h: Added. Declares _WKLegacyErrorDomain
and _WKLegacyErrorPlugInWillHandleLoad.
* WebKit2.xcodeproj/project.pbxproj: Added new private header.
2014-10-15 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for TransformOperation subclasses
https://bugs.webkit.org/show_bug.cgi?id=137731
Reviewed by Darin Adler.
Use is<>() / downcast<>() for TransformOperation subclasses and clean
up the surrounding code.
* Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
(IPC::ArgumentCoder<TransformOperations>::encode):
2014-10-15 Alexey Proskuryakov <ap@apple.com>
[Mac] Allow some Kerberos related paths in sandbox
https://bugs.webkit.org/show_bug.cgi?id=137666
rdar://problem/17965010
Reviewed by Darin Adler.
* NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
* WebProcess/com.apple.WebProcess.sb.in:
2014-10-15 Alexey Proskuryakov <ap@apple.com>
[Mac] Allow plug-ins to read managed preferences
https://bugs.webkit.org/show_bug.cgi?id=137665
<rdar://problem/18255601>
Reviewed by Darin Adler.
* Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
2014-10-14 Joonghun Park <jh718.park@samsung.com>
[WK2][EFL] Fix the problem that threads created by a DispatchQueueEfl are not destroyed
even after the DispatchQueueEfl has been destructed
https://bugs.webkit.org/show_bug.cgi?id=137195
Reviewed by Gyuyoung Kim.
Linux and Unix System's pthreads are created in joinable state by default.
If threads aren't destructed explicitly, it will be still live
until process which created the thread is dead.
Besides it may cause out of capacity range of thread creation in a process.
It is one of hidden defects.
This patch calls detachThread() to detach thread immediately after it is created.
So the thread can be destroyed as soon as the thread's ThreadContext::function()
returns.
* Platform/efl/DispatchQueueEfl.cpp:
(DispatchQueue::ThreadContext::start):
2014-10-14 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for PlatformCAAnimation subclasses
https://bugs.webkit.org/show_bug.cgi?id=137722
Reviewed by Simon Fraser.
Use is<>() / downcast<>() for PlatformCAAnimation subclasses and clean
up the surrounding code.
* WebProcess/WebPage/mac/PlatformCAAnimationRemote.h:
* WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
(WebKit::PlatformCAAnimationRemote::copy):
(WebKit::PlatformCAAnimationRemote::copyTimingFunctionFrom):
(WebKit::PlatformCAAnimationRemote::copyFromValueFrom):
(WebKit::PlatformCAAnimationRemote::copyToValueFrom):
(WebKit::PlatformCAAnimationRemote::copyValuesFrom):
(WebKit::PlatformCAAnimationRemote::copyKeyTimesFrom):
(WebKit::PlatformCAAnimationRemote::copyTimingFunctionsFrom):
* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::addAnimationForKey):
(WebKit::PlatformCALayerRemote::animationStarted):
* WebProcess/WebPage/mac/PlatformCALayerRemote.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):
2014-10-14 Alexey Proskuryakov <ap@apple.com>
REGRESSION (r165356): Issues with Japanese text input
https://bugs.webkit.org/show_bug.cgi?id=137719
rdar://problem/18431952
rdar://problem/18483741
Reviewed by Darin Adler.
* WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::didChangeSelection):
In sync code path, ensure consistent message delivery order by adding
a DispatchMessageEvenWhenWaitingForSyncReply flag. This way, delayed
EditorStateChanged messages won't confuse UI process.
2014-10-14 Anders Carlsson <andersca@apple.com>
Hide the find indicator when starting a swipe
https://bugs.webkit.org/show_bug.cgi?id=137711
Reviewed by Tim Horton.
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::navigationGestureDidBegin):
2014-10-14 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for RenderImage
https://bugs.webkit.org/show_bug.cgi?id=137683
Reviewed by Mihnea Ovidenie.
Use is<>() / downcast<>() for RenderImage.
* WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
(WebKit::cachedImage):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::performActionOnElement):
2014-10-13 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK][CMake] Non-ninja build is broken since r174422
https://bugs.webkit.org/show_bug.cgi?id=137656
Reviewed by Philippe Normand.
Make WebKit2-forwarding-headers depend only on static,
non-generated sources.
* CMakeLists.txt:
* PlatformGTK.cmake:
2014-10-13 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for PlatformCALayer subclasses
https://bugs.webkit.org/show_bug.cgi?id=137661
Reviewed by Simon Fraser.
Use is<>() / downcast<>() for PlatformCALayer subclasses and clean up
the surrounding code.
* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::~PlatformCALayerRemote):
(WebKit::PlatformCALayerRemote::updateClonedLayerProperties):
(WebKit::PlatformCALayerRemote::recursiveBuildTransaction):
(WebKit::PlatformCALayerRemote::setSublayers):
(WebKit::PlatformCALayerRemote::appendSublayer):
(WebKit::PlatformCALayerRemote::insertSublayer):
(WebKit::PlatformCALayerRemote::replaceSublayer):
(WebKit::PlatformCALayerRemote::adoptSublayers):
(WebKit::PlatformCALayerRemote::setMask):
(WebKit::PlatformCALayerRemote::copyFiltersFrom):
* WebProcess/WebPage/mac/PlatformCALayerRemote.h:
* WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.h:
* WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
(WebKit::RemoteLayerTreeContext::buildTransaction):
2014-10-13 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for Filter / FilterOperation subclasses
https://bugs.webkit.org/show_bug.cgi?id=137644
Reviewed by Darin Adler.
Use is<>() / downcast<>() for Filter / FilterOperation subclasses.
* Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
(IPC::ArgumentCoder<WebCore::FilterOperations>::encode):
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<FilterOperation>::encode):
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTextStream::operator<<):
2014-10-12 Sergio Villar Senin <svillar@igalia.com>
[SOUP] [WK2] WebProcess and NetworkProcess initialization clears cache contents
https://bugs.webkit.org/show_bug.cgi?id=137489
Reviewed by Carlos Garcia Campos.
Temporarily set the SoupCache's maximum size to a huge value
before calling soup_cache_load() so that the cache is not shrinked
to the default value.
* NetworkProcess/soup/NetworkProcessSoup.cpp:
(WebKit::NetworkProcess::platformInitializeNetworkProcess):
* WebProcess/soup/WebProcessSoup.cpp:
(WebKit::WebProcess::platformInitializeWebProcess):
2014-10-12 Ryuan Choi <ryuan.choi@gmail.com>
[EFL] Introduce EWebKit_Extension
https://bugs.webkit.org/show_bug.cgi?id=134921
Reviewed by Gyuyoung Kim.
EWebKit2 does not provide the functionality to extend WebProcess.
Although there is ewk_context_new_with_injected_bundle_path() in ewebkit2 APIs,
application developers can not make bundle object without touching WK APIs
which ewebkit2 does not expose.
This patch introduces EWebKit_Extension, basic structure for the extension of WebProcess.
* PlatformEfl.cmake:
Added files for the EWebKit_Extension and install them properly.
* UIProcess/API/efl/ewk_context.cpp:
(EwkContext::EwkContext):
(bundlePathForExtension):
(EwkContext::create):
(EwkContext::getInjectedBundleInitializationUserData):
(EwkContext::setMessageFromInjectedBundleCallback):
(ewk_context_new_with_extensions_path):
Deleted because ewebkit2 does not have a way to make injected bundle.
Instead, Ewk_Extension will cover the same functionalities.
(ewk_context_new_with_injected_bundle_path): Deleted.
* UIProcess/API/efl/ewk_context.h:
* UIProcess/API/efl/ewk_context_private.h:
(EwkContext::extensionsPath):
* UIProcess/API/efl/tests/InjectedBundle/injected_bundle_sample.cpp: Removed.
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.cpp:
(EWK2UnitTest::EWK2UnitTestEnvironment::extensionSample):
(EWK2UnitTest::EWK2UnitTestEnvironment::injectedBundleSample): Renamed injectedBundleSample to extensionSample.
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.h:
* UIProcess/API/efl/tests/extensions/extension_sample.cpp: Copied from Source/WebKit2/UIProcess/API/efl/tests/InjectedBundle/injected_bundle_sample.cpp.
* UIProcess/API/efl/tests/test_ewk2_context.cpp: Renamed ewk_context_new_with_injected_bundle_path to ewk_context_new_with_extensions_path.
(TEST_F):
* WebProcess/InjectedBundle/API/efl/EWebKit_Extension.h: Added.
* WebProcess/InjectedBundle/API/efl/ewk_extension.cpp: Added.
(EwkExtension::append):
(EwkExtension::remove):
(ewk_extension_client_add):
(ewk_extension_client_del):
* WebProcess/InjectedBundle/API/efl/ewk_extension.h: Added.
* WebProcess/InjectedBundle/API/efl/ewk_extension_private.h: Added.
(EwkExtension::EwkExtension):
(EwkExtension::~EwkExtension):
* WebProcess/efl/ExtensionManagerEfl.cpp: Added.
(WebKit::ExtensionManagerEfl::shared):
(WebKit::ExtensionManagerEfl::ExtensionManagerEfl):
(WebKit::ExtensionManagerEfl::initialize):
* WebProcess/efl/ExtensionManagerEfl.h: Added.
* WebProcess/efl/WebInjectedBundleMainEfl.cpp: Added.
(WKBundleInitialize):
* efl/ewebkit2-extension.pc.in: Added.
2014-10-10 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for Image subclasses
https://bugs.webkit.org/show_bug.cgi?id=137625
Reviewed by Andreas Kling.
Use is<>() / downcast<>() for Image subclasses.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::pluginSnapshotTimerFired):
2014-10-10 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for GraphicsLayer subclasses
https://bugs.webkit.org/show_bug.cgi?id=137595
Reviewed by Darin Adler.
Use is<>() / downcast<>() for GraphicsLayer subclasses and clean up the
surrounding code.
* WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::flushLayers):
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::layerForTransientZoom):
(WebKit::TiledCoreAnimationDrawingArea::shadowLayerForTransientZoom):
2014-10-10 Pascal Jacquemart <p.jacquemart@samsung.com>
Fix debug build on EFL after r174584
https://bugs.webkit.org/show_bug.cgi?id=137613
Reviewed by Christophe Dumez.
* UIProcess/efl/RequestManagerClientEfl.cpp:
(WebKit::RequestManagerClientEfl::RequestManagerClientEfl):
2014-10-10 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for RenderBoxModelObject
https://bugs.webkit.org/show_bug.cgi?id=137587
Reviewed by Mihnea Ovidenie.
Use is<>() / downcast<>() for RenderBoxModelObject and clean up the
surrounding code.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::renderer):
(WebKit::PluginView::invalidateRect):
2014-10-10 Pascal Jacquemart <p.jacquemart@samsung.com>
[SOUP] Remove custom URI schemes implementation
https://bugs.webkit.org/show_bug.cgi?id=128169
Reviewed by Carlos Garcia Campos.
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/API/C/soup/WKAPICastSoup.h:
* UIProcess/API/C/soup/WKContextSoup.cpp: Removed.
* UIProcess/API/C/soup/WKSoupRequestManager.cpp: Removed.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::WebContext):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didReceiveURIRequest): Deleted.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/soup/WebSoupRequestManagerClient.cpp: Removed.
* UIProcess/soup/WebSoupRequestManagerProxy.cpp: Removed.
* UIProcess/soup/WebSoupRequestManagerProxy.messages.in: Removed.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess):
* WebProcess/soup/WebKitSoupRequestGeneric.cpp:
(webkitSoupRequestGenericSendAsync):
(webkitSoupRequestGenericSendFinish):
* WebProcess/soup/WebProcessSoup.cpp:
(WebKit::WebProcess::platformInitializeWebProcess):
* WebProcess/soup/WebSoupRequestManager.cpp: Removed.
* WebProcess/soup/WebSoupRequestManager.messages.in: Removed.
2014-10-09 Dean Jackson <dino@apple.com>
Remove ENABLE_CSS3_CONDITIONAL_RULES
https://bugs.webkit.org/show_bug.cgi?id=137571
Reviewed by Simon Fraser.
* Configurations/FeatureDefines.xcconfig:
2014-10-09 Tim Horton <timothy_horton@apple.com>
Move ServicesOverlayController to WebCore
https://bugs.webkit.org/show_bug.cgi?id=137416
<rdar://problem/18546283>
Reviewed by Anders Carlsson.
* Platform/Logging.h:
Move Services logging channel to WebCore.
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::handleTelephoneNumberClick):
(WebKit::WebChromeClient::handleSelectionServiceClick):
(WebKit::WebChromeClient::hasRelevantSelectionServices):
Implement services-related ChromeClient callbacks.
Clicks are forwarded to WebPageMac where they do what they used to;
hasRelevantSelectionServices is implemented as it was when it lived
inside ServicesOverlayController.
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::selectedTelephoneNumberRangesChanged): Deleted.
(WebKit::WebEditorClient::selectionRectsDidChange): Deleted.
* WebProcess/WebCoreSupport/WebEditorClient.h:
Remove WebEditorClient overrides for now-removed functions.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::updatePreferences):
Forward serviceControlsEnabled setting to WebCore.
(WebKit::WebPage::servicesOverlayController): Deleted.
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::serviceControlsEnabled): Deleted.
2014-10-09 Andy Estes <aestes@apple.com>
[iOS] Crash in CFURLDownloadClient.didFail if the download has a null resumeData
https://bugs.webkit.org/show_bug.cgi?id=137551
Reviewed by David Kilzer.
CFDataGetBytePtr() and CFDataGetLength() crash if passed a null value.
* Shared/Downloads/ios/DownloadIOS.mm:
(WebKit::setUpDownloadClient):
2014-10-09 Carlos Garcia Campos <cgarcia@igalia.com>
[X11] Plugin process crashes in NetscapePlugin::platformPostInitialize()
https://bugs.webkit.org/show_bug.cgi?id=137426
Reviewed by Darin Adler.
For some reason flash crashes when NPP_GetValue is called with
NPPVpluginCancelSrcStream, but only in windowed mode. Not calling
NPP_GetValue and unconditionally loading the source URL in the
browser fixes the crash and plugins work normally. We can handle
this particular case with a new quirk.
* Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
(WebKit::NetscapePluginModule::determineQuirks): Add
DoNotCancelSrcStreamInWindowedMode quirk if it's flash plugin.
* Shared/Plugins/PluginQuirks.h: Add
DoNotCancelSrcStreamInWindowedMode quirk.
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::shouldLoadSrcURL): Return early if plugin
is windowed and DoNotCancelSrcStreamInWindowedMode quirk is present.
2014-10-09 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for Widget subclasses
https://bugs.webkit.org/show_bug.cgi?id=137549
Reviewed by Darin Adler.
Use is<>() / downcast<>() for Widget subclasses and clean up the
surrounding code.
* Shared/WebRenderObject.cpp:
(WebKit::WebRenderObject::WebRenderObject):
2014-10-08 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Use the PageLoadState observer also to monitor title and estimated load progress
https://bugs.webkit.org/show_bug.cgi?id=136997
Reviewed by Gustavo Noronha Silva.
* UIProcess/API/gtk/WebKitLoaderClient.cpp:
(attachLoaderClientToView): Remove implementation of
didReceiveTitleForFrame, didStartProgress, didChangeProgress and
didFinishProgress.
(didReceiveTitleForFrame): Deleted.
(didChangeProgress): Deleted.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkit_web_view_get_estimated_load_progress): Return the value
directly from the PageLoadState object, since we don't need to
cache the value anymore.
(webkitWebViewSetTitle): Deleted.
(webkitWebViewSetEstimatedLoadProgress): Deleted.
* UIProcess/API/gtk/WebKitWebViewPrivate.h:
2014-10-08 Carlos Garcia Campos <cgarcia@igalia.com>
Race condition with WebKitWebView:is-loading after starting page load
https://bugs.webkit.org/show_bug.cgi?id=136692
Reviewed by Gustavo Noronha Silva.
Use PageLoadState::Observer to update both is-loading and uri
properties, instead of manually update them. This ensures that our
web view is always in sync with the WebPageProxy so that
webkit_web_view_is_loading() returns true right after requesting
any load. We still need to manually set the is-loading property
only in the case where we delay the emission of the load-changed
signals when waiting for the main resource. The bahaviour is a bit
different but still consistent with what our API documentation says.
* UIProcess/API/gtk/WebKitLoaderClient.cpp:
(attachLoaderClientToView): Remove
didSameDocumentNavigationForFrame implementation, since we are
already notified about the URL change by the PageLoadState::Observer.
(didSameDocumentNavigationForFrame): Deleted.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewSetIsLoading): No longer update the URI when
changing the is-loading property.
(webkitWebViewConstructed): Crate a PageLoadStateObserver and add
it to the PageLoadState.
(webkitWebViewDispose): Remove the PageLoadStateObserver from the PageLoadState.
(webkitWebViewEmitLoadChanged): Add isDelayedEvent parameter to
update the is-loading property accordingly when emitting the
delayed events.
(webkitWebViewEmitDelayedLoadEvents): Pass true as isDelayedEvent
parameter of webkitWebViewEmitLoadChanged().
(webkitWebViewLoadChanged): Pass false as isDelayedEvent parameter
of webkitWebViewEmitLoadChanged().
(webkitWebViewLoadFailed):
(webkitWebViewLoadFailedWithTLSErrors):
(webkitWebViewUpdateURI): Deleted.
* UIProcess/API/gtk/WebKitWebViewPrivate.h:
2014-10-08 Christophe Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for RenderBlock objects
https://bugs.webkit.org/show_bug.cgi?id=137512
Reviewed by Darin Adler.
Use is<>() / downcast<>() for RenderBlock objects and clean up the
surrounding code.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::rangeForWebSelectionAtPosition):
(WebKit::WebPage::contractedRangeFromHandle):
2014-10-08 Ada Chan <adachan@apple.com>
Implement WKPageIsPlayingAudio().
https://bugs.webkit.org/show_bug.cgi?id=137048
Reviewed by Darin Adler.
* UIProcess/API/C/WKPage.cpp:
(WKPageIsPlayingAudio):
2014-10-08 Gyuyoung Kim <gyuyoung.kim@samsung.com>
[EFL][CoordinatedGraphics] All EFL layout tests are broken since r174231
https://bugs.webkit.org/show_bug.cgi?id=137443
Reviewed by Zoltan Herczeg.
EFL layout test and MiniBrowser have broken since r174231. r174231 was to move PageOverlay implementation
from WebKit2 to WebCore with lazy initializing of PageOverlayController. It caused all EFL layout tests
crash and build break. To restore EFL layout test, this patch sets viewOverlayRootLayer through
attachViewOverlayGraphicsLayer() as mac port's one in r174231.
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp:
(WebKit::CoordinatedDrawingArea::attachViewOverlayGraphicsLayer):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.h:
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
(WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
(WebKit::CoordinatedLayerTreeHost::updateRootLayers):
(WebKit::CoordinatedLayerTreeHost::setViewOverlayRootLayer):
(WebKit::CoordinatedLayerTreeHost::setRootCompositingLayer):
(WebKit::CoordinatedLayerTreeHost::didFlushRootLayer):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
2014-10-08 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r174335.
https://bugs.webkit.org/show_bug.cgi?id=137515
It broke EFL layout test totally (Requested by gyuyoung on
#webkit).
Reverted changeset:
"[EFL] Introduce EWebKit_Extension"
https://bugs.webkit.org/show_bug.cgi?id=134921
http://trac.webkit.org/changeset/174335
2014-10-08 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Make forwarding headers generation depend on source code
https://bugs.webkit.org/show_bug.cgi?id=137394
Reviewed by Philippe Normand.
Only run generate-forwarding-headers.pl when source code changes
and use a different target for the symlinks.
* PlatformGTK.cmake:
2014-10-07 Pascal Jacquemart <p.jacquemart@samsung.com>
[EFL] Enable custom URI schemes with CustomProtocols
https://bugs.webkit.org/show_bug.cgi?id=128177
Reviewed by Gyuyoung Kim.
Fixing ewk_context_url_scheme_register() ewebkit2 API
rely on r162449 - CustomProtocols implementation from Carlos Garcia Campos
* PlatformEfl.cmake:
* UIProcess/API/efl/ewk_context.h:
* UIProcess/API/efl/ewk_url_scheme_request.cpp:
(EwkUrlSchemeRequest::EwkUrlSchemeRequest):
(EwkUrlSchemeRequest::finish):
* UIProcess/API/efl/ewk_url_scheme_request_private.h:
(EwkUrlSchemeRequest::create):
* UIProcess/API/efl/tests/test_ewk2_context.cpp:
(TEST_F):
* UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.cpp:
* UIProcess/efl/RequestManagerClientEfl.cpp:
(WebKit::RequestManagerClientEfl::RequestManagerClientEfl):
(WebKit::RequestManagerClientEfl::startLoading):
(WebKit::RequestManagerClientEfl::stopLoading):
(WebKit::RequestManagerClientEfl::registerURLSchemeHandler):
(WebKit::EwkUrlSchemeHandler::EwkUrlSchemeHandler): Deleted.
(WebKit::RequestManagerClientEfl::didReceiveURIRequest): Deleted.
* UIProcess/efl/RequestManagerClientEfl.h:
* UIProcess/efl/WebContextEfl.cpp:
(WebKit::WebContext::platformInitializeWebProcess):
* UIProcess/soup/WebContextSoup.cpp:
(WebKit::WebContext::platformInitializeNetworkProcess):
2014-10-07 Sungmann Cho <sungmann.cho@navercorp.com>
Remove WKPageCreateSnapshotOfVisibleContent API.
https://bugs.webkit.org/show_bug.cgi?id=66979
Reviewed by Darin Adler.
After the landing of the first patch of webkit.org/b/66979,
WKPageCreateSnapshotOfVisibleContent API has been neglected for years.
Currently, this is not used anywhere and does not break the nightlies.
So we can remove this.
* UIProcess/API/C/WKPage.cpp:
(WKPageCreateSnapshotOfVisibleContent): Deleted.
* UIProcess/API/C/WKPagePrivate.h:
2014-10-07 Sungmann Cho <sungmann.cho@navercorp.com>
Remove WKPageSetInvalidMessageFunction.
https://bugs.webkit.org/show_bug.cgi?id=137509
Reviewed by Benjamin Poulain.
According to the FIXME comment in WKPageSetInvalidMessageFunction,
we can remove this function when doing so won't break the nightlies.
Currently, this is not used anywhere and does not break the nightlies.
So we can remove this.
* UIProcess/API/C/WKPage.cpp:
(WKPageSetInvalidMessageFunction): Deleted.
* UIProcess/API/C/WKPagePrivate.h:
2014-10-07 Christophe Dumez <cdumez@apple.com>
[WK2] Use is<>() / downcast<>() for DrawingArea subclasses
https://bugs.webkit.org/show_bug.cgi?id=137497
Reviewed by Benjamin Poulain.
Use is<>() / downcast<>() for DrawingArea subclasses.
* WebProcess/WebPage/DrawingArea.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didCommitLoad):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::synchronizeDynamicViewportUpdate):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
2014-10-07 Simon Fraser <simon.fraser@apple.com>
Roll-over Changelogs.
* ChangeLog-2014-10-07: Copied from Source/WebKit2/ChangeLog.
== Rolled over to ChangeLog-2014-10-07 ==