[Webkit-unassigned] [Bug 189257] Resurrect WebKitTestRunner for Windows port

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Nov 6 10:39:13 PST 2018


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

Don Olmstead <don.olmstead at sony.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |don.olmstead at sony.com

--- Comment #3 from Don Olmstead <don.olmstead at sony.com> ---
Comment on attachment 353945
  --> https://bugs.webkit.org/attachment.cgi?id=353945
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=353945&action=review

Overall looks about ready to go. Just some cleanup on the macros is needed.

> Tools/WebKitTestRunner/InjectedBundle/AccessibilityController.cpp:73
> +#if !PLATFORM(GTK) && !PLATFORM(WPE) && !PLATFORM(WIN)

Could probably be #if PLATFORM(COCOA) at this point

> Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:82
> +#if (!PLATFORM(GTK) && !PLATFORM(WPE) && !PLATFORM(WIN)) || !HAVE(ACCESSIBILITY)

if PLATFORM(COCOA) || !HAVE(ACCESSIBILITY)

> Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:365
> +#if PLATFORM(COCOA) || PLATFORM(GTK) || PLATFORM(WPE) || PLATFORM(WIN)

Think this guard can be removed.

> Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp:96
> +#if PLATFORM(GTK) || PLATFORM(WPE) || PLATFORM(WIN)

#if !PLATFORM(COCOA)

> Tools/WebKitTestRunner/InjectedBundle/TestRunner.h:43
> +#elif PLATFORM(GTK) || PLATFORM(WPE) || PLATFORM(WIN)

I think this can probably just be an #else since it looks like there's a PLATFORM(COCOA) above.

> Tools/WebKitTestRunner/InjectedBundle/win/TestRunnerInjectedBundlePrefix.h:45
> +#ifdef __OBJC__
> +#import <Foundation/Foundation.h>
> +#endif
> +
> +#include <WebKit/WebKit2_C.h>
> +#include <wtf/Platform.h>
> +
> +/* When C++ exceptions are disabled, the C++ library defines |try| and |catch|
> +* to allow C++ code that expects exceptions to build. These definitions
> +* interfere with Objective-C++ uses of Objective-C exception handlers, which
> +* use |@try| and |@catch|. As a workaround, undefine these macros. */
> +
> +#ifdef __cplusplus
> +#include <algorithm> // needed for exception_defines.h
> +#endif
> +
> +#ifdef __OBJC__
> +#undef try
> +#undef catch
> +#endif

Delete this part we don't have ObjC in Windows.

> Tools/WebKitTestRunner/PlatformWebView.h:65
> +#elif PLATFORM(WIN)
> +#include <cairo.h>
> +class TestRunnerWindow;
> +typedef HWND PlatformWindow;
> +typedef cairo_surface_t* PlatformImage;
> +typedef WKViewRef PlatformWKView;

It looks like it would be better to define PlatformImage in a #if USE(CAIRO) that way WPE/GTK/WinCairo all get it.

> Tools/WebKitTestRunner/TestController.cpp:881
> +#if !PLATFORM(COCOA) && !PLATFORM(WPE) && !PLATFORM(WIN)

#if PLATFORM(GTK)

> Tools/WebKitTestRunner/WebKitTestRunnerPrefix.h:50
> +#if OS(WINDOWS)
> +#undef WEBCORE_EXPORT
> +#define WEBCORE_EXPORT WTF_IMPORT_DECLARATION
> +#endif

There any WebKit exports that need to be defined?

> Tools/WebKitTestRunner/win/PlatformWebViewWin.cpp:171
> +static cairo_surface_t* generateCairoSurfaceFromBitmap(BITMAP bitmapTag)

Not a huge deal but it might make sense to have some #if USE(CAIRO) guards around these. Apple is looking at a Direct2D backend and is interested in having WebKit support.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20181106/70a6c1c2/attachment.html>


More information about the webkit-unassigned mailing list