Windows build fixes
[WebKit-https.git] / WebKitTools / DumpRenderTree / win / LayoutTestControllerWin.cpp
index 373091b..39b55f7 100644 (file)
@@ -55,20 +55,20 @@ static bool resolveCygwinPath(const wstring& cygwinPath, wstring& windowsPath);
 LayoutTestController::~LayoutTestController()
 {
     COMPtr<IWebView> webView;
-    if (FAILED(frame->webView(&webView)))
+    if (FAILED(frame->webView(webView.adoptionPointer())))
         return;
 
     // reset webview-related states back to default values in preparation for next test
 
     COMPtr<IWebViewPrivate> viewPrivate;
-    if (SUCCEEDED(webView->QueryInterface(&viewPrivate)))
+    if (SUCCEEDED(webView->QueryInterface(viewPrivate.adoptionPointer())))
         viewPrivate->setTabKeyCyclesThroughElements(TRUE);
 
     COMPtr<IWebViewEditing> viewEditing;
-    if (FAILED(webView->QueryInterface(&viewEditing)))
+    if (FAILED(webView->QueryInterface(viewEditing.adoptionPointer())))
         return;
     COMPtr<IWebEditingDelegate> delegate;
-    if (FAILED(viewEditing->editingDelegate(&delegate)))
+    if (FAILED(viewEditing->editingDelegate(delegate.adoptionPointer())))
         return;
     COMPtr<EditingDelegate> editingDelegate(Query, viewEditing.get());
     if (editingDelegate)
@@ -83,15 +83,15 @@ void LayoutTestController::addDisallowedURL(JSStringRef url)
 void LayoutTestController::clearBackForwardList()
 {
     COMPtr<IWebView> webView;
-    if (FAILED(frame->webView(&webView)))
+    if (FAILED(frame->webView(webView.adoptionPointer())))
         return;
 
     COMPtr<IWebBackForwardList> backForwardList;
-    if (FAILED(webView->backForwardList(&backForwardList)))
+    if (FAILED(webView->backForwardList(backForwardList.adoptionPointer())))
         return;
 
     COMPtr<IWebHistoryItem> item;
-    if (FAILED(backForwardList->currentItem(&item)))
+    if (FAILED(backForwardList->currentItem(item.adoptionPointer())))
         return;
 
     // We clear the history by setting the back/forward list's capacity to 0
@@ -182,11 +182,11 @@ static wstring jsStringRefToWString(JSStringRef jsStr)
 void LayoutTestController::queueLoad(JSStringRef url, JSStringRef target)
 {
     COMPtr<IWebDataSource> dataSource;
-    if (FAILED(frame->dataSource(&dataSource)))
+    if (FAILED(frame->dataSource(dataSource.adoptionPointer())))
         return;
 
     COMPtr<IWebURLResponse> response;
-    if (FAILED(dataSource->response(&response)) || !response)
+    if (FAILED(dataSource->response(response.adoptionPointer())) || !response)
         return;
 
     BSTR responseURLBSTR;
@@ -220,15 +220,15 @@ void LayoutTestController::queueScript(JSStringRef script)
 void LayoutTestController::setAcceptsEditing(bool acceptsEditing)
 {
     COMPtr<IWebView> webView;
-    if (FAILED(frame->webView(&webView)))
+    if (FAILED(frame->webView(webView.adoptionPointer())))
         return;
 
     COMPtr<IWebViewEditing> viewEditing;
-    if (FAILED(webView->QueryInterface(&viewEditing)))
+    if (FAILED(webView->QueryInterface(viewEditing.adoptionPointer())))
         return;
 
     COMPtr<IWebEditingDelegate> delegate;
-    if (FAILED(viewEditing->editingDelegate(&delegate)))
+    if (FAILED(viewEditing->editingDelegate(delegate.adoptionPointer())))
         return;
 
     EditingDelegate* editingDelegate = (EditingDelegate*)(IWebEditingDelegate*)delegate.get();
@@ -238,11 +238,11 @@ void LayoutTestController::setAcceptsEditing(bool acceptsEditing)
 void LayoutTestController::setAuthorAndUserStylesEnabled(bool flag)
 {
     COMPtr<IWebView> webView;
-    if (FAILED(frame->webView(&webView)))
+    if (FAILED(frame->webView(webView.adoptionPointer())))
         return;
 
     COMPtr<IWebPreferences> preferences;
-    if (FAILED(webView->preferences(&preferences)))
+    if (FAILED(webView->preferences(preferences.adoptionPointer())))
         return;
 
     COMPtr<IWebPreferencesPrivate> prefsPrivate(Query, preferences);
@@ -255,7 +255,7 @@ void LayoutTestController::setAuthorAndUserStylesEnabled(bool flag)
 void LayoutTestController::setCustomPolicyDelegate(bool setDelegate)
 {
     COMPtr<IWebView> webView;
-    if (FAILED(frame->webView(&webView)))
+    if (FAILED(frame->webView(webView.adoptionPointer())))
         return;
 
     if (setDelegate)
@@ -272,11 +272,11 @@ void LayoutTestController::setMainFrameIsFirstResponder(bool flag)
 void LayoutTestController::setPrivateBrowsingEnabled(bool privateBrowsingEnabled)
 {
     COMPtr<IWebView> webView;
-    if (FAILED(frame->webView(&webView)))
+    if (FAILED(frame->webView(webView.adoptionPointer())))
         return;
 
     COMPtr<IWebPreferences> preferences;
-    if (FAILED(webView->preferences(&preferences)))
+    if (FAILED(webView->preferences(preferences.adoptionPointer())))
         return;
 
     preferences->setPrivateBrowsingEnabled(privateBrowsingEnabled);
@@ -285,11 +285,11 @@ void LayoutTestController::setPrivateBrowsingEnabled(bool privateBrowsingEnabled
 void LayoutTestController::setPopupBlockingEnabled(bool privateBrowsingEnabled)
 {
     COMPtr<IWebView> webView;
-    if (FAILED(frame->webView(&webView)))
+    if (FAILED(frame->webView(webView.adoptionPointer())))
         return;
 
     COMPtr<IWebPreferences> preferences;
-    if (FAILED(webView->preferences(&preferences)))
+    if (FAILED(webView->preferences(preferences.adoptionPointer())))
         return;
 
     preferences->setJavaScriptCanOpenWindowsAutomatically(!privateBrowsingEnabled);
@@ -298,11 +298,11 @@ void LayoutTestController::setPopupBlockingEnabled(bool privateBrowsingEnabled)
 void LayoutTestController::setTabKeyCyclesThroughElements(bool shouldCycle)
 {
     COMPtr<IWebView> webView;
-    if (FAILED(frame->webView(&webView)))
+    if (FAILED(frame->webView(webView.adoptionPointer())))
         return;
 
     COMPtr<IWebViewPrivate> viewPrivate;
-    if (FAILED(webView->QueryInterface(&viewPrivate)))
+    if (FAILED(webView->QueryInterface(viewPrivate.adoptionPointer())))
         return;
 
     viewPrivate->setTabKeyCyclesThroughElements(shouldCycle ? TRUE : FALSE);
@@ -316,11 +316,11 @@ void LayoutTestController::setUseDashboardCompatibilityMode(bool flag)
 void LayoutTestController::setUserStyleSheetEnabled(bool flag)
 {
     COMPtr<IWebView> webView;
-    if (FAILED(frame->webView(&webView)))
+    if (FAILED(frame->webView(webView.adoptionPointer())))
         return;
 
     COMPtr<IWebPreferences> preferences;
-    if (FAILED(webView->preferences(&preferences)))
+    if (FAILED(webView->preferences(preferences.adoptionPointer())))
         return;
 
    preferences->setUserStyleSheetEnabled(flag);
@@ -437,11 +437,11 @@ static wstring cfStringRefToWString(CFStringRef cfStr)
 void LayoutTestController::setUserStyleSheetLocation(JSStringRef jsURL)
 {
     COMPtr<IWebView> webView;
-    if (FAILED(frame->webView(&webView)))
+    if (FAILED(frame->webView(webView.adoptionPointer())))
         return;
 
     COMPtr<IWebPreferences> preferences;
-    if (FAILED(webView->preferences(&preferences)))
+    if (FAILED(webView->preferences(preferences.adoptionPointer())))
         return;
 
     RetainPtr<CFStringRef> urlString(AdoptCF, JSStringCopyCFString(0, jsURL));
@@ -492,11 +492,11 @@ void LayoutTestController::clearPersistentUserStyleSheet()
 void LayoutTestController::setWindowIsKey(bool flag)
 {
     COMPtr<IWebView> webView;
-    if (FAILED(frame->webView(&webView)))
+    if (FAILED(frame->webView(webView.adoptionPointer())))
         return;
 
     COMPtr<IWebViewPrivate> viewPrivate;
-    if (FAILED(webView->QueryInterface(&viewPrivate)))
+    if (FAILED(webView->QueryInterface(viewPrivate.adoptionPointer())))
         return;
 
     HWND webViewWindow;
@@ -537,11 +537,11 @@ void LayoutTestController::execCommand(JSStringRef name, JSStringRef value)
     wstring wValue = jsStringRefToWString(value);
 
     COMPtr<IWebView> webView;
-    if (FAILED(frame->webView(&webView)))
+    if (FAILED(frame->webView(webView.adoptionPointer())))
         return;
 
     COMPtr<IWebViewPrivate> viewPrivate;
-    if (FAILED(webView->QueryInterface(&viewPrivate)))
+    if (FAILED(webView->QueryInterface(viewPrivate.adoptionPointer())))
         return;
 
     BSTR nameBSTR = SysAllocStringLen((OLECHAR*)wName.c_str(), wName.length());