2011-02-25  Anders Carlsson  <andersca@apple.com>

        Reviewed by Darin Adler.

        Plug-in process crashes when using GuardMalloc
        https://bugs.webkit.org/show_bug.cgi?id=55279
        <rdar://problem/9044618>

        Update m_environmentPointer after copying the environment variables.
        
        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
        (WebKit::EnvironmentVariables::copyEnvironmentVariables):

2011-02-25  Darin Adler  <darin@apple.com>

        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
        (WebKit::ProcessLauncher::launchProcess): Fixed backwards logic from last change.

2011-02-25  Darin Adler  <darin@apple.com>

        Reviewed by Mark Rowe.

        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
        (WebKit::ProcessLauncher::launchProcess): Fixed performance problem in production
        builds by only setting DYLD_FRAMEWORK_PATH in engineering configurations.

2011-02-25  Darin Adler  <darin@apple.com>

        Reviewed by Anders Carlsson.

        <rdar://problem/8036034> WebKit2 should work even if DYLD_FRAMEWORK_PATH is not set

        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
        (WebKit::EnvironmentVariables::~EnvironmentVariables): Use fastFree, not delete, on
        the strings here because they are allocated with fastMalloc, not new.
        (WebKit::EnvironmentVariables::set): Use const more.
        (WebKit::EnvironmentVariables::get): Ditto.
        (WebKit::EnvironmentVariables::appendValue): Ditto.
        (WebKit::EnvironmentVariables::valueIfVariableHasName): Ditto. Also fix mistake
        where this would match if the name matched only a prefix of the environment variable's
        name. We want to match the whole name, so we need to use memcmp, not strncmp.
        (WebKit::EnvironmentVariables::createStringForVariable): Use const more.
        (WebKit::ProcessLauncher::launchProcess): Use clearer name, frameworkExecutablePath,
        for what was called bundlePath before. Append the frameworks path to DYLD_FRAMEWORK_PATH,
        ensuring we can pick up other frameworks from the same directory in the web process.
        Use a const_cast instead of a C-style cast.

2011-02-25  Chris Fleizach  <cfleizach@apple.com>

        Reviewed by Anders Carlsson.

        AX: WK2: AXApplication not returning the AXFocusedUIElement within the web area
        https://bugs.webkit.org/show_bug.cgi?id=55277

        * UIProcess/API/mac/WKView.mm:
        (-[WKView accessibilityFocusedUIElement]):

2011-02-25  Alexey Proskuryakov  <ap@apple.com>

        Reviewed by Anders Carlsson.

        https://bugs.webkit.org/show_bug.cgi?id=55276
        WebPage::close() accesses "this" after it is destroyed.

        This was making many tests crash with GuardMalloc.

        * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::close): Access "this" before it can be
        destroyed, not after.

2011-02-25  Balazs Kelemen  <kbalazs@webkit.org>

        Unreviewed.
        Add missing sources to WebKit2API.pri.

        * WebKit2API.pri:

2011-02-25  Anders Carlsson  <andersca@apple.com>

        Reviewed by Darin Adler.

        A WKView without a window will cause CG errors in the console
        https://bugs.webkit.org/show_bug.cgi?id=55264
        <rdar://problem/9044281>

        Check that the window has a valid window number before trying to get its graphics context.

        * UIProcess/API/mac/PageClientImpl.mm:
        (WebKit::PageClientImpl::containingWindowGraphicsContext):

2011-02-25  Brian Weinstein  <bweinstein@apple.com>

        Reviewed by Brady Eidson and looked over by Jessie Berlin.

        WebKit2: Need a way to manage cookies from the web process
        https://bugs.webkit.org/show_bug.cgi?id=55086
        
        Call through to WebCore::CookieJar in our WebCookieManager functions.

        * WebProcess/Cookies/WebCookieManager.cpp:
        (WebKit::WebCookieManager::getHostnamesWithCookies):
        (WebKit::WebCookieManager::deleteCookiesForHostname):
        (WebKit::WebCookieManager::deleteAllCookies):

2011-02-25  Anders Carlsson  <andersca@apple.com>

        Reviewed by Sam Weinig.

        Option-clicking on links doesn't download them due to sandbox violation
        https://bugs.webkit.org/show_bug.cgi?id=55250
        <rdar://problem/9018359>

        The change to make DecidePolicyForNavigationAction sync didn't handle the case when the
        decided policy was "Download". Fix this by passing along the download ID back to the web process.

        * Platform/CoreIPC/HandleMessage.h:
        (CoreIPC::callMemberFunction):
        Add new overload.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::WebPageProxy):
        Initialize m_syncNavigationActionPolicyDownloadID.

        (WebKit::WebPageProxy::receivedPolicyDecision):
        Set m_syncNavigationActionPolicyDownloadID to the download ID.

        (WebKit::WebPageProxy::decidePolicyForNavigationAction):
        Return the m_syncNavigationActionPolicyDownloadID.

        * UIProcess/WebPageProxy.h:
        * UIProcess/WebPageProxy.messages.in:
        Add a DownloadID reply parameter.

        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
        Don't pass a zero download ID to didReceivePolicyDecision.

