diff options
Diffstat (limited to 'WebKitTools/DumpRenderTree/win')
11 files changed, 658 insertions, 27 deletions
diff --git a/WebKitTools/DumpRenderTree/win/DumpRenderTree.cpp b/WebKitTools/DumpRenderTree/win/DumpRenderTree.cpp index 7e013a7..d486d06 100644 --- a/WebKitTools/DumpRenderTree/win/DumpRenderTree.cpp +++ b/WebKitTools/DumpRenderTree/win/DumpRenderTree.cpp @@ -31,6 +31,7 @@ #include "EditingDelegate.h" #include "FrameLoadDelegate.h" +#include "HistoryDelegate.h" #include "LayoutTestController.h" #include "PixelDumpSupport.h" #include "PolicyDelegate.h" @@ -97,6 +98,7 @@ COMPtr<FrameLoadDelegate> sharedFrameLoadDelegate; COMPtr<UIDelegate> sharedUIDelegate; COMPtr<EditingDelegate> sharedEditingDelegate; COMPtr<ResourceLoadDelegate> sharedResourceLoadDelegate; +COMPtr<HistoryDelegate> sharedHistoryDelegate; IWebFrame* frame; HWND webViewWindow; @@ -199,7 +201,7 @@ static const wstring& fontsPath() return path; } -#ifdef DEBUG_WEBKIT_HAS_SUFFIX +#ifdef DEBUG_ALL #define WEBKITDLL TEXT("WebKit_debug.dll") #else #define WEBKITDLL TEXT("WebKit.dll") @@ -681,6 +683,11 @@ static bool shouldLogFrameLoadDelegates(const char* pathOrURL) return strstr(pathOrURL, "/loading/") || strstr(pathOrURL, "\\loading\\"); } +static bool shouldLogHistoryDelegates(const char* pathOrURL) +{ + return strstr(pathOrURL, "/globalhistory/") || strstr(pathOrURL, "\\globalhistory\\"); +} + static void resetDefaultsToConsistentValues(IWebPreferences* preferences) { #ifdef USE_MAC_FONTS @@ -737,7 +744,6 @@ static void resetDefaultsToConsistentValues(IWebPreferences* preferences) prefsPrivate->setAuthorAndUserStylesEnabled(TRUE); prefsPrivate->setDeveloperExtrasEnabled(FALSE); prefsPrivate->setExperimentalNotificationsEnabled(TRUE); - prefsPrivate->setExperimentalWebSocketsEnabled(FALSE); prefsPrivate->setShouldPaintNativeControls(FALSE); // FIXME - need to make DRT pass with Windows native controls <http://bugs.webkit.org/show_bug.cgi?id=25592> prefsPrivate->setXSSAuditorEnabled(FALSE); prefsPrivate->setOfflineWebApplicationCacheEnabled(TRUE); @@ -836,6 +842,17 @@ static void runTest(const string& testPathOrURL) if (shouldLogFrameLoadDelegates(pathOrURL.c_str())) gLayoutTestController->setDumpFrameLoadCallbacks(true); + COMPtr<IWebView> webView; + if (SUCCEEDED(frame->webView(&webView))) { + COMPtr<IWebViewPrivate> viewPrivate; + if (SUCCEEDED(webView->QueryInterface(&viewPrivate))) { + if (shouldLogHistoryDelegates(pathOrURL.c_str())) { + gLayoutTestController->setDumpHistoryDelegateCallbacks(true); + viewPrivate->setHistoryDelegate(sharedHistoryDelegate.get()); + } else + viewPrivate->setHistoryDelegate(0); + } + } COMPtr<IWebHistory> history; if (SUCCEEDED(WebKitCreateInstance(CLSID_WebHistory, 0, __uuidof(history), reinterpret_cast<void**>(&history)))) history->setOptionalSharedHistory(0); @@ -843,8 +860,7 @@ static void runTest(const string& testPathOrURL) resetWebViewToConsistentStateBeforeTesting(); prevTestBFItem = 0; - COMPtr<IWebView> webView; - if (SUCCEEDED(frame->webView(&webView))) { + if (webView) { COMPtr<IWebBackForwardList> bfList; if (SUCCEEDED(webView->backForwardList(&bfList))) bfList->currentItem(&prevTestBFItem); @@ -1095,9 +1111,11 @@ IWebView* createWebViewAndOffscreenWindow(HWND* webViewWindow) #if USE(CFNETWORK) RetainPtr<CFURLCacheRef> sharedCFURLCache() { +#ifndef DEBUG_ALL + HMODULE module = GetModuleHandle(TEXT("CFNetwork.dll")); +#else HMODULE module = GetModuleHandle(TEXT("CFNetwork_debug.dll")); - if (!module) - module = GetModuleHandle(TEXT("CFNetwork.dll")); +#endif if (!module) return 0; @@ -1153,6 +1171,7 @@ int main(int argc, char* argv[]) sharedUIDelegate.adoptRef(new UIDelegate); sharedEditingDelegate.adoptRef(new EditingDelegate); sharedResourceLoadDelegate.adoptRef(new ResourceLoadDelegate); + sharedHistoryDelegate.adoptRef(new HistoryDelegate); // FIXME - need to make DRT pass with Windows native controls <http://bugs.webkit.org/show_bug.cgi?id=25592> COMPtr<IWebPreferences> tmpPreferences; diff --git a/WebKitTools/DumpRenderTree/win/DumpRenderTree.vcproj b/WebKitTools/DumpRenderTree/win/DumpRenderTree.vcproj index dea2467..ba3640c 100644 --- a/WebKitTools/DumpRenderTree/win/DumpRenderTree.vcproj +++ b/WebKitTools/DumpRenderTree/win/DumpRenderTree.vcproj @@ -185,7 +185,7 @@ <Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""$(ProjectDir)\.";"$(ProjectDir)\..";"$(ProjectDir)\..\cg";"$(WebKitOutputDir)\Include";"$(WebKitOutputDir)\Include\private";"$(WebKitOutputDir)\Include\DumpRenderTree\ForwardingHeaders";"$(WebKitOutputDir)\Include\JavaScriptCore";"$(WebKitOutputDir)\Include\private\JavaScriptCore";"$(WebKitLibrariesDir)\Include";"$(WebKitLibrariesDir)\Include\private";"$(WebKitLibrariesDir)\include\pthreads";"$(WebKitOutputDir)\Include\WebCore";"$(WebKitLibrariesDir)\Include\WebCore";"$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders";"$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility""
- PreprocessorDefinitions="_CONSOLE;DEBUG_WEBKIT_HAS_SUFFIX"
+ PreprocessorDefinitions="_CONSOLE"
DisableSpecificWarnings="4146"
ForcedIncludeFiles="DumpRenderTreePrefix.h"
/>
@@ -376,6 +376,77 @@ CommandLine="if exist "$(WebKitOutputDir)\buildfailed" del "$(WebKitOutputDir)\buildfailed"

