<!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>[190009] 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/190009">190009</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2015-09-18 21:48:54 -0700 (Fri, 18 Sep 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Unreviewed, rolling out <a href="http://trac.webkit.org/projects/webkit/changeset/189908">r189908</a>.
https://bugs.webkit.org/show_bug.cgi?id=149368

Broke run-webkit-tests --pixel (Requested by ap on #webkit).

Reverted changeset:

&quot;printing does not use minimum page zoom factor&quot;
https://bugs.webkit.org/show_bug.cgi?id=108507
http://trac.webkit.org/changeset/189908</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsplatformgtkTestExpectations">trunk/LayoutTests/platform/gtk/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2TestExpectations">trunk/LayoutTests/platform/mac-wk2/TestExpectations</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorepagePrintContextcpp">trunk/Source/WebCore/page/PrintContext.cpp</a></li>
<li><a href="#trunkSourceWebCorepagePrintContexth">trunk/Source/WebCore/page/PrintContext.h</a></li>
<li><a href="#trunkSourceWebCoretestingInternalscpp">trunk/Source/WebCore/testing/Internals.cpp</a></li>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacMiscWebCoreStatisticsmm">trunk/Source/WebKit/mac/Misc/WebCoreStatistics.mm</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2SharedAPIcWKImageh">trunk/Source/WebKit2/Shared/API/c/WKImage.h</a></li>
<li><a href="#trunkSourceWebKit2SharedAPIcWKSharedAPICasth">trunk/Source/WebKit2/Shared/API/c/WKSharedAPICast.h</a></li>
<li><a href="#trunkSourceWebKit2SharedImageOptionsh">trunk/Source/WebKit2/Shared/ImageOptions.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessInjectedBundleInjectedBundlecpp">trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagecpp">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundleInjectedBundlePagecpp">trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp</a></li>
<li><a href="#trunkToolsWebKitTestRunnerTestInvocationcpp">trunk/Tools/WebKitTestRunner/TestInvocation.cpp</a></li>
<li><a href="#trunkToolsWebKitTestRunnerTestInvocationh">trunk/Tools/WebKitTestRunner/TestInvocation.h</a></li>
<li><a href="#trunkToolsWebKitTestRunnercairoTestInvocationCairocpp">trunk/Tools/WebKitTestRunner/cairo/TestInvocationCairo.cpp</a></li>
<li><a href="#trunkToolsWebKitTestRunnercgTestInvocationCGcpp">trunk/Tools/WebKitTestRunner/cg/TestInvocationCG.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (190008 => 190009)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-09-19 04:18:27 UTC (rev 190008)
+++ trunk/LayoutTests/ChangeLog        2015-09-19 04:48:54 UTC (rev 190009)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2015-09-18  Commit Queue  &lt;commit-queue@webkit.org&gt;
+
+        Unreviewed, rolling out r189908.
+        https://bugs.webkit.org/show_bug.cgi?id=149368
+
+        Broke run-webkit-tests --pixel (Requested by ap on #webkit).
+
+        Reverted changeset:
+
+        &quot;printing does not use minimum page zoom factor&quot;
+        https://bugs.webkit.org/show_bug.cgi?id=108507
+        http://trac.webkit.org/changeset/189908
+
</ins><span class="cx"> 2015-09-18  Ryosuke Niwa  &lt;rniwa@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Inserting or removing slot elements can cause a crash
</span></span></pre></div>
<a id="trunkLayoutTestsplatformgtkTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/gtk/TestExpectations (190008 => 190009)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/gtk/TestExpectations        2015-09-19 04:18:27 UTC (rev 190008)
+++ trunk/LayoutTests/platform/gtk/TestExpectations        2015-09-19 04:48:54 UTC (rev 190009)
</span><span class="lines">@@ -2406,6 +2406,10 @@
</span><span class="cx"> 
</span><span class="cx"> webkit.org/b/143924 fast/text/hyphen-min-preferred-width.html [ Skip ]
</span><span class="cx"> 
</span><ins>+webkit.org/b/144494 printing/quirks-percentage-height-body.html [ ImageOnlyFailure ]
+webkit.org/b/144494 printing/quirks-percentage-height.html [ ImageOnlyFailure ]
+webkit.org/b/144494 printing/standards-percentage-heights.html [ ImageOnlyFailure ]
+
</ins><span class="cx"> webkit.org/b/144575 http/tests/loading/promote-img-preload-priority.html [ Failure ]
</span><span class="cx"> 
</span><span class="cx"> webkit.org/b/144673 fast/forms/button-line-height.html [ ImageOnlyFailure ]
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2TestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-wk2/TestExpectations (190008 => 190009)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/TestExpectations        2015-09-19 04:18:27 UTC (rev 190008)
+++ trunk/LayoutTests/platform/mac-wk2/TestExpectations        2015-09-19 04:48:54 UTC (rev 190009)
</span><span class="lines">@@ -196,6 +196,10 @@
</span><span class="cx"> 
</span><span class="cx"> webkit.org/b/105960 plugins/navigator-plugins.html [ Failure ]
</span><span class="cx"> 
</span><ins>+webkit.org/b/108507 printing/quirks-percentage-height-body.html [ Skip ]
+webkit.org/b/108507 printing/quirks-percentage-height.html [ Skip ]
+webkit.org/b/108507 printing/standards-percentage-heights.html [ Skip ]
+
</ins><span class="cx"> webkit.org/b/104954 http/tests/canvas/canvas-slow-font-loading.html [ ImageOnlyFailure ]
</span><span class="cx"> 
</span><span class="cx"> # Flaky everywhere.
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (190008 => 190009)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-09-19 04:18:27 UTC (rev 190008)
+++ trunk/Source/WebCore/ChangeLog        2015-09-19 04:48:54 UTC (rev 190009)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2015-09-18  Commit Queue  &lt;commit-queue@webkit.org&gt;
+
+        Unreviewed, rolling out r189908.
+        https://bugs.webkit.org/show_bug.cgi?id=149368
+
+        Broke run-webkit-tests --pixel (Requested by ap on #webkit).
+
+        Reverted changeset:
+
+        &quot;printing does not use minimum page zoom factor&quot;
+        https://bugs.webkit.org/show_bug.cgi?id=108507
+        http://trac.webkit.org/changeset/189908
+
</ins><span class="cx"> 2015-09-18  Ryosuke Niwa  &lt;rniwa@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Inserting or removing slot elements can cause a crash
</span></span></pre></div>
<a id="trunkSourceWebCorepagePrintContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/PrintContext.cpp (190008 => 190009)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PrintContext.cpp        2015-09-19 04:18:27 UTC (rev 190008)
+++ trunk/Source/WebCore/page/PrintContext.cpp        2015-09-19 04:48:54 UTC (rev 190009)
</span><span class="lines">@@ -301,37 +301,33 @@
</span><span class="cx">            String::number(marginTop) + ' ' + String::number(marginRight) + ' ' + String::number(marginBottom) + ' ' + String::number(marginLeft);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool PrintContext::beginAndComputePageRectsWithPageSize(Frame&amp; frame, const FloatSize&amp; pageSizeInPixels)
</del><ins>+int PrintContext::numberOfPages(Frame* frame, const FloatSize&amp; pageSizeInPixels)
</ins><span class="cx"> {
</span><del>-    if (!frame.document() || !frame.view() || !frame.document()-&gt;renderView())
-        return false;
</del><ins>+    frame-&gt;document()-&gt;updateLayout();
</ins><span class="cx"> 
</span><del>-    frame.document()-&gt;updateLayout();
-
-    begin(pageSizeInPixels.width(), pageSizeInPixels.height());
</del><ins>+    FloatRect pageRect(FloatPoint(0, 0), pageSizeInPixels);
+    PrintContext printContext(frame);
+    printContext.begin(pageRect.width(), pageRect.height());
</ins><span class="cx">     // Account for shrink-to-fit.
</span><span class="cx">     FloatSize scaledPageSize = pageSizeInPixels;
</span><del>-    scaledPageSize.scale(frame.view()-&gt;contentsSize().width() / pageSizeInPixels.width());
-    computePageRectsWithPageSize(scaledPageSize, false);
-
-    return true;
-}
-
-int PrintContext::numberOfPages(Frame&amp; frame, const FloatSize&amp; pageSizeInPixels)
-{
-    PrintContext printContext(&amp;frame);
-    if (!printContext.beginAndComputePageRectsWithPageSize(frame, pageSizeInPixels))
-        return -1;
-
</del><ins>+    scaledPageSize.scale(frame-&gt;view()-&gt;contentsSize().width() / pageRect.width());
+    printContext.computePageRectsWithPageSize(scaledPageSize, false);
</ins><span class="cx">     return printContext.pageCount();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void PrintContext::spoolAllPagesWithBoundaries(Frame&amp; frame, GraphicsContext&amp; graphicsContext, const FloatSize&amp; pageSizeInPixels)
</del><ins>+void PrintContext::spoolAllPagesWithBoundaries(Frame* frame, GraphicsContext&amp; graphicsContext, const FloatSize&amp; pageSizeInPixels)
</ins><span class="cx"> {
</span><del>-    PrintContext printContext(&amp;frame);
-    if (!printContext.beginAndComputePageRectsWithPageSize(frame, pageSizeInPixels))
</del><ins>+    if (!frame-&gt;document() || !frame-&gt;view() || !frame-&gt;document()-&gt;renderView())
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><ins>+    frame-&gt;document()-&gt;updateLayout();
+
+    PrintContext printContext(frame);
+    printContext.begin(pageSizeInPixels.width(), pageSizeInPixels.height());
+
+    float pageHeight;
+    printContext.computePageRects(FloatRect(FloatPoint(0, 0), pageSizeInPixels), 0, 0, 1, pageHeight);
+
</ins><span class="cx">     const float pageWidth = pageSizeInPixels.width();
</span><span class="cx">     const Vector&lt;IntRect&gt;&amp; pageRects = printContext.pageRects();
</span><span class="cx">     int totalHeight = pageRects.size() * (pageSizeInPixels.height() + 1) - 1;
</span><span class="lines">@@ -341,24 +337,18 @@
</span><span class="cx">     graphicsContext.fillRect(FloatRect(0, 0, pageWidth, totalHeight));
</span><span class="cx"> 
</span><span class="cx">     graphicsContext.save();
</span><del>-#if PLATFORM(COCOA)
</del><span class="cx">     graphicsContext.translate(0, totalHeight);
</span><span class="cx">     graphicsContext.scale(FloatSize(1, -1));
</span><del>-#endif
</del><span class="cx"> 
</span><span class="cx">     int currentHeight = 0;
</span><span class="cx">     for (size_t pageIndex = 0; pageIndex &lt; pageRects.size(); pageIndex++) {
</span><span class="cx">         // Draw a line for a page boundary if this isn't the first page.
</span><span class="cx">         if (pageIndex &gt; 0) {
</span><del>-#if PLATFORM(COCOA)
-            int boundaryLineY = currentHeight;
-#else
-            int boundaryLineY = currentHeight - 1;
-#endif
</del><span class="cx">             graphicsContext.save();
</span><span class="cx">             graphicsContext.setStrokeColor(Color(0, 0, 255), ColorSpaceDeviceRGB);
</span><span class="cx">             graphicsContext.setFillColor(Color(0, 0, 255), ColorSpaceDeviceRGB);
</span><del>-            graphicsContext.drawLine(IntPoint(0, boundaryLineY), IntPoint(pageWidth, boundaryLineY));
</del><ins>+            graphicsContext.drawLine(IntPoint(0, currentHeight),
+                                     IntPoint(pageWidth, currentHeight));
</ins><span class="cx">             graphicsContext.restore();
</span><span class="cx">         }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorepagePrintContexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/PrintContext.h (190008 => 190009)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PrintContext.h        2015-09-19 04:18:27 UTC (rev 190008)
+++ trunk/Source/WebCore/page/PrintContext.h        2015-09-19 04:48:54 UTC (rev 190009)
</span><span class="lines">@@ -73,11 +73,11 @@
</span><span class="cx">     WEBCORE_EXPORT static String pageProperty(Frame*, const char* propertyName, int pageNumber);
</span><span class="cx">     WEBCORE_EXPORT static bool isPageBoxVisible(Frame*, int pageNumber);
</span><span class="cx">     WEBCORE_EXPORT static String pageSizeAndMarginsInPixels(Frame*, int pageNumber, int width, int height, int marginTop, int marginRight, int marginBottom, int marginLeft);
</span><del>-    WEBCORE_EXPORT static int numberOfPages(Frame&amp;, const FloatSize&amp; pageSizeInPixels);
</del><ins>+    WEBCORE_EXPORT static int numberOfPages(Frame*, const FloatSize&amp; pageSizeInPixels);
</ins><span class="cx">     // Draw all pages into a graphics context with lines which mean page boundaries.
</span><span class="cx">     // The height of the graphics context should be
</span><span class="cx">     // (pageSizeInPixels.height() + 1) * number-of-pages - 1
</span><del>-    WEBCORE_EXPORT static void spoolAllPagesWithBoundaries(Frame&amp;, GraphicsContext&amp;, const FloatSize&amp; pageSizeInPixels);
</del><ins>+    WEBCORE_EXPORT static void spoolAllPagesWithBoundaries(Frame*, GraphicsContext&amp;, const FloatSize&amp; pageSizeInPixels);
</ins><span class="cx"> 
</span><span class="cx"> protected:
</span><span class="cx">     Frame* m_frame;
</span><span class="lines">@@ -85,7 +85,6 @@
</span><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     void computePageRectsWithPageSizeInternal(const FloatSize&amp; pageSizeInPixels, bool allowHorizontalTiling);
</span><del>-    bool beginAndComputePageRectsWithPageSize(Frame&amp;, const FloatSize&amp; pageSizeInPixels);
</del><span class="cx"> 
</span><span class="cx">     // Used to prevent misuses of begin() and end() (e.g., call end without begin).
</span><span class="cx">     bool m_isPrinting;
</span></span></pre></div>
<a id="trunkSourceWebCoretestingInternalscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/Internals.cpp (190008 => 190009)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/Internals.cpp        2015-09-19 04:18:27 UTC (rev 190008)
+++ trunk/Source/WebCore/testing/Internals.cpp        2015-09-19 04:48:54 UTC (rev 190009)
</span><span class="lines">@@ -1989,7 +1989,7 @@
</span><span class="cx">     if (!frame())
</span><span class="cx">         return -1;
</span><span class="cx"> 
</span><del>-    return PrintContext::numberOfPages(*frame(), FloatSize(pageWidth, pageHeight));
</del><ins>+    return PrintContext::numberOfPages(frame(), FloatSize(pageWidth, pageHeight));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> String Internals::pageProperty(String propertyName, int pageNumber, ExceptionCode&amp; ec) const
</span></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (190008 => 190009)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2015-09-19 04:18:27 UTC (rev 190008)
+++ trunk/Source/WebKit/mac/ChangeLog        2015-09-19 04:48:54 UTC (rev 190009)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2015-09-18  Commit Queue  &lt;commit-queue@webkit.org&gt;
+
+        Unreviewed, rolling out r189908.
+        https://bugs.webkit.org/show_bug.cgi?id=149368
+
+        Broke run-webkit-tests --pixel (Requested by ap on #webkit).
+
+        Reverted changeset:
+
+        &quot;printing does not use minimum page zoom factor&quot;
+        https://bugs.webkit.org/show_bug.cgi?id=108507
+        http://trac.webkit.org/changeset/189908
+
</ins><span class="cx"> 2015-09-17  Brian Burg  &lt;bburg@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         ASSERT(!m_frontendRouter-&gt;hasLocalFrontend()) when running Web Inspector tests
</span></span></pre></div>
<a id="trunkSourceWebKitmacMiscWebCoreStatisticsmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/Misc/WebCoreStatistics.mm (190008 => 190009)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/Misc/WebCoreStatistics.mm        2015-09-19 04:18:27 UTC (rev 190008)
+++ trunk/Source/WebKit/mac/Misc/WebCoreStatistics.mm        2015-09-19 04:48:54 UTC (rev 190009)
</span><span class="lines">@@ -276,11 +276,7 @@
</span><span class="cx"> 
</span><span class="cx"> - (int)numberOfPagesWithPageWidth:(float)pageWidthInPixels pageHeight:(float)pageHeightInPixels
</span><span class="cx"> {
</span><del>-    Frame* coreFrame = _private-&gt;coreFrame;
-    if (!coreFrame)
-        return -1;
-
-    return PrintContext::numberOfPages(*coreFrame, FloatSize(pageWidthInPixels, pageHeightInPixels));
</del><ins>+    return PrintContext::numberOfPages(_private-&gt;coreFrame, FloatSize(pageWidthInPixels, pageHeightInPixels));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)printToCGContext:(CGContextRef)cgContext pageWidth:(float)pageWidthInPixels pageHeight:(float)pageHeightInPixels
</span><span class="lines">@@ -290,7 +286,7 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     GraphicsContext graphicsContext(cgContext);
</span><del>-    PrintContext::spoolAllPagesWithBoundaries(*coreFrame, graphicsContext, FloatSize(pageWidthInPixels, pageHeightInPixels));
</del><ins>+    PrintContext::spoolAllPagesWithBoundaries(coreFrame, graphicsContext, FloatSize(pageWidthInPixels, pageHeightInPixels));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> @end
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (190008 => 190009)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2015-09-19 04:18:27 UTC (rev 190008)
+++ trunk/Source/WebKit2/ChangeLog        2015-09-19 04:48:54 UTC (rev 190009)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2015-09-18  Commit Queue  &lt;commit-queue@webkit.org&gt;
+
+        Unreviewed, rolling out r189908.
+        https://bugs.webkit.org/show_bug.cgi?id=149368
+
+        Broke run-webkit-tests --pixel (Requested by ap on #webkit).
+
+        Reverted changeset:
+
+        &quot;printing does not use minimum page zoom factor&quot;
+        https://bugs.webkit.org/show_bug.cgi?id=108507
+        http://trac.webkit.org/changeset/189908
+
</ins><span class="cx"> 2015-09-18  Andy Estes  &lt;aestes@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [iOS] did{Start,Finish}LoadForQuickLookDocumentInMainFrame is never called on WKNavigationDelegate
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedAPIcWKImageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/API/c/WKImage.h (190008 => 190009)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/API/c/WKImage.h        2015-09-19 04:18:27 UTC (rev 190008)
+++ trunk/Source/WebKit2/Shared/API/c/WKImage.h        2015-09-19 04:48:54 UTC (rev 190009)
</span><span class="lines">@@ -45,7 +45,6 @@
</span><span class="cx">     kWKSnapshotOptionsPaintSelectionRectangle = 1 &lt;&lt; 3,
</span><span class="cx">     kWKSnapshotOptionsForceBlackText = 1 &lt;&lt; 4,
</span><span class="cx">     kWKSnapshotOptionsForceWhiteText = 1 &lt;&lt; 5,
</span><del>-    kWKSnapshotOptionsPrinting = 1 &lt;&lt; 6,
</del><span class="cx"> };
</span><span class="cx"> typedef uint32_t WKSnapshotOptions;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedAPIcWKSharedAPICasth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/API/c/WKSharedAPICast.h (190008 => 190009)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/API/c/WKSharedAPICast.h        2015-09-19 04:18:27 UTC (rev 190008)
+++ trunk/Source/WebKit2/Shared/API/c/WKSharedAPICast.h        2015-09-19 04:48:54 UTC (rev 190009)
</span><span class="lines">@@ -951,8 +951,6 @@
</span><span class="cx">         snapshotOptions |= SnapshotOptionsForceBlackText;
</span><span class="cx">     if (wkSnapshotOptions &amp; kWKSnapshotOptionsForceWhiteText)
</span><span class="cx">         snapshotOptions |= SnapshotOptionsForceWhiteText;
</span><del>-    if (wkSnapshotOptions &amp; kWKSnapshotOptionsPrinting)
-        snapshotOptions |= SnapshotOptionsPrinting;
</del><span class="cx"> 
</span><span class="cx">     return snapshotOptions;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedImageOptionsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/ImageOptions.h (190008 => 190009)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/ImageOptions.h        2015-09-19 04:18:27 UTC (rev 190008)
+++ trunk/Source/WebKit2/Shared/ImageOptions.h        2015-09-19 04:48:54 UTC (rev 190009)
</span><span class="lines">@@ -40,7 +40,6 @@
</span><span class="cx">     SnapshotOptionsExcludeDeviceScaleFactor = 1 &lt;&lt; 5,
</span><span class="cx">     SnapshotOptionsForceBlackText = 1 &lt;&lt; 6,
</span><span class="cx">     SnapshotOptionsForceWhiteText = 1 &lt;&lt; 7,
</span><del>-    SnapshotOptionsPrinting = 1 &lt;&lt; 8,
</del><span class="cx"> };
</span><span class="cx"> typedef uint32_t SnapshotOptions;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessInjectedBundleInjectedBundlecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp (190008 => 190009)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp        2015-09-19 04:18:27 UTC (rev 190008)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp        2015-09-19 04:48:54 UTC (rev 190009)
</span><span class="lines">@@ -407,7 +407,7 @@
</span><span class="cx">     if (!pageHeightInPixels)
</span><span class="cx">         pageHeightInPixels = coreFrame-&gt;view()-&gt;height();
</span><span class="cx"> 
</span><del>-    return PrintContext::numberOfPages(*coreFrame, FloatSize(pageWidthInPixels, pageHeightInPixels));
</del><ins>+    return PrintContext::numberOfPages(coreFrame, FloatSize(pageWidthInPixels, pageHeightInPixels));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> int InjectedBundle::pageNumberForElementById(WebFrame* frame, const String&amp; id, double pageWidthInPixels, double pageHeightInPixels)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (190008 => 190009)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2015-09-19 04:18:27 UTC (rev 190008)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2015-09-19 04:48:54 UTC (rev 190009)
</span><span class="lines">@@ -1711,18 +1711,10 @@
</span><span class="cx"> {
</span><span class="cx">     IntRect snapshotRect = rect;
</span><span class="cx">     IntSize bitmapSize = snapshotRect.size();
</span><del>-    if (options &amp; SnapshotOptionsPrinting) {
-        ASSERT(additionalScaleFactor == 1);
-        Frame* coreFrame = m_mainFrame-&gt;coreFrame();
-        if (!coreFrame)
-            return nullptr;
-        bitmapSize.setHeight(PrintContext::numberOfPages(*coreFrame, bitmapSize) * (bitmapSize.height() + 1) - 1);
-    } else {
-        double scaleFactor = additionalScaleFactor;
-        if (!(options &amp; SnapshotOptionsExcludeDeviceScaleFactor))
-            scaleFactor *= corePage()-&gt;deviceScaleFactor();
-        bitmapSize.scale(scaleFactor);
-    }
</del><ins>+    double scaleFactor = additionalScaleFactor;
+    if (!(options &amp; SnapshotOptionsExcludeDeviceScaleFactor))
+        scaleFactor *= corePage()-&gt;deviceScaleFactor();
+    bitmapSize.scale(scaleFactor);
</ins><span class="cx"> 
</span><span class="cx">     return snapshotAtSize(rect, bitmapSize, options);
</span><span class="cx"> }
</span><span class="lines">@@ -1748,11 +1740,6 @@
</span><span class="cx"> 
</span><span class="cx">     auto graphicsContext = snapshot-&gt;bitmap()-&gt;createGraphicsContext();
</span><span class="cx"> 
</span><del>-    if (options &amp; SnapshotOptionsPrinting) {
-        PrintContext::spoolAllPagesWithBoundaries(*coreFrame, *graphicsContext, snapshotRect.size());
-        return snapshot.release();
-    }
-
</del><span class="cx">     Color documentBackgroundColor = frameView-&gt;documentBackgroundColor();
</span><span class="cx">     Color backgroundColor = (coreFrame-&gt;settings().backgroundShouldExtendBeyondPage() &amp;&amp; documentBackgroundColor.isValid()) ? documentBackgroundColor : frameView-&gt;baseBackgroundColor();
</span><span class="cx">     graphicsContext-&gt;fillRect(IntRect(IntPoint(), bitmapSize), backgroundColor, ColorSpaceDeviceRGB);
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (190008 => 190009)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2015-09-19 04:18:27 UTC (rev 190008)
+++ trunk/Tools/ChangeLog        2015-09-19 04:48:54 UTC (rev 190009)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2015-09-18  Commit Queue  &lt;commit-queue@webkit.org&gt;
+
+        Unreviewed, rolling out r189908.
+        https://bugs.webkit.org/show_bug.cgi?id=149368
+
+        Broke run-webkit-tests --pixel (Requested by ap on #webkit).
+
+        Reverted changeset:
+
+        &quot;printing does not use minimum page zoom factor&quot;
+        https://bugs.webkit.org/show_bug.cgi?id=108507
+        http://trac.webkit.org/changeset/189908
+
</ins><span class="cx"> 2015-09-18  Andy Estes  &lt;aestes@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [iOS] did{Start,Finish}LoadForQuickLookDocumentInMainFrame is never called on WKNavigationDelegate
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleInjectedBundlePagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp (190008 => 190009)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp        2015-09-19 04:18:27 UTC (rev 190008)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp        2015-09-19 04:48:54 UTC (rev 190009)
</span><span class="lines">@@ -889,26 +889,12 @@
</span><span class="cx">         injectedBundle.dumpBackForwardListsForAllPages(stringBuilder);
</span><span class="cx"> 
</span><span class="cx">     if (injectedBundle.shouldDumpPixels() &amp;&amp; injectedBundle.testRunner()-&gt;shouldDumpPixels()) {
</span><del>-        WKSnapshotOptions options = kWKSnapshotOptionsShareable;
-        WKRect snapshotRect = WKBundleFrameGetVisibleContentBounds(WKBundlePageGetMainFrame(m_page));
-        bool shouldCreateSnapshot = false;
-        if (injectedBundle.testRunner()-&gt;isPrinting()) {
-            shouldCreateSnapshot = true;
-            options |= kWKSnapshotOptionsPrinting;
-        } else {
-#if PLATFORM(IOS)
-            // Only IOS needs to generate the snapshot in the web process, all other ports generate
-            // a snapshot from the web view contents in the UI process.
-            shouldCreateSnapshot = true;
-            options |= kWKSnapshotOptionsInViewCoordinates;
-            if (injectedBundle.testRunner()-&gt;shouldDumpSelectionRect())
-                options |= kWKSnapshotOptionsPaintSelectionRectangle;
-#endif
-        }
</del><ins>+        WKSnapshotOptions options = kWKSnapshotOptionsShareable | kWKSnapshotOptionsInViewCoordinates;
+        if (injectedBundle.testRunner()-&gt;shouldDumpSelectionRect())
+            options |= kWKSnapshotOptionsPaintSelectionRectangle;
</ins><span class="cx"> 
</span><del>-        if (shouldCreateSnapshot)
-            injectedBundle.setPixelResult(adoptWK(WKBundlePageCreateSnapshotWithOptions(m_page, snapshotRect, options)).get());
-        if (WKBundlePageIsTrackingRepaints(m_page) &amp;&amp; !injectedBundle.testRunner()-&gt;isPrinting())
</del><ins>+        injectedBundle.setPixelResult(adoptWK(WKBundlePageCreateSnapshotWithOptions(m_page, WKBundleFrameGetVisibleContentBounds(WKBundlePageGetMainFrame(m_page)), options)).get());
+        if (WKBundlePageIsTrackingRepaints(m_page))
</ins><span class="cx">             injectedBundle.setRepaintRects(adoptWK(WKBundlePageCopyTrackedRepaintRects(m_page)).get());
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerTestInvocationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/TestInvocation.cpp (190008 => 190009)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/TestInvocation.cpp        2015-09-19 04:18:27 UTC (rev 190008)
+++ trunk/Tools/WebKitTestRunner/TestInvocation.cpp        2015-09-19 04:48:54 UTC (rev 190009)
</span><span class="lines">@@ -276,22 +276,16 @@
</span><span class="cx">     else
</span><span class="cx">         dumpAudio(m_audioResult.get());
</span><span class="cx"> 
</span><del>-    if (m_dumpPixels) {
-        if (m_pixelResult)
-            dumpPixelsAndCompareWithExpected(m_pixelResult.get(), m_repaintRects.get(), TestInvocation::SnapshotResultType::WebContents);
-        else {
-            m_gotRepaint = false;
-            WKPageForceRepaint(TestController::singleton().mainWebView()-&gt;page(), this, TestInvocation::forceRepaintDoneCallback);
-            TestController::singleton().runUntil(m_gotRepaint, TestController::shortTimeout);
-            if (!m_gotRepaint) {
-                m_errorMessage = &quot;Timed out waiting for pre-pixel dump repaint\n&quot;;
-                m_webProcessIsUnresponsive = true;
-                return;
-            }
-            WKRetainPtr&lt;WKImageRef&gt; windowSnapshot = TestController::singleton().mainWebView()-&gt;windowSnapshotImage();
-            ASSERT(windowSnapshot);
-            dumpPixelsAndCompareWithExpected(windowSnapshot.get(), m_repaintRects.get(), TestInvocation::SnapshotResultType::WebView);
</del><ins>+    if (m_dumpPixels &amp;&amp; m_pixelResult) {
+        m_gotRepaint = false;
+        WKPageForceRepaint(TestController::singleton().mainWebView()-&gt;page(), this, TestInvocation::forceRepaintDoneCallback);
+        TestController::singleton().runUntil(m_gotRepaint, TestController::shortTimeout);
+        if (!m_gotRepaint) {
+            m_errorMessage = &quot;Timed out waiting for pre-pixel dump repaint\n&quot;;
+            m_webProcessIsUnresponsive = true;
+            return;
</ins><span class="cx">         }
</span><ins>+        dumpPixelsAndCompareWithExpected(m_pixelResult.get(), m_repaintRects.get());
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     fputs(&quot;#EOF\n&quot;, stdout);
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerTestInvocationh"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/TestInvocation.h (190008 => 190009)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/TestInvocation.h        2015-09-19 04:18:27 UTC (rev 190008)
+++ trunk/Tools/WebKitTestRunner/TestInvocation.h        2015-09-19 04:48:54 UTC (rev 190009)
</span><span class="lines">@@ -65,8 +65,7 @@
</span><span class="cx"> private:
</span><span class="cx">     void dumpResults();
</span><span class="cx">     static void dump(const char* textToStdout, const char* textToStderr = 0, bool seenError = false);
</span><del>-    enum class SnapshotResultType { WebView, WebContents };
-    void dumpPixelsAndCompareWithExpected(WKImageRef, WKArrayRef repaintRects, SnapshotResultType);
</del><ins>+    void dumpPixelsAndCompareWithExpected(WKImageRef, WKArrayRef repaintRects);
</ins><span class="cx">     void dumpAudio(WKDataRef);
</span><span class="cx">     bool compareActualHashToExpectedAndDumpResults(const char[33]);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnercairoTestInvocationCairocpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/cairo/TestInvocationCairo.cpp (190008 => 190009)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/cairo/TestInvocationCairo.cpp        2015-09-19 04:18:27 UTC (rev 190008)
+++ trunk/Tools/WebKitTestRunner/cairo/TestInvocationCairo.cpp        2015-09-19 04:48:54 UTC (rev 190009)
</span><span class="lines">@@ -106,9 +106,9 @@
</span><span class="cx">     cairo_destroy(context);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void TestInvocation::dumpPixelsAndCompareWithExpected(WKImageRef image, WKArrayRef repaintRects, SnapshotResultType)
</del><ins>+void TestInvocation::dumpPixelsAndCompareWithExpected(WKImageRef, WKArrayRef repaintRects)
</ins><span class="cx"> {
</span><del>-    cairo_surface_t* surface = WKImageCreateCairoSurface(image);
</del><ins>+    cairo_surface_t* surface = WKImageCreateCairoSurface(TestController::singleton().mainWebView()-&gt;windowSnapshotImage().get());
</ins><span class="cx"> 
</span><span class="cx">     if (repaintRects)
</span><span class="cx">         paintRepaintRectOverlay(surface, repaintRects);
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnercgTestInvocationCGcpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/cg/TestInvocationCG.cpp (190008 => 190009)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/cg/TestInvocationCG.cpp        2015-09-19 04:18:27 UTC (rev 190008)
+++ trunk/Tools/WebKitTestRunner/cg/TestInvocationCG.cpp        2015-09-19 04:48:54 UTC (rev 190009)
</span><span class="lines">@@ -154,10 +154,17 @@
</span><span class="cx">     CGContextRestoreGState(context);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void TestInvocation::dumpPixelsAndCompareWithExpected(WKImageRef image, WKArrayRef repaintRects, SnapshotResultType snapshotType)
</del><ins>+void TestInvocation::dumpPixelsAndCompareWithExpected(WKImageRef image, WKArrayRef repaintRects)
</ins><span class="cx"> {
</span><del>-    RetainPtr&lt;CGContextRef&gt; context = adoptCF(createCGContextFromImage(image, snapshotType == SnapshotResultType::WebView ? DontFlipGraphicsContext : FlipGraphicsContext));
</del><ins>+    PlatformWebView* webView = TestController::singleton().mainWebView();
+    WKRetainPtr&lt;WKImageRef&gt; windowSnapshot = webView-&gt;windowSnapshotImage();
</ins><span class="cx"> 
</span><ins>+    RetainPtr&lt;CGContextRef&gt; context;
+    if (windowSnapshot)
+        context = adoptCF(createCGContextFromImage(windowSnapshot.get(), DontFlipGraphicsContext));
+    else
+        context = adoptCF(createCGContextFromImage(image));
+
</ins><span class="cx">     // A non-null repaintRects array means we're doing a repaint test.
</span><span class="cx">     if (repaintRects)
</span><span class="cx">         paintRepaintRectOverlay(context.get(), image, repaintRects);
</span></span></pre>
</div>
</div>

</body>
</html>