2011-03-07  Damian Kaleta  <dkaleta@apple.com>

        Reviewed by Anders Carlsson.

        QuickTime plugin should opt in to a 32-bit non-executable heap
        https://bugs.webkit.org/show_bug.cgi?id=55704
        <rdar://problem/8105706>

        * UIProcess/Plugins/PluginProcessProxy.cpp:
        (WebKit::pluginNeedsExecutableHeap): Decides per plugin if it should opt-in to a 32-bit non-executable heap.
        By default it should opt-out.
        (WebKit::PluginProcessProxy::PluginProcessProxy):

2011-03-07  Sam Weinig  <sam@webkit.org>

        Reviewed by Anders Carlsson.

        Add unableToImplementPolicy callback for WebKit2 policy client
        <rdar://problem/9071902>
        https://bugs.webkit.org/show_bug.cgi?id=55884

        * UIProcess/API/C/WKPage.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::unableToImplementPolicy):
        * UIProcess/WebPageProxy.h:
        * UIProcess/WebPageProxy.messages.in:
        * UIProcess/WebPolicyClient.cpp:
        (WebKit::WebPolicyClient::unableToImplementPolicy):
        * UIProcess/WebPolicyClient.h:
        * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
        * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.cpp:
        (WebKit::InjectedBundlePagePolicyClient::unableToImplementPolicy):
        * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.h:
        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::dispatchUnableToImplementPolicy):
        Pipe unableToImplementPolicy through both the bundle and the main WebKit2 API.

2011-03-07  Sam Weinig  <sam@webkit.org>

        Reviewed by Anders Carlsson.

        Replace WebKit2's decidePolicyForMIMEType with decidePolicyForResponse
        https://bugs.webkit.org/show_bug.cgi?id=55827

        - Renamed FrameLoaderClient::dispatchDecidePolicyForMIMEType to dispatchDecidePolicyForResponse
          and pass the entire response, instead of just the MIMEType.
        - Updated both UIProcess API and bundle API to also be based on the whole response, not just the
          MIMEType.

        * UIProcess/API/C/WKPage.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::decidePolicyForResponse):
        * UIProcess/WebPageProxy.h:
        * UIProcess/WebPageProxy.messages.in:
        * UIProcess/WebPolicyClient.cpp:
        (WebKit::WebPolicyClient::decidePolicyForResponse):
        * UIProcess/WebPolicyClient.h:
        * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
        * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.cpp:
        (WebKit::InjectedBundlePagePolicyClient::decidePolicyForResponse):
        * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.h:
        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
        * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:

2011-03-06  Jessie Berlin  <jberlin@apple.com>

        Reviewed by Sam Weinig.

        WebKit2: Use CFNetwork Sessions API.
        https://bugs.webkit.org/show_bug.cgi?id=55435.

        When Private Browsing is enabled, use cookies from a in-memory cookie storage based on the
        Private Browsing Storage Session.

        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
        (InitWebCoreSystemInterface):
        Add support for using the new WKSI functions in WebCore.

2011-03-06  Oleg Romashin  <romaxa@gmail.com>

        Reviewed by Kenneth Rohde Christiansen.

        [Qt][WK2] Make Qt port compiling with ENABLE_PLUGIN_PROCESS=1, part1
        Adding dummy Qt files for Plugin Process implementation,
        Adding missing sources into Qt pro files
        https://bugs.webkit.org/show_bug.cgi?id=55719

        * DerivedSources.pro:
        * PluginProcess/qt: Added.
        * PluginProcess/qt/PluginControllerProxyQt.cpp: Added.
        (WebKit::PluginControllerProxy::platformInitialize):
        (WebKit::PluginControllerProxy::platformDestroy):
        (WebKit::PluginControllerProxy::platformGeometryDidChange):
        * PluginProcess/qt/PluginProcessMainQt.cpp: Added.
        (WebKit::PluginProcessMain):
        * PluginProcess/qt/PluginProcessQt.cpp: Added.
        (WebKit::PluginProcess::platformInitialize):
        * UIProcess/Plugins/qt/PluginProcessProxyQt.cpp: Added.
        (WebKit::PluginProcessProxy::platformInitializePluginProcess):
        * WebKit2.pri:
        * WebKit2.pro:
        * WebKit2API.pri:
        * WebProcess/Plugins/Netscape/qt/PluginProxyQt.cpp: Added.
        (WebKit::PluginProxy::needsBackingStore):

2011-03-05  Sam Weinig  <sam@webkit.org>

        Reviewed by Dan Bernstein.

        Remove unneeded onPageClose function from DrawingArea
        https://bugs.webkit.org/show_bug.cgi?id=55836

        * WebProcess/WebPage/DrawingArea.h:
        Remove empty function.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::close):
        Remove only called

2011-03-04  Jon Honeycutt  <jhoneycutt@apple.com>

        WK2 Mac build fix.

        * UIProcess/API/C/WKPage.cpp:
        (WKPageComputePagesForPrinting):
        (WKPageBeginPrinting):

        * UIProcess/API/C/WKPagePrivate.h:

2011-03-04  Jon Honeycutt  <jhoneycutt@apple.com>

        WK2 Mac build fix.

        * UIProcess/API/C/WKPagePrivate.h:

2011-03-04  Jon Honeycutt  <jhoneycutt@apple.com>

        WK2 needs printing support on Windows
        https://bugs.webkit.org/show_bug.cgi?id=55800
        <rdar://problem/8903808>

        Reviewed by Darin Adler.

        * UIProcess/API/C/WKPage.cpp:
        (ComputedPagesContext::ComputedPagesContext):
        (computedPagesCallback):
        From the Vector of WebCore::IntRects, build up a Vector of WKRects.
        Call the callback, passing these rects and the scale factor.
        (printInfoFromWKPrintInfo):
        Return a PrintInfo structure from the WKPrintInfo.
        (WKPageComputePagesForPrinting):
        Call WebPageProxy::computePagesForPrinting(). Pass
        computedPagesCallback as the callback function, so that we can
        translate the WebCore rect type to WKRect before calling the caller's
        callback function.
        (WKPageBeginPrinting):
        Call WebPageProxy::beginPrinting().
        (WKPageDrawPagesToPDF):
        Call WebPageProxy::drawPagesToPDF().

        * UIProcess/API/C/WKPagePrivate.h:
        Declare the WKPrintInfo type and new functions.

        * UIProcess/WebPageProxy.cpp:
        Compile this code on Windows.

        * UIProcess/WebPageProxy.h:
        Ditto.

        * UIProcess/win/WebView.cpp:
        (WebKit::WebView::paint):
        We're painting the window; leave printing mode.

        * WebProcess/WebPage/WebPage.cpp:
        Compile this code on Windows.

        * WebProcess/WebPage/WebPage.h:
        Ditto.

        * WebProcess/WebPage/WebPage.messages.in:
        Ditto.

2011-03-04  Steve Falkenburg  <sfalken@apple.com>

        Reviewed by Darin Adler.

        Adopt VersionStamper tool for Windows WebKit DLLs
        https://bugs.webkit.org/show_bug.cgi?id=55784
        <rdar://problem/9021320>

        We now use a tool to stamp the version number onto the Apple WebKit DLLs
        during the post-build step.

        Fetch the WebKit version from a string resource instead of the version resource.

        * UIProcess/win/WebPageProxyWin.cpp:
        (WebKit::userVisibleWebKitVersionString): Fetch version from a string resource.
        * win/WebKit2.rc: Removed version, added stringtable.
        * win/WebKit2WebProcess.rc: Removed.
        * win/WebKit2WebProcess.vcproj:
        * win/WebKit2WebProcessPostBuild.cmd: Don't run autoversion script. It isn't used in this project.
        * win/WebKit2WebProcessPreBuild.cmd: Stamp version.
        * win/WebKitPostBuild.cmd: Stamp version.