if not defined ARCHIVE_BUILD (if defined PRODUCTION exit /b)

mkdir 2>NUL "$(WebKitOutputDir)\bin"

if not exist "$(WebKitLibrariesDir)\bin\CoreFoundation$(LibraryConfigSuffix).dll" exit /b

xcopy /y /d "$(WebKitLibrariesDir)\bin\CoreFoundation$(LibraryConfigSuffix).dll" "$(WebKitOutputDir)\bin"
xcopy /y /d "$(WebKitLibrariesDir)\bin\CoreFoundation$(LibraryConfigSuffix).pdb" "$(WebKitOutputDir)\bin"
xcopy /y /d "$(WebKitLibrariesDir)\bin\CFNetwork$(LibraryConfigSuffix).dll" "$(WebKitOutputDir)\bin"
xcopy /y /d "$(WebKitLibrariesDir)\bin\CFNetwork$(LibraryConfigSuffix).pdb" "$(WebKitOutputDir)\bin"
xcopy /y /d /e /i "$(WebKitLibrariesDir)\bin\CFNetwork.resources" "$(WebKitOutputDir)\bin\CFNetwork.resources"
xcopy /y /d /e /i "$(WebKitLibrariesDir)\bin\CoreFoundation.resources" "$(WebKitOutputDir)\bin\CoreFoundation.resources"
xcopy /y /d /e /i "$(WebKitLibrariesDir)\bin\CharacterSets" "$(WebKitOutputDir)\bin\CharacterSets"
xcopy /y /d "$(WebKitLibrariesDir)\bin\CoreGraphics$(LibraryConfigSuffix).dll" "$(WebKitOutputDir)\bin"
xcopy /y /d "$(WebKitLibrariesDir)\bin\CoreGraphics$(LibraryConfigSuffix).pdb" "$(WebKitOutputDir)\bin"
xcopy /y /d "$(WebKitLibrariesDir)\bin\dnssd.dll" "$(WebKitOutputDir)\bin"
xcopy /y /d "$(WebKitLibrariesDir)\bin\icudt40.dll" "$(WebKitOutputDir)\bin"
xcopy /y /d "$(WebKitLibrariesDir)\bin\icudt40$(LibraryConfigSuffix).dll" "$(WebKitOutputDir)\bin"
xcopy /y /d "$(WebKitLibrariesDir)\bin\icuin40$(LibraryConfigSuffix).dll" "$(WebKitOutputDir)\bin"
xcopy /y /d "$(WebKitLibrariesDir)\bin\icuin40$(LibraryConfigSuffix).pdb" "$(WebKitOutputDir)\bin"
xcopy /y /d "$(WebKitLibrariesDir)\bin\icuuc40$(LibraryConfigSuffix).dll" "$(WebKitOutputDir)\bin"
xcopy /y /d "$(WebKitLibrariesDir)\bin\icuuc40$(LibraryConfigSuffix).pdb" "$(WebKitOutputDir)\bin"
xcopy /y /d "$(WebKitLibrariesDir)\bin\libxml2$(LibraryConfigSuffix).dll" "$(WebKitOutputDir)\bin"
xcopy /y /d "$(WebKitLibrariesDir)\bin\libxslt$(LibraryConfigSuffix).dll" "$(WebKitOutputDir)\bin"
xcopy /y /d "$(WebKitLibrariesDir)\bin\pthreadVC2$(LibraryConfigSuffix).dll" "$(WebKitOutputDir)\bin"
xcopy /y /d "$(WebKitLibrariesDir)\bin\pthreadVC2$(LibraryConfigSuffix).pdb" "$(WebKitOutputDir)\bin"
xcopy /y /d "$(WebKitLibrariesDir)\bin\SQLite3$(LibraryConfigSuffix).dll" "$(WebKitOutputDir)\bin"
xcopy /y /d "$(WebKitLibrariesDir)\bin\SQLite3$(LibraryConfigSuffix).pdb" "$(WebKitOutputDir)\bin"
xcopy /y /d "$(WebKitLibrariesDir)\bin\zlib1$(LibraryConfigSuffix).dll" "$(WebKitOutputDir)\bin"
xcopy /y /d "$(WebKitLibrariesDir)\bin\zlib1$(LibraryConfigSuffix).pdb" "$(WebKitOutputDir)\bin"
"
/>
</Configuration>
+ <Configuration
+ Name="Debug_All|Win32"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_all.vsprops"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine="%SystemDrive%\cygwin\bin\which.exe bash
if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%
cmd /c
if exist "$(WebKitOutputDir)\buildfailed" grep XX$(ProjectName)XX "$(WebKitOutputDir)\buildfailed"
if errorlevel 1 exit 1
echo XX$(ProjectName)XX > "$(WebKitOutputDir)\buildfailed"

