<!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>[167401] 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/167401">167401</a></dd>
<dt>Author</dt> <dd>roger_fong@apple.com</dd>
<dt>Date</dt> <dd>2014-04-16 16:53:59 -0700 (Wed, 16 Apr 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Add a way for layout tests to determine whether or not a plugin is snapshotted.
https://bugs.webkit.org/show_bug.cgi?id=131650.
<rdar://problem/16615528>
Reviewed by Dean Jackson.
* testing/Internals.cpp:
(WebCore::Internals::isPluginSnapshotted):
* testing/Internals.h:
* testing/Internals.idl:
Adjust simple.html accordingly, more snapshotting test changes to come.
* platform/mac-wk2/plugins/snapshotting/simple-expected.txt:
* plugins/snapshotting/simple.html:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2pluginssnapshottingsimpleexpectedtxt">trunk/LayoutTests/platform/mac-wk2/plugins/snapshotting/simple-expected.txt</a></li>
<li><a href="#trunkLayoutTestspluginssnapshottingsimplehtml">trunk/LayoutTests/plugins/snapshotting/simple.html</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoretestingInternalscpp">trunk/Source/WebCore/testing/Internals.cpp</a></li>
<li><a href="#trunkSourceWebCoretestingInternalsh">trunk/Source/WebCore/testing/Internals.h</a></li>
<li><a href="#trunkSourceWebCoretestingInternalsidl">trunk/Source/WebCore/testing/Internals.idl</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (167400 => 167401)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-04-16 23:50:25 UTC (rev 167400)
+++ trunk/LayoutTests/ChangeLog        2014-04-16 23:53:59 UTC (rev 167401)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2014-04-16 Roger Fong <roger_fong@apple.com>
+
+ Add a way for layout tests to determine whether or not a plugin is snapshotted.
+ https://bugs.webkit.org/show_bug.cgi?id=131650.
+ <rdar://problem/16615528>
+
+ Reviewed by Dean Jackson.
+
+ Adjust simple.html accordingly, more snapshotting test changes to come.
+ * platform/mac-wk2/plugins/snapshotting/simple-expected.txt:
+ * plugins/snapshotting/simple.html:
+
</ins><span class="cx"> 2014-04-16 Oliver Hunt <oliver@apple.com>
</span><span class="cx">
</span><span class="cx"> Simple ES6 feature:Array.prototype.fill
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2pluginssnapshottingsimpleexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-wk2/plugins/snapshotting/simple-expected.txt (167400 => 167401)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/plugins/snapshotting/simple-expected.txt        2014-04-16 23:50:25 UTC (rev 167400)
+++ trunk/LayoutTests/platform/mac-wk2/plugins/snapshotting/simple-expected.txt        2014-04-16 23:53:59 UTC (rev 167401)
</span><span class="lines">@@ -1,23 +1,5 @@
</span><del>-layer at (0,0) size 800x600
- RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
- RenderBlock {HTML} at (0,0) size 800x600
- RenderBody {BODY} at (8,8) size 784x584
- RenderBlock {P} at (0,0) size 784x18
- RenderText {#text} at (0,0) size 306x18
- text run at (0,0) width 306: "This test forces a plugin to snapshot immediately"
- RenderBlock (anonymous) at (0,34) size 784x150
- RenderSnapshottedPlugIn {EMBED} at (0,0) size 300x150
- RenderText {#text} at (0,0) size 0x0
-layer at (8,42) size 300x150
- RenderBlock (relative positioned) {DIV} at (0,0) size 300x150
-layer at (8,42) size 300x150
- RenderBlock (positioned) {DIV} at (0,0) size 300x150
-layer at (24,58) size 203x44
- RenderBlock (positioned) {DIV} at (16,16) size 203x44 [bgcolor=#FFFFFF]
- RenderBlock {DIV} at (32,4) size 139x18
- RenderText {#text} at (0,0) size 139x18
- text run at (0,0) width 139: "Snapshotted Plug-In"
- RenderBlock {DIV} at (32,22) size 139x18 [color=#444444]
- RenderText {#text} at (22,0) size 95x18
- text run at (22,0) width 95: "Click to restart"
</del><ins>+This test forces a plugin to snapshot immediately
+
+FAIL
+
+
</ins></span></pre></div>
<a id="trunkLayoutTestspluginssnapshottingsimplehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/plugins/snapshotting/simple.html (167400 => 167401)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/plugins/snapshotting/simple.html        2014-04-16 23:50:25 UTC (rev 167400)
+++ trunk/LayoutTests/plugins/snapshotting/simple.html        2014-04-16 23:53:59 UTC (rev 167401)
</span><span class="lines">@@ -1,12 +1,18 @@
</span><span class="cx"> <p>This test forces a plugin to snapshot immediately</p>
</span><ins>+<p id="passStatus">PASS</p>
</ins><span class="cx"> <script>
</span><span class="cx"> if (window.testRunner) {
</span><span class="cx"> window.internals.settings.setPlugInSnapshottingEnabled(true);
</span><span class="cx"> window.internals.settings.setMaximumPlugInSnapshotAttempts(0);
</span><span class="cx"> testRunner.waitUntilDone();
</span><ins>+ testRunner.dumpAsText();
</ins><span class="cx"> setTimeout(function () {
</span><ins>+ var plugin = document.getElementById("plugin");
+ var passStatus = document.getElementById("passStatus");
+ if (!window.internals.isPluginSnapshotted(plugin))
+ passStatus.innerHTML = "FAIL";
</ins><span class="cx"> testRunner.notifyDone();
</span><span class="cx"> }, 500);
</span><span class="cx"> }
</span><span class="cx"> </script>
</span><del>-<embed src="../resources/lines.swf"></embed>
</del><ins>+<embed id="plugin" src="../resources/lines.swf"></embed>
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (167400 => 167401)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-04-16 23:50:25 UTC (rev 167400)
+++ trunk/Source/WebCore/ChangeLog        2014-04-16 23:53:59 UTC (rev 167401)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2014-04-16 Roger Fong <roger_fong@apple.com>
+
+ Add a way for layout tests to determine whether or not a plugin is snapshotted.
+ https://bugs.webkit.org/show_bug.cgi?id=131650.
+ <rdar://problem/16615528>
+
+ Reviewed by Dean Jackson.
+
+ * testing/Internals.cpp:
+ (WebCore::Internals::isPluginSnapshotted):
+ * testing/Internals.h:
+ * testing/Internals.idl:
+
</ins><span class="cx"> 2014-04-16 Zoltan Horvath <zoltan@webkit.org>
</span><span class="cx">
</span><span class="cx"> Vanish unnecessary includes from Shapes.{h|cpp}
</span><span class="lines">@@ -15461,7 +15474,6 @@
</span><span class="cx"> * platform/ios/WebSafeGCActivityCallbackIOS.h: Update WebSafeGCActivityCallback
</span><span class="cx"> appropriately for the introduction of another type of GCActivityCallback.
</span><span class="cx">
</span><del>-<<<<<<< .mine
</del><span class="cx"> 2014-03-18 Mark Hahnenberg <mhahnenberg@apple.com>
</span><span class="cx">
</span><span class="cx"> GC timer should intelligently choose between EdenCollections and FullCollections
</span><span class="lines">@@ -16572,7 +16584,6 @@
</span><span class="cx"> (WebCore::RTCPeerConnection::hasLocalStreamWithTrackId):
</span><span class="cx"> * Modules/mediastream/RTCPeerConnection.h:
</span><span class="cx">
</span><del>->>>>>>> .r165925
</del><span class="cx"> 2014-03-18 Commit Queue <commit-queue@webkit.org>
</span><span class="cx">
</span><span class="cx"> Unreviewed, rolling out r165815.
</span></span></pre></div>
<a id="trunkSourceWebCoretestingInternalscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/Internals.cpp (167400 => 167401)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/Internals.cpp        2014-04-16 23:50:25 UTC (rev 167400)
+++ trunk/Source/WebCore/testing/Internals.cpp        2014-04-16 23:53:59 UTC (rev 167401)
</span><span class="lines">@@ -52,6 +52,7 @@
</span><span class="cx"> #include "FrameView.h"
</span><span class="cx"> #include "HTMLInputElement.h"
</span><span class="cx"> #include "HTMLNames.h"
</span><ins>+#include "HTMLPlugInElement.h"
</ins><span class="cx"> #include "HTMLSelectElement.h"
</span><span class="cx"> #include "HTMLTextAreaElement.h"
</span><span class="cx"> #include "HistoryController.h"
</span><span class="lines">@@ -2214,7 +2215,17 @@
</span><span class="cx"> RenderEmbeddedObject* embed = toRenderEmbeddedObject(renderer);
</span><span class="cx"> return embed->isReplacementObscured();
</span><span class="cx"> }
</span><del>-
</del><ins>+
+bool Internals::isPluginSnapshotted(Element* element, ExceptionCode& ec)
+{
+ if (!element) {
+ ec = INVALID_ACCESS_ERR;
+ return false;
+ }
+ HTMLPlugInElement* pluginElement = toHTMLPlugInElement(element);
+ return pluginElement->displayState() <= HTMLPlugInElement::DisplayingSnapshot;
+}
+
</ins><span class="cx"> #if ENABLE(MEDIA_SOURCE)
</span><span class="cx"> void Internals::initializeMockMediaSource()
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCoretestingInternalsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/Internals.h (167400 => 167401)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/Internals.h        2014-04-16 23:50:25 UTC (rev 167400)
+++ trunk/Source/WebCore/testing/Internals.h        2014-04-16 23:53:59 UTC (rev 167401)
</span><span class="lines">@@ -322,6 +322,7 @@
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> bool isPluginUnavailabilityIndicatorObscured(Element*, ExceptionCode&);
</span><ins>+ bool isPluginSnapshotted(Element*, ExceptionCode&);
</ins><span class="cx">
</span><span class="cx"> #if ENABLE(MEDIA_SOURCE)
</span><span class="cx"> void initializeMockMediaSource();
</span></span></pre></div>
<a id="trunkSourceWebCoretestingInternalsidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/Internals.idl (167400 => 167401)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/Internals.idl        2014-04-16 23:50:25 UTC (rev 167400)
+++ trunk/Source/WebCore/testing/Internals.idl        2014-04-16 23:53:59 UTC (rev 167401)
</span><span class="lines">@@ -271,6 +271,7 @@
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> [RaisesException] boolean isPluginUnavailabilityIndicatorObscured(Element element);
</span><ins>+ [RaisesException] boolean isPluginSnapshotted(Element element);
</ins><span class="cx">
</span><span class="cx"> [RaisesException] ClientRect selectionBounds();
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>