2011-02-25  Amruth Raj  <amruthraj@motorola.com> and Ravi Phaneendra Kasibhatla  <ravi.kasibhatla@motorola.com> and Alejandro G. Castro  <alex@igalia.com>

        Reviewed by Martin Robinson.

        [GTK] Implement WebContext and NativeKeyboardEvent classes for WebKit2
        https://bugs.webkit.org/show_bug.cgi?id=48510

        * GNUmakefile.am:
        * Shared/NativeWebKeyboardEvent.h: Added the GTK event attribute
        and constructors, in our case we need it because we use a pointer
        and copy the event.
        (WebKit::NativeWebKeyboardEvent::nativeEvent):
        * Shared/gtk/NativeWebKeyboardEventGtk.cpp: Added.
        (WebKit::NativeWebKeyboardEvent::NativeWebKeyboardEvent): We need
        to copy the event in the constructor to avoid two references to
        the same event.
        * Shared/gtk/WebEventFactory.cpp: Changed the prototype of the
        functions to add const, we need it for the NativeWebKeyboardEvent
        constructor.
        (WebKit::modifiersForEvent):
        (WebKit::WebEventFactory::createWebKeyboardEvent):
        * UIProcess/gtk/WebContextGtk.cpp: Added. Stubbed implementation
        for GTK port. Yet to implement.
        (WebKit::WebContext::applicationCacheDirectory):
        (WebKit::WebContext::platformInitializeWebProcess):
        (WebKit::WebContext::platformDefaultDatabaseDirectory):
        * UIProcess/gtk/WebView.cpp:
        (WebKit::WebView::handleKeyboardEvent):

2011-02-25  Anders Carlsson  <andersca@apple.com>

        Reviewed by Sam Weinig.

        Get rid of more old accelerated compositing code
        https://bugs.webkit.org/show_bug.cgi?id=55235

        * Shared/CoreIPCSupport/DrawingAreaProxyMessageKinds.h:
        * UIProcess/ChunkedUpdateDrawingAreaProxy.h:
        * UIProcess/DrawingAreaProxy.h:
        * UIProcess/DrawingAreaProxyImpl.cpp:
        * UIProcess/DrawingAreaProxyImpl.h:
        * WebProcess/WebPage/ChunkedUpdateDrawingArea.h:
        * WebProcess/WebPage/DrawingArea.h:
        * WebProcess/WebPage/DrawingAreaImpl.cpp:
        * WebProcess/WebPage/DrawingAreaImpl.h:

2011-02-25  Andras Becsi  <abecsi@webkit.org>

        Reviewed by Csaba Osztrogonác.

        [Qt] Make the WebKit2 build system less confusing for non-Qt developers
        https://bugs.webkit.org/show_bug.cgi?id=55213

        * WebKit2API.pri: Added.

2011-02-25  Amruth Raj  <amruthraj@motorola.com> and Ravi Phaneendra Kasibhatla  <ravi.kasibhatla@motorola.com> and Alejandro G. Castro  <alex@igalia.com>

        Reviewed by Martin Robinson.

        [GTK] Implement WebView and WebKitWebView classes for WebKit2
        https://bugs.webkit.org/show_bug.cgi?id=48509

        * GNUmakefile.am:
        * UIProcess/API/C/gtk/WKView.cpp:
        * UIProcess/API/C/gtk/WKView.h: Removed gdkrectangle from
        constructor.
        * UIProcess/gtk/WebViewWidget.cpp: Added. The GObject interface
        for WebView. The GObject is the GtkWidget handle which is used by
        WebView class for GTK port.
        * UIProcess/gtk/WebViewWidget.h: Added. The GObject interface
        declarations for GtkWidget handle for GTK port.
        * UIProcess/gtk/WebView.cpp: Added. The native GtkWidget handle
        for GTK port which is associated with each WKViewRef.
        * UIProcess/gtk/WebView.h: Added. Class which implements the
        PageClient interface. It is a wrapper over the native GtkWidget
        handle associated with each WKViewRef for GTK port.

2011-02-25  Alejandro G. Castro  <alex@igalia.com>

        Fix GTK compilation after r79654.

        * GNUmakefile.am:

2011-02-24  Brian Weinstein  <bweinstein@apple.com>

        Qt build fix.

        * WebKit2.pri:

