Merge r163797 - [GLIB] Add GUniqueOutPtr and use it instead of GOwnPtr
https://bugs.webkit.org/show_bug.cgi?id=127554

Reviewed by Gustavo Noronha Silva.

Source/WebCore:

Use GUniqueOutPtr instead of GOwnPtr.

* GNUmakefile.list.am:
* PlatformEfl.cmake:
* PlatformGTK.cmake:
* platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
(WebCore::AudioDestinationGStreamer::handleMessage):
* platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
(WebCore::AudioFileReader::handleMessage):
* platform/glib/BatteryProviderUPower.cpp:
(BatteryProviderUPower::startUpdating):
* platform/graphics/gstreamer/GStreamerUtilities.cpp:
(WebCore::initializeGStreamer):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::handleMessage):
* platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
(WebCore::TrackPrivateBaseGStreamer::getTag):
* platform/graphics/gtk/ImageBufferGtk.cpp:
(WebCore::encodeImage):
(WebCore::ImageBuffer::toDataURL):
* platform/graphics/gtk/ImageGtk.cpp:
(WebCore::loadResourceSharedBuffer):
* platform/gtk/DataObjectGtk.cpp:
(WebCore::DataObjectGtk::setURIList):
* platform/gtk/FileSystemGtk.cpp:
(WebCore::readFromFile):
* platform/gtk/GamepadsGtk.cpp:
(WebCore::GamepadDeviceGtk::readCallback):
* platform/gtk/GtkInputMethodFilter.cpp:
(WebCore::GtkInputMethodFilter::handlePreeditChanged):
* platform/gtk/PasteboardHelper.cpp:
(WebCore::PasteboardHelper::fillDataObjectFromDropData):
* platform/gtk/RenderThemeGtk.cpp:
(WebCore::RenderThemeGtk::systemFont):
* platform/gtk/SharedBufferGtk.cpp:
(WebCore::SharedBuffer::createWithContentsOfFile):
* platform/network/gtk/CredentialBackingStore.cpp:
(WebCore::credentialForChallengeAsyncReadyCallback):
* platform/network/soup/GOwnPtrSoup.cpp: Removed.
* platform/network/soup/GOwnPtrSoup.h: Removed.
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::redirectSkipCallback):
(WebCore::nextMultipartResponsePartCallback):
(WebCore::sendRequestCallback):
(WebCore::addFileToSoupMessageBody):
(WebCore::createSoupRequestAndMessageForHandle):
(WebCore::readCallback):
* platform/network/soup/SocketStreamHandleSoup.cpp:
(WebCore::SocketStreamHandle::platformSend):
(WebCore::SocketStreamHandle::platformClose):
(WebCore::connectedCallback):
(WebCore::readReadyCallback):
* platform/network/soup/SoupNetworkSession.cpp:
(WebCore::SoupNetworkSession::httpProxy):

Source/WebKit/gtk:

Use GUniqueOutPtr instead of GOwnPtr.

* WebCoreSupport/FrameLoaderClientGtk.cpp:
(WebKit::FrameLoaderClient::dispatchDidFailLoad):
* WebCoreSupport/TextCheckerClientGtk.cpp:
* webkit/webkitdownload.cpp:
(webkit_download_open_stream_for_uri):
(webkit_download_set_destination_uri):
(webkit_download_received_data):
* webkit/webkitwebplugin.cpp:
(webkit_web_plugin_get_path):
* webkit/webkitwebview.cpp:
(webkit_web_view_expose_event):

Source/WebKit2:

Use GUniqueOutPtr instead of GOwnPtr.

* NetworkProcess/soup/NetworkProcessSoup.cpp:
(WebKit::getCacheDiskFreeSize):
* Shared/Downloads/soup/DownloadSoup.cpp:
(WebKit::DownloadClient::didReceiveResponse):
(WebKit::DownloadClient::didReceiveData):
(WebKit::DownloadClient::didFinishLoading):
* UIProcess/API/gtk/WebKitFaviconDatabase.cpp:
(processPendingIconsForPageURL):
(webkit_favicon_database_get_favicon):
* UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
(webkitURISchemeRequestReadCallback):
* UIProcess/API/gtk/WebKitWebView.cpp:
(gotFaviconCallback):
* UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp:
(WebKit::WebInspectorServer::platformResourceForPath):
* UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
(WebKit::ProcessLauncher::launchProcess):
* UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
(WebKit::PluginProcessProxy::scanPlugin):
* WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
* WebProcess/soup/WebProcessSoup.cpp:
(WebKit::getCacheDiskFreeSize):

Source/WTF:

GUniqueOutPtr is a simplified version of GOwnPtr for the cases
where we need the address of the contained pointer. GUniqueOutPtr
uses GUniquePtr to free the contained object and to release the
container pointer. The API is very simple to make sure this is
only used when outPtr() is needed. It can't be constructed with a
pointer, and there's not method to set a new pointer. Another
difference with the old GOwnPtr is that outPtr() can be used
multiple times, because it frees any pointer previously set.

* GNUmakefile.list.am:
* wtf/PlatformEfl.cmake:
* wtf/PlatformGTK.cmake:
* wtf/gobject/GOwnPtr.cpp: Removed.
* wtf/gobject/GOwnPtr.h: Removed.
* wtf/gobject/GUniquePtr.h:
(WTF::GUniqueOutPtr::GUniqueOutPtr):
(WTF::GUniqueOutPtr::~GUniqueOutPtr):
(WTF::GUniqueOutPtr::outPtr):
(WTF::GUniqueOutPtr::reset):
(WTF::GUniqueOutPtr::release):
(WTF::GUniqueOutPtr::operator*):
(WTF::GUniqueOutPtr::operator->):
(WTF::GUniqueOutPtr::get):
(WTF::GUniqueOutPtr::operator!):
(WTF::GUniqueOutPtr::operator UnspecifiedBoolType):

