2011-02-22 Csaba Osztrogonác Unreviewed. and https://bugs.webkit.org/show_bug.cgi?id=54514 API to view and delete Application Cache data by origin. [Qt][WK2] Buildfix after r79364. * DerivedSources.pro: * WebKit2.pri: 2011-02-22 Brady Eidson Reviewed by Anders Carlsson and looked over by Brian Weinstein. and https://bugs.webkit.org/show_bug.cgi?id=54514 API to view and delete Application Cache data by origin. I couldn't help myself - I also re-alphabetized WebResourceCacheManager in many places where it's sorting was wrong due to a last minute name change. Project file changes: * GNUmakefile.am: * win/WebKit2.vcproj: * win/WebKit2Common.vsprops: * win/WebKit2Generated.make: * WebKit2.pro: * WebKit2.xcodeproj/project.pbxproj: WK2 build-system and API paperwork: * DerivedSources.make: * Platform/CoreIPC/MessageID.h: * Shared/API/c/WKBase.h: * Shared/APIObject.h: * UIProcess/API/C/WKAPICast.h: Add a helper to perform an ArrayCallback with a Vector of SecurityOriginDatas: * Shared/SecurityOriginData.cpp: (WebKit::performAPICallbackWithSecurityOriginDataVector): * Shared/SecurityOriginData.h: * UIProcess/WebResourceCacheManagerProxy.cpp: (WebKit::WebResourceCacheManagerProxy::didGetCacheOrigins): Use performAPICallbackWithSecurityOriginDataVector here. Add an ApplicationCacheManagerProxy to the context and invalidate it at the appropriate times: * UIProcess/WebContext.cpp: (WebKit::WebContext::WebContext): (WebKit::WebContext::~WebContext): (WebKit::WebContext::processDidClose): (WebKit::WebContext::didReceiveMessage): Route messages to the right proxy. * UIProcess/WebContext.h: (WebKit::WebContext::applicationCacheManagerProxy): (WebKit::WebContext::resourceCacheManagerProxy): Add API to get the ApplicationCacheManager for a context: * UIProcess/API/C/WKContext.cpp: (WKContextGetApplicationCacheManager): (WKContextGetResourceCacheManager): * UIProcess/API/C/WKContext.h: Route messages to the right place: * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::didReceiveMessage): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::didReceiveMessage): Add the API object, which wraps to WebApplicationCacheManagerProxy: * UIProcess/API/C/WKApplicationCacheManager.cpp: Added. (WKApplicationCacheManagerGetTypeID): (WKApplicationCacheManagerGetApplicationCacheOrigins): (WKApplicationCacheManagerDeleteEntriesForOrigin): (WKApplicationCacheManagerDeleteAllEntries): * UIProcess/API/C/WKApplicationCacheManager.h: Added. The UIProcess implementation of the manager to send messages to the WebProcess and pipe a callback back up to the client: * UIProcess/WebApplicationCacheManagerProxy.cpp: Added. (WebKit::WebApplicationCacheManagerProxy::create): (WebKit::WebApplicationCacheManagerProxy::WebApplicationCacheManagerProxy): (WebKit::WebApplicationCacheManagerProxy::~WebApplicationCacheManagerProxy): (WebKit::WebApplicationCacheManagerProxy::invalidate): (WebKit::WebApplicationCacheManagerProxy::didReceiveMessage): (WebKit::WebApplicationCacheManagerProxy::getApplicationCacheOrigins): (WebKit::WebApplicationCacheManagerProxy::didGetApplicationCacheOrigins): Use performAPICallbackWithSecurityOriginDataVector here. (WebKit::WebApplicationCacheManagerProxy::deleteEntriesForOrigin): (WebKit::WebApplicationCacheManagerProxy::deleteAllEntries): * UIProcess/WebApplicationCacheManagerProxy.h: Added. (WebKit::WebApplicationCacheManagerProxy::clearContext): (WebKit::WebApplicationCacheManagerProxy::type): * UIProcess/WebApplicationCacheManagerProxy.messages.in: Added. The WebProcess implementation to response to UIProcess messages and actually do the dirty-work in WebCore: * WebProcess/ApplicationCache: Added. * WebProcess/ApplicationCache/WebApplicationCacheManager.cpp: Added. (WebKit::WebApplicationCacheManager::shared): (WebKit::WebApplicationCacheManager::WebApplicationCacheManager): (WebKit::WebApplicationCacheManager::didReceiveMessage): (WebKit::WebApplicationCacheManager::getApplicationCacheOrigins): (WebKit::WebApplicationCacheManager::deleteEntriesForOrigin): (WebKit::WebApplicationCacheManager::deleteAllEntries): * WebProcess/ApplicationCache/WebApplicationCacheManager.h: Added. * WebProcess/ApplicationCache/WebApplicationCacheManager.messages.in: Added. 2011-02-22 Anders Carlsson Reviewed by Sam Weinig. Get rid of WebProcessManager https://bugs.webkit.org/show_bug.cgi?id=55001 WebProcessManager had become a stupid map of WebContext > WebProcess relations, which isn't really useful since the WebContext already knows about its process. * Shared/WebURLRequest.cpp: * UIProcess/API/mac/WKView.mm: * UIProcess/WebContext.cpp: (WebKit::WebContext::~WebContext): (WebKit::WebContext::ensureWebProcess): (WebKit::WebContext::processDidFinishLaunching): * UIProcess/WebProcessManager.cpp: Removed. * UIProcess/WebProcessManager.h: Removed. * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::didClose): * WebKit2.pro: * WebKit2.xcodeproj/project.pbxproj: * win/WebKit2.vcproj: 2011-02-22 Anders Carlsson Reviewed by Darin Adler. Get rid of WebProcessManager::getAllWebProcessContexts https://bugs.webkit.org/show_bug.cgi?id=55000 * Shared/WebURLRequest.cpp: (WebKit::WebURLRequest::setDefaultTimeoutInterval): Call WebContext::allContexts instead. * UIProcess/WebContext.cpp: * UIProcess/WebContext.h: Add a vector of WebContext objects. Update it when creating and destroying contexts. * UIProcess/WebProcessManager.cpp: * UIProcess/WebProcessManager.h: Remove WebProcessManager::getAllWebProcessContexts. 2011-02-22 Sam Weinig Reviewed by Anders Carlsson. Re-add early bail out in dispatchDecidePolicyForNavigationAction with prevents a crash running fast/loader/empty-embed-src-attribute.html. This matches a bail out in the default policy delegate in WebKit1. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): 2011-02-22 Anders Carlsson Reviewed by Dan Bernstein. Grammar correction from Spelling & Grammar window doesn't work https://bugs.webkit.org/show_bug.cgi?id=54982 * UIProcess/API/mac/WKView.mm: (-[WKView isGrammarCheckingEnabled]): (-[WKView setGrammarCheckingEnabled:]): Call down to the text checker. * UIProcess/TextChecker.h: Add updateSpellingUIWithGrammarString. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::updateSpellingUIWithGrammarString): Call TextChecker::updateSpellingUIWithGrammarString. * UIProcess/WebPageProxy.messages.in: Add UpdateSpellingUIWithGrammarString message. * UIProcess/gtk/TextCheckerGtk.cpp: (WebKit::TextChecker::updateSpellingUIWithGrammarString): * UIProcess/qt/TextCheckerQt.cpp: (WebKit::TextChecker::updateSpellingUIWithGrammarString): * UIProcess/win/TextCheckerWin.cpp: (WebKit::TextChecker::updateSpellingUIWithGrammarString): Add stubs. * UIProcess/mac/TextCheckerMac.mm: (WebKit::TextChecker::updateSpellingUIWithGrammarString): Update the spelling panel. * WebProcess/WebCoreSupport/WebEditorClient.cpp: (WebKit::WebEditorClient::updateSpellingUIWithGrammarString): Send an UpdateSpellingUIWithGrammarString message to the UI process. 2011-02-22 Balazs Kelemen Reviewed by Anders Carlsson. notImplemented() should behave identical in WebCore and WebKit2 https://bugs.webkit.org/show_bug.cgi?id=54449 Use NotImplemented.h from WebCore. Initialize logging channels. Remove the WebKit2 concept of notImplemented(). * Platform/gtk/SharedMemoryGtk.cpp: * Platform/gtk/WorkQueueGtk.cpp: * Platform/qt/WorkQueueQt.cpp: * Platform/win/WorkQueueWin.cpp: * Shared/NotImplemented.h: Removed. * Shared/Plugins/NPIdentifierData.cpp: * Shared/Plugins/NPRemoteObjectMap.cpp: * Shared/Plugins/NPVariantData.cpp: * Shared/cairo/ShareableBitmapCairo.cpp: * Shared/gtk/ShareableBitmapGtk.cpp: * Shared/gtk/WebCoreArgumentCodersGtk.cpp: * Shared/qt/WebCoreArgumentCodersQt.cpp: * Shared/win/LayerTreeContextWin.cpp: * UIProcess/API/mac/PageClientImpl.mm: * UIProcess/API/qt/qwkpage.cpp: * UIProcess/Launcher/gtk/ThreadLauncherGtk.cpp: * UIProcess/Launcher/qt/ProcessLauncherQt.cpp: * UIProcess/Plugins/gtk/PluginInfoStoreGtk.cpp: * UIProcess/WebContext.cpp: (WebKit::WebContext::WebContext): * UIProcess/WebInspectorProxy.cpp: * UIProcess/gtk/TextCheckerGtk.cpp: * UIProcess/gtk/WebInspectorGtk.cpp: * UIProcess/gtk/WebPreferencesGtk.cpp: * UIProcess/qt/TextCheckerQt.cpp: * UIProcess/qt/WebInspectorProxyQt.cpp: * UIProcess/win/TextCheckerWin.cpp: * UIProcess/win/WebContextMenuProxyWin.cpp: * WebKit2.pro: * WebKit2.xcodeproj/project.pbxproj: * WebProcess/Downloads/cf/DownloadCFNet.cpp: * WebProcess/Downloads/curl/DownloadCurl.cpp: * WebProcess/Downloads/mac/DownloadMac.mm: * WebProcess/Downloads/qt/DownloadQt.cpp: * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp: * WebProcess/Plugins/Netscape/JSNPMethod.cpp: * WebProcess/Plugins/Netscape/NPJSObject.cpp: * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp: * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: * WebProcess/Plugins/Netscape/gtk/NetscapePluginGtk.cpp: * WebProcess/Plugins/Netscape/qt/NetscapePluginQt.cpp: * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp: * WebProcess/WebCoreSupport/WebChromeClient.cpp: * WebProcess/WebCoreSupport/WebContextMenuClient.cpp: * WebProcess/WebCoreSupport/WebDragClient.cpp: * WebProcess/WebCoreSupport/WebEditorClient.cpp: * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: * WebProcess/WebCoreSupport/WebInspectorClient.cpp: * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp: * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: * WebProcess/WebCoreSupport/gtk/WebContextMenuClientGtk.cpp: * WebProcess/WebCoreSupport/gtk/WebPopupMenuGtk.cpp: * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm: * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm: * WebProcess/WebCoreSupport/qt/WebContextMenuClientQt.cpp: * WebProcess/WebPage/gtk/WebInspectorGtk.cpp: * WebProcess/WebPage/qt/WebInspectorQt.cpp: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::WebProcess): * WebProcess/gtk/WebProcessGtk.cpp: * config.h: * win/WebKit2.vcproj: 2011-02-22 Brian Weinstein Rubber-stamped by Brady Eidson. Invalidate the WebResourceCacheManagerProxy in WebContext::processDidClose. * UIProcess/WebContext.cpp: (WebKit::WebContext::processDidClose): 2011-02-21 Adam Roben Make DrawingAreaProxyImpl keep track of the most recent state ID it sent to the web process This will be useful for sending repeated messages for the same state ID to the web process. We don't do this currently, but will need to if we're asked to paint after we've thrown away our backing store to save memory. Fixes DrawingAreaProxyImpl should keep track of the state ID it last sent to the web process Reviewed by Anders Carlsson. * UIProcess/DrawingAreaProxyImpl.cpp: (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl): Initialize m_requestedStateID, and reordered member initialization to match the new declaration order. (WebKit::DrawingAreaProxyImpl::didUpdateState): Added an assertion that the stateID we got from the web process is no newer than the most recent one we requested. (WebKit::DrawingAreaProxyImpl::sendUpdateState): Changed to increment and send m_requestedStateID instead of a new global stateID. * UIProcess/DrawingAreaProxyImpl.h: Added m_requestedStateID, and moved the state IDs before other data members. Also beefed the comment explaining m_currentStateID. 2011-02-22 Andras Becsi Reviewed by Laszlo Gombos. [Qt] Redesign the build system https://bugs.webkit.org/show_bug.cgi?id=51339 Part 2. Build WebCore as a static library, compile the WebKit API and WebKit2 API in a final step and link to WebKit2, WebCore and JSC libraries to fix linking issues resulting from stripped away symbols. * WebKit2.pri: Add include paths. * WebKit2.pro: Move include paths to WebKit2.pri and move the API source to WebKit/qt/QtWebKit.pro 2011-02-22 Benjamin Poulain Reviewed by Kenneth Rohde Christiansen. [Qt] [WK2] Improve the memory handling of the context menu for WebKit 2 https://bugs.webkit.org/show_bug.cgi?id=54902 Refactor the context menu handling of Qt to make it simpler to manage memory. WebContextMenuProxyQt uses smart pointer for all the references to menu so there is no need to delete it explicitely. Passing the QMenu from QWKPage to the client of the signal now uses a QSharedPointer so the client can choose to handle the memory, but there is no leak if it does not. * UIProcess/API/qt/qgraphicswkview.cpp: (QGraphicsWKView::QGraphicsWKView): (QGraphicsWKView::showContextMenu): * UIProcess/API/qt/qgraphicswkview.h: * UIProcess/API/qt/qwkpage.h: * UIProcess/qt/WebContextMenuProxyQt.cpp: (WebKit::WebContextMenuProxyQt::showContextMenu): (WebKit::WebContextMenuProxyQt::createContextMenu): * UIProcess/qt/WebContextMenuProxyQt.h: 2011-02-22 Philippe Normand Reviewed by Xan Lopez. [GTK] make distcheck fails https://bugs.webkit.org/show_bug.cgi?id=54943 Removed reference to NotImplemented.h which was removed. * GNUmakefile.am: 2011-02-22 Kimmo Kinnunen Reviewed by Kenneth Rohde Christiansen. [Qt] QtWebProcess should be installed with 'make install' https://bugs.webkit.org/show_bug.cgi?id=44100 Follow the standard in other project files and allow install location to be changed with INSTALL_BINS variable. * WebProcess.pro: Install QtWebProcess. 2011-02-22 Sheriff Bot Unreviewed, rolling out r79296. http://trac.webkit.org/changeset/79296 https://bugs.webkit.org/show_bug.cgi?id=54941 Breaks compilation on SnowLeapard Intel Release (Requested by kbalazs_ on #webkit). * Platform/gtk/SharedMemoryGtk.cpp: * Platform/gtk/WorkQueueGtk.cpp: * Platform/qt/WorkQueueQt.cpp: * Platform/win/WorkQueueWin.cpp: * Shared/NotImplemented.h: Copied from Source/WebKit2/WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp. * Shared/Plugins/NPIdentifierData.cpp: * Shared/Plugins/NPRemoteObjectMap.cpp: * Shared/Plugins/NPVariantData.cpp: * Shared/cairo/ShareableBitmapCairo.cpp: * Shared/gtk/ShareableBitmapGtk.cpp: * Shared/gtk/WebCoreArgumentCodersGtk.cpp: * Shared/qt/WebCoreArgumentCodersQt.cpp: * Shared/win/LayerTreeContextWin.cpp: * UIProcess/API/mac/PageClientImpl.mm: * UIProcess/API/qt/qwkpage.cpp: * UIProcess/Launcher/gtk/ThreadLauncherGtk.cpp: * UIProcess/Launcher/qt/ProcessLauncherQt.cpp: * UIProcess/Plugins/gtk/PluginInfoStoreGtk.cpp: * UIProcess/WebContext.cpp: (WebKit::WebContext::WebContext): * UIProcess/WebInspectorProxy.cpp: * UIProcess/gtk/TextCheckerGtk.cpp: * UIProcess/gtk/WebInspectorGtk.cpp: * UIProcess/gtk/WebPreferencesGtk.cpp: * UIProcess/qt/TextCheckerQt.cpp: * UIProcess/qt/WebInspectorProxyQt.cpp: * UIProcess/win/TextCheckerWin.cpp: * UIProcess/win/WebContextMenuProxyWin.cpp: * WebKit2.pro: * WebKit2.xcodeproj/project.pbxproj: * WebProcess/Downloads/cf/DownloadCFNet.cpp: * WebProcess/Downloads/curl/DownloadCurl.cpp: * WebProcess/Downloads/mac/DownloadMac.mm: * WebProcess/Downloads/qt/DownloadQt.cpp: * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp: * WebProcess/Plugins/Netscape/JSNPMethod.cpp: * WebProcess/Plugins/Netscape/NPJSObject.cpp: * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp: * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: * WebProcess/Plugins/Netscape/gtk/NetscapePluginGtk.cpp: * WebProcess/Plugins/Netscape/qt/NetscapePluginQt.cpp: * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp: * WebProcess/WebCoreSupport/WebChromeClient.cpp: * WebProcess/WebCoreSupport/WebContextMenuClient.cpp: * WebProcess/WebCoreSupport/WebDragClient.cpp: * WebProcess/WebCoreSupport/WebEditorClient.cpp: * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: * WebProcess/WebCoreSupport/WebInspectorClient.cpp: * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp: * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: * WebProcess/WebCoreSupport/gtk/WebContextMenuClientGtk.cpp: * WebProcess/WebCoreSupport/gtk/WebPopupMenuGtk.cpp: * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm: * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm: * WebProcess/WebCoreSupport/qt/WebContextMenuClientQt.cpp: * WebProcess/WebPage/gtk/WebInspectorGtk.cpp: * WebProcess/WebPage/qt/WebInspectorQt.cpp: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::WebProcess): * WebProcess/gtk/WebProcessGtk.cpp: * config.h: * win/WebKit2.vcproj: 2011-02-16 Balazs Kelemen Reviewed by Anders Carlsson. notImplemented() should behave identical in WebCore and WebKit2 https://bugs.webkit.org/show_bug.cgi?id=54449 Use NotImplemented.h from WebCore. Initialize logging channels. Remove the WebKit2 concept of notImplemented(). * Platform/gtk/SharedMemoryGtk.cpp: * Platform/gtk/WorkQueueGtk.cpp: * Platform/qt/WorkQueueQt.cpp: * Platform/win/WorkQueueWin.cpp: * Shared/NotImplemented.h: Removed. * Shared/Plugins/NPIdentifierData.cpp: * Shared/Plugins/NPRemoteObjectMap.cpp: * Shared/Plugins/NPVariantData.cpp: * Shared/cairo/ShareableBitmapCairo.cpp: * Shared/gtk/ShareableBitmapGtk.cpp: * Shared/gtk/WebCoreArgumentCodersGtk.cpp: * Shared/qt/WebCoreArgumentCodersQt.cpp: * Shared/win/LayerTreeContextWin.cpp: * UIProcess/API/qt/qwkpage.cpp: * UIProcess/Launcher/gtk/ThreadLauncherGtk.cpp: * UIProcess/Launcher/qt/ProcessLauncherQt.cpp: * UIProcess/Plugins/gtk/PluginInfoStoreGtk.cpp: * UIProcess/WebContext.cpp: (WebKit::WebContext::WebContext): * UIProcess/WebInspectorProxy.cpp: * UIProcess/gtk/TextCheckerGtk.cpp: * UIProcess/gtk/WebInspectorGtk.cpp: * UIProcess/gtk/WebPreferencesGtk.cpp: * UIProcess/qt/TextCheckerQt.cpp: * UIProcess/qt/WebInspectorProxyQt.cpp: * UIProcess/win/TextCheckerWin.cpp: * UIProcess/win/WebContextMenuProxyWin.cpp: * WebKit2.pro: * WebProcess/Downloads/cf/DownloadCFNet.cpp: * WebProcess/Downloads/curl/DownloadCurl.cpp: * WebProcess/Downloads/mac/DownloadMac.mm: * WebProcess/Downloads/qt/DownloadQt.cpp: * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp: * WebProcess/Plugins/Netscape/JSNPMethod.cpp: * WebProcess/Plugins/Netscape/NPJSObject.cpp: * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp: * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: * WebProcess/Plugins/Netscape/gtk/NetscapePluginGtk.cpp: * WebProcess/Plugins/Netscape/qt/NetscapePluginQt.cpp: * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp: * WebProcess/WebCoreSupport/WebChromeClient.cpp: * WebProcess/WebCoreSupport/WebContextMenuClient.cpp: * WebProcess/WebCoreSupport/WebDragClient.cpp: * WebProcess/WebCoreSupport/WebEditorClient.cpp: * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: * WebProcess/WebCoreSupport/WebInspectorClient.cpp: * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp: * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: * WebProcess/WebCoreSupport/gtk/WebContextMenuClientGtk.cpp: * WebProcess/WebCoreSupport/gtk/WebPopupMenuGtk.cpp: * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm: * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm: * WebProcess/WebCoreSupport/qt/WebContextMenuClientQt.cpp: * WebProcess/WebPage/gtk/WebInspectorGtk.cpp: * WebProcess/WebPage/qt/WebInspectorQt.cpp: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::WebProcess): * WebProcess/gtk/WebProcessGtk.cpp: 2011-02-21 Timothy Hatcher Set and update the window title for the Web Inspector in WebKit2. https://webkit.org/b/50945 rdar://problem/8762410 Reviewed by Adam Roben. * UIProcess/WebInspectorProxy.cpp: (WebKit::WebInspectorProxy::inspectedURLChanged): Added. Call platformInspectedURLChanged. * UIProcess/WebInspectorProxy.h: * UIProcess/WebInspectorProxy.messages.in: Added InspectedURLChanged. * UIProcess/mac/WebInspectorProxyMac.mm: (WebKit::WebInspectorProxy::platformInspectedURLChanged): Added. Set the window title. * UIProcess/win/WebInspectorProxyWin.cpp: (WebKit::WebInspectorProxy::platformInspectedURLChanged): Added. Set the window title. * UIProcess/gtk/WebInspectorGtk.cpp: (WebKit::WebInspectorProxy::platformInspectedURLChanged): Added. Not implemented. * UIProcess/qt/WebInspectorProxyQt.cpp: (WebKit::WebInspectorProxy::platformInspectedURLChanged): Added. Not implemented. * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp: (WebKit::WebInspectorFrontendClient::inspectedURLChanged): Call WebInspector::inspectedURLChanged. * WebProcess/WebPage/WebInspector.cpp: (WebKit::WebInspector::inspectedURLChanged): Added. Send the InspectedURLChanged message. * WebProcess/WebPage/WebInspector.h: 2011-02-21 Sam Weinig Reviewed by Anders Carlsson. Can't paste from 3rd party text editor into WebKit2 window. * WebProcess/com.apple.WebProcess.sb: 2011-02-21 Anders Carlsson Reviewed by Dan Bernstein. Initialize DrawingAreaProxy::m_size https://bugs.webkit.org/show_bug.cgi?id=54913 This was removed in r76962 since it caused flashes when switching drawing areas due to entering and exiting composited mode, but since we no longer switch drawing areas we can put it back. * UIProcess/DrawingAreaProxy.cpp: (WebKit::DrawingAreaProxy::DrawingAreaProxy): 2011-02-21 Adam Roben Add some assertions about the state IDs we receive from the web process Rubber-stamped by Anders Carlsson. * UIProcess/DrawingAreaProxyImpl.cpp: (WebKit::DrawingAreaProxyImpl::update): (WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode): (WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode): Assert that the state ID the web process sent us is no newer than our own state ID. 2011-02-21 Adam Roben Rename DrawingArea[Proxy]Impl's "sequence number" concept to "state ID". As explained in r79251, DrawingAreaProxyImpl has some state that, when it changes, causes all operations performed before that state change to become invalid. Currently, this state consists of a single piece of data: the view's size. Eventually it will encompass more data (e.g., the backing store we're drawing into; when we start throwing away the backing store to save memory, our state will have changed, and any operations that were intended for the old backing store will have become invalid). r79251 effectively transformed DrawingArea[Proxy]Impl's "sequence number," which incremented every time DrawingAreaImpl sent DrawingAreaProxyImpl a message, to a "state ID," which only increments when the view's size changes. This patch is just a set of simple renames to reflect the transformation that r79251 effected. It should not introduce any changes in behavior. The renames are: - Messages::DrawingArea::SetSize -> UpdateState - Messages::DrawingAreaProxy::DidSetSize -> DidUpdateState - DrawingAreaProxyImpl::m_lastDidSetSizeSequenceNumber -> m_currentStateID - DrawingAreaProxyImpl::m_isWaitingForDidSetSize -> m_isWaitingForDidUpdateState - DrawingAreaProxyImpl::waitForAndDispatchDidSetSize -> waitForAndDispatchDidUpdateState - DrawingAreaImpl::m_inSetSize -> m_inUpdateState - generateSequenceNumber -> generateStateID - sequenceNumber -> stateID Fixes DrawingArea[Proxy]Impl's "sequence number" concept should be renamed to "state ID" Reviewed by Anders Carlsson. * UIProcess/DrawingAreaProxy.h: * UIProcess/DrawingAreaProxy.messages.in: * UIProcess/DrawingAreaProxyImpl.cpp: * UIProcess/DrawingAreaProxyImpl.h: * WebProcess/WebPage/DrawingArea.h: * WebProcess/WebPage/DrawingArea.messages.in: * WebProcess/WebPage/DrawingAreaImpl.cpp: * WebProcess/WebPage/DrawingAreaImpl.h: Performed the renames described above. 2011-02-21 Alexey Proskuryakov Reviewed by Adam Roben. REGRESSION (WebKit2): HTTP requests time out after 60 seconds https://bugs.webkit.org/show_bug.cgi?id=54755 * Shared/API/c/WKURLRequest.cpp: (WKURLRequestSetDefaultTimeoutInterval): * Shared/API/c/WKURLRequest.h: Added an API to set a default timeout interval for requests created from URLs. The API affects both the UI process and requests created internally by the Web process. Requests created from NSURLRequest or CFURLRequest take timeout from those. * Shared/WebURLRequest.cpp: (WebKit::WebURLRequest::setDefaultTimeoutInterval): * Shared/WebURLRequest.h: Pipe the default timeout interval from WKURLRequest down to actual implementation. Since WebURLRequest is currently implemented with WebCore::ResourceRequest, it automatically respects NSURLRequest default timeout interval. * UIProcess/WebProcessManager.cpp: (WebKit::WebProcessManager::getAllWebProcessContexts): * UIProcess/WebProcessManager.h: Added a way to enumerate all contexts running in separate processes. * Shared/WebProcessCreationParameters.cpp: (WebKit::WebProcessCreationParameters::WebProcessCreationParameters): (WebKit::WebProcessCreationParameters::encode): (WebKit::WebProcessCreationParameters::decode): * Shared/WebProcessCreationParameters.h: (WebKit::WebContext::ensureWebProcess): (WebKit::WebContext::setDefaultRequestTimeoutInterval): * UIProcess/WebContext.h: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::initializeWebProcess): (WebKit::WebProcess::setDefaultRequestTimeoutInterval): * WebProcess/WebProcess.h: * WebProcess/WebProcess.messages.in: Use UI process default timeout interval in separate process contexts, too. 2011-02-18 Brian Weinstein Reviewed by Adam Roben. WebResourceCacheManager should be responsible for managing the CFURLCache as well as the WebCore memory cache. https://bugs.webkit.org/show_bug.cgi?id=54886 Part of * WebProcess/ResourceCache/WebResourceCacheManager.cpp: (WebKit::WebResourceCacheManager::getCacheOrigins): Call through to cFURLCacheHostNames, and add create SecurityOrigin's for them and add them to the set of SecurityOrigins with cache. (WebKit::WebResourceCacheManager::clearCacheForOrigin): Call through to clear the CFURLCache for the origin's hostname. * WebProcess/ResourceCache/WebResourceCacheManager.h: * WebProcess/ResourceCache/cf: Added. * WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.cpp: Added. (WebKit::WebResourceCacheManager::cfURLCacheHostNames): Call through to WebKitSystemInterface. (WebKit::WebResourceCacheManager::clearCFURLCacheForHostNames): Ditto. * win/WebKit2.vcproj: Added new file. * WebKit2.xcodeproj/project.pbxproj: Ditto. 2011-02-21 Adam Roben Move control of the sequence number from DrawingAreaImpl to DrawingAreaProxyImpl DrawingAreaProxyImpl has some state that, when it changes, causes all operations performed before that state change to become invalid. When painting, we need to have performed at least one Update for the most recent state; otherwise, we'll be painting old/incorrect bits into the view. Currently, this state consists of a single piece of data: the view's size. Whenever the state (i.e., size) changes, we tell the web process via the SetSize message, and the web process lets us know that it has updated to match the new state (i.e., size) via the DidSetSize message. When it's time to paint, if we're waiting for the web process to update to match our current state (i.e., size), we block for a little while hoping to receive a DidSetSize message so that we can paint up-to-date bits into the window. This can cause us to receive messages out-of-order; the DidSetSize message will be processed immediately, and any messages that were sent before the DidSetSize message will be processed later. Since the messages from before the DidSetSize message correspond to an old state (i.e., size), they are no longer useful (e.g., they contain bits of the page that are drawn at the wrong size/location), so we discard them. The way we identify and discard these messages is by keeping track of a sequence number. Currently, DrawingAreaImpl sends a monotonically-increasing sequence number to DrawingAreaProxyImpl with every message. Whenever DrawingAreaProxyImpl receives a DidSetSize message, it records the sequence number that came along with it. If we then later receive any messages that have a lower sequence number, we know they correspond to an old state (i.e., size) and can discard them. This patch moves control of the sequence number to DrawingAreaProxyImpl. DrawingAreaProxyImpl now sends a monotonically-increasing sequence number in the SetSize message. DrawingAreaImpl records this sequence number when it receives the SetSize message, and sends it back to DrawingAreaProxyImpl in every message. Otherwise the logic is the same as before. This should cause no changes in behavior, but will allow DrawingAreaProxyImpl to request a full backing store update (by incrementing the sequence number) at times other than when the view's size changes (e.g., after it has thrown away its backing store in order to save memory). Fixes DrawingAreaProxyImpl should tell DrawingAreaImpl what sequence number to use Reviewed by Anders Carlsson. * UIProcess/DrawingAreaProxyImpl.cpp: (WebKit::generateSequenceNumber): Moved here from DrawingAreaImpl.cpp. (WebKit::DrawingAreaProxyImpl::sendSetSize): Changed to pass a new sequence number in the SetSize message. (WebKit::DrawingAreaProxyImpl::waitForAndDispatchDidSetSize): Added a FIXME about a potential improvement. * WebProcess/WebPage/DrawingArea.h: (WebKit::DrawingArea::setSize): Updated to match the message's new parameters. * WebProcess/WebPage/DrawingArea.messages.in: Added a sequenceNumber parameter to SetSize. * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::DrawingAreaImpl): Initialize m_sequenceNumber. (WebKit::DrawingAreaImpl::setSize): Record the new sequence number from the UI process. (WebKit::DrawingAreaImpl::layerHostDidFlushLayers): (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode): (WebKit::DrawingAreaImpl::display): Send m_sequenceNumber, instead of a new sequence number, back to the UI process. * WebProcess/WebPage/DrawingAreaImpl.h: Added m_sequenceNumber, updated setSize function to match the base class. 2011-02-21 Gavin Barraclough Reviewed by Sam Weinig. Bug 54894 - Make inheritance structure described by ClassInfo match C++ class hierarchy. The ClassInfo objects describe an inheritance hierarchy, with each ClassInfo instance containing a pointer to its parent class. These links should reflect the inheritance hierarchy of C++ classes below JSObject. For the large part it does, but in some cases entries in the C++ hierarchy are skipped over. This presently likely doesn't matter, since intervening C++ classes may not have ClassInfo - but would be a potential bug were ClassInfo were to be added. * WebProcess/Plugins/Netscape/JSNPObject.cpp: 2011-02-21 Balazs Kelemen Reviewed by Kenneth Rohde Christiansen. [Qt] Implement WorkQueue::sheduleWorkAfterDelay https://bugs.webkit.org/show_bug.cgi?id=54878 * Platform/qt/WorkQueueQt.cpp: (WorkQueue::scheduleWorkAfterDelay): 2011-02-20 Alejandro G. Castro Reviewed by Martin Robinson. [GTK] Add WebResourceCacheDataManager to the compilation after r78848 https://bugs.webkit.org/show_bug.cgi?id=54732 Added resource cache manager API to GTK+ compilation after r78848. * GNUmakefile.am: 2011-02-20 Sam Weinig Reviewed by Dan Bernstein. Crash in WebProcess at com.apple.WebCore: WebCore::Page::goToItem + 46 * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::goForward): (WebKit::WebPage::goBack): (WebKit::WebPage::goToBackForwardItem): Defend agains null HistoryItems. 2011-02-20 Anders Carlsson Reviewed by Maciej Stachowiak. Crash when a plug-in requests a javascript: url that destroys the plug-in https://bugs.webkit.org/show_bug.cgi?id=54837 * WebProcess/Plugins/PluginProxy.cpp: (WebKit::PluginProxy::destroy): Null out m_pluginController. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::performJavaScriptURLRequest): Don't access the frame through m_pluginElement since it will be nulled out when the plug-in is destroyed. 2011-02-20 Anders Carlsson Reviewed by Sam Weinig. Fix another crash when a plug-in is destroyed when evaluating JavaScript https://bugs.webkit.org/show_bug.cgi?id=54834 This contains three separate fixes: - In unprotectPluginFromDestruction we can't just destroy the plug-in once the count reaches zero, because the plug-in might still have code executing on the stack. To fix this we use a zero-delay timer to defer destruction of the plug-in. - Trying to get the NPObject for the window using NPN_GetValue would return NPERR_NO_ERROR, even if the returned NPObject was null. Fix this to return NPERR_GENERIC_ERROR instead. - Protect the plug-in from destruction anytime an NPAPI call that sends a synchronous IPC message is made. * PluginProcess/PluginControllerProxy.cpp: (WebKit::PluginControllerProxy::PluginControllerProxy): (WebKit::PluginControllerProxy::destroy): (WebKit::PluginControllerProxy::unprotectPluginFromDestruction): * PluginProcess/PluginControllerProxy.h: * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: (WebKit::PluginDestructionProtector::PluginDestructionProtector): (WebKit::NPN_GetValue): (WebKit::NPN_Evaluate): (WebKit::NPN_GetProperty): (WebKit::NPN_SetProperty): (WebKit::NPN_RemoveProperty): (WebKit::NPN_HasProperty): (WebKit::NPN_HasMethod): (WebKit::NPN_Enumerate): (WebKit::NPN_Construct): (WebKit::NPN_GetValueForURL): (WebKit::NPN_SetValueForURL): 2011-02-19 Sam Weinig Reviewed by Anders Carlsson. Add phase in addition to momentumPhase to platform wheel events Part of Rename existing phase to momentumPhase. * Shared/WebEvent.h: (WebKit::WebWheelEvent::momentumPhase): * Shared/WebEventConversion.cpp: (WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent): * Shared/WebWheelEvent.cpp: (WebKit::WebWheelEvent::WebWheelEvent): (WebKit::WebWheelEvent::encode): (WebKit::WebWheelEvent::decode): * Shared/mac/WebEventFactory.mm: (WebKit::phaseForEvent): (WebKit::momentumPhaseForEvent): (WebKit::WebEventFactory::createWebWheelEvent): 2011-02-19 Anders Carlsson Reviewed by Dan Bernstein. Crash when trying to take a snapshot of an uninitialized plug-in https://bugs.webkit.org/show_bug.cgi?id=54812 * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::notifyWidget): Don't try to create a snapshot of the plug-in if it hasn't been initialized. 2011-02-18 Gavin Barraclough Reviewed by Sam Weinig. Bug 54786 - Devirtualize JSCell::classInfo() Instead of making a virtual function call, add a pointer to the ClassInfo onto Structure. This removes a virtual function call, and paves the way towards removing all the createStructure methods, and StructureFlags/AnonymousSlotCount properties (these should be able to move onto ClassInfo). Calls to Structure::create must now pass a pointer to the ClassInfo for the structure. All objects now have a ClassInfo pointer, non-object cell types still do not. Changes are most mechanical, involving three steps: * Remove virtual classInfo() methods. * Add &s_info parameter to calls to Structure::create. * Rename ClassInfo static members on classes from 'info' to 's_info', for consistency. * 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-02-19 Sam Weinig Reviewed by Anders Carlsson. Rename performLookupAtCurrentMouseLocation to performDictionaryLookupAtCurrentMouseLocation * UIProcess/API/mac/WKView.mm: (-[WKView performDictionaryLookupAtCurrentMouseLocation]): * UIProcess/API/mac/WKViewPrivate.h: 2011-02-19 Charlie Reis Reviewed by Mihai Parparita. Ensure loading has stopped in HistoryController::goToItem https://bugs.webkit.org/show_bug.cgi?id=54517 Add a FrameLoaderClient callback for whether to stop loading before goToItem. Test: http/tests/navigation/forward-to-fragment-fires-onload.html * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebFrameLoaderClient::shouldStopLoadingForHistoryItem): Added. * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: 2011-02-18 Sam Weinig Reviewed by Adele Peterson. Real fix for CrashTracer: [USER] 1 crash in WebProcess at com.apple.WebKit2: WebKit::WebPage::didChangeScrollOffsetForMainFrame + 31 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::didChangeScrollOffset): Add null check for the FrameView. This function can be called when the FrameView is being torn down during a transition to a new FrameView. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::didChangeScrollOffsetForMainFrame): Revert last attempt. 2011-02-18 Anders Carlsson Reviewed by Sam Weinig. Hang trying to load nytimes.com with Flash installed * Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::sendSyncMessage): Call beginWaitForSyncReply() before sending the message. Otherwise, in some cases we could have gotten back a synchronous request before calling beginWaitForSyncReply(), and then we wouldn't process it correctly. (Which would lead to the hang). 2011-02-18 Simon Fraser Reviewed by Kevin Decker. Some plug-ins are the wrong size after zooming Use the same frame/bounds adjustment that we use for NSView-based plugins in WebKit2, which allows plug-ins and their snapshots to render with the correct size after scaling. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::setBoundsSize): (WebKit::PluginView::viewGeometryDidChange): (WebKit::PluginView::clipRectInWindowCoordinates): * WebProcess/Plugins/PluginView.h: 2011-02-18 Beth Dakin Rubber-stamped by Adele Peterson. Fix for CrashTracer: [USER] 1 crash in WebProcess at com.apple.WebKit2: WebKit::WebPage::didChangeScrollOffsetForMainFrame + 31 Simple null-check. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::didChangeScrollOffsetForMainFrame): 2011-02-18 Viatcheslav Ostapenko Reviewed by Kenneth Rohde Christiansen. Tiled backing store area is too big. Error in area calculcation causes size of backing store up to 8 times bigger than viewport with default multipliers. https://bugs.webkit.org/show_bug.cgi?id=54587 * UIProcess/TiledDrawingAreaProxy.cpp: (WebKit::TiledDrawingAreaProxy::calculateKeepRect): (WebKit::TiledDrawingAreaProxy::calculateCoverRect): 2011-02-18 John Sullivan Reviewed by Maciej Stachowiak. https://bugs.webkit.org/show_bug.cgi?id=54780 pendingAPIRequestURL isn't updated for WKPageGoToBackForwardListItem * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::goToBackForwardItem): Update the pending API URL. 2011-02-18 Anders Carlsson Reviewed by Sam Weinig. Accelerated content fades in when using a layer backed WKView * UIProcess/API/mac/WKView.mm: (-[WKView _enterAcceleratedCompositingMode:]): Make a new nested CATransaction and disable animations when adding the layer hosting subview. This avoids an implicit fade animation that would otherwise occur. 2011-02-18 Simon Fraser Reviewed by Dan Bernstein. Plugin snapshot location is wrong for subframes https://bugs.webkit.org/show_bug.cgi?id=54776 Only change the CTM to the way that the plugin expects it when painting the plugin, not when drawing the snapshot. This fixes the snapshot location when painting flattened frames. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::paint): 2011-02-18 Anders Carlsson Reviewed by Simon Fraser. Implement NetscapePlugin::pluginComplexTextInputIdentifier https://bugs.webkit.org/show_bug.cgi?id=54770 * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: (WebKit::NetscapePlugin::pluginComplexTextInputIdentifier): 2011-02-18 Sam Weinig Reviewed by Maciej Stachowiak. Add the ability to ask the WKPage if the main frame is pinned to the right or left hand side. Part of . * UIProcess/API/C/WKPage.cpp: (WKPageIsPinnedToLeftSide): (WKPageIsPinnedToRightSide): * UIProcess/API/C/WKPage.h: Add new API calls. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::WebPageProxy): (WebKit::WebPageProxy::close): (WebKit::WebPageProxy::processDidCrash): (WebKit::WebPageProxy::didChangeScrollOffsetPinningForMainFrame): * UIProcess/WebPageProxy.h: (WebKit::WebPageProxy::isPinnedToLeftSide): (WebKit::WebPageProxy::isPinnedToRightSide): Initialize, reset and update the pinned state. * UIProcess/WebPageProxy.messages.in: Add message to update the pinned state. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::didChangeScrollOffset): * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::WebPage): (WebKit::WebPage::didChangeScrollOffsetForMainFrame): * WebProcess/WebPage/WebPage.h: Cache the pinned state, and only update the UIProcess when it changes. 2011-02-18 Anders Carlsson Reviewed by Simon Fraser. Fix assertion in SharedMemory::create when trying to snapshot 0x0 plug-in https://bugs.webkit.org/show_bug.cgi?id=54768 * PluginProcess/PluginControllerProxy.cpp: (WebKit::PluginControllerProxy::snapshot): Don't try to create a handle from a null ShareableBitmap. * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: (WebKit::NetscapePlugin::snapshot): Check for a zero sized plug-in before trying to create a snapshot. 2011-02-18 Anders Carlsson Reviewed by Simon Fraser. WKView flashes when entering/exiting compositing mode https://bugs.webkit.org/show_bug.cgi?id=54695 * UIProcess/API/mac/WKView.mm: (-[WKView _exitAcceleratedCompositingMode]): Remove the layer hosting view before clearing out its layer, otherwise we can get white flashes when exiting accelerated compositing mode. * WebProcess/WebPage/DrawingAreaImpl.cpp: When entering accelerated compositing mode, we want to defer sending the message until we've actually committed the layer tree and pushed all changes over to the UI process. (WebKit::DrawingAreaImpl::layerHostDidFlushLayers): Tell the layer tree host to force a repaint. This will ensure that all layer tree changes are pushed over to the UI process. When that is done, send the new layer tree context over to the UI process. (WebKit::DrawingAreaImpl::setRootCompositingLayer): When exiting compositing mode in response to a didSetSize, we want to exit accelerated compositing mode right away to avoid flashes. This is safe since we've laid out the page already so we won't end up reentering setRootCompositingLayer. (WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode): Tell the layer tree host to notify us when the next layer tree flush happened, so we can let the UI process know. If we're entering accelerated compositing mode in response to a SetSize message, the new layer tree context will be passed in the DidSetSize message. * WebProcess/WebPage/DrawingAreaImpl.h: Add layerHostDidFlushLayers. * WebProcess/WebPage/LayerTreeHost.h: Add setShouldNotifyAfterNextScheduledLayerFlush. * WebProcess/WebPage/mac/LayerTreeHostMac.h: Add a m_notifyAfterScheduledLayerFlush flag. * WebProcess/WebPage/mac/LayerTreeHostMac.mm: (WebKit::LayerTreeHostMac::LayerTreeHostMac): Initialize m_notifyAfterScheduledLayerFlush to false. (WebKit::LayerTreeHostMac::setShouldNotifyAfterNextScheduledLayerFlush): Set m_notifyAfterScheduledLayerFlush to true. (WebKit::LayerTreeHostMac::flushPendingLayerChangesRunLoopObserverCallback): If m_notifyAfterScheduledLayerFlush is true, call DrawingAreaImpl::layerHostDidFlushLayers. 2011-02-18 Alexey Proskuryakov Reviewed by Adele Peterson. REGRESSION (WebKit2): Wrong frame printed on tivofaq.com https://bugs.webkit.org/show_bug.cgi?id=54677 * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::area): Use visible frame bounds. (WebKit::findLargestFrameInFrameSet): Added a comment explaining what we're up to here. WebKit2 shouldn't be making policy decisions for the client, but it gets dangerously close to that. We used to expose the same as WK1 API though. 2011-02-18 Balazs Kelemen Unreviwed. Remove CleanupHandler since we do not use it anymore. * Shared/qt/CleanupHandler.cpp: Removed. * Shared/qt/CleanupHandler.h: Removed. 2011-02-18 Alejandro G. Castro Fix GTK build by fixing signature of platformPaint(), required after r78956. * WebProcess/Plugins/Netscape/gtk/NetscapePluginGtk.cpp: (WebKit::NetscapePlugin::platformPaint): 2011-02-17 Dan Bernstein LLVM Compiler build fix. * UIProcess/WebResourceCacheManagerProxy.h: * WebProcess/ResourceCache/WebResourceCacheManager.h: 2011-02-17 Simon Fraser Fix Windows and Qt builds by fixing signature of platformPaint(). * WebProcess/Plugins/Netscape/qt/NetscapePluginQt.cpp: (WebKit::NetscapePlugin::platformPaint): * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp: (WebKit::NetscapePlugin::platformPaint): 2011-02-17 Simon Fraser Reviewed by Sam Weinig. WebKit2 snapshots don't show plug-ins https://bugs.webkit.org/show_bug.cgi?id=54716 Fix WebKit2 plug-ins to do a software paint for snapshotting. * PluginProcess/PluginControllerProxy.h: * PluginProcess/PluginControllerProxy.cpp: (WebKit::PluginControllerProxy::snapshot): Respond to the snapshot message by getting a sharable bitmap from the plugin, and returning a handle to it in the reply. * PluginProcess/PluginControllerProxy.messages.in: Add the snapshot message. * Shared/Plugins/PluginQuirks.h: * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm: (WebKit::NetscapePluginModule::determineQuirks): Add a quirk for the ability to be snapshotted, which we only set for Flash at the moment. * WebProcess/Plugins/Netscape/NetscapePlugin.h: * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: (WebKit::NetscapePlugin::snapshot): Create a shareable bitmap, and paint into it. (WebKit::NetscapePlugin::supportsSnapshotting): Test the quirk. * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: (WebKit::NetscapePlugin::platformPaint): Allow the paint to happen if we're snapshotting, even when using the CoreAnimation drawing model. * WebProcess/Plugins/Plugin.h: New snapshot method. * WebProcess/Plugins/PluginProxy.h: * WebProcess/Plugins/PluginProxy.cpp: (WebKit::PluginProxy::snapshot): Send a sync message to the plugin process, asking for a snapshot in a shareble bitmap. * WebProcess/Plugins/PluginView.h: * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::paint): Use the snapshot if we have one, to avoid calling into the plugin to draw, which may run script. (WebKit::PluginView::notifyWidget): Generate the snapshot before a flattening paint, and throw it away after. 2011-02-17 Jessie Berlin Reviewed by Adam Roben. WebKit2: The CFNetwork Cache should be shared between the UI Process and the Web Process on Windows. https://bugs.webkit.org/show_bug.cgi?id=54683 * Shared/WebProcessCreationParameters.cpp: (WebKit::WebProcessCreationParameters::encode): (WebKit::WebProcessCreationParameters::decode): * Shared/WebProcessCreationParameters.h: * UIProcess/win/WebContextWin.cpp: (WebKit::WebContext::platformInitializeWebProcess): Make sure to remove the ending slash, as CFNetwork does not recognize the directory with that slash. * WebProcess/win/WebProcessWin.cpp: (WebKit::WebProcess::platformInitializeWebProcess): Create a cache using the path, disk capacity, and memory capacity and set it as default. 2011-02-17 Anders Carlsson Reviewed by Sam Weinig. Web and/or plug-in process crashes when NPN_Evaluate destroys the plug-in https://bugs.webkit.org/show_bug.cgi?id=54686 This patch fixes two bugs with a plug-in calling NPN_Evaluate to destroy itself: - The PluginProxy object would be destroyed in the middle of PluginProxy::evaluate. This would cause the web process to crash. - The PluginControllerProxy would call NPP_Destroy while the plug-in was busy running code. This would cause the plug-in process to crash. To fix this, we add protectPluginFromDestruction/unprotectPluginFromDestruction to PluginControllerProxy and use it to defer calling destroy() in the plug-in process, and defer actually destroying the plug-in in the web process. https://bugs.webkit.org/show_bug.cgi?id=54171 tracks adding a test for this. * PluginProcess/PluginControllerProxy.cpp: (WebKit::PluginControllerProxy::PluginControllerProxy): (WebKit::PluginControllerProxy::destroy): (WebKit::PluginControllerProxy::evaluate): (WebKit::PluginControllerProxy::protectPluginFromDestruction): (WebKit::PluginControllerProxy::unprotectPluginFromDestruction): * PluginProcess/PluginControllerProxy.h: (WebKit::PluginControllerProxy::asPluginController): * PluginProcess/WebProcessConnection.cpp: (WebKit::WebProcessConnection::destroyPluginControllerProxy): (WebKit::WebProcessConnection::didReceiveMessage): (WebKit::WebProcessConnection::didReceiveSyncMessage): * PluginProcess/WebProcessConnection.h: (WebKit::WebProcessConnection::connection): * WebProcess/Plugins/PluginController.h: (WebKit::PluginController::PluginDestructionProtector::PluginDestructionProtector): (WebKit::PluginController::PluginDestructionProtector::~PluginDestructionProtector): * WebProcess/Plugins/PluginProxy.cpp: (WebKit::PluginProxy::evaluate): * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::protectPluginFromDestruction): (WebKit::PluginView::unprotectPluginFromDestruction): * WebProcess/Plugins/PluginView.h: 2011-02-17 Sam Weinig Build fix. * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::performDictionaryLookupAtLocation): 2011-02-17 Sam Weinig Reviewed by Maciej Stachowiak. WebKit2: Support Dictionary popup * Shared/TextInfo.cpp: Added. (WebKit::TextInfo::encode): (WebKit::TextInfo::decode): * Shared/TextInfo.h: Added. (WebKit::TextInfo::TextInfo): Add class to represent the location and style of a run of text. * UIProcess/PageClient.h: * UIProcess/API/mac/PageClientImpl.h: * UIProcess/API/mac/PageClientImpl.mm: (WebKit::PageClientImpl::didPerformDictionaryLookup): Invoke the dictionary popup. * UIProcess/API/mac/WKView.mm: (-[WKView performLookupAtCurrentMouseLocation]): Tell the WebProcess to get get the text under the mouse and cause the dictionary popup to appear. * UIProcess/API/mac/WKViewPrivate.h: Add performLookupAtCurrentMouseLocation. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::performDictionaryLookupAtLocation): (WebKit::WebPageProxy::didPerformDictionaryLookup): * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * WebProcess/WebPage/WebPage.cpp: * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: Pipe messages through. * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::characterRangeAtPoint): Fix to return PassRefPtr and not potentially stale pointers. (WebKit::WebPage::characterIndexForPoint): Change to use a RefPtr. (WebKit::WebPage::performDictionaryLookupAtLocation): Add simple heuristic to get the word at the current point (or the current selection if it is at that point) and grab the style of the word to send the UIProcess. * WebKit2.pro: * WebKit2.xcodeproj/project.pbxproj: * win/WebKit2.vcproj: Add new files. 2011-02-17 Brian Weinstein Qt build fix. * WebKit2.pro: Update after renaming of MemoryCache to ResourceCache. 2011-02-17 Brian Weinstein Mac build fix. * WebKit2.xcodeproj/project.pbxproj: Use relative to group instead of absolute paths. Not everyone's home directory is /Users/brian_weinstein. 2011-02-16 Brian Weinstein Reviewed by Brady Eidson. WebKit2: Need a way to manage the WebCore Cache https://bugs.webkit.org/show_bug.cgi?id=54501 Implement a WebKit2 API to manage the WebCore memory cache. This API exposes three functions: 1) A method to get a list of all security origins that have entries in the WebCore memory cache. 2) A method to remove all entries in the WebCore memory cache from a SecurityOrigin. 3) A method to remove all entries from the WebCore memory cache. * Platform/CoreIPC/MessageID.h: Add two new MessageClasses. * Shared/API/c/WKBase.h: * Shared/APIObject.h: Add a CacheManager type. * Shared/WebSecurityOrigin.h: Typedef WKCacheManagerRef. (WebKit::WebSecurityOrigin::createFromString): Creates a WebCore::SecurityOrigin using SecurityOrigin::createFromString. (WebKit::WebSecurityOrigin::toString): Calls through to SecurityOrigin::toString. * UIProcess/API/C/WKAPICast.h: * UIProcess/API/C/WKCacheManager.cpp: Added. (WKCacheManagerGetTypeID): Returns the WebResourceCacheManagerProxy type. (WKCacheManagerGetCacheOrigins): Calls through to WebResourceCacheManagerProxy::getCacheOrigins. (callGetCacheOriginsBlockBlockAndDispose): (WKCacheManagerGetCacheOrigins_b): (WKCacheManagerDeleteCacheForOrigin): Calls through to WebResourceCacheManagerProxy::deleteCacheForOrigin. (WKCacheManagerDeleteAllCache): Calls through to WebResourceCacheManagerProxy::deleteAllCache. * UIProcess/API/C/WKCacheManager.h: Added. * UIProcess/API/C/WKContext.cpp: (WKContextGetCacheManager): Calls to get the WebResourceCacheManagerProxy. * UIProcess/API/C/WKContext.h: * UIProcess/WebResourceCacheManagerProxy.cpp: Added. (WebKit::WebResourceCacheManagerProxy::create): Calls through to the constructor. (WebKit::WebResourceCacheManagerProxy::WebResourceCacheManagerProxy): Initialize the m_webContext variable. (WebKit::WebResourceCacheManagerProxy::~WebResourceCacheManagerProxy): (WebKit::WebResourceCacheManagerProxy::invalidate): Invalidate the callback map. (WebKit::WebResourceCacheManagerProxy::getCacheOrigins): Call through to the web process to get the cache origins. (WebKit::WebResourceCacheManagerProxy::didGetCacheOrigins): Call the callback. (WebKit::WebResourceCacheManagerProxy::deleteCacheForOrigin): Call through to the web process to delete cache for the given origin. (WebKit::WebResourceCacheManagerProxy::deleteAllCache): Call through to the web process to delete all of the cache. * UIProcess/WebResourceCacheManagerProxy.h: Added. (WebKit::WebResourceCacheManagerProxy::clearContext): (WebKit::WebResourceCacheManagerProxy::type): * UIProcess/WebResourceCacheManagerProxy.messages.in: Added. * UIProcess/WebContext.cpp: (WebKit::WebContext::WebContext): Initialize new member variable. (WebKit::WebContext::~WebContext): Invalidates new member variable. (WebKit::WebContext::didReceiveMessage): Passes cache messages to the cache manager. * UIProcess/WebContext.h: (WebKit::WebContext::cacheManagerProxy): * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::didReceiveMessage): Add a new message class. * WebProcess/ResourceCache/WebResourceCacheManager.cpp: Added. (WebKit::WebResourceCacheManager::shared): (WebKit::WebResourceCacheManager::WebResourceCacheManager): (WebKit::WebResourceCacheManager::~WebResourceCacheManager): (WebKit::WebResourceCacheManager::didReceiveMessage): Calls through to didReceiveWebResourceCacheManagerMessage. (WebKit::WebResourceCacheManager::getCacheOrigins): Gets a list of origins with cache entries from the memory cache, and puts them into a vector to send to the UI process. (WebKit::WebResourceCacheManager::deleteCacheForOrigin): Calls through to ResourceCache to delete all cache entries from a given origin. (WebKit::WebResourceCacheManager::deleteAllCache): * WebProcess/ResourceCache/WebResourceCacheManager.h: Added. * WebProcess/ResourceCache/WebResourceCacheManager.messages.in: Added. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::didReceiveMessage): (WebKit::WebProcess::clearResourceCaches): Tell the memory cache to evict its resources. This was done on WebKit1, but not WebKit2. * WebProcess/WebProcess.h: * WebKit2.xcodeproj/project.pbxproj: Added new files. * win/WebKit2.vcproj: Ditto. * win/WebKit2Common.vsprops: Added new include directory. * win/WebKit2Generated.make: Added new header. 2011-02-16 David Hyatt Reviewed by Dan Bernstein. https://bugs.webkit.org/show_bug.cgi?id=54244 Convert the line box tree to floating point and eliminate font rounding hacks. This patch removes all of the rounding hacks from the Font code and makes sure all Font APIs involving width measurement and width offsets use floats. The line box tree's x, y and logicalWidth members have all been converted to floats and all of the line box APIs have been changed as well. In terms of pixel adjustments, overflow is using an enclosing model (so it will be enclosingIntRect of a line box's x/y/width/height). Background and border painting is using a rounding model, so borders and backgrounds will round to the nearest pixel when painting. Replaced elements still snap to integer positions on lines, and they use a rounding model as well, although their underlying line boxes still have a precise floating point position. Justification will now allow subpixel positioning to occur as well. Platforms that don't support subpixel positioning should already be rounding justification spacing in their font code. Many layout test results change on Mac, since rounding hacks were used there and are now gone. * WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp: (WebKit::WebPopupMenu::setUpPlatformData): 2011-02-10 Luiz Agostini Reviewed by Adam Roben. HTML5
and : localized text https://bugs.webkit.org/show_bug.cgi?id=54260 The method defaultDetailsSummaryText was added to LocalizationStrategy class. It is used to provide the default label to be used by a
tag that has no child. * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: (WebKit::WebPlatformStrategies::defaultDetailsSummaryText): * WebProcess/WebCoreSupport/WebPlatformStrategies.h: 2011-02-17 Adam Roben Make sure layout is up-to-date before rendering the layer tree in DrawingAreaImpl Fixes Assertion failure in FrameView::paintContents when calling WKPageForceRepaint on a page that uses accelerated compositing Reviewed by Anders Carlsson. * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::forceRepaint): Lay out before we do anything else. 2011-02-17 Alejandro G. Castro Reviewed by Martin Robinson. [GTK] Add WKPluginSiteDataManager.cpp compilation after r78647 https://bugs.webkit.org/show_bug.cgi?id=54564 * GNUmakefile.am: Added files to compilation. * Shared/Plugins/Netscape/NetscapePluginModule.h: used npruntime_internal.h in the include to avoid problems with X types. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::setAlwaysUsesComplexTextCodePath): fixed ambiguous reference to Font caused by the X headers required by the plugins. 2011-02-16 Matthew Delaney Reviewed by Simon Fraser. Allow acceleratesDrawing for WebKit2 https://bugs.webkit.org/show_bug.cgi?id=54511 Plumb through preference for accelerated drawing. If accelerated drawing is enabled, keep the DrawingAreaImpl in accelerated compositing mode. * Shared/WebPreferencesStore.h: * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetAcceleratedDrawingEnabled): (WKPreferencesGetAcceleratedDrawingEnabled): * UIProcess/API/C/WKPreferencesPrivate.h: * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::DrawingAreaImpl): (WebKit::DrawingAreaImpl::setRootCompositingLayer): (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode): * WebProcess/WebPage/DrawingAreaImpl.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): 2011-02-16 Yael Aharon Reviewed by Andreas Kling. [Qt] White screen is displayed when tiled backing store is enabled in MiniBrowser. https://bugs.webkit.org/show_bug.cgi?id=54583 Make sure to invalidate all the tiles, including the last one. * UIProcess/TiledDrawingAreaProxy.cpp: (WebKit::TiledDrawingAreaProxy::invalidate): 2011-02-16 Yael Aharon Reviewed by Andreas Kling. [Qt] Tiles are not created for webkit2 after r77286. https://bugs.webkit.org/show_bug.cgi?id=54577 When using the default tile size of 1024x1024, only one tile is created. Make sure to create this tile by undoing what seems to be a typo in r77286. * UIProcess/TiledDrawingAreaProxy.cpp: (WebKit::TiledDrawingAreaProxy::paint): (WebKit::TiledDrawingAreaProxy::createTiles): == Rolled over to ChangeLog-2011-02-16 ==