2011-03-04  Jeff Miller  <jeffm@apple.com>

        Reviewed by Darin Adler.

        Add WKPageValidateCommand()
        https://bugs.webkit.org/show_bug.cgi?id=55793
        
        On the Mac, validation of edit menu commands is handled within WebKit2 in WKView.mm.
        However, on Windows we need to do this in the client, so expose this functionality
        in the API via WKPageValidateCommand().
        
        Change the Mac implementation to call WebPageProxy::validateCommand() with a callback
        to match this new API, so it no longer has to go through PageClient to get notified
        when a command is validated.  This makes PageClient::setEditCommandState() obsolete,
        so I removed the stub implementations in qt and gtk as well.

        * UIProcess/API/C/WKPage.cpp:
        (WKPageValidateCommand): Added.
        * UIProcess/API/C/WKPage.h: Added WKPageValidateCommand().
        * UIProcess/API/mac/PageClientImpl.h: Removed setEditCommandState().
        * UIProcess/API/mac/PageClientImpl.mm: Removed setEditCommandState().
        * UIProcess/API/mac/WKView.mm:
        (validateCommandCallback): Added.
        (-[WKView validateUserInterfaceItem:]): Pass callback to validateCommand().
        * UIProcess/API/qt/qwkpage.cpp: Removed setEditCommandState().
        * UIProcess/API/qt/qwkpage_p.h: Removed setEditCommandState().
        * UIProcess/PageClient.h: Removed setEditCommandState().
        * UIProcess/WebPageProxy.cpp: Removed didValidateCommand().
        (WebKit::WebPageProxy::validateCommand): This now takes a callback.
        (WebKit::WebPageProxy::validateCommandCallback): Added.
        (WebKit::WebPageProxy::processDidCrash): Invalidate m_validateCommandCallbacks.
        * UIProcess/WebPageProxy.h: Removed didValidateCommand(), validateCommand() now takes a callback.
        (WebKit::ValidateCommandCallback::create): Added.
        (WebKit::ValidateCommandCallback::~ValidateCommandCallback): Added.
        (WebKit::ValidateCommandCallback::performCallbackWithReturnValue): Added.
        (WebKit::ValidateCommandCallback::invalidate): Added.
        (WebKit::ValidateCommandCallback::ValidateCommandCallback): Added.
        * UIProcess/WebPageProxy.messages.in: Removed DidValidateCommand, added ValidateCommandCallback.
        * UIProcess/gtk/WebView.cpp: Removed setEditCommandState().
        * UIProcess/gtk/WebView.h: Removed setEditCommandState().
        * UIProcess/win/WebView.cpp: Removed setEditCommandState().
        * UIProcess/win/WebView.h: Removed setEditCommandState().
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::validateCommand): This now takes a callbackID.
        * WebProcess/WebPage/WebPage.h: validateCommand now takes a callbackID.
        * WebProcess/WebPage/WebPage.messages.in: ValidateCommand now takes a callbackID.

2011-03-04  Brian Weinstein  <bweinstein@apple.com>

        Reviewed by Darin Adler.

        Reference-counting for WKBundlePageResourceLoadClient::willSendRequestForFrame seems unclear/wrong
        https://bugs.webkit.org/show_bug.cgi?id=53919
        <rdar://problem/8966020>
        
        Adopt the result of m_client.willSendRequestForFrame (which will be leaked by the client).

        * WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.cpp:
        (WebKit::InjectedBundlePageResourceLoadClient::willSendRequestForFrame):

2011-03-04  Darin Adler  <darin@apple.com>

        Reviewed by Mark Rowe.

        WebKit2 session state should include even loads too new to be in the back/forward list
        https://bugs.webkit.org/show_bug.cgi?id=55781
        part of <rdar://problem/8968847>

        * UIProcess/cf/WebPageProxyCF.cpp:
        (WebKit::WebPageProxy::sessionStateData): Save URLs that are early enough in the loading
        process to not be included in the back/forward list yet: The pending API request URL and
        the provisional URL.
        (WebKit::WebPageProxy::restoreFromSessionStateData): Call loadURL if the back/forward
        list is not restored and a URL is present. Later we can improve the way we handle the
        case where we have both a back/forward list and a URL.

2011-03-04  Jessie Berlin  <jberlin@apple.com>

        Reviewed by Darin Adler.

        WebKit2: Use CFNetwork Sessions API.
        https://bugs.webkit.org/show_bug.cgi?id=55435.

        Add in the CFURLSTORAGESESSIONS guards that I incorrectly left out because the code was
        contained within guards that made USE(CFURLSTORAGESESSIONS) always be true.

        * UIProcess/mac/WebContextMac.mm:
        (WebKit::WebContext::platformInitializeWebProcess):
        * UIProcess/win/WebContextWin.cpp:
        (WebKit::WebContext::platformInitializeWebProcess):

2011-03-04  Jessie Berlin  <jberlin@apple.com>

        Reviewed by Maciej Stachowiak.

        WebKit2: Use CFNetwork Sessions API.
        https://bugs.webkit.org/show_bug.cgi?id=55435.

        When Private Browsing is enabled, get the cached url response from the cache associated with
        the Private Browsing Storage Session.

        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::platformHasLocalDataForURL):
        If Private Browsing is enabled, call into WKSI to get the response.
        (WebKit::WebPage::cachedResponseMIMETypeForURL):
        Ditto.
        * WebProcess/WebPage/win/WebPageWin.cpp:
        (WebKit::WebPage::platformHasLocalDataForURL):
        If Private Browsing is enabled, call into WKSI to get the CFURLCacheRef.
        (WebKit::WebPage::cachedResponseMIMETypeForURL):
        Ditto.

2011-03-04  Jeff Miller  <jeffm@apple.com>

        Reviewed by Darin Adler.

        Move WKViewExecuteCommand() to WKPageExecuteCommand()
        https://bugs.webkit.org/show_bug.cgi?id=55744
        
        Executing a command operates on a page, so it makes more sense for it to be in WKPage.
        This also makes it available on all platforms, not just Windows.

        * UIProcess/API/C/WKPage.cpp:
        (WKPageExecuteCommand): Added.
        * UIProcess/API/C/WKPage.h: Add WKPageExecuteCommand().
        * UIProcess/API/C/win/WKView.cpp: Remove WKViewExecuteCommand().
        * UIProcess/API/C/win/WKView.h: Remove WKViewExecuteCommand().

2011-03-04  Dan Bernstein  <mitz@apple.com>

        LLVM Compiler build fix.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::runJavaScriptInMainFrame):

2011-03-03  Timothy Hatcher  <timothy@apple.com>

        Make the WKPageRunJavaScriptFunction callback take a WKSerializedScriptValueRef.

        https://webkit.org/b/55623

        Reviewed by Darin Adler.

        * UIProcess/API/C/WKPage.cpp:
        (WKPageRunJavaScriptInMainFrame): Use ScriptValueCallback.
        (callRunJavaScriptBlockAndRelease): Use WKSerializedScriptValueRef.
        * UIProcess/API/C/WKPage.h: Use WKSerializedScriptValueRef.
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::close): Call invalidateCallbackMap for m_scriptValueCallbacks.
        (WebKit::WebPageProxy::runJavaScriptInMainFrame): Take a ScriptValueCallback.
        (WebKit::WebPageProxy::scriptValueCallback): Added. Create a WebSerializedScriptValue
        from the DataReference before calling the callback.
        (WebKit::WebPageProxy::processDidCrash): Call invalidateCallbackMap for m_scriptValueCallbacks.
        * UIProcess/WebPageProxy.h: Added ScriptValueCallback and m_scriptValueCallbacks.
        * UIProcess/WebPageProxy.messages.in: Added ScriptValueCallback.
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::runJavaScriptInMainFrame): Create a DataReference from a WebCore::SerializedScriptValue.
        And use ScriptValueCallback to send the message back.

2011-03-03  Brian Weinstein  <bweinstein@apple.com>

        Reviewed by Adam Roben.

        Cleanup from https://bugs.webkit.org/show_bug.cgi?id=55427.
        
        Call WebCore::startObservingCookieChanges and WebCore::stopObservingCookieChanges
        on all platforms, and stub the functions on platforms that don't implement them.

        * WebProcess/Cookies/WebCookieManager.cpp:
        (WebKit::WebCookieManager::startObservingCookieChanges):
        (WebKit::WebCookieManager::stopObservingCookieChanges):

2011-03-03  Jeff Miller  <jeffm@apple.com>

        Reviewed by Darin Adler.

        Refactor classes in GenericCallback.h
        https://bugs.webkit.org/show_bug.cgi?id=55732
        
        Since we're going to need to add additional callback classes, make a CallbackBase class that manages
        the context and the callback ID.  The existing callback classes (VoidCallback, GenericCallback, and
        ComputedPagesCallback) now all derive from CallbackBase.
        
        Fix bug in VoidCallback where we meant to implement the destructor, but we were implementing the default
        constructor instead (we forgot the leading ~).
 
        * UIProcess/GenericCallback.h:
        (WebKit::CallbackBase::~CallbackBase):
        (WebKit::CallbackBase::callbackID):
        (WebKit::CallbackBase::CallbackBase):
        (WebKit::CallbackBase::context):
        (WebKit::CallbackBase::generateCallbackID):
        (WebKit::VoidCallback::~VoidCallback):
        (WebKit::VoidCallback::performCallback):
        (WebKit::VoidCallback::invalidate):
        (WebKit::VoidCallback::VoidCallback):
        (WebKit::GenericCallback::create):
        (WebKit::GenericCallback::~GenericCallback):
        (WebKit::GenericCallback::performCallbackWithReturnValue):
        (WebKit::GenericCallback::invalidate):
        (WebKit::GenericCallback::GenericCallback):
        (WebKit::ComputedPagesCallback::create):
        (WebKit::ComputedPagesCallback::~ComputedPagesCallback):
        (WebKit::ComputedPagesCallback::performCallbackWithReturnValue):
        (WebKit::ComputedPagesCallback::invalidate):
        (WebKit::ComputedPagesCallback::ComputedPagesCallback):

