<!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>[204931] 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/204931">204931</a></dd>
<dt>Author</dt> <dd>simon.fraser@apple.com</dd>
<dt>Date</dt> <dd>2016-08-24 13:53:30 -0700 (Wed, 24 Aug 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>[iOS DRT] Get basic viewport tests working in DRT
https://bugs.webkit.org/show_bug.cgi?id=161160
Reviewed by Tim Horton.
Tools:
Hook up enough of UIScriptController in iOS DRT to be able to read viewport
scale, and get the contentVisibleRect.
Requires exposing a bit of UIWebBrowserView SPI from UIKit, which in turn
requires typing the gWebBrowserView as a DumpRenderTreeBrowserView * everywhere.
One test has different results between DRT and WTR, but DRT behavior seems to differ
from UIWebView here, so just give it a WK1-specific result.
* DumpRenderTree/ios/DumpRenderTreeBrowserView.h:
* DumpRenderTree/ios/DumpRenderTreeBrowserView.mm:
(-[DumpRenderTreeBrowserView documentVisibleRect]):
* DumpRenderTree/ios/PixelDumpSupportIOS.mm:
* DumpRenderTree/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptController::zoomScale):
(WTR::UIScriptController::minimumZoomScale):
(WTR::UIScriptController::maximumZoomScale):
(WTR::UIScriptController::contentVisibleRect):
* DumpRenderTree/mac/DumpRenderTree.mm:
(createWebViewAndOffscreenWindow):
* DumpRenderTree/mac/DumpRenderTreeMac.h:
LayoutTests:
Enable some fast/viewport/ios/ tests for ios-simulator-wk1 that work now.
"body-overflow-hidden" tests should pass everywhere now since the behavior of overflow:hidden
on the body was reverted.
* fast/viewport/ios/width-is-device-width-overflowing-body-overflow-hidden-expected.txt:
* fast/viewport/ios/width-is-device-width-overflowing-body-overflow-hidden-tall-expected.txt:
* fast/viewport/ios/width-is-device-width-overflowing-expected.txt:
* platform/ios-simulator-wk1/TestExpectations:
* platform/ios-simulator-wk1/fast/viewport/ios/width-is-device-width-overflowing-body-overflow-hidden-tall-expected.txt: Renamed from LayoutTests/platform/ios-simulator/fast/viewport/ios/width-is-device-width-overflowing-expected.txt.
* platform/ios-simulator-wk2/TestExpectations:
* platform/ios-simulator/fast/viewport/ios/width-is-device-width-overflowing-body-overflow-hidden-expected.txt: Removed.
* platform/ios-simulator/fast/viewport/ios/width-is-device-width-overflowing-body-overflow-hidden-tall-expected.txt: Removed.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfastviewportioswidthisdevicewidthoverflowingbodyoverflowhiddenexpectedtxt">trunk/LayoutTests/fast/viewport/ios/width-is-device-width-overflowing-body-overflow-hidden-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastviewportioswidthisdevicewidthoverflowingbodyoverflowhiddentallexpectedtxt">trunk/LayoutTests/fast/viewport/ios/width-is-device-width-overflowing-body-overflow-hidden-tall-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastviewportioswidthisdevicewidthoverflowingexpectedtxt">trunk/LayoutTests/fast/viewport/ios/width-is-device-width-overflowing-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformiossimulatorwk1TestExpectations">trunk/LayoutTests/platform/ios-simulator-wk1/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsplatformiossimulatorwk2TestExpectations">trunk/LayoutTests/platform/ios-simulator-wk2/TestExpectations</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsDumpRenderTreeiosDumpRenderTreeBrowserViewh">trunk/Tools/DumpRenderTree/ios/DumpRenderTreeBrowserView.h</a></li>
<li><a href="#trunkToolsDumpRenderTreeiosDumpRenderTreeBrowserViewmm">trunk/Tools/DumpRenderTree/ios/DumpRenderTreeBrowserView.mm</a></li>
<li><a href="#trunkToolsDumpRenderTreeiosPixelDumpSupportIOSmm">trunk/Tools/DumpRenderTree/ios/PixelDumpSupportIOS.mm</a></li>
<li><a href="#trunkToolsDumpRenderTreeiosUIScriptControllerIOSmm">trunk/Tools/DumpRenderTree/ios/UIScriptControllerIOS.mm</a></li>
<li><a href="#trunkToolsDumpRenderTreemacDumpRenderTreemm">trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm</a></li>
<li><a href="#trunkToolsDumpRenderTreemacDumpRenderTreeMach">trunk/Tools/DumpRenderTree/mac/DumpRenderTreeMac.h</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li>trunk/LayoutTests/platform/ios-simulator-wk1/fast/viewport/</li>
<li>trunk/LayoutTests/platform/ios-simulator-wk1/fast/viewport/ios/</li>
<li><a href="#trunkLayoutTestsplatformiossimulatorwk1fastviewportioswidthisdevicewidthoverflowingbodyoverflowhiddentallexpectedtxt">trunk/LayoutTests/platform/ios-simulator-wk1/fast/viewport/ios/width-is-device-width-overflowing-body-overflow-hidden-tall-expected.txt</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsplatformiossimulatorfastviewportioswidthisdevicewidthoverflowingbodyoverflowhiddenexpectedtxt">trunk/LayoutTests/platform/ios-simulator/fast/viewport/ios/width-is-device-width-overflowing-body-overflow-hidden-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformiossimulatorfastviewportioswidthisdevicewidthoverflowingbodyoverflowhiddentallexpectedtxt">trunk/LayoutTests/platform/ios-simulator/fast/viewport/ios/width-is-device-width-overflowing-body-overflow-hidden-tall-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformiossimulatorfastviewportioswidthisdevicewidthoverflowingexpectedtxt">trunk/LayoutTests/platform/ios-simulator/fast/viewport/ios/width-is-device-width-overflowing-expected.txt</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (204930 => 204931)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-08-24 20:53:25 UTC (rev 204930)
+++ trunk/LayoutTests/ChangeLog        2016-08-24 20:53:30 UTC (rev 204931)
</span><span class="lines">@@ -1,3 +1,24 @@
</span><ins>+2016-08-24 Simon Fraser <simon.fraser@apple.com>
+
+ [iOS DRT] Get basic viewport tests working in DRT
+ https://bugs.webkit.org/show_bug.cgi?id=161160
+
+ Reviewed by Tim Horton.
+
+ Enable some fast/viewport/ios/ tests for ios-simulator-wk1 that work now.
+
+ "body-overflow-hidden" tests should pass everywhere now since the behavior of overflow:hidden
+ on the body was reverted.
+
+ * fast/viewport/ios/width-is-device-width-overflowing-body-overflow-hidden-expected.txt:
+ * fast/viewport/ios/width-is-device-width-overflowing-body-overflow-hidden-tall-expected.txt:
+ * fast/viewport/ios/width-is-device-width-overflowing-expected.txt:
+ * platform/ios-simulator-wk1/TestExpectations:
+ * platform/ios-simulator-wk1/fast/viewport/ios/width-is-device-width-overflowing-body-overflow-hidden-tall-expected.txt: Renamed from LayoutTests/platform/ios-simulator/fast/viewport/ios/width-is-device-width-overflowing-expected.txt.
+ * platform/ios-simulator-wk2/TestExpectations:
+ * platform/ios-simulator/fast/viewport/ios/width-is-device-width-overflowing-body-overflow-hidden-expected.txt: Removed.
+ * platform/ios-simulator/fast/viewport/ios/width-is-device-width-overflowing-body-overflow-hidden-tall-expected.txt: Removed.
+
</ins><span class="cx"> 2016-08-24 Ryan Haddad <ryanhaddad@apple.com>
</span><span class="cx">
</span><span class="cx"> Marking wpt LayoutTest scroll-restoration-fragment-scrolling-samedoc.html as flaky on ios-simulator.
</span></span></pre></div>
<a id="trunkLayoutTestsfastviewportioswidthisdevicewidthoverflowingbodyoverflowhiddenexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/viewport/ios/width-is-device-width-overflowing-body-overflow-hidden-expected.txt (204930 => 204931)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/viewport/ios/width-is-device-width-overflowing-body-overflow-hidden-expected.txt        2016-08-24 20:53:25 UTC (rev 204930)
+++ trunk/LayoutTests/fast/viewport/ios/width-is-device-width-overflowing-body-overflow-hidden-expected.txt        2016-08-24 20:53:30 UTC (rev 204931)
</span><span class="lines">@@ -1,7 +1,7 @@
</span><span class="cx"> Viewport: width=device-width
</span><span class="cx">
</span><del>-scale        5.00000
</del><ins>+scale        1.00000
</ins><span class="cx"> maxScale        5.00000
</span><del>-minScale        5.00000
-visibleRect        {"left":"0.00000","top":"0.00000","width":"64.00000","height":"96.00000"}
</del><ins>+minScale        1.00000
+visibleRect        {"left":"0.00000","top":"0.00000","width":"320.00000","height":"568.00000"}
</ins><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsfastviewportioswidthisdevicewidthoverflowingbodyoverflowhiddentallexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/viewport/ios/width-is-device-width-overflowing-body-overflow-hidden-tall-expected.txt (204930 => 204931)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/viewport/ios/width-is-device-width-overflowing-body-overflow-hidden-tall-expected.txt        2016-08-24 20:53:25 UTC (rev 204930)
+++ trunk/LayoutTests/fast/viewport/ios/width-is-device-width-overflowing-body-overflow-hidden-tall-expected.txt        2016-08-24 20:53:30 UTC (rev 204931)
</span><span class="lines">@@ -1,7 +1,7 @@
</span><span class="cx"> Viewport: width=device-width
</span><span class="cx">
</span><del>-scale        1.05263
</del><ins>+scale        0.55469
</ins><span class="cx"> maxScale        5.00000
</span><del>-minScale        1.05263
-visibleRect        {"left":"0.00000","top":"0.00000","width":"303.99999","height":"455.99998"}
</del><ins>+minScale        0.55469
+visibleRect        {"left":"0.00000","top":"0.00000","width":"576.90143","height":"1024.00000"}
</ins><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsfastviewportioswidthisdevicewidthoverflowingexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/viewport/ios/width-is-device-width-overflowing-expected.txt (204930 => 204931)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/viewport/ios/width-is-device-width-overflowing-expected.txt        2016-08-24 20:53:25 UTC (rev 204930)
+++ trunk/LayoutTests/fast/viewport/ios/width-is-device-width-overflowing-expected.txt        2016-08-24 20:53:30 UTC (rev 204931)
</span><span class="lines">@@ -3,5 +3,5 @@
</span><span class="cx"> scale        1.00000
</span><span class="cx"> maxScale        5.00000
</span><span class="cx"> minScale        1.00000
</span><del>-visibleRect        {"left":"0.00000","top":"0.00000","width":"320.00000","height":"480.00000"}
</del><ins>+visibleRect        {"left":"0.00000","top":"0.00000","width":"320.00000","height":"568.00000"}
</ins><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatorfastviewportioswidthisdevicewidthoverflowingbodyoverflowhiddenexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/platform/ios-simulator/fast/viewport/ios/width-is-device-width-overflowing-body-overflow-hidden-expected.txt (204930 => 204931)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator/fast/viewport/ios/width-is-device-width-overflowing-body-overflow-hidden-expected.txt        2016-08-24 20:53:25 UTC (rev 204930)
+++ trunk/LayoutTests/platform/ios-simulator/fast/viewport/ios/width-is-device-width-overflowing-body-overflow-hidden-expected.txt        2016-08-24 20:53:30 UTC (rev 204931)
</span><span class="lines">@@ -1,7 +0,0 @@
</span><del>-Viewport: width=device-width
-
-scale        1.00000
-maxScale        5.00000
-minScale        1.00000
-visibleRect        {"left":"0.00000","top":"0.00000","width":"320.00000","height":"480.00000"}
-
</del></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatorfastviewportioswidthisdevicewidthoverflowingbodyoverflowhiddentallexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/platform/ios-simulator/fast/viewport/ios/width-is-device-width-overflowing-body-overflow-hidden-tall-expected.txt (204930 => 204931)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator/fast/viewport/ios/width-is-device-width-overflowing-body-overflow-hidden-tall-expected.txt        2016-08-24 20:53:25 UTC (rev 204930)
+++ trunk/LayoutTests/platform/ios-simulator/fast/viewport/ios/width-is-device-width-overflowing-body-overflow-hidden-tall-expected.txt        2016-08-24 20:53:30 UTC (rev 204931)
</span><span class="lines">@@ -1,7 +0,0 @@
</span><del>-Viewport: width=device-width
-
-scale        0.46875
-maxScale        5.00000
-minScale        0.46875
-visibleRect        {"left":"0.00000","top":"0.00000","width":"682.66667","height":"1024.00000"}
-
</del></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatorfastviewportioswidthisdevicewidthoverflowingexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/platform/ios-simulator/fast/viewport/ios/width-is-device-width-overflowing-expected.txt (204930 => 204931)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator/fast/viewport/ios/width-is-device-width-overflowing-expected.txt        2016-08-24 20:53:25 UTC (rev 204930)
+++ trunk/LayoutTests/platform/ios-simulator/fast/viewport/ios/width-is-device-width-overflowing-expected.txt        2016-08-24 20:53:30 UTC (rev 204931)
</span><span class="lines">@@ -1,7 +0,0 @@
</span><del>-Viewport: width=device-width
-
-scale        1.00000
-maxScale        5.00000
-minScale        1.00000
-visibleRect        {"left":"0.00000","top":"0.00000","width":"320.00000","height":"480.00000"}
-
</del></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatorwk1TestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/ios-simulator-wk1/TestExpectations (204930 => 204931)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator-wk1/TestExpectations        2016-08-24 20:53:25 UTC (rev 204930)
+++ trunk/LayoutTests/platform/ios-simulator-wk1/TestExpectations        2016-08-24 20:53:30 UTC (rev 204931)
</span><span class="lines">@@ -2,6 +2,14 @@
</span><span class="cx"> #
</span><span class="cx"> # See http://trac.webkit.org/wiki/TestExpectations for more information on this file.
</span><span class="cx">
</span><ins>+# Selectively re-enable viewport tests that work
+fast/viewport/ios/width-is-device-width.html [ Pass ]
+fast/viewport/ios/width-is-device-width-overflowing.html [ Pass ]
+fast/viewport/ios/width-is-device-width-overflowing-no-shrink-to-fit.html [ Pass ]
+fast/viewport/ios/width-is-device-width-overflowing-body-overflow-hidden.html [ Pass ]
+fast/viewport/ios/width-is-device-width-overflowing-body-overflow-hidden-tall.html [ Pass ]
+fast/viewport/ios/ipad/width-is-device-width.html [ Pass ]
+
</ins><span class="cx"> # <rdar://problem/6501130> LayoutTests: Enable editing tests after we support editing
</span><span class="cx"> editing/deleting/4922367.html
</span><span class="cx"> editing/deleting/5126166.html
</span></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatorwk1fastviewportioswidthisdevicewidthoverflowingbodyoverflowhiddentallexpectedtxtfromrev204930trunkLayoutTestsplatformiossimulatorfastviewportioswidthisdevicewidthoverflowingbodyoverflowhiddenexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/platform/ios-simulator-wk1/fast/viewport/ios/width-is-device-width-overflowing-body-overflow-hidden-tall-expected.txt (from rev 204930, trunk/LayoutTests/platform/ios-simulator/fast/viewport/ios/width-is-device-width-overflowing-body-overflow-hidden-expected.txt) (0 => 204931)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator-wk1/fast/viewport/ios/width-is-device-width-overflowing-body-overflow-hidden-tall-expected.txt         (rev 0)
+++ trunk/LayoutTests/platform/ios-simulator-wk1/fast/viewport/ios/width-is-device-width-overflowing-body-overflow-hidden-tall-expected.txt        2016-08-24 20:53:30 UTC (rev 204931)
</span><span class="lines">@@ -0,0 +1,7 @@
</span><ins>+Viewport: width=device-width
+
+scale        1.00000
+maxScale        5.00000
+minScale        1.00000
+visibleRect        {"left":"0.00000","top":"0.00000","width":"320.00000","height":"568.00000"}
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatorwk2TestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/ios-simulator-wk2/TestExpectations (204930 => 204931)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator-wk2/TestExpectations        2016-08-24 20:53:25 UTC (rev 204930)
+++ trunk/LayoutTests/platform/ios-simulator-wk2/TestExpectations        2016-08-24 20:53:30 UTC (rev 204931)
</span><span class="lines">@@ -1769,11 +1769,6 @@
</span><span class="cx">
</span><span class="cx"> # Forcing always allow user scalable is not supported on certain OS version.
</span><span class="cx"> webkit.org/b/155056 fast/viewport/ios/force-always-user-scalable.html [ Skip ]
</span><del>-webkit.org/b/153110 fast/viewport/ios/width-is-device-width-overflowing.html [ Pass Failure ]
-webkit.org/b/153110 fast/viewport/ios/width-is-device-width-overflowing-body-overflow-hidden.html [ Pass Failure ]
-webkit.org/b/153110 fast/viewport/ios/width-is-device-width-overflowing-body-overflow-hidden-tall.html [ Pass Failure ]
-fast/viewport/ios/width-is-device-width.html [ Pass ]
-fast/viewport/ios/width-is-device-width-overflowing-no-shrink-to-fit.html [ Pass ]
</del><span class="cx">
</span><span class="cx"> webkit.org/b/155501 animations/3d/transform-origin-vs-functions.html [ Pass Failure ]
</span><span class="cx">
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (204930 => 204931)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2016-08-24 20:53:25 UTC (rev 204930)
+++ trunk/Tools/ChangeLog        2016-08-24 20:53:30 UTC (rev 204931)
</span><span class="lines">@@ -1,5 +1,34 @@
</span><span class="cx"> 2016-08-24 Simon Fraser <simon.fraser@apple.com>
</span><span class="cx">
</span><ins>+ [iOS DRT] Get basic viewport tests working in DRT
+ https://bugs.webkit.org/show_bug.cgi?id=161160
+
+ Reviewed by Tim Horton.
+
+ Hook up enough of UIScriptController in iOS DRT to be able to read viewport
+ scale, and get the contentVisibleRect.
+
+ Requires exposing a bit of UIWebBrowserView SPI from UIKit, which in turn
+ requires typing the gWebBrowserView as a DumpRenderTreeBrowserView * everywhere.
+
+ One test has different results between DRT and WTR, but DRT behavior seems to differ
+ from UIWebView here, so just give it a WK1-specific result.
+
+ * DumpRenderTree/ios/DumpRenderTreeBrowserView.h:
+ * DumpRenderTree/ios/DumpRenderTreeBrowserView.mm:
+ (-[DumpRenderTreeBrowserView documentVisibleRect]):
+ * DumpRenderTree/ios/PixelDumpSupportIOS.mm:
+ * DumpRenderTree/ios/UIScriptControllerIOS.mm:
+ (WTR::UIScriptController::zoomScale):
+ (WTR::UIScriptController::minimumZoomScale):
+ (WTR::UIScriptController::maximumZoomScale):
+ (WTR::UIScriptController::contentVisibleRect):
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (createWebViewAndOffscreenWindow):
+ * DumpRenderTree/mac/DumpRenderTreeMac.h:
+
+2016-08-24 Simon Fraser <simon.fraser@apple.com>
+
</ins><span class="cx"> Minor project rearrangement.
</span><span class="cx">
</span><span class="cx"> * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreeiosDumpRenderTreeBrowserViewh"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/ios/DumpRenderTreeBrowserView.h (204930 => 204931)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/ios/DumpRenderTreeBrowserView.h        2016-08-24 20:53:25 UTC (rev 204930)
+++ trunk/Tools/DumpRenderTree/ios/DumpRenderTreeBrowserView.h        2016-08-24 20:53:30 UTC (rev 204931)
</span><span class="lines">@@ -33,3 +33,9 @@
</span><span class="cx"> @property (nonatomic, assign) BOOL scrollingUsesUIWebScrollView;
</span><span class="cx">
</span><span class="cx"> @end
</span><ins>+
+@interface DumpRenderTreeBrowserView (DRTTesting)
+
+- (CGRect)documentVisibleRect;
+
+@end
</ins></span></pre></div>
<a id="trunkToolsDumpRenderTreeiosDumpRenderTreeBrowserViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/ios/DumpRenderTreeBrowserView.mm (204930 => 204931)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/ios/DumpRenderTreeBrowserView.mm        2016-08-24 20:53:25 UTC (rev 204930)
+++ trunk/Tools/DumpRenderTree/ios/DumpRenderTreeBrowserView.mm        2016-08-24 20:53:30 UTC (rev 204931)
</span><span class="lines">@@ -23,6 +23,7 @@
</span><span class="cx"> * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx"> */
</span><span class="cx">
</span><ins>+#import "config.h"
</ins><span class="cx"> #import "DumpRenderTreeBrowserView.h"
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="lines">@@ -33,6 +34,10 @@
</span><span class="cx"> - (BOOL)webView:(WebView *)webView shouldScrollToPoint:(CGPoint)point forFrame:(WebFrame *)frame;
</span><span class="cx"> @end
</span><span class="cx">
</span><ins>+@interface UIWebBrowserView (UIKitInternals)
+- (CGRect)_documentViewVisibleRect;
+@end
+
</ins><span class="cx"> @implementation DumpRenderTreeBrowserView
</span><span class="cx">
</span><span class="cx"> @synthesize scrollingUsesUIWebScrollView = _scrollingUsesUIWebScrollView;
</span><span class="lines">@@ -73,4 +78,13 @@
</span><span class="cx">
</span><span class="cx"> @end
</span><span class="cx">
</span><ins>+@implementation DumpRenderTreeBrowserView (DRTTesting)
+
+- (CGRect)documentVisibleRect
+{
+ return [self _documentViewVisibleRect];
+}
+
+@end
+
</ins><span class="cx"> #endif // PLATFORM(IOS)
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreeiosPixelDumpSupportIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/ios/PixelDumpSupportIOS.mm (204930 => 204931)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/ios/PixelDumpSupportIOS.mm        2016-08-24 20:53:25 UTC (rev 204930)
+++ trunk/Tools/DumpRenderTree/ios/PixelDumpSupportIOS.mm        2016-08-24 20:53:30 UTC (rev 204931)
</span><span class="lines">@@ -46,7 +46,7 @@
</span><span class="cx"> #import <wtf/RetainPtr.h>
</span><span class="cx">
</span><span class="cx"> extern DumpRenderTreeWindow *gDrtWindow;
</span><del>-extern UIWebBrowserView *gWebBrowserView;
</del><ins>+extern DumpRenderTreeBrowserView *gWebBrowserView;
</ins><span class="cx">
</span><span class="cx"> PassRefPtr<BitmapContext> createBitmapContextFromWebView(bool onscreen, bool incrementalRepaint, bool sweepHorizontally, bool drawSelectionRect)
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreeiosUIScriptControllerIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/ios/UIScriptControllerIOS.mm (204930 => 204931)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/ios/UIScriptControllerIOS.mm        2016-08-24 20:53:25 UTC (rev 204930)
+++ trunk/Tools/DumpRenderTree/ios/UIScriptControllerIOS.mm        2016-08-24 20:53:30 UTC (rev 204931)
</span><span class="lines">@@ -28,8 +28,13 @@
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx">
</span><ins>+#import "DumpRenderTreeBrowserView.h"
</ins><span class="cx"> #import "UIScriptContext.h"
</span><ins>+#import <WebCore/FloatRect.h>
</ins><span class="cx">
</span><ins>+extern DumpRenderTreeBrowserView *gWebBrowserView;
+extern UIWebScrollView *gWebScrollView;
+
</ins><span class="cx"> namespace WTR {
</span><span class="cx">
</span><span class="cx"> void UIScriptController::doAsyncTask(JSValueRef callback)
</span><span class="lines">@@ -49,7 +54,7 @@
</span><span class="cx">
</span><span class="cx"> double UIScriptController::zoomScale() const
</span><span class="cx"> {
</span><del>- return 1;
</del><ins>+ return gWebScrollView.zoomScale;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void UIScriptController::touchDownAtPoint(long x, long y, long touchCount, JSValueRef callback)
</span><span class="lines">@@ -106,17 +111,19 @@
</span><span class="cx">
</span><span class="cx"> double UIScriptController::minimumZoomScale() const
</span><span class="cx"> {
</span><del>- return 1;
</del><ins>+ return gWebScrollView.minimumZoomScale;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> double UIScriptController::maximumZoomScale() const
</span><span class="cx"> {
</span><del>- return 1;
</del><ins>+ return gWebScrollView.maximumZoomScale;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> JSObjectRef UIScriptController::contentVisibleRect() const
</span><span class="cx"> {
</span><del>- return nullptr;
</del><ins>+ CGRect contentVisibleRect = [gWebBrowserView documentVisibleRect];
+ WebCore::FloatRect rect(contentVisibleRect.origin.x, contentVisibleRect.origin.y, contentVisibleRect.size.width, contentVisibleRect.size.height);
+ return m_context->objectFromRect(rect);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void UIScriptController::platformSetDidStartFormControlInteractionCallback()
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreemacDumpRenderTreemm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm (204930 => 204931)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm        2016-08-24 20:53:25 UTC (rev 204930)
+++ trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm        2016-08-24 20:53:30 UTC (rev 204931)
</span><span class="lines">@@ -221,7 +221,7 @@
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> const CGRect layoutTestViewportRect = { {0, 0}, {static_cast<CGFloat>(TestRunner::viewWidth), static_cast<CGFloat>(TestRunner::viewHeight)} };
</span><del>-UIWebBrowserView *gWebBrowserView = nil;
</del><ins>+DumpRenderTreeBrowserView *gWebBrowserView = nil;
</ins><span class="cx"> UIWebScrollView *gWebScrollView = nil;
</span><span class="cx"> DumpRenderTreeWindow *gDrtWindow = nil;
</span><span class="cx"> #endif
</span><span class="lines">@@ -758,7 +758,7 @@
</span><span class="cx"> NSRect rect = NSMakeRect(0, 0, TestRunner::viewWidth, TestRunner::viewHeight);
</span><span class="cx"> WebView *webView = [[WebView alloc] initWithFrame:rect frameName:nil groupName:@"org.webkit.DumpRenderTree"];
</span><span class="cx"> #else
</span><del>- UIWebBrowserView *webBrowserView = [[[DumpRenderTreeBrowserView alloc] initWithFrame:layoutTestViewportRect] autorelease];
</del><ins>+ DumpRenderTreeBrowserView *webBrowserView = [[[DumpRenderTreeBrowserView alloc] initWithFrame:layoutTestViewportRect] autorelease];
</ins><span class="cx"> [webBrowserView setInputViewObeysDOMFocus:YES];
</span><span class="cx"> WebView *webView = [[webBrowserView webView] retain];
</span><span class="cx"> [webView setGroupName:@"org.webkit.DumpRenderTree"];
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreemacDumpRenderTreeMach"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/mac/DumpRenderTreeMac.h (204930 => 204931)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/mac/DumpRenderTreeMac.h        2016-08-24 20:53:25 UTC (rev 204930)
+++ trunk/Tools/DumpRenderTree/mac/DumpRenderTreeMac.h        2016-08-24 20:53:30 UTC (rev 204931)
</span><span class="lines">@@ -69,8 +69,8 @@
</span><span class="cx"> - (void)_waitForWebThread;
</span><span class="cx"> @end
</span><span class="cx">
</span><del>-@class UIWebBrowserView;
-extern UIWebBrowserView *gWebBrowserView;
</del><ins>+@class DumpRenderTreeBrowserView;
+extern DumpRenderTreeBrowserView *gWebBrowserView;
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> int DumpRenderTreeMain(int, const char *[]);
</span></span></pre>
</div>
</div>
</body>
</html>