2013-10-21  Lucas Forschler  <lforschler@apple.com>

        Merge r154183

    2013-08-16  Brady Eidson  <beidson@apple.com>

            (NetworkProcess)  Sync XHRs should load using async ResourceHandles, not ResourceHandle::loadResourceSynchronously
            https://bugs.webkit.org/show_bug.cgi?id=119493

            Reviewed by Alexey Proskuryakov.

            This patch does the following:
              - Consolidates SchedulableLoader and NetworkResourceLoader into one class.
              - Removes SyncNetworkResourceLoader.
              - Adds a NetworkLoaderClient interface that customizes certain behaviors of the NetworkResourceLoader.
              - Implements a SynchronousNetworkLoaderClient and AsynchronousNetworkLoaderClient for the two different types of loads.

            The AsynchronousNetworkLoaderClient results in messaging back progress to the WebProcess as the load progresses.
            The SynchronousNetworkLoaderClient accumulates the response, data, and error to be communicated back to the WebProcess
            only when the load is complete.

            Update small swaths of code to reflect that NetworkResourceLoader is the One True Loader (tm):
            * NetworkProcess/HostRecord.cpp:
            (WebKit::HostRecord::scheduleResourceLoader):
            (WebKit::HostRecord::addLoaderInProgress):
            (WebKit::removeLoaderFromQueue):
            (WebKit::HostRecord::removeLoader):
            (WebKit::HostRecord::servePendingRequestsForQueue):
            (WebKit::HostRecord::limitsRequests):
            * NetworkProcess/HostRecord.h:

            * NetworkProcess/NetworkConnectionToWebProcess.cpp:
            (WebKit::NetworkConnectionToWebProcess::didClose):
            (WebKit::NetworkConnectionToWebProcess::performSynchronousLoad):
            (WebKit::NetworkConnectionToWebProcess::removeLoadIdentifier):
            * NetworkProcess/NetworkConnectionToWebProcess.h:

            * NetworkProcess/NetworkProcess.cpp:
            * NetworkProcess/NetworkResourceLoadScheduler.cpp:
            (WebKit::NetworkResourceLoadScheduler::scheduleLoader):
            (WebKit::NetworkResourceLoadScheduler::removeLoader):
            (WebKit::NetworkResourceLoadScheduler::receivedRedirect):
            (WebKit::NetworkResourceLoadScheduler::removeScheduledLoaders):
            (WebKit::NetworkResourceLoadScheduler::scheduleRemoveLoader):
            * NetworkProcess/NetworkResourceLoadScheduler.h:

            Combine ScheduleableLoader and NetworkResourceLoader into NetworkResourceLoader:
            * NetworkProcess/NetworkResourceLoader.cpp:
            (WebKit::NetworkResourceLoader::NetworkResourceLoader):
            (WebKit::NetworkResourceLoader::~NetworkResourceLoader):
            (WebKit::NetworkResourceLoader::isSynchronous):
            (WebKit::NetworkResourceLoader::start):
            (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
            (WebKit::NetworkResourceLoader::didReceiveBuffer):
            (WebKit::NetworkResourceLoader::didFinishLoading):
            (WebKit::NetworkResourceLoader::didFail):
            (WebKit::NetworkResourceLoader::willSendRequestAsync):
            (WebKit::NetworkResourceLoader::continueWillSendRequest):
            (WebKit::NetworkResourceLoader::didSendData):
            (WebKit::NetworkResourceLoader::shouldUseCredentialStorage):
            (WebKit::NetworkResourceLoader::didReceiveAuthenticationChallenge):
            (WebKit::NetworkResourceLoader::consumeSandboxExtensions):
            (WebKit::NetworkResourceLoader::invalidateSandboxExtensions):
            (WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpaceAsync):
            * NetworkProcess/NetworkResourceLoader.h:
            (WebKit::NetworkResourceLoader::create):
            (WebKit::NetworkResourceLoader::connectionToWebProcess):
            (WebKit::NetworkResourceLoader::priority):
            (WebKit::NetworkResourceLoader::request):
            (WebKit::NetworkResourceLoader::isLoadingMainResource):
            (WebKit::NetworkResourceLoader::setHostRecord):
            (WebKit::NetworkResourceLoader::hostRecord):
            (WebKit::NetworkResourceLoader::sendAbortingOnFailure):

            Add an abstract NetworkLoaderClient to adapt a load to be either synchronous or asynchronous:
            * NetworkProcess/NetworkLoaderClient.h:
            (WebKit::NetworkLoaderClient::~NetworkLoaderClient):
            (WebKit::NetworkLoaderClient::isSynchronous):
            (WebKit::NetworkLoaderClient::NetworkLoaderClient):

            The asynchronous loader client, primarily to message progress back to the WebProcess as it happens:
            * NetworkProcess/AsynchronousNetworkLoaderClient.cpp: Added.
            (WebKit::AsynchronousNetworkLoaderClient::AsynchronousNetworkLoaderClient):
            (WebKit::AsynchronousNetworkLoaderClient::willSendRequest):
            (WebKit::AsynchronousNetworkLoaderClient::canAuthenticateAgainstProtectionSpace):
            (WebKit::AsynchronousNetworkLoaderClient::didReceiveResponse):
            (WebKit::AsynchronousNetworkLoaderClient::didReceiveBuffer):
            (WebKit::AsynchronousNetworkLoaderClient::didSendData):
            (WebKit::AsynchronousNetworkLoaderClient::didFinishLoading):
            (WebKit::AsynchronousNetworkLoaderClient::didFail):
            * NetworkProcess/AsynchronousNetworkLoaderClient.h:
            (WebKit::AsynchronousNetworkLoaderClient::create):

            The synchronous loader client, primarily to accumulate results of the load to send back to the WebProcess all at once:
            * NetworkProcess/SynchronousNetworkLoaderClient.cpp: Added.
            (WebKit::SynchronousNetworkLoaderClient::SynchronousNetworkLoaderClient):
            (WebKit::SynchronousNetworkLoaderClient::~SynchronousNetworkLoaderClient):
            (WebKit::SynchronousNetworkLoaderClient::willSendRequest):
            (WebKit::SynchronousNetworkLoaderClient::canAuthenticateAgainstProtectionSpace):
            (WebKit::SynchronousNetworkLoaderClient::didReceiveResponse):
            (WebKit::SynchronousNetworkLoaderClient::didReceiveBuffer):
            (WebKit::SynchronousNetworkLoaderClient::didFinishLoading):
            (WebKit::SynchronousNetworkLoaderClient::didFail):
            (WebKit::SynchronousNetworkLoaderClient::sendDelayedReply):
            * NetworkProcess/SynchronousNetworkLoaderClient.h: Added.
            (WebKit::SynchronousNetworkLoaderClient::create):

            * NetworkProcess/SchedulableLoader.cpp: Removed.
            * NetworkProcess/SchedulableLoader.h: Removed.
            * NetworkProcess/SyncNetworkResourceLoader.cpp: Removed.
            * NetworkProcess/SyncNetworkResourceLoader.h: Removed.

            * WebKit2.xcodeproj/project.pbxproj:

2013-10-21  Lucas Forschler  <lforschler@apple.com>

        Merge r154085

    2013-08-14  Dean Jackson  <dino@apple.com>

            <https://webkit.org/b/119827> Allow primary plug-in detection to run more than once if necessary

            Reviewed by Tim Horton.

            We occasionally see cases where the primary plug-in detection runs before the plugins have been added
            to the page, especially if they do so in response to a load event. Tweak the algorithm so that it can
            run an arbitrary number of times if it fails.

            While here, also have the detection run if there has ever been a plugin in the page as opposed to any
            current views. We may have snapshotted a plugin by now and deleted its view.

            * WebProcess/WebPage/WebPage.cpp:
            (WebKit::WebPage::WebPage): initialise new members.
            (WebKit::WebPage::addPluginView): Mark that we've seen a plugin.
            (WebKit::WebPage::resetPrimarySnapshottedPlugIn): Reset new members.
            (WebKit::WebPage::determinePrimarySnapshottedPlugIn): Exit early if we've never
            seen a plugin, rather than if we don't have any active views. Also, if we didn't find anything set
            a timer to run again (maximum of two attempts at the moment).
            * WebProcess/WebPage/WebPage.h: New members - m_numberOfPrimarySnapshotDetectionAttempts
            and m_hasSeenPlugin.

2013-10-21  Lucas Forschler  <lforschler@apple.com>

        Merge r154077

    2013-08-14  Dean Jackson  <dino@apple.com>

            <https://webkit.org/b/119820> Add pluginView-related logging to WebPage

            Reviewed by Tim Horton.

            Add some more diagnostic output to help track down bugs.

            * WebProcess/WebPage/WebPage.cpp:
            (WebKit::WebPage::addPluginView): More logging.
            (WebKit::WebPage::removePluginView): Ditto.

2013-10-21  Lucas Forschler  <lforschler@apple.com>

        Merge r153848

    2013-08-08  Dean Jackson  <dino@apple.com>

            Add logging to the primary plugin detection
            https://bugs.webkit.org/show_bug.cgi?id=119594

            Reviewed by Tim Horton.

            Add some simple logging to our primary plug-in detection.

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

2013-10-21  Lucas Forschler  <lforschler@apple.com>

        Merge r154067

    2013-08-14  Tim Horton  <timothy_horton@apple.com>

            REGRESSION (r153877): Plugin scanning slows creation of WebViews
            https://bugs.webkit.org/show_bug.cgi?id=119665
            <rdar://problem/14716549>

            Reviewed by Darin Adler.

            * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
            (WebKit::WebPlatformStrategies::refreshPlugins):
            Don't repopulate the plugin cache in refreshPlugins, just invalidate it.
            It will be repopulated the next time something tries to use it.

2013-10-21  Lucas Forschler  <lforschler@apple.com>

        Merge r153877

    2013-08-08  Tim Horton  <timothy_horton@apple.com>

            navigator.plugins has plugins in it when plugins are disabled
            https://bugs.webkit.org/show_bug.cgi?id=119607
            <rdar://problem/14678030>

            Reviewed by Anders Carlsson.

            * UIProcess/WebProcessProxy.cpp:
            (WebKit::WebProcessProxy::getPlugins):
            Return a list of all plugins, and a list of only application plugins.

            * UIProcess/WebProcessProxy.h:
            * UIProcess/WebProcessProxy.messages.in:
            * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
            * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
            (WebKit::WebPlatformStrategies::getPluginInfo):
            Add applicationPlugin parameter to getPlugins, and storage for the returned list.

            (WebKit::WebPlatformStrategies::populatePluginCache):
            If plugins are disabled for the given page, give WebCore the list that
            only includes application plugins. Otherwise, give it the whole list
            as we are doing currently.

2013-09-04  Dean Jackson  <dino@apple.com>

        <rdar://problem/14910916> Disable CSS_SHAPES on safari-537-branch

        Reviewed by Beth Dakin.

        * Configurations/FeatureDefines.xcconfig:

2013-08-26  Lucas Forschler  <lforschler@apple.com>

        Merge r154528

    2013-08-23  Beth Dakin  <bdakin@apple.com>

            REGRESSION (r132545): Some PDFs generated by WebKit are blank when viewed in 
            Adobe Reader
            https://bugs.webkit.org/show_bug.cgi?id=120240
            -and corresponding-
            <rdar://problem/14634453>

            Reviewed by Anders Carlsson.

            Hook up new WebSystemInterface API to find out if the current context is the PDF 
            context. 

            * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
            (InitWebCoreSystemInterface):

2013-08-23  Lucas Forschler  <lforschler@apple.com>

        Merge r154473

    2013-08-22  Simon Cooper  <scooper@apple.com>

            Need to disable FakeSYSVSHM when sandboxing is not enabled
            https://bugs.webkit.org/show_bug.cgi?id=120182
            <rdar://problem/14814461>

            Reviewed by Alexey Proskuryakov.

            When not in a sandbox do not enable the FakeSYSVSHIM. This
            allows LocalConnection to work when Flash Player is run in
            "Unsafe Mode".

            * PluginProcess/mac/PluginProcessShim.mm:
            (WebKit::shim_disabled):

2013-08-23  Lucas Forschler  <lforschler@apple.com>

        Merge r154433

    2013-08-21  Tim Horton  <timothy_horton@apple.com>

            Another null-deref under WebDragClient::startDrag
            https://bugs.webkit.org/show_bug.cgi?id=120145
            <rdar://problem/14650652>

            Reviewed by Simon Fraser.

            convertImageToBitmap can legitimately return null, so don't dereference it.

            * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
            (WebKit::WebDragClient::startDrag):

2013-08-20  Lucas Forschler  <lforschler@apple.com>

        Merge r154302

    2013-08-19  Beth Dakin  <bdakin@apple.com>

            <https://webkit.org/b/120027> AXObjectCache's 
            accessibilityEnhancedUserInterfaceEnabled should be initialized on process 
            creation

            Reviewed by Sam Weinig.

            Right now we only call AXObjectCache::setEnhancedAccessibility() when AppKit sends 
            us a notification indicating that the value has changed. We should not have to 
            rely on that to properly initialize this value. It should be done with the 
            WebProcessCreationParamters. 

            * Shared/WebProcessCreationParameters.cpp:
            (WebKit::WebProcessCreationParameters::encode):
            (WebKit::WebProcessCreationParameters::decode):
            * Shared/WebProcessCreationParameters.h:
            * UIProcess/mac/WebContextMac.mm:
            (WebKit::WebContext::platformInitializeWebProcess):
            * WebProcess/mac/WebProcessMac.mm:
            (WebKit::WebProcess::platformInitializeWebProcess):

2013-08-09  Lucas Forschler  <lforschler@apple.com>

        Merge r153907

    2013-08-09  Beth Dakin  <bdakin@apple.com>

            AX: Not able to use arrow keys to read text in a WK2 app
            https://bugs.webkit.org/show_bug.cgi?id=119605
            -and corresponding-
            <rdar://problem/14281275>

            Reviewed by Darin Adler.

            Make all of these scrolling functions actually return the WebCore bools that 
            indicate whether or not scrolling happened. 
            * WebProcess/WebPage/WebPage.cpp:
            (WebKit::WebPage::scroll):
            (WebKit::WebPage::logicalScroll):
            (WebKit::WebPage::scrollBy):
            * WebProcess/WebPage/WebPage.h:
            * WebProcess/WebPage/mac/WebPageMac.mm:
            (WebKit::WebPage::executeKeypressCommandsInternal):

            This function now gives accessibility a chance to handle the event too. And it 
            also actually tracks whether or not the event was handled by scrolling instead of 
            assuming that it was and universally returning true.
            (WebKit::WebPage::performNonEditingBehaviorForSelector):

2013-08-08  Lucas Forschler  <lforschler@apple.com>

        Merge r153856

    2013-08-08  Gavin Barraclough  <barraclough@apple.com>

            Disable suppression of plugin process for Java
            https://bugs.webkit.org/show_bug.cgi?id=119604

            Reviewed by Sam Weinig.

            Workaround, the Java plugin doesn't like this.

            * PluginProcess/mac/PluginProcessMac.mm:
            (WebKit::PluginProcess::platformInitializeProcess):
                - +1 active task count on the java plugin, to inhibit supression.

2013-08-07  Lucas Forschler  <lforschler@apple.com>

        Merge r153775

    2013-08-06  Stephanie Lewis  <slewis@apple.com>

            Update Order Files for Safari
            <rdar://problem/14517392>

            Unreviewed.

            * mac/WebKit2.order:

2013-08-07  Lucas Forschler  <lforschler@apple.com>

        Merge r153773

    2013-08-06  Jer Noble  <jer.noble@apple.com>

            Crash when entering fullscreen video playback from a WebView using WebKit2
            https://bugs.webkit.org/show_bug.cgi?id=119531

            Reviewed by Tim Horton.

            Initialize wkWindowSetScaledFrame and wkWindowSetAlpha when initializing WebCoreSystemInterface.

            * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
            (InitWebCoreSystemInterface):

2013-08-06  Lucas Forschler  <lforschler@apple.com>

        Merge r153753

    2013-08-06  Andreas Kling  <akling@apple.com>

            REGRESSION(r151403): Resizing is extremely laggy on many sites when plugins are disallowed.
            <http://webkit.org/b/119516>
            <rdar://problem/14648086>

            Reviewed by Simon Fraser.

            The web process relies on the WindowAndViewFramesChanged mechanism for caching a copy
            of the window rect for fast access from DOMWindow APIs.

            We retain part of the optimization introduced in r151403, namely not computing the
            viewFrameInWindowCoordinates and accessibilityPosition unless the web process needs them.

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

2013-08-05  Lucas Forschler  <lforschler@apple.com>

        Merge r153724

    2013-08-05  Anders Carlsson  <andersca@apple.com>

            Ignore the Apple Java placeholder plug-in
            https://bugs.webkit.org/show_bug.cgi?id=119494
            <rdar://problem/14610818>

            Reviewed by Beth Dakin.

            Never attempt to load the Java placeholder plug-in.

            * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
            (WebKit::PluginInfoStore::shouldUsePlugin):

2013-08-01  Lucas Forschler  <lforschler@apple.com>

        Merge r153499

    2013-07-30  Anders Carlsson  <andersca@apple.com>

            Speculative fix for crash due to string access on multiple threads
            https://bugs.webkit.org/show_bug.cgi?id=119279
            <rdar://problem/14267833>

            Reviewed by Darin Adler.

            We can't use String::isolatedCopy for passing the local storage directory to the storage thread since
            that returns a String that's copied and then destroyed after the call to bind returns, leaving a small window
            where the refcount can be accessed simultaneously from two threads.

            Work around this by passing a PassRefPtr<StringImpl> to bind instead; the act of copying the PassRefPtr will
            clear out the original and so when the original is destroyed the underlying StringImpl pointer will be null.

            * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
            (WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectory):
            (WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectoryInternal):
            * UIProcess/Storage/LocalStorageDatabaseTracker.h:

2013-08-01  Lucas Forschler  <lforschler@apple.com>

        Merge r153488

    2013-07-30  Anders Carlsson  <andersca@apple.com>

            Plug-in process crashes if plug-in is destroyed as a result of sending NPObjectMessageReceiver::Deallocate
            https://bugs.webkit.org/show_bug.cgi?id=119270
            <rdar://problem/13368226>

            Reviewed by Darin Adler.

            Normally we use the PluginDestructionProtector RAII object to prevent plug-ins from being destroyed while
            they're executing code. However, in the case of the NPObjectMessageReceiver::Deallocate message, we can't do this
            since we don't know the plug-in or connection. 

            Instead, add a counter to Connection that keeps track of whether sendSync is currently called and defer plug-in
            destruction if it is. (This approach is actually more robust and we should investigate getting rid of the destruction protector).

            * Platform/CoreIPC/Connection.cpp:
            (CoreIPC::Connection::Connection):
            (CoreIPC::Connection::sendSyncMessage):
            * Platform/CoreIPC/Connection.h:
            (CoreIPC::Connection::inSendSync):
            * PluginProcess/PluginControllerProxy.cpp:
            (WebKit::PluginControllerProxy::destroy):

2013-08-01  Lucas Forschler  <lforschler@apple.com>

        Merge r153482

    2013-07-30  Jeff Miller  <jeffm@apple.com>

            Page for WKPageLoaderClient processDidCrash callback always reports a process identifier of 0
            https://bugs.webkit.org/show_bug.cgi?id=119269
            <rdar://problem/14582393>

            Reviewed by Anders Carlsson.

            * UIProcess/WebPageProxy.cpp:
            (WebKit::WebPageProxy::processIdentifier):
            Return 0 if the page is closed instead of requiring isValid().

2013-07-31  Lucas Forschler  <lforschler@apple.com>

        Merge r153511

    2013-07-30  Tim Horton  <timothy_horton@apple.com>

            DHTML drag can result in a null-deref under WebDragClient::startDrag
            https://bugs.webkit.org/show_bug.cgi?id=119297
            <rdar://problem/14213012>

            Reviewed by Simon Fraser.

            * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
            (WebKit::convertImageToBitmap):
            ShareableBitmap::createShareable can return null, but shouldn't dereference that.

2013-07-31  Lucas Forschler  <lforschler@apple.com>

        Merge r153487

    2013-07-30  Tim Horton  <timothy_horton@apple.com>

            Null deref under WebPage::scaledSnapshotWithOptions
            https://bugs.webkit.org/show_bug.cgi?id=119243
            <rdar://problem/14502050>

            Reviewed by Darin Adler.

            * WebProcess/WebPage/WebPage.cpp:
            (WebKit::WebPage::scaledSnapshotWithOptions):
            WebFrame::coreFrame() can be null (if the Frame is already torn down),
            so we should check it.

2013-07-30  Lucas Forschler  <lforschler@apple.com>

        Merge r153486

    2013-07-30  Tim Horton  <timothy_horton@apple.com>

            Null deref under PluginView::handlesPageScaleFactor()
            https://bugs.webkit.org/show_bug.cgi?id=119231
            <rdar://problem/14440207>

            Reviewed by Darin Adler.

            Null-check the PluginView in the caller as well.

            * WebProcess/WebPage/WebFrame.cpp:
            (WebKit::WebFrame::handlesPageScaleGesture):

2013-07-30  Lucas Forschler  <lforschler@apple.com>

        Merge r153449

    2013-07-29  Tim Horton  <timothy_horton@apple.com>

            Null deref under PluginView::handlesPageScaleFactor()
            https://bugs.webkit.org/show_bug.cgi?id=119231
            <rdar://problem/14440207>

            Reviewed by Simon Fraser.

            * WebProcess/Plugins/PluginView.cpp:
            (WebKit::PluginView::handlesPageScaleFactor):
            * WebProcess/Plugins/PluginView.h:
            Null-check m_plugin and check m_isInitialized.
            Make pageScaleFactor() and handlesPageScaleFactor const.

2013-07-29  Lucas Forschler  <lforschler@apple.com>

        Merge r153458

    2013-07-29  Tim Horton  <timothy_horton@apple.com>

            [wk2] Flush the WebProcess’ implicit transaction when using endDeferringViewInWindowChangesSync
            https://bugs.webkit.org/show_bug.cgi?id=119225
            <rdar://problem/14568841>

            Reviewed by Simon Fraser.

            Tell CoreAnimation to flush the implicit transaction before replying
            when using endDeferringViewInWindowChangesSync, as that method's contract
            is that the WebProcess is totally ready to be in-window when it returns.

            * UIProcess/API/mac/WKView.mm:
            (-[WKView endDeferringViewInWindowChanges]):
            Adopt viewInWindowStateDidChange.

            (-[WKView endDeferringViewInWindowChangesSync]):
            Adopt viewInWindowStateDidChange, asking it to send a reply only if we're going to wait for one.

            * UIProcess/WebPageProxy.cpp:
            (WebKit::WebPageProxy::viewInWindowStateDidChange):
            (WebKit::WebPageProxy::viewStateDidChange):
            Pull viewInWindowStateDidChange out of viewStateDidChange.
            Request a reply from SetIsInWindow if we're told to.

            * UIProcess/WebPageProxy.h: Add WantsReplyOrNot and viewInWindowStateDidChange.
            * WebProcess/WebPage/WebPage.cpp:
            (WebKit::WebPage::didUpdateInWindowStateTimerFired):
            Don't build this version on Mac, we'll have a WebPageMac version.

            (WebKit::WebPage::setIsInWindow):
            Only start the timer to send the didUpdateInWindowState reply if we're asked to.

            * WebProcess/WebPage/WebPage.h:
            * WebProcess/WebPage/WebPage.messages.in:
            Add an argument to the SetIsInWindow message for whether the WebProcess
            should inform the UIProcess when SetIsInWindow completes or not.

            * WebProcess/WebPage/mac/WebPageMac.mm:
            (WebKit::WebPage::didUpdateInWindowStateTimerFired):
            Tell CA to flush the implicit transaction before telling the UIProcess that
            we're finished moving in-window.

2013-07-29  Lucas Forschler  <lforschler@apple.com>

        Merge r153449

    2013-07-29  Tim Horton  <timothy_horton@apple.com>

            Null deref under PluginView::handlesPageScaleFactor()
            https://bugs.webkit.org/show_bug.cgi?id=119231
            <rdar://problem/14440207>

            Reviewed by Simon Fraser.

            * WebProcess/Plugins/PluginView.cpp:
            (WebKit::PluginView::handlesPageScaleFactor):
            * WebProcess/Plugins/PluginView.h:
            Null-check m_plugin and check m_isInitialized.
            Make pageScaleFactor() and handlesPageScaleFactor const.

2013-07-28  Lucas Forschler  <lforschler@apple.com>

        Merge r153404

    2013-07-27  Chris Fleizach  <cfleizach@apple.com>

            AX: VoiceOver not working with data detection page overlays
            https://bugs.webkit.org/show_bug.cgi?id=118680

            Reviewed by Sam Weinig.

            Expose API in BundlePageOverlay so that accessibility attributes can be retrieved through the overlay.
            This requires two methods in a new callback struct. One to copy the attribute names, and the other to 
            copy the attribute values. I've folded both parameterized and non-parameterized attribute names into one method
            with a boolean to determine which one should be used. The non-parameterized attributes are not used or passed to the
            overlay at this time as there are no clients with such a need.

            * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
            (PageOverlayClientImpl::setAccessibilityClient):
            (PageOverlayClientImpl::PageOverlayClientImpl):
            (PageOverlayClientImpl::copyAccessibilityAttributeValue):
            (PageOverlayClientImpl::copyAccessibilityAttributeNames):
            (WKBundlePageOverlaySetAccessibilityClient):
            * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h:
            * WebProcess/WebPage/PageOverlay.cpp:
            (WebKit::PageOverlay::copyAccessibilityAttributeValue):
            (WebKit::PageOverlay::copyAccessibilityAttributeNames):
            * WebProcess/WebPage/PageOverlay.h:
            (WebKit::PageOverlay::Client::copyAccessibilityAttributeValue):
            (WebKit::PageOverlay::Client::copyAccessibilityAttributeNames):
            (WebKit::PageOverlay::client):
            * WebProcess/WebPage/WebPage.cpp:
            (WebKit::WebPage::pageOverlayCopyAccessibilityAttributeValue):
            (WebKit::WebPage::pageOverlayCopyAccessibilityAttributesNames):
            * WebProcess/WebPage/WebPage.h:
            * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm:
            (-[WKAccessibilityWebPageObject accessibilityParameterizedAttributeNames]):
            (-[WKAccessibilityWebPageObject _convertScreenPointToWindow:]):
            (-[WKAccessibilityWebPageObject accessibilityAttributeValue:forParameter:]):

2013-07-28  Lucas Forschler  <lforschler@apple.com>

        Merge r153402

    2013-07-27  Simon Fraser  <simon.fraser@apple.com>

            If entering fullscreen for a window fails, don't leave things in a bad state
            https://bugs.webkit.org/show_bug.cgi?id=119179

            Reviewed by Sam Weinig.

            On Lion, attempting to take a video fullscreen when the Safari window is already
            fullscreen can sometimes fail, and AppKit informs us via windowDidFailToEnterFullScreen:

            When this happens we have to undo the work done when entering fullscreen, to
            avoid leaving things in a bad state.

            * UIProcess/mac/WKFullScreenWindowController.mm:
            (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):

2013-07-26  Lucas Forschler  <lforschler@apple.com>

        Merge r153378

    2013-07-26  Tim Horton  <timothy_horton@apple.com>

            Add a mode where autosizing fixes the FrameView height to at least the WKView height
            https://bugs.webkit.org/show_bug.cgi?id=119104
            <rdar://problem/14549021>

            Reviewed by Anders Carlsson.

            * Shared/WebPageCreationParameters.cpp:
            (WebKit::WebPageCreationParameters::encode):
            (WebKit::WebPageCreationParameters::decode):
            * Shared/WebPageCreationParameters.h:
            Add autoSizingShouldExpandToViewHeight parameter.

            * UIProcess/API/mac/WKView.mm:
            (-[WKView minimumWidthForAutoLayout]):
            (-[WKView setMinimumWidthForAutoLayout:]):
            Un-deprecate these as they're still useful if not sending a height.

            (-[WKView shouldExpandToViewHeightForAutoLayout]):
            (-[WKView setShouldExpandToViewHeightForAutoLayout:]):
            * UIProcess/API/mac/WKViewPrivate.h:
            New property, forward to WebPageProxy.

            * UIProcess/WebPageProxy.cpp:
            (WebKit::WebPageProxy::WebPageProxy):
            (WebKit::WebPageProxy::creationParameters):
            (WebKit::WebPageProxy::setAutoSizingShouldExpandToViewHeight):
            * UIProcess/WebPageProxy.h:
            (WebKit::WebPageProxy::autoSizingShouldExpandToViewHeight):
            New property, forward to WebPage.

            * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
            (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
            If enabled, update the FrameView's autoSizeFixedMinimumHeight.

            * WebProcess/WebPage/WebPage.cpp:
            (WebKit::WebPage::WebPage):
            (WebKit::WebPage::setAutoSizingShouldExpandToViewHeight):
            * WebProcess/WebPage/WebPage.h:
            (WebKit::WebPage::autoSizingShouldExpandToViewHeight):
            New property; if enabled, set FrameView's autoSizeFixedMinimumHeight,
            otherwise reset it to 0.

            * WebProcess/WebPage/WebPage.messages.in:
            * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
            (WebKit::TiledCoreAnimationDrawingArea::updateIntrinsicContentSizeTimerFired):
            (WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
            Retrieve intrinsic content size explicitly from the FrameView, as
            it may not have used it as its final contentsSize if
            autoSizeFixedMinimumHeight is set.

            Set the WebPage's size in case the load is committed so that the
            WebFrameLoaderClient doesn't reset us to the wrong size.

            Update autoSizeFixedMinimumHeight if enabled when the view size changes.

2013-07-26  Lucas Forschler  <lforschler@apple.com>

        Merge r153107

    2013-07-24  Anders Carlsson  <andersca@apple.com>

            Crash when calling WKPageGetProcessIdentifier after aborted process launch
            https://bugs.webkit.org/show_bug.cgi?id=119069
            <rdar://problem/14494064>

            Reviewed by Andreas Kling.

            * UIProcess/WebPageProxy.cpp:
            (WebKit::WebPageProxy::processIdentifier):
            Check if the page is closed instead of checking whether we have a process - We'll always have a process.

            (WebKit::WebPageProxy::isValid):
            Make this const.

            * UIProcess/WebPageProxy.h:

2013-07-24  Lucas Forschler  <lforschler@apple.com>

        Merge r153096

    2013-07-24  Jessie Berlin  <jberlin@apple.com>

            Remove WKPageGetPlugInInformation - it is not used anymore
            https://bugs.webkit.org/show_bug.cgi?id=119047

            Reviewed by Alexey Proskuryakov.

            Revert r151172, which fixed a crash introduced in r151043, r151054, which fixed some naming
            and ref-churn issues introduced in r151043, and r151043, which added
            WKPageGetPlugInInformation.

            * UIProcess/API/C/mac/WKPagePrivateMac.cpp:
            (WKPageIsURLKnownHSTSHost):
            * UIProcess/API/C/mac/WKPagePrivateMac.h:
            * UIProcess/Plugins/PluginProcessManager.h:
            * UIProcess/Plugins/mac/PluginProcessManagerMac.mm:
            * UIProcess/WebPageProxy.cpp:
            (WebKit::WebPageProxy::close):
            * UIProcess/WebPageProxy.h:
            * UIProcess/WebPageProxy.messages.in:
            * UIProcess/mac/WebPageProxyMac.mm:
            * WebProcess/Plugins/Netscape/NetscapePlugin.h:
            * WebProcess/Plugins/PDF/SimplePDFPlugin.h:
            * WebProcess/Plugins/Plugin.h:
            * WebProcess/Plugins/PluginProxy.h:
            * WebProcess/Plugins/PluginView.h:
            * WebProcess/WebPage/WebPage.h:
            * WebProcess/WebPage/WebPage.messages.in:
            * WebProcess/WebPage/mac/WebPageMac.mm:

2013-07-24  Lucas Forschler  <lforschler@apple.com>

        Merge r153092

    2013-07-24  Jessie Berlin  <jberlin@apple.com>

            Remove WKPageGetPlugInInformation - it is not used anymore
            https://bugs.webkit.org/show_bug.cgi?id=119047

            Rubber-stamped by Alexey Proskuryakov.

            Revert r152328, which added a key used only in the callback info for
            WKPageGetPlugInInformation.

            * Shared/API/c/WKPluginInformation.cpp:
            * Shared/API/c/WKPluginInformation.h:
            * Shared/Plugins/Netscape/PluginInformation.cpp:
            * Shared/Plugins/Netscape/PluginInformation.h:
            * UIProcess/WebPageProxy.h:
            * UIProcess/WebPageProxy.messages.in:
            * UIProcess/mac/WebPageProxyMac.mm:
            (WebKit::WebPageProxy::containsPlugInCallback):
            * WebProcess/WebPage/mac/WebPageMac.mm:
            (WebKit::WebPage::containsPluginViewsWithPluginProcessToken):

2013-07-23  Lucas Forschler  <lforschler@apple.com>

        Merge r153070

    2013-07-23  Simon Cooper  <scooper@apple.com>

            10.7: Java applets do not work due to sandbox violation/exception
            https://bugs.webkit.org/show_bug.cgi?id=118920
            <rdar://problem/14471541&12910934&14223830&14260729&14267679>

            Reviewed by Alexey Proskuryakov.

            Introduce versioning into the common profile and use it to fix
            a number of issues with Java on 10.7 and 10.8. Allow writing the
            com.apple.java.util.prefs preference file. This change also
            introduces a "/Library/Application Support/Java/PublicFiles"
            area which Java can read without any restrictions. Files written
            to this location will need to be created and written to by
            a privileged process.

            * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
            * Resources/PlugInSandboxProfiles/com.oracle.java.JavaAppletPlugin.sb:

2013-07-22  Lucas Forschler  <lforschler@apple.com>

        Merge r152984

    2013-07-22  Alexey Proskuryakov  <ap@apple.com>

            Frequent MESSAGE_CHECK failures in WebPageProxy::didReceiveEvent
            https://bugs.webkit.org/show_bug.cgi?id=118976
            <rdar://problem/14155030>

            Reviewed by Sam Weinig.

            * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::resetStateAfterProcessExited):
            Clear m_gestureEventQueue, just like we clear all other event queues here.

2013-07-22  Lucas Forschler  <lforschler@apple.com>

        Merge r152950

    2013-07-21  Anders Carlsson  <andersca@apple.com>

            Java Updater not launched on Lion and Mountain Lion
            https://bugs.webkit.org/show_bug.cgi?id=118953
            <rdar://problem/14496721>

            Reviewed by Sam Weinig.

            On Lion and Mountain Lion, -[NSURL isEqual:] will return NO for two file URLs if one of
            them has "localhost" specified, even if the paths are otherwise equal. Work around this by
            comparing the paths directly.

            * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
            (WebKit::isJavaUpdaterURL):

2013-07-22  Lucas Forschler  <lforschler@apple.com>

        Merge r152787

    2013-07-17  Simon Cooper  <scooper@apple.com>

            YouTube webcam capture (Flash Plug-in) in Safari can't see built-in camera
            https://bugs.webkit.org/show_bug.cgi?id=118787
            <rdar://problem/14418799>

            Reviewed by Alexey Proskuryakov.

            Add support for built-in cameras, including the original iSight.

            * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
            * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb:

2013-07-22  Lucas Forschler  <lforschler@apple.com>

        Merge r152866

    2013-07-18  Tim Horton  <timothy_horton@apple.com>

            [wk2] Ensure that the plugin layer is removed completely when the PluginProcess crashes
            https://bugs.webkit.org/show_bug.cgi?id=118862

            Reviewed by Anders Carlsson.

            * WebProcess/Plugins/PluginView.cpp:
            (WebKit::PluginView::PluginView):
            Add m_pluginProcessHasCrashed.

            (WebKit::PluginView::platformLayer):
            Don't return the plugin's layer if it has crashed.

            (WebKit::PluginView::pluginProcessCrashed):
            Set m_pluginProcessHasCrashed.
            Cause a style recalc so that we rebuild the layer tree; our layer won't be included.

            * WebProcess/Plugins/PluginView.h:
            Add m_pluginProcessHasCrashed.

2013-07-22  Lucas Forschler  <lforschler@apple.com>

        Merge r152862

    2013-07-18  Alexey Proskuryakov  <ap@apple.com>

            <rdar://problem/13886443> Assertion failures in NetworkProcess in SandboxExtension::revoke when aborting SyncNetworkResourceLoader
            <rdar://problem/13826348> ASSERT(!m_useCount) fails in NetworkProcess at SandboxExtension::~SandboxExtension
            https://bugs.webkit.org/show_bug.cgi?id=118855

            Reviewed by Brady Eidson.

            * NetworkProcess/NetworkResourceLoader.cpp:
            (WebKit::NetworkResourceLoader::cleanup):
            (WebKit::NetworkResourceLoader::didFinishLoading):
            (WebKit::NetworkResourceLoader::didFail):
            Moved sandbox extension invalidation to cleanup() meaning that we won't fail to
            do this when aborting a loader that currently loading from network.

            * NetworkProcess/SchedulableLoader.cpp:
            (WebKit::SchedulableLoader::SchedulableLoader):
            (WebKit::SchedulableLoader::consumeSandboxExtensions):
            (WebKit::SchedulableLoader::invalidateSandboxExtensions):
            * NetworkProcess/SchedulableLoader.h:
            Keep track of whether sandbox extensions are consumed, we don't want to revoke
            extensions that were never consumed (as used to be the case with sync loaders,
            and would be with async ones after the above fix). Also, get rid of extensions
            immediately when invalidating, we won't need them again.

2013-07-22  Lucas Forschler  <lforschler@apple.com>

        Merge r152824

    2013-07-17  Tim Horton  <timothy_horton@apple.com>

            Update blocked/missing plug-in UI
            https://bugs.webkit.org/show_bug.cgi?id=118347
            <rdar://problem/14209318>

            Reviewed by Sam Weinig.

            * Platform/CoreIPC/HandleMessage.h:
            (CoreIPC::callMemberFunction):
            Add a 6 argument -> 4 reply message handler.
            (It seems that FindPlugin is getting a little out of hand.)

            * Shared/APIClientTraits.cpp:
            * Shared/APIClientTraits.h:
            * UIProcess/API/C/WKPage.h:
            * UIProcess/WebLoaderClient.cpp:
            (WebKit::WebLoaderClient::pluginLoadPolicy):
            * UIProcess/WebLoaderClient.h:
            Add an unavailability description out-argument to a new version of
            pluginLoadPolicy, so clients can override the text of the unavailable
            plugin indicator. Bump the WKPageLoaderClient version and update APIClientTraits.

            * UIProcess/WebPageProxy.cpp:
            (WebKit::WebPageProxy::findPlugin):
            * UIProcess/WebPageProxy.h:
            * UIProcess/WebPageProxy.messages.in:
            Plumb the unavailability description through to the WebProcess via
            the FindPlugin message.

            * WebProcess/WebPage/WebPage.cpp:
            (WebKit::WebPage::createPlugin):
            Acquire the unavailability description from the client
            (via FindPlugin) and hand it to the RenderEmbeddedObject.

2013-07-22  Lucas Forschler  <lforschler@apple.com>

        Rollout r152701

2013-07-19  Lucas Forschler  <lforschler@apple.com>

        Merge r152877

    2013-07-18  Simon Cooper  <scooper@apple.com>

            Flash Player: deny file-read-data /Library/Application Support/Macromedia/FlashAuthor.cfg
            https://bugs.webkit.org/show_bug.cgi?id=118874
            <rdar://problem/14271327>

            Reviewed by Alexey Proskuryakov.

            Silently deny access to FlashAuthor.cfg. This location contains
            files containing lists of paths that Flash Player will
            "allow" access to (without asking the user). Since the plugin
            sandbox won't permit the access to the listed paths it is better
            to silently block attempts to read this "whitelist".

            * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb:

2013-07-18  Lucas Forschler  <lforschler@apple.com>

        Merge r152805

    2013-07-17  Alexey Proskuryakov  <ap@apple.com>

            [Mac] Crashes in CFURLGetBytes under WebProcess::updateActivePages()
            https://bugs.webkit.org/show_bug.cgi?id=118814
            <rdar://problem/14173389>

            Reviewed by Brady Eidson.

            Speculative fix. It's unclear how we end up with an invalid URL when committing
            a load.

            * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::updateActivePages):
            Added a null check.

2013-07-17  Lucas Forschler  <lforschler@apple.com>

        Merge r152740

    2013-07-16  Alexey Proskuryakov  <ap@apple.com>

            REGRESSION (r150291): Chinese predictive input pop-up disappears on twitter.com
            https://bugs.webkit.org/show_bug.cgi?id=118739
            <rdar://problem/14300350>

            Reviewed by Daniel Bates.

            EditorState tracking on UI side is very fragile. This is a targeted fix just for
            this specific scenario.

            The issue was that we had a stale m_temporarilyClosedComposition flag, which was
            making UI process believe that a composition was closed from WebProcess side,
            and notify input method about that. It shouldn't have been a problem, because there
            is no composition at this point indeed, but this extra call is a problem for
            predictive input, which works in a somewhat unconventional way (<rdar://problem/14458297>).

            * UIProcess/mac/WebPageProxyMac.mm:
            (WebKit::WebPageProxy::insertText): Reset m_temporarilyClosedComposition flag when
            getting new EditorState in response to performing this action. There is certainly
            no composition after insertText, and all interested parties are on the same page
            already.

2013-07-16  Lucas Forschler  <lforschler@apple.com>

        Merge r152701

    2013-07-15  Tim Horton  <timothy_horton@apple.com>

            Update blocked/missing plug-in UI
            https://bugs.webkit.org/show_bug.cgi?id=118347
            <rdar://problem/14209318>

            Reviewed by Sam Weinig.
            Patch by Antoine Quint, Anders Carlsson, Sam Weinig, and myself.

            * Platform/CoreIPC/HandleMessage.h:
            (CoreIPC::callMemberFunction):
            Add a 6 argument -> 4 reply message handler.
            (It seems that FindPlugin is getting a little out of hand.)

            * Shared/APIClientTraits.cpp:
            * Shared/APIClientTraits.h:
            * UIProcess/API/C/WKPage.h:
            * UIProcess/WebLoaderClient.cpp:
            (WebKit::WebLoaderClient::pluginLoadPolicy):
            * UIProcess/WebLoaderClient.h:
            Add an unavailability description out-argument to a new version of
            pluginLoadPolicy, so clients can override the text of the unavailable
            plugin indicator. Bump the WKPageLoaderClient version and update APIClientTraits.

            * UIProcess/WebPageProxy.cpp:
            (WebKit::WebPageProxy::findPlugin):
            * UIProcess/WebPageProxy.h:
            * UIProcess/WebPageProxy.messages.in:
            Plumb the unavailability description through to the WebProcess via
            the FindPlugin message.

            * WebProcess/Plugins/PluginProcessConnection.cpp:
            (WebKit::PluginProcessConnection::didClose):
            Make a strongly referencing copy of the list of PluginProxies, so we can
            throw them away without the HashMap being mutated underneath us (see the comment).

            * WebProcess/Plugins/PluginView.cpp:
            (WebKit::PluginView::pluginProcessCrashed):
            Invalidate the plug-in's widget before setting the plugin unavailability reason,
            because doing so would cause the plug-in's renderer to be torn down, making
            invalidate() crash.

            * WebProcess/WebCoreSupport/WebChromeClient.cpp:
            (WebKit::WebChromeClient::shouldUnavailablePluginMessageIncludeButton):
            * WebProcess/WebCoreSupport/WebChromeClient.h:
            Rename from shouldUnavailablePluginMessageBeButton to
            shouldUnavailablePluginMessageIncludeButton for accuracy.

            * WebProcess/WebPage/WebPage.cpp:
            (WebKit::WebPage::createPlugin):
            Acquire the unavailability description from the client
            (via FindPlugin) and hand it to the RenderEmbeddedObject.
            (WebKit::WebPage::canPluginHandleResponse):
            Re-acquire the plugin's renderer, in case setPluginUnavailabilityReason destroyed it.

2013-07-16  Lucas Forschler  <lforschler@apple.com>

        Merge r152698

    2013-07-15  Simon Cooper  <scooper@apple.com>

            PluginProcess deny file-read-data /Library/Application Support/Macromedia/FlashPlayerTrust
            https://bugs.webkit.org/show_bug.cgi?id=118690
            <rdar://problem/14255963>

            Reviewed by Dean Jackson.

            Silently deny access to FlashPlayerTrust. This location contains
            files containing lists of paths that Flash Player will
            "allow" access to (without asking the user). Since the plugin
            sandbox won't permit the access to the listed paths it is better
            to silently block attempts to read these "whitelists". The
            "whitelists" are created by other Adobe "installer" like
            applications.

            * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb:

2013-07-15  Lucas Forschler  <lforschler@apple.com>

        Rollout r152686.  Previously merged.

2013-07-15  Lucas Forschler  <lforschler@apple.com>

        Merge r152382

    2013-07-03  Gordon Sheridan  <gordon_sheridan@apple.com>

            Implement mechanism to detect (partially) hidden blocked plugins.
            https://bugs.webkit.org/show_bug.cgi?id=117998

            Reviewed by Dean Jackson.

            * Shared/Plugins/Netscape/PluginInformation.h:
            * Shared/Plugins/Netscape/PluginInformation.cpp:
            (WebKit::plugInInformationReplacementObscuredKey):
            Add key for plugInInformation dictionaries.

            (WebKit::createPluginInformationDictionary):
            Add boolean parameter identifying whether the replacement for a blocked plugin is obscured, and add it to the dictionary.

            * Shared/API/c/WKPluginInformation.h:
            * Shared/API/c/WKPluginInformation.cpp:
            (WKPluginInformationReplacementObscuredKey):
            Provide the C API for the plugInInformationReplacementObscuredKey().

            * UIProcess/WebPageProxy.h:
            * UIProcess/WebPageProxy.cpp:
            (WebKit::WebPageProxy::didBlockInsecurePluginVersion):
            Add bool replacementObscured parameter to pass on argument to createPluginInformationDictionary().

            * UIProcess/WebPageProxy.messages.in:
            Add bool replacementObscured parameter to DidBlockInsecurePluginVersion() message.

            * WebProcess/WebPage/WebPage.cpp:
            (WebKit::WebPage::createPlugin):
            Invoke isReplacementObscured() method for blocked plugins.

2013-07-15  Lucas Forschler  <lforschler@apple.com>

        Merge r152642

    2013-07-14  Jon Lee  <jonlee@apple.com>

            Calling Notification.requestPermission() without a callback crashes
            https://bugs.webkit.org/show_bug.cgi?id=118654
            <rdar://problem/14293352>

            Reviewed by Alexey Proskuryakov.

            When requestPermission() is called, we short-circuit if we know the permission was already set.
            The callback handler gets invoked. But now that callbacks are optional, we need to check to make
            sure a callback was provided.

            * WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
            (WebKit::NotificationPermissionRequestManager::startRequest): Check for the callback.

2013-07-15  Lucas Forschler  <lforschler@apple.com>

        Merge r152580

    2013-07-10  Roger Fong  <roger_fong@apple.com>

            Plugins that don't support snapshotting should not all autostart.
            https://bugs.webkit.org/show_bug.cgi?id=118572
            <rdar://problem/14324391>.

            Reviewed by Dean Jackson.

            * WebProcess/Plugins/PluginView.cpp:
            (WebKit::PluginView::shouldNotAddLayer): This method determines whether or not we should add the plugin's layer to the tree.
            It should not be added if the plugin is in it's snapshotted state but does not actually support snapshotting.
            (WebKit::PluginView::pluginSnapshotTimerFired): If the plugin does not support snapshotting go straight 
            to the the DisplayingSnapshot state.
            * WebProcess/Plugins/PluginView.h:

2013-07-15  Lucas Forschler  <lforschler@apple.com>

        Merge r152520

    2013-07-09  Jer Noble  <jer.noble@apple.com>

            Reviewed by Simon Fraser.

            Remember the scroll position and restore after exiting full-screen mode.
            https://bugs.webkit.org/show_bug.cgi?id=61956
            <rdar://problem/9544461>

            Call into the main FrameView to save the scroll position before swapping the
            WebView into the full-screen window, and restore the scroll position after 
            swapping the WebView back into the browser window.

            * UIProcess/mac/WKFullScreenWindowController.mm:
            (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
            (-[WKFullScreenWindowController beganExitFullScreenAnimation]):

            In WebKit2, this requires some communication between the WebProcess and the
            UIProcess, so add two new messages to WebFullScreenManager to be called by
            its proxy.

            * UIProcess/WebFullScreenManagerProxy.h:
            * UIProcess/WebFullScreenManagerProxy.cpp:
            (WebKit::WebFullScreenManagerProxy::saveScrollPosition):
            (WebKit::WebFullScreenManagerProxy::restoreScrollPosition):
            * WebProcess/FullScreen/WebFullScreenManager.h:
            * WebProcess/FullScreen/WebFullScreenManager.messages.in:
            * WebProcess/FullScreen/WebFullScreenManager.cpp:
            (WebKit::WebFullScreenManager::saveScrollPosition):
            (WebKit::WebFullScreenManager::restoreScrollPosition):

2013-07-15  Lucas Forschler  <lforschler@apple.com>

        Merge r152316

    2013-07-02  Ada Chan  <adachan@apple.com>

            Fix crash when PageBanner::detachFromPage() is called from WebPage::~WebPage().
            https://bugs.webkit.org/show_bug.cgi?id=118268

            Reviewed by Beth Dakin.

            * WebProcess/WebPage/mac/PageBannerMac.mm:
            (WebKit::PageBanner::detachFromPage): Add some null checks. m_webPage->corePage()
            can be null if this method is called after the web page is closed.

2013-07-15  Lucas Forschler  <lforschler@apple.com>

        Merge r152249

    2013-07-01  Ada Chan  <adachan@apple.com>

            Properly hide the header and footer banners if they are set to null.
            https://bugs.webkit.org/show_bug.cgi?id=118219

            Reviewed by Beth Dakin.

            Call Page::addFooterWithHeight(0) to remove the parent layer that hosts the banner when
            the footer banner is detached. Similarly for the header banner.

            * WebProcess/WebPage/mac/PageBannerMac.mm:
            (WebKit::PageBanner::detachFromPage):

2013-07-12  Lucas Forschler  <lforschler@apple.com>

        Merge r152571

    2013-07-11  Timothy Hatcher  <timothy@apple.com>

            Revert r152267 and soft link WebInspectorUI.framework again.

            https://bugs.webkit.org/show_bug.cgi?id=118544

            Reviewed by David Kilzer.

            * Configurations/WebKit2.xcconfig:
            * UIProcess/mac/WebInspectorProxyMac.mm:
            (WebKit::inspectorReallyUsesWebKitUserInterface):
            * WebKit2.xcodeproj/project.pbxproj:
            * WebProcess/WebPage/mac/WebInspectorMac.mm:
            (WebKit::inspectorReallyUsesWebKitUserInterface):

2013-07-10  Lucas Forschler  <lforschler@apple.com>

        Merge r152555

    2013-07-10  Mark Rowe  <mrowe@apple.com>

            <rdar://problem/14395759> PluginProcess sometimes logs an error about being unable to load WebKit2.framework.

            Reviewed by Alexey Proskuryakov.

            * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
            (WebKit::PluginProcessProxy::createPropertyListFile): Ensure that any environment variables
            specified in dynamic linker load commands are passed to the subprocess that we spawn to create
            the MIME type property list.

2013-07-10  Lucas Forschler  <lforschler@apple.com>

        Merge r152539

    2013-07-10  Brady Eidson  <beidson@apple.com>

            Some Java plugin instances can deadlock with the WebProcess on NPP_Destroy.
            <rdar://problem/14286390> and https://bugs.webkit.org/show_bug.cgi?id=118535

            Reviewed by Alexey Proskuryakov.

            * Shared/Plugins/NPObjectProxy.cpp:
            (WebKit::NPObjectProxy::~NPObjectProxy): ASSERT this is the main thread.
            (WebKit::NPObjectProxy::NP_Deallocate): If this isn't the main thread, call it again on the main thread.

2013-07-09  Lucas Forschler  <lforschler@apple.com>

        Merge r152425

    2013-07-05  Tim Horton  <timothy_horton@apple.com>

            [wk2] Add API to lock the scroll position at the top or bottom of the page
            https://bugs.webkit.org/show_bug.cgi?id=118429
            <rdar://problem/14120323>

            Reviewed by Anders Carlsson.

            * Shared/WebPageCreationParameters.cpp:
            (WebKit::WebPageCreationParameters::encode):
            (WebKit::WebPageCreationParameters::decode):
            * Shared/WebPageCreationParameters.h:
            Pass the current ScrollPinningBehavior across to the WebPage upon creation.

            * UIProcess/API/C/WKPage.cpp:
            (WKPageGetScrollPinningBehavior):
            (WKPageSetScrollPinningBehavior):
            * UIProcess/API/C/WKPagePrivate.h:
            SPI to get/set the WebPageProxy's current ScrollPinningBehavior.
            Convert between WK API type and WebCore enum.

            * UIProcess/WebPageProxy.cpp:
            (WebKit::WebPageProxy::WebPageProxy):
            (WebKit::WebPageProxy::creationParameters):
            Send ScrollPinningBehavior when creating a WebPage.

            (WebKit::WebPageProxy::setScrollPinningBehavior):
            Pass ScrollPinningBehavior changes across to the WebProcess (and save it
            in WebPageProxy so it can be sent back across if the WebProcess crashes).

            * UIProcess/WebPageProxy.h:
            (WebKit::WebPageProxy::scrollPinningBehavior):
            Getter/setter and storage for m_scrollPinningBehavior.

            * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
            (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
            Inform new FrameViews of the current ScrollPinningBehavior.

            * WebProcess/WebPage/WebPage.cpp:
            (WebKit::WebPage::WebPage):
            Set our ScrollPinningBehavior based on our creation parameters.

            (WebKit::WebPage::setScrollPinningBehavior):
            Inform the FrameView of ScrollPinningBehavior changes.

            * WebProcess/WebPage/WebPage.h:
            (WebKit::WebPage::scrollPinningBehavior): Added.
            (WebKit::WebPage::setScrollPinningBehavior): Added.
            Add storage for m_scrollPinningBehavior.

            * WebProcess/WebPage/WebPage.messages.in:
            Add SetScrollPinningBehavior message.

2013-07-09  Lucas Forschler  <lforschler@apple.com>

        Merge r152407

    2013-07-04  Anders Carlsson  <andersca@apple.com>

            Paint the page background if we haven't received our first update
            https://bugs.webkit.org/show_bug.cgi?id=118402
            <rdar://problem/13893308>

            Reviewed by Simon Fraser.

            Make sure that we always paint something when we haven't received our first update from the web process.

            * UIProcess/API/mac/WKView.mm:
            (-[WKView drawRect:]):
            * UIProcess/DrawingAreaProxyImpl.h:
            (WebKit::DrawingAreaProxyImpl::hasReceivedFirstUpdate):

2013-07-09  Lucas Forschler  <lforschler@apple.com>

        Merge r152403

    2013-07-04  Anders Carlsson  <andersca@apple.com>

            Crash when createPluginInternal ends up destroying the plug-in
            https://bugs.webkit.org/show_bug.cgi?id=118397
            <rdar://problem/14155051>

            Reviewed by Simon Fraser.

            Keep the WebProcessConnection object alive while calling createPluginInternal and handle
            the IPC connection going away.

            * PluginProcess/WebProcessConnection.cpp:
            (WebKit::WebProcessConnection::createPluginAsynchronously):

2013-07-09  Lucas Forschler  <lforschler@apple.com>

        Merge r152382

    2013-07-03  Gordon Sheridan  <gordon_sheridan@apple.com>

            Implement mechanism to detect (partially) hidden blocked plugins.
            https://bugs.webkit.org/show_bug.cgi?id=117998

            Reviewed by Dean Jackson.

            * Shared/Plugins/Netscape/PluginInformation.h:
            * Shared/Plugins/Netscape/PluginInformation.cpp:
            (WebKit::plugInInformationReplacementObscuredKey):
            Add key for plugInInformation dictionaries.

            (WebKit::createPluginInformationDictionary):
            Add boolean parameter identifying whether the replacement for a blocked plugin is obscured, and add it to the dictionary.

            * Shared/API/c/WKPluginInformation.h:
            * Shared/API/c/WKPluginInformation.cpp:
            (WKPluginInformationReplacementObscuredKey):
            Provide the C API for the plugInInformationReplacementObscuredKey().

            * UIProcess/WebPageProxy.h:
            * UIProcess/WebPageProxy.cpp:
            (WebKit::WebPageProxy::didBlockInsecurePluginVersion):
            Add bool replacementObscured parameter to pass on argument to createPluginInformationDictionary().

            * UIProcess/WebPageProxy.messages.in:
            Add bool replacementObscured parameter to DidBlockInsecurePluginVersion() message.

            * WebProcess/WebPage/WebPage.cpp:
            (WebKit::WebPage::createPlugin):
            Invoke isReplacementObscured() method for blocked plugins.

2013-07-08  Lucas Forschler  <lforschler@apple.com>

        Merge r152267

    2013-07-01  Timothy Hatcher  <timothy@apple.com>

            Link to WebInspectorUI.framework at build time instead of soft linking.

            https://bugs.webkit.org/show_bug.cgi?id=118261

            Reviewed by Joseph Pecoraro.

            * Configurations/WebKit2.xcconfig:
            * UIProcess/mac/WebInspectorProxyMac.mm:
            (WebKit::inspectorReallyUsesWebKitUserInterface):
            * WebKit2.xcodeproj/project.pbxproj:
            * WebProcess/WebPage/mac/WebInspectorMac.mm:
            (WebKit::inspectorReallyUsesWebKitUserInterface):

2013-07-03  Lucas Forschler  <lforschler@apple.com>

        Merge r152375

    2013-07-03  Alexey Proskuryakov  <ap@apple.com>

            <rdar://problem/14271105> Flash Player: deny ipc-posix-sem 59918130
            <rdar://problem/14349560> Flash Player: deny ipc-posix-sem MacromediaSemaphoreDig on many sites

            Reviewed by Sam Weinig.

            * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb:
            semaphore-owner doesn't appear to work the way we need it to, removing it (at least for now).

2013-07-03  Lucas Forschler  <lforschler@apple.com>

        Merge r152317

    2013-07-02  Alexey Proskuryakov  <ap@apple.com>

            security/block-test.html fails when NetworkProcess is enabled
            https://bugs.webkit.org/show_bug.cgi?id=118320
            <rdar://problem/14309423>

            Reviewed by Geoff Garen.

            * NetworkProcess/NetworkResourceLoader.cpp:
            (WebKit::NetworkResourceLoader::wasBlocked):
            (WebKit::NetworkResourceLoader::cannotShowURL):
            Implemented missing ResourceHandleClient functions.

2013-07-02  Lucas Forschler  <lforschler@apple.com>

        Merge r152328

    2013-07-02  Jessie Berlin  <jberlin@apple.com>

            The callback for WKPageGetPlugInInformation needs info about whether or not there are any
            non-playing instances of the plug-in on the page
            https://bugs.webkit.org/show_bug.cgi?id=118330

            Reviewed by Anders Carlsson.

            Add another key value pair to the dictionary passed to the callback.

            * Shared/API/c/WKPluginInformation.cpp:
            (WKPlugInInformationPageContainsNonPlayingInstanceOfPlugInKey):
            * Shared/API/c/WKPluginInformation.h:

            * Shared/Plugins/Netscape/PluginInformation.cpp:
            (WebKit::plugInInformationPageContainsNonPlayingInstanceOfPlugInKey):
            (WebKit::createPlugInInformationDictionary):
            Add the information about whether or not the page contains a non-playing instance of that
            plug-in to the plug-in information dictionary.
            * Shared/Plugins/Netscape/PluginInformation.h:

            * UIProcess/WebPageProxy.h:
            * UIProcess/WebPageProxy.messages.in:
            * UIProcess/mac/WebPageProxyMac.mm:
            (WebKit::WebPageProxy::containsPlugInCallback):
            Check if any of the MIME types of the plug-in instances that are present on the page but are
            not playing match the instance of plug-in being searched for.
            * WebProcess/WebPage/mac/WebPageMac.mm:
            (WebKit::addPlugInMimeTypesFromNodeListForNonPlayingPlugIns):
            Based roughly off of addPlugInsFromNodeListMatchingPlugInOrigin in
            HTMLPlugInImageElement.cpp.
            (WebKit::WebPage::containsPluginViewsWithPluginProcessToken):
            Based roughly off of HTMLPlugInImageElement::restartSimilarPlugIns.

2013-07-01  Lucas Forschler  <lforschler@apple.com>

        Merge r152273

    2013-07-01  Alexey Proskuryakov  <ap@apple.com>

            Clean up private browsing session tracking
            https://bugs.webkit.org/show_bug.cgi?id=118266
            <rdar://problem/13078036>

            Reviewed by Brady Eidson.

            Instead of counting API calls, we now watch actual WebPreferences objects.

            * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetPrivateBrowsingEnabled):
            Removed code that used to notify WebContext. It's now done by WebPreferences.

            * UIProcess/WebContext.h:
            * UIProcess/WebContext.cpp:
            (WebKit::WebContext::ensureNetworkProcess): Instead of counting the number of times
            API was called, rely on WebPreferences tracking.
            (WebKit::WebContext::willStartUsingPrivateBrowsing): Ditto. This function is
            now only called when we detect a change in private browsing state.
            (WebKit::WebContext::willStopUsingPrivateBrowsing): Ditto.
            (WebKit::WebContext::createNewWebProcess): Tell the new process to create a private
            browsing session if needed.

            * UIProcess/WebPreferences.h:
            * UIProcess/WebPreferences.cpp:
            (WebKit::WebPreferences::addPageGroup): Count how many page groups use private
            browsing, and notify WebContext when a session is needed. Note that we don't notify
            WebContext about WebPreferences without any page groups, because it's likely
            that preferences will be updated by the client before groups are associated.
            (WebKit::WebPreferences::removePageGroup): Ditto.
            (WebKit::WebPreferences::updateBoolValueForKey): Perform special handling for
            private browsing mode changes.
            (WebKit::WebPreferences::updatePrivateBrowsingValue): Notify WebContext when
            it's time to create or destroy a private browsing session.
            (WebKit::WebPreferences::anyPageGroupsAreUsingPrivateBrowsing): A getter for
            WebContext to know when any page groups are in private browsing mode.

            * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences):
            Don't create a private browsing session implicitly, UI process takes care of it.

2013-07-01  Lucas Forschler  <lforschler@apple.com>

        Merge r152266

    2013-07-01  Tim Horton  <timothy_horton@apple.com>

            [wk2] TiledCoreAnimationDrawingArea should support scrolling its exposed rect
            https://bugs.webkit.org/show_bug.cgi?id=118173
            <rdar://problem/14301166>

            Reviewed by Anders Carlsson.

            Offset the exposed rect passed from the WKView by the main frame's current scroll position
            before sending it to our TiledBackings, so that it is in the same coordinate space as their
            ordinary visibleRects.

            This has the side effect of making clips-to-exposed-rect testable (though useless) in Safari.

            * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
            Add updateScrolledExposedRect() and m_scrolledExposedRect.

            * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
            (WebKit::TiledCoreAnimationDrawingArea::scroll):
            Call updateScrolledExposedRect when the main frame scrolls.

            (WebKit::TiledCoreAnimationDrawingArea::setExposedRect):
            Remove a FIXME about this change.
            Call updateScrolledExposedRect instead of passing down the unscrolled rect.

            (WebKit::TiledCoreAnimationDrawingArea::setClipsToExposedRect):
            Call updateScrolledExposedRect, because that method will short-circuit if
            setClipsToExposedRect is false, so we need to update here for correctness
            if we get a setExposedRect(), setClipsToExposedRect(true) pair.

            (WebKit::TiledCoreAnimationDrawingArea::updateScrolledExposedRect):
            Update m_scrolledExposedRect and propagate it to our TiledBackings.

            (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
            (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
            (WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer):
            (WebKit::TiledCoreAnimationDrawingArea::didCommitChangesForLayer):
            Use the scrolled exposed rect.

2013-07-01  Lucas Forschler  <lforschler@apple.com>

        Merge r152077

    2013-06-26  Simon Cooper  <scooper@apple.com>

            Sometimes the Flash Player plugin cannot make outgoing connections
            https://bugs.webkit.org/show_bug.cgi?id=118110
            <rdar://problem/14270933>

            Reviewed by Alexey Proskuryakov.

            Allow outgoing and incoming UDP data. Tidy up the QuickTime
            profile as it gets the UDP ability from the common profile.

            * Resources/PlugInSandboxProfiles/com.apple.QuickTime Plugin.plugin.sb:
            * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:

2013-07-01  Lucas Forschler  <lforschler@apple.com>

        Merge r152230

    2013-07-01  Sam Weinig  <sam@webkit.org>

            WKPageLoadDataWithUserData neglects to set the base URL that is passed in
            <rdar://problem/14306784>
            https://bugs.webkit.org/show_bug.cgi?id=118256

            Reviewed by Anders Carlsson.

            * WebProcess/WebPage/WebPage.cpp:
            (WebKit::WebPage::loadData):
            Pass the baseURL, not blankURL(), and remove an unnecessary multiplication by sizeof(uint8_t) which is always 1.

2013-07-01  Lucas Forschler  <lforschler@apple.com>

        Merge r152187

    2013-06-28  Gavin Barraclough  <barraclough@apple.com>

            Stale occlusion state after moving page back into window
            https://bugs.webkit.org/show_bug.cgi?id=118202

            Reviewed by Anders Carlsson.

            We need to update the occlusion state when the page goes back into the window.

            * UIProcess/API/mac/WKView.mm:
            (-[WKView viewDidMoveToWindow]):
                - update occlusion state.

2013-07-01  Lucas Forschler  <lforschler@apple.com>

        Merge r152182

    2013-06-28  Anders Carlsson  <andersca@apple.com>

            Make the UI process run the Java Updater
            https://bugs.webkit.org/show_bug.cgi?id=118197
            <rdar://problem/14255677>

            Reviewed by Sam Weinig.

            Patch the relevant NSWorkspace method and pipe through the request to launch the Java updater to the UI process.

            * PluginProcess/PluginProcess.h:
            * PluginProcess/mac/PluginProcessMac.mm:
            (WebKit::replacedNSWorkspace_launchApplicationAtURL_options_configuration_error):
            (WebKit::initializeCocoaOverrides):
            (WebKit::PluginProcess::launchApplicationAtURL):
            * UIProcess/Plugins/PluginProcessProxy.h:
            * UIProcess/Plugins/PluginProcessProxy.messages.in:
            * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
            (WebKit::isJavaUpdaterURL):
            (WebKit::shouldLaunchApplicationAtURL):
            (WebKit::PluginProcessProxy::launchApplicationAtURL):

2013-07-01  Lucas Forschler  <lforschler@apple.com>

        Merge r152075

    2013-06-26  Simon Cooper  <scooper@apple.com>

            Flash Player: deny ipc-posix-sem 59918130
            https://bugs.webkit.org/show_bug.cgi?id=118107
            <rdar://problem/14271105>

            Reviewed by Alexey Proskuryakov.

            Allow same-sandbox scoped semaphores on Mavericks. Permit the
            named semaphore for older releases.

            * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb:

2013-07-01  Lucas Forschler  <lforschler@apple.com>

        Merge r152073

    2013-06-26  Simon Cooper  <scooper@apple.com>

            Silverlight deny ipc-posix-sem LC_Mutex playing Amazon Prime videos
            https://bugs.webkit.org/show_bug.cgi?id=118102
            <rdar://problem/14194077>

            Reviewed by Alexey Proskuryakov.

            Allow same-sandbox scoped semaphores on Mavericks. Permit the
            named semaphore for older releases.

            * Resources/PlugInSandboxProfiles/com.microsoft.SilverlightPlugin.sb:

2013-07-01  Lucas Forschler  <lforschler@apple.com>

        Merge r152072

    2013-06-26  Simon Cooper  <scooper@apple.com>

            Update ColorSync shared memory names in plug-in sandbox profile
            https://bugs.webkit.org/show_bug.cgi?id=118099

            Reviewed by Alexey Proskuryakov.

            Update the common profile to use the names used in Mavericks

            * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:

2013-07-01  Lucas Forschler  <lforschler@apple.com>

        Merge r152063

    2013-06-26  Simon Cooper  <scooper@apple.com>

            QuickTime plug-in cannot update com.apple.quicktime.plugin.preferences.plist file
            https://bugs.webkit.org/show_bug.cgi?id=118098
            <rdar://problem/13888138>

            Reviewed by Alexey Proskuryakov.

            Allow the preference file to be written

            * Resources/PlugInSandboxProfiles/com.apple.QuickTime Plugin.plugin.sb:

2013-07-01  Lucas Forschler  <lforschler@apple.com>

        Merge r152234

    2013-06-27  Jer Noble  <jer.noble@apple.com>

            Audio in apps which embed WebViews is corrupted.
            https://bugs.webkit.org/show_bug.cgi?id=118163

            Reviewed by Maciej Stachowiak.

            Expose the WebCore lowPowerVideoAudioBufferSizeEnabled setting to WebKit2 clients.

            * Shared/WebPreferencesStore.h:
            * WebProcess/WebPage/WebPage.cpp:
            (WebKit::WebPage::updatePreferences):

2013-07-01  Lucas Forschler  <lforschler@apple.com>

        Merge r152190

    2013-06-28  Tim Horton  <timothy_horton@apple.com>

            [wk2] WKView shouldn't force scrolling off if shouldClipToVisibleRect is set
            https://bugs.webkit.org/show_bug.cgi?id=118174
            <rdar://problem/14301175>

            Reviewed by Anders Carlsson.

            * UIProcess/API/mac/WKView.mm:
            (-[WKView _updateViewExposedRect]):
            Pass whether or not clips-to-visibleRect is enabled down to the WebPageProxy.

            (-[WKView setMinimumSizeForAutoLayout:]):
            Disable scrolling when using autolayout instead of when using clips-to-visibleRect.

            (-[WKView setShouldClipToVisibleRect:]):
            Clipping to the WKView's visibleRect does not strictly require scrolling to be disabled,
            and in fact there are cases (RTL/TB pagination) where we *must* scroll, even when the view
            is big enough to fit the content (the case clip-to-visibleRect was added for).

            * UIProcess/WebPageProxy.cpp:
            (WebKit::WebPageProxy::WebPageProxy):
            * UIProcess/WebPageProxy.h:
            * UIProcess/mac/WebPageProxyMac.mm:
            (WebKit::WebPageProxy::viewExposedRectChanged):
            (WebKit::WebPageProxy::exposedRectChangedTimerFired):
            Keep track of and forward to the drawing area whether or not clips-to-visibleRect is enabled.

            * WebProcess/WebPage/DrawingArea.h:
            (WebKit::DrawingArea::setClipsToExposedRect): Added.
            (WebKit::DrawingArea::didChangeScrollOffsetForAnyFrame): Added a missing space.

            * WebProcess/WebPage/WebPage.cpp:
            (WebKit::WebPage::viewExposedRectChanged):
            * WebProcess/WebPage/WebPage.h:
            * WebProcess/WebPage/WebPage.messages.in:
            Forward clips-to-visibleRect enabled state to the drawing area.

            * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
            Add storage for m_clipsToExposedRect.

            * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
            (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
            (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
            (WebKit::TiledCoreAnimationDrawingArea::setClipsToExposedRect):
            (WebKit::TiledCoreAnimationDrawingArea::updateMainFrameClipsToExposedRect):
            (WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer):
            (WebKit::TiledCoreAnimationDrawingArea::didCommitChangesForLayer):
            Check m_clipsToExposedRect instead of the main-frame's isScrollable() to determine
            whether we should tell our TiledBackings to clip to the exposed rect we provide.

            We don't need to listen to mainFrameScrollabilityChanged anymore.

2013-07-01  Lucas Forschler  <lforschler@apple.com>

        Merge r152177

    2013-06-28  Tim Horton  <timothy_horton@apple.com>

            WARN_UNUSED_RESULT can't be used in API headers, but WKBundlePageExtendIncrementalRenderingSuppression tries to
            https://bugs.webkit.org/show_bug.cgi?id=118196
            <rdar://problem/14303613>

            Reviewed by Anders Carlsson.

            * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:

2013-06-26  Lucas Forschler  <lforschler@apple.com>

        Merge r151952

    2013-06-24  Simon Cooper  <scooper@apple.com>

            Silverlight triggers sandbox violations: deny network-bind 0.0.0.0:0
            https://bugs.webkit.org/show_bug.cgi?id=117966
            <rdar://problem/13927918>

            Reviewed by Sam Weinig.

            Allow assigning (via bind) an ephemeral port before connecting

            * Resources/PlugInSandboxProfiles/com.apple.QuickTime Plugin.plugin.sb:
            * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb:
            * Resources/PlugInSandboxProfiles/com.microsoft.SilverlightPlugin.sb:
            * Resources/PlugInSandboxProfiles/com.oracle.java.JavaAppletPlugin.sb:

2013-06-26  Lucas Forschler  <lforschler@apple.com>

        Merge r151950

    2013-06-24  Simon Cooper  <scooper@apple.com>

            PluginProcess deny file-read-data /Network/Library under addVolumeTracker
            https://bugs.webkit.org/show_bug.cgi?id=117965
            <rdar://problem/14121247>

            Reviewed by Alexey Proskuryakov.

            Silently deny reading /Network/Applications and 
            /Network/Library.

            * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:

2013-06-26  Lucas Forschler  <lforschler@apple.com>

        Merge r151948

    2013-06-24  Simon Cooper  <scooper@apple.com>

            deny file-read-data /Library/CoreMediaIO/Plug-Ins/DAL
            https://bugs.webkit.org/show_bug.cgi?id=117964
            <rdar://problem/14036864>

            Reviewed by Alexey Proskuryakov.

            Permit reading of the /Library/CoreMediaIO/Plug-Ins/DAL
            subdirectory.

            * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:

2013-06-26  Lucas Forschler  <lforschler@apple.com>

        Merge r151944

    2013-06-24  Simon Cooper  <scooper@apple.com>

            Repeating sandbox violations when playing Amazon Prime videos with Flash
            https://bugs.webkit.org/show_bug.cgi?id=117953
            <rdar://problem/14193693>

            Reviewed by Alexey Proskuryakov.

            Add some missing "standard" files for network service lookups

            * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:

2013-06-26  Lucas Forschler  <lforschler@apple.com>

        Merge r151943

    2013-06-24  Simon Cooper  <scooper@apple.com>

            Plug-in sandbox violations attempting to access com.apple.CoreGraphics.plist
            https://bugs.webkit.org/show_bug.cgi?id=117963
            <rdar://problem/14084234>

            Reviewed by Alexey Proskuryakov.

            Permit the reading of the com.apple.CoreGraphics preference file

            * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:

2013-06-26  Lucas Forschler  <lforschler@apple.com>

        Merge r151941

    2013-06-24  Simon Cooper  <scooper@apple.com>

            com.oracle.javadeployment.plist is not correctly specified in the JavaApplet plugin profile
            https://bugs.webkit.org/show_bug.cgi?id=117961
            <rdar://problem/14223823>

            Reviewed by Alexey Proskuryakov.

            Remove the trailing extraneous .plist from the preference file rule

            * Resources/PlugInSandboxProfiles/com.oracle.java.JavaAppletPlugin.sb:

2013-06-26  Lucas Forschler  <lforschler@apple.com>

        Merge r151940

    2013-06-24  Simon Cooper  <scooper@apple.com>

            PluginProcess sandbox violations on com.apple.networkConnect.plist when resetting Safari
            https://bugs.webkit.org/show_bug.cgi?id=117958
            <rdar://problem/13938149>

            Reviewed by Alexey Proskuryakov.

            Allow reading the com.apple.networkConnect plist.

            * Resources/PlugInSandboxProfiles/com.apple.ist.ds.appleconnect.webplugin.sb:

2013-06-26  Lucas Forschler  <lforschler@apple.com>

        Merge r151939

    2013-06-24  Simon Cooper  <scooper@apple.com>

            Java sandbox violation ipc-posix-shm-read-data /tmp/com.apple.csseed.67
            https://bugs.webkit.org/show_bug.cgi?id=117954
            <rdar://problem/14166577>

            Reviewed by Alexey Proskuryakov.

            Permit read access to this shared memory segment

            * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:

2013-06-26  Lucas Forschler  <lforschler@apple.com>

        Merge r151938

    2013-06-24  Simon Cooper  <scooper@apple.com>

            Plugin Sandbox violation in /Library/Audio/Sounds/Banks
            https://bugs.webkit.org/show_bug.cgi?id=117957
            <rdar://problem/14163582>

            Reviewed by Alexey Proskuryakov.

            Permit read access to subdirectories under /Library/Audio/Sounds

            * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:

2013-06-26  Lucas Forschler  <lforschler@apple.com>

        Merge r151927

    2013-06-24  Anders Carlsson  <andersca@apple.com>

            REGRESSION (r147591): can't type in Adobe Connect
            https://bugs.webkit.org/show_bug.cgi?id=117947
            <rdar://problem/14223539>

            Reviewed by Andreas Kling.

            With the change in r147591, it is now possible for a plug-in element to be focused before the plug-in
            starts. Handle this by focusing the plug-in right after it's started if necessary.

            * WebProcess/Plugins/PluginView.cpp:
            (WebKit::PluginView::didInitializePlugin):

2013-06-26  Lucas Forschler  <lforschler@apple.com>

        Merge r151877

    2013-06-22  Simon Fraser  <simon.fraser@apple.com>

            screen.availWidth always returns width of primary display
            https://bugs.webkit.org/show_bug.cgi?id=117863

            Reviewed by Geoffrey Garen.

            In WebKit2, Widgets have no platformWidget, so trying to get to the
            NSScreen via the platform widget's window never succeeded, and we always
            fell back on getting info for the main display.

            However, we were already pushing the WKView's displayID down to the
            WebProcess for the requestAnimationFrame infrastructure, so use that.

            The WebProcess would not receive a displayID for a WKView until the window
            was activated; fix by calling -doWindowDidChangeScreen when the view
            moves to a window, rather than doing it from -_windowDidBecomeKey:.

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

2013-06-26  Lucas Forschler  <lforschler@apple.com>

        Merge r151881

    2013-06-22  Dean Jackson  <dino@apple.com>

            Slightly reduce width threshold on detection of primary snapshotted Plug-In
            https://bugs.webkit.org/show_bug.cgi?id=117914
            <rdar://problem/14136687>

            Reviewed by Simon Fraser.

            We've noticed some content that should be detected as the primary snapshotted plug-in,
            but is just a bit smaller than our 450x300 minimum threshold. Reduce the width to 400.

            * WebProcess/WebPage/WebPage.cpp: Change primarySnapshottedPlugInMinimumWidth from 450 to 400.

2013-06-26  Lucas Forschler  <lforschler@apple.com>

        Merge r151832

    2013-06-21  Christophe Dumez  <ch.dumez@sisa.samsung.com>

            REGRESSION (r150663): Using webkitAudioContext in Inspector makes it undefined everywhere
            https://bugs.webkit.org/show_bug.cgi?id=117825

            Reviewed by Kentaro Hara.

            Use Settings to enable Web Audio instead of RuntimeEnabledFeatures.

            * WebProcess/InjectedBundle/InjectedBundle.cpp:
            (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
            * WebProcess/WebPage/WebPage.cpp:
            (WebKit::WebPage::updatePreferences):

2013-06-26  Lucas Forschler  <lforschler@apple.com>

        Merge r151795

    2013-06-20  Brady Eidson  <beidson@apple.com>

            WebProcess hangs loading eff.org (Waiting forever on a sync XHR, NetworkProcess unable to service it).
            <rdar://problem/14112329> and https://bugs.webkit.org/show_bug.cgi?id=117842

            Reviewed by Alexey Proskuryakov.

            * NetworkProcess/HostRecord.cpp:
            (WebKit::removeLoaderFromQueue): Utility to clear a Loader out of a LoaderQueue.
            (WebKit::HostRecord::removeLoader): Use removeLoaderFromQueue, and also try to clear the loader from m_syncLoadersPending.
            (WebKit::HostRecord::servePendingRequestsForQueue): Small refactoring/cleanup.
            (WebKit::HostRecord::limitsRequests): Change so that if the number of loaders in flight is exactly equal to the limit, then
              allow serving a synchronous loader to go exactly one beyond the limit.
            * NetworkProcess/HostRecord.h:

            Make the static maxRequestsInFlightPerHost a member of the NetworkResourceLoadScheduler, instead:
            * NetworkProcess/NetworkResourceLoadScheduler.cpp:
            (WebKit::NetworkResourceLoadScheduler::NetworkResourceLoadScheduler):
            (WebKit::NetworkResourceLoadScheduler::hostForURL):
            * NetworkProcess/NetworkResourceLoadScheduler.h:

            * NetworkProcess/mac/NetworkResourceLoadSchedulerMac.mm:
            (WebKit::NetworkResourceLoadScheduler::platformInitializeMaximumHTTPConnectionCountPerHost): Tell CFNetwork to allow
              7 connections per host instead of 6, but tell the scheduler that 6 is still the normal limit.

2013-06-26  Lucas Forschler  <lforschler@apple.com>

        Merge r151767

    2013-06-19  Sam Weinig  <sam@webkit.org>

            Expose plug-ins CFBundleShortVersionString in the WKPluginInformation dictionary
            https://bugs.webkit.org/show_bug.cgi?id=117816

            Reviewed by Geoffrey Garen.

            - Adds a new key for the WKPluginInformation dictionary: WKPluginInformationBundleShortVersionKey().

            * Shared/API/c/WKPluginInformation.cpp:
            (WKPluginInformationBundleShortVersionKey):
            * Shared/API/c/WKPluginInformation.h:
            * Shared/Plugins/Netscape/PluginInformation.cpp:
            (WebKit::pluginInformationBundleShortVersionKey):
            * Shared/Plugins/Netscape/PluginInformation.h:
            * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
            (WebKit::NetscapePluginModule::getPluginInfo):
            * Shared/Plugins/Netscape/mac/PluginInformationMac.mm:
            (WebKit::getPlatformPluginModuleInformation):
            * Shared/Plugins/PluginModuleInfo.h:

2013-06-26  Lucas Forschler  <lforschler@apple.com>

        Merge r151748

    2013-06-19  Anders Carlsson  <andersca@apple.com>

            REGRESSION: Cannot open Silverlight preferences via context menu
            https://bugs.webkit.org/show_bug.cgi?id=117806
            <rdar://problem/14166644>

            Reviewed by Beth Dakin.

            Hook the LSOpenCFURLRef function and make the UI process open the URL if it's the URL for the
            Silverlight Preferences application. This is what we do for the Flash updater.

            * PluginProcess/PluginProcess.h:
            * PluginProcess/mac/PluginProcessMac.mm:
            (WebKit::openCFURLRef):
            (WebKit::initializeShim):
            (WebKit::PluginProcess::openURL):
            * PluginProcess/mac/PluginProcessShim.h:
            * PluginProcess/mac/PluginProcessShim.mm:
            (WebKit::shimLSOpenCFURLRef):
            * UIProcess/Plugins/PluginProcessProxy.h:
            * UIProcess/Plugins/PluginProcessProxy.messages.in:
            * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
            (WebKit::isSilverlightPreferencesURL):
            (WebKit::shouldOpenURL):
            (WebKit::PluginProcessProxy::openURL):

2013-06-25  Lucas Forschler  <lforschler@apple.com>

        Merge r151929

    2013-06-24  Ruth Fong  <ruth_fong@apple.com>

            Expose the mediaHasAudio() function in WK2
            https://bugs.webkit.org/show_bug.cgi?id=117946
            <rdar://problem/14250527>

            Reviewed by Beth Dakin.

            Exposes the WebCore::HTMLMediaElement::mediaHasAudio() function
            in WK2.

            * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp:
            (WKBundleHitTestResultMediaHasAudio): Added.
            * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h:
            * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
            (WebKit::InjectedBundleHitTestResult::mediaHasAudio): Added.
            * WebProcess/InjectedBundle/InjectedBundleHitTestResult.h:

2013-06-25  Lucas Forschler  <lforschler@apple.com>

        Merge r151760

    2013-06-19  Ruth Fong  <ruth_fong@apple.com>

            <rdar://problem/14197983> Rename functions from Bug 117667 and add safeguards for !ENABLE(VIDEO) platforms (117765)
            https://bugs.webkit.org/show_bug.cgi?id=117765

            Patch by Ruth Fong <ruth_fong@apple.com>.
            Reviewed by Brady Eidson.

            * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp:
            (WKBundleHitTestResultGetMediaType): Updated to use mediaType().

            * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
            (WebKit::InjectedBundleHitTestResult::mediaType): Updated.
            Renamed getMediaType() to mediaType() and now handles !ENABLE(VIDEO) platforms.

            * WebProcess/InjectedBundle/InjectedBundleHitTestResult.h:

2013-06-18  Roger Fong  <roger_fong@apple.com>

        Disable some feature flags.
        <rdar://problem/14171207>.

        Rubberstamped by Jon Lee.

        * Configurations/FeatureDefines.xcconfig:

2013-06-18  Roger Fong  <roger_fong@apple.com>

        Unreviewed. Fix a typo that may be causing some test failures.

        * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
        (WebKit::WebFrameNetworkingContext::scheduledRunLoopPairs):

2013-06-18  Anders Carlsson  <andersca@apple.com>

        Make it possible to set a minimum height for auto-layout
        https://bugs.webkit.org/show_bug.cgi?id=117758
        <rdar://problem/12849080>

        Reviewed by Tim Horton.

        Change a bunch of minimumLayoutWidth declarations to minimumLayoutSize and add a new minimumLayoutSize property.
        If minimumLayoutSize.height is greater than zero, use it to set the minimum layout size on the frame view.

        * Shared/WebPageCreationParameters.cpp:
        (WebKit::WebPageCreationParameters::encode):
        (WebKit::WebPageCreationParameters::decode):
        * Shared/WebPageCreationParameters.h:
        * UIProcess/API/mac/WKView.mm:
        (-[WKView _setIntrinsicContentSize:]):
        (-[WKView minimumLayoutWidth]):
        (-[WKView setMinimumLayoutWidth:]):
        (-[WKView minimumWidthForAutoLayout]):
        (-[WKView setMinimumWidthForAutoLayout:]):
        (-[WKView minimumSizeForAutoLayout]):
        (-[WKView setMinimumSizeForAutoLayout:]):
        * UIProcess/API/mac/WKViewPrivate.h:
        * UIProcess/DrawingAreaProxy.h:
        (WebKit::DrawingAreaProxy::minimumLayoutSizeDidChange):
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::WebPageProxy):
        (WebKit::WebPageProxy::creationParameters):
        (WebKit::WebPageProxy::setMinimumLayoutSize):
        * UIProcess/WebPageProxy.h:
        (WebKit::WebPageProxy::minimumLayoutSize):
        * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
        * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
        (WebKit::TiledCoreAnimationDrawingAreaProxy::TiledCoreAnimationDrawingAreaProxy):
        (WebKit::TiledCoreAnimationDrawingAreaProxy::minimumLayoutSizeDidChange):
        (WebKit::TiledCoreAnimationDrawingAreaProxy::didUpdateGeometry):
        (WebKit::TiledCoreAnimationDrawingAreaProxy::intrinsicContentSizeDidChange):
        (WebKit::TiledCoreAnimationDrawingAreaProxy::sendUpdateGeometry):
        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::WebPage):
        (WebKit::WebPage::setMinimumLayoutSize):
        * WebProcess/WebPage/WebPage.h:
        (WebKit::WebPage::minimumLayoutSize):
        * WebProcess/WebPage/WebPage.messages.in:
        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
        (WebKit::TiledCoreAnimationDrawingArea::mainFrameContentSizeChanged):
        (WebKit::TiledCoreAnimationDrawingArea::updateGeometry):

2013-06-18  Simon Cooper  <scooper@apple.com>

        sandbox violation when Flash runs for the first time
        https://bugs.webkit.org/show_bug.cgi?id=117753
        <rdar://problem/14165466>

        Reviewed by Alexey Proskuryakov.

        Allow flash to try and change the ownership of directories it has just created.

        * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb:

2013-06-18  Ruth Fong  <ruth_fong@apple.com>

        Expose a getMediaType method in WebKit
        https://bugs.webkit.org/show_bug.cgi?id=117667

        Reviewed by Brady Eidson.

        * GNUmakefile.list.am:
        * Target.pri:
        Updated to include the added header file InjectedBundleHitTestResultMediaType.h
        
        * UIProcess/API/C/WKAPICast.h:
        (WebKit::toBundleHitTestResultMediaType):
        (WebKit::toAPI):
        Added methods to convert between BundleHitTestResultMediaType
        and WKBundleHitTestResultMediaType.

        * WebKit2.xcodeproj/project.pbxproj: Updated to include
        InjectedBundleHitTestResultMediaType.h in the WebKit2 project.

        * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp:
        (WKBundleHitTestResultGetMediaType): Exposes the method getMediaType and
        hooks into InjectedBundleHitTestResult::getMediaType.

        * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h:

        * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
        (WebKit::InjectedBundleHitTestResult::getMediaType): Added to return 
        what type, if any, a media element is.

        * WebProcess/InjectedBundle/InjectedBundleHitTestResult.h:

        * WebProcess/InjectedBundle/InjectedBundleHitTestResultMediaType.h: Added
        to contain new BundleHitTestResultMediaType enums.

2013-06-18  Roger Fong  <roger_fong@apple.com>

        Re-implement WebFrameNetworkingContext.
        <rdar://problem/13174821>.

        Reviewed by Alexey Proskuryakov.

        * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h: Added.
        (WebKit::WebFrameNetworkingContext::create):
        (WebKit::WebFrameNetworkingContext::WebFrameNetworkingContext):
        * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm: Added.
        (WebKit::WebFrameNetworkingContext::setPrivateBrowsingStorageSessionIdentifierBase):
        (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
        (WebKit::WebFrameNetworkingContext::destroyPrivateBrowsingSession):
        (WebKit::WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts):
        (WebKit::WebFrameNetworkingContext::needsSiteSpecificQuirks):
        (WebKit::WebFrameNetworkingContext::localFileContentSniffingEnabled):
        (WebKit::WebFrameNetworkingContext::scheduledRunLoopPairs):
        (WebKit::WebFrameNetworkingContext::sourceApplicationAuditData):
        (WebKit::WebFrameNetworkingContext::blockedError):
        (WebKit::WebFrameNetworkingContext::storageSession):

2013-06-18  Alexey Proskuryakov  <ap@apple.com>

        <rdar://problem/13174821> Remove files with an incorrect license.

        Rubber-stamped by Maciej Stachowiak.

        This will break the build, stay tuned for a fix coming soon.

        * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h: Removed.
        * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm: Removed.

2013-06-17  Santosh Mahto  <santosh.ma@samsung.com>

        Extra whitespace in blank line in PlatformPopupMenuData.cpp
        https://bugs.webkit.org/show_bug.cgi?id=117627

        Reviewed by Brent Fulgham.

        * Shared/PlatformPopupMenuData.cpp:
        (WebKit::PlatformPopupMenuData::decode):
        Removing extra space

2013-06-17  Beth Dakin  <bdakin@apple.com>

        PageBanners appear over HTML5 video when media element is in full screen mode
        https://bugs.webkit.org/show_bug.cgi?id=117721
        -and corresponding-
        <rdar://problem/13686998>

        Reviewed by Sam Weinig.

        When an element enters fullscreen, hide the banners. Show them again when the 
        element exits fullscreen.
        * WebProcess/FullScreen/WebFullScreenManager.cpp:
        (WebKit::WebFullScreenManager::willEnterFullScreen):
        (WebKit::WebFullScreenManager::willExitFullScreen):

        Handle hiding and showing by removing or re-creating a parent layer for m_layer.
        * WebProcess/WebPage/PageBanner.cpp:
        (WebKit::PageBanner::hide):
        (WebKit::PageBanner::showIfHidden):
        * WebProcess/WebPage/PageBanner.h:
        * WebProcess/WebPage/mac/PageBannerMac.mm:
        (WebKit::PageBanner::PageBanner):
        (WebKit::PageBanner::hide):
        (WebKit::PageBanner::showIfHidden):
        (WebKit::PageBanner::mouseEvent):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::hidePageBanners):
        (WebKit::WebPage::showPageBanners):
        * WebProcess/WebPage/WebPage.h:

2013-06-17  Ruth Fong  <ruth_fong@apple.com>

        REGRESSION: Important controls are missing from <video> element UI, when compared to QuickTime
        https://bugs.webkit.org/show_bug.cgi?id=20599

        Add a "Download Video"/"Download Audio" context menu item to download media
        elements.

        Reviewed by Beth Dakin.

        * Shared/API/c/WKContextMenuItemTypes.h: Updated to include
        an enum type for the "Download Video/Audio" context menu item.

        * Shared/API/c/WKSharedAPICast.h: Updated to associate
        the enums in WebKit and WebCore that handle the "Download Video/Audio"
        context menu item.

        * UIProcess/API/efl/ewk_context_menu.cpp:
        * UIProcess/API/efl/ewk_context_menu_item.cpp:
        * UIProcess/API/efl/ewk_context_menu_item.h:
        Updated to include new EWK enum type for "Download Video/Audio" context menu item.

        * UIProcess/WebPageProxy.cpp: Updated to 
        handle the "Download Video/Audio" context menu item mouse click
        and download the media item in the UI process.

2013-06-17  Ralph Thomas  <ralpht@gmail.com>

        [CoordinatedGraphics][CSS Shaders] Use forwarding header for TextureMapperPlatformCompiledProgram.h
        https://bugs.webkit.org/show_bug.cgi?id=117712

        Reviewed by Noam Rosenthal.

        * Shared/CoordinatedGraphics/WebCustomFilterProgramProxy.h:

2013-06-17  Mark Rowe  <mrowe@apple.com>

        <rdar://problem/13145014> Allow CoreIPC messages to transmit importance boosts

        Transmitting the importance boost from the UI process to the web process is particularly
        important when disabling process suppression on a web process, as it will minimize the
        delays that can occur before the message instructing process suppression to be disabled
        is processed by the web process.

        We keep the importance boost alive for the duration of the CoreIPC message handler. We
        achieve this by having an ImportanceAssertion object that owns the assertion, and whose
        lifetime is tied to that of the MessageDecoder.

        Reviewed by Anders Carlsson.

        * Platform/CoreIPC/MessageDecoder.cpp:
        (CoreIPC::MessageDecoder::setImportanceAssertion): Associate an importance assertion
        with this message.
        * Platform/CoreIPC/MessageDecoder.h:
        * Platform/CoreIPC/mac/ConnectionMac.cpp:
        (CoreIPC::Connection::open): Mark our receive port as allowing importance boosts to be received.
        (CoreIPC::Connection::receiveSourceEventHandler):
        * Platform/CoreIPC/mac/ImportanceAssertion.h:
        (CoreIPC::ImportanceAssertion::create):
        (CoreIPC::ImportanceAssertion::~ImportanceAssertion): Release the assertion.
        (CoreIPC::ImportanceAssertion::ImportanceAssertion): Take an assertion if a boost was present in
        the Mach message.

2013-06-17  Mark Rowe  <mrowe@apple.com>

        <rdar://problem/14051357> Web processes sometimes remain in a suppressed
        state after their window is unoccluded.

        The code in WKView that responds to occlusion notifications was incorrectly
        treating the window's occlusion state as being an enum rather than the set of
        flags that it is.

        Reviewed by Oliver Hunt.

        * UIProcess/API/mac/WKView.mm:
        (-[WKView _windowDidChangeOcclusionState:]): Test only the visibility state.
        (-[WKView setWindowOcclusionDetectionEnabled:]): Ditto.

2013-06-17  Michael Brüning  <michael.bruning@digia.com>

        [Qt] Remove Qt specific QTKIT flagged code.
        https://bugs.webkit.org/show_bug.cgi?id=117635

        Reviewed by Simon Hausmann.

        Due to disabling QTKIT for Qt in r151546, the
        code the flags that are not taken into account
        anymore and the code that has been rendered
        unreachable by this are removed.

        * Target.pri:
        * UIProcess/qt/WebContextQt.cpp:
        (WebKit::WebContext::platformInitializeWebProcess):
        * WebProcess/WebCoreSupport/qt/WebSystemInterface.h: Removed.
        * WebProcess/WebCoreSupport/qt/WebSystemInterface.mm: Removed.
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences):
        * WebProcess/qt/WebProcessMainQt.cpp:
        (WebKit::WebProcessMainQt):

2013-06-17  Grzegorz Czajkowski  <g.czajkowski@samsung.com>

        Unreviewed, rolling out r151632.
        http://trac.webkit.org/changeset/151632
        https://bugs.webkit.org/show_bug.cgi?id=117585

        Debug build error ASSERT(WTF_USE_GRAMMAR_CHECKING) for non MAC
        platforms

        * Shared/API/c/WKSharedAPICast.h:
        (WebKit::toAPI):
        (WebKit::toImpl):
        * UIProcess/API/efl/ewk_context_menu_item.cpp:
        (getEwkActionFromWKTag):
        * UIProcess/API/efl/tests/test_ewk2_text_checker.cpp:
        (onContextMenuShow):
        (TEST_F):
        * UIProcess/API/gtk/WebKitContextMenuActions.cpp:
        (webkitContextMenuActionGetActionTag):
        (webkitContextMenuActionGetForContextMenuItem):
        (webkitContextMenuActionGetLabel):
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::contextMenuItemSelected):

2013-06-14  Grzegorz Czajkowski  <g.czajkowski@samsung.com>

        Context menu grammar checking items are available when GRAMMAR_CHECKING macro is off
        https://bugs.webkit.org/show_bug.cgi?id=117585

        Reviewed by Anders Carlsson.

        Add GRAMMAR_CHECKING guard to the context menu grammar items.

        * Shared/API/c/WKSharedAPICast.h:
        (WebKit::toAPI):
        (WebKit::toImpl):
        * UIProcess/API/efl/ewk_context_menu_item.cpp:
        (getEwkActionFromWKTag):
        * UIProcess/API/efl/tests/test_ewk2_text_checker.cpp:
        (checkSpellingItemsAvailability):
        Change callback name, to be consistent with a newly added.

        (checkSpellingAndGrammarSubmenuAvailability):
        (checkGrammarWithSpellingItemAvailability):
        Add two unit tests for EFL to check whether context menu grammar items are
        available only when GRAMMAR_CHECKING macro is enabled.

        * UIProcess/API/gtk/WebKitContextMenuActions.cpp:
        (webkitContextMenuActionGetActionTag):
        (webkitContextMenuActionGetForContextMenuItem):
        (webkitContextMenuActionGetLabel):
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::contextMenuItemSelected):

2013-06-14  Dean Jackson  <dino@apple.com>

        Crash in supportsSnapshotting
        https://bugs.webkit.org/show_bug.cgi?id=117670
        <rdar://problem/14059711>

        Reviewed by Darin Adler.

        Speculative fix for deferencing a null RefPtr in supportsSnapshotting.
        It seems like it was possible to get in a state where the plugin machinery
        would fire up and attempt to get a screenshot before there was an active
        connection to the plugin process (usually under periods of high load, such
        as opening a lot of tabs at once). In this case we're now returning false
        from supportsSnapshotting, which will trigger the plugin to restart, but
        that's better than requesting a snapshot on something that doesn't yet exist.

        * WebProcess/Plugins/PluginProxy.cpp:
        (WebKit::PluginProxy::supportsSnapshotting): Guard for an empty connection object.

2013-06-14  Enrica Casucci  <enrica@apple.com>

        WKPageFindStringMatches ignores the kWKFindOptionsBackwards option.
        https://bugs.webkit.org/show_bug.cgi?id=117647
        <rdar://problem/13881024>

        Reviewed by Darin Adler.
        
        The API returns the matched ranges in the DOM order regardless of the
        find direction, but the index of the first match after the user selection
        should take the find direction into account.

        Extended existing test in TestWebKitAPI.

        * Shared/API/c/WKFindOptions.h: Added enum for the case where there are
        no matches after the user selection in the direction of the find.

2013-06-14  Andres Gomez  <agomez@igalia.com>

        [GTK] Compilation problems - hb.h not found
        https://bugs.webkit.org/show_bug.cgi?id=117636

        Unreviewed GTK+ build fix.

        * GNUmakefile.am: Added freetype cflags for WebKit2 GTK+ Platform
        library.

2013-06-13  Michał Pakuła vel Rutka  <m.pakula@samsung.com>

        [EFL][WK2] Wrong context menu and popup menu positions when scroll is applied
        https://bugs.webkit.org/show_bug.cgi?id=116610

        Reviewed by Noam Rosenthal.

        WebKit2 EFL uses fixed layout - because of this ScrollView::contentsToWindow, does
        not take scroll into account, as it is meant to be handled by UI application.
        When popup and context menu are created, after calling contentsToWindow their position
        are not adjusted to page scroll.
        Added two functions to EwkView and WKView, converting contents position to user viewport
        coordinates, to adjust popup and context menu positions.

        * UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
        (WKViewContentsToUserViewport):
        * UIProcess/API/C/CoordinatedGraphics/WKView.h:
        * UIProcess/API/efl/EwkView.cpp:
        (EwkView::showContextMenu):
        (EwkView::requestPopupMenu):
        * UIProcess/CoordinatedGraphics/WebView.cpp:
        (WebKit::WebView::contentsToUserViewport):
        * UIProcess/CoordinatedGraphics/WebView.h:

2013-06-12  Anders Carlsson  <andersca@apple.com>

        Remove the notion of inactive plug-ins
        https://bugs.webkit.org/show_bug.cgi?id=117570
        <rdar://problem/13484213>

        Reviewed by Tim Horton.

        Remove code that deals with inactive plug-ins. We still keep around the kWKPluginLoadPolicyInactive API enum for now.

        * Shared/Plugins/PluginModuleInfo.h:
        * UIProcess/API/C/WKAPICast.h:
        (WebKit::toWKPluginLoadPolicy):
        (WebKit::toPluginModuleLoadPolicy):
        * UIProcess/Plugins/PluginInfoStore.cpp:
        * UIProcess/Plugins/PluginInfoStore.h:
        * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
        (WebKit::PluginInfoStore::shouldUsePlugin):
        (WebKit::PluginInfoStore::defaultLoadPolicyForPlugin):
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::findPlugin):
        (WebKit::WebPageProxy::unavailablePluginButtonClicked):
        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::shouldUnavailablePluginMessageBeButton):
        (WebKit::WebChromeClient::unavailablePluginButtonClicked):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::createPlugin):

2013-06-12  Hugo Parente Lima  <hugo.lima@openbossa.org>

        [GTK] Explicit include glib.h to avoid compilation errors if libsoup isn't used.
        https://bugs.webkit.org/show_bug.cgi?id=117564

        Reviewed by Martin Robinson.

        * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:

2013-06-12  Zan Dobersek  <zdobersek@igalia.com>

        [GTK] Move more build targets for source code that's free of layer violations into libPlatform
        https://bugs.webkit.org/show_bug.cgi?id=115936

        Reviewed by Martin Robinson.

        * GNUmakefile.am: Add GStreamer dependency's CFLAGS to the list of libPlatformGtk2 CPPFLAGS.

2013-06-12  Ruth Fong  <ruth_fong@apple.com>

        "Open Video in New Window" doesn't make sense in fullscreen
        https://bugs.webkit.org/show_bug.cgi?id=117556

        Reviewed by Beth Dakin.

        Adds method mediaIsInFullscreen() that checks if a media element is in
        fullscreen mode, which is needed to decide when to display the
        "Open Video in New Window" context menu item.

        * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp:
        (WKBundleHitTestResultMediaIsInFullscreen): Added.
        Hooks into new InjectedBundleHitTestResult::mediaIsInFullscreen() method.
        * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h:
        * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
        (WebKit::InjectedBundleHitTestResult::mediaIsInFullscreen): Added.
        Checks if media element is in fullscreen.
        * WebProcess/InjectedBundle/InjectedBundleHitTestResult.h:

2013-06-12  Ruth Fong  <ruth_fong@apple.com>

        Allow for toggling fullscreen on <video> elements
        https://bugs.webkit.org/show_bug.cgi?id=117220

        Reviewed by Dean Jackson.

        * Shared/API/c/WKContextMenuItemTypes.h:
        * Shared/API/c/WKSharedAPICast.h:
        Added variables to support the toggle-ability of the fullscreen
        video context menu item.

2013-06-12  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Invalidate the ProcessLauncher when the process is terminated before it has finished launching
        https://bugs.webkit.org/show_bug.cgi?id=117412

        Reviewed by Anders Carlsson.

        * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
        (WebKit::ProcessLauncher::terminateProcess): If process is still
        launching just invalidate the launcher. Reset the process
        identifier after killing the process.

2013-06-12  Jae Hyun Park  <jae.park@company100.net>

        [Coordinated Graphics] Remove unused headers in CoordinatedLayerTreeHostProxy
        https://bugs.webkit.org/show_bug.cgi?id=117539

        Reviewed by Noam Rosenthal.

        * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
        * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:

2013-06-12  Zan Dobersek  <zdobersek@igalia.com>

        [GTK] Remove the WebCoreLayer(Gtk2).a archives before regenerating them
        https://bugs.webkit.org/show_bug.cgi?id=116723

        Reviewed by Carlos Garcia Campos.

        * GNUmakefile.am: When generating the WebCoreLayerGtk2.a archive from all the dependency archives, remove the
        current archive (if any). Updating an existent archive in an incremental build is not bulletproof and can lead
        to corrupt archives and subsequent build failures. On the other hand, the archive generation is not expensive
        and produces a working archive without problems even on incremental builds.

2013-06-12  Zan Dobersek  <zdobersek@igalia.com>

        Unreviewed GTK build fix.

        * GNUmakefile.list.am: Adding missing build targets to the plugin process after r151480.

2013-06-11  Gavin Barraclough  <barraclough@apple.com>

        Add NSSupportsAppNap keys to WebProcess, PluginProcess
        https://bugs.webkit.org/show_bug.cgi?id=117528

        Reviewed by Mark Rowe.

        * PluginProcess/EntryPoint/mac/LegacyProcess/Info.plist:
        * PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist:
        * PluginProcess/EntryPoint/mac/XPCService/PluginService.Development/Info.plist:
        * WebProcess/EntryPoint/mac/LegacyProcess/Info.plist:
        * WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info.plist:
        * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info.plist:
            - add NSSupportsAppNap key.

2013-06-11  Oliver Hunt  <oliver@apple.com>

        Make sure we aren't throttling plugin timers during initialisation and destruction
        https://bugs.webkit.org/show_bug.cgi?id=117522

        Reviewed by Darin Adler.

        Add a new ActivityAssertion RAII class to handle allowing/disallowing
        timer throttling.  Then make use of it during plugin initialisation
        and destruction, as well as any synchronous messages (on the basis
        that if another process is waiting for the plugin we shouldn't be
        throttling timers).

        * CMakeLists.txt:
        * GNUmakefile.list.am:
        * PluginProcess/WebProcessConnection.cpp:
        (WebKit::WebProcessConnection::didReceiveSyncMessage):
        (WebKit::WebProcessConnection::destroyPlugin):
        (WebKit::WebProcessConnection::createPlugin):
        * Shared/ActivityAssertion.cpp: Added.
        (WebKit::ActivityAssertion::ActivityAssertion):
        (WebKit::ActivityAssertion::~ActivityAssertion):
        * Shared/ActivityAssertion.h: Added.
        * Target.pri:
        * WebKit2.xcodeproj/project.pbxproj:

2013-06-06  Timothy Hatcher  <timothy@apple.com>

        Update the framework bundle identifier for the Web Inspector.

        Reviewed by Mark Rowe.

        * UIProcess/mac/WebInspectorProxyMac.mm:
        (WebKit::inspectorReallyUsesWebKitUserInterface):
        (WebKit::WebInspectorProxy::inspectorPageURL):
        (WebKit::WebInspectorProxy::inspectorBaseURL):
        * WebProcess/WebPage/mac/WebInspectorMac.mm:
        (WebKit::inspectorReallyUsesWebKitUserInterface):
        (WebKit::WebInspector::localizedStringsURL):

2013-06-11  Jer Noble  <jer.noble@apple.com>

        Do not filter cookies requested through the CookieStorageShim.
        https://bugs.webkit.org/show_bug.cgi?id=117511
        <rdar://problem/13603433>

        Reviewed by Beth Dakin.

        Since the shim function is called when the underlying media engine is
        creating an HTTPRequest, use CookieRequestHeaderFieldValue (which does
        not filter out HTTP-only cookies) rather than CookiesForDOM (which does).

        * Shared/mac/CookieStorageShim.cpp:
        (WebKit::webKitCookieStorageCopyRequestHeaderFieldsForURL):

2013-06-11  Seokju Kwon  <seokju.kwon@gmail.com>

        Remove leftover wxWebkit code
        https://bugs.webkit.org/show_bug.cgi?id=117471

        Reviewed by Andreas Kling.

        * Scripts/generate-forwarding-headers.pl:

2013-06-11  Changhyup Jwa  <ch.jwa@samsung.com>

        [EFL][WK2] Add fallback for EWK2UnitTestBase if opengl is not available.
        https://bugs.webkit.org/show_bug.cgi?id=117504

        Reviewed by Christophe Dumez.

        There're many fails on efl webkit2 unit test if opengl is not available.
        So, add fallback to non-opengl evas engine.

        * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
        (EWK2UnitTest::EWK2UnitTestBase::SetUp):

2013-06-11  Csaba Osztrogonác  <ossy@webkit.org>

        Make WTR use its own temporary directory for application cache
        https://bugs.webkit.org/show_bug.cgi?id=117143

        Reviewed by Alexey Proskuryakov.

        * UIProcess/API/C/WKContext.cpp:
        (WKContextSetApplicationCacheDirectory):
        * UIProcess/API/C/WKContextPrivate.h:
        * UIProcess/WebContext.cpp:
        (WebKit::WebContext::applicationCacheDirectory):
        * UIProcess/WebContext.h:
        (WebKit::WebContext::setApplicationCacheDirectory):
        * UIProcess/efl/WebContextEfl.cpp:
        (WebKit::WebContext::platformDefaultApplicationCacheDirectory):
        * UIProcess/gtk/WebContextGtk.cpp:
        (WebKit::WebContext::platformDefaultApplicationCacheDirectory):
        * UIProcess/mac/WebContextMac.mm:
        (WebKit::WebContext::platformDefaultApplicationCacheDirectory):
        * UIProcess/qt/WebContextQt.cpp:
        (WebKit::WebContext::platformDefaultApplicationCacheDirectory):

2013-06-11  Michał Pakuła vel Rutka  <m.pakula@samsung.com>

        [EFL][WK2] Fix test_ewk2_context_menu
        https://bugs.webkit.org/show_bug.cgi?id=116601

        Reviewed by Gyuyoung Kim.

        test_ewk2_context_menu is always passing, it does not test any context menu feature
        as it ends before context menu is called.
        One single test was divided into two tests: testing WebKit2 created context menu and
        testing menus and items created by application.

        * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
        (EWK2UnitTest::EWK2UnitTestBase::waitUntilTrue): added function introducing internal loop until boolean value is changed to true
        * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h:
        * UIProcess/API/efl/tests/test_ewk2_context_menu.cpp:
        (customItemSelected):
        (showContextMenu):
        (showContextMenuForRemoveAndAppend):
        (showContextMenuForSubmenu):
        (hideContextMenu):
        (TEST_F):

2013-06-11  Ryuan Choi  <ryuan.choi@samsung.com>

        [EFL][WK2] Add ewk_view_navigate API
        https://bugs.webkit.org/show_bug.cgi?id=117467

        Reviewed by Christophe Dumez.

        The applications will use this API to navigate history more than one step.

        * UIProcess/API/efl/ewk_back_forward_list_item_private.h:
        (EwkBackForwardListItem::wkItem): Return WKBackForwardListItemRef for page to navigate.
        * UIProcess/API/efl/ewk_view.cpp:
        (ewk_view_navigate_to): Added new API.
        * UIProcess/API/efl/ewk_view.h:
        * UIProcess/API/efl/tests/test_ewk2_view.cpp:
        (TEST_F): Added more test case for navigation.

2013-06-10  Jae Hyun Park  <jae.park@company100.net>

        [CoordinatedGraphics] Typos in custom shader support
        https://bugs.webkit.org/show_bug.cgi?id=117413

        Reviewed by Noam Rosenthal.

        Wrong keyframe is passed when assigning filterValue.

        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
        (WebKit::CoordinatedLayerTreeHost::prepareCustomFilterProxiesIfNeeded):

2013-06-10  Seokju Kwon  <seokju.kwon@gmail.com>

        [Qt][GTK] Build fix after r151403
        https://bugs.webkit.org/show_bug.cgi?id=117452

        Reviewed by Csaba Osztrogonác.

        * UIProcess/API/gtk/PageClientImpl.cpp:
        (WebKit::PageClientImpl::preferencesDidChange):
        * UIProcess/API/gtk/PageClientImpl.h:
        * UIProcess/API/qt/raw/qrawwebview_p_p.h:
        (QRawWebViewPrivate::preferencesDidChange):
        * UIProcess/qt/QtPageClient.h:
        (WebKit::QtPageClient::preferencesDidChange):

2013-06-10  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r151411.
        http://trac.webkit.org/changeset/151411
        https://bugs.webkit.org/show_bug.cgi?id=117453

        because it is duplicated with Bug 117441 (Requested by
        gyuyoung_ on #webkit).

        * UIProcess/efl/WebViewEfl.cpp:
        * UIProcess/efl/WebViewEfl.h:

2013-06-10  Jaehun Lim  <ljaehun.lim@samsung.com>

        Fix build error and warning
        https://bugs.webkit.org/show_bug.cgi?id=117441

        Reviewed by Anders Carlsson.

        * UIProcess/CoordinatedGraphics/WebView.cpp:
        (WebKit::WebView::preferencesDidChange): Added.
        (WebKit::WebView::createPopupMenuProxy): Remove 'page'.
        * UIProcess/CoordinatedGraphics/WebView.h:

2013-06-10  Gyuyoung Kim  <gyuyoung.kim@samsung.com>

        Unreviewed, EFL Build fix after r151403.

        Added preferencesDidChange to WebViewEfl.

        * UIProcess/efl/WebViewEfl.cpp:
        (WebKit::WebViewEfl::preferencesDidChange):
        * UIProcess/efl/WebViewEfl.h:

2013-06-10  Anders Carlsson  <andersca@apple.com>

        Crash in StorageAreaMap::applyChange when clearing local storage in another web process
        https://bugs.webkit.org/show_bug.cgi?id=117440
        <rdar://problem/13961548>

        Reviewed by Tim Horton.

        Add an early return so we won't try to look up a null key in the m_pendingValueChanges map.
        Also, fix an assertion - it's fine for m_storageMap to be null in applyChange.

        * WebProcess/Storage/StorageAreaMap.cpp:
        (WebKit::StorageAreaMap::applyChange):

2013-06-10  Sergio Correia  <sergio.correia@openbossa.org>

        [WK2][CoordinatedGraphics] Add default case to switches to fix strict build
        https://bugs.webkit.org/show_bug.cgi?id=117416

        Reviewed by Noam Rosenthal.

        This patch fixes a strict build by asserting on the default case of two
        switch statements where gcc was previously complaining of unhandled cases.

        * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
        (CoreIPC::::encode):
        (CoreIPC::::decode):

2013-06-10  Anders Carlsson  <andersca@apple.com>

        -[WKView _updateWindowAndViewFrames] should avoid updating the view frame in window coordinates if we don't have plugins
        https://bugs.webkit.org/show_bug.cgi?id=117420
        <rdar://problem/14073034>

        Reviewed by Tim Horton.

        If plug-ins are disabled there's no need for the web process to know about the view frame in window coordinates so only
        send it when plug-ins are enabled. In addition, if accessibility is disabled we don't need to send a message at all.

        * UIProcess/API/mac/PageClientImpl.h:
        * UIProcess/API/mac/PageClientImpl.mm:
        (WebKit::PageClientImpl::preferencesDidChange):
        Call through to -[WKView _preferencesDidChange].

        * UIProcess/API/mac/WKView.mm:
        (-[WKView _updateWindowAndViewFrames]):
        Don't compute viewFrameInWindowCoordinates or accessibilityPosition unless they're required. If neither are required,
        don't even send a message to the web process.

        (-[WKView _preferencesDidChange]):
        Update _needsViewFrameInWindowCoordinates and call -[WKView _updateWindowAndViewFrames] if needed.

        (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]):
        Set _needsViewFrameInWindowCoordinates based on whether plug-ins are enabled or not.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::preferencesDidChange):
        Call the page client.

2013-06-10  Bear Travis  <betravis@adobe.com>

        [CSS Shapes][CSS Exclusions] Split CSS Exclusions and CSS Shapes code
        https://bugs.webkit.org/show_bug.cgi?id=117162

        Reviewed by Alexandru Chiculita.

        Adding the WebCore/rendering/shapes directory to the include list.

        * CMakeLists.txt:

2013-06-10  Iago Toral Quiroga  <itoral@igalia.com>

        Use Cairo implementation of the WidgetBackingStore instead of X11 when running on Wayland
        https://bugs.webkit.org/show_bug.cgi?id=116717

        Reviewed by Martin Robinson.

        Decide which implementation of WidgetBackingStore to use (X11 or Cairo)
        depending on whether we are running on X11 or not. Select Cairo
        implementation when not running in X11.

        * UIProcess/cairo/BackingStoreCairo.cpp:
        (WebKit):
        (WebKit::createBackingStoreForGTK):
        (WebKit::BackingStore::incorporateUpdate):

2013-06-09  Jae Hyun Park  <jae.park@company100.net>

        [CoordinatedGraphics] Typo in argument decoder for CoordinatedGraphicsState
        https://bugs.webkit.org/show_bug.cgi?id=117384

        Reviewed by Noam Rosenthal.

        For CSS Shaders, it must decode state.customFiltersToRemove instead of
        state.updateAtlasesToRemove.

        * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
        (CoreIPC::::decode):

2013-06-08  Jae Hyun Park  <jae.park@company100.net>

        [Coordinated Graphics] Pass the ownership of GraphicsSurface explicitly
        https://bugs.webkit.org/show_bug.cgi?id=117379

        Reviewed by Noam Rosenthal.

        When creating WebCoordinatedSurface with GraphicsSurface, it is clearer
        to pass the ownership of the created GraphicsSurface explicitly.

        * Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp:
        (WebKit::WebCoordinatedSurface::create):

2013-06-07  Anders Carlsson  <andersca@apple.com>

        Coalesce multiple calls to WebPageProxy::windowAndViewFramesChanged
        https://bugs.webkit.org/show_bug.cgi?id=117364
        <rdar://problem/14042099>

        Reviewed by Geoffrey Garen.

        -[WKView _updateWindowAndViewFrames] can be called many times per run loop iteration so coalesce calls
        to WebPageProxy::windowAndViewFrames using dispatch_async.

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

2013-06-07  Thomas Deniau  <deniau@apple.com>

        Reproducible crash with triple-finger-tap "define word" gesture on a Netflix video
        https://bugs.webkit.org/show_bug.cgi?id=117020

        Reviewed by Ryosuke Niwa.

        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::performDictionaryLookupAtLocation):
        Don't invoke the Dictionary lookup when we failed to extract the range of the token
        surrounding the tapped position.

2013-06-07  Enrique Ocana Gonzalez  <eocanha@igalia.com>

        [GTK] Weird behaviour and no clues to the user when the shared memory file can't be opened
        https://bugs.webkit.org/show_bug.cgi?id=117063

        Reviewed by Anders Carlsson.

        Log error message when the shared memory file can't be opened in
        Unix platform using a release build

        * Platform/unix/SharedMemoryUnix.cpp:
        (WebKit::SharedMemory::create):

2013-06-07  Grzegorz Czajkowski  <g.czajkowski@samsung.com>

        [EFL][WK2] Context menu spellchecking items are not available when "Check Spelling While Typing" is off
        https://bugs.webkit.org/show_bug.cgi?id=117190

        Reviewed by Christophe Dumez.

        Context menu items (suggestions, learn and ignore word) are not available
        due to missing dictionary. To get the suggestions for the misspelled word,
        the dictionary has to be loaded first.

        WebKit loads the default dictionary when check spelling while typing is being enabled.
        However, context menu spellchecking items should be present even if this setting is off.

        * UIProcess/API/efl/ewk_context.cpp:
        (EwkContext::EwkContext):
        Load the user's default dictionary to ensure context menu spellchecking items.
        The dictionary is loaded asynchronously so it shouldn't delay application.

        * UIProcess/API/efl/ewk_text_checker.h:
        Update doc. Spelling suggestions, learn and ignore word should be available
        independently of checking spelling while typing setting.

        * UIProcess/API/efl/tests/test_ewk2_text_checker.cpp:
        (onContextMenuShow):
        (TEST_F):
        Add two unit tests to check whether the default dictionary is loaded and
        whether the context menu spelling items are available.

        * UIProcess/efl/TextCheckerEfl.cpp:
        (WebKit::TextChecker::setContinuousSpellCheckingEnabled):
        (WebKit::TextChecker::continuousSpellCheckingEnabledStateChanged):
        Not set the default dictionary while enabling the setting, it's already loaded.

2013-06-07  Michał Pakuła vel Rutka  <m.pakula@samsung.com>

        [EFL][WK2] Implement customContextMenuItemSelected
        https://bugs.webkit.org/show_bug.cgi?id=117298

        Reviewed by Christophe Dumez.

        When custom context menu item is selected using ewk API, the feedback is not
        sent back to application, as customContextMenuItemSelected was unimplemented in
        contextMenuClientEfl.

        * UIProcess/API/efl/EwkView.cpp:
        (EwkView::customContextMenuItemSelected):
        * UIProcess/API/efl/EwkView.h:
        * UIProcess/API/efl/ewk_view.h: added custom_item_selected callback.
        * UIProcess/efl/ContextMenuClientEfl.cpp:
        (customContextMenuItemSelected):
        (ContextMenuClientEfl::ContextMenuClientEfl):

2013-06-06  Oliver Hunt  <oliver@apple.com>

        Completely initialize ChildProcess state on launch
        https://bugs.webkit.org/show_bug.cgi?id=117328

        Reviewed by Sam Weinig.

        Use setProcessSuppressionEnabledInternal to avoid setProcessSuppressionEnabled
        "optimizing" our initialization away.

        * Shared/mac/ChildProcessMac.mm:
        (WebKit::ChildProcess::platformInitialize):

2013-06-06  Rafael Brandao  <rafael.lobo@openbossa.org>

        [Gtk] Connection is leaking when WebProcess is terminated
        https://bugs.webkit.org/show_bug.cgi?id=117293

        Reviewed by Martin Robinson.

        Connection is leaking because WorkQueue::SocketEventSource inherits from
        WorkQueue::EventSource but when it is destroyed, the actual destructor running
        is the one from base class; however, subclass contains a function binded from
        Connection (m_closeFunction) and we need to do this extra cleanup, otherwise
        WorkQueue will keep Connection alive. A better explanation of this fix is provided
        on http://stackoverflow.com/questions/461203/when-to-use-virtual-destructors

        A quick way to see the leak is to change WK2 test "ReloadPageAfterCrash" to terminate
        WebProcess N times and add a printf on Connection destructor.

        * Platform/gtk/WorkQueueGtk.cpp:
        (WorkQueue::EventSource::~EventSource): Adds a virtual destructor to enable
        the subclass to do its own cleanup.

2013-06-06  Jae Hyun Park  <jae.park@company100.net>

        Coordinated Graphics : Refactor CoordinatedSurface to manage the lifecycle of GraphicsContext
        https://bugs.webkit.org/show_bug.cgi?id=108899

        Reviewed by Noam Rosenthal.

        This is a preparation patch for Threaded Coordinated Graphics.

        This patch changes CoordinatedSurface to be responsible for the
        lifecycle of GraphicsContext used in Coordinated Graphics System.
        CoordinatedImageBacking and UpdateAtlas do not ask for the ownership
        of GraphicsContext anymore. Instead, those classes use client pattern to
        ask the CoordiantedSurface to paint to the GraphicsContext.

        This refactoring is needed to implement CoordinatedSurface for Threaded
        Coordinated Graphics.

        * Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp:
        (WebKit::WebCoordinatedSurface::paintToSurface):
        * Shared/CoordinatedGraphics/WebCoordinatedSurface.h:
        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
        (WebKit::CoordinatedLayerTreeHost::paintToSurface):
        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:

2013-06-05  Kangil Han  <kangil.han@samsung.com>

        [EFL][WK2] Fix test_ewk2_view unit test timed out issue
        https://bugs.webkit.org/show_bug.cgi?id=117251

        Reviewed by Christophe Dumez.

        'ewk_view_contents_size_changed' unit test case has been timed out since r150802 because
        same size is filtered by WebView class. So create one different test html string that has
        different size to continue unit tests.

        * UIProcess/API/efl/tests/test_ewk2_view.cpp:
        (onContentsSizeChangedPortrait):
        (onContentsSizeChangedLandscape):
        (TEST_F):

2013-06-05  Bear Travis  <betravis@adobe.com>

        [CSS Exclusions][CSS Shapes] Split CSS Exclusions & Shapes compile & runtime flags
        https://bugs.webkit.org/show_bug.cgi?id=117172

        Reviewed by Alexandru Chiculita.

        Adding the CSS_SHAPES compile flag.

        * Configurations/FeatureDefines.xcconfig:

2013-06-05  Anders Carlsson  <andersca@apple.com>

        Crash if an IPC connection is invalidated before it's completely set up
        https://bugs.webkit.org/show_bug.cgi?id=117274
        <rdar://problem/13319035>

        Reviewed by Andreas Kling.

        Resume our dispatch sources on the connection queue so we won't get invalidation callbacks before
        all sources have been set up.

        * Platform/CoreIPC/mac/ConnectionMac.cpp:
        (CoreIPC::Connection::open):
        (CoreIPC::Connection::sendOutgoingMessage):
        (CoreIPC::Connection::initializeDeadNameSource):
        (CoreIPC::Connection::receiveSourceEventHandler):

2013-06-05  Tim Horton  <timothy_horton@apple.com>

        [wk2] WebProcess' page-in-window count can be wrong
        https://bugs.webkit.org/show_bug.cgi?id=117106
        <rdar://problem/14040991>

        Reviewed by Anders Carlsson.

        If we're using a single WebProcess and a window is closed, we were
        not decrementing the page-in-window count (because we apparently don't
        setIsInWindow(false) a WebPage in a closing window before tearing it down).

        Turn the page-in-window count into a HashSet of pageIDs instead.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::WebPage):
        (WebKit::WebPage::setIsInWindow):
        Send the pageID instead (this change is just so that I don't need to
        fetch the WebPage in WebProcess::removeWebPage).

        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::WebProcess):
        Remove m_inWindowPageCount.

        (WebKit::WebProcess::removeWebPage):
        Ensure that WebPages being torn-down are removed from the in-window WebPage set.

        (WebKit::WebProcess::pageDidEnterWindow):
        (WebKit::WebProcess::pageWillLeaveWindow):
        Use our new HashSet instead of a count.

        (WebKit::WebProcess::nonVisibleProcessCleanupTimerFired):
        Make sure that we don't have any visible pages before doing cleanup.

        * WebProcess/WebProcess.h:
        Remove m_inWindowPageCount.
        Add m_inWindowPageSet.
        Make pageDidEnterWindow/pageWillLeaveWindow take pageID instead of WebPage.

2013-06-05  Tim Horton  <timothy_horton@apple.com>

        REGRESSION (r148713): Crash under waitForDidUpdateInWindowState
        https://bugs.webkit.org/show_bug.cgi?id=117268
        <rdar://problem/13822353>

        Reviewed by Anders Carlsson.

        Check if the WebProcess is valid before waiting for a message from it.
        Reset the bool that tells us that we have an outstanding didUpdateInWindowState message if the WebProcess quits.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::waitForDidUpdateInWindowState):
        (WebKit::WebPageProxy::resetStateAfterProcessExited):

2013-06-05  Gwang Yoon Hwang  <ryumiel@company100.net>

        [Coordinated Graphics] Prevent a recursive painting in CoordinatedGraphicsLayer
        https://bugs.webkit.org/show_bug.cgi?id=117222

        Reviewed by Noam Rosenthal.

        CoordinatedGraphicsLayer::flushCompositingState() will cross frame
        boundaries if the GraphicsLayers are connected. In this case,
        updateContentBuffers will invoke a painting of a sub-frame that causes
        flushCompositingState recursively.

        To prevent this behavior this patch extracts updateContentBuffers from
        flushCompositingState, and places it in
        updateContentBuffersIncludeSublayers, which traverses the tree
        separately from flushing the state for painting.

        No new tests, covered by existing tests.

        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
        (WebKit::CoordinatedLayerTreeHost::flushPendingLayerChanges):

2013-06-05  Gwang Yoon Hwang  <ryumiel@company100.net>

        [Coordinated Graphics] Rename client classes for CoordinatedImageBacking and UpdateAtlas.
        https://bugs.webkit.org/show_bug.cgi?id=111948

        Reviewed by Noam Rosenthal.

        This patch renames CoordinatedImageBacking::Coordinator to
        CoordinatedImageBacking::Client, and UpdateAtlasClient to
        UpdateAtlas::Client for naming consistency and clarification.

        No new tests, covered by existing tests.

        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:

2013-06-05  Gwang Yoon Hwang  <ryumiel@company100.net>

        [Coordinated Graphics] Unify messages related object's lifecycles into CoordinatedGraphicsState.
        https://bugs.webkit.org/show_bug.cgi?id=111919

        Reviewed by Noam Rosenthal.

        CoordinatedLayerTreeHostProxy has several methods, which simply passes
        these calls to CoordinatedGraphicsScene.

        This patch removes methods in CoordinatedLayerTreeHostProxy just for
        message chaining. Instead of that, messages for creation/deletion of objects
        (Layers, CustomFilters, UpdateAtlas, and ImageBacking) are unified into
        CommitCoordinatedGraphicsState.

        And this patch also removes codes for WebCoordinatedSurface in
        CoordinatedLayerTreeHost, except for a factory method.
        CoordinatedGraphicsArgumentCoders [en|de]codes CoordinatedSurface itself
        using WebCoordinatedSurface.

        No new tests, covered by existing tests.

        * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
        (CoreIPC::encodeCoordinatedSurface):
        (CoreIPC::decodeCoordinatedSurface):
        (CoreIPC::::encode):
        (CoreIPC::::decode):
        * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
        * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
        * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.messages.in:
        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
        (WebKit::CoordinatedLayerTreeHost::flushPendingLayerChanges):
        (WebKit::CoordinatedLayerTreeHost::clearPendingStateChanges):
        (WebKit::CoordinatedLayerTreeHost::checkCustomFilterProgramProxies):
        (WebKit::CoordinatedLayerTreeHost::removeCustomFilterProgramProxy):
        (WebKit::CoordinatedLayerTreeHost::detachLayer):
        (WebKit::CoordinatedLayerTreeHost::createImageBacking):
        (WebKit::CoordinatedLayerTreeHost::updateImageBacking):
        (WebKit::CoordinatedLayerTreeHost::clearImageBackingContents):
        (WebKit::CoordinatedLayerTreeHost::removeImageBacking):
        (WebKit::CoordinatedLayerTreeHost::createGraphicsLayer):
        (WebKit::CoordinatedLayerTreeHost::createUpdateAtlas):
        (WebKit::CoordinatedLayerTreeHost::removeUpdateAtlas):
        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:

2013-06-04  Simon Cooper  <scooper@apple.com>

        Tighten plugin sandbox profiles against symlink attacks
        https://bugs.webkit.org/show_bug.cgi?id=117219
        <rdar://problem/13044569>

        Reviewed by Sam Weinig.

        This inserts deny rules for creating symbolic links. The rules are
        inserted at the end of sandbox profile compilation by overriding the
        finalizer.  The initial value of %finalize must be the last function
        called.

        * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:

2013-06-04  Chris Fleizach  <cfleizach@apple.com>

        AX: WK2: accessibility position is calculated every time window frame is updated
        https://bugs.webkit.org/show_bug.cgi?id=117201

        Reviewed by Tim Horton.

        Only calculate the AX position if AX has already been enabled when updating the
        WKView's window and frame.

        * UIProcess/API/mac/WKView.mm:
        (-[WKView _updateWindowAndViewFrames]):
        (-[WKView _accessibilityRegisterUIProcessTokens]):
            Don't call accessibilityAttributeValue: here because it could enable accessibility prematurely.
        (-[WKView enableAccessibilityIfNecessary]):
            After enabling AX for the first time, also update the frame so that the AX position is correct.
        (-[WKView accessibilityFocusedUIElement]):
        (-[WKView accessibilityHitTest:]):
        (-[WKView accessibilityAttributeValue:]):
            Tell the AXObjectCache that AX is now enabled.

2013-06-04  Mark Rowe  <mrowe@apple.com>

        REGRESSION (r151043): Frequent crashes inside WebPageProxy::getPlugInInformation
        <http://webkit.org/b/117180>

        Reviewed by Brady Eidson.

        * UIProcess/mac/WebPageProxyMac.mm:
        (WebKit::WebPageProxy::getPlugInInformation): Return early when plugInProcessProxy is null
        since there's nothing we can do.

2013-06-04  Michał Pakuła vel Rutka  <m.pakula@samsung.com>

        [EFl][WK2] Sub menu items should be of EWK_SUBMENU_TYPE and not checkable
        https://bugs.webkit.org/show_bug.cgi?id=116959

        Reviewed by Gyuyoung Kim.

        Currently using ewk API it is possible to create a sub menu item which is not an EWK_SUBMENU_TYPE
        or set checkable flag for it, while it is not possible for items created by WebKit. 
        This patch changes ewk context menu API to match WebKit2 behaviour, by creating sub menus with
        proper type and checkable flags.

        * UIProcess/API/efl/ewk_context_menu_item.cpp:
        (ewk_context_menu_item_new_with_submenu):
        * UIProcess/API/efl/ewk_context_menu_item.h:
        * UIProcess/API/efl/tests/test_ewk2_context_menu.cpp:
        (showContextMenu):

2013-06-04  Michał Pakuła vel Rutka  <m.pakula@samsung.com>

        [EFL][WK2] Custom context menu items cannot be selected
        https://bugs.webkit.org/show_bug.cgi?id=116830

        Reviewed by Gyuyoung Kim.

        Custom item added using ewk_context_menu_item_append had no
        pointer to parent menu, and custom submenu added using with the
        the same function had no pointer to EwkView. Both issues
        prevented items to be selected.

        * UIProcess/API/efl/ewk_context_menu.cpp:
        (EwkContextMenu::appendItem):
        (EwkContextMenu::contextMenuItemSelected):
        (ewk_context_menu_item_append):
        (ewk_context_menu_item_select):
        * UIProcess/API/efl/ewk_context_menu_private.h:
        (EwkContextMenu):
        (EwkContextMenu::setEwkView):

2013-06-03  Simon Cooper  <scooper@apple.com>

        Unable to play videos in Safari using QuickTime plug-in until I've played those videos in Chrome first
        https://bugs.webkit.org/show_bug.cgi?id=117174
        <rdar://problem/13711687>

        Reviewed by Alexey Proskuryakov.

        Pull in fixes that allow https connections within the plugin
        environment.

        * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:

2013-06-03  Marcelo Lira  <marcelo.lira@openbossa.org>

        [WK2] REGRESSION(r150798): scrolling coordinator is not being enabled when WebPage is set to use fixed layout
        https://bugs.webkit.org/show_bug.cgi?id=117163

        Reviewed by Darin Adler.

        Moved call to WebPage::settings()->setScrollingCoordinatorEnabled()
        from CoordinatedLayerTreeHost constructor to WebPage::setUseFixedLayout().
        The scrolling coordinator must be enabled or disabled following the
        WebPage's use of fixed layout.

        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
        (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::setUseFixedLayout):

2013-06-03  Anders Carlsson  <andersca@apple.com>

        Send mouse events to the banner for as long as the mouse button is down
        https://bugs.webkit.org/show_bug.cgi?id=117161
        <rdar://problem/13821220>

        Reviewed by Beth Dakin.

        Keep track of whether the mouse was pressed in a banner and keep sending mouse events to it,
        even if they are outside the banner's bounds for as long as the mouse is down.

        * WebProcess/WebPage/PageBanner.h:
        * WebProcess/WebPage/mac/PageBannerMac.mm:
        (WebKit::PageBanner::PageBanner):
        (WebKit::PageBanner::mouseEvent):

2013-06-03  Sergio Correia  <sergio.correia@openbossa.org>

        [EFL][WK2] Process launcher uses system() for wrapping the WebProcess when using WEB_PROCESS_CMD_PREFIX
        https://bugs.webkit.org/show_bug.cgi?id=105156

        Reviewed by Christophe Dumez.

        When using WEB_PROCESS_CMD_PREFIX - which allows us for instance to analyze
        WebProcess under tools like valgrind or gdb -, the ProcessLauncher would
        spawn the new process using system(), which would, among other things, keep
        an extra UIProcess waiting and executing the shell.

        This patch handles the normal case and the case where we have something to
        prefix WebProcess (i.e., by using WEB_PROCESS_CMD_PREFIX in a debug build)
        the same way, through a call to execvp().

        To achieve this a function was introduced to create an array with the given
        arguments to the full command to be executed, to be used by execvp(). We use
        a Vector<OwnArrayPtr<char>>, so that we can take advantage of the destructor
        of OwnArrayPtr to handle the memory deallocation when it goes out of scope.

        * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
        (WebKit::createArgsArray):  This function creates the array to be used by
        execvp(), out of the Strings given as arguments.
        (WebKit::ProcessLauncher::launchProcess): Rework the logic to accomodate
        both the cases with and without WEB_PROCESS_CMD_PREFIX. The execl() call
        was replaced with an execvp() call, since now we should deal with having
        a variable number of arguments (WEB_PROCESS_CMD_PREFIX) as well.

2013-06-02  Arunprasad Rajkumar  <arurajku@cisco.com>

        [Qt] Move Qt port off legacy clipboard
        https://bugs.webkit.org/show_bug.cgi?id=116416

        Reviewed by Darin Adler.

        * WebProcess/WebCoreSupport/qt/WebDragClientQt.cpp:
        (WebKit::WebDragClient::startDrag):

2013-06-02  Sergio Correia  <sergio.correia@openbossa.org>

        [WK2][CoordinatedGraphics]: Use a properly initialized WebPage when creating a PageClient
        https://bugs.webkit.org/show_bug.cgi?id=117116

        Reviewed by Tim Horton.

        Valgrind reported a "conditional jump or move depends on uninitialised value"
        at WebPageProxy constructor, when checking the m_isVisible variable inside
        the ENABLE(PAGE_VISIBILITY_API) guard.

        The issue was tracked down to the WebView constructor, which was creating a
        WebKit::PageClient* making use of `this' before having initialized all of its
        attributes.

        The solution was to move the initialization of the `page' member to inside the
        constructor itself - out of the initialization list -, where we can guarantee
        all the relevant stuff has already been properly initialized.

        Here's the relevant valgrind trace for reference:

        Conditional jump or move depends on uninitialised value(s)
            at 0x65A35A4: WebKit::WebPageProxy::WebPageProxy(WebKit::PageClient*,
                          WTF::PassRefPtr<WebKit::WebProcessProxy>,
                          WebKit::WebPageGroup*, unsigned long) (WebPageProxy.cpp:322)
            by 0x65A2BA2: WebKit::WebPageProxy::create(WebKit::PageClient*,
                          WTF::PassRefPtr<WebKit::WebProcessProxy>,
                          WebKit::WebPageGroup*, unsigned long) (WebPageProxy.cpp:233)
            by 0x65E94BB: WebKit::WebProcessProxy::createWebPage(WebKit::PageClient*,
                          WebKit::WebContext*, WebKit::WebPageGroup*)
                          (WebProcessProxy.cpp:172)
            by 0x6570957: WebKit::WebContext::createWebPage(WebKit::PageClient*,
                          WebKit::WebPageGroup*, WebKit::WebPageProxy*)
                          (WebContext.cpp:735)
            by 0x67673E3: WebKit::WebView::WebView(WebKit::WebContext*,
                          WebKit::WebPageGroup*) (WebView.cpp:52)
            by 0x6775F18: WebKit::WebViewEfl::WebViewEfl(WebKit::WebContext*,
                          WebKit::WebPageGroup*) (WebViewEfl.cpp:54)
            by 0x6775EB4: WebKit::WebView::create(WebKit::WebContext*,
                          WebKit::WebPageGroup*) (WebViewEfl.cpp:49)
            by 0x673E13D: WKViewCreate (WKView.cpp:33)
            by 0x6763ECE: EWKViewCreate (ewk_view.cpp:92)

        * UIProcess/CoordinatedGraphics/WebView.cpp:
        (WebKit::WebView::WebView):

2013-05-31  Gyuyoung Kim  <gyuyoung.kim@samsung.com>

        [EFL][WK2] Add a null checking condition to in hide() of EwkContextMenu
        https://bugs.webkit.org/show_bug.cgi?id=117014

        Reviewed by Christophe Dumez.

        m_viewImpl is able to be null. So, we need to protect this function against such case.

        * UIProcess/API/efl/ewk_context_menu.cpp:
        (EwkContextMenu::hide):
        (ewk_context_menu_hide):
        * UIProcess/API/efl/ewk_context_menu_private.h:
        (EwkContextMenu):

2013-05-31  Oliver Hunt  <oliver@apple.com>

        Fix bug in active page tracking that lead to plugins hanging during destruction
        https://bugs.webkit.org/show_bug.cgi?id=117099

        Reviewed by Anders Carlsson.

        NPRuntimeObjectMap no longer keeps its own reference to the
        throttler, and no longer reports activity during destruction.

        * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
        (WebKit::NPRuntimeObjectMap::NPRuntimeObjectMap):
        (WebKit::NPRuntimeObjectMap::evaluate):
        * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h:
        * WebProcess/Plugins/PluginView.cpp:
        (WebKit::PluginView::PluginView):

2013-05-31  Tim Horton  <timothy_horton@apple.com>

        [wk2] All intrinsic content size changes should go through the 0-delay timer
        https://bugs.webkit.org/show_bug.cgi?id=117058
        <rdar://problem/13935042>

        Reviewed by Anders Carlsson.

        In r146913, I added a 0-delay timer so that we'd coalesce intrinsic
        content size changes. However, didUpdateGeometry was still immediately
        invalidating the intrinsic content size without coalescing.

        Move that update to the WebProcess to share the timer.

        * UIProcess/DrawingAreaProxy.h:
        (WebKit::DrawingAreaProxy::didUpdateGeometry):
        * UIProcess/DrawingAreaProxy.messages.in:
        * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
        * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
        (WebKit::TiledCoreAnimationDrawingAreaProxy::didUpdateGeometry):
        Remove the newIntrinsicContentSize argument, and don't invalidate intrinsic
        content size inside didUpdateGeometry.

        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
        (WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
        Start the intrinsic content size update timer when we finish updateGeometry.

2013-05-31  Alexey Proskuryakov  <ap@apple.com>

        Sandbox violations when trying to access fonts in non-standard locations
        https://bugs.webkit.org/show_bug.cgi?id=117097
        <rdar://problem/9264746>

        Reviewed by Anders Carlsson.

        The issue was that lack of a main xib was resulting in font machinery being
        initialized too early, before we entered sandbox.

        * Resources/WebContentProcess.xib: Added.
        * WebKit2.xcodeproj/project.pbxproj:
        * WebProcess/EntryPoint/mac/LegacyProcess/Info.plist:
        * WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info.plist:
        * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info.plist:

2013-05-31  Alexey Proskuryakov  <ap@apple.com>

        <rdar://problem/14036464> Sandbox violation when using Web SpeechSynthesis

        Reviewed by Anders Carlsson

        * WebProcess/com.apple.WebProcess.sb.in: Allow com.apple.speech.synthesis.console.

2013-05-31  Jessie Berlin  <jberlin@apple.com>

        Need the ability to get the information for a plug-in with a particular process id that may
        be running on a page
        https://bugs.webkit.org/show_bug.cgi?id=117090

        Rubber-stamped by Anders Carlsson.

        Follow-up to r151043 incorprating some feedback I got from Darin after I had already
        committed the patch.

        * UIProcess/API/C/mac/WKPagePrivateMac.cpp:
        (callGetPlugInInformationBlockAndDispose):
        Renamed to be less wordy.
        (WKPageGetPlugInInformation):
        Ditto.
        * UIProcess/API/C/mac/WKPagePrivateMac.h:
        Ditto.

        * UIProcess/Plugins/PluginProcessManager.h:
        * UIProcess/Plugins/mac/PluginProcessManagerMac.mm:
        (WebKit::PluginProcessManager::findPlugInProcessByID):
        Renamed to not use "Cocoa method style" in non-Cocoa functions.
        (WebKit::PluginProcessManager::findPlugInProcessByToken):
        Ditto.

        * UIProcess/WebPageProxy.h:
        * UIProcess/mac/WebPageProxyMac.mm:
        (WebKit::WebPageProxy::getPlugInInformation):
        Reduce ref count churn and fix a variable name.
        Updated for the change to findPlugInProcessByID.
        (WebKit::WebPageProxy::containsPlugInCallback):
        Updated for the change to findPlugInProcessByToken.

        * WebProcess/Plugins/PDF/SimplePDFPlugin.h:
        Move the override of a virtual function to the private section.

2013-05-31  Jessie Berlin  <jberlin@apple.com>

        Need the ability to get the information for a plug-in with a particular process id that may
        be running on a page
        https://bugs.webkit.org/show_bug.cgi?id=117090

        Reviewed by Anders Carlsson.

        * UIProcess/API/C/mac/WKPagePrivateMac.cpp:
        (callGetInformationForPlugInWithProcessIDBlockAndDispose):
        Get the block from the context, invoke it with the result, and dispose of it.
        (WKPageGetInformationForPlugInWithProcessID):
        Ask the WebPageProxy and provide it with a dictionary callback that uses the
        above function to invoke the passed in block.
        * UIProcess/API/C/mac/WKPagePrivateMac.h:
        Add WKPageGetInformationForPlugInWithProcessID and a typedef for the callback block.

        * UIProcess/Plugins/PluginProcessManager.h:
        Add ways to get the PluginProcessProxy associated with a process id or process token.
        * UIProcess/Plugins/mac/PluginProcessManagerMac.mm:
        (WebKit::PluginProcessManager::plugInProcessWithProcessID):
        Return the first PluginProcessProxy with the passed in process ID.
        (WebKit::PluginProcessManager::plugInProcessWithToken):
        Return the first PluginProcessProxy with the passed in process token.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::close):
        Invalidate any outstanding requests for plug-in information.
        * UIProcess/WebPageProxy.h:
        Keep track of the callbacks for the requests for plug-in information.
        * UIProcess/WebPageProxy.messages.in:
        * UIProcess/mac/WebPageProxyMac.mm:
        (WebKit::WebPageProxy::getInformationForPlugInWithProcessID):
        If there are no known plug-ins with the provided process ID, invoke the callback with a null
        dictionary of plug-in information.
        Otherwise, keep track of the callback and send a message to the web process asking for the
        information.
        (WebKit::WebPageProxy::containsPlugInCallback):
        If the page did not contain the plug-in, invoke the callback with a null dictionary of
        plug-in information.
        Invoke the callback with a dictionary containing the PlugInModuleInfo.

        * WebProcess/Plugins/Netscape/NetscapePlugin.h:
        Return 0 for the plugInProcessToken.
        * WebProcess/Plugins/PDF/SimplePDFPlugin.h:
        Ditto.
        * WebProcess/Plugins/Plugin.h:
        Add a pure virtual method for plugInProcessToken so it can be accessed from from the Plugin
        on the PluginView.
        * WebProcess/Plugins/PluginProxy.h:
        Return the actual plug-in process token.

        * WebProcess/Plugins/PluginView.h:
        (WebKit::PluginView::plugIn):
        Make it possible to get at the plug-in process token through the Plugin.

        * WebProcess/WebPage/WebPageMac.mm:
        (WebKit::WebPage::containsPluginViewsWithPluginProcessToken):
        If there is an instance of the plug-in with that token, send a confirmation to the ui
        process.
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in:

2013-05-31  Alexey Proskuryakov  <ap@apple.com>

        REGRESSION (r141445): MPEG-4 videos do not play on certain hardware configurations
        https://bugs.webkit.org/show_bug.cgi?id=117089
        <rdar://problem/13839717>

        Reviewed by Mark Rowe.

        * Configurations/WebContentProcess.xcconfig: Statically link to a framework that
        uses an XPC service to work around a libxpc limitation on Lion.

2013-05-31  Dean Jackson  <dino@apple.com>

        Don't create an accelerated compositing layer unless we have to for snapshotting plug-ins
        https://bugs.webkit.org/show_bug.cgi?id=117076
        <rdar://problem/14030364>

        Reviewed by Beth Dakin and Anders Carlsson.

        If a plug-in can support software snapshotting, then don't create an
        accelerated compositing layer for it while in snapshot mode. This is a
        better user experience -- otherwise the page/plug-in looks like it broke.

        * WebProcess/Plugins/PluginView.cpp:
        (WebKit::PluginView::isAcceleratedCompositingEnabled): If we are in snapshotting mode
        and we are a Flash plugin (the only one that supports software snapshots at the moment)
        then do not create an accelerated compositing layer.

2013-05-30  Tim Horton  <timothy_horton@apple.com>

        It's easy to hit ASSERT_NOT_REACHED in WKDOMNodeClass
        https://bugs.webkit.org/show_bug.cgi?id=117051

        Reviewed by Anders Carlsson.

        Re-add the ASSERT_NOT_REACHED, and return [WKDOMNode class] in the case
        where we don't have a specific subclass.

        * WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm:
        (WebKit::WKDOMNodeClass):

2013-05-31  Stephanie Lewis  <slewis@apple.com>

        Update low memory handler to use new memory pressure notifications on new OS versions.
        <rdar://problem/14027095>

        Reviewed by Mark Rowe.

        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
        (InitWebCoreSystemInterface):

2013-05-30  Tim Horton  <timothy_horton@apple.com>

        Remove ASSERT_NOT_REACHED from WKDOMNodeClass
        https://bugs.webkit.org/show_bug.cgi?id=117051

        Reviewed by Anders Carlsson.

        It's easy to fail this assertion in seemingly-legitimate cases.

        * WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm:
        (WebKit::WKDOMNodeClass):

2013-05-29  Jeffrey Pfau  <jpfau@apple.com>

        [Mac] Enable cache partitioning and the public suffix list on 10.8
        <rdar://problem/13679019>

        Rubber-stamped by David Kilzer.

        * Configurations/FeatureDefines.xcconfig:

2013-05-30  Andreas Kling  <akling@apple.com>

        Fix double hash lookup in WebPage::determinePrimarySnapshottedPlugIn() loop.
        <http://webkit.org/b/117032>

        Reviewed by Anders Carlsson.

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

2013-05-29  Tim Horton  <timothy_horton@apple.com>

        Expose incrementalRenderingSuppressionTimeout via WK2
        https://bugs.webkit.org/show_bug.cgi?id=117015
        <rdar://problem/13992853>

        Reviewed by Darin Adler.

        * Shared/WebPreferencesStore.h:
        * UIProcess/API/C/WKPreferencesPrivate.h:
        Add IncrementalRenderingSuppressionTimeout preference.

        * UIProcess/API/C/WKPreferences.cpp:
        (WKPreferencesSetIncrementalRenderingSuppressionTimeout): Added.
        (WKPreferencesGetIncrementalRenderingSuppressionTimeout): Added.

        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
        (WebKit::WebFrameLoaderClient::forcePageTransitionIfNeeded): Added.
        Call didCompletePageTransition, which un-freezes the layer tree.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::didCompletePageTransition):
        Fix some indentation.

        (WebKit::WebPage::updatePreferences):
        Forward the timeout value through to WebCore.

2013-05-29  Simon Fraser  <simon.fraser@apple.com>

        Fix paint-related milestones to not fire when the layer tree is frozen
        https://bugs.webkit.org/show_bug.cgi?id=117012

        Reviewed by Tim Horton.
        
        Implement ChromeClient::layerTreeStateIsFrozen() to return
        the frozen state of the drawing area.

        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::layerTreeStateIsFrozen):
        * WebProcess/WebCoreSupport/WebChromeClient.h:
        (WebChromeClient):

2013-05-29  Anders Carlsson  <andersca@apple.com>

        WebKit should expose HSTS APIs to determine whether a host is in the HSTS cache and to reset HSTS policies
        https://bugs.webkit.org/show_bug.cgi?id=117010
        <rdar://problem/13689666>

        Reviewed by Tim Horton.

        * UIProcess/API/C/mac/WKContextPrivateMac.h:
        * UIProcess/API/C/mac/WKContextPrivateMac.mm:
        * UIProcess/API/C/mac/WKPagePrivateMac.cpp:
        * UIProcess/API/C/mac/WKPagePrivateMac.h:
        * UIProcess/WebContext.h:
        (WebContext):
        * UIProcess/mac/WebContextMac.mm:
        (WebKit):
        (WebKit::privateBrowsingSession):
        (WebKit::WebContext::isURLKnownHSTSHost):
        (WebKit::WebContext::resetHSTSHosts):

2013-05-29  Tim Horton  <timothy_horton@apple.com>

        WKViews using shouldClipToVisibleRect=YES should respect prepareContentInRect: if called
        https://bugs.webkit.org/show_bug.cgi?id=116989
        <rdar://problem/14007440>

        Reviewed by Anders Carlsson.

        * UIProcess/API/mac/WKView.mm:
        (-[WKView prepareContentInRect:]):
        If prepareContentInRect: is called, save the rect and set a flag so we know we should use it.

        (-[WKView _updateViewExposedRect]):
        Give the WebPage (and later the DrawingArea) the union of the rect handed to prepareContentInRect:
        and the WKView's visibleRect, if we're in that mode, so that applications that do their own scrolling
        can cause tiles to be created in currently offscreen views (for overdraw).

        (-[WKView setFrameSize:]):
        (-[WKView _updateWindowAndViewFrames]):
        (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]):
        (-[WKView enableFrameSizeUpdates]):
        (-[WKView setShouldClipToVisibleRect:]):
        (-[WKView forceAsyncDrawingAreaSizeUpdate:]):
        Use [_updateViewExposedRect].

2013-05-28  Oliver Hunt  <oliver@apple.com>

        Add more accurate activity state tracking
        https://bugs.webkit.org/show_bug.cgi?id=116893

        Reviewed by Gavin Barraclough.

        This extends the logic in WebCore from a Page to Process
        granularity, so we will avoid lowering the child process
        priority if there is active content.  This also plumbs in
        the logic to allow plugins to report that they have done
        something "interesting".  Currently this is somewhat conservative
        but even this is sufficient to fix some stuttering issues
        that we've seen.

        * Shared/ChildProcess.cpp:
        (WebKit::ChildProcess::ChildProcess):
        * Shared/ChildProcess.h:
        (ChildProcess):
        (WebKit::ChildProcess::processSuppressionEnabled):
        (WebKit::ChildProcess::incrementActiveTaskCount):
        (WebKit::ChildProcess::decrementActiveTaskCount):
        * Shared/mac/ChildProcessMac.mm:
        (WebKit):
        (WebKit::ChildProcess::setProcessSuppressionEnabledInternal):
        (WebKit::ChildProcess::setProcessSuppressionEnabled):
        (WebKit::ChildProcess::incrementActiveTaskCount):
        (WebKit::ChildProcess::decrementActiveTaskCount):
        (WebKit::ChildProcess::suspensionHysteresisTimerFired):
        * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
        (WebKit::NPRuntimeObjectMap::NPRuntimeObjectMap):
        (WebKit::NPRuntimeObjectMap::evaluate):
        * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h:
        (WebCore):
        (NPRuntimeObjectMap):
        * WebProcess/Plugins/PluginView.cpp:
        (WebKit::PluginView::PluginView):
        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::incrementActivePageCount):
        (WebKit):
        (WebKit::WebChromeClient::decrementActivePageCount):
        * WebProcess/WebCoreSupport/WebChromeClient.h:
        (WebChromeClient):

2013-05-29  Anders Carlsson  <andersca@apple.com>

        Return earlier if there's no session storage namespace
        https://bugs.webkit.org/show_bug.cgi?id=116984
        <rdar://problem/13976781>

        Reviewed by Tim Horton.

        If we can't find a session storage namespace, return before creating an entry in the m_storageAreasByConnection
        hash map since then we'll crash trying to remove it later.

        * UIProcess/Storage/StorageManager.cpp:
        (WebKit::StorageManager::createSessionStorageMap):

2013-05-29  Martin Robinson  <mrobinson@igalia.com>

        Fix more CMake GTK+ build issues after r150336

        * CMakeLists.txt: We need to allow for setting the WebProcess output name, since
        WebKitGTK+ expects it to be called WebKitWebProcess.
        * PlatformGTK.cmake: No longer set WebProcess_EXECUTABLE_NAME as it's been replaced
        by WebKit2_WebProcess_OUTPUT_NAME.

2013-05-29  Marcelo Lira  <marcelo.lira@openbossa.org>

        [WK2][CoordinatedGraphics][EFL] WKViewUserViewportToContents() function doesn't do what it says
        https://bugs.webkit.org/show_bug.cgi?id=116683

        Reviewed by Noam Rosenthal.

        WKViewUserViewportToContents now converts WebView coordinates to
        page contents coordinates, taking into account factors as content
        scale and scroll, and also device scale.

        The function WKViewUserViewportToScene was added to convert WebView
        coordinates to the coordinates of the canvas/scene where the view
        is drawn, and EwkView was fixed to use it, instead of
        WKViewUserViewportToContents.

        * UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
        (WKViewUserViewportToScene):
        * UIProcess/API/C/CoordinatedGraphics/WKView.h:
        * UIProcess/API/efl/EwkView.cpp:
        (EwkView::createGLSurface):
        * UIProcess/CoordinatedGraphics/WebView.cpp:
        (WebKit::WebView::userViewportToContents):
        (WebKit):
        (WebKit::WebView::userViewportToScene):
        (WebKit::WebView::transformToScene):
        * UIProcess/CoordinatedGraphics/WebView.h:
        (WebView):

2013-05-29  Carlos Garcia Campos  <cgarcia@igalia.com>

        Unreviewed. Fix make distcheck.

        * GNUmakefile.am: Add WebCoreLayerGtk2.a to DISTCLEANFILES.

2013-05-29  Seokju Kwon  <seokju.kwon@gmail.com>

        [GTK] Clean up WebKit2 GNUmakefile.am
        https://bugs.webkit.org/show_bug.cgi?id=116907

        Reviewed by Martin Robinson.

        Removed WebNotificationManagerProxy.messages.in after r150785.

        * GNUmakefile.am:

2013-05-28  Alexey Proskuryakov  <ap@apple.com>

        Freeze when loading a particular page on washingtonpost.com with NetworkProcess enabled
        https://bugs.webkit.org/show_bug.cgi?id=116887
        <rdar://problem/12965959>

        Reviewed by Darin Adler.

        * Shared/cf/ArgumentCodersCF.cpp:
        (CoreIPC::encode):
        (CoreIPC::decode):
        Fix for the bug: use good shared WebCore code to manipulate CFURLs. Also, added
        a FIXME about empty URLs.

        * Shared/API/c/cf/WKURLCF.cpp: (WKURLCreateWithCFURL): Fixed to not use
        CFURLGetString, as that could prevent loading certain resources, like ones with
        curly braces in resource specifiers. We want KURL normalization, not CFURL one.

2013-05-28  Tim Horton  <timothy_horton@apple.com>

        Rendering suppression extension tokens shouldn't be 0, should handle overflow
        https://bugs.webkit.org/show_bug.cgi?id=116886
        <rdar://problem/14004474>

        Reviewed by Darin Adler.

        Don't use invalid HashSet values as tokens, and ensure that
        we're not already using a token before returning it.

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

2013-05-28  Lauro Neto <lauro.neto@openbossa.org>

        [GTK] Connection issues in repeated WebProcess crash/reloads.
        https://bugs.webkit.org/show_bug.cgi?id=115880

        Reviewed by Anders Carlsson.

        When stressing the WebProcess creation/destruction, WebKitGTK can
        often run into socket issues like bad file descriptor errors or
        polling a socket indefinitely.

        Currently WebKitGTK has three places where a socket can be
        closed.

        - childFinishedFunction (in ProcessLauncherGtk.cpp)
        - Connection::platformInvalidate (in ConnectionUnix.cpp)
        - WorkQueue EventSource destruction (in WorkQueueGtk.cpp)

        To avoid these race conditions, socket closing will be handled
        by the event source callback in WorkQueueGtk.cpp.

        * Platform/CoreIPC/unix/ConnectionUnix.cpp:
        (CoreIPC::Connection::platformInvalidate): Do not close the socket
        when the connection is invalidated, the socket event source is
        unregistered in this method and the socket is closed when the
        GSocket associated to the event source is destroyed.
        * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
        (WebKit::ProcessLauncher::launchProcess): Do not monitor child
        process to close the connection on termination. This was needed in
        the past when we used DGRAM sockets, we currently use always
        connection oriented sockets, so that when the other end closes
        the connection we are notified and the connection is invalidated.

2013-05-28  Martin Robinson  <mrobinson@igalia.com>

        Fix GTK+ CMake build

        * PlatformGTK.cmake: After r150336, the name of the WebKit2
        library target is simply "WebKit2."

2013-05-28  Marcelo Lira  <marcelo.lira@openbossa.org>

        [WK2][CoordinatedGraphics] DrawingArea's visible content area must be updated when contents size changes
        https://bugs.webkit.org/show_bug.cgi?id=116845

        Reviewed by Noam Rosenthal.

        * UIProcess/CoordinatedGraphics/WebView.cpp:
        (WebKit::WebView::didChangeContentsSize):

2013-05-28  Noam Rosenthal  <noam@webkit.org>

        [Qt] REGRESSION(r149292): broke scrolling in Qt WK2 desktop mode
        https://bugs.webkit.org/show_bug.cgi?id=116597

        ScrollingCoordinatorCoordinatedGraphics is tailored specifically for
        fixedLayout mode. When fixedLayout is not set, it should be turned off.

        Reviewed by Allan Sandfeld Jensen.

        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
        (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):

2013-05-28  Andreas Kling  <akling@apple.com>

        Document::setFocusedNode() should be setFocusedElement().
        <http://webkit.org/b/116857>

        Reviewed by Antti Koivisto.

        * WebProcess/Plugins/PluginView.cpp:
        (WebKit::PluginView::focusPluginElement):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::focusedPluginViewForFrame):
        (WebKit::WebPage::setInitialFocus):

2013-05-28  Gyuyoung Kim  <gyuyoung.kim@samsung.com>

        [EFL][WK2] Clean up duplicated include files.
        https://bugs.webkit.org/show_bug.cgi?id=116851

        Reviewed by Christophe Dumez.

        Remove some of duplicated include file in ewk files.

        * UIProcess/API/efl/EwkView.h:
        * UIProcess/API/efl/ewk_color_picker.cpp:
        * UIProcess/API/efl/ewk_context_menu.cpp:
        * UIProcess/API/efl/ewk_security_origin_private.h:

2013-05-28  Ryuan Choi  <ryuan.choi@samsung.com>

        [EFL] pc files should have harfbuzz dependency.
        https://bugs.webkit.org/show_bug.cgi?id=116852

        Reviewed by Gyuyoung Kim.

        * efl/ewebkit2.pc.in: Added harfbuzz as Required package.

2013-05-27  Gyuyoung Kim  <gyuyoung.kim@samsung.com>

        [EFL][WK2] Remove unneeded WebCore namespace use in ewk
        https://bugs.webkit.org/show_bug.cgi?id=116707

        Reviewed by Christophe Dumez.

        * UIProcess/API/efl/ewk_security_origin.cpp: Remove "using namespace WebCore".
        * UIProcess/API/efl/ewk_text_checker.cpp: ditto.

2013-05-26  Jon Lee  <jonlee@apple.com>

        [WK2] Notifications clobber each other with multiple processes
        https://bugs.webkit.org/show_bug.cgi?id=116428
        <rdar://problem/13935191>

        Reviewed by Darin Adler.

        With multiple processes, the notification IDs, when passed up to the UI process, can clobber
        each other. To fix this, we need to maintain a global map of notification IDs. This map is
        keyed by its own unique notification ID, and maps to a pair containing the web page ID and that
        web page's ID for the notification.

        Now that we maintain groups of notifications based on the web page, we no longer send IPC messages
        from WebNotificationManager to WebNotificationManagerProxy; instead we send messages to the
        WebPageProxy. This removes the need for WebNotificationManagerProxy to be a message receiver.

        When a page closes, all of the web notifications are cleared out. However, by the time the
        WebPage::close() is called, the connection between WebPage and WebPageProxy is destroyed. Since
        the WebPage is told to close from the UI process anyway, we clear out the notifications separately,
        instead of waiting for a message from the WebPage.

        * UIProcess/Notifications/WebNotificationManagerProxy.h: Update to take into account the
        notification's web page. Remove inheritance of CoreIPC::MessageReceiver. Expose the original message
        handlers as public functions, since they will be called from WebPageProxy. Add a new map that
        associates a global ID with a notification ID that came from a web page.
            There are now two flavors of clearNotifications(). One clears out all notifications associated
        with a web page. This is called when the page is closed. The other clears out a subset of
        notifications associated with a web page. This is called when notifications associated with a sub-frame
        is closed.
        * UIProcess/Notifications/WebNotificationManagerProxy.messages.in: Removed. All messages from
        the web process go to WebPageProxy now.

        * UIProcess/Notifications/WebNotificationManagerProxy.cpp: Update to take into account the
        notification's web page.

        (WebKit::generateGlobalNotificationID): The manager proxy now maintains its own global notification
        ID generator.
        (WebKit::WebNotificationManagerProxy::WebNotificationManagerProxy): The proxy is no longer a
        message receiver. Remove code that registers it as such.

        (WebKit::WebNotificationManagerProxy::show): Refactor to differentiate between the notification ID
        that came from the web process, and the global notification ID the proxy maintains. Add the mapping
        from the global ID to the (web page ID, notification ID) pair.
        (WebKit::WebNotificationManagerProxy::cancel): Refactor to take into consideration the web page.
        (WebKit::WebNotificationManagerProxy::didDestroyNotification): Refactor to take into consideration
        the web page. Fixes a leak where we did not remove the item from the maps. This function is called
        from the web process, when the ScriptExecutionContext is destroyed, so we remove it from our maps
        before we pass the message along to the provider.

        Helper functions that evaluate when a given notification in the map matches the desired parameters.
        (WebKit::pageIDsMatch): The notification is associated with the provided page.
        (WebKit::pageAndNotificationIDsMatch): The notification is associated with the provided page and is
        contained within the list of provided notifications.

        (WebKit::WebNotificationManagerProxy::clearNotifications): Changed to only remove notifications
        associated with the provided web page, and could include a specific list of notifications. This latter
        situation occurs if notifications were associated with an iframe, and that iframe was removed.
        There is an O(n) walk that could be make more efficient using another hash map, but that's overhead
        for a map that should be small in size anyway.

        (WebKit::WebNotificationManagerProxy::providerDidShowNotification): Refactor to take into
        consideration the web page.
        (WebKit::WebNotificationManagerProxy::providerDidClickNotification): Refactor to take into
        consideration the web page.
        (WebKit::WebNotificationManagerProxy::providerDidCloseNotifications): Now we need to comb through
        the list of global IDs and put them in buckets based on the notification's web pages. After that
        is done we can send the DidCloseNotifications() to those pages' processes. There is a possible
        extra optimization here where we group based on the page's process instead, to reduce the number
        of messages sent to processes.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::close): When a web page is closed, we clear the notifications associated
        with the page.
        (WebKit::WebPageProxy::cancelNotification): Forward call to WebNotificationManagerProxy.
        (WebKit::WebPageProxy::clearNotifications): Ditto.
        (WebKit::WebPageProxy::didDestroyNotification): Ditto.
        * UIProcess/WebPageProxy.h:
        * UIProcess/WebPageProxy.messages.in:

        * WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
        * WebProcess/Notifications/WebNotificationManager.cpp:
        (WebKit::WebNotificationManager::cancel):
        (WebKit::WebNotificationManager::clearNotifications):
        (WebKit::WebNotificationManager::didDestroyNotification):
        * WebProcess/Notifications/NotificationPermissionRequestManager.cpp: Remove extraneous include.

        * CMakeLists.txt: Remove WebNotificationManagerProxy.messages.in and related files.
        * DerivedSources.pri: Ditto.
        * DerivedSources.make: Ditto.
        * GNUmakefile.list.am: Ditto.
        * WebKit2.xcodeproj/project.pbxproj: Ditto.

2013-05-27  Tim Horton  <timothy_horton@apple.com>

        Unreviewed build fix take 2.

        * WebProcess/Plugins/PDF/PDFPlugin.mm:

2013-05-27  Tim Horton  <timothy_horton@apple.com>

        Unreviewed build fix.

        * WebProcess/Plugins/PDF/PDFPlugin.mm:

2013-05-27  Tim Horton  <timothy_horton@apple.com>

        PDFPlugin: Main-frame PDFPlugin Accessibility
        https://bugs.webkit.org/show_bug.cgi?id=116563
        <rdar://problem/13458534>

        Reviewed by Sam Weinig.

        * WebProcess/Plugins/PDF/PDFLayerControllerDetails.h:
        Forward-declare a variety of accessibility methods.

        * WebProcess/Plugins/PDF/PDFPlugin.h:
        Add convertFromPDFViewToScreen, boundsOnScreen, accessibilityObject, and
        storage for our accessibility wrapper.
        * WebProcess/Plugins/PDF/PDFPlugin.mm:
        Add WKPDFPluginAccessibilityObject.

        (-[WKPDFPluginAccessibilityObject accessibilityIsIgnored]):
        We want to be included in the accessibility tree.

        (-[WKPDFPluginAccessibilityObject accessibilityAttributeValue:]):
        (-[WKPDFPluginAccessibilityObject accessibilityAttributeValue:forParameter:]):
        Grab values for accessibility attributes from the relevant sources
        (mostly from PDFLayerController).

        (-[WKPDFPluginAccessibilityObject readingModel]): Ditto.
        (-[WKPDFPluginAccessibilityObject accessibilityAttributeNames]):
        (-[WKPDFPluginAccessibilityObject accessibilityParameterizedAttributeNames]):
        (-[WKPDFPluginAccessibilityObject accessibilityActionNames]):
        Return the set of accessibility attributes, actions, and parameterized
        attributes that we support.

        (-[WKPDFPluginAccessibilityObject accessibilityIsAttributeSettable:]):
        (-[WKPDFPluginAccessibilityObject accessibilitySetValue:forAttribute:]):
        Forward some other accessibility methods to PDFLayerController.

        (-[WKPDFPluginAccessibilityObject accessibilityFocusedUIElement]):
        (-[WKPDFPluginAccessibilityObject accessibilityHitTest:]):
        We have no children, so if a hit test makes it to us, it's ours.

        (WebKit::PDFPlugin::PDFPlugin):
        Make a WKPDFPluginAccessibilityObject and hook it up.
        [FIXME: this could use some de-crapifying]

        (WebKit::PDFPlugin::convertFromPluginToPDFView):
        Transform a point from plugin space to PDFLayerController space.

        (WebKit::PDFPlugin::convertFromPDFViewToRootView):
        (WebKit::PDFPlugin::convertFromPDFViewToScreen): Added.
        (WebKit::PDFPlugin::boundsOnScreen):
        Return the PDFPlugin's frame in screen coordinates.

        (WebKit::PDFPlugin::accessibilityObject):
        Return our accessibility wrapper.

        * WebProcess/Plugins/PDF/SimplePDFPlugin.h:
        * WebProcess/Plugins/Plugin.h:
        (WebKit::Plugin::accessibilityObject):
        * WebProcess/Plugins/PluginView.cpp:
        (WebKit::PluginView::accessibilityObject):
        * WebProcess/Plugins/PluginView.h:
        Add accessibilityObject(), to acquire accessibility wrappers from plugins.

        * WebProcess/WebPage/WebPage.h:
        (WebPage): Add accessibilityObjectForMainFramePlugin();
        * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm:
        (-[WKAccessibilityWebPageObject accessibilityRootObjectWrapper]):
        If the main frame has a PluginDocument that has an accessibilityObject,
        use that one instead of the WebPage's.

        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::accessibilityObjectForMainFramePlugin):
        Return the accessibilityObject from the main-frame PluginDocument, if
        there is one.

2013-05-27  Marcelo Lira  <marcelo.lira@openbossa.org>

        [WK2][CoordinatedGraphics] Misuse of DrawingAreaProxy::setVisibleContentsRect() in WebView::updateViewportSize()
        https://bugs.webkit.org/show_bug.cgi?id=116688

        Reviewed by Noam Rosenthal.

        Visible contents area passed to DrawingAreaProxy::setVisibleContentsRect()
        must be calculated including the page scale factor and avoid crossing the
        boundaries of the page contents size. In other words the DrawingArea
        must know the actual dimensions of what it being drawn. If the
        DrawingArea thinks the visible rectangle is bigger than it is, the
        contents will be drawn pixelated and blurry.

        * UIProcess/CoordinatedGraphics/WebView.cpp:
        (WebKit::WebView::didChangeContentsSize):
        (WebKit::WebView::updateViewportSize):
        (WebKit::WebView::visibleContentsSize):
        (WebKit):
        * UIProcess/CoordinatedGraphics/WebView.h:
        (WebKit::WebView::contentsSize):
        (WebView):

2013-05-27  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] WebKitWebView child widgets are not rendered with recent GTK+
        https://bugs.webkit.org/show_bug.cgi?id=116794

        Reviewed by Xan Lopez.

        Since rev d22fd7223c75f4720ddb982c659efb0d8d7543c4 of GTK+ expose
        events are not propagated to child GdkWindows anymore, and child
        widgets are rendered via gtk_container_propagate_draw(). Since all
        our children have its own GdkWindow (auth widget, inspector view
        and windowed plugins) we don't propagate the draw signal making
        them invisible with current GTK+.

        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
        (webkitWebViewBaseDraw): Chain up to the parent draw(), so it's
        propagated to the children. This shouldn't have any effect in
        previous versions of GTK+ because gtk_container_propagate_draw()
        returned early when the child widget had its own GdkWindow.

2013-05-27  Xan Lopez  <xlopez@igalia.com>

        Reset all clients on WebPage close
        https://bugs.webkit.org/show_bug.cgi?id=112334

        Reviewed by Anders Carlsson.

        We do not reset the clients on WebPage::close(), so there's a
        small chance that someone will try to access them after that. This
        won't work and will generally cause runtime warnings, crashes or
        other issues. Reset them all to null to prevent this situation.

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

2013-05-27  Manuel Rego Casasnovas  <rego@igalia.com>

        [GTK] Notify WebProcess in WebKitURISchemeRequest when we fail to read the user InputStream
        https://bugs.webkit.org/show_bug.cgi?id=114347

        Reviewed by Carlos Garcia Campos.

        While processing a WebKitURISchemeRequest if there is any error reading
        the InputStream provided by the user (for example the stream is already
        closed) we have to notify the WebProcess that the request has failed.

        * UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
        (webkitURISchemeRequestReadCallback): Get the error from
        g_input_stream_read_finish() and use it to call
        webkit_uri_scheme_request_finish_error() in order to finish the failing
        WebKitURISchemeRequest properly.
        * UIProcess/API/gtk/tests/TestWebKitWebContext.cpp:
        (testWebContextURIScheme): Modify test to check the new situation using
        an already closed InputStream.

2013-05-27  Carlos Garcia Campos  <cgarcia@igalia.com>

        Unreviewed. Fix make distcheck.

        * GNUmakefile.list.am: Add missing header file.

2013-05-26  Changhun Kang  <temoochin@company100.net>

        The public WK header file should not include WKAPICast.h
        https://bugs.webkit.org/show_bug.cgi?id=115230

        Reviewed by Darin Adler.

        Otherwise, WebKit internal headers are exposed.
        No new tests. No change in behavior.
        * UIProcess/API/C/soup/WKSoupRequestManager.h:
        * UIProcess/soup/WebSoupRequestManagerClient.h:

2013-05-26  Andreas Kling  <akling@apple.com>

        FocusController::setFocusedNode() should be setFocusedElement().
        <http://webkit.org/b/116780>

        Reviewed by Antti Koivisto.

        * WebProcess/Plugins/PluginView.cpp:
        (WebKit::PluginView::focusPluginElement):

2013-05-25  Andreas Kling  <akling@apple.com>

        PluginDocument::pluginNode() should be pluginElement() instead.
        <http://webkit.org/b/116774>

        Reviewed by Anders Carlsson.

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

2013-05-25  Simon Fraser  <simon.fraser@apple.com>

        Unprefix Page Visibility API
        https://bugs.webkit.org/show_bug.cgi?id=102340

        Reviewed by Tim Horton.
        
        Renaming of the "preview" state to "unloaded".

        * Shared/API/c/WKPageVisibilityTypes.h:
        * Shared/API/c/WKSharedAPICast.h:
        (WebKit::toPageVisibilityState):

2013-05-25  Andreas Kling  <akling@apple.com>

        Move Node::isMouseFocusable() to Element.
        <http://webkit.org/b/116762>

        Reviewed by Anders Carlsson.

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

            Check that the potentially activated Node is an Element before asking if it's mouse-focusable.

2013-05-25  Andreas Kling  <akling@apple.com>

        REGRESSION: WebProcess is terminated when all Safari windows are closed.
        <rdar://problem/13990901>
        <http://webkit.org/b/116766>

        Reviewed by Alexey Proskuryakov.

        When closing the last page, only disconnect the web process if we're using a network process.
        Otherwise there might be session state in the web process getting lost.

        * UIProcess/WebProcessProxy.cpp:
        (WebKit::WebProcessProxy::removeWebPage):

2013-05-25  Santosh Mahto  <santosh.ma@samsung.com>

        WebFrameProxy::didFailLoad clears frame title for no apparent reason
        https://bugs.webkit.org/show_bug.cgi?id=116655

        Reviewed by Alexey Proskuryakov.

        * UIProcess/WebFrameProxy.cpp:
        (WebKit::WebFrameProxy::didFailLoad):

2013-05-24  Seokju Kwon  <seokju.kwon@gmail.com>

        [Qt][GTK] Build fix after r150669
        https://bugs.webkit.org/show_bug.cgi?id=116751

        Reviewed by Christophe Dumez.

        * GNUmakefile.list.am:
        * Target.pri:
        * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
        (WebKit::WebEditorClient::getEditorCommandsForKeyEvent):

2013-05-24  Seokju Kwon  <seokju.kwon@gmail.com>

        [EFL] Build fix after r150669
        https://bugs.webkit.org/show_bug.cgi?id=116750

        Reviewed by Anders Carlsson.

        * CMakeLists.txt:
        * WebProcess/Battery/WebBatteryManager.cpp:
        (WebKit::WebBatteryManager::registerWebPage):
        (WebKit::WebBatteryManager::unregisterWebPage):
        * WebProcess/NetworkInfo/WebNetworkInfoManager.cpp:
        (WebKit::WebNetworkInfoManager::registerWebPage):
        (WebKit::WebNetworkInfoManager::unregisterWebPage):
        (WebKit::WebNetworkInfoManager::bandwidth):
        (WebKit::WebNetworkInfoManager::metered):
        * WebProcess/WebCoreSupport/WebVibrationClient.cpp:
        (WebKit::WebVibrationClient::vibrate):
        (WebKit::WebVibrationClient::cancelVibration):
        * WebProcess/soup/WebSoupRequestManager.cpp:
        (WebKit::WebSoupRequestManager::didReceiveURIRequestData):
        (WebKit::WebSoupRequestManager::send):

2013-05-24  Anders Carlsson  <andersca@apple.com>

        MessageSender shouldn't be a class template
        https://bugs.webkit.org/show_bug.cgi?id=116743

        Reviewed by Andreas Kling.

        Change MessageSender to be a proper abstract base class. Subclasses of MessageSender must
        implement messageSenderConnection() as well as messageSenderDestinationID().

        This reduces code size and will allow us to be more flexible with MessageSender in the future.

        * NetworkProcess/NetworkResourceLoader.cpp:
        (WebKit::NetworkResourceLoader::sendAbortingOnFailure):
        (WebKit::NetworkResourceLoader::messageSenderConnection):
        (WebKit):
        (WebKit::NetworkResourceLoader::messageSenderDestinationID):
        * NetworkProcess/NetworkResourceLoader.h:
        (NetworkResourceLoader):
        * NetworkProcess/mac/DiskCacheMonitor.h:
        (DiskCacheMonitor):
        * NetworkProcess/mac/DiskCacheMonitor.mm:
        (WebKit::DiskCacheMonitor::messageSenderConnection):
        (WebKit::DiskCacheMonitor::messageSenderDestinationID):
        (WebKit):
        * Platform/CoreIPC/MessageSender.h:
        (CoreIPC):
        (MessageSender):
        (CoreIPC::MessageSender::send):
        (CoreIPC::MessageSender::sendSync):
        * Shared/ChildProcess.cpp:
        (WebKit::ChildProcess::messageSenderConnection):
        (WebKit):
        (WebKit::ChildProcess::messageSenderDestinationID):
        * Shared/ChildProcess.h:
        (ChildProcess):
        * Shared/Downloads/Download.cpp:
        (WebKit::Download::messageSenderConnection):
        (WebKit):
        (WebKit::Download::messageSenderDestinationID):
        * Shared/Downloads/Download.h:
        (Download):
        * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm:
        (WebKit::CustomProtocolManager::initialize):
        * Shared/WebConnection.h:
        (WebConnection):
        * Shared/mac/SecItemShim.cpp:
        (WebKit::sendSecItemRequest):
        * UIProcess/WebConnectionToWebProcess.cpp:
        (WebKit::WebConnectionToWebProcess::hasValidConnection):
        (WebKit::WebConnectionToWebProcess::messageSenderConnection):
        (WebKit::WebConnectionToWebProcess::messageSenderDestinationID):
        * UIProcess/WebConnectionToWebProcess.h:
        (WebConnectionToWebProcess):
        * WebKit2.xcodeproj/project.pbxproj:
        * WebProcess/Geolocation/WebGeolocationManager.cpp:
        (WebKit::WebGeolocationManager::registerWebPage):
        (WebKit::WebGeolocationManager::unregisterWebPage):
        * WebProcess/IconDatabase/WebIconDatabaseProxy.cpp:
        (WebKit::WebIconDatabaseProxy::retainIconForPageURL):
        (WebKit::WebIconDatabaseProxy::releaseIconForPageURL):
        (WebKit::WebIconDatabaseProxy::synchronousIconForPageURL):
        (WebKit::WebIconDatabaseProxy::loadDecisionForIconURL):
        (WebKit::WebIconDatabaseProxy::setIconURLForPageURL):
        (WebKit::WebIconDatabaseProxy::setIconDataForIconURL):
        * WebProcess/InjectedBundle/InjectedBundle.cpp:
        (WebKit::InjectedBundle::postMessage):
        (WebKit::InjectedBundle::postSynchronousMessage):
        * WebProcess/Network/WebResourceLoader.cpp:
        (WebKit::WebResourceLoader::messageSenderConnection):
        (WebKit::WebResourceLoader::messageSenderDestinationID):
        * WebProcess/Network/WebResourceLoader.h:
        (WebResourceLoader):
        * WebProcess/Notifications/WebNotificationManager.cpp:
        (WebKit::WebNotificationManager::show):
        (WebKit::WebNotificationManager::cancel):
        (WebKit::WebNotificationManager::clearNotifications):
        (WebKit::WebNotificationManager::didDestroyNotification):
        * WebProcess/Plugins/PDF/PDFPlugin.mm:
        (WebKit::PDFPlugin::writeItemsToPasteboard):
        * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
        (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
        * WebProcess/Storage/StorageAreaMap.cpp:
        (WebKit::StorageAreaMap::StorageAreaMap):
        (WebKit::StorageAreaMap::~StorageAreaMap):
        (WebKit::StorageAreaMap::setItem):
        (WebKit::StorageAreaMap::removeItem):
        (WebKit::StorageAreaMap::clear):
        (WebKit::StorageAreaMap::loadValuesIfNeeded):
        * WebProcess/WebConnectionToUIProcess.cpp:
        (WebKit::WebConnectionToUIProcess::hasValidConnection):
        (WebKit::WebConnectionToUIProcess::messageSenderConnection):
        (WebKit::WebConnectionToUIProcess::messageSenderDestinationID):
        * WebProcess/WebConnectionToUIProcess.h:
        (WebConnectionToUIProcess):
        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::windowRect):
        (WebKit::WebChromeClient::focusedFrameChanged):
        (WebKit::WebChromeClient::createWindow):
        (WebKit::WebChromeClient::toolbarsVisible):
        (WebKit::WebChromeClient::statusbarVisible):
        (WebKit::WebChromeClient::menubarVisible):
        (WebKit::WebChromeClient::runBeforeUnloadConfirmPanel):
        (WebKit::WebChromeClient::runJavaScriptAlert):
        (WebKit::WebChromeClient::runJavaScriptConfirm):
        (WebKit::WebChromeClient::runJavaScriptPrompt):
        (WebKit::WebChromeClient::shouldInterruptJavaScript):
        (WebKit::WebChromeClient::exceededDatabaseQuota):
        * WebProcess/WebCoreSupport/WebColorChooser.cpp:
        (WebKit::WebColorChooser::WebColorChooser):
        (WebKit::WebColorChooser::setSelectedColor):
        (WebKit::WebColorChooser::endChooser):
        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::dispatchDidReceiveIcon):
        (WebKit::WebFrameLoaderClient::updateGlobalHistory):
        (WebKit::WebFrameLoaderClient::updateGlobalHistoryRedirectLinks):
        (WebKit::WebFrameLoaderClient::setTitle):
        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
        (WebKit::WebPlatformStrategies::populatePluginCache):
        (WebKit::WebPlatformStrategies::getTypes):
        (WebKit::WebPlatformStrategies::bufferForType):
        (WebKit::WebPlatformStrategies::getPathnamesForType):
        (WebKit::WebPlatformStrategies::stringForType):
        (WebKit::WebPlatformStrategies::copy):
        (WebKit::WebPlatformStrategies::changeCount):
        (WebKit::WebPlatformStrategies::uniqueName):
        (WebKit::WebPlatformStrategies::color):
        (WebKit::WebPlatformStrategies::url):
        (WebKit::WebPlatformStrategies::addTypes):
        (WebKit::WebPlatformStrategies::setTypes):
        (WebKit::WebPlatformStrategies::setBufferForType):
        (WebKit::WebPlatformStrategies::setPathnamesForType):
        (WebKit::WebPlatformStrategies::setStringForType):
        * WebProcess/WebCoreSupport/WebPopupMenu.cpp:
        (WebKit::WebPopupMenu::show):
        (WebKit::WebPopupMenu::hide):
        * WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp:
        (WebKit::WebSearchPopupMenu::saveRecentSearches):
        (WebKit::WebSearchPopupMenu::loadRecentSearches):
        * WebProcess/WebPage/EventDispatcher.cpp:
        (WebKit::EventDispatcher::sendDidReceiveEvent):
        * WebProcess/WebPage/WebBackForwardListProxy.cpp:
        (WebKit::updateBackForwardItem):
        (WebKit::WebBackForwardListProxy::itemAtIndex):
        (WebKit::WebBackForwardListProxy::backListCount):
        (WebKit::WebBackForwardListProxy::forwardListCount):
        * WebProcess/WebPage/WebInspector.cpp:
        (WebKit::WebInspector::createInspectorPage):
        (WebKit::WebInspector::didClose):
        (WebKit::WebInspector::bringToFront):
        (WebKit::WebInspector::inspectedURLChanged):
        (WebKit::WebInspector::save):
        (WebKit::WebInspector::append):
        (WebKit::WebInspector::attachBottom):
        (WebKit::WebInspector::attachRight):
        (WebKit::WebInspector::detach):
        (WebKit::WebInspector::setAttachedWindowHeight):
        (WebKit::WebInspector::setAttachedWindowWidth):
        (WebKit::WebInspector::setToolbarHeight):
        (WebKit::WebInspector::updateDockingAvailability):
        (WebKit::WebInspector::sendMessageToRemoteFrontend):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::messageSenderConnection):
        (WebKit):
        (WebKit::WebPage::messageSenderDestinationID):
        * WebProcess/WebPage/WebPage.h:
        (WebPage):
        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::executeKeypressCommandsInternal):
        (WebKit::WebPage::handleEditingKeyboardEvent):
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::ensureNetworkProcessConnection):
        (WebKit::WebProcess::shouldTerminate):

2013-05-24  Tim Horton  <timothy_horton@apple.com>

        Animated GIFs don't repaint after TiledCoreAnimationDrawingArea un-suspends painting
        https://bugs.webkit.org/show_bug.cgi?id=116744
        <rdar://problem/13973514>

        Reviewed by Simon Fraser.

        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
        (WebKit::TiledCoreAnimationDrawingArea::resumePainting):
        Force WebCore to repaint animated images when painting is resumed.

2013-05-24  Christophe Dumez  <ch.dumez@sisa.samsung.com>

        Remove custom code for webkitAudioContext global constructor getter
        https://bugs.webkit.org/show_bug.cgi?id=116530

        Reviewed by Geoffrey Garen.

        Use RuntimeEnabledFeatures instead of WebCore Settings to toggle Web Audio support.

        * WebProcess/InjectedBundle/InjectedBundle.cpp:
        (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences):

2013-05-24  Thomas Deniau  <deniau@apple.com>

        Add more lines to the context during Dictionary lookups
        https://bugs.webkit.org/show_bug.cgi?id=115256

        Reviewed by Ryosuke Niwa.

        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::performDictionaryLookupAtLocation):
        Instead of using the current paragraph as the context (which stops at
        line breaks), get a few lines before and after the point, so that the
        context contains at least four lines in each direction.
        This way the Dictionary will be able to look up things that extend past
        the current line.

2013-05-24  Anders Carlsson  <andersca@apple.com>

        Intermittent crash when typing in Address Bar
        https://bugs.webkit.org/show_bug.cgi?id=116728
        <rdar://problem/13976781>

        Reviewed by Sam Weinig.

        If a web process connection has been removed from the storage manager because we disconnected it
        since there were no more active pages associated with the web process, we'll fail to find it here
        so just return early instead of crashing.

        * UIProcess/Storage/StorageManager.cpp:
        (WebKit::StorageManager::destroyStorageMap):

2013-05-24  Andreas Kling  <akling@apple.com>

        Typing in Safari's unified field causes unnecessary web content repaints.
        <http://webkit.org/b/116703>

        Reviewed by Andy Estes.

        * WebProcess/WebPage/FindController.cpp:
        (WebKit::FindController::countStringMatches):

            Call WebCore::Page::countMatchesForText() instead of markAllMatchesForText(). If the search string
            is found inside the page content, the renderer containing that text will no longer be repainted.

2013-05-23  Ryuan Choi  <ryuan.choi@samsung.com>

        [WK2][EFL][QT] Build break after r150610
        https://bugs.webkit.org/show_bug.cgi?id=116699

        Reviewed by Csaba Osztrogonác.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::findPlugin): Initialized pluginProcessSandboxPolicy.

2013-05-23  Anders Carlsson  <andersca@apple.com>

        Shim Flash plug-in to allow its updater to run
        https://bugs.webkit.org/show_bug.cgi?id=116692
        <rdar://problem/13938510>

        Reviewed by Sam Weinig.

        * PluginProcess/PluginProcess.h:
        * PluginProcess/mac/PluginProcessMac.mm:
        (WebKit::replacedNSConcreteTask_launch):
        (WebKit::initializeCocoaOverrides):
        Patch -[NSConcreteTask launch] to call PluginProcess::launchProcess.

        (WebKit::PluginProcess::launchProcess):
        Send a LaunchProcess message to the UI process.

        * UIProcess/Plugins/PluginProcessProxy.cpp:
        * UIProcess/Plugins/PluginProcessProxy.h:
        Remove PluginProcessProxy::didReceiveMessage.

        (PluginProcessProxy):
        * UIProcess/Plugins/PluginProcessProxy.messages.in:
        Add LaunchProcess message and remove LegacyReceiver attribute.

        * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
        (WebKit::isFlashUpdater):
        Helper function to determine whether the process is the flash updater.

        (WebKit::shouldLaunchProcess):
        Return whether we should launch this process.

        (WebKit::PluginProcessProxy::launchProcess):
        Determine if we should launch this process and then do so.

2013-05-23  Anders Carlsson  <andersca@apple.com>

        Don't run all plug-ins unsandboxed
        https://bugs.webkit.org/show_bug.cgi?id=116690
        <rdar://problem/13975569>

        Reviewed by Jessie Berlin.

        Remove debugging code.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::findPlugin):

2013-05-23  Anders Carlsson  <andersca@apple.com>

        Crash in convertMainResourceLoadToDownload when downloading file by option-return
        https://bugs.webkit.org/show_bug.cgi?id=116451

        Reviewed by Andreas Kling.

        If the main resource loader is null, create a new download instead since there's no existing loader to convert.

        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
        (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
        * WebProcess/WebPage/WebFrame.cpp:
        (WebKit::WebFrame::convertMainResourceLoadToDownload):

2013-05-22  Alexey Proskuryakov  <ap@apple.com>

        <rdar://problem/13849260> Sandbox violations reading .CFUserTextEncoding

        Reviewed by Dan Bernstein.

        * WebProcess/com.apple.WebProcess.sb.in: Allow this.

2013-05-23  Gavin Barraclough  <barraclough@apple.com>

        Move posix_spawn onto a zero delay timer
        https://bugs.webkit.org/show_bug.cgi?id=116682

        Reviewed by Anders Carlson.

        <rdar://problem/13973468>

        * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
        (ReexecInfo):
            - struct to hold info from the XPC message.
        (WebKit::reexec):
            - moved call to posix_spawn out to this helper.
        (WebKit::reexecCallBack):
            - calls reexec.
        (WebKit::XPCServiceEventHandler):
            - removed call to posix_spawn; schedule a call to reexecCallBack.

2013-05-23  Csaba Osztrogonác  <ossy@webkit.org>

        [cmake] Fix generating-forwarding-headers rule after r150460
        https://bugs.webkit.org/show_bug.cgi?id=116659

        Reviewed by Christophe Dumez.

        * CMakeLists.txt: Typo fix.

2013-05-23  Anton Obzhirov  <a.obzhirov@samsung.com>

        [GTK] Remote Web Inspector sometimes won't serve any content
        https://bugs.webkit.org/show_bug.cgi?id=116225

        Reviewed by Gustavo Noronha Silva.

        Added an option to use environment variable to set up path to
        inspector server files. Implementation is similar to InspectorClientGtk
        implementation.

        * UIProcess/InspectorServer/WebInspectorServer.h:
        (WebInspectorServer):
        * UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp:
        (WebKit::WebInspectorServer::platformResourceForPath):
        (WebKit::WebInspectorServer::inspectorServerFilesPath):
        (WebKit):

2013-05-23  Gyuyoung Kim  <gyuyoung.kim@samsung.com>

        [EFL][WK2] Use WK2 C API in ewk_view_pagination_mode_set|get
        https://bugs.webkit.org/show_bug.cgi?id=116657

        Reviewed by Christophe Dumez.

        WKPageGet|SetPaginationMode APIs is present in WK2 C APIs. So, we need to use them for
        ewk_view_pagination_mode_set|get.

        Besides we don't need to use WebCore namespace anymore.

        * UIProcess/API/efl/ewk_view.cpp:
        (ewk_view_pagination_mode_set):
        (ewk_view_pagination_mode_get):

2013-05-23  Roland Takacs  <rtakacs@inf.u-szeged.hu>

        Support frame instrumentation for coordinated graphics
        https://bugs.webkit.org/show_bug.cgi?id=115260

        Reviewed by Andreas Kling.

        Enabled supportsFrameInstrumentation on ports that use coordinated graphics
        by calling didBeginFrame().

        * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
        (WebKit::WebInspectorClient::supportsFrameInstrumentation):
        (WebKit):
        * WebProcess/WebCoreSupport/WebInspectorClient.h:
        (WebInspectorClient):
        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
        (WebKit::CoordinatedLayerTreeHost::syncDisplayState):

2013-05-22  Dean Jackson  <dino@apple.com>

        Don't snapshot plugins that can't be snapshotted
        https://bugs.webkit.org/show_bug.cgi?id=116490

        Reviewed by Tim Horton.

        Some plugins, such as QuickTime, don't support snapshotting. We're
        planning on another way to capture snapshots, but in the meantime make
        sure that they don't fail to initialise because they were told to
        not use accelerated rendering.

        Expose a new message on the plugins so that they can tell the PluginView
        if they support snapshotting or not.

        * PluginProcess/PluginControllerProxy.cpp:
        (WebKit::PluginControllerProxy::supportsSnapshotting): New method.
        * PluginProcess/PluginControllerProxy.h: Ditto.
        * PluginProcess/PluginControllerProxy.messages.in: Message signature.

        * WebProcess/Plugins/Netscape/NetscapePlugin.h: Add supportsSnapshotting.
        * WebProcess/Plugins/PDF/SimplePDFPlugin.h: Ditto.
        * WebProcess/Plugins/Plugin.h: Ditto - pure virtual here.

        * WebProcess/Plugins/PluginProxy.cpp:
        (WebKit::PluginProxy::supportsSnapshotting): Send the message to the plugin process and return the results.
        * WebProcess/Plugins/PluginProxy.h:

        * WebProcess/Plugins/PluginView.cpp:
        (WebKit::PluginView::didInitializePlugin): If the snapshotting plugin has a layer, make
            sure to add it to the tree.
        (WebKit::PluginView::isAcceleratedCompositingEnabled): Snapshotting plugins can use
            accelerated compositing, just like normal plugins.
        (WebKit::PluginView::pluginSnapshotTimerFired): If the plugin doesn't allow snapshotting,
            immediately restart it.

2013-05-22  Anders Carlsson  <andersca@apple.com>

        Fix crash when closing a page that's trying to access session storage
        https://bugs.webkit.org/show_bug.cgi?id=116634
        <rdar://problem/13904054>

        Reviewed by Geoffrey Garen.

        It is possible for the StorageManager to get messages from a web page that has already been closed by the UI process.
        If that happens, just ignore the messages.

        * UIProcess/Storage/StorageManager.cpp:
        (WebKit::StorageManager::createSessionStorageMap):
        (WebKit::StorageManager::getValues):
        (WebKit::StorageManager::setItem):
        (WebKit::StorageManager::removeItem):
        (WebKit::StorageManager::clear):
        (WebKit::StorageManager::destroySessionStorageNamespaceInternal):

2013-05-22  Alexey Proskuryakov  <ap@apple.com>

        Crashes in NetworkProcess due to incorrect private browsing session tracking
        https://bugs.webkit.org/show_bug.cgi?id=116628

        Reviewed by Brady Eidson.

        The current API for private browsing makes it extremely difficult to track sessions.
        Private browsing is enabled via WKPreferences, but the session is shared, so it
        has to be maintained while there is any chance that any page group anywhere still
        needs it.

        This patch fixes some of the issues, but ultimately, I think that we'll just need
        to deprecate and replace the API.

        * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::storageSession):
        There are valid scenarios where privateBrowsingEnabled is true, but there is no
        private browsing session. Handle that without crashing, although this unfortunately
        means that it will be harder to spot logic errors when using a wrong session.
        (WebKit::NetworkConnectionToWebProcess::registerBlobURL): Removed an obsolete FIXME.

        * NetworkProcess/mac/RemoteNetworkingContext.h: Changed privateBrowsingSession()
        to return a pointer, as no caller could know when it was safe to call it.

        * NetworkProcess/mac/RemoteNetworkingContext.mm:
        (WebKit::RemoteNetworkingContext::storageSession): Handle the case where private
        browsing session is unexpectedly missing without crashing.
        (WebKit::RemoteNetworkingContext::privateBrowsingSession): Changed to return a pointer.

        * UIProcess/WebContext.cpp: (WebKit::WebContext::ensureNetworkProcess):
        Actually initialize privateBrowsingEnabled creation parameter. It would be very
        difficult to figure out 100% reliably whether NetworkProcess needs a private browsing
        session with the current API, but for existing clients, looking at
        m_privateBrowsingEnterCount is good enough. Certainly better than not initializing.

        * WebProcess/InjectedBundle/InjectedBundle.cpp:
        (WebKit::InjectedBundle::setPrivateBrowsingEnabled): Added a FIXME.

2013-05-22  Tim Horton  <timothy_horton@apple.com>

        [wk2] Should be able to make tiled WKViews clip to the view's exposed rect without using autolayout
        https://bugs.webkit.org/show_bug.cgi?id=116625
        <rdar://problem/13962816>

        Reviewed by Anders Carlsson.

        The two modes are not dependent; it should be possible to enable
        clips-to-exposed-rect without using autolayout. This enables apps to
        make very large tiled WKViews that don't create tiles for the whole
        area of the view (and also disables scrolling, since that is currently
        incompatible with clipping to the exposed rect).

        * UIProcess/API/mac/WKView.mm:
        (-[WKView setFrameSize:]):
        (-[WKView _updateWindowAndViewFrames]):
        (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]):
        (-[WKView enableFrameSizeUpdates]):
        (-[WKView forceAsyncDrawingAreaSizeUpdate:]):
        Rename _expandsToFitContentViaAutoLayout to _clipsToVisibleRect for accuracy.

        (-[WKView setMinimumWidthForAutoLayout:]):
        Factor clips-to-sisible-rect toggle out into setShouldClipToVisibleRect.

        (-[WKView shouldClipToVisibleRect]):
        (-[WKView setShouldClipToVisibleRect:]):
        Allow setting clips-to-visible-rect without autolayout.

        * UIProcess/API/mac/WKViewPrivate.h:
        Add shouldClipToVisibleRect property.

2013-05-22  Alexey Proskuryakov  <ap@apple.com>

        Remove unused private browsing override support
        <rdar://problem/11969491>

        Rubber-stamped by Sam Weinig.

        Private browsing override is unused, and it complicates tracking of private
        browsing sessions in UI process (in fact, it doesn't plug into this tracking at all,
        so we would just assert if we used the API).

        * Shared/WebPageCreationParameters.cpp:
        (WebKit::WebPageCreationParameters::encode):
        (WebKit::WebPageCreationParameters::decode):
        * Shared/WebPageCreationParameters.h:
        * UIProcess/API/C/WKPage.cpp:
        * UIProcess/API/C/WKPagePrivate.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::WebPageProxy):
        (WebKit::WebPageProxy::creationParameters):
        * UIProcess/WebPageProxy.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::WebPage):
        (WebKit::WebPage::updatePreferences):
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in:

2013-05-22  Michał Pakuła vel Rutka  <m.pakula@samsung.com>

        [EFL][WK2] Change Ewk_Context_Menu_Item's parent menu to raw pointer
        https://bugs.webkit.org/show_bug.cgi?id=116549

        Reviewed by Christophe Dumez.

        A context menu item should have only a pointer to parent menu instead
        of owning parent menu.

        * UIProcess/API/efl/ewk_context_menu_item.cpp:
        (EwkContextMenuItem::EwkContextMenuItem):
        * UIProcess/API/efl/ewk_context_menu_item_private.h:
        (EwkContextMenuItem::create):
        (EwkContextMenuItem::parentMenu):
        (EwkContextMenuItem):

2013-05-22  Csaba Osztrogonác  <ossy@webkit.org>

        [Qt][WK2] Unreviewed buildfix after r150484.

        * UIProcess/Plugins/qt/PluginProcessProxyQt.cpp:
        (WebKit::PluginProcessProxy::platformGetLaunchOptions):

2013-05-21  Andreas Kling  <akling@apple.com>

        REGRESSION(r150491): WebKit2.CloseThenTerminate asserting below WebContext::disconnectProcess().
        <http://webkit.org/b/116588>

        Reviewed by Sam Weinig.

        Do an early return from WebProcessProxy::requestTermination() if there is no child process
        connection to terminate.

        * UIProcess/WebProcessProxy.cpp:
        (WebKit::WebProcessProxy::requestTermination):

2013-05-21  Mark Rowe  <mrowe@apple.com>

        <rdar://problem/13915556> Sluggish scrolling in web content

        Reviewed by Gavin Barraclough.

        * Shared/mac/ChildProcessMac.mm:
        (WebKit::ChildProcess::setProcessSuppressionEnabled): When process suppression is disabled, low latency is important.

2013-05-21  Gyuyoung Kim  <gyuyoung.kim@samsung.com>

        Fix build break after r150484

        Unreviewed, fix build break on EFL, GTK.

        * UIProcess/Plugins/PluginInfoStore.cpp:
        (WebKit::PluginInfoStore::defaultLoadPolicyForPlugin):
        * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
        (WebKit::PluginProcessProxy::platformGetLaunchOptions):

2013-05-21  Andreas Kling  <akling@apple.com>

        PPT: Closing tab that is hung or chewing 100% CPU leaves abandoned WebProcess.
        <http://webkit.org/b/116464>
        <rdar://problem/10103795>

        Reviewed by Anders Carlsson.

        Simplify the web process sacrifice ritual. Instead of murderizing the process when its last tab closes,
        just shut down the CoreIPC connection from the UI process. The web process, upon noticing this,
        will start a 10 second watchdog timer, and if it hasn't shut down by the time it fires, well, it'll shut down.

        (WebKit::WebProcessProxy::removeWebPage):

            When the last page is removed from a WebProcessProxy, disconnect the process so that it'll die off
            eventually, even if the WebPage::Close message never gets properly handled.

        * Shared/ChildProcessProxy.h:
        * Shared/ChildProcessProxy.cpp:
        (WebKit::ChildProcessProxy::abortProcessLaunchIfNeeded):

            Added a helper to abort any in-progress launch of a new web process. Otherwise we'll have a race
            where the exiting web process may get re-used for a new tab.

        * UIProcess/WebProcessProxy.h:
        * UIProcess/WebProcessProxy.cpp:
        (WebKit::WebProcessProxy::WebProcessProxy):
        (WebKit::WebProcessProxy::enableSuddenTermination):
        (WebKit::WebProcessProxy::disableSuddenTermination):

            Remove WebProcessProxy's sudden termination counter. The web process will do what it needs in
            response to the WebPage::Close message. We still forward these calls to NSProcessInfo on Mac though.

2013-05-21  Anders Carlsson  <andersca@apple.com>

        Fix build.

        * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
        (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
        Stop using lambdas :(

2013-05-21  Anders Carlsson  <andersca@apple.com>

        Provide an API to run sandboxed plug-ins outside of their sandbox
        https://bugs.webkit.org/show_bug.cgi?id=116578

        Reviewed by Andreas Kling.

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

        * PluginProcess/EntryPoint/mac/LegacyProcess/PluginProcessMain.mm:
        (WebKit::PluginProcessMainDelegate::getExtraInitializationData):
        Handle "disable-sandbox".

        * PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm:
        (WebKit::PluginServiceInitializerDelegate::getExtraInitializationData):
        Handle "disable-sandbox".
        
        * PluginProcess/PluginProcess.h:
        Move Type to PluginProcessAttributes and remove hash traits for type.
        
        * PluginProcess/mac/PluginProcessMac.mm:
        (WebKit::PluginProcess::platformInitializePluginProcess):
        Update for new type name.

        (WebKit::PluginProcess::initializeSandbox):
        Return early if the sandbox is disabled.

        * Shared/Plugins/Netscape/PluginInformation.cpp:
        (WebKit::getPluginModuleInformation):
        PluginInfoStore::policyForPlugin has been renamed to PluginInfoStore::defaultLoadPolicyForPlugin.

        * Shared/Plugins/PluginModuleInfo.h:
        Add PluginModuleLoadUnsandboxed.

        * Shared/Plugins/PluginProcessAttributes.h: Added.
        Add new header with various plug-in process attributes.

        * Shared/Plugins/PluginProcessCreationParameters.h:
        Change type enum.

        * UIProcess/API/C/WKAPICast.h:
        (WebKit::toWKPluginLoadPolicy):
        (WebKit::toPluginModuleLoadPolicy):
        Handle the unsandboxed enum.

        * UIProcess/API/C/WKPage.h:
        Add kWKPluginLoadPolicyLoadUnsandboxed.

        * UIProcess/Plugins/PluginInfoStore.h:
        Rename policyForPlugin to defaultLoadPolicyForPlugin.

        * UIProcess/Plugins/PluginProcessManager.cpp:
        (WebKit::PluginProcessManager::pluginProcessToken):
        Add new helper function for getting a token given plug-in attributes.

        (WebKit::PluginProcessManager::getPluginProcessConnection):
        This now takes a pluginProcessToken.

        (WebKit::PluginProcessManager::getSitesWithData):
        Make sure to call pluginProcessToken.

        (WebKit::PluginProcessManager::clearSiteData):
        Ditto.

        (WebKit::PluginProcessManager::getOrCreatePluginProcess):
        This now takes a token.

        * UIProcess/Plugins/PluginProcessProxy.cpp:
        (WebKit::PluginProcessProxy::create):
        (WebKit::PluginProcessProxy::PluginProcessProxy):
        Pass the PluginProcessAttributes as well as the plug-in process token.

        (WebKit::PluginProcessProxy::getLaunchOptions):
        Pass the plug-in process attributes to platformGetLaunchOptions.

        (WebKit::PluginProcessProxy::didClose):
        Pass the token to PluginProcessCrashed.

        (WebKit::PluginProcessProxy::didFinishLaunching):
        Update for type change.

        * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
        (WebKit::shouldBlockPlugin):
        (WebKit::PluginInfoStore::defaultLoadPolicyForPlugin):
        Rename policyForPlugin to defaultLoadPolicyForPlugin.

        * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
        (WebKit::PluginProcessProxy::platformGetLaunchOptions):
        Set the "disable-sandbox" data if needed.

        (WebKit::PluginProcessProxy::platformInitializePluginProcess):
        (WebKit::PluginProcessProxy::openPluginPreferencePane):
        Get the module info from m_pluginProcessAttributes.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::findPlugin):
        This now returns a token.

        * UIProcess/WebPageProxy.messages.in:
        FindPlugin now returns a token instead of the path.

        * UIProcess/WebProcessProxy.cpp:
        (WebKit::WebProcessProxy::getPluginProcessConnection):
        Pass the token to the plug-in process manager.

        * UIProcess/WebProcessProxy.messages.in:
        This now takes a token.

        * WebKit2.xcodeproj/project.pbxproj:
        Add new files.

        * WebProcess/Plugins/PluginProcessConnection.cpp:
        (WebKit::PluginProcessConnection::PluginProcessConnection):
        This now takes a token.

        * WebProcess/Plugins/PluginProcessConnection.h:
        (WebKit::PluginProcessConnection::create):
        (WebKit::PluginProcessConnection::pluginProcessToken):
        Create this with a token instead of a path and process type.

        * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
        (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
        This now takes a token.

        (WebKit::PluginProcessConnectionManager::pluginProcessCrashed):
        Ditto.

        * WebProcess/Plugins/PluginProcessConnectionManager.messages.in:
        PluginProcessCrashed now takes a token.

        * WebProcess/Plugins/PluginProxy.cpp:
        (WebKit::PluginProxy::create):
        (WebKit::PluginProxy::PluginProxy):
        These now take tokens.

        (WebKit::PluginProxy::initialize):
        Pass the token when getting the connection.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::createPlugin):
        Get the token from the UI process and pass it to the PluginProxy.

        (WebKit::WebPage::canPluginHandleResponse):
        Update now that FindPlugin returns a token.

2013-05-21  Martin Robinson  <mrobinson@igalia.com>

        [GTK] [CMake] Add support for building WebKit2
        https://bugs.webkit.org/show_bug.cgi?id=116372

        Reviewed by Gustavo Noronha Silva.

        * CMakeLists.txt: Add common directories to the common include list and remove UIProcess/PageViewportController.cpp
        from the source list since it should only be compiled for WebKitEFL. Instead of taking explicit forwarding-header
        dependencies accept a list of "tacked-on" dependencies for WebKit2. This allows GTK+ to specify its extra fake
        installed header step.
        * PlatformEfl.cmake: Remove common include directories and add UIProcess/PageViewportController.cpp to the source
        list. Fix up forwarding header dependencies now.
        * PlatformGTK.cmake: Added.
        * config.h: First check whether this is a CMake build and then fall back to the autotools header.

2013-05-21  Zan Dobersek  <zdobersek@igalia.com>

        [GTK] Compile everything in C++11 mode
        https://bugs.webkit.org/show_bug.cgi?id=116452

        Reviewed by Anders Carlsson.

        * GNUmakefile.am: Remove the -std=c++11 flags from the various CPPFLAGS lists, the mode is now specified
        by default for all the C++ source code in SetupCompilerFlags.m4.

2013-05-21  Jessie Berlin  <jberlin@apple.com>

        Expose a way to know when forms are added to a page or when form controls are added to a form
        in the injected bundle
        https://bugs.webkit.org/show_bug.cgi?id=116334

        Reviewed by Alexey Proskuryakov.

        Add shouldNotifyOnFormChanges and didAssociateFormControls to the WKBundlePageFormClient.

        * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
        Add the new callbacks as part of version 2 of the WKBundlePageFormClient.

        * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
        (WebKit::InjectedBundlePageFormClient::didAssociateFormControls):
        Pass the message along to the client if the client has a handler.
        (WebKit::InjectedBundlePageFormClient::shouldNotifyOnFormChanges):
        Ditto.
        * WebProcess/InjectedBundle/InjectedBundlePageFormClient.h:

        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::didAssociateFormControls):
        Tell the injected bundle form client for the page.
        (WebKit::WebChromeClient::shouldNotifyOnFormChanges):
        Ditto.
        * WebProcess/WebCoreSupport/WebChromeClient.h:

2013-05-21  Michael Brüning  <michael.bruning@digia.com>

        [Qt][WK2] Fix Mountain Lion builds after r150277.
        https://bugs.webkit.org/show_bug.cgi?id=116467

        Reviewed by Jocelyn Turcotte.

        * Shared/API/c/WKBase.h:

2013-05-20  Lucas Forschler  <lforschler@apple.com>

    Rollout r150398.

2013-05-20  Zan Dobersek  <zdobersek@igalia.com>

        [GTK] Fix concatenations of string literals that are not C++11-compliant
        https://bugs.webkit.org/show_bug.cgi?id=116449

        Reviewed by Martin Robinson.

        Fix the problematic concatenations of string literals so they are compilable under the C++11 standard. This
        is simply a matter of separating the string and the string literal that are being concatenated with a space.

        * UIProcess/API/gtk/tests/TestPrinting.cpp:
        (testPrintOperationPrint):
        * UIProcess/API/gtk/tests/WebExtensionTest.cpp:
        (methodCallCallback):

2013-05-20  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r150384.
        http://trac.webkit.org/changeset/150384
        https://bugs.webkit.org/show_bug.cgi?id=116513

        Not ready for primetime. (Requested by kling on #webkit).

        * UIProcess/WebProcessProxy.cpp:
        (WebKit::WebProcessProxy::WebProcessProxy):
        (WebKit::WebProcessProxy::removeWebPage):
        * UIProcess/WebProcessProxy.h:
        (WebProcessProxy):

2013-05-20  Martin Robinson  <mrobinson@igalia.com>

        Remove SharedMemoryGtk.cpp
        https://bugs.webkit.org/show_bug.cgi?id=116457

        Reviewed by Andreas Kling.

        * Platform/gtk/SharedMemoryGtk.cpp: Removed.

2013-05-20  Jessie Berlin  <jberlin@apple.com>

        Expose a way to know when forms are added to a page or when form controls are added to a form
        in the injected bundle
        https://bugs.webkit.org/show_bug.cgi?id=116334

        Reviewed by Alexey Proskuryakov.

        Add shouldNotifyOnFormChanges and didAssociateFormControls to the WKBundlePageFormClient.

        * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
        Add the new callbacks as part of version 2 of the WKBundlePageFormClient.

        * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
        (WebKit::InjectedBundlePageFormClient::didAssociateFormControls):
        Pass the message along to the client if the client has a handler.
        (WebKit::InjectedBundlePageFormClient::shouldNotifyOnFormChanges):
        Ditto.
        * WebProcess/InjectedBundle/InjectedBundlePageFormClient.h:

        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::didAssociateFormControls):
        Tell the injected bundle form client for the page.
        (WebKit::WebChromeClient::shouldNotifyOnFormChanges):
        Ditto.
        * WebProcess/WebCoreSupport/WebChromeClient.h:

2013-05-20  Tim Horton  <timothy_horton@apple.com>

        Clients should have a way to extend rendering suppression
        https://bugs.webkit.org/show_bug.cgi?id=116463
        <rdar://problem/13738496>

        Reviewed by Andy Estes.

        * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
        (WKBundlePageExtendIncrementalRenderingSuppression): Added.
        (WKBundlePageStopExtendingIncrementalRenderingSuppression): Added.
        * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
        These only have any effect if SuppressesIncrementalRendering is also enabled.

        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
        Inform the FrameView if there are any outstanding rendering suppression tokens.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::WebPage):
        (WebKit::WebPage::extendIncrementalRenderingSuppression):
        Return the next available rendering suppression token.
        Add it to the list of active tokens.
        Inform the FrameView that we want to suppress rendering.

        (WebKit::WebPage::stopExtendingIncrementalRenderingSuppression):
        Remove the given token from the list of active tokens.
        Un-suppress rendering if appropriate.

        * WebProcess/WebPage/WebPage.h:
        (WebKit::WebPage::shouldExtendIncrementalRenderingSuppression):
        Return if there are any active rendering suppression tokens.

2013-05-20  Andreas Kling  <akling@apple.com>

        PPT: Closing tab that is hung or chewing 100% CPU leaves abandoned WebProcess.
        <http://webkit.org/b/116464>
        <rdar://problem/10103795>

        Reviewed by Anders Carlsson.

        Give the web process a 10 second chance to exit nicely after closing the last tab belonging to it.
        This code only runs if there was something on the page (e.g an unload/beforeunload event handler)
        preventing the UI process from killing it right away.

        * UIProcess/WebProcessProxy.cpp:
        (WebKit::WebProcessProxy::WebProcessProxy):
        (WebKit::WebProcessProxy::removeWebPage):
        (WebKit::WebProcessProxy::forcefulTerminationTimerFired):
        * UIProcess/WebProcessProxy.h:
        (WebProcessProxy):

2013-05-20  Anders Carlsson  <andersca@apple.com>

        Add helper function for converting a KeyedCodingValue to a CFTypeRef
        https://bugs.webkit.org/show_bug.cgi?id=116461

        Reviewed by Tim Horton.

        * Shared/cf/KeyedCodingValueCF.cpp: Added.
        * Shared/cf/KeyedCodingValueCF.h: Added.

        * WebKit2.xcodeproj/project.pbxproj:

2013-05-20  Anders Carlsson  <andersca@apple.com>

        Begin stubbing out a new KeyedEncoder class
        https://bugs.webkit.org/show_bug.cgi?id=116456

        Reviewed by Sam Weinig.

        This class (and it's coming counterpart, KeyedDecoder) will be used for serializing
        object graphs to a tree-like structure of dictionaries. It is up to individual ports to
        serialize them further (for example, on Mac they could be serialized to CFPropertyList objects).
        
        This will be used for serializing session storage state but I hope that it can be used for serializing
        back forward state in the future as our current implementation of back forward state serialization
        is fragile and depends on our IPC layer's binary encoding(!).
        
        * Shared/KeyedCodingValue.h: Added.
        * Shared/KeyedEncoder.cpp: Added.
        * Shared/KeyedEncoder.h: Added.

        * WebKit2.xcodeproj/project.pbxproj:

2013-05-19  Sam Weinig  <sam@webkit.org>

        Bump WKBundlePageLoaderClient version number so as not to break some clients
        https://bugs.webkit.org/show_bug.cgi?id=116426

        Reviewed by Anders Carlsson.

        * Shared/APIClientTraits.cpp:
        (WebKit):
        * Shared/APIClientTraits.h:
        * WebProcess/InjectedBundle/API/c/WKBundlePage.h:

2013-05-19  Anders Carlsson  <andersca@apple.com>

        Remove link prerendering code
        https://bugs.webkit.org/show_bug.cgi?id=116415

        Reviewed by Darin Adler.

        This code was only used by Chromium and is dead now.

        * Configurations/FeatureDefines.xcconfig:

2013-05-18  Anders Carlsson  <andersca@apple.com>

        Simplify the StorageArea setter functions
        https://bugs.webkit.org/show_bug.cgi?id=116402

        Reviewed by Sam Weinig.

        Remove security checking code that lives in Storage now.

        * WebProcess/Storage/StorageAreaImpl.cpp:
        (WebKit::StorageAreaImpl::setItem):
        (WebKit::StorageAreaImpl::removeItem):
        (WebKit::StorageAreaImpl::clear):
        * WebProcess/Storage/StorageAreaImpl.h:

2013-05-18  Sam Weinig  <sam@webkit.org>

        Fix some builds.

        * UIProcess/API/mac/WKTypeRefWrapper.mm:

2013-05-18  Carlos Garcia Campos  <cgarcia@igalia.com>

        REGRESSION(r150305): WebKit2 build broken with INDEXED_DATABASE enabled
        https://bugs.webkit.org/show_bug.cgi?id=116389

        Reviewed by Martin Robinson.

        There's no longer WebKeyValueStorageManager in the web process
        after r150305.

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

2013-05-17  Sam Weinig  <sam@webkit.org>

        Add a way to pass WebKit2 WKTypeRefs in Objective-C style user data messages
        https://bugs.webkit.org/show_bug.cgi?id=116345

        Reviewed by Anders Carlsson.

        In order to efficiently send a WKImageRef to another process when using the
        Objective-C WKConnection (or other user data messages), we need a way to encode
        WKTypeRefs in the objective-c object graph. Thus was born WKTypeRefWrapper.

        * Shared/mac/ObjCObjectGraphCoders.mm:
        (WebKit::typeFromObject):
        (WebKit::WebContextObjCObjectGraphEncoderImpl::encode):
        (WebKit::WebContextObjCObjectGraphDecoderImpl::decode):
        (WebKit::InjectedBundleObjCObjectGraphEncoderImpl::encode):
        (WebKit::InjectedBundleObjCObjectGraphDecoderImpl::decode):
        * UIProcess/API/mac/WKTypeRefWrapper.h: Added.
        * UIProcess/API/mac/WKTypeRefWrapper.mm: Added.
        (-[WKTypeRefWrapper initWithObject:]):
        (-[WKTypeRefWrapper object]):
        * WebKit2.xcodeproj/project.pbxproj:

2013-05-18  Anders Carlsson  <andersca@apple.com>

        Simplify StorageArea getter functions
        https://bugs.webkit.org/show_bug.cgi?id=116399

        Reviewed by Sam Weinig.

        Remove security and private browsing checks.

        * WebProcess/Storage/StorageAreaImpl.cpp:
        (WebKit::StorageAreaImpl::key):
        (WebKit::StorageAreaImpl::item):
        (WebKit::StorageAreaImpl::contains):
        * WebProcess/Storage/StorageAreaImpl.h:

2013-05-18  Patrick Gansterer  <paroga@webkit.org>

        [CMake] Replace *_LIBRARY_NAME with *_OUTPUT_NAME
        https://bugs.webkit.org/show_bug.cgi?id=114554

        Reviewed by Gyuyoung Kim.

        Using variables as target names is very uncommon in CMake.
        The usual way to specify the name of the resulting binary
        is to set the OUTPUT_NAME target property.

        * CMakeLists.txt:
        * PlatformEfl.cmake:
        * efl/ewebkit2.pc.in:

2013-05-18  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Move GTK port off legacy clipboard
        https://bugs.webkit.org/show_bug.cgi?id=116221

        Reviewed by Martin Robinson.

        * UIProcess/API/gtk/WebKitWebViewBase.cpp: Remove ClipboardGtk.h
        include.
        * WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:
        (WebKit::WebDragClient::startDrag): Get the DataObjectGtk from the
        Pasteboard associated to the given Clipboard.

2013-05-18  Jinwoo Song  <jinwoo7.song@samsung.com>

        [EFL][WK2] Refactor ewk_view_custom_encoding_set/get API
        https://bugs.webkit.org/show_bug.cgi?id=116386

        Reviewed by Christophe Dumez.

        Refactor the API to handle 'const char*' parameter in right way and
        enable the unit test which was disabled in r136230 as there is no assertion now.

        * UIProcess/API/efl/EwkView.cpp:
        (EwkView::setCustomTextEncodingName):
        * UIProcess/API/efl/EwkView.h:
        (EwkView::customTextEncodingName):
        (EwkView):
        * UIProcess/API/efl/ewk_view.cpp:
        (ewk_view_custom_encoding_set):
        * UIProcess/API/efl/tests/test_ewk2_view.cpp:
        (TEST_F):

2013-05-18  Csaba Osztrogonác  <ossy@webkit.org>

        [CMake] Unreviewed speculative build fix after r150305 and r150306.

        * CMakeLists.txt:

2013-05-18  Csaba Osztrogonác  <ossy@webkit.org>

        [Qt][WK2] Unreviewed build fix after r150305 and r150306.

        * DerivedSources.pri:
        * Target.pri:

2013-05-18  Zan Dobersek  <zdobersek@igalia.com>

        Unreviewed build fix for the GTK port after r150305 and r150306.

        * GNUmakefile.list.am:

2013-05-17  Alexey Proskuryakov  <ap@apple.com>

        <rdar://problem/13819878> Disable SharedWorker when in multiple web process model
        https://bugs.webkit.org/show_bug.cgi?id=116359

        The condition was accidentally negated, fixing.

        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
        (WebKit::WebPlatformStrategies::isAvailable):

2013-05-17  Gavin Barraclough  <barraclough@apple.com>

        Only allow 1 WebProcess to hold a PageCache
        https://bugs.webkit.org/show_bug.cgi?id=116368
        <rdar://problem/13392600>

        Reviewed by Geoff Garen & Anders Carlson.

        * UIProcess/WebContext.cpp:
        (WebKit::WebContext::WebContext):
        (WebKit::WebContext::processDidSaveToPageCache):
        (WebKit):
        (WebKit::WebContext::disconnectProcess):
        * UIProcess/WebContext.h:
            - Added m_processWithPageCache, only allow one process to keep a PageCache.
        (WebContext):
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::didSaveToPageCache):
        (WebKit):
        * UIProcess/WebPageProxy.h:
        (WebPageProxy):
        * UIProcess/WebPageProxy.messages.in:
            - Forward didSaveToPageCache to the WebProcessProxy.
        * UIProcess/WebProcessProxy.cpp:
        (WebKit::WebProcessProxy::addBackForwardItem):
        (WebKit::WebProcessProxy::didSaveToPageCache):
        (WebKit):
        (WebKit::WebProcessProxy::releasePageCache):
            - Forward releasePageCache to the WebProcess.
            - Forward didSaveToPageCache to the WebContext.
        * UIProcess/WebProcessProxy.h:
        (WebProcessProxy):
        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::didSaveToPageCache):
            - Forward didSaveToPageCache to the WebPageProxy.
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::releasePageCache):
        (WebKit):
        * WebProcess/WebProcess.h:
        (WebProcess):
        * WebProcess/WebProcess.messages.in:
            - Added 'ReleasePageCache' to instruct a web process to drop any cached pages.

2013-05-17  Anders Carlsson  <andersca@apple.com>

        Share code between WebKit1 and WebKit2 StorageArea subclasses
        https://bugs.webkit.org/show_bug.cgi?id=116367

        Reviewed by Andreas Kling.

        * WebProcess/Storage/StorageAreaImpl.cpp:
        (WebKit::StorageAreaImpl::length):
        Remove code that's now in Storage::length.

        (WebKit::StorageAreaImpl::storageType):
        Make this a virtual member function.

        * WebProcess/Storage/StorageAreaImpl.h:

2013-05-17  Alexey Proskuryakov  <ap@apple.com>

        <rdar://problem/13819878> Disable SharedWorker when in multiple web process model
        https://bugs.webkit.org/show_bug.cgi?id=116359

        Reviewed by Anders Carlsson.

        Implement SharedWorkerStrategy::isAvailable.

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

2013-05-17  Beth Dakin  <bdakin@apple.com>

        Headers and footers will sometimes disappear and re-appear during page loads
        https://bugs.webkit.org/show_bug.cgi?id=116336
        -and corresponding-
        <rdar://problem/13886753>

        Reviewed by Simon Fraser.

        This patch changes the WebCore-level API that WebKit uses to create a banner. 
        Specifically this patch removes FrameView::setWantsLayerForHeader(), which created 
        and returned a layer. Instead, WK2 will call Page::addHeaderWithHeight(). When the 
        layer has been created, it will call back into WK2 via ChromeClient. This will 
        allow WebCore to re-create the header/footer layers as needed whenever the 
        FrameView/RenderLayerCompositor have been destroyed and recreated.

        Send the layers over to PageBanner.
        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::didAddHeaderLayer):
        (WebKit::WebChromeClient::didAddFooterLayer):
        * WebProcess/WebCoreSupport/WebChromeClient.h:
        (WebChromeClient):

        PageBanner::addToPage() now does much less work since it can’t get the parent 
        layer right away. The work that is used to do once it had the parent layer is now 
        performed in didAddParentLayer()
        * WebProcess/WebPage/PageBanner.cpp:
        (WebKit::PageBanner::didAddParentLayer):
        * WebProcess/WebPage/PageBanner.h:
        * WebProcess/WebPage/mac/PageBannerMac.mm:
        (WebKit::PageBanner::addToPage):
        (WebKit::PageBanner::didAddParentLayer):

2013-05-17  Anders Carlsson  <andersca@apple.com>

        Rename WebKeyValueStorageManagerProxy to WebKeyValueStorageManager
        https://bugs.webkit.org/show_bug.cgi?id=116361

        Reviewed by Andreas Kling.

        There's nothing proxy about this class anymore!

        * UIProcess/API/C/WKAPICast.h:
        * UIProcess/API/C/WKContext.cpp:
        * UIProcess/API/C/WKKeyValueStorageManager.cpp:
        * UIProcess/WebKeyValueStorageManager.cpp: Renamed from Source/WebKit2/UIProcess/WebKeyValueStorageManagerProxy.cpp.
        * UIProcess/WebKeyValueStorageManager.h: Renamed from Source/WebKit2/UIProcess/WebKeyValueStorageManagerProxy.h.
        * WebKit2.xcodeproj/project.pbxproj:

2013-05-17  Anders Carlsson  <andersca@apple.com>

        Remove dead local storage code
        https://bugs.webkit.org/show_bug.cgi?id=116360

        Reviewed by Beth Dakin.

        Storage is all handled in the UI process now so we no longer need a WebKeyValueStorageManager in the web process.

        * DerivedSources.make:
        * UIProcess/WebKeyValueStorageManagerProxy.cpp:
        (WebKit::WebKeyValueStorageManagerProxy::WebKeyValueStorageManagerProxy):
        (WebKit):
        (WebKit::didGetKeyValueStorageOrigins):
        (WebKit::WebKeyValueStorageManagerProxy::getKeyValueStorageOrigins):
        * UIProcess/WebKeyValueStorageManagerProxy.h:
        (WebKeyValueStorageManagerProxy):
        * UIProcess/WebKeyValueStorageManagerProxy.messages.in: Removed.
        * WebKit2.xcodeproj/project.pbxproj:
        * WebProcess/Storage/WebKeyValueStorageManager.cpp: Removed.
        * WebProcess/Storage/WebKeyValueStorageManager.h: Removed.
        * WebProcess/Storage/WebKeyValueStorageManager.messages.in: Removed.
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences):
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::WebProcess):

2013-05-17  Anders Carlsson  <andersca@apple.com>

        Use the UI process storage manager for deleting local storage data
        https://bugs.webkit.org/show_bug.cgi?id=116358
        <rdar://problem/13852829>

        Reviewed by Andreas Kling.

        * Shared/WebSecurityOrigin.h:
        (WebKit::WebSecurityOrigin::protocol):
        (WebKit::WebSecurityOrigin::host):
        (WebKit::WebSecurityOrigin::databaseIdentifier):
        (WebKit::WebSecurityOrigin::toString):
        Remove unneeded consts.

        (WebKit::WebSecurityOrigin::securityOrigin):
        Add getter.

        * UIProcess/Storage/LocalStorageDatabase.cpp:
        (WebKit::LocalStorageDatabase::close):
        deleteEmptyDatabaseWithOrigin has been renamed to deleteDatabaseWithOrigin.

        * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
        (WebKit::LocalStorageDatabaseTracker::deleteDatabaseWithOrigin):
        Rename since this is no longer used only for empty databases.

        (WebKit::LocalStorageDatabaseTracker::deleteAllDatabases):
        Loop over the tracker database and delete all database files.

        * UIProcess/Storage/StorageManager.cpp:
        (WebKit::StorageManager::StorageArea::clear):
        Clear the map, close the database and tell all event listeners to reset their caches.

        (WebKit::StorageManager::LocalStorageNamespace::clearStorageAreasMatchingOrigin):
        Loop over all storage areas and call clear on those matching the security origin.

        (WebKit::StorageManager::LocalStorageNamespace::clearAllStorageAreas):
        Loop over all storage areas and call clear on them.
        
        (WebKit::StorageManager::deleteEntriesForOrigin):
        Dispatch deleteEntriesForOriginInternal on the work queue.

        (WebKit::StorageManager::deleteAllEntries):
        Dispatch deleteAllEntriesInternal on the work queue.

        (WebKit::StorageManager::deleteEntriesForOriginInternal):
        Call clearStorageAreasMatchingOrigin on all local storage namespaces and then delete the database.

        (WebKit::StorageManager::deleteAllEntriesInternal):
        Call clearAllStorageAreas on all local storage namespaces and then delete all databases.

        * UIProcess/WebKeyValueStorageManagerProxy.cpp:
        (WebKit::WebKeyValueStorageManagerProxy::deleteEntriesForOrigin):
        Call out to the storage manager.

        (WebKit::WebKeyValueStorageManagerProxy::deleteAllEntries):
        Ditto.

        * WebProcess/Storage/StorageAreaMap.cpp:
        (WebKit::StorageAreaMap::clearCache):
        Call resetValues which will null out the storage map.

        * WebProcess/Storage/StorageAreaMap.messages.in:
        Add ClearCache message.

2013-05-17  Anders Carlsson  <andersca@apple.com>

        Only import local storage items from the database once
        https://bugs.webkit.org/show_bug.cgi?id=116354

        Reviewed by Andreas Kling.

        We import items from the database over and over, when we only want to do it once. Use a 
        boolean flag to guard against doing it more than once. 
        
        Also, rename importItemsFromDatabase to openDatabaseAndImportItemsIfNeeded since it now
        also opens the database (even if it doesn't need to import anything). This is preparation for an
        upcoming patch where the database will be closed when it's cleared.

        * UIProcess/Storage/StorageManager.cpp:
        (StorageManager::StorageArea):
        (WebKit::StorageManager::StorageArea::StorageArea):
        (WebKit::StorageManager::StorageArea::setItem):
        (WebKit::StorageManager::StorageArea::removeItem):
        (WebKit::StorageManager::StorageArea::clear):
        (WebKit::StorageManager::StorageArea::items):
        (WebKit::StorageManager::StorageArea::openDatabaseAndImportItemsIfNeeded):

2013-05-17  Alexey Proskuryakov  <ap@apple.com>

        <rdar://problem/13869765> Lion: Crashes in islcCanLoadInputMethodFromBundleID.

        Reviewed by Anders Carlsson.

        * WebProcess/com.apple.WebProcess.sb.in: Allow text input directories.

2013-05-17  Anders Carlsson  <andersca@apple.com>

        WKKeyValueStorageManagerGetKeyValueStorageOrigins should get origins from the UI process
        https://bugs.webkit.org/show_bug.cgi?id=116346
        <rdar://problem/13852829>

        Reviewed by Andreas Kling.

        * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
        (WebKit::LocalStorageDatabaseTracker::origins):
        New helper function to return all the tracked origins.

        * UIProcess/Storage/StorageManager.cpp:
        (WebKit::StorageManager::StorageManager):
        Initialize the UTF-8 encoding.

        (WebKit::StorageManager::getOrigins):
        Call getOriginsInternal on our queue.

        (WebKit::callCallbackFunction):
        Helper function for calling the callback function.

        (WebKit::StorageManager::getOriginsInternal):
        Get the origins and make sure we call the callback with the given function dispatcher.

        * UIProcess/WebKeyValueStorageManagerProxy.cpp:
        (WebKit::didGetKeyValueStorageOriginsCallback):
        Construct the array of WebSecurityOrigin objects and call the callback.

        (WebKit::WebKeyValueStorageManagerProxy::getKeyValueStorageOrigins):
        Call StorageManager::getOrigins.

2013-05-16  Alexey Proskuryakov  <ap@apple.com>

        Text input is largely broken when there are subframes loading
        http://bugs.webkit.org/show_bug.cgi?id=59121
        <rdar://problem/9320468>

        Reviewed by Darin Adler.

        * UIProcess/PageClient.h:
        * UIProcess/API/mac/PageClientImpl.h:
        * UIProcess/API/mac/PageClientImpl.mm:
        (WebKit::PageClientImpl::updateSecureInputState): Separated secure input state
        updating into a separate function. Removed updateTextInputState, we don't need
        to go through PageClient to implement its behavior at all.
        (WebKit::PageClientImpl::dismissDictionaryLookupPanel): Added a FIXME.

        * UIProcess/API/mac/WKView.mm:
        * UIProcess/API/mac/WKViewInternal.h:
        Removed _updateTextInputStateIncludingSecureInputState.

        * UIProcess/WebPageProxy.h: Added m_temporarilyClosedComposition, which helps
        to figure out that WebCore decided to close a composition. The issue is that WebCore
        would first send an EditorState with hasComposition set to false, and with
        shouldIgnoreCompositionSelectionChange set to true, at which time we forget the
        previous m_editorState, but can't make any decisions based on this transient state.
        We should find a way to simplify this (maybe not send these updates with
        shouldIgnoreCompositionSelectionChange at all?)

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::WebPageProxy): Initialize m_temporarilyClosedComposition.
        (WebKit::WebPageProxy::didCommitLoadForFrame): Removed the code to kill a composition
        when any frame commits a load, which made no sense (along with surrounding code,
        which will unfortunately survive longer).
        (WebKit::WebPageProxy::editorStateChanged): Implemented state updating here,
        we don't need to go to WKView.mm to implement this logic. Figure out when WebCore
        discards a composition, and notify input methods about this.
        (WebKit::WebPageProxy::resetStateAfterProcessExited): Reset m_temporarilyClosedComposition.
        Added some FIXMEs.

2013-05-17  Manuel Rego Casasnovas  <rego@igalia.com>

        [WK2] Add support for selectTrailingWhitespaceEnabled setting
        https://bugs.webkit.org/show_bug.cgi?id=112426

        Reviewed by Ryosuke Niwa.

        * Shared/WebPreferencesStore.h:
        (WebKit): Add macro for selectTrailingWhitespaceEnabled.
        * UIProcess/API/C/WKPreferences.cpp:
        (WKPreferencesSetSelectTrailingWhitespaceEnabled):
        (WKPreferencesGetSelectTrailingWhitespaceEnabled): Implement methods
        using the new setting.
        * UIProcess/API/C/WKPreferencesPrivate.h: Add new methods headers.
        * WebProcess/WebCoreSupport/WebEditorClient.cpp:
        (WebKit::WebEditorClient::isSelectTrailingWhitespaceEnabled): Implement
        method delegating in WebPage.
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences): Set
        selectTrailingWhitespaceEnabled setting.
        (WebKit::WebPage::setSmartInsertDeleteEnabled): Set
        selectTrailingWhitespaceEnabled as they are mutually exclusive.
        (WebKit):
        (WebKit::WebPage::isSelectTrailingWhitespaceEnabled): Implement method
        using settings.
        (WebKit::WebPage::setSelectTrailingWhitespaceEnabled): Implement method
        using settings and set smartInsertDeleteEnabled as they are mutually
        exclusive.
        * WebProcess/WebPage/WebPage.h:
        (WebPage): Add new methods headers.

2013-05-17  Brady Eidson  <beidson@apple.com>

        Fix crash introduced by http://trac.webkit.org/changeset/150282
        Followup to https://bugs.webkit.org/show_bug.cgi?id=116253

        Reviewed by Andreas Kling.

        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::focusedFrameChanged): Frame might be null.

2013-05-17  Brady Eidson  <beidson@apple.com>

        Replace WebFrameLoaderClient static_casts with a function that might return null.
        https://bugs.webkit.org/show_bug.cgi?id=116253

        The general approach here is:
        1 - Introduce a toWebFrameLoaderClient() function to convert FrameLoaderClients, and that may return null.
        2 - Adopt toWebFrameLoaderClient() everywhere we used to do a direct static_cast<WebFrameLoaderClient*>
        3 - In functions that already support a "return 0" scenario, a failed cast results in a return 0.
        4 - In other functions that assume no failure to get the WebFrameLoaderClient, add an ASSERT.

        Reviewed by Alexey Proskuryakov.

        Add the utility function to cast:
        * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
        (WebKit::toWebFrameLoaderClient):

        Adopt it everywhere:
        * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
        (WebKit::GeolocationPermissionRequestManager::startRequestForGeolocation):

        * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
        (WebKit::InjectedBundleNodeHandle::documentFrame):
        (WebKit::InjectedBundleNodeHandle::htmlFrameElementContentFrame):
        (WebKit::InjectedBundleNodeHandle::htmlIFrameElementContentFrame):

        * WebProcess/InjectedBundle/InjectedBundle.cpp:
        (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):

        * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp:
        (WebKit::InjectedBundleDOMWindowExtension::frame):

        * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
        (WebKit::InjectedBundleHitTestResult::frame):
        (WebKit::InjectedBundleHitTestResult::targetFrame):

        * WebProcess/Network/WebResourceLoadScheduler.cpp:
        (WebKit::WebResourceLoadScheduler::scheduleLoad):

        * WebProcess/Plugins/PluginView.cpp:
        (WebKit::webPage):
        (WebKit::PluginView::performFrameLoadURLRequest):

        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::focusedNodeChanged):
        (WebKit::WebChromeClient::focusedFrameChanged):
        (WebKit::WebChromeClient::runBeforeUnloadConfirmPanel):
        (WebKit::WebChromeClient::runJavaScriptAlert):
        (WebKit::WebChromeClient::runJavaScriptConfirm):
        (WebKit::WebChromeClient::runJavaScriptPrompt):
        (WebKit::WebChromeClient::print):
        (WebKit::WebChromeClient::exceededDatabaseQuota):
        (WebKit::WebChromeClient::runOpenPanel):

        * WebProcess/WebCoreSupport/WebEditorClient.cpp:
        (WebKit::WebEditorClient::textFieldDidBeginEditing):
        (WebKit::WebEditorClient::textFieldDidEndEditing):
        (WebKit::WebEditorClient::textDidChangeInTextField):
        (WebKit::WebEditorClient::textDidChangeInTextArea):
        (WebKit::WebEditorClient::doTextFieldCommandFromEvent):
        (WebKit::WebEditorClient::textWillBeDeletedInTextField):

        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::dispatchWillSendSubmitEvent):
        (WebKit::WebFrameLoaderClient::dispatchWillSubmitForm):

        * WebProcess/WebPage/WebFrame.cpp:
        (WebKit::WebFrame::contentsAsString):
        (WebKit::WebFrame::parentFrame):
        (WebKit::WebFrame::childFrames):
        (WebKit::WebFrame::frameForContext):
        (WebKit::WebFrameFilter::shouldIncludeSubframe):

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

2013-05-17  Sam Weinig  <sam@webkit.org>

        Expose new load-with-userData API to Objective-C
        https://bugs.webkit.org/show_bug.cgi?id=116335

        Reviewed by Anders Carlsson.

        - Adds loadRequest:userData:, loadFileURL:restrictToFilesWithin:userData:, loadHTMLString:baseURL:userData:
          loadData:MIMEType:textEncodingName:baseURL:, and loadData:MIMEType:textEncodingName:baseURL:userData.
        - Adds a WKObjCTypeWrapperRef (which is a ObjCObjectGraph under the covers) to allow the userData to be unwrapped
          in the injected bundles willLoadURLRequest and willLoadDataRequest C-SPI callbacks.

        * Shared/API/c/WKBase.h:
        * Shared/API/c/WKSharedAPICast.h:
        * Shared/API/c/mac/WKBaseMac.h: Added.
        * Shared/API/c/mac/WKObjCTypeWrapperRef.h: Added.
        * Shared/API/c/mac/WKObjCTypeWrapperRef.mm: Added.
        (WKObjCTypeWrapperGetTypeID):
        (WKObjCTypeWrapperCreate):
        (WKObjCTypeWrapperGetObject):
        * UIProcess/API/mac/WKBrowsingContextController.h:
        * UIProcess/API/mac/WKBrowsingContextController.mm:
        (+[WKBrowsingContextController registerSchemeForCustomProtocol:]):
        (+[WKBrowsingContextController unregisterSchemeForCustomProtocol:]):
        (-[WKBrowsingContextController loadRequest:]):
        (-[WKBrowsingContextController loadRequest:userData:]):
        (-[WKBrowsingContextController loadFileURL:restrictToFilesWithin:]):
        (-[WKBrowsingContextController loadFileURL:restrictToFilesWithin:userData:]):
        (-[WKBrowsingContextController loadHTMLString:baseURL:]):
        (-[WKBrowsingContextController loadHTMLString:baseURL:userData:]):
        (-[WKBrowsingContextController loadData:MIMEType:textEncodingName:baseURL:]):
        (-[WKBrowsingContextController loadData:MIMEType:textEncodingName:baseURL:userData:]):
        * WebKit2.xcodeproj/project.pbxproj:

2013-05-17  Sam Weinig  <sam@webkit.org>

        Add WKPageLoadData and WKPageLoadDataWithUserData SPI to support loading arbitrary data blobs
        https://bugs.webkit.org/show_bug.cgi?id=116325

        Reviewed by Simon Fraser.

        * UIProcess/API/C/WKPage.cpp:
        (WKPageLoadData):
        (WKPageLoadDataWithUserData):
        Add new SPI.

        * UIProcess/API/C/WKPage.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::loadData):
        * UIProcess/WebPageProxy.h:
        Pipe through to the WebProcess.

        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::loadDataImpl):
        (WebKit::WebPage::loadData):
        (WebKit::WebPage::loadHTMLString):
        (WebKit::WebPage::loadAlternateHTMLString):
        (WebKit::WebPage::loadPlainTextString):
        (WebKit::WebPage::loadWebArchiveData):
        Rename existing loadData function to loadDataImpl (I hate it) to avoid overload conflict
        from IPC magic.


2013-05-17  Michał Pakuła vel Rutka  <m.pakula@samsung.com>

        [EFL][WK2] Fix sub menu initialization in ewk_context_menu_item
        https://bugs.webkit.org/show_bug.cgi?id=116321

        Reviewed by Christophe Dumez.

        During sub menu creation, after initializing m_parentMenu, parentMenu
        pointer became null which may cause segfaults. This patch fixes it by
        using m_parentMenu.

        * UIProcess/API/efl/ewk_context_menu_item.cpp:
        (EwkContextMenuItem::EwkContextMenuItem):

2013-05-17  Michał Pakuła vel Rutka  <m.pakula@samsung.com>

        [EFL][WK2] Support sub menu in ewk context menus
        https://bugs.webkit.org/show_bug.cgi?id=114729

        Reviewed by Christophe Dumez.

        Added submenu support in EwkContextMenu and an API function to receive
        Ewk_Context_Menu from submenu context menu item. A test case was added
        for new API function.
        EwkContextMenu is now an EwkObject allowing multiple instances of submenu
        to be used in different submenu type context menu items.

        * UIProcess/API/efl/ewk_context_menu_item.cpp:
        (EwkContextMenuItem::EwkContextMenuItem):
        (ewk_context_menu_item_new):
        (ewk_context_menu_item_parent_menu_get):
        (ewk_context_menu_item_submenu_get):
        * UIProcess/API/efl/ewk_context_menu_item.h:
        * UIProcess/API/efl/ewk_context_menu_item_private.h:
        (EwkContextMenuItem::create):
        (EwkContextMenuItem::parentMenu):
        (EwkContextMenuItem::subMenu):
        (EwkContextMenuItem):
        * UIProcess/API/efl/ewk_context_menu_private.h:
        (EwkContextMenu::ewkView):
        (EwkContextMenu):
        * UIProcess/API/efl/tests/test_ewk2_context_menu.cpp:
        (showContextMenu):

2013-05-17  Zoltan Arvai  <zarvai@inf.u-szeged.hu>, Ádám Kallai  <kadam@inf.u-szeged.hu>

        [Qt] Unreviewed build fix.

        Add missing Qt specific initializer for willLoadURLRequest and willLoadDataRequest.

        * WebProcess/qt/QtBuiltinBundlePage.cpp:
        (WebKit::QtBuiltinBundlePage::QtBuiltinBundlePage):

2013-05-16  Beth Dakin  <bdakin@apple.com>

        Remove WKBundlePageGetHeaderLayer/Footer SPI
        https://bugs.webkit.org/show_bug.cgi?id=116254

        Reviewed by Benjamin Poulain.

        We should remove the Remove WKBundlePageGetHeaderLayer/Footer SPI. It was only 
        recently added and have been replaced by WKBundlePageSetHeaderBanner/Footer.

        * WebKit2.xcodeproj/project.pbxproj:
        * WebProcess/InjectedBundle/API/c/mac/WKBundlePagePrivateMac.h: Removed.
        * WebProcess/InjectedBundle/API/c/mac/WKBundlePagePrivateMac.mm: Removed.
        * WebProcess/WebPage/WebPage.h:
        (WebPage):
        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit):
        (WebKit::WebPage::updateHeaderAndFooterLayersForDeviceScaleChange):

2013-05-14  Sam Weinig  <sam@webkit.org>

        Add variants of the loading APIs that take user data and a way for the injected bundle to find out about them
        https://bugs.webkit.org/show_bug.cgi?id=116132

        Reviewed by Anders Carlsson.

        Adds "WithUserData" versions of all the load APIs and two new WKBundlePageLoaderClient functions,
        willLoadURLRequest and willLoadDataRequest to let the bundle access them.

        Adds WebKit2WillLoadTest.* API tests.

        * UIProcess/API/C/WKPage.cpp:
        (WKPageLoadURLWithUserData):
        (WKPageLoadURLRequestWithUserData):
        (WKPageLoadFile):
        (WKPageLoadFileWithUserData):
        (WKPageLoadHTMLStringWithUserData):
        (WKPageLoadAlternateHTMLStringWithUserData):
        (WKPageLoadPlainTextStringWithUserData):
        (WKPageLoadWebArchiveDataWithUserData):
        * UIProcess/API/C/WKPage.h:
        * UIProcess/WebPageProxy.cpp:
        * UIProcess/WebPageProxy.h:
        (WebPageProxy):
        * WebKit2.xcodeproj/project.pbxproj:
        * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
        * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
        (WebKit::InjectedBundlePageLoaderClient::willLoadURLRequest):
        (WebKit::InjectedBundlePageLoaderClient::willLoadDataRequest):
        * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
        (WebCore):
        (InjectedBundlePageLoaderClient):
        * WebProcess/WebPage/WebPage.cpp:
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in:

2013-05-16  Manuel Rego Casasnovas  <rego@igalia.com>

        [GTK] Fix memory leak in WebKitBackForwardList
        https://bugs.webkit.org/show_bug.cgi?id=116222

        Reviewed by Carlos Garcia Campos.

        Due to the use of leakRef() the ImmutableArray is not being released
        automatically. Adding a local variable in the methods to make sure that
        the ImmutableArray is freed.

        * UIProcess/API/gtk/WebKitBackForwardList.cpp:
        (webkit_back_forward_list_get_back_list_with_limit): Add local variable
        RefPtr and pass the ImmutableArray to
        WebKitBackForwardList::webkitBackForwardListCreateList() using
        RefPtr::get().
        (webkit_back_forward_list_get_forward_list_with_limit): Ditto.

2013-05-16  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r150034.
        http://trac.webkit.org/changeset/150034
        https://bugs.webkit.org/show_bug.cgi?id=116257

        This work around doesn't work due to another bug NSUndoManager
        has (Requested by rniwa on #webkit).

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

2013-05-16  Tim Horton  <timothy_horton@apple.com>

        PDFPlugins don't load when plugins are disabled, but they should
        https://bugs.webkit.org/show_bug.cgi?id=75790
        <rdar://problem/11650197>

        Reviewed by Anders Carlsson.

        Support loading "application" plug-ins even if plug-ins are explicitly disabled.

        Make PDFPlugin and SimplePDFPlugin "application" plug-ins, so they can
        be loaded even if plug-ins are disabled.

        * Platform/CoreIPC/HandleMessage.h:
        (CoreIPC::callMemberFunction):
        Add a 5-argument, 3-reply version of callMemberFunction.

        * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
        (WebKit::NetscapePluginModule::getPluginInfo):
        NPAPI plug-ins are not application plug-ins.

        * Shared/WebCoreArgumentCoders.cpp:
        (CoreIPC::::encode):
        (CoreIPC::::decode):
        Encode/decode the new isApplicationPlugin field on PluginInfo.

        * UIProcess/Plugins/PluginInfoStore.cpp:
        (WebKit::PluginInfoStore::findPluginForMIMEType):
        (WebKit::PluginInfoStore::findPluginForExtension):
        (WebKit::PluginInfoStore::findPlugin):
        * UIProcess/Plugins/PluginInfoStore.h:
        (PluginInfoStore):
        Give PluginInfoStore's findPlugin method and its private helper
        methods an argument allowing them to only match application plug-ins.

        (WebKit::WebPageProxy::findPlugin):
        * UIProcess/WebPageProxy.h:
        (WebPageProxy):
        * UIProcess/WebPageProxy.messages.in:
        Add an argument allowing findPlugin to restrict its search to only application plug-ins.

        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::objectContentType):
        Previously, this caller depended on pluginData() returning null if
        plug-ins were disabled. Since that is no longer the case, we have to
        check if we can use plug-ins, and otherwise ignore non-application-plug-ins.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::createPlugin):
        When going to search for a plug-in, ask subframeLoader whether or not
        it's OK to use ordinary non-application plug-ins, and pass that information
        on to the UIProcess when performing the search.

        (WebKit::WebPage::canPluginHandleResponse): Ditto.
        (WebKit::WebPage::canShowMIMEType):
        Ensure that canShowMIMEType returns true if we have an application plug-in
        that can display a particular MIME type, even if we're not allowed to load plug-ins.

2013-05-16  Michał Pakuła vel Rutka  <m.pakula@samsung.com>

        [EFL][WK2] Make Ewk_Context_Menu Ewk_Object
        https://bugs.webkit.org/show_bug.cgi?id=116097

        Reviewed by Gyuyoung Kim.

        Changed Ewk_Context_Menu to be an Ewk_Object so pointer to menu
        object can be shared between different modules.

        * UIProcess/API/efl/EwkView.cpp:
        (EwkView::showContextMenu):
        * UIProcess/API/efl/EwkView.h:
        (EwkView):
        * UIProcess/API/efl/ewk_context_menu.cpp:
        (EwkContextMenu::appendItem):
        (EwkContextMenu::removeItem):
        (ewk_context_menu_new):
        (ewk_context_menu_new_with_items):
        (ewk_context_menu_item_append):
        (ewk_context_menu_item_remove):
        (ewk_context_menu_hide):
        (ewk_context_menu_items_get):
        (ewk_context_menu_item_select):
        * UIProcess/API/efl/ewk_context_menu_item.cpp:
        (EwkContextMenuItem::EwkContextMenuItem):
        (ewk_context_menu_item_new_with_submenu):
        * UIProcess/API/efl/ewk_context_menu_item_private.h:
        (EwkContextMenuItem):
        * UIProcess/API/efl/ewk_context_menu_private.h:
        (EwkContextMenu):
        (EwkContextMenu::create):
        * UIProcess/API/efl/ewk_defines.h:

2013-05-16  Andreas Kling  <akling@apple.com>

        Page::chrome() should return a reference.
        <http://webkit.org/b/116185>

        Reviewed by Anders Carlsson.

2013-05-16  Brady Eidson  <beidson@apple.com>

        svg/as-image/img-zoom-svg-stylesheet.html crashes with NetworkProcess enabled.
        <rdar://problem/13837408> and https://bugs.webkit.org/show_bug.cgi?id=115917

        Reviewed by Sam Weinig.

        * NetworkProcess/SchedulableLoader.cpp:
        (WebKit::SchedulableLoader::SchedulableLoader): ASSERT that either there’s a frame and page ID, or
          that the client cannot be asked for credentials.

        * WebProcess/Network/WebResourceLoadScheduler.cpp:
        (WebKit::WebResourceLoadScheduler::scheduleLoad): Only cast the FrameLoaderClient and get WebFrame/WebPage
          if that is actually possible. Set the clientCredentialPolicy based on whether or not WebFrame/WebPage are
          available since they are needed to ask the UIProcess for credentials. ASSERT that either there’s both
          a frame and page ID or that the client won’t be asked for credentials.

2013-05-16  Timothy Hatcher  <timothy@apple.com>

        Make the Find Banner in Safari work again with the docked Web Inspector.

        https://webkit.org/b/116182
        rdar://problem/13857423

        Reviewed by Benjamin Poulain.

        * UIProcess/mac/WebInspectorProxyMac.mm:
        (WebKit::WebInspectorProxy::inspectedViewFrameDidChange):
        (WebKit::WebInspectorProxy::platformDetach):
        Preserve the top position of the inspected view so banners in Safari still work.

2013-05-16  Tim Horton  <timothy_horton@apple.com>

        [wk2] didGetImageForFindMatch can return a null image
        https://bugs.webkit.org/show_bug.cgi?id=116251
        <rdar://problem/13277246>

        Reviewed by Simon Fraser.

        Don't send didGetImageForFindMatch if we didn't get an image for
        the find match, which can happen if the selection is not visible.

        * WebProcess/WebPage/FindController.cpp:
        (WebKit::FindController::getImageForFindMatch):

2013-05-16  Tim Horton  <timothy_horton@apple.com>

        [wk2] Minimum layout width is lost if the WebProcess crashes
        https://bugs.webkit.org/show_bug.cgi?id=116202
        <rdar://problem/13202320>

        Reviewed by Darin Adler.

        Send the minimum layout width to the WebProcess upon initialization,
        so that crashed-and-restarted WebProcesses have the correct width.

        * Shared/WebPageCreationParameters.cpp:
        (WebKit::WebPageCreationParameters::encode):
        (WebKit::WebPageCreationParameters::decode):
        * Shared/WebPageCreationParameters.h:
        (WebPageCreationParameters):
        Add minimumLayoutWidth WebPage creation parameter.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::creationParameters):
        Send the current minimumLayoutWidth to the WebPage when it's created.

        (WebKit::WebPageProxy::setMinimumLayoutWidth):
        Store minimumLayoutWidth changes that come in while the WebProcess is
        not valid, so that the correct width is sent once it is restarted.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::WebPage):
        Set minimumLayoutWidth to the value provided by our creation parameters.

2013-05-16  Zoltan Arvai  <zarvai@inf.u-szeged.hu>

        [Win] Unreviewed buildfix after r150161.

        'Unknown' in HTTPRequest.cpp is ambiguous symbol with MSVC,
        because it is also defined in MS SDK 7.1 winioctl.h.

        * UIProcess/InspectorServer/HTTPRequest.cpp:
        (WebKit::HTTPRequest::HTTPRequest):

2013-05-16  Andras Becsi  <andras.becsi@digia.com>

        [WK2] PluginInformation.cpp fails to build because of missing ENABLE(NETSCAPE_PLUGIN_API) guard
        https://bugs.webkit.org/show_bug.cgi?id=116018

        Rubber-stamped by Jocelyn Turcotte.

        * Shared/Plugins/Netscape/PluginInformation.cpp:
        (WebKit::getPluginModuleInformation):

2013-05-15  Simon Cooper  <scooper@apple.com>

        Enable printing in plugins
        https://bugs.webkit.org/show_bug.cgi?id=116201
        <rdar://problem/12347902>

        Reviewed by Alexey Proskuryakov.

        Add the printing entitlement so that legacy printing drivers can
        customize the print panel. Update the printing rules and enable them
        for the plugins.

        * Configurations/PluginService.entitlements:
        * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
        * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb:
        * Resources/PlugInSandboxProfiles/com.microsoft.SilverlightPlugin.sb:
        * Resources/PlugInSandboxProfiles/com.oracle.java.JavaAppletPlugin.sb:

2013-05-15  Anders Carlsson  <andersca@apple.com>

        Move HTTPRequest class to WebKit2
        https://bugs.webkit.org/show_bug.cgi?id=116192

        Reviewed by Darin Adler.

        Move HTTPRequest to WebKit2 and put it in the WebKit namespace.

        * CMakeLists.txt:
        * GNUmakefile.list.am:
        * Target.pri:
        * UIProcess/InspectorServer/HTTPRequest.cpp: Renamed from Source/WebCore/platform/network/HTTPRequest.cpp.
        * UIProcess/InspectorServer/HTTPRequest.h: Renamed from Source/WebCore/platform/network/HTTPRequest.h.
        * UIProcess/InspectorServer/WebInspectorServer.cpp:
        * UIProcess/InspectorServer/WebInspectorServer.h:
        (WebInspectorServer):
        * UIProcess/InspectorServer/WebSocketServerClient.h:
        (WebKit::WebSocketServerClient::didReceiveUnrecognizedHTTPRequest):
        (WebKit::WebSocketServerClient::didReceiveWebSocketUpgradeHTTPRequest):
        (WebKit::WebSocketServerClient::didEstablishWebSocketConnection):
        * UIProcess/InspectorServer/WebSocketServerConnection.cpp:
        * UIProcess/InspectorServer/WebSocketServerConnection.h:
        (WebKit):
        (WebSocketServerConnection):

2013-05-15  Arnaud Renevier  <a.renevier@sisa.samsung.com>

        [GTK] [WebKit2] enable displaying console.log messages to system console
        https://bugs.webkit.org/show_bug.cgi?id=115578

        Reviewed by Martin Robinson.

        Add a setting to enable/disable displaying of page messages to system
        console. Property is called enable-write-console-messages-to-stdout.
        Getter API function is
        webkit_settings_get_enable_write_console_messages_to_stdout
        Setter API function is
        webkit_settings_set_enable_write_console_messages_to_stdout

        * UIProcess/API/gtk/WebKitSettings.cpp:
        (webKitSettingsSetProperty):
        (webKitSettingsGetProperty):
        (webkit_settings_class_init):
        (webkit_settings_get_enable_write_console_messages_to_stdout):
        (webkit_settings_set_enable_write_console_messages_to_stdout):
        * UIProcess/API/gtk/WebKitSettings.h:
        * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
        * UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
        (testWebKitSettings):

2013-05-08  Gavin Barraclough  <barraclough@apple.com>

        Process suppression should throttle scripted animations
        https://bugs.webkit.org/show_bug.cgi?id=115812

        Reviewed by Simon Fraser.

        <rdar://problem/13799726>

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::setThrottled):
        (WebKit):
        * WebProcess/WebPage/WebPage.h:
        (WebPage):
            - Added setThrottled, forwards to WebCore::Page.
        * WebProcess/WebProcess.cpp:
        (WebKit):
        (WebKit::WebProcess::setProcessSuppressionEnabled):
        * WebProcess/WebProcess.h:
        (WebProcess):
            - Intercept calls to setProcessSuppressionEnabled, also mark all pages as being throttled.

2013-05-15  Anders Carlsson  <andersca@apple.com>

        WKPageGetPluginInformationDisplayNameKey doesn't return the right key
        https://bugs.webkit.org/show_bug.cgi?id=116188

        Reviewed by Andreas Kling.

        * UIProcess/API/C/WKPage.cpp:
        (WKPageGetPluginInformationDisplayNameKey):

2013-05-15  Alexey Proskuryakov  <ap@apple.com>

        More fixing after WebProcessShim renaming in r149074.

        * WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:
        (WebContentServiceInitializer): Updated a comment to mention the shim by its new name.

2013-05-15  Alexey Proskuryakov  <ap@apple.com>

        <rdar://problem/13902706> Lion: com.apple.tsm.uiserver sandbox error in Console when
        launching Safari

        Reviewed by Anders Carlsson.

        * WebProcess/com.apple.WebProcess.sb.in: Silence the violation.

2013-05-13  Anders Carlsson  <andersca@apple.com>

        Frame::editor() should return a reference
        https://bugs.webkit.org/show_bug.cgi?id=116037

        Reviewed by Darin Adler.

        * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
        (WebKit::WebContextMenuClient::searchWithGoogle):
        * WebProcess/WebCoreSupport/WebEditorClient.cpp:
        (WebKit::WebEditorClient::updateGlobalSelection):
        * WebProcess/WebCoreSupport/efl/WebEditorClientEfl.cpp:
        (WebKit::WebEditorClient::handleInputMethodKeydown):
        * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
        (WebKit::WebEditorClient::executePendingEditorCommands):
        (WebKit::WebEditorClient::handleKeyboardEvent):
        * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
        (WebKit::WebContextMenuClient::searchWithGoogle):
        (WebKit::WebContextMenuClient::searchWithSpotlight):
        * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
        (WebKit::changeWordCase):
        * WebProcess/WebPage/WebFrame.cpp:
        (WebKit::WebFrame::selectionAsString):
        (WebKit::WebFrame::setTextDirection):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::editorState):
        (WebKit::WebPage::executeEditingCommand):
        (WebKit::WebPage::isEditingCommandEnabled):
        (WebKit::WebPage::validateCommand):
        (WebKit::WebPage::handleEditingKeyboardEvent):
        (WebKit::WebPage::advanceToNextMisspelling):
        (WebKit::WebPage::uppercaseWord):
        (WebKit::WebPage::lowercaseWord):
        (WebKit::WebPage::capitalizeWord):
        (WebKit::WebPage::replaceSelectionWithText):
        (WebKit::WebPage::handleAlternativeTextUIResult):
        (WebKit::WebPage::setCompositionForTesting):
        (WebKit::WebPage::hasCompositionForTesting):
        (WebKit::WebPage::confirmCompositionForTesting):
        (WebKit::WebPage::setComposition):
        (WebKit::WebPage::cancelComposition):
        * WebProcess/WebPage/efl/WebPageEfl.cpp:
        (WebKit::WebPage::confirmComposition):
        (WebKit::WebPage::setComposition):
        (WebKit::WebPage::cancelComposition):
        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::executeKeypressCommandsInternal):
        (WebKit::WebPage::handleEditingKeyboardEvent):
        (WebKit::WebPage::setComposition):
        (WebKit::WebPage::confirmComposition):
        (WebKit::WebPage::cancelComposition):
        (WebKit::WebPage::insertText):
        (WebKit::WebPage::insertDictatedText):
        (WebKit::WebPage::getMarkedRange):
        (WebKit::WebPage::firstRectForCharacterRange):
        (WebKit::WebPage::readSelectionFromPasteboard):
        (WebKit::WebPage::getStringSelectionForPasteboard):
        (WebKit::WebPage::getDataSelectionForPasteboard):

2013-05-15  Anders Carlsson  <andersca@apple.com>

        Need a way for NPAPI plug-ins to open preference panes
        https://bugs.webkit.org/show_bug.cgi?id=116173
        <rdar://problem/13503848>

        Reviewed by Sam Weinig.

        * PluginProcess/PluginControllerProxy.h:
        Add openPluginPreferencePane().

        * PluginProcess/mac/PluginControllerProxyMac.mm:
        (WebKit::PluginControllerProxy::openPluginPreferencePane):
        Send OpenPluginPreferencePane to the UI process.

        * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
        (WebKit::NetscapePluginModule::getPluginInfo):
        Get the preference pane path.
        
        * Shared/Plugins/PluginModuleInfo.h:
        Add preferencePanePath member variable.

        * UIProcess/Plugins/PluginProcessProxy.h:
        Add openPluginPreferencePane message handler.

        * UIProcess/Plugins/PluginProcessProxy.messages.in:
        ADd OpenPluginPreferencePane message.

        * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
        (WebKit::PluginProcessProxy::openPluginPreferencePane):
        Get the path to the preference pane and use LS to open it.

        * WebKit2.xcodeproj/project.pbxproj:
        Add new files.

        * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
        (WebKit::NPN_GetValue):
        Handle WKNVPlugInContainer.

        * WebProcess/Plugins/Netscape/NetscapePlugin.h:
        Add WKNVPlugInContainer member variable.

        * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
        (WebKit::NetscapePlugin::openPluginPreferencePane):
        Call through to the plug-in controller.

        (WebKit::NetscapePlugin::plugInContainer):
        Create a WKNPAPIPlugInContainer object if necessary.

        (WebKit::NetscapePlugin::platformDestroy):
        Invalidate the WKNPAPIPlugInContainer object.

        * WebProcess/Plugins/Netscape/mac/WKNPAPIPlugInContainer.h:
        New file with the protocol definition.

        * WebProcess/Plugins/Netscape/mac/WKNPAPIPlugInContainer.mm:
        (-[WKNPAPIPlugInContainer dealloc]):
        Assert that the plug-in is null (that we've been invalidated).

        (-[WKNPAPIPlugInContainer _invalidate]):
        Set the plug-in to null.

        (-[WKNPAPIPlugInContainer openPlugInPreferencePane]):
        Call through to the plug-in.

        * WebProcess/Plugins/Netscape/mac/WKNPAPIPlugInContainerInternal.h:
        New file with the interface declaration for the object that implements the protocol.

        * WebProcess/Plugins/PluginController.h:
        Add openPluginPreferencePane member function.

        * WebProcess/Plugins/PluginView.cpp:
        (WebKit::PluginView::openPluginPreferencePane):
        Add stub; this should never be called since we always go through the UI process.

2013-05-15  Alexey Proskuryakov  <ap@apple.com>

        [WK2][Mac] Split resetTextInputState into two functions
        https://bugs.webkit.org/show_bug.cgi?id=116174

        Reviewed by Anders Carlsson.

        Splitting resetTextInputState into resetSecureInputState and
        notifyInputContextAboutDiscardedComposition, paving the way for a fix where these
        won't be happening simultaneously.

        * UIProcess/API/mac/PageClientImpl.h:
        * UIProcess/API/mac/PageClientImpl.mm:
        (WebKit::PageClientImpl::resetSecureInputState):
        (WebKit::PageClientImpl::notifyInputContextAboutDiscardedComposition):
        * UIProcess/API/mac/WKView.mm:
        (-[WKView resignFirstResponder]):
        (-[WKView _resetSecureInputState]):
        (-[WKView _notifyInputContextAboutDiscardedComposition]):
        * UIProcess/API/mac/WKViewInternal.h:
        * UIProcess/PageClient.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::didCommitLoadForFrame):

2013-05-15  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Add padding to all public class structs for future expansion without breaking ABI
        https://bugs.webkit.org/show_bug.cgi?id=112565

        Reviewed by Anders Carlsson.

        Use 4 pointers for most of the classes that are unlikely to grow
        and 8 for WebKitWebView and WebKitWebContext.

        * UIProcess/API/gtk/WebKitBackForwardList.h:
        (_WebKitBackForwardListClass):
        * UIProcess/API/gtk/WebKitBackForwardListItem.h:
        (_WebKitBackForwardListItemClass):
        * UIProcess/API/gtk/WebKitContextMenu.h:
        (_WebKitContextMenuClass):
        * UIProcess/API/gtk/WebKitContextMenuItem.h:
        (_WebKitContextMenuItemClass):
        * UIProcess/API/gtk/WebKitCookieManager.h:
        (_WebKitCookieManagerClass):
        * UIProcess/API/gtk/WebKitDownload.h:
        (_WebKitDownloadClass):
        * UIProcess/API/gtk/WebKitFaviconDatabase.h:
        (_WebKitFaviconDatabaseClass):
        * UIProcess/API/gtk/WebKitFileChooserRequest.h:
        (_WebKitFileChooserRequestClass):
        * UIProcess/API/gtk/WebKitFindController.h:
        (_WebKitFindControllerClass):
        * UIProcess/API/gtk/WebKitFormSubmissionRequest.h:
        (_WebKitFormSubmissionRequestClass):
        * UIProcess/API/gtk/WebKitGeolocationPermissionRequest.h:
        (_WebKitGeolocationPermissionRequestClass):
        * UIProcess/API/gtk/WebKitHitTestResult.h:
        (_WebKitHitTestResultClass):
        * UIProcess/API/gtk/WebKitNavigationPolicyDecision.h:
        (_WebKitNavigationPolicyDecisionClass):
        * UIProcess/API/gtk/WebKitPlugin.h:
        (_WebKitPluginClass):
        * UIProcess/API/gtk/WebKitPolicyDecision.h:
        (_WebKitPolicyDecisionClass):
        * UIProcess/API/gtk/WebKitPrintOperation.h:
        (_WebKitPrintOperationClass):
        * UIProcess/API/gtk/WebKitResponsePolicyDecision.h:
        (_WebKitResponsePolicyDecisionClass):
        * UIProcess/API/gtk/WebKitSecurityManager.h:
        (_WebKitSecurityManagerClass):
        * UIProcess/API/gtk/WebKitSettings.h:
        (_WebKitSettingsClass):
        * UIProcess/API/gtk/WebKitURIRequest.h:
        (_WebKitURIRequestClass):
        * UIProcess/API/gtk/WebKitURIResponse.h:
        (_WebKitURIResponseClass):
        * UIProcess/API/gtk/WebKitURISchemeRequest.h:
        (_WebKitURISchemeRequestClass):
        * UIProcess/API/gtk/WebKitWebContext.h:
        (_WebKitWebContextClass):
        * UIProcess/API/gtk/WebKitWebInspector.h:
        (_WebKitWebInspectorClass):
        * UIProcess/API/gtk/WebKitWebResource.h:
        (_WebKitWebResourceClass):
        * UIProcess/API/gtk/WebKitWebView.h:
        (_WebKitWebViewClass):
        * UIProcess/API/gtk/WebKitWebViewBase.h:
        (_WebKitWebViewBaseClass):
        * UIProcess/API/gtk/WebKitWebViewGroup.h:
        (_WebKitWebViewGroupClass):
        * UIProcess/API/gtk/WebKitWindowProperties.h:
        (_WebKitWindowPropertiesClass):

2013-05-14  Carlos Garcia Campos  <cgarcia@igalia.com>

        Remove WTF_USE_PLATFORM_STRATEGIES
        https://bugs.webkit.org/show_bug.cgi?id=114431

        Reviewed by Darin Adler.

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

2013-05-14  Simon Cooper  <scooper@apple.com>

        Add a preference that can disable the fake SYSV SHM shim
        https://bugs.webkit.org/show_bug.cgi?id=116127
        <rdar://problem/13810524>

        Reviewed by Alexey Proskuryakov.

        * PluginProcess/mac/PluginProcessShim.mm:
        (WebKit::shim_disabled):
        (WebKit::shim_shmdt):
        (WebKit::shim_shmat):
        (WebKit::shim_shmget):
        (WebKit::shim_shmctl):

2013-05-14  Tim Horton  <timothy_horton@apple.com>

        [wk2] Not updating tiled backing coverage when main frame scrollability changes
        https://bugs.webkit.org/show_bug.cgi?id=116123
        <rdar://problem/13836559>

        Reviewed by Simon Fraser.

        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
        (TiledCoreAnimationDrawingArea):
        Add updateMainFrameClipsToExposedRect.

        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
        (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
        (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
        Remove m_clipsToExposedRect. We don't actually need it.

        (WebKit::TiledCoreAnimationDrawingArea::mainFrameScrollabilityChanged):
        Call updateMainFrameClipsToExposedRect so that we can always update
        tiled backing coverage and can factor out our calls to setClipsToExposedRect.

        (WebKit::TiledCoreAnimationDrawingArea::updateMainFrameClipsToExposedRect):
        Factor out setClipsToExposedRect calls to here, and also call
        FrameView::adjustTiledBackingCoverage so that the FrameView's tiled
        backing is informed to allow overdraw in the UI-process-scrolling case.

        (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
        Use updateMainFrameClipsToExposedRect.

2013-05-14  Alexey Proskuryakov  <ap@apple.com>

        [Mac] Add a testing shim for secure event input functions
        https://bugs.webkit.org/show_bug.cgi?id=116122

        Reviewed by Mark Rowe.

        Moved DyldInterpose.h to WebCore, as we now use it there too.

        * PluginProcess/mac/PluginProcessShim.mm:
        * Shared/mac/CookieStorageShimLibrary.cpp:
        * Shared/mac/DyldInterpose.h: Removed.
        * WebKit2.xcodeproj/project.pbxproj:
        * WebProcess/mac/SecItemShimLibrary.mm:

2013-05-14  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>

        [Win] REGRESSION(r149944): mmap is not available on Windows
        https://bugs.webkit.org/show_bug.cgi?id=116015

        Reviewed by Anders Carlsson.

        Use fastAlloc/fastFree for platforms other than OS(DARWIN) where
        using mmap is not necessary and maybe not available.

        * Platform/CoreIPC/ArgumentEncoder.cpp:
        (CoreIPC::allocBuffer):
        (CoreIPC::freeBuffer):
        (CoreIPC::ArgumentEncoder::~ArgumentEncoder):
        (CoreIPC::ArgumentEncoder::grow):

2013-05-14  Zan Dobersek  <zdobersek@igalia.com>

        [GTK] Move generated ColorData.cpp, WebKitFontFamilyNames.(cpp|h) build targets into libPlatform
        https://bugs.webkit.org/show_bug.cgi?id=115921

        Reviewed by Gustavo Noronha Silva.

        * GNUmakefile.am: Add platform_cppflags to the list of libwebkit2gtk CPPFLAGS.

2013-05-14  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>

        [WK2][Win] Fix ASSERT(DeleteTimerQueueTimer...)
        https://bugs.webkit.org/show_bug.cgi?id=116039

        Reviewed by Benjamin Poulain.

        According to the documentation, DeleteTimerQueueTimer can be expected to return
        false with an ERROR_IO_PENDING error when called from the timer's callback.

        * Platform/win/WorkQueueWin.cpp:
        (WorkQueue::timerCallback):

2013-05-14  Alexey Proskuryakov  <ap@apple.com>

        Remove unused "type" field from DictionaryPopupInfo
        https://bugs.webkit.org/show_bug.cgi?id=116011

        Reviewed by Darin Adler.

        It is unused, and furthermore, PDFPlugin sets it incorrectly anyway.

        * Shared/DictionaryPopupInfo.cpp:
        (WebKit::DictionaryPopupInfo::encode):
        (WebKit::DictionaryPopupInfo::decode):
        * Shared/DictionaryPopupInfo.h:
        * WebProcess/Plugins/PDF/PDFPlugin.mm:
        (WebKit::PDFPlugin::showDefinitionForAttributedString):
        * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
        (WebKit::WebContextMenuClient::lookUpInDictionary):
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::performDictionaryLookupAtLocation):
        (WebKit::WebPage::performDictionaryLookupForSelection):
        (WebKit::WebPage::performDictionaryLookupForRange):

2013-05-14  Michael Brüning  <michael.bruning@digia.com>

        [WK2] Make WebPageProxy use deviceScaleFactor() in creationParameters().
        https://bugs.webkit.org/show_bug.cgi?id=110218

        Reviewed by Darin Adler.

        Make the WebPageProxy::creationParameters use the accessor
        deviceScaleFactor() instead of using m_intrinsicDeviceScaleFactor
        directly. This will restore the custom device scale factor when
        reattaching to the WebProcess after a crash.

        Moreover, it will enable the Qt and ELF ports to use the
        existing C API for overriding the device scale factor instead
        of using the WebPageProxy directly or adding new C API to set
        the intrinsic device scale factor.

        * UIProcess/API/efl/EwkView.cpp:
        (EwkView::setDeviceScaleFactor):
        * UIProcess/API/qt/qquickwebpage.cpp:
        (QQuickWebPage::updatePaintNode):
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::creationParameters):

2013-05-13  Alex Christensen  <achristensen@apple.com>

        Added testRunner.setPrinting.
        https://bugs.webkit.org/show_bug.cgi?id=42693
        rdar://problem/8213845

        Reviewed by Darin Adler.

        * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
        (WKBundlePageCopyRenderTreeExternalRepresentationForPrinting): Added.
        * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
        Added WKBundlePageCopyRenderTreeExternalRepresentationForPrinting declaration.
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::renderTreeExternalRepresentationForPrinting): Added.
        * WebProcess/WebPage/WebPage.h:
        Added renderTreeExternalRepresentationForPrinting declaration.

2013-05-13  Timothy Hatcher  <timothy@apple.com>

        Add support for updating the Web Inspector toolbar height.

        https://bugs.webkit.org/show_bug.cgi?id=115996

        Reviewed by Joseph Pecoraro and Benjamin Poulain.

        * UIProcess/WebInspectorProxy.h:
        (WebKit::WebInspectorProxy::setToolbarHeight):
        (WebInspectorProxy):
        * UIProcess/WebInspectorProxy.messages.in:
        * UIProcess/efl/WebInspectorProxyEfl.cpp:
        (WebKit::WebInspectorProxy::platformSetToolbarHeight):
        * UIProcess/gtk/WebInspectorProxyGtk.cpp:
        (WebKit::WebInspectorProxy::platformSetToolbarHeight):
        (WebKit):
        * UIProcess/mac/WebInspectorProxyMac.mm:
        (WebKit::WebInspectorProxy::platformSetToolbarHeight):
        * UIProcess/qt/WebInspectorProxyQt.cpp:
        (WebKit::WebInspectorProxy::platformSetToolbarHeight):
        * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
        (WebKit::WebInspectorFrontendClient::setToolbarHeight):
        * WebProcess/WebCoreSupport/WebInspectorFrontendClient.h:
        (WebInspectorFrontendClient):
        * WebProcess/WebPage/WebInspector.cpp:
        (WebKit::WebInspector::setToolbarHeight):
        * WebProcess/WebPage/WebInspector.h:

2013-05-13  Ryosuke Niwa  <rniwa@webkit.org>

        Sometimes NSUndoManager can get into an inconsistent state
        https://bugs.webkit.org/show_bug.cgi?id=116050

        Reviewed by Enrica Casucci.

        Always group undo items to work around a bug in NSUndoManager that manifests
        when we call removeAllActionsWithTarget.

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

2013-05-13  Anders Carlsson  <andersca@apple.com>

        [WK2] Crash in WebKit::StorageAreaMap::didSetItem()
        https://bugs.webkit.org/show_bug.cgi?id=116026

        Reviewed by Andreas Kling.

        Make sure that we ignore any leftover messages from the UI process after we've reset
        the storage map. Achieve this by keeping a seed count in the StorageAreaMap object that's incremented
        everytime the map is reset. Associate every storage area change with the seed and ignore any incoming 
        notification messages from the UI process if the seeds are different.

        * Platform/CoreIPC/HandleMessage.h:
        (CoreIPC):
        (CoreIPC::callMemberFunction):
        * UIProcess/Storage/StorageManager.cpp:
        (WebKit::StorageManager::getValues):
        (WebKit::StorageManager::setItem):
        (WebKit::StorageManager::removeItem):
        (WebKit::StorageManager::clear):
        * UIProcess/Storage/StorageManager.h:
        (StorageManager):
        * UIProcess/Storage/StorageManager.messages.in:
        * WebProcess/Storage/StorageAreaMap.cpp:
        (WebKit::StorageAreaMap::StorageAreaMap):
        (WebKit::StorageAreaMap::setItem):
        (WebKit::StorageAreaMap::removeItem):
        (WebKit::StorageAreaMap::clear):
        (WebKit::StorageAreaMap::resetValues):
        (WebKit::StorageAreaMap::loadValuesIfNeeded):
        (WebKit::StorageAreaMap::didGetValues):
        (WebKit::StorageAreaMap::didSetItem):
        (WebKit::StorageAreaMap::didRemoveItem):
        (WebKit::StorageAreaMap::didClear):
        (WebKit::StorageAreaMap::applyChange):
        * WebProcess/Storage/StorageAreaMap.h:
        (StorageAreaMap):
        * WebProcess/Storage/StorageAreaMap.messages.in:

2013-05-13  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>

        [WK2][CoordinatedGraphics] Avoid dispensable calls to WebView::updateViewportSize()
        https://bugs.webkit.org/show_bug.cgi?id=116045

        Reviewed by Darin Adler.

        * UIProcess/CoordinatedGraphics/WebView.cpp:
        (WebKit::WebView::setSize):

2013-05-13  Jon Lee  <jonlee@apple.com>

        [WK2] Notification manager removal should not be tied to termination of web processes
        https://bugs.webkit.org/show_bug.cgi?id=116038
        <rdar://problem/10968680>

        Reviewed by Ryosuke Niwa.

        WebNotificationManagerProxy incorrectly removes the manager when web processes close.
        Since it is a supplemental on the web context, the manager should only be removed
        when the context is destroyed.

        * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
        * UIProcess/Notifications/WebNotificationManagerProxy.h: Remove implementation of
        processDidClose().

2013-05-13  Martin Robinson  <mrobinson@igalia.com>

        [GTK] [WebKit2] Use a template file for generated GObject enum files
        https://bugs.webkit.org/show_bug.cgi?id=115867

        Reviewed by Carlos Garcia Campos.

        * GNUmakefile.am: Use a template file instead of specifying portions of the file on the command-line.
        * UIProcess/API/gtk/WebKitEnumTypes.cpp.template: Added.
        * UIProcess/API/gtk/WebKitEnumTypes.h.template: Added.
        * UIProcess/API/gtk/WebKitFindController.cpp: We can no longer rely on WebKitEnumTypes.h to pull in WebKitWebView.h.

2013-05-13  Noam Rosenthal  <noam@webkit.org>

        [CoordGfx] requestAnimationFrame performance issues
        https://bugs.webkit.org/show_bug.cgi?id=112345

        Reviewed by Jocelyn Turcotte.

        Changed the logic of requestAnimationFrame in Coordinated Graphics.
        We don't send any IPC messages for requestAnimationFrame. Instead, we do one of two things:
        - If there is already a frame pending in the UI process, do nothing, as the animations would
          be serviced when the frame is returned to the web process.
        - If there is no frame pending, we schedule a flush, making sure that that flush occurs at 
          least 1/60 seconds after the last animation service, so that we don't get an infinite loop
          of flushes.

        * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
        (WebKit::CoordinatedLayerTreeHostProxy::requestAnimationFrame):
        * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
        (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
        (WebKit::CoordinatedLayerTreeHost::flushPendingLayerChanges):
        (WebKit::CoordinatedLayerTreeHost::scheduleAnimation):
        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.messages.in:

2013-05-13  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>

        [WK2][CoordinatedGraphics] WKView needs API for handling opacity
        https://bugs.webkit.org/show_bug.cgi?id=116032

        Reviewed by Kenneth Rohde Christiansen.

        Add WKViewSetOpacity and WKViewOpacity APIs and use them in
        WebView.cpp.

        * UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
        (WKViewSetOpacity):
        (WKViewOpacity):
        * UIProcess/API/C/CoordinatedGraphics/WKView.h:
        * UIProcess/CoordinatedGraphics/WebView.cpp:
        (WebKit::WebView::WebView):
        (WebKit::WebView::paintToCurrentGLContext):
        * UIProcess/CoordinatedGraphics/WebView.h:
        (WebKit::WebView::setOpacity):
        (WebKit::WebView::opacity):
        (WebView):

2013-05-13  Zan Dobersek  <zdobersek@igalia.com>

        [GTK] Use WebCore layer archives for TestWebCore, WebKitPluginProcess
        https://bugs.webkit.org/show_bug.cgi?id=115918

        Reviewed by Gustavo Noronha Silva.

        Due to layer violations and circular dependencies the WebKitPluginProcess requires for the
        libraries containing the built code of the intertwining Platform and WebCore layers to be
        specified multiple times when linking. This can be avoided by packing the two layers' archives
        into one big archive, named after the WebCore layer due to no clear boundary between it and the
        Platform layer. The big archive can then be specified only once when linking, simplifying the code
        and suppressing all the layering violations so they do not cause build problems.

        First the libtool libraries that the WebCore layer (as required by the WebKitPluginProcess) depends on
        are specified. These are then used as dependencies for the archive creation rule as well as the list
        from which the archive file paths are constructed and then used to dump the member files from these archives.
        The member files are then added to the big archive. The latter is added to the list of libraries the
        WebKitPluginProcess requires to successfully link.

        * GNUmakefile.am:

2013-05-13  Zalan Bujtas  <zalan@apple.com>

        WebProcess consuming very high CPU on linkedin.com
        https://bugs.webkit.org/show_bug.cgi?id=115601

        Reviewed by Andreas Kling.

        Disable WEB_TIMING_MINIMAL.
        Turn off window.performance and performance.now(). Some JS frameworks expect
        additional Web Timing APIs, when performance.now() is available.

        * Configurations/FeatureDefines.xcconfig:

2013-05-12  Anders Carlsson  <andersca@apple.com>

        Stop including UnusedParam.h
        https://bugs.webkit.org/show_bug.cgi?id=116003

        Reviewed by Sam Weinig.

        UnusedParam.h is empty now so there's no need to include it anymore.

        * UIProcess/API/C/WKContext.cpp:
        * UIProcess/API/C/WKInspector.cpp:
        * UIProcess/API/C/WKPage.cpp:
        * UIProcess/API/efl/ewk_text_checker.cpp:
        * UIProcess/API/efl/ewk_view.cpp:
        * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
        * UIProcess/API/efl/tests/test_ewk2_view.cpp:
        * UIProcess/mac/WKFullScreenWindowController.mm:
        * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
        * WebProcess/ResourceCache/WebResourceCacheManager.cpp:

2013-05-12  Andreas Kling  <akling@apple.com>

        Unload event listeners should prevent Safari from insta-killing the web process on last tab close.
        <http://webkit.org/b/115988>
        <rdar://problem/13870943>

        Reviewed by Anders Carlsson.

        Let WebCore control the UI process's suppression of the sudden termination mechanism.
        This is implemented by having WebChromeClient push Enable/DisableSuddenTermination messages
        over to the UI process where the appropriate NSProcessInfo calls are made.

        We also use this information when deciding whether to insta-kill a web process when its last
        page is closed. This mechanism is re-usable in WebCore to protect against sudden termination
        by the UI process.

        * UIProcess/WebProcessProxy.cpp:
        (WebKit::WebProcessProxy::WebProcessProxy):
        (WebKit::WebProcessProxy::removeWebPage):
        (WebKit::WebProcessProxy::enableSuddenTermination):
        (WebKit::WebProcessProxy::disableSuddenTermination):
        * UIProcess/WebProcessProxy.h:
        (WebProcessProxy):
        * UIProcess/WebProcessProxy.messages.in:
        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::enableSuddenTermination):
        (WebKit::WebChromeClient::disableSuddenTermination):
        * WebProcess/WebCoreSupport/WebChromeClient.h:
        (WebChromeClient):

2013-05-12  Alexey Proskuryakov  <ap@apple.com>

        <rdar://problem/13402976> Sandbox violations in com.nvidia.OpenGL on Lion.

        Reviewed by Dan Bernstein.

        * WebProcess/com.apple.WebProcess.sb.in: Silence the violations (on Lion only).

2013-05-12  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Remove unnecessary GTK_CHECK_VERSION #ifdefs
        https://bugs.webkit.org/show_bug.cgi?id=115914

        Reviewed by Martin Robinson.

        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
        (webkitWebViewBaseRealize):

2013-05-12  Raphael Kubo da Costa  <raphael.kubo.da.costa@intel.com>

        Unreviewed build fix after r149944.

        * Platform/CoreIPC/ArgumentEncoder.cpp: Include <sys/mman.h> for mmap(2).

2013-05-11  Anders Carlsson  <andersca@apple.com>

        Don't pass malloced pointers as out-of-line data when sending Mach messages
        https://bugs.webkit.org/show_bug.cgi?id=115970
        <rdar://problem/13144680>

        Reviewed by Sam Weinig.

        Give ArgumentEncoder an inline buffer of 512 bytes. If we need more than that, use mmap to allocate data
        since that gives us fresh zero-filled memory that we can safely share.

        * Platform/CoreIPC/ArgumentEncoder.cpp:
        (CoreIPC::ArgumentEncoder::ArgumentEncoder):
        Set up the buffer pointers to point to the inline buffer.

        (CoreIPC::ArgumentEncoder::~ArgumentEncoder):
        Unmap the buffer if necessary.

        (CoreIPC::ArgumentEncoder::grow):
        Grow the allocation exponentially, rounded up to the nearest page. This is a simplification from the
        current strategy, but most messages are either tiny in which case they will fit inside the inline buffer,
        or big in which case we'll end up doing less allocations + memory copying.

        * Platform/CoreIPC/ArgumentEncoder.h:
        (ArgumentEncoder):

2013-05-11  Zan Dobersek  <zdobersek@igalia.com>

        Unreviewed GTK build fix after r149904.

        * GNUmakefile.list.am: Adding missing build targets.

2013-05-11  Christophe Dumez  <ch.dumez@sisa.samsung.com>

        Unreviewed, Fix WK2 EFL build after r149904.

        Add new PluginInformation.cpp file to CMake.

        * CMakeLists.txt:

2013-05-11  Christophe Dumez  <ch.dumez@sisa.samsung.com>

        Unreviewed, fix WK2 EFL build after r149904.

        Add new WKPluginInformation.cpp file to CMake.

        * CMakeLists.txt:

2013-05-11  Andreas Kling  <akling@apple.com>

        When possible, terminate web processes immediately when closing their last page.
        <http://webkit.org/b/115964>
        <rdar://problem/13869266>

        Reviewed by Geoffrey Garen.

        When we're using a network process, there's no need for the UI process to wait for web processes
        to clear resource caches and terminate nicely.

        We can just kill them off right away in WebProcessProxy::removeWebPage() when the last page is closed.

        * UIProcess/WebProcessProxy.cpp:
        (WebKit::WebProcessProxy::removeWebPage):

            Terminate the child process immediately if possible.

        * UIProcess/WebProcessProxy.h:
        (WebKit::WebProcessProxy::canTerminateChildProcess):
        (WebKit::WebProcessProxy::shouldTerminate):

            Broke out the logic from the shouldTerminate() IPC message handler into a separate function
            so we can call it from removeWebPage().

2013-05-11  Anders Carlsson  <andersca@apple.com>

        Crash when terminating a process that has not been fully launched
        https://bugs.webkit.org/show_bug.cgi?id=115962
        <rdar://problem/13660916>

        Reviewed by Andreas Kling.

        Handle terminating a process that has not been fully launched.

        * UIProcess/Launcher/ProcessLauncher.cpp:
        (WebKit::ProcessLauncher::didFinishLaunchingProcess):
        If we have been invalidated, dispose the connection identifier.

        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
        (WebKit::ProcessLauncher::terminateProcess):
        If we're still launching the process, invalidate so the client won't get an unexpected
        didFinishLaunching callback.

        * UIProcess/WebProcessProxy.cpp:
        (WebKit::WebProcessProxy::requestTermination):
        Check if webConnection() is null before calling it. (It will be null if the process isn't fully launched).

2013-05-10  Brian J. Burg  <burg@cs.washington.edu>

        Web Inspector: Implement WK2 version of WebInspectorFrontendClient::save
        https://bugs.webkit.org/show_bug.cgi?id=115564

        Reviewed by Benjamin Poulain.

        Implement InspectorFrontendHost's save() and append() methods for
        Mac WebKit2. Add canSave() for all ports.

        * UIProcess/WebInspectorProxy.cpp:
        (WebKit::WebInspectorProxy::save):
        (WebKit):
        (WebKit::WebInspectorProxy::append):
        * UIProcess/WebInspectorProxy.h:
        (WebInspectorProxy):
        * UIProcess/WebInspectorProxy.messages.in:
        * UIProcess/efl/WebInspectorProxyEfl.cpp:
        (WebKit::WebInspectorProxy::platformSave):
        (WebKit):
        (WebKit::WebInspectorProxy::platformAppend):
        * UIProcess/gtk/WebInspectorProxyGtk.cpp:
        (WebKit::WebInspectorProxy::platformSave):
        (WebKit):
        (WebKit::WebInspectorProxy::platformAppend):
        * UIProcess/mac/WebInspectorProxyMac.mm:
        (WebKit::WebInspectorProxy::platformSave):
        (WebKit):
        (WebKit::WebInspectorProxy::platformAppend):
        * UIProcess/qt/WebInspectorProxyQt.cpp:
        (WebKit::WebInspectorProxy::platformSave):
        (WebKit):
        (WebKit::WebInspectorProxy::platformAppend):
        * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
        (WebKit::WebInspectorFrontendClient::canSave):
        (WebKit):
        (WebKit::WebInspectorFrontendClient::save):
        (WebKit::WebInspectorFrontendClient::append):
        * WebProcess/WebCoreSupport/WebInspectorFrontendClient.h:
        (WebInspectorFrontendClient):
        * WebProcess/WebPage/WebInspector.cpp:
        (WebKit::WebInspector::save):
        (WebKit):
        (WebKit::WebInspector::append):
        (WebKit::WebInspector::didSave):
        (WebKit::WebInspector::didAppend):
        * WebProcess/WebPage/WebInspector.h:
        (WebInspector):
        * WebProcess/WebPage/WebInspector.messages.in:
        * WebProcess/WebPage/efl/WebInspectorEfl.cpp:
        (WebKit::WebInspector::canSave):
        (WebKit):
        * WebProcess/WebPage/gtk/WebInspectorGtk.cpp:
        (WebKit::WebInspector::canSave):
        (WebKit):
        * WebProcess/WebPage/mac/WebInspectorMac.mm:
        (WebKit::WebInspector::canSave):
        (WebKit):
        * WebProcess/WebPage/qt/WebInspectorQt.cpp:
        (WebKit::WebInspector::canSave):
        (WebKit):

2013-05-10  Remy Demarest  <rdemarest@apple.com>

        Copy WKPluginInformation.h header to the WebKit2 Framework private headers.
        https://bugs.webkit.org/show_bug.cgi?id=115940

        Reviewed by Darin Adler.

        * WebKit2.xcodeproj/project.pbxproj:
        Move WKPluginInformation.h file from the framework's Project Headers to
        Private Headers.

2013-05-10  Zoltan Arvai  <zarvai@inf.u-szeged.hu>

        [Qt][Mac] Unreviewed. Roll out the fix attempt in r149912.

        * Target.pri:

2013-05-10  Simon Cooper  <scooper@apple.com>

        Fix AppleConnect issues for WiFi interfaces
        <rdar://problem/13776227&13776240&13776281>
        https://bugs.webkit.org/show_bug.cgi?id=115932

        Reviewed by Alexey Proskuryakov.

        Add support for WiFi interfaces for the AppleConnect plugin.
        Remove the FIXME.

        * Resources/PlugInSandboxProfiles/com.apple.ist.ds.appleconnect.webplugin.sb:

2013-05-10  Zoltan Arvai  <zarvai@inf.u-szeged.hu>

        [Qt][Mac] Unreviewed speculative build fix after r149904.

        * Target.pri:

2013-05-10  Zoltan Arvai  <zarvai@inf.u-szeged.hu>

        [Qt] Unreviewed buildfix after r149904.

        * Target.pri:

2013-05-09  Sam Weinig  <sam@webkit.org>

        Unify plug-in information dictionaries
        <rdar://problem/13852080>
        https://bugs.webkit.org/show_bug.cgi?id=115891

        Reviewed by Anders Carlsson.

        This unifies the plug-in information dictionaries vended by WKContextCopyPlugInInfoForBundleIdentifier
        and WKContextGetInfoForInstalledPlugIns with those from the WKPageLoaderClient and WKPageUIClient.

        All the old keys will continue to work, but have been deprecated in favor of new keys defined in 
        WKPluginInformation.h

        * Shared/API/c/WKPluginInformation.cpp: Added.
        * Shared/API/c/WKPluginInformation.h: Added.
        Export new keys as SPI.

        * Shared/Plugins/Netscape/PluginInformation.h: Added.
        * Shared/Plugins/Netscape/PluginInformation.cpp: Added.
        (WebKit::pluginInformationBundleIdentifierKey):
        (WebKit::pluginInformationBundleVersionKey):
        (WebKit::pluginInformationPathKey):
        (WebKit::pluginInformationDisplayNameKey):
        (WebKit::pluginInformationDefaultLoadPolicyKey):
        (WebKit::pluginInformationUpdatePastLastBlockedVersionIsKnownAvailableKey):
        (WebKit::pluginInformationHasSandboxProfileKey):
        (WebKit::pluginInformationFrameURLKey):
        (WebKit::pluginInformationMIMETypeKey):
        (WebKit::pluginInformationPageURLKey):
        (WebKit::pluginInformationPluginspageAttributeURLKey):
        (WebKit::pluginInformationPluginURLKey):
        Add new keys.

        (WebKit::pluginModuleInformation):
        (WebKit::createPluginInformationDictionary):
        Add creation functions to simplify multiple sites.

        * Shared/Plugins/Netscape/mac/PluginInformationMac.mm: Added.
        (WebKit::platformPluginModuleInformation):
        Add platform specific data to the dictionary.

        * UIProcess/API/C/WKPage.cpp:
        (WKPageGetPluginInformationBundleIdentifierKey):
        (WKPageGetPluginInformationBundleVersionKey):
        (WKPageGetPluginInformationDisplayNameKey):
        (WKPageGetPluginInformationFrameURLKey):
        (WKPageGetPluginInformationMIMETypeKey):
        (WKPageGetPluginInformationPageURLKey):
        (WKPageGetPluginInformationPluginspageAttributeURLKey):
        (WKPageGetPluginInformationPluginURLKey):
        * UIProcess/API/C/WKPage.h:
        Deprecate the old keys.

        * UIProcess/API/C/mac/WKContextPrivateMac.h:
        * UIProcess/API/C/mac/WKContextPrivateMac.mm:
        (WKContextCopyPlugInInfoForBundleIdentifier):
        (WKContextGetInfoForInstalledPlugIns):
        Simplify by using the new createPluginInformationDictionary functions.

        (WKPlugInInfoPathKey):
        (WKPlugInInfoBundleIdentifierKey):
        (WKPlugInInfoVersionKey):
        (WKPlugInInfoLoadPolicyKey):
        (WKPlugInInfoUpdatePastLastBlockedVersionIsKnownAvailableKey):
        (WKPlugInInfoIsSandboxedKey):
        Deprecate the old keys.

        * UIProcess/WebLoaderClient.cpp:
        (WebKit::WebLoaderClient::didFailToInitializePlugin):
        (WebKit::WebLoaderClient::didBlockInsecurePluginVersion):
        (WebKit::WebLoaderClient::pluginLoadPolicy):
        * UIProcess/WebLoaderClient.h:
        * UIProcess/WebUIClient.cpp:
        (WebKit::WebUIClient::unavailablePluginButtonClicked):
        * UIProcess/WebUIClient.h:
        Optimize for the most recent callback type which takes a dictionary,
        and pull out the necessary bits from it for deprecated callbacks as necessary.

        * UIProcess/WebPageProxy.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::findPlugin):
        (WebKit::WebPageProxy::unavailablePluginButtonClicked):
        (WebKit::WebPageProxy::didFailToInitializePlugin):
        (WebKit::WebPageProxy::didBlockInsecurePluginVersion):
        Use createPluginInformationDictionary() consistently, to get consistent results for callbacks.

        * WebKit2.xcodeproj/project.pbxproj:
        Add new files.

2013-05-10  Brian J. Burg  <burg@cs.washington.edu>

        Web Inspector: implement runOpenPanel callback for WebKit2 inspector
        https://bugs.webkit.org/show_bug.cgi?id=115865

        Reviewed by Sam Weinig.

        * UIProcess/WebInspectorProxy.h:
        (WebKit::WebInspectorProxy::inspectorWindow):
        Add an accessor for m_inspectorWindow.

        * UIProcess/mac/WebInspectorProxyMac.mm:
        (WebKit::runOpenPanel):
        Show the open panel dialog when requested.

        (WebKit::WebInspectorProxy::platformCreateInspectorPage):
        Register the callback when the inspector page is created.

2013-05-10  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>

        [WK2][CoordinatedGraphics] WKViewSetThemePath is EFL specific
        https://bugs.webkit.org/show_bug.cgi?id=115928

        Reviewed by Kenneth Rohde Christiansen.

        WKViewSetThemePath was moved to WKViewEfl.h since it is EFL specific.

        * UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
        * UIProcess/API/C/CoordinatedGraphics/WKView.h:
        * UIProcess/API/C/efl/WKViewEfl.cpp:
        (WKViewSetThemePath):
        * UIProcess/API/C/efl/WKViewEfl.h:
        * UIProcess/CoordinatedGraphics/WebView.cpp:
        * UIProcess/CoordinatedGraphics/WebView.h:
        (WebView):
        * UIProcess/efl/ViewClientEfl.cpp:
        * UIProcess/efl/WebInspectorProxyEfl.cpp:
        * UIProcess/efl/WebViewEfl.cpp:
        (WebKit::WebViewEfl::setThemePath):
        * UIProcess/efl/WebViewEfl.h:
        (WebViewEfl):

2013-05-10  Jer Noble  <jer.noble@apple.com>

        REGRESSION (r149439): Video turns blank upon entering full screen for the first time
        https://bugs.webkit.org/show_bug.cgi?id=115617

        Reviewed by Eric Carlson.

        Partially revert the change introduced in r149439 for OS X 10.8 and previous. On these
        platforms, create a window with a NSZeroSize initial frame, which fixes the "blank"
        first-full screen behavior.

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

2013-05-10  Zan Dobersek  <zdobersek@igalia.com>

        [WK2] Make the WebSoupRequestManager a supplement to the WebProcess
        https://bugs.webkit.org/show_bug.cgi?id=115717

        Reviewed by Andreas Kling.

        WebSoupRequestManager should inherit from WebProcessSupplement and should be used as such
        by the WebProcess. This removes the need for the m_soupRequestManager member variable in
        the WebProcess class and brings the WebSoupRequestManager in line with other manager classes
        of which instances are controlled by the WebProcess class.

        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::WebProcess): Add  the WebSoupRequestManager as a supplement.
        * WebProcess/WebProcess.h:
        (WebProcess): Remove the m_soupRequestManager member variable and its getter method.
        * WebProcess/soup/WebKitSoupRequestGeneric.cpp:
        (webkitSoupRequestGenericSendAsync): Access the WebSoupRequestManager as a supplement.
        (webkitSoupRequestGenericSendFinish): Ditto.
        * WebProcess/soup/WebProcessSoup.cpp:
        (WebKit::WebProcess::platformInitializeWebProcess): Access the WebSoupRequestManager as a supplement.
        * WebProcess/soup/WebSoupRequestManager.cpp:
        (WebKit::WebSoupRequestManager::supplementName): Specify the supplement's name.
        * WebProcess/soup/WebSoupRequestManager.h:
        (WebSoupRequestManager): Inherit from the WebProcessSupplement interface.

2013-05-10  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Remove unnecessary GLIB_CHECK_VERSION #ifdefs
        https://bugs.webkit.org/show_bug.cgi?id=115904

        Reviewed by Martin Robinson.

        * UIProcess/API/gtk/tests/TestInspectorServer.cpp:
        (startTestServerMonitor):
        * UIProcess/API/gtk/tests/TestWebKitAccessibility.cpp:
        (startTestServerMonitor):

2013-05-09  Anders Carlsson  <andersca@apple.com>

        Fix build.

        * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.mm:

2013-05-09  Anders Carlsson  <andersca@apple.com>

        Enable UI process storage
        https://bugs.webkit.org/show_bug.cgi?id=115879
        <rdar://problem/12239765>

        Reviewed by Beth Dakin.

        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
        Flip the switch.

2013-05-09  Anders Carlsson  <andersca@apple.com>

        Remove extra spaces between right angle brackets in template declarations
        https://bugs.webkit.org/show_bug.cgi?id=115877

        Reviewed by Beth Dakin.

        C++11 doesn't require spaces between right angle brackets so remove all of them.

        * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
        (WebKit::NetworkBlobRegistry::registerBlobURL):
        (WebKit::NetworkBlobRegistry::sandboxExtensions):
        * NetworkProcess/FileAPI/NetworkBlobRegistry.h:
        (NetworkBlobRegistry):
        * NetworkProcess/HostRecord.h:
        (HostRecord):
        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
        (WebKit::NetworkConnectionToWebProcess::didReceiveMessage):
        (WebKit::NetworkConnectionToWebProcess::didClose):
        (WebKit::NetworkConnectionToWebProcess::registerBlobURL):
        * NetworkProcess/NetworkConnectionToWebProcess.h:
        (NetworkConnectionToWebProcess):
        * NetworkProcess/NetworkProcess.h:
        (NetworkProcess):
        * NetworkProcess/NetworkResourceLoadScheduler.cpp:
        (WebKit::NetworkResourceLoadScheduler::servePendingRequests):
        (WebKit::NetworkResourceLoadScheduler::removeScheduledLoaders):
        * NetworkProcess/NetworkResourceLoadScheduler.h:
        * NetworkProcess/SchedulableLoader.cpp:
        (WebKit::SchedulableLoader::SchedulableLoader):
        * NetworkProcess/SchedulableLoader.h:
        (SchedulableLoader):
        * Platform/CoreIPC/ArgumentCoders.h:
        * Platform/CoreIPC/Connection.cpp:
        (Connection::SyncMessageState):
        (CoreIPC::Connection::waitForMessage):
        (CoreIPC::Connection::processIncomingMessage):
        * Platform/CoreIPC/Connection.h:
        (Connection):
        * Platform/WorkQueue.h:
        (WorkQueue):
        * PluginProcess/PluginProcess.h:
        (PluginProcess):
        * Scripts/webkit2/messages_unittest.py:
        (CoreIPC):
        * Shared/BlockingResponseMap.h:
        (BlockingResponseMap):
        * Shared/ChildProcessProxy.h:
        (ChildProcessProxy):
        * Shared/ImmutableArray.cpp:
        (WebKit::ImmutableArray::ImmutableArray):
        * Shared/ImmutableArray.h:
        (WebKit::ImmutableArray::adopt):
        (ImmutableArray):
        * Shared/ImmutableDictionary.cpp:
        (WebKit::ImmutableDictionary::keys):
        * Shared/ImmutableDictionary.h:
        (ImmutableDictionary):
        * Shared/Network/CustomProtocols/CustomProtocolManager.h:
        (CustomProtocolManager):
        * Shared/SecurityOriginData.cpp:
        (WebKit::performAPICallbackWithSecurityOriginDataVector):
        * Shared/SessionState.cpp:
        * Shared/StatisticsData.h:
        (StatisticsData):
        * Shared/UserMessageCoders.h:
        (WebKit::UserMessageDecoder::baseDecode):
        * Shared/WebArchive.cpp:
        (WebKit::WebArchive::WebArchive):
        (WebKit::WebArchive::subresources):
        (WebKit::WebArchive::subframeArchives):
        * Shared/WebContextMenuItem.cpp:
        (WebKit::WebContextMenuItem::submenuItemsAsImmutableArray):
        * Shared/WebOpenPanelParameters.cpp:
        (WebKit::WebOpenPanelParameters::acceptMIMETypes):
        (WebKit::WebOpenPanelParameters::selectedFileNames):
        * Shared/mac/ArgumentCodersMac.mm:
        (CoreIPC::encode):
        * SharedWorkerProcess/SharedWorkerProcess.h:
        (SharedWorkerProcess):
        * UIProcess/API/mac/WKPrintingView.h:
        (WebFrameProxy):
        * UIProcess/API/mac/WKPrintingView.mm:
        (-[WKPrintingView _drawPreview:]):
        * UIProcess/API/mac/WKView.mm:
        (WebKit):
        * UIProcess/Downloads/DownloadProxyMap.cpp:
        (WebKit::DownloadProxyMap::processDidClose):
        * UIProcess/Downloads/DownloadProxyMap.h:
        (DownloadProxyMap):
        * UIProcess/GeolocationPermissionRequestManagerProxy.h:
        (GeolocationPermissionRequestManagerProxy):
        * UIProcess/Launcher/mac/DynamicLinkerEnvironmentExtractor.h:
        (DynamicLinkerEnvironmentExtractor):
        * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h:
        (CustomProtocolManagerProxy):
        * UIProcess/Network/NetworkProcessProxy.h:
        (NetworkProcessProxy):
        * UIProcess/Notifications/NotificationPermissionRequestManagerProxy.h:
        (NotificationPermissionRequestManagerProxy):
        * UIProcess/Notifications/WebNotificationManagerProxy.h:
        (WebNotificationManagerProxy):
        * UIProcess/Plugins/PluginProcessManager.h:
        (PluginProcessManager):
        * UIProcess/Plugins/PluginProcessProxy.h:
        (PluginProcessProxy):
        * UIProcess/Plugins/WebPluginSiteDataManager.cpp:
        (WebKit::WebPluginSiteDataManager::didGetSitesWithData):
        * UIProcess/Plugins/WebPluginSiteDataManager.h:
        (WebPluginSiteDataManager):
        * UIProcess/SharedWorkers/SharedWorkerProcessManager.h:
        (SharedWorkerProcessManager):
        * UIProcess/SharedWorkers/SharedWorkerProcessProxy.h:
        (SharedWorkerProcessProxy):
        * UIProcess/StatisticsRequest.cpp:
        (WebKit::StatisticsRequest::completedRequest):
        * UIProcess/Storage/StorageManager.cpp:
        (StorageManager::StorageArea):
        (WebKit::StorageManager::StorageArea::dispatchEvents):
        (StorageManager::SessionStorageNamespace):
        (WebKit::StorageManager::SessionStorageNamespace::getOrCreateStorageArea):
        (WebKit::StorageManager::SessionStorageNamespace::cloneTo):
        (WebKit::StorageManager::createLocalStorageMap):
        (WebKit::StorageManager::createSessionStorageMap):
        (WebKit::StorageManager::destroyStorageMap):
        (WebKit::StorageManager::invalidateConnectionInternal):
        (WebKit::StorageManager::findStorageArea):
        (WebKit::StorageManager::getOrCreateLocalStorageNamespace):
        * UIProcess/Storage/StorageManager.h:
        (StorageManager):
        * UIProcess/WebApplicationCacheManagerProxy.h:
        (WebApplicationCacheManagerProxy):
        * UIProcess/WebBackForwardList.cpp:
        (WebKit::WebBackForwardList::addItem):
        (WebKit::WebBackForwardList::backListAsImmutableArrayWithLimit):
        (WebKit::WebBackForwardList::forwardListAsImmutableArrayWithLimit):
        (WebKit::WebBackForwardList::clear):
        * UIProcess/WebBackForwardList.h:
        (WebKit):
        * UIProcess/WebContext.cpp:
        (WebKit::WebContext::createNewWebProcess):
        (WebKit::WebContext::enableProcessTermination):
        (WebKit::WebContext::pluginInfoStoreDidLoadPlugins):
        * UIProcess/WebContext.h:
        (WebContext):
        * UIProcess/WebCookieManagerProxy.cpp:
        (WebKit::WebCookieManagerProxy::didGetHostnamesWithCookies):
        * UIProcess/WebCookieManagerProxy.h:
        (WebCookieManagerProxy):
        * UIProcess/WebDatabaseManagerProxy.cpp:
        (WebKit::WebDatabaseManagerProxy::didGetDatabasesByOrigin):
        (WebKit::WebDatabaseManagerProxy::didGetDatabaseOrigins):
        * UIProcess/WebDatabaseManagerProxy.h:
        (WebDatabaseManagerProxy):
        * UIProcess/WebFormClient.cpp:
        (WebKit::WebFormClient::willSubmitForm):
        * UIProcess/WebFormClient.h:
        (WebFormClient):
        * UIProcess/WebKeyValueStorageManagerProxy.h:
        (WebKeyValueStorageManagerProxy):
        * UIProcess/WebLoaderClient.cpp:
        (WebKit::WebLoaderClient::didChangeBackForwardList):
        * UIProcess/WebLoaderClient.h:
        (WebLoaderClient):
        * UIProcess/WebMediaCacheManagerProxy.cpp:
        (WebKit::WebMediaCacheManagerProxy::didGetHostnamesWithMediaCache):
        * UIProcess/WebMediaCacheManagerProxy.h:
        (WebMediaCacheManagerProxy):
        * UIProcess/WebPageContextMenuClient.cpp:
        (WebKit::WebPageContextMenuClient::showContextMenu):
        * UIProcess/WebPageProxy.cpp:
        (ExceededDatabaseQuotaRecords):
        (WebKit::WebPageProxy::relatedPages):
        (WebKit::WebPageProxy::didChangeBackForwardList):
        (WebKit::WebPageProxy::handleWheelEvent):
        (WebKit::WebPageProxy::processNextQueuedWheelEvent):
        (WebKit::WebPageProxy::findStringMatches):
        (WebKit::WebPageProxy::willSubmitForm):
        (WebKit::WebPageProxy::pluginInformationDictionary):
        (WebKit::WebPageProxy::didFindStringMatches):
        (WebKit::WebPageProxy::didReceiveEvent):
        * UIProcess/WebPageProxy.h:
        (WebPageProxy):
        * UIProcess/WebPageProxy.messages.in:
        * UIProcess/WebProcessProxy.cpp:
        (WebKit::WebProcessProxy::disconnect):
        (WebKit::WebProcessProxy::didClose):
        (WebKit::WebProcessProxy::didBecomeUnresponsive):
        (WebKit::WebProcessProxy::interactionOccurredWhileUnresponsive):
        (WebKit::WebProcessProxy::didBecomeResponsive):
        (WebKit::WebProcessProxy::disconnectFramesFromPage):
        (WebKit::WebProcessProxy::frameCountInPage):
        * UIProcess/WebProcessProxy.h:
        (WebProcessProxy):
        * UIProcess/WebResourceCacheManagerProxy.h:
        (WebResourceCacheManagerProxy):
        * UIProcess/mac/WebContextMenuProxyMac.mm:
        (WebKit::populateNSMenu):
        (WebKit::nsMenuItemVector):
        * WebProcess/ApplicationCache/WebApplicationCacheManager.cpp:
        (WebKit::WebApplicationCacheManager::getApplicationCacheOrigins):
        * WebProcess/Geolocation/WebGeolocationManager.cpp:
        (WebKit::WebGeolocationManager::didChangePosition):
        (WebKit::WebGeolocationManager::didFailToDeterminePosition):
        * WebProcess/IconDatabase/WebIconDatabaseProxy.h:
        (WebIconDatabaseProxy):
        * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.mm:
        * WebProcess/InjectedBundle/InjectedBundle.cpp:
        (WebKit::InjectedBundle::originsWithApplicationCache):
        * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.cpp:
        (WebKit::InjectedBundleBackForwardListItem::children):
        * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp:
        (WebKit::InjectedBundlePageEditorClient::getPasteboardDataForRange):
        * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.h:
        (InjectedBundlePageEditorClient):
        * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
        (WebKit::InjectedBundlePageFormClient::willSendSubmitEvent):
        (WebKit::InjectedBundlePageFormClient::willSubmitForm):
        * WebProcess/InjectedBundle/InjectedBundlePageFormClient.h:
        (InjectedBundlePageFormClient):
        * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
        (WebKit::InjectedBundlePageLoaderClient::featuresUsedInPage):
        * WebProcess/Network/WebResourceLoadScheduler.cpp:
        (WebKit::WebResourceLoadScheduler::internallyFailedLoadTimerFired):
        (WebKit::WebResourceLoadScheduler::networkProcessCrashed):
        * WebProcess/Network/WebResourceLoadScheduler.h:
        (WebResourceLoadScheduler):
        * WebProcess/Notifications/NotificationPermissionRequestManager.h:
        (NotificationPermissionRequestManager):
        * WebProcess/Notifications/WebNotificationManager.h:
        (WebNotificationManager):
        * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
        (WebKit::NPRuntimeObjectMap::invalidate):
        * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h:
        (NPRuntimeObjectMap):
        * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
        (WebKit::NetscapePlugin::stopAllStreams):
        * WebProcess/Plugins/Netscape/NetscapePlugin.h:
        (NetscapePlugin):
        * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
        (NetscapePluginStream):
        * WebProcess/Plugins/PDF/SimplePDFPlugin.mm:
        (getAllScriptsInPDFDocument):
        (WebKit::SimplePDFPlugin::runScriptsInPDFDocument):
        * WebProcess/Plugins/PluginProcessConnectionManager.h:
        (PluginProcessConnectionManager):
        * WebProcess/Plugins/PluginView.cpp:
        (WebKit::PluginView::cancelAllStreams):
        * WebProcess/Plugins/PluginView.h:
        (PluginView):
        * WebProcess/Storage/StorageAreaMap.cpp:
        (WebKit::StorageAreaMap::dispatchSessionStorageEvent):
        (WebKit::StorageAreaMap::dispatchLocalStorageEvent):
        * WebProcess/Storage/StorageNamespaceImpl.cpp:
        (WebKit::StorageNamespaceImpl::storageArea):
        * WebProcess/Storage/StorageNamespaceImpl.h:
        (StorageNamespaceImpl):
        * WebProcess/Storage/WebKeyValueStorageManager.cpp:
        (WebKit::keyValueStorageOriginIdentifiers):
        * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
        (WebKit::WebDatabaseManager::getDatabasesByOrigin):
        (WebKit::WebDatabaseManager::getDatabaseOrigins):
        * WebProcess/WebCoreSupport/WebEditorClient.cpp:
        (WebKit::WebEditorClient::getClientPasteboardDataForRange):
        * WebProcess/WebCoreSupport/WebEditorClient.h:
        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::dispatchWillSubmitForm):
        * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
        (WebKit::WebEditorClient::documentFragmentFromAttributedString):
        * WebProcess/WebPage/EventDispatcher.h:
        (EventDispatcher):
        * WebProcess/WebPage/FindController.cpp:
        (WebKit::FindController::findStringMatches):
        * WebProcess/WebPage/FindController.h:
        (FindController):
        * WebProcess/WebPage/WebBackForwardListProxy.cpp:
        (WebKit):
        * WebProcess/WebPage/WebFrame.cpp:
        (WebKit::WebFrame::childFrames):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::trackedRepaintRects):
        * WebProcess/WebPage/WebPage.h:
        (WebKit):
        (WebPage):
        * WebProcess/WebPage/mac/LayerTreeHostMac.h:
        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
        (TiledCoreAnimationDrawingArea):
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::visitedLinkStateChanged):
        (WebKit::WebProcess::allVisitedLinkStateChanged):
        (WebKit::WebProcess::focusedWebPage):
        (WebKit::WebProcess::createWebPage):
        (WebKit::WebProcess::didClose):
        (WebKit::WebProcess::webPageGroup):
        (WebKit::addCaseFoldedCharacters):
        (WebKit::getWebCoreMemoryCacheStatistics):
        (WebKit::WebProcess::setTextCheckerState):
        * WebProcess/WebProcess.h:
        (WebProcess):

2013-05-09  Anders Carlsson  <andersca@apple.com>

        Implement WebPlatformStrategies::transientLocalStorageNamespace
        https://bugs.webkit.org/show_bug.cgi?id=115876
        <rdar://problem/13852871>

        Reviewed by Beth Dakin.

        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
        (WebKit::WebPlatformStrategies::transientLocalStorageNamespace):
        Return a session storage namespace for a random page when UI process storage is enabled,
        otherwise call the base class implementation.

2013-05-09  Anders Carlsson  <andersca@apple.com>

        Use explicit qualifiers for names in the std:: namespace
        https://bugs.webkit.org/show_bug.cgi?id=115868

        Reviewed by Andreas Kling.

        * Shared/mac/ArgumentCodersMac.mm:
        (CoreIPC::encode):
        * UIProcess/API/C/WKPluginSiteDataManager.cpp:
        (WKPluginSiteDataManagerClearAllSiteData):
        * UIProcess/Plugins/PluginInfoStore.cpp:
        (WebKit::PluginInfoStore::findPluginForExtension):
        * UIProcess/WebFrameProxy.cpp:
        * UIProcess/WebProcessProxy.cpp:
        * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
        (WebKit::parsePostBuffer):
        * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
        (WebKit::NetscapePlugin::loadURL):
        * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
        (WebKit::NetscapePluginStream::deliverDataToPlugin):
        * WebProcess/Plugins/PDF/SimplePDFPlugin.mm:
        * WebProcess/WebPage/DrawingAreaImpl.cpp:
        * WebProcess/WebPage/FindController.cpp:
        (WebKit::FindController::countStringMatches):
        (WebKit::FindController::updateFindUIAfterPageScroll):
        * WebProcess/WebPage/WebPage.cpp:
        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::drawPDFPage):
        * WebProcess/mac/WebProcessMac.mm:

2013-05-09  Max Feil  <mfeil@rim.com>

        shouldUsePluginDocument() needs to be respected when a document is created
        https://bugs.webkit.org/show_bug.cgi?id=110308

        Reviewed by Rob Buis.

        Renaming shouldUsePluginDocument() to shouldAlwaysUsePluginDocument()
        for clarity.

        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::shouldAlwaysUsePluginDocument):
        * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
        (WebFrameLoaderClient):

2013-05-09  Timothy Hatcher  <timothy@apple.com>

        Make dragging off a tab in Safari with a docked Inspector reattach the Inspector.

        https://webkit.org/b/115832
        rdar://problem/13605661

        Reviewed by Benjamin Poulain.

        * UIProcess/mac/WebInspectorProxyMac.mm:
        (WebKit::WebInspectorProxy::platformBringToFront):
        If the Web Inspector is no longer in the same window as the inspected view,
        then we need to reopen the Inspector to get it attached to the right window.

2013-05-08  Anders Carlsson  <andersca@apple.com>

        Fix a typo in a comment.

        Rubber-stamped by Darin Adler.

        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::initializeConnection):

2013-05-08  Anders Carlsson  <andersca@apple.com>

        Remove bogus StorageAreaMap assertions
        https://bugs.webkit.org/show_bug.cgi?id=115838

        Reviewed by Sam Weinig.

        It is possible for didGetValues, and didClear to be called even if m_hasPendingClear is false so remove the assertions.

        * WebProcess/Storage/StorageAreaMap.cpp:
        (WebKit::StorageAreaMap::didGetValues):
        (WebKit::StorageAreaMap::didClear):

2013-05-08  Anders Carlsson  <andersca@apple.com>

        Handle incoming clear operations
        https://bugs.webkit.org/show_bug.cgi?id=115829

        Reviewed by Sam Weinig.

        Handle clear by building up a new storage map with our pending changes.

        * WebProcess/Storage/StorageAreaMap.cpp:
        (WebKit::StorageAreaMap::applyChange):

2013-05-08  Anders Carlsson  <andersca@apple.com>

        Don't apply changes while we're clearing the database
        https://bugs.webkit.org/show_bug.cgi?id=115826

        Reviewed by Darin Adler.

        * UIProcess/Storage/LocalStorageDatabase.cpp:
        (WebKit::LocalStorageDatabase::openDatabase):
        Only call didOpenDatabaseWithOrigin if we actually did open the database.

        (WebKit::LocalStorageDatabase::updateDatabaseWithChangedItems):
        Create the database if needed.

        * UIProcess/Storage/StorageManager.cpp:
        (WebKit::StorageManager::getValues):
        Send back a DidGetValues message.

        * WebProcess/Storage/StorageAreaMap.cpp:
        (WebKit::StorageAreaMap::StorageAreaMap):
        Initialize m_hasPendingClear.

        (WebKit::StorageAreaMap::clear):
        Set m_hasPendingClear to true.

        (WebKit::StorageAreaMap::resetValues):
        Set m_hasPendingClear back to false.

        (WebKit::StorageAreaMap::loadValuesIfNeeded):
        Set m_hasPendingClear to true so we'll ignore any changes that are already part of the returned items.

        (WebKit::StorageAreaMap::didGetValues):
        Set m_hasPendingClear back to false.

        (WebKit::StorageAreaMap::didClear):
        Set m_hasPendingClear back to false.

        (WebKit::StorageAreaMap::applyChange):
        Don't apply the change if m_hasPendingClear is true.

        * WebProcess/Storage/StorageAreaMap.messages.in:
        Add DidGetValues message.

2013-05-08  Andy Estes  <aestes@apple.com>

        [WebKit2] REGRESSION (Custom Protocols): Reproducible crash when navigating to URL with an invalid scheme
        https://bugs.webkit.org/show_bug.cgi?id=115790

        Reviewed by Alexey Proskuryakov.

        NSMutableSet does not support adding or removing nil objects, and
        WTF::HashSet does not support adding, removing, or checking for null
        WTF::Strings.

        For the NSMutableSet case, make sure that we don't try to add or remove
        nil NSStrings.

        For the WTF::HashSet case, NSURL will return a nil NSString if we ask
        it for its scheme when it is invalid, which we will convert to a null
        WTF::String. Don't try to check if our HashSet of registered schemes
        contains a null String.

        * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm:
        (WebKit::CustomProtocolManager::registerScheme): Assert that the scheme
        isn't null. We reject null schemes at the WKBrowsingContextController level.
        (WebKit::CustomProtocolManager::unregisterScheme): Ditto.
        (WebKit::CustomProtocolManager::supportsScheme): If scheme is null, return false.
        * UIProcess/API/mac/WKBrowsingContextController.mm:
        (+[WKBrowsingContextController registerSchemeForCustomProtocol:]): Do not register a nil scheme.
        (+[WKBrowsingContextController unregisterSchemeForCustomProtocol:]): Ditto.

2013-05-08  Anders Carlsson  <andersca@apple.com>

        Apply remote changes to storage maps locally
        https://bugs.webkit.org/show_bug.cgi?id=115825

        Reviewed by Beth Dakin.

        * WebProcess/Storage/StorageAreaMap.cpp:
        (WebKit::StorageAreaMap::resetValues):
        Clear the pending values map.

        (WebKit::StorageAreaMap::didSetItem):
        If we failed to set the item, forget everything we know about this storage map.
        Otherwise, remove the pending item.

        (WebKit::StorageAreaMap::didRemoveItem):
        Remove the pending item.

        (WebKit::StorageAreaMap::shouldApplyChangeForKey):
        Helper function that returns whether a change for a given key should be applied.

        (WebKit::StorageAreaMap::applyChange):
        Apply the change. Currently only adds and removes are handled.

        (WebKit::StorageAreaMap::dispatchStorageEvent):
        Apply the change locally as well if needed.

        * WebProcess/Storage/StorageAreaMap.h:

2013-05-08  Anders Carlsson  <andersca@apple.com>

        Assert at compile time that we don't pass Objective-C object pointers to adoptCF
        https://bugs.webkit.org/show_bug.cgi?id=115823

        Reviewed by Geoffrey Garen.

        Fix adoptNS/adoptCF mismatches. For the adopt(leakRef()) case we'd ideally want a static_pointer_cast overload for RetainPtr,
        but this will do for now.
        
        * Shared/mac/ArgumentCodersMac.mm:
        (CoreIPC::decode):

2013-05-08  Sam Weinig  <sam@webkit.org>

        Add SPI to determine if a plugin is sandboxed
        https://bugs.webkit.org/show_bug.cgi?id=115810

        Reviewed by Anders Carlsson.

        * PluginProcess/mac/PluginProcessMac.mm:
        (WebKit::PluginProcess::initializeSandbox):
        * Shared/Plugins/mac/PluginSandboxProfile.h: Added.
        * Shared/Plugins/mac/PluginSandboxProfile.mm: Added.
        (WebKit::pluginSandboxProfileDefaultDirectory):
        (WebKit::pluginSandboxProfileDirectories):
        (WebKit::pluginSandboxProfileName):
        (WebKit::pluginSandboxCommonProfile):
        (WebKit::pluginSandboxProfileForDirectory):
        (WebKit::pluginSandboxProfile):
        (WebKit::pluginHasSandboxProfileForDirectory):
        (WebKit::pluginHasSandboxProfile):
        Move sandbox code to its own file and refactor to use cocoa. Also adds pluginHasSandboxProfile function
        which uses the newly refactored code.

        * UIProcess/API/C/mac/WKContextPrivateMac.h:
        * UIProcess/API/C/mac/WKContextPrivateMac.mm:
        (WKPlugInInfoIsSandboxedKey):
        (createInfoDictionary):
        Add WKPlugInInfoIsSandboxedKey.

        * WebKit2.xcodeproj/project.pbxproj:
        Add new files.

2013-05-08  Anders Carlsson  <andersca@apple.com>

        Safari unexpectedly quits with invalid message from the web process with message ID 0x323002f (WebPageProxy.DecidePolicyForNavigationAction)
        https://bugs.webkit.org/show_bug.cgi?id=115814
        <rdar://problem/12331258>

        Reviewed by Andreas Kling.

        To ensure that any asynchronous messages are delivered to the UI process before
        synchronous messages (except when doing so would lead to a deadlock), Call
        setOnlySendMessagesAsDispatchWhenWaitingForSyncReplyWhenProcessingSuchAMessage on the UI process connections.

        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::initializeConnection):

2013-05-08  Tim Horton  <timothy_horton@apple.com>

        Coalesce WKView visibleRect changes
        https://bugs.webkit.org/show_bug.cgi?id=115792
        <rdar://problem/13776842>

        Reviewed by Simon Fraser.

        The system can call renewGState much more often than we actually want
        to update the WebProcess' notion of the exposed rect. Most importantly,
        within an autolayout pass it is called many times, and often sees
        [WKView visibleRect] be an intermediate value which will never be
        flushed to the screen. We only care about the final value, so we should
        wait until AppKit has finished - with a zero-delay timer - to inform the
        WebProcess of exposed rect changes.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::WebPageProxy):
        Add exposedRectChangedTimer.
        (WebKit::WebPageProxy::close):
        Cancel exposedRectChangedTimer when tearing down the WebPageProxy.
        * UIProcess/WebPageProxy.h:
        (WebPageProxy):
        Add exposedRectChangedTimerFired, the timer itself, and two rects:
        the most recent exposed rect from the WKView, and the last one we actually
        sent across to the WebProcess.
        * UIProcess/mac/WebPageProxyMac.mm:
        (WebKit::WebPageProxy::viewExposedRectChanged):
        Instead of immediately sending exposed rect changes to the WebProcess,
        start a zero-delay timer to do so.
        (WebKit::WebPageProxy::exposedRectChangedTimerFired):
        Once the zero-delay timer fires, send the new exposed rect to the WebProcess.

2013-05-08  Alexey Proskuryakov  <ap@apple.com>

        <rdar://problem/13776220> 13A451: PluginProcess(2225) deny file-read-data ~/Library/InputManagers
        <rdar://problem/13642510> PluginProcess logs sandbox violations initializing TextServices

        Reviewed by Anders Carlsson.

        * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb: Allow more
        TextServices and NSInputManager directories.

2013-05-08  Anders Carlsson  <andersca@apple.com>

        Remove BinarySemaphoreWin.cpp.

        Rubber-stamped by Beth Dakin.

        BinarySemaphoreWin has been moved to WTF, but the original was never removed.

        * Platform/CoreIPC/win/BinarySemaphoreWin.cpp: Removed.

2013-05-08  Zan Dobersek  <zdobersek@igalia.com>

        [WK2] Make the WebNetworkInfoManager a supplement to the WebProcess
        https://bugs.webkit.org/show_bug.cgi?id=115716

        Reviewed by Andreas Kling.

        WebNetworkInfoManager should inherit from WebProcessSupplement and should be used
        as such by the WebProcess. This removes the need for the m_networkInfoManager member
        variable in the WebProcess class and brings the WebNetworkInfoManager in line with
        other manager classes of which instances are controlled by the WebProcess class.

        * WebProcess/NetworkInfo/WebNetworkInfoManager.cpp:
        (WebKit::WebNetworkInfoManager::supplementName): Specify the supplement's name.
        (WebKit):
        * WebProcess/NetworkInfo/WebNetworkInfoManager.h:
        (WebKit): Alphabetically reorder the two forwarding declarations.
        (WebNetworkInfoManager): Inherit from the WebProcessSupplement interface.
        * WebProcess/WebCoreSupport/WebNetworkInfoClient.cpp:
        (WebKit::WebNetworkInfoClient::bandwidth): Access the WebNetworkInfoManager as a supplement.
        (WebKit::WebNetworkInfoClient::metered): Ditto.
        (WebKit::WebNetworkInfoClient::startUpdating): Ditto.
        (WebKit::WebNetworkInfoClient::stopUpdating): Ditto.
        (WebKit::WebNetworkInfoClient::networkInfoControllerDestroyed): Ditto.
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::WebProcess): Add the WebNetworkInfoManager instance as a supplement.
        * WebProcess/WebProcess.h:
        (WebProcess): Remove the m_networkInfoManager member variable and its getter method.

2013-05-08  Zan Dobersek  <zdobersek@igalia.com>

        [WK2] Make the WebBatteryManager a supplement to the WebProcess
        https://bugs.webkit.org/show_bug.cgi?id=115715

        Reviewed by Andreas Kling.

        WebBatteryManager should inherit from WebProcessSupplement and should be used as such
        by the WebProcess. This removes the need for the m_batteryManager member variable in
        the WebProcess class and brings the WebBatteryManager in line with other manager classes
        of which instances are controlled by the WebProcess class.

        * WebProcess/Battery/WebBatteryManager.cpp:
        (WebKit::WebBatteryManager::supplementName): Specify the supplement's name.
        (WebKit):
        * WebProcess/Battery/WebBatteryManager.h:
        (WebBatteryManager): Inherit from the WebProcessSupplement interface.
        * WebProcess/WebCoreSupport/WebBatteryClient.cpp:
        (WebKit::WebBatteryClient::startUpdating): Access the WebBatteryManager as a supplement.
        (WebKit::WebBatteryClient::stopUpdating): Ditto.
        (WebKit::WebBatteryClient::batteryControllerDestroyed): Ditto.
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::WebProcess): Add the WebBatteryManager instance as a supplement.
        * WebProcess/WebProcess.h:
        (WebProcess): Remove the m_batteryManager member variable and its getter method.

2013-05-06  Darin Adler  <darin@apple.com>

        Use adoptCF and adoptNS in more places
        https://bugs.webkit.org/show_bug.cgi?id=115657

        Reviewed by Sam Weinig.

        * Shared/Downloads/cfnet/DownloadCFNet.cpp:
        (WebKit::Download::useCredential):
        (WebKit::Download::start):
        (WebKit::Download::startWithHandle):
        (WebKit::Download::cancel):
        (WebKit::Download::didDecideDestination):
        Use adoptCF and adoptNS.

2013-05-06  Sam Weinig  <sam@webkit.org>

        Add SPI to get an array of all the installed plug-ins
        https://bugs.webkit.org/show_bug.cgi?id=115688

        Reviewed by Anders Carlsson.

        * UIProcess/API/C/mac/WKContextPrivateMac.h:
        * UIProcess/API/C/mac/WKContextPrivateMac.mm:
        (createInfoDictionary):
        Extract creation of info dictionary into helper.
        (WKContextCopyPlugInInfoForBundleIdentifier):
        Modified to use the new helper.
        (WKContextGetInfoForInstalledPlugIns):
        Added.

2013-05-07  Anders Carlsson  <andersca@apple.com>

        Clean up KeyframeValueList and related classes
        https://bugs.webkit.org/show_bug.cgi?id=115738

        Reviewed by Simon Fraser.

        Update for WebCore changes.

        * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
        (CoreIPC::::decode):

2013-05-07  Anders Carlsson  <andersca@apple.com>

        Add and remove databases and origins from the database tracker
        https://bugs.webkit.org/show_bug.cgi?id=115752

        Reviewed by Andreas Kling.

        * UIProcess/Storage/LocalStorageDatabase.cpp:
        (WebKit::LocalStorageDatabase::LocalStorageDatabase):
        Rename m_databaseFilename to m_databasePath.

        (WebKit::LocalStorageDatabase::tryToOpenDatabase):
        Rename m_databaseFilename to m_databasePath.

        * UIProcess/Storage/LocalStorageDatabase.h:
        Rename m_databaseFilename to m_databasePath.

        * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
        (WebKit::LocalStorageDatabaseTracker::databasePath):
        Rename databaseFilename to databasePath.

        (WebKit::LocalStorageDatabaseTracker::didOpenDatabaseWithOrigin):
        Call addDatabaseWithOriginIdentifier.

        (WebKit::LocalStorageDatabaseTracker::deleteEmptyDatabaseWithOrigin):
        Call removeDatabaseWithOriginIdentifier.

        (WebKit::LocalStorageDatabaseTracker::trackerDatabasePath):
        Call databasePath instead of databaseFile.

        (WebKit::LocalStorageDatabaseTracker::openTrackerDatabase):
        Bail if the database is already open.

        (WebKit::LocalStorageDatabaseTracker::updateTrackerDatabaseFromLocalStorageDatabaseFiles):
        Call addDatabaseWithOriginIdentifier if this is an origin we don't know about.

        (WebKit::LocalStorageDatabaseTracker::addDatabaseWithOriginIdentifier):
        Add the database to the Origins table.

        (WebKit::LocalStorageDatabaseTracker::removeDatabaseWithOriginIdentifier):
        remove the database from the Origins table and delete it.

        (WebKit::LocalStorageDatabaseTracker::pathForDatabaseWithOriginIdentifier):
        Helper function that looks up a database path given its identifier.
        
        * UIProcess/Storage/LocalStorageDatabaseTracker.h:
        Rename databaseFile to databasePath.

2013-05-07  Anders Carlsson  <andersca@apple.com>

        The storage database tracker should know when databases come and go
        https://bugs.webkit.org/show_bug.cgi?id=115748

        Reviewed by Andreas Kling.

        * UIProcess/Storage/LocalStorageDatabase.cpp:
        (WebKit::LocalStorageDatabase::openDatabase):
        If we've opened the database successfully, call LocalStorageDatabaseTracker::didOpenDatabaseWithOrigin.

        (WebKit::LocalStorageDatabase::tryToOpenDatabase):
        Remove a FIXME; we run all storage related things on the same thread.

        (WebKit::LocalStorageDatabase::close):
        Close the database. If it's empty, call LocalStorageDatabaseTracker::deleteEmptyDatabaseWithOrigin.

        (WebKit::LocalStorageDatabase::databaseIsEmpty):
        Helper function for determining whether a database is empty.
        
        * UIProcess/Storage/LocalStorageDatabase.h:
        * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
        (WebKit::LocalStorageDatabaseTracker::databaseFilename):
        Add ".localstorage" to the filename.

        (WebKit::LocalStorageDatabaseTracker::didOpenDatabaseWithOrigin):
        (WebKit::LocalStorageDatabaseTracker::deleteEmptyDatabaseWithOrigin):
        Add empty stubs.

2013-05-07  Brady Eidson  <beidson@apple.com>

        Add JoinExistingSession to the Networking XPC.
        <rdar://problem/12902288> and https://bugs.webkit.org/show_bug.cgi?id=114991

        Reviewed by Sam Weinig.

        * NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development/Info.plist:
        * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info.plist:

2013-05-07  Anders Carlsson  <andersca@apple.com>

        REGRESSION(r149647): Assertion failure in LocalStorageDatabaseTracker::setLocalStorageDirectoryInternal
        https://bugs.webkit.org/show_bug.cgi?id=115711

        Reviewed by Andreas Kling.

        Handle setting the local storage directory more than once.

        * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
        (WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectoryInternal):
        Close the database (if necessary) and clear the origins map before importing the origin identifiers.

2013-05-07  Antoine Quint  <graouts@apple.com>

        Re-establish autostart timeout extension on user interaction
        https://bugs.webkit.org/show_bug.cgi?id=113232

        Change WebProcess::pluginDidReceiveUserInteraction to use a tuple of
        (pluginOrigin, pageOrigin, mimeType) arguments like the other similar
        WebProcess methods and gather these arguments from the PlugInView's
        plug-in element.

        Reviewed by Dean Jackson.

        * WebProcess/Plugins/PluginView.cpp:
        (WebKit::PluginView::pluginDidReceiveUserInteraction):
        Cast the m_pluginElement to a HTMLPlugInImageElement so we can obtain the
        tuple of (pluginOrigin, pageOrigin, mimeType) to pass to pluginDidReceiveUserInteraction().

        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::plugInDidReceiveUserInteraction):
        * WebProcess/WebProcess.h:
        (WebProcess):
        Update method signature to a tuple of (pluginOrigin, pageOrigin, mimeType)
        and obtain the plug-in origin hash from that.

2013-05-07  Anders Carlsson  <andersca@apple.com>

        Each local storage database should know its origin
        https://bugs.webkit.org/show_bug.cgi?id=115737

        Reviewed by Andreas Kling.

        Store the security origin in a member variable. It'll be used to communicate database state changes to the tracker.

        * UIProcess/Storage/LocalStorageDatabase.cpp:
        (WebKit::LocalStorageDatabase::create):
        (WebKit::LocalStorageDatabase::LocalStorageDatabase):
        * UIProcess/Storage/LocalStorageDatabase.h:
        (LocalStorageDatabase):

2013-05-07  Brady Eidson  <beidson@apple.com>

        Remove some unnecessary soft linking in NetworkProcess. (Take 2)
        <rdar://problem/13821779> and https://bugs.webkit.org/show_bug.cgi?id=115683

        Reviewed by Dean Jackson and owned by Andreas Kling.

        As a followup to r149651, include the private headers conditionally.
        Also, fix a bug introduced with r149651 (bool vs CFBooleanRef).

        * NetworkProcess/mac/DiskCacheMonitor.mm:
        * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
        (WebKit::NetworkResourceLoader::tryGetShareableHandleFromSharedBuffer):

2013-05-07  Jinwoo Song  <jinwoo7.song@samsung.com>

        [EFL][WK2] Add ewk APIs for setting and getting user agent
        https://bugs.webkit.org/show_bug.cgi?id=114429

        Reviewed by Andreas Kling.

        Provide ewk_view_user_agent_get/set APIs which wraps WK APIs.

        * UIProcess/API/efl/EwkView.cpp:
        (EwkView::EwkView):
        (EwkView::setUserAgent):
        * UIProcess/API/efl/EwkView.h:
        (EwkView::userAgent):
        (EwkView):
        * UIProcess/API/efl/ewk_view.cpp:
        (ewk_view_user_agent_get):
        (ewk_view_user_agent_set):
        * UIProcess/API/efl/ewk_view.h:
        * UIProcess/API/efl/tests/test_ewk2_view.cpp:
        (TEST_F):

2013-05-07  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>

        HashTraits<RefPtr<P> >::PeekType should be raw pointer for better performance
        https://bugs.webkit.org/show_bug.cgi?id=115646

        Reviewed by Darin Adler.

        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
        (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
        * NetworkProcess/NetworkResourceLoadScheduler.cpp:
        (WebKit::NetworkResourceLoadScheduler::hostForURL):
        * Shared/ImmutableDictionary.h:
        (WebKit::ImmutableDictionary::get):
        * UIProcess/Storage/StorageManager.cpp:
        (WebKit::StorageManager::createSessionStorageMap):
        (WebKit::StorageManager::cloneSessionStorageNamespaceInternal):
        (WebKit::StorageManager::findStorageArea):
        * UIProcess/WebContext.h:
        (WebKit::WebContext::supplement):
        * UIProcess/WebProcessProxy.cpp:
        (WebKit::WebProcessProxy::webBackForwardItem):
        (WebKit::WebProcessProxy::webFrame):
        * UIProcess/efl/DownloadManagerEfl.cpp:
        (WebKit::DownloadManagerEfl::ewkDownloadJob):
        * WebProcess/Network/WebResourceLoadScheduler.h:
        (WebKit::WebResourceLoadScheduler::webResourceLoaderForIdentifier):
        * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
        (WebKit::NetscapePlugin::streamFromID):
        * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
        (WebKit::PluginProcessConnectionManager::pluginProcessCrashed):
        * WebProcess/Plugins/PluginView.cpp:
        (WebKit::PluginView::cancelStreamLoad):
        * WebProcess/WebPage/EventDispatcher.cpp:
        (WebKit::EventDispatcher::wheelEvent):
        * WebProcess/WebPage/WebBackForwardListProxy.cpp:
        (WebKit::WebBackForwardListProxy::itemForID):
        (WebKit::WebBackForwardListProxy::itemAtIndex):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::webUndoStep):
        (WebKit::WebPage::didFinishCheckingText):
        (WebKit::WebPage::didCancelCheckingText):
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::webPage):
        (WebKit::WebProcess::webPageGroup):
            Updated accordingly to new HashMap<.., RefPtr>::get() semantics.

2013-05-06  Zoltan Arvai  <zarvai@inf.u-szeged.hu>

        [Qt] Unreviewed buildfix after r149637.

        * Target.pri:

2013-05-06  Ryosuke Niwa  <rniwa@webkit.org>

        REGRESSION(r149647): Assertion failure in LocalStorageDatabaseTracker::setLocalStorageDirectoryInternal
        https://bugs.webkit.org/show_bug.cgi?id=115711    

        Rubber-stamped by Anders Carlsson.

        Temporarily removed the assertion. Andres is going to investigate it tomorrow.

        * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
        (WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectoryInternal):

2013-05-06  Darin Adler  <darin@apple.com>

        Use OwnPtr instead of deleteAllValues in KeyframeValueList
        https://bugs.webkit.org/show_bug.cgi?id=115652

        Reviewed by Simon Fraser.

        * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
        (CoreIPC::ArgumentCoder<GraphicsLayerAnimation>::decode): Added adoptPtr
        next to new when calling KeyframeValueList::insert.

2013-05-06  Gyuyoung Kim  <gyuyoung.kim@samsung.com>

        Unreviewed, build fix on EFL port

        * CMakeLists.txt: Add LocalStorageDatabaseTracker.cpp

2013-05-06  Philippe Normand  <pnormand@igalia.com>

        Unreviewed, GTK build fix after r149637.

        * GNUmakefile.list.am: Add LocalStorageDatabaseTracker sources to
        the build.

2013-05-06  Brady Eidson  <beidson@apple.com>

        Remove some unnecessary soft linking in NetworkProcess.
        <rdar://problem/13821779> and https://bugs.webkit.org/show_bug.cgi?id=115683

        Reviewed by Sam Weinig.

        Replace some unneeded soft linking with forward declarations.

        * NetworkProcess/mac/DiskCacheMonitor.mm:
        (WebKit::DiskCacheMonitor::DiskCacheMonitor):
        * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
        (WebKit::NetworkResourceLoader::tryGetShareableHandleFromCFURLCachedResponse):
        (WebKit::NetworkResourceLoader::tryGetShareableHandleFromSharedBuffer):

2013-05-06  Anders Carlsson  <andersca@apple.com>

        More work on LocalStorageDatabaseTracker
        https://bugs.webkit.org/show_bug.cgi?id=115680

        Reviewed by Andreas Kling.

        * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
        (WebKit::LocalStorageDatabaseTracker::databaseFilename):
        Call the new databaseFilename that takes a string.

        (WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectoryInternal):
        Assert that we don't call this more than once. Dispatch a call to import origin identifiers.

        (WebKit::LocalStorageDatabaseTracker::trackerDatabasePath):
        New helper function that returns the tracker database path.

        (WebKit::LocalStorageDatabaseTracker::openTrackerDatabase):
        Open the database and create the Origins table if needed.

        (WebKit::LocalStorageDatabaseTracker::importOriginIdentifiers):
        Open the database and import the origin identifiers from it, then synchronize it with whatever files are on disk.

        (WebKit::LocalStorageDatabaseTracker::updateTrackerDatabaseFromLocalStorageDatabaseFiles):
        Bring the tracker database up to date from the database files on disk.

        * UIProcess/Storage/LocalStorageDatabaseTracker.h:
        (LocalStorageDatabaseTracker):

2013-05-06  Alexey Proskuryakov  <ap@apple.com>

        <rdar://problem/13479806> [Mac] Pass information about open pages to LaunchServices
        https://bugs.webkit.org/show_bug.cgi?id=115665

        Reviewed by Darin Adler.

        * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::didCommitLoad): Moved repeated
        check for frame->isMainFrame() to the top, matching oter similar functions.
        Call updateActivePages().

        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::networkProcessConnectionClosed): Removed an obsolete FIXME.
        (WebKit::WebProcess::updateActivePages): Empty implementation for platforms
        that don't need to do anything here.

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

        * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::updateActivePages):
        Collect user visible origins of pages in the process and pass them to LS.

2013-05-06  Mark Rowe  <mrowe@apple.com>

        <rdar://problem/13775921> Switch off a deprecated API.

        Reviewed by Oliver Hunt.

        * Shared/mac/ChildProcessMac.mm:
        (WebKit::ChildProcess::setProcessSuppressionEnabled): When disabling process suppression,
        begin an activity that doesn't disable idle sleep, sudden termination or automatic termination.
        When enabling process suppression, end the activity.

2013-05-06  Anders Carlsson  <andersca@apple.com>

        Move local storage directory handling to LocalStorageDatabaseTracker
        https://bugs.webkit.org/show_bug.cgi?id=115676

        Reviewed by Andreas Kling.

        * UIProcess/Storage/LocalStorageDatabase.cpp:
        (WebKit::LocalStorageDatabase::create):
        (WebKit::LocalStorageDatabase::LocalStorageDatabase):
        * UIProcess/Storage/LocalStorageDatabase.h:
        (WebCore):
        (LocalStorageDatabase):
        * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
        (WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectory):
        (WebKit):
        (WebKit::LocalStorageDatabaseTracker::databaseFilename):
        (WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectoryInternal):
        * UIProcess/Storage/LocalStorageDatabaseTracker.h:
        (WebCore):
        (LocalStorageDatabaseTracker):
        * UIProcess/Storage/StorageManager.cpp:
        (WebKit::StorageManager::StorageArea::StorageArea):
        (WebKit::StorageManager::setLocalStorageDirectory):
        * UIProcess/Storage/StorageManager.h:
        (StorageManager):

2013-05-06  Manuel Rego Casasnovas  <rego@igalia.com>

        [GTK] Add webkit_uri_scheme_request_finish_error
        https://bugs.webkit.org/show_bug.cgi?id=94316

        Reviewed by Anders Carlsson.

        This new method will allow to finish WebKitURISchemeRequest with a
        GError that will be passed to the WebKitWebView through the
        "load-failed" signal.

        * UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
        (webkit_uri_scheme_request_finish_error): Implement new method using
        WebSoupRequestManagerProxy::didFailURIRequest().
        * UIProcess/API/gtk/WebKitURISchemeRequest.h: Add new method header.
        * UIProcess/API/gtk/WebKitWebContext.cpp: Include the usage of the new
        method in the code example at webkit_web_context_register_uri_scheme()
        documentation.
        * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Include the new
        method.
        * UIProcess/API/gtk/tests/LoadTrackingTest.cpp:
        (loadFailedCallback): Set m_error to monitor it from the tests.
        (LoadTrackingTest::loadURI): Clear m_error before each load.
        (LoadTrackingTest::loadHtml): Ditto.
        (LoadTrackingTest::loadPlainText): Ditto.
        (LoadTrackingTest::loadRequest): Ditto.
        (LoadTrackingTest::reload): Ditto.
        (LoadTrackingTest::goBack): Ditto.
        (LoadTrackingTest::goForward): Ditto.
        * UIProcess/API/gtk/tests/LoadTrackingTest.h: Add new member m_error.
        * UIProcess/API/gtk/tests/TestWebKitWebContext.cpp:
        (testWebContextURIScheme): Modify test to check the behavior of the new
        method.
        * UIProcess/soup/WebSoupRequestManagerProxy.cpp:
        (WebKit::WebSoupRequestManagerProxy::didFailURIRequest):
        (WebKit): Implement new method using
        WebSoupRequestManager::DidFailURIRequest().
        * UIProcess/soup/WebSoupRequestManagerProxy.h:
        (WebSoupRequestManagerProxy): Add new method header.
        * WebProcess/soup/WebSoupRequestManager.cpp:
        (WebKit):
        (WebKit::WebSoupRequestManager::didFailURIRequest): Implement new method
        setting the error and completing the request.
        * WebProcess/soup/WebSoupRequestManager.h:
        (WebSoupRequestManager): Add new method header.
        * WebProcess/soup/WebSoupRequestManager.messages.in: Add new method
        signature.

2013-05-06  Anders Carlsson  <andersca@apple.com>

        Every LocalStorageDatabase should know about its tracker
        https://bugs.webkit.org/show_bug.cgi?id=115673

        Reviewed by Andreas Kling.

        * UIProcess/Storage/LocalStorageDatabase.cpp:
        (WebKit::LocalStorageDatabase::create):
        (WebKit::LocalStorageDatabase::LocalStorageDatabase):
        * UIProcess/Storage/LocalStorageDatabase.h:
        * UIProcess/Storage/StorageManager.cpp:
        (WebKit::StorageManager::StorageArea::StorageArea):

2013-05-06  Anders Carlsson  <andersca@apple.com>

        Add LocalStorageDatabaseTracker class
        https://bugs.webkit.org/show_bug.cgi?id=115671

        Reviewed by Andreas Kling.

        Somewhat unsurprisingly, this class will be used for tracking local storage databases.

        * UIProcess/Storage/LocalStorageDatabaseTracker.cpp: Added.
        (WebKit::LocalStorageDatabaseTracker::create):
        (WebKit::LocalStorageDatabaseTracker::LocalStorageDatabaseTracker):
        (WebKit::LocalStorageDatabaseTracker::~LocalStorageDatabaseTracker):
        * UIProcess/Storage/LocalStorageDatabaseTracker.h: Added.
        (LocalStorageDatabaseTracker):
        
        * UIProcess/Storage/StorageManager.cpp:
        (WebKit::StorageManager::StorageManager):
        Create a local storage database tracker.

        * WebKit2.xcodeproj/project.pbxproj:
        Add new files.

2013-05-06  Anders Carlsson  <andersca@apple.com>

        Handle closing the local storage database
        https://bugs.webkit.org/show_bug.cgi?id=115669

        Reviewed by Beth Dakin.

        * UIProcess/Storage/LocalStorageDatabase.cpp:
        (WebKit::LocalStorageDatabase::LocalStorageDatabase):
        Initialize m_isClosed.
    
        (WebKit::LocalStorageDatabase::~LocalStorageDatabase):
        Assert that m_isClosed is false.

        (WebKit::LocalStorageDatabase::close):
        Set m_isClosed to true and write any pending changes to disk.

        (WebKit::LocalStorageDatabase::updateDatabase):
        Compute the changed items and pass them to updateDatabaseWithChangedItems.

        (WebKit::LocalStorageDatabase::updateDatabaseWithChangedItems):
        Split out the code that actually writes to the database from updateDatabase and into this function.

        * UIProcess/Storage/LocalStorageDatabase.h:
        * UIProcess/Storage/StorageManager.cpp:
        (WebKit::StorageManager::StorageArea::~StorageArea):
        Call close().

2013-05-06  Zan Dobersek  <zdobersek@igalia.com>

        [WK2] Make the WebNetworkInfoManagerProxy a supplement to the WebContext
        https://bugs.webkit.org/show_bug.cgi?id=115654

        Reviewed by Andreas Kling.

        Rather than holding a RefPtr to the WebNetworkInfoManagerProxy object in WebContext, change the WebNetworkInfoManagerProxy
        to implement the WebContextSupplement interface and handle the object as such in WebContext, simplifying its
        construction and cleanup, removing the specific RefPtr member variable and its correlating getter method.

        * UIProcess/API/C/WKContext.cpp:
        (WKContextGetNetworkInfoManager): Retrieve the WebNetworkInfoManagerProxy object from the suppplements of the WebContext.
        * UIProcess/WebContext.cpp:
        (WebKit::WebContext::WebContext): Add the WebNetworkInfoManagerProxy object as a supplement instead of assigning it to
        the now-removed member variable.
        (WebKit::WebContext::~WebContext): No need for the specific cleanup, the equivalent is achieved when iterating through the
        supplements vector.
        (WebKit::WebContext::disconnectProcess): Ditto.
        * UIProcess/WebContext.h:
        (WebContext): Remove the WebNetworkInfoManagerProxy RefPtr member variable and its getter method.
        * UIProcess/WebNetworkInfoManagerProxy.cpp:
        (WebKit::WebNetworkInfoManagerProxy::supplementName): Specift the supplement's name.
        (WebKit::WebNetworkInfoManagerProxy::WebNetworkInfoManagerProxy): Initialize as a WebContextSupplement.
        (WebKit::WebNetworkInfoManagerProxy::providerDidChangeNetworkInformation): Adjust to use the context() method instead of
        accessing the private m_context directly.
        (WebKit::WebNetworkInfoManagerProxy::contextDestroyed): Stop updating when invoked.
        (WebKit::WebNetworkInfoManagerProxy::processDidClose): Ditto.
        (WebKit::WebNetworkInfoManagerProxy::refWebContextSupplement): Call APIObject::ref.
        (WebKit::WebNetworkInfoManagerProxy::derefWebContextSupplement): Call APIObject::deref.
        * UIProcess/WebNetworkInfoManagerProxy.h:
        (WebNetworkInfoManagerProxy): Inherit from WebContextSupplement, declare the newly-inherited methods.

2013-05-06  Alexey Proskuryakov  <ap@apple.com>

        <rdar://problem/13479806> [Mac] Pass plug-in bundle ID to LaunchServices
        https://bugs.webkit.org/show_bug.cgi?id=115483

        Reviewed by Darin Adler.

        * PluginProcess/PluginProcess.h: Added m_pluginBundleIdentifier. We now need it
        in multiple places, so it's easier to pre-compute it.

        * PluginProcess/mac/PluginProcessMac.mm:
        (WebKit::loadSandboxProfileForDirectory): Changed to use precomputed bundle ID.
        (WebKit::loadSandboxProfile): Ditto.
        (WebKit::PluginProcess::platformInitializeProcess): Pre-compute bundle ID.
        (WebKit::PluginProcess::initializeProcessName): Pass it to LaunchServices.
        (WebKit::PluginProcess::initializeSandbox): Pass precomputed bundle ID instead of
        a path.

2013-05-06  Anders Carlsson  <andersca@apple.com>

        Handle removeItem and clear in LocalStorageDatabase
        https://bugs.webkit.org/show_bug.cgi?id=115664

        Reviewed by Darin Adler.

        * UIProcess/Storage/LocalStorageDatabase.cpp:
        (WebKit::LocalStorageDatabase::removeItem):
        Call itemDidChange with a null value, indicating that we want to remove this item.

        (WebKit::LocalStorageDatabase::clear):
        Clear items, set m_shouldClearItems and schedule a database update.

        (WebKit::LocalStorageDatabase::updateDatabase):
        If m_shouldClearItems is true, clear all items.

        * UIProcess/Storage/StorageManager.cpp:
        (WebKit::StorageManager::StorageArea::removeItem):
        Call through to the local storage database.

        (WebKit::StorageManager::StorageArea::clear):
        Ditto.

2013-05-06  Anders Carlsson  <andersca@apple.com>

        Write storage changes to disk
        https://bugs.webkit.org/show_bug.cgi?id=115660

        Reviewed by Andreas Kling.

        * UIProcess/Storage/LocalStorageDatabase.cpp:
        (WebKit::LocalStorageDatabase::LocalStorageDatabase):
        Initialize new member variables.

        (WebKit::LocalStorageDatabase::tryToOpenDatabase):
        Disable database threading checks.

        (WebKit::LocalStorageDatabase::importItems):
        Only import the items once.

        (WebKit::LocalStorageDatabase::setItem):
        Call itemDidChange.

        (WebKit::LocalStorageDatabase::itemDidChange):
        Record the change and schedule a database update.

        (WebKit::LocalStorageDatabase::scheduleDatabaseUpdate):
        Use WorkQueue::dispatchAfterDelay to schedule a datbase update.

        (WebKit::LocalStorageDatabase::updateDatabase):
        Write changes to disk. If there are more than 100 pending items, only write the first 100 and then schedule
        another database update for the remaining items.

        * UIProcess/Storage/LocalStorageDatabase.h:
        Add new member variables.

        * UIProcess/Storage/StorageManager.cpp:
        (WebKit::StorageManager::StorageArea::setItem):
        Call LocalStorageDatabase::setItem.

2013-05-06  Zan Dobersek  <zdobersek@igalia.com>

        [WK2] Make the WebBatteryManagerProxy a supplement to the WebContext
        https://bugs.webkit.org/show_bug.cgi?id=115625

        Reviewed by Andreas Kling.

        Rather than holding a RefPtr to the WebBatteryManagerProxy object in WebContext, change the WebBatteryManagerProxy
        to implement the WebContextSupplement interface and handle the object as such in WebContext, simplifying its
        construction and cleanup, removing the specific RefPtr member variable and its correlating getter method.

        * UIProcess/API/C/WKContext.cpp:
        (WKContextGetBatteryManager): Retrieve the WebBatteryManagerProxy object from the supplements of the WebContext.
        * UIProcess/WebBatteryManagerProxy.cpp:
        (WebKit::WebBatteryManagerProxy::supplementName): Specify the supplement's name.
        (WebKit::WebBatteryManagerProxy::WebBatteryManagerProxy): Initialize as a WebContextSupplementable.
        (WebKit::WebBatteryManagerProxy::providerDidChangeBatteryStatus): Adjust to use the context() method instead of accessing
        the private m_context directly.
        (WebKit::WebBatteryManagerProxy::providerUpdateBatteryStatus): Ditto.
        (WebKit::WebBatteryManagerProxy::contextDestroyed): Stop updating when invoked.
        (WebKit::WebBatteryManagerProxy::processDidClose): Ditto.
        (WebKit::WebBatteryManagerProxy::refWebContextSupplement): Call APIObject::ref.
        (WebKit::WebBatteryManagerProxy::derefWebContextSupplement): Call APIObject::deref.
        (WebKit::WebBatteryManagerProxy::startUpdating): Fire up the provider if not yet updating.
        (WebKit::WebBatteryManagerProxy::stopUpdating): Wind down the provider if updating.
        * UIProcess/WebBatteryManagerProxy.h:
        (WebBatteryManagerProxy): Inherit from WebContextSupplement, declare the newly-inherited methods.
        * UIProcess/WebContext.cpp:
        (WebKit::WebContext::WebContext): Add the WebBatteryManagerProxy object as a supplement instead of assigning it to
        the now-removed member variable.
        (WebKit::WebContext::~WebContext): No need for the specific cleanup, the equivalent is achieved when iterating through the
        supplements vector.
        (WebKit::WebContext::disconnectProcess): Ditto.
        * UIProcess/WebContext.h:
        (WebContext): Remove the WebBatteryManagerProxy RefPtr member variable and its getter method.

2013-05-06  Antoine Quint  <graouts@apple.com>

        Manage the presentation of the snapshotted plug-in using JavaScript
        https://bugs.webkit.org/show_bug.cgi?id=115548

        Reviewed by Dean Jackson.

        Expose a new plugInExtraScript method to support the injection of
        a JS file from the chrome client to customize the rendering of a
        snapshotted plug-in's shadow tree. Additionally, it is expected
        the chrome client will want to provide localized strings taking
        into account the snapshotted plug-in's mime-type, so we're adding
        this as a parameter to both plugInStartLabelTitle and
        plugInStartLabelSubtitle methods.

        * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
        * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
        (WebKit::InjectedBundlePageUIClient::plugInStartLabelTitle):
        (WebKit::InjectedBundlePageUIClient::plugInStartLabelSubtitle):
        (WebKit::InjectedBundlePageUIClient::plugInExtraScript):
        * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
        (InjectedBundlePageUIClient):
        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::plugInStartLabelTitle):
        (WebKit::WebChromeClient::plugInStartLabelSubtitle):
        (WebKit::WebChromeClient::plugInExtraScript):
        * WebProcess/WebCoreSupport/WebChromeClient.h:
        (WebChromeClient):

2013-05-05  Chris Fleizach  <cfleizach@apple.com>

        WEB SPEECH: deny file-read-data /Library/Speech/Synthesizers
        https://bugs.webkit.org/show_bug.cgi?id=115621

        Reviewed by Alexey Proskuryakov.

        Allow access to the location where 3rd party speech synthesizers are stored.

        * WebProcess/com.apple.WebProcess.sb.in:

2013-05-05  Tim Horton  <timothy_horton@apple.com>

        [wk2] Page Overlays: deviceScaleFactor doesn't update when the display changes
        https://bugs.webkit.org/show_bug.cgi?id=115577
        <rdar://problem/13762583>

        Reviewed by Darin Adler.

        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
        (WebKit::TiledCoreAnimationDrawingArea::setDeviceScaleFactor):
        Invalidate the page overlay layers' device scale factor when
        TiledCoreAnimationDrawingArea is notified that it has changed.

2013-05-05  Anders Carlsson  <andersca@apple.com>

        Remove the Vector::append overload that takes a Vector
        https://bugs.webkit.org/show_bug.cgi?id=115535

        Reviewed by Andreas Kling.

        Use Vector::appendVector instead.

        * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
        (WebKit::NetworkBlobRegistry::registerBlobURL):
        * NetworkProcess/SchedulableLoader.cpp:
        (WebKit::SchedulableLoader::SchedulableLoader):
        * Platform/CoreIPC/Connection.cpp:
        (CoreIPC::Connection::SyncMessageState::dispatchMessages):
        * UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp:
        (WebKit::PluginInfoStore::pluginsDirectories):

2013-05-04  Sam Weinig  <sam@webkit.org>

        Fix * placement in a few functions as noticed by Mark Rowe.

        Rubber-stamped by Dan Bernstein.

        * WebProcess/WebPage/PageBanner.h:
        (PageBanner):
        * WebProcess/WebPage/mac/PageBannerMac.mm:
        (WebKit::PageBanner::create):
        (WebKit::PageBanner::PageBanner):

2013-05-04  Sam Weinig  <sam@webkit.org>

        REGRESSION(r148312): Crash when calling WKPageClose(page) followed by WKPageTerminate(page)
        <rdar://problem/13702008>
        https://bugs.webkit.org/show_bug.cgi?id=115607

        Reviewed by Benjamin Poulain.

        API Test: WebKit2.CloseThenTerminate

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::resetStateAfterProcessExited):
        Don't try to reset the state if the page is closed, it won't work and its not worth it.

2013-05-04  Beth Dakin  <bdakin@apple.com>

        https://bugs.webkit.org/show_bug.cgi?id=115574
        Crash using new WKBundlePageSetHeaderBanner() API to set a banner to null

        Reviewed by Darin Adler.

        Don't call addToPage() on a null banner.
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::setHeaderPageBanner):
        (WebKit::WebPage::setFooterPageBanner):

2013-05-03  Alexey Proskuryakov  <ap@apple.com>

        <rdar://problem/13806836> Tweak sandbox profile.

        Reviewed by Dan Bernstein.

        * WebProcess/com.apple.WebProcess.sb.in:

2013-05-03  Tim Horton  <timothy_horton@apple.com>

        PDFPlugin: Changes being made to active annotation aren't saved when the PDF is exported
        https://bugs.webkit.org/show_bug.cgi?id=115544
        <rdar://problem/13801789>

        Reviewed by Alexey Proskuryakov.

        Commit changes to the active annotation (if there is one) before
        returning the live PDF data, so that said changes are represented
        in the exported or printed output.

        * WebProcess/Plugins/PDF/PDFPlugin.h: Override liveData.
        * WebProcess/Plugins/PDF/PDFPlugin.mm:
        (WebKit::PDFPlugin::liveData): Commit the active annotation if there is one.
        * WebProcess/Plugins/PDF/SimplePDFPlugin.h:
        (SimplePDFPlugin): Make liveData virtual.

2013-05-03  Tim Horton  <timothy_horton@apple.com>

        Web process crashes at WebPage::determinePrimarySnapshottedPlugInTimerFired + 8
        https://bugs.webkit.org/show_bug.cgi?id=115056
        <rdar://problem/13719543>

        Reviewed by Simon Fraser.

        Null-check m_page. In theory, we shouldn't get here, because we stop
        the timer at the only point where m_page is cleared, but crash logs say
        we're still crashing here.

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

2013-05-03  Tim Horton  <timothy_horton@apple.com>

        Remove some "what" comments from FindController
        https://bugs.webkit.org/show_bug.cgi?id=115546

        Reviewed by Andreas Kling.

        * WebProcess/WebPage/FindController.cpp:
        (WebKit::FindController::countStringMatches):
        (WebKit::FindController::updateFindUIAfterPageScroll):
        (WebKit::FindController::willMoveToWebPage):
        (WebKit::FindController::mouseEvent):
        Remove or reword some comments.

2013-05-02  Andy Estes  <aestes@apple.com>

        [WK2][CustomProtocols] NSURLProtocolClient methods should be dispatched on NSURLConnection's resource loader run loop
        https://bugs.webkit.org/show_bug.cgi?id=115539

        Reviewed by Alexey Proskuryakov.

        It turns out that calling NSURLProtocolClient methods from a different
        thread than the one running the NSURLConnection run loop is unsafe.
        Although I can't capture it reliably in a test case, doing so can
        sometimes result in a load timing out because the call to
        -[NSURLProtocolClient URLProtocolDidFinishLoading:] was ignored by
        NSURLConnection.

        Fix this by dispatching these methods on the NSURLConnection resource
        load run loop. This matches where NSURLProtocolClient methods are
        dispatched by typical NSURLProtocol implementations, and in my testing
        this solves the timeout issue.

        * Shared/Network/CustomProtocols/CustomProtocolManager.h: Declare
        dispatchOnResourceLoaderRunLoop().
        * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm:
        Declare +[NSURLConnection resourceLoaderRunLoop] on a category of
        NSURLConnection. Also include the header that declares it if it's present.
        (WebKit::CustomProtocolManager::didFailWithError): Call the
        NSURLProtocolClient method via dispatchOnResourceLoaderRunLoop().
        (WebKit::CustomProtocolManager::didLoadData): Ditto.
        (WebKit::CustomProtocolManager::didReceiveResponse): Ditto.
        (WebKit::CustomProtocolManager::didFinishLoading): Ditto.
        (WebKit::CustomProtocolManager::dispatchOnResourceLoaderRunLoop):
        Dispatch a block on the NSURLConnection resource loader run loop and
        then wake up the run loop.

2013-05-02  Brady Eidson  <beidson@apple.com>

        REGRESSION (149389) Main resources converted to downloads are immediately cancelled.
        <rdar://problem/13795795> and https://bugs.webkit.org/show_bug.cgi?id=115530

        Reviewed by Alexey Proskuryakov.

        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
        (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload): Call didConvertHandleToDownload
          on the NetworkResourceLoader.

        * NetworkProcess/NetworkResourceLoader.cpp:
        (WebKit::NetworkResourceLoader::NetworkResourceLoader):
        (WebKit::NetworkResourceLoader::didConvertHandleToDownload): Set m_handleConvertedToDownload to true.
        (WebKit::NetworkResourceLoader::abort): Only cancel the handle if m_handleConvertedToDownload is false.
        * NetworkProcess/NetworkResourceLoader.h:

2013-05-02  Alexey Proskuryakov  <ap@apple.com>

        <rdar://problem/13740375> Non-ASCII downloaded file names are garbled when using NetworkProcess
        https://bugs.webkit.org/show_bug.cgi?id=115520

        Reviewed by Darin Adler.

        * Shared/mac/WebCoreArgumentCodersMac.mm:
        (CoreIPC::::encodePlatformData):
        (CoreIPC::::decodePlatformData):
        Send the encoding fallback array over IPC, so that it's present when NetworkProcess does its loading.

2013-05-01  Alexey Proskuryakov  <ap@apple.com>

        REGRESSION (r149422): -[WKBrowsingContextController loadFileURL:restrictToFilesWithin:]
        broken when second argument is nil
        https://bugs.webkit.org/show_bug.cgi?id=115505
        <rdar://problem/13787297>

        Reviewed by Darin Adler.

        * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::loadFile): Pass a URL string
        to assumeReadAccessToBaseURL, as this is what it takes.

2013-05-01  Ryosuke Niwa  <rniwa@webkit.org>

        [Mac] WebKit doesn't enable or disable autocorrections when system preferences are changed
        https://bugs.webkit.org/show_bug.cgi?id=115463

        Reviewed by Darin Adler.

        Observe the default notification center and propagate the changes to TextCheckerState and
        to all WebProcesses when system preferences are updated.

        * UIProcess/TextChecker.h:
        * UIProcess/WebContext.h:
        * UIProcess/mac/TextCheckerMac.mm:
        (WebKit::shouldAutomaticTextReplacementBeEnabled):
        (WebKit::shouldAutomaticSpellingCorrectionBeEnabled):
        (WebKit::shouldAutomaticQuoteSubstitutionBeEnabled):
        (WebKit::shouldAutomaticDashSubstitutionBeEnabled):
        (WebKit::initializeState):
        (WebKit::TextChecker::didChangeAutomaticTextReplacementEnabled):
        (WebKit::TextChecker::didChangeAutomaticSpellingCorrectionEnabled):
        (WebKit::TextChecker::didChangeAutomaticQuoteSubstitutionEnabled):
        (WebKit::TextChecker::didChangeAutomaticDashSubstitutionEnabled):
        * UIProcess/mac/WebContextMac.mm:
        (WebKit::WebContext::registerNotificationObservers):
        (WebKit::WebContext::unregisterNotificationObservers):

2013-05-01  Ryuan Choi  <ryuan.choi@samsung.com>

        [GTK] Fix build break after r149449
        https://bugs.webkit.org/show_bug.cgi?id=115500

        Reviewed by Gustavo Noronha Silva.

        Unreviewed GTK build fix

        * GNUmakefile.list.am: Added LocalStorageDatabase.[cpp|h] to the list of
        sources.

2013-05-01  Martin Robinson  <mrobinson@igalia.com>

        [GTK] [WebKit2] Documentation for webkit_web_view_run_javascript should indicate what happens when JavaScript is disabled
        https://bugs.webkit.org/show_bug.cgi?id=115492

        Reviewed by Xan Lopez.

        * UIProcess/API/gtk/WebKitWebView.cpp: Clarify the documentation.

2013-05-01  Tim Horton  <timothy_horton@apple.com>

        Move knowledge of PDF/PostScript MIME types into MIMETypeRegistry
        https://bugs.webkit.org/show_bug.cgi?id=115487

        Reviewed by Darin Adler.

        * UIProcess/WebContext.cpp:
        * UIProcess/WebContext.h:
        Remove pdfAndPostScriptMIMETypes.

        * UIProcess/WebFrameProxy.cpp:
        (WebKit::WebFrameProxy::canShowMIMEType): Move PDF bits to WebPageProxy.
        (WebKit::WebFrameProxy::isDisplayingPDFDocument):
        Make use of WebCore's newfound knowledge of PDF and PostScript MIME types,
        so we don't have to duplicate it unnecessarily in WebKit2.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::canShowMIMEType):
        Add code which used to be in WebFrameProxy::canShowMIMEType, and adapt it
        to use WebCore's knowledge of PDF and PostScript MIME types.

        * WebProcess/Plugins/PDF/SimplePDFPlugin.mm:
        (WebKit::SimplePDFPlugin::pluginInfo):
        We previously supported the "text/pdf" MIME type for PDFViewController,
        so SimplePDFPlugin and PDFPlugin should support it as well.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::createPlugin):
        Adopt MIMETypeRegistry::isPDFOrPostScriptMIMEType.

        * WebProcess/WebPage/WebPage.h:
        (WebPage):
        Remove pdfAndPostScriptMIMETypes.

        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::platformPreferencesDidChange):
        Adopt getPDFAndPostScriptMIMETypes instead of duplicating the list in WebKit2.

2013-05-01  Anders Carlsson  <andersca@apple.com>

        Implement LocalStorageDatabase::importItems
        https://bugs.webkit.org/show_bug.cgi?id=115493

        Reviewed by Andreas Kling.

        Fetch items and insert them in the storage map.
        * UIProcess/Storage/LocalStorageDatabase.cpp:
        (WebKit::LocalStorageDatabase::importItems):

2013-05-01  Anders Carlsson  <andersca@apple.com>

        Begin work on loading items from the local storage database
        https://bugs.webkit.org/show_bug.cgi?id=115489

        Reviewed by Andreas Kling.

        Some of the LocalStorageDatabase code is originally from WebCore,
        but has been simplified due to the fact that we don't need to load
        database data asynchronously since we're already running on a non-main thread.

        * UIProcess/Storage/LocalStorageDatabase.cpp:
        (WebKit::LocalStorageDatabase::LocalStorageDatabase):
        (WebKit::LocalStorageDatabase::openDatabase):
        (WebKit::LocalStorageDatabase::tryToOpenDatabase):
        (WebKit::LocalStorageDatabase::migrateItemTableIfNeeded):
        (WebKit::LocalStorageDatabase::importItems):

        * UIProcess/Storage/LocalStorageDatabase.h:
        (WebKit::StorageManager::StorageArea::setItem):
        (WebKit::StorageManager::StorageArea::removeItem):
        (WebKit::StorageManager::StorageArea::clear):
        (WebKit::StorageManager::StorageArea::items):
        Call importItemsFromDatabase().
        
        (WebKit::StorageManager::StorageArea::importItemsFromDatabase):
        Ask the database to import the items.

2013-05-01  Ryuan Choi  <ryuan.choi@samsung.com>

        [EFL] Unreviewed buildfix after r149449.

        * CMakeLists.txt:

2013-05-01  Zoltan Arvai  <zarvai@inf.u-szeged.hu>

        [Qt] Unreviewed buildfix after r149449.

        * Target.pri:

2013-05-01  Anders Carlsson  <andersca@apple.com>

        Add LocalStorageDatabase class
        https://bugs.webkit.org/show_bug.cgi?id=115486

        Reviewed by Sam Weinig.

        The LocalStorageDatabase class will persist local storage data to disk.

        * UIProcess/Storage/LocalStorageDatabase.cpp:
        * UIProcess/Storage/LocalStorageDatabase.h: Added.

        * UIProcess/Storage/StorageManager.cpp:
        (StorageManager::StorageArea):
        (WebKit::StorageManager::LocalStorageNamespace::storageManager):
        Add getter.

        (StorageManager::LocalStorageNamespace):
        (WebKit::StorageManager::StorageArea::StorageArea):
        If this is a local storage area, create a LocalStorageDatabase.

        (WebKit::StorageManager::LocalStorageNamespace::databaseFilename):
        Helper function for getting the name of the database for the given origin.

        * WebKit2.xcodeproj/project.pbxproj:
        Add new files.

2013-05-01  Alexey Proskuryakov  <ap@apple.com>

        <rdar://problem/13781156> Launching NetworkProcess broken on some OS versions.

        Reviewed by Anders Carlsson.

        Adapt to LaunchServices changes.

        * Shared/mac/ChildProcessMac.mm:
        (WebKit::ChildProcess::setApplicationIsDaemon):

2013-05-01  Martin Robinson  <mrobinson@igalia.com>

        [GTK] [WebKit2] Add a setting to control whether or not accelerated 2D canvas is enabled
        https://bugs.webkit.org/show_bug.cgi?id=114394

        Reviewed by Anders Carlsson.

        Add a setting to control accelerated 2D canvas, which determines whether
        or not to consider rendering HTML canvas with hardware acceleration.

        * UIProcess/API/gtk/WebKitSettings.cpp:
        (webKitSettingsSetProperty): Added support for enable-accelerated-2d-canvas property.
        (webKitSettingsGetProperty): Added support for enable-accelerated-2d-canvas property.
        (webkit_settings_class_init): Added support for enable-accelerated-2d-canvas property.
        (webkit_settings_get_enable_accelerated_2d_canvas): Added.
        (webkit_settings_set_enable_accelerated_2d_canvas): Added.
        * UIProcess/API/gtk/WebKitSettings.h: New methods.
        * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Added new methods to the documentation.
        * UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
        (testWebKitSettings): Added a simple test for the setting.

2013-04-30  Jer Noble  <jer.noble@apple.com>

        Entering full screen mode shows desktop linen instead of WKView the first time.
        https://bugs.webkit.org/show_bug.cgi?id=115433
        <rdar://problem/13774540>

        Reviewed by Eric Carlson.

        For certain types of windows created by subclasses of WKView, the window in question fails to paint
        when created with a zero-size rect. Create the window with an initial size of the active screen frame
        as that is the likely destination size.

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

2013-05-01  Zoltan Arvai  <zarvai@inf.u-szeged.hu>

        [Qt][Win] Fix build after r149416.
        https://bugs.webkit.org/show_bug.cgi?id=115474

        Reviewed by Anders Carlsson.

        * Platform/CoreIPC/Connection.h:
        (Connection):
        * Platform/CoreIPC/win/ConnectionWin.cpp:
        (CoreIPC::Connection::dispatchSentMessagesUntil):

2013-05-01  Sergio Villar Senin  <svillar@igalia.com>

        Unreviewed GTK build fix after r149417.

        * GNUmakefile.list.am: Added PageBanner.[cpp|h] to the list of
        sources.

2013-05-01  Ryuan Choi  <ryuan.choi@samsung.com>

        [EFL] Unreviewed buildfix after r149416 and r149417.

        Unreviewed build fix.

        * CMakeLists.txt:

2013-05-01  Zoltan Arvai  <zarvai@inf.u-szeged.hu>

        [Qt] Unreviewed buildfix after r149416 and r149417.

        * Target.pri:

2013-04-30  Dongwoo Joshua Im  <dw.im@samsung.com>

        [EFL] Unreviewed, EFL build fix after r149416
        https://bugs.webkit.org/show_bug.cgi?id=115467

        Unreviewed build fix.

        * CMakeLists.txt: Remove non-existing file, BinarySemaphore.cpp, from the list.

2013-04-30  Simon Cooper  <scooper@apple.com>

        ipc-posix-shm backwards compatibility 
        https://bugs.webkit.org/show_bug.cgi?id=115448
        <rdar://problem/13743037>

        Reviewed by Alexey Proskuryakov.

        Add compatibility for older ipc-posix-shm operations, but prefer the
        newer names when writing profiles.

        * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:

2013-04-30  Philippe Normand  <pnormand@igalia.com>

        Unreviewed, GTK build fix after r149416.

        * GNUmakefile.list.am: Remove references to non-existant
        BinarySemaphore module.

2013-04-28  Alexey Proskuryakov  <ap@apple.com>

        <rdar://problem/13574729> Implement file path restrictions in WebKit Objective C API
        https://bugs.webkit.org/show_bug.cgi?id=115321

        Reviewed by Darin Adler.

        * UIProcess/API/C/WKPage.cpp:
        * UIProcess/API/C/WKPage.h: 
        * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::loadFile):
        * UIProcess/WebPageProxy.h:
        Added and implemented a C API to load a file while only opening sandbox for
        a specific directory.

        * UIProcess/API/mac/WKBrowsingContextController.h: Fixed a typo in a comment.

        * UIProcess/API/mac/WKBrowsingContextController.mm:
        (-[WKBrowsingContextController loadFileURL:restrictToFilesWithin:]):
        Respect allowedDirectory argument. Updated the function to raise an exception for
        incorrect input, as decribed in header file.

2013-04-29  Sam Weinig  <sam@webkit.org>

        Add API to allow WebKit2 banners to get mouse events
        https://bugs.webkit.org/show_bug.cgi?id=115395

        Reviewed by Beth Dakin.

        * Shared/API/c/WKBase.h:
        * Shared/APIObject.h:
        Add banner type.

        * WebKit2.xcodeproj/project.pbxproj:
        Add files.

        * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
        Add conversion.

        * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
        (WKBundlePageSetTopOverhangImage):
        (WKBundlePageSetBottomOverhangImage):
        Fix parameter names to be consistent.

        (WKBundlePageSetHeaderBanner):
        (WKBundlePageSetFooterBanner):
        * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
        * WebProcess/InjectedBundle/API/c/WKBundlePageBanner.cpp: Added.
        (WKBundlePageBannerGetTypeID):
        * WebProcess/InjectedBundle/API/c/WKBundlePageBanner.h: Added.
        * WebProcess/InjectedBundle/API/c/mac/WKBundlePageBannerMac.h: Added.
        * WebProcess/InjectedBundle/API/c/mac/WKBundlePageBannerMac.mm: Added.
        (PageBannerClientImpl):
        (PageBannerClientImpl::create):
        (PageBannerClientImpl::PageBannerClientImpl):
        (PageBannerClientImpl::pageBannerDestroyed):
        (PageBannerClientImpl::mouseEvent):
        (WKBundlePageBannerCreateBannerWithCALayer):
        (WKBundlePageBannerGetLayer):
        Add banner API.

        * WebProcess/WebPage/PageBanner.h: Added.
        * WebProcess/WebPage/PageBanner.cpp: Added.
        (WebKit::PageBanner::~PageBanner):
        (WebKit::PageBanner::addToPage):
        (WebKit::PageBanner::detachFromPage):
        (WebKit::PageBanner::didChangeDeviceScaleFactor):
        (WebKit::PageBanner::mouseEvent):
        Add non-mac implementations.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::~WebPage):
        (WebKit::WebPage::setHeaderPageBanner):
        (WebKit::WebPage::headerPageBanner):
        (WebKit::WebPage::setFooterPageBanner):
        (WebKit::WebPage::footerPageBanner):
        (WebKit::WebPage::mouseEvent):
        (WebKit::WebPage::mouseEventSyncForTesting):
        * WebProcess/WebPage/WebPage.h:
        Add banner setter/getters and give the banners a chance to handle mouse events.

        * WebProcess/WebPage/mac/PageBannerMac.mm: Added.
        (WebKit::PageBanner::create):
        (WebKit::PageBanner::PageBanner):
        (WebKit::PageBanner::addToPage):
        (WebKit::PageBanner::detachFromPage):
        (WebKit::PageBanner::didChangeDeviceScaleFactor):
        (WebKit::PageBanner::mouseEvent):
        (WebKit::PageBanner::layer):
        Add Mac implementation.

        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::updateHeaderAndFooterLayersForDeviceScaleChange):
        Notify banners when the device scale changes.

2013-04-30  Anders Carlsson  <andersca@apple.com>

        Remove the WebKit2 BinarySemaphore class
        https://bugs.webkit.org/show_bug.cgi?id=115458

        Reviewed by Benjamin Poulain.

        Remove the WK2 specific BinarySemaphore class and use the one from WTF.

        * Platform/CoreIPC/BinarySemaphore.cpp: Removed.
        * Platform/CoreIPC/BinarySemaphore.h: Removed.
        * Platform/CoreIPC/Connection.cpp:
        * Platform/CoreIPC/Connection.h:
        * WebKit2.xcodeproj/project.pbxproj:

2013-04-30  Alexey Proskuryakov  <ap@apple.com>

        <rdar://problem/13757475> WebProcess deny ipc-posix-shm-read-data CFPBS:A2:

        Reviewed by Anders Carlsson.

        * WebProcess/com.apple.WebProcess.sb.in: Allow pbs shared memory.

2013-04-30  Alexey Proskuryakov  <ap@apple.com>

        [Mac] Don't open window server connection in network process
        https://bugs.webkit.org/show_bug.cgi?id=115446

        Reviewed by Anders Carlsson.

        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::NetworkProcess::initializeProcess):
        * NetworkProcess/NetworkProcess.h:
        * NetworkProcess/mac/NetworkProcessMac.mm:
        (WebKit::NetworkProcess::initializeProcess):
        (WebKit::NetworkProcess::initializeProcessName):
        Instead of shutting down a connection after setting process name, just prevent
        it from being created.

        * Shared/ChildProcess.h:
        * Shared/mac/ChildProcessMac.mm: (WebKit::ChildProcess::setApplicationIsDaemon):
        Expose a function for client processes to call if they don't run an NSApplication
        run loop.

        * OfflineStorageProcess/OfflineStorageProcess.cpp:
        (WebKit::OfflineStorageProcess::initializeProcess):
        * OfflineStorageProcess/OfflineStorageProcess.h:
        * OfflineStorageProcess/mac/OfflineStorageProcessMac.mm:
        (WebKit::OfflineStorageProcess::initializeProcess):
        (WebKit::OfflineStorageProcess::initializeProcessName):
        * SharedWorkerProcess/SharedWorkerProcess.cpp:
        (WebKit::SharedWorkerProcess::initializeProcess):
        (WebKit::SharedWorkerProcess::initializeProcessName):
        * SharedWorkerProcess/SharedWorkerProcess.h:
        * SharedWorkerProcess/mac/SharedWorkerProcessMac.mm:
        (WebKit::SharedWorkerProcess::initializeProcess):
        (WebKit::SharedWorkerProcess::initializeProcessName):
        Match NetworkProcess for consistency.

        * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::initializeProcessName):
        Don't null check UI process name. First, it can't be null, and second, some other
        processes already don't have this check.

2013-04-30  Tim Horton  <timothy_horton@apple.com>

        Disable deprecation warnings around some NSProcessInfo API.

        Rubber-stamped by Brady Eidson.

        * Shared/mac/ChildProcessMac.mm:
        (WebKit::ChildProcess::setProcessSuppressionEnabled):

2013-04-30  Brady Eidson  <beidson@apple.com>

        [WK2] Threads get stuck in NetworkProcess when canceling loads in WebProcess.
        <rdar://problem/13757687> and https://bugs.webkit.org/show_bug.cgi?id=115319

        Written and reviewed by both Alexey Proskuryakov and Brady Eidson.

        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
        (WebKit::NetworkConnectionToWebProcess::didClose): Call abort() on all loaders
          instead of connectionToWebProcessDidClose()
        (WebKit::NetworkConnectionToWebProcess::removeLoadIdentifier): Instead of removing
          the loader from the scheduler, call abort() which will also end up removing it.

        * NetworkProcess/SchedulableLoader.h: Add a virtual abort() call.

        * NetworkProcess/NetworkResourceLoader.cpp:
        (WebKit::NetworkResourceLoader::sendAbortingOnFailure): Added a messageFlags argument so 
          callers can pass DispatchMessageEvenWhenWaitingForSyncReply.
        (WebKit::NetworkResourceLoader::abort): Combined "abortInProgressLoad" and "cleanup" to
          be a general purpose "cancel"
        (WebKit::NetworkResourceLoader::didReceiveBuffer):
        (WebKit::NetworkResourceLoader::willSendRequestAsync):
        (WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpaceAsync):
        * NetworkProcess/NetworkResourceLoader.h:

        * NetworkProcess/SyncNetworkResourceLoader.cpp:
        (WebKit::SyncNetworkResourceLoader::abort):
        * NetworkProcess/SyncNetworkResourceLoader.h:

        * WebProcess/Network/WebResourceLoadScheduler.cpp:
        (WebKit::WebResourceLoadScheduler::remove): Remove an obsolete/incorrect comment.

        * WebProcess/Network/WebResourceLoader.cpp:
        (WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo): Add comment stressing
          the importance of this null check so it's not removed again.

2013-04-30  Carlos Garcia Campos  <cgarcia@igalia.com>

        [WK2][GTK] MiniBrowser won't play video in <embed> tag
        https://bugs.webkit.org/show_bug.cgi?id=113107

        Reviewed by Anders Carlsson.

        The wrong clip region is used for windowed plugins, because it's
        translated to window frame coords again.

        * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
        (WebKit::NetscapePlugin::platformGeometryDidChange): Do not move
        the current clip region.

2013-04-30  Timothy Hatcher  <timothy@apple.com>

        Make the Inspector dock to right button work in the WebKit nightlies on Safari 6.0.4.

        https://webkit.org/b/115428

        Reviewed by Joseph Pecoraro.

        * UIProcess/mac/WebInspectorProxyMac.mm:
        (WebKit::WebInspectorProxy::createInspectorWindow): Reduce the required Safari version.
        (WebKit::WebInspectorProxy::platformDetach): Simplify the frame restoring code so it
        works on Safari 6.0.4.

2013-04-30  Artur Moryc  <a.moryc@samsung.com>

        [WK2][EFL] Spelling marker disappears while selection is being changed
        https://bugs.webkit.org/show_bug.cgi?id=115165

        Reviewed by Anders Carlsson.

        The marker for a misspelled word disappears while the cursor is being navigated along the word.

        * WebProcess/WebCoreSupport/WebEditorClient.cpp:
        (WebKit::WebEditorClient::shouldEraseMarkersAfterChangeSelection):

2013-04-30  Zalan Bujtas  <zalan@apple.com>

        Animations fail to start on http://www.google.com/insidesearch/howsearchworks/thestory/
        https://bugs.webkit.org/show_bug.cgi?id=111244

        Reviewed by David Kilzer.
        
        Enable performance.now() as a minimal subset of Web Timing API. 
        It returns DOMHighResTimeStamp, a monotonically increasing value representing the 
        number of milliseconds from the start of the navigation of the current document.
        JS libraries use this API to check against the requestAnimationFrame() timestamp.

        * Configurations/FeatureDefines.xcconfig:

2013-04-29  Chris Fleizach  <cfleizach@apple.com>

        WEB SPEECH: need to identify the default voice per language
        https://bugs.webkit.org/show_bug.cgi?id=115366

        Reviewed by Tim Horton.

        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
        (InitWebCoreSystemInterface):

2013-04-29  Benjamin Poulain  <benjamin@webkit.org>

        [WK2] Streamline the use of strings in WebProcess::getWebCoreStatistics
        https://bugs.webkit.org/show_bug.cgi?id=115315

        Reviewed by Geoffrey Garen.

        Remove a couple of unjustified DEFINE_STATIC_LOCAL.
        Use ASCIILiteral when allocating new String.

        * WebProcess/WebProcess.cpp:
        (WebKit::getWebCoreMemoryCacheStatistics):
        (WebKit::WebProcess::getWebCoreStatistics):

2013-04-29  Anders Carlsson  <andersca@apple.com>

        Remove StorageTracker::originsLoaded
        https://bugs.webkit.org/show_bug.cgi?id=115382

        Reviewed by Sam Weinig.

        Add m_didFinishLoadingOrigins.

        * WebProcess/Storage/WebKeyValueStorageManager.cpp:
        (WebKit::WebKeyValueStorageManager::WebKeyValueStorageManager):
        (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
        (WebKit::WebKeyValueStorageManager::didFinishLoadingOrigins):
        * WebProcess/Storage/WebKeyValueStorageManager.h:
        (WebKeyValueStorageManager):

2013-04-29  Chris Fleizach  <cfleizach@apple.com>

        WEB SPEECH Update seatbelt profile to work with speech synthesis
        https://bugs.webkit.org/show_bug.cgi?id=115368

        Reviewed by Alexey Proskuryakov.

        * WebProcess/com.apple.WebProcess.sb.in:

2013-04-28  Beth Dakin  <bdakin@apple.com>

        Need a LayoutMilestone to fire when we have done our first paint after suppressing 
        incremental layout
        https://bugs.webkit.org/show_bug.cgi?id=115330
        -and corresponding-
        <rdar://problem/12722365>

        Reviewed by Simon Fraser.

        Two new millstones.
        * Shared/API/c/WKPageLoadTypes.h:
        * Shared/API/c/WKSharedAPICast.h:
        (WebKit::toWKLayoutMilestones):
        (WebKit::toLayoutMilestones):

        This null-check is necessary now since this code ends up running at 
        WebFrame::init() time while we're setting up the Document. 
        setVisualUpdatesAllowed(true) has always been called as a part of that process, 
        and now the updateLayout(), ends up calling this code too, but we don't actually 
        have a mainFrame yet since it's still being created.
        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::findLargestFrameInFrameSet):

2013-04-29  Brady Eidson  <beidson@apple.com>

        REGRESSION: We see authentication challenge sheets for favicon requests.
        <rdar://problem/13753470> and https://bugs.webkit.org/show_bug.cgi?id=115288

        Reviewed by Alexey Proskuryakov.

        Have NetworkResourceLoadParameters remember the ClientCredentialPolicy:
        * Shared/Network/NetworkResourceLoadParameters.cpp:
        (WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters):
        (WebKit::NetworkResourceLoadParameters::encode):
        (WebKit::NetworkResourceLoadParameters::decode):
        * Shared/Network/NetworkResourceLoadParameters.h:

        Pass along the ClientCredentialPolicy to the NetworkProcess:
        * WebProcess/Network/WebResourceLoadScheduler.cpp:
        (WebKit::WebResourceLoadScheduler::scheduleLoad):
        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
        (WebKit::WebPlatformStrategies::loadResourceSynchronously):
        * WebProcess/WebCoreSupport/WebPlatformStrategies.h:

        Have the SchedulableLoader remember the ClientCredentialPolicy:
        * NetworkProcess/SchedulableLoader.cpp:
        (WebKit::SchedulableLoader::SchedulableLoader):
        * NetworkProcess/SchedulableLoader.h:
        (WebKit::SchedulableLoader::clientCredentialPolicy):

        Don’t message for credentials if the ClientCredentialPolicy forbids it:
        * NetworkProcess/NetworkResourceLoader.cpp:
        (WebKit::NetworkResourceLoader::didReceiveAuthenticationChallenge):
        * NetworkProcess/NetworkResourceLoader.h:

        Update for the new loadResourceSynchronously signature (which is still a no-op on the NetworkProcess side):
        * NetworkProcess/NetworkProcessPlatformStrategies.cpp:
        (WebKit::NetworkProcessPlatformStrategies::loadResourceSynchronously):
        * NetworkProcess/NetworkProcessPlatformStrategies.h:

2013-04-29  Jer Noble  <jer.noble@apple.com>

        Unreviewed build fix. Point the Network process towards its own version of SecItemShim.dyld.

        * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info.plist:

2013-04-29  Alexey Proskuryakov  <ap@apple.com>

        Threads get stuck in NetworkProcess when canceling loads
        https://bugs.webkit.org/show_bug.cgi?id=115319

        Backing out part of the fix, as it's causing crashes.

        * WebProcess/Network/WebResourceLoader.cpp:
        (WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo):

2013-04-29  Noam Rosenthal  <noam@webkit.org>

        Get rid of "non-composited contents" in CoordinatedLayerTreeHost
        https://bugs.webkit.org/show_bug.cgi?id=110355

        Reviewed by Jocelyn Turcotte.

        Instead of using a special non-composited contents layer, we let RenderLayerCompositor create
        a proper GraphicsLayer for that content.
        CoordinatedLayerTreeHost now needs to find the main contents layer for the purpose of setting
        the trajectory vector and applying the cover rect.

        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
        (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
        (WebKit::CoordinatedLayerTreeHost::setRootCompositingLayer):
            Don't create the non-composited layer, instead keep a raw pointer to the root
            compositing layer created by the WebCore compositor.

        (WebKit::CoordinatedLayerTreeHost::setNonCompositedContentsNeedDisplay):
        (WebKit::CoordinatedLayerTreeHost::setNonCompositedContentsNeedDisplayInRect):
        (WebKit::CoordinatedLayerTreeHost::scrollNonCompositedContents):
        (WebKit::CoordinatedLayerTreeHost::sizeDidChange):
        (WebKit::CoordinatedLayerTreeHost::paintContents):
        (WebKit::CoordinatedLayerTreeHost::deviceOrPageScaleFactorChanged):
        (WebKit::CoordinatedLayerTreeHost::setVisibleContentsRect):
            Remove non-composited layer specialization.

2013-04-29  Zoltan Arvai  <zarvai@inf.u-szeged.hu>

        [Qt] Build fix. Enabling c++11 for Qt WK2 after r149259.
        https://bugs.webkit.org/show_bug.cgi?id=115345

        Reviewed by Anders Carlsson.

        * WebKit2.pri:

2013-04-29  Bruno de Oliveira Abinader  <bruno.abinader@basyskom.com>

        [WK2][EFL] Skip cancel fullscreen request if not made from FullScreen API
        https://bugs.webkit.org/show_bug.cgi?id=108201

        Reviewed by Andreas Kling.

        Adds a check on WebFullScreenManagerProxyEfl whether fullscreen mode was
        set from FullScreen API or not, so it can skip cancelling fullscreen
        request if fullscreen mode was set by application, preventing
        WebProcess' FullScreenManager from crashing.

        EFL unit test available: ewk_view_cancel_full_screen_request.

        * UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
        (WKViewExitFullScreen):
        * UIProcess/API/C/CoordinatedGraphics/WKView.h:
        WKViewExitFullScreen now returns a bool, indicating whether the
        operation has succeeded or not.

        * UIProcess/API/efl/ewk_view.cpp:
        (ewk_view_fullscreen_exit):
        Skip request if not in fullscreen mode.

        * UIProcess/API/efl/tests/test_ewk2_view.cpp:
        (TEST_F):
        Added ewk_view_cancel_full_screen_request unit test.

        * UIProcess/CoordinatedGraphics/WebView.cpp:
        (WebKit::WebView::exitFullScreen):
        * UIProcess/CoordinatedGraphics/WebView.h:
        (WebView):
        exitFullScreen now returns a bool, indicating whether the operation has
        succeeded or not.

        * UIProcess/WebFullScreenManagerProxy.cpp:
        (WebKit::WebFullScreenManagerProxy::WebFullScreenManagerProxy):
        * UIProcess/WebFullScreenManagerProxy.h:
        (WebFullScreenManagerProxy):
        * UIProcess/efl/WebFullScreenManagerProxyEfl.cpp:
        (WebKit::WebFullScreenManagerProxy::isFullScreen):
        (WebKit::WebFullScreenManagerProxy::enterFullScreen):
        (WebKit::WebFullScreenManagerProxy::exitFullScreen):
        Added m_hasRequestedFullScreen boolean flag to EFL port. Used to
        indicate if fullscreen mode is enabled, as well as sanity checks on both
        {enter,exit}FullScreen functions.

2013-04-29  Anders Carlsson  <andersca@apple.com>

        Stop using range-based for syntax
        https://bugs.webkit.org/show_bug.cgi?id=115356

        Reviewed by Andreas Kling.

        * PluginProcess/WebProcessConnection.cpp:
        (WebKit::WebProcessConnection::didClose):

2013-04-29  Sergio Correia  <sergio.correia@openbossa.org>

        [EFL][WK2]: WebProcessMain: hide call to ecore_x_shutdown() under guard
        https://bugs.webkit.org/show_bug.cgi?id=115295

        Reviewed by Andreas Kling.

        Since the mentioned function is declared in a header that is included
        conditionally depending on HAVE_ECORE_X being defined.

        * WebProcess/efl/WebProcessMainEfl.cpp:
        (WebKit::WebProcessMainEfl):

2013-04-29  Jinwoo Song  <jinwoo7.song@samsung.com>

        [WK2] Remove build warnings by -Wunused-parameter
        https://bugs.webkit.org/show_bug.cgi?id=115344

        Reviewed by Noam Rosenthal.

        Fix build warnigs -Wunused-parameter.

        * UIProcess/CoordinatedGraphics/WebView.cpp:
        (WebKit::WebView::createContextMenuProxy):
        * UIProcess/DrawingAreaProxy.h:
        (WebKit::DrawingAreaProxy::waitForPossibleGeometryUpdate):
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::connectionWillClose):

2013-04-29  Carlos Garcia Campos  <cgarcia@igalia.com>

        Unreviewed. Fix make distcheck.

        * GNUmakefile.list.am: Add missing header files to compilation.

2013-04-28  Gyuyoung Kim  <gyuyoung.kim@samsung.com>

        Unreviewed fix build break on EFL port since r149259.

        In EFL port, there is a non-compatible code when compiling based on C++11. This is a trivial build fix.

        I got a confirm from Sam about landing a trivial build fix patch without sign-off from
        WK2 owner.

        * UIProcess/API/efl/EwkViewCallbacks.h:

2013-04-28  Dean Jackson  <dino@apple.com>

        [Mac] Disable canvas backing store scaling (HIGH_DPI_CANVAS)
        https://bugs.webkit.org/show_bug.cgi?id=115310

        Reviewed by Simon Fraser.

        Remove ENABLE_HIGH_DPI_CANVAS_macosx.

        * Configurations/FeatureDefines.xcconfig:

2013-04-28  Sam Weinig  <sam@webkit.org>

        [WebKit2] Adopt new API for detecting window occlusion
        https://bugs.webkit.org/show_bug.cgi?id=115334

        Reviewed by Simon Fraser.

        Switch off of WKSI for window occlusion and use the new NSWindowDidChangeOcclusionState notification
        instead.

        * UIProcess/API/mac/WKView.mm:
        (-[WKView dealloc]):
        (-[WKView addWindowObserversForWindow:]):
        (-[WKView removeWindowObservers]):
        (-[WKView viewWillMoveToWindow:]):
        (-[WKView viewDidMoveToWindow]):
        (-[WKView _windowDidOrderOnScreen:]):
        (-[WKView _windowDidChangeOcclusionState:]):
        (-[WKView _setIsWindowOccluded:]):
        (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]):
        (-[WKView windowOcclusionDetectionEnabled]):
        (-[WKView setWindowOcclusionDetectionEnabled:]):
        Only compile occlusion detection code where supported and remove calls to register/deregister
        for detection callbacks, now that NSWindow will handle that for us. We also no longer need to
        track all the WKViews, as that was only required to lookup the view that matched the window number
        returned from the occlusion callback.

2013-04-26  Anders Carlsson  <andersca@apple.com>

        Use OwnPtr<PluginControllerProxy> for storing plug-in controllers in WebProcessConnection
        https://bugs.webkit.org/show_bug.cgi?id=115259

        Reviewed by Andreas Kling.

        * PluginProcess/WebProcessConnection.cpp:
        (WebKit::WebProcessConnection::addPluginControllerProxy):
        (WebKit::WebProcessConnection::removePluginControllerProxy):
        (WebKit::WebProcessConnection::didClose):
        * PluginProcess/WebProcessConnection.h:
        (WebProcessConnection):

2013-04-27  Jessie Berlin  <jberlin@apple.com>

        Build fix.

        * NetworkProcess/NetworkResourceLoader.cpp:
        (WebKit::NetworkResourceLoader::didReceiveBuffer):
        Do not declare another variable with the same name.

2013-04-27  Darin Adler  <darin@apple.com>

        Move from constructor and member function adoptCF/NS to free function adoptCF/NS.
        https://bugs.webkit.org/show_bug.cgi?id=115307

        Reviewed by Geoffrey Garen.

        This change was done by a global replace followed by compiling and inspecting for
        cases that needed to be tweaked by hand.

        * Platform/cg/CGUtilities.cpp:
        (WebKit::paintBitmapContext):
        * Platform/mac/ModuleMac.mm:
        (WebKit::Module::load):
        (WebKit::Module::platformFunctionPointer):
        * PluginProcess/mac/PluginProcessMac.mm:
        (WebKit::PluginProcess::initializeSandbox):
        * Shared/API/c/mac/WKURLRequestNS.mm:
        (WKURLRequestCreateWithNSURLRequest):
        * Shared/API/c/mac/WKURLResponseNS.mm:
        (WKURLResponseCreateWithNSURLResponse):
        * Shared/Downloads/mac/DownloadMac.mm:
        (WebKit::Download::start):
        (WebKit::Download::startWithHandle):
        * Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessEntryPoint.h:
        (WebKit::ChildProcessMain):
        * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
        (WebKit::getPluginArchitecture):
        (WebKit::contentsOfPropertyListAtURL):
        (WebKit::getMIMETypesFromPluginBundle):
        (WebKit::getStringListResource):
        (WebKit::NetscapePluginModule::getPluginInfo):
        * Shared/ShareableResource.cpp:
        (WebKit::ShareableResource::Handle::tryWrapInSharedBuffer):
        * Shared/cf/ArgumentCodersCF.cpp:
        (CoreIPC::decode):
        (CoreIPC::encode):
        * Shared/cg/ShareableBitmapCG.cpp:
        (WebKit::ShareableBitmap::createGraphicsContext):
        (WebKit::ShareableBitmap::makeCGImageCopy):
        (WebKit::ShareableBitmap::makeCGImage):
        (WebKit::ShareableBitmap::createCGImage):
        * Shared/mac/ArgumentCodersMac.mm:
        (CoreIPC::decode):
        * Shared/mac/PlatformCertificateInfo.mm:
        (WebKit::PlatformCertificateInfo::dump):
        * Shared/mac/WebCoreArgumentCodersMac.mm:
        (CoreIPC::::encodePlatformData):
        (CoreIPC::::decodePlatformData):
        * UIProcess/API/mac/FindIndicatorWindow.mm:
        (WebKit::FindIndicatorWindow::setFindIndicator):
        (WebKit::FindIndicatorWindow::startFadeOutTimerFired):
        * UIProcess/API/mac/PDFViewController.mm:
        (-[WKPDFView initWithFrame:PDFViewController:]):
        (WebKit::PDFViewController::PDFViewController):
        (WebKit::convertPostScriptDataSourceToPDF):
        (WebKit::PDFViewController::setPDFDocumentData):
        * UIProcess/API/mac/PageClientImpl.mm:
        (WebKit::PageClientImpl::PageClientImpl):
        (WebKit::PageClientImpl::registerEditCommand):
        (WebKit::PageClientImpl::setDragImage):
        * UIProcess/API/mac/WKBrowsingContextController.mm:
        (didFailProvisionalLoadWithErrorForFrame):
        (didFailLoadWithErrorForFrame):
        * UIProcess/API/mac/WKConnection.mm:
        (didReceiveMessage):
        * UIProcess/API/mac/WKPrintingView.mm:
        (-[WKPrintingView drawRect:]):
        * UIProcess/API/mac/WKView.mm:
        (-[WKView browsingContextController]):
        (-[WKView _setAcceleratedCompositingModeRootLayer:]):
        (-[WKView _setPromisedData:WebCore::withFileName:withExtension:withTitle:withURL:withVisibleURL:withArchive:WebCore::forPasteboard:]):
        (-[WKView namesOfPromisedFilesDroppedAtDestination:]):
        (-[WKView fullScreenWindowController]):
        (-[WKView _executeSavedCommandBySelector:]):
        (-[WKView printOperationWithPrintInfo:forFrame:]):
        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
        (WebKit::createProcess):
        * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
        (WebKit::PluginInfoStore::pluginPathsInDirectory):
        (WebKit::PluginInfoStore::getMIMETypeForExtension):
        * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
        (WebKit::PluginProcessProxy::beginModal):
        * UIProcess/cf/WebBackForwardListCF.cpp:
        (WebKit::WebBackForwardList::createCFDictionaryRepresentation):
        * UIProcess/cf/WebPageProxyCF.cpp:
        (WebKit::WebPageProxy::sessionStateData):
        (WebKit::WebPageProxy::restoreFromSessionStateData):
        (WebKit::WebPageProxy::saveRecentSearches):
        (WebKit::WebPageProxy::loadRecentSearches):
        * UIProcess/cf/WebPreferencesCF.cpp:
        (WebKit::cfStringFromWebCoreString):
        (WebKit::setStringValueIfInUserDefaults):
        (WebKit::setBoolValueIfInUserDefaults):
        (WebKit::setUInt32ValueIfInUserDefaults):
        (WebKit::setDoubleValueIfInUserDefaults):
        (WebKit::WebPreferences::platformUpdateUInt32ValueForKey):
        (WebKit::WebPreferences::platformUpdateDoubleValueForKey):
        (WebKit::WebPreferences::platformUpdateFloatValueForKey):
        * UIProcess/mac/BackingStoreMac.mm:
        (WebKit::BackingStore::resetScrolledRect):
        (WebKit::BackingStore::backingStoreContext):
        * UIProcess/mac/CorrectionPanel.mm:
        (WebKit::CorrectionPanel::handleAcceptedReplacement):
        * UIProcess/mac/TextCheckerMac.mm:
        (WebKit::TextChecker::checkTextOfParagraph):
        (WebKit::TextChecker::updateSpellingUIWithGrammarString):
        * UIProcess/mac/WKFullScreenWindowController.mm:
        (-[WKFullScreenWindowController enterFullScreen:]):
        (-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]):
        (-[WKFullScreenWindowController _startExitFullScreenAnimationWithDuration:]):
        * UIProcess/mac/WebContextMac.mm:
        (WebKit::WebContext::platformDefaultDiskCacheDirectory):
        * UIProcess/mac/WebContextMenuProxyMac.mm:
        (WebKit::nsMenuItemVector):
        (WebKit::WebContextMenuProxyMac::populate):
        * UIProcess/mac/WebInspectorProxyMac.mm:
        (WebKit::WebInspectorProxy::createInspectorWindow):
        (WebKit::WebInspectorProxy::platformCreateInspectorPage):
        * UIProcess/mac/WebPopupMenuProxyMac.mm:
        (WebKit::WebPopupMenuProxyMac::populate):
        (WebKit::WebPopupMenuProxyMac::showPopupMenu):
        * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
        (WebKit::InjectedBundle::load):
        * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
        (WebKit::NetscapePlugin::updatePluginLayer):
        * WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm:
        (WebKit::PluginProxy::pluginLayer):
        * WebProcess/Plugins/PDF/PDFPlugin.mm:
        (WebKit::PDFPlugin::PDFPlugin):
        (WebKit::PDFPlugin::createScrollbar):
        (WebKit::PDFPlugin::pdfDocumentDidLoad):
        (WebKit::PDFPlugin::writeItemsToPasteboard):
        * WebProcess/Plugins/PDF/SimplePDFPlugin.mm:
        (getAllScriptsInPDFDocument):
        (WebKit::SimplePDFPlugin::pdfDocumentDidLoad):
        (WebKit::SimplePDFPlugin::streamDidReceiveData):
        (WebKit::SimplePDFPlugin::manualStreamDidReceiveData):
        * WebProcess/ResourceCache/WebResourceCacheManager.cpp:
        (WebKit::WebResourceCacheManager::clearCacheForOrigin):
        * WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.cpp:
        (WebKit::WebResourceCacheManager::cfURLCacheHostNames):
        (WebKit::WebResourceCacheManager::clearCFURLCacheForHostNames):
        * WebProcess/WebCoreSupport/mac/WebErrorsMac.mm:
        (WebKit::createNSError):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::drawPagesToPDF):
        * WebProcess/WebPage/mac/WebPageMac.mm:
        (WebKit::WebPage::performDictionaryLookupForRange):
        (WebKit::cachedResponseForURL):
        (WebKit::WebPage::drawPagesToPDFFromPDFDocument):
        * WebProcess/mac/WebProcessMac.mm:
        (WebKit::WebProcess::platformSetCacheModel):
        Use adoptCF and adoptNS free functions.

2013-04-27  Alexey Proskuryakov  <ap@apple.com>

        <rdar://problem/13757007> Crashes in NetworkResourceLoader::didReceiveResponseAsync
        https://bugs.webkit.org/show_bug.cgi?id=115318

        Reviewed by Darin Adler.

        sendAbortingOnFailure may actually fail, and abort the request, making m_handle null.

        * NetworkProcess/NetworkResourceLoader.cpp:
        (WebKit::NetworkResourceLoader::didReceiveResponseAsync): Null check m_handle after
        sending a message, because the request will cancelled when connection is invalid.
        (WebKit::NetworkResourceLoader::didReceiveBuffer): Assert that m_handle matches
        the handle that we are called with.
        (WebKit::NetworkResourceLoader::didFinishLoading): Ditto.
        (WebKit::NetworkResourceLoader::didFail): Ditto.
        (WebKit::NetworkResourceLoader::willSendRequestAsync): Ditto.
        (WebKit::NetworkResourceLoader::didSendData): Ditto.
        (WebKit::NetworkResourceLoader::shouldUseCredentialStorage): Ditto.
        (WebKit::NetworkResourceLoader::shouldUseCredentialStorageAsync): Ditto.
        (WebKit::NetworkResourceLoader::didReceiveAuthenticationChallenge): Ditto.
        (WebKit::NetworkResourceLoader::didCancelAuthenticationChallenge): Ditto.
        (WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpaceAsync): Ditto.

2013-04-27  Alexey Proskuryakov  <ap@apple.com>

        <rdar://problem/13757687> Threads get stuck in NetworkProcess when canceling loads
        https://bugs.webkit.org/show_bug.cgi?id=115319

        Reviewed by Darin Adler.

        WebResourceLoader was second-guessing NetworkProcess as to whether it needs a response
        to DidReceiveResponseWithCertificateInfo, and it was guessing wrong if the load was
        alrady canceled on WebProcess side.

        * NetworkProcess/NetworkResourceLoader.cpp:
        (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
        * WebProcess/Network/WebResourceLoader.cpp:
        (WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo):
        * WebProcess/Network/WebResourceLoader.h:
        * WebProcess/Network/WebResourceLoader.messages.in:

2013-04-27  Alexey Proskuryakov  <ap@apple.com>

        Regression tests that reference a non-local resource crash with NetworkProcess enabled
        https://bugs.webkit.org/show_bug.cgi?id=115290

        Reviewed by Sam Weinig.

        Covered by fast/dom/icon-url-change.html and many other existing tests.

        * WebProcess/Network/WebResourceLoadScheduler.cpp:
        (WebKit::WebResourceLoadScheduler::remove): Handle this case. Architecturally, it
        would be better if SubresourceLoad::create just created an object an didn't do
        further checks before returning a pointer, but changing that is beyond the scope
        of the fix.

2013-04-26  Yael Aharon  <yael.aharon@intel.com>

        [WK2][EFL] Build break after r149212
        https://bugs.webkit.org/show_bug.cgi?id=115294

        Reviewed by Simon Fraser.
        r144672 bumped up the revision of WKContextClient API, and introduced a version array
        APIClientTraits<WKContextClient>::interfaceSizesByVersion .
        In r149212, the version was bumped back down and the version array was emptied but not removed.
        This causes a warning "array subscript is below array bounds", and in EFL the warning is
        treated as error.

        * Shared/APIClientTraits.cpp:
        (WebKit):
        * Shared/APIClientTraits.h:

2013-04-26  Martin Robinson  <mrobinson@igalia.com>

        [GTK] Add methods to add a user style sheet to the WebKit2 GTK+ API
        https://bugs.webkit.org/show_bug.cgi?id=99081

        Reviewed by Carlos Garcia Campos, Gustavo Noronha Silva, and Benjamin Poulain.

        Add methods to WebKitWebViewGroup to add and remove user style sheets.
        This allows clients to inject style sheets into pages with a set of
        rules for when those style sheets apply.

        * UIProcess/API/gtk/WebKitWebViewGroup.cpp:
        (toImmutableArray): Added this helper which converts the GList* parameters into
        ImmutableArrays for use with the WebKit2 internal API.
        (webkit_web_view_group_add_user_style_sheet): Added new API for adding a style sheet.
        (webkit_web_view_group_remove_all_user_style_sheets): Add new API for clearing out all style sheets.
        * UIProcess/API/gtk/WebKitWebViewGroup.h: Added new method declarations.
        * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Added new API to the documentation.
        * UIProcess/API/gtk/tests/TestWebKitWebViewGroup.cpp: Added a test for the new API.
        (isStyleSheetInjectedForURLAtPath): Function to check whether the style sheet has been injected for a given URL.
        (fillURLListFromPaths): Helper which converts paths passed via varargs into a whitelist or blacklist.
        (removeOldInjectedStyleSheetsAndResetLists): Function to start afresh.
        (testWebViewGroupInjectedStyleSheet): The actual test.
        (serverCallback): Server callback for use with the test. We cannot use loadHTML or
        loadAlternateHTML, because that checks the whitelist and blacklist against about:blank.
        (beforeAll): Initialize the server and new test.
        (afterAll): Clean up the server.

2013-04-26  Simon Cooper  <scooper@apple.com>

        Permit ~/Library or ~/Library/Preferences to be symlinks
        https://bugs.webkit.org/show_bug.cgi?id=115142
        <rdar://problem/12953603>

        Reviewed by Alexey Proskuryakov.

        Pass in two new parameters which are the resolved paths to ~/Library
        and ~/Library/Preferences. Added new expansion functions and
        substituted the new functions for home-regex, home-subpath and
        home-literal for places referencing resources in "~/Library" or
        "~/Library/Preferences".

        * Resources/PlugInSandboxProfiles/com.apple.QuickTime Plugin.plugin.sb:
        * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
        * Resources/PlugInSandboxProfiles/com.apple.ist.ds.appleconnect.webplugin.sb:
        * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb:
        * Resources/PlugInSandboxProfiles/com.microsoft.SilverlightPlugin.sb:
        * Resources/PlugInSandboxProfiles/com.oracle.java.JavaAppletPlugin.sb:
        * Shared/mac/ChildProcessMac.mm:
        (WebKit::ChildProcess::initializeSandbox):

2013-04-26  Alexey Proskuryakov  <ap@apple.com>

        [WK2] WKContextClient doesn't need to be versioned yet
        https://bugs.webkit.org/show_bug.cgi?id=115279

        Reviewed by Anders Carlsson.

        * Shared/APIClientTraits.cpp:
        * Shared/APIClientTraits.h:
        * UIProcess/API/C/WKContext.h:

2013-04-26  Anders Carlsson  <andersca@apple.com>

        Downloads need to be converted from the NSURLConnection, not canceled and restarted, when using the NetworkProcess
        https://bugs.webkit.org/show_bug.cgi?id=115277
        <rdar://problem/12890184>

        Reviewed by Sam Weinig.

        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
        (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
        Ask the download manager to convert the main resource load to a download.

        * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
        Add new message.

        * NetworkProcess/NetworkResourceLoader.h:
        (WebKit::NetworkResourceLoader::handle):
        Add getter.

        * Shared/Downloads/mac/DownloadMac.mm:
        (dispatchOnMainThread):
        Helper function that ensures that a given block is called on the main thread.

        (-[WKDownloadAsDelegate downloadDidBegin:]):
        (-[WKDownloadAsDelegate download:didReceiveAuthenticationChallenge:]):
        (-[WKDownloadAsDelegate download:didReceiveResponse:]):
        (-[WKDownloadAsDelegate download:didReceiveDataOfLength:]):
        (-[WKDownloadAsDelegate download:shouldDecodeSourceDataOfMIMEType:]):
        (-[WKDownloadAsDelegate download:decideDestinationWithSuggestedFilename:]):
        (-[WKDownloadAsDelegate download:didCreateDestination:]):
        (-[WKDownloadAsDelegate downloadDidFinish:]):
        (-[WKDownloadAsDelegate download:didFailWithError:]):
        Use dispatchOnMainThread.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::receivedPolicyDecision):
        Remove code that cancels the current load and starts a new download.

        * WebProcess/WebPage/WebFrame.cpp:
        (WebKit::WebFrame::convertMainResourceLoadToDownload):
        Send the ConvertMainResourceLoadToDownload message to the network process.

2013-04-25  Roger Fong  <roger_fong@apple.com>

        Disable sub-pixel layout on mac.
        https://bugs.webkit.org/show_bug.cgi?id=114999.

        Reviewed by Simon Fraser.

        * Configurations/FeatureDefines.xcconfig:

2013-04-26  Simon Fraser  <simon.fraser@apple.com>

        Inspector window is often blank when opened
        https://bugs.webkit.org/show_bug.cgi?id=115220

        Reviewed by Tim Horton.
        
        After disabling tiled scrolling and accelerated drawing in r149006, the
        Inspector window was often missing its content after opening. This only
        happened when the user has a preference on disk to use accelerated drawing
        in the Inspector.
        
        The missing content was caused by a failure to connect the correct contextID
        for remote layer hosting. On window creation, we hook up a context using
        WindowServer layer hosting (the default), but then switch back to app-hosted
        layers for the Inspector window. This switching happens in didUpdateBackingStoreState(),
        but that can be re-entered via its call to sendUpdateBackingStoreState(). In
        that cause, on unwinding the stack it would call enterAcceleratedCompositingMode()
        with a stale layerTreeContext.
        
        Fix by moving the code that exits/enters accelerated compositing mode to before
        the call to sendUpdateBackingStoreState() that can cause re-entrancy. That avoids
        use of a possibly stale layerTreeContext.

        * UIProcess/DrawingAreaProxyImpl.cpp:
        (WebKit::DrawingAreaProxyImpl::didUpdateBackingStoreState):

2013-04-26  Alexey Proskuryakov  <ap@apple.com>

        Crashes under ResourceHandle::continueDidReceiveResponse when loading blobs
        https://bugs.webkit.org/show_bug.cgi?id=115273

        Reviewed by Anders Carlsson.

        Covered by multiple existing tests (when using NetworkProcess), including:
        - http/tests/fileapi/blob-url-in-subframe.html
        - http/tests/fileapi/create-blob-url-from-data-url.html

        * NetworkProcess/NetworkResourceLoader.cpp:
        (WebKit::NetworkResourceLoader::continueDidReceiveResponse):
        Work around BlobResourceHandle badness.

2013-04-26  Alexey Proskuryakov  <ap@apple.com>

        [WK2] Remove NetworkResourceLoader::cleanupOnMainThread
        https://bugs.webkit.org/show_bug.cgi?id=115268

        Reviewed by Brady Eidson.

        All cleanup() callers are now on main thread, and this indirection only complicates debugging.

        * NetworkProcess/NetworkResourceLoader.cpp:
        (WebKit::NetworkResourceLoader::connectionToWebProcessDidClose):
        (WebKit::NetworkResourceLoader::abortInProgressLoad):
        (WebKit::NetworkResourceLoader::didFinishLoading):
        (WebKit::NetworkResourceLoader::didFail):
        * NetworkProcess/NetworkResourceLoader.h:

2013-04-26  Andy Estes  <aestes@apple.com>

        [WebKit2] CustomProtocolManager's m_registeredSchemes HashSet can be accessed by multiple threads
        https://bugs.webkit.org/show_bug.cgi?id=115267

        Reviewed by Alexey Proskuryakov.

        * Shared/Network/CustomProtocols/CustomProtocolManager.h: Added a Mutex to protect m_registeredSchemes.
        * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm:
        (WebKit::CustomProtocolManager::registerScheme): Acquired the mutex before accessing m_registeredSchemes.
        (WebKit::CustomProtocolManager::unregisterScheme): Ditto.
        (WebKit::CustomProtocolManager::supportsScheme): Ditto.

2013-04-26  Alexey Proskuryakov  <ap@apple.com>

        Blobs are not associated with connection when there are no sandbox extensions
        https://bugs.webkit.org/show_bug.cgi?id=115264

        Reviewed by Brady Eidson.

        Covered by multiple fast/files tests when using NetworkProcess.

        * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
        (WebKit::NetworkBlobRegistry::registerBlobURL): Fixed a logic error.

2013-04-25  Andy Estes  <aestes@apple.com>

        [WebKit2] Loading a resource from a custom protocol in a synchronous XHR times out
        https://bugs.webkit.org/show_bug.cgi?id=115223

        Reviewed by Darin Adler.

        When WebKit performs a synchronous load on the Mac, it spins a nested
        run loop in a mode that only accepts input from the NSURLConnection
        performing the load. When the load is for a custom protocol in WebKit2,
        we proxy it to the UI process via CoreIPC messages, but the response
        messages from the UI process are never processed as long as the run
        loop is in a non-common mode (and we wouldn't want to process messages
        that could re-enter WebCore in the middle of loading, anyway). Since
        these messages never make it back to the NSURLConnection handling the
        request, the connection eventually times out.

        Fix this by using a work queue to handle custom protocol messages in
        the networking process. The work queue can process incoming custom
        protocol messages while the main thread is blocked.

        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::NetworkProcess::initializeConnection): Called
        initializeConnection() on all the NetworkProcess's supplements.
        * Shared/ChildProcessSupplement.h: Added a base class for
        NetworkProcessSupplement and WebProcessSupplement which defines
        initializeConnection and provides an empty default implementation.
        (WebKit::ChildProcessSupplement::~ChildProcessSupplement):
        (WebKit::ChildProcessSupplement::initializeConnection):
        * Shared/Network/CustomProtocols/CustomProtocolManager.h:
        * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm:
        (WebKit::CustomProtocolManager::CustomProtocolManager): Instantiated a
        work queue for message processing.
        (WebKit::CustomProtocolManager::initializeConnection): Added the work
        queue as a message receiver on the CoreIPC connection.
        (WebKit::CustomProtocolManager::initialize): If we're in the web
        process and the network process is being used, unregister and destroy
        the work queue we previously created. It'd be better to not create it
        in the first place, but we have to register our work queue with the
        CoreIPC connection before it is established, which is before the UI
        process has told us whether the network process is in use.
        * Shared/Network/NetworkProcessSupplement.h: Inherited from
        ChildProcessSupplement.
        * WebKit2.xcodeproj/project.pbxproj: Added ChildProcessSupplement.h.
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::initializeConnection): Called
        initializeConnection() on all the WebProcess's supplements.
        * WebProcess/WebProcessSupplement.h: Inherited from
        ChildProcessSupplement.

2013-04-26  Eduardo Lima Mitev  <elima@igalia.com>

        [GTK] Compilation of ProcessLauncherGtk.cpp fails due to unresolved symbols
        https://bugs.webkit.org/show_bug.cgi?id=115240

        Reviewed by Martin Robinson.

        * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp: Includes sys/socket.h if OS is Linux

2013-04-25  Zan Dobersek  <zdobersek@igalia.com>

        [GTK] Plugin process broken due to a missing symbol
        https://bugs.webkit.org/show_bug.cgi?id=114901

        Reviewed by Gustavo Noronha Silva.

        Work around the missing symbols in the WebKitPluginProcess by specifying the required libraries
        multiple times in the program's LDADD list. Libtool fights fiercely to avoid duplicate static library
        references among the linker arguments (even if using the --preserve-dup-deps flag) so the required libraries
        are specified in various ways.

        The unresolved symbols in object files are no longer ignored as this can lead to further trouble (for instance
        this patch also adds a few missing source files to the list of WebKitPluginProcess sources). The Freetype and
        gamepad dependencies' libraries are also added to the binary's LDADD list.

        * GNUmakefile.am:
        * GNUmakefile.list.am: Add a few missing files to the build.

2013-04-24  Chris Fleizach  <cfleizach@apple.com>

        WEB SPEECH: language support does not work as expected
        https://bugs.webkit.org/show_bug.cgi?id=115119

        Reviewed by Alexey Proskuryakov.

        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
        (InitWebCoreSystemInterface):

2013-04-25  Anders Carlsson  <andersca@apple.com>

        Rename DecidePolicyForResponse message to DecidePolicyForResponseSync
        https://bugs.webkit.org/show_bug.cgi?id=115207

        Reviewed by Beth Dakin.

        In preparation for adding a new async DecidePolicyForResponse message,
        rename the current one to DecidePolicyForResponseSync. Also split out the async part
        into a separate WebPageProxy::decidePolicyForResponse member function.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::WebPageProxy):
        (WebKit::WebPageProxy::receivedPolicyDecision):
        (WebKit::WebPageProxy::decidePolicyForResponse):
        (WebKit::WebPageProxy::decidePolicyForResponseSync):
        * UIProcess/WebPageProxy.h:
        (WebPageProxy):
        * UIProcess/WebPageProxy.messages.in:
        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):

2013-04-25  Joseph Pecoraro  <pecoraro@apple.com>

        Web Inspector: ConsoleMessage should include line and column number where possible
        https://bugs.webkit.org/show_bug.cgi?id=114929

        Reviewed by Timothy Hatcher.

        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::addMessageToConsole):
        * WebProcess/WebCoreSupport/WebChromeClient.h:

2013-04-25  Brady Eidson  <beidson@apple.com>

        Thread safety issues in WKCustomProtocol.
        <rdar://problem/13247304> and https://bugs.webkit.org/show_bug.cgi?id=115185

        Reviewed by Alexey Proskuryakov.

        * Shared/Network/CustomProtocols/CustomProtocolManager.h:

        * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm:
        (WebKit::CustomProtocolManager::addCustomProtocol): Protect m_customProtocolMap with its mutex.
        (WebKit::CustomProtocolManager::removeCustomProtocol): Ditto.
        (WebKit::CustomProtocolManager::didFailWithError):
        (WebKit::CustomProtocolManager::didLoadData):
        (WebKit::CustomProtocolManager::didReceiveResponse):
        (WebKit::CustomProtocolManager::didFinishLoading):
        (WebKit::CustomProtocolManager::protocolForID): Protect m_customProtocolMap with its mutex, and return
          a RetainPtr instead of a raw pointer.

2013-04-25  Jer Noble  <jer.noble@apple.com>

        Further build fixes: correct two more misnames of WebProcessShim.dyld.

        * WebProcess/EntryPoint/mac/LegacyProcess/WebContentProcessMain.mm:
        (WebKit::WebContentProcessMainDelegate::doPreInitializationWork):
        * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info.plist:

2013-04-25  Martin Robinson  <mrobinson@igalia.com>

        Make gobject-introspection warnings non-fatal
        https://bugs.webkit.org/show_bug.cgi?id=115184

        Reviewed by Carlos Garcia Campos.

        * GNUmakefile.am: Make it so that gobject-introspection errors do not fail the buld
        until we get to a point where gobject-introspection gives consistent warnings.

2013-04-25  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Add WebKitWebViewGroup to WebKit2 GTK+ API
        https://bugs.webkit.org/show_bug.cgi?id=111265

        Reviewed by Anders Carlsson.

        In the current API the settings are always shared by all web
        views, because they are always created on the default page
        group. This makes impossible to have different settings on
        different web views. Expose the page group in the API,
        so that users can create web views on a group different than the
        default one to have their own settings.

        * GNUmakefile.list.am: Add new files to compilation.
        * UIProcess/API/gtk/WebKitSettings.cpp:
        (webkitSettingsGetPreferences): Helper private method to get the
        WebPreferences wrapped by a WebKitSettings object.
        * UIProcess/API/gtk/WebKitSettingsPrivate.h:
        * UIProcess/API/gtk/WebKitWebContext.cpp:
        (_WebKitWebContextPrivate): Add a default WebKitWebViewGroup.
        (webkitWebContextCreatePageForWebView): Create the WebPageProxy
        with the WebPageGroup of the given WebKitWebViewGroup.
        (webkitWebContextGetDefaultWebViewGroup): Helper private method to
        get the default WebKitWebViewGroup.
        * UIProcess/API/gtk/WebKitWebContextPrivate.h:
        * UIProcess/API/gtk/WebKitWebView.cpp:
        (_WebKitWebViewPrivate): Add a WebKitWebViewGroup in case the view
        is created with a group.
        (webkitWebViewUpdateSettings): Keep a reference of the group
        settings to be able to disconnect the signals when the settings
        object is replaced in the view group and connect to the signals
        for the custom settings.
        (webkitWebViewSettingsChanged): Disconnect the signals for the
        previous settings and set the new settings.
        (webkitWebViewDisconnectSettingsChangedSignalHandler): Disconnect
        notify::settings signal of WebKitWebViewGroup.
        (webkitWebViewConstructed): Pass the current WebKitWebViewGroup to
        webkitWebContextCreatePageForWebView().
        (webkitWebViewSetProperty): Add setter for group property.
        (webkitWebViewGetProperty): Add getter for group property.
        (webkitWebViewDispose): Call
        webkitWebViewDisconnectSettingsChangedSignalHandler().
        (webkit_web_view_class_init): Add WebKitWebView:group property.
        (webkitWebViewHandleAuthenticationChallenge): Use
        webkit_web_view_get_settings().
        (webkit_web_view_new_with_group): Create a new web view with the
        given WebKitWebViewGroup.
        (webkit_web_view_get_group): Return the current WebKitWebViewGroup
        or the default one if the view was not created with
        webkit_web_view_new_with_group().
        (webkit_web_view_set_settings): Set the settings of the current
        WebKitWebViewGroup.
        (webkit_web_view_get_settings): Get the settings of the current
        WebKitWebViewGroup.
        (webkit_web_view_set_zoom_level): Use
        webkit_web_view_get_settings().
        (webkit_web_view_get_zoom_level): Ditto.
        * UIProcess/API/gtk/WebKitWebView.h:
        * UIProcess/API/gtk/WebKitWebViewGroup.cpp: Added.
        (_WebKitWebViewGroupPrivate):
        (webkitWebViewGroupSetProperty):
        (webkitWebViewGroupGetProperty):
        (webkitWebViewGroupConstructed):
        (webkit_web_view_group_class_init):
        (webkitWebViewGroupAttachSettingsToPageGroup): Set the
        WebPreferences of the current WebKitSettings to the WebPageGroup.
        (webkitWebViewGroupCreate): Create a new WebKitWebViewGroup for
        the given WebPageGroup.
        (webkitWebViewGroupGetPageGroup): Helper private method to get the
        WebPageGroup wrapped by the WebKitWebViewGroup.
        (webkit_web_view_group_new): Create a new WebKitWebViewGroup.
        (webkit_web_view_group_get_name): Return the name of a
        WebKitWebViewGroup.
        (webkit_web_view_group_get_settings): Get the settings of a
        WebKitWebViewGroup.
        (webkit_web_view_group_set_settings): Set new settings of a
        WebKitWebViewGroup.
        * UIProcess/API/gtk/WebKitWebViewGroup.h: Added.
        (_WebKitWebViewGroup):
        (_WebKitWebViewGroupClass):
        * UIProcess/API/gtk/WebKitWebViewGroupPrivate.h: Added.
        * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add
        WebKitWebViewGroup section.
        * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
        * UIProcess/API/gtk/docs/webkit2gtk.types: Add
        webkit_web_view_group_get_type.
        * UIProcess/API/gtk/tests/GNUmakefile.am: Add new files to
        compilation.
        * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
        (testWebViewSettings): We can't watch settings in the default view
        group anymore, because they are not released with the web view but
        with the web context that is freed after the Test destructor.
        * UIProcess/API/gtk/tests/TestWebKitWebViewGroup.cpp: Added.
        (testWebViewGroupDefault):
        (testWebViewGroupNewGroup):
        (testWebViewNewWithGroup):
        (testWebViewGroupSettings):
        (beforeAll):
        (afterAll):
        * UIProcess/API/gtk/webkit2.h: Include WebKitWebViewGroup.h.

2013-04-25  Jer Noble  <jer.noble@apple.com>

        Unreviewed build fix: Fix the name of DyldInterpose.h in
        SecItemShimLibrary.mm, fix the name of WebProcessShim.dyld in
        WebContentServiceEntryPoint.mm, and stop linking against libWTF.a
        directly (which means removing ASSERTs from
        CookieStorageShimLibrary.cpp).

        * Shared/mac/CookieStorageShimLibrary.cpp:
        (WebKit::shimCFHTTPCookieStorageCopyRequestHeaderFieldsForURL):
        (WebKit::WebKitCookieStorageShimInitialize):
        * WebKit2.xcodeproj/project.pbxproj:
        * WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:
        (WebContentServiceInitializer):
        * WebProcess/mac/SecItemShimLibrary.mm:

2013-04-24  Tim Horton  <timothy_horton@apple.com>

        PDFPlugin: Cursor should become an i-beam when over selectable text
        https://bugs.webkit.org/show_bug.cgi?id=115018
        <rdar://problem/12645012>

        Reviewed by Alexey Proskuryakov.

        * WebProcess/Plugins/PDF/PDFPlugin.h:
        Add updateCursor(), the UpdateCursorMode and HitTestResult enums, and
        storage for the last PDF hit test result.
        * WebProcess/Plugins/PDF/PDFPlugin.mm:
        (WebKit::PDFPlugin::updateCursor):
        Hit test the PDF. If there is a word under the cursor, use the I-beam cursor,
        otherwise, use the default pointer cursor. This approximates PDFKit's behavior,
        though does not match it precisely in the case of annotations.
        Only send the cursor update to the UIProcess if it is a change, or if
        we're explicitly asked to update.
        (WebKit::PDFPlugin::handleMouseEvent):
        If we're processing a mouse moved event, update the cursor if needed.
        (WebKit::PDFPlugin::handleMouseEnterEvent):
        If the cursor just moved over the PDFPlugin, force-update the cursor,
        even if it matches the previously-set cursor (because something else
        likely updated the cursor while it was not over the PDFPlugin).

2013-04-24  Tim Horton  <timothy_horton@apple.com>

        Page Overlays shouldn't waste time flushing layers if we're not going to use it
        https://bugs.webkit.org/show_bug.cgi?id=115145

        Reviewed by Simon Fraser.

        Don't flush the page overlay layer when it's installed - it starts out
        with paintContents=false, so we don't really need a CALayer yet. We'll
        flush later if need be.

        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
        (WebKit::TiledCoreAnimationDrawingArea::didInstallPageOverlay):

2013-04-24  Jer Noble  <jer.noble@apple.com>

        Further unreviewed build fix; CFNetwork.framework is the one which Lion
        refuses to link against.

        * WebKit2.xcodeproj/project.pbxproj:

2013-04-24  Jer Noble  <jer.noble@apple.com>

        Unreviewed build fix; link against CoreServices.framework instead of against
        CoreFoundation.framework directly, to make the linker happy on Lion.

        * WebKit2.xcodeproj/project.pbxproj:

2013-04-22  Jer Noble  <jer.noble@apple.com>

        WWDC session videos don’t play at developer.apple.com
        https://bugs.webkit.org/show_bug.cgi?id=114858

        Reviewed by Eric Carlson. Rubber stamped by Brady Eidson.

        AVFoundation uses CFNetwork to store and retrieve cookies from the global store.
        However, in the case where network access happens in the NetworkProcess, session
        cookies are stored in-memory, and are not accessable in the WebProcess. Until such
        a time as AVFoundation can provide an API which would allow us to provide cookies
        for a specific request, we will interpose the CFNetwork method which they use to
        retrieve the cookie string from the cookie store for their pending request.

        Duplicate the previous SecItemShim target to a new, WebProcessShim target. This
        target includes the SecItemShim functionality, but will add a new shim for cookie
        retrieval:
        * Shared/mac/CookieStorageShimLibrary.h: Added
        (CookieStorageShimCallbacks):
        * Shared/mac/CookieStorageShimLibrary.cpp: Added.
        (WebKit::ShimProtector::ShimProtector): A simple stack-based counter class.
        (WebKit::ShimProtector::~ShimProtector):
        (WebKit::ShimProtector::count):
        (WebKit::shimCFHTTPCookieStorageCopyRequestHeaderFieldsForURL): Interpose
            the CFNetwork call, and pass to the registered callback.
        (WebKit::WebKitCookieStorageShimInitialize): Register the callbacks.

        Add a helper singleton class which will talk to the shim through the 
        registered callbacks:
        * Shared/mac/CookieStorageShim.h: Added
        (WebKit::CookieStorageShim::CookieStorageShim):
        * Shared/mac/CookieStorageShim.cpp: Added.
        (WebKit::webKitCookieStorageCopyRequestHeaderFieldsForURL): Pass the request
            over to the NetworkProcess.
        (WebKit::CookieStorageShim::shared): Simple singleton.
        (WebKit::CookieStorageShim::initialize): Call the library initializer.

        Initialize the shim only when the WebProcess is delegating network loading
        to the NetworkProcess:
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::initializeWebProcess):

        Rename the WebProcess's shim from SecItemShim -> WebProcessShim:
        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
        (WebKit::addDYLDEnvironmentAdditions):
        * WebProcess/EntryPoint/mac/LegacyProcess/WebContentProcessMain.mm:
        (WebKit::WebContentProcessMainDelegate::doPreInitializationWork):
        * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info.plist:
        * WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:
        (WebContentServiceInitializer):

        As the DYLD_INTERPOSE macro is used in multiple files now, put it in its
        own header:
        * Shared/mac/DyldInterpose.h: Added.
        * PluginProcess/mac/PluginProcessShim.mm:
        * WebProcess/mac/SecItemShimLibrary.mm:

        Add new files to the project:
        * WebKit2.xcodeproj/project.pbxproj:

2013-04-24  Byungwoo Lee  <bw80.lee@samsung.com>

        [EFL] Fix build error after r148963.
        https://bugs.webkit.org/show_bug.cgi?id=115126

        Reviewed by Laszlo Gombos.

        Generate forwarding headers for 'CoordinatedGraphics' to generate WKView.h

        * PlatformEfl.cmake:

2013-04-24  Anders Carlsson  <andersca@apple.com>

        Crash when trying to determine the length of an invalid message
        https://bugs.webkit.org/show_bug.cgi?id=115127
        <rdar://problem/13700736>

        Reviewed by Beth Dakin.

        Use message instead of incomingMessage since incomingMessage will always be null.

        * Platform/CoreIPC/Connection.cpp:
        (CoreIPC::Connection::processIncomingMessage):

2013-04-24  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Use stamp files for generate-forwarding-headers makefile rules
        https://bugs.webkit.org/show_bug.cgi?id=115118

        Reviewed by Martin Robinson.

        Use a stamp file for the WebKit2 forwarding generator rule. Also
        fix the rule dependencies that pointed to a non existent variable.

        * GNUmakefile.am:

2013-04-24  Zan Dobersek  <zdobersek@igalia.com>

        [GTK][WK2] Implement LayerTreeHostGtk::pageBackgroundTransparencyChanged
        https://bugs.webkit.org/show_bug.cgi?id=115094

        Reviewed by Tim Horton.

        The method was introduced in r149004 (and a stub implementation for the GTK port added in r149017).
        Implement the method for the GTK port in the same manner it is implemented under the Mac port,
        calling setContentsOpaque on the non-composited content layer.

        * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
        (WebKit::LayerTreeHostGtk::pageBackgroundTransparencyChanged):

2013-04-24  Simon Cooper  <scooper@apple.com>

        <rdar://problem/13614117> Refine the Flash Player profile
        https://bugs.webkit.org/show_bug.cgi?id=115016

        Reviewed by Alexey Proskuryakov.

        Add some refinements to the Flash Player profile. Make a non-/ home
        directory work. Fixes that allow file uploading via user selected files.

        * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb:

2013-04-24  Carlos Garcia Campos  <cgarcia@igalia.com>

        [WebKit2] Add CoordinatedGraphics to the list of platforms in generate-forwarding-headers.pl
        https://bugs.webkit.org/show_bug.cgi?id=115098

        Reviewed by Martin Robinson.

        r148963 introduced a new WKView.h header in a directory not listed
        as a platform prefix in generate-forwarding-headers.pl.

        * Scripts/generate-forwarding-headers.pl: Replace unused chromium
        plaform prefix with CoordinatedGraphics that is used now.

2013-04-24  Seokju Kwon  <seokju.kwon@gmail.com>

        Web Inspector: Add number to list from remote web inspector.
        https://bugs.webkit.org/show_bug.cgi?id=115014

        Reviewed by Benjamin Poulain.

        * UIProcess/InspectorServer/front-end/inspectorPageIndex.html:

2013-04-24  Vlad Vasilyeu  <vasvlad@gmail.com>

        --minimal build fails with error: Source/WebKit2/Platform/CoreIPC/ArgumentCoder.h:44:36: error: decode is not a member of WebCore::TextCheckingResult
        https://bugs.webkit.org/show_bug.cgi?id=114367

        Reviewed by Benjamin Poulain.

        Include WebCoreArgumentCoders.h to WebEditorClientEfl.cpp from
        WebKit2/Shared/ for successfully building with option --minimal

        * WebProcess/WebCoreSupport/efl/WebEditorClientEfl.cpp:

== Rolled over to ChangeLog-2013-04-24 ==