2011-03-03  Adam Roben  <aroben@apple.com>

        Don't assume the web process has had a chance to paint before the view has to paint

        Fixes <http://webkit.org/b/55739> REGRESSION (r80307): Lots of tests crashing in
        BackingStore::paint

        Reviewed by Anders Carlsson.

        * UIProcess/DrawingAreaProxyImpl.cpp:
        (WebKit::DrawingAreaProxyImpl::paint): Bail if the web process hasn't had a chance to paint
        yet.

2011-03-03  Adam Roben  <aroben@apple.com>

        Throw away DrawingAreaProxyImpl's backing store after not painting for 5 seconds

        The intent is to save memory for views that aren't painting.

        Fixes <http://webkit.org/b/51262> <rdar://problem/8782537> WebPageProxy should delete its
        backing store after not painting for a while

        Reviewed by Anders Carlsson.

        * UIProcess/DrawingAreaProxyImpl.cpp:
        (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl): Initialize our timer.
        (WebKit::DrawingAreaProxyImpl::paint): Don't bail if we don't have a backing store (but do
        bail if we're in accelerated compositing mode); we might have thrown it away to save memory
        but now are being asked to paint by the view. The existing code in this function will handle
        getting a new backing store if possible by blocking for a little while to try to receive a
        DidUpdateBackingStoreState message. Added an assertion that we do have a backing store if we
        don't have any outstanding UpdateBackingStoreState requests. After painting, call
        discardBackingStoreSoon to update our timer.
        (WebKit::DrawingAreaProxyImpl::discardBackingStoreSoon): Set the timer for 5 seconds in the
        future.
        (WebKit::DrawingAreaProxyImpl::discardBackingStore): Throw away the backing store, and tell
        the web process we'll need a full backing store update on the next paint.

        * UIProcess/DrawingAreaProxyImpl.h: Added m_discardBackingStoreTimer.

2011-03-03  Adam Roben  <aroben@apple.com>

        Add a way to tell the web process to perform a full backing store update on its next paint

        Messages::DrawingArea::UpdateBackingStoreState now takes a boolean specifying whether the
        full backing store update should happen immediately or should be deferred until the next
        paint or compositing mode change occurs. The deferred update isn't used yet, but will be
        used when we start throwing away backing stores to save memory.

        Fixes <http://webkit.org/b/55730> UI process needs a way to tell the web process its backing
        store needs a full update on the next paint

        Reviewed by Anders Carlsson.

        * UIProcess/DrawingAreaProxyImpl.cpp:
        (WebKit::DrawingAreaProxyImpl::paint): If we have an outstanding backing store state change
        request, tell the web process to perform the backing store update right away, in case we
        previously told it it could defer the update.
        (WebKit::DrawingAreaProxyImpl::sizeDidChange): Specify that we need an immediate backing
        store update.
        (WebKit::DrawingAreaProxyImpl::didUpdateBackingStoreState): We can no longer assert that we
        were waiting for a DidUpdateBackingStoreState message when we receive one, as it's possible
        for the web process to decide to send us this message on its own (if we asked it to do a
        deferred backing store update and then it needed to paint some part of the page). Specify
        that we need an immediate backing store update if the web process hasn't updated to our
        latest state, as we're about to draw potentially out-of-date bits to the screen and want to
        get the right bits as soon as possible. Also added a FIXME about a potential optimization.
        (WebKit::DrawingAreaProxyImpl::backingStoreStateDidChange): Added a RespondImmediatelyOrNot
        parameter, which is just passed through to sendUpdateBackingStoreState.
        (WebKit::DrawingAreaProxyImpl::sendUpdateBackingStoreState): Added a RespondImmediatelyOrNot
        parameter that is used to specify to the web process whether to perform the full backing
        store update immediately. We now only wait for a DidUpdateBackingStoreState message (and
        thus suppress any more UpdateBackingStoreState messages until one is received) when we ask
        the web process for an immediate response; otherwise we could end up accidentally calling
        waitForAndDispatchDidUpdateBackingStoreState when the web process hasn't been told to send
        us such a message.

        * UIProcess/DrawingAreaProxyImpl.h: Added RespondImmediatelyOrNot.

        * WebProcess/WebPage/DrawingArea.h:
        (WebKit::DrawingArea::updateBackingStoreState): Added respondImmediately argument.

        * WebProcess/WebPage/DrawingArea.messages.in: Added respondImmediately argument to
        UpdateBackingStoreState message.

        * WebProcess/WebPage/DrawingAreaImpl.cpp:
        (WebKit::DrawingAreaImpl::DrawingAreaImpl): Initialize new member that's used to track
        whether we should send a DidUpdateBackingStoreState message instead of an Update or
        compositing mode change message. This will be set to true when a deferred backing store
        update is pending.
        (WebKit::DrawingAreaImpl::layerHostDidFlushLayers): If a deferred update is pending, send a
        DidUpdateBackingStoreState message instead of a compositing mode change message.
        (WebKit::DrawingAreaImpl::updateBackingStoreState): Added respondImmediately argument. If
        we've already been told about this state ID (as can happen when the UI process decides it
        needs an immediate update to a state that it previously requested a deferred update to),
        don't bother updating the page's size, etc. In addition, if we've already sent a
        DidUpdateBackingStoreState message for this state, we don't have to do anything at all.
        Moved code to send the DidUpdateBackingStoreState message from here...
        (WebKit::DrawingAreaImpl::sendDidUpdateBackingStoreState): ...to here.
        (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode): Always update our dirty region,
        even if painting is suspended or we're in the process of updating the backing store state.
        It causes no harm and simplifies the code. If a deferred update is pending, send a
        DidUpdateBackingStoreState message instead of a compositing mode change message. Also
        removed a redundant if.
        (WebKit::DrawingAreaImpl::display): Added an assertion that this isn't called while updating
        backing store state, as otherwise we might end up sending two DidUpdateBackingStoreState
        messages. If a deferred update is pending, send a DidUpdateBackingStoreState message instead
        of an Update message.

        * WebProcess/WebPage/DrawingAreaImpl.h: Updated updateBackingStoreState to match the base
        class. Added sendDidUpdateBackingStoreState and m_shouldSendDidUpdateBackingStoreState.

2011-03-03  Andy Estes  <aestes@apple.com>

        Reviewed by Darin Adler.

        When displaying the missing plug-in sheet, pass the 'pluginspage'
        attribute to the UI process.
        https://bugs.webkit.org/show_bug.cgi?id=55553

        * UIProcess/API/C/WKPage.h: Add pluginsPageURL as the third argument to
        missingPluginButtonClicked.
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::missingPluginButtonClicked): Ditto.
        * UIProcess/WebPageProxy.h: Ditto.
        * UIProcess/WebPageProxy.messages.in: Ditto.
        * UIProcess/WebUIClient.cpp:
        (WebKit::WebUIClient::missingPluginButtonClicked): Ditto.
        * UIProcess/WebUIClient.h: Ditto.
        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::missingPluginButtonClicked): Get the value of
        pluginspageAttr.

2011-03-03  Alexey Proskuryakov  <ap@apple.com>

        Suggested by Dan Bernstein.

        Move "const" around "NSString *", so that it suddenly begins to make sense.

        * WebProcess/mac/FullKeyboardAccessWatcher.mm:

2011-03-03  Jeff Miller  <jeffm@apple.com>

        Reviewed by Anders Carlsson.

        WebKit2: Add WKViewRef API for executing edit commands
        https://bugs.webkit.org/show_bug.cgi?id=49829

        Added WKViewExecuteCommand() and documented some of the WebCore EditorCommand strings.

        * UIProcess/API/C/win/WKView.cpp:
        (WKViewExecuteCommand): Added.
        * UIProcess/API/C/win/WKView.h: Added WKViewExecuteCommand() and comment block with WebCore EditorCommand strings.

2011-03-03  Jessie Berlin  <jberlin@apple.com>

        Reviewed by Adam Roben.

        WebKit2: Use CFNetwork Sessions API.
        https://bugs.webkit.org/show_bug.cgi?id=55435

        Set the Private Browsing Storage Session on requests when Private Browsing is enabled.

        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
        (InitWebCoreSystemInterface):
        Support using WKCopyRequestWithStorageSession in WebCore.

