diff options
Diffstat (limited to 'WebKitTools/DumpRenderTree/win')
25 files changed, 821 insertions, 244 deletions
diff --git a/WebKitTools/DumpRenderTree/win/AccessibilityControllerWin.cpp b/WebKitTools/DumpRenderTree/win/AccessibilityControllerWin.cpp new file mode 100644 index 0000000..b6e45f2 --- /dev/null +++ b/WebKitTools/DumpRenderTree/win/AccessibilityControllerWin.cpp @@ -0,0 +1,84 @@ +/* + * Copyright (C) 2008 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 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 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 "AccessibilityController.h" + +#include "AccessibilityUIElement.h" +#include "DumpRenderTree.h" +#include <JavaScriptCore/Assertions.h> +#include <WebCore/COMPtr.h> +#include <WebKit/WebKit.h> +#include <oleacc.h> + +AccessibilityController::AccessibilityController() +{ +} + +AccessibilityController::~AccessibilityController() +{ +} + +AccessibilityUIElement AccessibilityController::focusedElement() +{ + COMPtr<IAccessible> rootAccessible = rootElement().platformUIElement(); + + VARIANT vFocus; + if (FAILED(rootAccessible->get_accFocus(&vFocus))) + return 0; + + if (V_VT(&vFocus) == VT_I4) { + ASSERT(V_I4(&vFocus) == CHILDID_SELF); + // The root accessible object is the focused object. + return rootAccessible; + } + + ASSERT(V_VT(&vFocus) == VT_DISPATCH); + // We have an IDispatch; query for IAccessible. + return COMPtr<IAccessible>(Query, V_DISPATCH(&vFocus)); +} + +AccessibilityUIElement AccessibilityController::rootElement() +{ + COMPtr<IWebView> view; + if (FAILED(frame->webView(&view))) + return 0; + + COMPtr<IWebViewPrivate> viewPrivate(Query, view); + if (!viewPrivate) + return 0; + + HWND webViewWindow; + if (FAILED(viewPrivate->viewWindow((OLE_HANDLE*)&webViewWindow))) + return 0; + + // Get the root accessible object by querying for the accessible object for the + // WebView's window. + COMPtr<IAccessible> rootAccessible; + if (FAILED(AccessibleObjectFromWindow(webViewWindow, static_cast<DWORD>(OBJID_CLIENT), __uuidof(IAccessible), reinterpret_cast<void**>(&rootAccessible)))) + return 0; + + return rootAccessible; +} diff --git a/WebKitTools/DumpRenderTree/win/AccessibilityUIElementWin.cpp b/WebKitTools/DumpRenderTree/win/AccessibilityUIElementWin.cpp new file mode 100644 index 0000000..d835bb3 --- /dev/null +++ b/WebKitTools/DumpRenderTree/win/AccessibilityUIElementWin.cpp @@ -0,0 +1,266 @@ +/* + * Copyright (C) 2008 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 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 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 "AccessibilityUIElement.h" + +#include <JavaScriptCore/JSStringRef.h> +#include <tchar.h> +#include <string> + +using std::wstring; + +AccessibilityUIElement::AccessibilityUIElement(PlatformUIElement element) + : m_element(element) +{ +} + +AccessibilityUIElement::AccessibilityUIElement(const AccessibilityUIElement& other) + : m_element(other.m_element) +{ +} + +AccessibilityUIElement::~AccessibilityUIElement() +{ +} + +void AccessibilityUIElement::getLinkedUIElements(Vector<AccessibilityUIElement>&) +{ +} + +void AccessibilityUIElement::getDocumentLinks(Vector<AccessibilityUIElement>&) +{ +} + +void AccessibilityUIElement::getChildren(Vector<AccessibilityUIElement>& children) +{ + long childCount; + if (FAILED(m_element->get_accChildCount(&childCount))) + return; + for (long i = 0; i < childCount; ++i) + children.append(getChildAtIndex(i)); +} + +AccessibilityUIElement AccessibilityUIElement::getChildAtIndex(unsigned index) +{ + COMPtr<IDispatch> child; + VARIANT vChild; + ::VariantInit(&vChild); + V_VT(&vChild) = VT_I4; + // In MSAA, index 0 is the object itself. + V_I4(&vChild) = index + 1; + if (FAILED(m_element->get_accChild(vChild, &child))) + return 0; + return COMPtr<IAccessible>(Query, child); +} + +JSStringRef AccessibilityUIElement::allAttributes() +{ + return JSStringCreateWithCharacters(0, 0); +} + +JSStringRef AccessibilityUIElement::attributesOfLinkedUIElements() +{ + return JSStringCreateWithCharacters(0, 0); +} + +JSStringRef AccessibilityUIElement::attributesOfDocumentLinks() +{ + return JSStringCreateWithCharacters(0, 0); +} +AccessibilityUIElement AccessibilityUIElement::titleUIElement() +{ + return 0; +} + +JSStringRef AccessibilityUIElement::attributesOfChildren() +{ + return JSStringCreateWithCharacters(0, 0); +} + +JSStringRef AccessibilityUIElement::parameterizedAttributeNames() +{ + return JSStringCreateWithCharacters(0, 0); +} + +static VARIANT& self() +{ + static VARIANT vSelf; + static bool haveInitialized; + + if (!haveInitialized) { + ::VariantInit(&vSelf); + V_VT(&vSelf) = VT_I4; + V_I4(&vSelf) = CHILDID_SELF; + } + return vSelf; +} + +JSStringRef AccessibilityUIElement::role() +{ + VARIANT vRole; + if (FAILED(m_element->get_accRole(self(), &vRole))) + return JSStringCreateWithCharacters(0, 0); + ASSERT(V_VT(&vRole) == VT_I4); + TCHAR roleText[64] = {0}; + ::GetRoleText(V_I4(&vRole), roleText, ARRAYSIZE(roleText)); + return JSStringCreateWithCharacters(roleText, _tcslen(roleText)); +} + +JSStringRef AccessibilityUIElement::title() +{ + BSTR titleBSTR; + if (FAILED(m_element->get_accName(self(), &titleBSTR)) || !titleBSTR) + return JSStringCreateWithCharacters(0, 0); + wstring title(titleBSTR, SysStringLen(titleBSTR)); + ::SysFreeString(titleBSTR); + return JSStringCreateWithCharacters(title.data(), title.length()); +} + +JSStringRef AccessibilityUIElement::description() +{ + BSTR descriptionBSTR; + if (FAILED(m_element->get_accName(self(), &descriptionBSTR)) || !descriptionBSTR) + return JSStringCreateWithCharacters(0, 0); + wstring description(descriptionBSTR, SysStringLen(descriptionBSTR)); + ::SysFreeString(descriptionBSTR); + return JSStringCreateWithCharacters(description.data(), description.length()); +} + +double AccessibilityUIElement::width() +{ + long x, y, width, height; + if (FAILED(m_element->accLocation(&x, &y, &width, &height, self()))) + return 0; + return width; +} + +double AccessibilityUIElement::height() +{ + long x, y, width, height; + if (FAILED(m_element->accLocation(&x, &y, &width, &height, self()))) + return 0; + return height; +} + +double AccessibilityUIElement::intValue() +{ + BSTR valueBSTR; + if (FAILED(m_element->get_accValue(self(), &valueBSTR)) || !valueBSTR) + return 0; + wstring value(valueBSTR, SysStringLen(valueBSTR)); + ::SysFreeString(valueBSTR); + TCHAR* ignored; + return _tcstod(value.data(), &ignored); +} + +double AccessibilityUIElement::minValue() +{ + return 0; +} + +double AccessibilityUIElement::maxValue() +{ + return 0; +} + +bool AccessibilityUIElement::supportsPressAction() +{ + return false; +} + +int AccessibilityUIElement::insertionPointLineNumber() +{ + return 0; +} + +JSStringRef AccessibilityUIElement::attributesOfColumnHeaders() +{ + return JSStringCreateWithCharacters(0, 0); +} + +JSStringRef AccessibilityUIElement::attributesOfRowHeaders() +{ + return JSStringCreateWithCharacters(0, 0); +} + +JSStringRef AccessibilityUIElement::attributesOfColumns() +{ + return JSStringCreateWithCharacters(0, 0); +} + +JSStringRef AccessibilityUIElement::attributesOfRows() +{ + return JSStringCreateWithCharacters(0, 0); +} + +JSStringRef AccessibilityUIElement::attributesOfVisibleCells() +{ + return JSStringCreateWithCharacters(0, 0); +} + +JSStringRef AccessibilityUIElement::attributesOfHeader() +{ + return JSStringCreateWithCharacters(0, 0); +} + +int AccessibilityUIElement::indexInTable() +{ + return 0; +} + +JSStringRef AccessibilityUIElement::rowIndexRange() +{ + return JSStringCreateWithCharacters(0, 0); +} + +JSStringRef AccessibilityUIElement::columnIndexRange() +{ + return JSStringCreateWithCharacters(0, 0); +} + +int AccessibilityUIElement::lineForIndex(int) +{ + return 0; +} + +JSStringRef AccessibilityUIElement::boundsForRange(unsigned location, unsigned length) +{ + return JSStringCreateWithCharacters(0, 0); +} + +AccessibilityUIElement AccessibilityUIElement::cellForColumnAndRow(unsigned column, unsigned row) +{ + return 0; +} + +JSStringRef AccessibilityUIElement::selectedTextRange() +{ + return JSStringCreateWithCharacters(0, 0); +} + +void AccessibilityUIElement::setSelectedTextRange(unsigned location, unsigned length) +{ +} diff --git a/WebKitTools/DumpRenderTree/win/DumpRenderTree.cpp b/WebKitTools/DumpRenderTree/win/DumpRenderTree.cpp index c0d0577..b3b73a9 100644 --- a/WebKitTools/DumpRenderTree/win/DumpRenderTree.cpp +++ b/WebKitTools/DumpRenderTree/win/DumpRenderTree.cpp @@ -26,6 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "config.h" #include "DumpRenderTree.h" #include "EditingDelegate.h" @@ -37,31 +38,26 @@ #include "UIDelegate.h" #include "WorkQueueItem.h" #include "WorkQueue.h" + +#include <fcntl.h> +#include <io.h> +#include <math.h> +#include <pthread.h> +#include <shlwapi.h> +#include <stdio.h> +#include <string.h> +#include <tchar.h> #include <wtf/RetainPtr.h> #include <wtf/Vector.h> -#include <WebCore/COMPtr.h> -#include <CoreFoundation/CoreFoundation.h> +#include <windows.h> #include <CFNetwork/CFURLCachePriv.h> +#include <CoreFoundation/CoreFoundation.h> #include <JavaScriptCore/JavaScriptCore.h> -#include <math.h> -#include <pthread.h> -#include <string> -#include <tchar.h> -#include <WebKit/DOMPrivate.h> -#include <WebKit/IWebFramePrivate.h> -#include <WebKit/IWebHistoryItem.h> -#include <WebKit/IWebHistoryItemPrivate.h> -#include <WebKit/IWebPreferencesPrivate.h> -#include <WebKit/IWebURLResponse.h> -#include <WebKit/IWebViewPrivate.h> +#include <WebCore/COMPtr.h> +#include <WebKit/ForEachCoClass.h> #include <WebKit/WebKit.h> -#include <fcntl.h> -#include <io.h> -#include <windows.h> -#include <stdio.h> -#include <shlwapi.h> -using std::wstring; +using namespace std; #ifndef NDEBUG const LPWSTR TestPluginDir = L"TestNetscapePlugin_Debug"; @@ -79,12 +75,10 @@ static bool dumpPixels; static bool dumpAllPixels; static bool printSeparators; static bool leakChecking = false; -static bool timedOut = false; static bool threaded = false; +static bool forceComplexText = false; static RetainPtr<CFStringRef> persistentUserStyleSheetLocation; -static const char* currentTest; - volatile bool done; // This is the topmost frame that is loading, during a given load, or nil when no load is // in progress. Usually this is the same as the main frame, but not always. In the case @@ -101,12 +95,9 @@ COMPtr<ResourceLoadDelegate> sharedResourceLoadDelegate; IWebFrame* frame; HWND webViewWindow; -LayoutTestController* layoutTestController = 0; +LayoutTestController* gLayoutTestController = 0; CFRunLoopTimerRef waitToDumpWatchdog = 0; -static const unsigned timeoutValue = 60000; -static const unsigned timeoutId = 10; - const unsigned maxViewWidth = 800; const unsigned maxViewHeight = 600; @@ -126,12 +117,6 @@ wstring urlSuitableForTestResult(const wstring& url) static LRESULT CALLBACK DumpRenderTreeWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) { switch (msg) { - case WM_TIMER: - // The test ran long enough to time out - timedOut = true; - PostQuitMessage(0); - return 0; - break; case WM_DESTROY: for (unsigned i = openWindows().size() - 1; i >= 0; --i) { if (openWindows()[i] == hWnd) { @@ -230,7 +215,16 @@ static void initialize() TEXT("Times Bold.ttf"), TEXT("Times Italic.ttf"), TEXT("Times Roman.ttf"), - TEXT("WebKit Layout Tests.ttf") + TEXT("WebKit Layout Tests.ttf"), + TEXT("WebKitWeightWatcher100.ttf"), + TEXT("WebKitWeightWatcher200.ttf"), + TEXT("WebKitWeightWatcher300.ttf"), + TEXT("WebKitWeightWatcher400.ttf"), + TEXT("WebKitWeightWatcher500.ttf"), + TEXT("WebKitWeightWatcher600.ttf"), + TEXT("WebKitWeightWatcher700.ttf"), + TEXT("WebKitWeightWatcher800.ttf"), + TEXT("WebKitWeightWatcher900.ttf") }; wstring resourcesPath = fontsPath(); @@ -293,7 +287,7 @@ void dumpFrameScrollPosition(IWebFrame* frame) printf("scrolled to %.f,%.f\n", (double)scrollPosition.cx, (double)scrollPosition.cy); } - if (::layoutTestController->dumpChildFrameScrollPositions()) { + if (::gLayoutTestController->dumpChildFrameScrollPositions()) { COMPtr<IEnumVARIANT> enumKids; if (FAILED(frame->childFrames(&enumKids))) return; @@ -350,7 +344,7 @@ static wstring dumpFramesAsText(IWebFrame* frame) SysFreeString(innerText); - if (::layoutTestController->dumpChildFramesAsText()) { + if (::gLayoutTestController->dumpChildFramesAsText()) { COMPtr<IEnumVARIANT> enumKids; if (FAILED(frame->childFrames(&enumKids))) return L""; @@ -553,7 +547,7 @@ void dump() if (SUCCEEDED(dataSource->response(&response)) && response) { BSTR mimeType; if (SUCCEEDED(response->MIMEType(&mimeType))) - ::layoutTestController->setDumpAsText(::layoutTestController->dumpAsText() | !_tcscmp(mimeType, TEXT("text/plain"))); + ::gLayoutTestController->setDumpAsText(::gLayoutTestController->dumpAsText() | !_tcscmp(mimeType, TEXT("text/plain"))); SysFreeString(mimeType); } } @@ -561,13 +555,13 @@ void dump() BSTR resultString = 0; if (dumpTree) { - if (::layoutTestController->dumpAsText()) { + if (::gLayoutTestController->dumpAsText()) { ::InvalidateRect(webViewWindow, 0, TRUE); ::SendMessage(webViewWindow, WM_PAINT, 0, 0); wstring result = dumpFramesAsText(frame); resultString = SysAllocStringLen(result.data(), result.size()); } else { - bool isSVGW3CTest = strstr(currentTest, "svg\\W3C-SVG-1.1"); + bool isSVGW3CTest = (gLayoutTestController->testPathOrURL().find("svg\\W3C-SVG-1.1") != string::npos); unsigned width; unsigned height; if (isSVGW3CTest) { @@ -589,7 +583,7 @@ void dump() } if (!resultString) - printf("ERROR: nil result from %s", ::layoutTestController->dumpAsText() ? "IDOMElement::innerText" : "IFrameViewPrivate::renderTreeAsExternalRepresentation"); + printf("ERROR: nil result from %s", ::gLayoutTestController->dumpAsText() ? "IDOMElement::innerText" : "IFrameViewPrivate::renderTreeAsExternalRepresentation"); else { unsigned stringLength = SysStringLen(resultString); int bufferSize = ::WideCharToMultiByte(CP_UTF8, 0, resultString, stringLength, 0, 0, 0, 0); @@ -597,23 +591,28 @@ void dump() ::WideCharToMultiByte(CP_UTF8, 0, resultString, stringLength, buffer, bufferSize + 1, 0, 0); fwrite(buffer, 1, bufferSize, stdout); free(buffer); - if (!::layoutTestController->dumpAsText()) + if (!::gLayoutTestController->dumpAsText()) dumpFrameScrollPosition(frame); } - if (::layoutTestController->dumpBackForwardList()) + if (::gLayoutTestController->dumpBackForwardList()) dumpBackForwardListForAllWindows(); } - if (printSeparators) - puts("#EOF"); + if (printSeparators) { + puts("#EOF"); // terminate the content block + fputs("#EOF\n", stderr); + fflush(stdout); + fflush(stderr); + } if (dumpPixels) { - if (layoutTestController->dumpAsText() || layoutTestController->dumpDOMAsWebArchive() || layoutTestController->dumpSourceAsWebArchive()) - printf("#EOF\n"); - else - dumpWebViewAsPixelsAndCompareWithExpected(currentTest, dumpAllPixels); + if (!gLayoutTestController->dumpAsText() && !gLayoutTestController->dumpDOMAsWebArchive() && !gLayoutTestController->dumpSourceAsWebArchive()) + dumpWebViewAsPixelsAndCompareWithExpected(gLayoutTestController->expectedPixelHash()); } + printf("#EOF\n"); // terminate the (possibly empty) pixels block + fflush(stdout); + fail: SysFreeString(resultString); // This will exit from our message loop @@ -635,8 +634,10 @@ static void resetWebViewToConsistentStateBeforeTesting() webView->setPolicyDelegate(0); COMPtr<IWebIBActions> webIBActions(Query, webView); - if (webIBActions) + if (webIBActions) { webIBActions->makeTextStandardSize(0); + webIBActions->resetPageZoom(0); + } COMPtr<IWebPreferences> preferences; if (SUCCEEDED(webView->preferences(&preferences))) { @@ -654,26 +655,48 @@ static void resetWebViewToConsistentStateBeforeTesting() preferences->setUserStyleSheetEnabled(FALSE); COMPtr<IWebPreferencesPrivate> prefsPrivate(Query, preferences); - if (prefsPrivate) + if (prefsPrivate) { prefsPrivate->setAuthorAndUserStylesEnabled(TRUE); + prefsPrivate->setDeveloperExtrasEnabled(FALSE); + } } + COMPtr<IWebViewEditing> viewEditing; + if (SUCCEEDED(webView->QueryInterface(&viewEditing))) + viewEditing->setSmartInsertDeleteEnabled(TRUE); + COMPtr<IWebViewPrivate> webViewPrivate(Query, webView); if (!webViewPrivate) return; + COMPtr<IWebInspector> inspector; + if (SUCCEEDED(webViewPrivate->inspector(&inspector))) + inspector->setJavaScriptProfilingEnabled(FALSE); + HWND viewWindow; if (SUCCEEDED(webViewPrivate->viewWindow(reinterpret_cast<OLE_HANDLE*>(&viewWindow))) && viewWindow) SetFocus(viewWindow); + + webViewPrivate->clearMainFrameName(); } -static void runTest(const char* pathOrURL) +static void runTest(const string& testPathOrURL) { static BSTR methodBStr = SysAllocString(TEXT("GET")); + // Look for "'" as a separator between the path or URL, and the pixel dump hash that follows. + string pathOrURL(testPathOrURL); + string expectedPixelHash; + + size_t separatorPos = pathOrURL.find("'"); + if (separatorPos != string::npos) { + pathOrURL = string(testPathOrURL, 0, separatorPos); + expectedPixelHash = string(testPathOrURL, separatorPos + 1); + } + BSTR urlBStr; - CFStringRef str = CFStringCreateWithCString(0, pathOrURL, kCFStringEncodingWindowsLatin1); + CFStringRef str = CFStringCreateWithCString(0, pathOrURL.c_str(), kCFStringEncodingWindowsLatin1); CFURLRef url = CFURLCreateWithString(0, str, 0); if (!url) @@ -692,15 +715,12 @@ static void runTest(const char* pathOrURL) CFRelease(url); - currentTest = pathOrURL; - - ::layoutTestController = new LayoutTestController(false, false); + ::gLayoutTestController = new LayoutTestController(pathOrURL, expectedPixelHash); done = false; topLoadingFrame = 0; - timedOut = false; - if (shouldLogFrameLoadDelegates(pathOrURL)) - layoutTestController->setDumpFrameLoadCallbacks(true); + if (shouldLogFrameLoadDelegates(pathOrURL.c_str())) + gLayoutTestController->setDumpFrameLoadCallbacks(true); COMPtr<IWebHistory> history(Create, CLSID_WebHistory); if (history) @@ -723,15 +743,12 @@ static void runTest(const char* pathOrURL) HWND hostWindow; webView->hostWindow(reinterpret_cast<OLE_HANDLE*>(&hostWindow)); - // Set the test timeout timer - SetTimer(hostWindow, timeoutId, timeoutValue, 0); - COMPtr<IWebMutableURLRequest> request; HRESULT hr = CoCreateInstance(CLSID_WebMutableURLRequest, 0, CLSCTX_ALL, IID_IWebMutableURLRequest, (void**)&request); if (FAILED(hr)) goto exit; - request->initWithURL(urlBStr, WebURLRequestUseProtocolCachePolicy, 0); + request->initWithURL(urlBStr, WebURLRequestUseProtocolCachePolicy, 60); request->setHTTPMethod(methodBStr); frame->loadRequest(request.get()); @@ -746,19 +763,10 @@ static void runTest(const char* pathOrURL) TranslateMessage(&msg); DispatchMessage(&msg); } - KillTimer(hostWindow, timeoutId); - - if (timedOut) { - fprintf(stderr, "ERROR: Timed out running %s\n", pathOrURL); - printf("ERROR: Timed out loading page\n"); - - if (printSeparators) - puts("#EOF"); - } frame->stopLoading(); - if (::layoutTestController->closeRemainingWindowsWhenComplete()) { + if (::gLayoutTestController->closeRemainingWindowsWhenComplete()) { Vector<HWND> windows = openWindows(); unsigned size = windows.size(); for (unsigned i = 0; i < size; i++) { @@ -774,7 +782,8 @@ static void runTest(const char* pathOrURL) exit: SysFreeString(urlBStr); - delete ::layoutTestController; + ::gLayoutTestController->deref(); + ::gLayoutTestController = 0; return; } @@ -854,7 +863,7 @@ void* runJavaScriptThread(void* arg) JSStringRef scriptRef = JSStringCreateWithUTF8CString(script); JSValueRef exception = 0; - JSEvaluateScript(ctx, scriptRef, 0, 0, 0, &exception); + JSEvaluateScript(ctx, scriptRef, 0, 0, 1, &exception); assert(!exception); JSGlobalContextRelease(ctx); @@ -963,11 +972,12 @@ IWebView* createWebViewAndOffscreenWindow(HWND* webViewWindow) return 0; viewPrivate->setShouldApplyMacFontAscentHack(TRUE); + viewPrivate->setAlwaysUsesComplexTextCodePath(forceComplexText); BSTR pluginPath = SysAllocStringLen(0, exePath().length() + _tcslen(TestPluginDir)); _tcscpy(pluginPath, exePath().c_str()); _tcscat(pluginPath, TestPluginDir); - failed = FAILED(viewPrivate->addAdditionalPluginPath(pluginPath)); + failed = FAILED(viewPrivate->addAdditionalPluginDirectory(pluginPath)); SysFreeString(pluginPath); if (failed) return 0; @@ -1016,6 +1026,7 @@ int main(int argc, char* argv[]) leakChecking = false; _setmode(1, _O_BINARY); + _setmode(2, _O_BINARY); initialize(); @@ -1037,6 +1048,11 @@ int main(int argc, char* argv[]) continue; } + if (!stricmp(argv[i], "--complex-text")) { + forceComplexText = true; + continue; + } + tests.append(argv[i]); } @@ -1083,7 +1099,6 @@ int main(int argc, char* argv[]) continue; runTest(filenameBuffer); - fflush(stdout); } } else { printSeparators = tests.size() > 1; @@ -1106,5 +1121,7 @@ int main(int argc, char* argv[]) } #endif + shutDownWebKit(); + return 0; } diff --git a/WebKitTools/DumpRenderTree/win/DumpRenderTree.vcproj b/WebKitTools/DumpRenderTree/win/DumpRenderTree.vcproj index a357f29..e094bde 100644 --- a/WebKitTools/DumpRenderTree/win/DumpRenderTree.vcproj +++ b/WebKitTools/DumpRenderTree/win/DumpRenderTree.vcproj @@ -23,7 +23,7 @@ >
<Tool
Name="VCPreBuildEventTool"
- CommandLine="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"
"
+ CommandLine="set PATH=%SystemDrive%\cygwin\bin;%PATH%
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"
@@ -39,9 +39,10 @@ />
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""$(ProjectDir)\.";"$(ProjectDir)\..";"$(ProjectDir)\..\cg";"$(WebKitOutputDir)\Include";"$(WebKitOutputDir)\Include\DumpRenderTree\ForwardingHeaders";"$(WebKitOutputDir)\Include\JavaScriptCore";"$(WebKitLibrariesDir)\Include";"$(WebKitLibrariesDir)\include\pthreads";"$(WebKitOutputDir)\Include\WebCore";"$(WebKitLibrariesDir)\Include\WebCore";"$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders""
+ AdditionalIncludeDirectories=""$(ProjectDir)\.";"$(ProjectDir)\..";"$(ProjectDir)\..\cg";"$(WebKitOutputDir)\Include";"$(WebKitOutputDir)\Include\DumpRenderTree\ForwardingHeaders";"$(WebKitOutputDir)\Include\JavaScriptCore";"$(WebKitLibrariesDir)\Include";"$(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"
@@ -54,7 +55,7 @@ />
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="WebKitGUID$(WebKitConfigSuffix).lib WebKit$(WebKitDLLConfigSuffix).lib WTF$(WebKitConfigSuffix).lib CoreGraphics$(LibraryConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib CFNetwork$(LibraryConfigSuffix).lib pthreadVC2$(LibraryConfigSuffix).lib gdi32.lib ole32.lib oleaut32.lib user32.lib shlwapi.lib"
+ AdditionalDependencies="WebKitGUID$(WebKitConfigSuffix).lib WebKit$(WebKitDLLConfigSuffix).lib WTF$(WebKitConfigSuffix).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"
AdditionalLibraryDirectories=""
DelayLoadDLLs=""
SubSystem="1"
@@ -65,6 +66,8 @@ />
<Tool
Name="VCManifestTool"
+ TypeLibraryFile="$(WebKitOutputDir)\lib\WebKit.tlb"
+ ComponentFileName="WebKit$(WebKitDLLConfigSuffix)"
/>
<Tool
Name="VCXDCMakeTool"
@@ -83,7 +86,7 @@ />
<Tool
Name="VCPostBuildEventTool"
- CommandLine="
"
+ CommandLine="if exist "$(WebKitOutputDir)\buildfailed" del "$(WebKitOutputDir)\buildfailed"

if "$(ARCHIVE_BUILD)"=="" (if not "$(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
@@ -95,7 +98,7 @@ >
<Tool
Name="VCPreBuildEventTool"
- CommandLine="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"
"
+ CommandLine="set PATH=%SystemDrive%\cygwin\bin;%PATH%
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"
@@ -111,9 +114,10 @@ />
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""$(ProjectDir)\.";"$(ProjectDir)\..";"$(ProjectDir)\..\cg";"$(WebKitOutputDir)\Include";"$(WebKitOutputDir)\Include\DumpRenderTree\ForwardingHeaders";"$(WebKitOutputDir)\Include\JavaScriptCore";"$(WebKitLibrariesDir)\Include";"$(WebKitLibrariesDir)\include\pthreads";"$(WebKitOutputDir)\Include\WebCore";"$(WebKitLibrariesDir)\Include\WebCore";"$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders""
+ AdditionalIncludeDirectories=""$(ProjectDir)\.";"$(ProjectDir)\..";"$(ProjectDir)\..\cg";"$(WebKitOutputDir)\Include";"$(WebKitOutputDir)\Include\DumpRenderTree\ForwardingHeaders";"$(WebKitOutputDir)\Include\JavaScriptCore";"$(WebKitLibrariesDir)\Include";"$(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"
@@ -126,7 +130,7 @@ />
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="WebKitGUID$(WebKitConfigSuffix).lib WebKit$(WebKitDLLConfigSuffix).lib WTF$(WebKitConfigSuffix).lib CoreGraphics$(LibraryConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib CFNetwork$(LibraryConfigSuffix).lib pthreadVC2$(LibraryConfigSuffix).lib gdi32.lib ole32.lib oleaut32.lib user32.lib shlwapi.lib"
+ AdditionalDependencies="WebKitGUID$(WebKitConfigSuffix).lib WebKit$(WebKitDLLConfigSuffix).lib WTF$(WebKitConfigSuffix).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"
AdditionalLibraryDirectories=""
DelayLoadDLLs=""
SubSystem="1"
@@ -137,6 +141,8 @@ />
<Tool
Name="VCManifestTool"
+ TypeLibraryFile="$(WebKitOutputDir)\lib\WebKit.tlb"
+ ComponentFileName="WebKit$(WebKitDLLConfigSuffix)"
/>
<Tool
Name="VCXDCMakeTool"
@@ -155,7 +161,7 @@ />
<Tool
Name="VCPostBuildEventTool"
- CommandLine="
"
+ CommandLine="if exist "$(WebKitOutputDir)\buildfailed" del "$(WebKitOutputDir)\buildfailed"

if "$(ARCHIVE_BUILD)"=="" (if not "$(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
@@ -166,7 +172,7 @@ >
<Tool
Name="VCPreBuildEventTool"
- CommandLine="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"
"
+ CommandLine="set PATH=%SystemDrive%\cygwin\bin;%PATH%
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"
@@ -182,9 +188,10 @@ />
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""$(ProjectDir)\.";"$(ProjectDir)\..";"$(ProjectDir)\..\cg";"$(WebKitOutputDir)\Include";"$(WebKitOutputDir)\Include\DumpRenderTree\ForwardingHeaders";"$(WebKitOutputDir)\Include\JavaScriptCore";"$(WebKitLibrariesDir)\Include";"$(WebKitLibrariesDir)\include\pthreads";"$(WebKitOutputDir)\Include\WebCore";"$(WebKitLibrariesDir)\Include\WebCore";"$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders""
+ AdditionalIncludeDirectories=""$(ProjectDir)\.";"$(ProjectDir)\..";"$(ProjectDir)\..\cg";"$(WebKitOutputDir)\Include";"$(WebKitOutputDir)\Include\DumpRenderTree\ForwardingHeaders";"$(WebKitOutputDir)\Include\JavaScriptCore";"$(WebKitLibrariesDir)\Include";"$(WebKitLibrariesDir)\include\pthreads";"$(WebKitOutputDir)\Include\WebCore";"$(WebKitLibrariesDir)\Include\WebCore";"$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders";"$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility""
PreprocessorDefinitions="_CONSOLE;DEBUG_WEBKIT_HAS_SUFFIX"
DisableSpecificWarnings="4146"
+ ForcedIncludeFiles="DumpRenderTreePrefix.h"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -197,7 +204,7 @@ />
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="WebKitGUID$(WebKitConfigSuffix).lib WebKit$(WebKitDLLConfigSuffix).lib WTF$(WebKitConfigSuffix).lib CoreGraphics$(LibraryConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib CFNetwork$(LibraryConfigSuffix).lib pthreadVC2$(LibraryConfigSuffix).lib gdi32.lib ole32.lib oleaut32.lib user32.lib shlwapi.lib"
+ AdditionalDependencies="WebKitGUID$(WebKitConfigSuffix).lib WebKit$(WebKitDLLConfigSuffix).lib WTF$(WebKitConfigSuffix).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"
AdditionalLibraryDirectories=""
DelayLoadDLLs=""
SubSystem="1"
@@ -207,6 +214,8 @@ />
<Tool
Name="VCManifestTool"
+ TypeLibraryFile="$(WebKitOutputDir)\lib\WebKit.tlb"
+ ComponentFileName="WebKit$(WebKitDLLConfigSuffix)"
/>
<Tool
Name="VCXDCMakeTool"
@@ -225,7 +234,7 @@ />
<Tool
Name="VCPostBuildEventTool"
- CommandLine="
"
+ CommandLine="if exist "$(WebKitOutputDir)\buildfailed" del "$(WebKitOutputDir)\buildfailed"

if "$(ARCHIVE_BUILD)"=="" (if not "$(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>
@@ -236,6 +245,18 @@ Name="Controllers"
>
<File
+ RelativePath="..\AccessibilityController.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\AccessibilityController.h"
+ >
+ </File>
+ <File
+ RelativePath=".\AccessibilityControllerWin.cpp"
+ >
+ </File>
+ <File
RelativePath=".\EventSender.cpp"
>
</File>
@@ -313,6 +334,18 @@ </File>
</Filter>
<File
+ RelativePath="..\AccessibilityUIElement.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\AccessibilityUIElement.h"
+ >
+ </File>
+ <File
+ RelativePath=".\AccessibilityUIElementWin.cpp"
+ >
+ </File>
+ <File
RelativePath=".\DraggingInfo.h"
>
</File>
@@ -325,6 +358,10 @@ >
</File>
<File
+ RelativePath="..\DumpRenderTreePrefix.h"
+ >
+ </File>
+ <File
RelativePath=".\DumpRenderTreeWin.h"
>
</File>
diff --git a/WebKitTools/DumpRenderTree/win/DumpRenderTreeWin.h b/WebKitTools/DumpRenderTree/win/DumpRenderTreeWin.h index 54dc697..45ce0dc 100644 --- a/WebKitTools/DumpRenderTree/win/DumpRenderTreeWin.h +++ b/WebKitTools/DumpRenderTree/win/DumpRenderTreeWin.h @@ -29,25 +29,6 @@ #ifndef DumpRenderTreeWin_h #define DumpRenderTreeWin_h -#undef _WIN32_WINNT -#define _WIN32_WINNT 0x0500 - -#undef WINVER -#define WINVER 0x0500 - -// If we don't define these, they get defined in windef.h. -// We want to use std::min and std::max -#undef max -#define max max -#undef min -#define min min - -#undef _WINSOCKAPI_ -#define _WINSOCKAPI_ // Prevent inclusion of winsock.h in windows.h - -// FIXME: we should add a config.h file for DumpRenderTree. -#define WTF_PLATFORM_CF 1 - struct IWebFrame; struct IWebPolicyDelegate; struct IWebView; diff --git a/WebKitTools/DumpRenderTree/win/EditingDelegate.cpp b/WebKitTools/DumpRenderTree/win/EditingDelegate.cpp index 7add64e..32c02bd 100644 --- a/WebKitTools/DumpRenderTree/win/EditingDelegate.cpp +++ b/WebKitTools/DumpRenderTree/win/EditingDelegate.cpp @@ -26,9 +26,10 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "DumpRenderTree.h" +#include "config.h" #include "EditingDelegate.h" +#include "DumpRenderTree.h" #include "LayoutTestController.h" #include <WebCore/COMPtr.h> #include <wtf/Platform.h> @@ -127,7 +128,7 @@ HRESULT STDMETHODCALLTYPE EditingDelegate::shouldBeginEditingInDOMRange( return E_POINTER; } - if (::layoutTestController->dumpEditingCallbacks() && !done) + if (::gLayoutTestController->dumpEditingCallbacks() && !done) _tprintf(TEXT("EDITING DELEGATE: shouldBeginEditingInDOMRange:%s\n"), dump(range)); *result = m_acceptsEditing; @@ -144,7 +145,7 @@ HRESULT STDMETHODCALLTYPE EditingDelegate::shouldEndEditingInDOMRange( return E_POINTER; } - if (::layoutTestController->dumpEditingCallbacks() && !done) + if (::gLayoutTestController->dumpEditingCallbacks() && !done) _tprintf(TEXT("EDITING DELEGATE: shouldEndEditingInDOMRange:%s\n"), dump(range)); *result = m_acceptsEditing; @@ -163,7 +164,7 @@ HRESULT STDMETHODCALLTYPE EditingDelegate::shouldInsertNode( TEXT("WebViewInsertActionDropped"), }; - if (::layoutTestController->dumpEditingCallbacks() && !done) + if (::gLayoutTestController->dumpEditingCallbacks() && !done) _tprintf(TEXT("EDITING DELEGATE: shouldInsertNode:%s replacingDOMRange:%s givenAction:%s\n"), dumpPath(node), dump(range), insertactionstring[action]); return S_OK; @@ -187,7 +188,7 @@ HRESULT STDMETHODCALLTYPE EditingDelegate::shouldInsertText( TEXT("WebViewInsertActionDropped"), }; - if (::layoutTestController->dumpEditingCallbacks() && !done) + if (::gLayoutTestController->dumpEditingCallbacks() && !done) _tprintf(TEXT("EDITING DELEGATE: shouldInsertText:%s replacingDOMRange:%s givenAction:%s\n"), text ? text : TEXT(""), dump(range), insertactionstring[action]); *result = m_acceptsEditing; @@ -204,7 +205,7 @@ HRESULT STDMETHODCALLTYPE EditingDelegate::shouldDeleteDOMRange( return E_POINTER; } - if (::layoutTestController->dumpEditingCallbacks() && !done) + if (::gLayoutTestController->dumpEditingCallbacks() && !done) _tprintf(TEXT("EDITING DELEGATE: shouldDeleteDOMRange:%s\n"), dump(range)); *result = m_acceptsEditing; @@ -233,7 +234,7 @@ HRESULT STDMETHODCALLTYPE EditingDelegate::shouldChangeSelectedDOMRange( TEXT("TRUE") }; - if (::layoutTestController->dumpEditingCallbacks() && !done) + if (::gLayoutTestController->dumpEditingCallbacks() && !done) _tprintf(TEXT("EDITING DELEGATE: shouldChangeSelectedDOMRange:%s toDOMRange:%s affinity:%s stillSelecting:%s\n"), dump(currentRange), dump(proposedRange), affinitystring[selectionAffinity], boolstring[stillSelecting]); *result = m_acceptsEditing; @@ -251,7 +252,7 @@ HRESULT STDMETHODCALLTYPE EditingDelegate::shouldApplyStyle( return E_POINTER; } - if (::layoutTestController->dumpEditingCallbacks() && !done) + if (::gLayoutTestController->dumpEditingCallbacks() && !done) _tprintf(TEXT("EDITING DELEGATE: shouldApplyStyle:%s toElementsInDOMRange:%s\n"), TEXT("'style description'")/*[[style description] UTF8String]*/, dump(range)); *result = m_acceptsEditing; @@ -269,7 +270,7 @@ HRESULT STDMETHODCALLTYPE EditingDelegate::shouldChangeTypingStyle( return E_POINTER; } - if (::layoutTestController->dumpEditingCallbacks() && !done) + if (::gLayoutTestController->dumpEditingCallbacks() && !done) _tprintf(TEXT("EDITING DELEGATE: shouldChangeTypingStyle:%s toStyle:%s\n"), TEXT("'currentStyle description'"), TEXT("'proposedStyle description'")); *result = m_acceptsEditing; @@ -286,7 +287,7 @@ HRESULT STDMETHODCALLTYPE EditingDelegate::doPlatformCommand( return E_POINTER; } - if (::layoutTestController->dumpEditingCallbacks() && !done) + if (::gLayoutTestController->dumpEditingCallbacks() && !done) _tprintf(TEXT("EDITING DELEGATE: doPlatformCommand:%s\n"), command ? command : TEXT("")); *result = m_acceptsEditing; @@ -296,7 +297,7 @@ HRESULT STDMETHODCALLTYPE EditingDelegate::doPlatformCommand( HRESULT STDMETHODCALLTYPE EditingDelegate::webViewDidBeginEditing( /* [in] */ IWebNotification* notification) { - if (::layoutTestController->dumpEditingCallbacks() && !done) { + if (::gLayoutTestController->dumpEditingCallbacks() && !done) { BSTR name; notification->name(&name); _tprintf(TEXT("EDITING DELEGATE: webViewDidBeginEditing:%s\n"), name ? name : TEXT("")); @@ -308,7 +309,7 @@ HRESULT STDMETHODCALLTYPE EditingDelegate::webViewDidBeginEditing( HRESULT STDMETHODCALLTYPE EditingDelegate::webViewDidChange( /* [in] */ IWebNotification *notification) { - if (::layoutTestController->dumpEditingCallbacks() && !done) { + if (::gLayoutTestController->dumpEditingCallbacks() && !done) { BSTR name; notification->name(&name); _tprintf(TEXT("EDITING DELEGATE: webViewDidBeginEditing:%s\n"), name ? name : TEXT("")); @@ -320,7 +321,7 @@ HRESULT STDMETHODCALLTYPE EditingDelegate::webViewDidChange( HRESULT STDMETHODCALLTYPE EditingDelegate::webViewDidEndEditing( /* [in] */ IWebNotification *notification) { - if (::layoutTestController->dumpEditingCallbacks() && !done) { + if (::gLayoutTestController->dumpEditingCallbacks() && !done) { BSTR name; notification->name(&name); _tprintf(TEXT("EDITING DELEGATE: webViewDidEndEditing:%s\n"), name ? name : TEXT("")); @@ -332,7 +333,7 @@ HRESULT STDMETHODCALLTYPE EditingDelegate::webViewDidEndEditing( HRESULT STDMETHODCALLTYPE EditingDelegate::webViewDidChangeTypingStyle( /* [in] */ IWebNotification *notification) { - if (::layoutTestController->dumpEditingCallbacks() && !done) { + if (::gLayoutTestController->dumpEditingCallbacks() && !done) { BSTR name; notification->name(&name); _tprintf(TEXT("EDITING DELEGATE: webViewDidChangeTypingStyle:%s\n"), name ? name : TEXT("")); @@ -344,7 +345,7 @@ HRESULT STDMETHODCALLTYPE EditingDelegate::webViewDidChangeTypingStyle( HRESULT STDMETHODCALLTYPE EditingDelegate::webViewDidChangeSelection( /* [in] */ IWebNotification *notification) { - if (::layoutTestController->dumpEditingCallbacks() && !done) { + if (::gLayoutTestController->dumpEditingCallbacks() && !done) { BSTR name; notification->name(&name); _tprintf(TEXT("EDITING DELEGATE: webViewDidChangeSelection:%s\n"), name ? name : TEXT("")); diff --git a/WebKitTools/DumpRenderTree/win/EditingDelegate.h b/WebKitTools/DumpRenderTree/win/EditingDelegate.h index 4ed74b2..6dba675 100644 --- a/WebKitTools/DumpRenderTree/win/EditingDelegate.h +++ b/WebKitTools/DumpRenderTree/win/EditingDelegate.h @@ -29,7 +29,7 @@ #ifndef EditingDelegate_h #define EditingDelegate_h -#include <WebKit/IWebEditingDelegate.h> +#include <WebKit/WebKit.h> class __declspec(uuid("265DCD4B-79C3-44a2-84BC-511C3EDABD6F")) EditingDelegate : public IWebEditingDelegate { public: diff --git a/WebKitTools/DumpRenderTree/win/EventSender.cpp b/WebKitTools/DumpRenderTree/win/EventSender.cpp index 66d8772..efecc03 100644 --- a/WebKitTools/DumpRenderTree/win/EventSender.cpp +++ b/WebKitTools/DumpRenderTree/win/EventSender.cpp @@ -26,18 +26,18 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "DumpRenderTree.h" +#include "config.h" #include "EventSender.h" #include "DraggingInfo.h" +#include "DumpRenderTree.h" #include <WebCore/COMPtr.h> #include <wtf/ASCIICType.h> #include <wtf/Platform.h> #include <JavaScriptCore/JavaScriptCore.h> #include <JavaScriptCore/Assertions.h> -#include <WebKit/IWebFrame.h> -#include <WebKit/IWebFramePrivate.h> +#include <WebKit/WebKit.h> #include <windows.h> #define WM_DRT_SEND_QUEUED_EVENT (WM_APP+1) @@ -485,8 +485,8 @@ static JSValueRef textZoomInCallback(JSContextRef context, JSObjectRef function, if (FAILED(frame->webView(&webView))) return JSValueMakeUndefined(context); - COMPtr<IWebIBActions> webIBActions; - if (FAILED(webView->QueryInterface(IID_IWebIBActions, (void**)&webIBActions))) + COMPtr<IWebIBActions> webIBActions(Query, webView); + if (!webIBActions) return JSValueMakeUndefined(context); webIBActions->makeTextLarger(0); @@ -499,14 +499,42 @@ static JSValueRef textZoomOutCallback(JSContextRef context, JSObjectRef function if (FAILED(frame->webView(&webView))) return JSValueMakeUndefined(context); - COMPtr<IWebIBActions> webIBActions; - if (FAILED(webView->QueryInterface(IID_IWebIBActions, (void**)&webIBActions))) + COMPtr<IWebIBActions> webIBActions(Query, webView); + if (!webIBActions) return JSValueMakeUndefined(context); webIBActions->makeTextSmaller(0); return JSValueMakeUndefined(context); } +static JSValueRef zoomPageInCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) +{ + COMPtr<IWebView> webView; + if (FAILED(frame->webView(&webView))) + return JSValueMakeUndefined(context); + + COMPtr<IWebIBActions> webIBActions(Query, webView); + if (!webIBActions) + return JSValueMakeUndefined(context); + + webIBActions->zoomPageIn(0); + return JSValueMakeUndefined(context); +} + +static JSValueRef zoomPageOutCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) +{ + COMPtr<IWebView> webView; + if (FAILED(frame->webView(&webView))) + return JSValueMakeUndefined(context); + + COMPtr<IWebIBActions> webIBActions(Query, webView); + if (!webIBActions) + return JSValueMakeUndefined(context); + + webIBActions->zoomPageOut(0); + return JSValueMakeUndefined(context); +} + static JSStaticFunction staticFunctions[] = { { "contextClick", contextClickCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, { "mouseDown", mouseDownCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, @@ -517,6 +545,8 @@ static JSStaticFunction staticFunctions[] = { { "dispatchMessage", dispatchMessageCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, { "textZoomIn", textZoomInCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, { "textZoomOut", textZoomOutCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, + { "zoomPageIn", zoomPageInCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, + { "zoomPageOut", zoomPageOutCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, { 0, 0, 0 } }; diff --git a/WebKitTools/DumpRenderTree/win/FrameLoadDelegate.cpp b/WebKitTools/DumpRenderTree/win/FrameLoadDelegate.cpp index b436352..b18b961 100644 --- a/WebKitTools/DumpRenderTree/win/FrameLoadDelegate.cpp +++ b/WebKitTools/DumpRenderTree/win/FrameLoadDelegate.cpp @@ -26,9 +26,11 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "DumpRenderTree.h" +#include "config.h" #include "FrameLoadDelegate.h" +#include "AccessibilityController.h" +#include "DumpRenderTree.h" #include "EventSender.h" #include "GCController.h" #include "LayoutTestController.h" @@ -37,8 +39,7 @@ #include <WebCore/COMPtr.h> #include <JavaScriptCore/Assertions.h> #include <JavaScriptCore/JavaScriptCore.h> -#include <WebKit/IWebFramePrivate.h> -#include <WebKit/IWebViewPrivate.h> +#include <WebKit/WebKit.h> #include <wtf/Vector.h> #include <stdio.h> #include <string> @@ -68,14 +69,13 @@ string descriptionSuitableForTestResult(IWebFrame* webFrame) if (FAILED(webView->mainFrame(&mainFrame))) return string(); - if (webFrame == mainFrame) - return "main frame"; - BSTR frameNameBSTR; - if (FAILED(webFrame->name(&frameNameBSTR))) - return string(); + if (FAILED(webFrame->name(&frameNameBSTR)) || BSTRtoString(frameNameBSTR).empty() ) + return (webFrame == mainFrame) ? "main frame" : string(); + + string frameName = (webFrame == mainFrame) ? "main frame" : "frame"; + frameName += " \"" + BSTRtoString(frameNameBSTR) + "\""; - string frameName = "frame \"" + BSTRtoString(frameNameBSTR) + "\""; SysFreeString(frameNameBSTR); return frameName; @@ -84,6 +84,7 @@ string descriptionSuitableForTestResult(IWebFrame* webFrame) FrameLoadDelegate::FrameLoadDelegate() : m_refCount(1) , m_gcController(new GCController) + , m_accessibilityController(new AccessibilityController) { } @@ -128,7 +129,7 @@ HRESULT STDMETHODCALLTYPE FrameLoadDelegate::didStartProvisionalLoadForFrame( /* [in] */ IWebView* webView, /* [in] */ IWebFrame* frame) { - if (!done && layoutTestController->dumpFrameLoadCallbacks()) + if (!done && gLayoutTestController->dumpFrameLoadCallbacks()) printf("%s - didStartProvisionalLoadForFrame\n", descriptionSuitableForTestResult(frame).c_str()); @@ -145,7 +146,7 @@ HRESULT STDMETHODCALLTYPE FrameLoadDelegate::didFailProvisionalLoadWithError( /* [in] */ IWebError *error, /* [in] */ IWebFrame *frame) { - if (!done && layoutTestController->dumpFrameLoadCallbacks()) + if (!done && gLayoutTestController->dumpFrameLoadCallbacks()) printf("%s - didFailProvisionalLoadWithError\n", descriptionSuitableForTestResult(frame).c_str()); @@ -162,7 +163,7 @@ HRESULT STDMETHODCALLTYPE FrameLoadDelegate::didCommitLoadForFrame( return hr; webViewPrivate->updateFocusedAndActiveState(); - if (!done && layoutTestController->dumpFrameLoadCallbacks()) + if (!done && gLayoutTestController->dumpFrameLoadCallbacks()) printf("%s - didCommitLoadForFrame\n", descriptionSuitableForTestResult(frame).c_str()); @@ -175,7 +176,7 @@ HRESULT STDMETHODCALLTYPE FrameLoadDelegate::didReceiveTitle( /* [in] */ BSTR title, /* [in] */ IWebFrame *frame) { - if (::layoutTestController->dumpTitleChanges() && !done) + if (::gLayoutTestController->dumpTitleChanges() && !done) printf("TITLE CHANGED: %S\n", title ? title : L""); return S_OK; } @@ -190,7 +191,7 @@ void FrameLoadDelegate::processWork() } // if we didn't start a new load, then we finished all the commands, so we're ready to dump state - if (!topLoadingFrame && !::layoutTestController->waitToDump()) + if (!topLoadingFrame && !::gLayoutTestController->waitToDump()) dump(); } @@ -210,7 +211,7 @@ void FrameLoadDelegate::locationChangeDone(IWebError*, IWebFrame* frame) topLoadingFrame = 0; WorkQueue::shared()->setFrozen(true); - if (::layoutTestController->waitToDump()) + if (::gLayoutTestController->waitToDump()) return; if (WorkQueue::shared()->count()) { @@ -227,7 +228,7 @@ HRESULT STDMETHODCALLTYPE FrameLoadDelegate::didFinishLoadForFrame( /* [in] */ IWebView* webView, /* [in] */ IWebFrame* frame) { - if (!done && layoutTestController->dumpFrameLoadCallbacks()) + if (!done && gLayoutTestController->dumpFrameLoadCallbacks()) printf("%s - didFinishLoadForFrame\n", descriptionSuitableForTestResult(frame).c_str()); @@ -259,12 +260,15 @@ HRESULT STDMETHODCALLTYPE FrameLoadDelegate::didClearWindowObject( { JSValueRef exception = 0; - ::layoutTestController->makeWindowObject(context, windowObject, &exception); + ::gLayoutTestController->makeWindowObject(context, windowObject, &exception); ASSERT(!exception); m_gcController->makeWindowObject(context, windowObject, &exception); ASSERT(!exception); + m_accessibilityController->makeWindowObject(context, windowObject, &exception); + ASSERT(!exception); + JSStringRef eventSenderStr = JSStringCreateWithUTF8CString("eventSender"); JSValueRef eventSender = makeEventSender(context); JSObjectSetProperty(context, windowObject, eventSenderStr, eventSender, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete, 0); @@ -277,9 +281,22 @@ HRESULT STDMETHODCALLTYPE FrameLoadDelegate::didFinishDocumentLoadForFrame( /* [in] */ IWebView *sender, /* [in] */ IWebFrame *frame) { - if (!done && layoutTestController->dumpFrameLoadCallbacks()) + if (!done && gLayoutTestController->dumpFrameLoadCallbacks()) printf("%s - didFinishDocumentLoadForFrame\n", descriptionSuitableForTestResult(frame).c_str()); + if (!done) { + COMPtr<IWebFramePrivate> webFramePrivate; + HRESULT hr = frame->QueryInterface(&webFramePrivate); + if (FAILED(hr)) + return hr; + unsigned pendingFrameUnloadEvents; + hr = webFramePrivate->pendingFrameUnloadEventCount(&pendingFrameUnloadEvents); + if (FAILED(hr)) + return hr; + if (pendingFrameUnloadEvents) + printf("%s - has %u onunload handler(s)\n", + descriptionSuitableForTestResult(frame).c_str(), pendingFrameUnloadEvents); + } return S_OK; } @@ -288,7 +305,7 @@ HRESULT STDMETHODCALLTYPE FrameLoadDelegate::didHandleOnloadEventsForFrame( /* [in] */ IWebView *sender, /* [in] */ IWebFrame *frame) { - if (!done && layoutTestController->dumpFrameLoadCallbacks()) + if (!done && gLayoutTestController->dumpFrameLoadCallbacks()) printf("%s - didHandleOnloadEventsForFrame\n", descriptionSuitableForTestResult(frame).c_str()); diff --git a/WebKitTools/DumpRenderTree/win/FrameLoadDelegate.h b/WebKitTools/DumpRenderTree/win/FrameLoadDelegate.h index 8e694be..1a134fc 100644 --- a/WebKitTools/DumpRenderTree/win/FrameLoadDelegate.h +++ b/WebKitTools/DumpRenderTree/win/FrameLoadDelegate.h @@ -29,10 +29,10 @@ #ifndef FrameLoadDelegate_h #define FrameLoadDelegate_h -#include <WebKit/IWebFrameLoadDelegate.h> -#include <WebKit/IWebFrameLoadDelegatePrivate.h> +#include <WebKit/WebKit.h> #include <wtf/OwnPtr.h> +class AccessibilityController; class GCController; class FrameLoadDelegate : public IWebFrameLoadDelegate2, public IWebFrameLoadDelegatePrivate { @@ -133,6 +133,7 @@ protected: ULONG m_refCount; OwnPtr<GCController> m_gcController; + OwnPtr<AccessibilityController> m_accessibilityController; }; #endif // FrameLoadDelegate_h diff --git a/WebKitTools/DumpRenderTree/win/GCControllerWin.cpp b/WebKitTools/DumpRenderTree/win/GCControllerWin.cpp index 8c41556..547aabc 100644 --- a/WebKitTools/DumpRenderTree/win/GCControllerWin.cpp +++ b/WebKitTools/DumpRenderTree/win/GCControllerWin.cpp @@ -26,11 +26,11 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "DumpRenderTree.h" +#include "config.h" #include "GCController.h" +#include "DumpRenderTree.h" #include <WebCore/COMPtr.h> -#include <WebKit/IWebJavaScriptCollector.h> #include <WebKit/WebKit.h> void GCController::collect() const diff --git a/WebKitTools/DumpRenderTree/win/ImageDiff.vcproj b/WebKitTools/DumpRenderTree/win/ImageDiff.vcproj index 2dc17c5..9da1a56 100644 --- a/WebKitTools/DumpRenderTree/win/ImageDiff.vcproj +++ b/WebKitTools/DumpRenderTree/win/ImageDiff.vcproj @@ -22,6 +22,7 @@ >
<Tool
Name="VCPreBuildEventTool"
+ CommandLine="set PATH=%SystemDrive%\cygwin\bin;%PATH%
if exist "$(WebKitOutputDir)\buildfailed" grep XX$(ProjectName)XX "$(WebKitOutputDir)\buildfailed"
if errorlevel 1 exit 1
echo XX$(ProjectName)XX > "$(WebKitOutputDir)\buildfailed"
"
/>
<Tool
Name="VCCustomBuildTool"
@@ -37,7 +38,7 @@ />
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""$(WebKitOutputDir)\include";"$(WebKitOutputDir)\include\WebCore\ForwardingHeaders";"$(WebKitLibrariesDir)\include""
+ AdditionalIncludeDirectories=""$(WebKitOutputDir)\include";"$(WebKitOutputDir)\include\WebCore\ForwardingHeaders";"$(WebKitLibrariesDir)\include";"$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders";"$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility""
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -77,6 +78,7 @@ />
<Tool
Name="VCPostBuildEventTool"
+ CommandLine="if exist "$(WebKitOutputDir)\buildfailed" del "$(WebKitOutputDir)\buildfailed"

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

if "$(ARCHIVE_BUILD)"=="" (if not "$(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 /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\icudt38.dll" "$(WebKitOutputDir)\bin"
xcopy /y /d "$(WebKitLibrariesDir)\bin\icudt38$(LibraryConfigSuffix).dll" "$(WebKitOutputDir)\bin"
xcopy /y /d "$(WebKitLibrariesDir)\bin\icuin38$(LibraryConfigSuffix).dll" "$(WebKitOutputDir)\bin"
xcopy /y /d "$(WebKitLibrariesDir)\bin\icuin38$(LibraryConfigSuffix).pdb" "$(WebKitOutputDir)\bin"
xcopy /y /d "$(WebKitLibrariesDir)\bin\icuuc38$(LibraryConfigSuffix).dll" "$(WebKitOutputDir)\bin"
xcopy /y /d "$(WebKitLibrariesDir)\bin\icuuc38$(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
@@ -88,6 +90,7 @@ >
<Tool
Name="VCPreBuildEventTool"
+ CommandLine="set PATH=%SystemDrive%\cygwin\bin;%PATH%
if exist "$(WebKitOutputDir)\buildfailed" grep XX$(ProjectName)XX "$(WebKitOutputDir)\buildfailed"
if errorlevel 1 exit 1
echo XX$(ProjectName)XX > "$(WebKitOutputDir)\buildfailed"
"
/>
<Tool
Name="VCCustomBuildTool"
@@ -103,7 +106,7 @@ />
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""$(WebKitOutputDir)\include";"$(WebKitOutputDir)\include\WebCore\ForwardingHeaders";"$(WebKitLibrariesDir)\include""
+ AdditionalIncludeDirectories=""$(WebKitOutputDir)\include";"$(WebKitOutputDir)\include\WebCore\ForwardingHeaders";"$(WebKitLibrariesDir)\include";"$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders";"$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility""
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -143,6 +146,7 @@ />
<Tool
Name="VCPostBuildEventTool"
+ CommandLine="if exist "$(WebKitOutputDir)\buildfailed" del "$(WebKitOutputDir)\buildfailed"

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

if "$(ARCHIVE_BUILD)"=="" (if not "$(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 /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\icudt38.dll" "$(WebKitOutputDir)\bin"
xcopy /y /d "$(WebKitLibrariesDir)\bin\icudt38$(LibraryConfigSuffix).dll" "$(WebKitOutputDir)\bin"
xcopy /y /d "$(WebKitLibrariesDir)\bin\icuin38$(LibraryConfigSuffix).dll" "$(WebKitOutputDir)\bin"
xcopy /y /d "$(WebKitLibrariesDir)\bin\icuin38$(LibraryConfigSuffix).pdb" "$(WebKitOutputDir)\bin"
xcopy /y /d "$(WebKitLibrariesDir)\bin\icuuc38$(LibraryConfigSuffix).dll" "$(WebKitOutputDir)\bin"
xcopy /y /d "$(WebKitLibrariesDir)\bin\icuuc38$(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>
diff --git a/WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp b/WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp index 5469cd4..275fcd3 100644 --- a/WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp +++ b/WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp @@ -6,13 +6,13 @@ * are met: * * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. + * 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. + * documentation and/or other materials provided with the distribution. * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED @@ -26,9 +26,10 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "DumpRenderTree.h" +#include "config.h" #include "LayoutTestController.h" +#include "DumpRenderTree.h" #include "EditingDelegate.h" #include "PolicyDelegate.h" #include "WorkQueue.h" @@ -40,9 +41,6 @@ #include <JavaScriptCore/Assertions.h> #include <JavaScriptCore/JavaScriptCore.h> #include <JavaScriptCore/JSRetainPtr.h> -#include <WebKit/IWebHistory.h> -#include <WebKit/IWebPreferencesPrivate.h> -#include <WebKit/IWebViewPrivate.h> #include <WebKit/WebKit.h> #include <string> #include <CoreFoundation/CoreFoundation.h> @@ -352,9 +350,10 @@ static bool followShortcuts(wstring& path) return true; // Do we have a shortcut? - path.append(TEXT(".lnk")); - if (!PathFileExists(path.c_str())) - return false; + wstring linkPath = path; + linkPath.append(TEXT(".lnk")); + if (!PathFileExists(linkPath.c_str())) + return true; // We have a shortcut, find its target. COMPtr<IShellLink> shortcut(Create, CLSID_ShellLink); @@ -363,7 +362,7 @@ static bool followShortcuts(wstring& path) COMPtr<IPersistFile> persistFile(Query, shortcut); if (!shortcut) return false; - if (FAILED(persistFile->Load(path.c_str(), STGM_READ))) + if (FAILED(persistFile->Load(linkPath.c_str(), STGM_READ))) return false; if (FAILED(shortcut->Resolve(0, 0))) return false; @@ -391,7 +390,7 @@ static bool resolveCygwinPath(const wstring& cygwinPath, wstring& windowsPath) DWORD rootPathSize = _countof(rootPath); DWORD keyType; DWORD result = ::SHGetValueW(HKEY_LOCAL_MACHINE, TEXT("SOFTWARE\\Cygnus Solutions\\Cygwin\\mounts v2\\/"), TEXT("native"), &keyType, &rootPath, &rootPathSize); - + if (result != ERROR_SUCCESS || keyType != REG_SZ) return false; @@ -509,6 +508,45 @@ void LayoutTestController::setWindowIsKey(bool flag) ::SendMessage(webViewWindow, flag ? WM_SETFOCUS : WM_KILLFOCUS, (WPARAM)::GetDesktopWindow(), 0); } +void LayoutTestController::setSmartInsertDeleteEnabled(bool flag) +{ + COMPtr<IWebView> webView; + if (FAILED(frame->webView(&webView))) + return; + + COMPtr<IWebViewEditing> viewEditing; + if (FAILED(webView->QueryInterface(&viewEditing))) + return; + + viewEditing->setSmartInsertDeleteEnabled(flag ? TRUE : FALSE); +} + +void LayoutTestController::setJavaScriptProfilingEnabled(bool flag) +{ + COMPtr<IWebView> webView; + if (FAILED(frame->webView(&webView))) + return; + + COMPtr<IWebViewPrivate> viewPrivate; + if (FAILED(webView->QueryInterface(&viewPrivate))) + return; + + COMPtr<IWebPreferences> preferences; + if (FAILED(webView->preferences(&preferences))) + return; + + COMPtr<IWebPreferencesPrivate> prefsPrivate(Query, preferences); + if (!prefsPrivate) + return; + + COMPtr<IWebInspector> inspector; + if (FAILED(viewPrivate->inspector(&inspector))) + return; + + prefsPrivate->setDeveloperExtrasEnabled(flag); + inspector->setJavaScriptProfilingEnabled(flag); +} + static const CFTimeInterval waitToDumpWatchdogInterval = 10.0; static void waitUntilDoneWatchdogFired(CFRunLoopTimerRef timer, void* info) @@ -534,6 +572,32 @@ int LayoutTestController::windowCount() return openWindows().size(); } +bool LayoutTestController::elementDoesAutoCompleteForElementWithId(JSStringRef id) +{ + COMPtr<IDOMDocument> document; + if (FAILED(frame->DOMDocument(&document))) + return false; + + wstring idWstring = jsStringRefToWString(id); + BSTR idBSTR = SysAllocStringLen((OLECHAR*)idWstring.c_str(), idWstring.length()); + COMPtr<IDOMElement> element; + HRESULT result = document->getElementById(idBSTR, &element); + SysFreeString(idBSTR); + + if (FAILED(result)) + return false; + + COMPtr<IWebFramePrivate> framePrivate(Query, frame); + if (!framePrivate) + return false; + + BOOL autoCompletes; + if (FAILED(framePrivate->elementDoesAutoComplete(element.get(), &autoCompletes))) + return false; + + return autoCompletes; +} + void LayoutTestController::execCommand(JSStringRef name, JSStringRef value) { wstring wName = jsStringRefToWString(name); @@ -554,3 +618,13 @@ void LayoutTestController::execCommand(JSStringRef name, JSStringRef value) SysFreeString(nameBSTR); SysFreeString(valueBSTR); } + +void LayoutTestController::clearAllDatabases() +{ + printf("ERROR: LayoutTestController::clearAllDatabases() not implemented\n"); +} + +void LayoutTestController::setDatabaseQuota(unsigned long long quota) +{ + printf("ERROR: LayoutTestController::setDatabaseQuota() not implemented\n"); +} diff --git a/WebKitTools/DumpRenderTree/win/MD5.cpp b/WebKitTools/DumpRenderTree/win/MD5.cpp index 4d4c848..1bfc9c7 100644 --- a/WebKitTools/DumpRenderTree/win/MD5.cpp +++ b/WebKitTools/DumpRenderTree/win/MD5.cpp @@ -26,6 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "config.h" #include "MD5.h" #include <windows.h> diff --git a/WebKitTools/DumpRenderTree/win/PixelDumpSupportWin.cpp b/WebKitTools/DumpRenderTree/win/PixelDumpSupportWin.cpp index f6dd82d..d0b79e1 100644 --- a/WebKitTools/DumpRenderTree/win/PixelDumpSupportWin.cpp +++ b/WebKitTools/DumpRenderTree/win/PixelDumpSupportWin.cpp @@ -26,14 +26,15 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "DumpRenderTree.h" +#include "config.h" #include "PixelDumpSupportCG.h" +#include "DumpRenderTree.h" #include <CoreGraphics/CGBitmapContext.h> #include <wtf/Assertions.h> #include <wtf/RetainPtr.h> -RetainPtr<CGContextRef> getBitmapContextFromWebView() +PassRefPtr<BitmapContext> getBitmapContextFromWebView(bool onscreen, bool incrementalRepaint, bool sweepHorizontally, bool drawSelectionRect) { RECT frame; if (!GetWindowRect(webViewWindow, &frame)) @@ -47,8 +48,6 @@ RetainPtr<CGContextRef> getBitmapContextFromWebView() bmp.bmiHeader.biBitCount = 32; bmp.bmiHeader.biCompression = BI_RGB; - // FIXME: Currently we leak this HBITMAP because we don't have a good way - // to destroy it when the CGBitmapContext gets destroyed. void* bits = 0; HBITMAP bitmap = CreateDIBSection(0, &bmp, DIB_RGB_COLORS, &bits, 0, 0); @@ -62,6 +61,8 @@ RetainPtr<CGContextRef> getBitmapContextFromWebView() ASSERT(info.bmBitsPixel == 32); RetainPtr<CGColorSpaceRef> colorSpace(AdoptCF, CGColorSpaceCreateDeviceRGB()); - return RetainPtr<CGContextRef>(AdoptCF, CGBitmapContextCreate(info.bmBits, info.bmWidth, info.bmHeight, 8, - info.bmWidthBytes, colorSpace.get(), kCGBitmapByteOrder32Little | kCGImageAlphaPremultipliedFirst)); + CGContextRef context = CGBitmapContextCreate(info.bmBits, info.bmWidth, info.bmHeight, 8, + info.bmWidthBytes, colorSpace.get(), kCGBitmapByteOrder32Little | kCGImageAlphaPremultipliedFirst); + + return BitmapContext::createByAdoptingBitmapAndContext(bitmap, context); } diff --git a/WebKitTools/DumpRenderTree/win/PolicyDelegate.cpp b/WebKitTools/DumpRenderTree/win/PolicyDelegate.cpp index c6a9fb0..99a1fd7 100644 --- a/WebKitTools/DumpRenderTree/win/PolicyDelegate.cpp +++ b/WebKitTools/DumpRenderTree/win/PolicyDelegate.cpp @@ -26,9 +26,11 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "DumpRenderTree.h" +#include "config.h" #include "PolicyDelegate.h" +#include "DumpRenderTree.h" + #include <string> using std::wstring; diff --git a/WebKitTools/DumpRenderTree/win/PolicyDelegate.h b/WebKitTools/DumpRenderTree/win/PolicyDelegate.h index d59dd9d..b9844f4 100644 --- a/WebKitTools/DumpRenderTree/win/PolicyDelegate.h +++ b/WebKitTools/DumpRenderTree/win/PolicyDelegate.h @@ -29,7 +29,7 @@ #ifndef PolicyDelegate_h #define PolicyDelegate_h -#include <WebKit/IWebPolicyDelegate.h> +#include <WebKit/WebKit.h> class PolicyDelegate : public IWebPolicyDelegate { public: diff --git a/WebKitTools/DumpRenderTree/win/ResourceLoadDelegate.cpp b/WebKitTools/DumpRenderTree/win/ResourceLoadDelegate.cpp index 0f15648..1e77eda 100644 --- a/WebKitTools/DumpRenderTree/win/ResourceLoadDelegate.cpp +++ b/WebKitTools/DumpRenderTree/win/ResourceLoadDelegate.cpp @@ -26,9 +26,10 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "DumpRenderTree.h" +#include "config.h" #include "ResourceLoadDelegate.h" +#include "DumpRenderTree.h" #include "LayoutTestController.h" #include <wtf/HashMap.h> #include <wtf/Vector.h> @@ -194,7 +195,7 @@ HRESULT STDMETHODCALLTYPE ResourceLoadDelegate::identifierForInitialRequest( /* [in] */ IWebDataSource* dataSource, /* [in] */ unsigned long identifier) { - if (!done && layoutTestController->dumpResourceLoadCallbacks()) { + if (!done && gLayoutTestController->dumpResourceLoadCallbacks()) { BSTR urlStr; if (FAILED(request->URL(&urlStr))) return E_FAIL; @@ -213,7 +214,7 @@ HRESULT STDMETHODCALLTYPE ResourceLoadDelegate::willSendRequest( /* [in] */ IWebDataSource* dataSource, /* [retval][out] */ IWebURLRequest **newRequest) { - if (!done && layoutTestController->dumpResourceLoadCallbacks()) { + if (!done && gLayoutTestController->dumpResourceLoadCallbacks()) { printf("%S - willSendRequest %S redirectResponse %S\n", descriptionSuitableForTestResult(identifier).c_str(), descriptionSuitableForTestResult(request).c_str(), @@ -230,7 +231,7 @@ HRESULT STDMETHODCALLTYPE ResourceLoadDelegate::didFinishLoadingFromDataSource( /* [in] */ unsigned long identifier, /* [in] */ IWebDataSource* dataSource) { - if (!done && layoutTestController->dumpResourceLoadCallbacks()) { + if (!done && gLayoutTestController->dumpResourceLoadCallbacks()) { printf("%S - didFinishLoading\n", descriptionSuitableForTestResult(identifier).c_str()), urlMap().remove(identifier); @@ -245,7 +246,7 @@ HRESULT STDMETHODCALLTYPE ResourceLoadDelegate::didFailLoadingWithError( /* [in] */ IWebError* error, /* [in] */ IWebDataSource* dataSource) { - if (!done && layoutTestController->dumpResourceLoadCallbacks()) { + if (!done && gLayoutTestController->dumpResourceLoadCallbacks()) { printf("%S - didFailLoadingWithError: %S\n", descriptionSuitableForTestResult(identifier).c_str(), descriptionSuitableForTestResult(error, identifier).c_str()); diff --git a/WebKitTools/DumpRenderTree/win/ResourceLoadDelegate.h b/WebKitTools/DumpRenderTree/win/ResourceLoadDelegate.h index 519ee64..e259adc 100644 --- a/WebKitTools/DumpRenderTree/win/ResourceLoadDelegate.h +++ b/WebKitTools/DumpRenderTree/win/ResourceLoadDelegate.h @@ -29,7 +29,7 @@ #ifndef ResourceLoadDelegate_h #define ResourceLoadDelegate_h -#include <WebKit/IWebResourceLoadDelegate.h> +#include <WebKit/WebKit.h> class ResourceLoadDelegate : public IWebResourceLoadDelegate { public: diff --git a/WebKitTools/DumpRenderTree/win/TestNetscapePlugin/TestNetscapePlugin.vcproj b/WebKitTools/DumpRenderTree/win/TestNetscapePlugin/TestNetscapePlugin.vcproj index 0bc77f6..eced57e 100644 --- a/WebKitTools/DumpRenderTree/win/TestNetscapePlugin/TestNetscapePlugin.vcproj +++ b/WebKitTools/DumpRenderTree/win/TestNetscapePlugin/TestNetscapePlugin.vcproj @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="windows-1251"?>
<VisualStudioProject
ProjectType="Visual C++"
- Version="8,00"
+ Version="8.00"
Name="TestNetscapePlugin"
ProjectGUID="{C0737398-3565-439E-A2B8-AB2BE4D5430C}"
RootNamespace="TestNetscapePlugin"
@@ -23,6 +23,7 @@ >
<Tool
Name="VCPreBuildEventTool"
+ CommandLine="set PATH=%SystemDrive%\cygwin\bin;%PATH%
if exist "$(WebKitOutputDir)\buildfailed" grep XX$(ProjectName)XX "$(WebKitOutputDir)\buildfailed"
if errorlevel 1 exit 1
echo XX$(ProjectName)XX > "$(WebKitOutputDir)\buildfailed"
"
/>
<Tool
Name="VCCustomBuildTool"
@@ -38,7 +39,7 @@ />
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""$(WebKitOutputDir)\Include";"$(WebKitOutputDir)\Include\JavaScriptCore";"$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders";"$(ProjectDir)..\..\TestNetscapePlugin.subproj""
+ 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"
/>
<Tool
@@ -79,6 +80,7 @@ />
<Tool
Name="VCPostBuildEventTool"
+ CommandLine="if exist "$(WebKitOutputDir)\buildfailed" del "$(WebKitOutputDir)\buildfailed""
/>
</Configuration>
<Configuration
@@ -90,6 +92,7 @@ >
<Tool
Name="VCPreBuildEventTool"
+ CommandLine="set PATH=%SystemDrive%\cygwin\bin;%PATH%
if exist "$(WebKitOutputDir)\buildfailed" grep XX$(ProjectName)XX "$(WebKitOutputDir)\buildfailed"
if errorlevel 1 exit 1
echo XX$(ProjectName)XX > "$(WebKitOutputDir)\buildfailed"
"
/>
<Tool
Name="VCCustomBuildTool"
@@ -105,7 +108,7 @@ />
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""$(WebKitOutputDir)\Include";"$(WebKitOutputDir)\Include\JavaScriptCore";"$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders";"$(ProjectDir)..\..\TestNetscapePlugin.subproj""
+ 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"
/>
<Tool
@@ -146,6 +149,7 @@ />
<Tool
Name="VCPostBuildEventTool"
+ CommandLine="if exist "$(WebKitOutputDir)\buildfailed" del "$(WebKitOutputDir)\buildfailed""
/>
</Configuration>
<Configuration
@@ -156,6 +160,7 @@ >
<Tool
Name="VCPreBuildEventTool"
+ CommandLine="set PATH=%SystemDrive%\cygwin\bin;%PATH%
if exist "$(WebKitOutputDir)\buildfailed" grep XX$(ProjectName)XX "$(WebKitOutputDir)\buildfailed"
if errorlevel 1 exit 1
echo XX$(ProjectName)XX > "$(WebKitOutputDir)\buildfailed"
"
/>
<Tool
Name="VCCustomBuildTool"
@@ -171,7 +176,7 @@ />
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""$(WebKitOutputDir)\Include";"$(WebKitOutputDir)\Include\JavaScriptCore";"$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders";"$(ProjectDir)..\..\TestNetscapePlugin.subproj""
+ 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"
/>
@@ -213,6 +218,7 @@ />
<Tool
Name="VCPostBuildEventTool"
+ CommandLine="if exist "$(WebKitOutputDir)\buildfailed" del "$(WebKitOutputDir)\buildfailed""
/>
</Configuration>
</Configurations>
diff --git a/WebKitTools/DumpRenderTree/win/TestNetscapePlugin/main.c b/WebKitTools/DumpRenderTree/win/TestNetscapePlugin/main.c index 8c542ed..829a32c 100644 --- a/WebKitTools/DumpRenderTree/win/TestNetscapePlugin/main.c +++ b/WebKitTools/DumpRenderTree/win/TestNetscapePlugin/main.c @@ -1,34 +1,26 @@ /* - IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. ("Apple") in - consideration of your agreement to the following terms, and your use, installation, - modification or redistribution of this Apple software constitutes acceptance of these - terms. If you do not agree with these terms, please do not use, install, modify or - redistribute this Apple software. - - In consideration of your agreement to abide by the following terms, and subject to these - terms, Apple grants you a personal, non-exclusive license, under AppleÕs copyrights in - this original Apple software (the "Apple Software"), to use, reproduce, modify and - redistribute the Apple Software, with or without modifications, in source and/or binary - forms; provided that if you redistribute the Apple Software in its entirety and without - modifications, you must retain this notice and the following text and disclaimers in all - such redistributions of the Apple Software. Neither the name, trademarks, service marks - or logos of Apple Computer, Inc. may be used to endorse or promote products derived from - the Apple Software without specific prior written permission from Apple. Except as expressly - stated in this notice, no other rights or licenses, express or implied, are granted by Apple - herein, including but not limited to any patent rights that may be infringed by your - derivative works or by other works in which the Apple Software may be incorporated. - - The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO WARRANTIES, - EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, - MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS - USE AND OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS. - - IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, - REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND - WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR - OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * Copyright (C) 2007 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 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 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 "PluginObject.h" diff --git a/WebKitTools/DumpRenderTree/win/TestNetscapePlugin/main.cpp b/WebKitTools/DumpRenderTree/win/TestNetscapePlugin/main.cpp index 8c542ed..ab54872 100644 --- a/WebKitTools/DumpRenderTree/win/TestNetscapePlugin/main.cpp +++ b/WebKitTools/DumpRenderTree/win/TestNetscapePlugin/main.cpp @@ -76,12 +76,14 @@ NPError NPP_New(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, ch { if (browser->version >= 14) { PluginObject* obj = (PluginObject*)browser->createobject(instance, getPluginClass()); - - obj->onStreamLoad = NULL; for (int16 i = 0; i < argc; i++) { if (_stricmp(argn[i], "onstreamload") == 0 && !obj->onStreamLoad) obj->onStreamLoad = _strdup(argv[i]); + else if (_stricmp(argn[i], "onStreamDestroy") == 0 && !obj->onStreamDestroy) + obj->onStreamDestroy = _strdup(argv[i]); + else if (_stricmp(argn[i], "onURLNotify") == 0 && !obj->onURLNotify) + obj->onURLNotify = _strdup(argv[i]); } instance->pdata = obj; @@ -96,7 +98,13 @@ NPError NPP_Destroy(NPP instance, NPSavedData **save) if (obj) { if (obj->onStreamLoad) free(obj->onStreamLoad); - + + if (obj->onURLNotify) + free(obj->onURLNotify); + + if (obj->onStreamDestroy) + free(obj->onStreamDestroy); + if (obj->logDestroy) printf("PLUGIN: NPP_Destroy\n"); @@ -110,30 +118,43 @@ NPError NPP_SetWindow(NPP instance, NPWindow *window) return NPERR_NO_ERROR; } +static void executeScript(const PluginObject* obj, const char* script) +{ + NPObject *windowScriptObject; + browser->getvalue(obj->npp, NPNVWindowNPObject, &windowScriptObject); + + NPString npScript; + npScript.UTF8Characters = script; + npScript.UTF8Length = strlen(script); + + NPVariant browserResult; + browser->evaluate(obj->npp, windowScriptObject, &npScript, &browserResult); + browser->releasevariantvalue(&browserResult); +} + NPError NPP_NewStream(NPP instance, NPMIMEType type, NPStream *stream, NPBool seekable, uint16 *stype) { PluginObject* obj = (PluginObject*)instance->pdata; + + if (obj->returnErrorFromNewStream) + return NPERR_GENERIC_ERROR; + obj->stream = stream; *stype = NP_ASFILEONLY; - if (obj->onStreamLoad) { - NPObject *windowScriptObject; - browser->getvalue(obj->npp, NPNVWindowNPObject, &windowScriptObject); - - NPString script; - script.UTF8Characters = obj->onStreamLoad; - script.UTF8Length = strlen(obj->onStreamLoad); - - NPVariant browserResult; - browser->evaluate(obj->npp, windowScriptObject, &script, &browserResult); - browser->releasevariantvalue(&browserResult); - } + if (obj->onStreamLoad) + executeScript(obj, obj->onStreamLoad); return NPERR_NO_ERROR; } NPError NPP_DestroyStream(NPP instance, NPStream *stream, NPReason reason) { + PluginObject* obj = (PluginObject*)instance->pdata; + + if (obj->onStreamDestroy) + executeScript(obj, obj->onStreamDestroy); + return NPERR_NO_ERROR; } @@ -168,6 +189,9 @@ int16 NPP_HandleEvent(NPP instance, void *event) void NPP_URLNotify(NPP instance, const char *url, NPReason reason, void *notifyData) { PluginObject *obj = (PluginObject*)instance->pdata; + + if (obj->onURLNotify) + executeScript(obj, obj->onURLNotify); handleCallback(obj, url, reason, notifyData); } diff --git a/WebKitTools/DumpRenderTree/win/UIDelegate.cpp b/WebKitTools/DumpRenderTree/win/UIDelegate.cpp index 750e67a..a2532a5 100755 --- a/WebKitTools/DumpRenderTree/win/UIDelegate.cpp +++ b/WebKitTools/DumpRenderTree/win/UIDelegate.cpp @@ -26,9 +26,10 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "DumpRenderTree.h" +#include "config.h" #include "UIDelegate.h" +#include "DumpRenderTree.h" #include "DraggingInfo.h" #include "EventSender.h" #include "LayoutTestController.h" @@ -38,8 +39,7 @@ #include <wtf/Vector.h> #include <JavaScriptCore/Assertions.h> #include <JavaScriptCore/JavaScriptCore.h> -#include <WebKit/IWebFramePrivate.h> -#include <WebKit/IWebViewPrivate.h> +#include <WebKit/WebKit.h> #include <stdio.h> using std::wstring; @@ -322,6 +322,18 @@ HRESULT STDMETHODCALLTYPE UIDelegate::runJavaScriptTextInputPanelWithPrompt( return S_OK; } +HRESULT STDMETHODCALLTYPE UIDelegate::runBeforeUnloadConfirmPanelWithMessage( + /* [in] */ IWebView* /*sender*/, + /* [in] */ BSTR /*message*/, + /* [in] */ IWebFrame* /*initiatedByFrame*/, + /* [retval][out] */ BOOL* result) +{ + if (!result) + return E_POINTER; + *result = TRUE; + return E_NOTIMPL; +} + HRESULT STDMETHODCALLTYPE UIDelegate::webViewAddMessageToConsole( /* [in] */ IWebView* sender, /* [in] */ BSTR message, @@ -374,13 +386,13 @@ HRESULT STDMETHODCALLTYPE UIDelegate::createWebViewWithRequest( /* [in] */ IWebURLRequest *request, /* [retval][out] */ IWebView **newWebView) { - if (!::layoutTestController->canOpenWindows()) + if (!::gLayoutTestController->canOpenWindows()) return E_FAIL; *newWebView = createWebViewAndOffscreenWindow(); return S_OK; } -HRESULT STDMETHODCALLTYPE UIDelegate::webViewClose( +HRESULT STDMETHODCALLTYPE UIDelegate::webViewClose( /* [in] */ IWebView *sender) { HWND hostWindow; @@ -389,6 +401,22 @@ HRESULT STDMETHODCALLTYPE UIDelegate::webViewClose( return S_OK; } +HRESULT STDMETHODCALLTYPE UIDelegate::webViewFocus( + /* [in] */ IWebView *sender) +{ + HWND hostWindow; + sender->hostWindow(reinterpret_cast<OLE_HANDLE*>(&hostWindow)); + SetForegroundWindow(hostWindow); + return S_OK; +} + +HRESULT STDMETHODCALLTYPE UIDelegate::webViewUnfocus( + /* [in] */ IWebView *sender) +{ + SetForegroundWindow(GetDesktopWindow()); + return S_OK; +} + HRESULT STDMETHODCALLTYPE UIDelegate::webViewPainted( /* [in] */ IWebView *sender) { @@ -406,3 +434,11 @@ HRESULT STDMETHODCALLTYPE UIDelegate::exceededDatabaseQuota( return S_OK; } + + +HRESULT STDMETHODCALLTYPE UIDelegate::setStatusText(IWebView*, BSTR text) +{ + if (gLayoutTestController->dumpStatusCallbacks()) + printf("UI DELEGATE STATUS CALLBACK: setStatusText:%S\n", text ? text : L""); + return S_OK; +} diff --git a/WebKitTools/DumpRenderTree/win/UIDelegate.h b/WebKitTools/DumpRenderTree/win/UIDelegate.h index 1699c33..2113957 100755 --- a/WebKitTools/DumpRenderTree/win/UIDelegate.h +++ b/WebKitTools/DumpRenderTree/win/UIDelegate.h @@ -29,8 +29,7 @@ #ifndef UIDelegate_h #define UIDelegate_h -#include <WebKit/IWebUIDelegate.h> -#include <WebKit/IWebUIDelegatePrivate.h> +#include <WebKit/WebKit.h> #include <wtf/OwnPtr.h> #include <windef.h> @@ -60,10 +59,10 @@ public: /* [in] */ IWebView *sender); virtual HRESULT STDMETHODCALLTYPE webViewFocus( - /* [in] */ IWebView *sender) { return E_NOTIMPL; } + /* [in] */ IWebView *sender); virtual HRESULT STDMETHODCALLTYPE webViewUnfocus( - /* [in] */ IWebView *sender) { return E_NOTIMPL; } + /* [in] */ IWebView *sender); virtual HRESULT STDMETHODCALLTYPE webViewFirstResponder( /* [in] */ IWebView *sender, @@ -75,7 +74,7 @@ public: virtual HRESULT STDMETHODCALLTYPE setStatusText( /* [in] */ IWebView *sender, - /* [in] */ BSTR text) { return E_NOTIMPL; } + /* [in] */ BSTR text); virtual HRESULT STDMETHODCALLTYPE webViewStatusText( /* [in] */ IWebView *sender, @@ -140,7 +139,7 @@ public: /* [in] */ IWebView *sender, /* [in] */ BSTR message, /* [in] */ IWebFrame *initiatedByFrame, - /* [retval][out] */ BOOL *result) { return E_NOTIMPL; } + /* [retval][out] */ BOOL *result); virtual HRESULT STDMETHODCALLTYPE runOpenPanelForFileButtonWithResultListener( /* [in] */ IWebView *sender, @@ -254,6 +253,11 @@ protected: virtual HRESULT STDMETHODCALLTYPE webViewResizerRect( /* [in] */ IWebView *sender, /* [retval][out] */ RECT *rect) { return E_NOTIMPL; } + + virtual HRESULT STDMETHODCALLTYPE webViewSendResizeMessage( + /* [in] */ UINT uMsg, + /* [in] */ WPARAM wParam, + /* [in] */ LPARAM lParam) { return E_NOTIMPL; } virtual HRESULT STDMETHODCALLTYPE webViewDrawResizer( /* [in] */ IWebView *sender, diff --git a/WebKitTools/DumpRenderTree/win/WorkQueueItemWin.cpp b/WebKitTools/DumpRenderTree/win/WorkQueueItemWin.cpp index 1a2924f..a489498 100644 --- a/WebKitTools/DumpRenderTree/win/WorkQueueItemWin.cpp +++ b/WebKitTools/DumpRenderTree/win/WorkQueueItemWin.cpp @@ -26,13 +26,11 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "DumpRenderTree.h" +#include "config.h" #include "WorkQueueItem.h" +#include "DumpRenderTree.h" #include <WebCore/COMPtr.h> -#include <WebKit/IWebFrame.h> -#include <WebKit/IWebURLRequest.h> -#include <WebKit/IWebView.h> #include <WebKit/WebKit.h> #include <JavaScriptCore/JSStringRef.h> #include <JavaScriptCore/JSStringRefCF.h> |