<!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>[169475] 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/169475">169475</a></dd>
<dt>Author</dt> <dd>jhoneycutt@apple.com</dd>
<dt>Date</dt> <dd>2014-05-29 16:52:32 -0700 (Thu, 29 May 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Roll <a href="http://trac.webkit.org/projects/webkit/changeset/168668">r168668</a> back in.

&lt;https://bugs.webkit.org/show_bug.cgi?id=132621&gt;

Reviewed by Brent Fulgham.

Source/WebCore:
Tests: fast/events/beforeload-assertion.html
       fast/events/beforeload-iframe-crash.html
       fast/events/beforeload-input-time-crash.html

* WebCore.exp.in:
* dom/Document.cpp:
(WebCore::Document::updateLayoutIgnorePendingStylesheets):
* dom/Document.h:
* html/HTMLAppletElement.cpp:
(WebCore::HTMLAppletElement::renderWidgetForJSBindings):
* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::renderWidgetForJSBindings):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::renderWidgetForJSBindings):
* page/FrameView.cpp:
(WebCore::FrameView::FrameView):
(WebCore::FrameView::reset):
(WebCore::FrameView::updateEmbeddedObjectsTimerFired):
(WebCore::FrameView::flushAnyPendingPostLayoutTasks):
(WebCore::FrameView::performPostLayoutTasks):
* page/FrameView.h:
* testing/Internals.cpp:
(WebCore::Internals::updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks):
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit:
* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:

LayoutTests:
* compositing/plugins/composited-plugin.html:
* compositing/plugins/no-backing-store.html:
* fast/dom/beforeload/flash-before-load.html:
* fast/events/beforeload-assertion-expected.txt: Added.
* fast/events/beforeload-assertion.html: Added.
* fast/events/beforeload-iframe-crash-expected.txt: Added.
* fast/events/beforeload-iframe-crash.html: Added.
* fast/events/beforeload-input-time-crash-expected.txt: Added.
* fast/events/beforeload-input-time-crash.html: Added.
* http/tests/security/contentSecurityPolicy/1.1/plugintypes-notype-data.html:
* http/tests/security/contentSecurityPolicy/1.1/plugintypes-nourl-blocked.html:
* http/tests/security/contentSecurityPolicy/object-src-no-url-allowed.html:
* http/tests/security/contentSecurityPolicy/object-src-no-url-blocked.html:
* http/tests/security/contentSecurityPolicy/object-src-none-allowed.html:
* http/tests/security/contentSecurityPolicy/object-src-none-blocked.html:
* http/tests/security/contentSecurityPolicy/resources/multiple-iframe-plugin-test.js:
(testImpl.iframe.onload):
(testImpl):
* http/tests/security/mixedContent/insecure-plugin-in-iframe.html:
* platform/mac/plugins/supports-carbon-event-model.html:
* platform/mac/plugins/testplugin-onnew-onpaint.html:
* plugins/get-user-agent-with-null-npp-from-npp-new.html:
* plugins/mouse-click-plugin-clears-selection.html:
* plugins/netscape-plugin-map-data-to-src.html:
* plugins/no-mime-with-valid-extension.html:
* plugins/plugin-initiate-popup-window.html:
* plugins/windowless_plugin_paint_test.html:
* resources/plugin.js: Added.
(runAfterPluginLoad):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestscompositingpluginscompositedpluginhtml">trunk/LayoutTests/compositing/plugins/composited-plugin.html</a></li>
<li><a href="#trunkLayoutTestscompositingpluginsnobackingstorehtml">trunk/LayoutTests/compositing/plugins/no-backing-store.html</a></li>
<li><a href="#trunkLayoutTestsfastdombeforeloadflashbeforeloadhtml">trunk/LayoutTests/fast/dom/beforeload/flash-before-load.html</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritycontentSecurityPolicy11plugintypesnotypedatahtml">trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/plugintypes-notype-data.html</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritycontentSecurityPolicy11plugintypesnourlblockedhtml">trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/plugintypes-nourl-blocked.html</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritycontentSecurityPolicyobjectsrcnourlallowedhtml">trunk/LayoutTests/http/tests/security/contentSecurityPolicy/object-src-no-url-allowed.html</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritycontentSecurityPolicyobjectsrcnourlblockedhtml">trunk/LayoutTests/http/tests/security/contentSecurityPolicy/object-src-no-url-blocked.html</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritycontentSecurityPolicyobjectsrcnoneallowedhtml">trunk/LayoutTests/http/tests/security/contentSecurityPolicy/object-src-none-allowed.html</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritycontentSecurityPolicyobjectsrcnoneblockedhtml">trunk/LayoutTests/http/tests/security/contentSecurityPolicy/object-src-none-blocked.html</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritycontentSecurityPolicyresourcesmultipleiframeplugintestjs">trunk/LayoutTests/http/tests/security/contentSecurityPolicy/resources/multiple-iframe-plugin-test.js</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritymixedContentinsecureplugininiframehtml">trunk/LayoutTests/http/tests/security/mixedContent/insecure-plugin-in-iframe.html</a></li>
<li><a href="#trunkLayoutTestsplatformmacpluginssupportscarboneventmodelhtml">trunk/LayoutTests/platform/mac/plugins/supports-carbon-event-model.html</a></li>
<li><a href="#trunkLayoutTestsplatformmacpluginstestpluginonnewonpainthtml">trunk/LayoutTests/platform/mac/plugins/testplugin-onnew-onpaint.html</a></li>
<li><a href="#trunkLayoutTestspluginsgetuseragentwithnullnppfromnppnewhtml">trunk/LayoutTests/plugins/get-user-agent-with-null-npp-from-npp-new.html</a></li>
<li><a href="#trunkLayoutTestspluginsmouseclickpluginclearsselectionhtml">trunk/LayoutTests/plugins/mouse-click-plugin-clears-selection.html</a></li>
<li><a href="#trunkLayoutTestspluginsnetscapepluginmapdatatosrchtml">trunk/LayoutTests/plugins/netscape-plugin-map-data-to-src.html</a></li>
<li><a href="#trunkLayoutTestspluginsnomimewithvalidextensionhtml">trunk/LayoutTests/plugins/no-mime-with-valid-extension.html</a></li>
<li><a href="#trunkLayoutTestspluginsplugininitiatepopupwindowhtml">trunk/LayoutTests/plugins/plugin-initiate-popup-window.html</a></li>
<li><a href="#trunkLayoutTestspluginswindowless_plugin_paint_testhtml">trunk/LayoutTests/plugins/windowless_plugin_paint_test.html</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCoreexpin">trunk/Source/WebCore/WebCore.exp.in</a></li>
<li><a href="#trunkSourceWebCoredomDocumentcpp">trunk/Source/WebCore/dom/Document.cpp</a></li>
<li><a href="#trunkSourceWebCoredomDocumenth">trunk/Source/WebCore/dom/Document.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLAppletElementcpp">trunk/Source/WebCore/html/HTMLAppletElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLEmbedElementcpp">trunk/Source/WebCore/html/HTMLEmbedElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLObjectElementcpp">trunk/Source/WebCore/html/HTMLObjectElement.cpp</a></li>
<li><a href="#trunkSourceWebCorepageFrameViewcpp">trunk/Source/WebCore/page/FrameView.cpp</a></li>
<li><a href="#trunkSourceWebCorepageFrameViewh">trunk/Source/WebCore/page/FrameView.h</a></li>
<li><a href="#trunkSourceWebCoretestingInternalscpp">trunk/Source/WebCore/testing/Internals.cpp</a></li>
<li><a href="#trunkSourceWebCoretestingInternalsh">trunk/Source/WebCore/testing/Internals.h</a></li>
<li><a href="#trunkSourceWebCoretestingInternalsidl">trunk/Source/WebCore/testing/Internals.idl</a></li>
<li><a href="#trunkSourceWebKitChangeLog">trunk/Source/WebKit/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitWebKitvcxprojWebKitExportGeneratorWebKitExportsdefin">trunk/Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfasteventsbeforeloadassertionexpectedtxt">trunk/LayoutTests/fast/events/beforeload-assertion-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfasteventsbeforeloadassertionhtml">trunk/LayoutTests/fast/events/beforeload-assertion.html</a></li>
<li><a href="#trunkLayoutTestsfasteventsbeforeloadiframecrashexpectedtxt">trunk/LayoutTests/fast/events/beforeload-iframe-crash-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfasteventsbeforeloadiframecrashhtml">trunk/LayoutTests/fast/events/beforeload-iframe-crash.html</a></li>
<li><a href="#trunkLayoutTestsfasteventsbeforeloadinputtimecrashexpectedtxt">trunk/LayoutTests/fast/events/beforeload-input-time-crash-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfasteventsbeforeloadinputtimecrashhtml">trunk/LayoutTests/fast/events/beforeload-input-time-crash.html</a></li>
<li><a href="#trunkLayoutTestsresourcespluginjs">trunk/LayoutTests/resources/plugin.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (169474 => 169475)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-05-29 23:41:15 UTC (rev 169474)
+++ trunk/LayoutTests/ChangeLog        2014-05-29 23:52:32 UTC (rev 169475)
</span><span class="lines">@@ -1,3 +1,41 @@
</span><ins>+2014-05-28  Jon Honeycutt  &lt;jhoneycutt@apple.com&gt;
+
+        Roll r168668 back in.
+
+        &lt;https://bugs.webkit.org/show_bug.cgi?id=132621&gt;
+
+        Reviewed by Brent Fulgham.
+
+        * compositing/plugins/composited-plugin.html:
+        * compositing/plugins/no-backing-store.html:
+        * fast/dom/beforeload/flash-before-load.html:
+        * fast/events/beforeload-assertion-expected.txt: Added.
+        * fast/events/beforeload-assertion.html: Added.
+        * fast/events/beforeload-iframe-crash-expected.txt: Added.
+        * fast/events/beforeload-iframe-crash.html: Added.
+        * fast/events/beforeload-input-time-crash-expected.txt: Added.
+        * fast/events/beforeload-input-time-crash.html: Added.
+        * http/tests/security/contentSecurityPolicy/1.1/plugintypes-notype-data.html:
+        * http/tests/security/contentSecurityPolicy/1.1/plugintypes-nourl-blocked.html:
+        * http/tests/security/contentSecurityPolicy/object-src-no-url-allowed.html:
+        * http/tests/security/contentSecurityPolicy/object-src-no-url-blocked.html:
+        * http/tests/security/contentSecurityPolicy/object-src-none-allowed.html:
+        * http/tests/security/contentSecurityPolicy/object-src-none-blocked.html:
+        * http/tests/security/contentSecurityPolicy/resources/multiple-iframe-plugin-test.js:
+        (testImpl.iframe.onload):
+        (testImpl):
+        * http/tests/security/mixedContent/insecure-plugin-in-iframe.html:
+        * platform/mac/plugins/supports-carbon-event-model.html:
+        * platform/mac/plugins/testplugin-onnew-onpaint.html:
+        * plugins/get-user-agent-with-null-npp-from-npp-new.html:
+        * plugins/mouse-click-plugin-clears-selection.html:
+        * plugins/netscape-plugin-map-data-to-src.html:
+        * plugins/no-mime-with-valid-extension.html:
+        * plugins/plugin-initiate-popup-window.html:
+        * plugins/windowless_plugin_paint_test.html:
+        * resources/plugin.js: Added.
+        (runAfterPluginLoad):
+
</ins><span class="cx"> 2014-05-29  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Support -apple-system-font on OS X
</span></span></pre></div>
<a id="trunkLayoutTestscompositingpluginscompositedpluginhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/compositing/plugins/composited-plugin.html (169474 => 169475)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/compositing/plugins/composited-plugin.html        2014-05-29 23:41:15 UTC (rev 169474)
+++ trunk/LayoutTests/compositing/plugins/composited-plugin.html        2014-05-29 23:52:32 UTC (rev 169475)
</span><span class="lines">@@ -1,6 +1,8 @@
</span><span class="cx"> &lt;!DOCTYPE html&gt;
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;body&gt;
</span><ins>+  &lt;script src=&quot;../../resources/plugin.js&quot;&gt;&lt;/script&gt;
+  &lt;script&gt;runAfterPluginLoad(null, NotifyDone);&lt;/script&gt;
</ins><span class="cx">   &lt;embed type=&quot;application/x-webkit-test-netscape&quot; drawingmodel=&quot;coreanimation&quot;&gt;
</span><span class="cx"> &lt;/body&gt;
</span><span class="cx"> &lt;/html&gt;
</span></span></pre></div>
<a id="trunkLayoutTestscompositingpluginsnobackingstorehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/compositing/plugins/no-backing-store.html (169474 => 169475)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/compositing/plugins/no-backing-store.html        2014-05-29 23:41:15 UTC (rev 169474)
+++ trunk/LayoutTests/compositing/plugins/no-backing-store.html        2014-05-29 23:52:32 UTC (rev 169475)
</span><span class="lines">@@ -6,12 +6,13 @@
</span><span class="cx">       margin: 10px;
</span><span class="cx">     }
</span><span class="cx">   &lt;/style&gt;
</span><ins>+  &lt;script src=&quot;../../resources/plugin.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx">   &lt;script type=&quot;text/javascript&quot; charset=&quot;utf-8&quot;&gt;
</span><del>-    if (window.testRunner) {
</del><ins>+    if (window.testRunner)
</ins><span class="cx">         testRunner.dumpAsText();
</span><del>-        testRunner.waitUntilDone();
-    }
</del><span class="cx"> 
</span><ins>+    runAfterPluginLoad(doTest, DoNotNotifyDone);
+
</ins><span class="cx">     function doTest()
</span><span class="cx">     {
</span><span class="cx">         // Need to wait for compositing layers to be updated. FIXME remove.
</span><span class="lines">@@ -22,7 +23,6 @@
</span><span class="cx">             }
</span><span class="cx">         }, 0)
</span><span class="cx">     }
</span><del>-    window.addEventListener('load', doTest, false);
</del><span class="cx">   &lt;/script&gt;
</span><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsfastdombeforeloadflashbeforeloadhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/beforeload/flash-before-load.html (169474 => 169475)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/beforeload/flash-before-load.html        2014-05-29 23:41:15 UTC (rev 169474)
+++ trunk/LayoutTests/fast/dom/beforeload/flash-before-load.html        2014-05-29 23:52:32 UTC (rev 169475)
</span><span class="lines">@@ -4,9 +4,12 @@
</span><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
</span><ins>+&lt;script src=&quot;../../../resources/plugin.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;script&gt;
</span><del>-if (window.testRunner)
-    testRunner.dumpAsText();
</del><ins>+    if (window.testRunner)
+        testRunner.dumpAsText();
+
+    runAfterPluginLoad(null, NotifyDone);
</ins><span class="cx"> &lt;/script&gt;
</span><span class="cx"> 
</span><span class="cx"> &lt;object id=&quot;plugin&quot; onbeforeload=&quot;return false&quot; type=&quot;application/x-shockwave-flash&quot; data=&quot;../../../plugins/resources/simple_blank.swf&quot;
</span></span></pre></div>
<a id="trunkLayoutTestsfasteventsbeforeloadassertionexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/events/beforeload-assertion-expected.txt (0 => 169475)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/events/beforeload-assertion-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/events/beforeload-assertion-expected.txt        2014-05-29 23:52:32 UTC (rev 169475)
</span><span class="lines">@@ -0,0 +1,2 @@
</span><ins>+
+PASS if no assertion failure.
</ins></span></pre></div>
<a id="trunkLayoutTestsfasteventsbeforeloadassertionhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/events/beforeload-assertion.html (0 => 169475)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/events/beforeload-assertion.html                                (rev 0)
+++ trunk/LayoutTests/fast/events/beforeload-assertion.html        2014-05-29 23:52:32 UTC (rev 169475)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+&lt;div id=&quot;d1&quot;&gt;&lt;/div&gt;
+&lt;script&gt;
+if (window.testRunner)
+    testRunner.dumpAsText();
+document.addEventListener('beforeload', function(event) {
+    d1.appendChild(document.createElement('button'));
+    d1.offsetLeft;
+    d1.remove();
+}, true);
+&lt;/script&gt;
+&lt;embed src=&quot;data:image/png,&quot;&gt;&lt;/embed&gt;
+&lt;p&gt;PASS if no assertion failure.&lt;/p&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsfasteventsbeforeloadiframecrashexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/events/beforeload-iframe-crash-expected.txt (0 => 169475)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/events/beforeload-iframe-crash-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/events/beforeload-iframe-crash-expected.txt        2014-05-29 23:52:32 UTC (rev 169475)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+PASS if not crashed.
</ins></span></pre></div>
<a id="trunkLayoutTestsfasteventsbeforeloadiframecrashhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/events/beforeload-iframe-crash.html (0 => 169475)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/events/beforeload-iframe-crash.html                                (rev 0)
+++ trunk/LayoutTests/fast/events/beforeload-iframe-crash.html        2014-05-29 23:52:32 UTC (rev 169475)
</span><span class="lines">@@ -0,0 +1,19 @@
</span><ins>+&lt;iframe&gt;&lt;/iframe&gt;&lt;object onbeforeload=&quot;crash()&quot;&gt;
+&lt;script&gt;
+if (window.testRunner) {
+    testRunner.dumpAsText();
+    testRunner.waitUntilDone();
+}
+
+function crash() {
+    document.getElementsByTagName(&quot;iframe&quot;)[0].contentWindow.scrollX;
+    document.open();
+}
+
+document.body.offsetLeft;
+setTimeout(function() {
+    document.close();
+    document.body.innerHTML = 'PASS if not crashed.';
+    testRunner.notifyDone();
+}, 1);
+&lt;/script&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsfasteventsbeforeloadinputtimecrashexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/events/beforeload-input-time-crash-expected.txt (0 => 169475)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/events/beforeload-input-time-crash-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/events/beforeload-input-time-crash-expected.txt        2014-05-29 23:52:32 UTC (rev 169475)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+PASS if not crashed.
</ins></span></pre></div>
<a id="trunkLayoutTestsfasteventsbeforeloadinputtimecrashhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/events/beforeload-input-time-crash.html (0 => 169475)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/events/beforeload-input-time-crash.html                                (rev 0)
+++ trunk/LayoutTests/fast/events/beforeload-input-time-crash.html        2014-05-29 23:52:32 UTC (rev 169475)
</span><span class="lines">@@ -0,0 +1,18 @@
</span><ins>+&lt;input id=&quot;t1&quot; type=&quot;time&quot;&gt;
+&lt;script&gt;
+var time1 = document.getElementById('t1');
+document.addEventListener('beforeload', function(event) {
+    time1.value = time1.value ? '' : '23:59';
+}, true);
+
+if (window.testRunner) {
+    testRunner.dumpAsText();
+    testRunner.waitUntilDone();
+}
+setTimeout(function() {
+    document.body.innerHTML = 'PASS if not crashed.';
+    testRunner.notifyDone();
+}, 100);
+time1.focus();
+&lt;/script&gt;
+&lt;embed src=&quot;data:text/html,PASS&quot;&gt;&lt;/embed&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritycontentSecurityPolicy11plugintypesnotypedatahtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/plugintypes-notype-data.html (169474 => 169475)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/plugintypes-notype-data.html        2014-05-29 23:41:15 UTC (rev 169474)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/plugintypes-notype-data.html        2014-05-29 23:52:32 UTC (rev 169475)
</span><span class="lines">@@ -1,11 +1,14 @@
</span><span class="cx"> &lt;!DOCTYPE html&gt;                                                                                                                                                                                
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+&lt;script src=&quot;/js-test-resources/plugin.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;script&gt;
</span><del>-if (window.testRunner) {
-    testRunner.dumpAsText();
-    testRunner.dumpChildFramesAsText();
-}
</del><ins>+    if (window.testRunner) {
+        testRunner.dumpAsText();
+        testRunner.dumpChildFramesAsText();
+    }
+
+    runAfterPluginLoad(null, NotifyDone);
</ins><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;script src=&quot;/plugins/resources/mock-plugin-logger.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;meta http-equiv=&quot;X-WebKit-CSP&quot; content=&quot;plugin-types application/x-invalid-type&quot;&gt;
</span></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritycontentSecurityPolicy11plugintypesnourlblockedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/plugintypes-nourl-blocked.html (169474 => 169475)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/plugintypes-nourl-blocked.html        2014-05-29 23:41:15 UTC (rev 169474)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/plugintypes-nourl-blocked.html        2014-05-29 23:52:32 UTC (rev 169475)
</span><span class="lines">@@ -1,9 +1,12 @@
</span><span class="cx"> &lt;!DOCTYPE html&gt;
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+&lt;script src=&quot;/js-test-resources/plugin.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;script&gt;
</span><del>-if (window.testRunner)
-    testRunner.dumpAsText();
</del><ins>+    if (window.testRunner)
+        testRunner.dumpAsText();
+
+    runAfterPluginLoad(null, NotifyDone);
</ins><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;meta http-equiv=&quot;X-WebKit-CSP&quot; content=&quot;plugin-types text/plain&quot;&gt;
</span><span class="cx"> &lt;/head&gt;
</span></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritycontentSecurityPolicyobjectsrcnourlallowedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/object-src-no-url-allowed.html (169474 => 169475)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/object-src-no-url-allowed.html        2014-05-29 23:41:15 UTC (rev 169474)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/object-src-no-url-allowed.html        2014-05-29 23:52:32 UTC (rev 169475)
</span><span class="lines">@@ -1,9 +1,12 @@
</span><span class="cx"> &lt;!DOCTYPE html&gt;
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+&lt;script src=&quot;/js-test-resources/plugin.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;script&gt;
</span><del>-if (window.testRunner)
-  testRunner.dumpAsText();
</del><ins>+    if (window.testRunner)
+        testRunner.dumpAsText();
+
+    runAfterPluginLoad(null, NotifyDone);
</ins><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;meta http-equiv=&quot;Content-Security-Policy&quot; content=&quot;object-src 'self'&quot;&gt;
</span><span class="cx"> &lt;/head&gt;
</span></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritycontentSecurityPolicyobjectsrcnourlblockedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/object-src-no-url-blocked.html (169474 => 169475)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/object-src-no-url-blocked.html        2014-05-29 23:41:15 UTC (rev 169474)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/object-src-no-url-blocked.html        2014-05-29 23:52:32 UTC (rev 169475)
</span><span class="lines">@@ -1,9 +1,12 @@
</span><span class="cx"> &lt;!DOCTYPE html&gt;
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+&lt;script src=&quot;/js-test-resources/plugin.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;script&gt;
</span><del>-if (window.testRunner)
-  testRunner.dumpAsText();
</del><ins>+    if (window.testRunner)
+        testRunner.dumpAsText();
+
+    runAfterPluginLoad(null, NotifyDone);
</ins><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;meta http-equiv=&quot;Content-Security-Policy&quot; content=&quot;object-src 'none'&quot;&gt;
</span><span class="cx"> &lt;/head&gt;
</span></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritycontentSecurityPolicyobjectsrcnoneallowedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/object-src-none-allowed.html (169474 => 169475)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/object-src-none-allowed.html        2014-05-29 23:41:15 UTC (rev 169474)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/object-src-none-allowed.html        2014-05-29 23:52:32 UTC (rev 169475)
</span><span class="lines">@@ -1,14 +1,17 @@
</span><span class="cx"> &lt;!DOCTYPE html&gt;
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><del>-&lt;script&gt;
-if (window.testRunner) {
-  testRunner.dumpAsText();
-  testRunner.dumpChildFramesAsText();
-}
-&lt;/script&gt;
</del><ins>+&lt;script src=&quot;/js-test-resources/plugin.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx">   &lt;iframe src=&quot;http://127.0.0.1:8000/security/contentSecurityPolicy/resources/echo-object-data.pl?plugin=data:application/x-webkit-test-netscape,logifloaded&amp;log=PASS!&amp;csp=img-src%20'none'&quot;&gt;&lt;/iframe&gt;
</span><span class="cx"> &lt;/body&gt;
</span><ins>+&lt;script&gt;
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+        testRunner.dumpChildFramesAsText();
+    }
+
+    runAfterPluginLoad(null, NotifyDone, document.getElementsByTagName(&quot;iframe&quot;)[0]);
+&lt;/script&gt;
</ins><span class="cx"> &lt;/html&gt;
</span></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritycontentSecurityPolicyobjectsrcnoneblockedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/object-src-none-blocked.html (169474 => 169475)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/object-src-none-blocked.html        2014-05-29 23:41:15 UTC (rev 169474)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/object-src-none-blocked.html        2014-05-29 23:52:32 UTC (rev 169475)
</span><span class="lines">@@ -1,14 +1,17 @@
</span><span class="cx"> &lt;!DOCTYPE html&gt;
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><del>-&lt;script&gt;
-if (window.testRunner) {
-  testRunner.dumpAsText();
-  testRunner.dumpChildFramesAsText();
-}
-&lt;/script&gt;
</del><ins>+&lt;script src=&quot;/js-test-resources/plugin.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx">   &lt;iframe src=&quot;http://127.0.0.1:8000/security/contentSecurityPolicy/resources/echo-object-data.pl?plugin=data:application/x-webkit-test-netscape,logifloaded&amp;log=FAIL&amp;csp=object-src%20'none'&quot;&gt;&lt;/iframe&gt;
</span><span class="cx"> &lt;/body&gt;
</span><ins>+&lt;script&gt;
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+        testRunner.dumpChildFramesAsText();
+    }
+
+    runAfterPluginLoad(null, NotifyDone, document.getElementsByTagName(&quot;iframe&quot;)[0]);
+&lt;/script&gt;
</ins><span class="cx"> &lt;/html&gt;
</span></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritycontentSecurityPolicyresourcesmultipleiframeplugintestjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/resources/multiple-iframe-plugin-test.js (169474 => 169475)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/resources/multiple-iframe-plugin-test.js        2014-05-29 23:41:15 UTC (rev 169474)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/resources/multiple-iframe-plugin-test.js        2014-05-29 23:52:32 UTC (rev 169475)
</span><span class="lines">@@ -38,7 +38,11 @@
</span><span class="cx">     else
</span><span class="cx">         iframe.src += &quot;&amp;type=application/x-webkit-test-netscape&quot;;
</span><span class="cx"> 
</span><del>-    iframe.onload = function() { testImpl(experimental); };
</del><ins>+    iframe.onload = function() {
+        if (window.internals)
+            internals.updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks(iframe);
+        testImpl(experimental);
+    };
</ins><span class="cx">     document.body.appendChild(iframe);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritymixedContentinsecureplugininiframehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/security/mixedContent/insecure-plugin-in-iframe.html (169474 => 169475)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/mixedContent/insecure-plugin-in-iframe.html        2014-05-29 23:41:15 UTC (rev 169474)
+++ trunk/LayoutTests/http/tests/security/mixedContent/insecure-plugin-in-iframe.html        2014-05-29 23:52:32 UTC (rev 169475)
</span><span class="lines">@@ -3,6 +3,11 @@
</span><span class="cx"> &lt;script&gt;
</span><span class="cx"> if (window.testRunner)
</span><span class="cx">     testRunner.dumpAsText();
</span><ins>+
+onload = function() {
+    if (window.internals)
+        internals.updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks(document.querySelector('iframe'));
+};
</ins><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;p&gt;This test loads a secure iframe that loads an insecure plugin.  We should
</span><span class="cx"> get a mixed content callback because the insecure plug-in can script the secure
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacpluginssupportscarboneventmodelhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/plugins/supports-carbon-event-model.html (169474 => 169475)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/plugins/supports-carbon-event-model.html        2014-05-29 23:41:15 UTC (rev 169474)
+++ trunk/LayoutTests/platform/mac/plugins/supports-carbon-event-model.html        2014-05-29 23:52:32 UTC (rev 169475)
</span><span class="lines">@@ -1,6 +1,9 @@
</span><ins>+&lt;script src=&quot;../../../resources/plugin.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;script&gt;
</span><del>-if (window.testRunner)
-    testRunner.dumpAsText();
</del><ins>+    if (window.testRunner)
+        testRunner.dumpAsText();
+
+    runAfterPluginLoad(null, NotifyDone);
</ins><span class="cx"> &lt;/script&gt;
</span><span class="cx"> 
</span><span class="cx"> &lt;embed id=&quot;testPlugin&quot; 
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacpluginstestpluginonnewonpainthtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/plugins/testplugin-onnew-onpaint.html (169474 => 169475)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/plugins/testplugin-onnew-onpaint.html        2014-05-29 23:41:15 UTC (rev 169474)
+++ trunk/LayoutTests/platform/mac/plugins/testplugin-onnew-onpaint.html        2014-05-29 23:52:32 UTC (rev 169475)
</span><span class="lines">@@ -2,6 +2,7 @@
</span><span class="cx"> 
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+    &lt;script src=&quot;../../../resources/plugin.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx">     &lt;script type=&quot;text/javascript&quot; charset=&quot;utf-8&quot;&gt;
</span><span class="cx">         if (window.testRunner)
</span><span class="cx">             testRunner.dumpAsText();
</span><span class="lines">@@ -25,6 +26,8 @@
</span><span class="cx">                 didPaint = true;
</span><span class="cx">             }
</span><span class="cx">         }
</span><ins>+
+        runAfterPluginLoad(null, NotifyDone);
</ins><span class="cx">     &lt;/script&gt;
</span><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span></span></pre></div>
<a id="trunkLayoutTestspluginsgetuseragentwithnullnppfromnppnewhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/plugins/get-user-agent-with-null-npp-from-npp-new.html (169474 => 169475)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/plugins/get-user-agent-with-null-npp-from-npp-new.html        2014-05-29 23:41:15 UTC (rev 169474)
+++ trunk/LayoutTests/plugins/get-user-agent-with-null-npp-from-npp-new.html        2014-05-29 23:52:32 UTC (rev 169475)
</span><span class="lines">@@ -1,9 +1,11 @@
</span><span class="cx"> &lt;!DOCTYPE html&gt;
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+    &lt;script src=&quot;../resources/plugin.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx">     &lt;script&gt;
</span><span class="cx">         if (window.testRunner)
</span><span class="cx">             testRunner.dumpAsText();
</span><ins>+        runAfterPluginLoad(null, NotifyDone);
</ins><span class="cx">     &lt;/script&gt;
</span><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span></span></pre></div>
<a id="trunkLayoutTestspluginsmouseclickpluginclearsselectionhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/plugins/mouse-click-plugin-clears-selection.html (169474 => 169475)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/plugins/mouse-click-plugin-clears-selection.html        2014-05-29 23:41:15 UTC (rev 169474)
+++ trunk/LayoutTests/plugins/mouse-click-plugin-clears-selection.html        2014-05-29 23:52:32 UTC (rev 169475)
</span><span class="lines">@@ -1,8 +1,9 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+&lt;script src=&quot;../resources/plugin.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;script&gt;
</span><span class="cx"> 
</span><del>-function runTest() {
</del><ins>+runAfterPluginLoad(function() {
</ins><span class="cx">     inputElement = document.getElementById('frame');
</span><span class="cx">     inputElement.focus();
</span><span class="cx">     inputElement.select();
</span><span class="lines">@@ -14,10 +15,10 @@
</span><span class="cx">         eventSender.mouseDown();
</span><span class="cx">         eventSender.mouseUp();
</span><span class="cx">     }
</span><del>-}
</del><ins>+}, NotifyDone);
</ins><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/head&gt;
</span><del>-&lt;body onload=&quot;runTest();&quot;&gt;
</del><ins>+&lt;body&gt;
</ins><span class="cx"> &lt;embed id=&quot;plg&quot; type=&quot;application/x-webkit-test-netscape&quot; width=&quot;100&quot; height=&quot;100&quot; windowedplugin=&quot;false&quot;&gt;&lt;/embed&gt;&lt;br&gt;
</span><span class="cx"> &lt;input id=&quot;frame&quot; value=&quot;hello&quot;/&gt;
</span><span class="cx"> &lt;div id=&quot;output&quot;&gt;&lt;/div&gt;
</span></span></pre></div>
<a id="trunkLayoutTestspluginsnetscapepluginmapdatatosrchtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/plugins/netscape-plugin-map-data-to-src.html (169474 => 169475)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/plugins/netscape-plugin-map-data-to-src.html        2014-05-29 23:41:15 UTC (rev 169474)
+++ trunk/LayoutTests/plugins/netscape-plugin-map-data-to-src.html        2014-05-29 23:52:32 UTC (rev 169475)
</span><span class="lines">@@ -1,8 +1,10 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+&lt;script src=&quot;../resources/plugin.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;script&gt;
</span><span class="cx">     if (window.testRunner)
</span><span class="cx">         testRunner.dumpAsText();
</span><ins>+    runAfterPluginLoad(null, NotifyDone);
</ins><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;body style=&quot;margin:0px;overflow:hidden&quot;&gt;
</span><span class="cx"> &lt;object name=&quot;testPlugin&quot; type=&quot;application/x-webkit-test-netscape&quot; logSrc=&quot;true&quot; data=&quot;blah&quot;&gt;
</span></span></pre></div>
<a id="trunkLayoutTestspluginsnomimewithvalidextensionhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/plugins/no-mime-with-valid-extension.html (169474 => 169475)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/plugins/no-mime-with-valid-extension.html        2014-05-29 23:41:15 UTC (rev 169474)
+++ trunk/LayoutTests/plugins/no-mime-with-valid-extension.html        2014-05-29 23:52:32 UTC (rev 169475)
</span><span class="lines">@@ -1,8 +1,8 @@
</span><ins>+&lt;script src=&quot;../resources/plugin.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;script&gt;
</span><del>-    if (window.testRunner) {
</del><ins>+    if (window.testRunner)
</ins><span class="cx">         testRunner.dumpAsText();
</span><del>-        testRunner.waitUntilDone();
-    }
</del><ins>+    runAfterPluginLoad(null, NotifyDone);
</ins><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;p&gt;
</span><span class="cx"> This test checks that &lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=50657&quot;&gt;bug 50568&lt;/a&gt;
</span><span class="lines">@@ -12,8 +12,4 @@
</span><span class="cx"> attribute.
</span><span class="cx"> &lt;/p&gt;
</span><span class="cx"> &lt;!-- Embed tag with missing type=&quot;&quot; parameter --&gt;
</span><del>-&lt;embed id=&quot;plugin&quot; name=&quot;plugin&quot; src=&quot;resources/test.testnetscape&quot; logSrc=&quot;1&quot;&gt;
-&lt;script&gt;
-    if (window.testRunner)
-        testRunner.notifyDone();
-&lt;/script&gt;
</del><ins>+&lt;embed id=&quot;plugin&quot; name=&quot;plugin&quot; src=&quot;resources/test.testnetscape&quot; logSrc=&quot;1&quot;&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestspluginsplugininitiatepopupwindowhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/plugins/plugin-initiate-popup-window.html (169474 => 169475)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/plugins/plugin-initiate-popup-window.html        2014-05-29 23:41:15 UTC (rev 169474)
+++ trunk/LayoutTests/plugins/plugin-initiate-popup-window.html        2014-05-29 23:52:32 UTC (rev 169475)
</span><span class="lines">@@ -64,7 +64,7 @@
</span><span class="cx"> }
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/head&gt;
</span><del>-&lt;body onload=&quot;window.setTimeout(test, 0);&quot;&gt;
</del><ins>+&lt;body onload=&quot;internals.updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks(); test();&quot;&gt;
</ins><span class="cx"> &lt;embed type=&quot;application/x-webkit-test-netscape&quot; width=100 height=40 evaluatescript=&quot;mouse::popup_by_mousedown()&quot; windowedplugin=&quot;false&quot;&gt;&lt;/embed&gt;&lt;br&gt;
</span><span class="cx"> &lt;embed type=&quot;application/x-webkit-test-netscape&quot; width=100 height=40 evaluatescript=&quot;key::popup_by_keydown()&quot; windowedplugin=&quot;false&quot;&gt;&lt;/embed&gt;&lt;br&gt;
</span><span class="cx"> Specify a script and a mouse/keyboard event to the plugin. The specified script will be evaluated in the browser when the specified event is received by the plugin. The test is for bug https://bugs.webkit.org/show_bug.cgi?id=41292.&lt;br&gt;
</span></span></pre></div>
<a id="trunkLayoutTestspluginswindowless_plugin_paint_testhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/plugins/windowless_plugin_paint_test.html (169474 => 169475)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/plugins/windowless_plugin_paint_test.html        2014-05-29 23:41:15 UTC (rev 169474)
+++ trunk/LayoutTests/plugins/windowless_plugin_paint_test.html        2014-05-29 23:52:32 UTC (rev 169475)
</span><span class="lines">@@ -14,6 +14,8 @@
</span><span class="cx">         var pluginDiv = document.getElementById(&quot;pluginDiv&quot;);
</span><span class="cx">         // Create the plugin in the middle of the page.
</span><span class="cx">         pluginDiv.innerHTML = &quot;&lt;embed id=\&quot;testPlugin\&quot; type=\&quot;application/x-webkit-test-netscape\&quot; width=\&quot;200\&quot; height=\&quot;200\&quot; onpaintevent=\&quot;didPaint()\&quot; windowedPlugin=\&quot;false\&quot;&gt;&lt;/embed&gt;&quot;;
</span><ins>+        if (window.internals)
+            internals.updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks();
</ins><span class="cx">         testRunner.displayInvalidatedRegion();
</span><span class="cx">       }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsresourcespluginjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/resources/plugin.js (0 => 169475)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/resources/plugin.js                                (rev 0)
+++ trunk/LayoutTests/resources/plugin.js        2014-05-29 23:52:32 UTC (rev 169475)
</span><span class="lines">@@ -0,0 +1,21 @@
</span><ins>+// Wait for the load event, run post layout tasks, run the specified function,
+// and notify the test runner that the test is done.
+
+var NotifyDone = true;
+var DoNotNotifyDone = false;
+
+function runAfterPluginLoad(func, notifyDone, node) {
+    if (window.testRunner)
+        testRunner.waitUntilDone();
+
+    window.addEventListener('load', function() {
+        if (window.internals)
+            internals.updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks(node);
+
+        if (func)
+            func();
+
+        if (notifyDone &amp;&amp; window.testRunner)
+            testRunner.notifyDone();
+    }, false);
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (169474 => 169475)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-05-29 23:41:15 UTC (rev 169474)
+++ trunk/Source/WebCore/ChangeLog        2014-05-29 23:52:32 UTC (rev 169475)
</span><span class="lines">@@ -1,3 +1,37 @@
</span><ins>+2014-05-28  Jon Honeycutt  &lt;jhoneycutt@apple.com&gt;
+
+        Roll r168668 back in.
+
+        &lt;https://bugs.webkit.org/show_bug.cgi?id=132621&gt;
+
+        Reviewed by Brent Fulgham.
+
+        Tests: fast/events/beforeload-assertion.html
+               fast/events/beforeload-iframe-crash.html
+               fast/events/beforeload-input-time-crash.html
+
+        * WebCore.exp.in:
+        * dom/Document.cpp:
+        (WebCore::Document::updateLayoutIgnorePendingStylesheets):
+        * dom/Document.h:
+        * html/HTMLAppletElement.cpp:
+        (WebCore::HTMLAppletElement::renderWidgetForJSBindings):
+        * html/HTMLEmbedElement.cpp:
+        (WebCore::HTMLEmbedElement::renderWidgetForJSBindings):
+        * html/HTMLObjectElement.cpp:
+        (WebCore::HTMLObjectElement::renderWidgetForJSBindings):
+        * page/FrameView.cpp:
+        (WebCore::FrameView::FrameView):
+        (WebCore::FrameView::reset):
+        (WebCore::FrameView::updateEmbeddedObjectsTimerFired):
+        (WebCore::FrameView::flushAnyPendingPostLayoutTasks):
+        (WebCore::FrameView::performPostLayoutTasks):
+        * page/FrameView.h:
+        * testing/Internals.cpp:
+        (WebCore::Internals::updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks):
+        * testing/Internals.h:
+        * testing/Internals.idl:
+
</ins><span class="cx"> 2014-05-29  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Support -apple-system-font on OS X
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCoreexpin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.exp.in (169474 => 169475)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.exp.in        2014-05-29 23:41:15 UTC (rev 169474)
+++ trunk/Source/WebCore/WebCore.exp.in        2014-05-29 23:52:32 UTC (rev 169475)
</span><span class="lines">@@ -1278,7 +1278,7 @@
</span><span class="cx"> __ZN7WebCore8Document26didRemoveWheelEventHandlerEv
</span><span class="cx"> __ZN7WebCore8Document26pageSizeAndMarginsInPixelsEiRNS_7IntSizeERiS3_S3_S3_
</span><span class="cx"> __ZN7WebCore8Document27removeMediaCanStartListenerEPNS_21MediaCanStartListenerE
</span><del>-__ZN7WebCore8Document36updateLayoutIgnorePendingStylesheetsEv
</del><ins>+__ZN7WebCore8Document36updateLayoutIgnorePendingStylesheetsENS0_18RunPostLayoutTasksE
</ins><span class="cx"> __ZN7WebCore8Document4headEv
</span><span class="cx"> __ZN7WebCore8Document8iconURLsEi
</span><span class="cx"> __ZN7WebCore8FormData6createEPKvm
</span><span class="lines">@@ -1797,6 +1797,7 @@
</span><span class="cx"> __ZNK7WebCore21BackForwardController12forwardCountEv
</span><span class="cx"> __ZNK7WebCore21BackForwardController18canGoBackOrForwardEi
</span><span class="cx"> __ZNK7WebCore21BackForwardController9backCountEv
</span><ins>+__ZNK7WebCore21HTMLFrameOwnerElement15contentDocumentEv
</ins><span class="cx"> __ZNK7WebCore21NetworkStorageSession13cookieStorageEv
</span><span class="cx"> __ZNK7WebCore21RenderLayerCompositor11scrollLayerEv
</span><span class="cx"> __ZNK7WebCore21RenderLayerCompositor15rootRenderLayerEv
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Document.cpp (169474 => 169475)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Document.cpp        2014-05-29 23:41:15 UTC (rev 169474)
+++ trunk/Source/WebCore/dom/Document.cpp        2014-05-29 23:52:32 UTC (rev 169475)
</span><span class="lines">@@ -1826,10 +1826,10 @@
</span><span class="cx"> // stylesheets are loaded. Doing a layout ignoring the pending stylesheets
</span><span class="cx"> // lets us get reasonable answers. The long term solution to this problem is
</span><span class="cx"> // to instead suspend JavaScript execution.
</span><del>-void Document::updateLayoutIgnorePendingStylesheets()
</del><ins>+void Document::updateLayoutIgnorePendingStylesheets(Document::RunPostLayoutTasks runPostLayoutTasks)
</ins><span class="cx"> {
</span><span class="cx">     bool oldIgnore = m_ignorePendingStylesheets;
</span><del>-    
</del><ins>+
</ins><span class="cx">     if (!haveStylesheetsLoaded()) {
</span><span class="cx">         m_ignorePendingStylesheets = true;
</span><span class="cx">         // FIXME: We are willing to attempt to suppress painting with outdated style info only once.  Our assumption is that it would be
</span><span class="lines">@@ -1851,6 +1851,9 @@
</span><span class="cx"> 
</span><span class="cx">     updateLayout();
</span><span class="cx"> 
</span><ins>+    if (runPostLayoutTasks == RunPostLayoutTasksSynchronously &amp;&amp; view())
+        view()-&gt;flushAnyPendingPostLayoutTasks();
+
</ins><span class="cx">     m_ignorePendingStylesheets = oldIgnore;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumenth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Document.h (169474 => 169475)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Document.h        2014-05-29 23:41:15 UTC (rev 169474)
+++ trunk/Source/WebCore/dom/Document.h        2014-05-29 23:52:32 UTC (rev 169475)
</span><span class="lines">@@ -587,7 +587,11 @@
</span><span class="cx">     void updateStyleIfNeeded();
</span><span class="cx">     bool updateStyleIfNeededForNode(const Node&amp;);
</span><span class="cx">     void updateLayout();
</span><del>-    void updateLayoutIgnorePendingStylesheets();
</del><ins>+    enum RunPostLayoutTasks {
+        RunPostLayoutTasksAsynchronously,
+        RunPostLayoutTasksSynchronously,
+    };
+    void updateLayoutIgnorePendingStylesheets(RunPostLayoutTasks = RunPostLayoutTasksAsynchronously);
</ins><span class="cx">     PassRef&lt;RenderStyle&gt; styleForElementIgnoringPendingStylesheets(Element*);
</span><span class="cx"> 
</span><span class="cx">     // Returns true if page box (margin boxes and page borders) is visible.
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLAppletElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLAppletElement.cpp (169474 => 169475)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLAppletElement.cpp        2014-05-29 23:41:15 UTC (rev 169474)
+++ trunk/Source/WebCore/html/HTMLAppletElement.cpp        2014-05-29 23:52:32 UTC (rev 169475)
</span><span class="lines">@@ -88,7 +88,10 @@
</span><span class="cx">     if (!canEmbedJava())
</span><span class="cx">         return 0;
</span><span class="cx"> 
</span><del>-    document().updateLayoutIgnorePendingStylesheets();
</del><ins>+    // Needs to load the plugin immediatedly because this function is called
+    // when JavaScript code accesses the plugin.
+    // FIXME: &lt;rdar://16893708&gt; Check if dispatching events here is safe.
+    document().updateLayoutIgnorePendingStylesheets(Document::RunPostLayoutTasksSynchronously);
</ins><span class="cx">     return renderWidget();
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLEmbedElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLEmbedElement.cpp (169474 => 169475)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLEmbedElement.cpp        2014-05-29 23:41:15 UTC (rev 169474)
+++ trunk/Source/WebCore/html/HTMLEmbedElement.cpp        2014-05-29 23:52:32 UTC (rev 169475)
</span><span class="lines">@@ -71,8 +71,12 @@
</span><span class="cx"> RenderWidget* HTMLEmbedElement::renderWidgetForJSBindings() const
</span><span class="cx"> {
</span><span class="cx">     FrameView* view = document().view();
</span><del>-    if (!view || (!view-&gt;isInLayout() &amp;&amp; !view-&gt;isPainting()))
-        document().updateLayoutIgnorePendingStylesheets();
</del><ins>+    if (!view || (!view-&gt;isInLayout() &amp;&amp; !view-&gt;isPainting())) {
+        // Needs to load the plugin immediatedly because this function is called
+        // when JavaScript code accesses the plugin.
+        // FIXME: &lt;rdar://16893708&gt; Check if dispatching events here is safe.
+        document().updateLayoutIgnorePendingStylesheets(Document::RunPostLayoutTasksSynchronously);
+    }
</ins><span class="cx">     return findWidgetRenderer(this);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLObjectElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLObjectElement.cpp (169474 => 169475)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLObjectElement.cpp        2014-05-29 23:41:15 UTC (rev 169474)
+++ trunk/Source/WebCore/html/HTMLObjectElement.cpp        2014-05-29 23:52:32 UTC (rev 169475)
</span><span class="lines">@@ -83,7 +83,10 @@
</span><span class="cx"> 
</span><span class="cx"> RenderWidget* HTMLObjectElement::renderWidgetForJSBindings() const
</span><span class="cx"> {
</span><del>-    document().updateLayoutIgnorePendingStylesheets();
</del><ins>+    // Needs to load the plugin immediatedly because this function is called
+    // when JavaScript code accesses the plugin.
+    // FIXME: &lt;rdar://16893708&gt; Check if dispatching events here is safe.
+    document().updateLayoutIgnorePendingStylesheets(Document::RunPostLayoutTasksSynchronously);
</ins><span class="cx">     return renderWidget(); // This will return 0 if the renderer is not a RenderWidget.
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorepageFrameViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/FrameView.cpp (169474 => 169475)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/FrameView.cpp        2014-05-29 23:41:15 UTC (rev 169474)
+++ trunk/Source/WebCore/page/FrameView.cpp        2014-05-29 23:52:32 UTC (rev 169475)
</span><span class="lines">@@ -160,6 +160,7 @@
</span><span class="cx">     , m_layoutPhase(OutsideLayout)
</span><span class="cx">     , m_inSynchronousPostLayout(false)
</span><span class="cx">     , m_postLayoutTasksTimer(this, &amp;FrameView::postLayoutTimerFired)
</span><ins>+    , m_updateEmbeddedObjectsTimer(this, &amp;FrameView::updateEmbeddedObjectsTimerFired)
</ins><span class="cx">     , m_isTransparent(false)
</span><span class="cx">     , m_baseBackgroundColor(Color::white)
</span><span class="cx">     , m_mediaType(&quot;screen&quot;)
</span><span class="lines">@@ -250,6 +251,7 @@
</span><span class="cx">     m_layoutCount = 0;
</span><span class="cx">     m_nestedLayoutCount = 0;
</span><span class="cx">     m_postLayoutTasksTimer.stop();
</span><ins>+    m_updateEmbeddedObjectsTimer.stop();
</ins><span class="cx">     m_firstLayout = true;
</span><span class="cx">     m_firstLayoutCallbackPending = false;
</span><span class="cx">     m_wasScrolledByUser = false;
</span><span class="lines">@@ -2735,16 +2737,28 @@
</span><span class="cx">     return m_embeddedObjectsToUpdate-&gt;isEmpty();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void FrameView::updateEmbeddedObjectsTimerFired(Timer&lt;FrameView&gt;*)
+{
+    RefPtr&lt;FrameView&gt; protect(this);
+    m_updateEmbeddedObjectsTimer.stop();
+    for (unsigned i = 0; i &lt; maxUpdateEmbeddedObjectsIterations; i++) {
+        if (updateEmbeddedObjects())
+            break;
+    }
+}
+
</ins><span class="cx"> void FrameView::flushAnyPendingPostLayoutTasks()
</span><span class="cx"> {
</span><del>-    if (!m_postLayoutTasksTimer.isActive())
-        return;
-
-    performPostLayoutTasks();
</del><ins>+    if (m_postLayoutTasksTimer.isActive())
+        performPostLayoutTasks();
+    if (m_updateEmbeddedObjectsTimer.isActive())
+        updateEmbeddedObjectsTimerFired(nullptr);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void FrameView::performPostLayoutTasks()
</span><span class="cx"> {
</span><ins>+    // FIXME: We should not run any JavaScript code in this function.
+
</ins><span class="cx">     m_postLayoutTasksTimer.stop();
</span><span class="cx"> 
</span><span class="cx">     frame().selection().layoutDidChange();
</span><span class="lines">@@ -2775,10 +2789,7 @@
</span><span class="cx">     // is called through the post layout timer.
</span><span class="cx">     Ref&lt;FrameView&gt; protect(*this);
</span><span class="cx"> 
</span><del>-    for (unsigned i = 0; i &lt; maxUpdateEmbeddedObjectsIterations; i++) {
-        if (updateEmbeddedObjects())
-            break;
-    }
</del><ins>+    m_updateEmbeddedObjectsTimer.startOneShot(0);
</ins><span class="cx"> 
</span><span class="cx">     if (auto* page = frame().page()) {
</span><span class="cx">         if (auto* scrollingCoordinator = page-&gt;scrollingCoordinator())
</span></span></pre></div>
<a id="trunkSourceWebCorepageFrameViewh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/FrameView.h (169474 => 169475)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/FrameView.h        2014-05-29 23:41:15 UTC (rev 169474)
+++ trunk/Source/WebCore/page/FrameView.h        2014-05-29 23:52:32 UTC (rev 169475)
</span><span class="lines">@@ -588,6 +588,7 @@
</span><span class="cx">     void enableSpeculativeTilingIfNeeded();
</span><span class="cx">     void speculativeTilingEnableTimerFired(Timer&lt;FrameView&gt;&amp;);
</span><span class="cx"> 
</span><ins>+    void updateEmbeddedObjectsTimerFired(Timer&lt;FrameView&gt;*);
</ins><span class="cx">     bool updateEmbeddedObjects();
</span><span class="cx">     void updateEmbeddedObject(RenderEmbeddedObject&amp;);
</span><span class="cx">     void scrollToAnchor();
</span><span class="lines">@@ -642,6 +643,7 @@
</span><span class="cx">     int m_layoutCount;
</span><span class="cx">     unsigned m_nestedLayoutCount;
</span><span class="cx">     Timer&lt;FrameView&gt; m_postLayoutTasksTimer;
</span><ins>+    Timer&lt;FrameView&gt; m_updateEmbeddedObjectsTimer;
</ins><span class="cx">     bool m_firstLayoutCallbackPending;
</span><span class="cx"> 
</span><span class="cx">     bool m_firstLayout;
</span></span></pre></div>
<a id="trunkSourceWebCoretestingInternalscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/Internals.cpp (169474 => 169475)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/Internals.cpp        2014-05-29 23:41:15 UTC (rev 169474)
+++ trunk/Source/WebCore/testing/Internals.cpp        2014-05-29 23:52:32 UTC (rev 169475)
</span><span class="lines">@@ -50,6 +50,7 @@
</span><span class="cx"> #include &quot;FormController.h&quot;
</span><span class="cx"> #include &quot;FrameLoader.h&quot;
</span><span class="cx"> #include &quot;FrameView.h&quot;
</span><ins>+#include &quot;HTMLIFrameElement.h&quot;
</ins><span class="cx"> #include &quot;HTMLInputElement.h&quot;
</span><span class="cx"> #include &quot;HTMLNames.h&quot;
</span><span class="cx"> #include &quot;HTMLPlugInElement.h&quot;
</span><span class="lines">@@ -1905,6 +1906,28 @@
</span><span class="cx">     frameView-&gt;setTracksRepaints(false);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void Internals::updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks(ExceptionCode&amp; ec)
+{
+    updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks(nullptr, ec);
+}
+
+void Internals::updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks(Node* node, ExceptionCode&amp; ec)
+{
+    Document* document;
+    if (!node)
+        document = contextDocument();
+    else if (node-&gt;isDocumentNode())
+        document = toDocument(node);
+    else if (node-&gt;hasTagName(HTMLNames::iframeTag))
+        document = toHTMLIFrameElement(node)-&gt;contentDocument();
+    else {
+        ec = TypeError;
+        return;
+    }
+
+    document-&gt;updateLayoutIgnorePendingStylesheets(Document::RunPostLayoutTasksSynchronously);
+}
+
</ins><span class="cx"> #if !PLATFORM(IOS)
</span><span class="cx"> static const char* cursorTypeToString(Cursor::Type cursorType)
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCoretestingInternalsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/Internals.h (169474 => 169475)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/Internals.h        2014-05-29 23:41:15 UTC (rev 169474)
+++ trunk/Source/WebCore/testing/Internals.h        2014-05-29 23:52:32 UTC (rev 169475)
</span><span class="lines">@@ -271,6 +271,8 @@
</span><span class="cx"> 
</span><span class="cx">     void startTrackingRepaints(ExceptionCode&amp;);
</span><span class="cx">     void stopTrackingRepaints(ExceptionCode&amp;);
</span><ins>+    void updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks(ExceptionCode&amp;);
+    void updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks(Node*, ExceptionCode&amp;);
</ins><span class="cx"> 
</span><span class="cx">     PassRefPtr&lt;ArrayBuffer&gt; serializeObject(PassRefPtr&lt;SerializedScriptValue&gt;) const;
</span><span class="cx">     PassRefPtr&lt;SerializedScriptValue&gt; deserializeBuffer(PassRefPtr&lt;ArrayBuffer&gt;) const;
</span></span></pre></div>
<a id="trunkSourceWebCoretestingInternalsidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/Internals.idl (169474 => 169475)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/Internals.idl        2014-05-29 23:41:15 UTC (rev 169474)
+++ trunk/Source/WebCore/testing/Internals.idl        2014-05-29 23:52:32 UTC (rev 169475)
</span><span class="lines">@@ -232,6 +232,11 @@
</span><span class="cx">     [RaisesException] void startTrackingRepaints();
</span><span class="cx">     [RaisesException] void stopTrackingRepaints();
</span><span class="cx"> 
</span><ins>+    // |node| should be Document, HTMLIFrameElement, or unspecified.
+    // If |node| is an HTMLIFrameElement, it assumes node.contentDocument is
+    // specified without security checks. Unspecified means this document.
+    [RaisesException] void updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks(optional Node node);
+
</ins><span class="cx">     // Returns a string with information about the mouse cursor used at the specified client location.
</span><span class="cx">     [RaisesException] DOMString getCurrentCursorInfo();
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/ChangeLog (169474 => 169475)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/ChangeLog        2014-05-29 23:41:15 UTC (rev 169474)
+++ trunk/Source/WebKit/ChangeLog        2014-05-29 23:52:32 UTC (rev 169475)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2014-05-28  Jon Honeycutt  &lt;jhoneycutt@apple.com&gt;
+
+        Roll r168668 back in.
+
+        &lt;https://bugs.webkit.org/show_bug.cgi?id=132621&gt;
+
+        Reviewed by Brent Fulgham.
+
+        * WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:
+
</ins><span class="cx"> 2014-05-27  Csaba Osztrogonác  &lt;ossy@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Speculative Windows buildfix after r169358.
</span></span></pre></div>
<a id="trunkSourceWebKitWebKitvcxprojWebKitExportGeneratorWebKitExportsdefin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in (169474 => 169475)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in        2014-05-29 23:41:15 UTC (rev 169474)
+++ trunk/Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in        2014-05-29 23:52:32 UTC (rev 169475)
</span><span class="lines">@@ -175,6 +175,7 @@
</span><span class="cx">         symbolWithPointer(?childItemWithTarget@HistoryItem@WebCore@@QBEPAV12@ABVString@WTF@@@Z, ?childItemWithTarget@HistoryItem@WebCore@@QEBAPEAV12@AEBVString@WTF@@@Z)
</span><span class="cx">         symbolWithPointer(?create@Range@WebCore@@SA?AV?$PassRefPtr@VRange@WebCore@@@WTF@@AAVDocument@2@V?$PassRefPtr@VNode@WebCore@@@4@H1H@Z, ?create@Range@WebCore@@SA?AV?$PassRefPtr@VRange@WebCore@@@WTF@@AEAVDocument@2@V?$PassRefPtr@VNode@WebCore@@@4@H1H@Z)
</span><span class="cx">         symbolWithPointer(?commonVM@JSDOMWindowBase@WebCore@@SAAAVVM@JSC@@XZ, ?commonVM@JSDOMWindowBase@WebCore@@SAAEAVVM@JSC@@XZ)
</span><ins>+                symbolWithPointer(?contentDocument@HTMLFrameOwnerElement@WebCore@@QBEPAVDocument@2@XZ, ?contentDocument@HTMLFrameOwnerElement@WebCore@@QEBAPEAVDocument@2@XZ)
</ins><span class="cx">         symbolWithPointer(?create@SerializedScriptValue@WebCore@@SA?AV?$PassRefPtr@VSerializedScriptValue@WebCore@@@WTF@@ABVString@4@@Z, ?create@SerializedScriptValue@WebCore@@SA?AV?$PassRefPtr@VSerializedScriptValue@WebCore@@@WTF@@AEBVString@4@@Z)
</span><span class="cx"> #if USE(CF)
</span><span class="cx">         symbolWithPointer(?createCFString@String@WTF@@QBE?AV?$RetainPtr@PBU__CFString@@@2@XZ, ?createCFString@String@WTF@@QEBA?AV?$RetainPtr@PEBU__CFString@@@2@XZ)
</span><span class="lines">@@ -203,6 +204,7 @@
</span><span class="cx">                 symbolWithPointer(?getOutOfLineCachedWrapper@WebCore@@YAPAVJSObject@JSC@@PAVJSDOMGlobalObject@1@PAVNode@1@@Z, ?getOutOfLineCachedWrapper@WebCore@@YAPEAVJSObject@JSC@@PEAVJSDOMGlobalObject@1@PEAVNode@1@@Z)
</span><span class="cx">         symbolWithPointer(?hitTest@RenderView@WebCore@@QAE_NABVHitTestRequest@2@AAVHitTestResult@2@@Z, ?hitTest@RenderView@WebCore@@QEAA_NAEBVHitTestRequest@2@AEAVHitTestResult@2@@Z)
</span><span class="cx">         ?inputTag@HTMLNames@WebCore@@3VHTMLQualifiedName@2@B
</span><ins>+                symbolWithPointer(?iframeTag@HTMLNames@WebCore@@3VHTMLQualifiedName@2@B,?iframeTag@HTMLNames@WebCore@@3VHTMLQualifiedName@2@B)
</ins><span class="cx">         symbolWithPointer(?intersects@IntRect@WebCore@@QBE_NABV12@@Z, ?intersects@IntRect@WebCore@@QEBA_NAEBV12@@Z)
</span><span class="cx">         symbolWithPointer(?item@StaticNodeList@WebCore@@UBEPAVNode@2@I@Z, ?item@StaticNodeList@WebCore@@UEBAPEAVNode@2@I@Z)
</span><span class="cx">         ?selectTag@HTMLNames@WebCore@@3VHTMLQualifiedName@2@B
</span><span class="lines">@@ -323,7 +325,7 @@
</span><span class="cx">         symbolWithPointer(?toRange@WebCore@@YAPAVRange@1@VJSValue@JSC@@@Z, ?toRange@WebCore@@YAPEAVRange@1@VJSValue@JSC@@@Z)
</span><span class="cx">         symbolWithPointer(?isTreeScope@Node@WebCore@@QBE_NXZ, ?isTreeScope@Node@WebCore@@QEBA_NXZ)
</span><span class="cx">         symbolWithPointer(?updateEditorUINowIfScheduled@Editor@WebCore@@QAEXXZ, ?updateEditorUINowIfScheduled@Editor@WebCore@@QEAAXXZ)
</span><del>-        symbolWithPointer(?updateLayoutIgnorePendingStylesheets@Document@WebCore@@QAEXXZ, ?updateLayoutIgnorePendingStylesheets@Document@WebCore@@QEAAXXZ)
</del><ins>+        symbolWithPointer(?updateLayoutIgnorePendingStylesheets@Document@WebCore@@QAEXW4RunPostLayoutTasks@12@@Z, ?updateLayoutIgnorePendingStylesheets@Document@WebCore@@QEAAXW4RunPostLayoutTasks@12@@Z)
</ins><span class="cx">         symbolWithPointer(?updateStyleIfNeeded@Document@WebCore@@QAEXXZ, ?updateStyleIfNeeded@Document@WebCore@@QEAAXXZ)
</span><span class="cx">         symbolWithPointer(?view@Document@WebCore@@QBEPAVFrameView@2@XZ, ?view@Document@WebCore@@QEBAPEAVFrameView@2@XZ)
</span><span class="cx">         symbolWithPointer(??1ContextDestructionObserver@WebCore@@MAE@XZ, ??1ContextDestructionObserver@WebCore@@MEAA@XZ)
</span></span></pre>
</div>
</div>

</body>
</html>