2011-03-03  Adam Roben  <aroben@apple.com>

        Don't try to paint outside the page's bounds

        When the page is resized smaller, we would allocate a ShareableBitmap at the old, larger
        size, even though we only needed to paint at the new, smaller size.

        The assertion added in this patch will fire during the WebKit2/ResizeViewWhileHidden API
        test if this fix gets broken in the future.

        Fixes <http://webkit.org/b/55715> DrawingAreaImpl allocates more memory than necessary when
        the page is resized smaller

        Reviewed by Anders Carlsson.

        * WebProcess/WebPage/DrawingAreaImpl.cpp:
        (WebKit::DrawingAreaImpl::updateBackingStoreState): Update our dirty region even if painting
        is suspended (but still refrain from updating it when in accelerated compositing mode).
        Rather than unite our existing dirty region with the page's new bounds, overwrite our dirty
        region with the page's new bounds. This prevents us from accumulating a dirty region that is
        larger than the page in the case where the page is being resized smaller.
        (WebKit::DrawingAreaImpl::display): Added an assertion that we're not trying to paint
        outside of the page's bounds.

2011-03-03  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Brady Eidson.

        WebProcess is calling CFURLCacheRemoveAllCachedResponses when loading, results in origin-load for all resources
        https://bugs.webkit.org/show_bug.cgi?id=55701
        <rdar://problem/9074017>

        * Shared/WebProcessCreationParameters.cpp:
        (WebKit::WebProcessCreationParameters::WebProcessCreationParameters): Initialize cache-clearing
        flag parameters to false.
        (WebKit::WebProcessCreationParameters::encode): Serialize them properly.
        (WebKit::WebProcessCreationParameters::decode): And deserialize.

2011-03-03  Alexey Proskuryakov  <ap@apple.com>

        Reviewed by Darin Adler.

        REGRESSION (WebKit2): Tab keys no longer observe Full Keyboard Access
        https://bugs.webkit.org/show_bug.cgi?id=55633
        <rdar://problem/8963023>

        * WebKit2.xcodeproj/project.pbxproj:
        * WebProcess/mac/FullKeyboardAccessWatcher.h: Added.
        * WebProcess/mac/FullKeyboardAccessWatcher.mm: Added.
        (-[FullKeyboardAccessWatcher retrieveKeyboardUIModeFromPreferences:]):
        (-[FullKeyboardAccessWatcher init]):
        (+[FullKeyboardAccessWatcher fullKeyboardAccessEnabled]):
        Get the current state of full keyboard access, listening for change notifications.

        * WebProcess/WebProcess.h:  Added fullKeyboardAccessEnabled().

        * WebProcess/WebProcess.cpp: (WebKit::WebProcess::fullKeyboardAccessEnabled):
        WebKit1 also doesn't implement this on platforms other than Mac.

        * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::fullKeyboardAccessEnabled):
        Just ask FullKeyboardAccessWatcher.

        * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::keyboardUIMode):
        * WebProcess/WebCoreSupport/WebChromeClient.h:
        Added keyboardUIMode(), removed tabsToLinks().

        * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::keyboardUIMode):
        * WebProcess/WebPage/WebPage.h:
        Generate keyboard UI mode from tabToLinks preference and current state of FKA.

2011-03-03  Sam Weinig  <sam@webkit.org>

        Reviewed by Anders Carlsson.

        Give the Bundle's policy client the option of deciding the policy
        https://bugs.webkit.org/show_bug.cgi?id=55699

        * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
        Add WKBundlePagePolicyAction enum and make it the return value of
        the WKBundlePagePolicyClient functions.

        * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.cpp:
        (WebKit::InjectedBundlePagePolicyClient::decidePolicyForNavigationAction):
        (WebKit::InjectedBundlePagePolicyClient::decidePolicyForNewWindowAction):
        (WebKit::InjectedBundlePagePolicyClient::decidePolicyForMIMEType):
        * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.h:
        Pass the return value back to the caller. For unimplemented functions, return WKBundlePagePolicyActionPassThrough.

        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForMIMEType):
        (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
        (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
        Call the policy function early if the bundle handles it.

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

        Reviewed by Adam Roben.

        Rest of WebKit2: Need a way to send notifications to client when cookies change
        https://bugs.webkit.org/show_bug.cgi?id=55427
        <rdar://problem/9056027>
        
        This patch adds the communication from the WebProcess <-> UIProcess about starting/stopping
        listening for cookies changing, and adds a mechanism for the WebProcess to notify the UIProcess
        when the cookies have changed. The WebProcess sends a message to the UIProcess when the cookies
        change, and the UIProcess passes this along to the WebCookieManagerProxyClient.

        * UIProcess/API/C/WKCookieManager.cpp:
        (WKCookieManagerSetClient): Call through to WebCookieManagerProxy.
        (WKCookieManagerStartObservingCookieChanges): Ditto.
        (WKCookieManagerStopObservingCookieChanges): Ditto.

        * UIProcess/API/C/WKCookieManager.h: Add new functions and a WKCookieManagerClient
            which is responsible for cookiesDidChange.

        * UIProcess/WebCookieManagerProxy.cpp:
        (WebKit::WebCookieManagerProxy::initializeClient):
        (WebKit::WebCookieManagerProxy::startObservingCookieChanges): Send the message down to the web process.
        (WebKit::WebCookieManagerProxy::stopObservingCookieChanges): Ditto.
        (WebKit::WebCookieManagerProxy::cookiesDidChange): Tell the WKCookieManagerClient the cookies were
            modified.
        * UIProcess/WebCookieManagerProxy.h:
        * UIProcess/WebCookieManagerProxy.messages.in: Add new messages.

        * UIProcess/WebCookieManagerProxyClient.cpp: Added.
        (WebKit::WebCookieManagerProxyClient::cookiesDidChange): Calls through to the client saying that
            cookies changed.
        * UIProcess/WebCookieManagerProxyClient.h: Added.
    
        * WebProcess/Cookies/WebCookieManager.cpp:
        (WebKit::WebCookieManager::startObservingCookieChanges): Call through to WebCore::startObservingCookieChanges
            (on platforms that support it).
        (WebKit::WebCookieManager::stopObservingCookieChanges): Ditto (for stopObservingCookieChanges).
        (WebKit::WebCookieManager::dispatchDidModifyCookies): Send a message to the UI process that cookies changed.
        * WebProcess/Cookies/WebCookieManager.h:
        * WebProcess/Cookies/WebCookieManager.messages.in:
        
        Add new files.
        * WebKit2.pro:
        * WebKit2.xcodeproj/project.pbxproj:
        * GNUmakefile.am:
        * win/WebKit2.vcproj:

2011-03-03  Anders Carlsson  <andersca@apple.com>

        Reviewed by Darin Adler.

        Remove CanRunBeforeUnloadConfirmPanel sync message
        https://bugs.webkit.org/show_bug.cgi?id=55689

        * Shared/WebPageCreationParameters.cpp:
        (WebKit::WebPageCreationParameters::encode):
        (WebKit::WebPageCreationParameters::decode):
        Encode and decode canRunBeforeUnloadConfirmPanel, as well as canRunModal, which wasn't
        being encoded/decoded.

        * Shared/WebPageCreationParameters.h:
        Add canRunBeforeUnloadConfirmPanel.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::initializeUIClient):
        Send SetCanRunBeforeUnloadConfirmPanel and SetCanRunModal messages.

        (WebKit::WebPageProxy::creationParameters):
        Initialize parameters.canRunBeforeUnloadConfirmPanel.

        * UIProcess/WebPageProxy.messages.in:
        Remove CanRunBeforeUnloadConfirmPanel message.

        * UIProcess/WebUIClient.cpp:
        (WebKit::WebUIClient::canRunBeforeUnloadConfirmPanel):
        * UIProcess/WebUIClient.h:
        Make canRunBeforeUnloadConfirmPanel const.

        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::canRunBeforeUnloadConfirmPanel):
        Ask the web page instead of sending a synchronous message.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::WebPage):
        Initialize m_canRunBeforeUnloadConfirmPanel.

        * WebProcess/WebPage/WebPage.h:
        (WebKit::WebPage::canRunBeforeUnloadConfirmPanel):
        (WebKit::WebPage::setCanRunBeforeUnloadConfirmPanel):
        Add getter and setter for m_canRunBeforeUnloadConfirmPanel.

        (WebKit::WebPage::setCanRunModal):
        Add setter for m_canRunModal.

        * WebProcess/WebPage/WebPage.messages.in:
        Add SetCanRunBeforeUnloadConfirmPanel and SetCanRunModal messages.