mkdir 2>NUL "$(WebKitOutputDir)\include\DumpRenderTree"
mkdir 2>NUL "$(WebKitOutputDir)\include\DumpRenderTree\ForwardingHeaders"
mkdir 2>NUL "$(WebKitOutputDir)\include\DumpRenderTree\ForwardingHeaders\wtf"

xcopy /y /d "$(ProjectDir)\..\ForwardingHeaders\wtf\*.h" "$(WebKitOutputDir)\include\DumpRenderTree\ForwardingHeaders\wtf"
"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""$(ProjectDir)\.";"$(ProjectDir)\..";"$(ProjectDir)\..\cg";"$(WebKitOutputDir)\Include";"$(WebKitOutputDir)\Include\private";"$(WebKitOutputDir)\Include\DumpRenderTree\ForwardingHeaders";"$(WebKitOutputDir)\Include\JavaScriptCore";"$(WebKitOutputDir)\Include\private\JavaScriptCore";"$(WebKitLibrariesDir)\Include";"$(WebKitLibrariesDir)\Include\private";"$(WebKitLibrariesDir)\include\pthreads";"$(WebKitOutputDir)\Include\WebCore";"$(WebKitLibrariesDir)\Include\WebCore";"$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders";"$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility""
+ PreprocessorDefinitions="_CONSOLE"
+ DisableSpecificWarnings="4146"
+ ForcedIncludeFiles="DumpRenderTreePrefix.h"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="JavaScriptCore$(WebKitDLLConfigSuffix).lib WebKitGUID$(WebKitConfigSuffix).lib WebKit$(WebKitDLLConfigSuffix).lib CoreGraphics$(LibraryConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib CFNetwork$(LibraryConfigSuffix).lib pthreadVC2$(LibraryConfigSuffix).lib gdi32.lib ole32.lib oleaut32.lib user32.lib shlwapi.lib oleacc.lib comsuppw.lib"
+ AdditionalLibraryDirectories=""
+ DelayLoadDLLs=""
+ SubSystem="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="if exist "$(WebKitOutputDir)\buildfailed" del "$(WebKitOutputDir)\buildfailed"

if not defined ARCHIVE_BUILD (if defined PRODUCTION exit /b)

mkdir 2>NUL "$(WebKitOutputDir)\bin"

if not exist "$(WebKitLibrariesDir)\bin\CoreFoundation$(LibraryConfigSuffix).dll" exit /b