2011-02-24  Brady Eidson  <beidson@apple.com>

        Reviewed by Sam Weinig and looked over by Brian Weinstein.

        Part of <rdar://problem/8762095> and https://bugs.webkit.org/show_bug.cgi?id=55172
        Need WebKit2 API to view/manage origins with LocalStorage.

        Project file stuff:
        * GNUmakefile.am:
        * WebKit2.pri:
        * WebKit2.pro:
        * WebKit2.xcodeproj/project.pbxproj:
        * win/WebKit2.vcproj:
        * win/WebKit2Common.vsprops:
        * win/WebKit2Generated.make:

        WK2 derived sources and API stuff:
        * DerivedSources.make:
        * DerivedSources.pro:
        * Platform/CoreIPC/MessageID.h:
        * Shared/API/c/WKBase.h:
        * Shared/APIObject.h:
        * UIProcess/API/C/WKAPICast.h:

        Add an KeyValueStorageManager to the context and invalidate it at the appropriate times:
        * UIProcess/WebContext.cpp:
        (WebKit::WebContext::WebContext):
        (WebKit::WebContext::~WebContext):
        (WebKit::WebContext::disconnectProcess):
        (WebKit::WebContext::didReceiveMessage):
        * UIProcess/WebContext.h:
        (WebKit::WebContext::keyValueStorageManagerProxy):

        Add API to get the KeyValueStorageManager for a context:
        * UIProcess/API/C/WKContext.cpp:
        (WKContextGetKeyValueStorageManager):
        * 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 WebKeyValueStorageManagerProxy:
        * UIProcess/API/C/WKKeyValueStorageManager.cpp: Added.
        (WKKeyValueStorageManagerGetTypeID):
        (WKKeyValueStorageManagerGetKeyValueStorageOrigins):
        (WKKeyValueStorageManagerDeleteEntriesForOrigin):
        (WKKeyValueStorageManagerDeleteAllEntries):
        * UIProcess/API/C/WKKeyValueStorageManager.h: Added.

        The UIProcess implementation of the manager to send messages to the WebProcess and pipe a callback back up to the client:
        * UIProcess/WebKeyValueStorageManagerProxy.cpp: Added.
        (WebKit::WebKeyValueStorageManagerProxy::create):
        (WebKit::WebKeyValueStorageManagerProxy::WebKeyValueStorageManagerProxy):
        (WebKit::WebKeyValueStorageManagerProxy::~WebKeyValueStorageManagerProxy):
        (WebKit::WebKeyValueStorageManagerProxy::invalidate):
        (WebKit::WebKeyValueStorageManagerProxy::didReceiveMessage):
        (WebKit::WebKeyValueStorageManagerProxy::getKeyValueStorageOrigins):
        (WebKit::WebKeyValueStorageManagerProxy::didGetKeyValueStorageOrigins):
        (WebKit::WebKeyValueStorageManagerProxy::deleteEntriesForOrigin):
        (WebKit::WebKeyValueStorageManagerProxy::deleteAllEntries):
        * UIProcess/WebKeyValueStorageManagerProxy.h: Added.
        (WebKit::WebKeyValueStorageManagerProxy::clearContext):
        (WebKit::WebKeyValueStorageManagerProxy::type):
        * UIProcess/WebKeyValueStorageManagerProxy.messages.in: Added.

        The WebProcess implementation to response to UIProcess messages and actually do the dirty-work in WebCore:
        * WebProcess/KeyValueStorage: Added.
        * WebProcess/KeyValueStorage/WebKeyValueStorageManager.cpp: Added.
        (WebKit::WebKeyValueStorageManager::shared):
        (WebKit::WebKeyValueStorageManager::WebKeyValueStorageManager):
        (WebKit::WebKeyValueStorageManager::didReceiveMessage):
        (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
        (WebKit::WebKeyValueStorageManager::deleteEntriesForOrigin):
        (WebKit::WebKeyValueStorageManager::deleteAllEntries):
        * WebProcess/KeyValueStorage/WebKeyValueStorageManager.h: Added.
        * WebProcess/KeyValueStorage/WebKeyValueStorageManager.messages.in: Added.

2011-02-24  Darin Adler  <darin@apple.com>

        Reviewed by Anders Carlsson.

        WebKit2: Image-based cursors do not work
        https://bugs.webkit.org/show_bug.cgi?id=55184

        * Shared/ShareableBitmap.h: Added releaseData function
        declaration. This is only defined for CG, but we can declare
        it without defining it on non-CG platforms without causing problems.

        * Shared/WebCoreArgumentCoders.cpp: Added.
        (CoreIPC::encodeImage): Added. For use in the Cursor argument coder.
        (CoreIPC::decodeImage): Ditto.

        * Shared/WebCoreArgumentCoders.h: Added code to the Cursor encoder
        and decoder to handle image-based cursors, using the new encodeImage
        and decodeImage functions.

        * Shared/cg/ShareableBitmapCG.cpp:
        (WebKit::ShareableBitmap::releaseData): Added.
        (WebKit::ShareableBitmap::createGraphicsContext): Use
        CGBitmapContextCreateWithData instead of CGBitmapContextCreate,
        to guarantee we outlast the CGBitmapContext we create.
        (WebKit::ShareableBitmap::paint): Got rid of unnneeded local variable.

        * Shared/cg/WebCoreArgumentCodersCG.cpp: Added.
        (CoreIPC::createImage): Added. For use by CoreIPC::decodeImage.

        * WebKit2.xcodeproj/project.pbxproj: Added WebCoreArgumentCoders.cpp
        and WebCoreArgumentCodersCG.cpp.
        * win/WebKit2.vcproj: Ditto.

2011-02-24  Anders Carlsson  <andersca@apple.com>

        Reviewed by Dan Bernstein.

        Crash when trying to send a sync message on an invalid connection
        https://bugs.webkit.org/show_bug.cgi?id=55190
        <rdar://problem/9035806>

        * Platform/CoreIPC/Connection.cpp:
        (CoreIPC::Connection::sendSyncMessage):
        Don't try to call a client function if isValid() returns false since the client
        will be null in that case.

2011-02-24  Anders Carlsson  <andersca@apple.com>

        Reviewed by Dan Bernstein.

        Remove the layer backed drawing area
        https://bugs.webkit.org/show_bug.cgi?id=55174

        * GNUmakefile.am:
        * Shared/DrawingAreaInfo.h:
        * UIProcess/API/mac/WKView.mm:
        * UIProcess/LayerBackedDrawingAreaProxy.cpp: Removed.
        * UIProcess/LayerBackedDrawingAreaProxy.h: Removed.
        * UIProcess/mac/LayerBackedDrawingAreaProxyMac.mm: Removed.
        * UIProcess/win/LayerBackedDrawingAreaProxyWin.cpp: Removed.
        * UIProcess/win/WebView.cpp:
        * WebKit2.xcodeproj/project.pbxproj:
        * WebProcess/WebPage/DrawingArea.cpp:
        (WebKit::DrawingArea::create):
        * WebProcess/WebPage/LayerBackedDrawingArea.cpp: Removed.
        * WebProcess/WebPage/LayerBackedDrawingArea.h: Removed.
        * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm: Removed.
        * WebProcess/WebPage/win/LayerBackedDrawingAreaWin.cpp: Removed.
        * win/WebKit2.vcproj:

2011-02-24  Mike Thole  <mthole@apple.com>

        Reviewed by Sam Weinig.

        WK2: Add ability to get document node for a WKBundleNodeHandle
        https://bugs.webkit.org/post_bug.cgi

        * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
        (WKBundleNodeHandleCopyDocument):
        * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h:
        * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
        (WebKit::InjectedBundleNodeHandle::document):
        * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:

2011-02-24  Brady Eidson  <beidson@apple.com>

        Reviewed by Adam Roben and looked at by Brian Weinstein.

        https://bugs.webkit.org/show_bug.cgi?id=55165
        Can call CF API with a null CFArray in WebResourceCacheManager

        * WebProcess/ResourceCache/WebResourceCacheManager.cpp:
        (WebKit::WebResourceCacheManager::getCacheOrigins): cfURLCacheHostNames() can return a null CFArrayRef, 
          so the call to CFArrayGetCount must be null checked.

2011-02-24  Anders Carlsson  <andersca@apple.com>

        Reviewed by Simon Fraser.

        ASSERTION FAILED: !isInAcceleratedCompositingMode() when entering accelerated compositing early
        https://bugs.webkit.org/show_bug.cgi?id=55162
        <rdar://problem/9048523>

        * WebProcess/WebPage/DrawingAreaImpl.cpp:
        (WebKit::DrawingAreaImpl::updateState):
        Call setShouldNotifyAfterNextScheduledLayerFlush(false) so the web process process won't send an
        EnterAcceleratedCompositingMode message.

        (WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode):
        setShouldNotifyAfterNextScheduledLayerFlush now takes a boolean.

        * WebProcess/WebPage/LayerTreeHost.h:
        * WebProcess/WebPage/mac/LayerTreeHostMac.h:
        * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
        (WebKit::LayerTreeHostMac::setShouldNotifyAfterNextScheduledLayerFlush):
        Make this take a boolean.

2011-02-24  Peter Kasting  <pkasting@google.com>

        Reviewed by Eric Seidel.

        Drop the "U; " encryption level from the User Agent string.
        https://bugs.webkit.org/show_bug.cgi?id=54566

        * UIProcess/gtk/WebPageProxyGtk.cpp:
        (WebKit::WebPageProxy::standardUserAgent):
        * UIProcess/mac/WebPageProxyMac.mm:
        (WebKit::WebPageProxy::standardUserAgent):
        * UIProcess/qt/WebPageProxyQt.cpp:
        (WebKit::WebPageProxy::standardUserAgent):
        * UIProcess/win/WebPageProxyWin.cpp:
        (WebKit::WebPageProxy::standardUserAgent):

2011-02-24  Andrew Wilson  <atwilson@chromium.org>

        Unreviewed, rolling out r79570.
        http://trac.webkit.org/changeset/79570
        https://bugs.webkit.org/show_bug.cgi?id=54874

        Breaks chromium build because glue/mocks/mock_web_frame.h/cc
        was not updated

        * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
        * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:

2011-02-23  Brian Weinstein  <bweinstein@apple.com>

        Reviewed by Adam Roben and looked over by Jessie Berlin.

        Part of WebKit2: Need a way to manage cookies from the web process
        https://bugs.webkit.org/show_bug.cgi?id=55086
        
        This patch adds the plumbing and classes that are needed to manage cookies from the web process.
        The functions that the API calls are currently stubs, but will be implemented in a follow-up patch.

        Project file changes.
        * DerivedSources.make:
        * DerivedSources.pro:
        * GNUmakefile.am:
        * WebKit2.pri:
        * WebKit2.pro:
        * WebKit2.xcodeproj/project.pbxproj:
        * win/WebKit2.vcproj:
        * win/WebKit2Common.vsprops:
        * win/WebKit2Generated.make:

        Add some needed plumbing for WebCookieManager{Proxy}.
        * Platform/CoreIPC/MessageID.h:
        * Shared/API/c/WKBase.h:
        * Shared/APIObject.h:
        * UIProcess/API/C/WKAPICast.h:

        * UIProcess/API/C/WKContext.cpp:
        (WKContextGetCookieManager): Gets the cookie manager proxy.
        * UIProcess/API/C/WKContext.h:
        * UIProcess/API/C/WKCookieManager.cpp: Added.
        (WKCookieManagerGetTypeID):
        (WKCookieManagerGetHostnamesWithCookies): Calls through to WebCookieManagerProxy.
        (WKCookieManagerDeleteCookiesForHostname): Ditto.
        (WKCookieManagerDeleteAllCookies): Ditto.
        * UIProcess/API/C/WKCookieManager.h: Added.

        * UIProcess/WebProcessProxy.cpp:
        (WebKit::WebProcessProxy::didReceiveMessage): Add a case for the cookie manager.
        * UIProcess/WebContext.cpp:
        (WebKit::WebContext::WebContext): Initialize the cookie manager.
        (WebKit::WebContext::~WebContext): Invalidate the cookie manager.
        (WebKit::WebContext::disconnectProcess): Ditto.
        (WebKit::WebContext::didReceiveMessage): Add a case for the cookie manager.
        * UIProcess/WebContext.h:
        (WebKit::WebContext::cookieManagerProxy): Returns the cookie manager.
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::didReceiveMessage): Add a case for the cookie manager.

        * UIProcess/WebCookieManagerProxy.cpp: Added.
        (WebKit::WebCookieManagerProxy::create):
        (WebKit::WebCookieManagerProxy::WebCookieManagerProxy):
        (WebKit::WebCookieManagerProxy::~WebCookieManagerProxy):
        (WebKit::WebCookieManagerProxy::invalidate):
        (WebKit::WebCookieManagerProxy::didReceiveMessage): 
        (WebKit::WebCookieManagerProxy::getHostnamesWithCookies): Call through to the web process to get hostnames with cookies.
        (WebKit::WebCookieManagerProxy::didGetHostnamesWithCookies): Call the callback we were passed in getHostnamesWithCookies.
        (WebKit::WebCookieManagerProxy::deleteCookiesForHostname): Call through to the web process to delete cookies
            for the origin.
        (WebKit::WebCookieManagerProxy::deleteAllCookies): Call through to the web process to delete all cookies.
        * UIProcess/WebCookieManagerProxy.h: Added.
        (WebKit::WebCookieManagerProxy::clearContext):
        (WebKit::WebCookieManagerProxy::type):
        * UIProcess/WebCookieManagerProxy.messages.in: Added.

        * WebProcess/Cookies: Added.
        * WebProcess/Cookies/WebCookieManager.cpp: Added.
        (WebKit::WebCookieManager::shared):
        (WebKit::WebCookieManager::WebCookieManager):
        (WebKit::WebCookieManager::didReceiveMessage): Call through to didReceiveWebCookieManagerMessage.
        (WebKit::WebCookieManager::getHostnamesWithCookies): Build an array from a HashSet (that isn't filled yet), and 
            convert that HashSet to a Vector to send to the UI process.
        (WebKit::WebCookieManager::deleteCookiesForHostname): Added a stub.
        (WebKit::WebCookieManager::deleteAllCookies): Ditto.
        * WebProcess/Cookies/WebCookieManager.h: Added.
        * WebProcess/Cookies/WebCookieManager.messages.in: Added.

2011-02-24   Amruth Raj  <amruthraj@motorola.com> and Ravi Phaneendra Kasibhatla  <ravi.kasibhatla@motorola.com> and Alejandro G. Castro  <alex@igalia.com>

        Reviewed by Martin Robinson.

        [GTK] Implement WebEventFactory, WebErrors classes for WebKit2
        https://bugs.webkit.org/show_bug.cgi?id=48510

        * GNUmakefile.am:
        * Shared/gtk/WebEventFactory.cpp: Added. implementation for
        WebMouseEvent, WebWheelEvent, WebKeyboardEvent.
        * Shared/gtk/WebEventFactory.h: Added.
        * WebProcess/WebCoreSupport/gtk/WebErrorsGtk.cpp: Added. Stubbed
        implementation for GTK port.

2011-02-24  Vsevolod Vlasov  <vsevik@chromium.org>

        Reviewed by Alexey Proskuryakov.

        DumpRenderTree should reset frame opener between tests.
        https://bugs.webkit.org/show_bug.cgi?id=54874

        Added clearOpener method to WKBundleWebFramePrivate.

        * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
        (WKBundleFrameClearOpener):
        * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:

2011-02-24  Benjamin Poulain  <benjamin.poulain@nokia.com>

        Reviewed by Eric Seidel.

        Support building WebKit with Python 3
        https://bugs.webkit.org/show_bug.cgi?id=55038

        Update the generator scripts to support Python 3.

        * Scripts/generate-message-receiver.py: print is a function in Python 3, write the output to
        sys.stdout to be compatible with Python 2 and 3.
        * Scripts/generate-messages-header.py:
        * Scripts/webkit2/messages.py: dist.iteritems does not exist in Python 3, fallback
          to dict.items which is common to Python 2 and 3.

2011-02-24  Andras Becsi  <abecsi@webkit.org>

        Reviewed by Laszlo Gombos.

        [Qt] MinGW build fails to link
        https://bugs.webkit.org/show_bug.cgi?id=55050

        Prepend the libraries of subcomponents instead of appending them
        to fix the library order according to the dependency of the libraries

        * WebKit2.pri:

2011-02-24  Andras Becsi  <abecsi@webkit.org>

        Reviewed by Csaba Osztrogonác.

        [Qt] REGRESSION(69304): WKNativeEvent.h forwarding header is always regenerated
        https://bugs.webkit.org/show_bug.cgi?id=47589

        In case of file name clashes only generate forwarding header for the current platform.

        * Scripts/generate-forwarding-headers.pl:

2011-02-23  Anders Carlsson  <andersca@apple.com>

        Reviewed by Sam Weinig.

        Remove some of the old accelerated compositing code
        https://bugs.webkit.org/show_bug.cgi?id=55084

        * UIProcess/API/mac/PageClientImpl.h:
        * UIProcess/API/mac/PageClientImpl.mm:
        (WebKit::PageClientImpl::exitAcceleratedCompositingMode):
        * UIProcess/API/mac/WKView.mm:
        * UIProcess/API/mac/WKViewInternal.h:
        * UIProcess/API/qt/qwkpage_p.h:
        * UIProcess/PageClient.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::exitAcceleratedCompositingMode):
        * UIProcess/WebPageProxy.h:
        * UIProcess/WebPageProxy.messages.in:
        * UIProcess/mac/LayerBackedDrawingAreaProxyMac.mm:
        (WebKit::LayerBackedDrawingAreaProxy::attachCompositingContext):
        (WebKit::LayerBackedDrawingAreaProxy::detachCompositingContext):
        * UIProcess/win/WebView.cpp:
        * UIProcess/win/WebView.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::enterAcceleratedCompositingMode):
        (WebKit::WebPage::exitAcceleratedCompositingMode):
        * WebProcess/WebPage/WebPage.h:

2011-02-23  Enrica Casucci  <enrica@apple.com>

        Reverting an unintentional change that was part of http://trac.webkit.org/changeset/79494.
        Unreviewed.

        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::interceptEditingKeyboardEvent):

2011-02-18  Enrica Casucci  <enrica@apple.com>

        Reviewed by Adam Roben.

        Mac OS X Services are not available for selected text in WebKit2 windows.
        https://bugs.webkit.org/show_bug.cgi?id=54777
        <rdar://problem/8666428>
        
        This patch adds support for Mac OS X Services in WebKit2 windows.
        In WKView we now call registerServicesMenuSendTypes providing the
        pasteboard types supported by WebKit and we also implement the two
        protocol methods required to validate the send type and write the
        content to the pasteboard. Unfortunately, AppKit expects the content
        to be available in the pasteboard upon return from writeSelectionToPasteboard and
        this is the reason why the call to the WebProcess is synchronous.

        * Shared/SelectionState.h:
        (WebKit::SelectionState::SelectionState): Extended to include
        isContentRichlyEditable
        * Shared/mac/PasteboardTypes.h:
        * Shared/mac/PasteboardTypes.mm:
        (WebKit::PasteboardTypes::forSelection): Added.
        * UIProcess/API/mac/WKView.mm:
        (-[WKView initWithFrame:contextRef:pageGroupRef:]): Added call
        to registerServicesMenuSendTypes.
        (-[WKView writeSelectionToPasteboard:types:]): Added.
        (-[WKView validRequestorForSendType:returnType:]): Added.
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::writeSelectionToPasteboard):
        * UIProcess/WebPageProxy.h:
        * WebProcess/WebCoreSupport/WebEditorClient.cpp:
        (WebKit::WebEditorClient::respondToChangedSelection): Modified to
        support the new SelectionState value.
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in:
        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::writeSelectionToPasteboard): Added synchronous
        message to write the selected content to the pasteboard.

