<!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>[208340] 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/208340">208340</a></dd>
<dt>Author</dt> <dd>mitz@apple.com</dd>
<dt>Date</dt> <dd>2016-11-03 12:31:07 -0700 (Thu, 03 Nov 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>WKWebView’s _observedRenderingProgressEvents not restored after web process crash
https://bugs.webkit.org/show_bug.cgi?id=164368
&lt;rdar://problem/29091954&gt;

Reviewed by Anders Carlsson.

Source/WebKit2:

Test: TestWebKitAPI/Tests/WebKit2Cocoa/ObservedRenderingProgressEventsAfterCrash.mm.

* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode): Encode new observedLayoutMilestones member.
(WebKit::WebPageCreationParameters::decode): Decode it.
* Shared/WebPageCreationParameters.h: Declared new observedLayoutMilestones member variable.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy): Removed initializer for
  m_wantsSessionRestorationRenderTreeSizeThresholdEvent.
(WebKit::WebPageProxy::listenForLayoutMilestones): Update new m_observedLayoutMilestones
  member variable. Don’t update m_wantsSessionRestorationRenderTreeSizeThresholdEvent.
(WebKit::WebPageProxy::creationParameters): Set the observedLayoutMilestones member in the
  creation parameters.

* UIProcess/WebPageProxy.h: Declared new member variable, deleted
  m_wantsSessionRestorationRenderTreeSizeThresholdEvent declaration.

* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::didCommitLayerTree): Rather than using
  m_wantsSessionRestorationRenderTreeSizeThresholdEvent, use m_observedLayoutMilestones.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage): Add the observed layout milestones from the creation parameters.

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2Cocoa/ObservedRenderingProgressEventsAfterCrash.mm: Added.
(TEST):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2SharedWebPageCreationParameterscpp">trunk/Source/WebKit2/Shared/WebPageCreationParameters.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedWebPageCreationParametersh">trunk/Source/WebKit2/Shared/WebPageCreationParameters.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxycpp">trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxyh">trunk/Source/WebKit2/UIProcess/WebPageProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosWebPageProxyIOSmm">trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagecpp">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsTestWebKitAPITestWebKitAPIxcodeprojprojectpbxproj">trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkToolsTestWebKitAPITestsWebKit2CocoaObservedRenderingProgressEventsAfterCrashmm">trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/ObservedRenderingProgressEventsAfterCrash.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (208339 => 208340)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2016-11-03 19:09:42 UTC (rev 208339)
+++ trunk/Source/WebKit2/ChangeLog        2016-11-03 19:31:07 UTC (rev 208340)
</span><span class="lines">@@ -1,3 +1,36 @@
</span><ins>+2016-11-03  Dan Bernstein  &lt;mitz@apple.com&gt;
+
+        WKWebView’s _observedRenderingProgressEvents not restored after web process crash
+        https://bugs.webkit.org/show_bug.cgi?id=164368
+        &lt;rdar://problem/29091954&gt;
+
+        Reviewed by Anders Carlsson.
+
+        Test: TestWebKitAPI/Tests/WebKit2Cocoa/ObservedRenderingProgressEventsAfterCrash.mm.
+
+        * Shared/WebPageCreationParameters.cpp:
+        (WebKit::WebPageCreationParameters::encode): Encode new observedLayoutMilestones member.
+        (WebKit::WebPageCreationParameters::decode): Decode it.
+        * Shared/WebPageCreationParameters.h: Declared new observedLayoutMilestones member variable.
+
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::WebPageProxy): Removed initializer for
+          m_wantsSessionRestorationRenderTreeSizeThresholdEvent.
+        (WebKit::WebPageProxy::listenForLayoutMilestones): Update new m_observedLayoutMilestones
+          member variable. Don’t update m_wantsSessionRestorationRenderTreeSizeThresholdEvent.
+        (WebKit::WebPageProxy::creationParameters): Set the observedLayoutMilestones member in the
+          creation parameters.
+
+        * UIProcess/WebPageProxy.h: Declared new member variable, deleted
+          m_wantsSessionRestorationRenderTreeSizeThresholdEvent declaration.
+
+        * UIProcess/ios/WebPageProxyIOS.mm:
+        (WebKit::WebPageProxy::didCommitLayerTree): Rather than using
+          m_wantsSessionRestorationRenderTreeSizeThresholdEvent, use m_observedLayoutMilestones.
+
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::WebPage): Add the observed layout milestones from the creation parameters.
+
</ins><span class="cx"> 2016-11-02  Alex Christensen  &lt;achristensen@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Reduce PassRefPtr use in WebKit2
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebPageCreationParameterscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebPageCreationParameters.cpp (208339 => 208340)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebPageCreationParameters.cpp        2016-11-03 19:09:42 UTC (rev 208339)
+++ trunk/Source/WebKit2/Shared/WebPageCreationParameters.cpp        2016-11-03 19:31:07 UTC (rev 208340)
</span><span class="lines">@@ -88,6 +88,7 @@
</span><span class="cx">     encoder &lt;&lt; appleMailPaginationQuirkEnabled;
</span><span class="cx">     encoder &lt;&lt; shouldScaleViewToFitDocument;
</span><span class="cx">     encoder.encodeEnum(userInterfaceLayoutDirection);
</span><ins>+    encoder.encodeEnum(observedLayoutMilestones);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool WebPageCreationParameters::decode(IPC::Decoder&amp; decoder, WebPageCreationParameters&amp; parameters)
</span><span class="lines">@@ -200,6 +201,8 @@
</span><span class="cx"> 
</span><span class="cx">     if (!decoder.decodeEnum(parameters.userInterfaceLayoutDirection))
</span><span class="cx">         return false;
</span><ins>+    if (!decoder.decodeEnum(parameters.observedLayoutMilestones))
+        return false;
</ins><span class="cx"> 
</span><span class="cx">     return true;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebPageCreationParametersh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebPageCreationParameters.h (208339 => 208340)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebPageCreationParameters.h        2016-11-03 19:09:42 UTC (rev 208339)
+++ trunk/Source/WebKit2/Shared/WebPageCreationParameters.h        2016-11-03 19:31:07 UTC (rev 208340)
</span><span class="lines">@@ -36,6 +36,7 @@
</span><span class="cx"> #include &lt;WebCore/Color.h&gt;
</span><span class="cx"> #include &lt;WebCore/FloatSize.h&gt;
</span><span class="cx"> #include &lt;WebCore/IntSize.h&gt;
</span><ins>+#include &lt;WebCore/LayoutMilestones.h&gt;
</ins><span class="cx"> #include &lt;WebCore/MediaProducer.h&gt;
</span><span class="cx"> #include &lt;WebCore/Pagination.h&gt;
</span><span class="cx"> #include &lt;WebCore/ScrollTypes.h&gt;
</span><span class="lines">@@ -138,6 +139,7 @@
</span><span class="cx">     bool shouldScaleViewToFitDocument;
</span><span class="cx"> 
</span><span class="cx">     WebCore::UserInterfaceLayoutDirection userInterfaceLayoutDirection;
</span><ins>+    WebCore::LayoutMilestones observedLayoutMilestones;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (208339 => 208340)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2016-11-03 19:09:42 UTC (rev 208339)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2016-11-03 19:31:07 UTC (rev 208340)
</span><span class="lines">@@ -443,7 +443,6 @@
</span><span class="cx">     , m_pageCount(0)
</span><span class="cx">     , m_renderTreeSize(0)
</span><span class="cx">     , m_sessionRestorationRenderTreeSize(0)
</span><del>-    , m_wantsSessionRestorationRenderTreeSizeThresholdEvent(false)
</del><span class="cx">     , m_hitRenderTreeSizeThreshold(false)
</span><span class="cx">     , m_suppressVisibilityUpdates(false)
</span><span class="cx">     , m_autoSizingShouldExpandToViewHeight(false)
</span><span class="lines">@@ -2615,8 +2614,10 @@
</span><span class="cx">     if (!isValid())
</span><span class="cx">         return;
</span><span class="cx">     
</span><del>-    m_wantsSessionRestorationRenderTreeSizeThresholdEvent = milestones &amp; WebCore::ReachedSessionRestorationRenderTreeSizeThreshold;
</del><ins>+    if (milestones == m_observedLayoutMilestones)
+        return;
</ins><span class="cx"> 
</span><ins>+    m_observedLayoutMilestones = milestones;
</ins><span class="cx">     m_process-&gt;send(Messages::WebPage::ListenForLayoutMilestones(milestones), m_pageID);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -5529,6 +5530,7 @@
</span><span class="cx"> #endif
</span><span class="cx">     parameters.shouldScaleViewToFitDocument = m_shouldScaleViewToFitDocument;
</span><span class="cx">     parameters.userInterfaceLayoutDirection = m_pageClient.userInterfaceLayoutDirection();
</span><ins>+    parameters.observedLayoutMilestones = m_observedLayoutMilestones;
</ins><span class="cx"> 
</span><span class="cx">     return parameters;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (208339 => 208340)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2016-11-03 19:09:42 UTC (rev 208339)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2016-11-03 19:31:07 UTC (rev 208340)
</span><span class="lines">@@ -1697,6 +1697,8 @@
</span><span class="cx">     bool m_useFixedLayout;
</span><span class="cx">     WebCore::IntSize m_fixedLayoutSize;
</span><span class="cx"> 
</span><ins>+    WebCore::LayoutMilestones m_observedLayoutMilestones { 0 };
+
</ins><span class="cx">     bool m_suppressScrollbarAnimations;
</span><span class="cx"> 
</span><span class="cx">     WebCore::Pagination::Mode m_paginationMode;
</span><span class="lines">@@ -1849,7 +1851,6 @@
</span><span class="cx"> 
</span><span class="cx">     uint64_t m_renderTreeSize;
</span><span class="cx">     uint64_t m_sessionRestorationRenderTreeSize;
</span><del>-    bool m_wantsSessionRestorationRenderTreeSizeThresholdEvent;
</del><span class="cx">     bool m_hitRenderTreeSizeThreshold;
</span><span class="cx"> 
</span><span class="cx">     bool m_suppressVisibilityUpdates;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosWebPageProxyIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm (208339 => 208340)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm        2016-11-03 19:09:42 UTC (rev 208339)
+++ trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm        2016-11-03 19:31:07 UTC (rev 208340)
</span><span class="lines">@@ -361,7 +361,7 @@
</span><span class="cx">     m_pageClient.didCommitLayerTree(layerTreeTransaction);
</span><span class="cx"> 
</span><span class="cx">     // FIXME: Remove this special mechanism and fold it into the transaction's layout milestones.
</span><del>-    if (m_wantsSessionRestorationRenderTreeSizeThresholdEvent &amp;&amp; !m_hitRenderTreeSizeThreshold
</del><ins>+    if ((m_observedLayoutMilestones &amp; WebCore::ReachedSessionRestorationRenderTreeSizeThreshold) &amp;&amp; !m_hitRenderTreeSizeThreshold
</ins><span class="cx">         &amp;&amp; exceedsRenderTreeSizeSizeThreshold(m_sessionRestorationRenderTreeSize, layerTreeTransaction.renderTreeSize())) {
</span><span class="cx">         m_hitRenderTreeSizeThreshold = true;
</span><span class="cx">         didReachLayoutMilestone(WebCore::ReachedSessionRestorationRenderTreeSizeThreshold);
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (208339 => 208340)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2016-11-03 19:09:42 UTC (rev 208339)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2016-11-03 19:31:07 UTC (rev 208340)
</span><span class="lines">@@ -560,6 +560,8 @@
</span><span class="cx">     if (parameters.viewScaleFactor != 1)
</span><span class="cx">         scaleView(parameters.viewScaleFactor);
</span><span class="cx"> 
</span><ins>+    m_page-&gt;addLayoutMilestones(parameters.observedLayoutMilestones);
+
</ins><span class="cx"> #if PLATFORM(COCOA)
</span><span class="cx">     m_page-&gt;settings().setContentDispositionAttachmentSandboxEnabled(true);
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (208339 => 208340)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2016-11-03 19:09:42 UTC (rev 208339)
+++ trunk/Tools/ChangeLog        2016-11-03 19:31:07 UTC (rev 208340)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2016-11-03  Dan Bernstein  &lt;mitz@apple.com&gt;
+
+        WKWebView’s _observedRenderingProgressEvents not restored after web process crash
+        https://bugs.webkit.org/show_bug.cgi?id=164368
+        &lt;rdar://problem/29091954&gt;
+
+        Reviewed by Anders Carlsson.
+
+        * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+        * TestWebKitAPI/Tests/WebKit2Cocoa/ObservedRenderingProgressEventsAfterCrash.mm: Added.
+        (TEST):
+
</ins><span class="cx"> 2016-11-03  Alex Christensen  &lt;achristensen@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Purge PassRefPtr from Tools
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestWebKitAPIxcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj (208339 => 208340)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj        2016-11-03 19:09:42 UTC (rev 208339)
+++ trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj        2016-11-03 19:31:07 UTC (rev 208340)
</span><span class="lines">@@ -95,6 +95,7 @@
</span><span class="cx">                 378E64771632655E00B6C676 /* InjectedBundleFrameHitTest_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 378E64751632655D00B6C676 /* InjectedBundleFrameHitTest_Bundle.cpp */; };
</span><span class="cx">                 378E64791632707400B6C676 /* link-with-title.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 378E647816326FDF00B6C676 /* link-with-title.html */; };
</span><span class="cx">                 379028B914FAC24C007E6B43 /* acceptsFirstMouse.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 379028B814FABE49007E6B43 /* acceptsFirstMouse.html */; };
</span><ins>+                37A22AA71DCAA27200AFBFC4 /* ObservedRenderingProgressEventsAfterCrash.mm in Sources */ = {isa = PBXBuildFile; fileRef = 37A22AA51DCAA27200AFBFC4 /* ObservedRenderingProgressEventsAfterCrash.mm */; };
</ins><span class="cx">                 37B47E301D64E7CA005F4EFF /* WKObject.mm in Sources */ = {isa = PBXBuildFile; fileRef = 37B47E2E1D64E7CA005F4EFF /* WKObject.mm */; };
</span><span class="cx">                 37BCA61C1B596BA9002012CA /* ShouldOpenExternalURLsInNewWindowActions.mm in Sources */ = {isa = PBXBuildFile; fileRef = 37BCA61B1B596BA9002012CA /* ShouldOpenExternalURLsInNewWindowActions.mm */; };
</span><span class="cx">                 37D36ED71AF42ECD00BAF5D9 /* LoadAlternateHTMLString.mm in Sources */ = {isa = PBXBuildFile; fileRef = 37D36ED61AF42ECD00BAF5D9 /* LoadAlternateHTMLString.mm */; };
</span><span class="lines">@@ -850,6 +851,7 @@
</span><span class="cx">                 379028B514FABD92007E6B43 /* AcceptsFirstMouse.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = AcceptsFirstMouse.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 379028B814FABE49007E6B43 /* acceptsFirstMouse.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = acceptsFirstMouse.html; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 3799AD3914120A43005EB0C6 /* StringByEvaluatingJavaScriptFromString.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = StringByEvaluatingJavaScriptFromString.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                37A22AA51DCAA27200AFBFC4 /* ObservedRenderingProgressEventsAfterCrash.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ObservedRenderingProgressEventsAfterCrash.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 37A6895D148A9B50005100FA /* SubresourceErrorCrash.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SubresourceErrorCrash.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 37B47E2E1D64E7CA005F4EFF /* WKObject.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKObject.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 37BCA61B1B596BA9002012CA /* ShouldOpenExternalURLsInNewWindowActions.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ShouldOpenExternalURLsInNewWindowActions.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -1414,6 +1416,7 @@
</span><span class="cx">                                 51CD1C6A1B38CE3600142CA5 /* ModalAlerts.mm */,
</span><span class="cx">                                 1ABC3DED1899BE6D004F0626 /* Navigation.mm */,
</span><span class="cx">                                 2ECFF5541D9B12F800B55394 /* NowPlayingControlsTests.mm */,
</span><ins>+                                37A22AA51DCAA27200AFBFC4 /* ObservedRenderingProgressEventsAfterCrash.mm */,
</ins><span class="cx">                                 CEA6CF2219CCF5BD0064F5A7 /* OpenAndCloseWindow.mm */,
</span><span class="cx">                                 C95501BE19AD2FAF0049BE3E /* Preferences.mm */,
</span><span class="cx">                                 5798E2AF1CAF5C2800C5CBA0 /* ProvisionalURLNotChange.mm */,
</span><span class="lines">@@ -2388,6 +2391,7 @@
</span><span class="cx">                                 7CCE7EE91A411AE600447C4C /* DidAssociateFormControls.cpp in Sources */,
</span><span class="cx">                                 7CCE7EEA1A411AE600447C4C /* DidNotHandleKeyDown.cpp in Sources */,
</span><span class="cx">                                 7CCE7EEB1A411AE600447C4C /* DocumentStartUserScriptAlertCrash.cpp in Sources */,
</span><ins>+                                37A22AA71DCAA27200AFBFC4 /* ObservedRenderingProgressEventsAfterCrash.mm in Sources */,
</ins><span class="cx">                                 7CCE7EBB1A411A7E00447C4C /* DOMHTMLTableCellCellAbove.mm in Sources */,
</span><span class="cx">                                 2D51A0C71C8BF00C00765C45 /* DOMHTMLVideoElementWrapper.mm in Sources */,
</span><span class="cx">                                 7CCE7EBC1A411A7E00447C4C /* DOMNodeFromJSObject.mm in Sources */,
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWebKit2CocoaObservedRenderingProgressEventsAfterCrashmm"></a>
<div class="addfile"><h4>Added: trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/ObservedRenderingProgressEventsAfterCrash.mm (0 => 208340)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/ObservedRenderingProgressEventsAfterCrash.mm                                (rev 0)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/ObservedRenderingProgressEventsAfterCrash.mm        2016-11-03 19:31:07 UTC (rev 208340)
</span><span class="lines">@@ -0,0 +1,60 @@
</span><ins>+/*
+ * Copyright (C) 2016 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 &quot;config.h&quot;
+
+#import &quot;PlatformUtilities.h&quot;
+#import &quot;TestNavigationDelegate.h&quot;
+#import &lt;WebKit/WKWebViewConfigurationPrivate.h&gt;
+#import &lt;WebKit/WKWebViewPrivate.h&gt;
+#import &lt;wtf/RetainPtr.h&gt;
+
+#if PLATFORM(MAC) &amp;&amp; WK_API_ENABLED
+
+TEST(WebKit2, ObservedRenderingProgressEventsAfterCrash)
+{
+    __block bool done = false;
+    RetainPtr&lt;WKWebViewConfiguration&gt; configuration = adoptNS([[WKWebViewConfiguration alloc] init]);
+    [configuration setSuppressesIncrementalRendering:YES];
+
+    RetainPtr&lt;WKWebView&gt; webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 100, 100) configuration:configuration.get()]);
+
+    RetainPtr&lt;NSWindow&gt; window = adoptNS([[NSWindow alloc] initWithContentRect:[webView frame] styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO]);
+    [window.get().contentView addSubview:webView.get()];
+
+    RetainPtr&lt;TestNavigationDelegate&gt; delegate = adoptNS([[TestNavigationDelegate alloc] init]);
+    [delegate setRenderingProgressDidChange:^(WKWebView *webView, _WKRenderingProgressEvents progressEvents) {
+        if (progressEvents &amp; _WKRenderingProgressEventFirstPaintAfterSuppressedIncrementalRendering)
+            done = true;
+    }];
+
+    [webView setNavigationDelegate:delegate.get()];
+    [webView _setObservedRenderingProgressEvents:_WKRenderingProgressEventFirstPaintAfterSuppressedIncrementalRendering];
+    [webView _killWebContentProcessAndResetState];
+    [webView loadHTMLString:@&quot;content&quot; baseURL:nil];
+    TestWebKitAPI::Util::run(&amp;done);
+}
+
+#endif
</ins></span></pre>
</div>
</div>

</body>
</html>