diff options
Diffstat (limited to 'Source/WebKit2/ChangeLog')
-rw-r--r-- | Source/WebKit2/ChangeLog | 4868 |
1 files changed, 4868 insertions, 0 deletions
diff --git a/Source/WebKit2/ChangeLog b/Source/WebKit2/ChangeLog index 3ade49a..bacf704 100644 --- a/Source/WebKit2/ChangeLog +++ b/Source/WebKit2/ChangeLog @@ -1,3 +1,4871 @@ +2011-03-30 Ivan Krstić <ike@apple.com> + + Reviewed by Oliver Hunt. + + Ensure consistent, readable working directory for WebProcess before entering sandbox + <rdar://problem/8951176> + + * WebProcess/mac/WebProcessMac.mm: + (WebKit::WebProcess::platformInitializeWebProcess): + +2011-03-30 Sam Weinig <sam@webkit.org> + + Reviewed by Brady Eidson. + + WebKit2: Attempting to view css file from url causes it to download + <rdar://problem/9102611> + https://bugs.webkit.org/show_bug.cgi?id=57501 + + * UIProcess/WebPageProxy.cpp: + (WebKit::WebPageProxy::canShowMIMEType): + Match WebKit1 by allowing any MIME type that starts with "text/" + except the ones we explicitly blacklist. + +2011-03-30 Steve Falkenburg <sfalken@apple.com> + + Reviewed by Adam Roben. + + Update Windows production build logic for new production configurations + https://bugs.webkit.org/show_bug.cgi?id=57494 + + * win/WebKit2.make: + * win/WebKit2Production.vsprops: + * win/WebKit2WebProcessProduction.vsprops: + +2011-03-30 Steve Falkenburg <sfalken@apple.com> + + Reviewed by Adam Roben. + + Rename Windows configuration Release_LTCG to Production for clarity + https://bugs.webkit.org/show_bug.cgi?id=57465 + + * win/WebKit2.submit.sln: + * win/WebKit2.vcproj: + * win/WebKit2Generated.vcproj: + * win/WebKit2Production.vsprops: Copied from Source/WebKit2/win/WebKit2ReleaseLTCG.vsprops. + * win/WebKit2ReleaseLTCG.vsprops: Removed. + * win/WebKit2WebProcess.vcproj: + * win/WebKit2WebProcessProduction.vsprops: Copied from Source/WebKit2/win/WebKit2WebProcessReleaseLTCG.vsprops. + * win/WebKit2WebProcessReleaseLTCG.vsprops: Removed. + +2011-03-30 Jer Noble <jer.noble@apple.com> + + Reviewed by Dan Bernstein. + + WebKit2: WebProcess is using 89%, while viewing a PDF + https://bugs.webkit.org/show_bug.cgi?id=57471 + + Break a never ending display/update cycle between the UIProcess and the WebProcess + by clearing the dirty region when a page has a custom representation (like a PDF). + Also, avoid the issue where possible by not setting the dirty region in the same case. + + * WebProcess/WebPage/DrawingAreaImpl.cpp: + (WebKit::DrawingAreaImpl::setNeedsDisplay): Bail early if mainFrameHasCustomRepresentation(). + (WebKit::DrawingAreaImpl::scroll): Ditto. + (WebKit::DrawingAreaImpl::display): Both bail early and clear m_dirtyRegion if + mainFrameHasCustomRepresentation(). + +2011-03-30 Sam Weinig <sam@webkit.org> + + Fix Snow Leopard build. + + * UIProcess/mac/WebContextMenuProxyMac.mm: + (WebKit::WebContextMenuProxyMac::showContextMenu): + +2011-03-30 Sam Weinig <sam@webkit.org> + + Reviewed by Anders Carlsson. + + WebKit2 contextual menu looks different than the rest of the OS + <rdar://problem/9172935> + https://bugs.webkit.org/show_bug.cgi?id=57475 + + * UIProcess/mac/WebContextMenuProxyMac.mm: + (WebKit::WebContextMenuProxyMac::showContextMenu): + Use correct SPI for showing a context menu. The dummy view is also + not necessary, so remove it. + +2011-03-30 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Crash when NPN_Evaluate removes the plug-in frame + https://bugs.webkit.org/show_bug.cgi?id=57474 + <rdar://problem/9191396> + + Get a reference to the frame since it can be nulled out if running the JavaScript code + causes the plug-in's containing frame to be removed from the frame tree. + + * WebProcess/Plugins/PluginView.cpp: + (WebKit::PluginView::evaluate): + +2011-03-30 Sam Weinig <sam@webkit.org> + + Reviewed by Anders Carlsson. + + Add default localization strategy that can be shared by WebKit1 and WebKit2 + https://bugs.webkit.org/show_bug.cgi?id=57406 + + * Shared/WebLocalizableStrings.h: Removed. + Removed in favor of using WebCore/LocalizedStrings.h directly. + + * PluginProcess/mac/PluginProcessMac.mm: + * UIProcess/API/mac/WKView.mm: + * UIProcess/mac/WebInspectorProxyMac.mm: + * WebProcess/WebCoreSupport/mac/WebErrorsMac.mm: + * WebProcess/mac/WebProcessMac.mm: + Use WebCore/LocalizedStrings.h directly. + + * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: + * WebProcess/WebCoreSupport/WebPlatformStrategies.h: + Remove localization strategy override in favor of using new default implementation. + + * GNUmakefile.am: + * WebKit2.pro: + * WebKit2.xcodeproj/project.pbxproj: + * win/WebKit2.vcproj: + Remove WebLocalizableStrings.h + +2011-03-30 Anders Carlsson <andersca@apple.com> + + Reviewed by Adam Roben. + + Assertion failure in plug-in process when calling WKPluginSiteDataManagerGetSitesWithData + https://bugs.webkit.org/show_bug.cgi?id=57468 + <rdar://problem/9199089> + + Call decrementLoadCount from removeWebProcessConnection instead of startShutdownTimerIfNecessary, + otherwise we'll get a load count underflow when a connection is never created. + + * PluginProcess/PluginProcess.cpp: + (WebKit::PluginProcess::removeWebProcessConnection): + (WebKit::PluginProcess::createWebProcessConnection): + (WebKit::PluginProcess::startShutdownTimerIfNecessary): + +2011-03-30 Jessie Berlin <jberlin@apple.com> + + Reviewed by Anders Carlsson. + + WebKit2: Make sure to try to terminate the Web Process when any work that might require the + Web Process to be relaunched is done + https://bugs.webkit.org/show_bug.cgi?id=57462 + + For the ManagerProxies in the UIProcess, only return true from shouldTerminate if there are + no more callbacks waiting to be invoked. + + For the the Managers in the WebProcess, call WebProcess::shared().terminateIfPossible() when + any work called for by a ManagerProxy function that called relaunchProcessIfNecessary is + finished. + + * UIProcess/WebContext.cpp: + (WebKit::WebContext::shouldTerminate): + Check with each of the ManagerProxies. + + * UIProcess/WebApplicationCacheManagerProxy.cpp: + (WebKit::WebApplicationCacheManagerProxy::shouldTerminate): + * UIProcess/WebApplicationCacheManagerProxy.h: + * UIProcess/WebCookieManagerProxy.cpp: + (WebKit::WebCookieManagerProxy::shouldTerminate): + * UIProcess/WebCookieManagerProxy.h: + * UIProcess/WebDatabaseManagerProxy.cpp: + (WebKit::WebDatabaseManagerProxy::shouldTerminate): + * UIProcess/WebDatabaseManagerProxy.h: + * UIProcess/WebKeyValueStorageManagerProxy.cpp: + (WebKit::WebKeyValueStorageManagerProxy::shouldTerminate): + * UIProcess/WebKeyValueStorageManagerProxy.h: + * UIProcess/WebMediaCacheManagerProxy.cpp: + (WebKit::WebMediaCacheManagerProxy::shouldTerminate): + * UIProcess/WebMediaCacheManagerProxy.h: + * UIProcess/WebResourceCacheManagerProxy.cpp: + (WebKit::WebResourceCacheManagerProxy::shouldTerminate): + * UIProcess/WebResourceCacheManagerProxy.h: + + * WebProcess/ApplicationCache/WebApplicationCacheManager.cpp: + (WebKit::WebApplicationCacheManager::getApplicationCacheOrigins): + (WebKit::WebApplicationCacheManager::deleteEntriesForOrigin): + (WebKit::WebApplicationCacheManager::deleteAllEntries): + * WebProcess/Cookies/WebCookieManager.cpp: + (WebKit::WebCookieManager::getHostnamesWithCookies): + (WebKit::WebCookieManager::deleteCookiesForHostname): + (WebKit::WebCookieManager::deleteAllCookies): + (WebKit::WebCookieManager::startObservingCookieChanges): + (WebKit::WebCookieManager::setHTTPCookieAcceptPolicy): + (WebKit::WebCookieManager::getHTTPCookieAcceptPolicy): + * WebProcess/KeyValueStorage/WebKeyValueStorageManager.cpp: + (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins): + (WebKit::WebKeyValueStorageManager::deleteEntriesForOrigin): + (WebKit::WebKeyValueStorageManager::deleteAllEntries): + * WebProcess/MediaCache/WebMediaCacheManager.cpp: + (WebKit::WebMediaCacheManager::getHostnamesWithMediaCache): + (WebKit::WebMediaCacheManager::clearCacheForHostname): + (WebKit::WebMediaCacheManager::clearCacheForAllHostnames): + * WebProcess/ResourceCache/WebResourceCacheManager.cpp: + (WebKit::WebResourceCacheManager::getCacheOrigins): + (WebKit::WebResourceCacheManager::clearCacheForOrigin): + (WebKit::WebResourceCacheManager::clearCacheForAllOrigins): + * WebProcess/WebCoreSupport/WebDatabaseManager.cpp: + (WebKit::WebDatabaseManager::getDatabasesByOrigin): + (WebKit::WebDatabaseManager::getDatabaseOrigins): + (WebKit::WebDatabaseManager::deleteDatabaseWithNameForOrigin): + (WebKit::WebDatabaseManager::deleteDatabasesForOrigin): + (WebKit::WebDatabaseManager::deleteAllDatabases): + (WebKit::WebDatabaseManager::setQuotaForOrigin): + +2011-03-30 Adam Roben <aroben@apple.com> + + Mac build fix after r82442 + + * WebProcess/Plugins/PluginProxy.cpp: + (WebKit::PluginProxy::geometryDidChange): Added a missing argument. + +2011-03-29 Adam Roben <aroben@apple.com> + + Add a way to specify that a ShareableBitmap has no alpha channel + + Before this patch, all ShareableBitmaps had an alpha channel. With this patch, all + ShareableBitmaps *still* have an alpha channel. But now there's a way to specify you don't + want one (which will be used in the future)! + + Fixes <http://webkit.org/b/57388> Need a way to specify that a ShareableBitmap has no alpha + channel + + Reviewed by Anders Carlsson. + + * Shared/ShareableBitmap.cpp: + (WebKit::ShareableBitmap::Handle::Handle): Moved here from the header file, and added + initialization of m_flags. + + (WebKit::ShareableBitmap::Handle::encode): + (WebKit::ShareableBitmap::Handle::decode): + Encode/decode m_flags. + + (WebKit::ShareableBitmap::create): + (WebKit::ShareableBitmap::createShareable): + Pass along the new Flags argument. + + (WebKit::ShareableBitmap::createHandle): Store our Flags on the Handle. + (WebKit::ShareableBitmap::ShareableBitmap): Store the Flags in m_flags. + + * Shared/ShareableBitmap.h: Added Flag, Flags, and m_flags, and added a Flags argument to + some create functions. + + * Shared/WebCoreArgumentCoders.cpp: + (CoreIPC::encodeImage): + * Shared/WebImage.cpp: + (WebKit::WebImage::create): + Specify that we want a bitmap that supports alpha to maintain current behavior. + + * Shared/cg/ShareableBitmapCG.cpp: + (WebKit::bitmapInfo): New helper function. Includes an alpha channel only if specified in + the flags. + + (WebKit::ShareableBitmap::createGraphicsContext): + (WebKit::ShareableBitmap::makeCGImage): + Use the new helper function. + + * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: + (WebKit::NetscapePlugin::snapshot): + * WebProcess/Plugins/PluginProxy.cpp: + (WebKit::PluginProxy::geometryDidChange): + * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm: + (WebKit::convertImageToBitmap): + * WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp: + (WebKit::WebPopupMenu::setUpPlatformData): + * WebProcess/WebPage/DrawingAreaImpl.cpp: + (WebKit::DrawingAreaImpl::display): + * WebProcess/WebPage/FindController.cpp: + (WebKit::FindController::updateFindIndicator): + Specify that we want a bitmap that supports alpha to maintain current behavior. + +2011-03-29 Adam Roben <aroben@apple.com> + + Add ShareableBitmap::Handle + + This object is used for encoding/decoding a ShareableBitmap via CoreIPC. It currently just + encapsulates a SharedMemory::Handle (which is what we were using previously) and the image's + size (which means callers no longer need to deal with the size explicitly), but in the + future could be used to store more information about the bitmap. + + This should cause no behavior changes. + + Fixes <http://webkit.org/b/57397> ShareableBitmap needs its own Handle type + + Reviewed by Anders Carlsson. + + * PluginProcess/PluginControllerProxy.cpp: + (WebKit::PluginControllerProxy::geometryDidChange): No longer need to pass a size to create, + since the Handle records the size. + (WebKit::PluginControllerProxy::snapshot): No longer need the bufferSize argument, since the + Handle records the size. + + * PluginProcess/PluginControllerProxy.h: + * PluginProcess/PluginControllerProxy.messages.in: + Updated Handle types and removed unnecessary size argument to Snapshot. + + * Shared/PlatformPopupMenuData.cpp: + (WebKit::PlatformPopupMenuData::encode): + (WebKit::PlatformPopupMenuData::decode): + * Shared/PlatformPopupMenuData.h: + Changed to use ShareableBitmap::Handle and removed m_backingStoreSize, which is now stored + in the Handles. + + * Shared/ShareableBitmap.cpp: + (WebKit::ShareableBitmap::Handle::encode): + (WebKit::ShareableBitmap::Handle::decode): + Simple encode/decode functions. + + (WebKit::ShareableBitmap::create): Get the size from the Handle instead of as a separate + argument. + (WebKit::ShareableBitmap::createHandle): Store our size in the Handle. + + * Shared/ShareableBitmap.h: Added ShareableBitmap::Handle and made some functions use it. + + * Shared/UpdateInfo.h: Changed to use ShareableBitmap::Handle. + + * Shared/UserMessageCoders.h: + (WebKit::UserMessageEncoder::baseEncode): + (WebKit::UserMessageDecoder::baseDecode): + * Shared/WebCoreArgumentCoders.cpp: + (CoreIPC::encodeImage): + (CoreIPC::decodeImage): + Use the size stored in the Handle instead of encoding/decoding one separately. + + * UIProcess/API/mac/PageClientImpl.h: + * UIProcess/API/mac/PageClientImpl.mm: + (WebKit::PageClientImpl::setDragImage): + Removed the unnecessary imageSize argument. We can get it from the image itself. + + * UIProcess/BackingStore.cpp: + (WebKit::BackingStore::incorporateUpdate): + * UIProcess/FindIndicator.cpp: + (WebKit::FindIndicator::create): + No longer need to pass a size when creating a ShareableBitmap from a Handle. + + * UIProcess/FindIndicator.h: Changed to use ShareableBitmap::Handle. + + * UIProcess/PageClient.h: Removed unnecessary imageSize argument from setDragImage. + + * UIProcess/WebPageProxy.cpp: + (WebKit::WebPageProxy::setFindIndicator): + * UIProcess/WebPageProxy.h: + * UIProcess/WebPageProxy.messages.in: + * UIProcess/mac/WebPageProxyMac.mm: + (WebKit::WebPageProxy::setDragImage): + * WebProcess/Plugins/PluginProxy.cpp: + (WebKit::PluginProxy::snapshot): + (WebKit::PluginProxy::geometryDidChange): + * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm: + (WebKit::WebDragClient::startDrag): + Changed to use ShareableBitmap::Handle and removed now-unnecessary size arguments (since we + can get the size from the Handle). + + * WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp: + (WebKit::WebPopupMenu::setUpPlatformData): Don't need to store the backing store size in the + data anymore; the Handles will make sure it reaches the other process. + + * WebProcess/WebPage/FindController.cpp: + (WebKit::FindController::updateFindIndicator): + (WebKit::FindController::hideFindIndicator): + Changed to use ShareableBitmap::Handle. + +2011-03-30 Alejandro G. Castro <alex@igalia.com> + + Fix GTK build after r81980. + + * GNUmakefile.am: + +2011-03-29 Beth Dakin <bdakin@apple.com> + + Reviewed by Maciej Stachowiak. + + Fix for https://bugs.webkit.org/show_bug.cgi?id=57408 + webkit-min-device-pixel-ratio media query doesn't work post-SnowLeopard + -and corresponding- + <rdar://problem/8665411> + + * Shared/WebPageCreationParameters.cpp: + (WebKit::WebPageCreationParameters::encode): + (WebKit::WebPageCreationParameters::decode): + * Shared/WebPageCreationParameters.h: + * UIProcess/API/mac/PageClientImpl.h: + * UIProcess/API/mac/PageClientImpl.mm: + (WebKit::PageClientImpl::userSpaceScaleFactor): + * UIProcess/API/qt/qwkpage_p.h: + (QWKPagePrivate::userSpaceScaleFactor): + * UIProcess/PageClient.h: + * UIProcess/WebPageProxy.cpp: + (WebKit::WebPageProxy::creationParameters): + * UIProcess/gtk/WebView.h: + (WebKit::WebView::userSpaceScaleFactor): + * UIProcess/win/WebView.h: + (WebKit::WebView::userSpaceScaleFactor): + * WebProcess/WebCoreSupport/WebChromeClient.cpp: + (WebKit::WebChromeClient::scaleFactor): + * WebProcess/WebPage/WebPage.cpp: + (WebKit::WebPage::WebPage): + * WebProcess/WebPage/WebPage.h: + (WebKit::WebPage::userSpaceScaleFactor): + +2011-03-29 Brent Fulgham <bfulgham@webkit.org> + + Unreviewed WinCairo build fix. + + Bring DownloadCurl implementation stubs in line with current + CFNetwork API. + + * WebProcess/Downloads/curl/DownloadCurl.cpp: + (WebKit::Download::receivedCredential): + (WebKit::Download::receivedRequestToContinueWithoutCredential): + (WebKit::Download::receivedCancellation): + +2011-03-29 Chris Fleizach <cfleizach@apple.com> + + Reviewed by Darin Adler. + + AX: WK2: When creating the window remote token, use what's returned from accessibility + https://bugs.webkit.org/show_bug.cgi?id=57398 + + This will allow a specific WKView to override what's used for the window attribute of the + HTML elements. + + * UIProcess/API/mac/WKView.mm: + (-[WKView viewDidMoveToWindow]): + +2011-03-29 Jeff Miller <jeffm@apple.com> + + Reviewed by Sam Weinig. + + Make Windows-only InjectedBundle functions platform-specific + https://bugs.webkit.org/show_bug.cgi?id=57385 + + Added files for Windows-specific WKBundle functions. + Removed stub wrappers for InjectedBundle::setHostAllowsAnyHTTPSCertificate() and InjectedBundle::setClientCertificate() from non-Windows platforms. + + * WebProcess/InjectedBundle/API/c/WKBundle.cpp: Moved WKBundleSetHostAllowsAnyHTTPSCertificate() and WKBundleSetClientCertificate() to WKBundlePrivateWin.cpp. + * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: Moved WKBundleSetHostAllowsAnyHTTPSCertificate() and WKBundleSetClientCertificate() to WKBundlePrivateWin.h. + * WebProcess/InjectedBundle/API/c/win: Added. + * WebProcess/InjectedBundle/API/c/win/WKBundlePrivateWin.cpp: Added. + (WKBundleSetHostAllowsAnyHTTPSCertificate): Moved from WKBundle.cpp. + (WKBundleSetClientCertificate): Moved from WKBundle.cpp. + * WebProcess/InjectedBundle/API/c/win/WKBundlePrivateWin.h: Added. + * WebProcess/InjectedBundle/InjectedBundle.h: setHostAllowsAnyHTTPSCertificate() and setClientCertificate() are Windows-only. + * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp: Removed setHostAllowsAnyHTTPSCertificate() and setClientCertificate(). + * WebProcess/InjectedBundle/mac/InjectedBundleMac.cpp: Removed setHostAllowsAnyHTTPSCertificate() and setClientCertificate(). + * WebProcess/InjectedBundle/qt/InjectedBundleQt.cpp: Removed setHostAllowsAnyHTTPSCertificate() and setClientCertificate(). + * win/WebKit2.vcproj: Added WKBundlePrivateWin.cpp and WKBundlePrivateWin.h. + * win/WebKit2Generated.make: Copy WKBundlePrivateWin.h. + +2011-03-29 Anders Carlsson <andersca@apple.com> + + Fix Windows build. + + * WebProcess/Downloads/cfnet/DownloadCFNet.cpp: + (WebKit::Download::receivedCredential): + (WebKit::Download::receivedRequestToContinueWithoutCredential): + (WebKit::Download::receivedCancellation): + +2011-03-29 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Downloads: Authentication support + https://bugs.webkit.org/show_bug.cgi?id=57403 + <rdar://problem/8691166> + + * UIProcess/API/C/WKContext.h: + Add didReceiveAuthenticationChallenge callback. + + * UIProcess/Downloads/DownloadProxy.cpp: + (WebKit::DownloadProxy::didReceiveAuthenticationChallenge): + Call the download client. + + * UIProcess/Downloads/DownloadProxy.messages.in: + Add DidReceiveAuthenticationChallenge message. + + * UIProcess/WebDownloadClient.cpp: + (WebKit::WebDownloadClient::didReceiveAuthenticationChallenge): + Call the client callback function. + + * UIProcess/WebDownloadClient.h: + * WebProcess/Authentication/AuthenticationManager.cpp: + (WebKit::AuthenticationManager::didReceiveAuthenticationChallenge): + Send the DidReceiveAuthenticationChallenge message to the download proxy. + + (WebKit::AuthenticationManager::useCredentialForChallenge): + (WebKit::AuthenticationManager::continueWithoutCredentialForChallenge): + (WebKit::AuthenticationManager::cancelChallenge): + If the authentication client is null, call the static download member functions. + + * WebProcess/Authentication/AuthenticationManager.h: + * WebProcess/Downloads/Download.cpp: + (WebKit::Download::didReceiveAuthenticationChallenge): + Call the authentication manager. + + * WebProcess/Downloads/Download.h: + * WebProcess/Downloads/mac/DownloadMac.mm: + (WebKit::Download::receivedCredential): + (WebKit::Download::receivedRequestToContinueWithoutCredential): + (WebKit::Download::receivedCancellation): + Call the right sender methods. + + (-[WKDownloadAsDelegate download:didReceiveAuthenticationChallenge:]): + (-[WKDownloadAsDelegate downloadShouldUseCredentialStorage:]): + Call the right Download member functions. + + * WebProcess/Downloads/qt/DownloadQt.cpp: + (WebKit::Download::receivedCredential): + (WebKit::Download::receivedRequestToContinueWithoutCredential): + (WebKit::Download::receivedCancellation): + * WebProcess/Downloads/soup/DownloadSoup.cpp: + (WebKit::Download::receivedCredential): + (WebKit::Download::receivedRequestToContinueWithoutCredential): + (WebKit::Download::receivedCancellation): + Add stubs. + +2011-03-29 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + AuthenticationChallengeProxy objects should be associated with processes, not pages + https://bugs.webkit.org/show_bug.cgi?id=57401 + + * UIProcess/Authentication/AuthenticationChallengeProxy.cpp: + (WebKit::AuthenticationChallengeProxy::AuthenticationChallengeProxy): + (WebKit::AuthenticationChallengeProxy::~AuthenticationChallengeProxy): + (WebKit::AuthenticationChallengeProxy::useCredential): + (WebKit::AuthenticationChallengeProxy::cancel): + * UIProcess/Authentication/AuthenticationChallengeProxy.h: + (WebKit::AuthenticationChallengeProxy::create): + * UIProcess/WebPageProxy.cpp: + (WebKit::WebPageProxy::didReceiveAuthenticationChallenge): + +2011-03-29 Sam Weinig <sam@webkit.org> + + Reviewed by Anders Carlsson. + + Use LocalizedStrings.h as a bottleneck for localized strings instead of + using UI_STRING. + + * UIProcess/API/mac/WKView.mm: + (-[WKView validateUserInterfaceItem:]): + Call existing localization functions instead of using UI_STRING. + + (-[WKView _getTextInputState:selectionEnd:underlines:]): + Remove unnecessary WebCore:: prefix. + +2011-03-29 Chang Shu <cshu@webkit.org> + + Reviewed by Kenneth Rohde Christiansen. + + WebKitTestRunner needs layoutTestController.setAllowUniversalAccessFromFileURLs + https://bugs.webkit.org/show_bug.cgi?id=42692 + + * Shared/WebPreferencesStore.cpp: + (WebKit::WebPreferencesStore::decode): + (WebKit::WebPreferencesStore::overrideAllowUniversalAccessFromFileURLsForTestRunner): + * Shared/WebPreferencesStore.h: + * WebProcess/InjectedBundle/API/c/WKBundle.cpp: + (WKBundleOverrideAllowUniversalAccessFromFileURLsForTestRunner): + * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: + * WebProcess/InjectedBundle/InjectedBundle.cpp: + (WebKit::InjectedBundle::overrideAllowUniversalAccessFromFileURLsForTestRunner): + * WebProcess/InjectedBundle/InjectedBundle.h: + +2011-03-29 Timothy Hatcher <timothy@apple.com> + + Update the order of the context menu to better match AppKit on Mac. + + <rdar://problem/9054893> + + Reviewed by John Sullivan. + + * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: + (WebKit::WebPlatformStrategies::contextMenuItemTagLookUpInDictionary): Added argument for selected string. + * WebProcess/WebCoreSupport/WebPlatformStrategies.h: + +2011-03-29 Jeff Miller <jeffm@apple.com> + + Fix formatting of WebKit2.vcproj after r82283. + + * win/WebKit2.vcproj: + +2011-03-29 Martin Robinson <mrobinson@igalia.com> + + [GTK] Build failed with ‘GDK_KEY_KP_Space’ was not declared in this scope + https://bugs.webkit.org/show_bug.cgi?id=55314 + + Build fix for older versions of GTK+. Use the deprecated names for GDK key + defines and include GtkVersioning.h to allow building on newer versions + of GTK+. + + * Shared/gtk/WebEventFactory.cpp: + (WebKit::isGdkKeyCodeFromKeyPad): Update key defines. + +2011-03-29 Steve Falkenburg <sfalken@apple.com> + + Reviewed by Darin Adler. + + Use per-configuration vsprops in WebKit to avoid WebKitVSPropsRedirectionDir removal by MSVC IDE + https://bugs.webkit.org/show_bug.cgi?id=57383 + + Visual Studio's IDE was removing instances of $(WebKitVSPropsRedirectionDir) from + InheritedPropertySheet rules in our vcproj files when the vcproj was edited from within + the IDE. To avoid this, add a separate vsprops file for each project configuration that + contains the required inherited property sheets. + + * win/WebKit2.vcproj: + * win/WebKit2Debug.vsprops: Added. + * win/WebKit2DebugAll.vsprops: Added. + * win/WebKit2DebugCairoCFLite.vsprops: Added. + * win/WebKit2Release.vsprops: Added. + * win/WebKit2ReleaseCairoCFLite.vsprops: Added. + * win/WebKit2ReleaseLTCG.vsprops: Added. + * win/WebKit2WebProcess.vcproj: + * win/WebKit2WebProcessDebug.vsprops: Added. + * win/WebKit2WebProcessDebugAll.vsprops: Added. + * win/WebKit2WebProcessDebugCairoCFLite.vsprops: Added. + * win/WebKit2WebProcessRelease.vsprops: Added. + * win/WebKit2WebProcessReleaseCairoCFLite.vsprops: Added. + * win/WebKit2WebProcessReleaseLTCG.vsprops: Added. + +2011-03-29 Jessie Berlin <jberlin@apple.com> + + Reviewed by Anders Carlsson. + + WebKit2: The WebProcess should be relaunched if necessary when WebKit2 is asked for + information about Cookies, Databases, Local Storage, etc. + https://bugs.webkit.org/show_bug.cgi?id=57374 + + Instead of bailing when the WebProcess is not valid, call relaunchProcessIfNecessary(). + + * UIProcess/Plugins/WebPluginSiteDataManager.cpp: + (WebKit::WebPluginSiteDataManager::getSitesWithData): + (WebKit::WebPluginSiteDataManager::clearSiteData): + * UIProcess/WebApplicationCacheManagerProxy.cpp: + (WebKit::WebApplicationCacheManagerProxy::getApplicationCacheOrigins): + (WebKit::WebApplicationCacheManagerProxy::deleteEntriesForOrigin): + (WebKit::WebApplicationCacheManagerProxy::deleteAllEntries): + * UIProcess/WebCookieManagerProxy.cpp: + (WebKit::WebCookieManagerProxy::getHostnamesWithCookies): + (WebKit::WebCookieManagerProxy::deleteCookiesForHostname): + (WebKit::WebCookieManagerProxy::deleteAllCookies): + (WebKit::WebCookieManagerProxy::startObservingCookieChanges): + (WebKit::WebCookieManagerProxy::setHTTPCookieAcceptPolicy): + (WebKit::WebCookieManagerProxy::getHTTPCookieAcceptPolicy): + * UIProcess/WebDatabaseManagerProxy.cpp: + (WebKit::WebDatabaseManagerProxy::getDatabasesByOrigin): + (WebKit::WebDatabaseManagerProxy::getDatabaseOrigins): + (WebKit::WebDatabaseManagerProxy::deleteDatabaseWithNameForOrigin): + (WebKit::WebDatabaseManagerProxy::deleteDatabasesForOrigin): + (WebKit::WebDatabaseManagerProxy::deleteAllDatabases): + (WebKit::WebDatabaseManagerProxy::setQuotaForOrigin): + * UIProcess/WebKeyValueStorageManagerProxy.cpp: + (WebKit::WebKeyValueStorageManagerProxy::getKeyValueStorageOrigins): + (WebKit::WebKeyValueStorageManagerProxy::deleteEntriesForOrigin): + (WebKit::WebKeyValueStorageManagerProxy::deleteAllEntries): + * UIProcess/WebMediaCacheManagerProxy.cpp: + (WebKit::WebMediaCacheManagerProxy::getHostnamesWithMediaCache): + (WebKit::WebMediaCacheManagerProxy::clearCacheForHostname): + (WebKit::WebMediaCacheManagerProxy::clearCacheForAllHostnames): + * UIProcess/WebResourceCacheManagerProxy.cpp: + (WebKit::WebResourceCacheManagerProxy::getCacheOrigins): + (WebKit::WebResourceCacheManagerProxy::clearCacheForOrigin): + (WebKit::WebResourceCacheManagerProxy::clearCacheForAllOrigins): + +2011-03-29 Jeff Miller <jeffm@apple.com> + + Reviewed by Darin Adler. + + WebKit2: Support setting the client certificate on Windows + https://bugs.webkit.org/show_bug.cgi?id=57368 + + Allow setting the client certificate for a host via the injected bundle. + This requires the ability for Webkit2 Windows clients to create a WKCertificateInfo from a PCCERT_CONTEXT so they can send it to the web process. + + * Shared/API/c/win/WKCertificateInfoWin.cpp: + (WKCertificateInfoCreateWithCertificate): Added. + * Shared/API/c/win/WKCertificateInfoWin.h: Added WKCertificateInfoCreateWithCertificate(). + * WebProcess/InjectedBundle/API/c/WKBundle.cpp: + (WKBundleSetClientCertificate): Added. + * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: Added WKBundleSetClientCertificate(). + * WebProcess/InjectedBundle/InjectedBundle.h: Added setClientCertificate(). + * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp: + (WebKit::InjectedBundle::setClientCertificate): Added, should never be called. + * WebProcess/InjectedBundle/mac/InjectedBundleMac.cpp: + (WebKit::InjectedBundle::setClientCertificate): Added, should never be called. + * WebProcess/InjectedBundle/qt/InjectedBundleQt.cpp: + (WebKit::InjectedBundle::setClientCertificate): Added, should never be called. + * WebProcess/InjectedBundle/win/InjectedBundleWin.cpp: + (WebKit::InjectedBundle::setClientCertificate): Added. + +2011-03-29 Timothy Hatcher <timothy@apple.com> + + Make WebKit2 work with update-webkit-localizable-strings. + + https://webkit.org/b/57354 + + Reviewed by Sam Weinig. + + * PluginProcess/mac/PluginProcessMac.mm: Remove UI_STRING macro. Use WebLocalizableStrings.h. + * Shared/WebLocalizableStrings.h: Added. + * UIProcess/API/mac/WKView.mm: Remove UI_STRING macro. Use WebLocalizableStrings.h. + * UIProcess/mac/WebInspectorProxyMac.mm: + (WebKit::WebInspectorProxy::platformInspectedURLChanged): Use UI_STRING. Remove FIXME. + * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: Remove UI_STRING macros. + Use WebLocalizableStrings.h. + * WebProcess/WebCoreSupport/mac/WebErrorsMac.mm: + (registerErrors): Remove UI_STRING macro. Use WebLocalizableStrings.h. + * WebProcess/mac/WebProcessMac.mm: + (WebKit::WebProcess::platformInitializeWebProcess): Use UI_STRING. Remove FIXME. + + * GNUmakefile.am: Added Shared/WebLocalizableStrings.h. + * WebKit2.pro: Ditto. + * WebKit2.xcodeproj/project.pbxproj: Ditto. + * win/WebKit2.vcproj: Ditto. + +2011-03-29 Jeff Miller <jeffm@apple.com> + + Reviewed by Darin Adler. + + CoreIPC::decodeResourceError() leaks a CFDataRef + https://bugs.webkit.org/show_bug.cgi?id=57366 + + * Shared/win/WebCoreArgumentCodersWin.cpp: + (CoreIPC::decodeResourceError): Don't leak the result of WebCore::copyCertificateToData(), since the ResourceError will retain it. + +2011-03-29 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Allow the AppleConnect plug-in to use the QuickDraw drawing model + https://bugs.webkit.org/show_bug.cgi?id=57365 + <rdar://problem/8712320> + + * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm: + (WebKit::NetscapePluginModule::determineQuirks): + * Shared/Plugins/PluginQuirks.h: + * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: + (WebKit::NetscapePlugin::platformPostInitialize): + +2011-03-29 Darin Adler <darin@apple.com> + + Reviewed by Adam Roben. + + WebKit2 bundle page needs to offer generated file hooks + https://bugs.webkit.org/show_bug.cgi?id=57279 + + * WebProcess/InjectedBundle/API/c/WKBundlePage.h: Added shouldGenerateFileForUpload and + generateFileForUpload callback pointers. + + * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp: + (WebKit::InjectedBundlePageUIClient::shouldGenerateFileForUpload): Added. + (WebKit::InjectedBundlePageUIClient::generateFileForUpload): Added. + * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h: Added functions above. + + * WebProcess/WebCoreSupport/WebChromeClient.cpp: + (WebKit::WebChromeClient::shouldReplaceWithGeneratedFileForUpload): Implemented by + calling the functions above. + (WebKit::WebChromeClient::generateReplacementFile): Ditto. + +2011-03-29 Anders Carlsson <andersca@apple.com> + + Reviewed by Darin Adler. + + Assertion failure in plug-in process with clang-built 32/64-bit WebKit2 + https://bugs.webkit.org/show_bug.cgi?id=57359 + + Don't use __alignof when encoding and decoding scalar types. + + Darwin 32-bit, double and unsigned long long are 4-byte aligned but on 64-bit they're + 8-byte aligned which causes problems when doing IPC between 32-bit and 64-bit processes. + GCC is buggy and returns 8, but clang is correct and returns 4. Use sizeof instead which we know + is equal to or greater than the alignment. + + * Platform/CoreIPC/ArgumentDecoder.cpp: + (CoreIPC::ArgumentDecoder::decodeBool): + (CoreIPC::ArgumentDecoder::decodeUInt32): + (CoreIPC::ArgumentDecoder::decodeUInt64): + (CoreIPC::ArgumentDecoder::decodeInt32): + (CoreIPC::ArgumentDecoder::decodeInt64): + (CoreIPC::ArgumentDecoder::decodeFloat): + (CoreIPC::ArgumentDecoder::decodeDouble): + * Platform/CoreIPC/ArgumentEncoder.cpp: + (CoreIPC::ArgumentEncoder::encodeBool): + (CoreIPC::ArgumentEncoder::encodeUInt32): + (CoreIPC::ArgumentEncoder::encodeUInt64): + (CoreIPC::ArgumentEncoder::encodeInt32): + (CoreIPC::ArgumentEncoder::encodeInt64): + (CoreIPC::ArgumentEncoder::encodeFloat): + (CoreIPC::ArgumentEncoder::encodeDouble): + +2011-03-29 Brent Fulgham <bfulgham@webkit.org> + + Unreviewed build fix after r81928. + + * win/WebKit2.vcproj: Don't build CG-specific icon routines + for WinCairo port. + +2011-03-29 Sam Weinig <sam@webkit.org> + + Reviewed by Anders Carlsson. + + Reproducible crash running under libgmalloc, in -[WKView(Internal) removeTrackingRect:] --> objc_assign_ivar_non_gc + <rdar://problem/9193352> + https://bugs.webkit.org/show_bug.cgi?id=57358 + + -[WKView removeTrackingRect] can be called from below -[WKView dealloc] after we have + destroyed _data. So, nil out _data after releasing it and nil check it appropriately. + + * UIProcess/API/mac/WKView.mm: + (-[WKView dealloc]): + Nil out _data after releasing it. + + (-[WKView removeTrackingRect:]): + Add early return for nil _data. + +2011-03-29 Jeff Miller <jeffm@apple.com> + + Reviewed by Jon Honeycutt. + + Add WebCore::copyCertificateToData() on Windows + https://bugs.webkit.org/show_bug.cgi?id=57296 + + Remove duplicate code that implemented this functionality in WebCoreArgumentCodersWin.cpp and use WebCore::copyCertificateToData() instead. + + * Shared/win/WebCoreArgumentCodersWin.cpp: + (CoreIPC::decodeResourceError): Use WebCore::copyCertificateToData(). + +2011-03-29 Balazs Kelemen <kbalazs@webkit.org> + + Unreviewed build fix (64 bit gcc). + + GCC does not accept uint64_t formatted as %lli. + + * UIProcess/WebIconDatabase.cpp: + (WebKit::WebIconDatabase::getLoadDecisionForIconURL): Add explicit cast to long long. + +2011-03-28 Maciej Stachowiak <mjs@apple.com> + + Reviewed by Dan Bernstein. + + WKPageGetSourceForFrame and WKPageGetContentsAsString should throw an error in case of a race with page loading + https://bugs.webkit.org/show_bug.cgi?id=57305 + <rdar://problem/8738060>, <rdar://problem/8780168> + + * UIProcess/WebPageProxy.cpp: + (WebKit::WebPageProxy::close): Clear m_loadDependentStringCallbackIDs + (WebKit::WebPageProxy::getSourceForFrame): track the callback as load dependent + (WebKit::WebPageProxy::getContentsAsString): ditto + (WebKit::WebPageProxy::clearLoadDependentCallbacks): Invalidate all load dependent callbacks + (WebKit::WebPageProxy::didCommitLoadForFrame): Call clearLoadDependentCallbacks + (WebKit::WebPageProxy::didFailLoadForFrame): ditto + (WebKit::WebPageProxy::stringCallback): Remove callback from load dependent set if appropriate + (WebKit::WebPageProxy::processDidCrash): Clear m_loadDependentStringCallbackIDs + * UIProcess/WebPageProxy.h: Add m_loadDependentStringCallbackIDs hash set. + +2011-03-28 Patrick Gansterer <paroga@webkit.org> + + Reviewed by Darin Adler. + + Use String instead of CString as return value of openTemporaryFile + https://bugs.webkit.org/show_bug.cgi?id=55332 + + * Shared/WebMemorySampler.cpp: + (WebKit::WebMemorySampler::initializeTempLogFile): + * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp: + (WebKit::NetscapePluginStream::stop): + * WebProcess/Plugins/Netscape/NetscapePluginStream.h: + +2011-03-28 Brian Weinstein <bweinstein@apple.com> + + Reviewed by Jon Honeycutt. + + WebKit2: Downloads started with DownloadCFNet::start never start + https://bugs.webkit.org/show_bug.cgi?id=57268 + + * WebProcess/Downloads/cfnet/DownloadCFNet.cpp: + (WebKit::Download::start): Call CFURLDownloadStart on the download we create. + +2011-03-28 Anders Carlsson <andersca@apple.com> + + Fix Windows build. + + * Shared/ShareableBitmap.h: + +2011-03-28 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Beep when pressing a menu key equivalent when a plug-in has focus + https://bugs.webkit.org/show_bug.cgi?id=57264 + <rdar://problem/8935597> + + We don't want the WKTextInputWindowController inputContext to be involved in interpretKeyEvents. + + * UIProcess/API/mac/WKView.mm: + (-[WKView inputContext]): + +2011-03-28 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + CGImageRefs must hold a strong reference to underlying data + https://bugs.webkit.org/show_bug.cgi?id=57263 + <rdar://problem/9146179> + + Make paintBitmapContext use CGBitmapContextCreateImage, which creates a copy-on-write copy + of the bitmap data. Also, add ShareableBitmap::makeCGImageCopy which does the same thing, and + ShareableBitmap::makeCGImage in the cases where we know that the ShareableBitmap data will never change. + + * Platform/cg/CGUtilities.cpp: + (WebKit::paintImage): + Factor image painting code out into a separate function. + + (WebKit::paintBitmapContext): + Call paintImage. + + * Shared/API/c/cg/WKImageCG.cpp: + (WKImagemakeCGImage): + Use ShareableBitmap::makeCGImageCopy. + + * Shared/ShareableBitmap.h: + * Shared/cg/ShareableBitmapCG.cpp: + (WebKit::ShareableBitmap::createGraphicsContext): + (WebKit::ShareableBitmap::paint): + (WebKit::ShareableBitmap::makeCGImageCopy): + (WebKit::ShareableBitmap::makeCGImage): + (WebKit::ShareableBitmap::releaseBitmapContextData): + (WebKit::ShareableBitmap::releaseDataProviderData): + Add makeCGImage and makeCGImageCopy. + + * Shared/cg/WebCoreArgumentCodersCG.cpp: + (CoreIPC::createImage): + Use ShareableBitmap::makeCGImage. + + * UIProcess/API/mac/PageClientImpl.mm: + (WebKit::PageClientImpl::setDragImage): + Use ShareableBitmap::makeCGImage and plug a CGImageRef leak. + +2011-03-28 Alexey Proskuryakov <ap@apple.com> + + Build fix. + + * UIProcess/API/mac/WKView.mm: (-[WKView keyDown:]): It's not "event" in this function, it's + "theEvent". + +2011-03-28 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=57260 + Clean up text input code a little + + * UIProcess/API/mac/WKView.mm: + (-[WKView doCommandBySelector:]): This NSTextInput protocol method lacked a LOG() call. + (-[WKView keyDown:]): Added (possibly useless) event protection to match performKeyEquivalent: + and also WebKit1. + + * WebProcess/WebPage/mac/WebPageMac.mm: Removed an obsolete comment. + +2011-03-28 Jeff Miller <jeffm@apple.com> + + Reviewed by Adam Roben. + + ResourceError::certificate() should return a PCCERT_CONTEXT + https://bugs.webkit.org/show_bug.cgi?id=57262 + + * Shared/win/PlatformCertificateInfo.cpp: + (WebKit::PlatformCertificateInfo::PlatformCertificateInfo): Don't assert if no PCCERT_CONTEXT is specified. + * Shared/win/WebCoreArgumentCodersWin.cpp: + (CoreIPC::encodeResourceError): Removed unneeded code now that ResourceError::certificate() returns a PCCERT_CONTEXT. + +2011-03-28 Jeff Miller <jeffm@apple.com> + + Rubber-stamped by Adam Roben. + + Remove unused CFErrorRef. + + * Shared/win/WebCoreArgumentCodersWin.cpp: + (CoreIPC::encodeResourceError): Remove unused CFErrorRef. + +2011-03-28 Jeff Miller <jeffm@apple.com> + + Reviewed by Adam Roben. + + Include certificate when sending a WebCore::ResourceError to UI process on Windows + https://bugs.webkit.org/show_bug.cgi?id=57195 + + Add support for sending the certificate with the WebCore::ResourceError. + + * Shared/win/WebCoreArgumentCodersWin.cpp: + (CoreIPC::encodeResourceError): Encode certificate data. + (CoreIPC::deallocCertContext): Added. + (CoreIPC::createCertContextDeallocator): Added. + (CoreIPC::copyCert): Added. + (CoreIPC::decodeResourceError): Decode certificate data. + +2011-03-27 Andy Estes <aestes@apple.com> + + Reviewed by Maciej Stachowiak. + + Correctly get a plug-in's MIME type when it uses WebPluginMIMETypesFilename + https://bugs.webkit.org/show_bug.cgi?id=57205 + + If the plug-in's Info.plist uses WebPluginMIMETypesFilename to specify + plug-in MIME types, WebKit has to check for a property list file in + ~/Library/Preferences for the MIME type dictionary. + + * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm: + (WebKit::getMIMETypesFromPluginBundle): If the bundle's Info dictionary + has the key WebPluginMIMETypesFilename, open the property list + specified by that key's value and return the MIME type dictionary from + there. Otherwise, return the MIME type dictionary specified by the key + WebPluginMIMETypes. + (WebKit::getPluginInfoFromPropertyLists): Call + getMIMETypesFromPluginBundle(). + +2011-03-27 Jer Noble <jer.noble@apple.com> + + Reviewed by Maciej Stachowiak. + + Full Screen: disable keyboard access by default + https://bugs.webkit.org/show_bug.cgi?id=56684 + + Take into account whether keyboard access was requested when deciding whether full + screen mode is supported. + + * UIProcess/WebFullScreenManagerProxy.cpp: + (WebKit::WebFullScreenManagerProxy::supportsFullScreen): + * UIProcess/WebFullScreenManagerProxy.h: + * UIProcess/WebFullScreenManagerProxy.messages.in: + * WebProcess/FullScreen/WebFullScreenManager.cpp: + (WebKit::WebFullScreenManager::supportsFullScreen): + * WebProcess/FullScreen/WebFullScreenManager.h: + * WebProcess/WebCoreSupport/WebChromeClient.cpp: + (WebKit::WebChromeClient::supportsFullScreenForElement): + * WebProcess/WebCoreSupport/WebChromeClient.h: + +2011-03-27 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Dock doesn't come back after leaving fullscreen on Hulu + https://bugs.webkit.org/show_bug.cgi?id=57189 + <rdar://problem/9192413> + + Port some code over from the old WebKit1 plug-in host. + + * PluginProcess/mac/PluginProcessShim.mm: + (WebKit::shimShowMenuBar): + (WebKit::shimHideMenuBar): + (WebKit::shimIsMenuBarVisible): + +2011-03-27 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Keep a strong reference to the connection to avoid crashes. + + * Platform/CoreIPC/Connection.cpp: + +2011-03-26 Jeff Miller <jeffm@apple.com> + + Reviewed by Sam Weinig. + + WKErrorCopyCFError() doesn't actually return a copy of the CFErrorRef + https://bugs.webkit.org/show_bug.cgi?id=57172 + + * Shared/API/c/cf/WKErrorCF.cpp: + (WKErrorCopyCFError): Use RetainPtr<> and leakRef() to return a real copy. + +2011-03-26 Maciej Stachowiak <mjs@apple.com> + + Revert inadvertently commited changes. + + * WebProcess/com.apple.WebProcess.sb: + +2011-03-26 Jer Noble <jer.noble@apple.com> + + Reviewed by Eric Carlson. + + Enable the Full Screen API by default in WebKit/mac and WebKit2 + https://bugs.webkit.org/show_bug.cgi?id=56956 + + * Shared/WebPreferencesStore.h: Default the fullScreenEnabled preference to true. + +2011-03-26 Jeff Miller <jeffm@apple.com> + + Reviewed by Steve Falkenburg. + + Add PlatformCertificateInfo::PlatformCertificateInfo(PCCERT_CONTEXT) constructor on Windows + https://bugs.webkit.org/show_bug.cgi?id=57152 + + We're going to need to create a PlatformCertificateInfo with a single certificate on Windows to support client certificates. + Also, stop relying on the fact that the Win32 API CertDuplicateCertificateContext() currently returns the same PCCERT_CONTEXT that you pass to it, since that may change in the future. + + * Shared/win/PlatformCertificateInfo.cpp: + (WebKit::PlatformCertificateInfo::PlatformCertificateInfo): Added PlatformCertificateInfo(PCCERT_CONTEXT) construtor. Use return value from CertDuplicateCertificateContext(). + (WebKit::PlatformCertificateInfo::operator=): Use return value from CertDuplicateCertificateContext(). + * Shared/win/PlatformCertificateInfo.h: Added PlatformCertificateInfo(PCCERT_CONTEXT) construtor. + +2011-03-26 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Graphic corruption appeared with Silverlight contents while resizing window + https://bugs.webkit.org/show_bug.cgi?id=57167 + <rdar://problem/9094052> + + Pass DispatchMessageEvenWhenWaitingForSyncReply when sending GeometryDidChange messages since that will guarantee + that those messages will be handled before PaintEntirePlugin messages which prevents the PaintEntirePlugin handler from + painting into the wrong backing store. + + * WebProcess/Plugins/PluginProxy.cpp: + (WebKit::PluginProxy::geometryDidChange): + +2011-03-26 Sam Weinig <sam@webkit.org> + + Reviewed by Anders Carlsson. + + Web process considered unresponsive (SPOD shown) when displaying a JavaScript alert() as a result of a click + <rdar://problem/9067557> + https://bugs.webkit.org/show_bug.cgi?id=57166 + + * UIProcess/WebPageProxy.cpp: + (WebKit::WebPageProxy::runJavaScriptAlert): + (WebKit::WebPageProxy::runJavaScriptConfirm): + (WebKit::WebPageProxy::runJavaScriptPrompt): + Invalidate the responsiveness timer before calling out to the client. + +2011-03-26 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + ASSERTION FAILED: m_operationInProgress == NoOperation loading nytimes.com + https://bugs.webkit.org/show_bug.cgi?id=57165 + <rdar://problem/9024311> + + The assertion fired because during GC, the web process sends a synchronous NPObjectMessageReceiver::Deallocate + message to the plug-in process. Since this is a synchronous message, the web process needs to process incoming synchronous + messages. While waiting, we get an incoming PluginProxy::Evaluate message from the plug-in. This causes JavaScript to run + during GC which is very bad. + + The fix for this is to add a flag on the connection that will cause synchronous messages sent by the connection (in this case the + plug-in process) to not be processed while the other side (the web process) is waiting for a synchronous reply _unless_ the connection + is actually processing a synchronous message. (The last part is to avoid deadlocks). + + Since the call to NPN_Evaluate by the plug-in (that ends up sending the PluginProxy::Evaluate message) comes from a run loop timer firing, + it's OK to wait for it to be processed by the web process when it returns to the run loop. + + * Platform/CoreIPC/Connection.cpp: + (CoreIPC::Connection::Connection): + Initialize m_onlySendMessagesAsDispatchWhenWaitingForSyncReplyWhenProcessingSuchAMessage and m_inDispatchMessageMarkedDispatchWhenWaitingForSyncReplyCount. + + (CoreIPC::Connection::setOnlySendMessagesAsDispatchWhenWaitingForSyncReplyWhenProcessingSuchAMessage): + Set m_onlySendMessagesAsDispatchWhenWaitingForSyncReplyWhenProcessingSuchAMessage. + + (CoreIPC::Connection::sendMessage): + Don't add the MessageID::DispatchMessageWhenWaitingForSyncReply flag when the right flags has been set on the connection, and it's not processing a synchronous message. + + (CoreIPC::Connection::dispatchMessage): + Increment and decrement m_inDispatchMessageMarkedDispatchWhenWaitingForSyncReplyCount accordingly. + + * PluginProcess/WebProcessConnection.cpp: + (WebKit::WebProcessConnection::WebProcessConnection): + Call setOnlySendMessagesAsDispatchWhenWaitingForSyncReplyWhenProcessingSuchAMessage on the connection. + +2011-03-26 Sam Weinig <sam@webkit.org> + + Rollout r82042 (If a user doesn't have a Database/LocalStorage directory, it can't be created (sandbox violations)) + + -[NSString stringByResolvingSymlinksInPath] does not do what we needed for paths within /private. + This caused all SSL sites to stop working. + + * WebProcess/mac/WebProcessMac.mm: + (WebKit::appendSandboxParameterPath): + (WebKit::initializeSandbox): + +2011-03-26 Sam Weinig <sam@webkit.org> + + Reviewed by Anders Carlsson. + + If a user doesn't have a Database/LocalStorage directory, it can't be created (sandbox violations) + <rdar://problem/9127411> + https://bugs.webkit.org/show_bug.cgi?id=57164 + + * WebProcess/mac/WebProcessMac.mm: + (WebKit::appendSandboxParameterPath): + (WebKit::initializeSandbox): + Use -[NSString stringByResolvingSymlinksInPath] instead of realpath to ensure we can resolve + symlinks even if the file/directory doesn't exist yet. + +2011-03-26 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Factor processing of incoming sync replies out into processIncomingSyncReply + https://bugs.webkit.org/show_bug.cgi?id=57161 + + * Platform/CoreIPC/Connection.cpp: + (CoreIPC::Connection::sendSyncMessage): + Pass DispatchMessageEvenWhenWaitingForSyncReply to sendMessage. + + (CoreIPC::Connection::processIncomingSyncReply): + Move code from processIncomingMessage to here. + + (CoreIPC::Connection::processIncomingMessage): + Call processIncomingSyncReply. + +2011-03-26 Sam Weinig <sam@webkit.org> + + Reviewed by Anders Carlsson. + + WebKit2: Assert in CoreIPC::typeFromCFTypeRef() when loading a site with an invalid certificate + <rdar://problem/9188041> + https://bugs.webkit.org/show_bug.cgi?id=57159 + + * Shared/cf/ArgumentCodersCF.cpp: + (CoreIPC::typeFromCFTypeRef): + (CoreIPC::encode): + (CoreIPC::decode): + * Shared/cf/ArgumentCodersCF.h: + Add encoding/decoding for SecCertificateRef type. + + * Shared/mac/PlatformCertificateInfo.mm: + (WebKit::PlatformCertificateInfo::encode): + (WebKit::PlatformCertificateInfo::decode): + Use ArgumentCodersCF now that it knows how to encode/decode SecCertificateRefs. + +2011-03-26 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Handle synchronous replies coming in out of order + https://bugs.webkit.org/show_bug.cgi?id=57158 + + When processing an incoming reply, don't assume that it belongs to the last sent synchronous request. + Instead, iterate over the m_pendingSyncReplies vector backwards looking for the corresponding request. + + * Platform/CoreIPC/Connection.cpp: + (CoreIPC::Connection::processIncomingMessage): + +2011-03-26 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Fix a possible deadlock when two synchronous messages are sent at the same time + https://bugs.webkit.org/show_bug.cgi?id=57155 + + Simplify code and fix a possible (although highly improbable) dead lock. + + * Platform/CoreIPC/Connection.cpp: + Make SyncMessageState atomically ref counted since it can be ref()'ed from the connection queue. + Get rid of m_waitForSyncReplyCount and add m_didScheduleDispatchMessagesWork. + + (CoreIPC::Connection::SyncMessageState::SyncMessageState): + Initialize m_didScheduleDispatchMessagesWork to false. + + (CoreIPC::Connection::SyncMessageState::processIncomingMessage): + if m_didScheduleDispatchMessagesWork is false, schedule a call to dispatchMessageAndResetDidScheduleDispatchMessagesWork + on the client run loop. + + (CoreIPC::Connection::SyncMessageState::dispatchMessageAndResetDidScheduleDispatchMessagesWork): + Dispatch messages and set m_didScheduleDispatchMessagesWork back to false. + + (CoreIPC::Connection::sendSyncMessage): + Remove calls to beginWaitForSyncReply and endWaitForSyncReply. + +2011-03-25 Sam Weinig <sam@webkit.org> + + Reviewed by Adele Peterson. + + WKPageLoadAlternateHTMLString doesn't re-spawn a dead WebProcess, but should + <rdar://problem/9191493> + https://bugs.webkit.org/show_bug.cgi?id=57134 + + Make all load functions respawn a dead WebProcess for consistency. + + * UIProcess/WebPageProxy.cpp: + (WebKit::WebPageProxy::loadHTMLString): + Respawn a dead WebProcess. + + (WebKit::WebPageProxy::loadAlternateHTMLString): + Respawn a dead WebProcess. + + (WebKit::WebPageProxy::loadPlainTextString): + Respawn a dead WebProcess. + + (WebKit::WebPageProxy::didStartProvisionalLoadForFrame): + * UIProcess/WebPageProxy.h: + * UIProcess/WebPageProxy.messages.in: + * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: + (WebKit::WebFrameLoaderClient::dispatchDidStartProvisionalLoad): + * WebProcess/WebPage/WebPage.cpp: + (WebKit::WebPage::loadAlternateHTMLString): + Since we may no longer always have a main frame when calling WKPageLoadAlternateHTMLString, + set the unreachable URL, if there is one, on provisional load. + +2011-03-25 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + PluginView's call to invalidateContentsAndWindow() in invalidateRect() is wrong for plug-ins which paint into compositing layers + https://bugs.webkit.org/show_bug.cgi?id=57133 + <rdar://problem/9029442> + + * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: + (WebKit::NetscapePlugin::platformInvalidate): + Return true under the Core Animation drawing model, since that prevents the plug-in from calling PluginController::invalidate. + + * WebProcess/Plugins/PluginView.cpp: + (WebKit::PluginView::invalidateRect): + Don't call invalidateContentsAndWindow() if the plug-in has a Core Animation layer. + +2011-03-25 Brady Eidson <beidson@apple.com> + + Reviewed by Sam Weinig. + + <rdar://problem/8648311> and https://bugs.webkit.org/show_bug.cgi?id=56425 + WebKit2 IconDatabase and API + + This gets a basic, usable API in place. + Enhancements can come in other bugs as they're needed. + + * UIProcess/API/C/WKIconDatabase.cpp: + (WKIconDatabaseRetainIconForURL): + (WKIconDatabaseReleaseIconForURL): + (WKIconDatabaseEnableDatabaseCleanup): + * UIProcess/API/C/WKIconDatabase.h: + + The first actual accessor for an "icon for a URL" is for a CGImageRef: + * UIProcess/API/C/cg: Added. + * UIProcess/API/C/cg/WKIconDatabaseCG.cpp: Added. + (WKIconDatabaseGetCGImageForURL): + * UIProcess/API/C/cg/WKIconDatabaseCG.h: Added. + + Expose relevant methods to support the above API: + * UIProcess/WebIconDatabase.cpp: + (WebKit::WebIconDatabase::WebIconDatabase): New IconDatabases will have cleanup disabled from the start, + and require a single call to "enableDatabaseCleanup" to allow cleanup. + (WebKit::WebIconDatabase::setDatabasePath): + (WebKit::WebIconDatabase::enableDatabaseCleanup): + (WebKit::WebIconDatabase::imageForPageURL): + * UIProcess/WebIconDatabase.h: + + Project file stuff: + * WebKit2.xcodeproj/project.pbxproj: + * win/WebKit2.vcproj: + +2011-03-25 Jeff Miller <jeffm@apple.com> + + Reviewed by Darin Adler. + + Add CoreIPC::encodeResourceError() and CoreIPC::decodeResourceError() for all platforms + https://bugs.webkit.org/show_bug.cgi?id=57125 + + Currently, these are only implemented on the Mac, but we're going to need them for Windows as well, so we might as well make them always platform-specific. + In this patch, just replicate the existing common non-Mac implementation in WebCoreArgumentCoders.h to platform-specific files. + + * Shared/WebCoreArgumentCoders.h: Move non-Mac implementations of encodeResourceError() and decodeResourceError() to common files. + * Shared/gtk/WebCoreArgumentCodersGtk.cpp: + (CoreIPC::encodeResourceError): Added. + (CoreIPC::decodeResourceError): Added. + * Shared/qt/WebCoreArgumentCodersQt.cpp: + (CoreIPC::encodeResourceError): Added. + (CoreIPC::decodeResourceError): Added. + * Shared/win/WebCoreArgumentCodersWin.cpp: + (CoreIPC::encodeResourceError): Added. + (CoreIPC::decodeResourceError): Added. + +2011-03-25 Andy Estes <aestes@apple.com> + + Reviewed by Adele Peterson. + + REGRESSION (r70748): latest nightly builds kills AC_QuickTime.js + https://bugs.webkit.org/show_bug.cgi?id=49016 + + Update objectContentType() implementation to handle the + shouldPreferPlugInsForImages flag. + + * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: + (WebKit::WebFrameLoaderClient::objectContentType): + * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: + +2011-03-25 Brent Fulgham <bfulgham@webkit.org> + + Unreviewed build correction. + + Add stubs for WK2 cookie handling with cURL. + + * WebProcess/Cookies/curl: Added. + * WebProcess/Cookies/curl/WebCookieManagerCurl.cpp: Added. + (WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy): + (WebKit::WebCookieManager::platformGetHTTPCookieAcceptPolicy): + * win/WebKit2.vcproj: + +2011-03-25 Steve Falkenburg <sfalken@apple.com> + + Reviewed by Brian Weinstein. + + Microsoft Windows Presentation Foundation (WPF) plug-in complains about missing xpcom.dll + https://bugs.webkit.org/show_bug.cgi?id=57119 + <rdar://problem/9054148> + + This plug-in from Microsoft links against xpcom.dll, which is a Firefox-specific DLL + not available in WebKit. The plug-in is fairly widespread, since it was included in + a Windows Update push at one point. + + * UIProcess/Plugins/win/PluginInfoStoreWin.cpp: + (WebKit::PluginInfoStore::shouldUsePlugin): Blacklist npwpf.dll. + +2011-03-25 Jessie Berlin <jberlin@apple.com> + + Reviewed by Anders Carlsson. + + WebKit2: Need to be able to set and get the Cookie Storage Policy. + https://bugs.webkit.org/show_bug.cgi?id=50780 + + Part 2: Make it possible to set the initial policy on Windows. + + In WebKit1, we read the initial policy on Windows from WebPreferences at startup. + Since that is not possible in WebKit2, make it possible to specify the initial policy + as a creation parameter to the WebProcess. + + * Shared/WebProcessCreationParameters.cpp: + (WebKit::WebProcessCreationParameters::encode): + Encode initialHTTPCookieAcceptPolicy on Windows. + (WebKit::WebProcessCreationParameters::decode): + Decode initialHTTPCookieAcceptPolicy on Windows. + * Shared/WebProcessCreationParameters.h: + + * UIProcess/API/C/win/WKContextPrivateWin.h: + * UIProcess/API/C/win/WKContextWin.cpp: + (WKContextSetInitialHTTPCookieAcceptPolicy): + Call through to WebContext. + + * UIProcess/WebContext.cpp: + (WebKit::WebContext::WebContext): + Give the initial policy a default of "Always". + * UIProcess/WebContext.h: + (WebKit::WebContext::setInitialHTTPCookieAcceptPolicy): + * UIProcess/win/WebContextWin.cpp: + (WebKit::WebContext::platformInitializeWebProcess): + Set the initial policy on Windows. + + * WebProcess/Cookies/WebCookieManager.h: + Make setHTTPCookieAcceptPolicy public so that it can be called from WebProcessWin. + + * WebProcess/win/WebProcessWin.cpp: + (WebKit::WebProcess::platformInitializeWebProcess): + Tell the WebCookieManager about the initial policy. + +2011-03-25 Jessie Berlin <jberlin@apple.com> + + Reviewed by Sam Weinig. + + WebKit2: Need to be able to set and get the Cookie Storage Policy. + https://bugs.webkit.org/show_bug.cgi?id=50780 + + * Shared/HTTPCookieAcceptPolicy.h: Added. + + * UIProcess/API/C/WKAPICast.h: + (WebKit::toHTTPCookieAcceptPolicy): + (WebKit::toAPI): + + * UIProcess/API/C/WKCookieManager.cpp: + (WKCookieManagerSetHTTPCookieAcceptPolicy): + Call through to WebCookieManagerProxy. + (WKCookieManagerGetHTTPCookieAcceptPolicy): + Ditto. + * UIProcess/API/C/WKCookieManager.h: + + * UIProcess/WebCookieManagerProxy.cpp: + (WebKit::WebCookieManagerProxy::invalidate): + Invalidate the get http cookie accept policy callbacks. + (WebKit::WebCookieManagerProxy::setHTTPCookieAcceptPolicy): + Send a message to the Web Process with the new value. + (WebKit::WebCookieManagerProxy::getHTTPCookieAcceptPolicy): + Keep track of the callback and send a message to the Web Process. + (WebKit::WebCookieManagerProxy::didGetHTTPCookieAcceptPolicy): + Invoke the callback. + * UIProcess/mac/WebCookieManagerProxyMac.mm: Added. + (WebKit::WebCookieManagerProxy::persistHTTPCookieAcceptPolicy): + On Mac, also set the policy in the UI Process because the sandboxed Web Process cannot + persist the policy. + * UIProcess/WebCookieManagerProxy.h: + * UIProcess/WebCookieManagerProxy.messages.in: + + * WebKit2.pri: + * WebKit2.pro: + * WebKit2.xcodeproj/project.pbxproj: + * win/WebKit2.vcproj: + * win/WebKit2Common.vsprops: + + * WebProcess/Cookies/WebCookieManager.cpp: + (WebKit::WebCookieManager::setHTTPCookieAcceptPolicy): + Call platformSetHTTPCookieAcceptPolicy. + (WebKit::WebCookieManager::getHTTPCookieAcceptPolicy): + Send the result of platformGetHTTPCookieAcceptPolicy to the UI Process. + * WebProcess/Cookies/WebCookieManager.h: + * WebProcess/Cookies/WebCookieManager.messages.in: + + * WebProcess/Cookies/cf: Added. + * WebProcess/Cookies/cf/WebCookieManagerCFNet.cpp: Added. + (WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy): + Set the policy on both the default cookie storage and any Private Browsing cookie storage. + (WebKit::WebCookieManager::platformGetHTTPCookieAcceptPolicy): + * WebProcess/Cookies/mac: Added. + * WebProcess/Cookies/mac/WebCookieManagerMac.mm: Added. + (WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy): + Set the policy on the default cookie storage and add a FIXME to set it on any Private + Browsing cookie storage. + (WebKit::WebCookieManager::platformGetHTTPCookieAcceptPolicy): + + * WebProcess/Cookies/gtk: Added. + * WebProcess/Cookies/gtk/WebCookieManagerGtk.cpp: Added. + (WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy): + (WebKit::WebCookieManager::platformGetHTTPCookieAcceptPolicy): + * WebProcess/Cookies/qt: Added. + * WebProcess/Cookies/qt/WebCookieManagerQt.cpp: Added. + (WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy): + (WebKit::WebCookieManager::platformGetHTTPCookieAcceptPolicy): + +2011-03-25 Brian Weinstein <bweinstein@apple.com> + + Reviewed by Alexey Proskuryakov. + + REGRESSION(r79227): CFURLCache not initialized correctly in WebKit2 + https://bugs.webkit.org/show_bug.cgi?id=57109 + <rdar://problem/9184590> + + Check for a trailing Windows path separator, not a Unix path separator. + + * UIProcess/win/WebContextWin.cpp: + (WebKit::WebContext::platformInitializeWebProcess): + +2011-03-25 Benjamin Poulain <benjamin.poulain@nokia.com> + + Reviewed by Andreas Kling. + + [Qt] QtWebKit will not compile with QT_ASCII_CAST_WARNINGS enabled + https://bugs.webkit.org/show_bug.cgi?id=57087 + + Use explicit conversion for string to avoid depending on the default codec + installed by the user code. + + * Platform/qt/SharedMemoryQt.cpp: + (WebKit::SharedMemory::create): + * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp: + (WebKit::initializeGTK): + * UIProcess/API/qt/tests/qgraphicswkview/tst_qgraphicswkview.cpp: + (tst_QGraphicsWKView::loadEmptyPage): + (tst_QGraphicsWKView::loadEmptyUrl): + * UIProcess/API/qt/tests/qwkpage/tst_qwkpage.cpp: + (tst_QWKPage::loadEmptyUrl): + * UIProcess/Launcher/qt/ProcessLauncherQt.cpp: + (WebKit::ProcessLauncher::launchProcess): + * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: + (WebKit::getPluginDisplay): + * WebProcess/qt/WebProcessMainQt.cpp: + (WebKit::EnvHttpProxyFactory::initializeFromEnvironment): + (WebKit::WebProcessMainQt): + +2011-03-25 Brent Fulgham <bfulgham@webkit.org> + + Correct project file missing $(WebKitVSPropsRedirectionDir)s + after r81924. + + * win/WebKit2.vcproj: Restore lost $(WebKitVSPropsRedirectionDir) + +2011-03-25 Alejandro G. Castro <alex@igalia.com> + + Reviewed by Martin Robinson. + + [WK2] Consider .c files in the generate-forwarding-headers script + https://bugs.webkit.org/show_bug.cgi?id=56680 + + * Scripts/generate-forwarding-headers.pl: + +2011-03-24 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r81916 and r81917. + http://trac.webkit.org/changeset/81916 + http://trac.webkit.org/changeset/81917 + https://bugs.webkit.org/show_bug.cgi?id=57071 + + broke a test on platforms that do not have QuickTime installed + (Requested by estes on #webkit). + + * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: + (WebKit::WebFrameLoaderClient::objectContentType): + * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: + +2011-03-24 Brady Eidson <beidson@apple.com> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=57069 + Add WKIconDatabase api to the project files, and expose accessor on WKContext. + + Project file stuffs: + * GNUmakefile.am: + * WebKit2.xcodeproj/project.pbxproj: + * win/WebKit2.vcproj: + + * Shared/API/c/WKBase.h: + * UIProcess/API/C/WKAPICast.h: + + * UIProcess/API/C/WKContext.cpp: + (WKContextGetIconDatabase): + * UIProcess/API/C/WKContext.h: + + * UIProcess/API/C/WKIconDatabase.cpp: Added. + (WKIconDatabaseGetTypeID): + * UIProcess/API/C/WKIconDatabase.h: Added. + + * UIProcess/WebContext.h: + (WebKit::WebContext::iconDatabase): + +2011-03-24 Brent Fulgham <bfulgham@webkit.org> + + Build correction. + + Disable the CA Layer stuff when building with Cairo. + + * win/WebKit2.vcproj: + +2011-03-24 Brady Eidson <beidson@apple.com> + + Reviewed by Sam Weinig. + + https://bugs.webkit.org/show_bug.cgi?id=57058 + Hookup the UIProcess WebIconDatabase to a WebCore::IconDatabase as its implementation + + * UIProcess/WebIconDatabase.cpp: + (WebKit::WebIconDatabase::WebIconDatabase): + (WebKit::WebIconDatabase::setDatabasePath): Create a new WebCore::IconDatabase and open it to this path. + (WebKit::WebIconDatabase::retainIconForPageURL): Actually retain the url, using the impl. + (WebKit::WebIconDatabase::releaseIconForPageURL): Actually release the url, using the impl. + (WebKit::WebIconDatabase::setIconURLForPageURL): Actually set the url, using the impl. + (WebKit::WebIconDatabase::setIconDataForIconURL): Actually set the data, using the impl. + (WebKit::WebIconDatabase::getLoadDecisionForIconURL): Actually ask for a load decision to call back with. + (WebKit::WebIconDatabase::performImport): + (WebKit::WebIconDatabase::didImportIconURLForPageURL): + (WebKit::WebIconDatabase::didImportIconDataForPageURL): + (WebKit::WebIconDatabase::didChangeIconForPageURL): + (WebKit::WebIconDatabase::didRemoveAllIcons): + (WebKit::WebIconDatabase::didFinishURLImport): Notify all the pending callbacks what their load decisions + are now that they're available. + * UIProcess/WebIconDatabase.h: + + Add an IconDatabase logging channel: + * Platform/Logging.cpp: + (WebKit::initializeLogChannelsIfNecessary): + * Platform/Logging.h: + + * UIProcess/WebContext.cpp: + (WebKit::WebContext::setIconDatabasePath): Pass the new path on to the WebIconDatabase, possibly + opening it. + * UIProcess/WebContext.h: + +2011-03-24 Andy Estes <aestes@apple.com> + + Reviewed by Darin Adler. + + REGRESSION (r70748): latest nightly builds kills AC_QuickTime.js + https://bugs.webkit.org/show_bug.cgi?id=49016 + + Update objectContentType() implementation to handle the + shouldPreferPlugInsForImages flag. + + * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: + (WebKit::WebFrameLoaderClient::objectContentType): + * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: + +2011-03-24 Adam Roben <aroben@apple.com> + + Start compiling LayerTreeHostCA on Windows + + Fixes <http://webkit.org/b/57060> WebKit2.vcproj should compile LayerTreeHostCA + + Reviewed by Anders Carlsson. + + * WebProcess/WebPage/ca/win/LayerTreeHostCAWin.cpp: Added. + (WebKit::LayerTreeHostCA::platformInitialize): + (WebKit::LayerTreeHostCA::scheduleLayerFlush): + (WebKit::LayerTreeHostCA::platformInvalidate): + (WebKit::LayerTreeHostCA::platformSizeDidChange): + (WebKit::LayerTreeHostCA::platformForceRepaint): + (WebKit::LayerTreeHostCA::platformDidPerformScheduledLayerFlush): + Stubbed out. + + * win/WebKit2.vcproj: Added new files. Let VS reorder existing files. + + * win/WebKit2Apple.vsprops: Added WebProcess\WebPage\ca to the include path. + +2011-03-24 Jer Noble <jer.noble@apple.com> + + Unreviewed build fix. + + Remove reference to LayerTreeHostMac.h from WebFullScreenManagerMac.mm. + + * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm: + +2011-03-24 Adam Roben <aroben@apple.com> + + Split Mac-specific parts of LayerTreeHostCA into LayerTreeHostCAMac.mm + + Fixes <http://webkit.org/b/57046> LayerTreeHostMac's code should be shareable with Windows + + Reviewed by Anders Carlsson. + + * WebKit2.xcodeproj/project.pbxproj: + + * WebProcess/WebPage/ca/LayerTreeHostCA.cpp: Renamed from Source/WebKit2/WebProcess/WebPage/ca/LayerTreeHostCA.mm. + (WebKit::LayerTreeHostCA::LayerTreeHostCA): Moved some Mac-specific code to + LayerTreeHostCAMac.mm. + (WebKit::LayerTreeHostCA::~LayerTreeHostCA): Wrapped some Mac-specific code in + PLATFORM(MAC). + + (WebKit::LayerTreeHostCA::invalidate): + (WebKit::LayerTreeHostCA::sizeDidChange): + (WebKit::LayerTreeHostCA::forceRepaint): + Moved some Mac-specific code to LayerTreeHostCAMac.mm. + + (WebKit::LayerTreeHostCA::performScheduledLayerFlush): Renamed from + flushPendingLayerChangesRunLoopObserverCallback. Moved some code from here... + (WebKit::LayerTreeHostCA::didPerformScheduledLayerFlush): ...to here. Moved some + Mac-specific code to LayerTreeHostCAMac.mm. + + * WebProcess/WebPage/ca/LayerTreeHostCA.h: Added new functions, wrapped some Mac-specific + declarations in PLATFORM(MAC). + + * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.mm: Added. + (WebKit::LayerTreeHostCA::platformInitialize): + (WebKit::LayerTreeHostCA::scheduleLayerFlush): + (WebKit::LayerTreeHostCA::platformInvalidate): + (WebKit::LayerTreeHostCA::platformSizeDidChange): + (WebKit::LayerTreeHostCA::platformForceRepaint): + (WebKit::LayerTreeHostCA::flushPendingLayerChangesRunLoopObserverCallback): + (WebKit::LayerTreeHostCA::platformDidPerformScheduledLayerFlush): + Code was extracted from LayerTreeHostCA.cpp. + +2011-03-24 Adam Roben <aroben@apple.com> + + Rename LayerTreeHostMac to LayerTreeHostCA + + This is the first step toward sharing code with Windows. + + Fixes <http://webkit.org/b/57051>. + + Reviewed by Anders Carlsson. + + * WebKit2.xcodeproj/project.pbxproj: + * WebProcess/WebPage/LayerTreeHost.cpp: + (WebKit::LayerTreeHost::create): + Updated for rename. + + * WebProcess/WebPage/ca/LayerTreeHostCA.h: Renamed from Source/WebKit2/WebProcess/WebPage/mac/LayerTreeHostMac.h. + * WebProcess/WebPage/ca/LayerTreeHostCA.mm: Renamed from Source/WebKit2/WebProcess/WebPage/mac/LayerTreeHostMac.mm. + +2011-03-17 Jer Noble <jer.noble@apple.com> + + Reviewed by Maciej Stachowiak. + + WebKit2: Cancelling full screen early leaves full screen window up. + https://bugs.webkit.org/show_bug.cgi?id=56589 + + No new tests, as WebKitTestRunner does not currently support the new Full Screen API. + + Notify the UIProcess when it needs to tear down its layer hosting view, turn off + the background layer when not in accelerated rendering mode and don't swap out + the web view unnecessarily + + * UIProcess/mac/WKFullScreenWindowController.mm: + (-[WKFullScreenWindowController beganExitFullScreenAnimation]): Check before swapping _webView. + (-[WKFullScreenWindowController enterAcceleratedCompositingMode:]): Add the _layerHostingView + to the full screen window's animationView, not its contentsView. + (-[WKFullScreenWindowController exitAcceleratedCompositingMode]): Hide the background layer. + * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm: + (WebKit::WebFullScreenManagerMac::setRootFullScreenLayer): If given a null rootLayer, tell + the client to exit accelerated mode. + +2011-03-24 Enrica Casucci <enrica@apple.com> + + Reviewed by Alexey Proskuryakov. + + WebKit2:Services menu item to convert selected Simplified/Traditional Chinese Text is not working. + https://bugs.webkit.org/show_bug.cgi?id=56975 + <rdar://problem/8915066> + + Adding missing entry point to support Mac OS X services in WebKit2. + + * UIProcess/API/mac/WKView.mm: + (-[WKView readSelectionFromPasteboard:]): Added. + * UIProcess/WebPageProxy.h: + * UIProcess/mac/WebPageProxyMac.mm: + (WebKit::WebPageProxy::readSelectionFromPasteboard): Added. + * WebProcess/WebPage/WebPage.h: + * WebProcess/WebPage/WebPage.messages.in: Added synchronous + message. + * WebProcess/WebPage/mac/WebPageMac.mm: + (WebKit::WebPage::readSelectionFromPasteboard): Added. + +2011-03-24 Jia Pu <jpu@apple.com> + + Reviewed by Darin Adler. + + Dismissed reversion suggestion is incorrectly learned. + https://bugs.webkit.org/show_bug.cgi?id=57039 + + CorrectionPanel should always use [NSSpellChecker dismissCorrectionBubbleForView]. + [NSSpellChecker cancelCorrectionBubbleForView] is reserved for situation where correction panel + is dismissed explicitly by ESC key or clicking the dimiss button. Misusing these causes + incorrect automatic learning. + + * UIProcess/mac/CorrectionPanel.mm: + (WebKit::CorrectionPanel::dismissInternal): + +2011-03-24 Brian Weinstein <bweinstein@apple.com> + + Reviewed by Adam Roben. + + WebKit2: Add Trackpoint driver hack to support IBM trackpads + https://bugs.webkit.org/show_bug.cgi?id=49830 + <rdar://problem/8705951> + + Copy code from WebKit1 to WebKit2 to handle initializing fake scrollbars so + IBM machines with a trackpad send us WM_VSCROLL and WM_HSCROLL messages. + + Listen for the WM_VSCROLL and WM_HSCROLL messages, and turn the values into + ScrollDirection and ScrollGranularity, and send a scroll command to the + WebProcess. + + * UIProcess/WebPageProxy.cpp: + (WebKit::WebPageProxy::scrollBy): Send a message to the WebProcess. + * UIProcess/WebPageProxy.h: + * UIProcess/win/WebView.cpp: + (WebKit::WebView::wndProc): Add WM_VSCROLL and WM_HSCROLL message handling. + (WebKit::WebView::initialize): Call shouldInitializeTrackPointHack. + (WebKit::WebView::onHorizontalScroll): Turn wParam into a ScrollDirection and ScrollGranularity. + (WebKit::WebView::onVerticalScroll): Ditto. + (WebKit::WebView::shouldInitializeTrackPointHack): Check the registry for keys that indicate + the machine has a IBM Trackpoint driver. + * UIProcess/win/WebView.h: + * WebProcess/WebPage/WebPage.cpp: + (WebKit::WebPage::scrollBy): Call scroll method. + (WebKit::WebPage::scroll): Moved from WebPageMac and WebPageWin. + (WebKit::WebPage::logicalScroll): Ditto. + * WebProcess/WebPage/WebPage.h: + * WebProcess/WebPage/WebPage.messages.in: Add a new scrollBy message. + * WebProcess/WebPage/mac/WebPageMac.mm: Remove scroll and logicalScroll, they are now in WebPage.cpp. + * WebProcess/WebPage/win/WebPageWin.cpp: Ditto. + +2011-03-24 Sam Weinig <sam@webkit.org> + + Reviewed by Darin Adler. + + Dictionary text extraction is not correctly detecting word boundaries on bing.com + <rdar://problem/9078569> + https://bugs.webkit.org/show_bug.cgi?id=56995 + + * Shared/DictionaryPopupInfo.cpp: + (WebKit::DictionaryPopupInfo::encode): + (WebKit::DictionaryPopupInfo::decode): + * Shared/DictionaryPopupInfo.h: + Add options dictionary. + + * UIProcess/API/mac/PageClientImpl.mm: + (WebKit::PageClientImpl::didPerformDictionaryLookup): + Add path that can pass options through. + + * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm: + (WebKit::WebContextMenuClient::lookUpInDictionary): + Use the new performDictionaryLookupForSelection which can extract context + if supported. + + * WebProcess/WebPage/WebPage.h: + * WebProcess/WebPage/mac/WebPageMac.mm: + (WebKit::characterRangeAtPositionForPoint): + (WebKit::characterRangeAtPoint): + Split functionality out of characterRangeAtPoint and into + characterRangeAtPositionForPoint to avoid doing duplicate work + if you already have the position. + + (WebKit::isPositionInRange): + (WebKit::shouldUseSelection): + Add predicate to determine if we should use the selection instead + of expanding to find the word we are over. + + (WebKit::WebPage::performDictionaryLookupAtLocation): + If available, use the surrounding paragraph as context to get better extraction + and to get lexicographical information about the word. Also, clean up and use + editing APIs to make the code more concise and understandable. + + (WebKit::WebPage::performDictionaryLookupForSelection): + Use similar logic as in performDictionaryLookupAtLocation to extract additional + details from a selection for use in the dictionary popup. + + (WebKit::WebPage::performDictionaryLookupForRange): + Pass options to WebProcess if available. + +2011-03-24 Jon Lee <jonlee@apple.com> + + Reviewed by Darin Adler. + + WebKit2: Tabbing from the last focused field to a non-webpage element leaves the selection in a weird state + <rdar://problem/8553962> + + * WebProcess/WebPage/WebPage.cpp: + (WebKit::WebPage::setFocused): When the page loses focus, clear out any selection in the frame + +2011-03-24 Brian Weinstein <bweinstein@apple.com> + + Rubber-stamped by Sam Weinig. + + Fix a typo in the VK_LEFT case of performDefaultBehaviorForKeyEvent. + + * WebProcess/WebPage/mac/WebPageMac.mm: + (WebKit::WebPage::performDefaultBehaviorForKeyEvent): It should be a logical or, + not a bitwise or. + +2011-03-24 Jeff Miller <jeffm@apple.com> + + Fix typo - USE(CF_NETWORK) should be USE(CFNETWORK). + + * WebProcess/InjectedBundle/win/InjectedBundleWin.cpp: + (WebKit::InjectedBundle::setHostAllowsAnyHTTPSCertificate): USE(CF_NETWORK) should be USE(CFNETWORK) + +2011-03-23 Jia Pu <jpu@apple.com> + + Reviewed by Darin Adler. + + Hook up new AppKit autocorrection UI with WK2. + https://bugs.webkit.org/show_bug.cgi?id=56055 + <rdar://problem/8947463> + + Please see WebCore/ChangeLog for detail. + + The calls to AppKit are implemented in PageClientImpl. Other changes are necessary for the + plumbing work. + + * UIProcess/API/mac/PageClientImpl.h: + * UIProcess/API/mac/PageClientImpl.mm: + (WebKit::PageClientImpl::showCorrectionPanel): + (WebKit::PageClientImpl::dismissCorrectionPanel): + (WebKit::PageClientImpl::dismissCorrectionPanelSoon): + (WebKit::PageClientImpl::recordAutocorrectionResponse): + * UIProcess/API/mac/WKView.mm: + (-[WKView spellCheckerDocumentTag]): + (-[WKView handleCorrectionPanelResult:]): + * UIProcess/API/mac/WKViewPrivate.h: + * UIProcess/PageClient.h: + * UIProcess/WebPageProxy.cpp: + (WebKit::WebPageProxy::didCommitLoadForFrame): + (WebKit::WebPageProxy::showCorrectionPanel): + (WebKit::WebPageProxy::dismissCorrectionPanel): + (WebKit::WebPageProxy::dismissCorrectionPanelSoon): + (WebKit::WebPageProxy::recordAutocorrectionResponse): + (WebKit::WebPageProxy::handleCorrectionPanelResult): + * UIProcess/WebPageProxy.h: + * UIProcess/WebPageProxy.messages.in: + * UIProcess/mac/CorrectionPanel.h: Added. + (WebKit::CorrectionPanel::isShowing): + * UIProcess/mac/CorrectionPanel.mm: Added. + (correctionBubbleType): + (WebKit::CorrectionPanel::CorrectionPanel): + (WebKit::CorrectionPanel::~CorrectionPanel): + (WebKit::CorrectionPanel::show): + (WebKit::CorrectionPanel::dismiss): + (WebKit::CorrectionPanel::dismissSoon): + (WebKit::CorrectionPanel::dismissInternal): + (WebKit::CorrectionPanel::recordAutocorrectionResponse): + * WebKit2.xcodeproj/project.pbxproj: + * WebProcess/WebCoreSupport/WebEditorClient.h: + * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm: + (WebKit::WebEditorClient::showCorrectionPanel): + (WebKit::WebEditorClient::dismissCorrectionPanel): + (WebKit::WebEditorClient::dismissCorrectionPanelSoon): + (WebKit::WebEditorClient::recordAutocorrectionResponse): + * WebProcess/WebPage/WebPage.cpp: + (WebKit::WebPage::handleCorrectionPanelResult): + * WebProcess/WebPage/WebPage.h: + * WebProcess/WebPage/WebPage.messages.in: + +2011-03-23 Brian Weinstein <bweinstein@apple.com> + + Reviewed by Maciej Stachowiak. + + WebKit2: Need API to manage the Media Cache + https://bugs.webkit.org/show_bug.cgi?id=56878 + <rdar://problem/9082503> + + Call through to HTMLMediaElement functions to manage the WebCore media cache. + + * WebProcess/MediaCache/WebMediaCacheManager.cpp: + (WebKit::WebMediaCacheManager::getHostnamesWithMediaCache): + (WebKit::WebMediaCacheManager::clearCacheForHostname): + (WebKit::WebMediaCacheManager::clearCacheForAllHostnames): + +2011-03-23 Jeff Miller <jeffm@apple.com> + + Reviewed by Darin Adler. + + Add WKBundleSetHostAllowsAnyHTTPSCertificate() for Windows + https://bugs.webkit.org/show_bug.cgi?id=56972 + + This is the WebKit2 equivalent to the WebKit1 API IWebMutableURLRequest::setAllowsAnyHTTPSCertificate(). + + * WebProcess/InjectedBundle/API/c/WKBundle.cpp: + (WKBundleSetHostAllowsAnyHTTPSCertificate): Added. + * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: Added WKBundleSetHostAllowsAnyHTTPSCertificate(). + * WebProcess/InjectedBundle/InjectedBundle.h: Added setHostAllowsAnyHTTPSCertificate(). + * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp: + (WebKit::InjectedBundle::setHostAllowsAnyHTTPSCertificate): Added, should never be called. + * WebProcess/InjectedBundle/mac/InjectedBundleMac.cpp: + (WebKit::InjectedBundle::setHostAllowsAnyHTTPSCertificate): Added, should never be called. + * WebProcess/InjectedBundle/qt/InjectedBundleQt.cpp: + (WebKit::InjectedBundle::setHostAllowsAnyHTTPSCertificate): Added, should never be called. + * WebProcess/InjectedBundle/win/InjectedBundleWin.cpp: + (WebKit::InjectedBundle::setHostAllowsAnyHTTPSCertificate): Added. + +2011-03-23 Sam Weinig <sam@webkit.org> + + Reviewed by Anders Carlsson. + + Roll out r81593 Need WebKit2 API for creating a page with a specific main frame name + + This API is not necessary. + + * Shared/WebPageCreationParameters.cpp: + (WebKit::WebPageCreationParameters::encode): + (WebKit::WebPageCreationParameters::decode): + * Shared/WebPageCreationParameters.h: + * UIProcess/API/mac/WKView.h: + * UIProcess/API/mac/WKView.mm: + (-[WKView initWithFrame:]): + (-[WKView initWithFrame:contextRef:]): + (-[WKView initWithFrame:contextRef:pageGroupRef:]): + * UIProcess/WebPageProxy.cpp: + (WebKit::WebPageProxy::creationParameters): + * UIProcess/WebPageProxy.h: + * WebProcess/WebPage/WebFrame.cpp: + (WebKit::WebFrame::createMainFrame): + * WebProcess/WebPage/WebFrame.h: + * WebProcess/WebPage/WebPage.cpp: + (WebKit::WebPage::WebPage): + +2011-03-23 Balazs Kelemen <kbalazs@webkit.org> + + Reviewed by Andreas Kling. + + [WK2] Handle keyboard and mouse events on X11 + https://bugs.webkit.org/show_bug.cgi?id=56103 + + Propagate keyboard and mouse events to the plugin + as XEvent's. + + * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: + (WebKit::initializeXEvent): + (WebKit::xTimeStamp): + (WebKit::xKeyModifiers): + (WebKit::setCommonMouseEventFields): + (WebKit::setXMotionEventFields): + (WebKit::setXButtonEventFields): + (WebKit::setXCrossingEventFields): + (WebKit::NetscapePlugin::platformHandleMouseEvent): + (WebKit::NetscapePlugin::platformHandleMouseEnterEvent): + (WebKit::NetscapePlugin::platformHandleMouseLeaveEvent): + (WebKit::setXKeyEventFields): + (WebKit::NetscapePlugin::platformHandleKeyboardEvent): + +2011-03-23 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Connection::SyncMessageState::processIncomingMessage should ignore whether the message is sync or not + https://bugs.webkit.org/show_bug.cgi?id=56954 + + This is so we'll eventually be able to send sync messages that aren't processed immediately if the + destination is waiting for a reply to another synchronous message. + + * Platform/CoreIPC/Connection.cpp: + (CoreIPC::Connection::SyncMessageState::processIncomingMessage): + Only check for the DispatchMessageWhenWaitingForSyncReply flag. + + (CoreIPC::Connection::sendSyncMessage): + Add both DispatchMessageWhenWaitingForSyncReply and SyncMessage to the message ID. + + * Platform/CoreIPC/Connection.h: + (CoreIPC::Connection::sendSync): + (CoreIPC::Connection::deprecatedSendSync): + No need to add SyncMessage here anymore. + +2011-03-23 Brian Weinstein <bweinstein@apple.com> + + Qt Build Fix. + + * DerivedSources.pro: + +2011-03-22 Brian Weinstein <bweinstein@apple.com> + + Reviewed by Darin Adler. + + WebKit2: Need API to manage the Media Cache + https://bugs.webkit.org/show_bug.cgi?id=56878 + <rdar://problem/9082503> + + Project File Fun: + * GNUmakefile.am: + * WebKit2.pri: + * WebKit2.pro: + * WebKit2.xcodeproj/project.pbxproj: + * win/WebKit2.vcproj: + * win/WebKit2Common.vsprops: + * win/WebKit2Generated.make: + + Derived Sources and API fun: + * DerivedSources.make: + * DerivedSources.pro: + * Platform/CoreIPC/MessageID.h: + * Shared/API/c/WKBase.h: + * Shared/APIObject.h: + * UIProcess/API/C/WKAPICast.h: + + * UIProcess/WebProcessProxy.cpp: + (WebKit::WebProcessProxy::didReceiveMessage): Add a case for MediaCache messages. + * WebProcess/WebProcess.cpp: + (WebKit::WebProcess::didReceiveMessage): Ditto. + + * UIProcess/WebContext.cpp: + (WebKit::WebContext::WebContext): Initialize the WebMediaCacheManagerProxy member variable. + (WebKit::WebContext::~WebContext): Invalidate the WebMediaCacheManagerProxy. + (WebKit::WebContext::disconnectProcess): Ditto. + (WebKit::WebContext::didReceiveMessage): Add a case for MediaCache messages. + * UIProcess/WebContext.h: + (WebKit::WebContext::mediaCacheManagerProxy): + + * UIProcess/API/C/WKContext.cpp: + (WKContextGetMediaCacheManager): Returns the context's WebMediaCacheManager. + * UIProcess/API/C/WKContext.h: + + * UIProcess/API/C/WKMediaCacheManager.cpp: Added. + (WKMediaCacheManagerGetTypeID): Returns the WebMediaCacheManagerProxy type. + (WKMediaCacheManagerGetHostnamesWithMediaCache): Calls down to the WebMediaCacheManagerProxy. + (WKMediaCacheManagerClearCacheForHostname): Ditto. + (WKMediaCacheManagerClearCacheForAllHostnames): Ditto. + * UIProcess/API/C/WKMediaCacheManager.h: Added. + + * UIProcess/WebMediaCacheManagerProxy.cpp: Added. + (WebKit::WebMediaCacheManagerProxy::create): + (WebKit::WebMediaCacheManagerProxy::WebMediaCacheManagerProxy): + (WebKit::WebMediaCacheManagerProxy::~WebMediaCacheManagerProxy): + (WebKit::WebMediaCacheManagerProxy::invalidate): + (WebKit::WebMediaCacheManagerProxy::didReceiveMessage): + (WebKit::WebMediaCacheManagerProxy::getHostnamesWithMediaCache): Call through to the WebProcess. + (WebKit::WebMediaCacheManagerProxy::didGetHostnamesWithMediaCache): Process the WebProcess response, + and call the callback. + (WebKit::WebMediaCacheManagerProxy::clearCacheForHostname): Call through to the WebProcess. + (WebKit::WebMediaCacheManagerProxy::clearCacheForAllHostnames): Call through to the WebProcess. + * UIProcess/WebMediaCacheManagerProxy.h: Added. + (WebKit::WebMediaCacheManagerProxy::clearContext): + (WebKit::WebMediaCacheManagerProxy::type): + * UIProcess/WebMediaCacheManagerProxy.messages.in: Added. + + * WebProcess/MediaCache: Added. + * WebProcess/MediaCache/WebMediaCacheManager.cpp: Added. + (WebKit::WebMediaCacheManager::shared): + (WebKit::WebMediaCacheManager::WebMediaCacheManager): + (WebKit::WebMediaCacheManager::didReceiveMessage): + (WebKit::WebMediaCacheManager::getHostnamesWithMediaCache): Added a FIXME to call through to WebCore. + (WebKit::WebMediaCacheManager::clearCacheForHostname): Ditto. + (WebKit::WebMediaCacheManager::clearCacheForAllHostnames): Ditto. + * WebProcess/MediaCache/WebMediaCacheManager.h: Added. + * WebProcess/MediaCache/WebMediaCacheManager.messages.in: Added. + +2011-03-22 Brady Eidson <beidson@apple.com> + + Reviewed by Sam Weinig. + + Add asynchronous load decision call to WebKit2 IconDatabase + https://bugs.webkit.org/show_bug.cgi?id=56887 + + * UIProcess/WebIconDatabase.cpp: + (WebKit::WebIconDatabase::getLoadDecisionForIconURL): In the future, get the actual load decision from the database. + For now, always message "IconLoadNo" back to the WebProcess. + * UIProcess/WebIconDatabase.h: + * UIProcess/WebIconDatabase.messages.in: + + * WebProcess/IconDatabase/WebIconDatabaseProxy.cpp: + (WebKit::WebIconDatabaseProxy::loadDecisionForIconURL): Message the UIProcess for the load decision. + (WebKit::WebIconDatabaseProxy::receivedIconLoadDecision): Callback into WebCore with the received load decision. + * WebProcess/IconDatabase/WebIconDatabaseProxy.h: + * WebProcess/IconDatabase/WebIconDatabaseProxy.messages.in: + +2011-03-23 Chris Fleizach <cfleizach@apple.com> + + Reviewed by Darin Adler. + + REGRESSION: WK2: AX: PDF in Safari no longer accessible. + https://bugs.webkit.org/show_bug.cgi?id=56849 + + The WKView needs to know when to return the WKPDFView and when to return + the remote web process connection. + + * UIProcess/API/mac/PDFViewController.h: + (WebKit::PDFViewController::pdfView): + * UIProcess/API/mac/WKView.mm: + (-[WKView accessibilityFocusedUIElement]): + (-[WKView accessibilityHitTest:]): + (-[WKView accessibilityAttributeValue:]): + +2011-03-21 Stephanie Lewis <slewis@apple.com> + + Reviewed by Simon Fraser. + + https://bugs.webkit.org/show_bug.cgi?id=56798 + Wrap autorelease pools around calls that can have pathological memory growth on Membuster. + Only wrap the main runloop because some background threads are not expected to call into + objc and an autorelease pool could mask bugs. + + * Platform/mac/RunLoopMac.mm: + (RunLoop::performWork): + (RunLoop::TimerBase::timerFired): + * WebProcess/WebPage/mac/LayerTreeHostMac.mm: + (WebKit::LayerTreeHostMac::flushPendingLayerChangesRunLoopObserverCallback): + +2011-03-22 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + OBJECT element with DivX source is always downloaded + https://bugs.webkit.org/show_bug.cgi?id=56879 + + * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm: + (WebKit::getPluginInfoFromPropertyLists): + Always try to split every element in the "WebPluginExtensions" array, since the DivX plug-in + specifies multiple file extensions in a single element. + + * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: + (WebKit::pluginSupportsExtension): + Add a new helper function. + + (WebKit::WebFrameLoaderClient::objectContentType): + If we can't find the MIME for an extension, explicitly check if there's a plugin that claims to + handle the given extension. + +2011-03-22 Brady Eidson <beidson@apple.com> + + Reviewed by Sam Weinig. + + Rename the synchronous icon database messages to be prefixed with "synchronous" + + * UIProcess/WebIconDatabase.cpp: + (WebKit::WebIconDatabase::synchronousIconDataForPageURL): + (WebKit::WebIconDatabase::synchronousIconURLForPageURL): + (WebKit::WebIconDatabase::synchronousIconDataKnownForIconURL): + (WebKit::WebIconDatabase::synchronousLoadDecisionForIconURL): + * UIProcess/WebIconDatabase.h: + * UIProcess/WebIconDatabase.messages.in: + + * WebProcess/IconDatabase/WebIconDatabaseProxy.cpp: + (WebKit::WebIconDatabaseProxy::synchronousIconForPageURL): + +2011-03-22 Sam Weinig <sam@webkit.org> + + Rubber-stamped by Anders Carlsson. + + Loading a new tab does not dismiss Lookup + <rdar://problem/9138391> + + * UIProcess/API/mac/WKView.mm: + (-[WKView viewDidMoveToWindow]): + Hide the dictionary popup when moving the WKView out of a window. + +2011-03-22 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Microsoft Silverlight playback shows artifacts + https://bugs.webkit.org/show_bug.cgi?id=56863 + <rdar://problem/9103136> + + * PluginProcess/PluginControllerProxy.cpp: + (WebKit::PluginControllerProxy::paint): + If the plug-in is transparent, clear the dirty rect before painting. + + * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm: + (WebKit::NetscapePluginModule::determineQuirks): + Add the MakeTransparentIfBackgroundAttributeExists quirk for Silverlight plug-ins. + + * Shared/Plugins/PluginQuirks.h: + Add MakeTransparentIfBackgroundAttributeExists quirk. + + * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: + (WebKit::NPN_SetValue): + Handle NPPVpluginTransparentBool. + + * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: + (WebKit::NetscapePlugin::NetscapePlugin): + Initialize m_isTransparent to false. + + (WebKit::NetscapePlugin::setIsTransparent): + Set m_isTransparent. + + (WebKit::NetscapePlugin::initialize): + If the plug-in has the MakeTransparentIfBackgroundAttributeExists quirk, make it transparent + if there's a 'background' attribute. + + (WebKit::NetscapePlugin::isTransparent): + Add getter. + + * WebProcess/Plugins/Plugin.h: + Add isTransparent(). + + * WebProcess/Plugins/PluginProxy.cpp: + (WebKit::PluginProxy::paint): + Always copy the plug-in backing store to the plug-in proxy backing store. + + (WebKit::PluginProxy::isTransparent): + Add getter that should never be called. + + (WebKit::PluginProxy::update): + Always copy the plug-in backing store to the plug-in proxy backing store. + +2011-03-22 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Crash when calling PluginProxy::evaluate on a destroyed plug-in + https://bugs.webkit.org/show_bug.cgi?id=56848 + <rdar://problem/9168975> + + Return early if the NPObject doesn't exist anymore. + + * WebProcess/Plugins/PluginProxy.cpp: + (WebKit::PluginProxy::evaluate): + +2011-03-22 Sam Weinig <sam@webkit.org> + + Reviewed by Adam Roben. + + WebKit2: Cannot make a selection past the end of the visible page (no autoscrolling) + <rdar://problem/8823874> + https://bugs.webkit.org/show_bug.cgi?id=56847 + + * Shared/mac/WebEventFactory.mm: + (WebKit::currentMouseButton): + (WebKit::mouseButtonForEvent): + Add mouse button for mouseEnter/Exit events. [NSEvent buttonNumber] doesn't seem to give the right result + for these events, but getting the currentMouseButton does work. + +2011-03-21 Brady Eidson <beidson@apple.com> + + Fix Mac release builds after https://bugs.webkit.org/show_bug.cgi?id=56783 + + * Platform/mac/Logging.mac.mm: + +2011-03-21 Brady Eidson <beidson@apple.com> + + Reviewed by Brian Weinstein. + + https://bugs.webkit.org/show_bug.cgi?id=56783 + Actually hook up WebKit2 logging on Mac. + + * Platform/Logging.cpp: + (WebKit::initializeLogChannel): + * Platform/Logging.h: + * Platform/mac/Logging.mac.mm: Added. + (WebKit::initializeLogChannel): + + * UIProcess/WebContext.cpp: + (WebKit::WebContext::WebContext): Initialize logging if necessary. + + * WebKit2.xcodeproj/project.pbxproj: + +2011-03-21 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Darin Adler. + + REGRESSION (r81269): WebKit2 gets into an infinite recursion after an unhandled command key + https://bugs.webkit.org/show_bug.cgi?id=56782 + <rdar://problem/9151993> + + * UIProcess/API/mac/PageClientImpl.mm: (WebKit::PageClientImpl::doneWithKeyEvent): + Factored out code for resending an event and moved it to WKView. + + * UIProcess/API/mac/WKView.mm: + (-[WKView performKeyEquivalent:]): Don't zero out _keyDownEventBeingResent, it's easier + to just do that in _resendKeyDownEvent:. + (-[WKView keyDown:]): Ditto. + (-[WKView _resendKeyDownEvent:]): Moved from PageClientImpl.mm. Added an assertion that we + are not already resending an event - it would be too confusing if we ever had to do that, + but looks like this never happens. + + * UIProcess/API/mac/WKViewInternal.h: Exposed _resendKeyDownEvent. + +2011-03-21 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + QT plug-in fails to load contextual menu + https://bugs.webkit.org/show_bug.cgi?id=56777 + <rdar://problem/8979033> + + Open a Carbon resource map and make it the current map when calling NP_Initialize. + + * Platform/Module.cpp: + (WebKit::Module::Module): + Initialize m_bundleResourceMap to -1. + + * Platform/Module.h: + Add m_bundleResourceMap. + + * Platform/mac/ModuleMac.mm: + (WebKit::Module::unload): + Close the resource map. + + (WebKit::Module::bundleResourceMap): + Open a resource map if necessary. + + * Shared/Plugins/Netscape/NetscapePluginModule.cpp: + (WebKit::NetscapePluginModule::tryLoad): + Get the resource map and make it current before calling NP_Initialize. + +2011-03-21 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Plug-in process crashes if it fails to load a plug-in module + https://bugs.webkit.org/show_bug.cgi?id=56775 + + * PluginProcess/PluginControllerProxy.cpp: + (WebKit::PluginControllerProxy::initialize): + If NetscapePlugin::create returns null, call removePluginControllerProxy with a null plug-in. + + * PluginProcess/WebProcessConnection.cpp: + (WebKit::WebProcessConnection::removePluginControllerProxy): + Remove an incorrect assertion. Don't invalidate the remote object map if the plug-in is null. + +2011-03-21 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + QT plug-in loads controller at top of movie not bottom + https://bugs.webkit.org/show_bug.cgi?id=56764 + <rdar://problem/8979037> + + Create a layer with geometryFlipped set and add the plug-in layer as a sublayer, + matching WebKit1. + + * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: + (WebKit::NetscapePlugin::platformPostInitialize): + +2011-03-21 Sam Weinig <sam@webkit.org> + + Reviewed by Anders Carlsson. + + WebKit2 needs preferences to change security knobs + https://bugs.webkit.org/show_bug.cgi?id=56762 + + Add preferences for WebSecurityEnabled, UniversalAccessFromFileURLsAllowed + and FileAccessFromFileURLsAllowed. + + * Shared/WebPreferencesStore.h: + * UIProcess/API/C/WKPreferences.cpp: + (WKPreferencesSetWebSecurityEnabled): + (WKPreferencesGetWebSecurityEnabled): + (WKPreferencesSetUniversalAccessFromFileURLsAllowed): + (WKPreferencesGetUniversalAccessFromFileURLsAllowed): + (WKPreferencesSetFileAccessFromFileURLsAllowed): + (WKPreferencesGetFileAccessFromFileURLsAllowed): + * UIProcess/API/C/WKPreferencesPrivate.h: + * WebProcess/WebPage/WebPage.cpp: + (WebKit::WebPage::updatePreferences): + +2011-03-21 Sam Weinig <sam@webkit.org> + + Reviewed by Anders Carlsson. + + Remove old DrawingArea and LayerHostingView code from WKView. + + * UIProcess/API/mac/WKView.mm: + (-[WKView drawRect:]): + (-[WKView hitTest:]): + (-[WKView WebKit::]): + +2011-03-21 Sam Weinig <sam@webkit.org> + + Reviewed by Anders Carlsson. + + Need WebKit2 API for creating a page with a specific main frame name + https://bugs.webkit.org/show_bug.cgi?id=56759 + + * Shared/WebPageCreationParameters.cpp: + (WebKit::WebPageCreationParameters::encode): + (WebKit::WebPageCreationParameters::decode): + * Shared/WebPageCreationParameters.h: + Add mainFrameName to creation parameters. + + * UIProcess/API/mac/WKView.h: + * UIProcess/API/mac/WKView.mm: + (-[WKView initWithFrame:]): + (-[WKView initWithFrame:contextRef:]): + (-[WKView initWithFrame:contextRef:pageGroupRef:]): + (-[WKView initWithFrame:contextRef:pageGroupRef:mainFrameName:]): + Add new initializer which takes a main frame name. + + * UIProcess/WebPageProxy.cpp: + (WebKit::WebPageProxy::setMainFrameName): + (WebKit::WebPageProxy::creationParameters): + * UIProcess/WebPageProxy.h: + Store the main frame name for initialization/re-initialization. + + * WebProcess/WebPage/WebFrame.cpp: + (WebKit::WebFrame::createMainFrame): + * WebProcess/WebPage/WebFrame.h: + * WebProcess/WebPage/WebPage.cpp: + (WebKit::WebPage::WebPage): + Pass the name to main frame creation. + +2011-03-20 Bill Budge <bbudge@chromium.org> + + Reviewed by Adam Barth. + + Rename ThreadSafeShared to ThreadSafeRefCounted + https://bugs.webkit.org/show_bug.cgi?id=56714 + + No new tests. Exposes no new functionality. + + * Platform/CoreIPC/Connection.h: + * Platform/WorkQueue.h: + * Platform/win/WorkQueueWin.cpp: + * UIProcess/Launcher/ProcessLauncher.h: + * UIProcess/Launcher/ThreadLauncher.h: + +2011-03-19 Anton D'Auria <adauria@apple.com> + + Reviewed by Alexey Proskuryakov. + + ApplicationCacheGroup is not obsolete after being deleted via ApplicationCacheStorage::deleteEntriesForOrigin + https://bugs.webkit.org/show_bug.cgi?id=56415 + + * WebProcess/ApplicationCache/WebApplicationCacheManager.cpp: calling ApplicationCacheGroup::deleteCacheGroupsForOrigin + instead of ApplicationCacheStorage::deleteEntriesForOrigin. + (WebKit::WebApplicationCacheManager::deleteEntriesForOrigin): + +2011-03-18 Sam Weinig <sam@webkit.org> + + Attempt to fix the WinCairo build. + + * win/WebKit2.vcproj: + +2011-03-18 Anders Carlsson <andersca@apple.com> + + Reviewed by Dan Bernstein. + + Empty gray page after going back from a PDF + https://bugs.webkit.org/show_bug.cgi?id=56694 + <rdar://problem/8811854> + + Update m_frameHasCustomRepresentation when loading a page that's in the page cache. + + * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: + (WebKit::WebFrameLoaderClient::transitionToCommittedFromCachedFrame): + +2011-03-18 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Crash when sending a sync message ends up invalidating the connection + https://bugs.webkit.org/show_bug.cgi?id=56686 + <rdar://problem/9048781> + + Guard against a null client. + + * Platform/CoreIPC/Connection.cpp: + (CoreIPC::Connection::sendSyncMessage): + +2011-03-18 Balazs Kelemen <kbalazs@webkit.org> + + Reviewed by Benjamin Poulain. + + [Qt][WK2] Need a way to debug the web process after the UI process dies + https://bugs.webkit.org/show_bug.cgi?id=56116 + + Allow the web process to outlive it's parent process + in debug builds if the QT_WEBKIT_KEEP_ALIVE_WEB_PROCESS + environment variable is set. + + * UIProcess/Launcher/qt/ProcessLauncherQt.cpp: + (WebKit::QtWebProcess::setupChildProcess): Used getenv + since the prctl call is already in a Linux-only block + and the implementation in this file is a candidate + for sharing across ports in the future. + +2011-03-18 Darin Adler <darin@apple.com> + + Reviewed by Anders Carlsson. + + Command-period does not stop load when page has focus in WebKit2 + https://bugs.webkit.org/show_bug.cgi?id=56601 + + * UIProcess/API/mac/WKView.mm: + (-[WKView doCommandBySelector:]): If called outside interpretKeyEvents, + call through to super. + (-[WKView insertText:]): Assert that we are inside interpretKeyEvents. + (-[WKView unmarkText]): Ditto. + (-[WKView setMarkedText:selectedRange:]): Ditto. + (-[WKView _interceptKeyEvent:]): Set a flag to indicate we are inside + interpretKeyEvents for use by the above. + +2011-03-18 Brady Eidson <beidson@apple.com> + + Reviewed by Sam Weinig. + + https://bugs.webkit.org/show_bug.cgi?id=56425 + More groundwork for WebKit2 IconDatabase + + -Update the synchronous method names to be prefixed with "synchronous." + -Add empty implementations for the asynchronous accessors. + + * WebProcess/IconDatabase/WebIconDatabaseProxy.cpp: + (WebKit::WebIconDatabaseProxy::setEnabled): + (WebKit::WebIconDatabaseProxy::synchronousIconForPageURL): + (WebKit::WebIconDatabaseProxy::synchronousIconURLForPageURL): + (WebKit::WebIconDatabaseProxy::synchronousIconDataKnownForIconURL): + (WebKit::WebIconDatabaseProxy::synchronousLoadDecisionForIconURL): + (WebKit::WebIconDatabaseProxy::supportsAsynchronousMode): + (WebKit::WebIconDatabaseProxy::loadDecisionForIconURL): + (WebKit::WebIconDatabaseProxy::iconDataForIconURL): + * WebProcess/IconDatabase/WebIconDatabaseProxy.h: + +2011-03-18 Alejandro G. Castro <alex@igalia.com> + + Reviewed by Martin Robinson. + + Fixed compilation after r80925. + + * GNUmakefile.am: + * UIProcess/gtk/WebFullScreenManagerProxyGtk.cpp: Added. + (WebKit::WebFullScreenManagerProxy::enterFullScreen): + (WebKit::WebFullScreenManagerProxy::exitFullScreen): + (WebKit::WebFullScreenManagerProxy::beganEnterFullScreenAnimation): + (WebKit::WebFullScreenManagerProxy::finishedEnterFullScreenAnimation): + (WebKit::WebFullScreenManagerProxy::beganExitFullScreenAnimation): + (WebKit::WebFullScreenManagerProxy::finishedExitFullScreenAnimation): + (WebKit::WebFullScreenManagerProxy::enterAcceleratedCompositingMode): + (WebKit::WebFullScreenManagerProxy::exitAcceleratedCompositingMode): + (WebKit::WebFullScreenManagerProxy::getFullScreenRect): + * WebProcess/FullScreen/gtk/WebFullScreenManagerGtk.cpp: Added. + (WebKit::WebFullScreenManagerGtk::WebFullScreenManagerGtk): + (WebKit::WebFullScreenManager::create): + (WebKit::WebFullScreenManagerGtk::setRootFullScreenLayer): + (WebKit::WebFullScreenManagerGtk::beginEnterFullScreenAnimation): + (WebKit::WebFullScreenManagerGtk::beginExitFullScreenAnimation): + * WebProcess/FullScreen/gtk/WebFullScreenManagerGtk.h: Added. + +2011-03-18 Alejandro G. Castro <alex@igalia.com> + + Unreviewed, fixed compilation after r81208. + + * GNUmakefile.am: + +2011-03-18 John Sullivan <sullivan@apple.com> + + Reviewed by Dan Bernstein. + + https://bugs.webkit.org/show_bug.cgi?id=56645 + Assertion fires when hidden Find-on-Page matches are encountered in WebKit2 + + * WebProcess/WebPage/FindController.cpp: + (WebKit::FindController::updateFindIndicator): + Bail out if the selection rect is empty, before trying to generate an appropriately-sized + bitmap. (Previously it was bailing out afterwards, but encountering an assertion in debug + builds along the way.) + +2011-03-18 Mark Rowe <mrowe@apple.com> + + Rubber-stamped by Jon Honeycutt. + + <rdar://problem/9153929> PluginProcess fails to launch due to PluginProcessShim.dylib building for 64-bit only + + Fix a bogus change from r81392 that made PluginProcessShim.xcconfig import DebugRelease.xcconfig. + As its name suggests, DebugRelease.xcconfig is only applicable for the debug and release configurations. + It overrides the valid build architectures and also restricts the build to only the active architecture. + + * Configurations/PluginProcessShim.xcconfig: Import BaseTarget.xcconfig instead. This is what + each target-specific .xcconfig file should import. + +2011-03-17 Mark Rowe <mrowe@apple.com> + + Fix the build. + + * WebKit2.xcodeproj/project.pbxproj: + +2011-03-17 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Implement PluginProcessProxy::setFullscreenWindowIsShowing + https://bugs.webkit.org/show_bug.cgi?id=56618 + + * UIProcess/Plugins/PluginProcessProxy.cpp: + (WebKit::PluginProcessProxy::PluginProcessProxy): + Initialize m_fullscreenWindowIsShowing. + + (WebKit::PluginProcessProxy::didClose): + if m_fullscreenWindowIsShowing is true, call exitFullscreen. + + * UIProcess/Plugins/PluginProcessProxy.h: + * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: + (WebKit::PluginProcessProxy::getPluginProcessSerialNumber): + Add helper function for getting a PSN for the plug-in process. + + (WebKit::PluginProcessProxy::makePluginProcessTheFrontProcess): + Make the plug-in process the front process. + + (WebKit::PluginProcessProxy::makeUIProcessTheFrontProcess): + Make the current process (the UI process) the front process. + + (WebKit::PluginProcessProxy::setFullscreenWindowIsShowing): + Call enterFullscreen or exitFullscreen. + + (WebKit::PluginProcessProxy::enterFullscreen): + Make the plug-in process the front process and hide the menu bar. + + (WebKit::PluginProcessProxy::exitFullscreen): + Show the menu bar and if necessary make the UI process the front process. + + (WebKit::PluginProcessProxy::endModal): + call makeUIProcessTheFrontProcess. + + (WebKit::PluginProcessProxy::applicationDidBecomeActive): + Call makePluginProcessTheFrontProcess. + +2011-03-17 Adam Roben <aroben@apple.com> + + Make bidi text in <select> menus in WebKit2 on Windows match WebKit1 + + Fixes <http://webkit.org/b/56614> 3 <select> bidi tests failing on Windows 7 Release + (WebKit2 Tests) + + Reviewed by Sam Weinig. + + * WebProcess/WebCoreSupport/WebChromeClient.cpp: + (WebKit::WebChromeClient::selectItemWritingDirectionIsNatural): + (WebKit::WebChromeClient::selectItemAlignmentFollowsMenuWritingDirection): + On Windows, return the same values we return in WebKit1. + +2011-03-17 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Implement PluginProcessProxy::setModalWindowIsShowing + https://bugs.webkit.org/show_bug.cgi?id=56615 + + * UIProcess/Plugins/PluginProcessProxy.cpp: + (WebKit::PluginProcessProxy::PluginProcessProxy): + Initialize m_modalWindowIsShowing. + + (WebKit::PluginProcessProxy::didClose): + If m_modalWindowIsShowing is true, we must call endModal. + + * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: + (-[WKPlaceholderModalWindow _wantsUserAttention]): + Add a WKPlaceholderModalWindow. + + (WebKit::PluginProcessProxy::setModalWindowIsShowing): + Call beginModal or endModal depending on whether we're showing a modal window or not. + + (WebKit::PluginProcessProxy::beginModal): + Create a fake window and start a nested run loop. Listen for NSApplicationWillBecomeActiveNotification notifications. + + (WebKit::PluginProcessProxy::endModal): + Tear down the window and the run loop. + + (WebKit::PluginProcessProxy::applicationDidBecomeActive): + Make sure that the plug-in process is frontmost. + +2011-03-17 Jeff Miller <jeffm@apple.com> + + Reviewed by Adam Roben. + + Web page shouldn't swallow alt-key combinations on Windows + https://bugs.webkit.org/show_bug.cgi?id=56612 + + Make Alt+Left Arrow and Alt+Right Arrow go back and forward, but make + sure any alt-key combinations bubble up to the client. + + * WebProcess/WebPage/win/WebPageWin.cpp: + (WebKit::WebPage::performDefaultBehaviorForKeyEvent): Make Alt+Left Arrow and Alt+Right Arrow go back and forward, ignore any other alt-key combinations. + +2011-03-17 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Send SetModalWindowIsShowing and SetFullscreenWindowIsShowing messages to the UI process + https://bugs.webkit.org/show_bug.cgi?id=56610 + + * PluginProcess/mac/PluginProcessMac.mm: + (WebKit::FullscreenWindowTracker::FullscreenWindowTracker): + Add fullscreen window tracker class. + + (WebKit::rectCoversAnyScreen): + Return whether the given rect covers any screen. + + (WebKit::windowCoversAnyScreen): + Return whether the given window covers any screen. + + (WebKit::FullscreenWindowTracker::windowShown): + If we're showing a fullscreen window, call PluginProcess::setFullscreenWindowIsShowing. + + (WebKit::FullscreenWindowTracker::windowHidden): + If we're hiding the last fullscreen window, call PluginProcess::setFullscreenWindowIsShowing. + + (WebKit::cocoaWindowShown): + (WebKit::cocoaWindowHidden): + (WebKit::carbonWindowShown): + (WebKit::carbonWindowHidden): + Call the window tracking functions. + + (WebKit::setModal): + Call PluginProcess::setModalWindowIsShowing. + + (WebKit::PluginProcess::setModalWindowIsShowing): + (WebKit::PluginProcess::setFullscreenWindowIsShowing): + Send CoreIPC messages. + + * UIProcess/Plugins/PluginProcessProxy.h: + * UIProcess/Plugins/PluginProcessProxy.messages.in: + Add new messages. + + * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: + (WebKit::PluginProcessProxy::setModalWindowIsShowing): + (WebKit::PluginProcessProxy::setFullscreenWindowIsShowing): + Add stubs. + +2011-03-17 Sam Weinig <sam@webkit.org> + + Reviewed by Brady Eidson. + + Allow passing a certificate chain as a user message + <rdar://problem/8951709> + https://bugs.webkit.org/show_bug.cgi?id=56605 + + * Shared/API/c/mac/WKCertificateInfoMac.h: + * Shared/API/c/mac/WKCertificateInfoMac.mm: + (WKCertificateInfoCreateWithCertficateChain): + Added. Creates a WKCertificate from a certificate chain. + + * Shared/UserMessageCoders.h: + (WebKit::UserMessageEncoder::baseEncode): + (WebKit::UserMessageDecoder::baseDecode): + Add encoding/decoding of WebCertificateInfo. + +2011-03-17 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Add PluginProcessShim hooks for when windows are shown and hidden + https://bugs.webkit.org/show_bug.cgi?id=56597 + + * Configurations/PluginProcessShim.xcconfig: + Add HEADER_SEARCH_PATHS so we can find WebKitSystemInterface.h. + + * PluginProcess/mac/PluginProcessMac.mm: + (WebKit::cocoaWindowShown): + (WebKit::cocoaWindowHidden): + (WebKit::carbonWindowShown): + (WebKit::carbonWindowHidden): + (WebKit::setModal): + (WebKit::PluginProcess::initializeShim): + Add empty stubs. + + * PluginProcess/mac/PluginProcessShim.h: + * PluginProcess/mac/PluginProcessShim.mm: + (WebKit::beginModal): + (WebKit::endModal): + Keep a modal count and call setModal accordingly. + + (WebKit::shim_NSApplication_RunModalForWindow): + (WebKit::shimModalDialog): + (WebKit::shimAlert): + Call beginModal/endModal. + + (WebKit::shimShowWindow): + (WebKit::shimHideWindow): + Call the shim functions. + + (WebKit::WebKitPluginProcessShimInitialize): + Listen for notifications and call the necessary shim functions. + + * WebKit2.xcodeproj/project.pbxproj: + Link the plug-in process shim with AppKit and QuartzCore and WKSI. + +2011-03-17 Jeff Miller <jeffm@apple.com> + + Use a consistent set of file patterns in the svn:ignore property for all .xcodeproj directories, specifically: + + *.mode* + *.pbxuser + *.perspective* + project.xcworkspace + xcuserdata + + * WebKit2.xcodeproj: Modified property svn:ignore. + +2011-03-17 Sam Weinig <sam@webkit.org> + + Reviewed by Anders Carlsson. + + WKErrors need the PeerCertificateChain for certificate errors + <rdar://problem/8951784> + https://bugs.webkit.org/show_bug.cgi?id=56592 + + * Shared/WebCoreArgumentCoders.h: + Special case encoding/decoding of ResourceErrors for the mac. + + * Shared/mac/PlatformCertificateInfo.h: + * Shared/mac/PlatformCertificateInfo.mm: + (WebKit::PlatformCertificateInfo::PlatformCertificateInfo): + Add constructor that take the PeerCertificateChain as CFArrayRef. + + * Shared/mac/WebCoreArgumentCodersMac.mm: + (CoreIPC::encodeResourceError): + (CoreIPC::decodeResourceError): + Add encode/decode for ResourceError using the underlying NSError + and encoding/decoding as much of the userInfo as we know how to. + Right now this includes all string values and the PeerCertificateChain. + +2011-03-17 John Sullivan <sullivan@apple.com> + + Reviewed by Adam Roben. + + https://bugs.webkit.org/show_bug.cgi?id=56574 + Dealloc'ing a WKView can leave a stale reference to it in NSWindow + + * UIProcess/API/mac/WKView.mm: + (-[WKView viewWillMoveToWindow:]): + Clear the outgoing window's growBoxOwner if it is this view. + +2011-03-17 Anders Carlsson <andersca@apple.com> + + Rubber-stamped by John Sullivan. + + Rename PluginProcessShim.cpp to PluginProcessShim.mm. + + * PluginProcess/mac/PluginProcessShim.cpp: Removed. + * PluginProcess/mac/PluginProcessShim.mm: Copied from PluginProcess/mac/PluginProcessShim.cpp. + * WebKit2.xcodeproj/project.pbxproj: + +2011-03-17 Anders Carlsson <andersca@apple.com> + + Reviewed by Darin Adler. + + Invalidate all NPObjects for a plug-in when that plug-in is destroyed + https://bugs.webkit.org/show_bug.cgi?id=56511 + <rdar://problem/8993491> + + Before this change, we would invalidate NPObjectProxy objects and delete NPObjectMessageReceiver + objects when the last plug-in of a certain type was destroyed. Doing so caused us to hold on to memory + which we don't need, and could also lead to crashes if the NPObjectMessageReceiver would get a message and + tried to invoke it on a already deallocated NPObject. + + * PluginProcess/PluginControllerProxy.cpp: + (WebKit::PluginControllerProxy::initialize): + If we fail to initialize, call removePluginControllerProxy instead of having WebProcessConnection do so. + + (WebKit::PluginControllerProxy::destroy): + Pass the plug-in to removePluginControllerProxy. + + * PluginProcess/WebProcessConnection.cpp: + (WebKit::WebProcessConnection::removePluginControllerProxy): + Call NPRemoteObjectMap::pluginDestroyed when the plug-in has been destroyed. + + (WebKit::WebProcessConnection::createPlugin): + Don't call removePluginControllerProxy if the plug-in fails to initialize. PluginControllerProxy::initialize now + takes care of doing this. + + * Shared/Plugins/NPObjectMessageReceiver.cpp: + (WebKit::NPObjectMessageReceiver::NPObjectMessageReceiver): + (WebKit::NPObjectMessageReceiver::~NPObjectMessageReceiver): + * Shared/Plugins/NPObjectMessageReceiver.h: + Remove m_shouldReleaseObjectWhenInvalidating, we now know that no NPObjects will have been deallocated + by the time the NPObjectMessageReceiver is destroyed. + + (WebKit::NPObjectMessageReceiver::plugin): + Add getter. + + * Shared/Plugins/NPObjectProxy.h: + (WebKit::NPObjectProxy::plugin): + Add getter. + + * Shared/Plugins/NPRemoteObjectMap.cpp: + (WebKit::NPRemoteObjectMap::NPRemoteObjectMap): + Remove m_isInvalidating. + + (WebKit::NPRemoteObjectMap::npObjectProxyDestroyed): + Simplify code. + + (WebKit::NPRemoteObjectMap::pluginDestroyed): + Rename invalidate to pluginDestroyed. Only invalidate/delete objects that belong to the given plug-in. + + * Shared/Plugins/NPRemoteObjectMap.h: + Remove m_isInvalidating. + + * WebProcess/Plugins/PluginProcessConnection.cpp: + (WebKit::PluginProcessConnection::removePluginProxy): + Call NPRemoteObjectMap::pluginDestroyed when the plug-in has been destroyed. + +2011-03-17 Oleg Romashin <oleg.romashin@nokia.com> + + Reviewed by Anders Carlsson. + + Teach WebKit2 messages.py generator to ifdef headers include + which are related to ifdef-ed methods/types + https://bugs.webkit.org/show_bug.cgi?id=55658 + + * Scripts/webkit2/messages.py: + * Scripts/webkit2/messages_unittest.py: + +2011-03-16 Joseph Pecoraro <joepeck@webkit.org> + + Reviewed by Kenneth Rohde Christiansen. + + Viewport no longer allows an auto value for "user-scalable" + https://bugs.webkit.org/show_bug.cgi?id=55416 + + Make the default value for userScalable be true. + + * UIProcess/API/qt/qwkpage.cpp: + (QWKPage::viewportAttributesForSize): + +2011-03-16 Anders Carlsson <andersca@apple.com> + + Reviewed by Dan Bernstein. + + NPObjectProxy and NPObjectMessageReceiver objects should know their Plugin object + https://bugs.webkit.org/show_bug.cgi?id=56506 + + * PluginProcess/PluginControllerProxy.cpp: + (WebKit::PluginControllerProxy::windowScriptNPObject): + (WebKit::PluginControllerProxy::pluginElementNPObject): + (WebKit::PluginControllerProxy::evaluate): + (WebKit::PluginControllerProxy::getPluginScriptableNPObject): + * Shared/Plugins/NPObjectMessageReceiver.cpp: + (WebKit::NPObjectMessageReceiver::create): + (WebKit::NPObjectMessageReceiver::NPObjectMessageReceiver): + (WebKit::NPObjectMessageReceiver::invoke): + (WebKit::NPObjectMessageReceiver::invokeDefault): + (WebKit::NPObjectMessageReceiver::getProperty): + (WebKit::NPObjectMessageReceiver::setProperty): + (WebKit::NPObjectMessageReceiver::construct): + * Shared/Plugins/NPObjectMessageReceiver.h: + * Shared/Plugins/NPObjectProxy.cpp: + (WebKit::NPObjectProxy::create): + (WebKit::NPObjectProxy::NPObjectProxy): + (WebKit::NPObjectProxy::invalidate): + (WebKit::NPObjectProxy::initialize): + (WebKit::NPObjectProxy::invoke): + (WebKit::NPObjectProxy::invokeDefault): + (WebKit::NPObjectProxy::getProperty): + (WebKit::NPObjectProxy::setProperty): + (WebKit::NPObjectProxy::construct): + * Shared/Plugins/NPObjectProxy.h: + * Shared/Plugins/NPRemoteObjectMap.cpp: + (WebKit::NPRemoteObjectMap::createNPObjectProxy): + (WebKit::NPRemoteObjectMap::registerNPObject): + (WebKit::NPRemoteObjectMap::npVariantToNPVariantData): + (WebKit::NPRemoteObjectMap::npVariantDataToNPVariant): + * Shared/Plugins/NPRemoteObjectMap.h: + * WebProcess/Plugins/PluginProxy.cpp: + (WebKit::PluginProxy::pluginScriptableNPObject): + (WebKit::PluginProxy::getWindowScriptNPObject): + (WebKit::PluginProxy::getPluginElementNPObject): + (WebKit::PluginProxy::evaluate): + +2011-03-16 Beth Dakin <bdakin@apple.com> + + Reviewed by Darin Adler. + + Fix for https://bugs.webkit.org/show_bug.cgi?id=54987 Crash beneath + WebPageProxy::viewWillStartLiveResize when resizing window after web process + crashed + -and corresponding- + <rdar://problem/9037685> + + Just need simple isValid() checks here. + * UIProcess/WebPageProxy.cpp: + (WebKit::WebPageProxy::initializeUIClient): + (WebKit::WebPageProxy::viewWillStartLiveResize): + (WebKit::WebPageProxy::viewWillEndLiveResize): + +2011-03-16 Damian Kaleta <dkaleta@apple.com> + + Reviewed by Kevin Decker. + + Add a user default that will force all plugins to opt in to non-executable data + https://bugs.webkit.org/show_bug.cgi?id=56487 + <rdar://problem/9109095> + + * UIProcess/Plugins/PluginProcessProxy.cpp: + (WebKit::PluginProcessProxy::PluginProcessProxy): + * UIProcess/Plugins/PluginProcessProxy.h: + * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: + (WebKit::PluginProcessProxy::pluginNeedsExecutableHeap): + +2011-03-16 Chris Fleizach <cfleizach@apple.com> + + Reviewed by Darin Adler. + + WK2: Need to propagate enhanced accessibility flag from UI -> web process + https://bugs.webkit.org/show_bug.cgi?id=56379 + + Support sending the enhanced accessibility flag between processes. + + * UIProcess/WebContext.cpp: + (WebKit::WebContext::~WebContext): + (WebKit::WebContext::setEnhancedAccessibility): + * UIProcess/WebContext.h: + * UIProcess/gtk/WebContextGtk.cpp: + (WebKit::WebContet::platformInvalidateContext): + * UIProcess/mac/WebContextMac.mm: + (WebKit::WebContext::platformInitializeWebProcess): + (WebKit::WebContext::platformInvalidateContext): + * UIProcess/qt/WebContextQt.cpp: + (WebKit::WebContext::platformInvalidateContext): + * UIProcess/win/WebContextWin.cpp: + (WebKit::WebContext::platformInvalidateContext): + * WebProcess/WebProcess.cpp: + (WebKit::WebProcess::setEnhancedAccessibility): + * WebProcess/WebProcess.h: + * WebProcess/WebProcess.messages.in: + +2011-03-15 Oliver Hunt <oliver@apple.com> + + Reviewed by Geoffrey Garen. + + Make Structure creation require a JSGlobalData + https://bugs.webkit.org/show_bug.cgi?id=56438 + + Mechanical change to make all Structure creation use a JSGlobalData&. + + * WebProcess/Plugins/Netscape/JSNPMethod.cpp: + (WebKit::JSNPMethod::JSNPMethod): + * WebProcess/Plugins/Netscape/JSNPMethod.h: + (WebKit::JSNPMethod::createStructure): + * WebProcess/Plugins/Netscape/JSNPObject.cpp: + (WebKit::JSNPObject::JSNPObject): + * WebProcess/Plugins/Netscape/JSNPObject.h: + (WebKit::JSNPObject::createStructure): + +2011-03-16 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Dan Bernstein. + + WebKit2: Sometimes Command-[ opens a new tab and loads the back page in it + https://bugs.webkit.org/show_bug.cgi?id=56477 + <rdar://problem/8806664> + + * UIProcess/API/mac/PageClientImpl.mm: (WebKit::PageClientImpl::doneWithKeyEvent): + Set NSApplication current event when re-dispatching a key event that returned from the web + process unhandled. That way, code that looks at current event modifiers won't be confused. + +2011-03-16 Sam Weinig <sam@webkit.org> + + Reviewed by Adam Roben. + + Add WebKit2 API to figure out if an input or textarea was edited + https://bugs.webkit.org/show_bug.cgi?id=56474 + + Expose WKBundleNodeHandleGetHTMLInputElementLastChangeWasUserEdit and + WKBundleNodeHandleGetHTMLTextAreaElementLastChangeWasUserEdit. Next time, + I will work on giving these functions longer names. + + * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp: + (WKBundleNodeHandleGetHTMLInputElementLastChangeWasUserEdit): + (WKBundleNodeHandleGetHTMLTextAreaElementLastChangeWasUserEdit): + * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h: + * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp: + (WebKit::InjectedBundleNodeHandle::htmlInputElementLastChangeWasUserEdit): + (WebKit::InjectedBundleNodeHandle::htmlTextAreaElementLastChangeWasUserEdit): + * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h: + +2011-03-16 Brady Eidson <beidson@apple.com> + + Reviewed by Adam Roben. + + https://bugs.webkit.org/show_bug.cgi?id=56467 + IconDatabase-related crash seen in WK2 tests + + * WebProcess/IconDatabase/WebIconDatabaseProxy.cpp: + (WebKit::WebIconDatabaseProxy::setIconDataForIconURL): The IconLoader might set a null data for an icon, so handle that case. + +2011-03-16 Benjamin Poulain <benjamin.poulain@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt][WK2] Loading an empty URL crashes + https://bugs.webkit.org/show_bug.cgi?id=55501 + + A null WKURLRef is created in the API of WebKit 2 when converting a null string. The code + of WKPageLoadURL assume the WKPageRef is not null which causes crashes if it is. + + This patch uses the converter toWTFString() to pass from WKPageRef to WTFString. This converter + ensure the returned string is a valid null string. + + Tested through the Qt API tests. + + * UIProcess/API/C/WKPage.cpp: + (WKPageLoadURL): + * UIProcess/API/qt/tests/qgraphicswkview/tst_qgraphicswkview.cpp: + (tst_QGraphicsWKView::loadEmptyUrl): + * UIProcess/API/qt/tests/qwkpage/qwkpage.pro: Added. + * UIProcess/API/qt/tests/qwkpage/tst_qwkpage.cpp: Added. + (tst_QWKPage::init): + (tst_QWKPage::cleanup): + (tst_QWKPage::loadEmptyUrl): + * UIProcess/API/qt/tests/tests.pro: + +2011-03-15 Brady Eidson <beidson@apple.com> + + Reviewed by Sam Weinig. + + https://bugs.webkit.org/show_bug.cgi?id=56425 + WebKit2 icon database. + + Project file paperwork: + * DerivedSources.make: + * DerivedSources.pro: + * GNUmakefile.am: + * WebKit2.pri: + * WebKit2.pro: + * WebKit2.xcodeproj/project.pbxproj: + * win/WebKit2.vcproj: + * win/WebKit2Common.vsprops: + * Scripts/webkit2/messages.py: Special-case capitalization for messages that start with "URL" to be lowercased + to "url" instead of "uRL". + + Add messaging-related stuff: + * Platform/CoreIPC/MessageID.h: + * UIProcess/WebIconDatabase.messages.in: Added. + * WebProcess/IconDatabase/WebIconDatabaseProxy.messages.in: Added. + * UIProcess/WebProcessProxy.cpp: + (WebKit::WebProcessProxy::didReceiveMessage): + (WebKit::WebProcessProxy::didReceiveSyncMessage): + + Prep to make WebIconDatabase an API object: + * Shared/APIObject.h: + + Add an "icon DB is enabled" flag to WebProcessCreationParameters: + * Shared/WebProcessCreationParameters.cpp: + (WebKit::WebProcessCreationParameters::encode): + (WebKit::WebProcessCreationParameters::decode): + * Shared/WebProcessCreationParameters.h: + + Add SPI for client apps to set the icon database path: + * UIProcess/API/C/WKContext.cpp: + (WKContextSetIconDatabasePath): + * UIProcess/API/C/WKContextPrivate.h: + * UIProcess/WebContext.h: + (WebKit::WebContext::setIconDatabasePath): + + Hook up initialization, clearing, and messaging for the icon database: + * UIProcess/WebContext.cpp: + (WebKit::WebContext::WebContext): + (WebKit::WebContext::~WebContext): + (WebKit::WebContext::ensureWebProcess): + (WebKit::WebContext::didReceiveMessage): + (WebKit::WebContext::didReceiveSyncMessage): + (WebKit::WebContext::iconDatabasePath): + * UIProcess/gtk/WebContextGtk.cpp: + (WebKit::WebContext::platformDefaultIconDatabasePath): + * UIProcess/mac/WebContextMac.mm: + (WebKit::WebContext::platformDefaultIconDatabasePath): + * UIProcess/qt/WebContextQt.cpp: + (WebKit::WebContext::platformDefaultIconDatabasePath): + * UIProcess/win/WebContextWin.cpp: + (WebKit::WebContext::platformDefaultIconDatabasePath): + + Add the UIProcess-side IconDatabase. It will be the "actual database" as well as the API object: + * UIProcess/WebIconDatabase.cpp: Added. + (WebKit::WebIconDatabase::create): + (WebKit::WebIconDatabase::~WebIconDatabase): + (WebKit::WebIconDatabase::WebIconDatabase): + (WebKit::WebIconDatabase::invalidate): + (WebKit::WebIconDatabase::retainIconForPageURL): + (WebKit::WebIconDatabase::releaseIconForPageURL): + (WebKit::WebIconDatabase::setIconURLForPageURL): + (WebKit::WebIconDatabase::setIconDataForIconURL): + (WebKit::WebIconDatabase::iconDataForPageURL): + (WebKit::WebIconDatabase::iconURLForPageURL): + (WebKit::WebIconDatabase::iconDataKnownForIconURL): + (WebKit::WebIconDatabase::loadDecisionForIconURL): + (WebKit::WebIconDatabase::didReceiveMessage): + (WebKit::WebIconDatabase::didReceiveSyncMessage): + * UIProcess/WebIconDatabase.h: Added. + (WebKit::WebIconDatabase::clearContext): + (WebKit::WebIconDatabase::type): + + Add the WebProcess-side IconDatabaseProxy. It acts as the WebCore IconDatabase and operates via messaging: + * WebProcess/IconDatabase: Added. + * WebProcess/IconDatabase/WebIconDatabaseProxy.cpp: Added. + (WebKit::WebIconDatabaseProxy::~WebIconDatabaseProxy): + (WebKit::WebIconDatabaseProxy::WebIconDatabaseProxy): + (WebKit::WebIconDatabaseProxy::isEnabled): + (WebKit::WebIconDatabaseProxy::setEnabled): + (WebKit::WebIconDatabaseProxy::iconForPageURL): + (WebKit::WebIconDatabaseProxy::retainIconForPageURL): + (WebKit::WebIconDatabaseProxy::releaseIconForPageURL): + (WebKit::WebIconDatabaseProxy::iconURLForPageURL): + (WebKit::WebIconDatabaseProxy::iconDataKnownForIconURL): + (WebKit::WebIconDatabaseProxy::loadDecisionForIconURL): + (WebKit::WebIconDatabaseProxy::setIconURLForPageURL): + (WebKit::WebIconDatabaseProxy::setIconDataForIconURL): + (WebKit::WebIconDatabaseProxy::urlImportFinished): + (WebKit::WebIconDatabaseProxy::didReceiveMessage): + * WebProcess/IconDatabase/WebIconDatabaseProxy.h: Added. + + Hook up initialization and messaging for the icon database proxy: + * WebProcess/WebProcess.cpp: + (WebKit::WebProcess::WebProcess): + (WebKit::WebProcess::initializeWebProcess): + (WebKit::WebProcess::didReceiveMessage): + * WebProcess/WebProcess.h: + +2011-03-15 Sam Weinig <sam@webkit.org> + + Reviewed by Anders Carlsson. + + WebKit2: False SPOD cursor when context menu is open + <rdar://problem/9029154> + https://bugs.webkit.org/show_bug.cgi?id=56433 + + * UIProcess/WebPageProxy.cpp: + (WebKit::WebPageProxy::showContextMenu): + Update to match showPopupMenu idiomatically, and stop the responsivenessTimer + since the act of showing the context menu could spin a nested runloop. + + * UIProcess/mac/WebContextMenuProxyMac.mm: + (WebKit::WebContextMenuProxyMac::showContextMenu): + * UIProcess/qt/WebContextMenuProxyQt.cpp: + (WebKit::WebContextMenuProxyQt::showContextMenu): + * UIProcess/win/WebContextMenuProxyWin.cpp: + (WebKit::WebContextMenuProxyWin::showContextMenu): + Move isEmpty() check to implementations, since we don't want to show + this in any case, not just the one where we check it. + +2011-03-15 Siddharth Mathur <siddharth.mathur@nokia.com> + + Reviewed by Laszlo Gombos. + + [Qt][Symbian][WK2] Fix exporting and importing the WebProcessMainQt symbol + https://bugs.webkit.org/show_bug.cgi?id=56417 + + Use the Q_DECL_EXPORT and Q_DECL_IMPORT macros directly to make sure + the symbol is always exported/imported. + + * WebProcess/qt/WebProcessMainQt.cpp: + (WebKit::WebProcessMainQt): + * qt/MainQt.cpp: + +2011-03-15 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Darin Adler. + + REGRESSION (WebKit2): keygen element doesn't work + https://bugs.webkit.org/show_bug.cgi?id=56402 + <rdar://problem/9006545> + + * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: + * WebProcess/WebCoreSupport/WebPlatformStrategies.h: + Added strings used by keygen. + + * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: Initialize a WebCore pointer to + a function used by keygen. + +2011-03-15 Beth Dakin <bdakin@apple.com> + + Reviewed by Simon Fraser. + + WebKit2 part of <rdar://problem/9075624> Overlay scrollbars slow down PLT by 6% + + New WebKitystemInterface function to force the scrollbars to flash + * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: + (InitWebCoreSystemInterface): + +2011-03-15 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Make sure that NP_Shutdown is always the last NPP function called + https://bugs.webkit.org/show_bug.cgi?id=56391 + <rdar://problem/8989902> + + Make sure to always increment the load count whenever a web process connection + is opened to a plug-in process, and decrement it when the last web process connection + goes away. + + * PluginProcess/PluginProcess.cpp: + (WebKit::PluginProcess::createWebProcessConnection): + (WebKit::PluginProcess::startShutdownTimerIfNecessary): + * Shared/Plugins/Netscape/NetscapePluginModule.cpp: + * Shared/Plugins/Netscape/NetscapePluginModule.h: + * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: + (WebKit::NetscapePlugin::NetscapePlugin): + (WebKit::NetscapePlugin::~NetscapePlugin): + +2011-03-15 Martin Robinson <mrobinson@igalia.com> + + Reviewed by Adam Barth. + + [GTK] [WebKit2] The UIProcess never changes the mouse cursor + https://bugs.webkit.org/show_bug.cgi?id=56333 + + Add an implementation for WebView::addCursor for WebKit2 GTK+. This allows + the cursor to change as the user mouses around the page. There is currently + no test infrastructure to track cursor changes. + + * UIProcess/gtk/WebView.cpp: + (WebKit::WebView::setCursor): Ported implementation from WebKit1. + +2011-03-15 Kevin Ollivier <kevino@theolliviers.com> + + Reviewed by Darin Adler. + + Introduce WTF_USE_EXPORT_MACROS, which will allow us to put shared library import/export + info into the headers rather than in export symbol definition files, but disable it on + all platforms initially so we can deal with port build issues one port at a time. + + https://bugs.webkit.org/show_bug.cgi?id=27551 + + * config.h: + +2011-03-14 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Darin Adler. + + REGRESSION: Print preview is blank when selecting multiple pages per sheet + https://bugs.webkit.org/show_bug.cgi?id=56341 + <rdar://problem/8991382> + + * UIProcess/API/mac/WKPrintingView.mm: (pageDidDrawToPDF): Don't reset latest expected + callback number after receiving a different one. We only update preview after receiving + the latest expected page data (and the assumption is that AppKit will ask for pages in + natural order for N-up). + +2011-03-14 Adam Roben <aroben@apple.com> + + Make WKBundlePageCanHandleRequest return true for empty document URLs + + Reviewed by Sam Weinig. + + * WebProcess/WebPage/WebPage.cpp: + (WebKit::WebPage::canHandleRequest): Return true for any URL schemes that are handled as + empty documents, and defer to the platform for everything else. + + * WebProcess/WebPage/WebPage.h: Added platformCanHandleRequest. + + * WebProcess/WebPage/mac/WebPageMac.mm: + (WebKit::WebPage::platformCanHandleRequest): + * WebProcess/WebPage/qt/WebPageQt.cpp: + (WebKit::WebPage::platformCanHandleRequest): + * WebProcess/WebPage/win/WebPageWin.cpp: + (WebKit::WebPage::platformCanHandleRequest): + Renamed from canHandleRequest. + +2011-03-14 Chris Fleizach <cfleizach@apple.com> + + Reviewed by Beth Dakin. + + CrashTracer: 60 crashes in WebProcess at com.apple.WebKit2: -[AccessibilityWebPageObject accessibilityHitTest:] + 248 + https://bugs.webkit.org/show_bug.cgi?id=56336 + + Crash trace indicates a nil pointer access in one of these m_page->mainFrame()->coreFrame()->view() + pointers. + + * WebProcess/WebPage/mac/AccessibilityWebPageObject.mm: + (-[AccessibilityWebPageObject accessibilityHitTest:]): + +2011-03-14 Alice Liu <alice.liu@apple.com> + + Reviewed by Sam Weinig. + + Provide API for creating WKImage from CGImageRef + https://bugs.webkit.org/show_bug.cgi?id=56159 + + Add function for creating a WKImage from CGImage data. + * Shared/API/c/cg/WKImageCG.cpp: + (WKImageCreateFromCGImage): Added. Creates a graphics context for the bitmap-backed image and draws into it. + * Shared/API/c/cg/WKImageCG.h: + +2011-03-14 Balazs Kelemen <kbalazs@webkit.org> + + Reviewed by Adam Roben. + + [Qt][WK2]Unbreak InjectedBundle on Qt + https://bugs.webkit.org/show_bug.cgi?id=54109 + + Add API's to WKURL and WKString to satisfy + WebKitTestRunner's needs. + + * Shared/API/c/WKString.cpp: + (WKStringIsEqualToUTF8CStringIgnoringCase): + * Shared/API/c/WKString.h: + * Shared/API/c/WKURL.cpp: + (WKURLCopyHostName): + (WKURLCopyScheme): + * Shared/API/c/WKURL.h: + * Shared/WebString.h: + (WebKit::WebString::equalToUTF8StringIgnoringCase): + * Shared/WebURL.h: Added OwnPtr<KURL> member to be able + to lazily parse the URL and store the result. + (WebKit::WebURL::host): + (WebKit::WebURL::protocol): + (WebKit::WebURL::parseURLIfNecessary): + * win/WebKit2.def: Revert the symbol exports that were + needed to use KURL in WebKitTestRunner. + +2011-03-14 Jeff Miller <jeffm@apple.com> + + Reviewed by Adam Roben. + + Add WKViewSetScrollOffsetOnNextResize() to C API on Windows + https://bugs.webkit.org/show_bug.cgi?id=56340 + + * UIProcess/API/C/win/WKView.cpp: + (WKViewSetScrollOffsetOnNextResize): Added. + * UIProcess/API/C/win/WKView.h: Added WKViewSetScrollOffsetOnNextResize(). + * UIProcess/win/WebView.cpp: + (WebKit::WebView::onSizeEvent): Apply any scroll offset when setting the drawing area size. + (WebKit::WebView::setScrollOffsetOnNextResize): Added. + * UIProcess/win/WebView.h: Added setScrollOffsetOnNextResize(). + +2011-03-14 Brian Weinstein <bweinstein@apple.com> + + Reviewed by Adam Roben and Gavin Barraclough. + + FileSystemWin.cpp needs listDirectory() implementation + https://bugs.webkit.org/show_bug.cgi?id=56331 + <rdar://problem/9126635> + + Move PathWalker down into WebCore, and call the PathWalker in WebCore + (that now has a second argument, the pattern to take). + + * UIProcess/Plugins/win/PluginInfoStoreWin.cpp: + (WebKit::PluginInfoStore::pluginPathsInDirectory): + +2011-03-14 Sam Weinig <sam@webkit.org> + + Reviewed by Darin Adler. + + WebKit2: No icon shown for <input type=file> + <rdar://problem/8988982> + https://bugs.webkit.org/show_bug.cgi?id=54288 + + * WebProcess/WebCoreSupport/WebChromeClient.cpp: + (WebKit::WebChromeClient::chooseIconForFiles): + Add implementation for chooseIconForFiles which calls down to Icon::createIconForFiles. + +2011-03-14 Brady Eidson <beidson@apple.com> + + Reviewed by Dan Bernstein. + + <rdar://problem/8762095> and https://bugs.webkit.org/show_bug.cgi?id=55172 + Need WK2 API to view/manage origins with LocalStorage + + Hookup the existing API stubs to the WebCore implementations: + * WebProcess/KeyValueStorage/WebKeyValueStorageManager.cpp: + (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins): + (WebKit::WebKeyValueStorageManager::deleteEntriesForOrigin): + (WebKit::WebKeyValueStorageManager::deleteAllEntries): + +2011-03-13 Brady Eidson <beidson@apple.com> + + Reviewed by Sam Weinig. + + <rdar://problem/9127270> and https://bugs.webkit.org/show_bug.cgi?id=56282 + + Pass the path along with creation parameters: + * Shared/WebProcessCreationParameters.cpp: + (WebKit::WebProcessCreationParameters::encode): + (WebKit::WebProcessCreationParameters::decode): + * Shared/WebProcessCreationParameters.h: + + Add SPI to set the path: + * UIProcess/API/C/WKContext.cpp: + (WKContextSetLocalStorageDirectory): + * UIProcess/API/C/WKContextPrivate.h: + + Pass the path along in the process creation parameters: + * UIProcess/WebContext.cpp: + (WebKit::WebContext::ensureWebProcess): + (WebKit::WebContext::localStorageDirectory): + * UIProcess/WebContext.h: + (WebKit::WebContext::setLocalStorageDirectory): + + * UIProcess/gtk/WebContextGtk.cpp: + (WebKit::WebContext::platformDefaultLocalStorageDirectory): + * UIProcess/mac/WebContextMac.mm: + (WebKit::WebContext::platformDefaultLocalStorageDirectory): + * UIProcess/qt/WebContextQt.cpp: + (WebKit::WebContext::platformDefaultLocalStorageDirectory): + * UIProcess/win/WebContextWin.cpp: + (WebKit::WebContext::platformDefaultLocalStorageDirectory): + + Include the path with settings updates, because WebCore needs it set on the Settings object: + * WebProcess/WebPage/WebPage.cpp: + (WebKit::WebPage::updatePreferences): + + * WebProcess/WebProcess.cpp: + (WebKit::WebProcess::initializeWebProcess): + * WebProcess/WebProcess.h: + (WebKit::WebProcess::localStorageDirectory): + + Sandboxing stuff: + * WebProcess/com.apple.WebProcess.sb: + * WebProcess/mac/WebProcessMac.mm: + (WebKit::initializeSandbox): + +2011-03-12 Jer Noble <jer.noble@apple.com> + + Reviewed by Mark Rowe. + + WebKit2: Build WKFullScreenWindowController cleanly in 32-bit. + https://bugs.webkit.org/show_bug.cgi?id=56260 + + Include <Carbon/Carbon.h> instead of <HIToolbox/MacApplication.h>. + + * UIProcess/mac/WKFullScreenWindowController.mm: + +2011-03-13 Sam Weinig <sam@webkit.org> + + Reviewed by Anders Carlsson. + + Add ability to create a WKErrorRef + <rdar://problem/9115768> + https://bugs.webkit.org/show_bug.cgi?id=56279 + + * Shared/API/c/cf/WKErrorCF.cpp: Added. + (WKErrorCreateWithCFError): + (WKErrorCopyCFError): + * Shared/API/c/cf/WKErrorCF.h: Added. + Add new API to create a WKErrorRef from a CFErrorRef + and vice-versa. + + * WebKit2.xcodeproj/project.pbxproj: + * win/WebKit2.vcproj: + * win/WebKit2Generated.make: + Add new files. + +2011-03-13 Pratik Solanki <psolanki@apple.com> + + Reviewed by Brady Eidson. + + Make adjustMIMETypeIfNecessary use CFNetwork directly + https://bugs.webkit.org/show_bug.cgi?id=55912 + + * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: + (InitWebCoreSystemInterface): Support for new WKSI functions. + +2011-03-13 Dan Bernstein <mitz@apple.com> + + Reviewed by Darin Adler. + + WebPageProxy cleanup + https://bugs.webkit.org/show_bug.cgi?id=56267 + + * UIProcess/WebPageProxy.cpp: Moved all Mac-only function implementations from + here to WebPageProxyMac.mm. + * UIProcess/WebPageProxy.h: Cleaned up #includes. + * UIProcess/mac/WebPageProxyMac.mm: Moved all Mac-only function implementations + here. + (WebKit::WebPageProxy::updateWindowIsVisible): + (WebKit::WebPageProxy::windowAndViewFramesChanged): + (WebKit::WebPageProxy::getMarkedRange): + (WebKit::WebPageProxy::characterIndexForPoint): + (WebKit::WebPageProxy::firstRectForCharacterRange): + (WebKit::WebPageProxy::writeSelectionToPasteboard): + (WebKit::WebPageProxy::setDragImage): + (WebKit::WebPageProxy::performDictionaryLookupAtLocation): + (WebKit::WebPageProxy::interpretKeyEvent): + (WebKit::WebPageProxy::sendComplexTextInputToPlugin): + (WebKit::WebPageProxy::uppercaseWord): + (WebKit::WebPageProxy::lowercaseWord): + (WebKit::WebPageProxy::capitalizeWord): + (WebKit::WebPageProxy::setSmartInsertDeleteEnabled): + (WebKit::WebPageProxy::didPerformDictionaryLookup): + (WebKit::WebPageProxy::registerWebProcessAccessibilityToken): + (WebKit::WebPageProxy::registerUIProcessAccessibilityTokens): + (WebKit::WebPageProxy::setComplexTextInputEnabled): + +2011-03-13 Dan Bernstein <mitz@apple.com> + + Reviewed by Darin Adler. + + <rdar://problem/8949683> WebKit2: Drag image is offset when the page is scrolled down + https://bugs.webkit.org/show_bug.cgi?id=56265 + + * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm: + (WebKit::WebDragClient::startDrag): Send the location in view coordinates rather than + document coordinates. + +2011-03-13 Dan Bernstein <mitz@apple.com> + + Reviewed by Mark Rowe. + + Fix a crash when dragging. + + * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm: + (WebKit::convertImageToBitmap): Retain the saved context. + +2011-03-12 Darin Adler <darin@apple.com> + + * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm: + (WebKit::WebDragClient::startDrag): Fixed typo in a comment. + +2011-03-11 Darin Adler <darin@apple.com> + + Reviewed by Sam Weinig. + + Dragging image to desktop gives webloc instead of image file in WebKit2 + https://bugs.webkit.org/show_bug.cgi?id=56193 + + * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm: + (WebKit::convertImageToBitmap): Added. Factored out from startDrag to + make the startDrag code clearer. + (WebKit::WebDragClient::startDrag): Streamlined code a bit. + (WebKit::cachedImage): Added. Helper for function below. + (WebKit::arrayForURLsWithTitles): Added. Helper for function below. + (WebKit::WebDragClient::declareAndWriteDragImage): Added code to handle file + promises and removed a log of uneeded code. + (-[WKPasteboardFilePromiseOwner copyDropDirectory]): Added. + (promisedDataClient): Added. + (-[WKPasteboardOwner clearImage]): Added. + (-[WKPasteboardOwner initWithImage:]): Added. + (-[WKPasteboardOwner dealloc]): Added. + (-[WKPasteboardOwner finalize]): Added. + (-[WKPasteboardOwner pasteboard:provideDataForType:]): Added. + (-[WKPasteboardOwner pasteboardChangedOwner:]): Added. + (matchesExtensionOrEquivalent): Added. + (-[WKPasteboardOwner namesOfPromisedFilesDroppedAtDestination:]): Added. + Much of the new code above came from the WebKit1 drag code. + + * WebProcess/WebPage/WebPage.cpp: + (WebKit::WebPage::dragEnded): Added call to Mac-only platformDragEnded. + * WebProcess/WebPage/WebPage.h: Added Mac-only platformDragEnded and m_dragSource. + * WebProcess/WebPage/mac/WebPageMac.mm: + (WebKit::WebPage::setDragSource): Added. + (WebKit::WebPage::platformDragEnded): Added. + +2011-03-12 Mark Rowe <mrowe@apple.com> + + Fix the 32-bit build. + + This involves hacking around some HIToolbox headers that do things of dubious correctness, + and fixing the usual CGRect vs NSRect issues. + + * UIProcess/mac/WKFullScreenWindowController.mm: + (-[WKFullScreenWindowController enterFullScreen:]): NSRect is not CGRect. + * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm: + (WebKit::WebFullScreenManagerMac::beginExitFullScreenAnimation): Ditto. + +2011-03-12 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + * WebProcess/WebPage/WebFrame.cpp: + (WebKit::WebFrame::url): + Get the URL from the loader, not from the document. + + (WebKit::WebFrame::suggestedFilenameForResourceWithURL): + Return the correct suggested filename for the main resource. + + (WebKit::WebFrame::mimeTypeForResourceWithURL): + Return the correct mime type for the main resource. + +2011-03-12 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Should be able to download a PDF to the Downloads folder + https://bugs.webkit.org/show_bug.cgi?id=56256 + + * UIProcess/API/C/WKPage.h: + Add WKPageSaveDataToFileInDownloadsFolderCallback to the UI client. + + * UIProcess/API/mac/PDFViewController.h: + * UIProcess/API/mac/PDFViewController.mm: + (-[WKPDFView _applyPDFPreferences]): + (-[WKPDFView _updatePreferences:]): + Use new PDFViewController::page getter. + + (-[WKPDFView PDFViewSavePDFToDownloadFolder:]): + Call PDFViewController::savePDFToDownloadsFolder. + + (WebKit::releaseCFData): + (WebKit::PDFViewController::savePDFToDownloadsFolder): + Create a WebData that wraps the CFData, then pass it along to + WebPageProxy::saveDataToFileInDownloadsFolder. + + * UIProcess/WebPageProxy.cpp: + (WebKit::WebPageProxy::saveDataToFileInDownloadsFolder): + Call WebUIClient::saveDataToFileInDownloadsFolder. + + (WebKit::WebUIClient::saveDataToFileInDownloadsFolder): + * UIProcess/WebUIClient.h: + Call the UI client callback function. + +2011-03-12 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + WebData should be able to wrap already existing data + https://bugs.webkit.org/show_bug.cgi?id=56254 + + * Shared/WebData.h: + (WebKit::WebData::createWithoutCopying): + (WebKit::WebData::create): + (WebKit::WebData::~WebData): + (WebKit::WebData::bytes): + (WebKit::WebData::size): + (WebKit::WebData::WebData): + (WebKit::WebData::fastFreeBytes): + +2011-03-12 Jer Noble <jer.noble@apple.com> + + Reviewed by Eric Carlson. + + WebKit2: Initialize the WebFullScreenManagerProxy with a WKView + https://bugs.webkit.org/show_bug.cgi?id=56250 + + * UIProcess/API/mac/WKView.mm: + (-[WKView initWithFrame:contextRef:pageGroupRef:]): Call fullScreenManager()->setView(self). + +2011-03-11 Jer Noble <jer.noble@apple.com> + + Reviewed by Anders Carlsson. + + Add full screen animation code to WebFullScreenManager. + https://bugs.webkit.org/show_bug.cgi?id=56220 + + * WebProcess/FullScreen/WebFullScreenManager.cpp: . + (WebKit::WebFullScreenManager::~WebFullScreenManager): Added. + (WebKit::WebFullScreenManager::exitFullScreenForElement): Remove ASSERTs. + (WebKit::WebFullScreenManager::willEnterFullScreen): Set the full screen renderer's background color. + (WebKit::WebFullScreenManager::didEnterFullScreen): Ditto. + (WebKit::WebFullScreenManager::willExitFullScreen): Ditto. + (WebKit::WebFullScreenManager::didExitFullScreen): Ditto. + * WebProcess/FullScreen/WebFullScreenManager.h: Make a few functions pure virtual to be implemented in a + concrete subclass. + * WebProcess/FullScreen/mac/WebFullScreenManagerMac.h: Added. + * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm: Added. + (-[WebFullScreenManagerAnimationListener initWithManager:WebKit::began:finished:]): Listener for CAAnimations. + (-[WebFullScreenManagerAnimationListener animationDidStart:]): Added. + (-[WebFullScreenManagerAnimationListener animationDidStop:finished:]): Added. + (-[WebFullScreenManagerAnimationListener invalidate]): Added. + (WebKit::WebFullScreenManager::create): Now creates a WebFullScreenManagerMac. + (WebKit::WebFullScreenManagerMac::create): Added. + (WebKit::WebFullScreenManagerMac::WebFullScreenManagerMac): Added. + (WebKit::WebFullScreenManagerMac::~WebFullScreenManagerMac): Added. + (WebKit::WebFullScreenManagerMac::setRootFullScreenLayer): Set up the remote layer host. + (WebKit::WebFullScreenManagerMac::beginEnterFullScreenAnimation): Create a CATransform3D + which will animate the full screen renderer from its initial position to its final one. + (WebKit::WebFullScreenManagerMac::beginExitFullScreenAnimation): Ditto. + +2011-03-11 Jer Noble <jer.noble@apple.com> + + Reviewed by Anders Carlsson. + + Hook up new WKFullScreenWindowController functions to WebFullScreenManagerProxy + https://bugs.webkit.org/show_bug.cgi?id=56218 + + * UIProcess/WebFullScreenManagerProxy.cpp: + * UIProcess/mac/WebFullScreenManagerProxyMac.mm: Added. + (WebKit::WebFullScreenManagerProxy::enterFullScreen): Call into WKFullScreenWindowController. + (WebKit::WebFullScreenManagerProxy::exitFullScreen): Ditto. + (WebKit::WebFullScreenManagerProxy::beganEnterFullScreenAnimation): Ditto. + (WebKit::WebFullScreenManagerProxy::finishedEnterFullScreenAnimation): Ditto. + (WebKit::WebFullScreenManagerProxy::beganExitFullScreenAnimation): Ditto. + (WebKit::WebFullScreenManagerProxy::finishedExitFullScreenAnimation): Ditto. + (WebKit::WebFullScreenManagerProxy::enterAcceleratedCompositingMode): Ditto. + (WebKit::WebFullScreenManagerProxy::exitAcceleratedCompositingMode): Ditto. + (WebKit::WebFullScreenManagerProxy::getFullScreenRect): Ditto. + * UIProcess/API/mac/WKView.mm: + (-[WKView fullScreenWindowController]): Lazily instantiate a WKFullScreenWindowController. + * UIProcess/API/mac/WKViewInternal.h: + +2011-03-11 Jer Noble <jer.noble@apple.com> + + Reviewed by Anders Carlsson. + + Add the WKFullScreenWindowController, mostly cribbed from WebKit's WebFullScreenController. + + [WebKit2] Implement a full screen window controller + https://bugs.webkit.org/show_bug.cgi?id=56210 + + * UIProcess/mac/WKFullScreenWindowController.h: Added. + * UIProcess/mac/WKFullScreenWindowController.mm: Added. + (-[WKFullScreenWindowController init]): Remove the _mediaEventListener. + (-[WKFullScreenWindowController dealloc]): Make sure to cancel previous async requests. + (-[WKFullScreenWindowController windowDidLoad]): Remove the Tiger protection. + (-[WKFullScreenWindowController webView]): Type change. + (-[WKFullScreenWindowController setWebView:]): Type change. + (-[WKFullScreenWindowController applicationDidResignActive:]): Case changes. + (-[WKFullScreenWindowController applicationDidChangeScreenParameters:]): Case changes. + (-[WKFullScreenWindowController enterFullScreen:]): Removed most of the animation code + which will reappear in WebFullScreenManager. + (-[WKFullScreenWindowController beganEnterFullScreenAnimation]): Added. + (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): Added. + (-[WKFullScreenWindowController exitFullScreen]): Ditto to enterFullScreen. + (-[WKFullScreenWindowController beganExitFullScreenAnimation]): Added. + (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): Added. + (-[WKFullScreenWindowController enterAcceleratedCompositingMode:WebKit::]): Set up the + layer tree host. + (-[WKFullScreenWindowController exitAcceleratedCompositingMode]): Tear down same. + (-[WKFullScreenWindowController getFullScreenRect:WebCore::]): Added. + (-[WKFullScreenWindowController _updateMenuAndDockForFullScreen]): Case changes. + (-[WKFullScreenWindowController _disableIdleDisplaySleep]): Ditto. + (-[WKFullScreenWindowController _enableIdleDisplaySleep]): Ditto. + (-[WKFullScreenWindowController _disableIdleSystemSleep]): Ditto. + (-[WKFullScreenWindowController _enableIdleSystemSleep]): Ditto. + (-[WKFullScreenWindowController _enableTickleTimer]): Ditto. + (-[WKFullScreenWindowController _disableTickleTimer]): Ditto. + (-[WKFullScreenWindowController _tickleTimerFired]): Ditto. + (-[WKFullScreenWindowController _updatePowerAssertions]): Use _isPlaying ivar. + (-[WKFullScreenWindowController _manager]): Added. + (-[WKFullScreenWindowController _requestExit]): Case changes. + (-[WKFullScreenWindowController _requestExitFullScreenWithAnimation:]): Ditto. + (-[WKFullScreenWindowController _swapView:with:]): Added. + (-[WKFullScreenWindowController _fullScreenWindow]): Case changes. + (-[WKFullScreenWindow initWithContentRect:styleMask:backing:defer:]): Geometry no + longer needs to be flipped. + (-[WKFullScreenWindow cancelOperation:]): Case changes. + +2011-03-11 Jer Noble <jer.noble@apple.com> + + Reviewed by Anders Carlsson. + + Create new interface stubs to support full screen mode in WebKit2. + + WebKit2: Plumb new full screen animation APIs through WebKit2. + https://bugs.webkit.org/show_bug.cgi?id=55993 + + * UIProcess/WebFullScreenManagerProxy.cpp: + (WebKit::WebFullScreenManagerProxy::WebFullScreenManagerProxy): Added. + (WebKit::WebFullScreenManagerProxy::invalidate): Clear m_webView. + (WebKit::WebFullScreenManagerProxy::setWebView): Set m_webView. + (WebKit::WebFullScreenManagerProxy::beginEnterFullScreenAnimation): Added. + (WebKit::WebFullScreenManagerProxy::beginExitFullScreenAnimation): Added. + (WebKit::WebFullScreenManagerProxy::beganEnterFullScreenAnimation): Added stub. + (WebKit::WebFullScreenManagerProxy::finishedEnterFullScreenAnimation): Added stub. + (WebKit::WebFullScreenManagerProxy::beganExitFullScreenAnimation): Added stub. + (WebKit::WebFullScreenManagerProxy::finishedExitFullScreenAnimation): Added stub. + (WebKit::WebFullScreenManagerProxy::enterAcceleratedCompositingMode): Added stub. + (WebKit::WebFullScreenManagerProxy::exitAcceleratedCompositingMode): Added stub. + (WebKit::WebFullScreenManagerProxy::getFullScreenRect): Added stub. + * UIProcess/WebFullScreenManagerProxy.h: + * UIProcess/WebFullScreenManagerProxy.messages.in: Added new message definitions. + * UIProcess/WebPageProxy.cpp: Moved include of WebFullScreenManagerProxy.h into source file. + * UIProcess/WebPageProxy.h: Ditto. + * WebProcess/FullScreen/WebFullScreenManager.cpp: + (WebKit::WebFullScreenManager::element): Added. + (WebKit::WebFullScreenManager::supportsFullScreen): Send message through WebPage. + (WebKit::WebFullScreenManager::enterFullScreenForElement): Ditto. + (WebKit::WebFullScreenManager::exitFullScreenForElement): Ditto. + (WebKit::WebFullScreenManager::beganEnterFullScreenAnimation): Added.. + (WebKit::WebFullScreenManager::finishedEnterFullScreenAnimation): Added. + (WebKit::WebFullScreenManager::beganExitFullScreenAnimation): Added. + (WebKit::WebFullScreenManager::finishedExitFullScreenAnimation): Added. + (WebKit::WebFullScreenManager::setRootFullScreenLayer): Added stub. + (WebKit::WebFullScreenManager::getFullScreenRect): Added. + (WebKit::WebFullScreenManager::beginEnterFullScreenAnimation): Added stub. + (WebKit::WebFullScreenManager::beginExitFullScreenAnimation): Added stub. + * WebProcess/FullScreen/WebFullScreenManager.h: + * WebProcess/FullScreen/WebFullScreenManager.messages.in: Added new message definitions. + * WebProcess/WebCoreSupport/WebChromeClient.cpp: + (WebKit::WebChromeClient::setRootFullScreenLayer): Added. + * WebProcess/WebCoreSupport/WebChromeClient.h: + +2011-03-11 Alice Liu <alice.liu@apple.com> + + Reviewed by Sam Weinig. + + Support encoding /decoding WebData in usermessages + https://bugs.webkit.org/show_bug.cgi?id=56158 + + Added encoding/decoding for APIObject::TypeData + * Shared/UserMessageCoders.h: + (WebKit::UserMessageEncoder::baseEncode): + (WebKit::UserMessageDecoder::baseDecode): + +2011-03-11 Alice Liu <alice.liu@apple.com> + + Reviewed by Sam Weinig. + + Add api for "remove" to WKMutableDictionary + https://bugs.webkit.org/show_bug.cgi?id=56157 + + * Shared/API/c/WKMutableDictionary.cpp: + (WKDictionaryRemoveItem): Added; call remove on MutableDictionary impl. + * Shared/API/c/WKMutableDictionary.h: + * Shared/MutableDictionary.cpp: + (WebKit::MutableDictionary::remove): Added; call remove on the underlying hashmap. + * Shared/MutableDictionary.h: + +2011-03-11 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r80899 and r80912. + http://trac.webkit.org/changeset/80899 + http://trac.webkit.org/changeset/80912 + https://bugs.webkit.org/show_bug.cgi?id=56236 + + Caused animation tests to crash on Snow Leopard WebKit2 + (Requested by rniwa on #webkit). + + * Shared/ShareableBitmap.cpp: + (WebKit::ShareableBitmap::create): + (WebKit::ShareableBitmap::createShareable): + (WebKit::ShareableBitmap::resize): + * Shared/ShareableBitmap.h: + (WebKit::ShareableBitmap::numBytesForSize): + (WebKit::ShareableBitmap::sizeInBytes): + * UIProcess/DrawingAreaProxyImpl.cpp: + (WebKit::DrawingAreaProxyImpl::update): + * WebKit2.xcodeproj/project.pbxproj: + * WebProcess/WebPage/DrawingArea.h: + (WebKit::DrawingArea::didUpdate): + * WebProcess/WebPage/DrawingArea.messages.in: + * WebProcess/WebPage/DrawingAreaImpl.cpp: + (WebKit::DrawingAreaImpl::~DrawingAreaImpl): + (WebKit::DrawingAreaImpl::sendDidUpdateBackingStoreState): + (WebKit::DrawingAreaImpl::didUpdate): + (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode): + (WebKit::DrawingAreaImpl::display): + * WebProcess/WebPage/DrawingAreaImpl.h: + * WebProcess/WebPage/SharedMemoryCache.cpp: Removed. + * WebProcess/WebPage/SharedMemoryCache.h: Removed. + * win/WebKit2.vcproj: + +2011-03-11 Brian Weinstein <bweinstein@apple.com> + + Windows build fix. Add SharedMemoryCache to the vcproj. + + * win/WebKit2.vcproj: + +2011-03-11 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Sam Weinig. + + https://bugs.webkit.org/show_bug.cgi?id=56222 + A window remains frozen if web process crashes during printing + + * UIProcess/API/mac/PageClientImpl.h: + * UIProcess/API/mac/PageClientImpl.mm: + * UIProcess/PageClient.h: + * UIProcess/WebPageProxy.cpp: + (WebKit::WebPageProxy::setComplexTextInputEnabled): + * UIProcess/WebPageProxy.h: + Moved setAutodisplay code into WKPrintingView. + + * UIProcess/API/mac/WKPrintingView.h: + * UIProcess/API/mac/WKView.mm: + (-[WKView printOperationWithPrintInfo:forFrame:]): + Keep a reference to the actual WKView, so that we can manipulate how it displays, even if + page goes away. + + * UIProcess/API/mac/WKPrintingView.mm: + (-[WKPrintingView initWithFrameProxy:WebKit::view:]): + (-[WKPrintingView _setAutodisplay:]): + (-[WKPrintingView _suspendAutodisplay]): + (-[WKPrintingView _delayedResumeAutodisplayTimerFired]): + Move setAutodisplay here. + +2011-03-11 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Add a shared memory cache to the web process + https://bugs.webkit.org/show_bug.cgi?id=56232 + + Add a very simple shared memory cache to the web process, so that we don't have to allocate and + free memory over and over when painting. + + * Shared/ShareableBitmap.cpp: + (WebKit::ShareableBitmap::create): + (WebKit::ShareableBitmap::createShareable): + (WebKit::ShareableBitmap::resize): + * Shared/ShareableBitmap.h: + (WebKit::ShareableBitmap::numBytesNeededForBitmapSize): + (WebKit::ShareableBitmap::sizeInBytes): + Rename numBytesForSize to numBytesNeededForBitmapSize. + + * UIProcess/DrawingAreaProxyImpl.cpp: + (WebKit::DrawingAreaProxyImpl::update): + Always send back a DidUpdate message, even if we didn't use the update info. + This is needed so that the web process knows when the UI process is done with the shared memory inside + the update info struct. + + * WebKit2.xcodeproj/project.pbxproj: + Add new files. + + * WebProcess/WebPage/DrawingArea.h: + (WebKit::DrawingArea::didUpdate): + * WebProcess/WebPage/DrawingArea.messages.in: + DidUpdate now takes a boolean. + + * WebProcess/WebPage/DrawingAreaImpl.cpp: + (WebKit::sharedMemoryCache): + Add shared memory cache. + + (WebKit::DrawingAreaImpl::~DrawingAreaImpl): + Return the shared memory to the cache. + + (WebKit::DrawingAreaImpl::sendDidUpdateBackingStoreState): + display now takes an extra boolean. + + (WebKit::DrawingAreaImpl::didUpdate): + Return the shared memory to the cache. + + (WebKit::DrawingAreaImpl::display): + If useSharedMemoryCache is true, get shared memory from the cache. + + * WebProcess/WebPage/SharedMemoryCache.cpp: Added. + (WebKit::SharedMemoryCache::acquireSharedMemory): + If the memory we currently hold on to is big enough, return it. + + (WebKit::SharedMemoryCache::releaseSharedMemory): + If we're already holding on to shared memory, evict it if the returned + shared memory object is bigger than the one we currently hold. + + (WebKit::SharedMemoryCache::clearCacheTimerFired): + Null out the shared memory object. + +2011-03-11 Jessie Berlin <jberlin@apple.com> + + Reviewed by Adam Roben. + + Crash calling WebContext::clearResourceCaches(InMemoryResourceCachesOnly) before the Web + Process has finished launching. + https://bugs.webkit.org/show_bug.cgi?id=56208 + + Only send the message if the Web Process is valid. + + * UIProcess/WebContext.cpp: + (WebKit::WebContext::clearResourceCaches): + +2011-03-11 Anders Carlsson <andersca@apple.com> + + Reviewed by Dan Bernstein. + + Don't paint more than 60 times per second + https://bugs.webkit.org/show_bug.cgi?id=56206 + <rdar://problem/9085989> + + * WebProcess/WebPage/DrawingAreaImpl.cpp: + (WebKit::DrawingAreaImpl::DrawingAreaImpl): + Initialize m_lastDisplayTime to 0. Change the display timer to call displayTimerFired. + + (WebKit::DrawingAreaImpl::didUpdate): + Call displayTimerFired instead of display. + + (WebKit::DrawingAreaImpl::displayTimerFired): + If we're asked to paint again less than 1/60th of a second after we've already painted, + defer painting. + + (WebKit::DrawingAreaImpl::display): + Update m_lastDisplayTime. + +2011-03-11 Mark Rowe <mrowe@apple.com> + + Reviewed by Alice Liu. + + <rdar://problem/9120161> WKPageRestoreFromSessionState does not set the pending API request URL. + + * UIProcess/cf/WebPageProxyCF.cpp: + (WebKit::WebPageProxy::restoreFromSessionStateData): If we're navigating to a back/forward item + as part of the restoration, call setPendingAPIRequestURL. When there's a provisional URL this will + be done by our call to loadURL elsewhere in the function. + +2011-03-10 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Jon Honeycutt. + + WebKit2 UI process crashes if web process crashes while computing page rects for printing + https://bugs.webkit.org/show_bug.cgi?id=56160 + <rdar://problem/9027410> + + * UIProcess/API/mac/WKPrintingView.mm: + (-[WKPrintingView _suspendAutodisplay]): Added a null check for page, matching one that + we have when resuming autodisplay. + (-[WKPrintingView _delayedResumeAutodisplayTimerFired]): Added a FIXME. + (pageDidComputePageRects): Sanitize results coming from the web process (and avoid crashing + when there is a communication error, so results are all null). + (-[WKPrintingView knowsPageRange:]): If there is no page any more, we can't tell how many + pages it had. + (-[WKPrintingView rectForPage:]): Handle the case where we are neither calculating pages + nor knowing them, as it happens when the web process crashes. + +2011-03-10 Mark Rowe <mrowe@apple.com> + + Rubber-stamped by Sam Weinig. + + Part of <rdar://problem/8728860> WebKit2 needs to be made localizable + + The presence of CFBundleDevelopmentRegion in the application's Info.plist prevents + the default localization that we set during launch from being respected. + + * PluginProcess/Info.plist: Remove CFBundleDevelopmentRegion. + * WebProcess/Info.plist: Ditto. + +2011-03-10 Martin Robinson <mrobinson@igalia.com> + + Build for WebKit2 GTK+ after r80714. + + * GNUmakefile.am: Update source list. + * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: + (WebKit::x11Display): Add missing semicolon. + +2011-03-10 Chris Fleizach <cfleizach@apple.com> + + Reviewed by Darin Adler. + + REGRESSION (WebKit2): VoiceOver focus no longer follows keyboard focus + https://bugs.webkit.org/show_bug.cgi?id=55959 + + NSApplication has to return the focused element within the app in order + for NSAccessibilityHandleFocusChanged() to work. The default implementation + relies on keyWindow. Consequently, in WK2, the WebProcess must override that method + to return the appropriate focused element within the WebProcess, since + there is no keyWindow. + + * WebKit2.xcodeproj/project.pbxproj: + * WebProcess/WebPage/mac/AccessibilityWebPageObject.mm: + (-[AccessibilityWebPageObject accessibilityFocusedUIElement]): + * WebProcess/WebProcess.cpp: + (WebKit::WebProcess::focusedWebPage): + * WebProcess/WebProcess.h: + * WebProcess/mac/NSApplicationOverride.mm: Added. + (-[NSApplication accessibilityFocusedUIElement]): + +2011-03-10 Oleg Romashin <romaxa@gmail.com> + + Reviewed by Andreas Kling. + + Make Qt port compiling with ENABLE_PLUGIN_PROCESS=1, part3 + Solving conflict of Qt and Xlib includes + + * Shared/Plugins/NPIdentifierData.cpp: + * Shared/Plugins/NPIdentifierData.h: + * Shared/Plugins/NPObjectProxy.cpp: + * Shared/Plugins/NPVariantData.h: + +2011-03-10 Sam Weinig <sam@webkit.org> + + Reviewed by Mark Rowe. + + - Fix plugins in release and production builds. + + * WebKit2.xcodeproj/project.pbxproj: + Make sure to base the PluginProcess target on the correct xcconfig file + in all configurations. + +2011-03-09 Matthew Delaney <mdelaney@apple.com> + + Reviewed by Simon Fraser. + + Plumb through settings for accelerated drawing for canvas + https://bugs.webkit.org/show_bug.cgi?id=56039 + + * Shared/WebPreferencesStore.h: + * UIProcess/API/C/WKPreferences.cpp: + * UIProcess/API/C/WKPreferencesPrivate.h: + * WebProcess/WebPage/WebPage.cpp: + +2011-03-10 Jessie Berlin <jberlin@apple.com> + + Reviewed by Oliver Hunt and Brian Weinstein. + + WebKit2: Need a way to clear only the in-memory resource caches + https://bugs.webkit.org/show_bug.cgi?id=56022 + + Add a parameter to WKContextClearResourceCaches to specify whether to clear all the caches + or just the memory caches. + + * Shared/ResourceCachesToClear.h: Added. + * UIProcess/API/C/WKAPICast.h: + (WebKit::toResourceCachesToClear): + + * UIProcess/API/C/WKContext.cpp: + (WKContextClearResourceCaches): + Add the new parameter. + * UIProcess/API/C/WKContext.h: + * UIProcess/WebContext.cpp: + (WebKit::WebContext::clearResourceCaches): + Ditto. + * UIProcess/WebContext.h: + + * WebProcess/WebProcess.cpp: + (WebKit::WebProcess::clearResourceCaches): + Pass the new parameter through to the platform-specific functions. + * WebProcess/WebProcess.h: + Add the new parameter and give it a default of AllResourceCaches. + * WebProcess/WebProcess.messages.in: + Ditto. + * WebProcess/gtk/WebProcessGtk.cpp: + (WebKit::WebProcess::platformClearResourceCaches): + Ditto. + * WebProcess/qt/WebProcessQt.cpp: + (WebKit::WebProcess::platformClearResourceCaches): + Ditto. + * WebProcess/win/WebProcessWin.cpp: + (WebKit::WebProcess::platformClearResourceCaches): + When told to clear only the in-memory caches, return early so as not to clear the CFNetwork + disk cache. + * WebProcess/mac/WebProcessMac.mm: + (WebKit::WebProcess::platformClearResourceCaches): + Ditto. + + * WebKit2.xcodeproj/project.pbxproj: + Add ResourceCachesToClear.h + * win/WebKit2.vcproj: + Ditto. + +2011-03-10 Jeff Miller <jeffm@apple.com> + + Reviewed by Adam Roben. + + WKViewRegisterEditCommandCallback should use WKViewUndoType + https://bugs.webkit.org/show_bug.cgi?id=56120 + + * UIProcess/API/C/win/WKView.h: Change undoOrRedo parameter in WKViewRegisterEditCommandCallback to be WKViewUndoType. + +2011-03-10 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> + + Reviewed by Kenneth Rohde Christiansen. + + Tiled backing store's delegated scroll request uses incorrect convention + https://bugs.webkit.org/show_bug.cgi?id=56011 + + Adapt all of the internal API to match the delta to point + conversion at the WebCore side. + + * UIProcess/API/qt/qwkpage.cpp: + (QWKPagePrivate::pageDidRequestScroll): + * UIProcess/API/qt/qwkpage_p.h: + * UIProcess/PageClient.h: + * UIProcess/WebPageProxy.cpp: + (WebKit::WebPageProxy::pageDidRequestScroll): + * UIProcess/WebPageProxy.h: + * UIProcess/WebPageProxy.messages.in: + * WebProcess/WebCoreSupport/WebChromeClient.cpp: + (WebKit::WebChromeClient::delegatedScrollRequested): + * WebProcess/WebCoreSupport/WebChromeClient.h: + * WebProcess/WebPage/WebPage.cpp: + (WebKit::WebPage::pageDidRequestScroll): + * WebProcess/WebPage/WebPage.h: + +2011-03-10 Balazs Kelemen <kbalazs@webkit.org> + + Reviewed by Andreas Kling. + + [WK2] Make non-transparent windowless plugins paint on X11 + https://bugs.webkit.org/show_bug.cgi?id=55660 + + Implement painting for non-transparent windowless X11 plugins. + The essence of the logic has been adapted from WebCore. + The implementation is stubbed for GTK and working only on Qt + but it should be really easy to finish it for GTK. + + * WebKit2.pro: + * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: + (WebKit::NPN_GetValue): Handle X11 specific values that are necessary. + * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: + (WebKit::NetscapePlugin::NetscapePlugin): Initialize the X11 specific + members that has been added. + (WebKit::NetscapePlugin::callSetWindow): Always set the x and y coordinates + of the NP_Window to 0 on X11 since we are using a backings store as the + painting area for the plugin. + * WebProcess/Plugins/Netscape/NetscapePlugin.h: + * WebProcess/Plugins/Netscape/gtk/NetscapePluginGtk.cpp: Removed in favour + of a common implementation for X11. + * WebProcess/Plugins/Netscape/qt/NetscapePluginQt.cpp: Ditto. + * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: Added. + (WebKit::getPluginDisplay): + + Platform specific static getters. + (WebKit::x11Display): + (WebKit::displayDepth): + (WebKit::rootWindowID): + (WebKit::x11Screen): + + (WebKit::NetscapePlugin::platformPostInitialize): Set up the visual + settings and the colormap for the plugin. + (WebKit::NetscapePlugin::platformDestroy): + (WebKit::NetscapePlugin::platformInvalidate): Remained stub. + (WebKit::NetscapePlugin::platformGeometryDidChange): Create a new + pixmap that fits the geometry. + (WebKit::NetscapePlugin::platformPaint): Propagate a paint event + to the plugin, sync with it if necessary and draw the pixmap to + the screen. + (WebKit::toNP): Remained stub. + (WebKit::NetscapePlugin::platformHandleMouseEvent): Remained stub. + (WebKit::NetscapePlugin::platformHandleWheelEvent): Remained stub. + (WebKit::NetscapePlugin::platformSetFocus): Remained stub. + (WebKit::NetscapePlugin::platformHandleMouseEnterEvent): Remained stub. + (WebKit::NetscapePlugin::platformHandleMouseLeaveEvent): Remained stub. + (WebKit::NetscapePlugin::platformHandleKeyboardEvent): Remained stub. + * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: + (WebKit::WebFrameLoaderClient::createPlugin): Hack. Inject wmode=opaque + key-value pair to the plugin parameters to force Flash to act in + non-transparent windowless mode. Qt also doing this in WebCore. + +2011-03-09 Peter Kasting <pkasting@google.com> + + Reviewed by Mihai Parparita. + + Unify Windows version checks. + https://bugs.webkit.org/show_bug.cgi?id=55979 + + * UIProcess/win/WebPageProxyWin.cpp: + (WebKit::WebPageProxy::standardUserAgent): + +2011-03-09 Adele Peterson <adele@apple.com> + + Reviewed by Anders Carlsson. + + Fix for https://bugs.webkit.org/show_bug.cgi?id=56068 + <rdar://problem/9058245> WebKit2: Can't uncheck 'Spelling and Grammar' contextual items + + * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::contextMenuItemSelected): + Add cases for ContextMenuItemTagCorrectSpellingAutomatically, ContextMenuItemTagCheckSpellingWhileTyping, + and ContextMenuItemTagCheckGrammarWithSpelling + +2011-03-09 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Dan Bernstein. + + Frequent crashes when printing in WebPageProxy::setAutodisplay + https://bugs.webkit.org/show_bug.cgi?id=56057 + <rdar://problem/9053290> + + * UIProcess/API/mac/WKPrintingView.mm: (-[WKPrintingView _delayedResumeAutodisplayTimerFired]): + Null check the page, there is no reason for it to still exist. + +2011-03-09 Brent Fulgham <bfulgham@webkit.org> + + Unreviewed build correction. + + * UIProcess/DrawingAreaProxy.messages.in: Exclude the other + method using LayerTreeContext for non-accelerated composition case. + +2011-03-09 Sam Weinig <sam@webkit.org> + + Reviewed by Anders Carlsson. + + Change plugins to use their own executable on Mac OS X + https://bugs.webkit.org/show_bug.cgi?id=55991 + + * Configurations/PluginProcess.xcconfig: Copied from Source/WebKit2/Configurations/WebProcess.xcconfig. + * PluginProcess/Info.plist: Copied from Source/WebKit2/WebProcess/Info.plist. + Add files necessary for adding PluginProcess.app. + + * UIProcess/Launcher/mac/ProcessLauncherMac.mm: + (WebKit::ProcessLauncher::launchProcess): + Launch the PluginProcess.app when launching a plugin process. + + * WebKit2.xcodeproj/project.pbxproj: + Add new executable and new files, removes some unneeded copying + and duplicate compiling of files. + + * WebProcess/Info.plist: + Sorted. + +2011-03-09 Jessie Berlin <jberlin@apple.com> + + Reviewed by Adam Roben. + + Use the Cookie Storage from the Private Browsing Storage Session directly + https://bugs.webkit.org/show_bug.cgi?id=55986 + + * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: + (InitWebCoreSystemInterface): + +2011-03-09 Alejandro G. Castro <alex@igalia.com> + + Fix compilation after r80596, add soup Download stubs. + + * GNUmakefile.am: + * WebProcess/Downloads/soup/DownloadSoup.cpp: Added. + (WebKit::Download::start): + (WebKit::Download::startWithHandle): + (WebKit::Download::cancel): + (WebKit::Download::platformInvalidate): + (WebKit::Download::didDecideDestination): + (WebKit::Download::platformDidFinish): + +2011-03-09 Alejandro G. Castro <alex@igalia.com> + + Fix GTK+ compilation after r80619. Add WebFullScreenManager. + + * GNUmakefile.am: + +2011-03-08 Jer Noble <jer.noble@apple.com> + + Reviewed by Sam Weinig. + + WebKit2: Plumb through the FULLSCREEN_API Chrome client calls + https://bugs.webkit.org/show_bug.cgi?id=55273 + + The FULLSCREEN_API Chrome client calls need to be plumbed through from the + WebProcess to the UIProcess. To do this, WebFullScreenManager (and Proxy) + classes have been added to WebPage. + + * DerivedSources.make: Added rules necessary to build DerivedSources for new .in files. + * DerivedSources.pro: Ditto. + * Platform/CoreIPC/MessageID.h: Added message types for WebFullScreenManager. + * Shared/API/c/WKBase.h: Added WKFullScreenManagerRef. + * Shared/APIObject.h: Added APIType for WebFullScreenManager. + * UIProcess/WebFullScreenManagerProxy.cpp: Added. + * UIProcess/WebFullScreenManagerProxy.h: Added. + * UIProcess/WebFullScreenManagerProxy.messages.in: Added. + * UIProcess/WebPageProxy.cpp: + (WebKit::WebPageProxy::close): Invalidate and clear m_fullScreenManager. + (WebKit::WebPageProxy::processDidCrash): Ditto. + (WebKit::WebPageProxy::didReceiveMessage): Pass messages on to WebFullScreenManagerProxy. + (WebKit::WebPageProxy::didReceiveSyncMessage): Ditto. + (WebKit::WebPageProxy::fullScreenManager): Added. Lazy instantiation of m_fullScreenManager. + * UIProcess/WebPageProxy.h: + * UIProcess/WebPageProxy.messages.in: + * UIProcess/WebUIClient.cpp: + * UIProcess/WebUIClient.h: + * WebKit2.xcodeproj/project.pbxproj: Added references to new classes in project file. + * WebKit2.pro: Ditto. + * win/WebKit2.vcproj: Ditto. + * WebKit2.pri: Added new directories to include file path. + * win/WebKit2Common.vsprops: Ditto. + * WebProcess/FullScreen/WebFullScreenManager.cpp: Added. + * WebProcess/FullScreen/WebFullScreenManager.h: Added. + * WebProcess/FullScreen/WebFullScreenManager.messages.in: Added. + * WebProcess/WebCoreSupport/WebChromeClient.cpp: + (WebKit::WebChromeClient::supportsFullScreenForElement): Pass through to WebFullScreenManager. + (WebKit::WebChromeClient::enterFullScreenForElement): Ditto. + (WebKit::WebChromeClient::exitFullScreenForElement): Ditto. + * WebProcess/WebPage/WebPage.cpp: + (WebKit::WebPage::close): Invalidate and clear m_fullScreenManager. + (WebKit::WebPage::fullScreenManager): Lazy instantiation of m_fullScreenManager. + (WebKit::WebPage::didReceiveMessage): Pass messages through to WebFullScreenManager. + * WebProcess/WebPage/WebPage.h: + +2011-03-08 Jer Noble <jer.noble@apple.com> + + Reviewed by Sam Weinig. + + WebKit2: Plumb through the "supportsFullScreen" preference. + https://bugs.webkit.org/show_bug.cgi?id=55261 + + The "supportsFullScreen" preference needs to be plumbed through from + the UIProcess to the WebProcess. + + * Shared/WebPreferencesStore.h: Add a new macro entry. + * UIProcess/API/C/WKPreferences.cpp: Implement preferences getter and setter. + (WKPreferencesSetFullScreenEnabled): + (WKPreferencesGetFullScreenEnabled): + * UIProcess/API/C/WKPreferences.h: + * WebProcess/WebPage/WebPage.cpp: + (WebKit::WebPage::updatePreferences): Sync the fullScreenEnabled setting through to + the settings object. + +2011-03-08 Jeff Miller <jeffm@apple.com> + + Reviewed by Adele Peterson. + + WebKit2: Implement Windows glue for Undo/Redo + https://bugs.webkit.org/show_bug.cgi?id=55961 + + Expose Undo/Redo infrastructure through WKView on Windows by + adding an undo client as well as APIs to reapply and unapply + an edit command. + + * UIProcess/API/C/win/WKView.cpp: + (WKViewSetViewUndoClient): Added. + (WKViewReapplyEditCommand): Added. + (WKViewUnapplyEditCommand): Added. + * UIProcess/API/C/win/WKView.h: Added WKViewUndoClient, WKViewSetViewUndoClient(), and WKViewUnapplyEditCommand(). + * UIProcess/WebPageProxy.cpp: + (WebKit::WebPageProxy::isValidEditCommand): Added, used to validated an edit command from a WKView API. + * UIProcess/WebPageProxy.h: Added isValidEditCommand(). + * UIProcess/win/WebUndoClient.cpp: Added, APIClient for WKViewUndoClient. + (WebKit::WebUndoClient::registerEditCommand): Added. + (WebKit::WebUndoClient::clearAllEditCommands): Added. + * UIProcess/win/WebUndoClient.h: Added, APIClient for WKViewUndoClient. + * UIProcess/win/WebView.cpp: + (WebKit::WebView::initializeUndoClient): Added. + (WebKit::WebView::close): Clear out undo client. + (WebKit::WebView::registerEditCommand): Implemented to call through to WKViewUndoClient. + (WebKit::WebView::clearAllEditCommands): Implmented to call through to WKViewUndoClient. + (WebKit::WebView::reapplyEditCommand): Added. + (WebKit::WebView::unapplyEditCommand): Added. + * UIProcess/win/WebView.h: Added undo client support. + * win/WebKit2.vcproj: Added WebUndoClient.cpp and WebUndoClient.h. + +2011-03-08 Jeff Miller <jeffm@apple.com> + + Reviewed by Sam Weinig. + + WebKit2: Expose WebEditCommandProxy in the C API on Windows + https://bugs.webkit.org/show_bug.cgi?id=55962 + + Make WebEditCommandProxy a subclass of APIObject, and define + WKEditCommandRef as the type that will be exposed through the C API. + + * Shared/API/c/win/WKBaseWin.h: Add WKEditCommandRef. + * Shared/APIObject.h: Add platform-specific TypeEditCommandProxy. + * UIProcess/API/C/win/WKAPICastWin.h: Add API mapping for WKEditCommandRef. + * UIProcess/WebEditCommandProxy.h: Subclass WebEditCommandProxy from APIObject. + (WebKit::WebEditCommandProxy::type): Added. + +2011-03-08 Jeff Miller <jeffm@apple.com> + + Reviewed by Oliver Hunt. + + WebKit2: Redo is broken + https://bugs.webkit.org/show_bug.cgi?id=55978 + + WebEditCommandProxy::unapply() and WebEditCommandProxy::reapply() were registering the wrong edit command when an undo or redo happens. + For example, when we unapply(), we should register a Redo command, not an Undo command. + + * UIProcess/WebEditCommandProxy.cpp: + (WebKit::WebEditCommandProxy::unapply): Register a Redo command, not an Undo command. + (WebKit::WebEditCommandProxy::reapply): Register an Undo command, not a Redo command. + +2011-03-08 Brent Fulgham <bfulgham@webkit.org> + + Reviewed by Adam Roben. + + https://bugs.webkit.org/show_bug.cgi?id=55977 + Refine CF/CFNet distinctions for better code sharing. + 1. Rename Downloads/cf/win/DownloadCFNetWin.cpp to DownloadCFWin.cpp + since it does not use any CFNETWORK features. + 2. Create new cfnet directory. + 3. Move Downloads/cf/DownloadCFNet.cpp to Downloads/cfnet + 4. Update project file. + + * WebProcess/Downloads/cf/DownloadCFNet.cpp: Removed. + * WebProcess/Downloads/cf/win/DownloadCFNetWin.cpp: Removed. + * WebProcess/Downloads/cf/win/DownloadCFWin.cpp: Copied from WebProcess/Downloads/cf/win/DownloadCFNetWin.cpp. + * WebProcess/Downloads/cfnet: Added. + * WebProcess/Downloads/cfnet/DownloadCFNet.cpp: Copied from WebProcess/Downloads/cf/DownloadCFNet.cpp. + * win/WebKit2.vcproj: + +2011-03-08 Mark Rowe <mrowe@apple.com> + + Reviewed by Brady Eidson. + + <http://webkit.org/b/55976> Provisional URL should be loaded when restoring session state even if there are back / forward list entries. + + * UIProcess/cf/WebPageProxyCF.cpp: + (WebKit::WebPageProxy::restoreFromSessionStateData): If there's a provisional URL that we will load then restore the session state + without navigating to the current item. + * WebProcess/WebPage/WebPage.messages.in: Expose the ability to restore the session state without navigating to the current item. + +2011-03-08 Brent Fulgham <bfulgham@webkit.org> + + Reviewed by Anders Carlsson. + + https://bugs.webkit.org/show_bug.cgi?id=55956 + WebKit2 Changes to correct WinCairo port build + + * Shared/LayerTreeContext.h: Don't exclude CoreIPC declarations for non-accelerated + compositing case. + * UIProcess/DrawingAreaProxy.h: Add "stdint.h" include needed for Cairo build. + * UIProcess/DrawingAreaProxyImpl.cpp: Exclude accelerated compositing code for + WinCairo build. + (WebKit::DrawingAreaProxyImpl::~DrawingAreaProxyImpl): + (WebKit::DrawingAreaProxyImpl::didUpdateBackingStoreState): + (WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode): + (WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode): + (WebKit::DrawingAreaProxyImpl::sendUpdateBackingStoreState): + (WebKit::DrawingAreaProxyImpl::waitForAndDispatchDidUpdateBackingStoreState): + * UIProcess/DrawingAreaProxyImpl.h: Exclude declarations for code only used when + accelerated compositing is enabled. + (WebKit::DrawingAreaProxyImpl::isInAcceleratedCompositingMode): + * UIProcess/win/WebView.cpp: Protect CG-specific drawing code. + (WebKit::WebView::setFindIndicator): + * WebProcess/Downloads/Download.h: Allow CFLite implentation to share overwrite flag, + as well as destination and bundle paths. + * WebProcess/Downloads/curl/DownloadCurl.cpp: Remove stub (to share CFNet implementation + of file handling. This will be moved to a common area in a future patch.) + * WebProcess/WebPage/DrawingAreaImpl.cpp: Exclude accelerated-compositing paths. + (WebKit::DrawingAreaImpl::layerHostDidFlushLayers): + (WebKit::DrawingAreaImpl::sendDidUpdateBackingStoreState): + (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode): + * WebProcess/WebPage/WebPage.cpp: Protect CG-specific drawing code. + (WebKit::WebPage::drawRectToPDF): + (WebKit::WebPage::drawPagesToPDF): + * win/WebKit2.vcproj: Exclude unused LayerTreeContext from WinCairo + +2011-03-08 Ivan Krstić <ike@apple.com> + + Reviewed by Sam Weinig. + + Re-fix: can't paste from 3rd party text editor into WebKit2 window + <rdar://problem/8978624> + + * WebProcess/com.apple.WebProcess.sb: + +2011-03-08 Martin Robinson <mrobinson@igalia.com> + + Fix the WebKit2 compilation after r80578. + + * UIProcess/gtk/WebView.cpp: + (WebKit::WebView::setFocus): Added. + * UIProcess/gtk/WebView.h: + +2011-03-08 Jessie Berlin <jberlin@apple.com> + + Reviewed by Anders Carlsson. + + Crash in CFNetwork visiting google.com + https://bugs.webkit.org/show_bug.cgi?id=55958 + + * Shared/API/c/cf/WKURLResponseCF.cpp: + (WKURLResponseCopyCFURLResponse): + If the response to copy is null, return 0; + +2011-03-08 John Sullivan <sullivan@apple.com> + + Reverted the patch for https://bugs.webkit.org/show_bug.cgi?id=55940 + + The patch was insufficient, and it wasn't useful for the intended client use either. + + * WebProcess/InjectedBundle/API/c/WKBundlePage.h: + * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: + (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): + +2011-03-08 Alejandro G. Castro <alex@igalia.com> + + Unreviewed, fixed GTK+ compilation after r80569. + + * UIProcess/gtk/WebView.cpp: + (WebKit::WebView::windowToScreen): + * UIProcess/gtk/WebView.h: + +2011-03-08 Chris Fleizach <cfleizach@apple.com> + + Reviewed by Sam Weinig. + + WK2: Cannot set focus on an element when focus is outside of WKView + https://bugs.webkit.org/show_bug.cgi?id=55281 + + * UIProcess/API/mac/PageClientImpl.h: + * UIProcess/API/mac/PageClientImpl.mm: + (WebKit::PageClientImpl::setFocus): + * UIProcess/API/qt/qwkpage_p.h: + (QWKPagePrivate::setFocus): + * UIProcess/PageClient.h: + * UIProcess/WebPageProxy.cpp: + (WebKit::WebPageProxy::setFocus): + * UIProcess/WebPageProxy.h: + * UIProcess/WebPageProxy.messages.in: + * UIProcess/win/WebView.h: + (WebKit::WebView::setFocus): + * WebProcess/WebCoreSupport/WebChromeClient.cpp: + (WebKit::WebChromeClient::focus): + (WebKit::WebChromeClient::unfocus): + +2011-03-08 Jeff Miller <jeffm@apple.com> + + Unreviewed, fix last change so WKBaseWin.h is in alphabetical order in the project XML. + + * win/WebKit2.vcproj: Move WKBaseWin.h to be in alphabetical order. + +2011-03-08 Jeff Miller <jeffm@apple.com> + + Reviewed by Darin Adler. + + Remove Source/WebKit2/UIProcess/API/C/win/WKBaseWin.h + https://bugs.webkit.org/show_bug.cgi?id=55952 + + * UIProcess/API/C/win/WKBaseWin.h: Removed. + * win/WebKit2.vcproj: Refer to the Shared version of WKBaseWin.h instead of the one in UIProcess. + +2011-03-08 Alejandro G. Castro <alex@igalia.com> + + Reviewed by Martin Robinson. + + [GTK] Add new files to compilation after r77974 + https://bugs.webkit.org/show_bug.cgi?id=54076 + + The commit added new code to allow passing context to policy + delegate methods, we also added dummy ResourceRequest and + ResourceResponse decoders until we implement them. + + * GNUmakefile.am: + * Shared/gtk/WebCoreArgumentCodersGtk.cpp: + (CoreIPC::decodeResourceRequest): + (CoreIPC::decodeResourceResponse): + +2011-03-08 Chris Fleizach <cfleizach@apple.com> + + Reviewed by Darin Adler. + + AX: Webkit2 not sending UAZoomFocusChanged notifications + https://bugs.webkit.org/show_bug.cgi?id=55916 + + Needed to implement the windowToScreen() method so that the right frame + could be calculated to send for zoom focus changes. + + * UIProcess/API/mac/PageClientImpl.h: + * UIProcess/API/mac/PageClientImpl.mm: + (WebKit::PageClientImpl::windowToScreen): + * UIProcess/API/qt/qwkpage.cpp: + (QWKPagePrivate::windowToScreen): + * UIProcess/API/qt/qwkpage_p.h: + * UIProcess/PageClient.h: + * UIProcess/WebPageProxy.cpp: + (WebKit::WebPageProxy::windowToScreen): + * UIProcess/WebPageProxy.h: + * UIProcess/WebPageProxy.messages.in: + * UIProcess/win/WebView.cpp: + (WebKit::WebView::windowToScreen): + * UIProcess/win/WebView.h: + * WebProcess/WebCoreSupport/WebChromeClient.cpp: + (WebKit::WebChromeClient::windowToScreen): + * WebProcess/WebPage/WebPage.cpp: + (WebKit::WebPage::windowToScreen): + * WebProcess/WebPage/WebPage.h: + +2011-03-08 John Sullivan <sullivan@apple.com> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=55940 + WebKit2 should support Ignore policy from injected bundle client + + * WebProcess/InjectedBundle/API/c/WKBundlePage.h: + Added WKBundlePagePolicyActionIgnore. + + * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: + (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): + If the injected bundle client returns WKBundlePagePolicyActionIgnore, convert it + to the loader's PolicyIgnore. + +2011-03-08 Laszlo Gombos <laszlo.1.gombos@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] [Symbian] [WK2] Fix building WebKit 2 API tests + https://bugs.webkit.org/show_bug.cgi?id=55876 + + Make sure TESTS_SOURCE_DIR is set for Symbian the same way + as it is for WK1. + + * UIProcess/API/qt/tests/qgraphicswkview/tst_qgraphicswkview.cpp: + (tst_QGraphicsWKView::loadEmptyPage): + * UIProcess/API/qt/tests/tests.pri: + 2011-03-07 Damian Kaleta <dkaleta@apple.com> Reviewed by Anders Carlsson. |