2011-02-23  Anders Carlsson  <andersca@apple.com>

        Reviewed by Sam Weinig.

        Add a ShareableBitmap::create overload that takes an existing SharedMemory object
        https://bugs.webkit.org/show_bug.cgi?id=55081

        * Shared/ShareableBitmap.cpp:
        (WebKit::ShareableBitmap::createShareable):
        (WebKit::ShareableBitmap::create):
        * Shared/ShareableBitmap.h:

2011-02-23  Anders Carlsson  <andersca@apple.com>

        Reviewed by Dan Bernstein.

        Web Inspector toolbar looks bad in WebKit2
        https://bugs.webkit.org/show_bug.cgi?id=55076
        <rdar://problem/8866258>

        * UIProcess/API/mac/WKView.mm:
        (-[WKView mouseDownCanMoveWindow]):
        Return NO from mouseDownCanMoveWindow to prevent drags in the (now transparent) inspector WKView
        from dragging the window around.

        * UIProcess/mac/WebInspectorProxyMac.mm:
        (WebKit::WebInspectorProxy::platformCreateInspectorPage):
        Call [WKView setDrawsBackground:NO].

2011-02-23  Sam Weinig  <sam@webkit.org>

        Reviewed by Anders Carlsson.

        Remove WKPageForceRepaintWithInvalidation and instead make WKPageForceRepaint
        always dirty the entire page.

        * Shared/ForceRepaintFlags.h: Removed.
        * UIProcess/API/C/WKPage.cpp:
        (WKPageForceRepaint):
        * UIProcess/API/C/WKPage.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::forceRepaint):
        * UIProcess/WebPageProxy.h:
        * WebKit2.pro:
        * WebKit2.xcodeproj/project.pbxproj:
        * WebProcess/WebPage/DrawingAreaImpl.cpp:
        (WebKit::DrawingAreaImpl::forceRepaint):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::forceRepaint):
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in:
        * win/WebKit2.vcproj:

2011-02-23  Anders Carlsson  <andersca@apple.com>

        Reviewed by Sam Weinig.

        Race condition when creating and destroying pages quickly
        https://bugs.webkit.org/show_bug.cgi?id=55061
        <rdar://problem/8708435>

        When the last page in a web process is closed, the web process would
        previously terminate, even if the UI process had created a new page
        (the CreateNewPage message just wouldn't have reached the web process yet).

        Fix this by adding a ShouldTerminate message that the web process sends when it's
        about to terminate. If the UI process has any pending pages, downloads etc. it will
        prevent the web process from terminating. Otherwise, it will immmediately disconnect
        the WebPageProxy so that creating a page after that will launch a new web process.

        * UIProcess/Plugins/WebPluginSiteDataManager.cpp:
        (WebKit::WebPluginSiteDataManager::shouldTerminate):
        * UIProcess/Plugins/WebPluginSiteDataManager.h:
        * UIProcess/WebContext.cpp:
        (WebKit::WebContext::shouldTerminate):
        (WebKit::WebContext::disconnectProcess):
        * UIProcess/WebContext.h:
        * UIProcess/WebProcessProxy.cpp:
        (WebKit::WebProcessProxy::disconnect):
        (WebKit::WebProcessProxy::didReceiveSyncMessage):
        (WebKit::WebProcessProxy::didClose):
        (WebKit::WebProcessProxy::shouldTerminate):
        * UIProcess/WebProcessProxy.h:
        * UIProcess/WebProcessProxy.messages.in:
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::terminateIfPossible):

2011-02-23  Mike Thole  <mthole@apple.com>

        Reviewed by Darin Adler.

        WKBundleNavigationAction.h should be exposed as a public header
        https://bugs.webkit.org/show_bug.cgi?id=55059

        * WebKit2.xcodeproj/project.pbxproj:
        Changed WKBundleNavigationAction.h from 'project' to 'public'.

2011-02-23  Siddharth Mathur  <siddharth.mathur@nokia.com>

        Reviewed by Laszlo Gombos.

        [Qt] Make sure Symbian binary UIDs are unique

        * WebProcess.pro: Resolve the UID collision with QtTestBrowser.pro
        by changing the UID.

2011-02-23  Siddharth Mathur  <siddharth.mathur@nokia.com>

        Reviewed by Laszlo Gombos.

        [Qt] Fix the Symbian build after r79334
        https://bugs.webkit.org/show_bug.cgi?id=55044

        * WebKit2.pri: Copy the rules from JavaScriptCore.pri for
        defineTest().

        Remove addWebKit2LibWholeArchive as it is no longer needed.