2011-03-03  Adam Roben  <aroben@apple.com>

        Create the CFBundleRef for WebKit.dll on Windows if needed

        WebKit part of <http://webkit.org/b/55672> <rdar://problem/9080867> All inspector tests time
        out or crash on Windows 7 Release (WebKit2 Tests)

        Reviewed by Darin Adler.

        * Shared/win/WebKitBundle.cpp: Added.
        (WebKit::createWebKitBundle): Returns a pre-existing bundle, if possible, otherwise creates
        and returns a new bundle.
        (WebKit::webKitBundle): Creates and caches a bundle, and returns it.

        * Shared/win/WebKitBundle.h: Added.

        * UIProcess/win/WebInspectorProxyWin.cpp:
        (WebKit::WebInspectorProxy::inspectorPageURL):
        * WebProcess/WebPage/win/WebInspectorWin.cpp:
        (WebKit::WebInspector::localizedStringsURL):
        Changed to use webKitBundle() to ensure that the bundle has been created.

        * win/WebKit2.vcproj: Added new files.

2011-03-03  Peter Kasting  <pkasting@google.com>

        Reviewed by James Robinson.

        Drop redundant "Windows; " from the Windows-specific User Agent string.
        https://bugs.webkit.org/show_bug.cgi?id=54567

        * UIProcess/win/WebPageProxyWin.cpp:
        (WebKit::WebPageProxy::standardUserAgent):

2011-03-02  Sheriff Bot  <webkit.review.bot@gmail.com>

        Unreviewed, rolling out r80188.
        http://trac.webkit.org/changeset/80188
        https://bugs.webkit.org/show_bug.cgi?id=55647

        Broke the WebKit API tests. (Requested by xenon on #webkit).

        * UIProcess/API/C/WKPage.cpp:
        (WKPageRunJavaScriptInMainFrame):
        (callRunJavaScriptBlockAndRelease):
        * UIProcess/API/C/WKPage.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::close):
        (WebKit::WebPageProxy::runJavaScriptInMainFrame):
        (WebKit::WebPageProxy::processDidCrash):
        * UIProcess/WebPageProxy.h:
        * UIProcess/WebPageProxy.messages.in:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::runJavaScriptInMainFrame):

2011-03-02  Jeff Miller  <jeffm@apple.com>

        Reviewed by Darin Adler.

        Rename WebKit::WebPage::validateMenuItem() to validateCommand()
        https://bugs.webkit.org/show_bug.cgi?id=55636
        
        Since this method can validate more than menu items, validateCommand() is a better name.  Also rename various messages and WebKit::WebPageProxy::didValidateMenuItem() to didValidateCommand().

        * UIProcess/API/mac/WKView.mm:
        (-[WKView validateUserInterfaceItem:]): Call validateCommand() instead of validateMenuItem().
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::validateCommand): Renamed from validateMenuItem().
        (WebKit::WebPageProxy::didValidateCommand): Renamed from didValidateMenuItem().
        * UIProcess/WebPageProxy.h:
        * UIProcess/WebPageProxy.messages.in: Renamed DidValidateMenuItem to DidValidateCommand.
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::validateCommand): Renamed from validateMenuItem().
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in: Renamed ValidateMenuItem to ValidateCommand.

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

        Reviewed by Sam Weinig.

        WKPageSetMemoryCacheClientCallsEnabled doesn't persist if web process crashes
        https://bugs.webkit.org/show_bug.cgi?id=55635

        * Shared/WebPageCreationParameters.cpp:
        (WebKit::WebPageCreationParameters::encode):
        (WebKit::WebPageCreationParameters::decode):
        Encode and decode areMemoryCacheClientCallsEnabled.

        * Shared/WebPageCreationParameters.h:
        Add areMemoryCacheClientCallsEnabled member variable.

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

        (WebKit::WebPageProxy::setMemoryCacheClientCallsEnabled):
        Update m_areMemoryCacheClientCallsEnabled. Send a message if necessary.

        (WebKit::WebPageProxy::creationParameters):
        Set areMemoryCacheClientCallsEnabled.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::WebPage):
        Call WebPage::setMemoryCacheMessagesEnabled.

2011-03-02  Timothy Hatcher  <timothy@apple.com>

        Make the runJavaScriptInMainFrame callback send a WKSerializedScriptValueRef.

        https://webkit.org/b/55623

        Reviewed by Darin Adler.

        * UIProcess/API/C/WKPage.cpp:
        (WKPageRunJavaScriptInMainFrame): Use ScriptValueCallback.
        (callRunJavaScriptBlockAndRelease): Use WKSerializedScriptValueRef.
        * UIProcess/API/C/WKPage.h: Use WKSerializedScriptValueRef.
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::close): Call invalidateCallbackMap for m_scriptValueCallbacks.
        (WebKit::WebPageProxy::runJavaScriptInMainFrame): Take a ScriptValueCallback.
        (WebKit::WebPageProxy::scriptValueCallback): Added. Create a WebSerializedScriptValue
        from the DataReference before calling the callback.
        (WebKit::WebPageProxy::processDidCrash): Call invalidateCallbackMap for m_scriptValueCallbacks.
        * UIProcess/WebPageProxy.h: Added ScriptValueCallback and m_scriptValueCallbacks.
        * UIProcess/WebPageProxy.messages.in: Added ScriptValueCallback.
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::runJavaScriptInMainFrame): Create a DataReference from a WebCore::SerializedScriptValue.
        And use ScriptValueCallback to send the message back.

2011-03-02  Jessie Berlin  <jberlin@apple.com>

        Reviewed by Adam Roben.

        WebKit2: Use CFNetwork Sessions API.
        https://bugs.webkit.org/show_bug.cgi?id=55435

        Add the ability to create a Private Browsing Storage Session.

        * Shared/WebProcessCreationParameters.cpp:
        (WebKit::WebProcessCreationParameters::encode):
        Encode the UI Process bundle identifier.
        (WebKit::WebProcessCreationParameters::decode):
        Decode the UI Process bundle identifier.
        * Shared/WebProcessCreationParameters.h:

        * UIProcess/mac/WebContextMac.mm:
        (WebKit::WebContext::platformInitializeWebProcess):
        Grab the bundle identifier and use it to set the WebProcessCreationParameter.
        * UIProcess/win/WebContextWin.cpp:
        (WebKit::WebContext::platformInitializeWebProcess):
        Ditto.

        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
        (InitWebCoreSystemInterface):
        Support using the wkCreatePrivateStorageSession WKSI in WebCore.

        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::initializeWebProcess):
        Set the base for the Private Browsing Storage Session identifier to be the bundle identifier
        from the UI Process so that WebKit1 would create a Private Browsing Storage Session with the
        same identifier as WebKit2.

2011-03-01  Brian Weinstein  <bweinstein@apple.com>

        Reviewed by Adam Roben.

        Part of WebKit2: Need a way to send notifications to client when cookies change
        https://bugs.webkit.org/show_bug.cgi?id=55427
        <rdar://problem/9056027>

        * WebProcess/Cookies/WebCookieManager.cpp:
        (WebKit::WebCookieManager::dispatchDidModifyCookies): Add a stub with a FIXME to send a 
            message to the UI process.

        * WebProcess/Cookies/WebCookieManager.h:
        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
        (WebKit::WebPlatformStrategies::createCookiesStrategy):
        (WebKit::WebPlatformStrategies::notifyCookiesChanged): Call WebCookieManager::dispatchDidModifyCookies.
        * WebProcess/WebCoreSupport/WebPlatformStrategies.h:

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

        Reviewed by Laszlo Gombos.

        [Qt][WK2] generate-forwarding-headers.pl should generate paths with framework names
        https://bugs.webkit.org/show_bug.cgi?id=55478

        On case insensitive systems the generated forwarding headers cause build problems.

        * Scripts/generate-forwarding-headers.pl: The generated header should
        also contain the framework name.

2011-03-01  Jeff Miller  <jeffm@apple.com>

        Reviewed by Darin Adler.

        Expose some selection state fields in WKPage
        https://bugs.webkit.org/show_bug.cgi?id=55541
        
        Added WKPageCanDelete(), WKPageHasSelectedRange(), and WKPageIsContentEditable() so we can enable some
        Edit menu items properly on Windows when using WebKit2.

        * UIProcess/API/C/WKPage.cpp:
        (WKPageCanDelete): Added.
        (WKPageHasSelectedRange): Added.
        (WKPageIsContentEditable): Added.
        * UIProcess/API/C/WKPage.h: Added new functions.
        * UIProcess/WebPageProxy.h:
        (WebKit::WebPageProxy::canDelete): Added.
        (WebKit::WebPageProxy::hasSelectedRange): Added.
        (WebKit::WebPageProxy::isContentEditable): Added.

2011-03-01  Mark Rowe  <mrowe@apple.com>

        Hide the typeinfo name symbols for std::exception and std::bad_alloc too.

        * Configurations/Base.xcconfig:

2011-03-01  Mark Rowe  <mrowe@apple.com>

        Reviewed by Sam Weinig.

        Add verification scripts to WebKit2 project and fix the issues they reveal.

        * Configurations/Base.xcconfig: Add linker flags to prevent C++ standard
        library functions from being exported as weak externals.
        * Configurations/WebKit2.xcconfig: Inherit linker flags from the project level.
        * Shared/WebContextMenuItem.cpp:
        (WebKit::WebContextMenuItem::separatorItem): Use DEFINE_STATIC_LOCAL.
        * UIProcess/WebPageGroup.cpp:
        (WebKit::webPageGroupMap): Ditto.
        * WebKit2.xcodeproj/project.pbxproj: Don't copy .in files in to the framework.
        Run verification scripts at the appropriate times.
        * WebProcess/WebCoreSupport/WebEditorClient.cpp:
        (WebKit::WebEditorClient::didBeginEditing): Use DEFINE_STATIC_LOCAL.
        (WebKit::WebEditorClient::respondToChangedContents): Ditto.
        (WebKit::WebEditorClient::respondToChangedSelection): Ditto.
        (WebKit::WebEditorClient::didEndEditing): Ditto.
        * WebProcess/WebPage/WebBackForwardListProxy.cpp:
        (WebKit::idToHistoryItemMap): Ditto.
        (WebKit::historyItemToIDMap): Ditto.

2011-03-01  Joseph Pecoraro  <joepeck@webkit.org>

        Unreviewed. Roll out r80068 and r80073 due to breaking WebKit2 Qt port.

        * UIProcess/API/qt/qwkpage.cpp:
        (QWKPage::viewportAttributesForSize):

2011-03-01  Joseph Pecoraro  <joepeck@webkit.org>

        Unreviewed, missed updating a call to WebCore::computeViewportAttributes
        who's prototype changed.

        Viewport Warning/Error Messages Are Now Inaccurate
        https://bugs.webkit.org/show_bug.cgi?id=53707

        * UIProcess/API/qt/qwkpage.cpp:
        (QWKPage::viewportAttributesForSize): pass in a value for the document argument.

2011-03-01  Anders Carlsson  <andersca@apple.com>

        Reviewed by Sam Weinig.

        WKPluginSiteDataManagerClearAllSiteData is not working
        https://bugs.webkit.org/show_bug.cgi?id=55528
        <rdar://problem/9071823>

        * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
        (WebKit::NetscapePluginModule::tryGetSitesWithData):
        Remove version checks, checking that the function pointer is not null is enough.

        (WebKit::NetscapePluginModule::tryClearSiteData):
        Remove version checks, checking that the function pointer is not null is enough.
        Also, correctly convert a null String to a null CString.

2011-03-01  Adam Roben  <aroben@apple.com>

        Incorporate a review comment I missed in r80051

        * Shared/Plugins/Netscape/NetscapePluginModule.cpp: Clarified error message.

2011-03-01  Adam Roben  <aroben@apple.com>

        Make the PLUGIN_ARCHITECTURE() macro work with MSVC

        Fixes <http://webkit.org/b/55513> <rdar://problem/9069189> REGRESSION (r79925): Lots of
        plugins tests crashing in NetscapePlugin::initialize on Windows

        Reviewed by Anders Carlsson.

        * Shared/Plugins/Netscape/NetscapePluginModule.cpp: Added a compile-time check to make sure
        PLUGIN_ARCHITECTURE() is defined for some platform.

        * config.h: Removed the parentheses from the use of "defined" in the PLUGIN_ARCHITECTURE()
        macro. This matches PLATFORM(), OS(), etc., and makes the macro work on Windows. Also
        replaced the nonsense OS(WIN) with OS(WINDOWS).

        * win/WebKit2.vcproj: Added config.h for editing convenience. Let VS do its thang.

2011-03-01  Sam Weinig  <sam@webkit.org>

        Reviewed by Timothy Hatcher.

        WebKit2 needs to be made localizable
        https://bugs.webkit.org/show_bug.cgi?id=55483

        * PluginProcess/mac/PluginProcessMainMac.mm:
        * WebProcess/mac/WebProcessMainMac.mm:
        Set the default localization from the passed in parameter.

        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
        Add the preferred localization as a parameter when launching processes
        so that they can set their localization to match the launching app.

        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
        Use WebCore's localizedString function on the mac, to actually localize
        these strings.

        (WebKit::WebPlatformStrategies::imageTitle):
        Switch to using replace, instead of concatenation, to give localizers a chance
        to rearrange the wording.

2011-03-01  Balazs Kelemen  <kbalazs@webkit.org>

        Reviewed by Anders Carlsson.

        [Qt][WK2] Plugin initialization
        https://bugs.webkit.org/show_bug.cgi?id=48127

        Apply the quirks that are necessary for the flash plugin
        to not crash on X11.

        * Platform/qt/ModuleQt.cpp:
        (WebKit::Module::load): Use the ResolveAllSymbols hint as we do in WebCore.
        * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
        (WebKit::NetscapePluginModule::tryLoad): Call applyX11QuirksBeforeLoad
        if PLUGIN_ARCHITECTURE is X11.
        * Shared/Plugins/Netscape/NetscapePluginModule.h:
        * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
        (WebKit::initializeGTK):  The same hack that we do in WebCore.
        Call gtk_init because flash don't do it for itself.
        (WebKit::NetscapePluginModule::applyX11QuirksBeforeLoad): Added for X11.
        Do the hacks that we need to do before calling NP_Initialize on the
        flash plugin to save it form crashing.
        * Shared/Plugins/PluginQuirks.h: Use PLUGIN_ARCHITECTURE macros.
        Added RequiresGTKToolKit quirk for X11.
        * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
        (WebKit::NPN_GetValue): Handle the RequiresGTKToolKit quirk on X11.
        * WebProcess/Plugins/Netscape/NetscapePlugin.h:
        (WebKit::NetscapePlugin::quirks): Added getter for the PluginModule's
        quirks to be available in NPN_GetValue.

2011-03-01  Adam Roben  <aroben@apple.com>

        Convert seconds to milliseconds before calling ::SetTimer

        Fixes <http://webkit.org/b/55417> <rdar://problem/9065287> RunLoop::Timer fires 1000x too
        early on Windows

        Reviewed by Anders Carlsson.

        * Platform/win/RunLoopWin.cpp:
        (RunLoop::TimerBase::start): Convert the timeout interval to milliseconds, since that's what
        ::SetTimer expects.

2011-03-01  Andras Becsi  <abecsi@webkit.org>

        Reviewed by Csaba Osztrogonác.

        [Qt] Clean up the project files and move common options to WebKit.pri.

        * WebKit2.pro: Deduplicate options.

2011-03-01  Juha Savolainen  <juha.savolainen@weego.fi>

        Reviewed by Andreas Kling.

        [Qt] WebKit2 needs to support font size changing and getting default font size
        https://bugs.webkit.org/show_bug.cgi?id=53671

        Added new enum for font size type and added methods to set and get default font sizes.

        * UIProcess/API/qt/qwkpreferences.cpp:
        (QWKPreferences::setFontSize): Added.
        (QWKPreferences::fontSize): Added.
        * UIProcess/API/qt/qwkpreferences.h:

2011-02-28  Alice Liu  <alice.liu@apple.com>

        Reviewed by Adam Roben and Gavin Barraclough.

        https://bugs.webkit.org/show_bug.cgi?id=54898
        InjectedBundleNodeHandle dies too early in WKBundleHitTestResultGetNodeHandle

        * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp:
        (WKBundleHitTestResultCopyNodeHandle): 
        Instead of .get(), call .release.leakRef() like other functions that return WKBundleNodeHandleRef.
        * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h:
        Renamed from "get" to "copy", because it leaksRef.

