Replace static_casts with to* functions for document types.
[WebKit-https.git] / Source / WebKit2 / ChangeLog
index f6539e6..f03a4c3 100644 (file)
@@ -1,3 +1,574 @@
+2013-03-13  Abhishek Arya  <inferno@chromium.org>
+
+        Replace static_casts with to* functions for document types.
+        https://bugs.webkit.org/show_bug.cgi?id=112225
+
+        Reviewed by Ryosuke Niwa.
+
+        * WebProcess/InjectedBundle/API/mac/WKDOMDocument.mm: Remove the redundant helper.
+
+2013-03-13  Zan Dobersek  <zdobersek@igalia.com>
+
+        [GTK] Build fixes after 145552
+        https://bugs.webkit.org/show_bug.cgi?id=112267
+
+        Reviewed by Gustavo Noronha Silva.
+
+        * GNUmakefile.am: Narrow down the dependency CFLAGS list to only ones that are actually needed
+        to build the platformgtk_sources into libPlatformGtk2.la. At the moment this means only
+        GTK+-2.0 CFLAGS are used.
+
+2013-03-13  Antoine Quint  <graouts@apple.com>
+
+        Calling WebInspectorClient::highlight() during a fade-out animation of the PageOverlay won't stop its animation
+        https://bugs.webkit.org/show_bug.cgi?id=112271
+
+        Reviewed by Tim Horton.
+
+        Add a new stopFadeOutAnimation() on PageOverlay that we call when
+        WebInspectorClient::highlight() is called and a page overlay
+        is already available. This ensures that any fade-out animation
+        is cleared before proceeding with showing the page overlay
+        for the new highlight.
+
+        * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
+        (WebKit::WebInspectorClient::highlight):
+        * WebProcess/WebPage/PageOverlay.cpp:
+        (WebKit::PageOverlay::stopFadeOutAnimation):
+        (WebKit):
+        * WebProcess/WebPage/PageOverlay.h:
+        (PageOverlay):
+
+2013-03-13  Pavel Feldman  <pfeldman@chromium.org>
+
+        Web Inspector: get rid of hiddenPanels filter
+        https://bugs.webkit.org/show_bug.cgi?id=112252
+
+        Reviewed by Vsevolod Vlasov.
+
+        * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
+        * WebProcess/WebCoreSupport/WebInspectorFrontendClient.h:
+        (WebInspectorFrontendClient):
+
+2013-03-13  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
+
+        [WK2][Qt] Regression(145517) WebProcess asserts in debug build on WebKitTestRunner start
+        https://bugs.webkit.org/show_bug.cgi?id=112223
+
+        Reviewed by Simon Hausmann.
+
+        We need to only enable the cookie jar and the disk cache conditionally
+        in the web process since we removed default paths and WKTR doesn't provide
+        them.
+
+        * WebProcess/qt/WebProcessQt.cpp:
+        (WebKit::WebProcess::platformSetCacheModel):
+        (WebKit::WebProcess::platformInitializeWebProcess):
+
+2013-03-12  Christophe Dumez  <ch.dumez@sisa.samsung.com>
+
+        [EFL][WK2] ewk_popup_menu_close() does not work as intended
+        https://bugs.webkit.org/show_bug.cgi?id=110209
+
+        Reviewed by Laszlo Gombos.
+
+        ewk_popup_menu_close() is called by the browser to notify WebKit that
+        the popup menu was closed. However, the implementation was calling
+        EwkView::closePopupMenu() which was asking the browser to close the
+        popup menu via an Evas smart function. This patch fixes the behavior
+        and ewk_popup_menu_close() now calls WKPopupMenuListenerSetSelection()
+        C API so that the WebProcess is notified that the popup menu was
+        hidden.
+
+        * UIProcess/API/efl/ewk_popup_menu.cpp:
+        (EwkPopupMenu::close):
+
+2013-03-12  Huang Dongsung  <luxtella@company100.net>
+
+        Coordinated Graphics: Remove CoordinatedGraphicsLayer::setRootLayer().
+        https://bugs.webkit.org/show_bug.cgi?id=111835
+
+        Reviewed by Luiz Agostini.
+
+        Amend CoordinatedLayerTreeHost because
+        CoordinatedGraphicsLayer::setRootLayer() is removed.
+
+        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
+        (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
+
+2013-03-12  Dean Jackson  <dino@apple.com>
+
+        Primary plugin hit detection needs to run after plugin creation
+        https://bugs.webkit.org/show_bug.cgi?id=112206
+
+        Reviewed by Tim Horton.
+
+        On some pages, the plugins are created after the page has loaded, and
+        thus our heuristic to determine the primary plugin fails. Run this
+        heuristic more often: after each PluginView is created. It already exits
+        early if it has found a primary. But we also need to make sure that it
+        doesn't run before load.
+
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::addPluginView): Run detection when view is added.
+        (WebKit::WebPage::didFinishLoad): Remember that we have loaded.
+        (WebKit::WebPage::determinePrimarySnapshottedPlugIn): Look at the PluginViews to see if we have a plugin.
+        (WebKit::WebPage::resetPrimarySnapshottedPlugIn): Reset both flags.
+        * WebProcess/WebPage/WebPage.h:
+        (WebPage): New member variable, m_readyToFindPrimarySnapshottedPlugin.
+
+2013-03-12  Beth Dakin  <bdakin@apple.com>
+
+        WKView -printOperationWithPrintInfo:forFrame: doesn’t use the print info that is 
+        passed in
+        https://bugs.webkit.org/show_bug.cgi?id=112212
+        -and corresponding-
+        <rdar://problem/12994883>
+
+        Reviewed by Anders Carlsson.
+
+        We should call [NSPrintOperation printOperationWithView: printInfo:] to use the 
+        printInfo parameter instead of [NSPrintOperation printOperationWithView:] which 
+        will just use the sharedPrintInfo.
+        * UIProcess/API/mac/WKView.mm:
+        (-[WKView printOperationWithPrintInfo:forFrame:]):
+
+2013-03-12  Geoffrey Garen  <ggaren@apple.com>
+
+        Moved RunLoopTimer and SchedulePair to WTF
+        https://bugs.webkit.org/show_bug.cgi?id=112171
+
+        Reviewed by Oliver Hunt.
+
+        This will allow us to use timers in lower level primitives without
+        duplicating all the code.
+
+        * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
+        (WebFrameNetworkingContext):
+
+2013-03-12  Zan Dobersek  <zdobersek@igalia.com>
+
+        [GTK] Remove HILDON_CPPFLAGS and HILDON_CFLAGS references from GNUmakefiles
+        https://bugs.webkit.org/show_bug.cgi?id=112163
+
+        Reviewed by Martin Robinson.
+
+        * GNUmakefile.am: The Hildon dependency doesn't exist anymore so there's no need for
+        references to HILDON_CPPFLAGS and HILDON_CFLAGS.
+
+2013-03-12  Zan Dobersek  <zdobersek@igalia.com>
+
+        [GTK] Set up the libPlatformGtk.la library
+        https://bugs.webkit.org/show_bug.cgi?id=111738
+
+        Reviewed by Martin Robinson.
+
+        * GNUmakefile.am: Reference platformgtk_cppflags variable, libPlatformGtk.la along with webcoregtk_cppflags variable, libWebCoreGtk.la.
+        Adjust the path to GtkVersioning.c, the file has moved under Source/Platform.
+
+2013-03-12  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
+
+        [WK2][EFL] Fix EwkContext class API
+        https://bugs.webkit.org/show_bug.cgi?id=111706
+
+        Reviewed by Alexey Proskuryakov.
+
+        * UIProcess/API/C/efl/WKView.cpp:
+        (createWKView):
+        * UIProcess/API/efl/ewk_context.cpp:
+        (EwkContext::findOrCreateWrapper):
+
+            Renamed from create() as it returns the same instance of EwkContext
+            for the given WKContextRef if present.
+
+        (EwkContext::create):
+        (EwkContext::defaultContext):
+
+            Returns raw pointer rather than PassRefPtr<EwkContext> as ownership
+            is not transferred.
+
+        (ewk_context_default_get):
+        * UIProcess/API/efl/ewk_context_private.h:
+        (EwkContext):
+        * UIProcess/efl/WebInspectorProxyEfl.cpp:
+        (WebKit::WebInspectorProxy::platformCreateInspectorPage):
+
+2013-03-12  Zan Dobersek  <zdobersek@igalia.com>
+
+        [GTK] Enable Web Audio in development builds
+        https://bugs.webkit.org/show_bug.cgi?id=111831
+
+        Reviewed by Philippe Normand.
+
+        * GNUmakefile.am: Link the plugin process against libWebCoreModules.la as well.
+
+2013-03-11  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
+
+        [Qt][WK2] Layer QtDownloadManager on the C API
+        https://bugs.webkit.org/show_bug.cgi?id=109562
+
+        Reviewed by Simon Hausmann.
+        Signed off for WebKit2 by Benjamin Poulain.
+
+        * UIProcess/API/cpp/qt/WKURLQt.cpp:
+        (WebKit::adoptToQString):
+        (WebKit):
+        (WebKit::adoptToQUrl):
+        * UIProcess/API/cpp/qt/WKURLQt.h:
+        (WebKit):
+        * UIProcess/API/qt/qquickwebview.cpp:
+        (QQuickWebViewPrivate::handleDownloadRequest):
+        * UIProcess/qt/QtDownloadManager.cpp:
+        (WebKit::toQtDownloadManager):
+        (WebKit):
+        (WebKit::QtDownloadManager::QtDownloadManager):
+        (WebKit::QtDownloadManager::addDownload):
+        (WebKit::QtDownloadManager::didReceiveResponse):
+        (WebKit::QtDownloadManager::didCreateDestination):
+        (WebKit::QtDownloadManager::didFinishDownload):
+        (WebKit::QtDownloadManager::didFailDownload):
+        (WebKit::QtDownloadManager::didReceiveDataForDownload):
+        * UIProcess/qt/QtDownloadManager.h:
+        (WebKit):
+        (QtDownloadManager):
+        * UIProcess/qt/QtWebContext.cpp:
+        (WebKit::QtWebContext::QtWebContext):
+        * UIProcess/qt/QtWebError.cpp:
+        (WebKit::QtWebError::url):
+        (WebKit::QtWebError::description):
+
+2013-03-11  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
+
+        [Qt][WK2] Layer QtWebIconDatabaseClient on the C API
+        https://bugs.webkit.org/show_bug.cgi?id=109564
+
+        Reviewed by Simon Hausmann.
+        Signed off for WebKit2 by Benjamin Poulain.
+
+        * Target.pri:
+        * UIProcess/API/C/qt/WKIconDatabaseQt.cpp: Added.
+        (WKIconDatabaseTryGetQImageForURL):
+          - New API added to get a QImage from the IconDatabase.
+            Based on WKIconDatabaseCG.h/cpp
+        * UIProcess/API/C/qt/WKIconDatabaseQt.h: Added.
+        * UIProcess/API/cpp/qt/WKURLQt.cpp:
+        (WKURLCreateWithQString):
+        (WKURLCopyQString):
+        (WKURLCreateWithQUrl):
+        (WKURLCopyQUrl):
+          - The WKUrlRef behind the scene is a WTF::String and encoding it back and forth to
+            a QUrl can slightly change its string representation. Allow converting a WKUrlRef
+            to and from a QString to ensure this.
+        * UIProcess/API/cpp/qt/WKURLQt.h:
+        * UIProcess/API/qt/qwebiconimageprovider.cpp:
+        (QWebIconImageProvider::iconURLForPageURLInContext):
+          - The icon URL isn't accessible form the C API and shouldn't need to be.
+            Use an ID incremented on each update to trigger an update of the QML Image component.
+        (QWebIconImageProvider::requestImage):
+          - The IconDatabase was previously assumed to resize the image to the requested size,
+            but this parameter is ignored, as stated in a comment in WebIconDatabase::imageForPageURL.
+            Explicitely do the resize after fetching the original icon to also be able to report
+            the original size properly to QtQuick.
+        * UIProcess/API/qt/qwebiconimageprovider_p.h:
+        * UIProcess/API/qt/tests/qmltests/WebView/tst_favIconLoad.qml:
+          - Set the image to load asynchronously to further test the possibility of threading issues
+            in QtWebIconDatabaseClient::iconImageForPageURL
+          - Add a few barriers to fix some issues where the load succeeded signal would be wrongly
+            catched by init() before the next test.
+        * UIProcess/qt/QtWebContext.cpp:
+        (WebKit::QtWebContext::QtWebContext):
+        * UIProcess/qt/QtWebIconDatabaseClient.cpp:
+        (WebKit):
+        (WebKit::QtWebIconDatabaseClient::QtWebIconDatabaseClient):
+        (WebKit::QtWebIconDatabaseClient::~QtWebIconDatabaseClient):
+        (WebKit::QtWebIconDatabaseClient::updateID):
+        (WebKit::QtWebIconDatabaseClient::didChangeIconForPageURL):
+        (WebKit::QtWebIconDatabaseClient::iconImageForPageURL):
+          - Remove the Mutex. This mutex was useless given that it would only
+            be locked from a single thread. Since the IconDatabase runs in its own thread,
+            it already is thread-safe to access.
+        (WebKit::QtWebIconDatabaseClient::retainIconForPageURL):
+        (WebKit::QtWebIconDatabaseClient::releaseIconForPageURL):
+        * UIProcess/qt/QtWebIconDatabaseClient.h:
+        (QtWebIconDatabaseClient):
+        * WebKit2.pri:
+
+2013-03-11  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
+
+        [Qt][WK2] Specify storage paths through the C API
+        https://bugs.webkit.org/show_bug.cgi?id=111435
+
+        Reviewed by Simon Hausmann.
+        Signed off for WebKit2 by Benjamin Poulain.
+
+        The WKIconDatabase should be opened through a call to
+        WKContextSetIconDatabasePath. To avoid having some paths
+        returned through WebContext::platformDefault* and some others
+        through the C API, make sure that all those paths are set
+        through the C API.
+
+        * Shared/qt/QtDefaultDataLocation.cpp: Removed.
+        * Shared/qt/QtDefaultDataLocation.h: Removed.
+        * Target.pri:
+        * UIProcess/Plugins/qt/PluginProcessProxyQt.cpp:
+        (WebKit::cacheFile):
+          - This part is left alone behind the C API.
+            Since PluginProcessProxy have no knowledge of the WebContext
+            it is rather difficult to fetch a configured directory that
+            could be used for this purpose (like the disk cache storage).
+            Hard-code a compatible logic to keep the current behavior.
+        (WebKit::removeCacheFile):
+        (WebKit):
+        (WebKit::readMetaDataFromCacheFile):
+        (WebKit::writeToCacheFile):
+        (WebKit::tryReadPluginMetaDataFromCacheFile):
+          - Update the code to better handle an empty cache file path.
+        * UIProcess/qt/QtWebContext.cpp:
+        (WebKit::QtWebContext::defaultContext):
+        (WebKit::defaultLocation):
+        (WebKit):
+        (WebKit::QtWebContext::preparedStoragePath):
+        * UIProcess/qt/QtWebContext.h:
+        * UIProcess/qt/QtWebIconDatabaseClient.cpp:
+        (WebKit::QtWebIconDatabaseClient::QtWebIconDatabaseClient):
+        * UIProcess/qt/WebContextQt.cpp:
+        (WebKit::WebContext::applicationCacheDirectory):
+        (WebKit::WebContext::platformDefaultDatabaseDirectory):
+        (WebKit::WebContext::platformDefaultIconDatabasePath):
+        (WebKit::WebContext::platformDefaultLocalStorageDirectory):
+        (WebKit::WebContext::platformDefaultDiskCacheDirectory):
+        (WebKit::WebContext::platformDefaultCookieStorageDirectory):
+
+2013-02-14  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
+
+        [Qt] Properly layer QtWebContext on top of the C API
+        https://bugs.webkit.org/show_bug.cgi?id=108475
+
+        Reviewed by Simon Hausmann.
+        Signed off for WebKit2 by Benjamin Poulain.
+
+        * UIProcess/API/qt/qquickwebview.cpp:
+        (QQuickWebViewPrivate::initialize):
+        * UIProcess/qt/QtWebContext.cpp:
+        (WebKit::initializeContextInjectedBundleClient):
+        (WebKit::QtWebContext::QtWebContext):
+        (WebKit::QtWebContext::create):
+        (WebKit::QtWebContext::defaultContext):
+        * UIProcess/qt/QtWebContext.h:
+        (WebKit):
+        (QtWebContext):
+        (WebKit::QtWebContext::context):
+
+2013-02-14  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
+
+        [Qt][WK2] Allow QtWebContext to call directly to QQuickWebView with a WKPageRef
+        https://bugs.webkit.org/show_bug.cgi?id=109829
+
+        Reviewed by Allan Sandfeld Jensen.
+        Signed off for WebKit2 by Benjamin Poulain.
+
+        Instead of going through WebPageProxy and PageClient to forward
+        injected bundle messages received by the context, maintain a static map
+        of WKPageRef to QQuickWebViewPrivate.
+
+        * UIProcess/API/qt/qquickwebview.cpp:
+        (QQuickWebViewPrivate::get):
+        (QQuickWebViewPrivate::~QQuickWebViewPrivate):
+        (QQuickWebViewPrivate::initialize):
+        (QQuickWebViewPrivate::didReceiveMessageFromNavigatorQtObject):
+        * UIProcess/API/qt/qquickwebview_p_p.h:
+        (QQuickWebViewPrivate):
+        * UIProcess/API/qt/raw/qrawwebview.cpp:
+        * UIProcess/API/qt/raw/qrawwebview_p_p.h:
+        * UIProcess/PageClient.h:
+        (PageClient):
+        * UIProcess/WebPageProxy.h:
+        (WebPageProxy):
+        * UIProcess/qt/QtPageClient.cpp:
+        * UIProcess/qt/QtPageClient.h:
+        (QtPageClient):
+        * UIProcess/qt/QtWebContext.cpp:
+        (WebKit::didReceiveMessageFromInjectedBundle):
+        * UIProcess/qt/WebPageProxyQt.cpp:
+
+2013-02-14  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
+
+        [Qt][WK2] Keep the WebContext alive during the whole application's lifetime
+        https://bugs.webkit.org/show_bug.cgi?id=109827
+
+        Reviewed by Simon Hausmann.
+        Signed off for WebKit2 by Benjamin Poulain.
+
+        The lifetime of the WebContext is difficult to manage because of a circular
+        reference kept with the WebProcessProxy until it shuts itself down, 60
+        seconds after the last page is closed. There was some notification
+        in place to handle this in the upper layer, but having to go through the
+        C API (done in a following patch) makes this quite awkward.
+
+        Keeping the WebContext alive also includes the icon database which is
+        quite heavy, in the future we should only enable it once the
+        QQuickWebView::icon property is read.
+
+        * UIProcess/API/qt/qquickwebview.cpp:
+        (QQuickWebViewPrivate::QQuickWebViewPrivate):
+        (QQuickWebViewPrivate::handleDownloadRequest):
+        (QQuickWebViewPrivate::updateIcon):
+        * UIProcess/API/qt/qquickwebview_p_p.h:
+        (QQuickWebViewPrivate):
+        * UIProcess/API/qt/qwebiconimageprovider.cpp:
+        (QWebIconImageProvider::requestImage):
+        * UIProcess/qt/QtWebContext.cpp:
+        (WebKit):
+        (WebKit::QtWebContext::QtWebContext):
+        (WebKit::QtWebContext::~QtWebContext):
+        (WebKit::QtWebContext::create):
+        (WebKit::QtWebContext::defaultContext):
+        * UIProcess/qt/QtWebContext.h:
+        (QtWebContext):
+        (WebKit::QtWebContext::downloadManager):
+        (WebKit::QtWebContext::iconDatabase):
+        * UIProcess/qt/WebContextQt.cpp:
+        (WebKit::WebContext::platformInvalidateContext):
+
+2013-02-14  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
+
+        [Qt][WK2] Favor QUrl and QString over WTF::String in the Qt API layer
+        https://bugs.webkit.org/show_bug.cgi?id=109468
+
+        Reviewed by Allan Sandfeld Jensen.
+        Signed off for WebKit2 by Benjamin Poulain.
+
+        In preparation for patches using the C API types in some areas, remove the
+        usage of WTF::String on the affected line.
+
+        Use a QUrl for icon URL to avoid unnecessary conversion.
+        Use a QString for the page URL to keep it compatible with WebPageProxy and
+        WebIconDatabase and avoid QUrl parsing.
+
+        * UIProcess/API/qt/qquickwebview.cpp:
+        (QQuickWebViewPrivate::_q_onIconChangedForPageURL):
+        (QQuickWebViewPrivate::updateIcon):
+        (QQuickWebView::emitUrlChangeIfNeeded):
+        (QQuickWebView::icon):
+        * UIProcess/API/qt/qquickwebview_p_p.h:
+        (QQuickWebViewPrivate):
+        * UIProcess/API/qt/qwebiconimageprovider.cpp:
+        (QWebIconImageProvider::iconURLForPageURLInContext):
+        * UIProcess/API/qt/qwebiconimageprovider_p.h:
+        * UIProcess/qt/QtWebIconDatabaseClient.cpp:
+        (WebKit::QtWebIconDatabaseClient::iconForPageURL):
+        (WebKit::QtWebIconDatabaseClient::iconImageForPageURL):
+        (WebKit::QtWebIconDatabaseClient::retainIconForPageURL):
+        (WebKit::QtWebIconDatabaseClient::releaseIconForPageURL):
+        * UIProcess/qt/QtWebIconDatabaseClient.h:
+        (QtWebIconDatabaseClient):
+
+2013-03-12  Manuel Rego Casasnovas  <rego@igalia.com>
+
+        [GTK][WK2] REGRESSION(r145081): Unit tests not working if locale is not English
+        https://bugs.webkit.org/show_bug.cgi?id=111973
+
+        Reviewed by Carlos Garcia Campos.
+
+        The problem is that the UIProcess locale is reseted to C in
+        gtk_test_init, however the WebProcess does not inherit the locale set in
+        the UIProcess and it uses the system one (that could be different to
+        English). So, there were problems in some tests that are comparing
+        strings from both processes like WebKit2APITests/TestPrinting and
+        WebKit2APITests/TestWebKitWebContext. The solution is to set the locale
+        environment variable LC_ALL to C in order to reset WebProcess locale
+        too.
+
+        * UIProcess/API/gtk/tests/TestMain.cpp:
+        (main): Set environment variable LC_ALL to C.
+
+2013-03-11  Brady Eidson  <beidson@apple.com>
+
+        Loads are never canceled in the NetworkProcess
+        <rdar://problem/12890500> and https://bugs.webkit.org/show_bug.cgi?id=112103
+
+        Reviewed by Alexey Proskuryakov.
+
+        If a connection to a WebProcess is closed (gracefully or by crashing) then:
+        - All scheduled loads for that connection should be forgotten.
+        - All in-progress loads for that connection should be aborted asap.
+
+        * NetworkProcess/NetworkResourceLoader.cpp:
+        (WebKit::requestsToCleanupMutex): The "request to stop" mechanism is now called "request to cleanup"
+        (WebKit::requestsToCleanup):
+        (WebKit::NetworkResourceLoader::scheduleCleanupOnMainThread):
+        (WebKit::NetworkResourceLoader::performCleanups):
+        (WebKit::NetworkResourceLoader::cleanup):
+        (WebKit::NetworkResourceLoader::didFinishLoading):
+        (WebKit::NetworkResourceLoader::didFail):
+
+        (WebKit::NetworkResourceLoader::connectionToWebProcessDidClose): If there is a resource handle, let
+          the loading thread notice the connection is invalid. Otherwise request to cleanup the loader.
+        (WebKit::NetworkResourceLoader::sendAbortingOnFailure):
+        (WebKit::NetworkResourceLoader::sendSyncAbortingOnFailure):
+        (WebKit::NetworkResourceLoader::abortInProgressLoad): Cancel the resource handle and schedule main thread cleanup.
+        (WebKit::NetworkResourceLoader::didReceiveResponse): Use sendAbortingOnFailure instead of send.
+        (WebKit::NetworkResourceLoader::didReceiveData): Ditto.
+
+        (WebKit::NetworkResourceLoader::willSendRequest): Call abortInProgressLoad if the sync message failed.
+        (WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpace): Ditto.
+        * NetworkProcess/NetworkResourceLoader.h:
+
+        Make connectionToWebProcessDidClose() pure virtual, moving its implementation to the subclasses:
+        * NetworkProcess/SchedulableLoader.cpp:
+        * NetworkProcess/SchedulableLoader.h:
+
+        * NetworkProcess/SyncNetworkResourceLoader.cpp:
+        (WebKit::SyncNetworkResourceLoader::start): Call cleanup().
+        (WebKit::SyncNetworkResourceLoader::connectionToWebProcessDidClose): Call cleanup().
+        (WebKit::SyncNetworkResourceLoader::cleanup): Factor out the sync loader cleanup code.
+        * NetworkProcess/SyncNetworkResourceLoader.h:
+
+2013-03-11  Tim Horton  <timothy_horton@apple.com>
+
+        PDFPlugin: Return PDFKit's data instead of the original resource data for save/etc.
+        https://bugs.webkit.org/show_bug.cgi?id=111956
+        <rdar://problem/13352282>
+
+        Reviewed by Alexey Proskuryakov.
+
+        If we return the original resource data, we lose changes made to annotations.
+
+        * WebProcess/Plugins/PDF/PDFPlugin.mm:
+        (WebKit::PDFPlugin::pdfDocumentDidLoad): Adopt the renamed rawData().
+        (WebKit::PDFPlugin::saveToPDF): Use liveData so that "Save to PDF" persists changes to annotations.
+        (WebKit::PDFPlugin::openWithNativeApplication): Use liveData so that "Open With [native application]" persists changes to annotations.
+
+        * WebProcess/Plugins/PDF/PDFPluginAnnotation.h:
+        * WebProcess/Plugins/PDF/PDFPluginAnnotation.mm:
+        (WebKit::PDFPluginAnnotation::commit): Added, inform PDFPlugin that we're mutating the document.
+        * WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm:
+        (WebKit::PDFPluginChoiceAnnotation::commit): Let PDFPluginAnnotation do what it needs to inform PDFPlugin that we're going to mutate the document.
+        * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
+        (WebKit::PDFPluginTextAnnotation::commit): Let PDFPluginAnnotation do what it needs to inform PDFPlugin that we're going to mutate the document.
+
+        * WebProcess/Plugins/PDF/SimplePDFPlugin.h:
+        (WebKit::SimplePDFPlugin::didMutatePDFDocument): Added.
+        (WebKit::SimplePDFPlugin::liveData): Added.
+        (WebKit::SimplePDFPlugin::rawData): Renamed from data(). Return NSData for consistency.
+        (WebKit::SimplePDFPlugin::pdfDocumentWasMutated): Added.
+        * WebProcess/Plugins/PDF/SimplePDFPlugin.mm:
+        (WebKit::SimplePDFPlugin::liveData): Return PDFKit's data if the user has mutated the
+        document, otherwise the raw data. This way, PDFs that PDFKit can't process will still
+        be downloadable as long as the user doesn't interact with annotations.
+        (WebKit::SimplePDFPlugin::liveResourceData): Return a SharedData wrapping the PDFDocument's data.
+        
+        * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
+        * WebProcess/Plugins/Netscape/NetscapePlugin.h:
+        * WebProcess/Plugins/PDF/SimplePDFPlugin.h:
+        * WebProcess/Plugins/Plugin.h:
+        * WebProcess/Plugins/PluginProxy.h:
+        * WebProcess/Plugins/PluginView.cpp:
+        * WebProcess/Plugins/PluginView.h:
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::getMainResourceDataOfFrame):
+        Use a SharedData instead of raw data for getResourceData, and rename it liveResourceData().
+
 2013-03-11  Tim Horton  <timothy_horton@apple.com>
 
         [wk2] WebProcess and WebContentService don't respect system localization