Tools:

Use GUniqueOutPtr instead of GOwnPtr.

* DumpRenderTree/gtk/DumpRenderTree.cpp:
* DumpRenderTree/gtk/EventSender.cpp:
(createKeyPressEvent):
* TestWebKitAPI/Tests/WTF/gobject/GUniquePtr.cpp:
(TestWebKitAPI::returnOutChar):
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKit2Gtk/TestCookieManager.cpp:
* TestWebKitAPI/Tests/WebKit2Gtk/TestInspectorServer.cpp:
(testInspectorServerPageList):
(openRemoteDebuggingSession):
(sendIncompleteRequest):
* TestWebKitAPI/Tests/WebKit2Gtk/TestResources.cpp:
* TestWebKitAPI/Tests/WebKit2Gtk/TestWebExtensions.cpp:
(testWebExtensionWindowObjectCleared):
(testWebExtensionIsolatedWorld):
* TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitFaviconDatabase.cpp:
* TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebView.cpp:
(testWebViewRunJavaScript):
(testWebViewSave):
(testWebViewPageVisibility):
* TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebViewGroup.cpp:
(isStyleSheetInjectedForURLAtPath):
* TestWebKitAPI/Tests/WebKit2Gtk/TestWebViewEditor.cpp:
* TestWebKitAPI/Tests/WebKit2Gtk/WebExtensionTest.cpp:
* TestWebKitAPI/Tests/WebKit2Gtk/WebProcessTest.cpp:
* TestWebKitAPI/Tests/gtk/InputMethodFilter.cpp:
(TestWebKitAPI::TestInputMethodFilter::sendKeyEventToFilter):
* TestWebKitAPI/gtk/PlatformWebViewGtk.cpp:
(TestWebKitAPI::doKeyStroke):
* TestWebKitAPI/gtk/WebKit2Gtk/TestMain.h:
* TestWebKitAPI/gtk/WebKit2Gtk/WebKitTestBus.cpp:
(WebKitTestBus::run):
* TestWebKitAPI/gtk/WebKit2Gtk/WebViewTest.cpp:
(resourceGetDataCallback):
(WebViewTest::keyStroke):
(onSnapshotReady):
* WebKitTestRunner/gtk/EventSenderProxyGtk.cpp:
(WTR::EventSenderProxy::keyDown):

git-svn-id: http://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.4@163865 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Merge r163799 - [GTK] Create the inspector view using the same web process as the inspected page
https://bugs.webkit.org/show_bug.cgi?id=128539

Reviewed by Martin Robinson.

* UIProcess/API/C/gtk/WKView.cpp:
(WKViewCreate): Pass nullptr as the related page.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseCreate): Add related page argument and pass it
to webkitWebViewBaseCreateWebPage() instead of nullptr.
* UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
* UIProcess/gtk/WebInspectorProxyGtk.cpp:
(WebKit::WebInspectorProxy::platformCreateInspectorPage): Pass
m_page as related page to webkitWebViewBaseCreate().

git-svn-id: http://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.4@163867 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Merge r164167 - [GTK] Fix marshaller used in WebKitWebPage::document-loaded signal
https://bugs.webkit.org/show_bug.cgi?id=128808

Reviewed by Sergio Villar Senin.

* WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
(webkit_web_page_class_init): Use g_cclosure_marshal_VOID__VOID
instead of g_cclosure_marshal_VOID__OBJECT.

git-svn-id: http://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.4@164169 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Merge r163871 - [GStreamer] High playback rate causes crash
https://bugs.webkit.org/show_bug.cgi?id=128453

Patch by Piotr Grad <p.grad@samsung.com> on 2014-02-11
Reviewed by Philippe Normand.

Source/WebCore:

To high playback rate passed to GStreamer was causing crash.
Added guard in setRate method.

Test: media/video-extreme-playbackrate-crash.html

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::setRate):

LayoutTests:

Test checks if passing high playback rate causes crash.

* media/video-extreme-playbackrate-crash-expected.txt: Added.
* media/video-extreme-playbackrate-crash.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.4@164209 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Merge r163875 - O_CLOEXEC in shm_open does not work on FreeBSD
https://bugs.webkit.org/show_bug.cgi?id=128572

Reviewed by Darin Adler.

The O_CLOEXEC is not supported by shm_open() and is also not
necessary since FD_CLOEXEC is already set by default when the new
file descriptor is created.

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

git-svn-id: http://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.4@164210 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Merge r163954 - 'ar T' is not portable and breaks the build on FreeBSD
https://bugs.webkit.org/show_bug.cgi?id=128596

Patch by Ryan Lortie <desrt@desrt.ca> on 2014-02-12
Reviewed by Gustavo Noronha Silva.

Create thin archives only if we are using GNU ar.

* Source/autotools/SetupLibtool.m4:

git-svn-id: http://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.4@164211 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Fix make distcheck.

Source/WebCore:

* GNUmakefile.list.am: Add missing header files.

Source/WebKit2:

* GNUmakefile.list.am: Add missing header files.

git-svn-id: http://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.4@164212 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Update NEWS and Versions.m4 for 2.3.90 release.

.:

* Source/autotools/Versions.m4: Bump version numbers.

Source/WebKit/gtk:

* NEWS: Added release notes for 2.3.90.

git-svn-id: http://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.4@164213 268f45cc-cd09-0410-ab3c-d52691b4dbfc