<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[183651] trunk/Tools</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/183651">183651</a></dd>
<dt>Author</dt> <dd>bfulgham@apple.com</dd>
<dt>Date</dt> <dd>2015-04-30 16:13:52 -0700 (Thu, 30 Apr 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Provide a runtime flag to run-webkit-tests that shows the test view
https://bugs.webkit.org/show_bug.cgi?id=144079.

Reviewed by Dean Jackson.

Add a new flag (--show-webview) that causes DumpRenderTree and WebKitTestRunner to display
their WebViews on-screen. This can be used when running tests via the &quot;--additional-drt-flag&quot;
option:
        
--additional-drt-flag=&quot;--show-webview&quot;

* DumpRenderTree/mac/DumpRenderTree.mm:
(createWebViewAndOffscreenWindow): Use an on-screen window rect if the user passed the
'--show-webview' flag.
(initializeGlobalsFromCommandLineOptions): Recognize the &quot;--show-webview&quot; option.
* WebKitTestRunner/Options.cpp:
(WTR::Options::Options):
(WTR::handleOptionShowWebView):
(WTR::OptionsHandler::OptionsHandler): Recognize the new &quot;--show-webview&quot; option.
* WebKitTestRunner/Options.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::TestController):
(WTR::TestController::initialize): Use value of 'shouldShowWebView' from the Options bundle.
* WebKitTestRunner/TestController.h:
(WTR::TestController::shouldShowWebView):
* WebKitTestRunner/mac/PlatformWebViewMac.mm:
(WTR::PlatformWebView::PlatformWebView): Retrieve the value of the 'ShouldShowWebView' key from the
options dictionary. If it is true, display the web view while running the test.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsDumpRenderTreemacDumpRenderTreemm">trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm</a></li>
<li><a href="#trunkToolsWebKitTestRunnerOptionscpp">trunk/Tools/WebKitTestRunner/Options.cpp</a></li>
<li><a href="#trunkToolsWebKitTestRunnerOptionsh">trunk/Tools/WebKitTestRunner/Options.h</a></li>
<li><a href="#trunkToolsWebKitTestRunnerTestControllercpp">trunk/Tools/WebKitTestRunner/TestController.cpp</a></li>
<li><a href="#trunkToolsWebKitTestRunnerTestControllerh">trunk/Tools/WebKitTestRunner/TestController.h</a></li>
<li><a href="#trunkToolsWebKitTestRunnermacPlatformWebViewMacmm">trunk/Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (183650 => 183651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2015-04-30 23:02:33 UTC (rev 183650)
+++ trunk/Tools/ChangeLog        2015-04-30 23:13:52 UTC (rev 183651)
</span><span class="lines">@@ -1,3 +1,34 @@
</span><ins>+2015-04-30  Brent Fulgham  &lt;bfulgham@apple.com&gt;
+
+        Provide a runtime flag to run-webkit-tests that shows the test view
+        https://bugs.webkit.org/show_bug.cgi?id=144079.
+
+        Reviewed by Dean Jackson.
+
+        Add a new flag (--show-webview) that causes DumpRenderTree and WebKitTestRunner to display
+        their WebViews on-screen. This can be used when running tests via the &quot;--additional-drt-flag&quot;
+        option:
+        
+        --additional-drt-flag=&quot;--show-webview&quot;
+
+        * DumpRenderTree/mac/DumpRenderTree.mm:
+        (createWebViewAndOffscreenWindow): Use an on-screen window rect if the user passed the
+        '--show-webview' flag.
+        (initializeGlobalsFromCommandLineOptions): Recognize the &quot;--show-webview&quot; option.
+        * WebKitTestRunner/Options.cpp:
+        (WTR::Options::Options):
+        (WTR::handleOptionShowWebView):
+        (WTR::OptionsHandler::OptionsHandler): Recognize the new &quot;--show-webview&quot; option.
+        * WebKitTestRunner/Options.h:
+        * WebKitTestRunner/TestController.cpp:
+        (WTR::TestController::TestController):
+        (WTR::TestController::initialize): Use value of 'shouldShowWebView' from the Options bundle.
+        * WebKitTestRunner/TestController.h:
+        (WTR::TestController::shouldShowWebView):
+        * WebKitTestRunner/mac/PlatformWebViewMac.mm:
+        (WTR::PlatformWebView::PlatformWebView): Retrieve the value of the 'ShouldShowWebView' key from the
+        options dictionary. If it is true, display the web view while running the test.
+
</ins><span class="cx"> 2015-04-30  Alexey Proskuryakov  &lt;ap@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         r183355 didn't trigger Mac tests
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreemacDumpRenderTreemm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm (183650 => 183651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm        2015-04-30 23:02:33 UTC (rev 183650)
+++ trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm        2015-04-30 23:13:52 UTC (rev 183651)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2005-2009, 2015 Apple Inc. All rights reserved.
</ins><span class="cx">  *           (C) 2007 Graham Dennis (graham.dennis@gmail.com)
</span><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="lines">@@ -205,6 +205,7 @@
</span><span class="cx"> static int forceComplexText;
</span><span class="cx"> static int useAcceleratedDrawing;
</span><span class="cx"> static int gcBetweenTests;
</span><ins>+static int showWebView = NO;
</ins><span class="cx"> static BOOL printSeparators;
</span><span class="cx"> static RetainPtr&lt;CFStringRef&gt; persistentUserStyleSheetLocation;
</span><span class="cx"> static std::set&lt;std::string&gt; allowedHosts;
</span><span class="lines">@@ -784,13 +785,16 @@
</span><span class="cx">     // To make things like certain NSViews, dragging, and plug-ins work, put the WebView a window, but put it off-screen so you don't see it.
</span><span class="cx">     // Put it at -10000, -10000 in &quot;flipped coordinates&quot;, since WebCore and the DOM use flipped coordinates.
</span><span class="cx">     NSScreen *firstScreen = [[NSScreen screens] firstObject];
</span><del>-    NSRect windowRect = NSOffsetRect(rect, -10000, [firstScreen frame].size.height - rect.size.height + 10000);
</del><ins>+    NSRect windowRect = (showWebView) ? NSOffsetRect(rect, 100, 100) : NSOffsetRect(rect, -10000, [firstScreen frame].size.height - rect.size.height + 10000);
</ins><span class="cx">     DumpRenderTreeWindow *window = [[DumpRenderTreeWindow alloc] initWithContentRect:windowRect styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:YES];
</span><span class="cx"> 
</span><span class="cx">     [window setColorSpace:[firstScreen colorSpace]];
</span><span class="cx">     [window setCollectionBehavior:NSWindowCollectionBehaviorStationary];
</span><span class="cx">     [[window contentView] addSubview:webView];
</span><del>-    [window orderBack:nil];
</del><ins>+    if (showWebView)
+        [window orderFront:nil];
+    else
+        [window orderBack:nil];
</ins><span class="cx">     [window setAutodisplay:NO];
</span><span class="cx"> 
</span><span class="cx">     [window startListeningForAcceleratedCompositingChanges];
</span><span class="lines">@@ -1121,6 +1125,7 @@
</span><span class="cx">         {&quot;gc-between-tests&quot;, no_argument, &amp;gcBetweenTests, YES},
</span><span class="cx">         {&quot;no-timeout&quot;, no_argument, &amp;useTimeoutWatchdog, NO},
</span><span class="cx">         {&quot;allowed-host&quot;, required_argument, nullptr, 'a'},
</span><ins>+        {&quot;show-webview&quot;, no_argument, &amp;showWebView, YES},
</ins><span class="cx">         {nullptr, 0, nullptr, 0}
</span><span class="cx">     };
</span><span class="cx">     
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerOptionscpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/Options.cpp (183650 => 183651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/Options.cpp        2015-04-30 23:02:33 UTC (rev 183650)
+++ trunk/Tools/WebKitTestRunner/Options.cpp        2015-04-30 23:13:52 UTC (rev 183651)
</span><span class="lines">@@ -1,6 +1,7 @@
</span><span class="cx"> /*
</span><span class="cx">  * Copyright (C) 2013 University of Szeged. All rights reserved.
</span><span class="cx">  * Copyright (C) 2013 Samsung Electronics. All rights reserved.
</span><ins>+ * Copyright (C) 2015 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -41,6 +42,7 @@
</span><span class="cx">     , forceComplexText(false)
</span><span class="cx">     , shouldUseAcceleratedDrawing(false)
</span><span class="cx">     , shouldUseRemoteLayerTree(false)
</span><ins>+    , shouldShowWebView(false)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -93,6 +95,12 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool handleOptionShowWebView(Options&amp; options, const char*, const char*)
+{
+    options.shouldShowWebView = true;
+    return true;
+}
+
</ins><span class="cx"> bool handleOptionAllowedHost(Options&amp; options, const char*, const char* host)
</span><span class="cx"> {
</span><span class="cx">     options.allowedHosts.push_back(host);
</span><span class="lines">@@ -120,6 +128,7 @@
</span><span class="cx">     optionList.append(Option(&quot;--accelerated-drawing&quot;, &quot;Use accelerated drawing.&quot;, handleOptionAcceleratedDrawing));
</span><span class="cx">     optionList.append(Option(&quot;--remote-layer-tree&quot;, &quot;Use remote layer tree.&quot;, handleOptionRemoteLayerTree));
</span><span class="cx">     optionList.append(Option(&quot;--allowed-host&quot;, &quot;Allows access to the specified host from tests.&quot;, handleOptionAllowedHost, true));
</span><ins>+    optionList.append(Option(&quot;--show-webview&quot;, &quot;Show the WebView during test runs (for Debugging)&quot;, handleOptionShowWebView));
</ins><span class="cx"> 
</span><span class="cx">     optionList.append(Option(0, 0, handleOptionUnmatched));
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerOptionsh"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/Options.h (183650 => 183651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/Options.h        2015-04-30 23:02:33 UTC (rev 183650)
+++ trunk/Tools/WebKitTestRunner/Options.h        2015-04-30 23:13:52 UTC (rev 183651)
</span><span class="lines">@@ -1,6 +1,7 @@
</span><span class="cx"> /*
</span><span class="cx">  * Copyright (C) 2013 University of Szeged. All rights reserved.
</span><span class="cx">  * Copyright (C) 2013 Samsung Electronics. All rights reserved.
</span><ins>+ * Copyright (C) 2015 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -46,6 +47,7 @@
</span><span class="cx">     bool forceComplexText;
</span><span class="cx">     bool shouldUseAcceleratedDrawing;
</span><span class="cx">     bool shouldUseRemoteLayerTree;
</span><ins>+    bool shouldShowWebView;
</ins><span class="cx">     std::vector&lt;std::string&gt; paths;
</span><span class="cx">     std::vector&lt;std::string&gt; allowedHosts;
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerTestControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/TestController.cpp (183650 => 183651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/TestController.cpp        2015-04-30 23:02:33 UTC (rev 183650)
+++ trunk/Tools/WebKitTestRunner/TestController.cpp        2015-04-30 23:13:52 UTC (rev 183651)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2010, 2014 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2010, 2014-2015 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -125,6 +125,7 @@
</span><span class="cx">     , m_shouldUseAcceleratedDrawing(false)
</span><span class="cx">     , m_shouldUseRemoteLayerTree(false)
</span><span class="cx">     , m_shouldLogHistoryClientCallbacks(false)
</span><ins>+    , m_shouldShowWebView(false)
</ins><span class="cx"> {
</span><span class="cx">     initialize(argc, argv);
</span><span class="cx">     controller = this;
</span><span class="lines">@@ -328,6 +329,7 @@
</span><span class="cx">     m_shouldUseRemoteLayerTree = options.shouldUseRemoteLayerTree;
</span><span class="cx">     m_paths = options.paths;
</span><span class="cx">     m_allowedHosts = options.allowedHosts;
</span><ins>+    m_shouldShowWebView = options.shouldShowWebView;
</ins><span class="cx"> 
</span><span class="cx">     if (options.printSupportedFeatures) {
</span><span class="cx">         // FIXME: On Windows, DumpRenderTree uses this to expose whether it supports 3d
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerTestControllerh"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/TestController.h (183650 => 183651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/TestController.h        2015-04-30 23:02:33 UTC (rev 183650)
+++ trunk/Tools/WebKitTestRunner/TestController.h        2015-04-30 23:13:52 UTC (rev 183651)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2010 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2010, 2015 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -74,7 +74,9 @@
</span><span class="cx">     bool useWaitToDumpWatchdogTimer() { return m_useWaitToDumpWatchdogTimer; }
</span><span class="cx">     void runUntil(bool&amp; done, double timeoutSeconds);
</span><span class="cx">     void notifyDone();
</span><del>-    
</del><ins>+
+    bool shouldShowWebView() const { return m_shouldShowWebView; }
+
</ins><span class="cx">     void configureViewForTest(const TestInvocation&amp;);
</span><span class="cx">     
</span><span class="cx">     bool beforeUnloadReturnValue() const { return m_beforeUnloadReturnValue; }
</span><span class="lines">@@ -269,6 +271,7 @@
</span><span class="cx">     bool m_shouldUseRemoteLayerTree;
</span><span class="cx"> 
</span><span class="cx">     bool m_shouldLogHistoryClientCallbacks;
</span><ins>+    bool m_shouldShowWebView;
</ins><span class="cx"> 
</span><span class="cx">     std::unique_ptr&lt;EventSenderProxy&gt; m_eventSenderProxy;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnermacPlatformWebViewMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm (183650 => 183651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm        2015-04-30 23:02:33 UTC (rev 183650)
+++ trunk/Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm        2015-04-30 23:13:52 UTC (rev 183651)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2010, 2013 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2010, 2013, 2015 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -141,14 +141,21 @@
</span><span class="cx">     m_view = [[TestRunnerWKView alloc] initWithFrame:rect contextRef:contextRef pageGroupRef:pageGroupRef relatedToPage:relatedPage useThreadedScrolling:useThreadedScrolling];
</span><span class="cx">     [m_view setWindowOcclusionDetectionEnabled:NO];
</span><span class="cx"> 
</span><ins>+    WKRetainPtr&lt;WKStringRef&gt; shouldShowWebViewKey(AdoptWK, WKStringCreateWithUTF8CString(&quot;ShouldShowWebView&quot;));
+    WKTypeRef shouldShowWebViewValue = options ? WKDictionaryGetItemForKey(options, shouldShowWebViewKey.get()) : NULL;
+    bool shouldShowWebView = shouldShowWebViewValue &amp;&amp; WKBooleanGetValue(static_cast&lt;WKBooleanRef&gt;(shouldShowWebViewValue));
+
</ins><span class="cx">     NSScreen *firstScreen = [[NSScreen screens] objectAtIndex:0];
</span><del>-    NSRect windowRect = NSOffsetRect(rect, -10000, [firstScreen frame].size.height - rect.size.height + 10000);
</del><ins>+    NSRect windowRect = (shouldShowWebView) ? NSOffsetRect(rect, 100, 100) : NSOffsetRect(rect, -10000, [firstScreen frame].size.height - rect.size.height + 10000);
</ins><span class="cx">     m_window = [[WebKitTestRunnerWindow alloc] initWithContentRect:windowRect styleMask:NSBorderlessWindowMask backing:(NSBackingStoreType)_NSBackingStoreUnbuffered defer:YES];
</span><span class="cx">     m_window.platformWebView = this;
</span><span class="cx">     [m_window setColorSpace:[firstScreen colorSpace]];
</span><span class="cx">     [m_window setCollectionBehavior:NSWindowCollectionBehaviorStationary];
</span><span class="cx">     [[m_window contentView] addSubview:m_view];
</span><del>-    [m_window orderBack:nil];
</del><ins>+    if (shouldShowWebView)
+        [m_window orderFront:nil];
+    else
+        [m_window orderBack:nil];
</ins><span class="cx">     [m_window setReleasedWhenClosed:NO];
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>