<!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>[244410] trunk</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/244410">244410</a></dd>
<dt>Author</dt> <dd>timothy_horton@apple.com</dd>
<dt>Date</dt> <dd>2019-04-17 16:33:20 -0700 (Wed, 17 Apr 2019)</dd>
</dl>

<h3>Log Message</h3>
<pre>REGRESSION (<a href="http://trac.webkit.org/projects/webkit/changeset/241988">r241988</a>): Switching tabs is slow
https://bugs.webkit.org/show_bug.cgi?id=197037
<rdar://problem/49951473>

Reviewed by Simon Fraser.

Source/WebKit:

* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
(WebKit::TiledCoreAnimationDrawingAreaProxy::waitForDidUpdateActivityState):
<a href="http://trac.webkit.org/projects/webkit/changeset/241988">r241988</a> changed to wait for a WebPageProxy message to a given DrawingArea ID,
but WebPageProxy messages are identified by their WebPageProxy ID.
Revert that one change. The rest of the patch looks OK.

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/ReparentWebViewTimeout.mm: Added.
(TEST):
* TestWebKitAPI/cocoa/TestWKWebView.h:
* TestWebKitAPI/cocoa/TestWKWebView.mm:
(-[TestWKWebView addToTestWindow]):
Add a test that hangs without this fix.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKitChangeLog">trunk/Source/WebKit/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitUIProcessmacTiledCoreAnimationDrawingAreaProxymm">trunk/Source/WebKit/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsTestWebKitAPITestWebKitAPIxcodeprojprojectpbxproj">trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkToolsTestWebKitAPIcocoaTestWKWebViewh">trunk/Tools/TestWebKitAPI/cocoa/TestWKWebView.h</a></li>
<li><a href="#trunkToolsTestWebKitAPIcocoaTestWKWebViewmm">trunk/Tools/TestWebKitAPI/cocoa/TestWKWebView.mm</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkToolsTestWebKitAPITestsWebKitCocoaReparentWebViewTimeoutmm">trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ReparentWebViewTimeout.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKitChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/ChangeLog (244409 => 244410)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/ChangeLog    2019-04-17 23:29:45 UTC (rev 244409)
+++ trunk/Source/WebKit/ChangeLog       2019-04-17 23:33:20 UTC (rev 244410)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2019-04-17  Tim Horton  <timothy_horton@apple.com>
+
+        REGRESSION (r241988): Switching tabs is slow
+        https://bugs.webkit.org/show_bug.cgi?id=197037
+        <rdar://problem/49951473>
+
+        Reviewed by Simon Fraser.
+
+        * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
+        (WebKit::TiledCoreAnimationDrawingAreaProxy::waitForDidUpdateActivityState):
+        r241988 changed to wait for a WebPageProxy message to a given DrawingArea ID,
+        but WebPageProxy messages are identified by their WebPageProxy ID.
+        Revert that one change. The rest of the patch looks OK.
+
</ins><span class="cx"> 2019-04-17  Rob Buis  <rbuis@igalia.com>
</span><span class="cx"> 
</span><span class="cx">         Link prefetch not useful for top-level navigation
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessmacTiledCoreAnimationDrawingAreaProxymm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm (244409 => 244410)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm  2019-04-17 23:29:45 UTC (rev 244409)
+++ trunk/Source/WebKit/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm     2019-04-17 23:33:20 UTC (rev 244410)
</span><span class="lines">@@ -122,7 +122,7 @@
</span><span class="cx"> void TiledCoreAnimationDrawingAreaProxy::waitForDidUpdateActivityState(ActivityStateChangeID)
</span><span class="cx"> {
</span><span class="cx">     Seconds activityStateUpdateTimeout = Seconds::fromMilliseconds(250);
</span><del>-    process().connection()->waitForAndDispatchImmediately<Messages::WebPageProxy::DidUpdateActivityState>(m_identifier.toUInt64(), activityStateUpdateTimeout, IPC::WaitForOption::InterruptWaitingIfSyncMessageArrives);
</del><ins>+    process().connection()->waitForAndDispatchImmediately<Messages::WebPageProxy::DidUpdateActivityState>(m_webPageProxy.pageID(), activityStateUpdateTimeout, IPC::WaitForOption::InterruptWaitingIfSyncMessageArrives);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void TiledCoreAnimationDrawingAreaProxy::intrinsicContentSizeDidChange(const IntSize& newIntrinsicContentSize)
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (244409 => 244410)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog    2019-04-17 23:29:45 UTC (rev 244409)
+++ trunk/Tools/ChangeLog       2019-04-17 23:33:20 UTC (rev 244410)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2019-04-17  Tim Horton  <timothy_horton@apple.com>
+
+        REGRESSION (r241988): Switching tabs is slow
+        https://bugs.webkit.org/show_bug.cgi?id=197037
+        <rdar://problem/49951473>
+
+        Reviewed by Simon Fraser.
+
+        * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+        * TestWebKitAPI/Tests/WebKitCocoa/ReparentWebViewTimeout.mm: Added.
+        (TEST):
+        * TestWebKitAPI/cocoa/TestWKWebView.h:
+        * TestWebKitAPI/cocoa/TestWKWebView.mm:
+        (-[TestWKWebView addToTestWindow]):
+        Add a test that hangs without this fix.
+
</ins><span class="cx"> 2019-04-17  Truitt Savell  <tsavell@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Unreviewed, rolling out r244400.
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestWebKitAPIxcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj (244409 => 244410)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj        2019-04-17 23:29:45 UTC (rev 244409)
+++ trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj   2019-04-17 23:33:20 UTC (rev 244410)
</span><span class="lines">@@ -89,6 +89,7 @@
</span><span class="cx">          290F4275172A221C00939FF0 /* custom-protocol-sync-xhr.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 290F4274172A1FDE00939FF0 /* custom-protocol-sync-xhr.html */; };
</span><span class="cx">          297234B7173AFAC700983601 /* CustomProtocolsInvalidScheme_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 297234B5173AFAC700983601 /* CustomProtocolsInvalidScheme_Bundle.cpp */; };
</span><span class="cx">          2D00065F1C1F589A0088E6A7 /* WKPDFViewResizeCrash.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2D00065D1C1F58940088E6A7 /* WKPDFViewResizeCrash.mm */; };
</span><ins>+               2D08E9372267D0F4002518DA /* ReparentWebViewTimeout.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2D08E9362267D0F3002518DA /* ReparentWebViewTimeout.mm */; };
</ins><span class="cx">           2D1646E21D1862CD00015A1A /* DeferredViewInWindowStateChange.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2D1646E11D1862CD00015A1A /* DeferredViewInWindowStateChange.mm */; };
</span><span class="cx">          2D1C04A71D76298B000A6816 /* TestNavigationDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2D1C04A61D76298B000A6816 /* TestNavigationDelegate.mm */; };
</span><span class="cx">          2D21FE591F04642900B58E7D /* WKPDFViewStablePresentationUpdateCallback.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2D21FE581F04642800B58E7D /* WKPDFViewStablePresentationUpdateCallback.mm */; };
</span><span class="lines">@@ -1444,6 +1445,7 @@
</span><span class="cx">          29AB8AA2164C7A9300D49BEC /* TestBrowsingContextLoadDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = TestBrowsingContextLoadDelegate.mm; sourceTree = "<group>"; };
</span><span class="cx">          29AB8AA3164C7A9300D49BEC /* TestBrowsingContextLoadDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TestBrowsingContextLoadDelegate.h; sourceTree = "<group>"; };
</span><span class="cx">          2D00065D1C1F58940088E6A7 /* WKPDFViewResizeCrash.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKPDFViewResizeCrash.mm; sourceTree = "<group>"; };
</span><ins>+               2D08E9362267D0F3002518DA /* ReparentWebViewTimeout.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ReparentWebViewTimeout.mm; sourceTree = "<group>"; };
</ins><span class="cx">           2D1646E11D1862CD00015A1A /* DeferredViewInWindowStateChange.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = DeferredViewInWindowStateChange.mm; path = WebKit/DeferredViewInWindowStateChange.mm; sourceTree = "<group>"; };
</span><span class="cx">          2D1C04A51D76298B000A6816 /* TestNavigationDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestNavigationDelegate.h; path = cocoa/TestNavigationDelegate.h; sourceTree = "<group>"; };
</span><span class="cx">          2D1C04A61D76298B000A6816 /* TestNavigationDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = TestNavigationDelegate.mm; path = cocoa/TestNavigationDelegate.mm; sourceTree = "<group>"; };
</span><span class="lines">@@ -2645,6 +2647,7 @@
</span><span class="cx">                          52D5D6BD21B9F1B20046ABA6 /* RenderingProgress.mm */,
</span><span class="cx">                          52D5D6BE21B9F1B20046ABA6 /* RenderingProgressPlugIn.mm */,
</span><span class="cx">                          52D5D6BF21B9F1B20046ABA6 /* RenderingProgressProtocol.h */,
</span><ins>+                               2D08E9362267D0F3002518DA /* ReparentWebViewTimeout.mm */,
</ins><span class="cx">                           2D2BEB2C22324E5F005544CA /* RequestTextInputContext.mm */,
</span><span class="cx">                          CD9E292B1C90A71F000BB800 /* RequiresUserActionForPlayback.mm */,
</span><span class="cx">                          51C8E1A41F26AC5400BF731B /* ResourceLoadStatistics.mm */,
</span><span class="lines">@@ -4286,6 +4289,7 @@
</span><span class="cx">                          A12DDBFB1E836F0700CF6CAE /* RenderedImageWithOptions.mm in Sources */,
</span><span class="cx">                          52D5D6C021B9F1B30046ABA6 /* RenderingProgress.mm in Sources */,
</span><span class="cx">                          F464AF9220BB66EA007F9B18 /* RenderingProgressTests.mm in Sources */,
</span><ins>+                               2D08E9372267D0F4002518DA /* ReparentWebViewTimeout.mm in Sources */,
</ins><span class="cx">                           2D2BEB2D22324E5F005544CA /* RequestTextInputContext.mm in Sources */,
</span><span class="cx">                          7C83E0C41D0A654200FEBCF3 /* RequiresUserActionForPlayback.mm in Sources */,
</span><span class="cx">                          7CCE7F0E1A411AE600447C4C /* ResizeReversePaginatedWebView.cpp in Sources */,
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWebKitCocoaReparentWebViewTimeoutmm"></a>
<div class="addfile"><h4>Added: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ReparentWebViewTimeout.mm (0 => 244410)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ReparentWebViewTimeout.mm                            (rev 0)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ReparentWebViewTimeout.mm       2019-04-17 23:33:20 UTC (rev 244410)
</span><span class="lines">@@ -0,0 +1,68 @@
</span><ins>+/*
+ * Copyright (C) 2019 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. AND ITS CONTRIBUTORS ``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 ITS 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"
+
+#import "PlatformUtilities.h"
+#import "TestWKWebView.h"
+#import <WebKit/WKProcessPoolPrivate.h>
+#import <WebKit/WKWebViewPrivate.h>
+#import <WebKit/_WKProcessPoolConfiguration.h>
+#import <wtf/RetainPtr.h>
+
+TEST(WebKit, ReparentWebViewTimeout)
+{
+    RetainPtr<_WKProcessPoolConfiguration> processPoolConfiguration = [[_WKProcessPoolConfiguration alloc] init];
+    [processPoolConfiguration setIgnoreSynchronousMessagingTimeoutsForTesting:YES];
+
+    RetainPtr<WKWebViewConfiguration> configuration = adoptNS([[WKWebViewConfiguration alloc] init]);
+    [configuration setProcessPool:[[[WKProcessPool alloc] _initWithConfiguration:processPoolConfiguration.get()] autorelease]];
+
+    RetainPtr<TestWKWebView> webView = adoptNS([[TestWKWebView alloc] initWithFrame:CGRectMake(0, 0, 100, 100) configuration:configuration.get() addToWindow:YES]);
+    [webView synchronouslyLoadHTMLString:@"hello"];
+    [webView waitForNextPresentationUpdate];
+
+    void (^runTest)(void) = ^{
+        __block bool done = false;
+
+        dispatch_async(dispatch_get_main_queue(), ^{
+            dispatch_async(dispatch_get_main_queue(), ^{
+                [webView removeFromSuperview];
+
+                dispatch_async(dispatch_get_main_queue(), ^{
+                    [webView addToTestWindow];
+                    [webView waitForNextPresentationUpdate];
+                    done = true;
+                });
+            });
+        });
+
+        TestWebKitAPI::Util::run(&done);
+        done = false;
+    };
+
+    runTest();
+    runTest();
+}
</ins></span></pre></div>
<a id="trunkToolsTestWebKitAPIcocoaTestWKWebViewh"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/cocoa/TestWKWebView.h (244409 => 244410)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/cocoa/TestWKWebView.h  2019-04-17 23:29:45 UTC (rev 244409)
+++ trunk/Tools/TestWebKitAPI/cocoa/TestWKWebView.h     2019-04-17 23:33:20 UTC (rev 244410)
</span><span class="lines">@@ -76,6 +76,7 @@
</span><span class="cx"> - (NSString *)stylePropertyAtSelectionEnd:(NSString *)propertyName;
</span><span class="cx"> - (void)collapseToStart;
</span><span class="cx"> - (void)collapseToEnd;
</span><ins>+- (void)addToTestWindow;
</ins><span class="cx"> @end
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(IOS_FAMILY)
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPIcocoaTestWKWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/cocoa/TestWKWebView.mm (244409 => 244410)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/cocoa/TestWKWebView.mm 2019-04-17 23:29:45 UTC (rev 244409)
+++ trunk/Tools/TestWebKitAPI/cocoa/TestWKWebView.mm    2019-04-17 23:33:20 UTC (rev 244410)
</span><span class="lines">@@ -350,6 +350,15 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+- (void)addToTestWindow
+{
+#if PLATFORM(MAC)
+    [[_hostWindow contentView] addSubview:self];
+#else
+    [_hostWindow addSubview:self];
+#endif
+}
+
</ins><span class="cx"> - (void)clearMessageHandlers:(NSArray *)messageNames
</span><span class="cx"> {
</span><span class="cx">     for (NSString *messageName in messageNames)
</span></span></pre>
</div>
</div>

</body>
</html>