xcopy /y /d "$(WebKitLibrariesDir)\bin\CoreFoundation$(LibraryConfigSuffix).dll" "$(WebKitOutputDir)\bin"
xcopy /y /d "$(WebKitLibrariesDir)\bin\CoreFoundation$(LibraryConfigSuffix).pdb" "$(WebKitOutputDir)\bin"
xcopy /y /d "$(WebKitLibrariesDir)\bin\CFNetwork$(LibraryConfigSuffix).dll" "$(WebKitOutputDir)\bin"
xcopy /y /d "$(WebKitLibrariesDir)\bin\CFNetwork$(LibraryConfigSuffix).pdb" "$(WebKitOutputDir)\bin"
xcopy /y /d /e /i "$(WebKitLibrariesDir)\bin\CFNetwork.resources" "$(WebKitOutputDir)\bin\CFNetwork.resources"
xcopy /y /d /e /i "$(WebKitLibrariesDir)\bin\CoreFoundation.resources" "$(WebKitOutputDir)\bin\CoreFoundation.resources"
xcopy /y /d /e /i "$(WebKitLibrariesDir)\bin\CharacterSets" "$(WebKitOutputDir)\bin\CharacterSets"
xcopy /y /d "$(WebKitLibrariesDir)\bin\CoreGraphics$(LibraryConfigSuffix).dll" "$(WebKitOutputDir)\bin"
xcopy /y /d "$(WebKitLibrariesDir)\bin\CoreGraphics$(LibraryConfigSuffix).pdb" "$(WebKitOutputDir)\bin"
xcopy /y /d "$(WebKitLibrariesDir)\bin\dnssd.dll" "$(WebKitOutputDir)\bin"
xcopy /y /d "$(WebKitLibrariesDir)\bin\icudt40.dll" "$(WebKitOutputDir)\bin"
xcopy /y /d "$(WebKitLibrariesDir)\bin\icudt40$(LibraryConfigSuffix).dll" "$(WebKitOutputDir)\bin"
xcopy /y /d "$(WebKitLibrariesDir)\bin\icuin40$(LibraryConfigSuffix).dll" "$(WebKitOutputDir)\bin"
xcopy /y /d "$(WebKitLibrariesDir)\bin\icuin40$(LibraryConfigSuffix).pdb" "$(WebKitOutputDir)\bin"
xcopy /y /d "$(WebKitLibrariesDir)\bin\icuuc40$(LibraryConfigSuffix).dll" "$(WebKitOutputDir)\bin"
xcopy /y /d "$(WebKitLibrariesDir)\bin\icuuc40$(LibraryConfigSuffix).pdb" "$(WebKitOutputDir)\bin"
xcopy /y /d "$(WebKitLibrariesDir)\bin\libxml2$(LibraryConfigSuffix).dll" "$(WebKitOutputDir)\bin"
xcopy /y /d "$(WebKitLibrariesDir)\bin\libxslt$(LibraryConfigSuffix).dll" "$(WebKitOutputDir)\bin"
xcopy /y /d "$(WebKitLibrariesDir)\bin\pthreadVC2$(LibraryConfigSuffix).dll" "$(WebKitOutputDir)\bin"
xcopy /y /d "$(WebKitLibrariesDir)\bin\pthreadVC2$(LibraryConfigSuffix).pdb" "$(WebKitOutputDir)\bin"
xcopy /y /d "$(WebKitLibrariesDir)\bin\SQLite3$(LibraryConfigSuffix).dll" "$(WebKitOutputDir)\bin"
xcopy /y /d "$(WebKitLibrariesDir)\bin\SQLite3$(LibraryConfigSuffix).pdb" "$(WebKitOutputDir)\bin"
xcopy /y /d "$(WebKitLibrariesDir)\bin\zlib1$(LibraryConfigSuffix).dll" "$(WebKitOutputDir)\bin"
xcopy /y /d "$(WebKitLibrariesDir)\bin\zlib1$(LibraryConfigSuffix).pdb" "$(WebKitOutputDir)\bin"
"
+ />
+ </Configuration>
</Configurations>
<References>
</References>
@@ -456,6 +527,14 @@ >
</File>
<File
+ RelativePath=".\HistoryDelegate.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\HistoryDelegate.h"
+ >
+ </File>
+ <File
RelativePath=".\PolicyDelegate.cpp"
>
</File>
@@ -555,6 +634,14 @@ Name="VCCLCompilerTool"
/>
</FileConfiguration>
+ <FileConfiguration
+ Name="Debug_All|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
</File>
<File
RelativePath="..\cairo\PixelDumpSupportCairo.h"
@@ -583,6 +670,14 @@ Name="VCCustomBuildTool"
/>
</FileConfiguration>
+ <FileConfiguration
+ Name="Debug_All|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ </FileConfiguration>
</File>
<File
RelativePath="..\cg\PixelDumpSupportCG.cpp"
diff --git a/WebKitTools/DumpRenderTree/win/EventSender.cpp b/WebKitTools/DumpRenderTree/win/EventSender.cpp index 721b238..dd5bf9d 100644 --- a/WebKitTools/DumpRenderTree/win/EventSender.cpp +++ b/WebKitTools/DumpRenderTree/win/EventSender.cpp @@ -194,7 +194,7 @@ static inline POINTL pointl(const POINT& point) return result; } -static void doMouseUp(MSG msg) +static void doMouseUp(MSG msg, HRESULT* oleDragAndDropReturnValue = 0) { COMPtr<IWebFramePrivate> framePrivate; if (SUCCEEDED(frame->QueryInterface(&framePrivate))) @@ -215,6 +215,8 @@ static void doMouseUp(MSG msg) didDragEnter = true; } HRESULT hr = draggingInfo->dropSource()->QueryContinueDrag(0, 0); + if (oleDragAndDropReturnValue) + *oleDragAndDropReturnValue = hr; webViewDropTarget->DragOver(0, pointl(screenPoint), &effect); if (hr == DRAGDROP_S_DROP && effect != DROPEFFECT_NONE) { DWORD effect = 0; @@ -314,7 +316,7 @@ static JSValueRef mouseMoveToCallback(JSContextRef context, JSObjectRef function return JSValueMakeUndefined(context); } -void replaySavedEvents() +void replaySavedEvents(HRESULT* oleDragAndDropReturnValue) { replayingSavedEvents = true; @@ -326,7 +328,7 @@ void replaySavedEvents() case WM_LBUTTONUP: case WM_RBUTTONUP: case WM_MBUTTONUP: - doMouseUp(msg); + doMouseUp(msg, oleDragAndDropReturnValue); break; case WM_MOUSEMOVE: doMouseMove(msg); @@ -370,7 +372,7 @@ void replaySavedEvents() case WM_LBUTTONUP: case WM_RBUTTONUP: case WM_MBUTTONUP: - doMouseUp(msg); + doMouseUp(msg, oleDragAndDropReturnValue); break; case WM_MOUSEMOVE: doMouseMove(msg); diff --git a/WebKitTools/DumpRenderTree/win/EventSender.h b/WebKitTools/DumpRenderTree/win/EventSender.h index 9ae0aec..79d7dab 100644 --- a/WebKitTools/DumpRenderTree/win/EventSender.h +++ b/WebKitTools/DumpRenderTree/win/EventSender.h @@ -31,11 +31,12 @@ class DraggingInfo; +typedef long HRESULT; typedef const struct OpaqueJSContext* JSContextRef; typedef struct OpaqueJSValue* JSObjectRef; JSObjectRef makeEventSender(JSContextRef context); -void replaySavedEvents(); +void replaySavedEvents(HRESULT* oleDragAndDropReturnValue = 0); extern DraggingInfo* draggingInfo; diff --git a/WebKitTools/DumpRenderTree/win/HistoryDelegate.cpp b/WebKitTools/DumpRenderTree/win/HistoryDelegate.cpp new file mode 100644 index 0000000..8a41fac --- /dev/null +++ b/WebKitTools/DumpRenderTree/win/HistoryDelegate.cpp @@ -0,0 +1,221 @@ +/* + * Copyright (C) 2009 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "HistoryDelegate.h" + +#include "DumpRenderTree.h" +#include "DumpRenderTreeWin.h" +#include "LayoutTestController.h" +#include <string> +#include <WebKit/WebKit.h> + +using std::wstring; + +static inline wstring wstringFromBSTR(BSTR str) +{ + return wstring(str, ::SysStringLen(str)); +} + +HistoryDelegate::HistoryDelegate() + : m_refCount(1) +{ +} + +HistoryDelegate::~HistoryDelegate() +{ +} + + // IUnknown +HRESULT HistoryDelegate::QueryInterface(REFIID riid, void** ppvObject) +{ + *ppvObject = 0; + if (IsEqualGUID(riid, IID_IUnknown)) + *ppvObject = static_cast<IWebHistoryDelegate*>(this); + else if (IsEqualGUID(riid, IID_IWebHistoryDelegate)) + *ppvObject = static_cast<IWebHistoryDelegate*>(this); + else + return E_NOINTERFACE; + + AddRef(); + return S_OK; +} + +ULONG HistoryDelegate::AddRef(void) +{ + return ++m_refCount; +} + +ULONG HistoryDelegate::Release(void) +{ + ULONG newRef = --m_refCount; + if (!newRef) + delete(this); + + return newRef; +} + +// IWebHistoryDelegate +HRESULT HistoryDelegate::didNavigateWithNavigationData(IWebView* webView, IWebNavigationData* navigationData, IWebFrame* webFrame) +{ + if (!gLayoutTestController->dumpHistoryDelegateCallbacks()) + return S_OK; + + BSTR urlBSTR; + if (FAILED(navigationData->url(&urlBSTR))) + return E_FAIL; + wstring url; + if (urlBSTR) + url = urlSuitableForTestResult(wstringFromBSTR(urlBSTR)); + SysFreeString(urlBSTR); + + BSTR titleBSTR; + if (FAILED(navigationData->title(&titleBSTR))) + return E_FAIL; + wstring title; + if (titleBSTR) + title = wstringFromBSTR(titleBSTR); + SysFreeString(titleBSTR); + + COMPtr<IWebURLRequest> request; + if (FAILED(navigationData->originalRequest(&request))) + return E_FAIL; + + BSTR httpMethodBSTR; + if (FAILED(request->HTTPMethod(&httpMethodBSTR))) + return E_FAIL; + wstring httpMethod; + if (httpMethodBSTR) + httpMethod = wstringFromBSTR(httpMethodBSTR); + SysFreeString(httpMethodBSTR); + + COMPtr<IWebURLResponse> response; + if (FAILED(navigationData->response(&response))) + return E_FAIL; + + COMPtr<IWebHTTPURLResponse> httpResponse; + if (FAILED(response->QueryInterface(&httpResponse))) + return E_FAIL; + + int statusCode = 0; + if (FAILED(httpResponse->statusCode(&statusCode))) + return E_FAIL; + + BOOL hasSubstituteData; + if (FAILED(navigationData->hasSubstituteData(&hasSubstituteData))) + return E_FAIL; + + BSTR clientRedirectSourceBSTR; + if (FAILED(navigationData->clientRedirectSource(&clientRedirectSourceBSTR))) + return E_FAIL; + bool hasClientRedirect = clientRedirectSourceBSTR && SysStringLen(clientRedirectSourceBSTR); + wstring redirectSource; + if (clientRedirectSourceBSTR) + redirectSource = urlSuitableForTestResult(wstringFromBSTR(clientRedirectSourceBSTR)); + SysFreeString(clientRedirectSourceBSTR); + + bool wasFailure = hasSubstituteData || (httpResponse && statusCode >= 400); + + printf("WebView navigated to url \"%S\" with title \"%S\" with HTTP equivalent method \"%S\". The navigation was %s and was %s%S.\n", + url.c_str(), + title.c_str(), + httpMethod.c_str(), + wasFailure ? "a failure" : "successful", + hasClientRedirect ? "a client redirect from " : "not a client redirect", + redirectSource.c_str()); + + return S_OK; +} + +HRESULT HistoryDelegate::didPerformClientRedirectFromURL(IWebView*, BSTR sourceURL, BSTR destinationURL, IWebFrame*) +{ + if (!gLayoutTestController->dumpHistoryDelegateCallbacks()) + return S_OK; + + wstring source; + if (sourceURL) + source = urlSuitableForTestResult(wstringFromBSTR(sourceURL)); + + wstring destination; + if (destinationURL) + destination = urlSuitableForTestResult(wstringFromBSTR(destinationURL)); + + printf("WebView performed a client redirect from \"%S\" to \"%S\".\n", source.c_str(), destination.c_str()); + return S_OK; +} + +HRESULT HistoryDelegate::didPerformServerRedirectFromURL(IWebView* webView, BSTR sourceURL, BSTR destinationURL, IWebFrame* webFrame) +{ + if (!gLayoutTestController->dumpHistoryDelegateCallbacks()) + return S_OK; + + wstring source; + if (sourceURL) + source = urlSuitableForTestResult(wstringFromBSTR(sourceURL)); + + wstring destination; + if (destinationURL) + destination = urlSuitableForTestResult(wstringFromBSTR(destinationURL)); + + printf("WebView performed a server redirect from \"%S\" to \"%S\".\n", source.c_str(), destination.c_str()); + return S_OK; +} + +HRESULT HistoryDelegate::updateHistoryTitle(IWebView* webView, BSTR titleBSTR, BSTR urlBSTR) +{ + if (!gLayoutTestController->dumpHistoryDelegateCallbacks()) + return S_OK; + + wstring url; + if (urlBSTR) + url = urlSuitableForTestResult(wstringFromBSTR(urlBSTR)); + + wstring title; + if (titleBSTR) + title = wstringFromBSTR(titleBSTR); + + printf("WebView updated the title for history URL \"%S\" to \"%S\".\n", url.c_str(), title.c_str()); + return S_OK; +} + +HRESULT HistoryDelegate::populateVisitedLinksForWebView(IWebView* webView) +{ + if (!gLayoutTestController->dumpHistoryDelegateCallbacks()) + return S_OK; + + BSTR urlBSTR; + if (FAILED(webView->mainFrameURL(&urlBSTR))) + return E_FAIL; + + wstring url; + if (urlBSTR) + url = urlSuitableForTestResult(wstringFromBSTR(urlBSTR)); + SysFreeString(urlBSTR); + + if (gLayoutTestController->dumpVisitedLinksCallback()) + printf("Asked to populate visited links for WebView \"%S\"\n", url.c_str()); + + return S_OK; +} diff --git a/WebKitTools/DumpRenderTree/win/HistoryDelegate.h b/WebKitTools/DumpRenderTree/win/HistoryDelegate.h new file mode 100644 index 0000000..41be670 --- /dev/null +++ b/WebKitTools/DumpRenderTree/win/HistoryDelegate.h @@ -0,0 +1,72 @@ +/* + * Copyright (C) 2009 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef HistoryDelegate_h +#define HistoryDelegate_h + +#include <WebKit/WebKit.h> +#include <wtf/OwnPtr.h> + +class HistoryDelegate : public IWebHistoryDelegate { +public: + HistoryDelegate(); + virtual ~HistoryDelegate(); + + // IUnknown + virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void** ppvObject); + virtual ULONG STDMETHODCALLTYPE AddRef(void); + virtual ULONG STDMETHODCALLTYPE Release(void); + + // IWebHistoryDelegate + virtual HRESULT STDMETHODCALLTYPE didNavigateWithNavigationData( + /* [in] */ IWebView* webView, + /* [in] */ IWebNavigationData* navigationData, + /* [in] */ IWebFrame* webFrame); + + virtual HRESULT STDMETHODCALLTYPE didPerformClientRedirectFromURL( + /* [in] */ IWebView* webView, + /* [in] */ BSTR sourceURL, + /* [in] */ BSTR destinationURL, + /* [in] */ IWebFrame* webFrame); + + virtual HRESULT STDMETHODCALLTYPE didPerformServerRedirectFromURL( + /* [in] */ IWebView* webView, + /* [in] */ BSTR sourceURL, + /* [in] */ BSTR destinationURL, + /* [in] */ IWebFrame* webFrame); + + virtual HRESULT STDMETHODCALLTYPE updateHistoryTitle( + /* [in] */ IWebView* webView, + /* [in] */ BSTR title, + /* [in] */ BSTR url); + + virtual HRESULT STDMETHODCALLTYPE populateVisitedLinksForWebView( + /* [in] */ IWebView* webView); + +private: + ULONG m_refCount; +}; + +#endif // HistoryDelegate_h diff --git a/WebKitTools/DumpRenderTree/win/ImageDiff.vcproj b/WebKitTools/DumpRenderTree/win/ImageDiff.vcproj index 37bddeb..d9f5225 100644 --- a/WebKitTools/DumpRenderTree/win/ImageDiff.vcproj +++ b/WebKitTools/DumpRenderTree/win/ImageDiff.vcproj @@ -216,6 +216,73 @@ CommandLine="if exist "$(WebKitOutputDir)\buildfailed" del "$(WebKitOutputDir)\buildfailed"

