<!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>[166680] 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/166680">166680</a></dd>
<dt>Author</dt> <dd>slewis@apple.com</dd>
<dt>Date</dt> <dd>2014-04-02 16:53:30 -0700 (Wed, 02 Apr 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Source/WebCore: Roll out http://trac.webkit.org/changeset/166144
&lt;rdar://problem/16481284&gt; PLT stops loading on news.google.com

Unreviewed rollout.

Rollout 166144 since it prevents the PLT from completing.

* dom/ContainerNode.cpp:
(WebCore::ContainerNode::suspendPostAttachCallbacks):
(WebCore::ContainerNode::resumePostAttachCallbacks):
(WebCore::ContainerNode::queuePostAttachCallback):
(WebCore::ContainerNode::postAttachCallbacksAreSuspended):
(WebCore::ContainerNode::dispatchPostAttachCallbacks):
* dom/ContainerNode.h:
* dom/Document.cpp:
(WebCore::Document::recalcStyle):
* dom/Element.h:
(WebCore::PostAttachCallbackDisabler::PostAttachCallbackDisabler):
(WebCore::PostAttachCallbackDisabler::~PostAttachCallbackDisabler):
* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::parseAttribute):
* html/HTMLFormControlElement.cpp:
(WebCore::focusPostAttach):
(WebCore::HTMLFormControlElement::didAttachRenderers):
(WebCore::updateFromElementCallback):
(WebCore::HTMLFormControlElement::didRecalcStyle):
* html/HTMLFrameOwnerElement.cpp:
(WebCore::needsStyleRecalcCallback):
(WebCore::HTMLFrameOwnerElement::scheduleSetNeedsStyleRecalc):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::parseAttribute):
(WebCore::HTMLObjectElement::shouldAllowQuickTimeClassIdQuirk):
(WebCore::HTMLObjectElement::hasValidClassId):
(WebCore::HTMLObjectElement::renderFallbackContent):
* html/HTMLObjectElement.h:
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
(WebCore::HTMLPlugInImageElement::createElementRenderer):
(WebCore::HTMLPlugInImageElement::didAttachRenderers):
(WebCore::HTMLPlugInImageElement::willDetachRenderers):
(WebCore::HTMLPlugInImageElement::updateWidgetIfNecessary):
(WebCore::HTMLPlugInImageElement::didMoveToNewDocument):
(WebCore::HTMLPlugInImageElement::updateWidgetCallback):
(WebCore::HTMLPlugInImageElement::startLoadingImage):
(WebCore::HTMLPlugInImageElement::startLoadingImageCallback):
(WebCore::HTMLPlugInImageElement::createShadowIFrameSubtree):
(WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn):
(WebCore::HTMLPlugInImageElement::didRecalcStyle): Deleted.
(WebCore::HTMLPlugInImageElement::scheduleUpdateForAfterStyleResolution): Deleted.
(WebCore::HTMLPlugInImageElement::updateAfterStyleResolution): Deleted.
(WebCore::HTMLPlugInImageElement::removedFrom): Deleted.
(WebCore::is100Percent): Deleted.
(WebCore::HTMLPlugInImageElement::setNeedsImageReload): Deleted.
* html/HTMLPlugInImageElement.h:
(WebCore::HTMLPlugInImageElement::imageLoader): Deleted.
(WebCore::HTMLPlugInImageElement::updateImageLoaderWithNewURLSoon): Deleted.
* style/StyleResolveTree.cpp:
(WebCore::Style::needsPseudeElement):
(WebCore::Style::attachBeforeOrAfterPseudoElementIfNeeded):
(WebCore::Style::attachRenderTree):
(WebCore::Style::updateBeforeOrAfterPseudoElement):
(WebCore::Style::needsPseudoElement): Deleted.
(WebCore::Style::postResolutionCallbackQueue): Deleted.
(WebCore::Style::queuePostResolutionCallback): Deleted.
(WebCore::Style::suspendMemoryCacheClientCalls): Deleted.
(WebCore::Style::PostResolutionCallbackDisabler::PostResolutionCallbackDisabler): Deleted.
(WebCore::Style::PostResolutionCallbackDisabler::~PostResolutionCallbackDisabler): Deleted.
(WebCore::Style::postResolutionCallbacksAreSuspended): Deleted.
* style/StyleResolveTree.h:

Source/WebKit/mac: Roll out http://trac.webkit.org/changeset/166144
&lt;rdar://problem/16481284&gt; PLT stops loading on news.google.com

Unreviewed rollout.

Rollout 166144 since it prevents the PLT from completing.

* WebCoreSupport/WebFrameLoaderClient.mm:

LayoutTests: Roll out http://trac.webkit.org/changeset/166144
&lt;rdar://problem/16481284&gt; PLT stops loading on news.google.com

Unreviewed rollout.

Rollout 166144 since it prevents the PLT from completing.

