<!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
<rdar://problem/16481284> 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
<rdar://problem/16481284> 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
<rdar://problem/16481284> 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 <slewis@apple.com>
+
+ Roll out http://trac.webkit.org/changeset/166144
+ <rdar://problem/16481284> 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 <zoltan@webkit.org>
</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"> </div>
</span><span class="cx"> <embed id="viewer" src="resources/simple_blank.swf"></embed>
</span><span class="cx"> <script>
</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"> </script>
</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"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
</span><span class="cx"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
</span><span class="cx"> <body>
</span><del>-<object type="image/svg+xml" data="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" style='background: red'></object><!--
</del><ins>+<object type="image/svg+xml" data="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" style='background: red'></object>
+
+<!--
</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"> </svg>
</span><span class="cx">
</span><span class="cx"> You should see a 100 x 100 green square above. No red should be visible. &lt;object&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>---></body>
</del><ins>+-->
+
+</body>
</ins><span class="cx"> </html>
</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 <slewis@apple.com>
+
+ Roll out http://trac.webkit.org/changeset/166144
+ <rdar://problem/16481284> 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 <jinwoo7.song@samsung.com>
</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 "JSLazyEventListener.h"
</span><span class="cx"> #include "JSNode.h"
</span><span class="cx"> #include "LabelsNodeList.h"
</span><ins>+#include "LoaderStrategy.h"
+#include "MemoryCache.h"
</ins><span class="cx"> #include "MutationEvent.h"
</span><span class="cx"> #include "NameNodeList.h"
</span><span class="cx"> #include "NodeRareData.h"
</span><span class="cx"> #include "NodeRenderStyle.h"
</span><ins>+#include "PlatformStrategies.h"
</ins><span class="cx"> #include "RadioNodeList.h"
</span><span class="cx"> #include "RenderBox.h"
</span><span class="cx"> #include "RenderTheme.h"
</span><span class="lines">@@ -60,6 +63,15 @@
</span><span class="cx"> static void dispatchChildInsertionEvents(Node&);
</span><span class="cx"> static void dispatchChildRemovalEvents(Node&);
</span><span class="cx">
</span><ins>+typedef std::pair<RefPtr<Node>, unsigned> CallbackParameters;
+typedef std::pair<NodeCallback, CallbackParameters> CallbackInfo;
+typedef Vector<CallbackInfo> 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->setNeedsStyleRecalc(ReconstructRenderTree);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void ContainerNode::suspendPostAttachCallbacks(Document& 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->areMemoryCacheClientCallsEnabled()) {
+ page->setMemoryCacheClientCallsEnabled(false);
+ s_shouldReEnableMemoryCacheCallsAfterAttach = true;
+ }
+ }
+ platformStrategies()->loaderStrategy()->resourceLoadScheduler()->suspendPendingRequests();
+ }
+ ++s_attachDepth;
+}
+
+void ContainerNode::resumePostAttachCallbacks(Document& document)
+{
+ if (s_attachDepth == 1) {
+ Ref<Document> protect(document);
+
+ if (s_postAttachCallbackQueue)
+ dispatchPostAttachCallbacks();
+ if (s_shouldReEnableMemoryCacheCallsAfterAttach) {
+ s_shouldReEnableMemoryCacheCallsAfterAttach = false;
+ if (Page* page = document.page())
+ page->setMemoryCacheClientCallsEnabled(true);
+ }
+ platformStrategies()->loaderStrategy()->resourceLoadScheduler()->resumePendingRequests();
+ }
+ --s_attachDepth;
+}
+
+void ContainerNode::queuePostAttachCallback(NodeCallback callback, Node& node, unsigned callbackData)
+{
+ if (!s_postAttachCallbackQueue)
+ s_postAttachCallbackQueue = new NodeCallbackQueue;
+
+ s_postAttachCallbackQueue->append(CallbackInfo(callback, CallbackParameters(&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 < s_postAttachCallbackQueue->size(); ++i) {
+ const CallbackInfo& info = (*s_postAttachCallbackQueue)[i];
+ NodeCallback callback = info.first;
+ CallbackParameters params = info.second;
+
+ callback(*params.first, params.second);
+ }
+ s_postAttachCallbackQueue->clear();
+}
+
</ins><span class="cx"> void ContainerNode::childrenChanged(const ChildChange& 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&, ConstructionType = CreateContainer);
</span><span class="cx">
</span><ins>+ static void queuePostAttachCallback(NodeCallback, Node&, unsigned = 0);
+ static bool postAttachCallbacksAreSuspended();
+
</ins><span class="cx"> template<class GenericNode, class GenericNodeContainer>
</span><span class="cx"> friend void appendChildToContainer(GenericNode* child, GenericNodeContainer&);
</span><span class="cx">
</span><span class="lines">@@ -153,6 +157,10 @@
</span><span class="cx"> void removeBetween(Node* previousChild, Node* nextChild, Node& oldChild);
</span><span class="cx"> void insertBeforeCommon(Node& nextChild, Node& oldChild);
</span><span class="cx">
</span><ins>+ static void dispatchPostAttachCallbacks();
+ static void suspendPostAttachCallbacks(Document&);
+ static void resumePostAttachCallbacks(Document&);
+
</ins><span class="cx"> bool getUpperLeftCorner(FloatPoint&) const;
</span><span class="cx"> bool getLowerRightCorner(FloatPoint&) 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<UniqueElementData&>(*m_elementData);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+class PostAttachCallbackDisabler {
+public:
+ explicit PostAttachCallbackDisabler(Document& document)
+ : m_document(document)
+ {
+ Element::suspendPostAttachCallbacks(m_document);
+ }
+
+ ~PostAttachCallbackDisabler()
+ {
+ Element::resumePostAttachCallbacks(m_document);
+ }
+
+private:
+ Document& 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& name, const AtomicString& value)
</span><span class="cx"> {
</span><span class="cx"> if (name == typeAttr) {
</span><del>- m_serviceType = value.string().left(value.find(";")).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(";");
+ 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() && isImageType()) {
+ if (!m_imageLoader)
+ m_imageLoader = adoptPtr(new HTMLImageLoader(*this));
+ m_imageLoader->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& 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<HTMLFormControlElement> element = this;
- Style::queuePostResolutionCallback([element] {
- element->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& node, unsigned)
+{
+ if (auto renderer = toHTMLFormControlElement(node).renderer())
+ renderer->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<HTMLFormControlElement> element = this;
- Style::queuePostResolutionCallback([element]{
- if (auto* renderer = element->renderer())
- renderer->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& node, unsigned data)
+{
+ node.setNeedsStyleRecalc(static_cast<StyleChangeType>(data));
+}
+
</ins><span class="cx"> void HTMLFrameOwnerElement::scheduleSetNeedsStyleRecalc(StyleChangeType changeType)
</span><span class="cx"> {
</span><del>- if (Style::postResolutionCallbacksAreSuspended()) {
- RefPtr<HTMLFrameOwnerElement> element = this;
- Style::queuePostResolutionCallback([element, changeType]{
- element->setNeedsStyleRecalc(changeType);
- });
- } else
</del><ins>+ if (postAttachCallbacksAreSuspended())
+ queuePostAttachCallback(needsStyleRecalcCallback, *this, static_cast<unsigned>(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(";");
+ 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->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()->settings().needsSiteSpecificQuirks()
</span><span class="cx"> || hasFallbackContent()
</span><del>- || !equalIgnoringCase(fastGetAttribute(classidAttr), "clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"))
</del><ins>+ || !equalIgnoringCase(classId(), "clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"))
</ins><span class="cx"> return false;
</span><span class="cx">
</span><del>- for (auto& metaElement : descendantsOfType<HTMLMetaElement>(document())) {
</del><ins>+ RefPtr<NodeList> metaElements = document().getElementsByTagName(HTMLNames::metaTag.localName());
+ unsigned length = metaElements->length();
+ for (unsigned i = 0; i < length; ++i) {
+ HTMLMetaElement& metaElement = toHTMLMetaElement(*metaElements->item(i));
</ins><span class="cx"> if (equalIgnoringCase(metaElement.name(), "generator") && metaElement.content().startsWith("Mac OS X Server Web Services Server", 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()) && fastGetAttribute(classidAttr).startsWith("java:", false))
</del><ins>+ if (MIMETypeRegistry::isJavaAppletMIMEType(serviceType()) && classId().startsWith("java:", 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 && loader->image() && loader->image()->status() != CachedResource::LoadError) {
- m_serviceType = loader->image()->response().mimeType();
</del><ins>+ if (m_imageLoader && m_imageLoader->image() && m_imageLoader->image()->status() != CachedResource::LoadError) {
+ m_serviceType = m_imageLoader->image()->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->setImage(nullptr);
</del><ins>+ m_imageLoader->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& 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&, 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&) 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&, Document&, HTMLFormElement*, bool createdByParser);
</span><span class="cx">
</span><span class="lines">@@ -92,13 +104,7 @@
</span><span class="cx"> virtual HTMLObjectElement& asHTMLElement() override final { return *this; }
</span><span class="cx"> virtual const HTMLObjectElement& 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&, 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, &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->shadowRoot()) {
</span><del>- Node* shadowNode = shadowRoot->firstChild();
- if (shadowNode && shadowNode->isElementNode() && toElement(*shadowNode).shadowPseudoId() == "-apple-youtube-shadow-iframe")
</del><ins>+ Element* shadowElement = toElement(shadowRoot->firstChild());
+ if (shadowElement && shadowElement->shadowPseudoId() == "-apple-youtube-shadow-iframe")
</ins><span class="cx"> return createRenderer<RenderBlockFlow>(*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(&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(&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() && !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() && !useFallbackContent())) {
- RefPtr<HTMLPlugInImageElement> element = this;
- Style::queuePostResolutionCallback([element]{
- element->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 "do I have a renderer"
- // accurately until after style resolution.
</del><ins>+ if (!needsWidgetUpdate() || useFallbackContent() || isImageType())
+ return;
</ins><span class="cx">
</span><del>- if (renderer() && !useFallbackContent()) {
- if (isImageType()) {
- if (!m_imageLoader)
- m_imageLoader = std::make_unique<HTMLImageLoader>(*this);
- if (m_needsImageReload)
- m_imageLoader->updateFromElementIgnoringPreviousError();
- else
- m_imageLoader->updateFromElement();
- } else {
- if (m_needsWidgetUpdate && renderEmbeddedObject() && !renderEmbeddedObject()->isPluginUnavailable())
- updateWidget(CreateOnlyNonNetscapePlugins);
- }
- }
</del><ins>+ if (!renderEmbeddedObject() || renderEmbeddedObject()->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& 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->unregisterForPageCacheSuspensionCallbacks(this);
</del><ins>+ if (oldDocument)
+ oldDocument->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->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& node, unsigned)
+{
+ toHTMLPlugInImageElement(node).updateWidgetIfNecessary();
+}
+
+void HTMLPlugInImageElement::startLoadingImage()
+{
+ if (!m_imageLoader)
+ m_imageLoader = adoptPtr(new HTMLImageLoader(*this));
+ m_imageLoader->updateFromElement();
+}
+
+void HTMLPlugInImageElement::startLoadingImageCallback(Node& node, unsigned)
+{
+ toHTMLPlugInImageElement(node).startLoadingImage();
+}
+
</ins><span class="cx"> void HTMLPlugInImageElement::updateSnapshot(PassRefPtr<Image> image)
</span><span class="cx"> {
</span><span class="cx"> if (displayState() > DisplayingSnapshot)
</span><span class="lines">@@ -455,18 +437,18 @@
</span><span class="cx"> ShadowRoot& root = this->ensureUserAgentShadowRoot();
</span><span class="cx"> root.appendChild(shadowElement, ASSERT_NO_EXCEPTION);
</span><span class="cx">
</span><del>- RefPtr<HTMLIFrameElement> iframeElement = HTMLIFrameElement::create(iframeTag, document());
- if (hasAttribute(widthAttr))
- iframeElement->setAttribute(widthAttr, AtomicString("100%", AtomicString::ConstructFromLiteral));
- if (hasAttribute(heightAttr)) {
- iframeElement->setAttribute(styleAttr, AtomicString("max-height: 100%", AtomicString::ConstructFromLiteral));
- iframeElement->setAttribute(heightAttr, getAttribute(heightAttr));
</del><ins>+ RefPtr<HTMLIFrameElement> iframeElement = HTMLIFrameElement::create(HTMLNames::iframeTag, document());
+ if (hasAttribute(HTMLNames::widthAttr))
+ iframeElement->setAttribute(HTMLNames::widthAttr, AtomicString("100%", AtomicString::ConstructFromLiteral));
+ if (hasAttribute(HTMLNames::heightAttr)) {
+ iframeElement->setAttribute(HTMLNames::styleAttr, AtomicString("max-height: 100%", AtomicString::ConstructFromLiteral));
+ iframeElement->setAttribute(HTMLNames::heightAttr, getAttribute(HTMLNames::heightAttr));
</ins><span class="cx"> }
</span><del>- iframeElement->setAttribute(srcAttr, src);
- iframeElement->setAttribute(frameborderAttr, AtomicString("0", AtomicString::ConstructFromLiteral));
</del><ins>+ iframeElement->setAttribute(HTMLNames::srcAttr, src);
+ iframeElement->setAttribute(HTMLNames::frameborderAttr, AtomicString("0", AtomicString::ConstructFromLiteral));
</ins><span class="cx">
</span><span class="cx"> // Disable frame flattening for this iframe.
</span><del>- iframeElement->setAttribute(scrollingAttr, AtomicString("no", AtomicString::ConstructFromLiteral));
</del><ins>+ iframeElement->setAttribute(HTMLNames::scrollingAttr, AtomicString("no", AtomicString::ConstructFromLiteral));
</ins><span class="cx"> shadowElement->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)->beginSnapshottingRunningPlugin();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static inline bool is100Percent(Length length)
-{
- return length.isPercent() && length.percent() == 100;
-}
-
</del><span class="cx"> void HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn(const URL& url)
</span><span class="cx"> {
</span><span class="cx"> LOG(Plugins, "%p Plug-in URL: %s", 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& renderer = toRenderEmbeddedObject(*this->renderer());
- LayoutRect contentRect = renderer.contentBoxRect();
- int contentWidth = contentRect.width();
- int contentHeight = contentRect.height();
</del><ins>+ RenderBox* renderEmbeddedObject = toRenderBox(renderer());
+ Length styleWidth = renderEmbeddedObject->style().width();
+ Length styleHeight = renderEmbeddedObject->style().height();
+ LayoutRect contentBoxRect = renderEmbeddedObject->contentBoxRect();
+ int contentWidth = contentBoxRect.width();
+ int contentHeight = contentBoxRect.height();
+ int contentArea = contentWidth * contentHeight;
+ IntSize visibleViewSize = document().frame()->view()->visibleSize();
+ int visibleArea = visibleViewSize.width() * visibleViewSize.height();
</ins><span class="cx">
</span><del>- if (inMainFrame) {
- auto& style = renderer.style();
- bool isFullPage = is100Percent(style.width()) && is100Percent(style.height());
- IntSize visibleViewSize = document().frame()->view()->visibleSize();
- float contentArea = contentWidth * contentHeight;
- float visibleArea = visibleViewSize.width() * visibleViewSize.height();
- if (isFullPage && contentArea > visibleArea * sizingFullPageAreaRatioThreshold) {
- LOG(Plugins, "%p Plug-in is top level full page, set to play", this);
- m_snapshotDecision = NeverSnapshot;
- return;
- }
</del><ins>+ if (inMainFrame && styleWidth.isPercent() && (styleWidth.percent() == 100)
+ && styleHeight.isPercent() && (styleHeight.percent() == 100)
+ && (static_cast<float>(contentArea) / visibleArea > sizingFullPageAreaRatioThreshold)) {
+ LOG(Plugins, "%p Plug-in is top level full page, set to play", this);
+ m_snapshotDecision = NeverSnapshot;
+ return;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (contentWidth <= sizingTinyDimensionThreshold || contentHeight <= sizingTinyDimensionThreshold) {
</span><span class="cx"> LOG(Plugins, "%p Plug-in is very small %dx%d, set to play", 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, "%p Plug-in from (%s, %s) is not auto-start, sized at %dx%d, set to wait for snapshot", this, document().topDocument().baseURL().host().utf8().data(), url.host().utf8().data(), contentWidth, contentHeight);
</del><ins>+ LOG(Plugins, "%p Plug-in from (%s, %s) is not auto-start, sized at %dx%d, set to wait for snapshot", this, document().page()->mainFrame().document()->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 "HTMLPlugInElement.h"
</span><span class="cx">
</span><ins>+#include "RenderStyle.h"
+#include <wtf/OwnPtr.h>
+
</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& tagName, Document&, bool createdByParser, PreferPlugInsForImagesOption);
</span><span class="cx">
</span><del>- virtual void removedFrom(ContainerNode&) override;
- virtual void didMoveToNewDocument(Document* oldDocument) override;
- virtual bool requestObject(const String& url, const String& mimeType, const Vector<String>& paramNames, const Vector<String>& 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<HTMLImageLoader> m_imageLoader;
+ String m_serviceType;
+ String m_url;
+ URL m_loadedUrl;
+
+ static void updateWidgetCallback(Node&, unsigned);
+ static void startLoadingImageCallback(Node&, unsigned);
+
+ virtual void didAttachRenderers() override;
+ virtual void willDetachRenderers() override;
+
</ins><span class="cx"> bool allowedToLoadFrameURL(const String& url);
</span><span class="cx"> bool wouldLoadAsNetscapePlugin(const String& url, const String& 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& url, const String& mimeType, const Vector<String>& paramNames, const Vector<String>& paramValues) override;
</ins><span class="cx">
</span><ins>+private:
</ins><span class="cx"> virtual RenderPtr<RenderElement> createElementRenderer(PassRef<RenderStyle>) 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<Image>) 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<Image>) override;
+ virtual void dispatchPendingMouseClick() override;
</ins><span class="cx"> void simulatedMouseClickTimerFired(DeferrableOneShotTimer<HTMLPlugInImageElement>&);
</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<HTMLPlugInImageElement>&);
</span><span class="cx">
</span><del>- std::unique_ptr<HTMLImageLoader> 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<MouseEvent> 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 "AXObjectCache.h"
</span><span class="cx"> #include "AnimationController.h"
</span><span class="cx"> #include "CSSFontSelector.h"
</span><ins>+#include "Element.h"
</ins><span class="cx"> #include "ElementIterator.h"
</span><span class="cx"> #include "ElementRareData.h"
</span><span class="cx"> #include "FlowThreadController.h"
</span><span class="cx"> #include "InsertionPoint.h"
</span><del>-#include "LoaderStrategy.h"
</del><span class="cx"> #include "NodeRenderStyle.h"
</span><span class="cx"> #include "NodeRenderingTraversal.h"
</span><span class="cx"> #include "NodeTraversal.h"
</span><del>-#include "PlatformStrategies.h"
</del><ins>+#include "RenderElement.h"
</ins><span class="cx"> #include "RenderFullScreen.h"
</span><span class="cx"> #include "RenderNamedFlowThread.h"
</span><span class="cx"> #include "RenderText.h"
</span><span class="cx"> #include "RenderView.h"
</span><span class="cx"> #include "RenderWidget.h"
</span><del>-#include "ResourceLoadScheduler.h"
</del><span class="cx"> #include "Settings.h"
</span><span class="cx"> #include "ShadowRoot.h"
</span><span class="cx"> #include "StyleResolveForDocument.h"
</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& current, PseudoId pseudoId)
</del><ins>+static bool needsPseudeElement(Element& 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& current, PseudoId pseudoId, RenderTreePosition& 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<PseudoElement> 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& current, ContainerNode& renderingParentNode, RenderTreePosition& renderTreePosition, PassRefPtr<RenderStyle> 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& current, Change change, PseudoId pseudoId, RenderTreePosition& 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<std::function<void ()>>& postResolutionCallbackQueue()
-{
- static NeverDestroyed<Vector<std::function<void ()>>> vector;
- return vector;
</del><span class="cx"> }
</span><del>-
-void queuePostResolutionCallback(std::function<void ()> callback)
-{
- postResolutionCallbackQueue().append(callback);
</del><span class="cx"> }
</span><del>-
-static void suspendMemoryCacheClientCalls(Document& document)
-{
- Page* page = document.page();
- if (!page || !page->areMemoryCacheClientCallsEnabled())
- return;
-
- page->setMemoryCacheClientCallsEnabled(false);
-
- RefPtr<Document> protectedDocument = &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->page())
- page->setMemoryCacheClientCallsEnabled(true);
- });
-}
-
-static unsigned resolutionNestingDepth;
-
-PostResolutionCallbackDisabler::PostResolutionCallbackDisabler(Document& document)
-{
- ++resolutionNestingDepth;
-
- if (resolutionNestingDepth == 1)
- platformStrategies()->loaderStrategy()->resourceLoadScheduler()->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& queue = postResolutionCallbackQueue();
- for (size_t i = 0; i < queue.size(); ++i)
- queue[i]();
- queue.clear();
-
- platformStrategies()->loaderStrategy()->resourceLoadScheduler()->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 <functional>
-
</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<void ()>);
-bool postResolutionCallbacksAreSuspended();
-
-class PostResolutionCallbackDisabler {
-public:
- explicit PostResolutionCallbackDisabler(Document&);
- ~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 <slewis@apple.com>
+
+ Roll out http://trac.webkit.org/changeset/166144
+ <rdar://problem/16481284> 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 <dabates@apple.com>
</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->hasTagName(HTMLNames::embedTag) || element->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<HTMLPlugInImageElement*>(element);
+ pluginElement->createShadowIFrameSubtree(embedSrc);
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>