mkdir 2>NUL "$(WebKitOutputDir)\bin"

if not defined ARCHIVE_BUILD (if defined PRODUCTION exit /b)

if not exist "$(WebKitLibrariesDir)\bin\CoreFoundation$(LibraryConfigSuffix).dll" exit /b

xcopy /y /d "$(WebKitLibrariesDir)\bin\CoreFoundation$(LibraryConfigSuffix).dll" "$(WebKitOutputDir)\bin"
xcopy /y /d "$(WebKitLibrariesDir)\bin\CoreFoundation$(LibraryConfigSuffix).pdb" "$(WebKitOutputDir)\bin"
xcopy /y /d /e /i "$(WebKitLibrariesDir)\bin\CoreFoundation.resources" "$(WebKitOutputDir)\bin\CoreFoundation.resources"
xcopy /y /d "$(WebKitLibrariesDir)\bin\CoreGraphics$(LibraryConfigSuffix).dll" "$(WebKitOutputDir)\bin"
xcopy /y /d "$(WebKitLibrariesDir)\bin\CoreGraphics$(LibraryConfigSuffix).pdb" "$(WebKitOutputDir)\bin"
"
/>
</Configuration>
+ <Configuration
+ Name="Debug_All|Win32"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_all.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine="%SystemDrive%\cygwin\bin\which.exe bash
if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%
cmd /c
if exist "$(WebKitOutputDir)\buildfailed" grep XX$(ProjectName)XX "$(WebKitOutputDir)\buildfailed"
if errorlevel 1 exit 1
echo XX$(ProjectName)XX > "$(WebKitOutputDir)\buildfailed"
"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""$(WebKitOutputDir)\include";"$(WebKitOutputDir)\include\private";"$(WebKitOutputDir)\include\WebCore\ForwardingHeaders";"$(WebKitLibrariesDir)\include";"$(WebKitLibrariesDir)\include\private";"$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders";"$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility""
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="CoreGraphics$(LibraryConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib"
+ AdditionalLibraryDirectories=""
+ SubSystem="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="if exist "$(WebKitOutputDir)\buildfailed" del "$(WebKitOutputDir)\buildfailed"