* plugins/plugin-remove-readystatechange-expected.txt:
* plugins/plugin-remove-readystatechange.html:
* svg/custom/object-no-size-attributes-expected.txt:
* svg/custom/object-no-size-attributes.xhtml:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestspluginspluginremovereadystatechangeexpectedtxt">trunk/LayoutTests/plugins/plugin-remove-readystatechange-expected.txt</a></li>
<li><a href="#trunkLayoutTestspluginspluginremovereadystatechangehtml">trunk/LayoutTests/plugins/plugin-remove-readystatechange.html</a></li>
<li><a href="#trunkLayoutTestssvgcustomobjectnosizeattributesexpectedtxt">trunk/LayoutTests/svg/custom/object-no-size-attributes-expected.txt</a></li>
<li><a href="#trunkLayoutTestssvgcustomobjectnosizeattributesxhtml">trunk/LayoutTests/svg/custom/object-no-size-attributes.xhtml</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoredomContainerNodecpp">trunk/Source/WebCore/dom/ContainerNode.cpp</a></li>
<li><a href="#trunkSourceWebCoredomContainerNodeh">trunk/Source/WebCore/dom/ContainerNode.h</a></li>
<li><a href="#trunkSourceWebCoredomDocumentcpp">trunk/Source/WebCore/dom/Document.cpp</a></li>
<li><a href="#trunkSourceWebCoredomElementh">trunk/Source/WebCore/dom/Element.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLEmbedElementcpp">trunk/Source/WebCore/html/HTMLEmbedElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLFormControlElementcpp">trunk/Source/WebCore/html/HTMLFormControlElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLFrameOwnerElementcpp">trunk/Source/WebCore/html/HTMLFrameOwnerElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLObjectElementcpp">trunk/Source/WebCore/html/HTMLObjectElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLObjectElementh">trunk/Source/WebCore/html/HTMLObjectElement.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLPlugInImageElementcpp">trunk/Source/WebCore/html/HTMLPlugInImageElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLPlugInImageElementh">trunk/Source/WebCore/html/HTMLPlugInImageElement.h</a></li>
<li><a href="#trunkSourceWebCorestyleStyleResolveTreecpp">trunk/Source/WebCore/style/StyleResolveTree.cpp</a></li>
<li><a href="#trunkSourceWebCorestyleStyleResolveTreeh">trunk/Source/WebCore/style/StyleResolveTree.h</a></li>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacWebCoreSupportWebFrameLoaderClientmm">trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (166679 => 166680)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-04-02 23:51:37 UTC (rev 166679)
+++ trunk/LayoutTests/ChangeLog        2014-04-02 23:53:30 UTC (rev 166680)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2014-04-02  Stephanie Lewis  &lt;slewis@apple.com&gt;
+
+        Roll out http://trac.webkit.org/changeset/166144
+        &lt;rdar://problem/16481284&gt; PLT stops loading on news.google.com
+        
+        Unreviewed rollout.
+
+        Rollout 166144 since it prevents the PLT from completing.
+
+        * plugins/plugin-remove-readystatechange-expected.txt:
+        * plugins/plugin-remove-readystatechange.html:
+        * svg/custom/object-no-size-attributes-expected.txt:
+        * svg/custom/object-no-size-attributes.xhtml:
+
</ins><span class="cx"> 2014-04-02  Zoltan Horvath  &lt;zoltan@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         [WebInspector] inspector-protocol/model/highlight-shape-outside.html is failing
</span></span></pre></div>
<a id="trunkLayoutTestspluginspluginremovereadystatechangeexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/plugins/plugin-remove-readystatechange-expected.txt (166679 => 166680)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/plugins/plugin-remove-readystatechange-expected.txt        2014-04-02 23:51:37 UTC (rev 166679)
+++ trunk/LayoutTests/plugins/plugin-remove-readystatechange-expected.txt        2014-04-02 23:53:30 UTC (rev 166680)
</span><span class="lines">@@ -1,3 +1,2 @@
</span><span class="cx"> ALERT: PASS: element could not be re-appended
</span><span class="cx"> This test passes if it does not trip an assert in debug builds. It ensures a readystatechange event can't get dispatched until after a plugin is fully removed.
</span><del>-
</del></span></pre></div>
<a id="trunkLayoutTestspluginspluginremovereadystatechangehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/plugins/plugin-remove-readystatechange.html (166679 => 166680)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/plugins/plugin-remove-readystatechange.html        2014-04-02 23:51:37 UTC (rev 166679)
+++ trunk/LayoutTests/plugins/plugin-remove-readystatechange.html        2014-04-02 23:53:30 UTC (rev 166680)
</span><span class="lines">@@ -7,10 +7,8 @@
</span><span class="cx"> &lt;/div&gt;
</span><span class="cx"> &lt;embed id=&quot;viewer&quot; src=&quot;resources/simple_blank.swf&quot;&gt;&lt;/embed&gt;
</span><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><span class="cx"> 
</span><span class="cx"> var i = 0;
</span><span class="cx"> document.addEventListener('readystatechange', function() {
</span><span class="lines">@@ -20,21 +18,12 @@
</span><span class="cx">         }
</span><span class="cx">         catch (e) {
</span><span class="cx">             alert('PASS: element could not be re-appended');
</span><del>-        }
-        if (window.testRunner)
-            testRunner.notifyDone();
</del><ins>+       }
</ins><span class="cx">     }
</span><span class="cx">     i++;
</span><span class="cx"> });
</span><span class="cx"> 
</span><span class="cx"> window.addEventListener('DOMContentLoaded', function() {
</span><del>-    // This test relies on removing the embed element while it is actively loading.
-    // There's no observable event that creates the exact right timing for that.
-    // As of this writing, after DOMContentLoaded, then next layout is the right time.
-    // Here we evaluate document.body.offsetLeft to trigger that layout. But really,
-    // this is a race condition, nothing guarantees that the load starts at that moment,
-    // and we might have to revise this test again in the future.
-    document.body.offsetLeft;
</del><span class="cx">     document.body.removeChild(document.getElementById('viewer'));
</span><span class="cx"> });
</span><span class="cx"> &lt;/script&gt;
</span></span></pre></div>
<a id="trunkLayoutTestssvgcustomobjectnosizeattributesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/svg/custom/object-no-size-attributes-expected.txt (166679 => 166680)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/custom/object-no-size-attributes-expected.txt        2014-04-02 23:51:37 UTC (rev 166679)
+++ trunk/LayoutTests/svg/custom/object-no-size-attributes-expected.txt        2014-04-02 23:53:30 UTC (rev 166680)
</span><span class="lines">@@ -9,3 +9,4 @@
</span><span class="cx">         layer at (0,0) size 100x100
</span><span class="cx">           RenderSVGRoot {svg} at (0,0) size 100x100
</span><span class="cx">             RenderSVGRect {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00]
</span><ins>+      RenderText {#text} at (0,0) size 0x0
</ins></span></pre></div>
<a id="trunkLayoutTestssvgcustomobjectnosizeattributesxhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/svg/custom/object-no-size-attributes.xhtml (166679 => 166680)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/custom/object-no-size-attributes.xhtml        2014-04-02 23:51:37 UTC (rev 166679)
+++ trunk/LayoutTests/svg/custom/object-no-size-attributes.xhtml        2014-04-02 23:53:30 UTC (rev 166680)
</span><span class="lines">@@ -1,7 +1,9 @@
</span><span class="cx"> &lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;&gt;
</span><span class="cx"> &lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; xml:lang=&quot;en&quot;&gt;
</span><span class="cx"> &lt;body&gt;
</span><del>-&lt;object type=&quot;image/svg+xml&quot; data=&quot;data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%22100px%22%20height%3D%22100px%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect%20fill%3D%22green%22%20width%3D%22100px%22%20height%3D%22100px%22%20%2F%3E%3C%2Fsvg%3E&quot; style='background: red'&gt;&lt;/object&gt;&lt;!--
</del><ins>+&lt;object type=&quot;image/svg+xml&quot; data=&quot;data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%22100px%22%20height%3D%22100px%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect%20fill%3D%22green%22%20width%3D%22100px%22%20height%3D%22100px%22%20%2F%3E%3C%2Fsvg%3E&quot; style='background: red'&gt;&lt;/object&gt;
+
+&lt;!--
</ins><span class="cx"> 100px x 100px SVG
</span><span class="cx"> 
</span><span class="cx"> Code:
</span><span class="lines">@@ -11,5 +13,7 @@
</span><span class="cx"> &lt;/svg&gt;
</span><span class="cx"> 
</span><span class="cx"> You should see a 100 x 100 green square above.  No red should be visible.  &amp;lt;object&amp;gt; tags should treat the width/height attributes on an embeded SVG as the intrinsic size and not default to the CSS default of 300 x 150.
</span><del>---&gt;&lt;/body&gt;
</del><ins>+--&gt;
+
+&lt;/body&gt;
</ins><span class="cx"> &lt;/html&gt;
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (166679 => 166680)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-04-02 23:51:37 UTC (rev 166679)
+++ trunk/Source/WebCore/ChangeLog        2014-04-02 23:53:30 UTC (rev 166680)
</span><span class="lines">@@ -1,3 +1,75 @@
</span><ins>+2014-04-02  Stephanie Lewis  &lt;slewis@apple.com&gt;
+
+        Roll out http://trac.webkit.org/changeset/166144
+        &lt;rdar://problem/16481284&gt; PLT stops loading on news.google.com
+
+        Unreviewed rollout.
+
+        Rollout 166144 since it prevents the PLT from completing.
+
+        * dom/ContainerNode.cpp:
+        (WebCore::ContainerNode::suspendPostAttachCallbacks):
+        (WebCore::ContainerNode::resumePostAttachCallbacks):
+        (WebCore::ContainerNode::queuePostAttachCallback):
+        (WebCore::ContainerNode::postAttachCallbacksAreSuspended):
+        (WebCore::ContainerNode::dispatchPostAttachCallbacks):
+        * dom/ContainerNode.h:
+        * dom/Document.cpp:
+        (WebCore::Document::recalcStyle):
+        * dom/Element.h:
+        (WebCore::PostAttachCallbackDisabler::PostAttachCallbackDisabler):
+        (WebCore::PostAttachCallbackDisabler::~PostAttachCallbackDisabler):
+        * html/HTMLEmbedElement.cpp:
+        (WebCore::HTMLEmbedElement::parseAttribute):
+        * html/HTMLFormControlElement.cpp:
+        (WebCore::focusPostAttach):
+        (WebCore::HTMLFormControlElement::didAttachRenderers):
+        (WebCore::updateFromElementCallback):
+        (WebCore::HTMLFormControlElement::didRecalcStyle):
+        * html/HTMLFrameOwnerElement.cpp:
+        (WebCore::needsStyleRecalcCallback):
+        (WebCore::HTMLFrameOwnerElement::scheduleSetNeedsStyleRecalc):
+        * html/HTMLObjectElement.cpp:
+        (WebCore::HTMLObjectElement::parseAttribute):
+        (WebCore::HTMLObjectElement::shouldAllowQuickTimeClassIdQuirk):
+        (WebCore::HTMLObjectElement::hasValidClassId):
+        (WebCore::HTMLObjectElement::renderFallbackContent):
+        * html/HTMLObjectElement.h:
+        * html/HTMLPlugInImageElement.cpp:
+        (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
+        (WebCore::HTMLPlugInImageElement::createElementRenderer):
+        (WebCore::HTMLPlugInImageElement::didAttachRenderers):
+        (WebCore::HTMLPlugInImageElement::willDetachRenderers):
+        (WebCore::HTMLPlugInImageElement::updateWidgetIfNecessary):
+        (WebCore::HTMLPlugInImageElement::didMoveToNewDocument):
+        (WebCore::HTMLPlugInImageElement::updateWidgetCallback):
+        (WebCore::HTMLPlugInImageElement::startLoadingImage):
+        (WebCore::HTMLPlugInImageElement::startLoadingImageCallback):
+        (WebCore::HTMLPlugInImageElement::createShadowIFrameSubtree):
+        (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn):
+        (WebCore::HTMLPlugInImageElement::didRecalcStyle): Deleted.
+        (WebCore::HTMLPlugInImageElement::scheduleUpdateForAfterStyleResolution): Deleted.
+        (WebCore::HTMLPlugInImageElement::updateAfterStyleResolution): Deleted.
+        (WebCore::HTMLPlugInImageElement::removedFrom): Deleted.
+        (WebCore::is100Percent): Deleted.
+        (WebCore::HTMLPlugInImageElement::setNeedsImageReload): Deleted.
+        * html/HTMLPlugInImageElement.h:
+        (WebCore::HTMLPlugInImageElement::imageLoader): Deleted.
+        (WebCore::HTMLPlugInImageElement::updateImageLoaderWithNewURLSoon): Deleted.
+        * style/StyleResolveTree.cpp:
+        (WebCore::Style::needsPseudeElement):
+        (WebCore::Style::attachBeforeOrAfterPseudoElementIfNeeded):
+        (WebCore::Style::attachRenderTree):
+        (WebCore::Style::updateBeforeOrAfterPseudoElement):
+        (WebCore::Style::needsPseudoElement): Deleted.
+        (WebCore::Style::postResolutionCallbackQueue): Deleted.
+        (WebCore::Style::queuePostResolutionCallback): Deleted.
+        (WebCore::Style::suspendMemoryCacheClientCalls): Deleted.
+        (WebCore::Style::PostResolutionCallbackDisabler::PostResolutionCallbackDisabler): Deleted.
+        (WebCore::Style::PostResolutionCallbackDisabler::~PostResolutionCallbackDisabler): Deleted.
+        (WebCore::Style::postResolutionCallbacksAreSuspended): Deleted.
+        * style/StyleResolveTree.h:
+
</ins><span class="cx"> 2014-04-02  Jinwoo Song  &lt;jinwoo7.song@samsung.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Page should use std::unique_ptr for PointerLockController
</span></span></pre></div>
<a id="trunkSourceWebCoredomContainerNodecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/ContainerNode.cpp (166679 => 166680)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/ContainerNode.cpp        2014-04-02 23:51:37 UTC (rev 166679)
+++ trunk/Source/WebCore/dom/ContainerNode.cpp        2014-04-02 23:53:30 UTC (rev 166680)
</span><span class="lines">@@ -37,10 +37,13 @@
</span><span class="cx"> #include &quot;JSLazyEventListener.h&quot;
</span><span class="cx"> #include &quot;JSNode.h&quot;
</span><span class="cx"> #include &quot;LabelsNodeList.h&quot;
</span><ins>+#include &quot;LoaderStrategy.h&quot;
+#include &quot;MemoryCache.h&quot;
</ins><span class="cx"> #include &quot;MutationEvent.h&quot;
</span><span class="cx"> #include &quot;NameNodeList.h&quot;
</span><span class="cx"> #include &quot;NodeRareData.h&quot;
</span><span class="cx"> #include &quot;NodeRenderStyle.h&quot;
</span><ins>+#include &quot;PlatformStrategies.h&quot;
</ins><span class="cx"> #include &quot;RadioNodeList.h&quot;
</span><span class="cx"> #include &quot;RenderBox.h&quot;
</span><span class="cx"> #include &quot;RenderTheme.h&quot;
</span><span class="lines">@@ -60,6 +63,15 @@
</span><span class="cx"> static void dispatchChildInsertionEvents(Node&amp;);
</span><span class="cx"> static void dispatchChildRemovalEvents(Node&amp;);
</span><span class="cx"> 
</span><ins>+typedef std::pair&lt;RefPtr&lt;Node&gt;, unsigned&gt; CallbackParameters;
+typedef std::pair&lt;NodeCallback, CallbackParameters&gt; CallbackInfo;
+typedef Vector&lt;CallbackInfo&gt; NodeCallbackQueue;
+
+static NodeCallbackQueue* s_postAttachCallbackQueue;
+
+static size_t s_attachDepth;
+static bool s_shouldReEnableMemoryCacheCallsAfterAttach;
+
</ins><span class="cx"> ChildNodesLazySnapshot* ChildNodesLazySnapshot::latestSnapshot = 0;
</span><span class="cx"> 
</span><span class="cx"> #ifndef NDEBUG
</span><span class="lines">@@ -746,6 +758,67 @@
</span><span class="cx">     newChild-&gt;setNeedsStyleRecalc(ReconstructRenderTree);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void ContainerNode::suspendPostAttachCallbacks(Document&amp; document)
+{
+    if (!s_attachDepth) {
+        ASSERT(!s_shouldReEnableMemoryCacheCallsAfterAttach);
+        if (Page* page = document.page()) {
+            // FIXME: How can this call be specific to one Page, while the
+            // s_attachDepth is a global? Doesn't make sense.
+            if (page-&gt;areMemoryCacheClientCallsEnabled()) {
+                page-&gt;setMemoryCacheClientCallsEnabled(false);
+                s_shouldReEnableMemoryCacheCallsAfterAttach = true;
+            }
+        }
+        platformStrategies()-&gt;loaderStrategy()-&gt;resourceLoadScheduler()-&gt;suspendPendingRequests();
+    }
+    ++s_attachDepth;
+}
+
+void ContainerNode::resumePostAttachCallbacks(Document&amp; document)
+{
+    if (s_attachDepth == 1) {
+        Ref&lt;Document&gt; protect(document);
+
+        if (s_postAttachCallbackQueue)
+            dispatchPostAttachCallbacks();
+        if (s_shouldReEnableMemoryCacheCallsAfterAttach) {
+            s_shouldReEnableMemoryCacheCallsAfterAttach = false;
+            if (Page* page = document.page())
+                page-&gt;setMemoryCacheClientCallsEnabled(true);
+        }
+        platformStrategies()-&gt;loaderStrategy()-&gt;resourceLoadScheduler()-&gt;resumePendingRequests();
+    }
+    --s_attachDepth;
+}
+
+void ContainerNode::queuePostAttachCallback(NodeCallback callback, Node&amp; node, unsigned callbackData)
+{
+    if (!s_postAttachCallbackQueue)
+        s_postAttachCallbackQueue = new NodeCallbackQueue;
+    
+    s_postAttachCallbackQueue-&gt;append(CallbackInfo(callback, CallbackParameters(&amp;node, callbackData)));
+}
+
+bool ContainerNode::postAttachCallbacksAreSuspended()
+{
+    return s_attachDepth;
+}
+
+void ContainerNode::dispatchPostAttachCallbacks()
+{
+    // We recalculate size() each time through the loop because a callback
+    // can add more callbacks to the end of the queue.
+    for (size_t i = 0; i &lt; s_postAttachCallbackQueue-&gt;size(); ++i) {
+        const CallbackInfo&amp; info = (*s_postAttachCallbackQueue)[i];
+        NodeCallback callback = info.first;
+        CallbackParameters params = info.second;
+
+        callback(*params.first, params.second);
+    }
+    s_postAttachCallbackQueue-&gt;clear();
+}
+
</ins><span class="cx"> void ContainerNode::childrenChanged(const ChildChange&amp; change)
</span><span class="cx"> {
</span><span class="cx">     document().incDOMTreeVersion();
</span></span></pre></div>
<a id="trunkSourceWebCoredomContainerNodeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/ContainerNode.h (166679 => 166680)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/ContainerNode.h        2014-04-02 23:51:37 UTC (rev 166679)
+++ trunk/Source/WebCore/dom/ContainerNode.h        2014-04-02 23:53:30 UTC (rev 166680)
</span><span class="lines">@@ -79,6 +79,7 @@
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> class ContainerNode : public Node {
</span><ins>+    friend class PostAttachCallbackDisabler;
</ins><span class="cx"> public:
</span><span class="cx">     virtual ~ContainerNode();
</span><span class="cx"> 
</span><span class="lines">@@ -139,6 +140,9 @@
</span><span class="cx"> protected:
</span><span class="cx">     explicit ContainerNode(Document&amp;, ConstructionType = CreateContainer);
</span><span class="cx"> 
</span><ins>+    static void queuePostAttachCallback(NodeCallback, Node&amp;, unsigned = 0);
+    static bool postAttachCallbacksAreSuspended();
+
</ins><span class="cx">     template&lt;class GenericNode, class GenericNodeContainer&gt;
</span><span class="cx">     friend void appendChildToContainer(GenericNode* child, GenericNodeContainer&amp;);
</span><span class="cx"> 
</span><span class="lines">@@ -153,6 +157,10 @@
</span><span class="cx">     void removeBetween(Node* previousChild, Node* nextChild, Node&amp; oldChild);
</span><span class="cx">     void insertBeforeCommon(Node&amp; nextChild, Node&amp; oldChild);
</span><span class="cx"> 
</span><ins>+    static void dispatchPostAttachCallbacks();
+    static void suspendPostAttachCallbacks(Document&amp;);
+    static void resumePostAttachCallbacks(Document&amp;);
+
</ins><span class="cx">     bool getUpperLeftCorner(FloatPoint&amp;) const;
</span><span class="cx">     bool getLowerRightCorner(FloatPoint&amp;) const;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Document.cpp (166679 => 166680)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Document.cpp        2014-04-02 23:51:37 UTC (rev 166679)
+++ trunk/Source/WebCore/dom/Document.cpp        2014-04-02 23:53:30 UTC (rev 166680)
</span><span class="lines">@@ -1757,7 +1757,7 @@
</span><span class="cx"> 
</span><span class="cx">     m_inStyleRecalc = true;
</span><span class="cx">     {
</span><del>-        Style::PostResolutionCallbackDisabler disabler(*this);
</del><ins>+        PostAttachCallbackDisabler disabler(*this);
</ins><span class="cx">         WidgetHierarchyUpdatesSuspensionScope suspendWidgetHierarchyUpdates;
</span><span class="cx"> 
</span><span class="cx">         if (m_pendingStyleRecalcShouldForce)
</span></span></pre></div>
<a id="trunkSourceWebCoredomElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Element.h (166679 => 166680)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Element.h        2014-04-02 23:51:37 UTC (rev 166679)
+++ trunk/Source/WebCore/dom/Element.h        2014-04-02 23:53:30 UTC (rev 166680)
</span><span class="lines">@@ -796,6 +796,23 @@
</span><span class="cx">     return static_cast&lt;UniqueElementData&amp;&gt;(*m_elementData);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+class PostAttachCallbackDisabler {
+public:
+    explicit PostAttachCallbackDisabler(Document&amp; document)
+        : m_document(document)
+    {
+        Element::suspendPostAttachCallbacks(m_document);
+    }
+
+    ~PostAttachCallbackDisabler()
+    {
+        Element::resumePostAttachCallbacks(m_document);
+    }
+
+private:
+    Document&amp; m_document;
+};
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLEmbedElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLEmbedElement.cpp (166679 => 166680)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLEmbedElement.cpp        2014-04-02 23:51:37 UTC (rev 166679)
+++ trunk/Source/WebCore/html/HTMLEmbedElement.cpp        2014-04-02 23:53:30 UTC (rev 166680)
</span><span class="lines">@@ -97,18 +97,20 @@
</span><span class="cx"> void HTMLEmbedElement::parseAttribute(const QualifiedName&amp; name, const AtomicString&amp; value)
</span><span class="cx"> {
</span><span class="cx">     if (name == typeAttr) {
</span><del>-        m_serviceType = value.string().left(value.find(&quot;;&quot;)).lower();
-        // FIXME: The only difference between this and HTMLObjectElement's corresponding
-        // code is that HTMLObjectElement does setNeedsWidgetUpdate(true). Consider moving
-        // this up to the HTMLPlugInImageElement to be shared.
-    } else if (name == codeAttr) {
</del><ins>+        m_serviceType = value.string().lower();
+        size_t pos = m_serviceType.find(&quot;;&quot;);
+        if (pos != notFound)
+            m_serviceType = m_serviceType.left(pos);
+    } else if (name == codeAttr)
</ins><span class="cx">         m_url = stripLeadingAndTrailingHTMLSpaces(value);
</span><del>-        // FIXME: Why no call to updateImageLoaderWithNewURLSoon?
-        // FIXME: If both code and src attributes are specified, last one parsed/changed wins. That can't be right!
-    } else if (name == srcAttr) {
</del><ins>+    else if (name == srcAttr) {
</ins><span class="cx">         m_url = stripLeadingAndTrailingHTMLSpaces(value);
</span><del>-        updateImageLoaderWithNewURLSoon();
-        // FIXME: If both code and src attributes are specified, last one parsed/changed wins. That can't be right!
</del><ins>+        document().updateStyleIfNeeded();
+        if (renderer() &amp;&amp; isImageType()) {
+            if (!m_imageLoader)
+                m_imageLoader = adoptPtr(new HTMLImageLoader(*this));
+            m_imageLoader-&gt;updateFromElementIgnoringPreviousError();
+        }
</ins><span class="cx">     } else
</span><span class="cx">         HTMLPlugInImageElement::parseAttribute(name, value);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLFormControlElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLFormControlElement.cpp (166679 => 166680)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLFormControlElement.cpp        2014-04-02 23:51:37 UTC (rev 166679)
+++ trunk/Source/WebCore/html/HTMLFormControlElement.cpp        2014-04-02 23:53:30 UTC (rev 166680)
</span><span class="lines">@@ -208,6 +208,12 @@
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static void focusPostAttach(Node&amp; element, unsigned)
+{ 
+    toElement(element).focus();
+    element.deref();
+}
+
</ins><span class="cx"> void HTMLFormControlElement::didAttachRenderers()
</span><span class="cx"> {
</span><span class="cx">     // The call to updateFromElement() needs to go after the call through
</span><span class="lines">@@ -218,11 +224,8 @@
</span><span class="cx"> 
</span><span class="cx">     if (shouldAutofocus(this)) {
</span><span class="cx">         setAutofocused();
</span><del>-
-        RefPtr&lt;HTMLFormControlElement&gt; element = this;
-        Style::queuePostResolutionCallback([element] {
-            element-&gt;focus();
-        });
</del><ins>+        ref();
+        queuePostAttachCallback(focusPostAttach, *this);
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -285,17 +288,18 @@
</span><span class="cx">     return m_isRequired;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static void updateFromElementCallback(Node&amp; node, unsigned)
+{
+    if (auto renderer = toHTMLFormControlElement(node).renderer())
+        renderer-&gt;updateFromElement();
+}
+
</ins><span class="cx"> void HTMLFormControlElement::didRecalcStyle(Style::Change)
</span><span class="cx"> {
</span><span class="cx">     // updateFromElement() can cause the selection to change, and in turn
</span><span class="cx">     // trigger synchronous layout, so it must not be called during style recalc.
</span><del>-    if (renderer()) {
-        RefPtr&lt;HTMLFormControlElement&gt; element = this;
-        Style::queuePostResolutionCallback([element]{
-            if (auto* renderer = element-&gt;renderer())
-                renderer-&gt;updateFromElement();
-        });
-    }
</del><ins>+    if (renderer())
+        queuePostAttachCallback(updateFromElementCallback, *this);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool HTMLFormControlElement::supportsFocus() const
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLFrameOwnerElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLFrameOwnerElement.cpp (166679 => 166680)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLFrameOwnerElement.cpp        2014-04-02 23:51:37 UTC (rev 166679)
+++ trunk/Source/WebCore/html/HTMLFrameOwnerElement.cpp        2014-04-02 23:53:30 UTC (rev 166680)
</span><span class="lines">@@ -121,14 +121,16 @@
</span><span class="cx">     return 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static void needsStyleRecalcCallback(Node&amp; node, unsigned data)
+{
+    node.setNeedsStyleRecalc(static_cast&lt;StyleChangeType&gt;(data));
+}
+
</ins><span class="cx"> void HTMLFrameOwnerElement::scheduleSetNeedsStyleRecalc(StyleChangeType changeType)
</span><span class="cx"> {
</span><del>-    if (Style::postResolutionCallbacksAreSuspended()) {
-        RefPtr&lt;HTMLFrameOwnerElement&gt; element = this;
-        Style::queuePostResolutionCallback([element, changeType]{
-            element-&gt;setNeedsStyleRecalc(changeType);
-        });
-    } else
</del><ins>+    if (postAttachCallbacksAreSuspended())
+        queuePostAttachCallback(needsStyleRecalcCallback, *this, static_cast&lt;unsigned&gt;(changeType));
+    else
</ins><span class="cx">         setNeedsStyleRecalc(changeType);
</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 (166679 => 166680)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLObjectElement.cpp        2014-04-02 23:51:37 UTC (rev 166679)
+++ trunk/Source/WebCore/html/HTMLObjectElement.cpp        2014-04-02 23:53:30 UTC (rev 166680)
</span><span class="lines">@@ -107,15 +107,28 @@
</span><span class="cx">     if (name == formAttr)
</span><span class="cx">         formAttributeChanged();
</span><span class="cx">     else if (name == typeAttr) {
</span><del>-        m_serviceType = value.string().left(value.find(';')).lower();
-        setNeedsWidgetUpdate(true);
</del><ins>+        m_serviceType = value.lower();
+        size_t pos = m_serviceType.find(&quot;;&quot;);
+        if (pos != notFound)
+            m_serviceType = m_serviceType.left(pos);
+        if (renderer())
+            setNeedsWidgetUpdate(true);
</ins><span class="cx">     } else if (name == dataAttr) {
</span><span class="cx">         m_url = stripLeadingAndTrailingHTMLSpaces(value);
</span><del>-        setNeedsWidgetUpdate(true);
-        updateImageLoaderWithNewURLSoon();
-    } else if (name == classidAttr)
-        setNeedsWidgetUpdate(true);
-    else if (name == onbeforeloadAttr)
</del><ins>+        document().updateStyleIfNeeded();
+        if (renderer()) {
+            setNeedsWidgetUpdate(true);
+            if (isImageType()) {
+                if (!m_imageLoader)
+                    m_imageLoader = adoptPtr(new HTMLImageLoader(*this));
+                m_imageLoader-&gt;updateFromElementIgnoringPreviousError();
+            }
+        }
+    } else if (name == classidAttr) {
+        m_classId = value;
+        if (renderer())
+            setNeedsWidgetUpdate(true);
+    } else if (name == onbeforeloadAttr)
</ins><span class="cx">         setAttributeEventListener(eventNames().beforeloadEvent, name, value);
</span><span class="cx">     else
</span><span class="cx">         HTMLPlugInImageElement::parseAttribute(name, value);
</span><span class="lines">@@ -238,24 +251,26 @@
</span><span class="cx">     // 'generator' meta tag is present. Only apply this quirk if there is no
</span><span class="cx">     // fallback content, which ensures the quirk will disable itself if Wiki
</span><span class="cx">     // Server is updated to generate an alternate embed tag as fallback content.
</span><del>-
</del><span class="cx">     if (!document().page()
</span><span class="cx">         || !document().page()-&gt;settings().needsSiteSpecificQuirks()
</span><span class="cx">         || hasFallbackContent()
</span><del>-        || !equalIgnoringCase(fastGetAttribute(classidAttr), &quot;clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B&quot;))
</del><ins>+        || !equalIgnoringCase(classId(), &quot;clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B&quot;))
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    for (auto&amp; metaElement : descendantsOfType&lt;HTMLMetaElement&gt;(document())) {
</del><ins>+    RefPtr&lt;NodeList&gt; metaElements = document().getElementsByTagName(HTMLNames::metaTag.localName());
+    unsigned length = metaElements-&gt;length();
+    for (unsigned i = 0; i &lt; length; ++i) {
+        HTMLMetaElement&amp; metaElement = toHTMLMetaElement(*metaElements-&gt;item(i));
</ins><span class="cx">         if (equalIgnoringCase(metaElement.name(), &quot;generator&quot;) &amp;&amp; metaElement.content().startsWith(&quot;Mac OS X Server Web Services Server&quot;, false))
</span><span class="cx">             return true;
</span><span class="cx">     }
</span><del>-
</del><ins>+    
</ins><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx">     
</span><span class="cx"> bool HTMLObjectElement::hasValidClassId()
</span><span class="cx"> {
</span><del>-    if (MIMETypeRegistry::isJavaAppletMIMEType(serviceType()) &amp;&amp; fastGetAttribute(classidAttr).startsWith(&quot;java:&quot;, false))
</del><ins>+    if (MIMETypeRegistry::isJavaAppletMIMEType(serviceType()) &amp;&amp; classId().startsWith(&quot;java:&quot;, false))
</ins><span class="cx">         return true;
</span><span class="cx">     
</span><span class="cx">     if (shouldAllowQuickTimeClassIdQuirk())
</span><span class="lines">@@ -263,7 +278,7 @@
</span><span class="cx"> 
</span><span class="cx">     // HTML5 says that fallback content should be rendered if a non-empty
</span><span class="cx">     // classid is specified for which the UA can't find a suitable plug-in.
</span><del>-    return fastGetAttribute(classidAttr).isEmpty();
</del><ins>+    return classId().isEmpty();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> // FIXME: This should be unified with HTMLEmbedElement::updateWidget and
</span><span class="lines">@@ -360,22 +375,20 @@
</span><span class="cx">     setNeedsStyleRecalc(ReconstructRenderTree);
</span><span class="cx"> 
</span><span class="cx">     // Before we give up and use fallback content, check to see if this is a MIME type issue.
</span><del>-    auto* loader = imageLoader();
-    if (loader &amp;&amp; loader-&gt;image() &amp;&amp; loader-&gt;image()-&gt;status() != CachedResource::LoadError) {
-        m_serviceType = loader-&gt;image()-&gt;response().mimeType();
</del><ins>+    if (m_imageLoader &amp;&amp; m_imageLoader-&gt;image() &amp;&amp; m_imageLoader-&gt;image()-&gt;status() != CachedResource::LoadError) {
+        m_serviceType = m_imageLoader-&gt;image()-&gt;response().mimeType();
</ins><span class="cx">         if (!isImageType()) {
</span><span class="cx">             // If we don't think we have an image type anymore, then clear the image from the loader.
</span><del>-            loader-&gt;setImage(nullptr);
</del><ins>+            m_imageLoader-&gt;setImage(0);
</ins><span class="cx">             return;
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     m_useFallbackContent = true;
</span><span class="cx"> 
</span><del>-    // This was added to keep Acid 2 non-flaky. A style recalc is required to make fallback resources load.
-    // Without forcing, this may happen after all the other resources have been loaded and the document is already
-    // considered complete. FIXME: Could address this with incrementLoadEventDelayCount instead, as we do with
-    // image loading in HTMLPlugInImageElement, or disentangle loading from style entirely.
</del><ins>+    // This is here mainly to keep acid2 non-flaky. A style recalc is required to make fallback resources to load. Without forcing
+    // this may happen after all the other resources have been loaded and the document is already considered complete.
+    // FIXME: Disentangle fallback content handling from style recalcs.
</ins><span class="cx">     document().updateStyleIfNeeded();
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLObjectElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLObjectElement.h (166679 => 166680)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLObjectElement.h        2014-04-02 23:51:37 UTC (rev 166679)
+++ trunk/Source/WebCore/html/HTMLObjectElement.h        2014-04-02 23:53:30 UTC (rev 166680)
</span><span class="lines">@@ -36,23 +36,35 @@
</span><span class="cx">     virtual ~HTMLObjectElement();
</span><span class="cx"> 
</span><span class="cx">     bool isDocNamedItem() const { return m_docNamedItem; }
</span><ins>+
+    const String&amp; classId() const { return m_classId; }
+
</ins><span class="cx">     bool containsJavaApplet() const;
</span><span class="cx"> 
</span><del>-    bool hasFallbackContent() const;
</del><span class="cx">     virtual bool useFallbackContent() const override { return m_useFallbackContent; }
</span><span class="cx">     void renderFallbackContent();
</span><span class="cx"> 
</span><del>-    // Implementation of constraint validation API.
</del><ins>+    // Implementations of FormAssociatedElement
+    HTMLFormElement* form() const { return FormAssociatedElement::form(); }
+
+    virtual bool isFormControlElement() const override { return false; }
+
+    virtual bool isEnumeratable() const override { return true; }
+    virtual bool appendFormData(FormDataList&amp;, bool) override;
+
+    // Implementations of constraint validation API.
</ins><span class="cx">     // Note that the object elements are always barred from constraint validation.
</span><del>-    static bool checkValidity() { return true; }
</del><ins>+    virtual String validationMessage() const override { return String(); }
+    bool checkValidity() { return true; }
</ins><span class="cx">     virtual void setCustomValidity(const String&amp;) override { }
</span><del>-    virtual String validationMessage() const override { return String(); }
</del><span class="cx"> 
</span><del>-    using HTMLPlugInImageElement::ref;
-    using HTMLPlugInImageElement::deref;
</del><ins>+    using Node::ref;
+    using Node::deref;
</ins><span class="cx"> 
</span><del>-    using FormAssociatedElement::form;
</del><ins>+    virtual bool canContainRangeEndPoint() const override { return useFallbackContent(); }
</ins><span class="cx"> 
</span><ins>+    bool hasFallbackContent() const;
+
</ins><span class="cx"> private:
</span><span class="cx">     HTMLObjectElement(const QualifiedName&amp;, Document&amp;, HTMLFormElement*, bool createdByParser);
</span><span class="cx"> 
</span><span class="lines">@@ -92,13 +104,7 @@
</span><span class="cx">     virtual HTMLObjectElement&amp; asHTMLElement() override final { return *this; }
</span><span class="cx">     virtual const HTMLObjectElement&amp; asHTMLElement() const override final { return *this; }
</span><span class="cx"> 
</span><del>-    virtual bool isFormControlElement() const override { return false; }
-
-    virtual bool isEnumeratable() const override { return true; }
-    virtual bool appendFormData(FormDataList&amp;, bool) override;
-
-    virtual bool canContainRangeEndPoint() const override { return useFallbackContent(); }
-
</del><ins>+    String m_classId;
</ins><span class="cx">     bool m_docNamedItem : 1;
</span><span class="cx">     bool m_useFallbackContent : 1;
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLPlugInImageElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLPlugInImageElement.cpp (166679 => 166680)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLPlugInImageElement.cpp        2014-04-02 23:51:37 UTC (rev 166679)
+++ trunk/Source/WebCore/html/HTMLPlugInImageElement.cpp        2014-04-02 23:53:30 UTC (rev 166680)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2008, 2011, 2012, 2014 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2008, 2011, 2012 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * This library is free software; you can redistribute it and/or
</span><span class="cx">  * modify it under the terms of the GNU Library General Public
</span><span class="lines">@@ -111,7 +111,6 @@
</span><span class="cx">     // this delay is unnecessary, but it is simpler to make both classes share
</span><span class="cx">     // the same codepath in this class.
</span><span class="cx">     , m_needsWidgetUpdate(!createdByParser)
</span><del>-    , m_needsImageReload(false)
</del><span class="cx">     , m_shouldPreferPlugInsForImages(preferPlugInsForImagesOption == ShouldPreferPlugInsForImages)
</span><span class="cx">     , m_needsDocumentActivationCallbacks(false)
</span><span class="cx">     , m_simulatedMouseClickTimer(this, &amp;HTMLPlugInImageElement::simulatedMouseClickTimerFired, simulatedMouseClickTimerDelay)
</span><span class="lines">@@ -228,12 +227,11 @@
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx">     if (ShadowRoot* shadowRoot = this-&gt;shadowRoot()) {
</span><del>-        Node* shadowNode = shadowRoot-&gt;firstChild();
-        if (shadowNode &amp;&amp; shadowNode-&gt;isElementNode() &amp;&amp; toElement(*shadowNode).shadowPseudoId() == &quot;-apple-youtube-shadow-iframe&quot;)
</del><ins>+        Element* shadowElement = toElement(shadowRoot-&gt;firstChild());
+        if (shadowElement &amp;&amp; shadowElement-&gt;shadowPseudoId() == &quot;-apple-youtube-shadow-iframe&quot;)
</ins><span class="cx">             return createRenderer&lt;RenderBlockFlow&gt;(*this, std::move(style));
</span><span class="cx">     }
</span><span class="cx"> #endif
</span><del>-
</del><span class="cx">     return HTMLPlugInElement::createElementRenderer(std::move(style));
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -246,66 +244,42 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void HTMLPlugInImageElement::didRecalcStyle(Style::Change styleChange)
-{
-    scheduleUpdateForAfterStyleResolution();
-
-    HTMLPlugInElement::didRecalcStyle(styleChange);
-}
-
</del><span class="cx"> void HTMLPlugInImageElement::didAttachRenderers()
</span><span class="cx"> {
</span><del>-    scheduleUpdateForAfterStyleResolution();
</del><ins>+    if (!isImageType()) {
+        queuePostAttachCallback(&amp;HTMLPlugInImageElement::updateWidgetCallback, *this);
+        return;
+    }
+    if (!renderer() || useFallbackContent())
+        return;
</ins><span class="cx"> 
</span><del>-    HTMLPlugInElement::didAttachRenderers();
</del><ins>+    // Image load might complete synchronously and cause us to re-enter attach.
+    queuePostAttachCallback(&amp;HTMLPlugInImageElement::startLoadingImageCallback, *this);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void HTMLPlugInImageElement::willDetachRenderers()
</span><span class="cx"> {
</span><span class="cx">     // FIXME: Because of the insanity that is HTMLPlugInImageElement::willRecalcStyle,
</span><span class="cx">     // we can end up detaching during an attach() call, before we even have a
</span><del>-    // renderer. In that case, don't mark the widget for update.
</del><ins>+    // renderer.  In that case, don't mark the widget for update.
</ins><span class="cx">     if (renderer() &amp;&amp; !useFallbackContent()) {
</span><span class="cx">         // Update the widget the next time we attach (detaching destroys the plugin).
</span><span class="cx">         setNeedsWidgetUpdate(true);
</span><span class="cx">     }
</span><del>-
</del><span class="cx">     HTMLPlugInElement::willDetachRenderers();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void HTMLPlugInImageElement::scheduleUpdateForAfterStyleResolution()
</del><ins>+void HTMLPlugInImageElement::updateWidgetIfNecessary()
</ins><span class="cx"> {
</span><del>-    if (m_needsImageReload || (renderer() &amp;&amp; !useFallbackContent())) {
-        RefPtr&lt;HTMLPlugInImageElement&gt; element = this;
-        Style::queuePostResolutionCallback([element]{
-            element-&gt;updateAfterStyleResolution();
-        });
-    }
-}
</del><ins>+    document().updateStyleIfNeeded();
</ins><span class="cx"> 
</span><del>-void HTMLPlugInImageElement::updateAfterStyleResolution()
-{
-    // Do this after style resolution, since the image or widget load might complete synchronously
-    // and cause us to re-enter otherwise. Also, we can't really answer the question &quot;do I have a renderer&quot;
-    // accurately until after style resolution.
</del><ins>+    if (!needsWidgetUpdate() || useFallbackContent() || isImageType())
+        return;
</ins><span class="cx"> 
</span><del>-    if (renderer() &amp;&amp; !useFallbackContent()) {
-        if (isImageType()) {
-            if (!m_imageLoader)
-                m_imageLoader = std::make_unique&lt;HTMLImageLoader&gt;(*this);
-            if (m_needsImageReload)
-                m_imageLoader-&gt;updateFromElementIgnoringPreviousError();
-            else
-                m_imageLoader-&gt;updateFromElement();
-        } else {
-            if (m_needsWidgetUpdate &amp;&amp; renderEmbeddedObject() &amp;&amp; !renderEmbeddedObject()-&gt;isPluginUnavailable())
-                updateWidget(CreateOnlyNonNetscapePlugins);
-        }
-    }
</del><ins>+    if (!renderEmbeddedObject() || renderEmbeddedObject()-&gt;isPluginUnavailable())
+        return;
</ins><span class="cx"> 
</span><del>-    // Either we reloaded the image just now, or we had some reason not to.
-    // Either way, clear the flag now, since we don't need to remember to try again.
-    setNeedsImageReload(false);
</del><ins>+    updateWidget(CreateOnlyNonNetscapePlugins);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void HTMLPlugInImageElement::finishParsingChildren()
</span><span class="lines">@@ -319,25 +293,16 @@
</span><span class="cx">         setNeedsStyleRecalc();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void HTMLPlugInImageElement::removedFrom(ContainerNode&amp; root)
-{
-    // Important to do this when removed from a document to remove the possibility
-    // we might delay the document's load event indefinitely.
-    setNeedsImageReload(false);
-
-    HTMLPlugInElement::removedFrom(root);
-}
-
</del><span class="cx"> void HTMLPlugInImageElement::didMoveToNewDocument(Document* oldDocument)
</span><span class="cx"> {
</span><span class="cx">     if (m_needsDocumentActivationCallbacks) {
</span><del>-        oldDocument-&gt;unregisterForPageCacheSuspensionCallbacks(this);
</del><ins>+        if (oldDocument)
+            oldDocument-&gt;unregisterForPageCacheSuspensionCallbacks(this);
</ins><span class="cx">         document().registerForPageCacheSuspensionCallbacks(this);
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (m_imageLoader)
</span><span class="cx">         m_imageLoader-&gt;elementDidMoveToNewDocument();
</span><del>-
</del><span class="cx">     HTMLPlugInElement::didMoveToNewDocument(oldDocument);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -356,6 +321,23 @@
</span><span class="cx">     HTMLPlugInElement::documentDidResumeFromPageCache();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void HTMLPlugInImageElement::updateWidgetCallback(Node&amp; node, unsigned)
+{
+    toHTMLPlugInImageElement(node).updateWidgetIfNecessary();
+}
+
+void HTMLPlugInImageElement::startLoadingImage()
+{
+    if (!m_imageLoader)
+        m_imageLoader = adoptPtr(new HTMLImageLoader(*this));
+    m_imageLoader-&gt;updateFromElement();
+}
+
+void HTMLPlugInImageElement::startLoadingImageCallback(Node&amp; node, unsigned)
+{
+    toHTMLPlugInImageElement(node).startLoadingImage();
+}
+
</ins><span class="cx"> void HTMLPlugInImageElement::updateSnapshot(PassRefPtr&lt;Image&gt; image)
</span><span class="cx"> {
</span><span class="cx">     if (displayState() &gt; DisplayingSnapshot)
</span><span class="lines">@@ -455,18 +437,18 @@
</span><span class="cx">     ShadowRoot&amp; root = this-&gt;ensureUserAgentShadowRoot();
</span><span class="cx">     root.appendChild(shadowElement, ASSERT_NO_EXCEPTION);
</span><span class="cx"> 
</span><del>-    RefPtr&lt;HTMLIFrameElement&gt; iframeElement = HTMLIFrameElement::create(iframeTag, document());
-    if (hasAttribute(widthAttr))
-        iframeElement-&gt;setAttribute(widthAttr, AtomicString(&quot;100%&quot;, AtomicString::ConstructFromLiteral));
-    if (hasAttribute(heightAttr)) {
-        iframeElement-&gt;setAttribute(styleAttr, AtomicString(&quot;max-height: 100%&quot;, AtomicString::ConstructFromLiteral));
-        iframeElement-&gt;setAttribute(heightAttr, getAttribute(heightAttr));
</del><ins>+    RefPtr&lt;HTMLIFrameElement&gt; iframeElement = HTMLIFrameElement::create(HTMLNames::iframeTag, document());
+    if (hasAttribute(HTMLNames::widthAttr))
+        iframeElement-&gt;setAttribute(HTMLNames::widthAttr, AtomicString(&quot;100%&quot;, AtomicString::ConstructFromLiteral));
+    if (hasAttribute(HTMLNames::heightAttr)) {
+        iframeElement-&gt;setAttribute(HTMLNames::styleAttr, AtomicString(&quot;max-height: 100%&quot;, AtomicString::ConstructFromLiteral));
+        iframeElement-&gt;setAttribute(HTMLNames::heightAttr, getAttribute(HTMLNames::heightAttr));
</ins><span class="cx">     }
</span><del>-    iframeElement-&gt;setAttribute(srcAttr, src);
-    iframeElement-&gt;setAttribute(frameborderAttr, AtomicString(&quot;0&quot;, AtomicString::ConstructFromLiteral));
</del><ins>+    iframeElement-&gt;setAttribute(HTMLNames::srcAttr, src);
+    iframeElement-&gt;setAttribute(HTMLNames::frameborderAttr, AtomicString(&quot;0&quot;, AtomicString::ConstructFromLiteral));
</ins><span class="cx"> 
</span><span class="cx">     // Disable frame flattening for this iframe.
</span><del>-    iframeElement-&gt;setAttribute(scrollingAttr, AtomicString(&quot;no&quot;, AtomicString::ConstructFromLiteral));
</del><ins>+    iframeElement-&gt;setAttribute(HTMLNames::scrollingAttr, AtomicString(&quot;no&quot;, AtomicString::ConstructFromLiteral));
</ins><span class="cx">     shadowElement-&gt;appendChild(iframeElement, ASSERT_NO_EXCEPTION);
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="lines">@@ -628,11 +610,6 @@
</span><span class="cx">         toPluginViewBase(widget)-&gt;beginSnapshottingRunningPlugin();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static inline bool is100Percent(Length length)
-{
-    return length.isPercent() &amp;&amp; length.percent() == 100;
-}
-
</del><span class="cx"> void HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn(const URL&amp; url)
</span><span class="cx"> {
</span><span class="cx">     LOG(Plugins, &quot;%p Plug-in URL: %s&quot;, this, m_url.utf8().data());
</span><span class="lines">@@ -717,27 +694,27 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    auto&amp; renderer = toRenderEmbeddedObject(*this-&gt;renderer());
-    LayoutRect contentRect = renderer.contentBoxRect();
-    int contentWidth = contentRect.width();
-    int contentHeight = contentRect.height();
</del><ins>+    RenderBox* renderEmbeddedObject = toRenderBox(renderer());
+    Length styleWidth = renderEmbeddedObject-&gt;style().width();
+    Length styleHeight = renderEmbeddedObject-&gt;style().height();
+    LayoutRect contentBoxRect = renderEmbeddedObject-&gt;contentBoxRect();
+    int contentWidth = contentBoxRect.width();
+    int contentHeight = contentBoxRect.height();
+    int contentArea = contentWidth * contentHeight;
+    IntSize visibleViewSize = document().frame()-&gt;view()-&gt;visibleSize();
+    int visibleArea = visibleViewSize.width() * visibleViewSize.height();
</ins><span class="cx"> 
</span><del>-    if (inMainFrame) {
-        auto&amp; style = renderer.style();
-        bool isFullPage = is100Percent(style.width()) &amp;&amp; is100Percent(style.height());
-        IntSize visibleViewSize = document().frame()-&gt;view()-&gt;visibleSize();
-        float contentArea = contentWidth * contentHeight;
-        float visibleArea = visibleViewSize.width() * visibleViewSize.height();
-        if (isFullPage &amp;&amp; contentArea &gt; visibleArea * sizingFullPageAreaRatioThreshold) {
-            LOG(Plugins, &quot;%p Plug-in is top level full page, set to play&quot;, this);
-            m_snapshotDecision = NeverSnapshot;
-            return;
-        }
</del><ins>+    if (inMainFrame &amp;&amp; styleWidth.isPercent() &amp;&amp; (styleWidth.percent() == 100)
+        &amp;&amp; styleHeight.isPercent() &amp;&amp; (styleHeight.percent() == 100)
+        &amp;&amp; (static_cast&lt;float&gt;(contentArea) / visibleArea &gt; sizingFullPageAreaRatioThreshold)) {
+        LOG(Plugins, &quot;%p Plug-in is top level full page, set to play&quot;, this);
+        m_snapshotDecision = NeverSnapshot;
+        return;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (contentWidth &lt;= sizingTinyDimensionThreshold || contentHeight &lt;= sizingTinyDimensionThreshold) {
</span><span class="cx">         LOG(Plugins, &quot;%p Plug-in is very small %dx%d, set to play&quot;, this, contentWidth, contentHeight);
</span><del>-        m_sizeWhenSnapshotted = IntSize(contentWidth, contentHeight);
</del><ins>+        m_sizeWhenSnapshotted = IntSize(contentBoxRect.width().toInt(), contentBoxRect.height().toInt());
</ins><span class="cx">         m_snapshotDecision = MaySnapshotWhenResized;
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="lines">@@ -749,7 +726,7 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    LOG(Plugins, &quot;%p Plug-in from (%s, %s) is not auto-start, sized at %dx%d, set to wait for snapshot&quot;, this, document().topDocument().baseURL().host().utf8().data(), url.host().utf8().data(), contentWidth, contentHeight);
</del><ins>+    LOG(Plugins, &quot;%p Plug-in from (%s, %s) is not auto-start, sized at %dx%d, set to wait for snapshot&quot;, this, document().page()-&gt;mainFrame().document()-&gt;baseURL().host().utf8().data(), url.host().utf8().data(), contentWidth, contentHeight);
</ins><span class="cx">     m_snapshotDecision = Snapshotted;
</span><span class="cx">     setDisplayState(WaitingForSnapshot);
</span><span class="cx"> }
</span><span class="lines">@@ -797,21 +774,4 @@
</span><span class="cx">     return loader.requestObject(*this, url, getNameAttribute(), mimeType, paramNames, paramValues);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void HTMLPlugInImageElement::setNeedsImageReload(bool needsImageReload)
-{
-    if (m_needsImageReload == needsImageReload)
-        return;
-
-    m_needsImageReload = needsImageReload;
-
-    if (!needsImageReload)
-        document().decrementLoadEventDelayCount();
-    else {
-        // Called when a URL is set, triggering a new load.
-        // The actual load won't start until we recalculate style, which will tell us whether to load.
-        document().incrementLoadEventDelayCount();
-        setNeedsStyleRecalc(SyntheticStyleChange);
-    }
-}
-
</del><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLPlugInImageElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLPlugInImageElement.h (166679 => 166680)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLPlugInImageElement.h        2014-04-02 23:51:37 UTC (rev 166679)
+++ trunk/Source/WebCore/html/HTMLPlugInImageElement.h        2014-04-02 23:53:30 UTC (rev 166680)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2008, 2009, 2011, 2012, 2014 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2008, 2009, 2011, 2012 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * This library is free software; you can redistribute it and/or
</span><span class="cx">  * modify it under the terms of the GNU Library General Public
</span><span class="lines">@@ -23,13 +23,16 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;HTMLPlugInElement.h&quot;
</span><span class="cx"> 
</span><ins>+#include &quot;RenderStyle.h&quot;
+#include &lt;wtf/OwnPtr.h&gt;
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> class HTMLImageLoader;
</span><ins>+class HTMLVideoElement;
</ins><span class="cx"> class FrameLoader;
</span><span class="cx"> class Image;
</span><span class="cx"> class MouseEvent;
</span><del>-class RenderStyle;
</del><span class="cx"> class Widget;
</span><span class="cx"> 
</span><span class="cx"> enum PluginCreationOption {
</span><span class="lines">@@ -37,8 +40,12 @@
</span><span class="cx">     CreateOnlyNonNetscapePlugins,
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-// Base class for HTMLAppletElement, HTMLEmbedElement, and HTMLObjectElement.
-// FIXME: Should HTMLAppletElement inherit from HTMLPlugInElement directly instead?
</del><ins>+enum PreferPlugInsForImagesOption {
+    ShouldPreferPlugInsForImages,
+    ShouldNotPreferPlugInsForImages
+};
+
+// Base class for HTMLObjectElement and HTMLEmbedElement
</ins><span class="cx"> class HTMLPlugInImageElement : public HTMLPlugInElement {
</span><span class="cx"> public:
</span><span class="cx">     virtual ~HTMLPlugInImageElement();
</span><span class="lines">@@ -97,57 +104,56 @@
</span><span class="cx">     SnapshotDecision snapshotDecision() const { return m_snapshotDecision; }
</span><span class="cx"> 
</span><span class="cx"> protected:
</span><del>-    enum PreferPlugInsForImagesOption { ShouldPreferPlugInsForImages, ShouldNotPreferPlugInsForImages };
</del><span class="cx">     HTMLPlugInImageElement(const QualifiedName&amp; tagName, Document&amp;, bool createdByParser, PreferPlugInsForImagesOption);
</span><span class="cx"> 
</span><del>-    virtual void removedFrom(ContainerNode&amp;) override;
-    virtual void didMoveToNewDocument(Document* oldDocument) override;
-    virtual bool requestObject(const String&amp; url, const String&amp; mimeType, const Vector&lt;String&gt;&amp; paramNames, const Vector&lt;String&gt;&amp; paramValues) override final;
-
</del><span class="cx">     bool isImageType();
</span><del>-    HTMLImageLoader* imageLoader() { return m_imageLoader.get(); }
-    void updateImageLoaderWithNewURLSoon() { setNeedsImageReload(true); }
</del><span class="cx"> 
</span><ins>+    OwnPtr&lt;HTMLImageLoader&gt; m_imageLoader;
+    String m_serviceType;
+    String m_url;
+    URL m_loadedUrl;
+
+    static void updateWidgetCallback(Node&amp;, unsigned);
+    static void startLoadingImageCallback(Node&amp;, unsigned);
+
+    virtual void didAttachRenderers() override;
+    virtual void willDetachRenderers() override;
+
</ins><span class="cx">     bool allowedToLoadFrameURL(const String&amp; url);
</span><span class="cx">     bool wouldLoadAsNetscapePlugin(const String&amp; url, const String&amp; serviceType);
</span><span class="cx"> 
</span><del>-    String m_serviceType;
-    String m_url;
</del><ins>+    virtual void didMoveToNewDocument(Document* oldDocument) override;
</ins><span class="cx"> 
</span><del>-private:
-    virtual bool isPlugInImageElement() const override final { return true; }
-    virtual bool isRestartedPlugin() const override final { return m_isRestartedPlugin; }
</del><ins>+    virtual void documentWillSuspendForPageCache() override;
+    virtual void documentDidResumeFromPageCache() override;
</ins><span class="cx"> 
</span><del>-    virtual void finishParsingChildren() override final;
-    virtual void didAddUserAgentShadowRoot(ShadowRoot*) override final;
</del><ins>+    virtual bool isRestartedPlugin() const override { return m_isRestartedPlugin; }
+    virtual bool requestObject(const String&amp; url, const String&amp; mimeType, const Vector&lt;String&gt;&amp; paramNames, const Vector&lt;String&gt;&amp; paramValues) override;
</ins><span class="cx"> 
</span><ins>+private:
</ins><span class="cx">     virtual RenderPtr&lt;RenderElement&gt; createElementRenderer(PassRef&lt;RenderStyle&gt;) override;
</span><del>-    virtual bool willRecalcStyle(Style::Change) override final;
-    virtual void didRecalcStyle(Style::Change styleChange) override final;
-    virtual void didAttachRenderers() override final;
-    virtual void willDetachRenderers() override final;
</del><ins>+    virtual bool willRecalcStyle(Style::Change) override;
</ins><span class="cx"> 
</span><del>-    virtual void documentWillSuspendForPageCache() override final;
-    virtual void documentDidResumeFromPageCache() override final;
</del><ins>+    virtual void didAddUserAgentShadowRoot(ShadowRoot*) override;
</ins><span class="cx"> 
</span><del>-    virtual void defaultEventHandler(Event*) override final;
-    virtual void dispatchPendingMouseClick() override final;
</del><ins>+    virtual void finishParsingChildren() override;
</ins><span class="cx"> 
</span><del>-    virtual void updateSnapshot(PassRefPtr&lt;Image&gt;) override final;
</del><ins>+    void updateWidgetIfNecessary();
+    void startLoadingImage();
</ins><span class="cx"> 
</span><del>-    void setNeedsImageReload(bool);
-    void scheduleUpdateForAfterStyleResolution();
-    void updateAfterStyleResolution();
-
</del><ins>+    virtual void updateSnapshot(PassRefPtr&lt;Image&gt;) override;
+    virtual void dispatchPendingMouseClick() override;
</ins><span class="cx">     void simulatedMouseClickTimerFired(DeferrableOneShotTimer&lt;HTMLPlugInImageElement&gt;&amp;);
</span><span class="cx"> 
</span><span class="cx">     void restartSimilarPlugIns();
</span><ins>+
+    virtual bool isPlugInImageElement() const override { return true; }
+
</ins><span class="cx">     void removeSnapshotTimerFired(Timer&lt;HTMLPlugInImageElement&gt;&amp;);
</span><span class="cx"> 
</span><del>-    std::unique_ptr&lt;HTMLImageLoader&gt; m_imageLoader;
-    URL m_loadedUrl;
</del><ins>+    virtual void defaultEventHandler(Event*) override;
+
</ins><span class="cx">     bool m_needsWidgetUpdate;
</span><del>-    bool m_needsImageReload;
</del><span class="cx">     bool m_shouldPreferPlugInsForImages;
</span><span class="cx">     bool m_needsDocumentActivationCallbacks;
</span><span class="cx">     RefPtr&lt;MouseEvent&gt; m_pendingClickEventFromSnapshot;
</span></span></pre></div>
<a id="trunkSourceWebCorestyleStyleResolveTreecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/style/StyleResolveTree.cpp (166679 => 166680)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/style/StyleResolveTree.cpp        2014-04-02 23:51:37 UTC (rev 166679)
+++ trunk/Source/WebCore/style/StyleResolveTree.cpp        2014-04-02 23:53:30 UTC (rev 166680)
</span><span class="lines">@@ -29,21 +29,20 @@
</span><span class="cx"> #include &quot;AXObjectCache.h&quot;
</span><span class="cx"> #include &quot;AnimationController.h&quot;
</span><span class="cx"> #include &quot;CSSFontSelector.h&quot;
</span><ins>+#include &quot;Element.h&quot;
</ins><span class="cx"> #include &quot;ElementIterator.h&quot;
</span><span class="cx"> #include &quot;ElementRareData.h&quot;
</span><span class="cx"> #include &quot;FlowThreadController.h&quot;
</span><span class="cx"> #include &quot;InsertionPoint.h&quot;
</span><del>-#include &quot;LoaderStrategy.h&quot;
</del><span class="cx"> #include &quot;NodeRenderStyle.h&quot;
</span><span class="cx"> #include &quot;NodeRenderingTraversal.h&quot;
</span><span class="cx"> #include &quot;NodeTraversal.h&quot;
</span><del>-#include &quot;PlatformStrategies.h&quot;
</del><ins>+#include &quot;RenderElement.h&quot;
</ins><span class="cx"> #include &quot;RenderFullScreen.h&quot;
</span><span class="cx"> #include &quot;RenderNamedFlowThread.h&quot;
</span><span class="cx"> #include &quot;RenderText.h&quot;
</span><span class="cx"> #include &quot;RenderView.h&quot;
</span><span class="cx"> #include &quot;RenderWidget.h&quot;
</span><del>-#include &quot;ResourceLoadScheduler.h&quot;
</del><span class="cx"> #include &quot;Settings.h&quot;
</span><span class="cx"> #include &quot;ShadowRoot.h&quot;
</span><span class="cx"> #include &quot;StyleResolveForDocument.h&quot;
</span><span class="lines">@@ -552,7 +551,7 @@
</span><span class="cx">     current.clearAfterPseudoElement();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static bool needsPseudoElement(Element&amp; current, PseudoId pseudoId)
</del><ins>+static bool needsPseudeElement(Element&amp; current, PseudoId pseudoId)
</ins><span class="cx"> {
</span><span class="cx">     if (!current.document().styleSheetCollection().usesBeforeAfterRules())
</span><span class="cx">         return false;
</span><span class="lines">@@ -567,7 +566,7 @@
</span><span class="cx"> 
</span><span class="cx"> static void attachBeforeOrAfterPseudoElementIfNeeded(Element&amp; current, PseudoId pseudoId, RenderTreePosition&amp; renderTreePosition)
</span><span class="cx"> {
</span><del>-    if (!needsPseudoElement(current, pseudoId))
</del><ins>+    if (!needsPseudeElement(current, pseudoId))
</ins><span class="cx">         return;
</span><span class="cx">     RefPtr&lt;PseudoElement&gt; pseudoElement = PseudoElement::create(current, pseudoId);
</span><span class="cx">     setBeforeOrAfterPseudoElement(current, pseudoElement, pseudoId);
</span><span class="lines">@@ -576,7 +575,7 @@
</span><span class="cx"> 
</span><span class="cx"> static void attachRenderTree(Element&amp; current, ContainerNode&amp; renderingParentNode, RenderTreePosition&amp; renderTreePosition, PassRefPtr&lt;RenderStyle&gt; resolvedStyle)
</span><span class="cx"> {
</span><del>-    PostResolutionCallbackDisabler callbackDisabler(current.document());
</del><ins>+    PostAttachCallbackDisabler callbackDisabler(current.document());
</ins><span class="cx">     WidgetHierarchyUpdatesSuspensionScope suspendWidgetHierarchyUpdates;
</span><span class="cx"> 
</span><span class="cx">     if (current.hasCustomStyleResolveCallbacks())
</span><span class="lines">@@ -798,7 +797,7 @@
</span><span class="cx"> static void updateBeforeOrAfterPseudoElement(Element&amp; current, Change change, PseudoId pseudoId, RenderTreePosition&amp; renderTreePosition)
</span><span class="cx"> {
</span><span class="cx">     if (PseudoElement* existingPseudoElement = beforeOrAfterPseudoElement(current, pseudoId)) {
</span><del>-        if (needsPseudoElement(current, pseudoId))
</del><ins>+        if (needsPseudeElement(current, pseudoId))
</ins><span class="cx">             resolveTree(*existingPseudoElement, current, renderTreePosition, current.needsStyleRecalc() ? Force : change);
</span><span class="cx">         else
</span><span class="cx">             clearBeforeOrAfterPseudoElement(current, pseudoId);
</span><span class="lines">@@ -965,66 +964,5 @@
</span><span class="cx">     detachRenderTree(element, NormalDetach);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static Vector&lt;std::function&lt;void ()&gt;&gt;&amp; postResolutionCallbackQueue()
-{
-    static NeverDestroyed&lt;Vector&lt;std::function&lt;void ()&gt;&gt;&gt; vector;
-    return vector;
</del><span class="cx"> }
</span><del>-
-void queuePostResolutionCallback(std::function&lt;void ()&gt; callback)
-{
-    postResolutionCallbackQueue().append(callback);
</del><span class="cx"> }
</span><del>-
-static void suspendMemoryCacheClientCalls(Document&amp; document)
-{
-    Page* page = document.page();
-    if (!page || !page-&gt;areMemoryCacheClientCallsEnabled())
-        return;
-
-    page-&gt;setMemoryCacheClientCallsEnabled(false);
-
-    RefPtr&lt;Document&gt; protectedDocument = &amp;document;
-    postResolutionCallbackQueue().append([protectedDocument]{
-        // FIXME: If the document becomes unassociated with the page during style resolution
-        // then this won't work and the memory cache client calls will be permanently disabled.
-        if (Page* page = protectedDocument-&gt;page())
-            page-&gt;setMemoryCacheClientCallsEnabled(true);
-    });
-}
-
-static unsigned resolutionNestingDepth;
-
-PostResolutionCallbackDisabler::PostResolutionCallbackDisabler(Document&amp; document)
-{
-    ++resolutionNestingDepth;
-
-    if (resolutionNestingDepth == 1)
-        platformStrategies()-&gt;loaderStrategy()-&gt;resourceLoadScheduler()-&gt;suspendPendingRequests();
-
-    // FIXME: It's strange to build this into the disabler.
-    suspendMemoryCacheClientCalls(document);
-}
-
-PostResolutionCallbackDisabler::~PostResolutionCallbackDisabler()
-{
-    if (resolutionNestingDepth == 1) {
-        // Get size each time through the loop because a callback can add more callbacks to the end of the queue.
-        auto&amp; queue = postResolutionCallbackQueue();
-        for (size_t i = 0; i &lt; queue.size(); ++i)
-            queue[i]();
-        queue.clear();
-
-        platformStrategies()-&gt;loaderStrategy()-&gt;resourceLoadScheduler()-&gt;resumePendingRequests();
-    }
-
-    --resolutionNestingDepth;
-}
-
-bool postResolutionCallbacksAreSuspended()
-{
-    return resolutionNestingDepth;
-}
-
-}
-}
</del></span></pre></div>
<a id="trunkSourceWebCorestyleStyleResolveTreeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/style/StyleResolveTree.h (166679 => 166680)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/style/StyleResolveTree.h        2014-04-02 23:51:37 UTC (rev 166679)
+++ trunk/Source/WebCore/style/StyleResolveTree.h        2014-04-02 23:53:30 UTC (rev 166680)
</span><span class="lines">@@ -26,8 +26,6 @@
</span><span class="cx"> #ifndef StyleResolveTree_h
</span><span class="cx"> #define StyleResolveTree_h
</span><span class="cx"> 
</span><del>-#include &lt;functional&gt;
-
</del><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> class Document;
</span><span class="lines">@@ -49,15 +47,6 @@
</span><span class="cx"> 
</span><span class="cx"> Change determineChange(const RenderStyle*, const RenderStyle*);
</span><span class="cx"> 
</span><del>-void queuePostResolutionCallback(std::function&lt;void ()&gt;);
-bool postResolutionCallbacksAreSuspended();
-
-class PostResolutionCallbackDisabler {
-public:
-    explicit PostResolutionCallbackDisabler(Document&amp;);
-    ~PostResolutionCallbackDisabler();
-};
-
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (166679 => 166680)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2014-04-02 23:51:37 UTC (rev 166679)
+++ trunk/Source/WebKit/mac/ChangeLog        2014-04-02 23:53:30 UTC (rev 166680)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2014-04-02  Stephanie Lewis  &lt;slewis@apple.com&gt;
+
+        Roll out http://trac.webkit.org/changeset/166144
+        &lt;rdar://problem/16481284&gt; PLT stops loading on news.google.com
+        
+        Unreviewed rollout.
+
+        Rollout 166144 since it prevents the PLT from completing.
+
+        * WebCoreSupport/WebFrameLoaderClient.mm:
+
</ins><span class="cx"> 2014-04-02  Daniel Bates  &lt;dabates@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Remove Settings::maximumDecodedImageSize()
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebCoreSupportWebFrameLoaderClientmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm (166679 => 166680)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm        2014-04-02 23:51:37 UTC (rev 166679)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm        2014-04-02 23:53:30 UTC (rev 166680)
</span><span class="lines">@@ -2100,7 +2100,8 @@
</span><span class="cx"> 
</span><span class="cx">                     if (element-&gt;hasTagName(HTMLNames::embedTag) || element-&gt;hasTagName(HTMLNames::objectTag)) {
</span><span class="cx">                         // Create a shadow subtree for the plugin element, the iframe player is injected in the shadow tree.
</span><del>-                        toHTMLPlugInImageElement(*element).createShadowIFrameSubtree(embedSrc);
</del><ins>+                        HTMLPlugInImageElement* pluginElement = static_cast&lt;HTMLPlugInImageElement*&gt;(element);
+                        pluginElement-&gt;createShadowIFrameSubtree(embedSrc);
</ins><span class="cx">                         return nullptr;
</span><span class="cx">                     }
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>