2011-02-28  Alice Liu  <alice.liu@apple.com>

        Reviewed by Gavin Barraclough.

        https://bugs.webkit.org/show_bug.cgi?id=55442
        Webarchives don't contain subframe content

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::getWebArchiveOfFrame):
        Pass the frame's document instead of just the frame, to use a different LegacyWebArchive::create function.

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

        Reviewed by Kenneth Rohde Christiansen.

        [Qt][WK2] Add a way to test the WebKit 2 APIs
        https://bugs.webkit.org/show_bug.cgi?id=55408

        Add an initial test for the WebKit 2 APIs of Qt.

        * UIProcess/API/qt/tests/html/basic_page.html: Added.
        * UIProcess/API/qt/tests/qgraphicswkview/qgraphicswkview.pro: Added.
        * UIProcess/API/qt/tests/qgraphicswkview/tst_qgraphicswkview.cpp: Added.
        (View::View):
        (View::resizeEvent):
        (tst_QGraphicsWKView::init):
        (tst_QGraphicsWKView::cleanup):
        (tst_QGraphicsWKView::loadEmptyPage):
        * UIProcess/API/qt/tests/tests.pri: Added.
        * UIProcess/API/qt/tests/tests.pro: Added.
        * UIProcess/API/qt/tests/util.h: Added.
        (waitForSignal):

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

        Fix clang build.

        * UIProcess/API/mac/FindIndicatorWindow.mm:
        * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
        (WebKit::ChunkedUpdateDrawingAreaProxy::deprecatedUpdate):
        (WebKit::ChunkedUpdateDrawingAreaProxy::didReceiveMessage):
        * UIProcess/ChunkedUpdateDrawingAreaProxy.h:
        * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
        (WebKit::ChunkedUpdateDrawingArea::deprecatedResumePainting):
        (WebKit::ChunkedUpdateDrawingArea::didReceiveMessage):
        * WebProcess/WebPage/ChunkedUpdateDrawingArea.h:

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

        Rubber-stamped by Anders Carlsson.

        Do not copy config.h into WebKit2.

        * WebKit2.xcodeproj/project.pbxproj:

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

        LLVM Compiler build fix.

        * Scripts/webkit2/messages.py:
        * UIProcess/WebPageProxy.h:

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

        Reviewed by Dan Bernstein, Sam Weinig, Alexey Proskuryakov and Darin Adler.

        Open PDF in Preview doesn't work
        https://bugs.webkit.org/show_bug.cgi?id=55400
        <rdar://problem/8750353>

        * UIProcess/API/mac/PDFViewController.mm:
        (-[WKPDFView initWithFrame:PDFViewController:]):
        Set the WKPDFView as the delegate of itself.

        (-[WKPDFView PDFViewOpenPDFInNativeApplication:]):
        Call PDFViewController::openPDFInFinder.

        (WebKit::PDFViewController::PDFViewController):
        Initialize m_hasWrittenPDFToDisk to false.

        (WebKit::PDFViewController::openPDFInFinder):
        Write the PDF to disk if needed and then open it using -[NSWorkspace openFile:].
        
        (WebKit::temporaryPDFDirectoryPath):
        Create a directory to put PDFs in.

        (WebKit::PDFViewController::pathToPDFOnDisk):
        Return a path to a (non-existent) file in the temporary PDF directory.

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

        Reviewed by Dan Bernstein.

        Frequent crashes in CFURLCache code on Snow Leopard
        https://bugs.webkit.org/show_bug.cgi?id=55412
        <rdar://problem/9063922>

        CString is evil, it has two lengths which can be different - specifically, fileSystemRepresentation()
        creates a string with maximum possible buffer size. A path with garbage at the end confused
        CFURLCache into corrupting its data structures.

        * Shared/WebProcessCreationParameters.h: Added a FIXME about merging Mac and Windows code.
        This problem wouldn't have occured if we didn't use CString in the first place.

        * UIProcess/mac/WebContextMac.mm: (WebKit::WebContext::platformInitializeWebProcess):
        Added an assertion matching Windows behavior (seems likely that NSURLCache also wouldn't
        have liked trailing slash).

        * UIProcess/win/WebContextWin.cpp: (WebKit::WebContext::platformInitializeWebProcess):
        Made slash removal conditional for robustness.

        * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::platformInitializeWebProcess):
        Use actual string length, not CString::length().

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

        Reviewed by Anders Carlsson.

        [Qt][WK2] Plugin initialization
        https://bugs.webkit.org/show_bug.cgi?id=48127

        Specialize the way of initializing the plugin for X11.
        Introduce PLUGIN_ARCHITECTURE macros to allow code sharing
        across platforms.

        * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
        (WebKit::NetscapePluginModule::tryLoad):
        * config.h:

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

        Reviewed by Brady Eidson.

        WK2 Context Menus - Implement LookUpInDictionary
        https://bugs.webkit.org/show_bug.cgi?id=55405

        * Shared/DictionaryPopupInfo.cpp:
        (WebKit::DictionaryPopupInfo::encode):
        (WebKit::DictionaryPopupInfo::decode):
        * Shared/DictionaryPopupInfo.h:
        Add type to differentiate between HotKey and ContextMenu triggered
        dictionary popups. This is necessary since HotKey triggered ones want
        to override the style to always be overlay.

        * UIProcess/API/mac/PageClientImpl.mm:
        (WebKit::PageClientImpl::didPerformDictionaryLookup):
        Only force the overlay style for HotKey triggered dictionary lookups.

        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::performDictionaryLookupAtLocation):
        (WebKit::WebPage::performDictionaryLookupForRange):
        Factor out shared functionality into performDictionaryLookupForRange.

        * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
        (WebKit::WebContextMenuClient::lookUpInDictionary):
        Get selected range and call newly factored out performDictionaryLookupForRange.

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

        Reviewed by Dan Bernstein.

        PDFViewController should hold a reference to the PDF data
        https://bugs.webkit.org/show_bug.cgi?id=55394

        * UIProcess/API/mac/PDFViewController.h:
        * UIProcess/API/mac/PDFViewController.mm:
        (WebKit::PDFViewController::setPDFDocumentData):

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

        Reviewed by Darin Adler.

        Size of text in popup menu doesn't match size of text in <select> itself in WebKit2
        https://bugs.webkit.org/show_bug.cgi?id=48234

        * Shared/TextInfo.cpp: Removed.
        * Shared/TextInfo.h: Removed.
        Replace this with the more appropriately DictionaryPopupInfo.

        * Shared/DictionaryPopupInfo.cpp: Copied from Source/WebKit2/Shared/TextInfo.cpp.
        (WebKit::DictionaryPopupInfo::encode):
        (WebKit::DictionaryPopupInfo::decode):
        * Shared/DictionaryPopupInfo.h: Copied from Source/WebKit2/Shared/TextInfo.h.
        (WebKit::DictionaryPopupInfo::DictionaryPopupInfo):
        Replace individual font related fields with FontInfo.

        * Shared/FontInfo.cpp: Added.
        (WebKit::FontInfo::FontInfo):
        (WebKit::FontInfo::encode):
        (WebKit::FontInfo::decode):
        * Shared/FontInfo.h: Added.
        Add class to encapsulate passing a font description over the wire.

        * Shared/PlatformPopupMenuData.cpp:
        (WebKit::PlatformPopupMenuData::encode):
        (WebKit::PlatformPopupMenuData::decode):
        * Shared/PlatformPopupMenuData.h:
        Add FontInfo as extra data for the Mac.

        * UIProcess/API/mac/PageClientImpl.h:
        * UIProcess/API/mac/PageClientImpl.mm:
        (WebKit::PageClientImpl::didPerformDictionaryLookup):
        * UIProcess/PageClient.h:
        Add scaleFactor and use it to construct a font at the right size.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::showPopupMenu):
        (WebKit::WebPageProxy::didPerformDictionaryLookup):
        * UIProcess/WebPageProxy.h:
        * UIProcess/WebPageProxy.messages.in:
        * UIProcess/WebPopupMenuProxy.h:
        * UIProcess/mac/WebPopupMenuProxyMac.h:
        (WebKit::WebPopupMenuProxyMac::create):
        * UIProcess/mac/WebPopupMenuProxyMac.mm:
        (WebKit::WebPopupMenuProxyMac::WebPopupMenuProxyMac):
        (WebKit::WebPopupMenuProxyMac::populate):
        (WebKit::WebPopupMenuProxyMac::showPopupMenu):
        * UIProcess/qt/WebPopupMenuProxyQt.cpp:
        (WebKit::WebPopupMenuProxyQt::showPopupMenu):
        * UIProcess/qt/WebPopupMenuProxyQt.h:
        * UIProcess/win/WebPopupMenuProxyWin.cpp:
        (WebKit::WebPopupMenuProxyWin::showPopupMenu):
        * UIProcess/win/WebPopupMenuProxyWin.h:
        * WebProcess/WebCoreSupport/mac/WebPopupMenuMac.mm:
        (WebKit::WebPopupMenu::setUpPlatformData):
        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::performDictionaryLookupAtLocation):
        Pass scale factor through and rename TextInfo -> DictionaryPopupInfo.

        * WebKit2.pro:
        * WebKit2.xcodeproj/project.pbxproj:
        * win/WebKit2.vcproj:
        Add new files.

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

        One more rename as a followup to r79868

        Rubber-stamped by Anders Carlsson.

        * UIProcess/DrawingAreaProxyImpl.cpp:
        * UIProcess/DrawingAreaProxyImpl.h:
        Rename stateDidChange to backingStoreStateDidChange.

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

        Rename DrawingArea[Proxy]Impl's "state ID" concept to "backing store state ID"

        Rubber-stamped (and suggested) 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:
        Perform the rename.

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

        Decouple state changes from sending of UpdateState messages in DrawingAreaProxyImpl

        The new DrawingAreaProxyImpl::stateDidChange function should be called whenever
        DrawingAreaProxyImpl's state changes in a way that will require allocating a new backing
        store. (Currently, this is just when the size changes.) This function will sometimes (but
        not always, as when we're waiting for a DidUpdateState message) send an UpdateState message
        to the web process. This means it's now possible for the state IDs sent in consecutive
        UpdateState messages to increase by more than one, but that's OK.

        This should cause no change in behavior.

        Fixes <http://webkit.org/b/55382> DrawingAreaProxyImpl's state ID should be updated whenever
        its state changes, not just when we send an UpdateState message

        Reviewed by Anders Carlsson.

        * UIProcess/DrawingAreaProxyImpl.cpp:
        (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl): Updated for rename.
        (WebKit::DrawingAreaProxyImpl::sizeDidChange): Changed to call stateDidChange.
        (WebKit::DrawingAreaProxyImpl::didUpdateState): Updated for rename, and changed to call
        sendUpdateState whenever our state has changed for any reason since the last UpdateState
        message was sent.
        (WebKit::DrawingAreaProxyImpl::stateDidChange): Added. Increments m_nextStateID and calls
        through to sendUpdateState.
        (WebKit::DrawingAreaProxyImpl::sendUpdateState): Updated for rename, moved incrementing of
        the state ID we send to the web process from here to stateDidChange, and added an assertion.

        * UIProcess/DrawingAreaProxyImpl.h: Renamed m_requestedStateID to m_nextStateID, and updated
        the comment explaining its meaning.

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

        Pass the right dirty rect to Plugin::paint

        A typo in r79040 broke this. Much of this patch is just support for testing the fix.

        Fixes <http://webkit.org/b/55365> <rdar://problem/9031089> REGRESSION (r79040): WebKit2:
        Large portions of pages with plugins paint black

        Reviewed by Anders Carlsson.

        * WebProcess/Plugins/PluginView.cpp:
        (WebKit::PluginView::paint): Pass the dirty rect we calculated earlier to Plugin::paint,
        rather than just passing along the dirty rect that was passed into this function. This is
        the bug fix.

        * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
        (WKBundlePageForceRepaint):
        * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
        Added new SPI. Just calls through to WebPage::forceRepaintWithoutCallback.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::forceRepaintWithoutCallback): Moved code to force a repaint here...
        (WebKit::WebPage::forceRepaint): ...from here.

        * WebProcess/WebPage/WebPage.h: Added forceRepaintWithoutCallback.

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

        Reviewed by Dan Bernstein.

        Force dictionary popup to use overlay type
        <rdar://problem/9052483>
        https://bugs.webkit.org/show_bug.cgi?id=55337

        * UIProcess/API/mac/PageClientImpl.mm:
        (WebKit::PageClientImpl::didPerformDictionaryLookup): As this is only
        used for the hot key version of the dictionary popup, force the overlay
        style.

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

        Reviewed by Kenneth Rohde Christiansen.

        [Qt] [WK2] QGraphicsWKView::showContextMenu() should be public
        https://bugs.webkit.org/show_bug.cgi?id=55330

        Move QGraphicsWKView::showContextMenu() to the public API. Add documentation
        on its use.

        * UIProcess/API/qt/qgraphicswkview.cpp:
        * UIProcess/API/qt/qgraphicswkview.h:

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

        Unreviewed, fixed GTK compilation after r79806.

        * UIProcess/gtk/WebView.cpp:
        (WebKit::WebView::didFinishLoadingDataForCustomRepresentation):
        * UIProcess/gtk/WebView.h:

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

        Reviewed by Dan Bernstein.

        Asynchronous response to FramePolicyListener is not finishing the load
        https://bugs.webkit.org/show_bug.cgi?id=55305
        <rdar://problem/9044356>

        Always initialize the receivedPolicyAction reply parameter.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::decidePolicyForNavigationAction):
        (WebKit::WebPageProxy::decidePolicyForMIMEType):

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

        Reviewed by Sam Weinig.

        DidFinishLoadingDataForCustomRepresentation should pass along the suggested filename
        https://bugs.webkit.org/show_bug.cgi?id=55304

        * UIProcess/API/mac/PDFViewController.h:
        * UIProcess/API/mac/PDFViewController.mm:
        (WebKit::PDFViewController::setPDFDocumentData):
        * UIProcess/API/mac/PageClientImpl.h:
        * UIProcess/API/mac/PageClientImpl.mm:
        (WebKit::PageClientImpl::didFinishLoadingDataForCustomRepresentation):
        * UIProcess/API/mac/WKView.mm:
        (-[WKView _didFinishLoadingDataForCustomRepresentationWithSuggestedFilename:dataReference:CoreIPC::]):
        * UIProcess/API/mac/WKViewInternal.h:
        * UIProcess/API/qt/qwkpage.cpp:
        (QWKPagePrivate::didFinishLoadingDataForCustomRepresentation):
        * UIProcess/API/qt/qwkpage_p.h:
        * UIProcess/PageClient.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::didFinishLoadingDataForCustomRepresentation):
        * UIProcess/WebPageProxy.h:
        * UIProcess/WebPageProxy.messages.in:
        * UIProcess/win/WebView.cpp:
        (WebKit::WebView::didFinishLoadingDataForCustomRepresentation):
        * UIProcess/win/WebView.h:
        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::finishedLoading):

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

        Reviewed by Oliver Hunt.

        DrawingArea should not be reference counted
        https://bugs.webkit.org/show_bug.cgi?id=55284

        * Shared/DrawingAreaInfo.h:
        * Shared/WebPageCreationParameters.cpp:
        (WebKit::WebPageCreationParameters::encode):
        (WebKit::WebPageCreationParameters::decode):
        * Shared/WebPageCreationParameters.h:
        * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
        (WebKit::ChunkedUpdateDrawingAreaProxy::ChunkedUpdateDrawingAreaProxy):
        (WebKit::ChunkedUpdateDrawingAreaProxy::setPageIsVisible):
        (WebKit::ChunkedUpdateDrawingAreaProxy::update):
        (WebKit::ChunkedUpdateDrawingAreaProxy::sendSetSize):
        * UIProcess/ChunkedUpdateDrawingAreaProxy.h:
        * UIProcess/DrawingAreaProxy.cpp:
        (WebKit::DrawingAreaProxy::DrawingAreaProxy):
        * UIProcess/DrawingAreaProxy.h:
        (WebKit::DrawingAreaProxy::type):
        * UIProcess/DrawingAreaProxyImpl.cpp:
        (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
        * UIProcess/DrawingAreaProxyImpl.h:
        * UIProcess/TiledDrawingAreaProxy.cpp:
        (WebKit::TiledDrawingAreaProxy::TiledDrawingAreaProxy):
        * UIProcess/TiledDrawingAreaProxy.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::didReceiveSyncMessage):
        (WebKit::WebPageProxy::creationParameters):
        * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
        * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
        (WebKit::ChunkedUpdateDrawingArea::ChunkedUpdateDrawingArea):
        (WebKit::ChunkedUpdateDrawingArea::display):
        (WebKit::ChunkedUpdateDrawingArea::setSize):
        (WebKit::ChunkedUpdateDrawingArea::didReceiveMessage):
        * WebProcess/WebPage/ChunkedUpdateDrawingArea.h:
        * WebProcess/WebPage/DrawingArea.cpp:
        (WebKit::DrawingArea::create):
        (WebKit::DrawingArea::DrawingArea):
        * WebProcess/WebPage/DrawingArea.h:
        * WebProcess/WebPage/DrawingAreaImpl.cpp:
        (WebKit::DrawingAreaImpl::create):
        (WebKit::DrawingAreaImpl::DrawingAreaImpl):
        * WebProcess/WebPage/DrawingAreaImpl.h:
        * WebProcess/WebPage/TiledDrawingArea.cpp:
        (WebKit::TiledDrawingArea::TiledDrawingArea):
        * WebProcess/WebPage/TiledDrawingArea.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::drawRect):
        * WebProcess/WebPage/WebPage.h:

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

        Reviewed by Pavel Feldman.

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

        Reviewed by Andreas Kling.

        [Qt] Fix the focus in MiniBrowser.
        https://bugs.webkit.org/show_bug.cgi?id=55288

        Implement basic functionality for focus in QWKPagePrivate.

        * UIProcess/API/qt/qwkpage.cpp:
        (QWKPagePrivate::isViewWindowActive):
        (QWKPagePrivate::isViewFocused):
        (QWKPagePrivate::isViewVisible):

2011-02-26  Sheriff Bot  <webkit.review.bot@gmail.com>

        Unreviewed, rolling out r79764.
        http://trac.webkit.org/changeset/79764
        https://bugs.webkit.org/show_bug.cgi?id=55295

        "broke Chromium builds" (Requested by rniwa on #webkit).

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

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

        Reviewed by Pavel Feldman.

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