mkdir 2>NUL "$(WebKitOutputDir)\bin"

if not defined ARCHIVE_BUILD (if defined PRODUCTION exit /b)

if not exist "$(WebKitLibrariesDir)\bin\CoreFoundation$(LibraryConfigSuffix).dll" exit /b

xcopy /y /d "$(WebKitLibrariesDir)\bin\CoreFoundation$(LibraryConfigSuffix).dll" "$(WebKitOutputDir)\bin"
xcopy /y /d "$(WebKitLibrariesDir)\bin\CoreFoundation$(LibraryConfigSuffix).pdb" "$(WebKitOutputDir)\bin"
xcopy /y /d /e /i "$(WebKitLibrariesDir)\bin\CoreFoundation.resources" "$(WebKitOutputDir)\bin\CoreFoundation.resources"
xcopy /y /d "$(WebKitLibrariesDir)\bin\CoreGraphics$(LibraryConfigSuffix).dll" "$(WebKitOutputDir)\bin"
xcopy /y /d "$(WebKitLibrariesDir)\bin\CoreGraphics$(LibraryConfigSuffix).pdb" "$(WebKitOutputDir)\bin"
"
+ />
+ </Configuration>
</Configurations>
<References>
</References>
diff --git a/WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp b/WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp index cf3ac85..d3cac7a 100644 --- a/WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp +++ b/WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp @@ -876,34 +876,68 @@ void LayoutTestController::addUserStyleSheet(JSStringRef source) void LayoutTestController::showWebInspector() { - COMPtr<IWebViewPrivate> webView; - if (FAILED(WebKitCreateInstance(__uuidof(WebView), 0, __uuidof(webView), reinterpret_cast<void**>(&webView)))) + COMPtr<IWebView> webView; + if (FAILED(frame->webView(&webView))) + return; + + COMPtr<IWebPreferences> preferences; + if (FAILED(webView->preferences(&preferences))) + return; + + COMPtr<IWebPreferencesPrivate> prefsPrivate(Query, preferences); + if (!prefsPrivate) + return; + + prefsPrivate->setDeveloperExtrasEnabled(true); + + COMPtr<IWebViewPrivate> viewPrivate(Query, webView); + if (!viewPrivate) return; COMPtr<IWebInspector> inspector; - if (SUCCEEDED(webView->inspector(&inspector))) + if (SUCCEEDED(viewPrivate->inspector(&inspector))) inspector->show(); } void LayoutTestController::closeWebInspector() { - COMPtr<IWebViewPrivate> webView; - if (FAILED(WebKitCreateInstance(__uuidof(WebView), 0, __uuidof(webView), reinterpret_cast<void**>(&webView)))) + COMPtr<IWebView> webView; + if (FAILED(frame->webView(&webView))) + return; + + COMPtr<IWebViewPrivate> viewPrivate(Query, webView); + if (!viewPrivate) return; COMPtr<IWebInspector> inspector; - if (SUCCEEDED(webView->inspector(&inspector))) - inspector->close(); + if (FAILED(viewPrivate->inspector(&inspector))) + return; + + inspector->close(); + + COMPtr<IWebPreferences> preferences; + if (FAILED(webView->preferences(&preferences))) + return; + + COMPtr<IWebPreferencesPrivate> prefsPrivate(Query, preferences); + if (!prefsPrivate) + return; + + prefsPrivate->setDeveloperExtrasEnabled(false); } void LayoutTestController::evaluateInWebInspector(long callId, JSStringRef script) { - COMPtr<IWebViewPrivate> webView; - if (FAILED(WebKitCreateInstance(__uuidof(WebView), 0, __uuidof(webView), reinterpret_cast<void**>(&webView)))) + COMPtr<IWebView> webView; + if (FAILED(frame->webView(&webView))) + return; + + COMPtr<IWebViewPrivate> viewPrivate(Query, webView); + if (!viewPrivate) return; COMPtr<IWebInspector> inspector; - if (FAILED(webView->inspector(&inspector))) + if (FAILED(viewPrivate->inspector(&inspector))) return; COMPtr<IWebInspectorPrivate> inspectorPrivate(Query, inspector); @@ -912,3 +946,52 @@ void LayoutTestController::evaluateInWebInspector(long callId, JSStringRef scrip inspectorPrivate->evaluateInFrontend(callId, bstrT(script).GetBSTR()); } + +void LayoutTestController::evaluateScriptInIsolatedWorld(unsigned worldId, JSObjectRef globalObject, JSStringRef script) +{ + COMPtr<IWebFramePrivate> framePrivate(Query, frame); + if (!framePrivate) + return; + + BSTR result; + if (FAILED(framePrivate->stringByEvaluatingJavaScriptInIsolatedWorld(worldId, reinterpret_cast<OLE_HANDLE>(globalObject), bstrT(script).GetBSTR(), &result))) + return; + SysFreeString(result); +} + +void LayoutTestController::removeAllVisitedLinks() +{ + COMPtr<IWebHistory> history; + if (FAILED(WebKitCreateInstance(CLSID_WebHistory, 0, __uuidof(history), reinterpret_cast<void**>(&history)))) + return; + + COMPtr<IWebHistory> sharedHistory; + if (FAILED(history->optionalSharedHistory(&sharedHistory)) || !sharedHistory) + return; + + COMPtr<IWebHistoryPrivate> sharedHistoryPrivate; + if (FAILED(sharedHistory->QueryInterface(&sharedHistoryPrivate))) + return; + + sharedHistoryPrivate->removeAllVisitedLinks(); +} + +JSRetainPtr<JSStringRef> LayoutTestController::counterValueForElementById(JSStringRef id) +{ + COMPtr<IWebFramePrivate> framePrivate(Query, frame); + if (!framePrivate) + return 0; + + wstring idWstring = jsStringRefToWString(id); + BSTR idBSTR = SysAllocStringLen((OLECHAR*)idWstring.c_str(), idWstring.length()); + BSTR counterValueBSTR; + if (FAILED(framePrivate->counterValueForElementById(idBSTR, &counterValueBSTR))) + return 0; + + wstring counterValue(counterValueBSTR, SysStringLen(counterValueBSTR)); + SysFreeString(idBSTR); + SysFreeString(counterValueBSTR); + JSRetainPtr<JSStringRef> counterValueJS(Adopt, JSStringCreateWithCharacters(counterValue.data(), counterValue.length())); + return counterValueJS; +} + diff --git a/WebKitTools/DumpRenderTree/win/TestNetscapePlugin/TestNetscapePlugin.rc b/WebKitTools/DumpRenderTree/win/TestNetscapePlugin/TestNetscapePlugin.rc index cccc69c..a8fbbcd 100644 --- a/WebKitTools/DumpRenderTree/win/TestNetscapePlugin/TestNetscapePlugin.rc +++ b/WebKitTools/DumpRenderTree/win/TestNetscapePlugin/TestNetscapePlugin.rc @@ -7,7 +7,7 @@ //
// Generated from the TEXTINCLUDE 2 resource.
//
-#include "afxres.h"
+#include "windows.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
@@ -34,7 +34,7 @@ END 2 TEXTINCLUDE
BEGIN
- "#include ""afxres.h""\r\n"
+ "#include ""windows.h""\r\n"
"\0"
END
diff --git a/WebKitTools/DumpRenderTree/win/TestNetscapePlugin/TestNetscapePlugin.vcproj b/WebKitTools/DumpRenderTree/win/TestNetscapePlugin/TestNetscapePlugin.vcproj index 0e0918d..b1f2073 100644 --- a/WebKitTools/DumpRenderTree/win/TestNetscapePlugin/TestNetscapePlugin.vcproj +++ b/WebKitTools/DumpRenderTree/win/TestNetscapePlugin/TestNetscapePlugin.vcproj @@ -157,7 +157,7 @@ <Configuration
Name="Debug_Internal|Win32"
ConfigurationType="2"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops"
CharacterSet="1"
>
<Tool
@@ -293,6 +293,76 @@ CommandLine="if exist "$(WebKitOutputDir)\buildfailed" del "$(WebKitOutputDir)\buildfailed""
/>
</Configuration>
+ <Configuration
+ Name="Debug_All|Win32"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_all.vsprops"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine="%SystemDrive%\cygwin\bin\which.exe bash
if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%
cmd /c
if exist "$(WebKitOutputDir)\buildfailed" grep XX$(ProjectName)XX "$(WebKitOutputDir)\buildfailed"
if errorlevel 1 exit 1
echo XX$(ProjectName)XX > "$(WebKitOutputDir)\buildfailed"
"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""$(WebKitOutputDir)\Include";"$(WebKitOutputDir)\Include\JavaScriptCore";"$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders";"$(ProjectDir)..\..\TestNetscapePlugin.subproj";"$(WebKitLibrariesDir)\include";"$(WebKitLibrariesDir)\include\CoreFoundation\OSXCompatibilityHeaders";"$(WebKitLibrariesDir)\include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility""
+ PreprocessorDefinitions="_USRDLL;TESTNETSCAPEPLUGIN_EXPORTS;snprintf=_snprintf"
+ RuntimeLibrary="3"
+ DisableSpecificWarnings="4819"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ AdditionalIncludeDirectories=""
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)\$(ProjectName)$(WebKitConfigSuffix)\np$(ProjectName)$(WebKitConfigSuffix).dll"
+ ModuleDefinitionFile="TestNetscapePlugin$(WebKitConfigSuffix).def"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="if exist "$(WebKitOutputDir)\buildfailed" del "$(WebKitOutputDir)\buildfailed""
+ />
+ </Configuration>
</Configurations>
<References>
</References>
diff --git a/WebKitTools/DumpRenderTree/win/UIDelegate.cpp b/WebKitTools/DumpRenderTree/win/UIDelegate.cpp index b78fd3e..16724d7 100755 --- a/WebKitTools/DumpRenderTree/win/UIDelegate.cpp +++ b/WebKitTools/DumpRenderTree/win/UIDelegate.cpp @@ -502,13 +502,14 @@ HRESULT STDMETHODCALLTYPE UIDelegate::doDragDrop( *performedEffect = 0; draggingInfo = new DraggingInfo(object, source); - replaySavedEvents(); + HRESULT oleDragAndDropReturnValue = DRAGDROP_S_CANCEL; + replaySavedEvents(&oleDragAndDropReturnValue); if (draggingInfo) { *performedEffect = draggingInfo->performedDropEffect(); delete draggingInfo; draggingInfo = 0; } - return S_OK; + return oleDragAndDropReturnValue; } HRESULT STDMETHODCALLTYPE UIDelegate::webViewGetDlgCode( |