Commit f2ece55f authored by carlosgc@webkit.org's avatar carlosgc@webkit.org

[GLIB] Use GUniquePtr instead of GOwnPtr

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

Reviewed by Martin Robinson.

GUniquePtr is a template alias of std::unique_ptr with a custom
deleter that replaces GOwnPtr. GOwnPtr is still used for the cases
where the output pointer is needed, but it will also be replaced soon.

Source/WebCore:

* GNUmakefile.list.am:
* PlatformGTK.cmake:
* accessibility/atk/AXObjectCacheAtk.cpp:
* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(getAttributeSetForAccessibilityObject):
(accessibilityObjectLength):
(textExtents):
(webkitAccessibleTextGetChar):
(numberOfReplacedElementsBeforeOffset):
* page/ContextMenuController.cpp:
* platform/SharedBuffer.h:
* platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
(webKitWebAudioSrcConstructed):
(webKitWebAudioSrcLoop):
* platform/audio/gtk/AudioBusGtk.cpp:
(WebCore::AudioBus::loadPlatformResource):
* platform/geoclue/GeolocationProviderGeoclue.cpp:
* platform/graphics/gstreamer/ImageGStreamerCairo.cpp:
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::setAudioStreamProperties):
(WebCore::MediaPlayerPrivateGStreamer::handleMessage):
* platform/graphics/gstreamer/WebKitMediaSourceGStreamer.cpp:
(webKitMediaSrcAddSrc):
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(webKitWebSrcStart):
(ResourceHandleStreamingClient::wasBlocked):
(ResourceHandleStreamingClient::cannotShowURL):
* platform/graphics/gtk/ImageBufferGtk.cpp:
(WebCore::encodeImage):
(WebCore::ImageBuffer::toDataURL):
* platform/graphics/gtk/ImageGtk.cpp:
(WebCore::getThemeIconFileName):
(WebCore::Image::loadPlatformResource):
* platform/gtk/ContextMenuGtk.cpp:
(WebCore::ContextMenu::itemCount):
(WebCore::contextMenuItemVector):
* platform/gtk/ContextMenuItemGtk.cpp:
(WebCore::createPlatformMenuItemDescription):
* platform/gtk/DataObjectGtk.cpp:
(WebCore::DataObjectGtk::setURIList):
(WebCore::DataObjectGtk::setURL):
* platform/gtk/FileSystemGtk.cpp:
(WebCore::filenameToString):
(WebCore::fileSystemRepresentation):
(WebCore::filenameForDisplay):
(WebCore::pathGetFileName):
(WebCore::applicationDirectoryPath):
(WebCore::sharedResourcesPath):
(WebCore::directoryName):
(WebCore::listDirectory):
(WebCore::openTemporaryFile):
* platform/gtk/GOwnPtrGtk.cpp: Removed.
* platform/gtk/GOwnPtrGtk.h: Removed.
* platform/gtk/GUniquePtrGtk.h: Added.
* platform/gtk/GamepadsGtk.cpp:
(WebCore::GamepadsGtk::GamepadsGtk):
* platform/gtk/GtkClickCounter.cpp:
(WebCore::GtkClickCounter::shouldProcessButtonEvent):
* platform/gtk/GtkInputMethodFilter.cpp:
(WebCore::GtkInputMethodFilter::sendCompositionAndPreeditWithFakeKeyEvents):
* platform/gtk/GtkPopupMenu.cpp:
(WebCore::GtkPopupMenu::popUp):
(WebCore::GtkPopupMenu::typeAheadFind):
* platform/gtk/LanguageGtk.cpp:
(WebCore::platformLanguage):
* platform/gtk/LocalizedStringsGtk.cpp:
(WebCore::imageTitle):
(WebCore::localizedMediaTimeDescription):
* platform/gtk/PasteboardHelper.cpp:
(WebCore::selectionDataToUTF8String):
(WebCore::PasteboardHelper::getClipboardContents):
(WebCore::PasteboardHelper::fillSelectionData):
* platform/gtk/PopupMenuGtk.cpp:
(WebCore::PopupMenuGtk::createGtkActionForMenuItem):
(WebCore::PopupMenuGtk::show):
* platform/gtk/WebKitAuthenticationWidget.cpp:
(webkitAuthenticationWidgetInitialize):
* platform/network/ResourceHandleInternal.h:
* platform/network/gtk/CredentialBackingStore.cpp:
(WebCore::credentialForChallengeAsyncReadyCallback):
* platform/network/soup/CookieJarSoup.cpp:
(WebCore::setCookiesFromDOM):
(WebCore::cookiesForSession):
(WebCore::getRawCookies):
(WebCore::deleteCookie):
(WebCore::getHostnamesWithCookies):
(WebCore::deleteCookiesForHostname):
(WebCore::deleteAllCookies):
* platform/network/soup/DNSSoup.cpp:
* platform/network/soup/GUniquePtrSoup.h: Added.
* platform/network/soup/ResourceErrorSoup.cpp:
(WebCore::failingURI):
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::ResourceHandle::ensureReadBuffer):
(WebCore::cleanupSoupRequestOperation):
(WebCore::createSoupRequestAndMessageForHandle):
* platform/network/soup/ResourceRequestSoup.cpp:
(WebCore::ResourceRequest::updateSoupMessageMembers):
(WebCore::ResourceRequest::updateSoupMessage):
* platform/network/soup/ResourceResponseSoup.cpp:
* platform/network/soup/SoupURIUtils.cpp:
(WebCore::soupURIToKURL):
* platform/soup/SharedBufferSoup.cpp:
(WebCore::SharedBuffer::SharedBuffer):
(WebCore::SharedBuffer::clearPlatformData):
(WebCore::SharedBuffer::maybeTransferPlatformData):
(WebCore::SharedBuffer::hasPlatformData):
* plugins/gtk/PluginPackageGtk.cpp:
(WebCore::PluginPackage::fetchInfo):
(WebCore::PluginPackage::load):

Source/WebKit/gtk:

* WebCoreSupport/ContextMenuClientGtk.cpp:
(WebKit::getUnicodeMenuItemPosition):
* WebCoreSupport/DragClientGtk.cpp:
(WebKit::DragClient::startDrag):
* WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
(DumpRenderTreeSupportGtk::setValueForUser):
* WebCoreSupport/EditorClientGtk.h:
* WebCoreSupport/FrameLoaderClientGtk.cpp:
(WebKit::FrameLoaderClient::userAgent):
(WebKit::FrameLoaderClient::dispatchDidReceiveAuthenticationChallenge):
(WebKit::FrameLoaderClient::dispatchWillSendRequest):
(WebKit::FrameLoaderClient::assignIdentifierToInitialRequest):
(WebKit::FrameLoaderClient::dispatchDidReceiveResponse):
(WebKit::FrameLoaderClient::dispatchDidReceiveContentLength):
(WebKit::FrameLoaderClient::dispatchDidFinishLoading):
(WebKit::FrameLoaderClient::dispatchDidFailLoading):
(WebKit::FrameLoaderClient::dispatchDidFailLoad):
* WebCoreSupport/InspectorClientGtk.h:
* webkit/webkitfavicondatabase.cpp:
(webkit_favicon_database_set_path):
* webkit/webkitfilechooserrequest.cpp:
* webkit/webkitglobals.cpp:
(webkitInit):
* webkit/webkithittestresult.cpp:
(WebKit::kit):
* webkit/webkiticondatabase.cpp:
(webkit_icon_database_set_path):
* webkit/webkitspellcheckerenchant.cpp:
* webkit/webkitwebplugin.cpp:
(webkit_web_plugin_get_path):
* webkit/webkitwebpluginprivate.h:
* webkit/webkitwebsettings.cpp:
(webkit_web_settings_class_init):
(webkit_web_settings_copy):
* webkit/webkitwebview.cpp:
(webkit_web_view_forward_context_menu_event):
(fileChooserDialogResponseCallback):
(webkit_web_view_drag_end):
* webkit/webkitwebviewprivate.h:

Source/WebKit2:

* Shared/Downloads/soup/DownloadSoup.cpp:
(WebKit::DownloadClient::didReceiveResponse):
* Shared/NativeWebKeyboardEvent.h:
* Shared/NativeWebMouseEvent.h:
* Shared/NativeWebWheelEvent.h:
* Shared/gtk/ArgumentCodersGtk.cpp:
(IPC::encodeGKeyFile):
(IPC::decodeGKeyFile):
(IPC::encode):
(IPC::decode):
* UIProcess/API/gtk/WebKitContextMenuItem.cpp:
(webkitContextMenuItemSetSubMenuFromGtkMenu):
* UIProcess/API/gtk/WebKitDownload.cpp:
(webkitDownloadDecideDestination):
(webkitDownloadNotifyProgress):
(webkitDownloadFailed):
* UIProcess/API/gtk/WebKitFileChooserRequest.cpp:
(webkit_file_chooser_request_select_files):
* UIProcess/API/gtk/WebKitInjectedBundleClient.cpp:
(didReceiveWebViewMessageFromInjectedBundle):
(getInjectedBundleInitializationUserData):
* UIProcess/API/gtk/WebKitLoaderClient.cpp:
(didFailProvisionalLoadWithErrorForFrame):
(didFailLoadWithErrorForFrame):
* UIProcess/API/gtk/WebKitPrintOperation.cpp:
(drawPagesForPrintingCompleted):
* UIProcess/API/gtk/WebKitURIRequest.cpp:
(webkit_uri_request_get_http_headers):
* UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
(webkit_uri_scheme_request_get_scheme):
(webkit_uri_scheme_request_get_path):
* UIProcess/API/gtk/WebKitWebContext.cpp:
(injectedBundleFilename):
(webkit_web_context_set_favicon_database_directory):
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewLoadFail):
(webkitWebViewCreateJavaScriptDialog):
(fileChooserDialogResponseCallback):
(webkitWebViewLoadChanged):
(webkitWebViewLoadFailedWithTLSErrors):
(webkitWebViewPopulateContextMenu):
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseButtonPressEvent):
(webkitWebViewBaseStartDrag):
* UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp:
(WebKit::WebInspectorServer::platformResourceForPath):
* UIProcess/InspectorServer/soup/WebSocketServerSoup.cpp:
(WebKit::connectionCallback):
* UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
(WebKit::ProcessLauncher::launchProcess):
* UIProcess/gtk/WebContextGtk.cpp:
(WebKit::WebContext::platformDefaultApplicationCacheDirectory):
(WebKit::WebContext::platformDefaultDatabaseDirectory):
(WebKit::WebContext::platformDefaultIconDatabasePath):
(WebKit::WebContext::platformDefaultLocalStorageDirectory):
(WebKit::WebContext::platformDefaultDiskCacheDirectory):
* UIProcess/gtk/WebContextMenuProxyGtk.cpp:
(WebKit::contextMenuItemVisibilityChanged):
* UIProcess/gtk/WebInspectorProxyGtk.cpp:
(WebKit::WebInspectorProxy::platformInspectedURLChanged):
* UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
(WebKit::WebPopupMenuProxyGtk::createGtkActionForMenuItem):
* WebProcess/WebPage/gtk/WebInspectorGtk.cpp:
* WebProcess/WebPage/gtk/WebPageGtk.cpp:
(WebKit::WebPage::platformInitialize):
* WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
* WebProcess/gtk/WebProcessMainGtk.cpp:
* WebProcess/soup/WebSoupRequestManager.cpp:
(WebKit::WebSoupRequestManager::send):

Tools:

* DumpRenderTree/atk/AccessibilityCallbacksAtk.cpp:
(printAccessibilityEvent):
(axObjectEventListener):
* DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
(indexRangeInTable):
(AccessibilityUIElement::role):
(AccessibilityUIElement::title):
(AccessibilityUIElement::description):
(AccessibilityUIElement::stringValue):
(AccessibilityUIElement::language):
(AccessibilityUIElement::lineForIndex):
(AccessibilityUIElement::selectedTextRange):
(AccessibilityUIElement::url):
* DumpRenderTree/efl/AccessibilityControllerEfl.cpp:
(AccessibilityController::accessibleElementById):
* DumpRenderTree/gtk/AccessibilityControllerGtk.cpp:
(AccessibilityController::accessibleElementById):
* DumpRenderTree/gtk/DumpRenderTree.cpp:
(getOutputDir):
(getFontsPath):
(initializeFonts):
(dumpFramesAsText):
(compareHistoryItems):
(dumpHistoryItem):
(soupURIToStringPreservingPassword):
(resetDefaultsToConsistentValues):
(temporaryDatabaseDirectory):
(webViewTitleChanged):
(webFrameLoadStatusNotified):
(pathFromSoupURI):
(convertWebResourceToURLPath):
(urlSuitableForTestResult):
(descriptionSuitableForTestResult):
(willSendRequestCallback):
(frameLoadEventCallback):
* DumpRenderTree/gtk/EditingCallbacks.cpp:
(dumpNodePath):
(dumpRange):
(shouldApplyStyle):
* DumpRenderTree/gtk/EventSender.cpp:
(contextClickCallback):
(beginDragWithFilesCallback):
* DumpRenderTree/gtk/TestRunnerGtk.cpp:
(TestRunner::pathToLocalResource):
(TestRunner::queueLoad):
(TestRunner::removeOriginAccessWhitelistEntry):
(TestRunner::setMockGeolocationPositionUnavailableError):
(TestRunner::setIconDatabaseEnabled):
(TestRunner::findString):
(TestRunner::setDomainRelaxationForbiddenForURLScheme):
(TestRunner::overridePreference):
(TestRunner::addUserScript):
(TestRunner::addUserStyleSheet):
(TestRunner::setTextDirection):
* DumpRenderTree/gtk/TextInputController.cpp:
(setMarkedTextCallback):
(insertTextCallback):
(doCommandCallback):
* DumpRenderTree/gtk/WorkQueueItemGtk.cpp:
(LoadHTMLStringItem::invoke):
* TestWebKitAPI/PlatformGTK.cmake:
* TestWebKitAPI/Tests/WebKit2Gtk/DOMNodeTest.cpp:
(WebKitDOMNodeTest::testTagNames):
* TestWebKitAPI/Tests/WebKit2Gtk/TestBackForwardList.cpp:
(testBackForwardListLimitAndCache):
* TestWebKitAPI/Tests/WebKit2Gtk/TestContextMenu.cpp:
(testContextMenuSmartSeparators):
* TestWebKitAPI/Tests/WebKit2Gtk/TestCookieManager.cpp:
* TestWebKitAPI/Tests/WebKit2Gtk/TestDownloads.cpp:
(testDownloadLocalFile):
(testDownloadLocalFileError):
(addContentDispositionHTTPHeaderToResponse):
(serverCallback):
(testDownloadRemoteFileError):
* TestWebKitAPI/Tests/WebKit2Gtk/TestInspectorServer.cpp:
(startTestServer):
(testInspectorServerPageList):
(openRemoteDebuggingSession):
* TestWebKitAPI/Tests/WebKit2Gtk/TestPrinting.cpp:
(testPrintOperationPrint):
* TestWebKitAPI/Tests/WebKit2Gtk/TestResources.cpp:
(addCacheHTTPHeadersToResponse):
(serverCallback):
* TestWebKitAPI/Tests/WebKit2Gtk/TestSSL.cpp:
(httpsServerCallback):
(httpServerCallback):
* TestWebKitAPI/Tests/WebKit2Gtk/TestUIClient.cpp:
(testWebViewJavaScriptDialogs):
(testWebViewWindowProperties):
(testWebViewFileChooserRequest):
* TestWebKitAPI/Tests/WebKit2Gtk/TestWebExtensions.cpp:
(testWebExtensionWindowObjectCleared):
(testWebExtensionIsolatedWorld):
* TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitAccessibility.cpp:
(startTestServer):
(checkAtspiAccessible):
* TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitFaviconDatabase.cpp:
(serverCallback):
(testClearDatabase):
(testGetFaviconURI):
(webkitFaviconDatabaseFinalizedCallback):
* TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebContext.cpp:
(testWebContextGetPlugins):
(testWebContextURIScheme):
* TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebView.cpp:
(testWebViewRunJavaScript):
(testWebViewMode):
(testWebViewPageVisibility):
* TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebViewGroup.cpp:
(isStyleSheetInjectedForURLAtPath):
* TestWebKitAPI/Tests/WebKit2Gtk/TestWebViewEditor.cpp:
(testWebViewEditorCutCopyPasteNonEditable):
(testWebViewEditorCutCopyPasteEditable):
(testWebViewEditorSelectAllNonEditable):
(testWebViewEditorSelectAllEditable):
* TestWebKitAPI/Tests/WebKit2Gtk/WebExtensionTest.cpp:
(sendRequestCallback):
(methodCallCallback):
* TestWebKitAPI/gtk/PlatformUtilitiesGtk.cpp:
(TestWebKitAPI::Util::createInjectedBundlePath):
(TestWebKitAPI::Util::createURLForResource):
* TestWebKitAPI/gtk/PlatformWebViewGtk.cpp:
(TestWebKitAPI::doKeyStroke):
(TestWebKitAPI::doMouseButtonEvent):
(TestWebKitAPI::PlatformWebView::simulateMouseMove):
* TestWebKitAPI/gtk/WebKit2Gtk/LoadTrackingTest.cpp:
(loadFailedCallback):
(LoadTrackingTest::loadURI):
(LoadTrackingTest::loadHtml):
(LoadTrackingTest::loadPlainText):
(LoadTrackingTest::loadRequest):
(LoadTrackingTest::reload):
(LoadTrackingTest::goBack):
(LoadTrackingTest::goForward):
* TestWebKitAPI/gtk/WebKit2Gtk/LoadTrackingTest.h:
* TestWebKitAPI/gtk/WebKit2Gtk/TestMain.cpp:
(registerGResource):
(removeNonEmptyDirectory):
(main):
* TestWebKitAPI/gtk/WebKit2Gtk/TestMain.h:
(Test::getWebKit1TestResoucesDir):
(Test::getResourcesDir):
* TestWebKitAPI/gtk/WebKit2Gtk/WebKitTestBus.cpp:
(WebKitTestBus::run):
* TestWebKitAPI/gtk/WebKit2Gtk/WebKitTestServer.cpp:
(WebKitTestServer::WebKitTestServer):
(WebKitTestServer::getURIForPath):
* TestWebKitAPI/gtk/WebKit2Gtk/WebProcessTestRunner.cpp:
(WebProcessTestRunner::runTest):
* TestWebKitAPI/gtk/WebKit2Gtk/WebViewTest.cpp:
(resourceGetDataCallback):
(WebViewTest::mainResourceData):
(WebViewTest::mouseMoveTo):
(WebViewTest::keyStroke):
(WebViewTest::doMouseButtonEvent):
* TestWebKitAPI/gtk/WebKit2Gtk/WebViewTest.h:
* WebKitTestRunner/InjectedBundle/atk/AccessibilityControllerAtk.cpp:
(WTR::AccessibilityController::accessibleElementById):
* WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.cpp:
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::role):
(WTR::AccessibilityUIElement::title):
(WTR::AccessibilityUIElement::description):
(WTR::AccessibilityUIElement::stringValue):
(WTR::AccessibilityUIElement::language):
(WTR::AccessibilityUIElement::lineForIndex):
(WTR::AccessibilityUIElement::selectedTextRange):
(WTR::AccessibilityUIElement::url):
* WebKitTestRunner/InjectedBundle/gtk/ActivateFontsGtk.cpp:
(WTR::getOutputDir):
(WTR::getFontsPath):
(WTR::initializeFontConfigSetting):
* WebKitTestRunner/InjectedBundle/gtk/InjectedBundleUtilities.cpp:
(WTR::topLevelPath):
* WebKitTestRunner/InjectedBundle/gtk/TestRunnerGtk.cpp:
(WTR::TestRunner::pathToLocalResource):
* WebKitTestRunner/gtk/TestControllerGtk.cpp:
(WTR::TestController::initializeInjectedBundlePath):
(WTR::TestController::initializeTestPluginDirectory):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162599 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 945b1399
2014-01-22 Carlos Garcia Campos <cgarcia@igalia.com>
[GLIB] Use GUniquePtr instead of GOwnPtr
https://bugs.webkit.org/show_bug.cgi?id=127431
Reviewed by Martin Robinson.
GUniquePtr is a template alias of std::unique_ptr with a custom
deleter that replaces GOwnPtr. GOwnPtr is still used for the cases
where the output pointer is needed, but it will also be replaced soon.
* GNUmakefile.list.am:
* PlatformGTK.cmake:
* accessibility/atk/AXObjectCacheAtk.cpp:
* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(getAttributeSetForAccessibilityObject):
(accessibilityObjectLength):
(textExtents):
(webkitAccessibleTextGetChar):
(numberOfReplacedElementsBeforeOffset):
* page/ContextMenuController.cpp:
* platform/SharedBuffer.h:
* platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
(webKitWebAudioSrcConstructed):
(webKitWebAudioSrcLoop):
* platform/audio/gtk/AudioBusGtk.cpp:
(WebCore::AudioBus::loadPlatformResource):
* platform/geoclue/GeolocationProviderGeoclue.cpp:
* platform/graphics/gstreamer/ImageGStreamerCairo.cpp:
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::setAudioStreamProperties):
(WebCore::MediaPlayerPrivateGStreamer::handleMessage):
* platform/graphics/gstreamer/WebKitMediaSourceGStreamer.cpp:
(webKitMediaSrcAddSrc):
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(webKitWebSrcStart):
(ResourceHandleStreamingClient::wasBlocked):
(ResourceHandleStreamingClient::cannotShowURL):
* platform/graphics/gtk/ImageBufferGtk.cpp:
(WebCore::encodeImage):
(WebCore::ImageBuffer::toDataURL):
* platform/graphics/gtk/ImageGtk.cpp:
(WebCore::getThemeIconFileName):
(WebCore::Image::loadPlatformResource):
* platform/gtk/ContextMenuGtk.cpp:
(WebCore::ContextMenu::itemCount):
(WebCore::contextMenuItemVector):
* platform/gtk/ContextMenuItemGtk.cpp:
(WebCore::createPlatformMenuItemDescription):
* platform/gtk/DataObjectGtk.cpp:
(WebCore::DataObjectGtk::setURIList):
(WebCore::DataObjectGtk::setURL):
* platform/gtk/FileSystemGtk.cpp:
(WebCore::filenameToString):
(WebCore::fileSystemRepresentation):
(WebCore::filenameForDisplay):
(WebCore::pathGetFileName):
(WebCore::applicationDirectoryPath):
(WebCore::sharedResourcesPath):
(WebCore::directoryName):
(WebCore::listDirectory):
(WebCore::openTemporaryFile):
* platform/gtk/GOwnPtrGtk.cpp: Removed.
* platform/gtk/GOwnPtrGtk.h: Removed.
* platform/gtk/GUniquePtrGtk.h: Added.
* platform/gtk/GamepadsGtk.cpp:
(WebCore::GamepadsGtk::GamepadsGtk):
* platform/gtk/GtkClickCounter.cpp:
(WebCore::GtkClickCounter::shouldProcessButtonEvent):
* platform/gtk/GtkInputMethodFilter.cpp:
(WebCore::GtkInputMethodFilter::sendCompositionAndPreeditWithFakeKeyEvents):
* platform/gtk/GtkPopupMenu.cpp:
(WebCore::GtkPopupMenu::popUp):
(WebCore::GtkPopupMenu::typeAheadFind):
* platform/gtk/LanguageGtk.cpp:
(WebCore::platformLanguage):
* platform/gtk/LocalizedStringsGtk.cpp:
(WebCore::imageTitle):
(WebCore::localizedMediaTimeDescription):
* platform/gtk/PasteboardHelper.cpp:
(WebCore::selectionDataToUTF8String):
(WebCore::PasteboardHelper::getClipboardContents):
(WebCore::PasteboardHelper::fillSelectionData):
* platform/gtk/PopupMenuGtk.cpp:
(WebCore::PopupMenuGtk::createGtkActionForMenuItem):
(WebCore::PopupMenuGtk::show):
* platform/gtk/WebKitAuthenticationWidget.cpp:
(webkitAuthenticationWidgetInitialize):
* platform/network/ResourceHandleInternal.h:
* platform/network/gtk/CredentialBackingStore.cpp:
(WebCore::credentialForChallengeAsyncReadyCallback):
* platform/network/soup/CookieJarSoup.cpp:
(WebCore::setCookiesFromDOM):
(WebCore::cookiesForSession):
(WebCore::getRawCookies):
(WebCore::deleteCookie):
(WebCore::getHostnamesWithCookies):
(WebCore::deleteCookiesForHostname):
(WebCore::deleteAllCookies):
* platform/network/soup/DNSSoup.cpp:
* platform/network/soup/GUniquePtrSoup.h: Added.
* platform/network/soup/ResourceErrorSoup.cpp:
(WebCore::failingURI):
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::ResourceHandle::ensureReadBuffer):
(WebCore::cleanupSoupRequestOperation):
(WebCore::createSoupRequestAndMessageForHandle):
* platform/network/soup/ResourceRequestSoup.cpp:
(WebCore::ResourceRequest::updateSoupMessageMembers):
(WebCore::ResourceRequest::updateSoupMessage):
* platform/network/soup/ResourceResponseSoup.cpp:
* platform/network/soup/SoupURIUtils.cpp:
(WebCore::soupURIToKURL):
* platform/soup/SharedBufferSoup.cpp:
(WebCore::SharedBuffer::SharedBuffer):
(WebCore::SharedBuffer::clearPlatformData):
(WebCore::SharedBuffer::maybeTransferPlatformData):
(WebCore::SharedBuffer::hasPlatformData):
* plugins/gtk/PluginPackageGtk.cpp:
(WebCore::PluginPackage::fetchInfo):
(WebCore::PluginPackage::load):
2014-01-22 Simon Fraser <simon.fraser@apple.com>
Surround fixedVisibleContentRect code with USE(TILED_BACKING_STORE)
......@@ -6251,10 +6251,9 @@ platformgtk_sources += \
Source/WebCore/platform/gtk/DragIcon.h \
Source/WebCore/platform/gtk/EventLoopGtk.cpp \
Source/WebCore/platform/gtk/FileSystemGtk.cpp \
Source/WebCore/platform/gtk/GOwnPtrGtk.cpp \
Source/WebCore/platform/gtk/GOwnPtrGtk.h \
Source/WebCore/platform/gtk/GRefPtrGtk.cpp \
Source/WebCore/platform/gtk/GRefPtrGtk.h \
Source/WebCore/platform/gtk/GUniquePtr.h \
Source/WebCore/platform/gtk/GtkClickCounter.cpp \
Source/WebCore/platform/gtk/GtkClickCounter.h \
Source/WebCore/platform/gtk/GtkInputMethodFilter.cpp \
......
......@@ -196,7 +196,6 @@ list(APPEND WebCorePlatformGTK_SOURCES
platform/gtk/ErrorsGtk.cpp
platform/gtk/EventLoopGtk.cpp
platform/gtk/FileSystemGtk.cpp
platform/gtk/GOwnPtrGtk.cpp
platform/gtk/GRefPtrGtk.cpp
platform/gtk/GtkClickCounter.cpp
platform/gtk/GtkDragAndDropHelper.cpp
......
......@@ -30,7 +30,6 @@
#include "Range.h"
#include "TextIterator.h"
#include "WebKitAccessibleWrapperAtk.h"
#include <wtf/gobject/GOwnPtr.h>
#include <wtf/gobject/GRefPtr.h>
#include <wtf/text/CString.h>
......
......@@ -51,7 +51,7 @@
#include "WebKitAccessibleUtil.h"
#include "WebKitAccessibleWrapperAtk.h"
#include "htmlediting.h"
#include <wtf/gobject/GOwnPtr.h>
#include <wtf/gobject/GUniquePtr.h>
#include <wtf/text/CString.h>
using namespace WebCore;
......@@ -87,18 +87,18 @@ static AtkAttributeSet* getAttributeSetForAccessibilityObject(const Accessibilit
RenderStyle* style = &renderer->style();
AtkAttributeSet* result = 0;
GOwnPtr<gchar> buffer(g_strdup_printf("%i", style->fontSize()));
GUniquePtr<gchar> buffer(g_strdup_printf("%i", style->fontSize()));
result = addToAtkAttributeSet(result, atk_text_attribute_get_name(ATK_TEXT_ATTR_SIZE), buffer.get());
Color bgColor = style->visitedDependentColor(CSSPropertyBackgroundColor);
if (bgColor.isValid()) {
buffer.set(g_strdup_printf("%i,%i,%i", bgColor.red(), bgColor.green(), bgColor.blue()));
buffer.reset(g_strdup_printf("%i,%i,%i", bgColor.red(), bgColor.green(), bgColor.blue()));
result = addToAtkAttributeSet(result, atk_text_attribute_get_name(ATK_TEXT_ATTR_BG_COLOR), buffer.get());
}
Color fgColor = style->visitedDependentColor(CSSPropertyColor);
if (fgColor.isValid()) {
buffer.set(g_strdup_printf("%i,%i,%i", fgColor.red(), fgColor.green(), fgColor.blue()));
buffer.reset(g_strdup_printf("%i,%i,%i", fgColor.red(), fgColor.green(), fgColor.blue()));
result = addToAtkAttributeSet(result, atk_text_attribute_get_name(ATK_TEXT_ATTR_FG_COLOR), buffer.get());
}
......@@ -120,13 +120,13 @@ static AtkAttributeSet* getAttributeSetForAccessibilityObject(const Accessibilit
}
if (includeRise) {
buffer.set(g_strdup_printf("%i", baselinePosition));
buffer.reset(g_strdup_printf("%i", baselinePosition));
result = addToAtkAttributeSet(result, atk_text_attribute_get_name(ATK_TEXT_ATTR_RISE), buffer.get());
}
if (!style->textIndent().isUndefined()) {
int indentation = valueForLength(style->textIndent(), object->size().width(), &renderer->view());
buffer.set(g_strdup_printf("%i", indentation));
buffer.reset(g_strdup_printf("%i", indentation));
result = addToAtkAttributeSet(result, atk_text_attribute_get_name(ATK_TEXT_ATTR_INDENT), buffer.get());
}
......@@ -166,7 +166,7 @@ static AtkAttributeSet* getAttributeSetForAccessibilityObject(const Accessibilit
fontWeight = 900;
}
if (fontWeight > 0) {
buffer.set(g_strdup_printf("%i", fontWeight));
buffer.reset(g_strdup_printf("%i", fontWeight));
result = addToAtkAttributeSet(result, atk_text_attribute_get_name(ATK_TEXT_ATTR_WEIGHT), buffer.get());
}
......@@ -261,7 +261,7 @@ static guint accessibilityObjectLength(const AccessibilityObject* object)
// well known API to always get the text in a consistent way
AtkObject* atkObj = ATK_OBJECT(object->wrapper());
if (ATK_IS_TEXT(atkObj)) {
GOwnPtr<gchar> text(webkitAccessibleTextGetText(ATK_TEXT(atkObj), 0, -1));
GUniquePtr<gchar> text(webkitAccessibleTextGetText(ATK_TEXT(atkObj), 0, -1));
return g_utf8_strlen(text.get(), -1);
}
......@@ -335,7 +335,7 @@ static AtkAttributeSet* getRunAttributesFromAccesibilityObject(const Accessibili
static IntRect textExtents(AtkText* text, gint startOffset, gint length, AtkCoordType coords)
{
GOwnPtr<char> textContent(webkitAccessibleTextGetText(text, startOffset, -1));
GUniquePtr<char> textContent(webkitAccessibleTextGetText(text, startOffset, -1));
gint textLength = g_utf8_strlen(textContent.get(), -1);
// The first case (endOffset of -1) should work, but seems broken for all Gtk+ apps.
......@@ -529,7 +529,7 @@ static char* webkitAccessibleTextGetChar(AtkText* text, int offset, GetTextRelat
else if (textPosition == GetTextPositionAfter)
actualOffset++;
GOwnPtr<char> textData(webkitAccessibleTextGetText(text, 0, -1));
GUniquePtr<char> textData(webkitAccessibleTextGetText(text, 0, -1));
int textLength = g_utf8_strlen(textData.get(), -1);
*startOffset = std::max(0, actualOffset);
......@@ -637,7 +637,7 @@ static VisibleSelection wordAtPositionForAtkBoundary(const AccessibilityObject*
static int numberOfReplacedElementsBeforeOffset(AtkText* text, unsigned offset)
{
GOwnPtr<char> textForObject(webkitAccessibleTextGetText(text, 0, offset));
GUniquePtr<char> textForObject(webkitAccessibleTextGetText(text, 0, offset));
String textBeforeOffset = String::fromUTF8(textForObject.get());
int count = 0;
......
......@@ -71,10 +71,6 @@
#include <wtf/unicode/CharacterNames.h>
#include <wtf/unicode/Unicode.h>
#if PLATFORM(GTK)
#include <wtf/gobject/GOwnPtr.h>
#endif
using namespace WTF;
using namespace Unicode;
......
......@@ -38,7 +38,7 @@
#endif
#if USE(SOUP)
#include "GOwnPtrSoup.h"
#include "GUniquePtrSoup.h"
#endif
#if PLATFORM(MAC)
......@@ -211,7 +211,7 @@ private:
#if USE(SOUP)
explicit SharedBuffer(SoupBuffer*);
GOwnPtr<SoupBuffer> m_soupBuffer;
GUniquePtr<SoupBuffer> m_soupBuffer;
#endif
};
......
......@@ -24,11 +24,11 @@
#include "AudioBus.h"
#include "AudioIOCallback.h"
#include <wtf/gobject/GOwnPtr.h>
#include "GRefPtrGStreamer.h"
#include "GStreamerUtilities.h"
#include <gst/audio/audio.h>
#include <gst/pbutils/pbutils.h>
#include <wtf/gobject/GUniquePtr.h>
using namespace WebCore;
......@@ -221,7 +221,7 @@ static void webKitWebAudioSrcConstructed(GObject* object)
// For each channel of the bus create a new upstream branch for interleave, like:
// queue ! capsfilter ! audioconvert. which is plugged to a new interleave request sinkpad.
for (unsigned channelIndex = 0; channelIndex < priv->bus->numberOfChannels(); channelIndex++) {
GOwnPtr<gchar> queueName(g_strdup_printf("webaudioQueue%u", channelIndex));
GUniquePtr<gchar> queueName(g_strdup_printf("webaudioQueue%u", channelIndex));
GstElement* queue = gst_element_factory_make("queue", queueName.get());
GstElement* capsfilter = gst_element_factory_make("capsfilter", 0);
GstElement* audioconvert = gst_element_factory_make("audioconvert", 0);
......@@ -356,8 +356,8 @@ static void webKitWebAudioSrcLoop(WebKitWebAudioSrc* src)
if (priv->newStreamEventPending) {
GRefPtr<GstElement> queue = adoptGRef(gst_pad_get_parent_element(pad));
GRefPtr<GstPad> sinkPad = adoptGRef(gst_element_get_static_pad(queue.get(), "sink"));
GOwnPtr<gchar> queueName(gst_element_get_name(queue.get()));
GOwnPtr<gchar> streamId(g_strdup_printf("webaudio/%s", queueName.get()));
GUniquePtr<gchar> queueName(gst_element_get_name(queue.get()));
GUniquePtr<gchar> streamId(g_strdup_printf("webaudio/%s", queueName.get()));
GstEvent* streamStartEvent = gst_event_new_stream_start(streamId.get());
#if GST_CHECK_VERSION(1, 2, 0)
gst_event_set_group_id(streamStartEvent, groupId);
......
......@@ -24,23 +24,21 @@
#include "AudioFileReader.h"
#include "FileSystem.h"
#include <wtf/gobject/GOwnPtr.h>
#include <wtf/text/CString.h>
#include <glib.h>
#include <wtf/gobject/GUniquePtr.h>
#include <wtf/text/CString.h>
namespace WebCore {
PassRefPtr<AudioBus> AudioBus::loadPlatformResource(const char* name, float sampleRate)
{
GOwnPtr<gchar> filename(g_strdup_printf("%s.wav", name));
GUniquePtr<gchar> filename(g_strdup_printf("%s.wav", name));
const char* environmentPath = getenv("AUDIO_RESOURCES_PATH");
GOwnPtr<gchar> absoluteFilename;
GUniquePtr<gchar> absoluteFilename;
if (environmentPath)
absoluteFilename.set(g_build_filename(environmentPath, filename.get(), NULL));
absoluteFilename.reset(g_build_filename(environmentPath, filename.get(), NULL));
else
absoluteFilename.set(g_build_filename(sharedResourcesPath().data(), "resources", "audio", filename.get(), NULL));
absoluteFilename.reset(g_build_filename(sharedResourcesPath().data(), "resources", "audio", filename.get(), NULL));
return createBusFromAudioFile(absoluteFilename.get(), false, sampleRate);
}
......
......@@ -28,8 +28,6 @@
#if ENABLE(GEOLOCATION)
#include <wtf/gobject/GOwnPtr.h>
using namespace WebCore;
static void getPositionCallback(GeocluePosition* position, GeocluePositionFields fields, int timestamp, double latitude, double longitude, double altitude, GeoclueAccuracy* accuracy, GError* error, GeolocationProviderGeoclue* provider)
......
......@@ -26,8 +26,6 @@
#include <cairo.h>
#include <gst/gst.h>
#include <wtf/gobject/GOwnPtr.h>
#include <gst/video/gstvideometa.h>
......
......@@ -38,6 +38,7 @@
#include <gst/pbutils/missing-plugins.h>
#include <limits>
#include <wtf/gobject/GOwnPtr.h>
#include <wtf/gobject/GUniquePtr.h>
#include <wtf/text/CString.h>
#if ENABLE(VIDEO_TRACK)
......@@ -190,7 +191,7 @@ void MediaPlayerPrivateGStreamer::setAudioStreamProperties(GObject* object)
GstStructure* structure = gst_structure_new("stream-properties", "media.role", G_TYPE_STRING, role, NULL);
g_object_set(object, "stream-properties", structure, NULL);
gst_structure_free(structure);
GOwnPtr<gchar> elementName(gst_element_get_name(GST_ELEMENT(object)));
GUniquePtr<gchar> elementName(gst_element_get_name(GST_ELEMENT(object)));
LOG_MEDIA_MESSAGE("Set media.role as %s at %s", role, elementName.get());
}
......@@ -1037,7 +1038,7 @@ gboolean MediaPlayerPrivateGStreamer::handleMessage(GstMessage* message)
gst_message_parse_request_state(message, &requestedState);
gst_element_get_state(m_playBin.get(), &currentState, NULL, 250);
if (requestedState < currentState) {
GOwnPtr<gchar> elementName(gst_element_get_name(GST_ELEMENT(message)));
GUniquePtr<gchar> elementName(gst_element_get_name(GST_ELEMENT(message)));
INFO_MEDIA_MESSAGE("Element %s requested state change to %s", elementName.get(),
gst_element_state_get_name(requestedState));
m_requestedState = requestedState;
......
......@@ -30,7 +30,7 @@
#include <gst/app/gstappsrc.h>
#include <gst/gst.h>
#include <gst/pbutils/missing-plugins.h>
#include <wtf/gobject/GOwnPtr.h>
#include <wtf/gobject/GUniquePtr.h>
#include <wtf/text/CString.h>
typedef struct _Source {
......@@ -141,7 +141,6 @@ static void webKitMediaSrcAddSrc(WebKitMediaSrc* src, GstElement* element)
{
GstPad* ghostPad;
WebKitMediaSrcPrivate* priv = src->priv;
GOwnPtr<gchar> name;
if (!gst_bin_add(GST_BIN(src), element)) {
GST_DEBUG_OBJECT(src, "Src element not added");
......@@ -154,7 +153,7 @@ static void webKitMediaSrcAddSrc(WebKitMediaSrc* src, GstElement* element)
}
gst_element_sync_state_with_parent(element);
name.set(g_strdup_printf("src_%u", priv->nbSource));
GUniquePtr<gchar> name(g_strdup_printf("src_%u", priv->nbSource));
ghostPad = WebCore::webkitGstGhostPadFromStaticTemplate(&srcTemplate, name.get(), targetsrc.get());
gst_pad_set_active(ghostPad, TRUE);
......
......@@ -41,8 +41,8 @@
#include <gst/pbutils/missing-plugins.h>
#include <wtf/Noncopyable.h>
#include <wtf/gobject/GMutexLocker.h>
#include <wtf/gobject/GOwnPtr.h>
#include <wtf/gobject/GRefPtr.h>
#include <wtf/gobject/GUniquePtr.h>
#include <wtf/text/CString.h>
using namespace WebCore;
......@@ -502,9 +502,7 @@ static gboolean webKitWebSrcStart(WebKitWebSrc* src)
request.setHTTPUserAgent("Quicktime/7.6.6");
if (priv->requestedOffset) {
GOwnPtr<gchar> val;
val.set(g_strdup_printf("bytes=%" G_GUINT64_FORMAT "-", priv->requestedOffset));
GUniquePtr<gchar> val(g_strdup_printf("bytes=%" G_GUINT64_FORMAT "-", priv->requestedOffset));
request.setHTTPHeaderField("Range", val.get());
}
priv->offset = priv->requestedOffset;
......@@ -1150,12 +1148,12 @@ void ResourceHandleStreamingClient::didFail(ResourceHandle*, const ResourceError
void ResourceHandleStreamingClient::wasBlocked(ResourceHandle*)
{
WebKitWebSrc* src = WEBKIT_WEB_SRC(m_src.get());
GOwnPtr<gchar> uri;
GUniquePtr<gchar> uri;
GST_ERROR_OBJECT(src, "Request was blocked");
GMutexLocker locker(GST_OBJECT_GET_LOCK(src));
uri.set(g_strdup(src->priv->uri));
uri.reset(g_strdup(src->priv->uri));
locker.unlock();
GST_ELEMENT_ERROR(src, RESOURCE, OPEN_READ, ("Access to \"%s\" was blocked", uri.get()), (0));
......@@ -1164,12 +1162,12 @@ void ResourceHandleStreamingClient::wasBlocked(ResourceHandle*)
void ResourceHandleStreamingClient::cannotShowURL(ResourceHandle*)
{
WebKitWebSrc* src = WEBKIT_WEB_SRC(m_src.get());
GOwnPtr<gchar> uri;
GUniquePtr<gchar> uri;
GST_ERROR_OBJECT(src, "Cannot show URL");
GMutexLocker locker(GST_OBJECT_GET_LOCK(src));
uri.set(g_strdup(src->priv->uri));
uri.reset(g_strdup(src->priv->uri));
locker.unlock();
GST_ELEMENT_ERROR(src, RESOURCE, OPEN_READ, ("Can't show \"%s\"", uri.get()), (0));
......
......@@ -21,11 +21,11 @@
#include "CairoUtilities.h"
#include "GdkCairoUtilities.h"
#include <wtf/gobject/GOwnPtr.h>
#include "GRefPtrGtk.h"
#include "MIMETypeRegistry.h"
#include <cairo.h>
#include <gtk/gtk.h>
#include <wtf/gobject/GOwnPtr.h>
#include <wtf/text/Base64.h>
#include <wtf/text/CString.h>
#include <wtf/text/WTFString.h>
......@@ -65,12 +65,12 @@ static bool encodeImage(cairo_surface_t* surface, const String& mimeType, const
if (!pixbuf)
return false;
GError* error = 0;
GOwnPtr<GError> error;
if (type == "jpeg" && quality && *quality >= 0.0 && *quality <= 1.0) {
String qualityString = String::format("%d", static_cast<int>(*quality * 100.0 + 0.5));
gdk_pixbuf_save_to_buffer(pixbuf.get(), &buffer.outPtr(), &bufferSize, type.utf8().data(), &error, "quality", qualityString.utf8().data(), NULL);
gdk_pixbuf_save_to_buffer(pixbuf.get(), &buffer.outPtr(), &bufferSize, type.utf8().data(), &error.outPtr(), "quality", qualityString.utf8().data(), NULL);
} else
gdk_pixbuf_save_to_buffer(pixbuf.get(), &buffer.outPtr(), &bufferSize, type.utf8().data(), &error, NULL);
gdk_pixbuf_save_to_buffer(pixbuf.get(), &buffer.outPtr(), &bufferSize, type.utf8().data(), &error.outPtr(), NULL);
return !error;
}
......@@ -79,7 +79,7 @@ String ImageBuffer::toDataURL(const String& mimeType, const double* quality, Coo
{
ASSERT(MIMETypeRegistry::isSupportedImageMIMETypeForEncoding(mimeType));
GOwnPtr<gchar> buffer(0);
GOwnPtr<gchar> buffer;
gsize bufferSize;
if (!encodeImage(m_data.m_surface.get(), mimeType, quality, buffer, bufferSize))
return "data:,";
......
......@@ -27,9 +27,11 @@
#include "BitmapImage.h"
#include "FileSystem.h"
#include "GUniquePtrGtk.h"
#include "GdkCairoUtilities.h"
#include "GOwnPtrGtk.h"
#include "SharedBuffer.h"
#include <wtf/gobject/GOwnPtr.h>
#include <wtf/gobject/GUniquePtr.h>
#include <wtf/text/CString.h>
#include <cairo.h>
#include <gtk/gtk.h>
......@@ -54,7 +56,7 @@ static CString getThemeIconFileName(const char* name, int size)
GTK_STOCK_MISSING_IMAGE, size,
GTK_ICON_LOOKUP_NO_SVG);
if (iconInfo) {
GOwnPtr<GtkIconInfo> info(iconInfo);
GUniquePtr<GtkIconInfo> info(iconInfo);
return CString(gtk_icon_info_get_filename(info.get()));
}
......@@ -93,8 +95,8 @@ PassRefPtr<Image> Image::loadPlatformResource(const char* name)
if (!strcmp("missingImage", name))
fileName = getThemeIconFileName(GTK_STOCK_MISSING_IMAGE, 16);
if (fileName.isNull()) {
GOwnPtr<gchar> imageName(g_strdup_printf("%s.png", name));
GOwnPtr<gchar> glibFileName(getPathToImageResource(imageName.get()));
GUniquePtr<gchar> imageName(g_strdup_printf("%s.png", name));
GUniquePtr<gchar> glibFileName(getPathToImageResource(imageName.get()));
fileName = glibFileName.get();
}
......
......@@ -24,8 +24,8 @@
#include "ContextMenu.h"
#include <gtk/gtk.h>
#include <wtf/gobject/GOwnPtr.h>
#include <wtf/gobject/GRefPtr.h>
#include <wtf/gobject/GUniquePtr.h>
namespace WebCore {
......@@ -87,7 +87,7 @@ unsigned ContextMenu::itemCount() const
{
ASSERT(m_platformDescription);
GOwnPtr<GList> children(gtk_container_get_children(GTK_CONTAINER(m_platformDescription)));
GUniquePtr<GList> children(gtk_container_get_children(GTK_CONTAINER(m_platformDescription)));
return g_list_length(children.get());
}
......@@ -95,7 +95,7 @@ Vector<ContextMenuItem> contextMenuItemVector(const PlatformMenuDescription menu
{
Vector<ContextMenuItem> menuItemVector;
GOwnPtr<GList> children(gtk_container_get_children(GTK_CONTAINER(menu)));
GUniquePtr<GList> children(gtk_container_get_children(GTK_CONTAINER(menu)));
int itemCount = g_list_length(children.get());
menuItemVector.reserveCapacity(itemCount);
......
......@@ -25,9 +25,9 @@
#include "ContextMenuItem.h"
#include "ContextMenu.h"
#include <wtf/gobject/GOwnPtr.h>
#include <wtf/gobject/GRefPtr.h>
#include <gtk/gtk.h>
#include <wtf/gobject/GRefPtr.h>
#include <wtf/gobject/GUniquePtr.h>
#include <wtf/text/CString.h>
#define WEBKIT_CONTEXT_MENU_ACTION "webkit-context-menu"
......@@ -124,7 +124,7 @@ static PlatformMenuItemDescription createPlatformMenuItemDescription(ContextMenu
if (type == SeparatorType)
return GTK_MENU_ITEM(gtk_separator_menu_item_new());
GOwnPtr<char> actionName(g_strdup_printf("context-menu-action-%d", action));
GUniquePtr<char> actionName(g_strdup_printf("context-menu-action-%d", action));
GRefPtr<GtkAction> platformAction;
if (type == CheckableActionType) {
......
......@@ -22,6 +22,7 @@
#include "markup.h"
#include <gtk/gtk.h>
#include <wtf/gobject/GOwnPtr.h>
#include <wtf/gobject/GUniquePtr.h>
#include <wtf/text/StringBuilder.h>
namespace WebCore {
......@@ -102,7 +103,7 @@ void DataObjectGtk::setURIList(const String& uriListString)
}
GOwnPtr<GError> error;
GOwnPtr<gchar> filename(g_filename_from_uri(line.utf8().data(), 0, &error.outPtr()));
GUniquePtr<gchar> filename(g_filename_from_uri(line.utf8().data(), 0, &error.outPtr()));
if (!error && filename)
m_filenames.append(String::fromUTF8(filename.get()));
}
......@@ -123,7 +124,7 @@ void DataObjectGtk::setURL(const URL& url, const String& label)