2011-02-23  Alejandro G. Castro  <alex@igalia.com>

        Unreviewed, fixed GTK WebKit2 compilation after r79366.

        * GNUmakefile.am:

2011-02-23  Patrick Gansterer  <paroga@webkit.org>

        Reviewed by Darin Adler.

        Rename PLATFORM(CF) to USE(CF)
        https://bugs.webkit.org/show_bug.cgi?id=53540

        * UIProcess/WebBackForwardList.h:
        * UIProcess/WebPageProxy.cpp:
        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
        (WebKit::formatLocalizedString):

2011-02-23  Benjamin Poulain  <benjamin.poulain@nokia.com>

        Reviewed by Andreas Kling.

        [Qt] [WK2] When the context menu is empty, we should still send the signal QWKPage::showContextMenu()
        https://bugs.webkit.org/show_bug.cgi?id=54996

        Send the signal QWKPage::showContextMenu() with an empty menu even if the content menu generated
        is empty/contain only disabled elements.

        * UIProcess/API/qt/qgraphicswkview.cpp:
        (QGraphicsWKView::showContextMenu):
        * UIProcess/qt/WebContextMenuProxyQt.cpp:
        (WebKit::WebContextMenuProxyQt::showContextMenu):

2011-02-22  Dan Bernstein  <mitz@apple.com>

        LLVM Compiler build fix.

        * Scripts/webkit2/messages.py:
        * WebProcess/ApplicationCache/WebApplicationCacheManager.h:

2011-02-22  Laszlo Gombos  <laszlo.1.gombos@nokia.com>

        Reviewed by Alexey Proskuryakov.

        Drop the language tag part from the User Agent string
        https://bugs.webkit.org/show_bug.cgi?id=54560

        * UIProcess/gtk/WebPageProxyGtk.cpp:
        (WebKit::WebPageProxy::standardUserAgent):

        * UIProcess/mac/WebPageProxyMac.mm:
        (WebKit::WebPageProxy::standardUserAgent):

        * UIProcess/qt/WebPageProxyQt.cpp:
        (WebKit::WebPageProxy::standardUserAgent):

        * UIProcess/win/WebPageProxyWin.cpp:
        (WebKit::WebPageProxy::standardUserAgent): Drop the language tag
        part and fix style.

2011-02-22  Sam Weinig  <sam@webkit.org>

        Reviewed by Anders Carlsson.

        Add WebKit2 API to force a repaint with an invalidation
        https://bugs.webkit.org/show_bug.cgi?id=55015

        * Shared/ForceRepaintFlags.h: Added.
        * UIProcess/API/C/WKPage.cpp:
        (WKPageForceRepaint):
        (WKPageForceRepaintWithInvalidation):
        * UIProcess/API/C/WKPage.h:
        Add WKPageForceRepaintWithInvalidation which does the same thing WKPageForceRepaint
        but also calls setNeedsDisplay on the entire bounds of the page.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::forceRepaint):
        * UIProcess/WebPageProxy.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::forceRepaint):
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in:
        Pipe the flag down to the WebProcess.

        * WebKit2.pro:
        * WebKit2.xcodeproj/project.pbxproj:
        * win/WebKit2.vcproj:
        Add ForceRepaintFlags.h.

2011-02-22  Simon Fraser  <simon.fraser@apple.com>

        Reviewed by Dan Bernstein.

        <rdar://problem/9039670>
        
        Make sure that we set the accelerateDrawing property on the LayerTreeHosts's
        non-composited content layer if the preference is set.

        * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
        (WebKit::LayerTreeHostMac::LayerTreeHostMac):

2011-02-22  Brady Eidson  <beidson@apple.com>

        Fix it Windows-style.

        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::getSitesWithPluginData):
        (WebKit::WebProcess::clearPluginSiteData):

2011-02-22  Anders Carlsson  <andersca@apple.com>

        Reviewed by Dan Bernstein.

        Rename WebProcess::shutdownIfPossible to WebProcess::terminateIfPossible
        https://bugs.webkit.org/show_bug.cgi?id=55008

        * WebProcess/Downloads/DownloadManager.cpp:
        (WebKit::DownloadManager::downloadFinished):
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::removeWebPage):
        (WebKit::WebProcess::terminateIfPossible):
        (WebKit::WebProcess::getSitesWithPluginData):
        * WebProcess/WebProcess.h:
        * WebProcess/gtk/WebProcessGtk.cpp:
        (WebKit::WebProcess::platformTerminate):
        * WebProcess/mac/WebProcessMac.mm:
        (WebKit::WebProcess::platformTerminate):
        * WebProcess/qt/WebProcessQt.cpp:
        (WebKit::WebProcess::platformTerminate):
        * WebProcess/win/WebProcessWin.cpp:
        (WebKit::WebProcess::platformTerminate):

2011-02-22  Brady Eidson  <beidson@apple.com>

        Windows build-fix attempt.

        * win/WebKit2Generated.make:

2011-02-22  Csaba Osztrogonác  <ossy@webkit.org>

        Unreviewed.

        <rdar://problem/8762042> 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  <beidson@apple.com>

        Reviewed by Anders Carlsson and looked over by Brian Weinstein.

        <rdar://problem/8762042> 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  <andersca@apple.com>

        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  <andersca@apple.com>

        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  <sam@webkit.org>

        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  <andersca@apple.com>

        Reviewed by Dan Bernstein.

        Grammar correction from Spelling & Grammar window doesn't work
        https://bugs.webkit.org/show_bug.cgi?id=54982
        <rdar://problem/8940918>

        * 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  <kbalazs@webkit.org>

        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  <bweinstein@apple.com>

        Rubber-stamped by Brady Eidson.

        Invalidate the WebResourceCacheManagerProxy in WebContext::processDidClose.

        * UIProcess/WebContext.cpp:
        (WebKit::WebContext::processDidClose):

