diff options
Diffstat (limited to 'WebKitTools/MiniBrowser')
-rw-r--r-- | WebKitTools/MiniBrowser/mac/AppDelegate.m | 18 | ||||
-rw-r--r-- | WebKitTools/MiniBrowser/mac/BrowserStatisticsWindowController.m | 8 | ||||
-rw-r--r-- | WebKitTools/MiniBrowser/mac/BrowserWindowController.m | 22 | ||||
-rw-r--r-- | WebKitTools/MiniBrowser/mac/WebBundle/WebBundleMain.m | 6 | ||||
-rw-r--r-- | WebKitTools/MiniBrowser/qt/BrowserWindow.cpp | 4 | ||||
-rw-r--r-- | WebKitTools/MiniBrowser/qt/MiniBrowser.pro | 6 | ||||
-rw-r--r-- | WebKitTools/MiniBrowser/win/BrowserView.cpp | 2 |
7 files changed, 35 insertions, 31 deletions
diff --git a/WebKitTools/MiniBrowser/mac/AppDelegate.m b/WebKitTools/MiniBrowser/mac/AppDelegate.m index ffb6363..3bd3d57 100644 --- a/WebKitTools/MiniBrowser/mac/AppDelegate.m +++ b/WebKitTools/MiniBrowser/mac/AppDelegate.m @@ -56,8 +56,8 @@ void didRecieveMessageFromInjectedBundle(WKContextRef context, WKStringRef messa WKContextPostMessageToInjectedBundle(context, newMessageName, newMessageBody); - WKStringRelease(newMessageName); - WKStringRelease(newMessageBody); + WKRelease(newMessageName); + WKRelease(newMessageBody); } #pragma mark History Client Callbacks @@ -66,11 +66,11 @@ static void didNavigateWithNavigationData(WKContextRef context, WKPageRef page, { WKStringRef wkTitle = WKNavigationDataCopyTitle(navigationData); CFStringRef title = WKStringCopyCFString(0, wkTitle); - WKStringRelease(wkTitle); + WKRelease(wkTitle); WKURLRef wkURL = WKNavigationDataCopyURL(navigationData); CFURLRef url = WKURLCopyCFURL(0, wkURL); - WKURLRelease(wkURL); + WKRelease(wkURL); LOG(@"HistoryClient - didNavigateWithNavigationData - title: %@ - url: %@", title, url); CFRelease(title); @@ -131,7 +131,7 @@ static void populateVisitedLinks(WKContextRef context, const void *clientInfo) WKContextSetHistoryClient(threadContext, &historyClient); threadPageNamespace = WKPageNamespaceCreate(threadContext); - WKContextRelease(threadContext); + WKRelease(threadContext); CFStringRef bundlePathCF = (CFStringRef)[[NSBundle mainBundle] pathForAuxiliaryExecutable:@"WebBundle.bundle"]; WKStringRef bundlePath = WKStringCreateWithCFString(bundlePathCF); @@ -147,9 +147,9 @@ static void populateVisitedLinks(WKContextRef context, const void *clientInfo) WKContextSetHistoryClient(processContext, &historyClient); processPageNamespace = WKPageNamespaceCreate(processContext); - WKContextRelease(processContext); + WKRelease(processContext); - WKStringRelease(bundlePath); + WKRelease(bundlePath); } return self; @@ -221,10 +221,10 @@ static void populateVisitedLinks(WKContextRef context, const void *clientInfo) } } - WKPageNamespaceRelease(threadPageNamespace); + WKRelease(threadPageNamespace); threadPageNamespace = 0; - WKPageNamespaceRelease(processPageNamespace); + WKRelease(processPageNamespace); processPageNamespace = 0; } diff --git a/WebKitTools/MiniBrowser/mac/BrowserStatisticsWindowController.m b/WebKitTools/MiniBrowser/mac/BrowserStatisticsWindowController.m index 872fb55..28ddb7a 100644 --- a/WebKitTools/MiniBrowser/mac/BrowserStatisticsWindowController.m +++ b/WebKitTools/MiniBrowser/mac/BrowserStatisticsWindowController.m @@ -15,8 +15,8 @@ - (id)initWithThreadedWKContextRef:(WKContextRef)threadContext processWKContextRef:(WKContextRef)processContext { if ((self = [super initWithWindowNibName:@"BrowserStatisticsWindow"])) { - _threadContext = WKContextRetain(threadContext); - _processContext = WKContextRetain(processContext); + _threadContext = WKRetain(threadContext); + _processContext = WKRetain(processContext); } return self; @@ -24,10 +24,10 @@ - (void)dealloc { - WKContextRelease(_threadContext); + WKRelease(_threadContext); _threadContext = 0; - WKContextRelease(_processContext); + WKRelease(_processContext); _processContext = 0; [super dealloc]; diff --git a/WebKitTools/MiniBrowser/mac/BrowserWindowController.m b/WebKitTools/MiniBrowser/mac/BrowserWindowController.m index 9842448..6422cca 100644 --- a/WebKitTools/MiniBrowser/mac/BrowserWindowController.m +++ b/WebKitTools/MiniBrowser/mac/BrowserWindowController.m @@ -45,7 +45,7 @@ - (id)initWithPageNamespace:(WKPageNamespaceRef)pageNamespace { if ((self = [super initWithWindowNibName:@"BrowserWindow"])) - _pageNamespace = WKPageNamespaceRetain(pageNamespace); + _pageNamespace = WKRetain(pageNamespace); return self; } @@ -63,7 +63,7 @@ CFRelease(cfURL); WKPageLoadURL(_webView.pageRef, url); - WKURLRelease(url); + WKRelease(url); } - (IBAction)showHideWebView:(id)sender @@ -140,14 +140,14 @@ - (void)windowWillClose:(NSNotification *)notification { - WKPageNamespaceRelease(_pageNamespace); + WKRelease(_pageNamespace); _pageNamespace = 0; } - (void)applicationTerminating { WKPageClose(_webView.pageRef); - WKPageRelease(_webView.pageRef); + WKRelease(_webView.pageRef); } #pragma mark Loader Client Callbacks @@ -236,13 +236,13 @@ static void didChangeBackForwardList(WKPageRef page, const void *clientInfo) #pragma mark Policy Client Callbacks -static void decidePolicyForNavigationAction(WKPageRef page, WKFrameNavigationType navigationType, WKURLRef url, WKFrameRef frame, WKFramePolicyListenerRef listener, const void *clientInfo) +static void decidePolicyForNavigationAction(WKPageRef page, WKFrameNavigationType navigationType, WKEventModifiers modifiers, WKURLRef url, WKFrameRef frame, WKFramePolicyListenerRef listener, const void *clientInfo) { LOG(@"decidePolicyForNavigationAction"); WKFramePolicyListenerUse(listener); } -static void decidePolicyForNewWindowAction(WKPageRef page, WKFrameNavigationType navigationType, WKURLRef url, WKFrameRef frame, WKFramePolicyListenerRef listener, const void *clientInfo) +static void decidePolicyForNewWindowAction(WKPageRef page, WKFrameNavigationType navigationType, WKEventModifiers modifiers, WKURLRef url, WKFrameRef frame, WKFramePolicyListenerRef listener, const void *clientInfo) { LOG(@"decidePolicyForNewWindowAction"); WKFramePolicyListenerUse(listener); @@ -275,7 +275,7 @@ static void closePage(WKPageRef page, const void *clientInfo) LOG(@"closePage"); WKPageClose(page); [[(BrowserWindowController *)clientInfo window] close]; - WKPageRelease(page); + WKRelease(page); } static void runJavaScriptAlert(WKPageRef page, WKStringRef message, WKFrameRef frame, const void* clientInfo) @@ -284,7 +284,7 @@ static void runJavaScriptAlert(WKPageRef page, WKStringRef message, WKFrameRef f WKURLRef wkURL = WKFrameCopyURL(frame); CFURLRef cfURL = WKURLCopyCFURL(0, wkURL); - WKURLRelease(wkURL); + WKRelease(wkURL); [alert setMessageText:[NSString stringWithFormat:@"JavaScript alert dialog from %@.", [(NSURL *)cfURL absoluteString]]]; CFRelease(cfURL); @@ -305,7 +305,7 @@ static bool runJavaScriptConfirm(WKPageRef page, WKStringRef message, WKFrameRef WKURLRef wkURL = WKFrameCopyURL(frame); CFURLRef cfURL = WKURLCopyCFURL(0, wkURL); - WKURLRelease(wkURL); + WKRelease(wkURL); [alert setMessageText:[NSString stringWithFormat:@"JavaScript confirm dialog from %@.", [(NSURL *)cfURL absoluteString]]]; CFRelease(cfURL); @@ -329,7 +329,7 @@ static WKStringRef runJavaScriptPrompt(WKPageRef page, WKStringRef message, WKSt WKURLRef wkURL = WKFrameCopyURL(frame); CFURLRef cfURL = WKURLCopyCFURL(0, wkURL); - WKURLRelease(wkURL); + WKRelease(wkURL); [alert setMessageText:[NSString stringWithFormat:@"JavaScript prompt dialog from %@.", [(NSURL *)cfURL absoluteString]]]; CFRelease(cfURL); @@ -441,7 +441,7 @@ static WKStringRef runJavaScriptPrompt(WKPageRef page, WKStringRef message, WKSt return; CFURLRef cfSourceURL = WKURLCopyCFURL(0, url); - WKURLRelease(url); + WKRelease(url); [urlText setStringValue:(NSString*)CFURLGetString(cfSourceURL)]; CFRelease(cfSourceURL); diff --git a/WebKitTools/MiniBrowser/mac/WebBundle/WebBundleMain.m b/WebKitTools/MiniBrowser/mac/WebBundle/WebBundleMain.m index 8e0a576..17958c7 100644 --- a/WebKitTools/MiniBrowser/mac/WebBundle/WebBundleMain.m +++ b/WebKitTools/MiniBrowser/mac/WebBundle/WebBundleMain.m @@ -41,7 +41,7 @@ void didClearWindowObjectForFrame(WKBundlePageRef page, WKBundleFrameRef frame, { WKURLRef wkURL = WKBundleFrameCopyURL(WKBundlePageGetMainFrame(page)); CFURLRef cfURL = WKURLCopyCFURL(0, wkURL); - WKURLRelease(wkURL); + WKRelease(wkURL); LOG(@"WKBundlePageClient - didClearWindowForFrame %@", [(NSURL *)cfURL absoluteString]); CFRelease(cfURL); @@ -49,8 +49,8 @@ void didClearWindowObjectForFrame(WKBundlePageRef page, WKBundleFrameRef frame, WKStringRef messageName = WKStringCreateWithCFString(CFSTR("Callback")); WKStringRef messageBody = WKStringCreateWithCFString(CFSTR("Window was cleared")); WKBundlePostMessage(globalBundle, messageName, messageBody); - WKStringRelease(messageName); - WKStringRelease(messageBody); + WKRelease(messageName); + WKRelease(messageBody); } diff --git a/WebKitTools/MiniBrowser/qt/BrowserWindow.cpp b/WebKitTools/MiniBrowser/qt/BrowserWindow.cpp index 09ac737..9efe64f 100644 --- a/WebKitTools/MiniBrowser/qt/BrowserWindow.cpp +++ b/WebKitTools/MiniBrowser/qt/BrowserWindow.cpp @@ -27,8 +27,8 @@ */ #include "BrowserWindow.h" -#include <WebKit2/WKPageNamespace.h> -#include <WebKit2/qwkpage.h> +#include "WKPageNamespace.h" +#include "qwkpage.h" static QWKPage* createNewPage(QWKPage* page) { diff --git a/WebKitTools/MiniBrowser/qt/MiniBrowser.pro b/WebKitTools/MiniBrowser/qt/MiniBrowser.pro index 9a57d1b..b34b8f7 100644 --- a/WebKitTools/MiniBrowser/qt/MiniBrowser.pro +++ b/WebKitTools/MiniBrowser/qt/MiniBrowser.pro @@ -13,7 +13,11 @@ CONFIG += uitools isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../.. include(../../../WebKit.pri) -INCLUDEPATH += $$OUTPUT_DIR/include +INCLUDEPATH += \ + $$PWD/../../../WebKit2/UIProcess/API/C \ + $$PWD/../../../WebKit2/UIProcess/API/qt \ + $$OUTPUT_DIR/include + DESTDIR = $$OUTPUT_DIR/bin !CONFIG(standalone_package): CONFIG -= app_bundle diff --git a/WebKitTools/MiniBrowser/win/BrowserView.cpp b/WebKitTools/MiniBrowser/win/BrowserView.cpp index ee67a08..d3d5e72 100644 --- a/WebKitTools/MiniBrowser/win/BrowserView.cpp +++ b/WebKitTools/MiniBrowser/win/BrowserView.cpp @@ -106,5 +106,5 @@ void BrowserView::goToURL(const std::wstring& urlString) WKPageRef page = WKViewGetPage(m_webView); WKPageLoadURL(page, url); - WKURLRelease(url); + WKRelease(url); } |