Title: [183772] trunk/Tools
Revision
183772
Author
[email protected]
Date
2015-05-04 13:46:09 -0700 (Mon, 04 May 2015)

Log Message

[Win] Implement the "--show-webview" option for Windows
https://bugs.webkit.org/show_bug.cgi?id=144589

Reviewed by Alex Christensen.

Add another runtime flag (--show-webview) that causes DumpRenderTree
to draw its view on-screen, rather than the standard offscreen mode.

* DumpRenderTree/win/DumpRenderTree.cpp:
(createWebViewAndOffscreenWindow): Honor the 'showWebView' flag.
(initializeGlobalsFromCommandLineOptions): Recognize the new
command-line argument, and set the global 'showWebView' state if
appropriate.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (183771 => 183772)


--- trunk/Tools/ChangeLog	2015-05-04 20:44:29 UTC (rev 183771)
+++ trunk/Tools/ChangeLog	2015-05-04 20:46:09 UTC (rev 183772)
@@ -1,3 +1,19 @@
+2015-05-04  Brent Fulgham  <[email protected]>
+
+        [Win] Implement the "--show-webview" option for Windows
+        https://bugs.webkit.org/show_bug.cgi?id=144589
+
+        Reviewed by Alex Christensen.
+
+        Add another runtime flag (--show-webview) that causes DumpRenderTree
+        to draw its view on-screen, rather than the standard offscreen mode.
+
+        * DumpRenderTree/win/DumpRenderTree.cpp:
+        (createWebViewAndOffscreenWindow): Honor the 'showWebView' flag.
+        (initializeGlobalsFromCommandLineOptions): Recognize the new
+        command-line argument, and set the global 'showWebView' state if
+        appropriate.
+
 2015-05-04  Csaba Osztrogonác  <[email protected]>
 
         Remove dead code from TestInvocationCairo.cpp

Modified: trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp (183771 => 183772)


--- trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp	2015-05-04 20:44:29 UTC (rev 183771)
+++ trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp	2015-05-04 20:46:09 UTC (rev 183772)
@@ -96,6 +96,7 @@
 static bool printSeparators = false;
 static bool leakChecking = false;
 static bool printSupportedFeatures = false;
+static bool showWebView = false;
 static RetainPtr<CFStringRef> persistentUserStyleSheetLocation;
 
 volatile bool done;
@@ -1204,8 +1205,8 @@
 {
     int maxViewWidth = TestRunner::viewWidth;
     int maxViewHeight = TestRunner::viewHeight;
-    HWND hostWindow = CreateWindowEx(WS_EX_TOOLWINDOW, kDumpRenderTreeClassName, TEXT("DumpRenderTree"), WS_POPUP,
-      -maxViewWidth, -maxViewHeight, maxViewWidth, maxViewHeight, 0, 0, GetModuleHandle(0), 0);
+    HWND hostWindow = (showWebView) ? CreateWindowEx(WS_EX_TOOLWINDOW, kDumpRenderTreeClassName, TEXT("DumpRenderTree"), WS_POPUP, 100, 100, maxViewWidth, maxViewHeight, 0, 0, ::GetModuleHandle(0), nullptr)
+        : CreateWindowEx(WS_EX_TOOLWINDOW, kDumpRenderTreeClassName, TEXT("DumpRenderTree"), WS_POPUP, -maxViewWidth, -maxViewHeight, maxViewWidth, maxViewHeight, 0, 0, ::GetModuleHandle(0), nullptr);
 
     IWebView* webView = nullptr;
     HRESULT hr = WebKitCreateInstance(CLSID_WebView, 0, IID_IWebView, (void**)&webView);
@@ -1354,6 +1355,11 @@
             continue;
         }
 
+        if (!stricmp(argv[i], "--show-webview")) {
+            showWebView = true;
+            continue;
+        }
+
         tests.append(argv[i]);
     }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to