2011-02-21  Adam Roben  <aroben@apple.com>

        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 <http://webkit.org/b/54916> 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  <abecsi@webkit.org>

        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  <benjamin.poulain@nokia.com>

        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  <pnormand@igalia.com>

        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  <kimmo.t.kinnunen@nokia.com>

        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  <webkit.review.bot@gmail.com>

        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  <kbalazs@webkit.org>

        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  <timothy@apple.com>

        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  <sam@webkit.org>

        Reviewed by Anders Carlsson.

        Can't paste from 3rd party text editor into WebKit2 window.
        <rdar://problem/8978624>

        * WebProcess/com.apple.WebProcess.sb:

2011-02-21  Anders Carlsson  <andersca@apple.com>

        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  <aroben@apple.com>

        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  <aroben@apple.com>

        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 <http://webkit.org/b/54911> 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  <ap@apple.com>

        Reviewed by Adam Roben.

        REGRESSION (WebKit2): HTTP requests time out after 60 seconds
        https://bugs.webkit.org/show_bug.cgi?id=54755
        <rdar://problem/9006592>

        * 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  <bweinstein@apple.com>

        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 <rdar://problem/8971738>

        * 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  <aroben@apple.com>

        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 <http://webkit.org/b/54907> 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  <barraclough@apple.com>

        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  <kbalazs@webkit.org>

        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  <alex@igalia.com>

        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  <sam@webkit.org>

        Reviewed by Dan Bernstein.

        Crash in WebProcess at com.apple.WebCore: WebCore::Page::goToItem + 46
        <rdar://problem/8942726>

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::goForward):
        (WebKit::WebPage::goBack):
        (WebKit::WebPage::goToBackForwardItem):
        Defend agains null HistoryItems.

2011-02-20  Anders Carlsson  <andersca@apple.com>

        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
        <rdar://problem/9005475>

        * 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  <andersca@apple.com>

        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
        <rdar://problem/9005475>

        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  <sam@webkit.org>

        Reviewed by Anders Carlsson.

        Add phase in addition to momentumPhase to platform wheel events
        Part of <rdar://problem/8945362>

        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  <andersca@apple.com>

        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  <barraclough@apple.com>

        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  <sam@webkit.org>

        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  <creis@chromium.org>

        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  <sam@webkit.org>

        Reviewed by Adele Peterson.

        Real fix for <rdar://problem/9025723> 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  <andersca@apple.com>

        Reviewed by Sam Weinig.

        Hang trying to load nytimes.com with Flash installed
        <rdar://problem/9018113> 

        * 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  <simon.fraser@apple.com>

        Reviewed by Kevin Decker.

        <rdar://problem/9021296> 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  <bdakin@apple.com>

        Rubber-stamped by Adele Peterson.

        Fix for <rdar://problem/9025723> 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  <ostapenko.viatcheslav@nokia.com>

        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  <sullivan@apple.com>

        Reviewed by Maciej Stachowiak.

        <rdar://problem/9026169>
        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  <andersca@apple.com>

        Reviewed by Sam Weinig.

        Accelerated content fades in when using a layer backed WKView
        <rdar://problem/9021586>

        * 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  <simon.fraser@apple.com>

        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  <andersca@apple.com>

        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  <sam@webkit.org>

        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 <rdar://problem/9017043>.

        * 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  <andersca@apple.com>

        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  <andersca@apple.com>

        Reviewed by Simon Fraser.

        WKView flashes when entering/exiting compositing mode
        https://bugs.webkit.org/show_bug.cgi?id=54695
        <rdar://problem/9011554>

        * 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  <ap@apple.com>

        Reviewed by Adele Peterson.

        REGRESSION (WebKit2): Wrong frame printed on tivofaq.com
        https://bugs.webkit.org/show_bug.cgi?id=54677
        <rdar://problem/8994133>

        * 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  <kbalazs@webkit.org>

        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  <alex@igalia.com>

        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  <mitz@apple.com>

        LLVM Compiler build fix.

        * UIProcess/WebResourceCacheManagerProxy.h:
        * WebProcess/ResourceCache/WebResourceCacheManager.h:

2011-02-17  Simon Fraser  <simon.fraser@apple.com>

        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  <simon.fraser@apple.com>

        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  <jberlin@apple.com>

        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  <andersca@apple.com>

        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
        <rdar://problem/9013384>

        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  <sam@webkit.org>

        Build fix.

        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::performDictionaryLookupAtLocation):

2011-02-17  Sam Weinig  <sam@webkit.org>

        Reviewed by Maciej Stachowiak.

        WebKit2: Support Dictionary popup
        <rdar://problem/7660670>

        * 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  <bweinstein@apple.com>

        Qt build fix.

        * WebKit2.pro: Update after renaming of MemoryCache to ResourceCache.

2011-02-17  Brian Weinstein  <bweinstein@apple.com>

        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  <bweinstein@apple.com>

        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  <hyatt@apple.com>

        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  <luiz.agostini@openbossa.org>

        Reviewed by Adam Roben.

        HTML5 <details> and <summary>: 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 <details> tag that has no <summary> child.

        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
        (WebKit::WebPlatformStrategies::defaultDetailsSummaryText):
        * WebProcess/WebCoreSupport/WebPlatformStrategies.h:

2011-02-17  Adam Roben  <aroben@apple.com>

        Make sure layout is up-to-date before rendering the layer tree in DrawingAreaImpl

        Fixes <http://webkit.org/b/54646> <rdar://problem/9016889> 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  <alex@igalia.com>

        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  <mdelaney@apple.com>

        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  <yael.aharon@nokia.com>

        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  <yael.aharon@nokia.com>

        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 ==
